@aptos-scp/scp-component-store-selling-features-domain-model 1.27.0 → 1.27.1

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.
@@ -337,7 +337,7 @@ class StoreItem {
337
337
  // FIXME: this method needs to have its complexity cleaned-up.
338
338
  // eslint-disable-next-line complexity
339
339
  static createFromItemObject(configurationManager, retailLocationIdentity, accountingCurrency, itemToConvert, locale, sourceIndicator) {
340
- var _a, _b;
340
+ var _a, _b, _c;
341
341
  const entryMessage = logger.traceEntry("createFromItemObject", itemToConvert, retailLocationIdentity);
342
342
  const storeItem = new StoreItem();
343
343
  try {
@@ -350,13 +350,9 @@ class StoreItem {
350
350
  // retailLocationIdentity
351
351
  storeItem.retailLocationIdentity = retailLocationIdentity;
352
352
  // itemLookupKeys
353
- storeItem.itemLookupKeys = [];
354
- for (const lookupKeyAttribute of item.lookupKeys) {
355
- const lookupKey = new ItemLookupKey(lookupKeyAttribute.keyType, lookupKeyAttribute.value);
356
- storeItem.itemLookupKeys.push(lookupKey);
357
- }
353
+ storeItem.itemLookupKeys = (_a = item.lookupKeys) === null || _a === void 0 ? void 0 : _a.map((lookupKeyAttribute) => new ItemLookupKey(lookupKeyAttribute.keyType, lookupKeyAttribute.value));
358
354
  // itemType
359
- storeItem.itemType = findItemType(item.type);
355
+ storeItem.itemType = item.type && findItemType(item.type);
360
356
  //sourceIndicator
361
357
  storeItem.source = sourceIndicator;
362
358
  // imageUrl
@@ -425,7 +421,7 @@ class StoreItem {
425
421
  if (item.merchandiseHierarchy && item.merchandiseHierarchy.length > 0) {
426
422
  storeItem.merchandiseHierarchy = [];
427
423
  for (const hierarchyNodeAttribute of item.merchandiseHierarchy) {
428
- if (((_a = hierarchyNodeAttribute) === null || _a === void 0 ? void 0 : _a.nodeId) || ((_b = hierarchyNodeAttribute) === null || _b === void 0 ? void 0 : _b.parentId)) {
424
+ if (((_b = hierarchyNodeAttribute) === null || _b === void 0 ? void 0 : _b.nodeId) || ((_c = hierarchyNodeAttribute) === null || _c === void 0 ? void 0 : _c.parentId)) {
429
425
  let nodeId;
430
426
  if (hierarchyNodeAttribute.nodeId &&
431
427
  (hierarchyNodeAttribute.nodeId.levelId ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptos-scp/scp-component-store-selling-features-domain-model",
3
- "version": "1.27.0",
3
+ "version": "1.27.1",
4
4
  "description": "This component library provides the common components to handle the coordination of processing the business events from the UI.",
5
5
  "private": false,
6
6
  "license": "SEE LICENSE IN LICENSE.md",