@aptos-scp/scp-component-store-selling-features-domain-model 1.31.0 → 1.32.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/UIBusinessEventTypes.d.ts +2 -0
- package/lib/domain/UIBusinessEventTypes.js +2 -0
- package/lib/domain/model/extensibilityForm/BaseExtensibilityFormDataLineDecorator.d.ts +16 -0
- package/lib/domain/model/extensibilityForm/BaseExtensibilityFormDataLineDecorator.js +38 -0
- package/lib/domain/model/extensibilityForm/ExtensibilityFormDataLine.d.ts +7 -1
- package/lib/domain/model/extensibilityForm/ExtensibilityFormDataLine.js +12 -0
- package/lib/domain/model/extensibilityForm/VoidedExtensibilityFormDataLineDecorator.d.ts +15 -0
- package/lib/domain/model/extensibilityForm/VoidedExtensibilityFormDataLineDecorator.js +38 -0
- package/lib/domain/model/extensibilityForm/index.d.ts +2 -0
- package/lib/domain/model/extensibilityForm/index.js +2 -0
- package/package.json +1 -1
|
@@ -309,7 +309,9 @@ export declare const FIND_VALUE_CERTIFICATES_EVENT: string;
|
|
|
309
309
|
export declare const UPLOAD_DEVICE_LOGS_EVENT: string;
|
|
310
310
|
export declare const BYPASS_REFUNDED_TAX_FREE_WARNING_EVENT: string;
|
|
311
311
|
export declare const CLEAR_VALUE_CERTIFICATE_INQUIRY_RESULTS_EVENT: string;
|
|
312
|
+
export declare const VOID_ITEM_EXTENSIBILITY_FORM_DATA_EVENT: string;
|
|
312
313
|
export declare const APPLY_ITEM_EXTENSIBILITY_FORM_DATA_EVENT: string;
|
|
314
|
+
export declare const APPLY_ITEM_EXTENSIBILITY_FORM_COMMENT_DATA_EVENT: string;
|
|
313
315
|
export declare const APPLY_ITEM_SEND_SALE_EVENT: string;
|
|
314
316
|
export declare const UPDATE_LINE_DISPLAY_EVENT: string;
|
|
315
317
|
export declare const AUTO_LOG_ON_EVENT: string;
|
|
@@ -316,7 +316,9 @@ exports.FIND_VALUE_CERTIFICATES_EVENT = "FindValueCertificates";
|
|
|
316
316
|
exports.UPLOAD_DEVICE_LOGS_EVENT = "UploadDeviceLogsEvent";
|
|
317
317
|
exports.BYPASS_REFUNDED_TAX_FREE_WARNING_EVENT = "BypassRefundedTaxFreeWarning";
|
|
318
318
|
exports.CLEAR_VALUE_CERTIFICATE_INQUIRY_RESULTS_EVENT = "ClearValueCertificateResults";
|
|
319
|
+
exports.VOID_ITEM_EXTENSIBILITY_FORM_DATA_EVENT = "VoidItemExtensibilityFormData";
|
|
319
320
|
exports.APPLY_ITEM_EXTENSIBILITY_FORM_DATA_EVENT = "ApplyItemExtensibilityFormData";
|
|
321
|
+
exports.APPLY_ITEM_EXTENSIBILITY_FORM_COMMENT_DATA_EVENT = "ApplyItemExtensibilityFormCommentData";
|
|
320
322
|
exports.APPLY_ITEM_SEND_SALE_EVENT = "ApplyItemSendSale";
|
|
321
323
|
exports.UPDATE_LINE_DISPLAY_EVENT = "UpdateLineDisplay";
|
|
322
324
|
exports.AUTO_LOG_ON_EVENT = "AutoLogOn";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ISameTransactionLineReference } from "@aptos-scp/scp-types-commerce-transaction";
|
|
2
|
+
import { BaseLineDecorator } from "../BaseLineDecorator";
|
|
3
|
+
import { ExtensibilityFormDataLine } from "./ExtensibilityFormDataLine";
|
|
4
|
+
import { IExtensibilityFormFields } from "./IExtensibilityForm";
|
|
5
|
+
export declare abstract class BaseExtensibilityFormDataLineDecorator extends BaseLineDecorator<ExtensibilityFormDataLine> {
|
|
6
|
+
get couldAffectPricing(): boolean;
|
|
7
|
+
get itemLineReference(): ISameTransactionLineReference;
|
|
8
|
+
get formName(): string;
|
|
9
|
+
get namespace(): string;
|
|
10
|
+
get fields(): IExtensibilityFormFields;
|
|
11
|
+
get prevFields(): IExtensibilityFormFields;
|
|
12
|
+
get allowVoid(): boolean;
|
|
13
|
+
get preventsTransactionVoid(): boolean;
|
|
14
|
+
protected constructor(lineDecoratorType: string, decoratedTransactionLine: ExtensibilityFormDataLine, annotationDescription: string, annotationSourceType: string, annotationSourceLineNumber?: number);
|
|
15
|
+
protected clone(): BaseExtensibilityFormDataLineDecorator;
|
|
16
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const BaseLineDecorator_1 = require("../BaseLineDecorator");
|
|
4
|
+
class BaseExtensibilityFormDataLineDecorator extends BaseLineDecorator_1.BaseLineDecorator {
|
|
5
|
+
get couldAffectPricing() {
|
|
6
|
+
return this.decoratedTransactionLine.couldAffectPricing;
|
|
7
|
+
}
|
|
8
|
+
get itemLineReference() {
|
|
9
|
+
return this.decoratedTransactionLine.itemLineReference;
|
|
10
|
+
}
|
|
11
|
+
get formName() {
|
|
12
|
+
return this.decoratedTransactionLine.formName;
|
|
13
|
+
}
|
|
14
|
+
get namespace() {
|
|
15
|
+
return this.decoratedTransactionLine.namespace;
|
|
16
|
+
}
|
|
17
|
+
get fields() {
|
|
18
|
+
return this.decoratedTransactionLine.fields;
|
|
19
|
+
}
|
|
20
|
+
get prevFields() {
|
|
21
|
+
return this.decoratedTransactionLine.prevFields;
|
|
22
|
+
}
|
|
23
|
+
get allowVoid() {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
get preventsTransactionVoid() {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
constructor(lineDecoratorType, decoratedTransactionLine, annotationDescription, annotationSourceType, annotationSourceLineNumber) {
|
|
30
|
+
super(lineDecoratorType, decoratedTransactionLine, annotationDescription, annotationSourceType, annotationSourceLineNumber);
|
|
31
|
+
}
|
|
32
|
+
clone() {
|
|
33
|
+
const newBaseExtensibilityFormDataLineDecorator = super.clone();
|
|
34
|
+
return newBaseExtensibilityFormDataLineDecorator;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.BaseExtensibilityFormDataLineDecorator = BaseExtensibilityFormDataLineDecorator;
|
|
38
|
+
//# sourceMappingURL=BaseExtensibilityFormDataLineDecorator.js.map
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { ITransactionLine, UiBusinessEvent } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
2
|
import { ISameTransactionLineReference } from "@aptos-scp/scp-types-commerce-transaction";
|
|
3
3
|
import { BaseTransactionLine } from "../BaseTransactionLine";
|
|
4
|
+
import { VoidSource } from "../Constants";
|
|
5
|
+
import { IVoidableLine } from "../VoidInterfaces";
|
|
4
6
|
import { IExtensibilityFormFields } from "./IExtensibilityForm";
|
|
5
7
|
export declare const ADD_EXTENSIBILITY_FORM_DATA_LINE_TYPE = "AddExtensibilityFormData";
|
|
6
8
|
export declare const MODIFY_EXTENSIBILITY_FORM_DATA_LINE_TYPE = "ModifyExtensibilityFormData";
|
|
7
|
-
export declare class ExtensibilityFormDataLine extends BaseTransactionLine {
|
|
9
|
+
export declare class ExtensibilityFormDataLine extends BaseTransactionLine implements IVoidableLine {
|
|
8
10
|
private _itemLineReference;
|
|
9
11
|
private _formName;
|
|
10
12
|
private _namespace;
|
|
@@ -18,6 +20,10 @@ export declare class ExtensibilityFormDataLine extends BaseTransactionLine {
|
|
|
18
20
|
get formName(): string;
|
|
19
21
|
get namespace(): string;
|
|
20
22
|
get fields(): IExtensibilityFormFields;
|
|
23
|
+
get voided(): boolean;
|
|
24
|
+
get preventsTransactionVoid(): boolean;
|
|
25
|
+
get allowVoid(): boolean;
|
|
26
|
+
get voidSource(): VoidSource;
|
|
21
27
|
get prevFields(): IExtensibilityFormFields;
|
|
22
28
|
get couldAffectPricing(): boolean;
|
|
23
29
|
}
|
|
@@ -49,6 +49,18 @@ class ExtensibilityFormDataLine extends BaseTransactionLine_1.BaseTransactionLin
|
|
|
49
49
|
get fields() {
|
|
50
50
|
return this._fields;
|
|
51
51
|
}
|
|
52
|
+
get voided() {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
get preventsTransactionVoid() {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
get allowVoid() {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
get voidSource() {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
52
64
|
get prevFields() {
|
|
53
65
|
return this._prevFields;
|
|
54
66
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ITransactionLineFactory } from "@aptos-scp/scp-component-store-selling-core";
|
|
2
|
+
import { VoidSource } from "../Constants";
|
|
3
|
+
import { BaseExtensibilityFormDataLineDecorator } from "./BaseExtensibilityFormDataLineDecorator";
|
|
4
|
+
import { ExtensibilityFormDataLine } from "./ExtensibilityFormDataLine";
|
|
5
|
+
export declare const DECORATOR_TYPE_VOIDED_EXTENSIBILITY_FORM_DATA_LINE: string;
|
|
6
|
+
export declare class VoidedExtensibilityFormDataLineDecorator extends BaseExtensibilityFormDataLineDecorator {
|
|
7
|
+
private _voidSource;
|
|
8
|
+
static createFromJsonObject(transactionLineJsonObj: any, transactionLineFactory: ITransactionLineFactory): VoidedExtensibilityFormDataLineDecorator;
|
|
9
|
+
get preventsTransactionVoid(): boolean;
|
|
10
|
+
get allowVoid(): boolean;
|
|
11
|
+
get voided(): boolean;
|
|
12
|
+
get voidSource(): VoidSource;
|
|
13
|
+
constructor(voidSource: VoidSource, extensibilityFormDataLine: ExtensibilityFormDataLine, annotationSourceLineNumber: number);
|
|
14
|
+
protected newTransactionLine(): VoidedExtensibilityFormDataLineDecorator;
|
|
15
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const BaseLineDecorator_1 = require("../BaseLineDecorator");
|
|
4
|
+
const VoidedLineDecorator_1 = require("../void/VoidedLineDecorator");
|
|
5
|
+
const BaseExtensibilityFormDataLineDecorator_1 = require("./BaseExtensibilityFormDataLineDecorator");
|
|
6
|
+
const VOIDED_EXTENSIBILITY_FORM_DATA_ANNOTATION_SOURCE_TYPE = "VoidedExtensibilityFormData";
|
|
7
|
+
exports.DECORATOR_TYPE_VOIDED_EXTENSIBILITY_FORM_DATA_LINE = "VOIDED_EXTENSIBILITY_FORM_DATA_DECORATOR";
|
|
8
|
+
class VoidedExtensibilityFormDataLineDecorator extends BaseExtensibilityFormDataLineDecorator_1.BaseExtensibilityFormDataLineDecorator {
|
|
9
|
+
constructor(voidSource, extensibilityFormDataLine, annotationSourceLineNumber) {
|
|
10
|
+
super(exports.DECORATOR_TYPE_VOIDED_EXTENSIBILITY_FORM_DATA_LINE, extensibilityFormDataLine, VoidedLineDecorator_1.DECORATOR_DESCRIPTION_VOIDED, VOIDED_EXTENSIBILITY_FORM_DATA_ANNOTATION_SOURCE_TYPE, annotationSourceLineNumber);
|
|
11
|
+
this._voidSource = voidSource;
|
|
12
|
+
}
|
|
13
|
+
static createFromJsonObject(transactionLineJsonObj, transactionLineFactory) {
|
|
14
|
+
const decoratedTransactionLineJsonObj = BaseLineDecorator_1.BaseLineDecorator.getDecoratedTransactionLineJsonObjectFromJsonObject(transactionLineJsonObj);
|
|
15
|
+
const decoratedLine = transactionLineFactory.createTransactionLineFromJsonObj(decoratedTransactionLineJsonObj);
|
|
16
|
+
const annotationSourceLineNumber = BaseLineDecorator_1.BaseLineDecorator.getAnnotationSourceLineNumberFromJsonObject(transactionLineJsonObj);
|
|
17
|
+
const voidSource = transactionLineJsonObj._voidSource;
|
|
18
|
+
const voidedExtensibilityFormDataLineDecorator = new VoidedExtensibilityFormDataLineDecorator(voidSource, decoratedLine, annotationSourceLineNumber);
|
|
19
|
+
return voidedExtensibilityFormDataLineDecorator;
|
|
20
|
+
}
|
|
21
|
+
get preventsTransactionVoid() {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
get allowVoid() {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
get voided() {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
get voidSource() {
|
|
31
|
+
return this._voidSource;
|
|
32
|
+
}
|
|
33
|
+
newTransactionLine() {
|
|
34
|
+
return new VoidedExtensibilityFormDataLineDecorator(this._voidSource, this.decoratedTransactionLine, this.annotationSourceLineNumber);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.VoidedExtensibilityFormDataLineDecorator = VoidedExtensibilityFormDataLineDecorator;
|
|
38
|
+
//# sourceMappingURL=VoidedExtensibilityFormDataLineDecorator.js.map
|
|
@@ -4,4 +4,6 @@ function __export(m) {
|
|
|
4
4
|
}
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
__export(require("./ExtensibilityFormDataLine"));
|
|
7
|
+
__export(require("./VoidedExtensibilityFormDataLineDecorator"));
|
|
8
|
+
__export(require("./BaseExtensibilityFormDataLineDecorator"));
|
|
7
9
|
//# 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.32.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",
|