@aptos-scp/scp-component-store-selling-features-domain-model 2.40.0 → 2.41.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.
@@ -26,6 +26,7 @@ export interface IReceiptTypeChoices {
26
26
  japanRSSReceipt?: boolean;
27
27
  japanRSSReceiptButtonText?: ILabel;
28
28
  japanRSSReceiptAllowedFor?: ReceiptTypeAllowedTransactionType;
29
+ restrictReprintWithTransactionReceiptOptionsToOriginal?: boolean;
29
30
  }
30
31
  export interface ITaxInformation {
31
32
  regionalTaxIdentifier: ILabelText;
@@ -1,12 +1,15 @@
1
1
  import { ITransactionLine, ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
2
2
  import { BaseItemLineDecorator } from "./BaseItemLineDecorator";
3
- import { IItemLine, IRewardCardTender } from "./IItemLine";
3
+ import { IItemLine, IItemSubline, IRewardCardTender } from "./IItemLine";
4
4
  export declare const DECORATOR_TYPE_ITEM_LINE_REWARD_CARD_TENDER: string;
5
5
  export declare function isItemLineRewardCardTenderDecorator(transactionLine: ITransactionLine): transactionLine is ItemLineRewardCardTenderDecorator;
6
6
  export declare class ItemLineRewardCardTenderDecorator extends BaseItemLineDecorator {
7
+ private _sublines;
7
8
  private _rewardCardTenders;
8
9
  static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): ItemLineRewardCardTenderDecorator;
9
- constructor(rewardCardTenders: IRewardCardTender[], itemLine: IItemLine, annotationDescription: string, annotationSourceType: string);
10
+ constructor(rewardCardTenders: IRewardCardTender[], itemLine: IItemLine, sublines: IItemSubline[], annotationDescription: string, annotationSourceType: string);
11
+ get sublines(): IItemSubline[];
12
+ setSublines(sublines: IItemSubline[]): IItemLine;
10
13
  get rewardCardTenders(): IRewardCardTender[];
11
14
  protected clone(): BaseItemLineDecorator;
12
15
  protected newTransactionLine(): BaseItemLineDecorator;
@@ -9,8 +9,9 @@ function isItemLineRewardCardTenderDecorator(transactionLine) {
9
9
  }
10
10
  exports.isItemLineRewardCardTenderDecorator = isItemLineRewardCardTenderDecorator;
11
11
  class ItemLineRewardCardTenderDecorator extends BaseItemLineDecorator_1.BaseItemLineDecorator {
12
- constructor(rewardCardTenders, itemLine, annotationDescription, annotationSourceType) {
12
+ constructor(rewardCardTenders, itemLine, sublines, annotationDescription, annotationSourceType) {
13
13
  super(new scp_component_business_core_1.Money(0.0, itemLine.lineSavings.currency), exports.DECORATOR_TYPE_ITEM_LINE_REWARD_CARD_TENDER, itemLine, annotationDescription, annotationSourceType);
14
+ this._sublines = sublines;
14
15
  this._rewardCardTenders = rewardCardTenders;
15
16
  }
16
17
  static createFromJsonObject(transactionLineJsonObj, transactionLineFactory) {
@@ -27,19 +28,29 @@ class ItemLineRewardCardTenderDecorator extends BaseItemLineDecorator_1.BaseItem
27
28
  });
28
29
  const annotationDescription = BaseItemLineDecorator_1.BaseItemLineDecorator.getAnnotationDescriptionFromJsonObject(transactionLineJsonObj);
29
30
  const annotationSourceType = BaseItemLineDecorator_1.BaseItemLineDecorator.getAnnotationSourceTypeFromJsonObject(transactionLineJsonObj);
30
- const itemLineRewardCardTenderDecorator = new ItemLineRewardCardTenderDecorator(rewardCardTenders, decoratedItemLine, annotationDescription, annotationSourceType);
31
+ const sublines = BaseItemLineDecorator_1.BaseItemLineDecorator.getSublinesFromJsonObject(transactionLineJsonObj);
32
+ const itemLineRewardCardTenderDecorator = new ItemLineRewardCardTenderDecorator(rewardCardTenders, decoratedItemLine, sublines, annotationDescription, annotationSourceType);
31
33
  return itemLineRewardCardTenderDecorator;
32
34
  }
35
+ get sublines() {
36
+ return this._sublines;
37
+ }
38
+ setSublines(sublines) {
39
+ const newLine = this.clone();
40
+ newLine._sublines = sublines;
41
+ return newLine;
42
+ }
33
43
  get rewardCardTenders() {
34
44
  return this._rewardCardTenders;
35
45
  }
36
46
  clone() {
37
47
  const itemLineRewardCardTenderDecorator = super.clone();
38
48
  itemLineRewardCardTenderDecorator._rewardCardTenders = this._rewardCardTenders;
49
+ itemLineRewardCardTenderDecorator._sublines = this._sublines;
39
50
  return itemLineRewardCardTenderDecorator;
40
51
  }
41
52
  newTransactionLine() {
42
- return new ItemLineRewardCardTenderDecorator(this._rewardCardTenders, this.decoratedTransactionLine, this.annotationDescription, this.annotationSourceType);
53
+ return new ItemLineRewardCardTenderDecorator(this._rewardCardTenders, this.decoratedTransactionLine, this._sublines, this.annotationDescription, this.annotationSourceType);
43
54
  }
44
55
  }
45
56
  exports.ItemLineRewardCardTenderDecorator = ItemLineRewardCardTenderDecorator;
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.40.0",
3
+ "version": "2.41.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",