@aptos-scp/scp-component-store-selling-features-domain-model 1.44.0 → 1.45.0-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.
@@ -433,7 +433,9 @@ export declare enum UiInputKey {
433
433
  BEST_REDEMPTION_PROMPT_STATUS = "input_bestRedemptionPromptStatus",
434
434
  TENDER_IS_ORIGINAL_TENDER = "input_tenderIsOriginalTender",
435
435
  TENDER_KEYED_ENTRY = "input_tenderKeyedEntry",
436
- PAY_BY_LINK_CUSTOMER = "input_payByLinkCustomer"
436
+ PAY_BY_LINK_CUSTOMER = "input_payByLinkCustomer",
437
+ FISCAL_RETRY = "input_fiscalRetry",
438
+ MAX_FISCAL_RETRY = "input_maxFiscalRetry"
437
439
  }
438
440
  export declare enum CollectedDataKey {
439
441
  Abort = "abort",
@@ -437,6 +437,8 @@ var UiInputKey;
437
437
  UiInputKey["TENDER_IS_ORIGINAL_TENDER"] = "input_tenderIsOriginalTender";
438
438
  UiInputKey["TENDER_KEYED_ENTRY"] = "input_tenderKeyedEntry";
439
439
  UiInputKey["PAY_BY_LINK_CUSTOMER"] = "input_payByLinkCustomer";
440
+ UiInputKey["FISCAL_RETRY"] = "input_fiscalRetry";
441
+ UiInputKey["MAX_FISCAL_RETRY"] = "input_maxFiscalRetry";
440
442
  })(UiInputKey = exports.UiInputKey || (exports.UiInputKey = {}));
441
443
  //
442
444
  // Keys for use in relaying data collectedData (qualification) and nonContextualData (action).
@@ -8,8 +8,10 @@ export declare const ITEM_TOTAL_DISCOUNT_ANNOTATION_SOURCE: string;
8
8
  export declare const TRANS_TOTAL_DISCOUNT_ANNOTATION_SOURCE: string;
9
9
  export declare class ManualDiscountLineTotalDecorator extends BaseManualDiscountLineDecorator {
10
10
  private _totalDiscount;
11
+ private _amount;
11
12
  static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): ManualDiscountLineTotalDecorator;
12
13
  get totalDiscount(): Money;
14
+ get amount(): Money;
13
15
  constructor(decoratorLineType: string, decoratedTransactionLine: IManualDiscountLine, annotationDescription: string, annotationSourceType: string, totalDiscount: Money, annotationSourceLineNumber?: number);
14
16
  protected newTransactionLine(): BaseManualDiscountLineDecorator;
15
17
  }
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const scp_component_business_core_1 = require("@aptos-scp/scp-component-business-core");
4
4
  const BaseManualDiscountLineDecorator_1 = require("./BaseManualDiscountLineDecorator");
5
+ const scp_types_commerce_transaction_1 = require("@aptos-scp/scp-types-commerce-transaction");
5
6
  exports.DECORATOR_TYPE_TRANSACTION_DISCOUNT_TOTAL = "TRANSACTION_DISCOUNT_TOTAL_DECORATOR";
6
7
  exports.DECORATOR_TYPE_ITEM_DISCOUNT_TOTAL = "ITEM_DISCOUNT_TOTAL_DECORATOR";
7
8
  exports.ITEM_TOTAL_DISCOUNT_ANNOTATION_SOURCE = "ITEM_TOTAL_DISCOUNT";
@@ -10,6 +11,9 @@ class ManualDiscountLineTotalDecorator extends BaseManualDiscountLineDecorator_1
10
11
  constructor(decoratorLineType, decoratedTransactionLine, annotationDescription, annotationSourceType, totalDiscount, annotationSourceLineNumber) {
11
12
  super(decoratorLineType, decoratedTransactionLine, annotationDescription, annotationSourceType, annotationSourceLineNumber);
12
13
  this._totalDiscount = totalDiscount;
14
+ if (decoratedTransactionLine.discountType === scp_types_commerce_transaction_1.ManualDiscountType.AmountOff) {
15
+ this._amount = totalDiscount;
16
+ }
13
17
  }
14
18
  static createFromJsonObject(transactionLineJsonObj, transactionLineFactory) {
15
19
  const decoratedTransactionLineJsonObj = this.getDecoratedTransactionLineJsonObjectFromJsonObject(transactionLineJsonObj);
@@ -24,6 +28,9 @@ class ManualDiscountLineTotalDecorator extends BaseManualDiscountLineDecorator_1
24
28
  get totalDiscount() {
25
29
  return this._totalDiscount;
26
30
  }
31
+ get amount() {
32
+ return this._amount;
33
+ }
27
34
  newTransactionLine() {
28
35
  return new ManualDiscountLineTotalDecorator(this.lineDecoratorType, this.decoratedTransactionLine, this.annotationDescription, this.annotationSourceType, this.totalDiscount, this.annotationSourceLineNumber);
29
36
  }
@@ -65,8 +65,7 @@ class BaseFeeLineDecorator extends BaseLineDecorator_1.BaseLineDecorator {
65
65
  }
66
66
  get extendedAmountAdjustment() {
67
67
  var _a;
68
- return this.decoratedTransactionLine.extendedAmount
69
- ? (_a = this.extendedAmount) === null || _a === void 0 ? void 0 : _a.minus(this.decoratedTransactionLine.extendedAmount) : this.extendedAmount;
68
+ return this.lineSavings ? (_a = this.extendedAmount) === null || _a === void 0 ? void 0 : _a.minus(this.lineSavings) : this.extendedAmount;
70
69
  }
71
70
  get extendedAmountExcludingTax() {
72
71
  return this.decoratedTransactionLine.extendedAmountExcludingTax;
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.44.0",
3
+ "version": "1.45.0-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",