@sentecacommerce-theme/lib 0.14.8 → 0.14.11
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/analytics/purchase.js +10 -10
- package/dist/cjs/contexts/CheckoutForm/utils/validateShipping.js +11 -7
- package/dist/cjs/hooks/CompareContext/CompareContext.js +141 -0
- package/dist/cjs/hooks/CompareContext/index.js +22 -0
- package/dist/cjs/hooks/useCheckoutShippingModule/index.js +4 -2
- package/dist/cjs/index.js +16 -4
- package/dist/cjs/user/api/utils/processLoginPayload.js +5 -4
- package/dist/cjs/utils/index.js +0 -12
- package/dist/cjs/utils/tokens.js +1 -1
- package/dist/esm/analytics/purchase.js +10 -10
- package/dist/esm/contexts/CheckoutForm/utils/validateShipping.js +11 -7
- package/dist/esm/hooks/CompareContext/CompareContext.js +114 -0
- package/dist/esm/hooks/CompareContext/index.js +1 -0
- package/dist/esm/hooks/useCheckoutShippingModule/index.js +4 -2
- package/dist/esm/index.js +1 -0
- package/dist/esm/user/api/utils/processLoginPayload.js +6 -5
- package/dist/esm/utils/index.js +0 -1
- package/dist/esm/utils/tokens.js +1 -1
- package/dist/types/hooks/CompareContext/CompareContext.d.ts +16 -0
- package/dist/types/hooks/CompareContext/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/types/utils/tokens.d.ts +4 -9
- package/package.json +4 -4
- package/dist/cjs/utils/convertDateIntoRemainingDays.js +0 -10
- package/dist/esm/utils/convertDateIntoRemainingDays.js +0 -5
- package/dist/types/utils/convertDateIntoRemainingDays.d.ts +0 -1
@@ -15,7 +15,7 @@ var purchase = function(order, config) {
|
|
15
15
|
var isGtagLoaded = Boolean(window.gtag);
|
16
16
|
var hasGoogleId = Boolean((ref8 = config.google) === null || ref8 === void 0 ? void 0 : ref8.analytics);
|
17
17
|
if (isGtagLoaded && hasGoogleId) {
|
18
|
-
var ref9, ref10, ref11;
|
18
|
+
var ref9, ref10, ref11, ref12;
|
19
19
|
var items = ((ref9 = order.lineItems) === null || ref9 === void 0 ? void 0 : ref9.map(function(item, i) {
|
20
20
|
return {
|
21
21
|
id: item.variant.sku,
|
@@ -23,36 +23,36 @@ var purchase = function(order, config) {
|
|
23
23
|
list_name: config.defaultMerchant,
|
24
24
|
list_position: i + 1,
|
25
25
|
quantity: item.quantity,
|
26
|
-
price: (0, _decodePrice).decodePrice(item.totalPrice)
|
26
|
+
price: (item === null || item === void 0 ? void 0 : item.totalPrice) && (0, _decodePrice).decodePrice(item.totalPrice)
|
27
27
|
};
|
28
28
|
})) || [];
|
29
|
-
(
|
29
|
+
(ref12 = window.gtag) === null || ref12 === void 0 ? void 0 : ref12.call(window, 'event', 'purchase', {
|
30
30
|
transaction_id: order._id,
|
31
31
|
send_to: (ref10 = config.google) === null || ref10 === void 0 ? void 0 : ref10.analytics,
|
32
32
|
affiliation: config.defaultMerchant,
|
33
33
|
value: (0, _decodePrice).decodePrice(order.grandTotalPrice),
|
34
34
|
currency: order.currencyCode,
|
35
35
|
tax: (0, _decodePrice).decodePrice(centAmount),
|
36
|
-
shipping: (order === null || order === void 0 ? void 0 : order.shippings) ? (0, _decodePrice).decodePrice(order.shippings[0].price) : 0,
|
36
|
+
shipping: (order === null || order === void 0 ? void 0 : order.shippings) ? (0, _decodePrice).decodePrice((ref11 = order.shippings[0]) === null || ref11 === void 0 ? void 0 : ref11.price) : 0,
|
37
37
|
items: items
|
38
38
|
});
|
39
39
|
}
|
40
40
|
if (isGtagLoaded && hasGoogleReMarketing) {
|
41
|
-
var
|
42
|
-
(
|
43
|
-
send_to: "".concat((
|
41
|
+
var ref13, ref14, ref15, ref16, ref17;
|
42
|
+
(ref17 = window.gtag) === null || ref17 === void 0 ? void 0 : ref17.call(window, 'event', 'conversion', {
|
43
|
+
send_to: "".concat((ref13 = config.google) === null || ref13 === void 0 ? void 0 : (ref14 = ref13.reMarketing) === null || ref14 === void 0 ? void 0 : ref14.id, "/").concat((ref15 = config.google) === null || ref15 === void 0 ? void 0 : (ref16 = ref15.reMarketing) === null || ref16 === void 0 ? void 0 : ref16.label),
|
44
44
|
value: (0, _decodePrice).decodePrice(order.grandTotalPrice),
|
45
45
|
currency: order.currencyCode,
|
46
46
|
transaction_id: order._id
|
47
47
|
});
|
48
48
|
}
|
49
49
|
if (facebookPixelLoaded) {
|
50
|
-
var
|
51
|
-
(
|
50
|
+
var ref18, ref19;
|
51
|
+
(ref19 = window.fbq) === null || ref19 === void 0 ? void 0 : ref19.call(window, 'track', 'Purchase', {
|
52
52
|
currency: order.currencyCode,
|
53
53
|
value: (0, _decodePrice).decodePrice(order.grandTotalPrice),
|
54
54
|
content_type: 'product',
|
55
|
-
contents: ((
|
55
|
+
contents: ((ref18 = order.lineItems) === null || ref18 === void 0 ? void 0 : ref18.map(function(product) {
|
56
56
|
return {
|
57
57
|
id: product.variant.sku,
|
58
58
|
quantity: product.quantity
|
@@ -104,8 +104,12 @@ function genericOfficeValidation(param) {
|
|
104
104
|
}
|
105
105
|
function pickupFromStoreValidation(param) {
|
106
106
|
var mod = param.mod, errorLabels = param.errorLabels;
|
107
|
-
var ref;
|
108
|
-
|
107
|
+
var ref, ref12;
|
108
|
+
// Returning undefined means validation is passed
|
109
|
+
if (mod === null || mod === void 0 ? void 0 : (ref = mod.moduleData) === null || ref === void 0 ? void 0 : ref.isWarehouseShipping) {
|
110
|
+
return undefined;
|
111
|
+
}
|
112
|
+
return !(mod === null || mod === void 0 ? void 0 : (ref12 = mod.moduleData) === null || ref12 === void 0 ? void 0 : ref12.stockLocation) ? {
|
109
113
|
pickupFromStore: errorLabels.noStoreSelected
|
110
114
|
} : undefined;
|
111
115
|
}
|
@@ -135,8 +139,8 @@ function validateShipping(data, mod, errorLabels, validations) {
|
|
135
139
|
var requiredFields = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : defaultRequiredFields, enableNoShippingMethodMode = arguments.length > 5 ? arguments[5] : void 0;
|
136
140
|
var validateErrors = {};
|
137
141
|
var globalErrors = requiredFields.reduce(function(errors, field) {
|
138
|
-
var ref,
|
139
|
-
if (!(data === null || data === void 0 ? void 0 : (ref = data[field]) === null || ref === void 0 ? void 0 : (
|
142
|
+
var ref, ref14;
|
143
|
+
if (!(data === null || data === void 0 ? void 0 : (ref = data[field]) === null || ref === void 0 ? void 0 : (ref14 = ref.trim) === null || ref14 === void 0 ? void 0 : ref14.call(ref))) {
|
140
144
|
return _objectSpread({}, errors, _defineProperty({}, field, errorLabels.fieldIsRequired));
|
141
145
|
}
|
142
146
|
return errors;
|
@@ -148,13 +152,13 @@ function validateShipping(data, mod, errorLabels, validations) {
|
|
148
152
|
globalErrors.phoneNumber = (errorLabels === null || errorLabels === void 0 ? void 0 : errorLabels.invalidPhoneNumber) || '';
|
149
153
|
}
|
150
154
|
if (!enableNoShippingMethodMode) {
|
151
|
-
var
|
152
|
-
if (!(mod === null || mod === void 0 ? void 0 : mod.moduleKey) || !(mod === null || mod === void 0 ? void 0 : (
|
155
|
+
var ref15, ref13;
|
156
|
+
if (!(mod === null || mod === void 0 ? void 0 : mod.moduleKey) || !(mod === null || mod === void 0 ? void 0 : (ref15 = mod.moduleData) === null || ref15 === void 0 ? void 0 : ref15.methodKey)) {
|
153
157
|
return _objectSpread({}, globalErrors, {
|
154
158
|
courier: errorLabels.selectCourier
|
155
159
|
});
|
156
160
|
}
|
157
|
-
var validate = (
|
161
|
+
var validate = (ref13 = validations[mod === null || mod === void 0 ? void 0 : mod.moduleKey]) === null || ref13 === void 0 ? void 0 : ref13[mod === null || mod === void 0 ? void 0 : mod.moduleData.methodKey];
|
158
162
|
if (!validate) {
|
159
163
|
throw new Error("Validation for shipping with provider: ".concat(mod === null || mod === void 0 ? void 0 : mod.moduleKey, " and method key: ").concat(mod === null || mod === void 0 ? void 0 : mod.moduleData.methodKey, " not found"));
|
160
164
|
}
|
@@ -0,0 +1,141 @@
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
2
|
+
value: true
|
3
|
+
});
|
4
|
+
exports.CompareContextProvider = CompareContextProvider;
|
5
|
+
exports.useCompareState = useCompareState;
|
6
|
+
exports.useCompareFunctions = useCompareFunctions;
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
8
|
+
function _arrayLikeToArray(arr, len) {
|
9
|
+
if (len == null || len > arr.length) len = arr.length;
|
10
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
11
|
+
return arr2;
|
12
|
+
}
|
13
|
+
function _arrayWithHoles(arr) {
|
14
|
+
if (Array.isArray(arr)) return arr;
|
15
|
+
}
|
16
|
+
function _interopRequireWildcard(obj) {
|
17
|
+
if (obj && obj.__esModule) {
|
18
|
+
return obj;
|
19
|
+
} else {
|
20
|
+
var newObj = {};
|
21
|
+
if (obj != null) {
|
22
|
+
for(var key in obj){
|
23
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
24
|
+
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
25
|
+
if (desc.get || desc.set) {
|
26
|
+
Object.defineProperty(newObj, key, desc);
|
27
|
+
} else {
|
28
|
+
newObj[key] = obj[key];
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
newObj.default = obj;
|
34
|
+
return newObj;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
function _iterableToArrayLimit(arr, i) {
|
38
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
39
|
+
if (_i == null) return;
|
40
|
+
var _arr = [];
|
41
|
+
var _n = true;
|
42
|
+
var _d = false;
|
43
|
+
var _s, _e;
|
44
|
+
try {
|
45
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
46
|
+
_arr.push(_s.value);
|
47
|
+
if (i && _arr.length === i) break;
|
48
|
+
}
|
49
|
+
} catch (err) {
|
50
|
+
_d = true;
|
51
|
+
_e = err;
|
52
|
+
} finally{
|
53
|
+
try {
|
54
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
55
|
+
} finally{
|
56
|
+
if (_d) throw _e;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
return _arr;
|
60
|
+
}
|
61
|
+
function _nonIterableRest() {
|
62
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
63
|
+
}
|
64
|
+
function _slicedToArray(arr, i) {
|
65
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
66
|
+
}
|
67
|
+
function _unsupportedIterableToArray(o, minLen) {
|
68
|
+
if (!o) return;
|
69
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
70
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
71
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
72
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
73
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
74
|
+
}
|
75
|
+
var CompareContextState = /*#__PURE__*/ _react.default.createContext(undefined);
|
76
|
+
var CompareContextFunctions = /*#__PURE__*/ _react.default.createContext(undefined);
|
77
|
+
function CompareContextProvider(param) {
|
78
|
+
var children = param.children;
|
79
|
+
var ref = _slicedToArray((0, _react).useState([]), 2), itemsToCompare = ref[0], setItemsToCompare = ref[1];
|
80
|
+
// notAllowedState is needed in order to trigger rerender in useEffect dependency on the client
|
81
|
+
// it allow us to know that we try to add more items than allowed
|
82
|
+
var ref1 = _slicedToArray((0, _react).useState(0), 2), notAllowedState = ref1[0], setNotAllowedState = ref1[1];
|
83
|
+
var itemAlreadyAdded = function(id) {
|
84
|
+
return itemsToCompare.filter(function(i) {
|
85
|
+
return i._id === id;
|
86
|
+
}).length !== 0;
|
87
|
+
};
|
88
|
+
var addItemToCompare = function(item, maxItemLength) {
|
89
|
+
var alreadyAdded = itemAlreadyAdded(item._id);
|
90
|
+
if (alreadyAdded) {
|
91
|
+
return;
|
92
|
+
}
|
93
|
+
if (itemsToCompare.length === maxItemLength) {
|
94
|
+
setNotAllowedState(notAllowedState + 1);
|
95
|
+
return;
|
96
|
+
}
|
97
|
+
if (itemsToCompare.length < maxItemLength) {
|
98
|
+
itemsToCompare.push(item);
|
99
|
+
setNotAllowedState(0);
|
100
|
+
setItemsToCompare(itemsToCompare);
|
101
|
+
}
|
102
|
+
};
|
103
|
+
var removeComparedItem = function(id) {
|
104
|
+
var filtered = itemsToCompare.filter(function(i) {
|
105
|
+
return i._id !== id;
|
106
|
+
});
|
107
|
+
setItemsToCompare(filtered);
|
108
|
+
};
|
109
|
+
var removeAllComparedItems = function() {
|
110
|
+
return setItemsToCompare([]);
|
111
|
+
};
|
112
|
+
var notAllowed = function() {
|
113
|
+
return notAllowedState;
|
114
|
+
};
|
115
|
+
var functions = {
|
116
|
+
itemAlreadyAdded: itemAlreadyAdded,
|
117
|
+
addItemToCompare: addItemToCompare,
|
118
|
+
removeComparedItem: removeComparedItem,
|
119
|
+
removeAllComparedItems: removeAllComparedItems,
|
120
|
+
notAllowed: notAllowed
|
121
|
+
};
|
122
|
+
return(/*#__PURE__*/ _react.default.createElement(CompareContextState.Provider, {
|
123
|
+
value: itemsToCompare
|
124
|
+
}, /*#__PURE__*/ _react.default.createElement(CompareContextFunctions.Provider, {
|
125
|
+
value: functions
|
126
|
+
}, children)));
|
127
|
+
}
|
128
|
+
function useCompareState() {
|
129
|
+
var context = _react.default.useContext(CompareContextState);
|
130
|
+
if (context === undefined) {
|
131
|
+
throw new Error('CompareContextState must be used within a CompareContextProvider');
|
132
|
+
}
|
133
|
+
return context;
|
134
|
+
}
|
135
|
+
function useCompareFunctions() {
|
136
|
+
var context = _react.default.useContext(CompareContextFunctions);
|
137
|
+
if (context === undefined) {
|
138
|
+
throw new Error('CompareContextFunctions must be used within a CompareContextProvider');
|
139
|
+
}
|
140
|
+
return context;
|
141
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
2
|
+
value: true
|
3
|
+
});
|
4
|
+
Object.defineProperty(exports, "CompareContextProvider", {
|
5
|
+
enumerable: true,
|
6
|
+
get: function() {
|
7
|
+
return _compareContext.CompareContextProvider;
|
8
|
+
}
|
9
|
+
});
|
10
|
+
Object.defineProperty(exports, "useCompareState", {
|
11
|
+
enumerable: true,
|
12
|
+
get: function() {
|
13
|
+
return _compareContext.useCompareState;
|
14
|
+
}
|
15
|
+
});
|
16
|
+
Object.defineProperty(exports, "useCompareFunctions", {
|
17
|
+
enumerable: true,
|
18
|
+
get: function() {
|
19
|
+
return _compareContext.useCompareFunctions;
|
20
|
+
}
|
21
|
+
});
|
22
|
+
var _compareContext = require("./CompareContext");
|
@@ -35,13 +35,15 @@ var useCheckoutShippingModule = function(orderQuery) {
|
|
35
35
|
var isEnabled = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
36
36
|
var cartData = orderQuery.data;
|
37
37
|
return (0, _react).useMemo(function() {
|
38
|
-
var ref;
|
38
|
+
var ref, ref1;
|
39
39
|
if (!isEnabled) return;
|
40
40
|
var shipping = cartData === null || cartData === void 0 ? void 0 : (ref = cartData.shippings) === null || ref === void 0 ? void 0 : ref[0];
|
41
41
|
return {
|
42
42
|
moduleKey: shipping === null || shipping === void 0 ? void 0 : shipping.moduleKey,
|
43
43
|
moduleData: _objectSpread({}, shipping === null || shipping === void 0 ? void 0 : shipping.moduleData, {
|
44
|
-
methodKey: shipping === null || shipping === void 0 ? void 0 : shipping.moduleMethodKey
|
44
|
+
methodKey: shipping === null || shipping === void 0 ? void 0 : shipping.moduleMethodKey,
|
45
|
+
// Special case of warehouse for christian of roma
|
46
|
+
isWarehouseShipping: (shipping === null || shipping === void 0 ? void 0 : shipping.moduleKey) === 'PickUpFromStore' && (shipping === null || shipping === void 0 ? void 0 : (ref1 = shipping.merchant) === null || ref1 === void 0 ? void 0 : ref1.resourceKey) === 'christian-of-roma'
|
45
47
|
})
|
46
48
|
};
|
47
49
|
}, [
|
package/dist/cjs/index.js
CHANGED
@@ -1058,6 +1058,18 @@ Object.keys(_types).forEach(function(key) {
|
|
1058
1058
|
}
|
1059
1059
|
});
|
1060
1060
|
});
|
1061
|
+
var _ = _interopRequireWildcard(require("./hooks/CompareContext/"));
|
1062
|
+
Object.keys(_).forEach(function(key) {
|
1063
|
+
if (key === "default" || key === "__esModule") return;
|
1064
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
1065
|
+
if (key in exports && exports[key] === _[key]) return;
|
1066
|
+
Object.defineProperty(exports, key, {
|
1067
|
+
enumerable: true,
|
1068
|
+
get: function() {
|
1069
|
+
return _[key];
|
1070
|
+
}
|
1071
|
+
});
|
1072
|
+
});
|
1061
1073
|
var _utils1 = _interopRequireWildcard(require("./utils"));
|
1062
1074
|
Object.keys(_utils1).forEach(function(key) {
|
1063
1075
|
if (key === "default" || key === "__esModule") return;
|
@@ -1214,15 +1226,15 @@ Object.keys(_misc).forEach(function(key) {
|
|
1214
1226
|
}
|
1215
1227
|
});
|
1216
1228
|
});
|
1217
|
-
var
|
1218
|
-
Object.keys(
|
1229
|
+
var _1 = _interopRequireWildcard(require("./ssr/"));
|
1230
|
+
Object.keys(_1).forEach(function(key) {
|
1219
1231
|
if (key === "default" || key === "__esModule") return;
|
1220
1232
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
1221
|
-
if (key in exports && exports[key] ===
|
1233
|
+
if (key in exports && exports[key] === _1[key]) return;
|
1222
1234
|
Object.defineProperty(exports, key, {
|
1223
1235
|
enumerable: true,
|
1224
1236
|
get: function() {
|
1225
|
-
return
|
1237
|
+
return _1[key];
|
1226
1238
|
}
|
1227
1239
|
});
|
1228
1240
|
});
|
@@ -8,17 +8,18 @@ var _utils = require("../../../utils");
|
|
8
8
|
var processLoginPayload = function(data) {
|
9
9
|
var anonymous = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
10
10
|
var accessTokenExpires = data.expires;
|
11
|
-
var
|
11
|
+
var _refreshTokenExpires;
|
12
|
+
var refreshTokenExpires = (_refreshTokenExpires = data.refreshTokenExpires) !== null && _refreshTokenExpires !== void 0 ? _refreshTokenExpires : accessTokenExpires;
|
12
13
|
(0, _utils).writeToLocalStorage(_wishlistApi.WISHLIST_STORAGE_KEY, data.wishList);
|
13
14
|
(0, _utils).writeToLocalStorage(_myCartApi.BASKET_STORAGE_KEY, data.basket);
|
14
15
|
(0, _utils).setAccessToken(data.accessToken, anonymous, {
|
15
|
-
expires:
|
16
|
+
expires: new Date(accessTokenExpires)
|
16
17
|
});
|
17
18
|
(0, _utils).setExpiryToken(data.expires, {
|
18
|
-
expires:
|
19
|
+
expires: new Date(refreshTokenExpires)
|
19
20
|
});
|
20
21
|
(0, _utils).setRefreshToken(data.refreshToken, {
|
21
|
-
expires:
|
22
|
+
expires: new Date(refreshTokenExpires)
|
22
23
|
});
|
23
24
|
!anonymous && (0, _utils).removeAnonToken();
|
24
25
|
};
|
package/dist/cjs/utils/index.js
CHANGED
@@ -410,18 +410,6 @@ Object.keys(_transliterate).forEach(function(key) {
|
|
410
410
|
}
|
411
411
|
});
|
412
412
|
});
|
413
|
-
var _convertDateIntoRemainingDays = _interopRequireWildcard(require("./convertDateIntoRemainingDays"));
|
414
|
-
Object.keys(_convertDateIntoRemainingDays).forEach(function(key) {
|
415
|
-
if (key === "default" || key === "__esModule") return;
|
416
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
417
|
-
if (key in exports && exports[key] === _convertDateIntoRemainingDays[key]) return;
|
418
|
-
Object.defineProperty(exports, key, {
|
419
|
-
enumerable: true,
|
420
|
-
get: function() {
|
421
|
-
return _convertDateIntoRemainingDays[key];
|
422
|
-
}
|
423
|
-
});
|
424
|
-
});
|
425
413
|
var _prefetchSDKConfig = _interopRequireWildcard(require("./prefetchSDKConfig"));
|
426
414
|
Object.keys(_prefetchSDKConfig).forEach(function(key) {
|
427
415
|
if (key === "default" || key === "__esModule") return;
|
package/dist/cjs/utils/tokens.js
CHANGED
@@ -93,7 +93,7 @@ var setAccessToken = function(token, anonymous, options) {
|
|
93
93
|
};
|
94
94
|
exports.setAccessToken = setAccessToken;
|
95
95
|
var setRefreshToken = function(token, options) {
|
96
|
-
_jsCookie.default.set(REFRESH_TOKEN_KEY, token, options);
|
96
|
+
token && _jsCookie.default.set(REFRESH_TOKEN_KEY, token, options);
|
97
97
|
};
|
98
98
|
exports.setRefreshToken = setRefreshToken;
|
99
99
|
var setExpiryToken = function(timestamp, options) {
|
@@ -11,7 +11,7 @@ export var purchase = function(order, config) {
|
|
11
11
|
var isGtagLoaded = Boolean(window.gtag);
|
12
12
|
var hasGoogleId = Boolean((ref8 = config.google) === null || ref8 === void 0 ? void 0 : ref8.analytics);
|
13
13
|
if (isGtagLoaded && hasGoogleId) {
|
14
|
-
var ref9, ref10, ref11;
|
14
|
+
var ref9, ref10, ref11, ref12;
|
15
15
|
var items = ((ref9 = order.lineItems) === null || ref9 === void 0 ? void 0 : ref9.map(function(item, i) {
|
16
16
|
return {
|
17
17
|
id: item.variant.sku,
|
@@ -19,36 +19,36 @@ export var purchase = function(order, config) {
|
|
19
19
|
list_name: config.defaultMerchant,
|
20
20
|
list_position: i + 1,
|
21
21
|
quantity: item.quantity,
|
22
|
-
price: decodePrice(item.totalPrice)
|
22
|
+
price: (item === null || item === void 0 ? void 0 : item.totalPrice) && decodePrice(item.totalPrice)
|
23
23
|
};
|
24
24
|
})) || [];
|
25
|
-
(
|
25
|
+
(ref12 = window.gtag) === null || ref12 === void 0 ? void 0 : ref12.call(window, 'event', 'purchase', {
|
26
26
|
transaction_id: order._id,
|
27
27
|
send_to: (ref10 = config.google) === null || ref10 === void 0 ? void 0 : ref10.analytics,
|
28
28
|
affiliation: config.defaultMerchant,
|
29
29
|
value: decodePrice(order.grandTotalPrice),
|
30
30
|
currency: order.currencyCode,
|
31
31
|
tax: decodePrice(centAmount),
|
32
|
-
shipping: (order === null || order === void 0 ? void 0 : order.shippings) ? decodePrice(order.shippings[0].price) : 0,
|
32
|
+
shipping: (order === null || order === void 0 ? void 0 : order.shippings) ? decodePrice((ref11 = order.shippings[0]) === null || ref11 === void 0 ? void 0 : ref11.price) : 0,
|
33
33
|
items: items
|
34
34
|
});
|
35
35
|
}
|
36
36
|
if (isGtagLoaded && hasGoogleReMarketing) {
|
37
|
-
var
|
38
|
-
(
|
39
|
-
send_to: "".concat((
|
37
|
+
var ref13, ref14, ref15, ref16, ref17;
|
38
|
+
(ref17 = window.gtag) === null || ref17 === void 0 ? void 0 : ref17.call(window, 'event', 'conversion', {
|
39
|
+
send_to: "".concat((ref13 = config.google) === null || ref13 === void 0 ? void 0 : (ref14 = ref13.reMarketing) === null || ref14 === void 0 ? void 0 : ref14.id, "/").concat((ref15 = config.google) === null || ref15 === void 0 ? void 0 : (ref16 = ref15.reMarketing) === null || ref16 === void 0 ? void 0 : ref16.label),
|
40
40
|
value: decodePrice(order.grandTotalPrice),
|
41
41
|
currency: order.currencyCode,
|
42
42
|
transaction_id: order._id
|
43
43
|
});
|
44
44
|
}
|
45
45
|
if (facebookPixelLoaded) {
|
46
|
-
var
|
47
|
-
(
|
46
|
+
var ref18, ref19;
|
47
|
+
(ref19 = window.fbq) === null || ref19 === void 0 ? void 0 : ref19.call(window, 'track', 'Purchase', {
|
48
48
|
currency: order.currencyCode,
|
49
49
|
value: decodePrice(order.grandTotalPrice),
|
50
50
|
content_type: 'product',
|
51
|
-
contents: ((
|
51
|
+
contents: ((ref18 = order.lineItems) === null || ref18 === void 0 ? void 0 : ref18.map(function(product) {
|
52
52
|
return {
|
53
53
|
id: product.variant.sku,
|
54
54
|
quantity: product.quantity
|
@@ -95,8 +95,12 @@ export function genericOfficeValidation(param) {
|
|
95
95
|
}
|
96
96
|
export function pickupFromStoreValidation(param) {
|
97
97
|
var mod = param.mod, errorLabels = param.errorLabels;
|
98
|
-
var ref;
|
99
|
-
|
98
|
+
var ref, ref12;
|
99
|
+
// Returning undefined means validation is passed
|
100
|
+
if (mod === null || mod === void 0 ? void 0 : (ref = mod.moduleData) === null || ref === void 0 ? void 0 : ref.isWarehouseShipping) {
|
101
|
+
return undefined;
|
102
|
+
}
|
103
|
+
return !(mod === null || mod === void 0 ? void 0 : (ref12 = mod.moduleData) === null || ref12 === void 0 ? void 0 : ref12.stockLocation) ? {
|
100
104
|
pickupFromStore: errorLabels.noStoreSelected
|
101
105
|
} : undefined;
|
102
106
|
}
|
@@ -125,8 +129,8 @@ export function validateShipping(data, mod, errorLabels, validations) {
|
|
125
129
|
var requiredFields = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : defaultRequiredFields, enableNoShippingMethodMode = arguments.length > 5 ? arguments[5] : void 0;
|
126
130
|
var validateErrors = {};
|
127
131
|
var globalErrors = requiredFields.reduce(function(errors, field) {
|
128
|
-
var ref,
|
129
|
-
if (!(data === null || data === void 0 ? void 0 : (ref = data[field]) === null || ref === void 0 ? void 0 : (
|
132
|
+
var ref, ref14;
|
133
|
+
if (!(data === null || data === void 0 ? void 0 : (ref = data[field]) === null || ref === void 0 ? void 0 : (ref14 = ref.trim) === null || ref14 === void 0 ? void 0 : ref14.call(ref))) {
|
130
134
|
return _objectSpread({}, errors, _defineProperty({}, field, errorLabels.fieldIsRequired));
|
131
135
|
}
|
132
136
|
return errors;
|
@@ -138,13 +142,13 @@ export function validateShipping(data, mod, errorLabels, validations) {
|
|
138
142
|
globalErrors.phoneNumber = (errorLabels === null || errorLabels === void 0 ? void 0 : errorLabels.invalidPhoneNumber) || '';
|
139
143
|
}
|
140
144
|
if (!enableNoShippingMethodMode) {
|
141
|
-
var
|
142
|
-
if (!(mod === null || mod === void 0 ? void 0 : mod.moduleKey) || !(mod === null || mod === void 0 ? void 0 : (
|
145
|
+
var ref15, ref13;
|
146
|
+
if (!(mod === null || mod === void 0 ? void 0 : mod.moduleKey) || !(mod === null || mod === void 0 ? void 0 : (ref15 = mod.moduleData) === null || ref15 === void 0 ? void 0 : ref15.methodKey)) {
|
143
147
|
return _objectSpread({}, globalErrors, {
|
144
148
|
courier: errorLabels.selectCourier
|
145
149
|
});
|
146
150
|
}
|
147
|
-
var validate = (
|
151
|
+
var validate = (ref13 = validations[mod === null || mod === void 0 ? void 0 : mod.moduleKey]) === null || ref13 === void 0 ? void 0 : ref13[mod === null || mod === void 0 ? void 0 : mod.moduleData.methodKey];
|
148
152
|
if (!validate) {
|
149
153
|
throw new Error("Validation for shipping with provider: ".concat(mod === null || mod === void 0 ? void 0 : mod.moduleKey, " and method key: ").concat(mod === null || mod === void 0 ? void 0 : mod.moduleData.methodKey, " not found"));
|
150
154
|
}
|
@@ -0,0 +1,114 @@
|
|
1
|
+
import React, { useState } from 'react';
|
2
|
+
function _arrayLikeToArray(arr, len) {
|
3
|
+
if (len == null || len > arr.length) len = arr.length;
|
4
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
5
|
+
return arr2;
|
6
|
+
}
|
7
|
+
function _arrayWithHoles(arr) {
|
8
|
+
if (Array.isArray(arr)) return arr;
|
9
|
+
}
|
10
|
+
function _iterableToArrayLimit(arr, i) {
|
11
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
12
|
+
if (_i == null) return;
|
13
|
+
var _arr = [];
|
14
|
+
var _n = true;
|
15
|
+
var _d = false;
|
16
|
+
var _s, _e;
|
17
|
+
try {
|
18
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
19
|
+
_arr.push(_s.value);
|
20
|
+
if (i && _arr.length === i) break;
|
21
|
+
}
|
22
|
+
} catch (err) {
|
23
|
+
_d = true;
|
24
|
+
_e = err;
|
25
|
+
} finally{
|
26
|
+
try {
|
27
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
28
|
+
} finally{
|
29
|
+
if (_d) throw _e;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
return _arr;
|
33
|
+
}
|
34
|
+
function _nonIterableRest() {
|
35
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
36
|
+
}
|
37
|
+
function _slicedToArray(arr, i) {
|
38
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
39
|
+
}
|
40
|
+
function _unsupportedIterableToArray(o, minLen) {
|
41
|
+
if (!o) return;
|
42
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
43
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
44
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
45
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
46
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
47
|
+
}
|
48
|
+
var CompareContextState = /*#__PURE__*/ React.createContext(undefined);
|
49
|
+
var CompareContextFunctions = /*#__PURE__*/ React.createContext(undefined);
|
50
|
+
export function CompareContextProvider(param) {
|
51
|
+
var children = param.children;
|
52
|
+
var ref = _slicedToArray(useState([]), 2), itemsToCompare = ref[0], setItemsToCompare = ref[1];
|
53
|
+
// notAllowedState is needed in order to trigger rerender in useEffect dependency on the client
|
54
|
+
// it allow us to know that we try to add more items than allowed
|
55
|
+
var ref1 = _slicedToArray(useState(0), 2), notAllowedState = ref1[0], setNotAllowedState = ref1[1];
|
56
|
+
var itemAlreadyAdded = function(id) {
|
57
|
+
return itemsToCompare.filter(function(i) {
|
58
|
+
return i._id === id;
|
59
|
+
}).length !== 0;
|
60
|
+
};
|
61
|
+
var addItemToCompare = function(item, maxItemLength) {
|
62
|
+
var alreadyAdded = itemAlreadyAdded(item._id);
|
63
|
+
if (alreadyAdded) {
|
64
|
+
return;
|
65
|
+
}
|
66
|
+
if (itemsToCompare.length === maxItemLength) {
|
67
|
+
setNotAllowedState(notAllowedState + 1);
|
68
|
+
return;
|
69
|
+
}
|
70
|
+
if (itemsToCompare.length < maxItemLength) {
|
71
|
+
itemsToCompare.push(item);
|
72
|
+
setNotAllowedState(0);
|
73
|
+
setItemsToCompare(itemsToCompare);
|
74
|
+
}
|
75
|
+
};
|
76
|
+
var removeComparedItem = function(id) {
|
77
|
+
var filtered = itemsToCompare.filter(function(i) {
|
78
|
+
return i._id !== id;
|
79
|
+
});
|
80
|
+
setItemsToCompare(filtered);
|
81
|
+
};
|
82
|
+
var removeAllComparedItems = function() {
|
83
|
+
return setItemsToCompare([]);
|
84
|
+
};
|
85
|
+
var notAllowed = function() {
|
86
|
+
return notAllowedState;
|
87
|
+
};
|
88
|
+
var functions = {
|
89
|
+
itemAlreadyAdded: itemAlreadyAdded,
|
90
|
+
addItemToCompare: addItemToCompare,
|
91
|
+
removeComparedItem: removeComparedItem,
|
92
|
+
removeAllComparedItems: removeAllComparedItems,
|
93
|
+
notAllowed: notAllowed
|
94
|
+
};
|
95
|
+
return(/*#__PURE__*/ React.createElement(CompareContextState.Provider, {
|
96
|
+
value: itemsToCompare
|
97
|
+
}, /*#__PURE__*/ React.createElement(CompareContextFunctions.Provider, {
|
98
|
+
value: functions
|
99
|
+
}, children)));
|
100
|
+
}
|
101
|
+
export function useCompareState() {
|
102
|
+
var context = React.useContext(CompareContextState);
|
103
|
+
if (context === undefined) {
|
104
|
+
throw new Error('CompareContextState must be used within a CompareContextProvider');
|
105
|
+
}
|
106
|
+
return context;
|
107
|
+
}
|
108
|
+
export function useCompareFunctions() {
|
109
|
+
var context = React.useContext(CompareContextFunctions);
|
110
|
+
if (context === undefined) {
|
111
|
+
throw new Error('CompareContextFunctions must be used within a CompareContextProvider');
|
112
|
+
}
|
113
|
+
return context;
|
114
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { CompareContextProvider, useCompareState, useCompareFunctions } from './CompareContext';
|
@@ -31,13 +31,15 @@ export var useCheckoutShippingModule = function(orderQuery) {
|
|
31
31
|
var isEnabled = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
32
32
|
var cartData = orderQuery.data;
|
33
33
|
return useMemo(function() {
|
34
|
-
var ref;
|
34
|
+
var ref, ref1;
|
35
35
|
if (!isEnabled) return;
|
36
36
|
var shipping = cartData === null || cartData === void 0 ? void 0 : (ref = cartData.shippings) === null || ref === void 0 ? void 0 : ref[0];
|
37
37
|
return {
|
38
38
|
moduleKey: shipping === null || shipping === void 0 ? void 0 : shipping.moduleKey,
|
39
39
|
moduleData: _objectSpread({}, shipping === null || shipping === void 0 ? void 0 : shipping.moduleData, {
|
40
|
-
methodKey: shipping === null || shipping === void 0 ? void 0 : shipping.moduleMethodKey
|
40
|
+
methodKey: shipping === null || shipping === void 0 ? void 0 : shipping.moduleMethodKey,
|
41
|
+
// Special case of warehouse for christian of roma
|
42
|
+
isWarehouseShipping: (shipping === null || shipping === void 0 ? void 0 : shipping.moduleKey) === 'PickUpFromStore' && (shipping === null || shipping === void 0 ? void 0 : (ref1 = shipping.merchant) === null || ref1 === void 0 ? void 0 : ref1.resourceKey) === 'christian-of-roma'
|
41
43
|
})
|
42
44
|
};
|
43
45
|
}, [
|
package/dist/esm/index.js
CHANGED
@@ -93,6 +93,7 @@ export * from './hooks/useProgressBar';
|
|
93
93
|
export * from './hooks/useCatalogDiscounts';
|
94
94
|
export * from './hooks/useLocalRating';
|
95
95
|
export * from './hooks/useProductVariants/types';
|
96
|
+
export * from './hooks/CompareContext/';
|
96
97
|
// Utils
|
97
98
|
export * from './utils';
|
98
99
|
export * from './types';
|
@@ -1,20 +1,21 @@
|
|
1
1
|
import { WISHLIST_STORAGE_KEY } from '../../../api/wishlistApi';
|
2
2
|
import { BASKET_STORAGE_KEY } from '../../../api/myCartApi';
|
3
|
-
import {
|
3
|
+
import { removeAnonToken, setAccessToken, setExpiryToken, setRefreshToken, writeToLocalStorage } from '../../../utils';
|
4
4
|
export var processLoginPayload = function(data) {
|
5
5
|
var anonymous = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
6
6
|
var accessTokenExpires = data.expires;
|
7
|
-
var
|
7
|
+
var _refreshTokenExpires;
|
8
|
+
var refreshTokenExpires = (_refreshTokenExpires = data.refreshTokenExpires) !== null && _refreshTokenExpires !== void 0 ? _refreshTokenExpires : accessTokenExpires;
|
8
9
|
writeToLocalStorage(WISHLIST_STORAGE_KEY, data.wishList);
|
9
10
|
writeToLocalStorage(BASKET_STORAGE_KEY, data.basket);
|
10
11
|
setAccessToken(data.accessToken, anonymous, {
|
11
|
-
expires:
|
12
|
+
expires: new Date(accessTokenExpires)
|
12
13
|
});
|
13
14
|
setExpiryToken(data.expires, {
|
14
|
-
expires:
|
15
|
+
expires: new Date(refreshTokenExpires)
|
15
16
|
});
|
16
17
|
setRefreshToken(data.refreshToken, {
|
17
|
-
expires:
|
18
|
+
expires: new Date(refreshTokenExpires)
|
18
19
|
});
|
19
20
|
!anonymous && removeAnonToken();
|
20
21
|
};
|
package/dist/esm/utils/index.js
CHANGED
package/dist/esm/utils/tokens.js
CHANGED
@@ -78,7 +78,7 @@ export var setAccessToken = function(token, anonymous, options) {
|
|
78
78
|
Cookies.set("".concat(tokenIdentifier), token, options);
|
79
79
|
};
|
80
80
|
export var setRefreshToken = function(token, options) {
|
81
|
-
Cookies.set(REFRESH_TOKEN_KEY, token, options);
|
81
|
+
token && Cookies.set(REFRESH_TOKEN_KEY, token, options);
|
82
82
|
};
|
83
83
|
export var setExpiryToken = function(timestamp, options) {
|
84
84
|
Cookies.set(TOKEN_EXPIRY_KEY, timestamp.toString(), options);
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { SearchResultDTO, LineItemDTO } from '@sentecacommerce/sdk';
|
2
|
+
declare type CompareStateItemType = SearchResultDTO | LineItemDTO;
|
3
|
+
declare type CompareStateItemsType = SearchResultDTO[] | LineItemDTO[];
|
4
|
+
declare type CompareContextType = {
|
5
|
+
itemAlreadyAdded: (id: string) => boolean;
|
6
|
+
addItemToCompare: (item: CompareStateItemType, maxItemLength: number) => void;
|
7
|
+
removeComparedItem: (id: string) => void;
|
8
|
+
removeAllComparedItems: () => void;
|
9
|
+
notAllowed: () => number;
|
10
|
+
};
|
11
|
+
export declare function CompareContextProvider({ children }: {
|
12
|
+
children: any;
|
13
|
+
}): JSX.Element;
|
14
|
+
export declare function useCompareState(): CompareStateItemsType;
|
15
|
+
export declare function useCompareFunctions(): CompareContextType;
|
16
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { CompareContextProvider, useCompareState, useCompareFunctions, } from './CompareContext';
|
package/dist/types/index.d.ts
CHANGED
@@ -86,6 +86,7 @@ export * from './hooks/useProgressBar';
|
|
86
86
|
export * from './hooks/useCatalogDiscounts';
|
87
87
|
export * from './hooks/useLocalRating';
|
88
88
|
export * from './hooks/useProductVariants/types';
|
89
|
+
export * from './hooks/CompareContext/';
|
89
90
|
export * from './utils';
|
90
91
|
export * from './types';
|
91
92
|
export * from './seo';
|
@@ -1,17 +1,12 @@
|
|
1
|
+
import Cookies from 'js-cookie';
|
1
2
|
export declare const AUTH_TOKEN_KEY = "token";
|
2
3
|
export declare const ANONYMOUS_TOKEN_KEY = "anonymousToken";
|
3
4
|
export declare const TOKEN_EXPIRY_KEY = "tokenExpiry";
|
4
5
|
export declare const REFRESH_TOKEN_KEY = "refreshToken";
|
5
6
|
export declare const isTokenExpired: () => boolean;
|
6
|
-
export declare const setAccessToken: (token: string, anonymous: boolean, options?:
|
7
|
-
|
8
|
-
|
9
|
-
export declare const setRefreshToken: (token: string, options?: {
|
10
|
-
expires: number;
|
11
|
-
} | undefined) => void;
|
12
|
-
export declare const setExpiryToken: (timestamp: number, options?: {
|
13
|
-
expires: number;
|
14
|
-
} | undefined) => void;
|
7
|
+
export declare const setAccessToken: (token: string, anonymous: boolean, options?: Cookies.CookieAttributes | undefined) => void;
|
8
|
+
export declare const setRefreshToken: (token: string | undefined, options?: Cookies.CookieAttributes | undefined) => void;
|
9
|
+
export declare const setExpiryToken: (timestamp: number, options?: Cookies.CookieAttributes | undefined) => void;
|
15
10
|
export declare const getExpiryToken: () => string | undefined;
|
16
11
|
export declare const removeExpiryToken: () => void;
|
17
12
|
export declare const getRefreshToken: () => string | undefined;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sentecacommerce-theme/lib",
|
3
3
|
"sideEffects": false,
|
4
|
-
"version": "0.14.
|
4
|
+
"version": "0.14.11",
|
5
5
|
"main": "dist/cjs/index.js",
|
6
6
|
"module": "dist/esm/index.js",
|
7
7
|
"types": "dist/types/index.d.ts",
|
@@ -31,13 +31,13 @@
|
|
31
31
|
"watch:cjs": "swc src --out-dir dist/cjs -w",
|
32
32
|
"watch:esm": "swc src --out-dir dist/esm --no-swcrc -w"
|
33
33
|
},
|
34
|
-
"gitHead": "
|
34
|
+
"gitHead": "9f85ecb7a9f320e4ba8a0d73bd34747c45e9ec33",
|
35
35
|
"peerDependencies": {
|
36
36
|
"react-query": "^2.26.2"
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
|
-
"@sentecacommerce-theme/base": "^0.14.
|
40
|
-
"@sentecacommerce-theme/cms": "^0.14.
|
39
|
+
"@sentecacommerce-theme/base": "^0.14.11",
|
40
|
+
"@sentecacommerce-theme/cms": "^0.14.11",
|
41
41
|
"@sentecacommerce/sdk": "2.0.175",
|
42
42
|
"body-scroll-lock": "^3.1.5",
|
43
43
|
"copy-to-clipboard": "^3.3.1",
|
@@ -1,10 +0,0 @@
|
|
1
|
-
Object.defineProperty(exports, "__esModule", {
|
2
|
-
value: true
|
3
|
-
});
|
4
|
-
exports.convertDateIntoRemainingDays = void 0;
|
5
|
-
var convertDateIntoRemainingDays = function(date1, date2) {
|
6
|
-
var differenceInTime = date2.getTime() - date1.getTime();
|
7
|
-
var differenceInDays = differenceInTime / (1000 * 3600 * 24);
|
8
|
-
return Math.floor(differenceInDays);
|
9
|
-
};
|
10
|
-
exports.convertDateIntoRemainingDays = convertDateIntoRemainingDays;
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const convertDateIntoRemainingDays: (date1: Date, date2: Date) => number;
|