@crystaldesign/product-handler 24.16.0-beta.3 → 24.16.0-beta.5
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
|
@@ -172,8 +172,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
172
172
|
createdState = _context.sent;
|
|
173
173
|
createdState.baseData.shortDescription = (_basket$ProductSetNam = basket.ProductSetName) !== null && _basket$ProductSetNam !== void 0 ? _basket$ProductSetNam : basket.SetName;
|
|
174
174
|
createdState.baseData.shortDescription_locales = basket.SetName_locales;
|
|
175
|
-
|
|
176
|
-
_context.next = 9;
|
|
175
|
+
_context.next = 8;
|
|
177
176
|
return this.prepareData({
|
|
178
177
|
basket: basket,
|
|
179
178
|
baseData: createdState.baseData,
|
|
@@ -181,13 +180,13 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
181
180
|
variantData: createdState.variantData,
|
|
182
181
|
oldClassificationData: createdState.oldClassificationData
|
|
183
182
|
});
|
|
184
|
-
case
|
|
183
|
+
case 8:
|
|
185
184
|
data = _context.sent;
|
|
186
|
-
_context.next =
|
|
185
|
+
_context.next = 11;
|
|
187
186
|
return this.saveProducts(_objectSpread({}, data));
|
|
188
|
-
case
|
|
187
|
+
case 11:
|
|
189
188
|
return _context.abrupt("return", _context.sent);
|
|
190
|
-
case
|
|
189
|
+
case 12:
|
|
191
190
|
case "end":
|
|
192
191
|
return _context.stop();
|
|
193
192
|
}
|
|
@@ -2057,78 +2056,13 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2057
2056
|
}
|
|
2058
2057
|
return apiGetUniqueDivaNr;
|
|
2059
2058
|
}()
|
|
2060
|
-
}, {
|
|
2061
|
-
key: "apiDeleteProducts",
|
|
2062
|
-
value: function () {
|
|
2063
|
-
var _apiDeleteProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(products) {
|
|
2064
|
-
var fullUrl, headers, productsInChunks, i, _this$openModal3, _this$t3, promises;
|
|
2065
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context15) {
|
|
2066
|
-
while (1) switch (_context15.prev = _context15.next) {
|
|
2067
|
-
case 0:
|
|
2068
|
-
fullUrl = this.catalogService + '/products';
|
|
2069
|
-
fullUrl = "".concat(fullUrl, "?organizationId=").concat(this.organization._id);
|
|
2070
|
-
headers = _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
|
|
2071
|
-
'Content-Type': 'application/json'
|
|
2072
|
-
});
|
|
2073
|
-
productsInChunks = this.splitArrayIntoChunks(products, 5);
|
|
2074
|
-
i = 0;
|
|
2075
|
-
case 5:
|
|
2076
|
-
if (!(i < productsInChunks.length)) {
|
|
2077
|
-
_context15.next = 13;
|
|
2078
|
-
break;
|
|
2079
|
-
}
|
|
2080
|
-
promises = productsInChunks[i].map(function (p) {
|
|
2081
|
-
return new Promise(function (resolve, reject) {
|
|
2082
|
-
axios__default["default"]["delete"]("".concat(fullUrl, "&id=").concat(p), {
|
|
2083
|
-
headers: headers
|
|
2084
|
-
}).then(function (result) {
|
|
2085
|
-
resolve(result.data);
|
|
2086
|
-
})["catch"](function (error) {
|
|
2087
|
-
if (error.response) {
|
|
2088
|
-
reject('Could not delete product: ' + error.response.data.error);
|
|
2089
|
-
}
|
|
2090
|
-
reject('Could not delete product: ' + error.message);
|
|
2091
|
-
});
|
|
2092
|
-
});
|
|
2093
|
-
});
|
|
2094
|
-
(_this$openModal3 = this.openModal) === null || _this$openModal3 === void 0 || _this$openModal3.call(this, {
|
|
2095
|
-
progress: i / productsInChunks.length / 6 + 4 / 6,
|
|
2096
|
-
title: (_this$t3 = this.t) === null || _this$t3 === void 0 ? void 0 : _this$t3.call(this, 'productcreator.delete_old_products'),
|
|
2097
|
-
dontRenderForm: true
|
|
2098
|
-
});
|
|
2099
|
-
_context15.next = 10;
|
|
2100
|
-
return Promise.all(promises);
|
|
2101
|
-
case 10:
|
|
2102
|
-
i++;
|
|
2103
|
-
_context15.next = 5;
|
|
2104
|
-
break;
|
|
2105
|
-
case 13:
|
|
2106
|
-
case "end":
|
|
2107
|
-
return _context15.stop();
|
|
2108
|
-
}
|
|
2109
|
-
}, _callee13, this);
|
|
2110
|
-
}));
|
|
2111
|
-
function apiDeleteProducts(_x20) {
|
|
2112
|
-
return _apiDeleteProducts.apply(this, arguments);
|
|
2113
|
-
}
|
|
2114
|
-
return apiDeleteProducts;
|
|
2115
|
-
}()
|
|
2116
|
-
}, {
|
|
2117
|
-
key: "splitArrayIntoChunks",
|
|
2118
|
-
value: function splitArrayIntoChunks(array, chunkSize) {
|
|
2119
|
-
var newChunks = [];
|
|
2120
|
-
for (var i = 0; i < array.length; i += chunkSize) {
|
|
2121
|
-
newChunks.push(array.slice(i, i + chunkSize));
|
|
2122
|
-
}
|
|
2123
|
-
return newChunks;
|
|
2124
|
-
}
|
|
2125
2059
|
}, {
|
|
2126
2060
|
key: "apiLoadProductVariantsGrouped",
|
|
2127
2061
|
value: function () {
|
|
2128
|
-
var _apiLoadProductVariantsGrouped = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2062
|
+
var _apiLoadProductVariantsGrouped = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee13(_ref45) {
|
|
2129
2063
|
var limit, skip, fields, _ref45$search, search, sort, favorites, abortController, fullUrl, headers, promise;
|
|
2130
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
2131
|
-
while (1) switch (
|
|
2064
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee13$(_context15) {
|
|
2065
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
2132
2066
|
case 0:
|
|
2133
2067
|
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;
|
|
2134
2068
|
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' : '');
|
|
@@ -2152,17 +2086,17 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2152
2086
|
reject('Error loading products grouped by variants: ' + error.message);
|
|
2153
2087
|
});
|
|
2154
2088
|
});
|
|
2155
|
-
|
|
2089
|
+
_context15.next = 7;
|
|
2156
2090
|
return promise;
|
|
2157
2091
|
case 7:
|
|
2158
|
-
return
|
|
2092
|
+
return _context15.abrupt("return", _context15.sent);
|
|
2159
2093
|
case 8:
|
|
2160
2094
|
case "end":
|
|
2161
|
-
return
|
|
2095
|
+
return _context15.stop();
|
|
2162
2096
|
}
|
|
2163
|
-
},
|
|
2097
|
+
}, _callee13, this);
|
|
2164
2098
|
}));
|
|
2165
|
-
function apiLoadProductVariantsGrouped(
|
|
2099
|
+
function apiLoadProductVariantsGrouped(_x20) {
|
|
2166
2100
|
return _apiLoadProductVariantsGrouped.apply(this, arguments);
|
|
2167
2101
|
}
|
|
2168
2102
|
return apiLoadProductVariantsGrouped;
|
|
@@ -2170,10 +2104,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2170
2104
|
}, {
|
|
2171
2105
|
key: "apiSaveProducts",
|
|
2172
2106
|
value: function () {
|
|
2173
|
-
var _apiSaveProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2174
|
-
var
|
|
2175
|
-
|
|
2176
|
-
|
|
2107
|
+
var _apiSaveProducts = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee14(serverUrl, jwt, products, awaitPDF, removedProductIds) {
|
|
2108
|
+
var _this$openModal3, _this$t3;
|
|
2109
|
+
var fullUrl, response, status, BATCH_SIZE, productsPackages, groupIndex, baseProduct, i, _productsPackages$gro, _productsPackages$gro2, responseProducts, timeItTook, _i2, _this$openModal4, _this$t4, startTime, endTime, estTime, totalEstimatedTime, _loop3, j;
|
|
2110
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee14$(_context17) {
|
|
2111
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
2177
2112
|
case 0:
|
|
2178
2113
|
fullUrl = serverUrl + '/v1/products/groups';
|
|
2179
2114
|
BATCH_SIZE = 10;
|
|
@@ -2182,34 +2117,43 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2182
2117
|
i = 0;
|
|
2183
2118
|
case 5:
|
|
2184
2119
|
if (!(i < products.length)) {
|
|
2185
|
-
|
|
2120
|
+
_context17.next = 15;
|
|
2186
2121
|
break;
|
|
2187
2122
|
}
|
|
2188
2123
|
if (!products[i].baseProduct) {
|
|
2189
|
-
|
|
2124
|
+
_context17.next = 9;
|
|
2190
2125
|
break;
|
|
2191
2126
|
}
|
|
2192
2127
|
baseProduct = products[i];
|
|
2193
|
-
return
|
|
2128
|
+
return _context17.abrupt("continue", 12);
|
|
2194
2129
|
case 9:
|
|
2195
2130
|
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++;
|
|
2196
2131
|
if (!productsPackages[groupIndex]) productsPackages[groupIndex] = [];
|
|
2197
2132
|
productsPackages[groupIndex].push(products[i]);
|
|
2198
2133
|
case 12:
|
|
2199
2134
|
i++;
|
|
2200
|
-
|
|
2135
|
+
_context17.next = 5;
|
|
2201
2136
|
break;
|
|
2202
2137
|
case 15:
|
|
2203
2138
|
responseProducts = [];
|
|
2139
|
+
(_this$openModal3 = this.openModal) === null || _this$openModal3 === void 0 || _this$openModal3.call(this, {
|
|
2140
|
+
progress: 4 / 6,
|
|
2141
|
+
title: (_this$t3 = this.t) === null || _this$t3 === void 0 ? void 0 : _this$t3.call(this, 'productcreator.est_saving_time', {
|
|
2142
|
+
totalEstimatedTime: '...'
|
|
2143
|
+
}),
|
|
2144
|
+
dontRenderForm: true
|
|
2145
|
+
});
|
|
2146
|
+
timeItTook = [];
|
|
2204
2147
|
_i2 = 0;
|
|
2205
|
-
case
|
|
2148
|
+
case 19:
|
|
2206
2149
|
if (!(_i2 < productsPackages.length)) {
|
|
2207
|
-
|
|
2150
|
+
_context17.next = 48;
|
|
2208
2151
|
break;
|
|
2209
2152
|
}
|
|
2210
2153
|
if (baseProduct && _i2 == 0) productsPackages[_i2].unshift(baseProduct);
|
|
2211
|
-
|
|
2212
|
-
|
|
2154
|
+
startTime = Date.now();
|
|
2155
|
+
_context17.prev = 22;
|
|
2156
|
+
_context17.next = 25;
|
|
2213
2157
|
return fetch(fullUrl, {
|
|
2214
2158
|
method: 'PUT',
|
|
2215
2159
|
headers: {
|
|
@@ -2228,24 +2172,35 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2228
2172
|
}
|
|
2229
2173
|
return res.json();
|
|
2230
2174
|
});
|
|
2231
|
-
case
|
|
2232
|
-
response =
|
|
2175
|
+
case 25:
|
|
2176
|
+
response = _context17.sent;
|
|
2233
2177
|
if (!response.Error) {
|
|
2234
|
-
|
|
2178
|
+
_context17.next = 28;
|
|
2235
2179
|
break;
|
|
2236
2180
|
}
|
|
2237
2181
|
throw new Error('Error saving Basket and Products. serverError: ' + response.Error);
|
|
2238
|
-
case
|
|
2239
|
-
|
|
2182
|
+
case 28:
|
|
2183
|
+
_context17.next = 33;
|
|
2240
2184
|
break;
|
|
2241
|
-
case 27:
|
|
2242
|
-
_context18.prev = 27;
|
|
2243
|
-
_context18.t0 = _context18["catch"](19);
|
|
2244
|
-
throw Error(status);
|
|
2245
2185
|
case 30:
|
|
2186
|
+
_context17.prev = 30;
|
|
2187
|
+
_context17.t0 = _context17["catch"](22);
|
|
2188
|
+
throw Error(status);
|
|
2189
|
+
case 33:
|
|
2190
|
+
endTime = Date.now();
|
|
2191
|
+
timeItTook.push(Math.round((startTime - endTime) / 1000));
|
|
2192
|
+
estTime = Math.round(DivaUtils__default["default"].getAverage(timeItTook)) * (_i2 - productsPackages.length);
|
|
2193
|
+
totalEstimatedTime = Math.round(estTime / 60) + 'min, ' + estTime % 60 + 's ';
|
|
2194
|
+
(_this$openModal4 = this.openModal) === null || _this$openModal4 === void 0 || _this$openModal4.call(this, {
|
|
2195
|
+
progress: _i2 / productsPackages.length / 3 + 4 / 6,
|
|
2196
|
+
title: (_this$t4 = this.t) === null || _this$t4 === void 0 ? void 0 : _this$t4.call(this, 'productcreator.est_saving_time', {
|
|
2197
|
+
totalEstimatedTime: totalEstimatedTime
|
|
2198
|
+
}),
|
|
2199
|
+
dontRenderForm: true
|
|
2200
|
+
});
|
|
2246
2201
|
_loop3 = /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _loop3(j) {
|
|
2247
|
-
return _regeneratorRuntime__default["default"].wrap(function _loop3$(
|
|
2248
|
-
while (1) switch (
|
|
2202
|
+
return _regeneratorRuntime__default["default"].wrap(function _loop3$(_context16) {
|
|
2203
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
2249
2204
|
case 0:
|
|
2250
2205
|
if (response.products[j].baseProduct) baseProduct = response.products[j];
|
|
2251
2206
|
if (!responseProducts.find(function (p) {
|
|
@@ -2255,34 +2210,34 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2255
2210
|
}
|
|
2256
2211
|
case 2:
|
|
2257
2212
|
case "end":
|
|
2258
|
-
return
|
|
2213
|
+
return _context16.stop();
|
|
2259
2214
|
}
|
|
2260
2215
|
}, _loop3);
|
|
2261
2216
|
});
|
|
2262
2217
|
j = 0;
|
|
2263
|
-
case
|
|
2218
|
+
case 40:
|
|
2264
2219
|
if (!(j < response.products.length)) {
|
|
2265
|
-
|
|
2220
|
+
_context17.next = 45;
|
|
2266
2221
|
break;
|
|
2267
2222
|
}
|
|
2268
|
-
return
|
|
2269
|
-
case
|
|
2223
|
+
return _context17.delegateYield(_loop3(j), "t1", 42);
|
|
2224
|
+
case 42:
|
|
2270
2225
|
j++;
|
|
2271
|
-
|
|
2226
|
+
_context17.next = 40;
|
|
2272
2227
|
break;
|
|
2273
|
-
case
|
|
2228
|
+
case 45:
|
|
2274
2229
|
_i2++;
|
|
2275
|
-
|
|
2230
|
+
_context17.next = 19;
|
|
2276
2231
|
break;
|
|
2277
|
-
case
|
|
2278
|
-
return
|
|
2279
|
-
case
|
|
2232
|
+
case 48:
|
|
2233
|
+
return _context17.abrupt("return", responseProducts);
|
|
2234
|
+
case 49:
|
|
2280
2235
|
case "end":
|
|
2281
|
-
return
|
|
2236
|
+
return _context17.stop();
|
|
2282
2237
|
}
|
|
2283
|
-
},
|
|
2238
|
+
}, _callee14, this, [[22, 30]]);
|
|
2284
2239
|
}));
|
|
2285
|
-
function apiSaveProducts(_x22, _x23, _x24, _x25
|
|
2240
|
+
function apiSaveProducts(_x21, _x22, _x23, _x24, _x25) {
|
|
2286
2241
|
return _apiSaveProducts.apply(this, arguments);
|
|
2287
2242
|
}
|
|
2288
2243
|
return apiSaveProducts;
|
|
@@ -2507,10 +2462,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2507
2462
|
}, {
|
|
2508
2463
|
key: "loadSelectOptions",
|
|
2509
2464
|
value: function () {
|
|
2510
|
-
var _loadSelectOptions = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function
|
|
2465
|
+
var _loadSelectOptions = _asyncToGenerator__default["default"](/*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee15(sessionGuid, dataSource, additionalFilter) {
|
|
2511
2466
|
var values, apiUrl, i, apiResult, _i3, value, text;
|
|
2512
|
-
return _regeneratorRuntime__default["default"].wrap(function
|
|
2513
|
-
while (1) switch (
|
|
2467
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee15$(_context18) {
|
|
2468
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
2514
2469
|
case 0:
|
|
2515
2470
|
values = [];
|
|
2516
2471
|
apiUrl = dataSource.url;
|
|
@@ -2519,7 +2474,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2519
2474
|
apiUrl += '&' + additionalFilter[i].key + '=' + additionalFilter[i].value;
|
|
2520
2475
|
}
|
|
2521
2476
|
}
|
|
2522
|
-
|
|
2477
|
+
_context18.next = 5;
|
|
2523
2478
|
return fetch(apiUrl, {
|
|
2524
2479
|
headers: {
|
|
2525
2480
|
sessionGuid: sessionGuid
|
|
@@ -2531,7 +2486,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2531
2486
|
return res.json();
|
|
2532
2487
|
});
|
|
2533
2488
|
case 5:
|
|
2534
|
-
apiResult =
|
|
2489
|
+
apiResult = _context18.sent;
|
|
2535
2490
|
if (dataSource.useKey) {
|
|
2536
2491
|
apiResult = apiResult[dataSource.useKey];
|
|
2537
2492
|
}
|
|
@@ -2543,14 +2498,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2543
2498
|
text: text
|
|
2544
2499
|
});
|
|
2545
2500
|
}
|
|
2546
|
-
return
|
|
2501
|
+
return _context18.abrupt("return", values);
|
|
2547
2502
|
case 9:
|
|
2548
2503
|
case "end":
|
|
2549
|
-
return
|
|
2504
|
+
return _context18.stop();
|
|
2550
2505
|
}
|
|
2551
|
-
},
|
|
2506
|
+
}, _callee15);
|
|
2552
2507
|
}));
|
|
2553
|
-
function loadSelectOptions(_x27, _x28
|
|
2508
|
+
function loadSelectOptions(_x26, _x27, _x28) {
|
|
2554
2509
|
return _loadSelectOptions.apply(this, arguments);
|
|
2555
2510
|
}
|
|
2556
2511
|
return loadSelectOptions;
|
package/build/esm/index.js
CHANGED
|
@@ -154,8 +154,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
154
154
|
createdState = _context.sent;
|
|
155
155
|
createdState.baseData.shortDescription = (_basket$ProductSetNam = basket.ProductSetName) !== null && _basket$ProductSetNam !== void 0 ? _basket$ProductSetNam : basket.SetName;
|
|
156
156
|
createdState.baseData.shortDescription_locales = basket.SetName_locales;
|
|
157
|
-
|
|
158
|
-
_context.next = 9;
|
|
157
|
+
_context.next = 8;
|
|
159
158
|
return this.prepareData({
|
|
160
159
|
basket: basket,
|
|
161
160
|
baseData: createdState.baseData,
|
|
@@ -163,13 +162,13 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
163
162
|
variantData: createdState.variantData,
|
|
164
163
|
oldClassificationData: createdState.oldClassificationData
|
|
165
164
|
});
|
|
166
|
-
case
|
|
165
|
+
case 8:
|
|
167
166
|
data = _context.sent;
|
|
168
|
-
_context.next =
|
|
167
|
+
_context.next = 11;
|
|
169
168
|
return this.saveProducts(_objectSpread({}, data));
|
|
170
|
-
case
|
|
169
|
+
case 11:
|
|
171
170
|
return _context.abrupt("return", _context.sent);
|
|
172
|
-
case
|
|
171
|
+
case 12:
|
|
173
172
|
case "end":
|
|
174
173
|
return _context.stop();
|
|
175
174
|
}
|
|
@@ -2039,78 +2038,13 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2039
2038
|
}
|
|
2040
2039
|
return apiGetUniqueDivaNr;
|
|
2041
2040
|
}()
|
|
2042
|
-
}, {
|
|
2043
|
-
key: "apiDeleteProducts",
|
|
2044
|
-
value: function () {
|
|
2045
|
-
var _apiDeleteProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(products) {
|
|
2046
|
-
var fullUrl, headers, productsInChunks, i, _this$openModal3, _this$t3, promises;
|
|
2047
|
-
return _regeneratorRuntime.wrap(function _callee13$(_context15) {
|
|
2048
|
-
while (1) switch (_context15.prev = _context15.next) {
|
|
2049
|
-
case 0:
|
|
2050
|
-
fullUrl = this.catalogService + '/products';
|
|
2051
|
-
fullUrl = "".concat(fullUrl, "?organizationId=").concat(this.organization._id);
|
|
2052
|
-
headers = _objectSpread(_objectSpread({}, this.getHeaders()), {}, {
|
|
2053
|
-
'Content-Type': 'application/json'
|
|
2054
|
-
});
|
|
2055
|
-
productsInChunks = this.splitArrayIntoChunks(products, 5);
|
|
2056
|
-
i = 0;
|
|
2057
|
-
case 5:
|
|
2058
|
-
if (!(i < productsInChunks.length)) {
|
|
2059
|
-
_context15.next = 13;
|
|
2060
|
-
break;
|
|
2061
|
-
}
|
|
2062
|
-
promises = productsInChunks[i].map(function (p) {
|
|
2063
|
-
return new Promise(function (resolve, reject) {
|
|
2064
|
-
axios["delete"]("".concat(fullUrl, "&id=").concat(p), {
|
|
2065
|
-
headers: headers
|
|
2066
|
-
}).then(function (result) {
|
|
2067
|
-
resolve(result.data);
|
|
2068
|
-
})["catch"](function (error) {
|
|
2069
|
-
if (error.response) {
|
|
2070
|
-
reject('Could not delete product: ' + error.response.data.error);
|
|
2071
|
-
}
|
|
2072
|
-
reject('Could not delete product: ' + error.message);
|
|
2073
|
-
});
|
|
2074
|
-
});
|
|
2075
|
-
});
|
|
2076
|
-
(_this$openModal3 = this.openModal) === null || _this$openModal3 === void 0 || _this$openModal3.call(this, {
|
|
2077
|
-
progress: i / productsInChunks.length / 6 + 4 / 6,
|
|
2078
|
-
title: (_this$t3 = this.t) === null || _this$t3 === void 0 ? void 0 : _this$t3.call(this, 'productcreator.delete_old_products'),
|
|
2079
|
-
dontRenderForm: true
|
|
2080
|
-
});
|
|
2081
|
-
_context15.next = 10;
|
|
2082
|
-
return Promise.all(promises);
|
|
2083
|
-
case 10:
|
|
2084
|
-
i++;
|
|
2085
|
-
_context15.next = 5;
|
|
2086
|
-
break;
|
|
2087
|
-
case 13:
|
|
2088
|
-
case "end":
|
|
2089
|
-
return _context15.stop();
|
|
2090
|
-
}
|
|
2091
|
-
}, _callee13, this);
|
|
2092
|
-
}));
|
|
2093
|
-
function apiDeleteProducts(_x20) {
|
|
2094
|
-
return _apiDeleteProducts.apply(this, arguments);
|
|
2095
|
-
}
|
|
2096
|
-
return apiDeleteProducts;
|
|
2097
|
-
}()
|
|
2098
|
-
}, {
|
|
2099
|
-
key: "splitArrayIntoChunks",
|
|
2100
|
-
value: function splitArrayIntoChunks(array, chunkSize) {
|
|
2101
|
-
var newChunks = [];
|
|
2102
|
-
for (var i = 0; i < array.length; i += chunkSize) {
|
|
2103
|
-
newChunks.push(array.slice(i, i + chunkSize));
|
|
2104
|
-
}
|
|
2105
|
-
return newChunks;
|
|
2106
|
-
}
|
|
2107
2041
|
}, {
|
|
2108
2042
|
key: "apiLoadProductVariantsGrouped",
|
|
2109
2043
|
value: function () {
|
|
2110
|
-
var _apiLoadProductVariantsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2044
|
+
var _apiLoadProductVariantsGrouped = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref45) {
|
|
2111
2045
|
var limit, skip, fields, _ref45$search, search, sort, favorites, abortController, fullUrl, headers, promise;
|
|
2112
|
-
return _regeneratorRuntime.wrap(function
|
|
2113
|
-
while (1) switch (
|
|
2046
|
+
return _regeneratorRuntime.wrap(function _callee13$(_context15) {
|
|
2047
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
2114
2048
|
case 0:
|
|
2115
2049
|
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;
|
|
2116
2050
|
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' : '');
|
|
@@ -2134,17 +2068,17 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2134
2068
|
reject('Error loading products grouped by variants: ' + error.message);
|
|
2135
2069
|
});
|
|
2136
2070
|
});
|
|
2137
|
-
|
|
2071
|
+
_context15.next = 7;
|
|
2138
2072
|
return promise;
|
|
2139
2073
|
case 7:
|
|
2140
|
-
return
|
|
2074
|
+
return _context15.abrupt("return", _context15.sent);
|
|
2141
2075
|
case 8:
|
|
2142
2076
|
case "end":
|
|
2143
|
-
return
|
|
2077
|
+
return _context15.stop();
|
|
2144
2078
|
}
|
|
2145
|
-
},
|
|
2079
|
+
}, _callee13, this);
|
|
2146
2080
|
}));
|
|
2147
|
-
function apiLoadProductVariantsGrouped(
|
|
2081
|
+
function apiLoadProductVariantsGrouped(_x20) {
|
|
2148
2082
|
return _apiLoadProductVariantsGrouped.apply(this, arguments);
|
|
2149
2083
|
}
|
|
2150
2084
|
return apiLoadProductVariantsGrouped;
|
|
@@ -2152,10 +2086,11 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2152
2086
|
}, {
|
|
2153
2087
|
key: "apiSaveProducts",
|
|
2154
2088
|
value: function () {
|
|
2155
|
-
var _apiSaveProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2156
|
-
var
|
|
2157
|
-
|
|
2158
|
-
|
|
2089
|
+
var _apiSaveProducts = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee14(serverUrl, jwt, products, awaitPDF, removedProductIds) {
|
|
2090
|
+
var _this$openModal3, _this$t3;
|
|
2091
|
+
var fullUrl, response, status, BATCH_SIZE, productsPackages, groupIndex, baseProduct, i, _productsPackages$gro, _productsPackages$gro2, responseProducts, timeItTook, _i2, _this$openModal4, _this$t4, startTime, endTime, estTime, totalEstimatedTime, _loop3, j;
|
|
2092
|
+
return _regeneratorRuntime.wrap(function _callee14$(_context17) {
|
|
2093
|
+
while (1) switch (_context17.prev = _context17.next) {
|
|
2159
2094
|
case 0:
|
|
2160
2095
|
fullUrl = serverUrl + '/v1/products/groups';
|
|
2161
2096
|
BATCH_SIZE = 10;
|
|
@@ -2164,34 +2099,43 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2164
2099
|
i = 0;
|
|
2165
2100
|
case 5:
|
|
2166
2101
|
if (!(i < products.length)) {
|
|
2167
|
-
|
|
2102
|
+
_context17.next = 15;
|
|
2168
2103
|
break;
|
|
2169
2104
|
}
|
|
2170
2105
|
if (!products[i].baseProduct) {
|
|
2171
|
-
|
|
2106
|
+
_context17.next = 9;
|
|
2172
2107
|
break;
|
|
2173
2108
|
}
|
|
2174
2109
|
baseProduct = products[i];
|
|
2175
|
-
return
|
|
2110
|
+
return _context17.abrupt("continue", 12);
|
|
2176
2111
|
case 9:
|
|
2177
2112
|
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++;
|
|
2178
2113
|
if (!productsPackages[groupIndex]) productsPackages[groupIndex] = [];
|
|
2179
2114
|
productsPackages[groupIndex].push(products[i]);
|
|
2180
2115
|
case 12:
|
|
2181
2116
|
i++;
|
|
2182
|
-
|
|
2117
|
+
_context17.next = 5;
|
|
2183
2118
|
break;
|
|
2184
2119
|
case 15:
|
|
2185
2120
|
responseProducts = [];
|
|
2121
|
+
(_this$openModal3 = this.openModal) === null || _this$openModal3 === void 0 || _this$openModal3.call(this, {
|
|
2122
|
+
progress: 4 / 6,
|
|
2123
|
+
title: (_this$t3 = this.t) === null || _this$t3 === void 0 ? void 0 : _this$t3.call(this, 'productcreator.est_saving_time', {
|
|
2124
|
+
totalEstimatedTime: '...'
|
|
2125
|
+
}),
|
|
2126
|
+
dontRenderForm: true
|
|
2127
|
+
});
|
|
2128
|
+
timeItTook = [];
|
|
2186
2129
|
_i2 = 0;
|
|
2187
|
-
case
|
|
2130
|
+
case 19:
|
|
2188
2131
|
if (!(_i2 < productsPackages.length)) {
|
|
2189
|
-
|
|
2132
|
+
_context17.next = 48;
|
|
2190
2133
|
break;
|
|
2191
2134
|
}
|
|
2192
2135
|
if (baseProduct && _i2 == 0) productsPackages[_i2].unshift(baseProduct);
|
|
2193
|
-
|
|
2194
|
-
|
|
2136
|
+
startTime = Date.now();
|
|
2137
|
+
_context17.prev = 22;
|
|
2138
|
+
_context17.next = 25;
|
|
2195
2139
|
return fetch(fullUrl, {
|
|
2196
2140
|
method: 'PUT',
|
|
2197
2141
|
headers: {
|
|
@@ -2210,24 +2154,35 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2210
2154
|
}
|
|
2211
2155
|
return res.json();
|
|
2212
2156
|
});
|
|
2213
|
-
case
|
|
2214
|
-
response =
|
|
2157
|
+
case 25:
|
|
2158
|
+
response = _context17.sent;
|
|
2215
2159
|
if (!response.Error) {
|
|
2216
|
-
|
|
2160
|
+
_context17.next = 28;
|
|
2217
2161
|
break;
|
|
2218
2162
|
}
|
|
2219
2163
|
throw new Error('Error saving Basket and Products. serverError: ' + response.Error);
|
|
2220
|
-
case
|
|
2221
|
-
|
|
2164
|
+
case 28:
|
|
2165
|
+
_context17.next = 33;
|
|
2222
2166
|
break;
|
|
2223
|
-
case 27:
|
|
2224
|
-
_context18.prev = 27;
|
|
2225
|
-
_context18.t0 = _context18["catch"](19);
|
|
2226
|
-
throw Error(status);
|
|
2227
2167
|
case 30:
|
|
2168
|
+
_context17.prev = 30;
|
|
2169
|
+
_context17.t0 = _context17["catch"](22);
|
|
2170
|
+
throw Error(status);
|
|
2171
|
+
case 33:
|
|
2172
|
+
endTime = Date.now();
|
|
2173
|
+
timeItTook.push(Math.round((startTime - endTime) / 1000));
|
|
2174
|
+
estTime = Math.round(DivaUtils.getAverage(timeItTook)) * (_i2 - productsPackages.length);
|
|
2175
|
+
totalEstimatedTime = Math.round(estTime / 60) + 'min, ' + estTime % 60 + 's ';
|
|
2176
|
+
(_this$openModal4 = this.openModal) === null || _this$openModal4 === void 0 || _this$openModal4.call(this, {
|
|
2177
|
+
progress: _i2 / productsPackages.length / 3 + 4 / 6,
|
|
2178
|
+
title: (_this$t4 = this.t) === null || _this$t4 === void 0 ? void 0 : _this$t4.call(this, 'productcreator.est_saving_time', {
|
|
2179
|
+
totalEstimatedTime: totalEstimatedTime
|
|
2180
|
+
}),
|
|
2181
|
+
dontRenderForm: true
|
|
2182
|
+
});
|
|
2228
2183
|
_loop3 = /*#__PURE__*/_regeneratorRuntime.mark(function _loop3(j) {
|
|
2229
|
-
return _regeneratorRuntime.wrap(function _loop3$(
|
|
2230
|
-
while (1) switch (
|
|
2184
|
+
return _regeneratorRuntime.wrap(function _loop3$(_context16) {
|
|
2185
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
2231
2186
|
case 0:
|
|
2232
2187
|
if (response.products[j].baseProduct) baseProduct = response.products[j];
|
|
2233
2188
|
if (!responseProducts.find(function (p) {
|
|
@@ -2237,34 +2192,34 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2237
2192
|
}
|
|
2238
2193
|
case 2:
|
|
2239
2194
|
case "end":
|
|
2240
|
-
return
|
|
2195
|
+
return _context16.stop();
|
|
2241
2196
|
}
|
|
2242
2197
|
}, _loop3);
|
|
2243
2198
|
});
|
|
2244
2199
|
j = 0;
|
|
2245
|
-
case
|
|
2200
|
+
case 40:
|
|
2246
2201
|
if (!(j < response.products.length)) {
|
|
2247
|
-
|
|
2202
|
+
_context17.next = 45;
|
|
2248
2203
|
break;
|
|
2249
2204
|
}
|
|
2250
|
-
return
|
|
2251
|
-
case
|
|
2205
|
+
return _context17.delegateYield(_loop3(j), "t1", 42);
|
|
2206
|
+
case 42:
|
|
2252
2207
|
j++;
|
|
2253
|
-
|
|
2208
|
+
_context17.next = 40;
|
|
2254
2209
|
break;
|
|
2255
|
-
case
|
|
2210
|
+
case 45:
|
|
2256
2211
|
_i2++;
|
|
2257
|
-
|
|
2212
|
+
_context17.next = 19;
|
|
2258
2213
|
break;
|
|
2259
|
-
case
|
|
2260
|
-
return
|
|
2261
|
-
case
|
|
2214
|
+
case 48:
|
|
2215
|
+
return _context17.abrupt("return", responseProducts);
|
|
2216
|
+
case 49:
|
|
2262
2217
|
case "end":
|
|
2263
|
-
return
|
|
2218
|
+
return _context17.stop();
|
|
2264
2219
|
}
|
|
2265
|
-
},
|
|
2220
|
+
}, _callee14, this, [[22, 30]]);
|
|
2266
2221
|
}));
|
|
2267
|
-
function apiSaveProducts(_x22, _x23, _x24, _x25
|
|
2222
|
+
function apiSaveProducts(_x21, _x22, _x23, _x24, _x25) {
|
|
2268
2223
|
return _apiSaveProducts.apply(this, arguments);
|
|
2269
2224
|
}
|
|
2270
2225
|
return apiSaveProducts;
|
|
@@ -2489,10 +2444,10 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2489
2444
|
}, {
|
|
2490
2445
|
key: "loadSelectOptions",
|
|
2491
2446
|
value: function () {
|
|
2492
|
-
var _loadSelectOptions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function
|
|
2447
|
+
var _loadSelectOptions = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee15(sessionGuid, dataSource, additionalFilter) {
|
|
2493
2448
|
var values, apiUrl, i, apiResult, _i3, value, text;
|
|
2494
|
-
return _regeneratorRuntime.wrap(function
|
|
2495
|
-
while (1) switch (
|
|
2449
|
+
return _regeneratorRuntime.wrap(function _callee15$(_context18) {
|
|
2450
|
+
while (1) switch (_context18.prev = _context18.next) {
|
|
2496
2451
|
case 0:
|
|
2497
2452
|
values = [];
|
|
2498
2453
|
apiUrl = dataSource.url;
|
|
@@ -2501,7 +2456,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2501
2456
|
apiUrl += '&' + additionalFilter[i].key + '=' + additionalFilter[i].value;
|
|
2502
2457
|
}
|
|
2503
2458
|
}
|
|
2504
|
-
|
|
2459
|
+
_context18.next = 5;
|
|
2505
2460
|
return fetch(apiUrl, {
|
|
2506
2461
|
headers: {
|
|
2507
2462
|
sessionGuid: sessionGuid
|
|
@@ -2513,7 +2468,7 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2513
2468
|
return res.json();
|
|
2514
2469
|
});
|
|
2515
2470
|
case 5:
|
|
2516
|
-
apiResult =
|
|
2471
|
+
apiResult = _context18.sent;
|
|
2517
2472
|
if (dataSource.useKey) {
|
|
2518
2473
|
apiResult = apiResult[dataSource.useKey];
|
|
2519
2474
|
}
|
|
@@ -2525,14 +2480,14 @@ var ProductHandlerAbstract = /*#__PURE__*/function () {
|
|
|
2525
2480
|
text: text
|
|
2526
2481
|
});
|
|
2527
2482
|
}
|
|
2528
|
-
return
|
|
2483
|
+
return _context18.abrupt("return", values);
|
|
2529
2484
|
case 9:
|
|
2530
2485
|
case "end":
|
|
2531
|
-
return
|
|
2486
|
+
return _context18.stop();
|
|
2532
2487
|
}
|
|
2533
|
-
},
|
|
2488
|
+
}, _callee15);
|
|
2534
2489
|
}));
|
|
2535
|
-
function loadSelectOptions(_x27, _x28
|
|
2490
|
+
function loadSelectOptions(_x26, _x27, _x28) {
|
|
2536
2491
|
return _loadSelectOptions.apply(this, arguments);
|
|
2537
2492
|
}
|
|
2538
2493
|
return loadSelectOptions;
|
|
@@ -249,8 +249,6 @@ export declare class ProductHandlerAbstract {
|
|
|
249
249
|
value: any;
|
|
250
250
|
text: any;
|
|
251
251
|
}[]>;
|
|
252
|
-
private apiDeleteProducts;
|
|
253
|
-
private splitArrayIntoChunks;
|
|
254
252
|
apiLoadProductVariantsGrouped({ limit, skip, fields, search, sort, favorites, abortController, }: {
|
|
255
253
|
limit?: number;
|
|
256
254
|
skip?: number;
|
|
@@ -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,CAAC;AAExB,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,UAAU,CAAC;IACnB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAChC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACnD;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,eAAe,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACpC,oBAAoB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC7C,kBAAkB,CAAC,EAAE,iBAAiB,CAAC;IACvC,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC;IACpC,oBAAoB,CAAC,EAAE,kBAAk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AgB,CAAC,EAAE,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;;;;IA2BrH,6BAA6B,CAAC,EACzC,KAAK,EACL,IAAI,EACJ,MAAM,EACN,MAAW,EACX,IAAI,EACJ,SAAS,EACT,eAAe,GAChB,EAAE;QACD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;QACxB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC;YAoCa,eAAe;IA2E7B,OAAO,CAAC,WAAW;IAoBnB,MAAM,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,CA0D7C;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": "24.16.0-beta.
|
|
3
|
+
"version": "24.16.0-beta.5",
|
|
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": "52c11b62516c3d69ad8667463c5b1c977effdb6b"
|
|
16
16
|
}
|