@daffodil/customer-store-credit 0.92.3 → 0.93.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.
Files changed (27) hide show
  1. package/fesm2022/daffodil-customer-store-credit-driver-in-memory.mjs +10 -10
  2. package/fesm2022/daffodil-customer-store-credit-driver-in-memory.mjs.map +1 -1
  3. package/fesm2022/daffodil-customer-store-credit-driver-magento-testing.mjs +3 -3
  4. package/fesm2022/daffodil-customer-store-credit-driver-magento-testing.mjs.map +1 -1
  5. package/fesm2022/daffodil-customer-store-credit-driver-magento.mjs +10 -10
  6. package/fesm2022/daffodil-customer-store-credit-driver-magento.mjs.map +1 -1
  7. package/fesm2022/daffodil-customer-store-credit-driver-testing.mjs +7 -7
  8. package/fesm2022/daffodil-customer-store-credit-driver-testing.mjs.map +1 -1
  9. package/fesm2022/daffodil-customer-store-credit-routing.mjs +6 -6
  10. package/fesm2022/daffodil-customer-store-credit-routing.mjs.map +1 -1
  11. package/fesm2022/daffodil-customer-store-credit-state-testing.mjs +7 -7
  12. package/fesm2022/daffodil-customer-store-credit-state-testing.mjs.map +1 -1
  13. package/fesm2022/daffodil-customer-store-credit-state.mjs +10 -10
  14. package/fesm2022/daffodil-customer-store-credit-state.mjs.map +1 -1
  15. package/fesm2022/daffodil-customer-store-credit-testing.mjs +3 -3
  16. package/fesm2022/daffodil-customer-store-credit-testing.mjs.map +1 -1
  17. package/package.json +1 -1
  18. package/{driver/magento/testing/index.d.ts → types/daffodil-customer-store-credit-driver-magento-testing.d.ts} +2 -2
  19. package/{driver/magento/index.d.ts → types/daffodil-customer-store-credit-driver-magento.d.ts} +1 -2
  20. package/{state/index.d.ts → types/daffodil-customer-store-credit-state.d.ts} +3 -3
  21. /package/{driver/in-memory/index.d.ts → types/daffodil-customer-store-credit-driver-in-memory.d.ts} +0 -0
  22. /package/{driver/testing/index.d.ts → types/daffodil-customer-store-credit-driver-testing.d.ts} +0 -0
  23. /package/{driver/index.d.ts → types/daffodil-customer-store-credit-driver.d.ts} +0 -0
  24. /package/{routing/index.d.ts → types/daffodil-customer-store-credit-routing.d.ts} +0 -0
  25. /package/{state/testing/index.d.ts → types/daffodil-customer-store-credit-state-testing.d.ts} +0 -0
  26. /package/{testing/index.d.ts → types/daffodil-customer-store-credit-testing.d.ts} +0 -0
  27. /package/{index.d.ts → types/daffodil-customer-store-credit.d.ts} +0 -0
@@ -50,10 +50,10 @@ class DaffCustomerStoreCreditInMemoryBackendService {
50
50
  body: this.storeCredit,
51
51
  }));
52
52
  }
53
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditInMemoryBackendService, deps: [{ token: i1.DaffCustomerStoreCreditFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
54
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditInMemoryBackendService, providedIn: 'root' }); }
53
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditInMemoryBackendService, deps: [{ token: i1.DaffCustomerStoreCreditFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
54
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditInMemoryBackendService, providedIn: 'root' }); }
55
55
  }
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditInMemoryBackendService, decorators: [{
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditInMemoryBackendService, decorators: [{
57
57
  type: Injectable,
58
58
  args: [{
59
59
  providedIn: 'root',
@@ -73,10 +73,10 @@ class DaffCustomerStoreCreditInMemoryDriver extends DaffInMemoryDriverBase {
73
73
  get() {
74
74
  return this.http.get(this.url);
75
75
  }
76
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriver, deps: [{ token: i1$1.HttpClient }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
77
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriver, providedIn: 'root' }); }
76
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriver, deps: [{ token: i1$1.HttpClient }, { token: i2.InMemoryBackendConfig }], target: i0.ɵɵFactoryTarget.Injectable }); }
77
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriver, providedIn: 'root' }); }
78
78
  }
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriver, decorators: [{
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriver, decorators: [{
80
80
  type: Injectable,
81
81
  args: [{
82
82
  providedIn: 'root',
@@ -96,11 +96,11 @@ class DaffCustomerStoreCreditInMemoryDriverModule {
96
96
  ],
97
97
  };
98
98
  }
99
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
100
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriverModule, imports: [CommonModule] }); }
101
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriverModule, imports: [CommonModule] }); }
99
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
100
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriverModule, imports: [CommonModule] }); }
101
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriverModule, imports: [CommonModule] }); }
102
102
  }
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriverModule, decorators: [{
103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditInMemoryDriverModule, decorators: [{
104
104
  type: NgModule,
105
105
  args: [{
106
106
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-customer-store-credit-driver-in-memory.mjs","sources":["../../../libs/customer-store-credit/driver/in-memory/src/collection-name.const.ts","../../../libs/customer-store-credit/driver/in-memory/src/backend/store-credit.service.ts","../../../libs/customer-store-credit/driver/in-memory/src/driver/store-credit.service.ts","../../../libs/customer-store-credit/driver/in-memory/src/driver/driver.module.ts","../../../libs/customer-store-credit/driver/in-memory/src/daffodil-customer-store-credit-driver-in-memory.ts"],"sourcesContent":["export const DAFF_CUSTOMER_STORE_CREDIT_IN_MEMORY_COLLECTION_NAME = 'customer-store-credit';\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 { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\nimport { DaffCustomerStoreCreditFactory } from '@daffodil/customer-store-credit/testing';\nimport { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';\n\nimport { DAFF_CUSTOMER_STORE_CREDIT_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * An in-memory service that handles customer store credit HTTP requests.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditInMemoryBackendService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {\n readonly collectionName = DAFF_CUSTOMER_STORE_CREDIT_IN_MEMORY_COLLECTION_NAME;\n\n storeCredit: DaffCustomerStoreCredit;\n\n constructor(\n private factory: DaffCustomerStoreCreditFactory,\n ) {\n this.storeCredit = this.factory.create();\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 storeCredit: this.storeCredit,\n };\n }\n\n /**\n * Gets the customer's store credit.\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.storeCredit,\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 { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\nimport { DaffCustomerStoreCreditDriverInterface } from '@daffodil/customer-store-credit/driver';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\n\nimport { DAFF_CUSTOMER_STORE_CREDIT_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * The customer store credit in-memory driver to mock the customer store credit backend service.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditInMemoryDriver extends DaffInMemoryDriverBase implements DaffCustomerStoreCreditDriverInterface {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_CUSTOMER_STORE_CREDIT_IN_MEMORY_COLLECTION_NAME);\n }\n\n get(): Observable<DaffCustomerStoreCredit> {\n return this.http.get<DaffCustomerStoreCredit>(this.url);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffCustomerStoreCreditDriver } from '@daffodil/customer-store-credit/driver';\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\n\nimport { DaffCustomerStoreCreditInMemoryDriver } from './store-credit.service';\nimport { DaffCustomerStoreCreditInMemoryBackendService } from '../backend/store-credit.service';\n\n/**\n * Provides the {@link DaffCustomerStoreCreditInMemoryDriver} as the {@link DaffCustomerStoreCreditDriver}.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCustomerStoreCreditInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffCustomerStoreCreditInMemoryDriverModule> {\n return {\n ngModule: DaffCustomerStoreCreditInMemoryDriverModule,\n providers: [\n provideDaffCustomerStoreCreditDriver(DaffCustomerStoreCreditInMemoryDriver),\n provideDaffInMemoryBackends(DaffCustomerStoreCreditInMemoryBackendService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;A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EAAA,IAAA,EAAA,2CAA2C,YAHpD,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2CAA2C,YAHpD,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAGH,2CAA2C,EAAA,UAAA,EAAA,CAAA;kBALvD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-customer-store-credit-driver-in-memory.mjs","sources":["../../../libs/customer-store-credit/driver/in-memory/src/collection-name.const.ts","../../../libs/customer-store-credit/driver/in-memory/src/backend/store-credit.service.ts","../../../libs/customer-store-credit/driver/in-memory/src/driver/store-credit.service.ts","../../../libs/customer-store-credit/driver/in-memory/src/driver/driver.module.ts","../../../libs/customer-store-credit/driver/in-memory/src/daffodil-customer-store-credit-driver-in-memory.ts"],"sourcesContent":["export const DAFF_CUSTOMER_STORE_CREDIT_IN_MEMORY_COLLECTION_NAME = 'customer-store-credit';\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 { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\nimport { DaffCustomerStoreCreditFactory } from '@daffodil/customer-store-credit/testing';\nimport { DaffInMemorySingleRouteableBackend } from '@daffodil/driver/in-memory';\n\nimport { DAFF_CUSTOMER_STORE_CREDIT_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * An in-memory service that handles customer store credit HTTP requests.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditInMemoryBackendService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {\n readonly collectionName = DAFF_CUSTOMER_STORE_CREDIT_IN_MEMORY_COLLECTION_NAME;\n\n storeCredit: DaffCustomerStoreCredit;\n\n constructor(\n private factory: DaffCustomerStoreCreditFactory,\n ) {\n this.storeCredit = this.factory.create();\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 storeCredit: this.storeCredit,\n };\n }\n\n /**\n * Gets the customer's store credit.\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.storeCredit,\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 { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\nimport { DaffCustomerStoreCreditDriverInterface } from '@daffodil/customer-store-credit/driver';\nimport { DaffInMemoryDriverBase } from '@daffodil/driver/in-memory';\n\nimport { DAFF_CUSTOMER_STORE_CREDIT_IN_MEMORY_COLLECTION_NAME } from '../collection-name.const';\n\n/**\n * The customer store credit in-memory driver to mock the customer store credit backend service.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditInMemoryDriver extends DaffInMemoryDriverBase implements DaffCustomerStoreCreditDriverInterface {\n constructor(\n private http: HttpClient,\n config: InMemoryBackendConfig,\n ) {\n super(config, DAFF_CUSTOMER_STORE_CREDIT_IN_MEMORY_COLLECTION_NAME);\n }\n\n get(): Observable<DaffCustomerStoreCredit> {\n return this.http.get<DaffCustomerStoreCredit>(this.url);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffCustomerStoreCreditDriver } from '@daffodil/customer-store-credit/driver';\nimport { provideDaffInMemoryBackends } from '@daffodil/driver/in-memory';\n\nimport { DaffCustomerStoreCreditInMemoryDriver } from './store-credit.service';\nimport { DaffCustomerStoreCreditInMemoryBackendService } from '../backend/store-credit.service';\n\n/**\n * Provides the {@link DaffCustomerStoreCreditInMemoryDriver} as the {@link DaffCustomerStoreCreditDriver}.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCustomerStoreCreditInMemoryDriverModule {\n static forRoot(): ModuleWithProviders<DaffCustomerStoreCreditInMemoryDriverModule> {\n return {\n ngModule: DaffCustomerStoreCreditInMemoryDriverModule,\n providers: [\n provideDaffCustomerStoreCreditDriver(DaffCustomerStoreCreditInMemoryDriver),\n provideDaffInMemoryBackends(DaffCustomerStoreCreditInMemoryBackendService),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;AAAO,MAAM,oDAAoD,GAAG,uBAAuB;;ACe3F;;AAEG;MAIU,6CAA6C,CAAA;AAKxD,IAAA,WAAA,CACU,OAAuC,EAAA;QAAvC,IAAA,CAAA,OAAO,GAAP,OAAO;QALR,IAAA,CAAA,cAAc,GAAG,oDAAoD;QAO5E,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;IAC1C;AAEA;;;;;;;AAOG;IACH,eAAe,CAAC,GAAW,EAAE,KAA2B,EAAA;AACtD,QAAA,OAAO,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC;IACnC;AAEA;;AAEG;IACH,QAAQ,GAAA;QACN,OAAO;YACL,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B;IACH;AAEA;;;;;AAKG;AACH,IAAA,GAAG,CAAC,OAAoB,EAAA;QAC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(MockMagentoCustomerStoreCredit, moneyFactory);
18
18
  }
19
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoCustomerStoreCreditFactory, deps: [{ token: i1.MagentoMoneyFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
20
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoCustomerStoreCreditFactory, providedIn: 'root' }); }
19
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoCustomerStoreCreditFactory, deps: [{ token: i1.MagentoMoneyFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
20
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoCustomerStoreCreditFactory, providedIn: 'root' }); }
21
21
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MagentoCustomerStoreCreditFactory, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MagentoCustomerStoreCreditFactory, decorators: [{
23
23
  type: Injectable,
24
24
  args: [{
25
25
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-customer-store-credit-driver-magento-testing.mjs","sources":["../../../libs/customer-store-credit/driver/magento/testing/src/factories/customer-store-credit.factory.ts","../../../libs/customer-store-credit/driver/magento/testing/src/daffodil-customer-store-credit-driver-magento-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 { MagentoCustomerStoreCredit } from '@daffodil/customer-store-credit/driver/magento';\nimport { MagentoMoneyFactory } from '@daffodil/driver/magento/testing';\n\nexport class MockMagentoCustomerStoreCredit implements MagentoCustomerStoreCredit {\n __typename = <const>'CustomerStoreCredit';\n current_balance = this.moneyFactory.create();\n enabled = faker.datatype.boolean();\n\n constructor(\n protected moneyFactory: MagentoMoneyFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoCustomerStoreCreditFactory extends DaffModelFactory<MagentoCustomerStoreCredit> {\n constructor(\n moneyFactory: MagentoMoneyFactory,\n ) {\n super(MockMagentoCustomerStoreCredit, moneyFactory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAOa,8BAA8B,CAAA;AAKzC,IAAA,WAAA,CACY,YAAiC,EAAA;QAAjC,IAAA,CAAA,YAAY,GAAZ,YAAY;QALxB,IAAA,CAAA,UAAU,GAAU,qBAAqB;AACzC,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;AAC5C,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE;IAI/B;AACJ;AAKK,MAAO,iCAAkC,SAAQ,gBAA4C,CAAA;AACjG,IAAA,WAAA,CACE,YAAiC,EAAA;AAEjC,QAAA,KAAK,CAAC,8BAA8B,EAAE,YAAY,CAAC;IACrD;kIALW,iCAAiC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iCAAiC,cAFhC,MAAM,EAAA,CAAA,CAAA;;4FAEP,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAH7C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACnBD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-customer-store-credit-driver-magento-testing.mjs","sources":["../../../libs/customer-store-credit/driver/magento/testing/src/factories/customer-store-credit.factory.ts","../../../libs/customer-store-credit/driver/magento/testing/src/daffodil-customer-store-credit-driver-magento-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 { MagentoCustomerStoreCredit } from '@daffodil/customer-store-credit/driver/magento';\nimport { MagentoMoneyFactory } from '@daffodil/driver/magento/testing';\n\nexport class MockMagentoCustomerStoreCredit implements MagentoCustomerStoreCredit {\n __typename = <const>'CustomerStoreCredit';\n current_balance = this.moneyFactory.create();\n enabled = faker.datatype.boolean();\n\n constructor(\n protected moneyFactory: MagentoMoneyFactory,\n ) {}\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoCustomerStoreCreditFactory extends DaffModelFactory<MagentoCustomerStoreCredit> {\n constructor(\n moneyFactory: MagentoMoneyFactory,\n ) {\n super(MockMagentoCustomerStoreCredit, moneyFactory);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAOa,8BAA8B,CAAA;AAKzC,IAAA,WAAA,CACY,YAAiC,EAAA;QAAjC,IAAA,CAAA,YAAY,GAAZ,YAAY;QALxB,IAAA,CAAA,UAAU,GAAU,qBAAqB;AACzC,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;AAC5C,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE;IAI/B;AACJ;AAKK,MAAO,iCAAkC,SAAQ,gBAA4C,CAAA;AACjG,IAAA,WAAA,CACE,YAAiC,EAAA;AAEjC,QAAA,KAAK,CAAC,8BAA8B,EAAE,YAAY,CAAC;IACrD;iIALW,iCAAiC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,mBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAjC,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,iCAAiC,cAFhC,MAAM,EAAA,CAAA,CAAA;;2FAEP,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAH7C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACnBD;;AAEG;;;;"}
@@ -2,6 +2,7 @@ import { DAFF_CUSTOMER_STORE_CREDIT_ORDER_TOTAL_TYPE } from '@daffodil/customer-
2
2
  import * as i1 from 'apollo-angular';
3
3
  import { gql } from 'apollo-angular';
4
4
  import { magentoMoneyFragment, daffTransformMagentoError } from '@daffodil/driver/magento';
5
+ import { CombinedGraphQLErrors } from '@apollo/client';
5
6
  import { DaffCustomerStoreCreditDriverErrorMap, DaffCustomerStoreCreditInvalidAPIResponseError, provideDaffCustomerStoreCreditDriver } from '@daffodil/customer-store-credit/driver';
6
7
  import * as i0 from '@angular/core';
7
8
  import { Injectable, NgModule } from '@angular/core';
@@ -79,10 +80,9 @@ function transformMagentoCartGraphQlError(error, requestPayload) {
79
80
  }
80
81
  return daffTransformMagentoError(error, {});
81
82
  }
82
- ;
83
83
  function transformMagentoReviewsError(error, requestPayload) {
84
- if (error.graphQLErrors?.length) {
85
- return transformMagentoCartGraphQlError(error.graphQLErrors[0], requestPayload);
84
+ if (CombinedGraphQLErrors.is(error)) {
85
+ return transformMagentoCartGraphQlError(error.errors[0], requestPayload);
86
86
  }
87
87
  else {
88
88
  return daffTransformMagentoError(error, {}) || new DaffCustomerStoreCreditInvalidAPIResponseError(error.message);
@@ -112,10 +112,10 @@ class DaffCustomerStoreCreditMagentoService {
112
112
  query: getCustomerStoreCredit,
113
113
  }).pipe(map(validateGetCustomerStoreCreditResponse), map((response) => magentoCustomerStoreCreditTransform(response.data.customer.store_credit)), catchError(err => throwError(() => transformMagentoReviewsError(err))));
114
114
  }
115
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditMagentoService, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
116
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditMagentoService, providedIn: 'root' }); }
115
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditMagentoService, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
116
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditMagentoService, providedIn: 'root' }); }
117
117
  }
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditMagentoService, decorators: [{
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditMagentoService, decorators: [{
119
119
  type: Injectable,
120
120
  args: [{
121
121
  providedIn: 'root',
@@ -133,11 +133,11 @@ class DaffCustomerStoreCreditMagentoDriverModule {
133
133
  ],
134
134
  };
135
135
  }
136
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
137
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditMagentoDriverModule, imports: [CommonModule] }); }
138
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditMagentoDriverModule, imports: [CommonModule] }); }
136
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditMagentoDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
137
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditMagentoDriverModule, imports: [CommonModule] }); }
138
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditMagentoDriverModule, imports: [CommonModule] }); }
139
139
  }
140
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditMagentoDriverModule, decorators: [{
140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditMagentoDriverModule, decorators: [{
141
141
  type: NgModule,
142
142
  args: [{
143
143
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-customer-store-credit-driver-magento.mjs","sources":["../../../libs/customer-store-credit/driver/magento/src/transforms/responses/customer-store-credit.ts","../../../libs/customer-store-credit/driver/magento/src/transforms/responses/customer-order.ts","../../../libs/customer-store-credit/driver/magento/src/queries/fragments/store-credit.ts","../../../libs/customer-store-credit/driver/magento/src/queries/fragments/customer-order.ts","../../../libs/customer-store-credit/driver/magento/src/queries/get-store-credit.ts","../../../libs/customer-store-credit/driver/magento/src/errors/map.ts","../../../libs/customer-store-credit/driver/magento/src/errors/transform.ts","../../../libs/customer-store-credit/driver/magento/src/validators/get-customer-store-credit.ts","../../../libs/customer-store-credit/driver/magento/src/customer-store-credit.service.ts","../../../libs/customer-store-credit/driver/magento/src/driver.module.ts","../../../libs/customer-store-credit/driver/magento/src/daffodil-customer-store-credit-driver-magento.ts"],"sourcesContent":["import { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\nimport { MagentoCustomerStoreCredit } from '../../models/public_api';\n\nexport const magentoCustomerStoreCreditTransform = (storeCredit: MagentoCustomerStoreCredit): DaffCustomerStoreCredit => ({\n balance: storeCredit.current_balance.value,\n});\n","import { DaffMagentoCustomerOrderExtraTransform } from '@daffodil/customer-order/driver/magento/2-4-6';\nimport { DAFF_CUSTOMER_STORE_CREDIT_ORDER_TOTAL_TYPE } from '@daffodil/customer-store-credit';\nimport { DaffOrder } from '@daffodil/order';\n\nimport { MagentoCustomerOrderWithStoreCredit } from '../../models/public_api';\n\nexport const magentoCustomerOrderWithStoreCreditTransform: DaffMagentoCustomerOrderExtraTransform<MagentoCustomerOrderWithStoreCredit> = (daffOrder: DaffOrder, magentoOrder: MagentoCustomerOrderWithStoreCredit, email: string): DaffOrder => ({\n ...daffOrder,\n totals: [\n ...daffOrder.totals,\n {\n type: DAFF_CUSTOMER_STORE_CREDIT_ORDER_TOTAL_TYPE,\n label: 'Store Credit',\n value: magentoOrder.total?.total_store_credit.value,\n // before grand total and after tax\n sort_order: 35,\n },\n ].sort((a, b) => a.sort_order - b.sort_order),\n});\n","import { gql } from 'apollo-angular';\n\nimport { magentoMoneyFragment } from '@daffodil/driver/magento';\n\nexport const magentoCustomerStoreCreditFragment = gql`\n fragment magentoCustomerStoreCredit on CustomerStoreCredit {\n current_balance {\n ...moneyFragment\n }\n enabled\n }\n ${magentoMoneyFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoMoneyFragment } from '@daffodil/driver/magento';\n\nexport const magentoCustomerOrderStoreCreditTotalFragment = gql`\n fragment magentoCustomerOrderStoreCreditTotal on CustomerOrder {\n total {\n total_store_credit {\n ...moneyFragment\n }\n }\n }\n ${magentoMoneyFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerStoreCreditFragment } from './fragments/public_api';\n\nexport const MAGENTO_GET_CUSTOMER_STORE_CREDIT_QUERY_NAME = 'MagentoGetCustomerStoreCredit';\n\nexport const getCustomerStoreCredit = gql`\n query ${MAGENTO_GET_CUSTOMER_STORE_CREDIT_QUERY_NAME} {\n customer {\n store_credit {\n ...magentoCustomerStoreCredit\n }\n }\n }\n ${magentoCustomerStoreCreditFragment}\n`;\n","export const DaffCustomerStoreCreditMagentoErrorMessageRegexMap = {\n};\n","import { ApolloError } from '@apollo/client/core';\nimport { GraphQLFormattedError } from 'graphql';\n\nimport { DaffError } from '@daffodil/core';\nimport {\n DaffCustomerStoreCreditDriverErrorMap,\n DaffCustomerStoreCreditInvalidAPIResponseError,\n} from '@daffodil/customer-store-credit/driver';\nimport { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffCustomerStoreCreditMagentoErrorMessageRegexMap } from './map';\n\n/**\n * Transforms a single GraphQL error.\n * Optionally accepts a request payload which can be used in certain cases\n * to add supplemental info to the error.\n */\nexport function transformMagentoCartGraphQlError(error: GraphQLFormattedError, requestPayload?: unknown): DaffError {\n // eslint-disable-next-line\n for (const code in DaffCustomerStoreCreditMagentoErrorMessageRegexMap) {\n const matchIndex = error.message.search(DaffCustomerStoreCreditMagentoErrorMessageRegexMap[code]);\n\n if (matchIndex > -1 && DaffCustomerStoreCreditDriverErrorMap[code]) {\n const errObj = new DaffCustomerStoreCreditDriverErrorMap[code](error.message);\n\n return errObj;\n }\n }\n\n return daffTransformMagentoError(error, {});\n};\n\nexport function transformMagentoReviewsError(error: any, requestPayload?: unknown) {\n if (error.graphQLErrors?.length) {\n return transformMagentoCartGraphQlError((<ApolloError>error).graphQLErrors[0], requestPayload);\n } else {\n return daffTransformMagentoError(error, {}) || new DaffCustomerStoreCreditInvalidAPIResponseError(error.message);\n }\n}\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffCustomerStoreCreditInvalidAPIResponseError } from '@daffodil/customer-store-credit/driver';\n\nimport { MagentoGetCustomerStoreCreditResponse } from '../models/public_api';\n\nexport const validateGetCustomerStoreCreditResponse = (response: ApolloQueryResult<MagentoGetCustomerStoreCreditResponse>) => {\n if (response.data.customer?.store_credit?.enabled) {\n return response;\n } else {\n throw new DaffCustomerStoreCreditInvalidAPIResponseError('The store credit feature is not enabled on this platform.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\nimport { DaffCustomerStoreCreditDriverInterface } from '@daffodil/customer-store-credit/driver';\n\nimport { transformMagentoReviewsError } from './errors/transform';\nimport { MagentoGetCustomerStoreCreditResponse } from './models/public_api';\nimport { getCustomerStoreCredit } from './queries/public_api';\nimport { magentoCustomerStoreCreditTransform } from './transforms/public_api';\nimport { validateGetCustomerStoreCreditResponse } from './validators/public_api';\n\n/**\n * A service for making Magento GraphQL queries for customers.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditMagentoService implements DaffCustomerStoreCreditDriverInterface {\n constructor(\n private apollo: Apollo,\n ) {}\n\n get(): Observable<DaffCustomerStoreCredit> {\n return this.apollo.query<MagentoGetCustomerStoreCreditResponse>({\n query: getCustomerStoreCredit,\n }).pipe(\n map(validateGetCustomerStoreCreditResponse),\n map((response) => magentoCustomerStoreCreditTransform(response.data.customer.store_credit)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n provideDaffCustomerOrderMagentoExtraOrderFragments,\n provideDaffCustomerOrderMagentoExtraOrderTransforms,\n} from '@daffodil/customer-order/driver/magento/2-4-6';\nimport { provideDaffCustomerStoreCreditDriver } from '@daffodil/customer-store-credit/driver';\n\nimport { DaffCustomerStoreCreditMagentoService } from './customer-store-credit.service';\nimport { magentoCustomerOrderStoreCreditTotalFragment } from './queries/public_api';\nimport { magentoCustomerOrderWithStoreCreditTransform } from './transforms/public_api';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCustomerStoreCreditMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffCustomerStoreCreditMagentoDriverModule> {\n return {\n ngModule: DaffCustomerStoreCreditMagentoDriverModule,\n providers: [\n provideDaffCustomerStoreCreditDriver(DaffCustomerStoreCreditMagentoService),\n provideDaffCustomerOrderMagentoExtraOrderFragments(\n magentoCustomerOrderStoreCreditTotalFragment,\n ),\n provideDaffCustomerOrderMagentoExtraOrderTransforms(\n magentoCustomerOrderWithStoreCreditTransform,\n ),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAIa,mCAAmC,GAAG,CAAC,WAAuC,MAA+B;AACxH,IAAA,OAAO,EAAE,WAAW,CAAC,eAAe,CAAC,KAAK;AAC3C,CAAA;;ACAM,MAAM,4CAA4C,GAAgF,CAAC,SAAoB,EAAE,YAAiD,EAAE,KAAa,MAAiB;AAC/O,IAAA,GAAG,SAAS;AACZ,IAAA,MAAM,EAAE;QACN,GAAG,SAAS,CAAC,MAAM;AACnB,QAAA;AACE,YAAA,IAAI,EAAE,2CAA2C;AACjD,YAAA,KAAK,EAAE,cAAc;AACrB,YAAA,KAAK,EAAE,YAAY,CAAC,KAAK,EAAE,kBAAkB,CAAC,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AAA;AACrD,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,0CAA0C;AACpD,YAAA,SAAS,EAAE;gBACT,oCAAoC,CAAC,qCAAqC,CAAC;gBAC3E,kDAAkD,CAChD,4CAA4C,CAC7C;gBACD,mDAAmD,CACjD,4CAA4C,CAC7C;AACF,aAAA;SACF;IACH;kIAdW,0CAA0C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA1C,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0CAA0C,YAHnD,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0CAA0C,YAHnD,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAGH,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBALtD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;ACpBD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-customer-store-credit-driver-magento.mjs","sources":["../../../libs/customer-store-credit/driver/magento/src/transforms/responses/customer-store-credit.ts","../../../libs/customer-store-credit/driver/magento/src/transforms/responses/customer-order.ts","../../../libs/customer-store-credit/driver/magento/src/queries/fragments/store-credit.ts","../../../libs/customer-store-credit/driver/magento/src/queries/fragments/customer-order.ts","../../../libs/customer-store-credit/driver/magento/src/queries/get-store-credit.ts","../../../libs/customer-store-credit/driver/magento/src/errors/map.ts","../../../libs/customer-store-credit/driver/magento/src/errors/transform.ts","../../../libs/customer-store-credit/driver/magento/src/validators/get-customer-store-credit.ts","../../../libs/customer-store-credit/driver/magento/src/customer-store-credit.service.ts","../../../libs/customer-store-credit/driver/magento/src/driver.module.ts","../../../libs/customer-store-credit/driver/magento/src/daffodil-customer-store-credit-driver-magento.ts"],"sourcesContent":["import { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\nimport { MagentoCustomerStoreCredit } from '../../models/public_api';\n\nexport const magentoCustomerStoreCreditTransform = (storeCredit: MagentoCustomerStoreCredit): DaffCustomerStoreCredit => ({\n balance: storeCredit.current_balance.value,\n});\n","import { DaffMagentoCustomerOrderExtraTransform } from '@daffodil/customer-order/driver/magento/2-4-6';\nimport { DAFF_CUSTOMER_STORE_CREDIT_ORDER_TOTAL_TYPE } from '@daffodil/customer-store-credit';\nimport { DaffOrder } from '@daffodil/order';\n\nimport { MagentoCustomerOrderWithStoreCredit } from '../../models/public_api';\n\nexport const magentoCustomerOrderWithStoreCreditTransform: DaffMagentoCustomerOrderExtraTransform<MagentoCustomerOrderWithStoreCredit> = (daffOrder: DaffOrder, magentoOrder: MagentoCustomerOrderWithStoreCredit, email: string): DaffOrder => ({\n ...daffOrder,\n totals: [\n ...daffOrder.totals,\n {\n type: DAFF_CUSTOMER_STORE_CREDIT_ORDER_TOTAL_TYPE,\n label: 'Store Credit',\n value: magentoOrder.total?.total_store_credit.value,\n // before grand total and after tax\n sort_order: 35,\n },\n ].sort((a, b) => a.sort_order - b.sort_order),\n});\n","import { gql } from 'apollo-angular';\n\nimport { magentoMoneyFragment } from '@daffodil/driver/magento';\n\nexport const magentoCustomerStoreCreditFragment = gql`\n fragment magentoCustomerStoreCredit on CustomerStoreCredit {\n current_balance {\n ...moneyFragment\n }\n enabled\n }\n ${magentoMoneyFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoMoneyFragment } from '@daffodil/driver/magento';\n\nexport const magentoCustomerOrderStoreCreditTotalFragment = gql`\n fragment magentoCustomerOrderStoreCreditTotal on CustomerOrder {\n total {\n total_store_credit {\n ...moneyFragment\n }\n }\n }\n ${magentoMoneyFragment}\n`;\n","import { gql } from 'apollo-angular';\n\nimport { magentoCustomerStoreCreditFragment } from './fragments/public_api';\n\nexport const MAGENTO_GET_CUSTOMER_STORE_CREDIT_QUERY_NAME = 'MagentoGetCustomerStoreCredit';\n\nexport const getCustomerStoreCredit = gql`\n query ${MAGENTO_GET_CUSTOMER_STORE_CREDIT_QUERY_NAME} {\n customer {\n store_credit {\n ...magentoCustomerStoreCredit\n }\n }\n }\n ${magentoCustomerStoreCreditFragment}\n`;\n","export const DaffCustomerStoreCreditMagentoErrorMessageRegexMap = {\n};\n","import { CombinedGraphQLErrors } from '@apollo/client';\nimport { GraphQLFormattedError } from 'graphql';\n\nimport { DaffError } from '@daffodil/core';\nimport {\n DaffCustomerStoreCreditDriverErrorMap,\n DaffCustomerStoreCreditInvalidAPIResponseError,\n} from '@daffodil/customer-store-credit/driver';\nimport { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffCustomerStoreCreditMagentoErrorMessageRegexMap } from './map';\n\n/**\n * Transforms a single GraphQL error.\n * Optionally accepts a request payload which can be used in certain cases\n * to add supplemental info to the error.\n */\nexport function transformMagentoCartGraphQlError(error: GraphQLFormattedError, requestPayload?: unknown): DaffError {\n // eslint-disable-next-line\n for (const code in DaffCustomerStoreCreditMagentoErrorMessageRegexMap) {\n const matchIndex = error.message.search(DaffCustomerStoreCreditMagentoErrorMessageRegexMap[code]);\n\n if (matchIndex > -1 && DaffCustomerStoreCreditDriverErrorMap[code]) {\n const errObj = new DaffCustomerStoreCreditDriverErrorMap[code](error.message);\n\n return errObj;\n }\n }\n\n return daffTransformMagentoError(error, {});\n}\n\nexport function transformMagentoReviewsError(error: any, requestPayload?: unknown) {\n if (CombinedGraphQLErrors.is(error)) {\n return transformMagentoCartGraphQlError(error.errors[0], requestPayload);\n } else {\n return daffTransformMagentoError(error, {}) || new DaffCustomerStoreCreditInvalidAPIResponseError(error.message);\n }\n}\n","import { Apollo } from 'apollo-angular';\n\nimport { DaffCustomerStoreCreditInvalidAPIResponseError } from '@daffodil/customer-store-credit/driver';\n\nimport { MagentoGetCustomerStoreCreditResponse } from '../models/public_api';\n\nexport const validateGetCustomerStoreCreditResponse = (response: Apollo.QueryResult<MagentoGetCustomerStoreCreditResponse>) => {\n if (response.data.customer?.store_credit?.enabled) {\n return response;\n } else {\n throw new DaffCustomerStoreCreditInvalidAPIResponseError('The store credit feature is not enabled on this platform.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\nimport { DaffCustomerStoreCreditDriverInterface } from '@daffodil/customer-store-credit/driver';\n\nimport { transformMagentoReviewsError } from './errors/transform';\nimport { MagentoGetCustomerStoreCreditResponse } from './models/public_api';\nimport { getCustomerStoreCredit } from './queries/public_api';\nimport { magentoCustomerStoreCreditTransform } from './transforms/public_api';\nimport { validateGetCustomerStoreCreditResponse } from './validators/public_api';\n\n/**\n * A service for making Magento GraphQL queries for customers.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditMagentoService implements DaffCustomerStoreCreditDriverInterface {\n constructor(\n private apollo: Apollo,\n ) {}\n\n get(): Observable<DaffCustomerStoreCredit> {\n return this.apollo.query<MagentoGetCustomerStoreCreditResponse>({\n query: getCustomerStoreCredit,\n }).pipe(\n map(validateGetCustomerStoreCreditResponse),\n map((response) => magentoCustomerStoreCreditTransform(response.data.customer.store_credit)),\n catchError(err => throwError(() => transformMagentoReviewsError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n provideDaffCustomerOrderMagentoExtraOrderFragments,\n provideDaffCustomerOrderMagentoExtraOrderTransforms,\n} from '@daffodil/customer-order/driver/magento/2-4-6';\nimport { provideDaffCustomerStoreCreditDriver } from '@daffodil/customer-store-credit/driver';\n\nimport { DaffCustomerStoreCreditMagentoService } from './customer-store-credit.service';\nimport { magentoCustomerOrderStoreCreditTotalFragment } from './queries/public_api';\nimport { magentoCustomerOrderWithStoreCreditTransform } from './transforms/public_api';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCustomerStoreCreditMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffCustomerStoreCreditMagentoDriverModule> {\n return {\n ngModule: DaffCustomerStoreCreditMagentoDriverModule,\n providers: [\n provideDaffCustomerStoreCreditDriver(DaffCustomerStoreCreditMagentoService),\n provideDaffCustomerOrderMagentoExtraOrderFragments(\n magentoCustomerOrderStoreCreditTotalFragment,\n ),\n provideDaffCustomerOrderMagentoExtraOrderTransforms(\n magentoCustomerOrderWithStoreCreditTransform,\n ),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAIa,mCAAmC,GAAG,CAAC,WAAuC,MAA+B;AACxH,IAAA,OAAO,EAAE,WAAW,CAAC,eAAe,CAAC,KAAK;AAC3C,CAAA;;ACAM,MAAM,4CAA4C,GAAgF,CAAC,SAAoB,EAAE,YAAiD,EAAE,KAAa,MAAiB;AAC/O,IAAA,GAAG,SAAS;AACZ,IAAA,MAAM,EAAE;QACN,GAAG,SAAS,CAAC,MAAM;AACnB,QAAA;AACE,YAAA,IAAI,EAAE,2CAA2C;AACjD,YAAA,KAAK,EAAE,cAAc;AACrB,YAAA,KAAK,EAAE,YAAY,CAAC,KAAK,EAAE,kBAAkB,CAAC,KAAK;;AAEnD,YAAA,UAAU,EAAE,EAAE;AACf,SAAA;AACF,KAAA,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,UAAU,GAAG,CAA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AAC;gBAC3E,kDAAkD,CAChD,4CAA4C,CAC7C;gBACD,mDAAmD,CACjD,4CAA4C,CAC7C;AACF,aAAA;SACF;IACH;iIAdW,0CAA0C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA1C,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,0CAA0C,YAHnD,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,0CAA0C,YAHnD,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGH,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBALtD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;ACpBD;;AAEG;;;;"}
@@ -18,10 +18,10 @@ class DaffCustomerStoreCreditTestingDriver {
18
18
  get() {
19
19
  return of(this.factory.create());
20
20
  }
21
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditTestingDriver, deps: [{ token: i1.DaffCustomerStoreCreditFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
22
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditTestingDriver, providedIn: 'root' }); }
21
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditTestingDriver, deps: [{ token: i1.DaffCustomerStoreCreditFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
22
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditTestingDriver, providedIn: 'root' }); }
23
23
  }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditTestingDriver, decorators: [{
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditTestingDriver, decorators: [{
25
25
  type: Injectable,
26
26
  args: [{
27
27
  providedIn: 'root',
@@ -40,11 +40,11 @@ class DaffCustomerStoreCreditTestingDriverModule {
40
40
  ],
41
41
  };
42
42
  }
43
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditTestingDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
44
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditTestingDriverModule, imports: [CommonModule] }); }
45
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditTestingDriverModule, imports: [CommonModule] }); }
43
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditTestingDriverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
44
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditTestingDriverModule, imports: [CommonModule] }); }
45
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditTestingDriverModule, imports: [CommonModule] }); }
46
46
  }
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditTestingDriverModule, decorators: [{
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditTestingDriverModule, decorators: [{
48
48
  type: NgModule,
49
49
  args: [{
50
50
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-customer-store-credit-driver-testing.mjs","sources":["../../../libs/customer-store-credit/driver/testing/src/drivers/store-credit.service.ts","../../../libs/customer-store-credit/driver/testing/src/drivers/driver.module.ts","../../../libs/customer-store-credit/driver/testing/src/daffodil-customer-store-credit-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\nimport { DaffCustomerStoreCreditDriverInterface } from '@daffodil/customer-store-credit/driver';\nimport { DaffCustomerStoreCreditFactory } from '@daffodil/customer-store-credit/testing';\n\n/**\n * A basic customer driver that creates mock customer results of different kinds.\n * For testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditTestingDriver implements DaffCustomerStoreCreditDriverInterface {\n constructor(\n private factory: DaffCustomerStoreCreditFactory,\n ) {}\n\n get(): Observable<DaffCustomerStoreCredit> {\n return of(this.factory.create());\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffCustomerStoreCreditDriver } from '@daffodil/customer-store-credit/driver';\n\nimport { DaffCustomerStoreCreditTestingDriver } from './store-credit.service';\n\n/**\n * Provides the {@link DaffCustomerStoreCreditTestingDriver} as the {@link DaffCustomerStoreCreditDriver}.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCustomerStoreCreditTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffCustomerStoreCreditTestingDriverModule> {\n return {\n ngModule: DaffCustomerStoreCreditTestingDriverModule,\n providers: [\n provideDaffCustomerStoreCreditDriver(DaffCustomerStoreCreditTestingDriver),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAUA;;;;;AAKG;MAIU,oCAAoC,CAAA;AAC/C,IAAA,WAAA,CACU,OAAuC,EAAA;QAAvC,IAAA,CAAA,OAAO,GAAP,OAAO;IACd;IAEH,GAAG,GAAA;QACD,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IAClC;kIAPW,oCAAoC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oCAAoC,cAFnC,MAAM,EAAA,CAAA,CAAA;;4FAEP,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAHhD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACRD;;AAEG;MAMU,0CAA0C,CAAA;AACrD,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,0CAA0C;AACpD,YAAA,SAAS,EAAE;gBACT,oCAAoC,CAAC,oCAAoC,CAAC;AAC3E,aAAA;SACF;IACH;kIARW,0CAA0C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA1C,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0CAA0C,YAHnD,YAAY,CAAA,EAAA,CAAA,CAAA;AAGH,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0CAA0C,YAHnD,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAGH,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBALtD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;ACjBD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-customer-store-credit-driver-testing.mjs","sources":["../../../libs/customer-store-credit/driver/testing/src/drivers/store-credit.service.ts","../../../libs/customer-store-credit/driver/testing/src/drivers/driver.module.ts","../../../libs/customer-store-credit/driver/testing/src/daffodil-customer-store-credit-driver-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\nimport { DaffCustomerStoreCreditDriverInterface } from '@daffodil/customer-store-credit/driver';\nimport { DaffCustomerStoreCreditFactory } from '@daffodil/customer-store-credit/testing';\n\n/**\n * A basic customer driver that creates mock customer results of different kinds.\n * For testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditTestingDriver implements DaffCustomerStoreCreditDriverInterface {\n constructor(\n private factory: DaffCustomerStoreCreditFactory,\n ) {}\n\n get(): Observable<DaffCustomerStoreCredit> {\n return of(this.factory.create());\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport { provideDaffCustomerStoreCreditDriver } from '@daffodil/customer-store-credit/driver';\n\nimport { DaffCustomerStoreCreditTestingDriver } from './store-credit.service';\n\n/**\n * Provides the {@link DaffCustomerStoreCreditTestingDriver} as the {@link DaffCustomerStoreCreditDriver}.\n */\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffCustomerStoreCreditTestingDriverModule {\n static forRoot(): ModuleWithProviders<DaffCustomerStoreCreditTestingDriverModule> {\n return {\n ngModule: DaffCustomerStoreCreditTestingDriverModule,\n providers: [\n provideDaffCustomerStoreCreditDriver(DaffCustomerStoreCreditTestingDriver),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAUA;;;;;AAKG;MAIU,oCAAoC,CAAA;AAC/C,IAAA,WAAA,CACU,OAAuC,EAAA;QAAvC,IAAA,CAAA,OAAO,GAAP,OAAO;IACd;IAEH,GAAG,GAAA;QACD,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;IAClC;iIAPW,oCAAoC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApC,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,oCAAoC,cAFnC,MAAM,EAAA,CAAA,CAAA;;2FAEP,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAHhD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACRD;;AAEG;MAMU,0CAA0C,CAAA;AACrD,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,0CAA0C;AACpD,YAAA,SAAS,EAAE;gBACT,oCAAoC,CAAC,oCAAoC,CAAC;AAC3E,aAAA;SACF;IACH;iIARW,0CAA0C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA1C,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,0CAA0C,YAHnD,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,0CAA0C,YAHnD,YAAY,CAAA,EAAA,CAAA,CAAA;;2FAGH,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBALtD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACF,iBAAA;;;ACjBD;;AAEG;;;;"}
@@ -16,10 +16,10 @@ class DaffCustomerStoreCreditClearErrorsGuard {
16
16
  this.store.dispatch(new DaffCustomerStoreCreditClearErrors());
17
17
  return true;
18
18
  }
19
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditClearErrorsGuard, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
20
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditClearErrorsGuard, providedIn: 'root' }); }
19
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditClearErrorsGuard, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
20
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditClearErrorsGuard, providedIn: 'root' }); }
21
21
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditClearErrorsGuard, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditClearErrorsGuard, decorators: [{
23
23
  type: Injectable,
24
24
  args: [{ providedIn: 'root' }]
25
25
  }], ctorParameters: () => [{ type: i1.Store }] });
@@ -35,10 +35,10 @@ class DaffCustomerStoreCreditResolver {
35
35
  this.facade.dispatch(new DaffCustomerStoreCreditLoad());
36
36
  return of(true);
37
37
  }
38
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditResolver, deps: [{ token: i1$1.DaffCustomerStoreCreditPageFacade }], target: i0.ɵɵFactoryTarget.Injectable }); }
39
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditResolver, providedIn: 'root' }); }
38
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditResolver, deps: [{ token: i1$1.DaffCustomerStoreCreditPageFacade }], target: i0.ɵɵFactoryTarget.Injectable }); }
39
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditResolver, providedIn: 'root' }); }
40
40
  }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditResolver, decorators: [{
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditResolver, decorators: [{
42
42
  type: Injectable,
43
43
  args: [{
44
44
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-customer-store-credit-routing.mjs","sources":["../../../libs/customer-store-credit/routing/src/guards/clear-errors.guard.ts","../../../libs/customer-store-credit/routing/src/resolvers/customer-store-credit.resolver.ts","../../../libs/customer-store-credit/routing/src/daffodil-customer-store-credit-routing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { UrlTree } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffCustomerStoreCreditClearErrors } from '@daffodil/customer-store-credit/state';\n\n/**\n * A guard that will clear customer state errors before allowing route deactivation.\n */\n@Injectable({ providedIn: 'root' })\nexport class DaffCustomerStoreCreditClearErrorsGuard {\n constructor(private store: Store<any>) {}\n\n canDeactivate(): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {\n this.store.dispatch(new DaffCustomerStoreCreditClearErrors());\n return true;\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffCustomerStoreCreditLoad,\n DaffCustomerStoreCreditPageFacade,\n} from '@daffodil/customer-store-credit/state';\n\n/**\n * Dispatches customer load.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditResolver {\n constructor(\n private facade: DaffCustomerStoreCreditPageFacade,\n ) {}\n\n resolve(): Observable<boolean> {\n this.facade.dispatch(new DaffCustomerStoreCreditLoad());\n\n return of(true);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;AAOA;;AAEG;MAEU,uCAAuC,CAAA;AAClD,IAAA,WAAA,CAAoB,KAAiB,EAAA;QAAjB,IAAA,CAAA,KAAK,GAAL,KAAK;IAAe;IAExC,aAAa,GAAA;QACX,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,kCAAkC,EAAE,CAAC;AAC7D,QAAA,OAAO,IAAI;IACb;kIANW,uCAAuC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,KAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uCAAuC,cAD1B,MAAM,EAAA,CAAA,CAAA;;4FACnB,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBADnD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACClC;;AAEG;MAIU,+BAA+B,CAAA;AAC1C,IAAA,WAAA,CACU,MAAyC,EAAA;QAAzC,IAAA,CAAA,MAAM,GAAN,MAAM;IACb;IAEH,OAAO,GAAA;QACL,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,2BAA2B,EAAE,CAAC;AAEvD,QAAA,OAAO,EAAE,CAAC,IAAI,CAAC;IACjB;kIATW,+BAA+B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,iCAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,+BAA+B,cAF9B,MAAM,EAAA,CAAA,CAAA;;4FAEP,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAH3C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AChBD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-customer-store-credit-routing.mjs","sources":["../../../libs/customer-store-credit/routing/src/guards/clear-errors.guard.ts","../../../libs/customer-store-credit/routing/src/resolvers/customer-store-credit.resolver.ts","../../../libs/customer-store-credit/routing/src/daffodil-customer-store-credit-routing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { UrlTree } from '@angular/router';\nimport { Store } from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffCustomerStoreCreditClearErrors } from '@daffodil/customer-store-credit/state';\n\n/**\n * A guard that will clear customer state errors before allowing route deactivation.\n */\n@Injectable({ providedIn: 'root' })\nexport class DaffCustomerStoreCreditClearErrorsGuard {\n constructor(private store: Store<any>) {}\n\n canDeactivate(): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {\n this.store.dispatch(new DaffCustomerStoreCreditClearErrors());\n return true;\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n} from 'rxjs';\n\nimport {\n DaffCustomerStoreCreditLoad,\n DaffCustomerStoreCreditPageFacade,\n} from '@daffodil/customer-store-credit/state';\n\n/**\n * Dispatches customer load.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditResolver {\n constructor(\n private facade: DaffCustomerStoreCreditPageFacade,\n ) {}\n\n resolve(): Observable<boolean> {\n this.facade.dispatch(new DaffCustomerStoreCreditLoad());\n\n return of(true);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;AAOA;;AAEG;MAEU,uCAAuC,CAAA;AAClD,IAAA,WAAA,CAAoB,KAAiB,EAAA;QAAjB,IAAA,CAAA,KAAK,GAAL,KAAK;IAAe;IAExC,aAAa,GAAA;QACX,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,kCAAkC,EAAE,CAAC;AAC7D,QAAA,OAAO,IAAI;IACb;iIANW,uCAAuC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,KAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvC,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,uCAAuC,cAD1B,MAAM,EAAA,CAAA,CAAA;;2FACnB,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBADnD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACClC;;AAEG;MAIU,+BAA+B,CAAA;AAC1C,IAAA,WAAA,CACU,MAAyC,EAAA;QAAzC,IAAA,CAAA,MAAM,GAAN,MAAM;IACb;IAEH,OAAO,GAAA;QACL,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,2BAA2B,EAAE,CAAC;AAEvD,QAAA,OAAO,EAAE,CAAC,IAAI,CAAC;IACjB;iIATW,+BAA+B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,iCAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA/B,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,+BAA+B,cAF9B,MAAM,EAAA,CAAA,CAAA;;2FAEP,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAH3C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AChBD;;AAEG;;;;"}
@@ -16,10 +16,10 @@ class MockDaffCustomerStoreCreditPageFacade extends MockDaffOperationStateFacade
16
16
  }
17
17
  dispatch(action) { }
18
18
  ;
19
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MockDaffCustomerStoreCreditPageFacade, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
20
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MockDaffCustomerStoreCreditPageFacade, providedIn: 'root' }); }
19
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MockDaffCustomerStoreCreditPageFacade, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
20
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MockDaffCustomerStoreCreditPageFacade, providedIn: 'root' }); }
21
21
  }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: MockDaffCustomerStoreCreditPageFacade, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: MockDaffCustomerStoreCreditPageFacade, decorators: [{
23
23
  type: Injectable,
24
24
  args: [{ providedIn: 'root' }]
25
25
  }] });
@@ -28,13 +28,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
28
28
  * Provides the {@link MockDaffCustomerStoreCreditPageFacade} for {@link DaffCustomerStoreCreditPageFacade}.
29
29
  */
30
30
  class DaffCustomerStoreCreditStateTestingModule {
31
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditStateTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
32
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditStateTestingModule }); }
33
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditStateTestingModule, providers: [
31
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditStateTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
32
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditStateTestingModule }); }
33
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditStateTestingModule, providers: [
34
34
  { provide: DaffCustomerStoreCreditPageFacade, useExisting: MockDaffCustomerStoreCreditPageFacade },
35
35
  ] }); }
36
36
  }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditStateTestingModule, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditStateTestingModule, decorators: [{
38
38
  type: NgModule,
39
39
  args: [{
40
40
  providers: [
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-customer-store-credit-state-testing.mjs","sources":["../../../libs/customer-store-credit/state/testing/src/mock-facade.ts","../../../libs/customer-store-credit/state/testing/src/state-testing.module.ts","../../../libs/customer-store-credit/state/testing/src/daffodil-customer-store-credit-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { MockDaffOperationStateFacade } from '@daffodil/core/state/testing';\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\nimport { DaffCustomerStoreCreditPageFacadeInterface } from '@daffodil/customer-store-credit/state';\n\n/**\n * Mocks out facade fields and methods for testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffCustomerStoreCreditPageFacade extends MockDaffOperationStateFacade implements DaffCustomerStoreCreditPageFacadeInterface {\n storeCredit$ = new BehaviorSubject<DaffCustomerStoreCredit>(null);\n\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffCustomerStoreCreditPageFacade } from '@daffodil/customer-store-credit/state';\n\nimport { MockDaffCustomerStoreCreditPageFacade } from './mock-facade';\n\n/**\n * Provides the {@link MockDaffCustomerStoreCreditPageFacade} for {@link DaffCustomerStoreCreditPageFacade}.\n */\n@NgModule({\n providers: [\n { provide: DaffCustomerStoreCreditPageFacade, useExisting: MockDaffCustomerStoreCreditPageFacade },\n ],\n})\nexport class DaffCustomerStoreCreditStateTestingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;;;AAIG;AAEG,MAAO,qCAAsC,SAAQ,4BAA4B,CAAA;AADvF,IAAA,WAAA,GAAA;;AAEE,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI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state/testing/src/mock-facade.ts","../../../libs/customer-store-credit/state/testing/src/state-testing.module.ts","../../../libs/customer-store-credit/state/testing/src/daffodil-customer-store-credit-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport { MockDaffOperationStateFacade } from '@daffodil/core/state/testing';\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\nimport { DaffCustomerStoreCreditPageFacadeInterface } from '@daffodil/customer-store-credit/state';\n\n/**\n * Mocks out facade fields and methods for testing purposes.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffCustomerStoreCreditPageFacade extends MockDaffOperationStateFacade implements DaffCustomerStoreCreditPageFacadeInterface {\n storeCredit$ = new BehaviorSubject<DaffCustomerStoreCredit>(null);\n\n dispatch(action: Action) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffCustomerStoreCreditPageFacade } from '@daffodil/customer-store-credit/state';\n\nimport { MockDaffCustomerStoreCreditPageFacade } from './mock-facade';\n\n/**\n * Provides the {@link MockDaffCustomerStoreCreditPageFacade} for {@link DaffCustomerStoreCreditPageFacade}.\n */\n@NgModule({\n providers: [\n { provide: DaffCustomerStoreCreditPageFacade, useExisting: MockDaffCustomerStoreCreditPageFacade },\n ],\n})\nexport class DaffCustomerStoreCreditStateTestingModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAQA;;;;AAIG;AAEG,MAAO,qCAAsC,SAAQ,4BAA4B,CAAA;AADvF,IAAA,WAAA,GAAA;;AAEE,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,eAAe,CAA0B,IAAI,CAAC;AAGlE,IAAA;IADC,QAAQ,CAAC,MAAc,EAAA,EAAG;;iIAHf,qCAAqC,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArC,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,qCAAqC,cADxB,MAAM,EAAA,CAAA,CAAA;;2FACnB,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACPlC;;AAEG;MAMU,yCAAyC,CAAA;iIAAzC,yCAAyC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAzC,yCAAyC,EAAA,CAAA,CAAA;AAAzC,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,yCAAyC,EAAA,SAAA,EAJzC;AACT,YAAA,EAAE,OAAO,EAAE,iCAAiC,EAAE,WAAW,EAAE,qCAAqC,EAAE;AACnG,SAAA,EAAA,CAAA,CAAA;;2FAEU,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBALrD,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA,EAAE,OAAO,EAAE,iCAAiC,EAAE,WAAW,EAAE,qCAAqC,EAAE;AACnG,qBAAA;AACF,iBAAA;;;ACbD;;AAEG;;;;"}
@@ -149,10 +149,10 @@ class DaffCustomerStoreCreditPageFacade {
149
149
  dispatch(action) {
150
150
  this.store.dispatch(action);
151
151
  }
152
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditPageFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
153
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditPageFacade, providedIn: 'root' }); }
152
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditPageFacade, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
153
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditPageFacade, providedIn: 'root' }); }
154
154
  }
155
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditPageFacade, decorators: [{
155
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditPageFacade, decorators: [{
156
156
  type: Injectable,
157
157
  args: [{
158
158
  providedIn: 'root',
@@ -177,10 +177,10 @@ class DaffCustomerStoreCreditEffects {
177
177
  this.errorMatcher = errorMatcher;
178
178
  this.list$ = createEffect(() => this.actions$.pipe(ofType(DaffCustomerStoreCreditActionTypes.StoreCreditLoadAction), switchMap((action) => this.driver.get().pipe(map(resp => new DaffCustomerStoreCreditLoadSuccess(resp)), catchError((error) => of(new DaffCustomerStoreCreditLoadFailure(this.errorMatcher(error))))))));
179
179
  }
180
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditEffects, deps: [{ token: i1$1.Actions }, { token: DaffCustomerStoreCreditDriver }, { token: DAFF_CUSTOMER_STORE_CREDIT_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable }); }
181
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditEffects }); }
180
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditEffects, deps: [{ token: i1$1.Actions }, { token: DaffCustomerStoreCreditDriver }, { token: DAFF_CUSTOMER_STORE_CREDIT_ERROR_MATCHER }], target: i0.ɵɵFactoryTarget.Injectable }); }
181
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditEffects }); }
182
182
  }
183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditEffects, decorators: [{
183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditEffects, decorators: [{
184
184
  type: Injectable
185
185
  }], ctorParameters: () => [{ type: i1$1.Actions }, { type: undefined, decorators: [{
186
186
  type: Inject,
@@ -215,14 +215,14 @@ provider: provideDaffCustomerStoreCreditReducers, } = createSingleInjectionToken
215
215
  * Creates the customer store credit feature store.
216
216
  */
217
217
  class DaffCustomerStoreCreditStateModule {
218
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
219
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditStateModule, imports: [i1.StoreFeatureModule, i1$1.EffectsFeatureModule] }); }
220
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditStateModule, imports: [StoreModule.forFeature(DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY, DAFF_CUSTOMER_STORE_CREDIT_REDUCERS),
218
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditStateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
219
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditStateModule, imports: [i1.StoreFeatureModule, i1$1.EffectsFeatureModule] }); }
220
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditStateModule, imports: [StoreModule.forFeature(DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY, DAFF_CUSTOMER_STORE_CREDIT_REDUCERS),
221
221
  EffectsModule.forFeature([
222
222
  DaffCustomerStoreCreditEffects,
223
223
  ])] }); }
224
224
  }
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditStateModule, decorators: [{
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditStateModule, decorators: [{
226
226
  type: NgModule,
227
227
  args: [{
228
228
  imports: [
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-customer-store-credit-state.mjs","sources":["../../../libs/customer-store-credit/state/src/actions/store-credit.actions.ts","../../../libs/customer-store-credit/state/src/reducers/store-feature-key.ts","../../../libs/customer-store-credit/state/src/reducers/token/extra.token.ts","../../../libs/customer-store-credit/state/src/reducers/store-credit/initial-state.ts","../../../libs/customer-store-credit/state/src/reducers/store-credit/reducer.ts","../../../libs/customer-store-credit/state/src/selectors/feature.selector.ts","../../../libs/customer-store-credit/state/src/selectors/store-credit/selector.ts","../../../libs/customer-store-credit/state/src/facades/store-credit/facade.ts","../../../libs/customer-store-credit/state/src/injection-tokens/error-matcher.token.ts","../../../libs/customer-store-credit/state/src/effects/store-credit.effects.ts","../../../libs/customer-store-credit/state/src/reducers/token/reducers.token.ts","../../../libs/customer-store-credit/state/src/state.module.ts","../../../libs/customer-store-credit/state/src/daffodil-customer-store-credit-state.ts"],"sourcesContent":["import { Action } from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\n/**\n * The customer store credit action types enum.\n */\nexport enum DaffCustomerStoreCreditActionTypes {\n StoreCreditLoadAction = '[@daffodil/customer-store-credit] Store Credit Load Action',\n StoreCreditLoadSuccessAction = '[@daffodil/customer-store-credit] Store Credit Load Success Action',\n StoreCreditLoadFailureAction = '[@daffodil/customer-store-credit] Store Credit Load Failure Action',\n StoreCreditClearErrorsAction = '[@daffodil/customer-store-credit] Store Credit Clear Errors Action',\n}\n\n/**\n * Loads the store credit of the current customer.\n */\nexport class DaffCustomerStoreCreditLoad implements Action {\n readonly type = DaffCustomerStoreCreditActionTypes.StoreCreditLoadAction;\n}\n\n/**\n * Indicates a successful load of the customer's store credit.\n */\nexport class DaffCustomerStoreCreditLoadSuccess<T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit> implements Action {\n readonly type = DaffCustomerStoreCreditActionTypes.StoreCreditLoadSuccessAction;\n\n constructor(public payload: T) {}\n}\n\n/**\n * A failed customer store credit load with the error message.\n */\nexport class DaffCustomerStoreCreditLoadFailure implements Action {\n readonly type = DaffCustomerStoreCreditActionTypes.StoreCreditLoadFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\n/**\n * An action to clear all errors in state.\n */\nexport class DaffCustomerStoreCreditClearErrors implements Action {\n readonly type = DaffCustomerStoreCreditActionTypes.StoreCreditClearErrorsAction;\n}\n\n/**\n * A union of the customer action types.\n */\nexport type DaffCustomerStoreCreditActions<\n TStoreCredit extends DaffCustomerStoreCredit = DaffCustomerStoreCredit,\n> =\n | DaffCustomerStoreCreditLoad\n | DaffCustomerStoreCreditLoadSuccess<TStoreCredit>\n | DaffCustomerStoreCreditLoadFailure\n | DaffCustomerStoreCreditClearErrors;\n","/**\n * The key under which the customer store credit feature state will be stored.\n */\nexport const DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY = 'daffCustomerStoreCredit';\n","import { ActionReducer } from '@ngrx/store';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\n\nimport { DaffCustomerStoreCreditReducersState } from '../reducers.interface';\n\nexport const {\n /**\n * A token to hold the injectable extra reducers.\n *\n * Prefer using {@link daffCustomerStoreCreditProvideExtraReducers}.\n */\n token: DAFF_CUSTOMER_STORE_CREDIT_EXTRA_REDUCERS,\n\n /**\n * Provides additional reducers that run after the standard Daffodil customer reducers.\n *\n * @example\n * ```ts\n * providers: [\n * ...daffCustomerStoreCreditProvideExtraReducers(\n * myReducer1,\n * myReducer2\n * )\n * ]\n * ```\n */\n provider: daffCustomerStoreCreditProvideExtraReducers,\n} = createMultiInjectionToken<ActionReducer<DaffCustomerStoreCreditReducersState>>(\n 'DAFF_CUSTOMER_STORE_CREDIT_EXTRA_REDUCERS',\n { providedIn: 'any' },\n);\n","import { daffOperationInitialState } from '@daffodil/core/state';\n\nimport { DaffCustomerStoreCreditReducerState } from './type';\n\n/**\n * The initial state for the main customer store credit state, see {@link DaffCustomerStoreCreditReducerState}.\n */\nexport const daffCustomerStoreCreditInitialState: DaffCustomerStoreCreditReducerState = {\n ...daffOperationInitialState,\n storeCredit: {\n balance: 0,\n },\n};\n","import {\n daffCompleteOperation,\n daffOperationFailed,\n daffStartResolution,\n} from '@daffodil/core/state';\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\nimport { daffCustomerStoreCreditInitialState } from './initial-state';\nimport { DaffCustomerStoreCreditReducerState } from './type';\nimport {\n DaffCustomerStoreCreditActions,\n DaffCustomerStoreCreditActionTypes,\n DaffCustomerStoreCreditLoadFailure,\n} from '../../actions/store-credit.actions';\n\n/**\n * The reducer for the customer store credit page state, see {@link DaffCustomerStoreCreditReducerState}.\n */\nexport const daffCustomerStoreCreditReducer = <T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit>(\n state = daffCustomerStoreCreditInitialState,\n action: DaffCustomerStoreCreditActions<T>,\n): DaffCustomerStoreCreditReducerState => {\n switch (action.type) {\n case DaffCustomerStoreCreditActionTypes.StoreCreditLoadAction:\n return daffStartResolution(state);\n\n case DaffCustomerStoreCreditActionTypes.StoreCreditLoadSuccessAction:\n return {\n ...daffCompleteOperation(state),\n storeCredit: action.payload,\n };\n\n case DaffCustomerStoreCreditActionTypes.StoreCreditClearErrorsAction:\n return daffCompleteOperation(state);\n\n case DaffCustomerStoreCreditActionTypes.StoreCreditLoadFailureAction:\n return daffOperationFailed([(<DaffCustomerStoreCreditLoadFailure>action).payload], state);\n\n default:\n return state;\n }\n};\n","import {\n createFeatureSelector,\n MemoizedSelector,\n defaultMemoize,\n} from '@ngrx/store';\n\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\nimport {\n DaffCustomerStoreCreditStateRootSlice,\n DaffCustomerStoreCreditReducersState,\n DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\n/**\n * Selector for the customer store credit feature state.\n */\nexport interface DaffCustomerStoreCreditFeatureSelector<\n TStoreCredit extends DaffCustomerStoreCredit = DaffCustomerStoreCredit\n> {\n selectCustomerStoreCreditFeatureState: MemoizedSelector<DaffCustomerStoreCreditStateRootSlice<TStoreCredit>, DaffCustomerStoreCreditReducersState<TStoreCredit>>;\n}\n\nexport const getDaffCustomerStoreCreditReducersStateSelector: <TStoreCredit extends DaffCustomerStoreCredit = DaffCustomerStoreCredit>() => DaffCustomerStoreCreditFeatureSelector<TStoreCredit> = defaultMemoize(<TStoreCredit extends DaffCustomerStoreCredit = DaffCustomerStoreCredit>() => ({\n selectCustomerStoreCreditFeatureState: createFeatureSelector<DaffCustomerStoreCreditReducersState<TStoreCredit>>(DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY),\n})).memoized;\n","import {\n createSelector,\n MemoizedSelector,\n defaultMemoize,\n} from '@ngrx/store';\n\nimport {\n daffOperationStateSelectorFactory,\n DaffOperationStateSelectors,\n} from '@daffodil/core/state';\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\nimport {\n DaffCustomerStoreCreditReducerState,\n DaffCustomerStoreCreditStateRootSlice,\n} from '../../reducers/public_api';\nimport { getDaffCustomerStoreCreditReducersStateSelector } from '../feature.selector';\n\n/**\n * Selectors for the main part of customer store credit state.\n */\nexport interface DaffCustomerStoreCreditSelectors<T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit> extends DaffOperationStateSelectors<DaffCustomerStoreCreditStateRootSlice<T>, DaffCustomerStoreCreditReducerState<T>> {\n /**\n * Selects the customer's current store credit balance.\n */\n selectStoreCredit: MemoizedSelector<DaffCustomerStoreCreditStateRootSlice<T>, T>;\n}\n\n/**\n * Creates a group of selectors for {@link DaffCustomerStoreCreditReducerState} that use the passed state selector as the basis.\n */\nconst daffCustomerStoreCreditCreateSelectors = <T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit>(): DaffCustomerStoreCreditSelectors<T> => {\n const { selectCustomerStoreCreditFeatureState } = getDaffCustomerStoreCreditReducersStateSelector<T>();\n const selectCustomerStoreCreditState = createSelector(\n selectCustomerStoreCreditFeatureState,\n state => state.storeCredit,\n );\n const selectStoreCredit = createSelector(\n selectCustomerStoreCreditState,\n state => state.storeCredit,\n );\n\n return {\n ...daffOperationStateSelectorFactory(selectCustomerStoreCreditState),\n selectStoreCredit,\n };\n};\n\nexport const daffCustomerStoreCreditGetSelectors: <T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit>() => DaffCustomerStoreCreditSelectors<T> = defaultMemoize(<T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit>() => daffCustomerStoreCreditCreateSelectors<T>()).memoized;\n\n","import { Injectable } from '@angular/core';\nimport {\n Store,\n select,\n Action,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\nimport { DaffCustomerStoreCreditPageFacadeInterface } from './interface';\nimport {\n DaffCustomerStoreCreditReducerState,\n DaffCustomerStoreCreditStateRootSlice,\n} from '../../reducers/public_api';\nimport { daffCustomerStoreCreditGetSelectors } from '../../selectors/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditPageFacade<T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit> implements DaffCustomerStoreCreditPageFacadeInterface<T> {\n storeCredit$: Observable<T>;\n loadingState$: Observable<DaffCustomerStoreCreditReducerState['daffState']>;\n loading$: Observable<boolean>;\n resolving$: Observable<boolean>;\n mutating$: Observable<boolean>;\n errors$: Observable<DaffCustomerStoreCreditReducerState['daffErrors']>;\n hasErrors$: Observable<boolean>;\n\n constructor(\n private store: Store<DaffCustomerStoreCreditStateRootSlice>,\n ) {\n const {\n selectStoreCredit,\n selectErrors,\n selectHasErrors,\n selectLoading,\n selectLoadingState,\n selectMutating,\n selectResolving,\n } = daffCustomerStoreCreditGetSelectors<T>();\n\n this.storeCredit$ = this.store.pipe(select(selectStoreCredit));\n this.loadingState$ = this.store.pipe(select(selectLoadingState));\n this.loading$ = this.store.pipe(select(selectLoading));\n this.resolving$ = this.store.pipe(select(selectResolving));\n this.mutating$ = this.store.pipe(select(selectMutating));\n this.errors$ = this.store.pipe(select(selectErrors));\n this.hasErrors$ = this.store.pipe(select(selectHasErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\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_CUSTOMER_STORE_CREDIT_ERROR_MATCHER,\n /**\n * Provider function for {@link DAFF_CUSTOMER_STORE_CREDIT_ERROR_MATCHER}.\n */\n provider: provideDaffCustomerStoreCreditErrorMatcher,\n} = createSingleInjectionToken<typeof daffTransformErrorToStateError>(\n 'DAFF_CUSTOMER_STORE_CREDIT_ERROR_MATCHER',\n { factory: () => daffTransformErrorToStateError },\n);\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffError } from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\nimport {\n DaffCustomerStoreCreditDriver,\n DaffCustomerStoreCreditDriverInterface,\n} from '@daffodil/customer-store-credit/driver';\n\nimport {\n DaffCustomerStoreCreditActionTypes,\n DaffCustomerStoreCreditLoadFailure,\n DaffCustomerStoreCreditLoadSuccess,\n DaffCustomerStoreCreditActions,\n} from '../actions/store-credit.actions';\nimport { DAFF_CUSTOMER_STORE_CREDIT_ERROR_MATCHER } from '../injection-tokens/public_api';\n\n@Injectable()\nexport class DaffCustomerStoreCreditEffects<\n T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit,\n> {\n constructor(\n private actions$: Actions<DaffCustomerStoreCreditActions<T>>,\n @Inject(DaffCustomerStoreCreditDriver) private driver: DaffCustomerStoreCreditDriverInterface<T>,\n @Inject(DAFF_CUSTOMER_STORE_CREDIT_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n ) {}\n\n list$ = createEffect(() => this.actions$.pipe(\n ofType(DaffCustomerStoreCreditActionTypes.StoreCreditLoadAction),\n switchMap((action) =>\n this.driver.get().pipe(\n map(resp => new DaffCustomerStoreCreditLoadSuccess<T>(resp)),\n catchError((error: DaffError) => of(new DaffCustomerStoreCreditLoadFailure(this.errorMatcher(error)))),\n ),\n ),\n ));\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\nimport { DAFF_CUSTOMER_STORE_CREDIT_EXTRA_REDUCERS } from './extra.token';\nimport { DaffCustomerStoreCreditReducersState } from '../reducers.interface';\nimport { daffCustomerStoreCreditReducer } from '../store-credit/public_api';\n\nexport const {\n /**\n * An internal token to hold the Daffodil customer reducers.\n * Includes the extra and standard reducers.\n *\n * @docs-private\n */\n token: DAFF_CUSTOMER_STORE_CREDIT_REDUCERS,\n /**\n * Provider function for {@link DAFF_CUSTOMER_STORE_CREDIT_REDUCERS}.\n */\n provider: provideDaffCustomerStoreCreditReducers,\n} = createSingleInjectionToken<ActionReducer<DaffCustomerStoreCreditReducersState>>(\n 'DAFF_CUSTOMER_STORE_CREDIT_REDUCERS',\n {\n providedIn: 'any',\n factory: () => daffComposeReducers([\n combineReducers({\n storeCredit: daffCustomerStoreCreditReducer,\n }),\n ...inject(DAFF_CUSTOMER_STORE_CREDIT_EXTRA_REDUCERS),\n ]),\n },\n);\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { DaffCustomerStoreCreditEffects } from './effects/store-credit.effects';\nimport { DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY } from './reducers/public_api';\nimport { DAFF_CUSTOMER_STORE_CREDIT_REDUCERS } from './reducers/token/reducers.token';\n\n/**\n * Creates the customer store credit feature store.\n */\n@NgModule({\n imports: [\n StoreModule.forFeature(DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY, DAFF_CUSTOMER_STORE_CREDIT_REDUCERS),\n EffectsModule.forFeature([\n DaffCustomerStoreCreditEffects,\n ]),\n ],\n})\nexport class DaffCustomerStoreCreditStateModule {}\n","/**\n * Generated bundle index.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,EAAE;AACP,wBAAA,WAAW,CAAC,UAAU,CAAC,4CAA4C,EAAE,mCAAmC,CAAC;wBACzG,aAAa,CAAC,UAAU,CAAC;4BACvB,8BAA8B;yBAC/B,CAAC;AACH,qBAAA;AACF,iBAAA;;;AClBD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-customer-store-credit-state.mjs","sources":["../../../libs/customer-store-credit/state/src/actions/store-credit.actions.ts","../../../libs/customer-store-credit/state/src/reducers/store-feature-key.ts","../../../libs/customer-store-credit/state/src/reducers/token/extra.token.ts","../../../libs/customer-store-credit/state/src/reducers/store-credit/initial-state.ts","../../../libs/customer-store-credit/state/src/reducers/store-credit/reducer.ts","../../../libs/customer-store-credit/state/src/selectors/feature.selector.ts","../../../libs/customer-store-credit/state/src/selectors/store-credit/selector.ts","../../../libs/customer-store-credit/state/src/facades/store-credit/facade.ts","../../../libs/customer-store-credit/state/src/injection-tokens/error-matcher.token.ts","../../../libs/customer-store-credit/state/src/effects/store-credit.effects.ts","../../../libs/customer-store-credit/state/src/reducers/token/reducers.token.ts","../../../libs/customer-store-credit/state/src/state.module.ts","../../../libs/customer-store-credit/state/src/daffodil-customer-store-credit-state.ts"],"sourcesContent":["import { Action } from '@ngrx/store';\n\nimport { DaffStateError } from '@daffodil/core/state';\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\n/**\n * The customer store credit action types enum.\n */\nexport enum DaffCustomerStoreCreditActionTypes {\n StoreCreditLoadAction = '[@daffodil/customer-store-credit] Store Credit Load Action',\n StoreCreditLoadSuccessAction = '[@daffodil/customer-store-credit] Store Credit Load Success Action',\n StoreCreditLoadFailureAction = '[@daffodil/customer-store-credit] Store Credit Load Failure Action',\n StoreCreditClearErrorsAction = '[@daffodil/customer-store-credit] Store Credit Clear Errors Action',\n}\n\n/**\n * Loads the store credit of the current customer.\n */\nexport class DaffCustomerStoreCreditLoad implements Action {\n readonly type = DaffCustomerStoreCreditActionTypes.StoreCreditLoadAction;\n}\n\n/**\n * Indicates a successful load of the customer's store credit.\n */\nexport class DaffCustomerStoreCreditLoadSuccess<T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit> implements Action {\n readonly type = DaffCustomerStoreCreditActionTypes.StoreCreditLoadSuccessAction;\n\n constructor(public payload: T) {}\n}\n\n/**\n * A failed customer store credit load with the error message.\n */\nexport class DaffCustomerStoreCreditLoadFailure implements Action {\n readonly type = DaffCustomerStoreCreditActionTypes.StoreCreditLoadFailureAction;\n\n constructor(public payload: DaffStateError) {}\n}\n\n/**\n * An action to clear all errors in state.\n */\nexport class DaffCustomerStoreCreditClearErrors implements Action {\n readonly type = DaffCustomerStoreCreditActionTypes.StoreCreditClearErrorsAction;\n}\n\n/**\n * A union of the customer action types.\n */\nexport type DaffCustomerStoreCreditActions<\n TStoreCredit extends DaffCustomerStoreCredit = DaffCustomerStoreCredit,\n> =\n | DaffCustomerStoreCreditLoad\n | DaffCustomerStoreCreditLoadSuccess<TStoreCredit>\n | DaffCustomerStoreCreditLoadFailure\n | DaffCustomerStoreCreditClearErrors;\n","/**\n * The key under which the customer store credit feature state will be stored.\n */\nexport const DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY = 'daffCustomerStoreCredit';\n","import { ActionReducer } from '@ngrx/store';\n\nimport { createMultiInjectionToken } from '@daffodil/core';\n\nimport { DaffCustomerStoreCreditReducersState } from '../reducers.interface';\n\nexport const {\n /**\n * A token to hold the injectable extra reducers.\n *\n * Prefer using {@link daffCustomerStoreCreditProvideExtraReducers}.\n */\n token: DAFF_CUSTOMER_STORE_CREDIT_EXTRA_REDUCERS,\n\n /**\n * Provides additional reducers that run after the standard Daffodil customer reducers.\n *\n * @example\n * ```ts\n * providers: [\n * ...daffCustomerStoreCreditProvideExtraReducers(\n * myReducer1,\n * myReducer2\n * )\n * ]\n * ```\n */\n provider: daffCustomerStoreCreditProvideExtraReducers,\n} = createMultiInjectionToken<ActionReducer<DaffCustomerStoreCreditReducersState>>(\n 'DAFF_CUSTOMER_STORE_CREDIT_EXTRA_REDUCERS',\n { providedIn: 'any' },\n);\n","import { daffOperationInitialState } from '@daffodil/core/state';\n\nimport { DaffCustomerStoreCreditReducerState } from './type';\n\n/**\n * The initial state for the main customer store credit state, see {@link DaffCustomerStoreCreditReducerState}.\n */\nexport const daffCustomerStoreCreditInitialState: DaffCustomerStoreCreditReducerState = {\n ...daffOperationInitialState,\n storeCredit: {\n balance: 0,\n },\n};\n","import {\n daffCompleteOperation,\n daffOperationFailed,\n daffStartResolution,\n} from '@daffodil/core/state';\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\nimport { daffCustomerStoreCreditInitialState } from './initial-state';\nimport { DaffCustomerStoreCreditReducerState } from './type';\nimport {\n DaffCustomerStoreCreditActions,\n DaffCustomerStoreCreditActionTypes,\n DaffCustomerStoreCreditLoadFailure,\n} from '../../actions/store-credit.actions';\n\n/**\n * The reducer for the customer store credit page state, see {@link DaffCustomerStoreCreditReducerState}.\n */\nexport const daffCustomerStoreCreditReducer = <T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit>(\n state = daffCustomerStoreCreditInitialState,\n action: DaffCustomerStoreCreditActions<T>,\n): DaffCustomerStoreCreditReducerState => {\n switch (action.type) {\n case DaffCustomerStoreCreditActionTypes.StoreCreditLoadAction:\n return daffStartResolution(state);\n\n case DaffCustomerStoreCreditActionTypes.StoreCreditLoadSuccessAction:\n return {\n ...daffCompleteOperation(state),\n storeCredit: action.payload,\n };\n\n case DaffCustomerStoreCreditActionTypes.StoreCreditClearErrorsAction:\n return daffCompleteOperation(state);\n\n case DaffCustomerStoreCreditActionTypes.StoreCreditLoadFailureAction:\n return daffOperationFailed([(<DaffCustomerStoreCreditLoadFailure>action).payload], state);\n\n default:\n return state;\n }\n};\n","import {\n createFeatureSelector,\n MemoizedSelector,\n defaultMemoize,\n} from '@ngrx/store';\n\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\nimport {\n DaffCustomerStoreCreditStateRootSlice,\n DaffCustomerStoreCreditReducersState,\n DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY,\n} from '../reducers/public_api';\n\n/**\n * Selector for the customer store credit feature state.\n */\nexport interface DaffCustomerStoreCreditFeatureSelector<\n TStoreCredit extends DaffCustomerStoreCredit = DaffCustomerStoreCredit\n> {\n selectCustomerStoreCreditFeatureState: MemoizedSelector<DaffCustomerStoreCreditStateRootSlice<TStoreCredit>, DaffCustomerStoreCreditReducersState<TStoreCredit>>;\n}\n\nexport const getDaffCustomerStoreCreditReducersStateSelector: <TStoreCredit extends DaffCustomerStoreCredit = DaffCustomerStoreCredit>() => DaffCustomerStoreCreditFeatureSelector<TStoreCredit> = defaultMemoize(<TStoreCredit extends DaffCustomerStoreCredit = DaffCustomerStoreCredit>() => ({\n selectCustomerStoreCreditFeatureState: createFeatureSelector<DaffCustomerStoreCreditReducersState<TStoreCredit>>(DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY),\n})).memoized;\n","import {\n createSelector,\n MemoizedSelector,\n defaultMemoize,\n} from '@ngrx/store';\n\nimport {\n daffOperationStateSelectorFactory,\n DaffOperationStateSelectors,\n} from '@daffodil/core/state';\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\nimport {\n DaffCustomerStoreCreditReducerState,\n DaffCustomerStoreCreditStateRootSlice,\n} from '../../reducers/public_api';\nimport { getDaffCustomerStoreCreditReducersStateSelector } from '../feature.selector';\n\n/**\n * Selectors for the main part of customer store credit state.\n */\nexport interface DaffCustomerStoreCreditSelectors<T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit> extends DaffOperationStateSelectors<DaffCustomerStoreCreditStateRootSlice<T>, DaffCustomerStoreCreditReducerState<T>> {\n /**\n * Selects the customer's current store credit balance.\n */\n selectStoreCredit: MemoizedSelector<DaffCustomerStoreCreditStateRootSlice<T>, T>;\n}\n\n/**\n * Creates a group of selectors for {@link DaffCustomerStoreCreditReducerState} that use the passed state selector as the basis.\n */\nconst daffCustomerStoreCreditCreateSelectors = <T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit>(): DaffCustomerStoreCreditSelectors<T> => {\n const { selectCustomerStoreCreditFeatureState } = getDaffCustomerStoreCreditReducersStateSelector<T>();\n const selectCustomerStoreCreditState = createSelector(\n selectCustomerStoreCreditFeatureState,\n state => state.storeCredit,\n );\n const selectStoreCredit = createSelector(\n selectCustomerStoreCreditState,\n state => state.storeCredit,\n );\n\n return {\n ...daffOperationStateSelectorFactory(selectCustomerStoreCreditState),\n selectStoreCredit,\n };\n};\n\nexport const daffCustomerStoreCreditGetSelectors: <T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit>() => DaffCustomerStoreCreditSelectors<T> = defaultMemoize(<T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit>() => daffCustomerStoreCreditCreateSelectors<T>()).memoized;\n\n","import { Injectable } from '@angular/core';\nimport {\n Store,\n select,\n Action,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\nimport { DaffCustomerStoreCreditPageFacadeInterface } from './interface';\nimport {\n DaffCustomerStoreCreditReducerState,\n DaffCustomerStoreCreditStateRootSlice,\n} from '../../reducers/public_api';\nimport { daffCustomerStoreCreditGetSelectors } from '../../selectors/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditPageFacade<T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit> implements DaffCustomerStoreCreditPageFacadeInterface<T> {\n storeCredit$: Observable<T>;\n loadingState$: Observable<DaffCustomerStoreCreditReducerState['daffState']>;\n loading$: Observable<boolean>;\n resolving$: Observable<boolean>;\n mutating$: Observable<boolean>;\n errors$: Observable<DaffCustomerStoreCreditReducerState['daffErrors']>;\n hasErrors$: Observable<boolean>;\n\n constructor(\n private store: Store<DaffCustomerStoreCreditStateRootSlice>,\n ) {\n const {\n selectStoreCredit,\n selectErrors,\n selectHasErrors,\n selectLoading,\n selectLoadingState,\n selectMutating,\n selectResolving,\n } = daffCustomerStoreCreditGetSelectors<T>();\n\n this.storeCredit$ = this.store.pipe(select(selectStoreCredit));\n this.loadingState$ = this.store.pipe(select(selectLoadingState));\n this.loading$ = this.store.pipe(select(selectLoading));\n this.resolving$ = this.store.pipe(select(selectResolving));\n this.mutating$ = this.store.pipe(select(selectMutating));\n this.errors$ = this.store.pipe(select(selectErrors));\n this.hasErrors$ = this.store.pipe(select(selectHasErrors));\n }\n\n dispatch(action: Action) {\n this.store.dispatch(action);\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_CUSTOMER_STORE_CREDIT_ERROR_MATCHER,\n /**\n * Provider function for {@link DAFF_CUSTOMER_STORE_CREDIT_ERROR_MATCHER}.\n */\n provider: provideDaffCustomerStoreCreditErrorMatcher,\n} = createSingleInjectionToken<typeof daffTransformErrorToStateError>(\n 'DAFF_CUSTOMER_STORE_CREDIT_ERROR_MATCHER',\n { factory: () => daffTransformErrorToStateError },\n);\n","import {\n Injectable,\n Inject,\n} from '@angular/core';\nimport {\n Actions,\n createEffect,\n ofType,\n} from '@ngrx/effects';\nimport { of } from 'rxjs';\nimport {\n switchMap,\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport { DaffError } from '@daffodil/core';\nimport { ErrorTransformer } from '@daffodil/core/state';\nimport { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\nimport {\n DaffCustomerStoreCreditDriver,\n DaffCustomerStoreCreditDriverInterface,\n} from '@daffodil/customer-store-credit/driver';\n\nimport {\n DaffCustomerStoreCreditActionTypes,\n DaffCustomerStoreCreditLoadFailure,\n DaffCustomerStoreCreditLoadSuccess,\n DaffCustomerStoreCreditActions,\n} from '../actions/store-credit.actions';\nimport { DAFF_CUSTOMER_STORE_CREDIT_ERROR_MATCHER } from '../injection-tokens/public_api';\n\n@Injectable()\nexport class DaffCustomerStoreCreditEffects<\n T extends DaffCustomerStoreCredit = DaffCustomerStoreCredit,\n> {\n constructor(\n private actions$: Actions<DaffCustomerStoreCreditActions<T>>,\n @Inject(DaffCustomerStoreCreditDriver) private driver: DaffCustomerStoreCreditDriverInterface<T>,\n @Inject(DAFF_CUSTOMER_STORE_CREDIT_ERROR_MATCHER) private errorMatcher: ErrorTransformer,\n ) {}\n\n list$ = createEffect(() => this.actions$.pipe(\n ofType(DaffCustomerStoreCreditActionTypes.StoreCreditLoadAction),\n switchMap((action) =>\n this.driver.get().pipe(\n map(resp => new DaffCustomerStoreCreditLoadSuccess<T>(resp)),\n catchError((error: DaffError) => of(new DaffCustomerStoreCreditLoadFailure(this.errorMatcher(error)))),\n ),\n ),\n ));\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\nimport { DAFF_CUSTOMER_STORE_CREDIT_EXTRA_REDUCERS } from './extra.token';\nimport { DaffCustomerStoreCreditReducersState } from '../reducers.interface';\nimport { daffCustomerStoreCreditReducer } from '../store-credit/public_api';\n\nexport const {\n /**\n * An internal token to hold the Daffodil customer reducers.\n * Includes the extra and standard reducers.\n *\n * @docs-private\n */\n token: DAFF_CUSTOMER_STORE_CREDIT_REDUCERS,\n /**\n * Provider function for {@link DAFF_CUSTOMER_STORE_CREDIT_REDUCERS}.\n */\n provider: provideDaffCustomerStoreCreditReducers,\n} = createSingleInjectionToken<ActionReducer<DaffCustomerStoreCreditReducersState>>(\n 'DAFF_CUSTOMER_STORE_CREDIT_REDUCERS',\n {\n providedIn: 'any',\n factory: () => daffComposeReducers([\n combineReducers({\n storeCredit: daffCustomerStoreCreditReducer,\n }),\n ...inject(DAFF_CUSTOMER_STORE_CREDIT_EXTRA_REDUCERS),\n ]),\n },\n);\n","import { NgModule } from '@angular/core';\nimport { EffectsModule } from '@ngrx/effects';\nimport { StoreModule } from '@ngrx/store';\n\nimport { DaffCustomerStoreCreditEffects } from './effects/store-credit.effects';\nimport { DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY } from './reducers/public_api';\nimport { DAFF_CUSTOMER_STORE_CREDIT_REDUCERS } from './reducers/token/reducers.token';\n\n/**\n * Creates the customer store credit feature store.\n */\n@NgModule({\n imports: [\n StoreModule.forFeature(DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY, DAFF_CUSTOMER_STORE_CREDIT_REDUCERS),\n EffectsModule.forFeature([\n DaffCustomerStoreCreditEffects,\n ]),\n ],\n})\nexport class DaffCustomerStoreCreditStateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;AAKA;;AAEG;IACS;AAAZ,CAAA,UAAY,kCAAkC,EAAA;AAC5C,IAAA,kCAAA,CAAA,uBAAA,CAAA,GAAA,4DAAoF;AACpF,IAAA,kCAAA,CAAA,8BAAA,CAAA,GAAA,oEAAmG;AACnG,IAAA,kCAAA,CAAA,8BAAA,CAAA,GAAA,oEAAmG;AACnG,IAAA,kCAAA,CAAA,8BAAA,CAAA,GAAA,oEAAmG;AACrG,CAAC,EALW,kCAAkC,KAAlC,kCAAkC,GAAA,EAAA,CAAA,CAAA;AAO9C;;AAEG;MACU,2BAA2B,CAAA;AAAxC,IAAA,WAAA,GAAA;AACW,QAAA,IAAA,CAAA,IAAI,GAAG,kCAAkC,CAAC,qBAAqB;IAC1E;AAAC;AAED;;AAEG;MACU,kCAAkC,CAAA;AAG7C,IAAA,WAAA,CAAmB,OAAU,EAAA;QAAV,IAAA,CAAA,OAAO,GAAP,OAAO;AAFjB,QAAA,IAAA,CAAA,IAAI,GAAG,kCAAkC,CAAC,4BAA4B;IAE/C;AACjC;AAED;;AAEG;MACU,kCAAk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C,CAAA;iIAAlC,kCAAkC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;kIAAlC,kCAAkC,EAAA,OAAA,EAAA,CAAA,EAAA,CAAA,kBAAA,EAAAC,IAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,CAAA;kIAAlC,kCAAkC,EAAA,OAAA,EAAA,CAN3C,WAAW,CAAC,UAAU,CAAC,4CAA4C,EAAE,mCAAmC,CAAC;YACzG,aAAa,CAAC,UAAU,CAAC;gBACvB,8BAA8B;aAC/B,CAAC,CAAA,EAAA,CAAA,CAAA;;2FAGO,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAR9C,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;AACP,wBAAA,WAAW,CAAC,UAAU,CAAC,4CAA4C,EAAE,mCAAmC,CAAC;wBACzG,aAAa,CAAC,UAAU,CAAC;4BACvB,8BAA8B;yBAC/B,CAAC;AACH,qBAAA;AACF,iBAAA;;;AClBD;;AAEG;;;;"}
@@ -19,10 +19,10 @@ class DaffCustomerStoreCreditFactory extends DaffModelFactory {
19
19
  constructor() {
20
20
  super(MockDaffCustomerStoreCredit);
21
21
  }
22
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
23
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditFactory, providedIn: 'root' }); }
22
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
23
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditFactory, providedIn: 'root' }); }
24
24
  }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: DaffCustomerStoreCreditFactory, decorators: [{
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffCustomerStoreCreditFactory, decorators: [{
26
26
  type: Injectable,
27
27
  args: [{
28
28
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-customer-store-credit-testing.mjs","sources":["../../../libs/customer-store-credit/testing/src/factories/customer-store-credit.factory.ts","../../../libs/customer-store-credit/testing/src/daffodil-customer-store-credit-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 { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\n/**\n * Mock class for {@link DaffCustomerStoreCredit}.\n */\nexport class MockDaffCustomerStoreCredit implements DaffCustomerStoreCredit {\n balance = faker.number.int({ min: 0, max: 1000 });\n};\n\n/**\n * Model factory for {@link DaffCustomerStoreCredit}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditFactory extends DaffModelFactory<DaffCustomerStoreCredit>{\n constructor() {\n super(MockDaffCustomerStoreCredit);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAMA;;AAEG;MACU,2BAA2B,CAAA;AAAxC,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;IACnD;AAAC;AAAA;AAED;;AAEG;AAIG,MAAO,8BAA+B,SAAQ,gBAAyC,CAAA;AAC3F,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,2BAA2B,CAAC;IACpC;kIAHW,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA9B,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,8BAA8B,cAF7B,MAAM,EAAA,CAAA,CAAA;;4FAEP,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAH1C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AClBD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-customer-store-credit-testing.mjs","sources":["../../../libs/customer-store-credit/testing/src/factories/customer-store-credit.factory.ts","../../../libs/customer-store-credit/testing/src/daffodil-customer-store-credit-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 { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';\n\n/**\n * Mock class for {@link DaffCustomerStoreCredit}.\n */\nexport class MockDaffCustomerStoreCredit implements DaffCustomerStoreCredit {\n balance = faker.number.int({ min: 0, max: 1000 });\n};\n\n/**\n * Model factory for {@link DaffCustomerStoreCredit}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCustomerStoreCreditFactory extends DaffModelFactory<DaffCustomerStoreCredit>{\n constructor() {\n super(MockDaffCustomerStoreCredit);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAMA;;AAEG;MACU,2BAA2B,CAAA;AAAxC,IAAA,WAAA,GAAA;AACE,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;IACnD;AAAC;AAAA;AAED;;AAEG;AAIG,MAAO,8BAA+B,SAAQ,gBAAyC,CAAA;AAC3F,IAAA,WAAA,GAAA;QACE,KAAK,CAAC,2BAA2B,CAAC;IACpC;iIAHW,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA9B,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,8BAA8B,cAF7B,MAAM,EAAA,CAAA,CAAA;;2FAEP,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAH1C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AClBD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@daffodil/customer-store-credit","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/customer-store-credit"]}}},"version":"0.92.3","description":"Platform-agnostic models, state management, and drivers for customer store credit balances. Part of the Daffodil ecommerce framework.","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":"^20.0.0","@angular/core":"^20.0.0","@daffodil/customer":"0.92.3","@daffodil/customer-order":"0.92.3","@daffodil/core":"0.92.3","@ngrx/effects":"^20.0.0","@ngrx/store":"^20.0.0","rxjs":"^7.0.0"},"optionalDependencies":{"@apollo/client":"^3.12.6","@daffodil/driver":"0.92.3","apollo-angular":"^11.0.0","@faker-js/faker":"^10.3.0"},"module":"fesm2022/daffodil-customer-store-credit.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-customer-store-credit.mjs"},"./driver":{"types":"./driver/index.d.ts","default":"./fesm2022/daffodil-customer-store-credit-driver.mjs"},"./routing":{"types":"./routing/index.d.ts","default":"./fesm2022/daffodil-customer-store-credit-routing.mjs"},"./state":{"types":"./state/index.d.ts","default":"./fesm2022/daffodil-customer-store-credit-state.mjs"},"./testing":{"types":"./testing/index.d.ts","default":"./fesm2022/daffodil-customer-store-credit-testing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","default":"./fesm2022/daffodil-customer-store-credit-driver-in-memory.mjs"},"./driver/magento":{"types":"./driver/magento/index.d.ts","default":"./fesm2022/daffodil-customer-store-credit-driver-magento.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","default":"./fesm2022/daffodil-customer-store-credit-driver-testing.mjs"},"./state/testing":{"types":"./state/testing/index.d.ts","default":"./fesm2022/daffodil-customer-store-credit-state-testing.mjs"},"./driver/magento/testing":{"types":"./driver/magento/testing/index.d.ts","default":"./fesm2022/daffodil-customer-store-credit-driver-magento-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.6.2"}}
1
+ {"name":"@daffodil/customer-store-credit","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/customer-store-credit"]}}},"version":"0.93.0","description":"Platform-agnostic models, state management, and drivers for customer store credit balances. Part of the Daffodil ecommerce framework.","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":"^21","@angular/core":"^21","@daffodil/customer":"0.93.0","@daffodil/customer-order":"0.93.0","@daffodil/core":"0.93.0","@ngrx/effects":"^21","@ngrx/store":"^21","rxjs":"^7.0.0"},"optionalDependencies":{"@apollo/client":"^4.0.13","@daffodil/driver":"0.93.0","apollo-angular":"^13.0.0","@faker-js/faker":"^10.3.0"},"module":"fesm2022/daffodil-customer-store-credit.mjs","typings":"types/daffodil-customer-store-credit.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./types/daffodil-customer-store-credit.d.ts","default":"./fesm2022/daffodil-customer-store-credit.mjs"},"./driver":{"types":"./types/daffodil-customer-store-credit-driver.d.ts","default":"./fesm2022/daffodil-customer-store-credit-driver.mjs"},"./driver/in-memory":{"types":"./types/daffodil-customer-store-credit-driver-in-memory.d.ts","default":"./fesm2022/daffodil-customer-store-credit-driver-in-memory.mjs"},"./driver/magento":{"types":"./types/daffodil-customer-store-credit-driver-magento.d.ts","default":"./fesm2022/daffodil-customer-store-credit-driver-magento.mjs"},"./driver/magento/testing":{"types":"./types/daffodil-customer-store-credit-driver-magento-testing.d.ts","default":"./fesm2022/daffodil-customer-store-credit-driver-magento-testing.mjs"},"./driver/testing":{"types":"./types/daffodil-customer-store-credit-driver-testing.d.ts","default":"./fesm2022/daffodil-customer-store-credit-driver-testing.mjs"},"./routing":{"types":"./types/daffodil-customer-store-credit-routing.d.ts","default":"./fesm2022/daffodil-customer-store-credit-routing.mjs"},"./state":{"types":"./types/daffodil-customer-store-credit-state.d.ts","default":"./fesm2022/daffodil-customer-store-credit-state.mjs"},"./state/testing":{"types":"./types/daffodil-customer-store-credit-state-testing.d.ts","default":"./fesm2022/daffodil-customer-store-credit-state-testing.mjs"},"./testing":{"types":"./types/daffodil-customer-store-credit-testing.d.ts","default":"./fesm2022/daffodil-customer-store-credit-testing.mjs"}},"sideEffects":false,"type":"module","dependencies":{"tslib":"^2.6.2"}}
@@ -1,4 +1,4 @@
1
- import * as _daffodil_driver_magento from '@daffodil/driver/magento';
1
+ import * as _daffodil_driver_types_daffodil_driver_magento from '@daffodil/driver/types/daffodil-driver-magento';
2
2
  import { DaffModelFactory } from '@daffodil/core/testing';
3
3
  import { MagentoCustomerStoreCredit } from '@daffodil/customer-store-credit/driver/magento';
4
4
  import { MagentoMoneyFactory } from '@daffodil/driver/magento/testing';
@@ -7,7 +7,7 @@ import * as i0 from '@angular/core';
7
7
  declare class MockMagentoCustomerStoreCredit implements MagentoCustomerStoreCredit {
8
8
  protected moneyFactory: MagentoMoneyFactory;
9
9
  __typename: "CustomerStoreCredit";
10
- current_balance: _daffodil_driver_magento.MagentoMoney;
10
+ current_balance: _daffodil_driver_types_daffodil_driver_magento.MagentoMoney;
11
11
  enabled: boolean;
12
12
  constructor(moneyFactory: MagentoMoneyFactory);
13
13
  }
@@ -5,7 +5,6 @@ import * as apollo_angular from 'apollo-angular';
5
5
  import { Apollo } from 'apollo-angular';
6
6
  import { DaffError } from '@daffodil/core';
7
7
  import { DaffCustomerStoreCreditInvalidAPIResponseError, DaffCustomerStoreCreditDriverInterface } from '@daffodil/customer-store-credit/driver';
8
- import { ApolloQueryResult } from '@apollo/client/core';
9
8
  import { Observable } from 'rxjs';
10
9
  import * as i0 from '@angular/core';
11
10
  import { ModuleWithProviders } from '@angular/core';
@@ -42,7 +41,7 @@ declare const getCustomerStoreCredit: apollo_angular.TypedDocumentNode<unknown,
42
41
 
43
42
  declare function transformMagentoReviewsError(error: any, requestPayload?: unknown): DaffError | DaffCustomerStoreCreditInvalidAPIResponseError;
44
43
 
45
- declare const validateGetCustomerStoreCreditResponse: (response: ApolloQueryResult<MagentoGetCustomerStoreCreditResponse>) => ApolloQueryResult<MagentoGetCustomerStoreCreditResponse>;
44
+ declare const validateGetCustomerStoreCreditResponse: (response: Apollo.QueryResult<MagentoGetCustomerStoreCreditResponse>) => Apollo.QueryResult<MagentoGetCustomerStoreCreditResponse>;
46
45
 
47
46
  /**
48
47
  * A service for making Magento GraphQL queries for customers.
@@ -1,9 +1,9 @@
1
1
  import * as _ngrx_store from '@ngrx/store';
2
2
  import { Action, ActionReducer, MemoizedSelector, Store } from '@ngrx/store';
3
3
  import { DaffStateError, DaffOperationState, DaffOperationStateSelectors, DaffOperationStateFacadeInterface, daffTransformErrorToStateError } from '@daffodil/core/state';
4
- import * as _daffodil_customer_store_credit from '@daffodil/customer-store-credit';
5
4
  import { DaffCustomerStoreCredit } from '@daffodil/customer-store-credit';
6
5
  import * as i0 from '@angular/core';
6
+ import * as _daffodil_customer_store_credit_types_daffodil_customer_store_credit from '@daffodil/customer-store-credit/types/daffodil-customer-store-credit';
7
7
  import { Observable } from 'rxjs';
8
8
  import * as i2 from '@ngrx/effects';
9
9
 
@@ -84,8 +84,8 @@ interface DaffCustomerStoreCreditStateRootSlice<TStoreCredit extends DaffCustome
84
84
  [DAFF_CUSTOMER_STORE_CREDIT_STORE_FEATURE_KEY]: DaffCustomerStoreCreditReducersState<TStoreCredit>;
85
85
  }
86
86
 
87
- declare const DAFF_CUSTOMER_STORE_CREDIT_EXTRA_REDUCERS: i0.InjectionToken<ActionReducer<DaffCustomerStoreCreditReducersState<_daffodil_customer_store_credit.DaffCustomerStoreCredit>, _ngrx_store.Action<string>>[]>;
88
- declare const daffCustomerStoreCreditProvideExtraReducers: <R extends ActionReducer<DaffCustomerStoreCreditReducersState<_daffodil_customer_store_credit.DaffCustomerStoreCredit>, _ngrx_store.Action<string>> = ActionReducer<DaffCustomerStoreCreditReducersState<_daffodil_customer_store_credit.DaffCustomerStoreCredit>, _ngrx_store.Action<string>>>(...values: R[]) => Array<i0.ValueProvider>;
87
+ declare const DAFF_CUSTOMER_STORE_CREDIT_EXTRA_REDUCERS: i0.InjectionToken<ActionReducer<DaffCustomerStoreCreditReducersState<_daffodil_customer_store_credit_types_daffodil_customer_store_credit.DaffCustomerStoreCredit>, _ngrx_store.Action<string>>[]>;
88
+ declare const daffCustomerStoreCreditProvideExtraReducers: <R extends ActionReducer<DaffCustomerStoreCreditReducersState<_daffodil_customer_store_credit_types_daffodil_customer_store_credit.DaffCustomerStoreCredit>, _ngrx_store.Action<string>> = ActionReducer<DaffCustomerStoreCreditReducersState<_daffodil_customer_store_credit_types_daffodil_customer_store_credit.DaffCustomerStoreCredit>, _ngrx_store.Action<string>>>(...values: R[]) => Array<i0.ValueProvider>;
89
89
 
90
90
  /**
91
91
  * Selectors for the main part of customer store credit state.