@aptos-scp/scp-component-store-selling-features-domain-model 2.49.0 → 2.49.1-patch.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.
@@ -325,7 +325,7 @@ class StoreItem {
325
325
  if (storeItemJsonObj.subType) {
326
326
  storeItem.subType = storeItemJsonObj.subType;
327
327
  }
328
- if (storeItemJsonObj.autoSubscribe) {
328
+ if (_.isBoolean(storeItemJsonObj.autoSubscribe)) {
329
329
  storeItem.autoSubscribe = storeItemJsonObj.autoSubscribe;
330
330
  }
331
331
  storeItem.departmentGroupId = StoreItem.getStringFromJsonObject(storeItemJsonObj.departmentGroupId);
@@ -456,7 +456,7 @@ class StoreItem {
456
456
  if (item.subType) {
457
457
  storeItem.subType = item.subType;
458
458
  }
459
- if (item.autoSubscribe) {
459
+ if (_.isBoolean(item.autoSubscribe)) {
460
460
  storeItem.autoSubscribe = item.autoSubscribe;
461
461
  }
462
462
  }
@@ -23,18 +23,7 @@ function buildTimeIntervalFromCode(code) {
23
23
  }
24
24
  exports.buildTimeIntervalFromCode = buildTimeIntervalFromCode;
25
25
  function buildDeliveryFrequencyTextFromTimeInterval(interval) {
26
- var _a;
27
- const labels = {
28
- Day: ["day", "days"],
29
- Week: ["week", "weeks"],
30
- Month: ["month", "months"],
31
- Year: ["year", "years"],
32
- };
33
- const [singular, plural] = (_a = labels[interval.unit], (_a !== null && _a !== void 0 ? _a : [
34
- interval.unit.toLowerCase(),
35
- `${interval.unit.toLowerCase()}s`,
36
- ]));
37
- return interval.value === 1 ? `Every ${singular}` : `Every ${interval.value} ${plural}`;
26
+ return `${interval.value} ${interval.unit}`;
38
27
  }
39
28
  exports.buildDeliveryFrequencyTextFromTimeInterval = buildDeliveryFrequencyTextFromTimeInterval;
40
29
  //# sourceMappingURL=subscriptionFrequencyUtils.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptos-scp/scp-component-store-selling-features-domain-model",
3
- "version": "2.49.0",
3
+ "version": "2.49.1-patch.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",