@aptos-scp/scp-component-store-selling-features-domain-model 1.33.0 → 1.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.
- package/lib/domain/model/TenderControlTransaction.d.ts +4 -0
- package/lib/domain/model/TenderControlTransaction.js +16 -1
- package/lib/domain/model/TillControlTransaction.d.ts +4 -0
- package/lib/domain/model/TillControlTransaction.js +18 -2
- package/lib/domain/model/item/BasePriceChangeLineDecorator.d.ts +1 -0
- package/lib/domain/model/item/BasePriceChangeLineDecorator.js +3 -0
- package/lib/domain/model/item/ItemPriceChangeLine.d.ts +3 -1
- package/lib/domain/model/item/ItemPriceChangeLine.js +9 -3
- package/lib/domain/model/item/SupersededPriceChangeLineDecorator.d.ts +11 -0
- package/lib/domain/model/item/SupersededPriceChangeLineDecorator.js +31 -0
- package/lib/domain/model/item/index.d.ts +1 -0
- package/lib/domain/model/item/index.js +1 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { DeviceIdentity, ITransaction, ITransactionLine, ITransactionLineFactory
|
|
|
2
2
|
import { ITransactionReferenceFormatter } from "../service";
|
|
3
3
|
import { RetailTransaction } from "./RetailTransaction";
|
|
4
4
|
import { IFiscalSignature } from "@aptos-scp/scp-types-commerce-transaction";
|
|
5
|
+
import { IFiscalError } from "./MerchandiseTransaction";
|
|
5
6
|
export declare const TENDER_CONTROL_TRANSACTION_TYPE = "TenderControlTransaction";
|
|
6
7
|
export declare class TenderControlTransaction extends RetailTransaction {
|
|
7
8
|
private _accountingCurrency;
|
|
@@ -9,11 +10,13 @@ export declare class TenderControlTransaction extends RetailTransaction {
|
|
|
9
10
|
private _transactionReferenceFormatter;
|
|
10
11
|
private _fiscalTransactionNumber;
|
|
11
12
|
private _fiscalSignature;
|
|
13
|
+
private _fiscalError?;
|
|
12
14
|
static createFromJsonObj(transactionJsonObj: any, transactionLineFactory: ITransactionLineFactory, transactionReferenceFormatter: ITransactionReferenceFormatter): TenderControlTransaction;
|
|
13
15
|
constructor(deviceIdentity: DeviceIdentity, businessDayDate: string, transactionNumber: number, user?: IUser, transactionId?: string, accountingCurrency?: string, transactionReferenceFormatter?: ITransactionReferenceFormatter, fiscalTransactionNumber?: string, fiscalSignature?: IFiscalSignature);
|
|
14
16
|
clone(): ITransaction;
|
|
15
17
|
assignFiscalSignature(signatureData: IFiscalSignature): ITransaction;
|
|
16
18
|
assignFiscalTransactionNumber(fiscalTransactionNumber: string): ITransaction;
|
|
19
|
+
setFiscalError(fiscalError: IFiscalError): ITransaction;
|
|
17
20
|
get accountingCurrency(): string;
|
|
18
21
|
get referenceNumber(): string;
|
|
19
22
|
get isTenderExchangeTransaction(): boolean;
|
|
@@ -21,6 +24,7 @@ export declare class TenderControlTransaction extends RetailTransaction {
|
|
|
21
24
|
get transactionStateValues(): Readonly<Map<string, any>>;
|
|
22
25
|
get fiscalTransactionNumber(): string;
|
|
23
26
|
get fiscalSignature(): IFiscalSignature;
|
|
27
|
+
get fiscalError(): IFiscalError;
|
|
24
28
|
findLineByLineNumber(lineNumber: number): ITransactionLine;
|
|
25
29
|
toJSON(): object;
|
|
26
30
|
protected newTransaction(): RetailTransaction;
|
|
@@ -12,6 +12,7 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
12
12
|
this._transactionReferenceFormatter = transactionReferenceFormatter;
|
|
13
13
|
this._fiscalTransactionNumber = fiscalTransactionNumber;
|
|
14
14
|
this._fiscalSignature = fiscalSignature;
|
|
15
|
+
this._fiscalError = undefined;
|
|
15
16
|
}
|
|
16
17
|
static createFromJsonObj(transactionJsonObj, transactionLineFactory, transactionReferenceFormatter) {
|
|
17
18
|
const transactionId = RetailTransaction_1.RetailTransaction.getTransactionIdFromJsonObject(transactionJsonObj);
|
|
@@ -33,6 +34,7 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
33
34
|
transaction._referenceNumber = this._referenceNumber;
|
|
34
35
|
transaction._fiscalTransactionNumber = this._fiscalTransactionNumber;
|
|
35
36
|
transaction._fiscalSignature = this._fiscalSignature;
|
|
37
|
+
transaction._fiscalError = this._fiscalError;
|
|
36
38
|
}
|
|
37
39
|
else {
|
|
38
40
|
throw new scp_component_store_selling_core_1.PosError("Cannot clone TenderControlTransaction, because new " + "instance is not a TenderControlTransaction.", config_1.SSF_TRANSACTION_ERROR_CODE);
|
|
@@ -49,6 +51,11 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
49
51
|
newTransaction._fiscalTransactionNumber = fiscalTransactionNumber;
|
|
50
52
|
return newTransaction;
|
|
51
53
|
}
|
|
54
|
+
setFiscalError(fiscalError) {
|
|
55
|
+
const newTransaction = this.clone();
|
|
56
|
+
newTransaction._fiscalError = fiscalError;
|
|
57
|
+
return newTransaction;
|
|
58
|
+
}
|
|
52
59
|
get accountingCurrency() {
|
|
53
60
|
return this._accountingCurrency;
|
|
54
61
|
}
|
|
@@ -72,6 +79,7 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
72
79
|
["transaction.referenceNumber", this._referenceNumber],
|
|
73
80
|
["transaction.accountingCurrency", this._accountingCurrency],
|
|
74
81
|
["transaction.isTenderExchangeTransaction", this.isTenderExchangeTransaction],
|
|
82
|
+
["transaction.fiscalError", this._fiscalError],
|
|
75
83
|
]);
|
|
76
84
|
}
|
|
77
85
|
get fiscalTransactionNumber() {
|
|
@@ -80,6 +88,9 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
80
88
|
get fiscalSignature() {
|
|
81
89
|
return this._fiscalSignature;
|
|
82
90
|
}
|
|
91
|
+
get fiscalError() {
|
|
92
|
+
return this._fiscalError;
|
|
93
|
+
}
|
|
83
94
|
findLineByLineNumber(lineNumber) {
|
|
84
95
|
if (lineNumber && super.lines.length > 0) {
|
|
85
96
|
return super.findLineByLineNumber(lineNumber);
|
|
@@ -109,13 +120,14 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
109
120
|
_referenceNumber: this.referenceNumber,
|
|
110
121
|
_fiscalTransactionNumber: this.fiscalTransactionNumber,
|
|
111
122
|
_fiscalSignature: this.fiscalSignature,
|
|
123
|
+
_fiscalError: this._fiscalError,
|
|
112
124
|
};
|
|
113
125
|
}
|
|
114
126
|
newTransaction() {
|
|
115
127
|
return new TenderControlTransaction(this.deviceIdentity, this.businessDayDate, this.transactionNumber, this.performingUser, this.transactionId, this.accountingCurrency, this._transactionReferenceFormatter, this.fiscalTransactionNumber, this.fiscalSignature);
|
|
116
128
|
}
|
|
117
129
|
loadFromJsonObject(transactionJsonObj, transactionLineFactory) {
|
|
118
|
-
var _a, _b;
|
|
130
|
+
var _a, _b, _c;
|
|
119
131
|
super.loadFromJsonObject(transactionJsonObj, transactionLineFactory);
|
|
120
132
|
this._referenceNumber = transactionJsonObj._referenceNumber;
|
|
121
133
|
if ((_a = transactionJsonObj) === null || _a === void 0 ? void 0 : _a._fiscalTransactionNumber) {
|
|
@@ -124,6 +136,9 @@ class TenderControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
124
136
|
if ((_b = transactionJsonObj) === null || _b === void 0 ? void 0 : _b._fiscalSignature) {
|
|
125
137
|
this._fiscalSignature = transactionJsonObj._fiscalSignature;
|
|
126
138
|
}
|
|
139
|
+
if ((_c = transactionJsonObj) === null || _c === void 0 ? void 0 : _c._fiscalError) {
|
|
140
|
+
this._fiscalError = transactionJsonObj._fiscalError;
|
|
141
|
+
}
|
|
127
142
|
}
|
|
128
143
|
generateTransactionReferenceNumber(transaction) {
|
|
129
144
|
this._referenceNumber = this._transactionReferenceFormatter.generateTransactionReference(transaction);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { DeviceIdentity, ITransaction, ITransactionLine, ITransactionLineFactory, IUser } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
2
|
import { RetailTransaction } from "./RetailTransaction";
|
|
3
3
|
import { IFiscalSignature } from "@aptos-scp/scp-types-commerce-transaction";
|
|
4
|
+
import { IFiscalError } from "./MerchandiseTransaction";
|
|
4
5
|
export declare const TILL_CONTROL_TRANSACTION_TYPE = "TillControlTransaction";
|
|
5
6
|
export declare class TillControlTransaction extends RetailTransaction {
|
|
6
7
|
private _fiscalSignature;
|
|
7
8
|
private _fiscalTransactionNumber;
|
|
9
|
+
private _fiscalError?;
|
|
8
10
|
static createFromJsonObj(transactionJsonObj: any, transactionLineFactory: ITransactionLineFactory): TillControlTransaction;
|
|
9
11
|
constructor(deviceIdentity: DeviceIdentity, businessDayDate: string, transactionNumber: number, user?: IUser, transactionId?: string, fiscalSignature?: IFiscalSignature, fiscalTransactionNumber?: string);
|
|
10
12
|
clone(): ITransaction;
|
|
@@ -13,6 +15,8 @@ export declare class TillControlTransaction extends RetailTransaction {
|
|
|
13
15
|
get transactionStateValues(): Readonly<Map<string, any>>;
|
|
14
16
|
assignFiscalSignature(signatureData: IFiscalSignature): ITransaction;
|
|
15
17
|
assignFiscalTransactionNumber(fiscalTransactionNumber: string): ITransaction;
|
|
18
|
+
setFiscalError(fiscalError: IFiscalError): ITransaction;
|
|
19
|
+
get fiscalError(): IFiscalError;
|
|
16
20
|
findLineByLineNumber(lineNumber: number): ITransactionLine;
|
|
17
21
|
protected newTransaction(): RetailTransaction;
|
|
18
22
|
protected loadFromJsonObject(transactionJsonObj: any, transactionLineFactory: ITransactionLineFactory): void;
|
|
@@ -9,6 +9,7 @@ class TillControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
9
9
|
super(deviceIdentity, businessDayDate, transactionNumber, exports.TILL_CONTROL_TRANSACTION_TYPE, user, transactionId);
|
|
10
10
|
this._fiscalSignature = fiscalSignature;
|
|
11
11
|
this._fiscalTransactionNumber = fiscalTransactionNumber;
|
|
12
|
+
this._fiscalError = undefined;
|
|
12
13
|
}
|
|
13
14
|
static createFromJsonObj(transactionJsonObj, transactionLineFactory) {
|
|
14
15
|
const transactionId = RetailTransaction_1.RetailTransaction.getTransactionIdFromJsonObject(transactionJsonObj);
|
|
@@ -26,6 +27,7 @@ class TillControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
26
27
|
if (exports.isTillControlTransaction(transaction)) {
|
|
27
28
|
transaction._fiscalSignature = this._fiscalSignature;
|
|
28
29
|
transaction._fiscalTransactionNumber = this._fiscalTransactionNumber;
|
|
30
|
+
transaction._fiscalError = this._fiscalError;
|
|
29
31
|
}
|
|
30
32
|
else {
|
|
31
33
|
throw new scp_component_store_selling_core_1.PosError("Cannot clone TillControlTransaction, because new " + "instance is not a TillControlTransaction.", config_1.SSF_TRANSACTION_ERROR_CODE);
|
|
@@ -39,7 +41,10 @@ class TillControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
39
41
|
return this._fiscalTransactionNumber;
|
|
40
42
|
}
|
|
41
43
|
get transactionStateValues() {
|
|
42
|
-
return new Map([
|
|
44
|
+
return new Map([
|
|
45
|
+
...super.transactionStateValues.entries(),
|
|
46
|
+
["transaction.fiscalError", this._fiscalError],
|
|
47
|
+
]);
|
|
43
48
|
}
|
|
44
49
|
assignFiscalSignature(signatureData) {
|
|
45
50
|
const newTransaction = this.clone();
|
|
@@ -51,6 +56,14 @@ class TillControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
51
56
|
newTransaction._fiscalTransactionNumber = fiscalTransactionNumber;
|
|
52
57
|
return newTransaction;
|
|
53
58
|
}
|
|
59
|
+
setFiscalError(fiscalError) {
|
|
60
|
+
const newTransaction = this.clone();
|
|
61
|
+
newTransaction._fiscalError = fiscalError;
|
|
62
|
+
return newTransaction;
|
|
63
|
+
}
|
|
64
|
+
get fiscalError() {
|
|
65
|
+
return this._fiscalError;
|
|
66
|
+
}
|
|
54
67
|
findLineByLineNumber(lineNumber) {
|
|
55
68
|
if (lineNumber && super.lines.length > 0) {
|
|
56
69
|
return super.findLineByLineNumber(lineNumber);
|
|
@@ -61,7 +74,7 @@ class TillControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
61
74
|
return new TillControlTransaction(this.deviceIdentity, this.businessDayDate, this.transactionNumber, this.performingUser, this.transactionId, this._fiscalSignature, this._fiscalTransactionNumber);
|
|
62
75
|
}
|
|
63
76
|
loadFromJsonObject(transactionJsonObj, transactionLineFactory) {
|
|
64
|
-
var _a, _b;
|
|
77
|
+
var _a, _b, _c;
|
|
65
78
|
super.loadFromJsonObject(transactionJsonObj, transactionLineFactory);
|
|
66
79
|
if ((_a = transactionJsonObj) === null || _a === void 0 ? void 0 : _a._fiscalSignature) {
|
|
67
80
|
this._fiscalSignature = transactionJsonObj._fiscalSignature;
|
|
@@ -69,6 +82,9 @@ class TillControlTransaction extends RetailTransaction_1.RetailTransaction {
|
|
|
69
82
|
if ((_b = transactionJsonObj) === null || _b === void 0 ? void 0 : _b._fiscalTransactionNumber) {
|
|
70
83
|
this._fiscalTransactionNumber = transactionJsonObj._fiscalTransactionNumber;
|
|
71
84
|
}
|
|
85
|
+
if ((_c = transactionJsonObj) === null || _c === void 0 ? void 0 : _c._fiscalError) {
|
|
86
|
+
this._fiscalError = transactionJsonObj._fiscalError;
|
|
87
|
+
}
|
|
72
88
|
}
|
|
73
89
|
}
|
|
74
90
|
exports.TillControlTransaction = TillControlTransaction;
|
|
@@ -13,6 +13,7 @@ export declare abstract class BasePriceChangeLineDecorator extends BaseLineDecor
|
|
|
13
13
|
get extendedAmountIncludingTax(): Money;
|
|
14
14
|
get couldAffectPricing(): boolean;
|
|
15
15
|
get unitPrice(): Price;
|
|
16
|
+
get superseded(): boolean;
|
|
16
17
|
get preventsTransactionVoid(): boolean;
|
|
17
18
|
get allowVoid(): boolean;
|
|
18
19
|
protected constructor(lineDecoratorType: string, decoratedTransactionLine: ItemPriceChangeLine, annotationDescription: string, annotationSourceType: string, annotationSourceLineNumber?: number);
|
|
@@ -32,6 +32,9 @@ class BasePriceChangeLineDecorator extends BaseLineDecorator_1.BaseLineDecorator
|
|
|
32
32
|
get unitPrice() {
|
|
33
33
|
return this.decoratedTransactionLine.unitPrice;
|
|
34
34
|
}
|
|
35
|
+
get superseded() {
|
|
36
|
+
return this.decoratedTransactionLine.superseded;
|
|
37
|
+
}
|
|
35
38
|
get preventsTransactionVoid() {
|
|
36
39
|
return false;
|
|
37
40
|
}
|
|
@@ -12,6 +12,7 @@ export declare class ItemPriceChangeLine extends BaseTransactionLine implements
|
|
|
12
12
|
private _reasonDescription;
|
|
13
13
|
private _supervisorOverrideLineReference;
|
|
14
14
|
private _copiedFromLineNumber;
|
|
15
|
+
private _superseded;
|
|
15
16
|
/**
|
|
16
17
|
* The create method is called by the transaction line factory to create an instance and initialize it from the
|
|
17
18
|
* data collected during the qualification process.
|
|
@@ -37,7 +38,8 @@ export declare class ItemPriceChangeLine extends BaseTransactionLine implements
|
|
|
37
38
|
get allowVoid(): boolean;
|
|
38
39
|
get copiedFromLineNumber(): number;
|
|
39
40
|
copyLineWithNewLineNumber(newLineNumber: number, linePropertyOverrides?: Readonly<Map<string, any>>): ItemPriceChangeLine;
|
|
40
|
-
|
|
41
|
+
get superseded(): boolean;
|
|
42
|
+
protected constructor(changeLineNumber: number, price: Price, reasonCode: string, reasonListType: string, reasonDescription: string, lineNumber: number, lineType: string, supervisorOverrideLineReference: ITransactionLineReferenceType, extendedAmount?: Money, extendedAmountExcludingTax?: Money, extendedAmountIncludingTax?: Money, copiedFromLineNumber?: number, superseded?: boolean);
|
|
41
43
|
protected clone(): BaseTransactionLine;
|
|
42
44
|
protected newTransactionLine(): BaseTransactionLine;
|
|
43
45
|
}
|
|
@@ -9,7 +9,7 @@ exports.CHANGE_ITEM_PRICE_LINE_TYPE = "ChangeItemPrice";
|
|
|
9
9
|
class ItemPriceChangeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
10
10
|
// The constructor is only used by the create methods, which should be used instead of the constructor to create an
|
|
11
11
|
// instance.
|
|
12
|
-
constructor(changeLineNumber, price, reasonCode, reasonListType, reasonDescription, lineNumber, lineType, supervisorOverrideLineReference, extendedAmount, extendedAmountExcludingTax, extendedAmountIncludingTax, copiedFromLineNumber) {
|
|
12
|
+
constructor(changeLineNumber, price, reasonCode, reasonListType, reasonDescription, lineNumber, lineType, supervisorOverrideLineReference, extendedAmount, extendedAmountExcludingTax, extendedAmountIncludingTax, copiedFromLineNumber, superseded) {
|
|
13
13
|
super(lineNumber, lineType, extendedAmount, extendedAmountExcludingTax, extendedAmountIncludingTax);
|
|
14
14
|
this._changeLineNumber = changeLineNumber;
|
|
15
15
|
this._price = price;
|
|
@@ -18,6 +18,7 @@ class ItemPriceChangeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
18
18
|
this._reasonDescription = reasonDescription;
|
|
19
19
|
this._supervisorOverrideLineReference = supervisorOverrideLineReference;
|
|
20
20
|
this._copiedFromLineNumber = copiedFromLineNumber;
|
|
21
|
+
this._superseded = superseded;
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
* The create method is called by the transaction line factory to create an instance and initialize it from the
|
|
@@ -55,7 +56,9 @@ class ItemPriceChangeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
55
56
|
const reasonListType = transactionLineJsonObj._reasonListType;
|
|
56
57
|
const reasonDescription = transactionLineJsonObj._reasonDescription;
|
|
57
58
|
const supervisorOverrideLineReference = transactionLineJsonObj._supervisorOverrideLineReference;
|
|
58
|
-
const
|
|
59
|
+
const copiedFromLineNumber = transactionLineJsonObj._copiedFromLineNumber;
|
|
60
|
+
const superseded = transactionLineJsonObj._superseded;
|
|
61
|
+
const itemPriceChangeLine = new ItemPriceChangeLine(changeLineNumber, price, reasonCode, reasonListType, reasonDescription, lineNumber, lineType, supervisorOverrideLineReference, extendedAmount, extendedAmountExcludingTax, extendedAmountIncludingTax, copiedFromLineNumber, superseded);
|
|
59
62
|
itemPriceChangeLine.loadFromJsonObject(transactionLineJsonObj);
|
|
60
63
|
return itemPriceChangeLine;
|
|
61
64
|
}
|
|
@@ -100,6 +103,9 @@ class ItemPriceChangeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
100
103
|
clonedItem._copiedFromLineNumber = (_b = linePropertyOverrides) === null || _b === void 0 ? void 0 : _b.get(Constants_1.LinePropertyOverrides.CopiedFromLineNumber);
|
|
101
104
|
return clonedItem.updateLineNumber(newLineNumber);
|
|
102
105
|
}
|
|
106
|
+
get superseded() {
|
|
107
|
+
return this._superseded;
|
|
108
|
+
}
|
|
103
109
|
clone() {
|
|
104
110
|
const newTransactionLine = super.clone();
|
|
105
111
|
// These are handled by the constructor called by newTransactionLine().
|
|
@@ -120,7 +126,7 @@ class ItemPriceChangeLine extends BaseTransactionLine_1.BaseTransactionLine {
|
|
|
120
126
|
}
|
|
121
127
|
*/
|
|
122
128
|
newTransactionLine() {
|
|
123
|
-
return new ItemPriceChangeLine(this._changeLineNumber, this._price, this._reasonCode, this._reasonListType, this._reasonDescription, this.lineNumber, this.lineType, this._supervisorOverrideLineReference, this.extendedAmount, this.extendedAmountExcludingTax, this.extendedAmountIncludingTax, this._copiedFromLineNumber);
|
|
129
|
+
return new ItemPriceChangeLine(this._changeLineNumber, this._price, this._reasonCode, this._reasonListType, this._reasonDescription, this.lineNumber, this.lineType, this._supervisorOverrideLineReference, this.extendedAmount, this.extendedAmountExcludingTax, this.extendedAmountIncludingTax, this._copiedFromLineNumber, this._superseded);
|
|
124
130
|
}
|
|
125
131
|
}
|
|
126
132
|
exports.ItemPriceChangeLine = ItemPriceChangeLine;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ITransactionLine, ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { BasePriceChangeLineDecorator } from "./BasePriceChangeLineDecorator";
|
|
3
|
+
import { ItemPriceChangeLine } from "./ItemPriceChangeLine";
|
|
4
|
+
export declare const DECORATOR_TYPE_SUPERSEDED_PRICE_CHANGE_LINE: string;
|
|
5
|
+
export declare class SupersededPriceChangeLineDecorator extends BasePriceChangeLineDecorator {
|
|
6
|
+
static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): SupersededPriceChangeLineDecorator;
|
|
7
|
+
constructor(priceChangeLine: ItemPriceChangeLine, annotationSourceType: string, annotationSourceLineNumber: number);
|
|
8
|
+
get superseded(): boolean;
|
|
9
|
+
protected newTransactionLine(): SupersededPriceChangeLineDecorator;
|
|
10
|
+
}
|
|
11
|
+
export declare function isSupersededPriceChangeLineDecorator(transactionLine: ITransactionLine): transactionLine is SupersededPriceChangeLineDecorator;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const BaseLineDecorator_1 = require("../BaseLineDecorator");
|
|
4
|
+
const BasePriceChangeLineDecorator_1 = require("./BasePriceChangeLineDecorator");
|
|
5
|
+
exports.DECORATOR_TYPE_SUPERSEDED_PRICE_CHANGE_LINE = "SUPERSEDED_PRICE_CHANGE_LINE_DECORATOR";
|
|
6
|
+
class SupersededPriceChangeLineDecorator extends BasePriceChangeLineDecorator_1.BasePriceChangeLineDecorator {
|
|
7
|
+
static createFromJsonObject(transactionLineJsonObj, transactionLineFactory) {
|
|
8
|
+
const decoratedTransactionLineJsonObj = BaseLineDecorator_1.BaseLineDecorator.getDecoratedTransactionLineJsonObjectFromJsonObject(transactionLineJsonObj);
|
|
9
|
+
const decoratedPriceChangeLine = transactionLineFactory.createTransactionLineFromJsonObj(decoratedTransactionLineJsonObj);
|
|
10
|
+
const annotationSourceType = BaseLineDecorator_1.BaseLineDecorator.getAnnotationSourceTypeFromJsonObject(transactionLineJsonObj);
|
|
11
|
+
const annotationSourceLineNumber = BaseLineDecorator_1.BaseLineDecorator.getAnnotationSourceLineNumberFromJsonObject(transactionLineJsonObj);
|
|
12
|
+
const supersededPriceChangeLineDecorator = new SupersededPriceChangeLineDecorator(decoratedPriceChangeLine, annotationSourceType, annotationSourceLineNumber);
|
|
13
|
+
return supersededPriceChangeLineDecorator;
|
|
14
|
+
}
|
|
15
|
+
constructor(priceChangeLine, annotationSourceType, annotationSourceLineNumber) {
|
|
16
|
+
super(exports.DECORATOR_TYPE_SUPERSEDED_PRICE_CHANGE_LINE, priceChangeLine, undefined, annotationSourceType, annotationSourceLineNumber);
|
|
17
|
+
}
|
|
18
|
+
get superseded() {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
newTransactionLine() {
|
|
22
|
+
return new SupersededPriceChangeLineDecorator(this.decoratedTransactionLine, this.annotationSourceType, this.annotationSourceLineNumber);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.SupersededPriceChangeLineDecorator = SupersededPriceChangeLineDecorator;
|
|
26
|
+
function isSupersededPriceChangeLineDecorator(transactionLine) {
|
|
27
|
+
return (transactionLine.lineDecoratorType ===
|
|
28
|
+
exports.DECORATOR_TYPE_SUPERSEDED_PRICE_CHANGE_LINE);
|
|
29
|
+
}
|
|
30
|
+
exports.isSupersededPriceChangeLineDecorator = isSupersededPriceChangeLineDecorator;
|
|
31
|
+
//# sourceMappingURL=SupersededPriceChangeLineDecorator.js.map
|
|
@@ -35,3 +35,4 @@ export * from "./ItemLineNonFinancialRewardDecorator";
|
|
|
35
35
|
export * from "./IAllLinePricingAdjustments";
|
|
36
36
|
export * from "./ISerializedPriceCalculationResultsWithSource";
|
|
37
37
|
export * from "./ItemLineExtensibilityFormDataDecorator";
|
|
38
|
+
export * from "./SupersededPriceChangeLineDecorator";
|
|
@@ -38,4 +38,5 @@ __export(require("./ItemLineTaxOverrideDecorator"));
|
|
|
38
38
|
__export(require("./ItemLineNonFinancialRewardDecorator"));
|
|
39
39
|
__export(require("./IAllLinePricingAdjustments"));
|
|
40
40
|
__export(require("./ItemLineExtensibilityFormDataDecorator"));
|
|
41
|
+
__export(require("./SupersededPriceChangeLineDecorator"));
|
|
41
42
|
//# sourceMappingURL=index.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": "1.
|
|
3
|
+
"version": "1.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",
|