@aptos-scp/scp-component-store-selling-features-domain-model 2.34.2 → 2.35.0
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Money, Price } from "@aptos-scp/scp-component-business-core";
|
|
2
|
-
import { IExternalId, IImage, IItem, IPrice as IStoreItemsPrice, IProductAttribute, IProductAttributeTranslation, IStoreItemDescriptor, ItemType as StoreItemType, OrganizationScope, PriceChangeLevelType, Status, TreatmentRules, ITranslation } from "@aptos-scp/scp-component-store-items";
|
|
2
|
+
import { IExternalId, IImage, IItem, IPrice as IStoreItemsPrice, IProductAttribute, IProductAttributeTranslation, IStoreItemDescriptor, ItemType as StoreItemType, ItemSubType, OrganizationScope, PriceChangeLevelType, Status, TreatmentRules, ITranslation } from "@aptos-scp/scp-component-store-items";
|
|
3
3
|
import { IConfigurationManager, RetailLocationIdentity } from "@aptos-scp/scp-component-store-selling-core";
|
|
4
4
|
import { ItemType } from "@aptos-scp/scp-types-commerce-transaction";
|
|
5
5
|
import { MerchandiseHierarchyNodeResponseV2 } from "@aptos-scp/scp-types-store-items";
|
|
@@ -145,6 +145,7 @@ export declare class StoreItem implements ISourceIndication, IStoreItemDescripto
|
|
|
145
145
|
defaultReturnPrice?: Price;
|
|
146
146
|
images?: IImage[];
|
|
147
147
|
subscriptionFrequencyCodes?: string[];
|
|
148
|
+
subType?: ItemSubType;
|
|
148
149
|
static createFromJsonObject(storeItemJsonObj: any): StoreItem;
|
|
149
150
|
static convertStoreItemComponentIPriceToPrice(value: IStoreItemsPrice): Price;
|
|
150
151
|
static createFromItemObject(configurationManager: IConfigurationManager, retailLocationIdentity: RetailLocationIdentity, accountingCurrency: string, itemToConvert: IItem, locale?: string, sourceIndicator?: SourceType): StoreItem;
|
|
@@ -322,6 +322,9 @@ class StoreItem {
|
|
|
322
322
|
if (storeItemJsonObj.subscriptionFrequencyCodes) {
|
|
323
323
|
storeItem.subscriptionFrequencyCodes = storeItemJsonObj.subscriptionFrequencyCodes;
|
|
324
324
|
}
|
|
325
|
+
if (storeItemJsonObj.subType) {
|
|
326
|
+
storeItem.subType = storeItemJsonObj.subType;
|
|
327
|
+
}
|
|
325
328
|
storeItem.departmentGroupId = StoreItem.getStringFromJsonObject(storeItemJsonObj.departmentGroupId);
|
|
326
329
|
return storeItem;
|
|
327
330
|
}
|
|
@@ -447,6 +450,9 @@ class StoreItem {
|
|
|
447
450
|
if (item.subscriptionFrequencyCodes) {
|
|
448
451
|
storeItem.subscriptionFrequencyCodes = item.subscriptionFrequencyCodes;
|
|
449
452
|
}
|
|
453
|
+
if (item.subType) {
|
|
454
|
+
storeItem.subType = item.subType;
|
|
455
|
+
}
|
|
450
456
|
}
|
|
451
457
|
catch (err) {
|
|
452
458
|
logger.catching(err, entryMessage);
|
|
@@ -292,24 +292,24 @@ class FeeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
292
292
|
return transactionLineJsonObj._taxGroupId;
|
|
293
293
|
}
|
|
294
294
|
static getExtendedAmountFromCollectedData(collectedData) {
|
|
295
|
-
if (collectedData.has(Constants_1.CollectedDataKey.FeeExtendedAmount)
|
|
295
|
+
if (collectedData.has(Constants_1.CollectedDataKey.FeeExtendedAmount)) {
|
|
296
296
|
return collectedData.get(Constants_1.CollectedDataKey.FeeExtendedAmount);
|
|
297
297
|
}
|
|
298
|
-
undefined;
|
|
298
|
+
return undefined;
|
|
299
299
|
}
|
|
300
300
|
static getExtendedAmountExcludingTaxFromCollectedData(collectedData) {
|
|
301
301
|
if (collectedData.has(Constants_1.CollectedDataKey.FeeExtendedAmountExcludingTax) &&
|
|
302
302
|
FeeLine.isPickupFulfilmentTransaction) {
|
|
303
303
|
return collectedData.get(Constants_1.CollectedDataKey.FeeExtendedAmountExcludingTax);
|
|
304
304
|
}
|
|
305
|
-
undefined;
|
|
305
|
+
return undefined;
|
|
306
306
|
}
|
|
307
307
|
static getExtendedAmountIncludingTaxFromCollectedData(collectedData) {
|
|
308
308
|
if (collectedData.has(Constants_1.CollectedDataKey.FeeExtendedAmountIncludingTax) &&
|
|
309
309
|
FeeLine.isPickupFulfilmentTransaction) {
|
|
310
310
|
return collectedData.get(Constants_1.CollectedDataKey.FeeExtendedAmountIncludingTax);
|
|
311
311
|
}
|
|
312
|
-
undefined;
|
|
312
|
+
return undefined;
|
|
313
313
|
}
|
|
314
314
|
copyLineWithNewLineNumber(newLineNumber) {
|
|
315
315
|
const clonedItem = this.clone();
|
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.
|
|
3
|
+
"version": "2.35.0",
|
|
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",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@aptos-scp/scp-component-business-core": "^1.12.7",
|
|
57
57
|
"@aptos-scp/scp-component-logging": "^2.1.16",
|
|
58
58
|
"@aptos-scp/scp-component-pricing": "^7.66.4",
|
|
59
|
-
"@aptos-scp/scp-component-store-items": "^1.
|
|
59
|
+
"@aptos-scp/scp-component-store-items": "^1.23.0",
|
|
60
60
|
"@aptos-scp/scp-component-store-selling-core": "^18.9.3",
|
|
61
61
|
"@aptos-scp/scp-component-taxation": "^5.28.0",
|
|
62
62
|
"@aptos-scp/scp-component-user": "^1.4.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@aptos-scp/scp-component-logging": "^2.1.16",
|
|
80
80
|
"@aptos-scp/scp-component-pricing": "^7.66.4",
|
|
81
81
|
"@aptos-scp/scp-component-rn-circuit-breaker": "^1.0.15",
|
|
82
|
-
"@aptos-scp/scp-component-store-items": "^1.
|
|
82
|
+
"@aptos-scp/scp-component-store-items": "^1.23.0",
|
|
83
83
|
"@aptos-scp/scp-component-store-selling-core": "^18.9.3",
|
|
84
84
|
"@aptos-scp/scp-component-taxation": "^5.28.0",
|
|
85
85
|
"@aptos-scp/scp-component-user": "^1.4.0",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"@aptos-scp/scp-types-orders": "^4.11.0",
|
|
98
98
|
"@aptos-scp/scp-types-pricing": "^4.30.0",
|
|
99
99
|
"@aptos-scp/scp-types-ss-transaction-history": "^1.6.0",
|
|
100
|
-
"@aptos-scp/scp-types-store-items": "^1.
|
|
100
|
+
"@aptos-scp/scp-types-store-items": "^1.41.0",
|
|
101
101
|
"@aptos-scp/scp-types-terminal-settings": "^1.3.0",
|
|
102
102
|
"@aptos-scp/scp-types-transaction": "^1.4.3",
|
|
103
103
|
"@aptos-scp/scp-types-user": "^1.5.2",
|