@daffodil/payment 0.79.0 → 0.81.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/fesm2022/daffodil-payment-driver-in-memory.mjs +10 -10
- package/fesm2022/daffodil-payment-driver-in-memory.mjs.map +1 -1
- package/fesm2022/daffodil-payment-driver-testing.mjs +7 -7
- package/fesm2022/daffodil-payment-driver-testing.mjs.map +1 -1
- package/fesm2022/daffodil-payment-driver.mjs.map +1 -1
- package/fesm2022/daffodil-payment-state-testing.mjs +7 -7
- package/fesm2022/daffodil-payment-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-payment-state.mjs +8 -7
- package/fesm2022/daffodil-payment-state.mjs.map +1 -1
- package/fesm2022/daffodil-payment-testing.mjs +14 -13
- package/fesm2022/daffodil-payment-testing.mjs.map +1 -1
- package/package.json +1 -1
- package/esm2022/daffodil-payment.mjs +0 -5
- package/esm2022/driver/daffodil-payment-driver.mjs +0 -5
- package/esm2022/driver/errors/invalid-api-response.mjs +0 -13
- package/esm2022/driver/errors/map.mjs +0 -8
- package/esm2022/driver/errors/public_api.mjs +0 -3
- package/esm2022/driver/in-memory/backend/payment.service.mjs +0 -54
- package/esm2022/driver/in-memory/collection-name.const.mjs +0 -2
- package/esm2022/driver/in-memory/daffodil-payment-driver-in-memory.mjs +0 -5
- package/esm2022/driver/in-memory/driver/payment-driver.module.mjs +0 -37
- package/esm2022/driver/in-memory/driver/payment.service.mjs +0 -31
- package/esm2022/driver/in-memory/index.mjs +0 -2
- package/esm2022/driver/in-memory/public_api.mjs +0 -4
- package/esm2022/driver/index.mjs +0 -2
- package/esm2022/driver/interfaces/payment-service.interface.mjs +0 -11
- package/esm2022/driver/public_api.mjs +0 -3
- package/esm2022/driver/testing/daffodil-payment-driver-testing.mjs +0 -5
- package/esm2022/driver/testing/drivers/payment-driver.module.mjs +0 -30
- package/esm2022/driver/testing/drivers/payment.service.mjs +0 -28
- package/esm2022/driver/testing/drivers/public_api.mjs +0 -3
- package/esm2022/driver/testing/index.mjs +0 -2
- package/esm2022/driver/testing/public_api.mjs +0 -2
- package/esm2022/index.mjs +0 -2
- package/esm2022/models/public_api.mjs +0 -2
- package/esm2022/models/request.type.mjs +0 -2
- package/esm2022/models/response.type.mjs +0 -2
- package/esm2022/public_api.mjs +0 -2
- package/esm2022/state/actions/payment.actions.mjs +0 -27
- package/esm2022/state/daffodil-payment-state.mjs +0 -5
- package/esm2022/state/facades/payment/facade.mjs +0 -31
- package/esm2022/state/facades/payment/interface.mjs +0 -2
- package/esm2022/state/facades/public_api.mjs +0 -2
- package/esm2022/state/index.mjs +0 -2
- package/esm2022/state/injection-tokens/available-processors.token.mjs +0 -13
- package/esm2022/state/injection-tokens/error-matcher.token.mjs +0 -13
- package/esm2022/state/injection-tokens/processor-collection.token.mjs +0 -18
- package/esm2022/state/injection-tokens/public_api.mjs +0 -4
- package/esm2022/state/models/available-processor.type.mjs +0 -2
- package/esm2022/state/models/processor-collection.type.mjs +0 -2
- package/esm2022/state/models/public_api.mjs +0 -2
- package/esm2022/state/payment.module.mjs +0 -23
- package/esm2022/state/public_api.mjs +0 -8
- package/esm2022/state/reducers/payment/adapter.mjs +0 -37
- package/esm2022/state/reducers/payment/initial-state.mjs +0 -8
- package/esm2022/state/reducers/payment/interface.mjs +0 -2
- package/esm2022/state/reducers/payment/public_api.mjs +0 -4
- package/esm2022/state/reducers/payment/reducer.mjs +0 -20
- package/esm2022/state/reducers/public_api.mjs +0 -4
- package/esm2022/state/reducers/reducers.interface.mjs +0 -2
- package/esm2022/state/reducers/store-feature-key.mjs +0 -5
- package/esm2022/state/reducers/token/extra.token.mjs +0 -22
- package/esm2022/state/reducers/token/public_api.mjs +0 -2
- package/esm2022/state/reducers/token/reducers.token.mjs +0 -28
- package/esm2022/state/selectors/feature.selector.mjs +0 -9
- package/esm2022/state/selectors/payment.selector.mjs +0 -20
- package/esm2022/state/selectors/public_api.mjs +0 -2
- package/esm2022/state/testing/daffodil-payment-state-testing.mjs +0 -5
- package/esm2022/state/testing/index.mjs +0 -2
- package/esm2022/state/testing/mock-payment-facade.mjs +0 -23
- package/esm2022/state/testing/payment-testing.module.mjs +0 -23
- package/esm2022/state/testing/public_api.mjs +0 -3
- package/esm2022/testing/daffodil-payment-testing.mjs +0 -5
- package/esm2022/testing/factories/kind.factory.mjs +0 -37
- package/esm2022/testing/factories/payment-request.factory.mjs +0 -30
- package/esm2022/testing/factories/payment-response.factory.mjs +0 -30
- package/esm2022/testing/factories/public_api.mjs +0 -4
- package/esm2022/testing/index.mjs +0 -2
- package/esm2022/testing/injection-tokens/factories/kind.token.mjs +0 -29
- package/esm2022/testing/injection-tokens/public_api.mjs +0 -2
- package/esm2022/testing/public_api.mjs +0 -4
- package/esm2022/testing/testing.module.mjs +0 -23
|
@@ -49,10 +49,10 @@ class DaffPaymentInMemoryBackendService {
|
|
|
49
49
|
body: this.factory.create(),
|
|
50
50
|
}));
|
|
51
51
|
}
|
|
52
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
53
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
52
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentInMemoryBackendService, deps: [{ token: i1.DaffPaymentResponseKindFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
53
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentInMemoryBackendService, providedIn: 'root' }); }
|
|
54
54
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentInMemoryBackendService, decorators: [{
|
|
56
56
|
type: Injectable,
|
|
57
57
|
args: [{
|
|
58
58
|
providedIn: 'root',
|
|
@@ -72,10 +72,10 @@ class DaffPaymentInMemoryDriver extends DaffInMemoryDriverBase {
|
|
|
72
72
|
generateToken(request) {
|
|
73
73
|
return this.http.get(this.url);
|
|
74
74
|
}
|
|
75
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
76
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
75
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentInMemoryDriver, deps: [{ token: i1$1.HttpClient }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
76
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentInMemoryDriver, providedIn: 'root' }); }
|
|
77
77
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentInMemoryDriver, decorators: [{
|
|
79
79
|
type: Injectable,
|
|
80
80
|
args: [{
|
|
81
81
|
providedIn: 'root',
|
|
@@ -95,13 +95,13 @@ class DaffPaymentInMemoryDriverModule {
|
|
|
95
95
|
],
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
99
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
98
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
99
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentInMemoryDriverModule, imports: [CommonModule,
|
|
100
100
|
DaffPaymentTestingModule] }); }
|
|
101
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
101
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentInMemoryDriverModule, imports: [CommonModule,
|
|
102
102
|
DaffPaymentTestingModule] }); }
|
|
103
103
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentInMemoryDriverModule, decorators: [{
|
|
105
105
|
type: NgModule,
|
|
106
106
|
args: [{
|
|
107
107
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-payment-driver-in-memory.mjs","sources":["../../../libs/payment/driver/in-memory/src/collection-name.const.ts","../../../libs/payment/driver/in-memory/src/backend/payment.service.ts","../../../libs/payment/driver/in-memory/src/driver/payment.service.ts","../../../libs/payment/driver/in-memory/src/driver/payment-driver.module.ts","../../../libs/payment/driver/in-memory/src/daffodil-payment-driver-in-memory.ts"],"sourcesContent":["export const DAFF_PAYMENT_IN_MEMORY_COLLECTION_NAME = 'payment';\n","import { Injectable } from '@angular/core';\nimport {\n InMemoryDbService,\n RequestInfoUtilities,\n ParsedRequestUrl,\n STATUS,\n RequestInfo,\n} from 'angular-in-memory-web-api';\n\nimport { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';\nimport { DaffPaymentResponseKindFactory } from '@daffodil/payment/testing';\n\nimport { DAFF_PAYMENT_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * An in-memory service that delegates payment queries to child backends\n * via the {@link DAFF_PAYMENT_IN_MEMORY_BACKENDS}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentInMemoryBackendService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {\n readonly collectionName = DAFF_PAYMENT_IN_MEMORY_COLLECTION_NAME;\n\n constructor(\n private factory: DaffPaymentResponseKindFactory,\n ) {}\n\n /**\n * Automatically called as part of the InMemoryDbService to parse incoming urls to match the InMemory backend urls.\n *\n * @param url initial url\n * @param utils utility to parse url\n * @returns ParsedRequestUrl\n * @docs-private\n */\n parseRequestUrl(url: string, utils: RequestInfoUtilities): ParsedRequestUrl {\n return utils.parseRequestUrl(url);\n }\n\n /**\n * @docs-private\n */\n createDb(): any {\n return {};\n }\n\n /**\n * Generates a token from a processor backend.\n *\n * @param reqInfo request object\n * @returns An http response object\n */\n get(reqInfo: RequestInfo) {\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.OK,\n body: this.factory.create(),\n }));\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\n\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\nimport {\n DaffPaymentRequest,\n DaffPaymentResponse,\n} from '@daffodil/payment';\nimport { DaffPaymentDriverInterface } from '@daffodil/payment/driver';\n\nimport { DAFF_PAYMENT_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * The payment inmemory driver to mock the payment backend service.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentInMemoryDriver extends DaffInMemoryDriverBase implements DaffPaymentDriverInterface {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_PAYMENT_IN_MEMORY_COLLECTION_NAME);\n }\n\n generateToken(request: DaffPaymentRequest): Observable<DaffPaymentResponse> {\n return this.http.get<DaffPaymentResponse>(this.url);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\nimport { provideDaffPaymentDriver } from '@daffodil/payment/driver';\nimport { DaffPaymentTestingModule } from '@daffodil/payment/testing';\n\nimport { DaffPaymentInMemoryDriver } from './payment.service';\nimport { DaffPaymentInMemoryBackendService } from '../backend/payment.service';\n\n/**\n * Provides the {@link DaffPaymentInMemoryDriver} as the {@link DaffPaymentDriver}.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffPaymentTestingModule,\n ],\n})\nexport class DaffPaymentInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffPaymentInMemoryDriverModule> {\n return {\n ngModule: DaffPaymentInMemoryDriverModule,\n providers: [\n provideDaffPaymentDriver(DaffPaymentInMemoryDriver),\n provideDaffInMemoryBackends(DaffPaymentInMemoryBackendService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAAO,MAAM,sCAAsC,GAAG,SAAS;;ACc/D;;;AAGG;MAIU,iCAAiC,CAAA;AAG5C,IAAA,WAAA,CACU,OAAuC,EAAA;QAAvC,IAAO,CAAA,OAAA,GAAP,OAAO
|
|
1
|
+
{"version":3,"file":"daffodil-payment-driver-in-memory.mjs","sources":["../../../libs/payment/driver/in-memory/src/collection-name.const.ts","../../../libs/payment/driver/in-memory/src/backend/payment.service.ts","../../../libs/payment/driver/in-memory/src/driver/payment.service.ts","../../../libs/payment/driver/in-memory/src/driver/payment-driver.module.ts","../../../libs/payment/driver/in-memory/src/daffodil-payment-driver-in-memory.ts"],"sourcesContent":["export const DAFF_PAYMENT_IN_MEMORY_COLLECTION_NAME = 'payment';\n","import { Injectable } from '@angular/core';\nimport {\n InMemoryDbService,\n RequestInfoUtilities,\n ParsedRequestUrl,\n STATUS,\n RequestInfo,\n} from 'angular-in-memory-web-api';\n\nimport { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';\nimport { DaffPaymentResponseKindFactory } from '@daffodil/payment/testing';\n\nimport { DAFF_PAYMENT_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * An in-memory service that delegates payment queries to child backends\n * via the {@link DAFF_PAYMENT_IN_MEMORY_BACKENDS}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentInMemoryBackendService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {\n readonly collectionName = DAFF_PAYMENT_IN_MEMORY_COLLECTION_NAME;\n\n constructor(\n private factory: DaffPaymentResponseKindFactory,\n ) {}\n\n /**\n * Automatically called as part of the InMemoryDbService to parse incoming urls to match the InMemory backend urls.\n *\n * @param url initial url\n * @param utils utility to parse url\n * @returns ParsedRequestUrl\n * @docs-private\n */\n parseRequestUrl(url: string, utils: RequestInfoUtilities): ParsedRequestUrl {\n return utils.parseRequestUrl(url);\n }\n\n /**\n * @docs-private\n */\n createDb(): any {\n return {};\n }\n\n /**\n * Generates a token from a processor backend.\n *\n * @param reqInfo request object\n * @returns An http response object\n */\n get(reqInfo: RequestInfo) {\n return reqInfo.utils.createResponse$(() => ({\n status: STATUS.OK,\n body: this.factory.create(),\n }));\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { InMemoryBackendConfig } from 'angular-in-memory-web-api';\nimport { Observable } from 'rxjs';\n\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\nimport {\n DaffPaymentRequest,\n DaffPaymentResponse,\n} from '@daffodil/payment';\nimport { DaffPaymentDriverInterface } from '@daffodil/payment/driver';\n\nimport { DAFF_PAYMENT_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * The payment inmemory driver to mock the payment backend service.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentInMemoryDriver extends DaffInMemoryDriverBase implements DaffPaymentDriverInterface {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_PAYMENT_IN_MEMORY_COLLECTION_NAME);\n }\n\n generateToken(request: DaffPaymentRequest): Observable<DaffPaymentResponse> {\n return this.http.get<DaffPaymentResponse>(this.url);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\nimport { provideDaffPaymentDriver } from '@daffodil/payment/driver';\nimport { DaffPaymentTestingModule } from '@daffodil/payment/testing';\n\nimport { DaffPaymentInMemoryDriver } from './payment.service';\nimport { DaffPaymentInMemoryBackendService } from '../backend/payment.service';\n\n/**\n * Provides the {@link DaffPaymentInMemoryDriver} as the {@link DaffPaymentDriver}.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffPaymentTestingModule,\n ],\n})\nexport class DaffPaymentInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffPaymentInMemoryDriverModule> {\n return {\n ngModule: DaffPaymentInMemoryDriverModule,\n providers: [\n provideDaffPaymentDriver(DaffPaymentInMemoryDriver),\n provideDaffInMemoryBackends(DaffPaymentInMemoryBackendService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;AAAO,MAAM,sCAAsC,GAAG,SAAS;;ACc/D;;;AAGG;MAIU,iCAAiC,CAAA;AAG5C,IAAA,WAAA,CACU,OAAuC,EAAA;QAAvC,IAAO,CAAA,OAAA,GAAP,OAAO;QAHR,IAAc,CAAA,cAAA,GAAG,sCAAsC;;AAMhE;;;;;;;AAOG;IACH,eAAe,CAAC,GAAW,EAAE,KAA2B,EAAA;AACtD,QAAA,OAAO,KAAK,CAAC,eAA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C,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,wBAAwB;AACzB,qBAAA;AACF,iBAAA;;;ACrBD;;AAEG;;;;"}
|
|
@@ -18,10 +18,10 @@ class DaffPaymentTestingDriver {
|
|
|
18
18
|
generateToken(request) {
|
|
19
19
|
return of(this.paymentResponseFactory.create());
|
|
20
20
|
}
|
|
21
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
22
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
21
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentTestingDriver, deps: [{ token: i1.DaffPaymentResponseKindFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
22
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentTestingDriver, providedIn: 'root' }); }
|
|
23
23
|
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentTestingDriver, decorators: [{
|
|
25
25
|
type: Injectable,
|
|
26
26
|
args: [{
|
|
27
27
|
providedIn: 'root',
|
|
@@ -40,11 +40,11 @@ class DaffPaymentTestingDriverModule {
|
|
|
40
40
|
],
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
44
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
45
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
43
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentTestingDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
44
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentTestingDriverModule, imports: [CommonModule] }); }
|
|
45
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentTestingDriverModule, imports: [CommonModule] }); }
|
|
46
46
|
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentTestingDriverModule, decorators: [{
|
|
48
48
|
type: NgModule,
|
|
49
49
|
args: [{
|
|
50
50
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-payment-driver-testing.mjs","sources":["../../../libs/payment/driver/testing/src/drivers/payment.service.ts","../../../libs/payment/driver/testing/src/drivers/payment-driver.module.ts","../../../libs/payment/driver/testing/src/daffodil-payment-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffPaymentRequest,\n DaffPaymentResponse,\n} from '@daffodil/payment';\nimport { DaffPaymentDriverInterface } from '@daffodil/payment/driver';\nimport { DaffPaymentResponseKindFactory } from '@daffodil/payment/testing';\n\n/**\n * A basic payment driver that creates mock payment results of different kinds.\n * For testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentTestingDriver implements DaffPaymentDriverInterface {\n\n constructor(\n private paymentResponseFactory: DaffPaymentResponseKindFactory,\n ) {}\n\n generateToken(request: DaffPaymentRequest): Observable<DaffPaymentResponse> {\n return of(this.paymentResponseFactory.create());\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffPaymentDriver } from '@daffodil/payment/driver';\n\nimport { DaffPaymentTestingDriver } from './payment.service';\n\n/**\n * Provides the {@link DaffPaymentTestingDriver} as the {@link DaffPaymentDriver}.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffPaymentTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffPaymentTestingDriverModule> {\n return {\n ngModule: DaffPaymentTestingDriverModule,\n providers: [\n provideDaffPaymentDriver(DaffPaymentTestingDriver),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAaA;;;;;AAKG;MAIU,wBAAwB,CAAA;AAEnC,IAAA,WAAA,CACU,sBAAsD,EAAA;QAAtD,IAAsB,CAAA,sBAAA,GAAtB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"daffodil-payment-driver-testing.mjs","sources":["../../../libs/payment/driver/testing/src/drivers/payment.service.ts","../../../libs/payment/driver/testing/src/drivers/payment-driver.module.ts","../../../libs/payment/driver/testing/src/daffodil-payment-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffPaymentRequest,\n DaffPaymentResponse,\n} from '@daffodil/payment';\nimport { DaffPaymentDriverInterface } from '@daffodil/payment/driver';\nimport { DaffPaymentResponseKindFactory } from '@daffodil/payment/testing';\n\n/**\n * A basic payment driver that creates mock payment results of different kinds.\n * For testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentTestingDriver implements DaffPaymentDriverInterface {\n\n constructor(\n private paymentResponseFactory: DaffPaymentResponseKindFactory,\n ) {}\n\n generateToken(request: DaffPaymentRequest): Observable<DaffPaymentResponse> {\n return of(this.paymentResponseFactory.create());\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffPaymentDriver } from '@daffodil/payment/driver';\n\nimport { DaffPaymentTestingDriver } from './payment.service';\n\n/**\n * Provides the {@link DaffPaymentTestingDriver} as the {@link DaffPaymentDriver}.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffPaymentTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffPaymentTestingDriverModule> {\n return {\n ngModule: DaffPaymentTestingDriverModule,\n providers: [\n provideDaffPaymentDriver(DaffPaymentTestingDriver),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAaA;;;;;AAKG;MAIU,wBAAwB,CAAA;AAEnC,IAAA,WAAA,CACU,sBAAsD,EAAA;QAAtD,IAAsB,CAAA,sBAAA,GAAtB,sBAAsB;;AAGhC,IAAA,aAAa,CAAC,OAA2B,EAAA;QACvC,OAAO,EAAE,CAAC,IAAI,CAAC,sBAAsB,CAAC,MAAM,EAAE,CAAC;;iIAPtC,wBAAwB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxB,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cAFvB,MAAM,EAAA,CAAA,CAAA;;2FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACXD;;AAEG;MAMU,8BAA8B,CAAA;AACzC,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,8BAA8B;AACxC,YAAA,SAAS,EAAE;gBACT,wBAAwB,CAAC,wBAAwB,CAAC;AACnD,aAAA;SACF;;iIAPQ,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA9B,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8BAA8B,YAHvC,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8BAA8B,YAHvC,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGH,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAL1C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-payment-driver.mjs","sources":["../../../libs/payment/driver/src/interfaces/payment-service.interface.ts","../../../libs/payment/driver/src/errors/invalid-api-response.ts","../../../libs/payment/driver/src/errors/map.ts","../../../libs/payment/driver/src/daffodil-payment-driver.ts"],"sourcesContent":["import { Observable } from 'rxjs';\n\nimport { createSingletonInjectionToken } from '@daffodil/core';\nimport {\n DaffPaymentRequest,\n DaffPaymentResponse,\n} from '@daffodil/payment';\n\nexport const {\n /**\n * An injection token for the payment driver.\n */\n token: DaffPaymentDriver,\n /**\n * Provider function for {@link DaffPaymentDriver}.\n */\n provider: provideDaffPaymentDriver,\n} = createSingletonInjectionToken<DaffPaymentDriverInterface>('DaffPaymentDriver');\n\n/**\n * The payment driver is responsible for taking user payment input and generating a token for use with the platform.\n */\nexport interface DaffPaymentDriverInterface<\n T extends DaffPaymentResponse = DaffPaymentResponse,\n> {\n /**\n * Generate a payment token.\n */\n generateToken(request: DaffPaymentRequest): Observable<T>;\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE = 'DAFF_PAYMENT_INVALID_API_RESPONSE';\n\n/**\n * A general error indicating that the platform returned a response which cannot be processed.\n */\nexport class DaffPaymentInvalidAPIResponseError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffPaymentInvalidAPIResponseError,\n DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE,\n} from './invalid-api-response';\n\n/**\n * A mapping from error codes to error class constructors.\n */\nexport const DaffPaymentDriverErrorMap = {\n [DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE]: DaffPaymentInvalidAPIResponseError,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAQa,MAAA;AACX;;AAEG;AACH,KAAK,EAAE,iBAAiB;AACxB;;AAEG;AACH,QAAQ,EAAE,wBAAwB,GACnC,GAAG,6BAA6B,CAA6B,mBAAmB;;ACZ1E,MAAM,4CAA4C,GAAG
|
|
1
|
+
{"version":3,"file":"daffodil-payment-driver.mjs","sources":["../../../libs/payment/driver/src/interfaces/payment-service.interface.ts","../../../libs/payment/driver/src/errors/invalid-api-response.ts","../../../libs/payment/driver/src/errors/map.ts","../../../libs/payment/driver/src/daffodil-payment-driver.ts"],"sourcesContent":["import { Observable } from 'rxjs';\n\nimport { createSingletonInjectionToken } from '@daffodil/core';\nimport {\n DaffPaymentRequest,\n DaffPaymentResponse,\n} from '@daffodil/payment';\n\nexport const {\n /**\n * An injection token for the payment driver.\n */\n token: DaffPaymentDriver,\n /**\n * Provider function for {@link DaffPaymentDriver}.\n */\n provider: provideDaffPaymentDriver,\n} = createSingletonInjectionToken<DaffPaymentDriverInterface>('DaffPaymentDriver');\n\n/**\n * The payment driver is responsible for taking user payment input and generating a token for use with the platform.\n */\nexport interface DaffPaymentDriverInterface<\n T extends DaffPaymentResponse = DaffPaymentResponse,\n> {\n /**\n * Generate a payment token.\n */\n generateToken(request: DaffPaymentRequest): Observable<T>;\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '@daffodil/core';\n\nexport const DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE = 'DAFF_PAYMENT_INVALID_API_RESPONSE';\n\n/**\n * A general error indicating that the platform returned a response which cannot be processed.\n */\nexport class DaffPaymentInvalidAPIResponseError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE;\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import {\n DaffPaymentInvalidAPIResponseError,\n DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE,\n} from './invalid-api-response';\n\n/**\n * A mapping from error codes to error class constructors.\n */\nexport const DaffPaymentDriverErrorMap = {\n [DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE]: DaffPaymentInvalidAPIResponseError,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAQa,MAAA;AACX;;AAEG;AACH,KAAK,EAAE,iBAAiB;AACxB;;AAEG;AACH,QAAQ,EAAE,wBAAwB,GACnC,GAAG,6BAA6B,CAA6B,mBAAmB;;ACZ1E,MAAM,4CAA4C,GAAG;AAE5D;;AAEG;AACG,MAAO,kCAAmC,SAAQ,oBAAoB,CAAA;AAG1E,IAAA,WAAA,CAAmB,OAAe,EAAA;QAChC,KAAK,CAAC,OAAO,CAAC;QADG,IAAO,CAAA,OAAA,GAAP,OAAO;QAFV,IAAI,CAAA,IAAA,GAAW,4CAA4C;;AAK5E;;ACXD;;AAEG;AACU,MAAA,yBAAyB,GAAG;IACvC,CAAC,4CAA4C,GAAG,kCAAkC;;;ACTpF;;AAEG;;;;"}
|
|
@@ -15,10 +15,10 @@ class MockDaffPaymentPageFacade {
|
|
|
15
15
|
}
|
|
16
16
|
dispatch(action) { }
|
|
17
17
|
;
|
|
18
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
19
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
18
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: MockDaffPaymentPageFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
19
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: MockDaffPaymentPageFacade, providedIn: 'root' }); }
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: MockDaffPaymentPageFacade, decorators: [{
|
|
22
22
|
type: Injectable,
|
|
23
23
|
args: [{ providedIn: 'root' }]
|
|
24
24
|
}] });
|
|
@@ -27,13 +27,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
|
27
27
|
* Provides the {@link MockDaffPaymentPageFacade} for {@link DaffPaymentPageFacade}.
|
|
28
28
|
*/
|
|
29
29
|
class DaffPaymentStateTestingModule {
|
|
30
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
31
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
32
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
30
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentStateTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
31
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentStateTestingModule }); }
|
|
32
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentStateTestingModule, providers: [
|
|
33
33
|
{ provide: DaffPaymentPageFacade, useExisting: MockDaffPaymentPageFacade },
|
|
34
34
|
] }); }
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentStateTestingModule, decorators: [{
|
|
37
37
|
type: NgModule,
|
|
38
38
|
args: [{
|
|
39
39
|
providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-payment-state-testing.mjs","sources":["../../../libs/payment/state/testing/src/mock-payment-facade.ts","../../../libs/payment/state/testing/src/payment-testing.module.ts","../../../libs/payment/state/testing/src/daffodil-payment-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffPaymentPageFacadeInterface } from '@daffodil/payment/state';\n\n/**\n * Mocks out facade fields and methods for testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffPaymentPageFacade implements DaffPaymentPageFacadeInterface {\n loading$ = new BehaviorSubject<boolean>(null);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffPaymentPageFacade } from '@daffodil/payment/state';\n\nimport { MockDaffPaymentPageFacade } from './mock-payment-facade';\n\n/**\n * Provides the {@link MockDaffPaymentPageFacade} for {@link DaffPaymentPageFacade}.\n */\n@NgModule({\n providers: [\n { provide: DaffPaymentPageFacade, useExisting: MockDaffPaymentPageFacade },\n ],\n})\nexport class DaffPaymentStateTestingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAOA;;;;AAIG;MAEU,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,eAAe,CAAU,IAAI,CAAC
|
|
1
|
+
{"version":3,"file":"daffodil-payment-state-testing.mjs","sources":["../../../libs/payment/state/testing/src/mock-payment-facade.ts","../../../libs/payment/state/testing/src/payment-testing.module.ts","../../../libs/payment/state/testing/src/daffodil-payment-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffPaymentPageFacadeInterface } from '@daffodil/payment/state';\n\n/**\n * Mocks out facade fields and methods for testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffPaymentPageFacade implements DaffPaymentPageFacadeInterface {\n loading$ = new BehaviorSubject<boolean>(null);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffPaymentPageFacade } from '@daffodil/payment/state';\n\nimport { MockDaffPaymentPageFacade } from './mock-payment-facade';\n\n/**\n * Provides the {@link MockDaffPaymentPageFacade} for {@link DaffPaymentPageFacade}.\n */\n@NgModule({\n providers: [\n { provide: DaffPaymentPageFacade, useExisting: MockDaffPaymentPageFacade },\n ],\n})\nexport class DaffPaymentStateTestingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAOA;;;;AAIG;MAEU,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,eAAe,CAAU,IAAI,CAAC;AAC7C,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAAmB,EAAE,CAAC;AAGpD;IADC,QAAQ,CAAC,MAAc,EAAA;;iIAJZ,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzB,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cADZ,MAAM,EAAA,CAAA,CAAA;;2FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACNlC;;AAEG;MAMU,6BAA6B,CAAA;iIAA7B,6BAA6B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAA7B,6BAA6B,EAAA,CAAA,CAAA;AAA7B,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6BAA6B,EAJ7B,SAAA,EAAA;AACT,YAAA,EAAE,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,yBAAyB,EAAE;AAC3E,SAAA,EAAA,CAAA,CAAA;;2FAEU,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBALzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,yBAAyB,EAAE;AAC3E,qBAAA;AACF,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -47,6 +47,7 @@ token: DAFF_PAYMENT_EXTRA_REDUCERS,
|
|
|
47
47
|
/**
|
|
48
48
|
* Provides additional reducers that run after the standard Daffodil cart reducers.
|
|
49
49
|
*
|
|
50
|
+
* @example
|
|
50
51
|
* ```ts
|
|
51
52
|
* providers: [
|
|
52
53
|
* ...daffPaymentProvideExtraReducers(
|
|
@@ -161,10 +162,10 @@ class DaffPaymentPageFacade {
|
|
|
161
162
|
dispatch(action) {
|
|
162
163
|
this.store.dispatch(action);
|
|
163
164
|
}
|
|
164
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
165
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
165
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentPageFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
166
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentPageFacade, providedIn: 'root' }); }
|
|
166
167
|
}
|
|
167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentPageFacade, decorators: [{
|
|
168
169
|
type: Injectable,
|
|
169
170
|
args: [{
|
|
170
171
|
providedIn: 'root',
|
|
@@ -234,11 +235,11 @@ provider: provideDaffPaymentReducers, } = createSingleInjectionToken('DAFF_PAYME
|
|
|
234
235
|
* Creates the payment feature store.
|
|
235
236
|
*/
|
|
236
237
|
class DaffPaymentStateModule {
|
|
237
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
238
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
239
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
238
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
239
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentStateModule, imports: [i1.StoreFeatureModule] }); }
|
|
240
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentStateModule, imports: [StoreModule.forFeature(DAFF_PAYMENT_STORE_FEATURE_KEY, DAFF_PAYMENT_REDUCERS)] }); }
|
|
240
241
|
}
|
|
241
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentStateModule, decorators: [{
|
|
242
243
|
type: NgModule,
|
|
243
244
|
args: [{
|
|
244
245
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-payment-state.mjs","sources":["../../../libs/payment/state/src/actions/payment.actions.ts","../../../libs/payment/state/src/reducers/store-feature-key.ts","../../../libs/payment/state/src/reducers/token/extra.token.ts","../../../libs/payment/state/src/reducers/payment/adapter.ts","../../../libs/payment/state/src/reducers/payment/initial-state.ts","../../../libs/payment/state/src/reducers/payment/reducer.ts","../../../libs/payment/state/src/selectors/feature.selector.ts","../../../libs/payment/state/src/selectors/payment.selector.ts","../../../libs/payment/state/src/facades/payment/facade.ts","../../../libs/payment/state/src/injection-tokens/available-processors.token.ts","../../../libs/payment/state/src/injection-tokens/processor-collection.token.ts","../../../libs/payment/state/src/injection-tokens/error-matcher.token.ts","../../../libs/payment/state/src/reducers/token/reducers.token.ts","../../../libs/payment/state/src/payment.module.ts","../../../libs/payment/state/src/daffodil-payment-state.ts"],"sourcesContent":["import { Action } from '@ngrx/store';\n\nimport { DaffIdentifiable } from '@daffodil/core';\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffPersonalAddress } from '@daffodil/geography';\nimport {\n DaffPaymentRequest,\n DaffPaymentResponse,\n} from '@daffodil/payment';\n\n/**\n * The payment action types enum.\n */\nexport enum DaffPaymentActionTypes {\n GenerateTokenSuccessAction = '[@daffodil/payment] Generate Token Success Action',\n GenerateTokenFailureAction = '[@daffodil/payment] Generate Token Failure Action',\n}\n\n/**\n * Generates a payment token.\n *\n * @param query The payment query.\n */\nexport interface DaffPaymentGenerateTokenPayload<T extends DaffPaymentRequest = DaffPaymentRequest> {\n readonly request: T;\n readonly address?: DaffPersonalAddress | DaffIdentifiable;\n}\nexport interface DaffPaymentGenerateToken<T extends DaffPaymentRequest = DaffPaymentRequest> extends DaffPaymentGenerateTokenPayload<T>, Action {}\n\n/**\n * Indicates a successful generation of a payment token.\n */\nexport class DaffPaymentGenerateTokenSuccess<T extends DaffPaymentResponse = DaffPaymentResponse> implements Action {\n readonly type = DaffPaymentActionTypes.GenerateTokenSuccessAction;\n\n constructor(public payload: T) {}\n}\n\n/**\n * A failed payment with the error message.\n */\nexport class DaffPaymentGenerateTokenFailure implements Action {\n readonly type = DaffPaymentActionTypes.GenerateTokenFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\n/**\n * A union of the payment action types.\n */\nexport type DaffPaymentActions<\n T extends DaffPaymentResponse = DaffPaymentResponse,\n> =\n | DaffPaymentGenerateTokenSuccess<T>\n | DaffPaymentGenerateTokenFailure;\n","/**\n * The key under which the payment feature state will be stored.\n */\nexport const DAFF_PAYMENT_STORE_FEATURE_KEY = 'daffPayment';\n","import { ActionReducer } from '@ngrx/store';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\n\nimport { DaffPaymentReducersState } from '../reducers.interface';\n\nexport const {\n /**\n * A token to hold the injectable extra reducers.\n *\n * Prefer using {@link daffPaymentProvideExtraReducers}.\n */\n token: DAFF_PAYMENT_EXTRA_REDUCERS,\n\n /**\n * Provides additional reducers that run after the standard Daffodil cart reducers.\n *\n * ```ts\n * providers: [\n * ...daffPaymentProvideExtraReducers(\n * myReducer1,\n * myReducer2\n * )\n * ]\n * ```\n */\n provider: daffPaymentProvideExtraReducers,\n} = createMultiInjectionToken<ActionReducer<DaffPaymentReducersState>>(\n 'DAFF_PAYMENT_EXTRA_REDUCERS',\n { providedIn: 'any' },\n);\n","import { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffPaymentReducerState } from './interface';\n\n/**\n * Manages {@link DaffPaymentReducerState}.\n */\nexport class DaffPaymentStateReducerAdapter {\n\n /**\n * Begins the payment operation flow.\n * Sets loading to true.\n */\n generateToken(state: DaffPaymentReducerState): DaffPaymentReducerState {\n return {\n ...state,\n loading: true,\n };\n }\n\n /**\n * Sets loading to false and resets errors.\n */\n tokenGenerated(state: DaffPaymentReducerState): DaffPaymentReducerState {\n return {\n ...state,\n loading: false,\n errors: [],\n };\n }\n\n /**\n * Stores the from a failed payment.\n * Also sets loading to false.\n */\n storeError(errors: DaffStateError[], state: DaffPaymentReducerState): DaffPaymentReducerState {\n return {\n ...state,\n errors,\n loading: false,\n };\n }\n}\n","import { DaffPaymentReducerState } from './interface';\n\n/**\n * The initial state for the main payment state, see {@link DaffPaymentReducerState}.\n */\nexport const daffPaymentInitialState: DaffPaymentReducerState = {\n loading: false,\n errors: [],\n};\n","import { DaffPaymentResponse } from '@daffodil/payment';\n\nimport { DaffPaymentStateReducerAdapter } from './adapter';\nimport { daffPaymentInitialState } from './initial-state';\nimport { DaffPaymentReducerState } from './interface';\nimport {\n DaffPaymentGenerateToken,\n DaffPaymentActionTypes,\n DaffPaymentActions,\n DaffPaymentGenerateTokenFailure,\n} from '../../actions/payment.actions';\n\n/**\n * The reducer for the payment page state, see {@link DaffPaymentReducerState}.\n */\nexport const daffPaymentReducerFactory = <T extends DaffPaymentResponse = DaffPaymentResponse>(actions: DaffPaymentGenerateToken['type'][]) =>\n (\n state = daffPaymentInitialState,\n action: DaffPaymentActions<T>,\n ): DaffPaymentReducerState => {\n const adapter = new DaffPaymentStateReducerAdapter();\n switch (true) {\n case actions.includes(action.type):\n return adapter.generateToken(state);\n\n case action.type === DaffPaymentActionTypes.GenerateTokenSuccessAction:\n return adapter.tokenGenerated(state);\n\n case action.type === DaffPaymentActionTypes.GenerateTokenFailureAction:\n return adapter.storeError([(<DaffPaymentGenerateTokenFailure>action).payload], state);\n\n default:\n return state;\n }\n };\n","import {\n createFeatureSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n DaffPaymentStateRootSlice,\n DaffPaymentReducersState,\n DAFF_PAYMENT_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\n/**\n * Selector for the payment feature state.\n */\nexport interface DaffPaymentFeatureSelector {\n selectPaymentFeatureState: MemoizedSelector<DaffPaymentStateRootSlice, DaffPaymentReducersState>;\n}\n\nexport const getDaffPaymentReducersStateSelector = (() => {\n let cache;\n return (): DaffPaymentFeatureSelector =>\n cache = cache || {\n selectPaymentFeatureState: createFeatureSelector<DaffPaymentReducersState>(DAFF_PAYMENT_STORE_FEATURE_KEY),\n };\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { getDaffPaymentReducersStateSelector } from './feature.selector';\nimport { DaffPaymentStateRootSlice } from '../reducers/public_api';\n\n/**\n * Selectors for the main part of payment state.\n */\nexport interface DaffPaymentSelectors {\n /**\n * Selects whether there is a pending payment operation.\n */\n selectPaymentLoading: MemoizedSelector<DaffPaymentStateRootSlice, boolean>;\n /**\n * Selects the list of payment errors, if any.\n */\n selectPaymentErrors: MemoizedSelector<DaffPaymentStateRootSlice, DaffStateError[]>;\n}\n\n/**\n * Creates a group of selectors for {@link DaffPaymentReducerState} that use the passed state selector as the basis.\n */\nconst daffPaymentCreateSelectors = () => {\n const { selectPaymentFeatureState } = getDaffPaymentReducersStateSelector();\n const selectPaymentState = createSelector(\n selectPaymentFeatureState,\n state => state.payment,\n );\n\n const selectPaymentLoading = createSelector(\n selectPaymentState,\n state => state.loading,\n );\n\n const selectPaymentErrors = createSelector(\n selectPaymentState,\n state => state.errors,\n );\n\n return {\n selectPaymentLoading,\n selectPaymentErrors,\n };\n};\n\n\nexport const daffPaymentGetSelectors = (() => {\n let cache;\n return (): DaffPaymentSelectors =>\n cache = cache || daffPaymentCreateSelectors();\n})();\n\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffPaymentPageFacadeInterface } from './interface';\nimport { DaffPaymentStateRootSlice } from '../../reducers/public_api';\nimport { daffPaymentGetSelectors } from '../../selectors/public_api';\n\n/**\n * @inheritdoc\n *\n * Serves as the base for a payment facade.\n * Extend this class and pass in the selectors for the specific state you wish to target.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentPageFacade implements DaffPaymentPageFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(\n private store: Store<DaffPaymentStateRootSlice>,\n ) {\n const {\n selectPaymentLoading,\n selectPaymentErrors,\n } = daffPaymentGetSelectors();\n\n this.loading$ = this.store.pipe(select(selectPaymentLoading));\n this.errors$ = this.store.pipe(select(selectPaymentErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { createMultiInjectionToken } from '@daffodil/core';\n\nimport { DaffPaymentAvailableProcessor } from '../models/public_api';\n\nexport const {\n /**\n * A multi-provider injection token for registering payment processors.\n */\n token: DAFF_PAYMENT_AVAILABLE_PROCESSORS,\n\n /**\n * Provides a payment processor registration.\n *\n * See {@link DaffPaymentAvailableProcessor}.\n */\n provider: daffPaymentProvideAvailableProcessors,\n} = createMultiInjectionToken<DaffPaymentAvailableProcessor>(\n 'DAFF_PAYMENT_AVAILABLE_PROCESSORS',\n { providedIn: 'any' },\n);\n","import { inject } from '@angular/core';\n\nimport {\n createSingleInjectionToken,\n daffArrayToDict,\n} from '@daffodil/core';\n\nimport { DAFF_PAYMENT_AVAILABLE_PROCESSORS } from './available-processors.token';\nimport { DaffPaymentProcessorCollection } from '../models/public_api';\n\nexport const {\n /**\n * An internal token to combine the available payment processors into a single collection.\n */\n token: DAFF_PAYMENT_PROCESSOR_COLLECTION,\n /**\n * Provider function for {@link DAFF_PAYMENT_PROCESSOR_COLLECTION}.\n */\n provider: provideDaffPaymentProcessorCollection,\n} = createSingleInjectionToken<DaffPaymentProcessorCollection>(\n 'DAFF_PAYMENT_PROCESSOR_COLLECTION',\n {\n factory: () => {\n const processors = inject(DAFF_PAYMENT_AVAILABLE_PROCESSORS);\n return daffArrayToDict(processors, ({ kind }) => kind);\n },\n },\n);\n","import { createSingleInjectionToken } from '@daffodil/core';\nimport { daffTransformErrorToStateError } from '@daffodil/core/state';\n\nexport const {\n /**\n * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.\n * Can be used to further refine Daffodil errors into more specific app errors.\n */\n token: DAFF_PAYMENT_ERROR_MATCHER,\n /**\n * Provider function for {@link DAFF_PAYMENT_ERROR_MATCHER}.\n */\n provider: provideDaffPaymentErrorMatcher,\n} = createSingleInjectionToken<typeof daffTransformErrorToStateError>(\n 'DAFF_PAYMENT_ERROR_MATCHER',\n { factory: () => daffTransformErrorToStateError },\n);\n","import { inject } from '@angular/core';\nimport {\n ActionReducer,\n combineReducers,\n} from '@ngrx/store';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\nimport { daffComposeReducers } from '@daffodil/core/state';\n// these unused imports are a workaround\nimport { DaffPaymentResponse } from '@daffodil/payment';\n\nimport { DAFF_PAYMENT_EXTRA_REDUCERS } from './extra.token';\nimport { DAFF_PAYMENT_AVAILABLE_PROCESSORS } from '../../injection-tokens/public_api';\nimport { daffPaymentReducerFactory } from '../payment/reducer';\nimport { DaffPaymentReducersState } from '../reducers.interface';\n\nexport const {\n /**\n * An internal token to hold the Daffodil payment reducers.\n * Includes the extra and standard reducers.\n *\n * @docs-private\n */\n token: DAFF_PAYMENT_REDUCERS,\n /**\n * Provider function for {@link DAFF_PAYMENT_REDUCERS}.\n */\n provider: provideDaffPaymentReducers,\n} = createSingleInjectionToken<ActionReducer<DaffPaymentReducersState>>(\n 'DAFF_PAYMENT_REDUCERS',\n {\n providedIn: 'any',\n factory: () => daffComposeReducers([\n combineReducers({\n payment: daffPaymentReducerFactory(inject(DAFF_PAYMENT_AVAILABLE_PROCESSORS).map(({ action }) => action)),\n }),\n ...inject(DAFF_PAYMENT_EXTRA_REDUCERS),\n ]),\n },\n);\n","import { NgModule } from '@angular/core';\nimport { StoreModule } from '@ngrx/store';\n\nimport { DAFF_PAYMENT_STORE_FEATURE_KEY } from './reducers/public_api';\nimport { DAFF_PAYMENT_REDUCERS } from './reducers/token/reducers.token';\n\n/**\n * Creates the payment feature store.\n */\n@NgModule({\n imports: [\n StoreModule.forFeature(DAFF_PAYMENT_STORE_FEATURE_KEY, DAFF_PAYMENT_REDUCERS),\n ],\n})\nexport class DaffPaymentStateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAUA;;AAEG;IACS,uBAGX;AAHD,CAAA,UAAY,sBAAsB,EAAA;AAChC,IAAA,sBAAA,CAAA,4BAAA,CAAA,GAAA,mDAAgF,CAAA;AAChF,IAAA,sBAAA,CAAA,4BAAA,CAAA,GAAA,mDAAgF,CAAA;AAClF,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,GAGjC,EAAA,CAAA,CAAA,CAAA;AAaD;;AAEG;MACU,+BAA+B,CAAA;AAG1C,IAAA,WAAA,CAAmB,OAAU,EAAA;QAAV,IAAO,CAAA,OAAA,GAAP,OAAO,CAAG;AAFpB,QAAA,IAAA,CAAA,IAAI,GAAG,sBAAsB,CAAC,0BAA0B,CAAC;KAEjC;AAClC,CAAA;AAED;;AAEG;MACU,+BAA+B,CAAA;AAG1C,IAAA,WAAA,CAAmB,OAAuB,EAAA;QAAvB,IAAO,CAAA,OAAA,GAAP,OAAO,CAAgB;AAFjC,QAAA,IAAA,CAAA,IAAI,GAAG,sBAAsB,CAAC,0BAA0B,CAAC;KAEpB;AAC/C;;AC7CD;;AAEG;AACI,MAAM,8BAA8B,GAAG;;ACGjC,MAAA;AACX;;;;AAIG;AACH,KAAK,EAAE,2BAA2B;AAElC;;;;;;;;;;;AAWG;AACH,QAAQ,EAAE,+BAA+B,GAC1C,GAAG,yBAAyB,CAC3B,6BAA6B,EAC7B,EAAE,UAAU,EAAE,KAAK,EAAE;;ACzBvB;;AAEG;MACU,8BAA8B,CAAA;AAEzC;;;AAGG;AACH,IAAA,aAAa,CAAC,KAA8B,EAAA;QAC1C,OAAO;AACL,YAAA,GAAG,KAAK;AACR,YAAA,OAAO,EAAE,IAAI;SACd,CAAC;KACH;AAED;;AAEG;AACH,IAAA,cAAc,CAAC,KAA8B,EAAA;QAC3C,OAAO;AACL,YAAA,GAAG,KAAK;AACR,YAAA,OAAO,EA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AmB,CAAC;AACjC,QAAA,eAAe,CAAC;AACd,YAAA,OAAO,EAAE,yBAAyB,CAAC,MAAM,CAAC,iCAAiC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC,CAAC;SAC1G,CAAC;QACF,GAAG,MAAM,CAAC,2BAA2B,CAAC;KACvC,CAAC;AACH,CAAA,CACF;;ACjCD;;AAEG;MAMU,sBAAsB,CAAA;iIAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;kIAAtB,sBAAsB,EAAA,OAAA,EAAA,CAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,CAAA,CAAA,EAAA;kIAAtB,sBAAsB,EAAA,OAAA,EAAA,CAH/B,WAAW,CAAC,UAAU,CAAC,8BAA8B,EAAE,qBAAqB,CAAC,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGpE,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBALlC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;AACP,wBAAA,WAAW,CAAC,UAAU,CAAC,8BAA8B,EAAE,qBAAqB,CAAC;AAC9E,qBAAA;AACF,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-payment-state.mjs","sources":["../../../libs/payment/state/src/actions/payment.actions.ts","../../../libs/payment/state/src/reducers/store-feature-key.ts","../../../libs/payment/state/src/reducers/token/extra.token.ts","../../../libs/payment/state/src/reducers/payment/adapter.ts","../../../libs/payment/state/src/reducers/payment/initial-state.ts","../../../libs/payment/state/src/reducers/payment/reducer.ts","../../../libs/payment/state/src/selectors/feature.selector.ts","../../../libs/payment/state/src/selectors/payment.selector.ts","../../../libs/payment/state/src/facades/payment/facade.ts","../../../libs/payment/state/src/injection-tokens/available-processors.token.ts","../../../libs/payment/state/src/injection-tokens/processor-collection.token.ts","../../../libs/payment/state/src/injection-tokens/error-matcher.token.ts","../../../libs/payment/state/src/reducers/token/reducers.token.ts","../../../libs/payment/state/src/payment.module.ts","../../../libs/payment/state/src/daffodil-payment-state.ts"],"sourcesContent":["import { Action } from '@ngrx/store';\n\nimport { DaffIdentifiable } from '@daffodil/core';\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffPersonalAddress } from '@daffodil/geography';\nimport {\n DaffPaymentRequest,\n DaffPaymentResponse,\n} from '@daffodil/payment';\n\n/**\n * The payment action types enum.\n */\nexport enum DaffPaymentActionTypes {\n GenerateTokenSuccessAction = '[@daffodil/payment] Generate Token Success Action',\n GenerateTokenFailureAction = '[@daffodil/payment] Generate Token Failure Action',\n}\n\n/**\n * Generates a payment token.\n *\n * @param query The payment query.\n */\nexport interface DaffPaymentGenerateTokenPayload<T extends DaffPaymentRequest = DaffPaymentRequest> {\n readonly request: T;\n readonly address?: DaffPersonalAddress | DaffIdentifiable;\n}\nexport interface DaffPaymentGenerateToken<T extends DaffPaymentRequest = DaffPaymentRequest> extends DaffPaymentGenerateTokenPayload<T>, Action {}\n\n/**\n * Indicates a successful generation of a payment token.\n */\nexport class DaffPaymentGenerateTokenSuccess<T extends DaffPaymentResponse = DaffPaymentResponse> implements Action {\n readonly type = DaffPaymentActionTypes.GenerateTokenSuccessAction;\n\n constructor(public payload: T) {}\n}\n\n/**\n * A failed payment with the error message.\n */\nexport class DaffPaymentGenerateTokenFailure implements Action {\n readonly type = DaffPaymentActionTypes.GenerateTokenFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\n/**\n * A union of the payment action types.\n */\nexport type DaffPaymentActions<\n T extends DaffPaymentResponse = DaffPaymentResponse,\n> =\n | DaffPaymentGenerateTokenSuccess<T>\n | DaffPaymentGenerateTokenFailure;\n","/**\n * The key under which the payment feature state will be stored.\n */\nexport const DAFF_PAYMENT_STORE_FEATURE_KEY = 'daffPayment';\n","import { ActionReducer } from '@ngrx/store';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\n\nimport { DaffPaymentReducersState } from '../reducers.interface';\n\nexport const {\n /**\n * A token to hold the injectable extra reducers.\n *\n * Prefer using {@link daffPaymentProvideExtraReducers}.\n */\n token: DAFF_PAYMENT_EXTRA_REDUCERS,\n\n /**\n * Provides additional reducers that run after the standard Daffodil cart reducers.\n *\n * @example\n * ```ts\n * providers: [\n * ...daffPaymentProvideExtraReducers(\n * myReducer1,\n * myReducer2\n * )\n * ]\n * ```\n */\n provider: daffPaymentProvideExtraReducers,\n} = createMultiInjectionToken<ActionReducer<DaffPaymentReducersState>>(\n 'DAFF_PAYMENT_EXTRA_REDUCERS',\n { providedIn: 'any' },\n);\n","import { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffPaymentReducerState } from './interface';\n\n/**\n * Manages {@link DaffPaymentReducerState}.\n */\nexport class DaffPaymentStateReducerAdapter {\n\n /**\n * Begins the payment operation flow.\n * Sets loading to true.\n */\n generateToken(state: DaffPaymentReducerState): DaffPaymentReducerState {\n return {\n ...state,\n loading: true,\n };\n }\n\n /**\n * Sets loading to false and resets errors.\n */\n tokenGenerated(state: DaffPaymentReducerState): DaffPaymentReducerState {\n return {\n ...state,\n loading: false,\n errors: [],\n };\n }\n\n /**\n * Stores the from a failed payment.\n * Also sets loading to false.\n */\n storeError(errors: DaffStateError[], state: DaffPaymentReducerState): DaffPaymentReducerState {\n return {\n ...state,\n errors,\n loading: false,\n };\n }\n}\n","import { DaffPaymentReducerState } from './interface';\n\n/**\n * The initial state for the main payment state, see {@link DaffPaymentReducerState}.\n */\nexport const daffPaymentInitialState: DaffPaymentReducerState = {\n loading: false,\n errors: [],\n};\n","import { DaffPaymentResponse } from '@daffodil/payment';\n\nimport { DaffPaymentStateReducerAdapter } from './adapter';\nimport { daffPaymentInitialState } from './initial-state';\nimport { DaffPaymentReducerState } from './interface';\nimport {\n DaffPaymentGenerateToken,\n DaffPaymentActionTypes,\n DaffPaymentActions,\n DaffPaymentGenerateTokenFailure,\n} from '../../actions/payment.actions';\n\n/**\n * The reducer for the payment page state, see {@link DaffPaymentReducerState}.\n */\nexport const daffPaymentReducerFactory = <T extends DaffPaymentResponse = DaffPaymentResponse>(actions: DaffPaymentGenerateToken['type'][]) =>\n (\n state = daffPaymentInitialState,\n action: DaffPaymentActions<T>,\n ): DaffPaymentReducerState => {\n const adapter = new DaffPaymentStateReducerAdapter();\n switch (true) {\n case actions.includes(action.type):\n return adapter.generateToken(state);\n\n case action.type === DaffPaymentActionTypes.GenerateTokenSuccessAction:\n return adapter.tokenGenerated(state);\n\n case action.type === DaffPaymentActionTypes.GenerateTokenFailureAction:\n return adapter.storeError([(<DaffPaymentGenerateTokenFailure>action).payload], state);\n\n default:\n return state;\n }\n };\n","import {\n createFeatureSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n DaffPaymentStateRootSlice,\n DaffPaymentReducersState,\n DAFF_PAYMENT_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\n/**\n * Selector for the payment feature state.\n */\nexport interface DaffPaymentFeatureSelector {\n selectPaymentFeatureState: MemoizedSelector<DaffPaymentStateRootSlice, DaffPaymentReducersState>;\n}\n\nexport const getDaffPaymentReducersStateSelector = (() => {\n let cache;\n return (): DaffPaymentFeatureSelector =>\n cache = cache || {\n selectPaymentFeatureState: createFeatureSelector<DaffPaymentReducersState>(DAFF_PAYMENT_STORE_FEATURE_KEY),\n };\n})();\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { getDaffPaymentReducersStateSelector } from './feature.selector';\nimport { DaffPaymentStateRootSlice } from '../reducers/public_api';\n\n/**\n * Selectors for the main part of payment state.\n */\nexport interface DaffPaymentSelectors {\n /**\n * Selects whether there is a pending payment operation.\n */\n selectPaymentLoading: MemoizedSelector<DaffPaymentStateRootSlice, boolean>;\n /**\n * Selects the list of payment errors, if any.\n */\n selectPaymentErrors: MemoizedSelector<DaffPaymentStateRootSlice, DaffStateError[]>;\n}\n\n/**\n * Creates a group of selectors for {@link DaffPaymentReducerState} that use the passed state selector as the basis.\n */\nconst daffPaymentCreateSelectors = () => {\n const { selectPaymentFeatureState } = getDaffPaymentReducersStateSelector();\n const selectPaymentState = createSelector(\n selectPaymentFeatureState,\n state => state.payment,\n );\n\n const selectPaymentLoading = createSelector(\n selectPaymentState,\n state => state.loading,\n );\n\n const selectPaymentErrors = createSelector(\n selectPaymentState,\n state => state.errors,\n );\n\n return {\n selectPaymentLoading,\n selectPaymentErrors,\n };\n};\n\n\nexport const daffPaymentGetSelectors = (() => {\n let cache;\n return (): DaffPaymentSelectors =>\n cache = cache || daffPaymentCreateSelectors();\n})();\n\n","import { Injectable } from '@angular/core';\nimport {\n Action,\n Store,\n select,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffStateError } from '@daffodil/core/state';\n\nimport { DaffPaymentPageFacadeInterface } from './interface';\nimport { DaffPaymentStateRootSlice } from '../../reducers/public_api';\nimport { daffPaymentGetSelectors } from '../../selectors/public_api';\n\n/**\n * @inheritdoc\n *\n * Serves as the base for a payment facade.\n * Extend this class and pass in the selectors for the specific state you wish to target.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentPageFacade implements DaffPaymentPageFacadeInterface {\n loading$: Observable<boolean>;\n errors$: Observable<DaffStateError[]>;\n\n constructor(\n private store: Store<DaffPaymentStateRootSlice>,\n ) {\n const {\n selectPaymentLoading,\n selectPaymentErrors,\n } = daffPaymentGetSelectors();\n\n this.loading$ = this.store.pipe(select(selectPaymentLoading));\n this.errors$ = this.store.pipe(select(selectPaymentErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { createMultiInjectionToken } from '@daffodil/core';\n\nimport { DaffPaymentAvailableProcessor } from '../models/public_api';\n\nexport const {\n /**\n * A multi-provider injection token for registering payment processors.\n */\n token: DAFF_PAYMENT_AVAILABLE_PROCESSORS,\n\n /**\n * Provides a payment processor registration.\n *\n * See {@link DaffPaymentAvailableProcessor}.\n */\n provider: daffPaymentProvideAvailableProcessors,\n} = createMultiInjectionToken<DaffPaymentAvailableProcessor>(\n 'DAFF_PAYMENT_AVAILABLE_PROCESSORS',\n { providedIn: 'any' },\n);\n","import { inject } from '@angular/core';\n\nimport {\n createSingleInjectionToken,\n daffArrayToDict,\n} from '@daffodil/core';\n\nimport { DAFF_PAYMENT_AVAILABLE_PROCESSORS } from './available-processors.token';\nimport { DaffPaymentProcessorCollection } from '../models/public_api';\n\nexport const {\n /**\n * An internal token to combine the available payment processors into a single collection.\n */\n token: DAFF_PAYMENT_PROCESSOR_COLLECTION,\n /**\n * Provider function for {@link DAFF_PAYMENT_PROCESSOR_COLLECTION}.\n */\n provider: provideDaffPaymentProcessorCollection,\n} = createSingleInjectionToken<DaffPaymentProcessorCollection>(\n 'DAFF_PAYMENT_PROCESSOR_COLLECTION',\n {\n factory: () => {\n const processors = inject(DAFF_PAYMENT_AVAILABLE_PROCESSORS);\n return daffArrayToDict(processors, ({ kind }) => kind);\n },\n },\n);\n","import { createSingleInjectionToken } from '@daffodil/core';\nimport { daffTransformErrorToStateError } from '@daffodil/core/state';\n\nexport const {\n /**\n * Transforms `DaffError`s into `DaffStateError`s before they are serialized into state.\n * Can be used to further refine Daffodil errors into more specific app errors.\n */\n token: DAFF_PAYMENT_ERROR_MATCHER,\n /**\n * Provider function for {@link DAFF_PAYMENT_ERROR_MATCHER}.\n */\n provider: provideDaffPaymentErrorMatcher,\n} = createSingleInjectionToken<typeof daffTransformErrorToStateError>(\n 'DAFF_PAYMENT_ERROR_MATCHER',\n { factory: () => daffTransformErrorToStateError },\n);\n","import { inject } from '@angular/core';\nimport {\n ActionReducer,\n combineReducers,\n} from '@ngrx/store';\n\nimport { createSingleInjectionToken } from '@daffodil/core';\nimport { daffComposeReducers } from '@daffodil/core/state';\n// these unused imports are a workaround\nimport { DaffPaymentResponse } from '@daffodil/payment';\n\nimport { DAFF_PAYMENT_EXTRA_REDUCERS } from './extra.token';\nimport { DAFF_PAYMENT_AVAILABLE_PROCESSORS } from '../../injection-tokens/public_api';\nimport { daffPaymentReducerFactory } from '../payment/reducer';\nimport { DaffPaymentReducersState } from '../reducers.interface';\n\nexport const {\n /**\n * An internal token to hold the Daffodil payment reducers.\n * Includes the extra and standard reducers.\n *\n * @docs-private\n */\n token: DAFF_PAYMENT_REDUCERS,\n /**\n * Provider function for {@link DAFF_PAYMENT_REDUCERS}.\n */\n provider: provideDaffPaymentReducers,\n} = createSingleInjectionToken<ActionReducer<DaffPaymentReducersState>>(\n 'DAFF_PAYMENT_REDUCERS',\n {\n providedIn: 'any',\n factory: () => daffComposeReducers([\n combineReducers({\n payment: daffPaymentReducerFactory(inject(DAFF_PAYMENT_AVAILABLE_PROCESSORS).map(({ action }) => action)),\n }),\n ...inject(DAFF_PAYMENT_EXTRA_REDUCERS),\n ]),\n },\n);\n","import { NgModule } from '@angular/core';\nimport { StoreModule } from '@ngrx/store';\n\nimport { DAFF_PAYMENT_STORE_FEATURE_KEY } from './reducers/public_api';\nimport { DAFF_PAYMENT_REDUCERS } from './reducers/token/reducers.token';\n\n/**\n * Creates the payment feature store.\n */\n@NgModule({\n imports: [\n StoreModule.forFeature(DAFF_PAYMENT_STORE_FEATURE_KEY, DAFF_PAYMENT_REDUCERS),\n ],\n})\nexport class DaffPaymentStateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAUA;;AAEG;IACS;AAAZ,CAAA,UAAY,sBAAsB,EAAA;AAChC,IAAA,sBAAA,CAAA,4BAAA,CAAA,GAAA,mDAAgF;AAChF,IAAA,sBAAA,CAAA,4BAAA,CAAA,GAAA,mDAAgF;AAClF,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,GAGjC,EAAA,CAAA,CAAA;AAaD;;AAEG;MACU,+BAA+B,CAAA;AAG1C,IAAA,WAAA,CAAmB,OAAU,EAAA;QAAV,IAAO,CAAA,OAAA,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;AACR,oBAAA,OAAO,EAAE;AACP,wBAAA,WAAW,CAAC,UAAU,CAAC,8BAA8B,EAAE,qBAAqB,CAAC;AAC9E,qBAAA;AACF,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
@@ -20,10 +20,10 @@ class DaffPaymentResponseFactory extends DaffModelFactory {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super(MockPaymentResponse);
|
|
22
22
|
}
|
|
23
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
24
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
23
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentResponseFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
24
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentResponseFactory, providedIn: 'root' }); }
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentResponseFactory, decorators: [{
|
|
27
27
|
type: Injectable,
|
|
28
28
|
args: [{
|
|
29
29
|
providedIn: 'root',
|
|
@@ -46,10 +46,10 @@ class DaffPaymentRequestFactory extends DaffModelFactory {
|
|
|
46
46
|
constructor() {
|
|
47
47
|
super(MockPaymentRequest);
|
|
48
48
|
}
|
|
49
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
50
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
49
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentRequestFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
50
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentRequestFactory, providedIn: 'root' }); }
|
|
51
51
|
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentRequestFactory, decorators: [{
|
|
53
53
|
type: Injectable,
|
|
54
54
|
args: [{
|
|
55
55
|
providedIn: 'root',
|
|
@@ -69,6 +69,7 @@ token: DAFF_PAYMENT_RESPONSE_KIND_FACTORIES,
|
|
|
69
69
|
*
|
|
70
70
|
* See {@link DAFF_PAYMENT_RESPONSE_KIND_FACTORIES}.
|
|
71
71
|
*
|
|
72
|
+
* @example
|
|
72
73
|
* ```ts
|
|
73
74
|
* providers: [
|
|
74
75
|
* ...provideDaffPaymentResponseKindFactories(
|
|
@@ -100,10 +101,10 @@ class DaffPaymentResponseKindFactory extends DaffModelFactory {
|
|
|
100
101
|
create(partial = {}) {
|
|
101
102
|
return this._randomFactory.create(partial);
|
|
102
103
|
}
|
|
103
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
104
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
104
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentResponseKindFactory, deps: [{ token: DAFF_PAYMENT_RESPONSE_KIND_FACTORIES }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
105
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentResponseKindFactory, providedIn: 'root' }); }
|
|
105
106
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentResponseKindFactory, decorators: [{
|
|
107
108
|
type: Injectable,
|
|
108
109
|
args: [{
|
|
109
110
|
providedIn: 'root',
|
|
@@ -117,13 +118,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
|
|
|
117
118
|
* Provides the default payment result factory as a payment result type factory.
|
|
118
119
|
*/
|
|
119
120
|
class DaffPaymentTestingModule {
|
|
120
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
121
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
122
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
121
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
122
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentTestingModule }); }
|
|
123
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentTestingModule, providers: [
|
|
123
124
|
provideDaffPaymentResponseKindFactories(DaffPaymentResponseFactory),
|
|
124
125
|
] }); }
|
|
125
126
|
}
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: DaffPaymentTestingModule, decorators: [{
|
|
127
128
|
type: NgModule,
|
|
128
129
|
args: [{
|
|
129
130
|
providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-payment-testing.mjs","sources":["../../../libs/payment/testing/src/factories/payment-response.factory.ts","../../../libs/payment/testing/src/factories/payment-request.factory.ts","../../../libs/payment/testing/src/injection-tokens/factories/kind.token.ts","../../../libs/payment/testing/src/factories/kind.factory.ts","../../../libs/payment/testing/src/testing.module.ts","../../../libs/payment/testing/src/daffodil-payment-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffPaymentResponse } from '@daffodil/payment';\n\n/**\n * Mock class for {@link DaffPaymentResponse}.\n */\nexport class MockPaymentResponse implements DaffPaymentResponse {\n method = faker.random.word();\n};\n\n/**\n * Model factory for {@link DaffPaymentResponse}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentResponseFactory extends DaffModelFactory<DaffPaymentResponse, typeof MockPaymentResponse>{\n constructor() {\n super(MockPaymentResponse);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffPaymentRequest } from '@daffodil/payment';\n\n/**\n * Mock class for {@link DaffPaymentRequest}.\n */\nexport class MockPaymentRequest implements DaffPaymentRequest {\n kind = faker.random.word();\n};\n\n/**\n * Model factory for {@link DaffPaymentRequest}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentRequestFactory extends DaffModelFactory<DaffPaymentRequest>{\n constructor() {\n super(MockPaymentRequest);\n }\n}\n","import { inject } from '@angular/core';\n\nimport { createServicesInjectionToken } from '@daffodil/core';\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffPaymentResponse } from '@daffodil/payment';\n\nimport { DaffPaymentResponseFactory } from '../../factories/payment-response.factory';\n\nexport const {\n /**\n * A multi-provider injection token for providing extra payment result kind factories.\n * These factories correspond to different types of payment results that may be added by other packages.\n * This is useful for backend mocks (such as the testing driver) to generate an accurate representation\n * of the variety of results that an application can receive in production.\n */\n token: DAFF_PAYMENT_RESPONSE_KIND_FACTORIES,\n\n /**\n * Provides extra payment result factory kinds.\n *\n * See {@link DAFF_PAYMENT_RESPONSE_KIND_FACTORIES}.\n *\n * ```ts\n * providers: [\n * ...provideDaffPaymentResponseKindFactories(\n * MyPaymentResponseFactory\n * )\n * ]\n * ```\n */\n provider: provideDaffPaymentResponseKindFactories,\n} = createServicesInjectionToken<DaffModelFactory<DaffPaymentResponse>>(\n 'DAFF_PAYMENT_RESPONSE_KIND_FACTORIES',\n {\n factory: () => [inject(DaffPaymentResponseFactory)],\n providedIn: 'root',\n },\n);\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\n\nimport { sample } from '@daffodil/core';\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffPaymentResponse } from '@daffodil/payment';\n\nimport { MockPaymentResponse } from './payment-response.factory';\nimport { DAFF_PAYMENT_RESPONSE_KIND_FACTORIES } from '../injection-tokens/factories/kind.token';\n\n/**\n * Factory for creating DaffPaymentResponses.\n * This will create a payment response of random kind.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentResponseKindFactory extends DaffModelFactory<DaffPaymentResponse> {\n constructor(\n @Inject(DAFF_PAYMENT_RESPONSE_KIND_FACTORIES) private kindFactories: DaffModelFactory<DaffPaymentResponse>[],\n ) {\n super(MockPaymentResponse);\n }\n\n private get _randomFactory(): DaffModelFactory<DaffPaymentResponse> {\n return sample(this.kindFactories);\n }\n\n /**\n * Creates a payment result of random kind.\n */\n create(partial = {}): DaffPaymentResponse {\n return this._randomFactory.create(partial);\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffPaymentResponseFactory } from './factories/public_api';\nimport { provideDaffPaymentResponseKindFactories } from './injection-tokens/public_api';\n\n/**\n * Provides the default payment result factory as a payment result type factory.\n */\n@NgModule({\n providers: [\n provideDaffPaymentResponseKindFactories(DaffPaymentResponseFactory),\n ],\n})\nexport class DaffPaymentTestingModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAMA;;AAEG;MACU,mBAAmB,CAAA;AAAhC,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE
|
|
1
|
+
{"version":3,"file":"daffodil-payment-testing.mjs","sources":["../../../libs/payment/testing/src/factories/payment-response.factory.ts","../../../libs/payment/testing/src/factories/payment-request.factory.ts","../../../libs/payment/testing/src/injection-tokens/factories/kind.token.ts","../../../libs/payment/testing/src/factories/kind.factory.ts","../../../libs/payment/testing/src/testing.module.ts","../../../libs/payment/testing/src/daffodil-payment-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffPaymentResponse } from '@daffodil/payment';\n\n/**\n * Mock class for {@link DaffPaymentResponse}.\n */\nexport class MockPaymentResponse implements DaffPaymentResponse {\n method = faker.random.word();\n};\n\n/**\n * Model factory for {@link DaffPaymentResponse}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentResponseFactory extends DaffModelFactory<DaffPaymentResponse, typeof MockPaymentResponse>{\n constructor() {\n super(MockPaymentResponse);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { faker } from '@faker-js/faker/locale/en_US';\n\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffPaymentRequest } from '@daffodil/payment';\n\n/**\n * Mock class for {@link DaffPaymentRequest}.\n */\nexport class MockPaymentRequest implements DaffPaymentRequest {\n kind = faker.random.word();\n};\n\n/**\n * Model factory for {@link DaffPaymentRequest}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentRequestFactory extends DaffModelFactory<DaffPaymentRequest>{\n constructor() {\n super(MockPaymentRequest);\n }\n}\n","import { inject } from '@angular/core';\n\nimport { createServicesInjectionToken } from '@daffodil/core';\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffPaymentResponse } from '@daffodil/payment';\n\nimport { DaffPaymentResponseFactory } from '../../factories/payment-response.factory';\n\nexport const {\n /**\n * A multi-provider injection token for providing extra payment result kind factories.\n * These factories correspond to different types of payment results that may be added by other packages.\n * This is useful for backend mocks (such as the testing driver) to generate an accurate representation\n * of the variety of results that an application can receive in production.\n */\n token: DAFF_PAYMENT_RESPONSE_KIND_FACTORIES,\n\n /**\n * Provides extra payment result factory kinds.\n *\n * See {@link DAFF_PAYMENT_RESPONSE_KIND_FACTORIES}.\n *\n * @example\n * ```ts\n * providers: [\n * ...provideDaffPaymentResponseKindFactories(\n * MyPaymentResponseFactory\n * )\n * ]\n * ```\n */\n provider: provideDaffPaymentResponseKindFactories,\n} = createServicesInjectionToken<DaffModelFactory<DaffPaymentResponse>>(\n 'DAFF_PAYMENT_RESPONSE_KIND_FACTORIES',\n {\n factory: () => [inject(DaffPaymentResponseFactory)],\n providedIn: 'root',\n },\n);\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\n\nimport { sample } from '@daffodil/core';\nimport { DaffModelFactory } from '@daffodil/core/testing';\nimport { DaffPaymentResponse } from '@daffodil/payment';\n\nimport { MockPaymentResponse } from './payment-response.factory';\nimport { DAFF_PAYMENT_RESPONSE_KIND_FACTORIES } from '../injection-tokens/factories/kind.token';\n\n/**\n * Factory for creating DaffPaymentResponses.\n * This will create a payment response of random kind.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffPaymentResponseKindFactory extends DaffModelFactory<DaffPaymentResponse> {\n constructor(\n @Inject(DAFF_PAYMENT_RESPONSE_KIND_FACTORIES) private kindFactories: DaffModelFactory<DaffPaymentResponse>[],\n ) {\n super(MockPaymentResponse);\n }\n\n private get _randomFactory(): DaffModelFactory<DaffPaymentResponse> {\n return sample(this.kindFactories);\n }\n\n /**\n * Creates a payment result of random kind.\n */\n create(partial = {}): DaffPaymentResponse {\n return this._randomFactory.create(partial);\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffPaymentResponseFactory } from './factories/public_api';\nimport { provideDaffPaymentResponseKindFactories } from './injection-tokens/public_api';\n\n/**\n * Provides the default payment result factory as a payment result type factory.\n */\n@NgModule({\n providers: [\n provideDaffPaymentResponseKindFactories(DaffPaymentResponseFactory),\n ],\n})\nexport class DaffPaymentTestingModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAMA;;AAEG;MACU,mBAAmB,CAAA;AAAhC,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;;AAC7B;AAAA;AAED;;AAEG;AAIG,MAAO,0BAA2B,SAAQ,gBAAiE,CAAA;AAC/G,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,mBAAmB,CAAC;;iIAFjB,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA1B,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cAFzB,MAAM,EAAA,CAAA,CAAA;;2FAEP,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACZD;;AAEG;MACU,kB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uCAAuC,CAAC,0BAA0B,CAAC;AACpE,qBAAA;AACF,iBAAA;;;ACZD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@daffodil/payment","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/payment"]}}},"version":"0.
|
|
1
|
+
{"name":"@daffodil/payment","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/payment"]}}},"version":"0.81.0","description":"A client-side Angular package for managing ecommerce payments agnostic to the ecommerce platform.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"homepage":"https://github.com/graycoreio/daffodil","peerDependencies":{"@angular/common":"19.0.7","@angular/core":"19.0.7","@daffodil/core":"0.81.0","@ngrx/effects":"^19.0.0","@ngrx/store":"^19.0.0","rxjs":"7.8.1"},"optionalDependencies":{"@apollo/client":"^3.12.6","@daffodil/driver":"0.81.0","apollo-angular":"^8.0.0","@faker-js/faker":"^7.6.0"},"module":"fesm2022/daffodil-payment.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-payment.mjs"},"./driver":{"types":"./driver/index.d.ts","default":"./fesm2022/daffodil-payment-driver.mjs"},"./state":{"types":"./state/index.d.ts","default":"./fesm2022/daffodil-payment-state.mjs"},"./testing":{"types":"./testing/index.d.ts","default":"./fesm2022/daffodil-payment-testing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","default":"./fesm2022/daffodil-payment-driver-in-memory.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","default":"./fesm2022/daffodil-payment-driver-testing.mjs"},"./state/testing":{"types":"./state/testing/index.d.ts","default":"./fesm2022/daffodil-payment-state-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGFmZm9kaWwtcGF5bWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2xpYnMvcGF5bWVudC9zcmMvZGFmZm9kaWwtcGF5bWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGFmZm9kaWwtcGF5bWVudC1kcml2ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9saWJzL3BheW1lbnQvZHJpdmVyL3NyYy9kYWZmb2RpbC1wYXltZW50LWRyaXZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DaffInheritableError, } from '@daffodil/core';
|
|
2
|
-
export const DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE = 'DAFF_PAYMENT_INVALID_API_RESPONSE';
|
|
3
|
-
/**
|
|
4
|
-
* A general error indicating that the platform returned a response which cannot be processed.
|
|
5
|
-
*/
|
|
6
|
-
export class DaffPaymentInvalidAPIResponseError extends DaffInheritableError {
|
|
7
|
-
constructor(message) {
|
|
8
|
-
super(message);
|
|
9
|
-
this.message = message;
|
|
10
|
-
this.code = DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52YWxpZC1hcGktcmVzcG9uc2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL3BheW1lbnQvZHJpdmVyL3NyYy9lcnJvcnMvaW52YWxpZC1hcGktcmVzcG9uc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUVMLG9CQUFvQixHQUNyQixNQUFNLGdCQUFnQixDQUFDO0FBRXhCLE1BQU0sQ0FBQyxNQUFNLDRDQUE0QyxHQUFHLG1DQUFtQyxDQUFDO0FBRWhHOztHQUVHO0FBQ0gsTUFBTSxPQUFPLGtDQUFtQyxTQUFRLG9CQUFvQjtJQUcxRSxZQUFtQixPQUFlO1FBQ2hDLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQztRQURFLFlBQU8sR0FBUCxPQUFPLENBQVE7UUFGbEIsU0FBSSxHQUFXLDRDQUE0QyxDQUFDO0lBSTVFLENBQUM7Q0FDRiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIERhZmZFcnJvcixcbiAgRGFmZkluaGVyaXRhYmxlRXJyb3IsXG59IGZyb20gJ0BkYWZmb2RpbC9jb3JlJztcblxuZXhwb3J0IGNvbnN0IERBRkZfUEFZTUVOVF9JTlZBTElEX0FQSV9SRVNQT05TRV9FUlJPUl9DT0RFID0gJ0RBRkZfUEFZTUVOVF9JTlZBTElEX0FQSV9SRVNQT05TRSc7XG5cbi8qKlxuICogQSBnZW5lcmFsIGVycm9yIGluZGljYXRpbmcgdGhhdCB0aGUgcGxhdGZvcm0gcmV0dXJuZWQgYSByZXNwb25zZSB3aGljaCBjYW5ub3QgYmUgcHJvY2Vzc2VkLlxuICovXG5leHBvcnQgY2xhc3MgRGFmZlBheW1lbnRJbnZhbGlkQVBJUmVzcG9uc2VFcnJvciBleHRlbmRzIERhZmZJbmhlcml0YWJsZUVycm9yIGltcGxlbWVudHMgRGFmZkVycm9yIHtcbiAgcHVibGljIHJlYWRvbmx5IGNvZGU6IHN0cmluZyA9IERBRkZfUEFZTUVOVF9JTlZBTElEX0FQSV9SRVNQT05TRV9FUlJPUl9DT0RFO1xuXG4gIGNvbnN0cnVjdG9yKHB1YmxpYyBtZXNzYWdlOiBzdHJpbmcpIHtcbiAgICBzdXBlcihtZXNzYWdlKTtcbiAgfVxufVxuIl19
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffPaymentInvalidAPIResponseError, DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE, } from './invalid-api-response';
|
|
2
|
-
/**
|
|
3
|
-
* A mapping from error codes to error class constructors.
|
|
4
|
-
*/
|
|
5
|
-
export const DaffPaymentDriverErrorMap = {
|
|
6
|
-
[DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE]: DaffPaymentInvalidAPIResponseError,
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9wYXltZW50L2RyaXZlci9zcmMvZXJyb3JzL21hcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsa0NBQWtDLEVBQ2xDLDRDQUE0QyxHQUM3QyxNQUFNLHdCQUF3QixDQUFDO0FBRWhDOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0seUJBQXlCLEdBQUc7SUFDdkMsQ0FBQyw0Q0FBNEMsQ0FBQyxFQUFFLGtDQUFrQztDQUNuRixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtcbiAgRGFmZlBheW1lbnRJbnZhbGlkQVBJUmVzcG9uc2VFcnJvcixcbiAgREFGRl9QQVlNRU5UX0lOVkFMSURfQVBJX1JFU1BPTlNFX0VSUk9SX0NPREUsXG59IGZyb20gJy4vaW52YWxpZC1hcGktcmVzcG9uc2UnO1xuXG4vKipcbiAqIEEgbWFwcGluZyBmcm9tIGVycm9yIGNvZGVzIHRvIGVycm9yIGNsYXNzIGNvbnN0cnVjdG9ycy5cbiAqL1xuZXhwb3J0IGNvbnN0IERhZmZQYXltZW50RHJpdmVyRXJyb3JNYXAgPSB7XG4gIFtEQUZGX1BBWU1FTlRfSU5WQUxJRF9BUElfUkVTUE9OU0VfRVJST1JfQ09ERV06IERhZmZQYXltZW50SW52YWxpZEFQSVJlc3BvbnNlRXJyb3IsXG59O1xuIl19
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { DaffPaymentInvalidAPIResponseError, DAFF_PAYMENT_INVALID_API_RESPONSE_ERROR_CODE, } from './invalid-api-response';
|
|
2
|
-
export { DaffPaymentDriverErrorMap } from './map';
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMvcGF5bWVudC9kcml2ZXIvc3JjL2Vycm9ycy9wdWJsaWNfYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxrQ0FBa0MsRUFDbEMsNENBQTRDLEdBQzdDLE1BQU0sd0JBQXdCLENBQUM7QUFDaEMsT0FBTyxFQUFFLHlCQUF5QixFQUFFLE1BQU0sT0FBTyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHtcbiAgRGFmZlBheW1lbnRJbnZhbGlkQVBJUmVzcG9uc2VFcnJvcixcbiAgREFGRl9QQVlNRU5UX0lOVkFMSURfQVBJX1JFU1BPTlNFX0VSUk9SX0NPREUsXG59IGZyb20gJy4vaW52YWxpZC1hcGktcmVzcG9uc2UnO1xuZXhwb3J0IHsgRGFmZlBheW1lbnREcml2ZXJFcnJvck1hcCB9IGZyb20gJy4vbWFwJztcbiJdfQ==
|