@crystaldesign/product-handler 25.7.5 → 25.8.0-beta.10
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/build/cjs/index.js
CHANGED
|
@@ -1974,52 +1974,117 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1974
1974
|
return apiGetProductByFilter;
|
|
1975
1975
|
}()
|
|
1976
1976
|
}, {
|
|
1977
|
-
key: "
|
|
1977
|
+
key: "apiGetProductByQuery",
|
|
1978
1978
|
value: function () {
|
|
1979
|
-
var
|
|
1979
|
+
var _apiGetProductByQuery = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee11(filter) {
|
|
1980
1980
|
var _res4;
|
|
1981
|
-
var
|
|
1981
|
+
var limit,
|
|
1982
|
+
useFilter,
|
|
1983
|
+
filterParam,
|
|
1984
|
+
fullUrl,
|
|
1985
|
+
queryString,
|
|
1986
|
+
res,
|
|
1987
|
+
resData,
|
|
1988
|
+
_args13 = arguments;
|
|
1982
1989
|
return _regeneratorRuntime__default["default"].wrap(function _callee11$(_context13) {
|
|
1983
1990
|
while (1) switch (_context13.prev = _context13.next) {
|
|
1991
|
+
case 0:
|
|
1992
|
+
limit = _args13.length > 1 && _args13[1] !== undefined ? _args13[1] : 1;
|
|
1993
|
+
useFilter = _args13.length > 2 ? _args13[2] : undefined;
|
|
1994
|
+
filterParam = useFilter ? 'filter' : 'search';
|
|
1995
|
+
fullUrl = new URL(this.catalogService + '/v1/products/query');
|
|
1996
|
+
queryString = new URLSearchParams();
|
|
1997
|
+
queryString.append(filterParam, encodeURIComponent(this.parseFilter(filter)));
|
|
1998
|
+
queryString.append('sort', encodeURIComponent('{-created}'));
|
|
1999
|
+
queryString.append('limit', limit.toString());
|
|
2000
|
+
fullUrl.search = queryString.toString();
|
|
2001
|
+
_context13.prev = 9;
|
|
2002
|
+
_context13.next = 12;
|
|
2003
|
+
return axios__default["default"].get(fullUrl.toString(), {
|
|
2004
|
+
headers: _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
|
|
2005
|
+
'Content-Type': 'application/json'
|
|
2006
|
+
})
|
|
2007
|
+
});
|
|
2008
|
+
case 12:
|
|
2009
|
+
res = _context13.sent;
|
|
2010
|
+
_context13.next = 15;
|
|
2011
|
+
return res.data;
|
|
2012
|
+
case 15:
|
|
2013
|
+
resData = _context13.sent;
|
|
2014
|
+
_context13.next = 21;
|
|
2015
|
+
break;
|
|
2016
|
+
case 18:
|
|
2017
|
+
_context13.prev = 18;
|
|
2018
|
+
_context13.t0 = _context13["catch"](9);
|
|
2019
|
+
throw new Error('Could not get existing products', {
|
|
2020
|
+
cause: _context13.t0
|
|
2021
|
+
});
|
|
2022
|
+
case 21:
|
|
2023
|
+
if (!(((_res4 = res) === null || _res4 === void 0 ? void 0 : _res4.status) == 200)) {
|
|
2024
|
+
_context13.next = 23;
|
|
2025
|
+
break;
|
|
2026
|
+
}
|
|
2027
|
+
return _context13.abrupt("return", resData);
|
|
2028
|
+
case 23:
|
|
2029
|
+
throw new Error(resData.error);
|
|
2030
|
+
case 24:
|
|
2031
|
+
case "end":
|
|
2032
|
+
return _context13.stop();
|
|
2033
|
+
}
|
|
2034
|
+
}, _callee11, this, [[9, 18]]);
|
|
2035
|
+
}));
|
|
2036
|
+
function apiGetProductByQuery(_x18) {
|
|
2037
|
+
return _apiGetProductByQuery.apply(this, arguments);
|
|
2038
|
+
}
|
|
2039
|
+
return apiGetProductByQuery;
|
|
2040
|
+
}()
|
|
2041
|
+
}, {
|
|
2042
|
+
key: "apiMarkAsFavorite",
|
|
2043
|
+
value: function () {
|
|
2044
|
+
var _apiMarkAsFavorite = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee12(id, organizationId) {
|
|
2045
|
+
var _res5;
|
|
2046
|
+
var fullUrl, res, resData;
|
|
2047
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee12$(_context14) {
|
|
2048
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1984
2049
|
case 0:
|
|
1985
2050
|
fullUrl = new URL(this.catalogService + '/v1/products/' + id + '/favorite');
|
|
1986
2051
|
fullUrl.searchParams.append('organizationId', organizationId);
|
|
1987
|
-
|
|
1988
|
-
|
|
2052
|
+
_context14.prev = 2;
|
|
2053
|
+
_context14.next = 5;
|
|
1989
2054
|
return axios__default["default"].post(fullUrl.toString(), undefined, {
|
|
1990
2055
|
headers: _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
|
|
1991
2056
|
'Content-Type': 'application/json'
|
|
1992
2057
|
})
|
|
1993
2058
|
});
|
|
1994
2059
|
case 5:
|
|
1995
|
-
res =
|
|
1996
|
-
|
|
2060
|
+
res = _context14.sent;
|
|
2061
|
+
_context14.next = 8;
|
|
1997
2062
|
return res.data;
|
|
1998
2063
|
case 8:
|
|
1999
|
-
resData =
|
|
2000
|
-
|
|
2064
|
+
resData = _context14.sent;
|
|
2065
|
+
_context14.next = 14;
|
|
2001
2066
|
break;
|
|
2002
2067
|
case 11:
|
|
2003
|
-
|
|
2004
|
-
|
|
2068
|
+
_context14.prev = 11;
|
|
2069
|
+
_context14.t0 = _context14["catch"](2);
|
|
2005
2070
|
throw new Error('Error on activate product', {
|
|
2006
|
-
cause:
|
|
2071
|
+
cause: _context14.t0
|
|
2007
2072
|
});
|
|
2008
2073
|
case 14:
|
|
2009
|
-
if (!(((
|
|
2010
|
-
|
|
2074
|
+
if (!(((_res5 = res) === null || _res5 === void 0 ? void 0 : _res5.status) == 204)) {
|
|
2075
|
+
_context14.next = 16;
|
|
2011
2076
|
break;
|
|
2012
2077
|
}
|
|
2013
|
-
return
|
|
2078
|
+
return _context14.abrupt("return");
|
|
2014
2079
|
case 16:
|
|
2015
2080
|
throw new Error(resData.error);
|
|
2016
2081
|
case 17:
|
|
2017
2082
|
case "end":
|
|
2018
|
-
return
|
|
2083
|
+
return _context14.stop();
|
|
2019
2084
|
}
|
|
2020
|
-
},
|
|
2085
|
+
}, _callee12, this, [[2, 11]]);
|
|
2021
2086
|
}));
|
|
2022
|
-
function apiMarkAsFavorite(
|
|
2087
|
+
function apiMarkAsFavorite(_x19, _x20) {
|
|
2023
2088
|
return _apiMarkAsFavorite.apply(this, arguments);
|
|
2024
2089
|
}
|
|
2025
2090
|
return apiMarkAsFavorite;
|
|
@@ -2027,47 +2092,47 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2027
2092
|
}, {
|
|
2028
2093
|
key: "apiGetUniqueDivaNr",
|
|
2029
2094
|
value: function () {
|
|
2030
|
-
var _apiGetUniqueDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2031
|
-
var
|
|
2095
|
+
var _apiGetUniqueDivaNr = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13() {
|
|
2096
|
+
var _res6;
|
|
2032
2097
|
var fullUrl, res, resData;
|
|
2033
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
2034
|
-
while (1) switch (
|
|
2098
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context15) {
|
|
2099
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
2035
2100
|
case 0:
|
|
2036
2101
|
fullUrl = new URL(this.basketService + '/baskets/uniqueDivaNr');
|
|
2037
|
-
|
|
2038
|
-
|
|
2102
|
+
_context15.prev = 1;
|
|
2103
|
+
_context15.next = 4;
|
|
2039
2104
|
return axios__default["default"].get(fullUrl.toString(), {
|
|
2040
2105
|
headers: _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
|
|
2041
2106
|
'Content-Type': 'application/json'
|
|
2042
2107
|
})
|
|
2043
2108
|
});
|
|
2044
2109
|
case 4:
|
|
2045
|
-
res =
|
|
2046
|
-
|
|
2110
|
+
res = _context15.sent;
|
|
2111
|
+
_context15.next = 7;
|
|
2047
2112
|
return res.data;
|
|
2048
2113
|
case 7:
|
|
2049
|
-
resData =
|
|
2050
|
-
|
|
2114
|
+
resData = _context15.sent;
|
|
2115
|
+
_context15.next = 13;
|
|
2051
2116
|
break;
|
|
2052
2117
|
case 10:
|
|
2053
|
-
|
|
2054
|
-
|
|
2118
|
+
_context15.prev = 10;
|
|
2119
|
+
_context15.t0 = _context15["catch"](1);
|
|
2055
2120
|
throw new Error('Error on activate product', {
|
|
2056
|
-
cause:
|
|
2121
|
+
cause: _context15.t0
|
|
2057
2122
|
});
|
|
2058
2123
|
case 13:
|
|
2059
|
-
if (!(((
|
|
2060
|
-
|
|
2124
|
+
if (!(((_res6 = res) === null || _res6 === void 0 ? void 0 : _res6.status) == 200)) {
|
|
2125
|
+
_context15.next = 15;
|
|
2061
2126
|
break;
|
|
2062
2127
|
}
|
|
2063
|
-
return
|
|
2128
|
+
return _context15.abrupt("return", resData.divaNr);
|
|
2064
2129
|
case 15:
|
|
2065
2130
|
throw new Error(resData.error);
|
|
2066
2131
|
case 16:
|
|
2067
2132
|
case "end":
|
|
2068
|
-
return
|
|
2133
|
+
return _context15.stop();
|
|
2069
2134
|
}
|
|
2070
|
-
},
|
|
2135
|
+
}, _callee13, this, [[1, 10]]);
|
|
2071
2136
|
}));
|
|
2072
2137
|
function apiGetUniqueDivaNr() {
|
|
2073
2138
|
return _apiGetUniqueDivaNr.apply(this, arguments);
|
|
@@ -2077,10 +2142,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2077
2142
|
}, {
|
|
2078
2143
|
key: "apiLoadProductVariantsGrouped",
|
|
2079
2144
|
value: function () {
|
|
2080
|
-
var _apiLoadProductVariantsGrouped = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2145
|
+
var _apiLoadProductVariantsGrouped = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(_ref45) {
|
|
2081
2146
|
var limit, skip, fields, _ref45$search, search, sort, favorites, abortController, fullUrl, headers, promise;
|
|
2082
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
2083
|
-
while (1) switch (
|
|
2147
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context16) {
|
|
2148
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
2084
2149
|
case 0:
|
|
2085
2150
|
limit = _ref45.limit, skip = _ref45.skip, fields = _ref45.fields, _ref45$search = _ref45.search, search = _ref45$search === void 0 ? [] : _ref45$search, sort = _ref45.sort, favorites = _ref45.favorites, abortController = _ref45.abortController;
|
|
2086
2151
|
fullUrl = this.catalogService + '/v1/products/groups' + '?organizationId=' + this.organization._id + (this._organization.parentOrganizationIds ? '&parentOrganizationIds=' + this._organization.parentOrganizationIds.join(',') : '') + (limit ? '&limit=' + limit : '') + (skip ? '&skip=' + skip : '') + (fields ? '&fileds=' + DivaUtils__default["default"].fixedEncodeURIComponent('{' + fields.join(',') + '}') : '') + (search.length ? '&search=' + DivaUtils__default["default"].fixedEncodeURIComponent(this.parseFilter(search)) : '') + (sort ? '&sort=' + DivaUtils__default["default"].fixedEncodeURIComponent(sort) : '') + (favorites ? '&favorites=true' : '');
|
|
@@ -2104,17 +2169,17 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2104
2169
|
reject('Error loading products grouped by variants: ' + error.message);
|
|
2105
2170
|
});
|
|
2106
2171
|
});
|
|
2107
|
-
|
|
2172
|
+
_context16.next = 7;
|
|
2108
2173
|
return promise;
|
|
2109
2174
|
case 7:
|
|
2110
|
-
return
|
|
2175
|
+
return _context16.abrupt("return", _context16.sent);
|
|
2111
2176
|
case 8:
|
|
2112
2177
|
case "end":
|
|
2113
|
-
return
|
|
2178
|
+
return _context16.stop();
|
|
2114
2179
|
}
|
|
2115
|
-
},
|
|
2180
|
+
}, _callee14, this);
|
|
2116
2181
|
}));
|
|
2117
|
-
function apiLoadProductVariantsGrouped(
|
|
2182
|
+
function apiLoadProductVariantsGrouped(_x21) {
|
|
2118
2183
|
return _apiLoadProductVariantsGrouped.apply(this, arguments);
|
|
2119
2184
|
}
|
|
2120
2185
|
return apiLoadProductVariantsGrouped;
|
|
@@ -2122,11 +2187,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2122
2187
|
}, {
|
|
2123
2188
|
key: "apiSaveProducts",
|
|
2124
2189
|
value: function () {
|
|
2125
|
-
var _apiSaveProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2190
|
+
var _apiSaveProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(serverUrl, jwt, products, awaitPDF, removedProductIds) {
|
|
2126
2191
|
var _this$openModal3, _this$t3;
|
|
2127
2192
|
var fullUrl, response, status, BATCH_SIZE, productsPackages, groupIndex, baseProduct, i, _productsPackages$gro, _productsPackages$gro2, responseProducts, timeItTook, _i2, _this$openModal4, _this$t4, startTime, endTime, estTime, _loop3, j;
|
|
2128
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
2129
|
-
while (1) switch (
|
|
2193
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context18) {
|
|
2194
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
2130
2195
|
case 0:
|
|
2131
2196
|
fullUrl = serverUrl + '/v1/products/groups';
|
|
2132
2197
|
BATCH_SIZE = 10;
|
|
@@ -2135,22 +2200,22 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2135
2200
|
i = 0;
|
|
2136
2201
|
case 5:
|
|
2137
2202
|
if (!(i < products.length)) {
|
|
2138
|
-
|
|
2203
|
+
_context18.next = 15;
|
|
2139
2204
|
break;
|
|
2140
2205
|
}
|
|
2141
2206
|
if (!products[i].baseProduct) {
|
|
2142
|
-
|
|
2207
|
+
_context18.next = 9;
|
|
2143
2208
|
break;
|
|
2144
2209
|
}
|
|
2145
2210
|
baseProduct = products[i];
|
|
2146
|
-
return
|
|
2211
|
+
return _context18.abrupt("continue", 12);
|
|
2147
2212
|
case 9:
|
|
2148
2213
|
if (BATCH_SIZE < ((_productsPackages$gro = (_productsPackages$gro2 = productsPackages[groupIndex]) === null || _productsPackages$gro2 === void 0 ? void 0 : _productsPackages$gro2.length) !== null && _productsPackages$gro !== void 0 ? _productsPackages$gro : 0)) groupIndex++;
|
|
2149
2214
|
if (!productsPackages[groupIndex]) productsPackages[groupIndex] = [];
|
|
2150
2215
|
productsPackages[groupIndex].push(products[i]);
|
|
2151
2216
|
case 12:
|
|
2152
2217
|
i++;
|
|
2153
|
-
|
|
2218
|
+
_context18.next = 5;
|
|
2154
2219
|
break;
|
|
2155
2220
|
case 15:
|
|
2156
2221
|
responseProducts = [];
|
|
@@ -2163,13 +2228,13 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2163
2228
|
_i2 = 0;
|
|
2164
2229
|
case 19:
|
|
2165
2230
|
if (!(_i2 < productsPackages.length)) {
|
|
2166
|
-
|
|
2231
|
+
_context18.next = 47;
|
|
2167
2232
|
break;
|
|
2168
2233
|
}
|
|
2169
2234
|
if (baseProduct && _i2 == 0) productsPackages[_i2].unshift(baseProduct);
|
|
2170
2235
|
startTime = Date.now();
|
|
2171
|
-
|
|
2172
|
-
|
|
2236
|
+
_context18.prev = 22;
|
|
2237
|
+
_context18.next = 25;
|
|
2173
2238
|
return fetch(fullUrl, {
|
|
2174
2239
|
method: 'PUT',
|
|
2175
2240
|
headers: {
|
|
@@ -2189,18 +2254,18 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2189
2254
|
return res.json();
|
|
2190
2255
|
});
|
|
2191
2256
|
case 25:
|
|
2192
|
-
response =
|
|
2257
|
+
response = _context18.sent;
|
|
2193
2258
|
if (!response.Error) {
|
|
2194
|
-
|
|
2259
|
+
_context18.next = 28;
|
|
2195
2260
|
break;
|
|
2196
2261
|
}
|
|
2197
2262
|
throw new Error('Error saving Basket and Products. serverError: ' + response.Error);
|
|
2198
2263
|
case 28:
|
|
2199
|
-
|
|
2264
|
+
_context18.next = 33;
|
|
2200
2265
|
break;
|
|
2201
2266
|
case 30:
|
|
2202
|
-
|
|
2203
|
-
|
|
2267
|
+
_context18.prev = 30;
|
|
2268
|
+
_context18.t0 = _context18["catch"](22);
|
|
2204
2269
|
throw Error(status);
|
|
2205
2270
|
case 33:
|
|
2206
2271
|
endTime = Date.now();
|
|
@@ -2214,8 +2279,8 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2214
2279
|
dontRenderForm: true
|
|
2215
2280
|
});
|
|
2216
2281
|
_loop3 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop3(j) {
|
|
2217
|
-
return _regeneratorRuntime__default["default"].wrap(function _loop3$(
|
|
2218
|
-
while (1) switch (
|
|
2282
|
+
return _regeneratorRuntime__default["default"].wrap(function _loop3$(_context17) {
|
|
2283
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
2219
2284
|
case 0:
|
|
2220
2285
|
if (response.products[j].baseProduct) baseProduct = response.products[j];
|
|
2221
2286
|
if (!responseProducts.find(function (p) {
|
|
@@ -2225,34 +2290,34 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2225
2290
|
}
|
|
2226
2291
|
case 2:
|
|
2227
2292
|
case "end":
|
|
2228
|
-
return
|
|
2293
|
+
return _context17.stop();
|
|
2229
2294
|
}
|
|
2230
2295
|
}, _loop3);
|
|
2231
2296
|
});
|
|
2232
2297
|
j = 0;
|
|
2233
2298
|
case 39:
|
|
2234
2299
|
if (!(j < response.products.length)) {
|
|
2235
|
-
|
|
2300
|
+
_context18.next = 44;
|
|
2236
2301
|
break;
|
|
2237
2302
|
}
|
|
2238
|
-
return
|
|
2303
|
+
return _context18.delegateYield(_loop3(j), "t1", 41);
|
|
2239
2304
|
case 41:
|
|
2240
2305
|
j++;
|
|
2241
|
-
|
|
2306
|
+
_context18.next = 39;
|
|
2242
2307
|
break;
|
|
2243
2308
|
case 44:
|
|
2244
2309
|
_i2++;
|
|
2245
|
-
|
|
2310
|
+
_context18.next = 19;
|
|
2246
2311
|
break;
|
|
2247
2312
|
case 47:
|
|
2248
|
-
return
|
|
2313
|
+
return _context18.abrupt("return", responseProducts);
|
|
2249
2314
|
case 48:
|
|
2250
2315
|
case "end":
|
|
2251
|
-
return
|
|
2316
|
+
return _context18.stop();
|
|
2252
2317
|
}
|
|
2253
|
-
},
|
|
2318
|
+
}, _callee15, this, [[22, 30]]);
|
|
2254
2319
|
}));
|
|
2255
|
-
function apiSaveProducts(
|
|
2320
|
+
function apiSaveProducts(_x22, _x23, _x24, _x25, _x26) {
|
|
2256
2321
|
return _apiSaveProducts.apply(this, arguments);
|
|
2257
2322
|
}
|
|
2258
2323
|
return apiSaveProducts;
|
|
@@ -2272,14 +2337,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2272
2337
|
filter.push("+[".concat(groups[key].filter(function (f) {
|
|
2273
2338
|
return f.or;
|
|
2274
2339
|
}).map(function (f) {
|
|
2275
|
-
return "{".concat(f.id, ",").concat(f.op, ",").concat(typeof f.value == 'string' ? "\"".concat(f.value, "\"") : f.value, "}");
|
|
2340
|
+
return "{".concat(f.id, ",").concat(f.op, ",").concat(typeof f.value == 'string' && !f.value.includes(',') ? "\"".concat(f.value, "\"") : f.value, "}");
|
|
2276
2341
|
}).join(), "]"));
|
|
2277
2342
|
}
|
|
2278
2343
|
}
|
|
2279
2344
|
filters.filter(function (f) {
|
|
2280
2345
|
return !f.or;
|
|
2281
2346
|
}).forEach(function (f) {
|
|
2282
|
-
return filter.push("{".concat(f.id, ",").concat(f.op, ",").concat(typeof f.value == 'string' ? "\"".concat(f.value, "\"") : f.value, "}"));
|
|
2347
|
+
return filter.push("{".concat(f.id, ",").concat(f.op, ",").concat(typeof f.value == 'string' && !f.value.includes(',') ? "\"".concat(f.value, "\"") : f.value, "}"));
|
|
2283
2348
|
});
|
|
2284
2349
|
}
|
|
2285
2350
|
return "[".concat(filter.join(), "]");
|
|
@@ -2477,10 +2542,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2477
2542
|
}, {
|
|
2478
2543
|
key: "loadSelectOptions",
|
|
2479
2544
|
value: function () {
|
|
2480
|
-
var _loadSelectOptions = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2545
|
+
var _loadSelectOptions = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee16(sessionGuid, dataSource, additionalFilter) {
|
|
2481
2546
|
var values, apiUrl, i, apiResult, _i3, value, text;
|
|
2482
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
2483
|
-
while (1) switch (
|
|
2547
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee16$(_context19) {
|
|
2548
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
2484
2549
|
case 0:
|
|
2485
2550
|
values = [];
|
|
2486
2551
|
apiUrl = dataSource.url;
|
|
@@ -2489,7 +2554,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2489
2554
|
apiUrl += '&' + additionalFilter[i].key + '=' + additionalFilter[i].value;
|
|
2490
2555
|
}
|
|
2491
2556
|
}
|
|
2492
|
-
|
|
2557
|
+
_context19.next = 5;
|
|
2493
2558
|
return fetch(apiUrl, {
|
|
2494
2559
|
headers: {
|
|
2495
2560
|
sessionGuid: sessionGuid
|
|
@@ -2501,7 +2566,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2501
2566
|
return res.json();
|
|
2502
2567
|
});
|
|
2503
2568
|
case 5:
|
|
2504
|
-
apiResult =
|
|
2569
|
+
apiResult = _context19.sent;
|
|
2505
2570
|
if (dataSource.useKey) {
|
|
2506
2571
|
apiResult = apiResult[dataSource.useKey];
|
|
2507
2572
|
}
|
|
@@ -2513,14 +2578,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2513
2578
|
text: text
|
|
2514
2579
|
});
|
|
2515
2580
|
}
|
|
2516
|
-
return
|
|
2581
|
+
return _context19.abrupt("return", values);
|
|
2517
2582
|
case 9:
|
|
2518
2583
|
case "end":
|
|
2519
|
-
return
|
|
2584
|
+
return _context19.stop();
|
|
2520
2585
|
}
|
|
2521
|
-
},
|
|
2586
|
+
}, _callee16);
|
|
2522
2587
|
}));
|
|
2523
|
-
function loadSelectOptions(
|
|
2588
|
+
function loadSelectOptions(_x27, _x28, _x29) {
|
|
2524
2589
|
return _loadSelectOptions.apply(this, arguments);
|
|
2525
2590
|
}
|
|
2526
2591
|
return loadSelectOptions;
|
package/build/esm/index.js
CHANGED
|
@@ -1956,52 +1956,117 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
1956
1956
|
return apiGetProductByFilter;
|
|
1957
1957
|
}()
|
|
1958
1958
|
}, {
|
|
1959
|
-
key: "
|
|
1959
|
+
key: "apiGetProductByQuery",
|
|
1960
1960
|
value: function () {
|
|
1961
|
-
var
|
|
1961
|
+
var _apiGetProductByQuery = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee11(filter) {
|
|
1962
1962
|
var _res4;
|
|
1963
|
-
var
|
|
1963
|
+
var limit,
|
|
1964
|
+
useFilter,
|
|
1965
|
+
filterParam,
|
|
1966
|
+
fullUrl,
|
|
1967
|
+
queryString,
|
|
1968
|
+
res,
|
|
1969
|
+
resData,
|
|
1970
|
+
_args13 = arguments;
|
|
1964
1971
|
return _regeneratorRuntime.wrap(function _callee11$(_context13) {
|
|
1965
1972
|
while (1) switch (_context13.prev = _context13.next) {
|
|
1973
|
+
case 0:
|
|
1974
|
+
limit = _args13.length > 1 && _args13[1] !== undefined ? _args13[1] : 1;
|
|
1975
|
+
useFilter = _args13.length > 2 ? _args13[2] : undefined;
|
|
1976
|
+
filterParam = useFilter ? 'filter' : 'search';
|
|
1977
|
+
fullUrl = new URL(this.catalogService + '/v1/products/query');
|
|
1978
|
+
queryString = new URLSearchParams();
|
|
1979
|
+
queryString.append(filterParam, encodeURIComponent(this.parseFilter(filter)));
|
|
1980
|
+
queryString.append('sort', encodeURIComponent('{-created}'));
|
|
1981
|
+
queryString.append('limit', limit.toString());
|
|
1982
|
+
fullUrl.search = queryString.toString();
|
|
1983
|
+
_context13.prev = 9;
|
|
1984
|
+
_context13.next = 12;
|
|
1985
|
+
return axios.get(fullUrl.toString(), {
|
|
1986
|
+
headers: _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
|
|
1987
|
+
'Content-Type': 'application/json'
|
|
1988
|
+
})
|
|
1989
|
+
});
|
|
1990
|
+
case 12:
|
|
1991
|
+
res = _context13.sent;
|
|
1992
|
+
_context13.next = 15;
|
|
1993
|
+
return res.data;
|
|
1994
|
+
case 15:
|
|
1995
|
+
resData = _context13.sent;
|
|
1996
|
+
_context13.next = 21;
|
|
1997
|
+
break;
|
|
1998
|
+
case 18:
|
|
1999
|
+
_context13.prev = 18;
|
|
2000
|
+
_context13.t0 = _context13["catch"](9);
|
|
2001
|
+
throw new Error('Could not get existing products', {
|
|
2002
|
+
cause: _context13.t0
|
|
2003
|
+
});
|
|
2004
|
+
case 21:
|
|
2005
|
+
if (!(((_res4 = res) === null || _res4 === void 0 ? void 0 : _res4.status) == 200)) {
|
|
2006
|
+
_context13.next = 23;
|
|
2007
|
+
break;
|
|
2008
|
+
}
|
|
2009
|
+
return _context13.abrupt("return", resData);
|
|
2010
|
+
case 23:
|
|
2011
|
+
throw new Error(resData.error);
|
|
2012
|
+
case 24:
|
|
2013
|
+
case "end":
|
|
2014
|
+
return _context13.stop();
|
|
2015
|
+
}
|
|
2016
|
+
}, _callee11, this, [[9, 18]]);
|
|
2017
|
+
}));
|
|
2018
|
+
function apiGetProductByQuery(_x18) {
|
|
2019
|
+
return _apiGetProductByQuery.apply(this, arguments);
|
|
2020
|
+
}
|
|
2021
|
+
return apiGetProductByQuery;
|
|
2022
|
+
}()
|
|
2023
|
+
}, {
|
|
2024
|
+
key: "apiMarkAsFavorite",
|
|
2025
|
+
value: function () {
|
|
2026
|
+
var _apiMarkAsFavorite = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee12(id, organizationId) {
|
|
2027
|
+
var _res5;
|
|
2028
|
+
var fullUrl, res, resData;
|
|
2029
|
+
return _regeneratorRuntime.wrap(function _callee12$(_context14) {
|
|
2030
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1966
2031
|
case 0:
|
|
1967
2032
|
fullUrl = new URL(this.catalogService + '/v1/products/' + id + '/favorite');
|
|
1968
2033
|
fullUrl.searchParams.append('organizationId', organizationId);
|
|
1969
|
-
|
|
1970
|
-
|
|
2034
|
+
_context14.prev = 2;
|
|
2035
|
+
_context14.next = 5;
|
|
1971
2036
|
return axios.post(fullUrl.toString(), undefined, {
|
|
1972
2037
|
headers: _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
|
|
1973
2038
|
'Content-Type': 'application/json'
|
|
1974
2039
|
})
|
|
1975
2040
|
});
|
|
1976
2041
|
case 5:
|
|
1977
|
-
res =
|
|
1978
|
-
|
|
2042
|
+
res = _context14.sent;
|
|
2043
|
+
_context14.next = 8;
|
|
1979
2044
|
return res.data;
|
|
1980
2045
|
case 8:
|
|
1981
|
-
resData =
|
|
1982
|
-
|
|
2046
|
+
resData = _context14.sent;
|
|
2047
|
+
_context14.next = 14;
|
|
1983
2048
|
break;
|
|
1984
2049
|
case 11:
|
|
1985
|
-
|
|
1986
|
-
|
|
2050
|
+
_context14.prev = 11;
|
|
2051
|
+
_context14.t0 = _context14["catch"](2);
|
|
1987
2052
|
throw new Error('Error on activate product', {
|
|
1988
|
-
cause:
|
|
2053
|
+
cause: _context14.t0
|
|
1989
2054
|
});
|
|
1990
2055
|
case 14:
|
|
1991
|
-
if (!(((
|
|
1992
|
-
|
|
2056
|
+
if (!(((_res5 = res) === null || _res5 === void 0 ? void 0 : _res5.status) == 204)) {
|
|
2057
|
+
_context14.next = 16;
|
|
1993
2058
|
break;
|
|
1994
2059
|
}
|
|
1995
|
-
return
|
|
2060
|
+
return _context14.abrupt("return");
|
|
1996
2061
|
case 16:
|
|
1997
2062
|
throw new Error(resData.error);
|
|
1998
2063
|
case 17:
|
|
1999
2064
|
case "end":
|
|
2000
|
-
return
|
|
2065
|
+
return _context14.stop();
|
|
2001
2066
|
}
|
|
2002
|
-
},
|
|
2067
|
+
}, _callee12, this, [[2, 11]]);
|
|
2003
2068
|
}));
|
|
2004
|
-
function apiMarkAsFavorite(
|
|
2069
|
+
function apiMarkAsFavorite(_x19, _x20) {
|
|
2005
2070
|
return _apiMarkAsFavorite.apply(this, arguments);
|
|
2006
2071
|
}
|
|
2007
2072
|
return apiMarkAsFavorite;
|
|
@@ -2009,47 +2074,47 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2009
2074
|
}, {
|
|
2010
2075
|
key: "apiGetUniqueDivaNr",
|
|
2011
2076
|
value: function () {
|
|
2012
|
-
var _apiGetUniqueDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2013
|
-
var
|
|
2077
|
+
var _apiGetUniqueDivaNr = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13() {
|
|
2078
|
+
var _res6;
|
|
2014
2079
|
var fullUrl, res, resData;
|
|
2015
|
-
return _regeneratorRuntime.wrap(function
|
|
2016
|
-
while (1) switch (
|
|
2080
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context15) {
|
|
2081
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
2017
2082
|
case 0:
|
|
2018
2083
|
fullUrl = new URL(this.basketService + '/baskets/uniqueDivaNr');
|
|
2019
|
-
|
|
2020
|
-
|
|
2084
|
+
_context15.prev = 1;
|
|
2085
|
+
_context15.next = 4;
|
|
2021
2086
|
return axios.get(fullUrl.toString(), {
|
|
2022
2087
|
headers: _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
|
|
2023
2088
|
'Content-Type': 'application/json'
|
|
2024
2089
|
})
|
|
2025
2090
|
});
|
|
2026
2091
|
case 4:
|
|
2027
|
-
res =
|
|
2028
|
-
|
|
2092
|
+
res = _context15.sent;
|
|
2093
|
+
_context15.next = 7;
|
|
2029
2094
|
return res.data;
|
|
2030
2095
|
case 7:
|
|
2031
|
-
resData =
|
|
2032
|
-
|
|
2096
|
+
resData = _context15.sent;
|
|
2097
|
+
_context15.next = 13;
|
|
2033
2098
|
break;
|
|
2034
2099
|
case 10:
|
|
2035
|
-
|
|
2036
|
-
|
|
2100
|
+
_context15.prev = 10;
|
|
2101
|
+
_context15.t0 = _context15["catch"](1);
|
|
2037
2102
|
throw new Error('Error on activate product', {
|
|
2038
|
-
cause:
|
|
2103
|
+
cause: _context15.t0
|
|
2039
2104
|
});
|
|
2040
2105
|
case 13:
|
|
2041
|
-
if (!(((
|
|
2042
|
-
|
|
2106
|
+
if (!(((_res6 = res) === null || _res6 === void 0 ? void 0 : _res6.status) == 200)) {
|
|
2107
|
+
_context15.next = 15;
|
|
2043
2108
|
break;
|
|
2044
2109
|
}
|
|
2045
|
-
return
|
|
2110
|
+
return _context15.abrupt("return", resData.divaNr);
|
|
2046
2111
|
case 15:
|
|
2047
2112
|
throw new Error(resData.error);
|
|
2048
2113
|
case 16:
|
|
2049
2114
|
case "end":
|
|
2050
|
-
return
|
|
2115
|
+
return _context15.stop();
|
|
2051
2116
|
}
|
|
2052
|
-
},
|
|
2117
|
+
}, _callee13, this, [[1, 10]]);
|
|
2053
2118
|
}));
|
|
2054
2119
|
function apiGetUniqueDivaNr() {
|
|
2055
2120
|
return _apiGetUniqueDivaNr.apply(this, arguments);
|
|
@@ -2059,10 +2124,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2059
2124
|
}, {
|
|
2060
2125
|
key: "apiLoadProductVariantsGrouped",
|
|
2061
2126
|
value: function () {
|
|
2062
|
-
var _apiLoadProductVariantsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2127
|
+
var _apiLoadProductVariantsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(_ref45) {
|
|
2063
2128
|
var limit, skip, fields, _ref45$search, search, sort, favorites, abortController, fullUrl, headers, promise;
|
|
2064
|
-
return _regeneratorRuntime.wrap(function
|
|
2065
|
-
while (1) switch (
|
|
2129
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context16) {
|
|
2130
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
2066
2131
|
case 0:
|
|
2067
2132
|
limit = _ref45.limit, skip = _ref45.skip, fields = _ref45.fields, _ref45$search = _ref45.search, search = _ref45$search === void 0 ? [] : _ref45$search, sort = _ref45.sort, favorites = _ref45.favorites, abortController = _ref45.abortController;
|
|
2068
2133
|
fullUrl = this.catalogService + '/v1/products/groups' + '?organizationId=' + this.organization._id + (this._organization.parentOrganizationIds ? '&parentOrganizationIds=' + this._organization.parentOrganizationIds.join(',') : '') + (limit ? '&limit=' + limit : '') + (skip ? '&skip=' + skip : '') + (fields ? '&fileds=' + DivaUtils.fixedEncodeURIComponent('{' + fields.join(',') + '}') : '') + (search.length ? '&search=' + DivaUtils.fixedEncodeURIComponent(this.parseFilter(search)) : '') + (sort ? '&sort=' + DivaUtils.fixedEncodeURIComponent(sort) : '') + (favorites ? '&favorites=true' : '');
|
|
@@ -2086,17 +2151,17 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2086
2151
|
reject('Error loading products grouped by variants: ' + error.message);
|
|
2087
2152
|
});
|
|
2088
2153
|
});
|
|
2089
|
-
|
|
2154
|
+
_context16.next = 7;
|
|
2090
2155
|
return promise;
|
|
2091
2156
|
case 7:
|
|
2092
|
-
return
|
|
2157
|
+
return _context16.abrupt("return", _context16.sent);
|
|
2093
2158
|
case 8:
|
|
2094
2159
|
case "end":
|
|
2095
|
-
return
|
|
2160
|
+
return _context16.stop();
|
|
2096
2161
|
}
|
|
2097
|
-
},
|
|
2162
|
+
}, _callee14, this);
|
|
2098
2163
|
}));
|
|
2099
|
-
function apiLoadProductVariantsGrouped(
|
|
2164
|
+
function apiLoadProductVariantsGrouped(_x21) {
|
|
2100
2165
|
return _apiLoadProductVariantsGrouped.apply(this, arguments);
|
|
2101
2166
|
}
|
|
2102
2167
|
return apiLoadProductVariantsGrouped;
|
|
@@ -2104,11 +2169,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2104
2169
|
}, {
|
|
2105
2170
|
key: "apiSaveProducts",
|
|
2106
2171
|
value: function () {
|
|
2107
|
-
var _apiSaveProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2172
|
+
var _apiSaveProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(serverUrl, jwt, products, awaitPDF, removedProductIds) {
|
|
2108
2173
|
var _this$openModal3, _this$t3;
|
|
2109
2174
|
var fullUrl, response, status, BATCH_SIZE, productsPackages, groupIndex, baseProduct, i, _productsPackages$gro, _productsPackages$gro2, responseProducts, timeItTook, _i2, _this$openModal4, _this$t4, startTime, endTime, estTime, _loop3, j;
|
|
2110
|
-
return _regeneratorRuntime.wrap(function
|
|
2111
|
-
while (1) switch (
|
|
2175
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context18) {
|
|
2176
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
2112
2177
|
case 0:
|
|
2113
2178
|
fullUrl = serverUrl + '/v1/products/groups';
|
|
2114
2179
|
BATCH_SIZE = 10;
|
|
@@ -2117,22 +2182,22 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2117
2182
|
i = 0;
|
|
2118
2183
|
case 5:
|
|
2119
2184
|
if (!(i < products.length)) {
|
|
2120
|
-
|
|
2185
|
+
_context18.next = 15;
|
|
2121
2186
|
break;
|
|
2122
2187
|
}
|
|
2123
2188
|
if (!products[i].baseProduct) {
|
|
2124
|
-
|
|
2189
|
+
_context18.next = 9;
|
|
2125
2190
|
break;
|
|
2126
2191
|
}
|
|
2127
2192
|
baseProduct = products[i];
|
|
2128
|
-
return
|
|
2193
|
+
return _context18.abrupt("continue", 12);
|
|
2129
2194
|
case 9:
|
|
2130
2195
|
if (BATCH_SIZE < ((_productsPackages$gro = (_productsPackages$gro2 = productsPackages[groupIndex]) === null || _productsPackages$gro2 === void 0 ? void 0 : _productsPackages$gro2.length) !== null && _productsPackages$gro !== void 0 ? _productsPackages$gro : 0)) groupIndex++;
|
|
2131
2196
|
if (!productsPackages[groupIndex]) productsPackages[groupIndex] = [];
|
|
2132
2197
|
productsPackages[groupIndex].push(products[i]);
|
|
2133
2198
|
case 12:
|
|
2134
2199
|
i++;
|
|
2135
|
-
|
|
2200
|
+
_context18.next = 5;
|
|
2136
2201
|
break;
|
|
2137
2202
|
case 15:
|
|
2138
2203
|
responseProducts = [];
|
|
@@ -2145,13 +2210,13 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2145
2210
|
_i2 = 0;
|
|
2146
2211
|
case 19:
|
|
2147
2212
|
if (!(_i2 < productsPackages.length)) {
|
|
2148
|
-
|
|
2213
|
+
_context18.next = 47;
|
|
2149
2214
|
break;
|
|
2150
2215
|
}
|
|
2151
2216
|
if (baseProduct && _i2 == 0) productsPackages[_i2].unshift(baseProduct);
|
|
2152
2217
|
startTime = Date.now();
|
|
2153
|
-
|
|
2154
|
-
|
|
2218
|
+
_context18.prev = 22;
|
|
2219
|
+
_context18.next = 25;
|
|
2155
2220
|
return fetch(fullUrl, {
|
|
2156
2221
|
method: 'PUT',
|
|
2157
2222
|
headers: {
|
|
@@ -2171,18 +2236,18 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2171
2236
|
return res.json();
|
|
2172
2237
|
});
|
|
2173
2238
|
case 25:
|
|
2174
|
-
response =
|
|
2239
|
+
response = _context18.sent;
|
|
2175
2240
|
if (!response.Error) {
|
|
2176
|
-
|
|
2241
|
+
_context18.next = 28;
|
|
2177
2242
|
break;
|
|
2178
2243
|
}
|
|
2179
2244
|
throw new Error('Error saving Basket and Products. serverError: ' + response.Error);
|
|
2180
2245
|
case 28:
|
|
2181
|
-
|
|
2246
|
+
_context18.next = 33;
|
|
2182
2247
|
break;
|
|
2183
2248
|
case 30:
|
|
2184
|
-
|
|
2185
|
-
|
|
2249
|
+
_context18.prev = 30;
|
|
2250
|
+
_context18.t0 = _context18["catch"](22);
|
|
2186
2251
|
throw Error(status);
|
|
2187
2252
|
case 33:
|
|
2188
2253
|
endTime = Date.now();
|
|
@@ -2196,8 +2261,8 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2196
2261
|
dontRenderForm: true
|
|
2197
2262
|
});
|
|
2198
2263
|
_loop3 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop3(j) {
|
|
2199
|
-
return _regeneratorRuntime.wrap(function _loop3$(
|
|
2200
|
-
while (1) switch (
|
|
2264
|
+
return _regeneratorRuntime.wrap(function _loop3$(_context17) {
|
|
2265
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
2201
2266
|
case 0:
|
|
2202
2267
|
if (response.products[j].baseProduct) baseProduct = response.products[j];
|
|
2203
2268
|
if (!responseProducts.find(function (p) {
|
|
@@ -2207,34 +2272,34 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2207
2272
|
}
|
|
2208
2273
|
case 2:
|
|
2209
2274
|
case "end":
|
|
2210
|
-
return
|
|
2275
|
+
return _context17.stop();
|
|
2211
2276
|
}
|
|
2212
2277
|
}, _loop3);
|
|
2213
2278
|
});
|
|
2214
2279
|
j = 0;
|
|
2215
2280
|
case 39:
|
|
2216
2281
|
if (!(j < response.products.length)) {
|
|
2217
|
-
|
|
2282
|
+
_context18.next = 44;
|
|
2218
2283
|
break;
|
|
2219
2284
|
}
|
|
2220
|
-
return
|
|
2285
|
+
return _context18.delegateYield(_loop3(j), "t1", 41);
|
|
2221
2286
|
case 41:
|
|
2222
2287
|
j++;
|
|
2223
|
-
|
|
2288
|
+
_context18.next = 39;
|
|
2224
2289
|
break;
|
|
2225
2290
|
case 44:
|
|
2226
2291
|
_i2++;
|
|
2227
|
-
|
|
2292
|
+
_context18.next = 19;
|
|
2228
2293
|
break;
|
|
2229
2294
|
case 47:
|
|
2230
|
-
return
|
|
2295
|
+
return _context18.abrupt("return", responseProducts);
|
|
2231
2296
|
case 48:
|
|
2232
2297
|
case "end":
|
|
2233
|
-
return
|
|
2298
|
+
return _context18.stop();
|
|
2234
2299
|
}
|
|
2235
|
-
},
|
|
2300
|
+
}, _callee15, this, [[22, 30]]);
|
|
2236
2301
|
}));
|
|
2237
|
-
function apiSaveProducts(
|
|
2302
|
+
function apiSaveProducts(_x22, _x23, _x24, _x25, _x26) {
|
|
2238
2303
|
return _apiSaveProducts.apply(this, arguments);
|
|
2239
2304
|
}
|
|
2240
2305
|
return apiSaveProducts;
|
|
@@ -2254,14 +2319,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2254
2319
|
filter.push("+[".concat(groups[key].filter(function (f) {
|
|
2255
2320
|
return f.or;
|
|
2256
2321
|
}).map(function (f) {
|
|
2257
|
-
return "{".concat(f.id, ",").concat(f.op, ",").concat(typeof f.value == 'string' ? "\"".concat(f.value, "\"") : f.value, "}");
|
|
2322
|
+
return "{".concat(f.id, ",").concat(f.op, ",").concat(typeof f.value == 'string' && !f.value.includes(',') ? "\"".concat(f.value, "\"") : f.value, "}");
|
|
2258
2323
|
}).join(), "]"));
|
|
2259
2324
|
}
|
|
2260
2325
|
}
|
|
2261
2326
|
filters.filter(function (f) {
|
|
2262
2327
|
return !f.or;
|
|
2263
2328
|
}).forEach(function (f) {
|
|
2264
|
-
return filter.push("{".concat(f.id, ",").concat(f.op, ",").concat(typeof f.value == 'string' ? "\"".concat(f.value, "\"") : f.value, "}"));
|
|
2329
|
+
return filter.push("{".concat(f.id, ",").concat(f.op, ",").concat(typeof f.value == 'string' && !f.value.includes(',') ? "\"".concat(f.value, "\"") : f.value, "}"));
|
|
2265
2330
|
});
|
|
2266
2331
|
}
|
|
2267
2332
|
return "[".concat(filter.join(), "]");
|
|
@@ -2459,10 +2524,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2459
2524
|
}, {
|
|
2460
2525
|
key: "loadSelectOptions",
|
|
2461
2526
|
value: function () {
|
|
2462
|
-
var _loadSelectOptions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2527
|
+
var _loadSelectOptions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee16(sessionGuid, dataSource, additionalFilter) {
|
|
2463
2528
|
var values, apiUrl, i, apiResult, _i3, value, text;
|
|
2464
|
-
return _regeneratorRuntime.wrap(function
|
|
2465
|
-
while (1) switch (
|
|
2529
|
+
return _regeneratorRuntime.wrap(function _callee16$(_context19) {
|
|
2530
|
+
while (1) switch (_context19.prev = _context19.next) {
|
|
2466
2531
|
case 0:
|
|
2467
2532
|
values = [];
|
|
2468
2533
|
apiUrl = dataSource.url;
|
|
@@ -2471,7 +2536,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2471
2536
|
apiUrl += '&' + additionalFilter[i].key + '=' + additionalFilter[i].value;
|
|
2472
2537
|
}
|
|
2473
2538
|
}
|
|
2474
|
-
|
|
2539
|
+
_context19.next = 5;
|
|
2475
2540
|
return fetch(apiUrl, {
|
|
2476
2541
|
headers: {
|
|
2477
2542
|
sessionGuid: sessionGuid
|
|
@@ -2483,7 +2548,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2483
2548
|
return res.json();
|
|
2484
2549
|
});
|
|
2485
2550
|
case 5:
|
|
2486
|
-
apiResult =
|
|
2551
|
+
apiResult = _context19.sent;
|
|
2487
2552
|
if (dataSource.useKey) {
|
|
2488
2553
|
apiResult = apiResult[dataSource.useKey];
|
|
2489
2554
|
}
|
|
@@ -2495,14 +2560,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2495
2560
|
text: text
|
|
2496
2561
|
});
|
|
2497
2562
|
}
|
|
2498
|
-
return
|
|
2563
|
+
return _context19.abrupt("return", values);
|
|
2499
2564
|
case 9:
|
|
2500
2565
|
case "end":
|
|
2501
|
-
return
|
|
2566
|
+
return _context19.stop();
|
|
2502
2567
|
}
|
|
2503
|
-
},
|
|
2568
|
+
}, _callee16);
|
|
2504
2569
|
}));
|
|
2505
|
-
function loadSelectOptions(
|
|
2570
|
+
function loadSelectOptions(_x27, _x28, _x29) {
|
|
2506
2571
|
return _loadSelectOptions.apply(this, arguments);
|
|
2507
2572
|
}
|
|
2508
2573
|
return loadSelectOptions;
|
|
@@ -240,6 +240,11 @@ export declare class ProductHandlerAbstract {
|
|
|
240
240
|
}[], limit?: number, useFilter?: boolean, hierarchy?: boolean): Promise<{
|
|
241
241
|
data: any[];
|
|
242
242
|
}>;
|
|
243
|
+
apiGetProductByQuery(filter: {
|
|
244
|
+
id: string;
|
|
245
|
+
op: string;
|
|
246
|
+
value: string | number | boolean;
|
|
247
|
+
}[], limit?: number, useFilter?: boolean): Promise<any>;
|
|
243
248
|
apiMarkAsFavorite(id: string, organizationId: string): Promise<void>;
|
|
244
249
|
apiGetUniqueDivaNr(): Promise<any>;
|
|
245
250
|
static loadSelectOptions(sessionGuid: string, dataSource: DataSourceApi, additionalFilter?: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAoB,aAAa,EAAE,6BAA6B,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAIpJ,OAAO,EACL,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,KAAK,EACL,iBAAiB,EACjB,aAAa,EACb,aAAa,EAEb,mBAAmB,EACnB,KAAK,EACL,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,cAAc,SAAS,C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,CAAC,mBAAmB,CAAC,IAAI,EAAE,GAAG,EAAE;IAOtC,MAAM,CAAC,iCAAiC,CAAC,UAAU,EAAE,6BAA6B,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE;IAyBpH,MAAM,CAAC,qBAAqB,EAAE,cAAc,EAAE,CAa5C;IAEF,MAAM,CAAC,sBAAsB,EAAE,cAAc,EAAE,CAiE7C;IAEF,MAAM,CAAC,cAAc,EAAE,cAAc,EAAE,CAAsG;IAE7I,MAAM,CAAC,wBAAwB,EAAE,cAAc,EAAE,CAI/C;CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crystaldesign/product-handler",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.8.0-beta.10",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@crystaldesign/basket-model": "*",
|
|
6
6
|
"@crystaldesign/diva-utils": "*"
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"classnames": "^2.5.1"
|
|
14
14
|
},
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "72f0eae11ba09885de9b2ff2f10054cea54754aa"
|
|
16
16
|
}
|