@useinsider/guido 1.0.3-beta.cdff8ce → 1.0.3-beta.ce3ed00
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 -6
- 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 +41 -47
- 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 +43 -40
- package/dist/extensions/Blocks/Items/controls/button/link.js +17 -25
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +57 -151
- package/dist/extensions/Blocks/Items/controls/image/link.js +20 -28
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +22 -29
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +18 -25
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +8 -18
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +30 -37
- package/dist/extensions/Blocks/Items/controls/price/hideDiscount.js +14 -37
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +130 -167
- package/dist/extensions/Blocks/Items/enums/controlEnums.js +2 -2
- package/dist/extensions/Blocks/Items/enums/productEnums.js +5 -98
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +7 -21
- package/dist/extensions/Blocks/Items/extension.js +8 -9
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +59 -57
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +61 -67
- package/dist/extensions/Blocks/Items/settingsPanel.js +43 -69
- package/dist/extensions/Blocks/Items/store/items-block.js +4 -12
- package/dist/extensions/Blocks/Items/template.js +63 -150
- 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 +41 -45
- package/dist/extensions/Blocks/common-control.js +125 -164
- 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/@stripoinc/ui-editor-extensions/dist/esm/index.js +2 -12
- 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 -15
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +7 -20
- package/dist/src/extensions/Blocks/Items/controls/price/currencySymbol.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/controls/price/hideDiscount.d.ts +1 -5
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +2 -8
- package/dist/src/extensions/Blocks/Items/enums/controlEnums.d.ts +0 -1
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +0 -20
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +0 -15
- package/dist/src/extensions/Blocks/Items/store/items-block.d.ts +1 -5
- 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/Blocks/Unsubscribe/block.d.ts +4 -3
- package/dist/src/extensions/Blocks/common-control.d.ts +2 -25
- 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 +12 -7
- 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/extensions/Blocks/Items/controls/price/priceOrientation.js +0 -92
- package/dist/extensions/Blocks/Items/utils/configBlockUtils.js +0 -17
- package/dist/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.js +0 -28
- package/dist/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.js +0 -76
- package/dist/extensions/Blocks/Items/utils/updateAttributes.js +0 -46
- 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/extensions/Blocks/Items/controls/price/priceOrientation.d.ts +0 -15
- package/dist/src/extensions/Blocks/Items/utils/configBlockUtils.d.ts +0 -23
- package/dist/src/extensions/Blocks/Items/utils/syncAttributeFromConfigBlock.d.ts +0 -32
- package/dist/src/extensions/Blocks/Items/utils/syncAttributesFromConfigBlock.d.ts +0 -50
- package/dist/src/extensions/Blocks/Items/utils/updateAttributes.d.ts +0 -8
- 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,29 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { UEAttr as
|
|
5
|
-
import { CommonControl as
|
|
6
|
-
import { ItemsBlockId as
|
|
7
|
-
import { productPairs as
|
|
8
|
-
import { ItemTypeOptions as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useItemsBlockStore as
|
|
12
|
-
import { getDefaultTemplate as
|
|
13
|
-
|
|
14
|
-
import { updateConfigBlockAttributes as f } from "../utils/updateAttributes.js";
|
|
15
|
-
const G = "ui-elements-items-block", s = {
|
|
1
|
+
var P = Object.defineProperty;
|
|
2
|
+
var f = (I, p, e) => p in I ? P(I, p, { enumerable: !0, configurable: !0, writable: !0, value: e }) : I[p] = e;
|
|
3
|
+
var O = (I, p, e) => f(I, typeof p != "symbol" ? p + "" : p, e);
|
|
4
|
+
import { UEAttr as C, ModificationDescription as m } from "../../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
+
import { CommonControl as M } from "../../common-control.js";
|
|
6
|
+
import { ItemsBlockId as a } from "../enums/controlEnums.js";
|
|
7
|
+
import { productPairs as d } from "../enums/productEnums.js";
|
|
8
|
+
import { ItemTypeOptions as R, OrientationOptions as A, ItemInCartOptions as S, SETTINGS_ENUMS as N } from "../enums/settingsEnums.js";
|
|
9
|
+
import x from "../layouts/horizontal.html.js";
|
|
10
|
+
import b from "../layouts/vertical.html.js";
|
|
11
|
+
import { useItemsBlockStore as D } from "../store/items-block.js";
|
|
12
|
+
import { getDefaultTemplate as L } from "../template.js";
|
|
13
|
+
const H = "ui-elements-items-block", o = {
|
|
16
14
|
ITEMS_TYPE: "itemsType",
|
|
17
15
|
ORIENTATION: "orientation",
|
|
18
16
|
ITEM_IDS: "itemIds"
|
|
19
17
|
};
|
|
20
|
-
class
|
|
18
|
+
class v extends M {
|
|
21
19
|
constructor() {
|
|
22
20
|
super(...arguments);
|
|
23
|
-
|
|
21
|
+
O(this, "store", D());
|
|
24
22
|
}
|
|
25
23
|
getId() {
|
|
26
|
-
return
|
|
24
|
+
return H;
|
|
27
25
|
}
|
|
28
26
|
getTemplate() {
|
|
29
27
|
return `
|
|
@@ -36,24 +34,17 @@ class te extends x {
|
|
|
36
34
|
}
|
|
37
35
|
onRender() {
|
|
38
36
|
this.api.updateValues({
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
37
|
+
[o.ORIENTATION]: this.store.orientation,
|
|
38
|
+
[o.ITEMS_TYPE]: this.store.itemsType,
|
|
39
|
+
[o.ITEM_IDS]: this.store.itemIds
|
|
42
40
|
}), this._listenToFormUpdates();
|
|
43
41
|
}
|
|
44
42
|
onTemplateNodeUpdated(e) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
this.api.updateValues({
|
|
51
|
-
[s.ORIENTATION]: this.store.orientation,
|
|
52
|
-
[s.ITEMS_TYPE]: this.store.itemsType,
|
|
53
|
-
[s.ITEM_IDS]: this.store.itemIds
|
|
54
|
-
}), this._initializeSelectItems();
|
|
55
|
-
}
|
|
56
|
-
);
|
|
43
|
+
this.currentNode = e, this.api.updateValues({
|
|
44
|
+
[o.ORIENTATION]: this.store.orientation,
|
|
45
|
+
[o.ITEMS_TYPE]: this.store.itemsType,
|
|
46
|
+
[o.ITEM_IDS]: this.store.itemIds
|
|
47
|
+
}), this._initializeSelectItems();
|
|
57
48
|
}
|
|
58
49
|
onDestroy() {
|
|
59
50
|
const e = this._getTemplateData();
|
|
@@ -64,10 +55,10 @@ class te extends x {
|
|
|
64
55
|
${this._GuOneColumn([
|
|
65
56
|
this._GuLabel({ text: "Item Type" }),
|
|
66
57
|
this._GuSelect({
|
|
67
|
-
name:
|
|
58
|
+
name: o.ITEMS_TYPE,
|
|
68
59
|
className: "es-100",
|
|
69
60
|
placeholder: "Select Item Type",
|
|
70
|
-
options:
|
|
61
|
+
options: R
|
|
71
62
|
})
|
|
72
63
|
])}
|
|
73
64
|
`;
|
|
@@ -77,8 +68,8 @@ class te extends x {
|
|
|
77
68
|
${this._GuTwoColumns([
|
|
78
69
|
this._GuLabel({ text: "Orientation" }),
|
|
79
70
|
this._GuRadioButton({
|
|
80
|
-
name:
|
|
81
|
-
buttons:
|
|
71
|
+
name: o.ORIENTATION,
|
|
72
|
+
buttons: A
|
|
82
73
|
})
|
|
83
74
|
])}
|
|
84
75
|
`;
|
|
@@ -88,7 +79,7 @@ class te extends x {
|
|
|
88
79
|
${this._GuTwoColumns([
|
|
89
80
|
this._GuLabel({ text: "Item in Cart" }),
|
|
90
81
|
this._GuSelect({
|
|
91
|
-
name:
|
|
82
|
+
name: o.ITEM_IDS,
|
|
92
83
|
className: "es-100",
|
|
93
84
|
placeholder: "Select Item In Cart",
|
|
94
85
|
options: []
|
|
@@ -97,189 +88,161 @@ class te extends x {
|
|
|
97
88
|
`;
|
|
98
89
|
}
|
|
99
90
|
_onOrientationChange(e) {
|
|
100
|
-
console.debug("Orientation changed to: ", e), this.store.setOrientation(e), this.
|
|
101
|
-
this._recalculateTrimming();
|
|
102
|
-
}, 50);
|
|
91
|
+
console.debug("Orientation changed to: ", e), this.store.setOrientation(e), this.api.updateValues({ [o.ORIENTATION]: e }), this._reOrderTemplate(), this._recalculateTrimming();
|
|
103
92
|
}
|
|
104
|
-
_onItemsTypeChange(e) {
|
|
105
|
-
const i =
|
|
106
|
-
|
|
93
|
+
_onItemsTypeChange(e, t) {
|
|
94
|
+
const { itemIds: i } = this.store, r = N.ITEMS_TYPE[e], n = S[t].findIndex((c) => c.value === i), s = S[e][n];
|
|
95
|
+
r && (this.store.setItemsType(r), this.store.setItemIds(s.value), this._initializeSelectItems(), this._reFillTemplate());
|
|
107
96
|
}
|
|
108
97
|
_onItemIdsChange(e) {
|
|
109
|
-
console.debug("Item ids changed to: ", e), this.store.setItemIds(e), this.api.updateValues({ [
|
|
98
|
+
console.debug("Item ids changed to: ", e), this.store.setItemIds(e), this.api.updateValues({ [o.ITEM_IDS]: e }), this._reFillTemplate();
|
|
110
99
|
}
|
|
111
100
|
_initializeSelectItems() {
|
|
112
101
|
this.api.setUIEAttribute(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
102
|
+
o.ITEMS_TYPE,
|
|
103
|
+
C.SELECTPICKER.items,
|
|
104
|
+
R
|
|
116
105
|
);
|
|
117
|
-
const { itemsType: e, itemIds:
|
|
106
|
+
const { itemsType: e, itemIds: t } = this.store;
|
|
118
107
|
this.api.updateValues({
|
|
119
|
-
[
|
|
108
|
+
[o.ITEMS_TYPE]: e
|
|
120
109
|
});
|
|
121
|
-
const
|
|
110
|
+
const i = S[e];
|
|
122
111
|
this.api.setUIEAttribute(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
112
|
+
o.ITEM_IDS,
|
|
113
|
+
C.SELECTPICKER.items,
|
|
114
|
+
i
|
|
126
115
|
), this.api.updateValues({
|
|
127
|
-
[
|
|
116
|
+
[o.ITEM_IDS]: t
|
|
128
117
|
});
|
|
129
118
|
}
|
|
130
119
|
_listenToFormUpdates() {
|
|
131
120
|
this.api.onValueChanged(
|
|
132
|
-
|
|
133
|
-
(e) => this._onItemsTypeChange(e)
|
|
121
|
+
o.ITEMS_TYPE,
|
|
122
|
+
(e, t) => this._onItemsTypeChange(e, t)
|
|
134
123
|
), this.api.onValueChanged(
|
|
135
|
-
|
|
124
|
+
o.ORIENTATION,
|
|
136
125
|
(e) => this._onOrientationChange(e)
|
|
137
126
|
), this.api.onValueChanged(
|
|
138
|
-
|
|
127
|
+
o.ITEM_IDS,
|
|
139
128
|
(e) => this._onItemIdsChange(e)
|
|
140
129
|
);
|
|
141
130
|
}
|
|
142
131
|
_renderTemplate() {
|
|
143
132
|
const {
|
|
144
133
|
orientation: e,
|
|
145
|
-
itemsType:
|
|
146
|
-
itemIds:
|
|
134
|
+
itemsType: t,
|
|
135
|
+
itemIds: i,
|
|
147
136
|
currencySymbol: r,
|
|
148
137
|
currencyLocation: n,
|
|
149
|
-
formattedPrice:
|
|
138
|
+
formattedPrice: s
|
|
150
139
|
} = this.store;
|
|
151
|
-
this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(
|
|
140
|
+
this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(L({
|
|
152
141
|
orientation: e,
|
|
153
|
-
itemsType:
|
|
154
|
-
itemId:
|
|
142
|
+
itemsType: t,
|
|
143
|
+
itemId: i,
|
|
155
144
|
currencySymbol: r,
|
|
156
145
|
currencyLocation: n,
|
|
157
|
-
formattedPrice:
|
|
158
|
-
})).apply(new
|
|
146
|
+
formattedPrice: s
|
|
147
|
+
})).apply(new m("Updated template"));
|
|
159
148
|
}
|
|
160
149
|
_getTemplateData() {
|
|
161
|
-
const { itemsType: e, itemIds:
|
|
150
|
+
const { itemsType: e, itemIds: t, formattedPrice: i } = this.store, r = S[e].findIndex((s) => s.value === t), n = r > -1 ? r : 0;
|
|
162
151
|
return {
|
|
163
|
-
imageSrc:
|
|
164
|
-
name:
|
|
165
|
-
price:
|
|
166
|
-
originalPrice:
|
|
167
|
-
quantity:
|
|
168
|
-
button:
|
|
152
|
+
imageSrc: d.PAIRS_FOR_EXTENSION.imageSrc[e].DEFAULT[n],
|
|
153
|
+
name: d.PAIRS_FOR_EXTENSION.name[e].DEFAULT[n],
|
|
154
|
+
price: i ? d.PAIRS_FOR_EXTENSION.price[e].DEFAULT_PRICE_FORMATTED : d.PAIRS_FOR_EXTENSION.price[e].DEFAULT_PRICE,
|
|
155
|
+
originalPrice: i ? d.PAIRS_FOR_EXTENSION.originalPrice[e].DEFAULT_PRICE_FORMATTED : d.PAIRS_FOR_EXTENSION.originalPrice[e].DEFAULT_PRICE,
|
|
156
|
+
quantity: d.PAIRS_FOR_EXTENSION.quantity[e].DEFAULT,
|
|
157
|
+
button: d.PAIRS_FOR_EXTENSION.button[e].DEFAULT_LABEL
|
|
169
158
|
};
|
|
170
159
|
}
|
|
171
160
|
_updateImageSrc(e) {
|
|
172
|
-
var
|
|
173
|
-
const
|
|
174
|
-
|
|
161
|
+
var i;
|
|
162
|
+
const t = (i = this.currentNode) == null ? void 0 : i.querySelector(`[esd-extension-block-id="${a.IMAGE}"] img`);
|
|
163
|
+
t && this.api.getDocumentModifier().modifyHtml(t).setAttribute("src", e).apply(new m("Updated image src"));
|
|
175
164
|
}
|
|
176
165
|
_updateName(e) {
|
|
177
166
|
var n;
|
|
178
|
-
const
|
|
179
|
-
if (!
|
|
167
|
+
const t = (n = this.currentNode) == null ? void 0 : n.querySelector(`[esd-extension-block-id="${a.NAME}"]`);
|
|
168
|
+
if (!t)
|
|
180
169
|
return;
|
|
181
|
-
const
|
|
182
|
-
let r =
|
|
183
|
-
r = r.replace(
|
|
170
|
+
const i = t.getInnerText().trim();
|
|
171
|
+
let r = t.getInnerHTML();
|
|
172
|
+
r = r.replace(i, e), this.api.getDocumentModifier().modifyHtml(t).setInnerHtml(r).apply(new m("Updated name"));
|
|
184
173
|
}
|
|
185
174
|
_updatePrice(e) {
|
|
186
175
|
var g;
|
|
187
|
-
const
|
|
188
|
-
if (!i)
|
|
189
|
-
return;
|
|
190
|
-
const t = this._getParagraphFromBlock(i);
|
|
176
|
+
const t = (g = this.currentNode) == null ? void 0 : g.querySelector(`[esd-extension-block-id="${a.PRICE}"]`);
|
|
191
177
|
if (!t)
|
|
192
178
|
return;
|
|
193
|
-
const
|
|
194
|
-
|
|
179
|
+
const i = this._getParagraphFromBlock(t);
|
|
180
|
+
if (!i)
|
|
181
|
+
return;
|
|
182
|
+
const r = i.getInnerHTML() || "", n = i.getInnerText() || "", { currencySymbol: s, currencyLocation: c } = this.store, l = (s == null ? void 0 : s.trim()) || "", u = this._removeCurrencySymbol(n, l), T = this._replacePriceNumber(u, e), h = this._buildPriceContent(T, l, c), _ = r.replace(n, h);
|
|
183
|
+
this.api.getDocumentModifier().modifyHtml(i).setInnerHtml(_).apply(new m("Updated price"));
|
|
195
184
|
}
|
|
196
185
|
_updateOriginalPrice(e) {
|
|
197
186
|
var y;
|
|
198
|
-
const
|
|
199
|
-
`[esd-extension-block-id="${
|
|
187
|
+
const t = (y = this.currentNode) == null ? void 0 : y.querySelector(
|
|
188
|
+
`[esd-extension-block-id="${a.ORIGINAL_PRICE}"]`
|
|
200
189
|
);
|
|
201
|
-
if (!i)
|
|
202
|
-
return;
|
|
203
|
-
const t = this._getParagraphFromBlock(i);
|
|
204
190
|
if (!t)
|
|
205
191
|
return;
|
|
206
|
-
const
|
|
192
|
+
const i = this._getParagraphFromBlock(t);
|
|
193
|
+
if (!i)
|
|
194
|
+
return;
|
|
195
|
+
const r = i.querySelector("s");
|
|
207
196
|
if (!r)
|
|
208
197
|
return;
|
|
209
|
-
const n = r.getInnerHTML() || "",
|
|
210
|
-
this.api.getDocumentModifier().modifyHtml(
|
|
198
|
+
const n = r.getInnerHTML() || "", s = r.getInnerText() || "", { currencySymbol: c, currencyLocation: l } = this.store, u = (c == null ? void 0 : c.trim()) || "", T = this._removeCurrencySymbol(s, u), h = this._replacePriceNumber(T, e), _ = this._buildPriceContent(h, u, l), E = `<s>${n.replace(s, _)}</s>`;
|
|
199
|
+
this.api.getDocumentModifier().modifyHtml(i).setInnerHtml(E).apply(new m("Updated original price"));
|
|
211
200
|
}
|
|
212
201
|
_updateQuantity(e) {
|
|
213
|
-
var
|
|
214
|
-
const
|
|
202
|
+
var n;
|
|
203
|
+
const t = (n = this.currentNode) == null ? void 0 : n.querySelector(`[esd-extension-block-id="${a.QUANTITY}"]`);
|
|
215
204
|
if (!t)
|
|
216
205
|
return;
|
|
217
|
-
const
|
|
218
|
-
let
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* @todo Optimize template reordering for performance.
|
|
223
|
-
* @description Reorders the template structure based on current orientation and visibility settings.
|
|
224
|
-
*/
|
|
225
|
-
_reOrderTemplate() {
|
|
226
|
-
var I, _, g, E, y, O, C;
|
|
227
|
-
const e = (I = this.currentNode) == null ? void 0 : I.querySelector(`[esd-extension-block-id="${l.IMAGE}"]`), i = (_ = this.currentNode) == null ? void 0 : _.querySelector(`[esd-extension-block-id="${l.NAME}"]`), t = (g = this.currentNode) == null ? void 0 : g.querySelector(`[esd-extension-block-id="${l.PRICE}"]`), r = (E = this.currentNode) == null ? void 0 : E.querySelector(
|
|
228
|
-
`[esd-extension-block-id="${l.ORIGINAL_PRICE}"]`
|
|
229
|
-
), n = (y = this.currentNode) == null ? void 0 : y.querySelector(`[esd-extension-block-id="${l.QUANTITY}"]`), o = (O = this.currentNode) == null ? void 0 : O.querySelector(`[esd-extension-block-id="${l.BUTTON}"]`), a = (C = this.currentNode) == null ? void 0 : C.querySelector("esd-config-block");
|
|
230
|
-
if (!e || !i || !t || !r || !n || !o || !a)
|
|
231
|
-
return;
|
|
232
|
-
const { orientation: c } = this.store, m = c === S.ORIENTATION.VERTICAL;
|
|
233
|
-
let u = m ? F : U;
|
|
234
|
-
this.api.getDocumentModifier().modifyHtml(e.querySelector("img")).setAttribute("width", H.productImageWidth).apply(new d("Updated image width")), setTimeout(() => {
|
|
235
|
-
u = u.replace("{-{-TEMPLATE_FIRST_LINE-}-}", m ? R : "").replace("{-{-PRODUCT_IMAGE-}-}", e.getOuterHTML()).replace("{-{-PRODUCT_NAME-}-}", i.getOuterHTML()).replaceAll("{-{-PRODUCT_PRICE-}-}", t.getOuterHTML()).replaceAll("{-{-PRODUCT_ORIGINAL_PRICE-}-}", r.getOuterHTML()).replace("{-{-PRODUCT_QUANTITY-}-}", n.getOuterHTML()).replace("{-{-PRODUCT_BUTTON-}-}", o.getOuterHTML()).replace("{-{-CONFIG_BLOCK-}-}", a.getOuterHTML()), u = u.trim().replace(R, "").slice(0, -5), this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(u).apply(new d("Reordered template"));
|
|
236
|
-
}, 50);
|
|
206
|
+
const i = t.getInnerText().trim();
|
|
207
|
+
let r = t.getInnerHTML();
|
|
208
|
+
r = r.replace(i, e), this.api.getDocumentModifier().modifyHtml(t).setInnerHtml(r).apply(new m("Updated quantity"));
|
|
237
209
|
}
|
|
238
|
-
|
|
239
|
-
|
|
210
|
+
_updateButton(e) {
|
|
211
|
+
var n;
|
|
212
|
+
const t = (n = this.currentNode) == null ? void 0 : n.querySelector(`[esd-extension-block-id="${a.BUTTON}"]`);
|
|
213
|
+
if (!t)
|
|
240
214
|
return;
|
|
241
|
-
const i =
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
t.modifyHtml(o).setAttribute("data-type", e);
|
|
245
|
-
}), t.apply(new d("Updated data-type attribute"));
|
|
215
|
+
const i = t.getInnerText().trim();
|
|
216
|
+
let r = t.getInnerHTML();
|
|
217
|
+
r = r.replace(i, e), this.api.getDocumentModifier().modifyHtml(t).setInnerHtml(r).apply(new m("Updated button"));
|
|
246
218
|
}
|
|
247
|
-
|
|
248
|
-
|
|
219
|
+
_reOrderTemplate() {
|
|
220
|
+
var u, T, h, _, g, E;
|
|
221
|
+
const e = (u = this.currentNode) == null ? void 0 : u.querySelector(`[esd-extension-block-id="${a.IMAGE}"]`), t = (T = this.currentNode) == null ? void 0 : T.querySelector(`[esd-extension-block-id="${a.NAME}"]`), i = (h = this.currentNode) == null ? void 0 : h.querySelector(`[esd-extension-block-id="${a.PRICE}"]`), r = (_ = this.currentNode) == null ? void 0 : _.querySelector(
|
|
222
|
+
`[esd-extension-block-id="${a.ORIGINAL_PRICE}"]`
|
|
223
|
+
), n = (g = this.currentNode) == null ? void 0 : g.querySelector(`[esd-extension-block-id="${a.QUANTITY}"]`), s = (E = this.currentNode) == null ? void 0 : E.querySelector(`[esd-extension-block-id="${a.BUTTON}"]`);
|
|
224
|
+
if (!e || !t || !i || !r || !n || !s)
|
|
249
225
|
return;
|
|
250
|
-
const {
|
|
251
|
-
let
|
|
252
|
-
|
|
253
|
-
r = String(t + 1);
|
|
254
|
-
else if (e) {
|
|
255
|
-
const c = e.match(/\((\d+)\)/);
|
|
256
|
-
if (c) {
|
|
257
|
-
const [, m] = c;
|
|
258
|
-
r = m;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
const n = this.currentNode.closest(".ins-product-td"), o = this.api.getDocumentModifier();
|
|
262
|
-
n && o.modifyHtml(n).setAttribute("data-number", r), this.currentNode.querySelectorAll("[data-number]").forEach((c) => {
|
|
263
|
-
const m = c;
|
|
264
|
-
o.modifyHtml(m).setAttribute("data-number", r);
|
|
265
|
-
}), o.apply(new d("Updated data-number attribute"));
|
|
226
|
+
const { orientation: c } = this.store;
|
|
227
|
+
let l = c === N.ORIENTATION.VERTICAL ? b : x;
|
|
228
|
+
l = l.replace("{-{-PRODUCT_IMAGE-}-}", e.getOuterHTML()).replace("{-{-PRODUCT_NAME-}-}", t.getOuterHTML()).replace("{-{-PRODUCT_PRICE-}-}", i.getOuterHTML()).replace("{-{-PRODUCT_ORIGINAL_PRICE-}-}", r.getOuterHTML()).replace("{-{-PRODUCT_QUANTITY-}-}", n.getOuterHTML()).replace("{-{-PRODUCT_BUTTON-}-}", s.getOuterHTML()), l = l.trim().replace('<td align="center" class="ins-product-td items-block">', "").slice(0, -5), this.api.getDocumentModifier().modifyHtml(this.currentNode).setInnerHtml(l).apply(new m("Reordered template"));
|
|
266
229
|
}
|
|
267
230
|
_reFillTemplate() {
|
|
268
231
|
const e = this._getTemplateData();
|
|
269
|
-
this._updateImageSrc(e.imageSrc), this._updateName(e.name), this._updatePrice(e.price), this._updateOriginalPrice(e.originalPrice), this._updateQuantity(e.quantity);
|
|
232
|
+
this._updateImageSrc(e.imageSrc), this._updateName(e.name), this._updatePrice(e.price), this._updateOriginalPrice(e.originalPrice), this._updateQuantity(e.quantity), this._updateButton(e.button);
|
|
270
233
|
}
|
|
271
234
|
_recalculateTrimming() {
|
|
272
|
-
var
|
|
273
|
-
if (!this.currentNode)
|
|
235
|
+
var r;
|
|
236
|
+
if (!this.store.nameTrimming || !this.currentNode)
|
|
274
237
|
return;
|
|
275
|
-
const e = (
|
|
238
|
+
const e = (r = this.currentNode) == null ? void 0 : r.querySelector(`[esd-extension-block-id="${a.NAME}"]`);
|
|
276
239
|
if (!e)
|
|
277
240
|
return;
|
|
278
|
-
const
|
|
279
|
-
if (!
|
|
241
|
+
const t = e.querySelector("p");
|
|
242
|
+
if (!t)
|
|
280
243
|
return;
|
|
281
|
-
const
|
|
282
|
-
this.api.getDocumentModifier().modifyHtml(
|
|
244
|
+
const i = this.store.orientation === N.ORIENTATION.VERTICAL;
|
|
245
|
+
this.api.getDocumentModifier().modifyHtml(t).setStyle("white-space", "nowrap").setStyle("overflow", "hidden").setStyle("text-overflow", "ellipsis").setStyle("max-width", i ? "130px" : "100%").apply(new m("Recalculated trimming after orientation change"));
|
|
283
246
|
}
|
|
284
247
|
_getParagraphFromBlock(e) {
|
|
285
248
|
return e.querySelector("p");
|
|
@@ -287,30 +250,30 @@ class te extends x {
|
|
|
287
250
|
_escapeRegex(e) {
|
|
288
251
|
return e.replace(/[-\\^$*+?().|[\]{}]/g, "\\$&");
|
|
289
252
|
}
|
|
290
|
-
_removeCurrencySymbol(e,
|
|
291
|
-
const
|
|
292
|
-
let r =
|
|
293
|
-
if (
|
|
294
|
-
const n = new RegExp(`\\s*${this._escapeRegex(
|
|
295
|
-
r =
|
|
253
|
+
_removeCurrencySymbol(e, t) {
|
|
254
|
+
const i = e || "";
|
|
255
|
+
let r = i;
|
|
256
|
+
if (t) {
|
|
257
|
+
const n = new RegExp(`\\s*${this._escapeRegex(t)}\\s*`);
|
|
258
|
+
r = i.replace(n, "").trim();
|
|
296
259
|
} else {
|
|
297
|
-
const n =
|
|
260
|
+
const n = i.match(/([^0-9.,\s]+)/);
|
|
298
261
|
if (n && n[1]) {
|
|
299
|
-
const
|
|
300
|
-
r =
|
|
262
|
+
const s = n[1].trim(), c = new RegExp(`\\s*${this._escapeRegex(s)}\\s*`);
|
|
263
|
+
r = i.replace(c, "").trim();
|
|
301
264
|
}
|
|
302
265
|
}
|
|
303
266
|
return r;
|
|
304
267
|
}
|
|
305
|
-
_replacePriceNumber(e,
|
|
306
|
-
const
|
|
307
|
-
return e.replace(
|
|
268
|
+
_replacePriceNumber(e, t) {
|
|
269
|
+
const i = /([0-9][0-9,.]*)/;
|
|
270
|
+
return e.replace(i, t).trim();
|
|
308
271
|
}
|
|
309
|
-
_buildPriceContent(e,
|
|
310
|
-
return
|
|
272
|
+
_buildPriceContent(e, t, i) {
|
|
273
|
+
return t ? i === "1" ? `${e} ${t} ` : `${t} ${e}` : e;
|
|
311
274
|
}
|
|
312
275
|
}
|
|
313
276
|
export {
|
|
314
|
-
|
|
315
|
-
|
|
277
|
+
H as CONTROL_BLOCK_ID,
|
|
278
|
+
v as ItemsBlockControl
|
|
316
279
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var c = /* @__PURE__ */ ((i) => (i.BUTTON = "items-block-button", i.IMAGE = "items-block-image", i.ORIGINAL_PRICE = "items-block-original-price", i.PRICE = "items-block-price", i.QUANTITY = "items-block-quantity", i.NAME = "items-block-name", i))(c || {}),
|
|
1
|
+
var c = /* @__PURE__ */ ((i) => (i.BUTTON = "items-block-button", i.IMAGE = "items-block-image", i.ORIGINAL_PRICE = "items-block-original-price", i.PRICE = "items-block-price", i.QUANTITY = "items-block-quantity", i.NAME = "items-block-name", i))(c || {}), b = /* @__PURE__ */ ((i) => (i.BUTTON_ALIGN = "items-block-button-align-control", i.BUTTON_BORDER = "items-block-button-border-control", i.BUTTON_BORDER_RADIUS = "items-block-button-border-radius-control", i.BUTTON_COLOR = "items-block-button-color-control", i.BUTTON_FIT_TO_CONTENT = "items-block-button-fit-to-content-control", i.BUTTON_FONT_FAMILY = "items-block-button-font-family-control", i.BUTTON_MARGINS = "items-block-button-margins-control", i.BUTTON_PADDINGS = "items-block-button-paddings-control", i.BUTTON_TEXT = "items-block-button-text-control", i.BUTTON_TEXT_SIZE = "items-block-button-text-size-control", i.BUTTON_TEXT_STYLE_AND_FONT_COLOR = "items-block-button-text-style-and-font-color-control", i.BUTTON_LINK = "items-block-button-link-control", i.IMAGE_SIZE = "items-block-image-size-control", i.IMAGE_MARGINS = "items-block-image-margins-control", i.IMAGE_LINK = "items-block-image-link-control", i.ORIGINAL_PRICE_ALIGN = "items-block-original-price-align-control", i.ORIGINAL_PRICE_COLOR = "items-block-original-price-color-control", i.ORIGINAL_PRICE_SIZE = "items-block-original-price-size-control", i.ORIGINAL_PRICE_STYLE = "items-block-original-price-style-control", i.ORIGINAL_PRICE_FONT_FAMILY = "items-block-original-price-font-family-control", i.ORIGINAL_PRICE_BACKGROUND = "items-block-original-price-background-control", i.ORIGINAL_PRICE_PADDINGS = "items-block-original-price-paddings-control", i.PRICE_ALIGN = "items-block-price-align-control", i.PRICE_COLOR = "items-block-price-color-control", i.PRICE_SIZE = "items-block-price-size-control", i.PRICE_STYLE = "items-block-price-style-control", i.PRICE_FONT_FAMILY = "items-block-price-font-family-control", i.PRICE_BACKGROUND = "items-block-price-background-control", i.PRICE_PADDINGS = "items-block-price-paddings-control", i.PRICE_HIDE_DISCOUNT = "items-block-price-hide-discount-control", i.PRICE_FORMATTED_PRICE = "items-block-price-formatted-price-control", i.PRICE_CURRENCY_SYMBOL = "items-block-price-currency-symbol-control", i.PRICE_CURRENCY_LOCATION = "items-block-price-currency-location-control", i.NAME_ALIGN = "items-block-name-align-control", i.NAME_COLOR = "items-block-name-color-control", i.NAME_SIZE = "items-block-name-size-control", i.NAME_STYLE = "items-block-name-style-control", i.NAME_FONT_FAMILY = "items-block-name-font-family-control", i.NAME_BACKGROUND = "items-block-name-background-control", i.NAME_TRIMMING = "items-block-name-trimming-control", i.NAME_PADDINGS = "items-block-name-paddings-control", i.QUANTITY_ALIGN = "items-block-quantity-align-control", i.QUANTITY_COLOR = "items-block-quantity-color-control", i.QUANTITY_FONT_FAMILY = "items-block-quantity-font-family-control", i.QUANTITY_PADDINGS = "items-block-quantity-paddings-control", i.QUANTITY_SIZE = "items-block-quantity-size-control", i.QUANTITY_STYLE = "items-block-quantity-style-control", i))(b || {});
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
b as ItemsBlockControlId,
|
|
4
4
|
c as ItemsBlockId
|
|
5
5
|
};
|
|
@@ -1,31 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import i from "../../../../node_modules/lodash-es/range.js";
|
|
3
|
-
const o = '<td align="center" class="ins-product-td items-block items-block-v2">', R = {
|
|
1
|
+
const e = {
|
|
4
2
|
TYPE: "data-type",
|
|
5
3
|
ITEMS_INDEX_SELECT_CONTROL_VALUE: "data-cart_items_select_control_value",
|
|
6
|
-
ORIENTATION: "data-card_orientation_control_value"
|
|
7
|
-
|
|
8
|
-
PRODUCT_PRICE_HIDE_DISCOUNT: "data-product_price_hide_discount",
|
|
9
|
-
PRODUCT_PRICE_FORMATTED: "data-product_price_formatted",
|
|
10
|
-
PRODUCT_PRICE_CURRENCY_SYMBOL: "data-product_price_currency_symbol",
|
|
11
|
-
PRODUCT_PRICE_CURRENCY_LOCATION: "data-product_price_currency_location",
|
|
12
|
-
PRODUCT_ORIGINAL_PRICE_CONTROL_ORIENTATION: "data-product_original_price_control_orientation",
|
|
13
|
-
PRODUCT_BUTTON_LINK: "data-product_button_link",
|
|
14
|
-
PRODUCT_IMAGE_LINK: "data-product_image_link",
|
|
15
|
-
PRODUCT_NAME_CONTROL_VALUE: "data-product_name_control_value",
|
|
16
|
-
PRODUCT_QUANTITY_CONTROL_VALUE: "data-product_quantity_control_value",
|
|
17
|
-
PRODUCT_PRICE_CONTROL_VALUE: "data-product_price_control_value",
|
|
18
|
-
BLOCK_INSTANCE_ID: "data-block-instance-id",
|
|
19
|
-
NAME_CONTROL_ENABLED: "data-product_name_control_enabled",
|
|
20
|
-
QUANTITY_CONTROL_ENABLED: "data-product_quantity_control_enabled",
|
|
21
|
-
PRICE_CONTROL_OPENED: "data-product_price_control_opened",
|
|
22
|
-
PRODUCT_IMAGE_VISIBLE: "data-product_image_visible",
|
|
23
|
-
PRODUCT_NAME_VISIBLE: "data-product_name_visible",
|
|
24
|
-
PRODUCT_QUANTITY_VISIBLE: "data-product_quantity_visible",
|
|
25
|
-
PRODUCT_PRICE_VISIBLE: "data-product_price_visible",
|
|
26
|
-
PRODUCT_ORIGINAL_PRICE_VISIBLE: "data-product_original_price_visible",
|
|
27
|
-
PRODUCT_BUTTON_VISIBLE: "data-product_button_visible"
|
|
28
|
-
}, t = { PAIRS_FOR_EXTENSION: {
|
|
4
|
+
ORIENTATION: "data-card_orientation_control_value"
|
|
5
|
+
}, s = { PAIRS_FOR_EXTENSION: {
|
|
29
6
|
imageSrc: {
|
|
30
7
|
CART_ITEMS: {
|
|
31
8
|
ATTR: "ins_apr_img",
|
|
@@ -196,79 +173,9 @@ const o = '<td align="center" class="ins-product-td items-block items-block-v2">
|
|
|
196
173
|
DEFAULT_HREF: "#!",
|
|
197
174
|
DEFAULT_LABEL: "Buy"
|
|
198
175
|
}
|
|
199
|
-
},
|
|
200
|
-
itemLink: {
|
|
201
|
-
CART_ITEMS: {
|
|
202
|
-
HREF: "ins_apr_url",
|
|
203
|
-
DEFAULT_HREF: "#!"
|
|
204
|
-
},
|
|
205
|
-
BROWSED_ITEMS: {
|
|
206
|
-
HREF: "browsed_item_url",
|
|
207
|
-
DEFAULT_HREF: "#!"
|
|
208
|
-
},
|
|
209
|
-
PURCHASED_ITEMS: {
|
|
210
|
-
HREF: "purchased_item_url",
|
|
211
|
-
DEFAULT_HREF: "#!"
|
|
212
|
-
}
|
|
213
176
|
}
|
|
214
177
|
} };
|
|
215
|
-
function m(e, a = 8) {
|
|
216
|
-
return i(1, a + 1).map((s) => `${e}_${s}`);
|
|
217
|
-
}
|
|
218
|
-
function r() {
|
|
219
|
-
const { PAIRS_FOR_EXTENSION: e } = t, a = [];
|
|
220
|
-
return a.push(
|
|
221
|
-
e.imageSrc.CART_ITEMS.ATTR,
|
|
222
|
-
e.imageSrc.BROWSED_ITEMS.ATTR,
|
|
223
|
-
e.imageSrc.PURCHASED_ITEMS.ATTR
|
|
224
|
-
), a.push(
|
|
225
|
-
e.name.CART_ITEMS.ATTR,
|
|
226
|
-
e.name.CART_ITEMS.HREF,
|
|
227
|
-
e.name.BROWSED_ITEMS.ATTR,
|
|
228
|
-
e.name.BROWSED_ITEMS.HREF,
|
|
229
|
-
e.name.PURCHASED_ITEMS.ATTR,
|
|
230
|
-
e.name.PURCHASED_ITEMS.HREF
|
|
231
|
-
), a.push(
|
|
232
|
-
e.quantity.CART_ITEMS.ATTR,
|
|
233
|
-
e.quantity.BROWSED_ITEMS.ATTR,
|
|
234
|
-
e.quantity.PURCHASED_ITEMS.ATTR
|
|
235
|
-
), a.push(
|
|
236
|
-
e.price.CART_ITEMS.PRICE,
|
|
237
|
-
e.price.CART_ITEMS.PRICE_FORMATTED,
|
|
238
|
-
e.price.CART_ITEMS.CURRENCY,
|
|
239
|
-
e.price.BROWSED_ITEMS.PRICE,
|
|
240
|
-
e.price.BROWSED_ITEMS.PRICE_FORMATTED,
|
|
241
|
-
e.price.BROWSED_ITEMS.CURRENCY,
|
|
242
|
-
e.price.PURCHASED_ITEMS.PRICE,
|
|
243
|
-
e.price.PURCHASED_ITEMS.PRICE_FORMATTED,
|
|
244
|
-
e.price.PURCHASED_ITEMS.CURRENCY
|
|
245
|
-
), a.push(
|
|
246
|
-
e.originalPrice.CART_ITEMS.PRICE,
|
|
247
|
-
e.originalPrice.CART_ITEMS.PRICE_FORMATTED,
|
|
248
|
-
e.originalPrice.CART_ITEMS.CURRENCY,
|
|
249
|
-
e.originalPrice.BROWSED_ITEMS.PRICE,
|
|
250
|
-
e.originalPrice.BROWSED_ITEMS.PRICE_FORMATTED,
|
|
251
|
-
e.originalPrice.BROWSED_ITEMS.CURRENCY,
|
|
252
|
-
e.originalPrice.PURCHASED_ITEMS.PRICE,
|
|
253
|
-
e.originalPrice.PURCHASED_ITEMS.PRICE_FORMATTED,
|
|
254
|
-
e.originalPrice.PURCHASED_ITEMS.CURRENCY
|
|
255
|
-
), a.push(
|
|
256
|
-
e.button.CART_ITEMS.HREF,
|
|
257
|
-
e.button.BROWSED_ITEMS.HREF,
|
|
258
|
-
e.button.PURCHASED_ITEMS.HREF
|
|
259
|
-
), a.push(
|
|
260
|
-
e.itemLink.CART_ITEMS.HREF,
|
|
261
|
-
e.itemLink.BROWSED_ITEMS.HREF,
|
|
262
|
-
e.itemLink.PURCHASED_ITEMS.HREF
|
|
263
|
-
), a;
|
|
264
|
-
}
|
|
265
|
-
const p = _(
|
|
266
|
-
r(),
|
|
267
|
-
(e) => m(e)
|
|
268
|
-
);
|
|
269
178
|
export {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
t as productPairs,
|
|
273
|
-
o as templateFirstLine
|
|
179
|
+
e as configAttributes,
|
|
180
|
+
s as productPairs
|
|
274
181
|
};
|
|
@@ -12,31 +12,17 @@ const e = {
|
|
|
12
12
|
{ text: "Cart", value: e.ITEMS_TYPE.CART_ITEMS },
|
|
13
13
|
{ text: "Browsed", value: e.ITEMS_TYPE.BROWSED_ITEMS },
|
|
14
14
|
{ text: "Purchased", value: e.ITEMS_TYPE.PURCHASED_ITEMS }
|
|
15
|
-
],
|
|
15
|
+
], a = [
|
|
16
16
|
{ icon: "vertical-orientation", value: e.ORIENTATION.VERTICAL },
|
|
17
17
|
{ icon: "horizontal-orientation", value: e.ORIENTATION.HORIZONTAL }
|
|
18
|
-
],
|
|
18
|
+
], r = {
|
|
19
19
|
itemsType: e.ITEMS_TYPE.CART_ITEMS,
|
|
20
20
|
cartItemsSelectControlValue: "{{Abandoned Cart Item (1) Url}}",
|
|
21
21
|
cardOrientationControlValue: e.ORIENTATION.HORIZONTAL,
|
|
22
|
-
productNameTrimmingControlValue: "1",
|
|
23
|
-
productPriceHideDiscountControlValue: "0",
|
|
24
|
-
productPriceFormattedControlValue: "1",
|
|
25
|
-
productPriceCurrencySymbolControlValue: "USD",
|
|
26
|
-
productPriceCurrencyLocationControlValue: "0",
|
|
27
|
-
productButtonLinkControlValue: "{{Abandoned Cart Item (1) Url}}",
|
|
28
|
-
productImageLinkControlValue: "{{Abandoned Cart Item (1) Image}}",
|
|
29
22
|
productNameControlEnabled: "1",
|
|
30
23
|
productQuantityControlEnabled: "1",
|
|
31
|
-
productPriceControlOpened: "1"
|
|
32
|
-
|
|
33
|
-
productNameVisible: "1",
|
|
34
|
-
productQuantityVisible: "1",
|
|
35
|
-
productPriceVisible: "1",
|
|
36
|
-
productOriginalPriceVisible: "1",
|
|
37
|
-
productButtonVisible: "1",
|
|
38
|
-
productImageWidth: "70"
|
|
39
|
-
}, o = {
|
|
24
|
+
productPriceControlOpened: "1"
|
|
25
|
+
}, I = {
|
|
40
26
|
[e.ITEMS_TYPE.CART_ITEMS]: [
|
|
41
27
|
{ text: "Abandoned Cart Item (1)", value: "{{Abandoned Cart Item (1) Url}}" },
|
|
42
28
|
{ text: "Abandoned Cart Item (2)", value: "{{Abandoned Cart Item (2) Url}}" },
|
|
@@ -69,9 +55,9 @@ const e = {
|
|
|
69
55
|
]
|
|
70
56
|
};
|
|
71
57
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
58
|
+
r as DefaultConfigValues,
|
|
59
|
+
I as ItemInCartOptions,
|
|
74
60
|
t as ItemTypeOptions,
|
|
75
|
-
|
|
61
|
+
a as OrientationOptions,
|
|
76
62
|
e as SETTINGS_ENUMS
|
|
77
63
|
};
|