@daffodil/core 0.44.0 → 0.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/esm2020/base64/browser/browser.service.mjs +3 -3
  2. package/esm2020/base64/server/server.service.mjs +3 -3
  3. package/esm2020/graphql/apollo/queued-apollo/queued-apollo.service.mjs +3 -3
  4. package/esm2020/routing/uri/normalizer.service.mjs +3 -3
  5. package/esm2020/state/testing/mock-collection-facade.mjs +3 -3
  6. package/esm2020/storage/error/error.service.mjs +3 -3
  7. package/esm2020/storage/localstorage/localstorage.service.mjs +3 -3
  8. package/esm2020/storage/noopstorage/noopstorage.service.mjs +3 -3
  9. package/esm2020/storage/server-error/server-error.service.mjs +3 -3
  10. package/esm2020/testing/angular/mocks/pipes/currency.mjs +3 -3
  11. package/esm2020/testing/factories/address.factory.mjs +3 -3
  12. package/esm2020/testing/factories/collection/metadata.factory.mjs +3 -3
  13. package/esm2020/testing/factories/collection/numerically-paginable.factory.mjs +3 -3
  14. package/esm2020/testing/factories/collection/request.factory.mjs +3 -3
  15. package/esm2020/testing/factories/collection/sort-option.factory.mjs +3 -3
  16. package/esm2020/testing/factories/collection/sort-options.factory.mjs +3 -3
  17. package/esm2020/testing/factories/collection/sortable.factory.mjs +3 -3
  18. package/esm2020/testing/testing.module.mjs +4 -4
  19. package/fesm2015/daffodil-core-graphql.mjs +2 -2
  20. package/fesm2015/daffodil-core-graphql.mjs.map +1 -1
  21. package/fesm2015/daffodil-core-routing.mjs +2 -2
  22. package/fesm2015/daffodil-core-routing.mjs.map +1 -1
  23. package/fesm2015/daffodil-core-state-testing.mjs +2 -2
  24. package/fesm2015/daffodil-core-state-testing.mjs.map +1 -1
  25. package/fesm2015/daffodil-core-testing.mjs +19 -19
  26. package/fesm2015/daffodil-core-testing.mjs.map +1 -1
  27. package/fesm2015/daffodil-core.mjs +12 -12
  28. package/fesm2015/daffodil-core.mjs.map +1 -1
  29. package/fesm2020/daffodil-core-graphql.mjs +2 -2
  30. package/fesm2020/daffodil-core-graphql.mjs.map +1 -1
  31. package/fesm2020/daffodil-core-routing.mjs +2 -2
  32. package/fesm2020/daffodil-core-routing.mjs.map +1 -1
  33. package/fesm2020/daffodil-core-state-testing.mjs +2 -2
  34. package/fesm2020/daffodil-core-state-testing.mjs.map +1 -1
  35. package/fesm2020/daffodil-core-testing.mjs +19 -19
  36. package/fesm2020/daffodil-core-testing.mjs.map +1 -1
  37. package/fesm2020/daffodil-core.mjs +12 -12
  38. package/fesm2020/daffodil-core.mjs.map +1 -1
  39. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-core-routing.mjs","sources":["../../../libs/core/routing/src/uri/truncation/file-extension.ts","../../../libs/core/routing/src/uri/truncation/leading-path-segments.ts","../../../libs/core/routing/src/uri/truncation/leading-slash.ts","../../../libs/core/routing/src/uri/truncation/query-fragment.ts","../../../libs/core/routing/src/uri/normalizer.service.ts","../../../libs/core/routing/src/daffodil-core-routing.ts"],"sourcesContent":["/**\n * Truncates the file extension from the end of the URI.\n * Captures the truncated URI in the `uri` named group.\n */\nexport const DAFF_TRUNCATE_FILE_EXTENSION_REGEX = /(.*)(?=\\.)/;\n/**\n * Truncates the file extension from the end of the URI.\n */\nexport const daffUriTruncateFileExtension = (uri: string): string => uri.match(DAFF_TRUNCATE_FILE_EXTENSION_REGEX)?.[0] || uri;\n","/**\n * Truncates leading path segments from a URI.\n * e.g. /foo/bar/baz.html -> baz.html\n */\nexport const daffUriTruncateLeadingPathSegments = (uri: string): string =>\n uri.split('/').pop();\n","/**\n * A regex to truncate the leading slash from a URI,\n * capturing the truncated in the `uri` group.\n * e.g. /foo/bar/baz.html -> foo/bar/baz.html\n */\nexport const DAFF_TRUNCATE_LEADING_SLASH_REGEX = /^\\/?(?<uri>.+)$/;\n/**\n * Truncates the leading slash from a URI.\n * e.g. /foo/bar/baz.html -> foo/bar/baz.html\n */\nexport const daffUriTruncateLeadingSlash = (uri: string): string =>\n uri.match(DAFF_TRUNCATE_LEADING_SLASH_REGEX)?.groups.uri || uri;\n","/**\n * Truncates query parameters and fragments from a URI.\n * e.g. /foo/bar/baz.html?thing=test#id -> /foo/bar/baz.html\n */\nexport const daffUriTruncateQueryFragment = (uri: string): string => {\n if(uri[0] !== '/') {\n uri = `/${uri}`;\n }\n return uri.replace(/(\\?.*)|(#.*)/, '');\n};\n","import { Injectable } from '@angular/core';\nimport {\n UrlSerializer,\n UrlTree,\n PRIMARY_OUTLET,\n} from '@angular/router';\n\n/**\n * Processes URIs to remove extraneous Angular-specific information.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffRoutingUriNormalizer {\n constructor(\n private urlParser: UrlSerializer,\n ) {}\n\n /**\n * Normalizes an Angular router path into a useable URI.\n * e.g. `normalize('some/url.html(secondary:outlet)?query=param#fragment')` -> `'some/url.html?query=param#fragment'`\n *\n * Optionally accepts an outlet to target.\n * e.g. `normalize('some/url.html(secondary:outlet)?query=param#fragment', 'secondary')` -> `'outlet?query=param#fragment'`\n *\n * @param uri The URI to normalize.\n * @param outlet An optional outlet to process into a URI.\n */\n normalize(uri: string, outlet = PRIMARY_OUTLET): string {\n const urlTree: UrlTree = this.urlParser.parse(uri);\n urlTree.root.children = {\n [PRIMARY_OUTLET]: urlTree.root.children[outlet],\n };\n\n return this.urlParser.serialize(urlTree);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AACI,MAAM,kCAAkC,GAAG,aAAa;AAC/D;;AAEG;MACU,4BAA4B,GAAG,CAAC,GAAW,KAAa,GAAG,CAAC,KAAK,CAAC,kCAAkC,CAAC,GAAG,CAAC,CAAC,IAAI;;ACR3H;;;AAGG;AACU,MAAA,kCAAkC,GAAG,CAAC,GAAW,KAC5D,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG;;ACLpB;;;;AAIG;AACI,MAAM,iCAAiC,GAAG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A,CAAA;2FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-core-routing.mjs","sources":["../../../libs/core/routing/src/uri/truncation/file-extension.ts","../../../libs/core/routing/src/uri/truncation/leading-path-segments.ts","../../../libs/core/routing/src/uri/truncation/leading-slash.ts","../../../libs/core/routing/src/uri/truncation/query-fragment.ts","../../../libs/core/routing/src/uri/normalizer.service.ts","../../../libs/core/routing/src/daffodil-core-routing.ts"],"sourcesContent":["/**\n * Truncates the file extension from the end of the URI.\n * Captures the truncated URI in the `uri` named group.\n */\nexport const DAFF_TRUNCATE_FILE_EXTENSION_REGEX = /(.*)(?=\\.)/;\n/**\n * Truncates the file extension from the end of the URI.\n */\nexport const daffUriTruncateFileExtension = (uri: string): string => uri.match(DAFF_TRUNCATE_FILE_EXTENSION_REGEX)?.[0] || uri;\n","/**\n * Truncates leading path segments from a URI.\n * e.g. /foo/bar/baz.html -> baz.html\n */\nexport const daffUriTruncateLeadingPathSegments = (uri: string): string =>\n uri.split('/').pop();\n","/**\n * A regex to truncate the leading slash from a URI,\n * capturing the truncated in the `uri` group.\n * e.g. /foo/bar/baz.html -> foo/bar/baz.html\n */\nexport const DAFF_TRUNCATE_LEADING_SLASH_REGEX = /^\\/?(?<uri>.+)$/;\n/**\n * Truncates the leading slash from a URI.\n * e.g. /foo/bar/baz.html -> foo/bar/baz.html\n */\nexport const daffUriTruncateLeadingSlash = (uri: string): string =>\n uri.match(DAFF_TRUNCATE_LEADING_SLASH_REGEX)?.groups.uri || uri;\n","/**\n * Truncates query parameters and fragments from a URI.\n * e.g. /foo/bar/baz.html?thing=test#id -> /foo/bar/baz.html\n */\nexport const daffUriTruncateQueryFragment = (uri: string): string => {\n if(uri[0] !== '/') {\n uri = `/${uri}`;\n }\n return uri.replace(/(\\?.*)|(#.*)/, '');\n};\n","import { Injectable } from '@angular/core';\nimport {\n UrlSerializer,\n UrlTree,\n PRIMARY_OUTLET,\n} from '@angular/router';\n\n/**\n * Processes URIs to remove extraneous Angular-specific information.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffRoutingUriNormalizer {\n constructor(\n private urlParser: UrlSerializer,\n ) {}\n\n /**\n * Normalizes an Angular router path into a useable URI.\n * e.g. `normalize('some/url.html(secondary:outlet)?query=param#fragment')` -> `'some/url.html?query=param#fragment'`\n *\n * Optionally accepts an outlet to target.\n * e.g. `normalize('some/url.html(secondary:outlet)?query=param#fragment', 'secondary')` -> `'outlet?query=param#fragment'`\n *\n * @param uri The URI to normalize.\n * @param outlet An optional outlet to process into a URI.\n */\n normalize(uri: string, outlet = PRIMARY_OUTLET): string {\n const urlTree: UrlTree = this.urlParser.parse(uri);\n urlTree.root.children = {\n [PRIMARY_OUTLET]: urlTree.root.children[outlet],\n };\n\n return this.urlParser.serialize(urlTree);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;;;AAGG;AACI,MAAM,kCAAkC,GAAG,aAAa;AAC/D;;AAEG;MACU,4BAA4B,GAAG,CAAC,GAAW,KAAa,GAAG,CAAC,KAAK,CAAC,kCAAkC,CAAC,GAAG,CAAC,CAAC,IAAI;;ACR3H;;;AAGG;AACU,MAAA,kCAAkC,GAAG,CAAC,GAAW,KAC5D,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG;;ACLpB;;;;AAIG;AACI,MAAM,iCAAiC,GAAG,kBAAkB;AACnE;;;AAGG;MACU,2BAA2B,GAAG,CAAC,GAAW,KACrD,GAAG,CAAC,KAAK,CAAC,iCAAiC,CAAC,EAAE,MAAM,CAAC,GAAG,IAAI;;ACX9D;;;AAGG;AACU,MAAA,4BAA4B,GAAG,CAAC,GAAW,KAAY;AAClE,IAAA,IAAG,GAAG,CAAC,CAAC,C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;
24
24
  }
25
- /** @nocollapse */ /** @nocollapse */ MockDaffCollectionFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffCollectionFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
26
- /** @nocollapse */ /** @nocollapse */ MockDaffCollectionFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffCollectionFacade, providedIn: 'root' });
25
+ /** @nocollapse */ MockDaffCollectionFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffCollectionFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
26
+ /** @nocollapse */ MockDaffCollectionFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffCollectionFacade, providedIn: 'root' });
27
27
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: MockDaffCollectionFacade, decorators: [{
28
28
  type: Injectable,
29
29
  args: [{ providedIn: 'root' }]
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-core-state-testing.mjs","sources":["../../../libs/core/state/testing/src/mock-collection-facade.ts","../../../libs/core/state/testing/src/daffodil-core-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport {\n DaffCollectionMetadata,\n DaffCollectionRequest,\n DaffSortDirectionEnum,\n DaffSortOption,\n} from '@daffodil/core';\nimport { DaffCollectionFacadeInterface } from '@daffodil/core/state';\n\n/**\n * Can be used to mock out the {@link DaffCollectionFacade} in testing environments.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffCollectionFacade implements DaffCollectionFacadeInterface {\n metadata$: BehaviorSubject<DaffCollectionMetadata> = new BehaviorSubject(null);\n request$: BehaviorSubject<DaffCollectionRequest> = new BehaviorSubject(null);\n count$: BehaviorSubject<number> = new BehaviorSubject(0);\n currentPage$: BehaviorSubject<number> = new BehaviorSubject(0);\n totalPages$: BehaviorSubject<number> = new BehaviorSubject(0);\n pageSize$: BehaviorSubject<number> = new BehaviorSubject(0);\n sortOptions$: BehaviorSubject<DaffSortOption[]> = new BehaviorSubject([]);\n appliedSortOption$: BehaviorSubject<string> = new BehaviorSubject(null);\n appliedSortDirection$: BehaviorSubject<DaffSortDirectionEnum> = new BehaviorSubject(null);\n\n dispatch(action: Action) {};\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAYA;;;;AAIG;MAEU,wBAAwB,CAAA;AADrC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,SAAS,GAA4C,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/E,QAAA,IAAA,CAAA,QAAQ,GAA2C,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AAC7E,QAAA,IAAA,CAAA,MAAM,GAA4B,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;AACzD,QAAA,IAAA,CAAA,YAAY,GAA4B,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;AAC/D,QAAA,IAAA,CAAA,WAAW,GAA4B,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;AAC9D,QAAA,IAAA,CAAA,SAAS,GAA4B,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;AAC5D,QAAA,IAAA,CAAA,YAAY,GAAsC,IAAI,eAAe,CAAC,EAAE,CAAC,CAAC;AAC1E,QAAA,IAAA,CAAA,kBAAkB,GAA4B,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AACxE,QAAA,IAAA,CAAA,qBAAqB,GAA2C,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AAG3F,KAAA;IADC,QAAQ,CAAC,MAAc,EAAA,GAAI;;;2JAXhB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxB,sCAAA,wBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cADX,MAAM,EAAA,CAAA,CAAA;2FACnB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACjBlC;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-core-state-testing.mjs","sources":["../../../libs/core/state/testing/src/mock-collection-facade.ts","../../../libs/core/state/testing/src/daffodil-core-state-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport {\n DaffCollectionMetadata,\n DaffCollectionRequest,\n DaffSortDirectionEnum,\n DaffSortOption,\n} from '@daffodil/core';\nimport { DaffCollectionFacadeInterface } from '@daffodil/core/state';\n\n/**\n * Can be used to mock out the {@link DaffCollectionFacade} in testing environments.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffCollectionFacade implements DaffCollectionFacadeInterface {\n metadata$: BehaviorSubject<DaffCollectionMetadata> = new BehaviorSubject(null);\n request$: BehaviorSubject<DaffCollectionRequest> = new BehaviorSubject(null);\n count$: BehaviorSubject<number> = new BehaviorSubject(0);\n currentPage$: BehaviorSubject<number> = new BehaviorSubject(0);\n totalPages$: BehaviorSubject<number> = new BehaviorSubject(0);\n pageSize$: BehaviorSubject<number> = new BehaviorSubject(0);\n sortOptions$: BehaviorSubject<DaffSortOption[]> = new BehaviorSubject([]);\n appliedSortOption$: BehaviorSubject<string> = new BehaviorSubject(null);\n appliedSortDirection$: BehaviorSubject<DaffSortDirectionEnum> = new BehaviorSub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BAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;ACjBlC;;AAEG;;;;"}
@@ -13,8 +13,8 @@ class DaffMockCurrencyPipe {
13
13
  transform(value) { }
14
14
  ;
15
15
  }
16
- /** @nocollapse */ /** @nocollapse */ DaffMockCurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMockCurrencyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
17
- /** @nocollapse */ /** @nocollapse */ DaffMockCurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMockCurrencyPipe, name: "currency" });
16
+ /** @nocollapse */ DaffMockCurrencyPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMockCurrencyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
17
+ /** @nocollapse */ DaffMockCurrencyPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMockCurrencyPipe, name: "currency" });
18
18
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffMockCurrencyPipe, decorators: [{
19
19
  type: Pipe,
20
20
  args: [{ name: 'currency' }]
@@ -22,9 +22,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImpor
22
22
 
23
23
  class DaffCoreTestingModule {
24
24
  }
25
- /** @nocollapse */ /** @nocollapse */ DaffCoreTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCoreTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
26
- /** @nocollapse */ /** @nocollapse */ DaffCoreTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCoreTestingModule, declarations: [DaffMockCurrencyPipe] });
27
- /** @nocollapse */ /** @nocollapse */ DaffCoreTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCoreTestingModule });
25
+ /** @nocollapse */ DaffCoreTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCoreTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
26
+ /** @nocollapse */ DaffCoreTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCoreTestingModule, declarations: [DaffMockCurrencyPipe] });
27
+ /** @nocollapse */ DaffCoreTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCoreTestingModule });
28
28
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCoreTestingModule, decorators: [{
29
29
  type: NgModule,
30
30
  args: [{
@@ -112,8 +112,8 @@ class DaffAddressFactory extends DaffModelFactory {
112
112
  super(MockDaffAddress);
113
113
  }
114
114
  }
115
- /** @nocollapse */ /** @nocollapse */ DaffAddressFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAddressFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
116
- /** @nocollapse */ /** @nocollapse */ DaffAddressFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAddressFactory, providedIn: 'root' });
115
+ /** @nocollapse */ DaffAddressFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAddressFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
116
+ /** @nocollapse */ DaffAddressFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAddressFactory, providedIn: 'root' });
117
117
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffAddressFactory, decorators: [{
118
118
  type: Injectable,
119
119
  args: [{
@@ -133,8 +133,8 @@ class DaffNumericallyPaginableFactory extends DaffModelFactory {
133
133
  super(MockDaffNumericallyPaginable);
134
134
  }
135
135
  }
136
- /** @nocollapse */ /** @nocollapse */ DaffNumericallyPaginableFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNumericallyPaginableFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
137
- /** @nocollapse */ /** @nocollapse */ DaffNumericallyPaginableFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNumericallyPaginableFactory, providedIn: 'root' });
136
+ /** @nocollapse */ DaffNumericallyPaginableFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNumericallyPaginableFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
137
+ /** @nocollapse */ DaffNumericallyPaginableFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNumericallyPaginableFactory, providedIn: 'root' });
138
138
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNumericallyPaginableFactory, decorators: [{
139
139
  type: Injectable,
140
140
  args: [{
@@ -153,8 +153,8 @@ class DaffSortOptionFactory extends DaffModelFactory {
153
153
  super(MockDaffSortOption);
154
154
  }
155
155
  }
156
- /** @nocollapse */ /** @nocollapse */ DaffSortOptionFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortOptionFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
157
- /** @nocollapse */ /** @nocollapse */ DaffSortOptionFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortOptionFactory, providedIn: 'root' });
156
+ /** @nocollapse */ DaffSortOptionFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortOptionFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
157
+ /** @nocollapse */ DaffSortOptionFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortOptionFactory, providedIn: 'root' });
158
158
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortOptionFactory, decorators: [{
159
159
  type: Injectable,
160
160
  args: [{
@@ -177,8 +177,8 @@ class DaffSortOptionsFactory extends DaffModelFactory {
177
177
  super(MockDaffSortOptions, optionFactory);
178
178
  }
179
179
  }
180
- /** @nocollapse */ /** @nocollapse */ DaffSortOptionsFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortOptionsFactory, deps: [{ token: DaffSortOptionFactory }], target: i0.ɵɵFactoryTarget.Injectable });
181
- /** @nocollapse */ /** @nocollapse */ DaffSortOptionsFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortOptionsFactory, providedIn: 'root' });
180
+ /** @nocollapse */ DaffSortOptionsFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortOptionsFactory, deps: [{ token: DaffSortOptionFactory }], target: i0.ɵɵFactoryTarget.Injectable });
181
+ /** @nocollapse */ DaffSortOptionsFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortOptionsFactory, providedIn: 'root' });
182
182
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortOptionsFactory, decorators: [{
183
183
  type: Injectable,
184
184
  args: [{
@@ -202,8 +202,8 @@ class DaffSortableFactory extends DaffModelFactory {
202
202
  super(MockDaffSortable, optionFactory);
203
203
  }
204
204
  }
205
- /** @nocollapse */ /** @nocollapse */ DaffSortableFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortableFactory, deps: [{ token: DaffSortOptionsFactory }], target: i0.ɵɵFactoryTarget.Injectable });
206
- /** @nocollapse */ /** @nocollapse */ DaffSortableFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortableFactory, providedIn: 'root' });
205
+ /** @nocollapse */ DaffSortableFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortableFactory, deps: [{ token: DaffSortOptionsFactory }], target: i0.ɵɵFactoryTarget.Injectable });
206
+ /** @nocollapse */ DaffSortableFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortableFactory, providedIn: 'root' });
207
207
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffSortableFactory, decorators: [{
208
208
  type: Injectable,
209
209
  args: [{
@@ -236,8 +236,8 @@ class DaffCollectionMetadataFactory extends DaffModelFactory {
236
236
  super(MockCollectionMetadata, pageInfoFactory, sortFieldsFactory);
237
237
  }
238
238
  }
239
- /** @nocollapse */ /** @nocollapse */ DaffCollectionMetadataFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCollectionMetadataFactory, deps: [{ token: DaffNumericallyPaginableFactory }, { token: DaffSortableFactory }], target: i0.ɵɵFactoryTarget.Injectable });
240
- /** @nocollapse */ /** @nocollapse */ DaffCollectionMetadataFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCollectionMetadataFactory, providedIn: 'root' });
239
+ /** @nocollapse */ DaffCollectionMetadataFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCollectionMetadataFactory, deps: [{ token: DaffNumericallyPaginableFactory }, { token: DaffSortableFactory }], target: i0.ɵɵFactoryTarget.Injectable });
240
+ /** @nocollapse */ DaffCollectionMetadataFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCollectionMetadataFactory, providedIn: 'root' });
241
241
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCollectionMetadataFactory, decorators: [{
242
242
  type: Injectable,
243
243
  args: [{
@@ -264,8 +264,8 @@ class DaffCollectionRequestFactory extends DaffModelFactory {
264
264
  super(MockCollectionRequest);
265
265
  }
266
266
  }
267
- /** @nocollapse */ /** @nocollapse */ DaffCollectionRequestFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCollectionRequestFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
268
- /** @nocollapse */ /** @nocollapse */ DaffCollectionRequestFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCollectionRequestFactory, providedIn: 'root' });
267
+ /** @nocollapse */ DaffCollectionRequestFactory.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCollectionRequestFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
268
+ /** @nocollapse */ DaffCollectionRequestFactory.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCollectionRequestFactory, providedIn: 'root' });
269
269
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffCollectionRequestFactory, decorators: [{
270
270
  type: Injectable,
271
271
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-core-testing.mjs","sources":["../../../libs/core/testing/src/angular/mocks/pipes/currency.ts","../../../libs/core/testing/src/testing.module.ts","../../../libs/core/testing/src/factories/factory.ts","../../../libs/core/testing/src/factories/address.factory.ts","../../../libs/core/testing/src/factories/collection/numerically-paginable.factory.ts","../../../libs/core/testing/src/factories/collection/sort-option.factory.ts","../../../libs/core/testing/src/factories/collection/sort-options.factory.ts","../../../libs/core/testing/src/factories/collection/sortable.factory.ts","../../../libs/core/testing/src/factories/collection/metadata.factory.ts","../../../libs/core/testing/src/factories/collection/request.factory.ts","../../../libs/core/testing/src/factories/collection/mock-collection.class.ts","../../../libs/core/testing/src/public_api.ts","../../../libs/core/testing/src/daffodil-core-testing.ts"],"sourcesContent":["import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n/**\n * @docs\n * A mock CurrencyPipe that does nothing to a given input.\n * This pipe is useful for asserting that a CurrencyPipe is in use via a spy,\n * but ignoring the actual underlying implementation\n */\n@Pipe({ name: 'currency' })\nexport class DaffMockCurrencyPipe implements PipeTransform {\n transform(value: number) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffMockCurrencyPipe } from './angular/mocks/pipes/currency';\n\n@NgModule({\n declarations: [\n DaffMockCurrencyPipe,\n ],\n})\nexport class DaffCoreTestingModule {}\n","import {\n range,\n Constructable,\n} from '@daffodil/core';\n\nimport { IDaffModelFactory } from './factory.interface';\n\n/**\n * The base class for model factories.\n *\n * The mock class is passed as the first constructor arg\n * and any additional args are passed to the mock class constructor.\n *\n * The constructor args can be omitted if the `create` method is overridden.\n *\n * The following example demonstrates using this feature to inject\n * a different factory into a mock class.\n *\n * ```ts\n * class MyMockModel {\n * constructor(\n * private otherFactory: MyOtherFactory\n * ) {}\n *\n * private createOtherModel() {\n * return this.otherFactory.create()\n * }\n *\n * otherModel = this.createOtherModel()\n * }\n *\n * @Injectable()\n * class TestFactory extends DaffModelFactory<MyMockModel> {\n * constructor(\n * otherFactory: MyOtherFactory\n * ) {\n * super(MyMockModel, otherFactory)\n * }\n * }\n * ```\n */\nexport abstract class DaffModelFactory<T extends Record<string, any>> implements IDaffModelFactory<T> {\n _instantiationArgs: ConstructorParameters<Constructable<T>>;\n\n constructor(\n public type?: Constructable<T>,\n ...args: ConstructorParameters<Constructable<T>>\n ) {\n this._instantiationArgs = args;\n }\n\n create(partial = {}): T {\n if (!this.type) {\n throw new Error('`type` is required if `create` is not overriden.');\n }\n return {\n ...new this.type(...this._instantiationArgs),\n ...partial,\n };\n }\n\n createMany(qty = 1, partial = {}): T[] {\n return range(0, qty - 1).map(() => this.create(partial));\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffAddress } from '@daffodil/core';\n\nimport { DaffModelFactory } from './factory';\n\n/**\n * @deprecated\n * Prefer the `MockDaffAddress` of daffodil/geography/testing`\n */\nexport class MockDaffAddress implements DaffAddress {\n firstname = faker.name.firstName();\n lastname = faker.name.lastName();\n street = faker.address.streetName();\n city = faker.address.city();\n state = faker.address.stateAbbr();\n email = faker.internet.email();\n postcode = faker.address.zipCode();\n telephone = faker.phone.phoneNumber();\n}\n\n/**\n * @deprecated\n * Prefer the `DaffAddressFactory` of `daffodil/geography/testing`\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAddressFactory extends DaffModelFactory<DaffAddress>{\n constructor(){\n super(MockDaffAddress);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffNumericallyPaginable } from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\n\nclass MockDaffNumericallyPaginable implements DaffNumericallyPaginable {\n totalPages = faker.datatype.number({ min: 1, max: 100 });\n currentPage = faker.datatype.number({ min: 1, max: this.totalPages });\n pageSize = faker.datatype.number({ min: 1, max: 100 });\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffNumericallyPaginableFactory extends DaffModelFactory<DaffNumericallyPaginable> {\n constructor(){\n super(MockDaffNumericallyPaginable);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffSortOption } from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\n\nclass MockDaffSortOption implements DaffSortOption {\n label = faker.random.word();\n value = faker.random.word();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffSortOptionFactory extends DaffModelFactory<DaffSortOption> {\n constructor() {\n super(MockDaffSortOption);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport {\n DaffSortOption,\n DaffSortOptions,\n} from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\nimport { DaffSortOptionFactory } from './sort-option.factory';\n\nclass MockDaffSortOptions implements DaffSortOptions {\n options = this.createOptions();\n default = faker.random.arrayElement(this.options).value;\n\n constructor(\n private optionFactory: DaffSortOptionFactory,\n ) {}\n\n private createOptions(): DaffSortOption[] {\n return this.optionFactory.createMany(faker.random.number({ min: 1, max: 5 }));\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffSortOptionsFactory extends DaffModelFactory<DaffSortOptions> {\n constructor(\n optionFactory: DaffSortOptionFactory,\n ) {\n super(MockDaffSortOptions, optionFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport {\n DaffSortable,\n DaffSortDirectionEnum,\n DaffSortOptions,\n} from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\nimport { DaffSortOptionsFactory } from './sort-options.factory';\n\nclass MockDaffSortable implements DaffSortable {\n sortOptions = this.createOptions();\n appliedSortOption = faker.random.arrayElement(this.sortOptions.options).value;\n appliedSortDirection = faker.random.arrayElement([DaffSortDirectionEnum.Ascending, DaffSortDirectionEnum.Descending]);\n\n constructor(\n private optionFactory: DaffSortOptionsFactory,\n ) {}\n\n private createOptions(): DaffSortOptions {\n return this.optionFactory.create();\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffSortableFactory extends DaffModelFactory<DaffSortable> {\n constructor(\n optionFactory: DaffSortOptionsFactory,\n ) {\n super(MockDaffSortable, optionFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport {\n DaffCollectionMetadata,\n DaffIdentifiable,\n DaffNumericallyPaginable,\n DaffSortable,\n DaffSortDirectionEnum,\n DaffSortOption,\n DaffSortOptions,\n} from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\nimport { DaffNumericallyPaginableFactory } from './numerically-paginable.factory';\nimport { DaffSortableFactory } from './sortable.factory';\n\n/**\n * Mocked {@link DaffCollectionMetadata} object.\n */\nexport class MockCollectionMetadata implements DaffCollectionMetadata {\n currentPage: number;\n totalPages: number;\n pageSize: number;\n sortOptions: DaffSortOptions;\n appliedSortOption: DaffSortOption['value'];\n appliedSortDirection: DaffSortDirectionEnum;\n count: number;\n ids: DaffIdentifiable['id'][];\n\n constructor(\n pageInfoFactory: DaffNumericallyPaginableFactory,\n sortFieldsFactory: DaffSortableFactory,\n ) {\n const _pageInfo = pageInfoFactory.create();\n const _sortFields = sortFieldsFactory.create();\n\n this.count = faker.datatype.number({ min: 1, max: 1000 });\n this.ids = new Array(this.count).fill(null).map<string>(() => faker.datatype.uuid());\n\n this.currentPage = _pageInfo.currentPage;\n this.totalPages = _pageInfo.totalPages;\n this.pageSize = _pageInfo.pageSize;\n\n this.appliedSortDirection = _sortFields.appliedSortDirection;\n this.appliedSortOption = _sortFields.appliedSortOption;\n this.sortOptions = _sortFields.sortOptions;\n }\n}\n\n/**\n * Factory for creating {@link DaffCollectionMetadata}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCollectionMetadataFactory extends DaffModelFactory<DaffCollectionMetadata> {\n constructor(\n pageInfoFactory: DaffNumericallyPaginableFactory,\n sortFieldsFactory: DaffSortableFactory,\n ) {\n super(MockCollectionMetadata, pageInfoFactory, sortFieldsFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport {\n DaffCollectionRequest,\n DaffSortDirectionEnum,\n} from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\n\n/**\n * Mocked {@link DaffCollectionRequest} object.\n */\nexport class MockCollectionRequest implements DaffCollectionRequest {\n currentPage = faker.datatype.number({ min: 1, max: 100 });\n appliedSortDirection = faker.random.arrayElement([DaffSortDirectionEnum.Ascending, DaffSortDirectionEnum.Descending]);\n pageSize = faker.datatype.number({ min: 1, max: 100 });\n appliedSortOption = faker.random.word();\n}\n\n/**\n * Factory for creating {@link DaffCollectionRequest}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCollectionRequestFactory extends DaffModelFactory<DaffCollectionRequest> {\n constructor() {\n super(MockCollectionRequest);\n }\n}\n","import {\n daffIdentifiableArrayToDict,\n DaffCollection,\n DaffCollectionMetadata,\n DaffIdentifiable,\n} from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\nimport { DaffCollectionMetadataFactory } from './metadata.factory';\n\n/**\n * Mocked {@link DaffCollection} object.\n *\n * It should be customized by passing the factory for the contained entity as the first constructor argument.\n */\nexport class MockCollection<T extends DaffIdentifiable = DaffIdentifiable> implements DaffCollection<T> {\n private _items = this.createItems();\n metadata = this.createMetadata();\n data = daffIdentifiableArrayToDict(this._items);\n\n constructor(\n private itemFactory: DaffModelFactory<T>,\n private metadataFactory: DaffCollectionMetadataFactory,\n ) {}\n\n private createItems(): T[] {\n return this.itemFactory.createMany();\n }\n\n private createMetadata(): DaffCollectionMetadata {\n return this.metadataFactory.create({\n ids: this._items.map(({ id }) => id),\n count: this._items.length,\n });\n }\n}\n","//@angular/core\nexport { DaffMockCurrencyPipe } from './angular/mocks/pipes/currency';\nexport { DaffInMemoryDataServiceInterface } from './angular/interfaces/in-memory-data-service.interface';\n\n//Core\nexport { DaffCoreTestingModule } from './testing.module';\n\nexport * from './factories/public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffSortOptionFactory","i1.DaffSortOptionsFactory","i1.DaffNumericallyPaginableFactory","i2.DaffSortableFactory"],"mappings":";;;;;AAKA;;;;;AAKG;MAEU,oBAAoB,CAAA;IAC/B,SAAS,CAAC,KAAa,EAAA,GAAI;;;uJADhB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;qJAApB,oBAAoB,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,IAAI;mBAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;;;MCFb,qBAAqB,CAAA;;wJAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAArB,sCAAA,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,iBAH9B,oBAAoB,CAAA,EAAA,CAAA,CAAA;yJAGX,qBAAqB,EAAA,CAAA,CAAA;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,oBAAoB;AACrB,qBAAA;AACF,iBAAA,CAAA;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AAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,cAF3B,MAAM,EAAA,CAAA,CAAA;2FAEP,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAHxC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACfD;;;;AAIG;MACU,cAAc,CAAA;IAKzB,WACU,CAAA,WAAgC,EAChC,eAA8C,EAAA;QAD9C,IAAW,CAAA,WAAA,GAAX,WAAW,CAAqB;QAChC,IAAe,CAAA,eAAA,GAAf,eAAe,CAA+B;AANhD,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AACpC,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;AACjC,QAAA,IAAA,CAAA,IAAI,GAAG,2BAA2B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAK5C;IAEI,WAAW,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;KACtC;IAEO,cAAc,GAAA;AACpB,QAAA,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;AACjC,YAAA,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;AACpC,YAAA,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;AAC1B,SAAA,CAAC,CAAC;KACJ;AACF;;ACnCD;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-core-testing.mjs","sources":["../../../libs/core/testing/src/angular/mocks/pipes/currency.ts","../../../libs/core/testing/src/testing.module.ts","../../../libs/core/testing/src/factories/factory.ts","../../../libs/core/testing/src/factories/address.factory.ts","../../../libs/core/testing/src/factories/collection/numerically-paginable.factory.ts","../../../libs/core/testing/src/factories/collection/sort-option.factory.ts","../../../libs/core/testing/src/factories/collection/sort-options.factory.ts","../../../libs/core/testing/src/factories/collection/sortable.factory.ts","../../../libs/core/testing/src/factories/collection/metadata.factory.ts","../../../libs/core/testing/src/factories/collection/request.factory.ts","../../../libs/core/testing/src/factories/collection/mock-collection.class.ts","../../../libs/core/testing/src/public_api.ts","../../../libs/core/testing/src/daffodil-core-testing.ts"],"sourcesContent":["import {\n Pipe,\n PipeTransform,\n} from '@angular/core';\n\n/**\n * @docs\n * A mock CurrencyPipe that does nothing to a given input.\n * This pipe is useful for asserting that a CurrencyPipe is in use via a spy,\n * but ignoring the actual underlying implementation\n */\n@Pipe({ name: 'currency' })\nexport class DaffMockCurrencyPipe implements PipeTransform {\n transform(value: number) {};\n}\n","import { NgModule } from '@angular/core';\n\nimport { DaffMockCurrencyPipe } from './angular/mocks/pipes/currency';\n\n@NgModule({\n declarations: [\n DaffMockCurrencyPipe,\n ],\n})\nexport class DaffCoreTestingModule {}\n","import {\n range,\n Constructable,\n} from '@daffodil/core';\n\nimport { IDaffModelFactory } from './factory.interface';\n\n/**\n * The base class for model factories.\n *\n * The mock class is passed as the first constructor arg\n * and any additional args are passed to the mock class constructor.\n *\n * The constructor args can be omitted if the `create` method is overridden.\n *\n * The following example demonstrates using this feature to inject\n * a different factory into a mock class.\n *\n * ```ts\n * class MyMockModel {\n * constructor(\n * private otherFactory: MyOtherFactory\n * ) {}\n *\n * private createOtherModel() {\n * return this.otherFactory.create()\n * }\n *\n * otherModel = this.createOtherModel()\n * }\n *\n * @Injectable()\n * class TestFactory extends DaffModelFactory<MyMockModel> {\n * constructor(\n * otherFactory: MyOtherFactory\n * ) {\n * super(MyMockModel, otherFactory)\n * }\n * }\n * ```\n */\nexport abstract class DaffModelFactory<T extends Record<string, any>> implements IDaffModelFactory<T> {\n _instantiationArgs: ConstructorParameters<Constructable<T>>;\n\n constructor(\n public type?: Constructable<T>,\n ...args: ConstructorParameters<Constructable<T>>\n ) {\n this._instantiationArgs = args;\n }\n\n create(partial = {}): T {\n if (!this.type) {\n throw new Error('`type` is required if `create` is not overriden.');\n }\n return {\n ...new this.type(...this._instantiationArgs),\n ...partial,\n };\n }\n\n createMany(qty = 1, partial = {}): T[] {\n return range(0, qty - 1).map(() => this.create(partial));\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffAddress } from '@daffodil/core';\n\nimport { DaffModelFactory } from './factory';\n\n/**\n * @deprecated\n * Prefer the `MockDaffAddress` of daffodil/geography/testing`\n */\nexport class MockDaffAddress implements DaffAddress {\n firstname = faker.name.firstName();\n lastname = faker.name.lastName();\n street = faker.address.streetName();\n city = faker.address.city();\n state = faker.address.stateAbbr();\n email = faker.internet.email();\n postcode = faker.address.zipCode();\n telephone = faker.phone.phoneNumber();\n}\n\n/**\n * @deprecated\n * Prefer the `DaffAddressFactory` of `daffodil/geography/testing`\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffAddressFactory extends DaffModelFactory<DaffAddress>{\n constructor(){\n super(MockDaffAddress);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffNumericallyPaginable } from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\n\nclass MockDaffNumericallyPaginable implements DaffNumericallyPaginable {\n totalPages = faker.datatype.number({ min: 1, max: 100 });\n currentPage = faker.datatype.number({ min: 1, max: this.totalPages });\n pageSize = faker.datatype.number({ min: 1, max: 100 });\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffNumericallyPaginableFactory extends DaffModelFactory<DaffNumericallyPaginable> {\n constructor(){\n super(MockDaffNumericallyPaginable);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport { DaffSortOption } from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\n\nclass MockDaffSortOption implements DaffSortOption {\n label = faker.random.word();\n value = faker.random.word();\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffSortOptionFactory extends DaffModelFactory<DaffSortOption> {\n constructor() {\n super(MockDaffSortOption);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport {\n DaffSortOption,\n DaffSortOptions,\n} from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\nimport { DaffSortOptionFactory } from './sort-option.factory';\n\nclass MockDaffSortOptions implements DaffSortOptions {\n options = this.createOptions();\n default = faker.random.arrayElement(this.options).value;\n\n constructor(\n private optionFactory: DaffSortOptionFactory,\n ) {}\n\n private createOptions(): DaffSortOption[] {\n return this.optionFactory.createMany(faker.random.number({ min: 1, max: 5 }));\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffSortOptionsFactory extends DaffModelFactory<DaffSortOptions> {\n constructor(\n optionFactory: DaffSortOptionFactory,\n ) {\n super(MockDaffSortOptions, optionFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport {\n DaffSortable,\n DaffSortDirectionEnum,\n DaffSortOptions,\n} from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\nimport { DaffSortOptionsFactory } from './sort-options.factory';\n\nclass MockDaffSortable implements DaffSortable {\n sortOptions = this.createOptions();\n appliedSortOption = faker.random.arrayElement(this.sortOptions.options).value;\n appliedSortDirection = faker.random.arrayElement([DaffSortDirectionEnum.Ascending, DaffSortDirectionEnum.Descending]);\n\n constructor(\n private optionFactory: DaffSortOptionsFactory,\n ) {}\n\n private createOptions(): DaffSortOptions {\n return this.optionFactory.create();\n }\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffSortableFactory extends DaffModelFactory<DaffSortable> {\n constructor(\n optionFactory: DaffSortOptionsFactory,\n ) {\n super(MockDaffSortable, optionFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport {\n DaffCollectionMetadata,\n DaffIdentifiable,\n DaffNumericallyPaginable,\n DaffSortable,\n DaffSortDirectionEnum,\n DaffSortOption,\n DaffSortOptions,\n} from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\nimport { DaffNumericallyPaginableFactory } from './numerically-paginable.factory';\nimport { DaffSortableFactory } from './sortable.factory';\n\n/**\n * Mocked {@link DaffCollectionMetadata} object.\n */\nexport class MockCollectionMetadata implements DaffCollectionMetadata {\n currentPage: number;\n totalPages: number;\n pageSize: number;\n sortOptions: DaffSortOptions;\n appliedSortOption: DaffSortOption['value'];\n appliedSortDirection: DaffSortDirectionEnum;\n count: number;\n ids: DaffIdentifiable['id'][];\n\n constructor(\n pageInfoFactory: DaffNumericallyPaginableFactory,\n sortFieldsFactory: DaffSortableFactory,\n ) {\n const _pageInfo = pageInfoFactory.create();\n const _sortFields = sortFieldsFactory.create();\n\n this.count = faker.datatype.number({ min: 1, max: 1000 });\n this.ids = new Array(this.count).fill(null).map<string>(() => faker.datatype.uuid());\n\n this.currentPage = _pageInfo.currentPage;\n this.totalPages = _pageInfo.totalPages;\n this.pageSize = _pageInfo.pageSize;\n\n this.appliedSortDirection = _sortFields.appliedSortDirection;\n this.appliedSortOption = _sortFields.appliedSortOption;\n this.sortOptions = _sortFields.sortOptions;\n }\n}\n\n/**\n * Factory for creating {@link DaffCollectionMetadata}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCollectionMetadataFactory extends DaffModelFactory<DaffCollectionMetadata> {\n constructor(\n pageInfoFactory: DaffNumericallyPaginableFactory,\n sortFieldsFactory: DaffSortableFactory,\n ) {\n super(MockCollectionMetadata, pageInfoFactory, sortFieldsFactory);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as faker from '@faker-js/faker/locale/en_US';\n\nimport {\n DaffCollectionRequest,\n DaffSortDirectionEnum,\n} from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\n\n/**\n * Mocked {@link DaffCollectionRequest} object.\n */\nexport class MockCollectionRequest implements DaffCollectionRequest {\n currentPage = faker.datatype.number({ min: 1, max: 100 });\n appliedSortDirection = faker.random.arrayElement([DaffSortDirectionEnum.Ascending, DaffSortDirectionEnum.Descending]);\n pageSize = faker.datatype.number({ min: 1, max: 100 });\n appliedSortOption = faker.random.word();\n}\n\n/**\n * Factory for creating {@link DaffCollectionRequest}s.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffCollectionRequestFactory extends DaffModelFactory<DaffCollectionRequest> {\n constructor() {\n super(MockCollectionRequest);\n }\n}\n","import {\n daffIdentifiableArrayToDict,\n DaffCollection,\n DaffCollectionMetadata,\n DaffIdentifiable,\n} from '@daffodil/core';\n\nimport { DaffModelFactory } from '../factory';\nimport { DaffCollectionMetadataFactory } from './metadata.factory';\n\n/**\n * Mocked {@link DaffCollection} object.\n *\n * It should be customized by passing the factory for the contained entity as the first constructor argument.\n */\nexport class MockCollection<T extends DaffIdentifiable = DaffIdentifiable> implements DaffCollection<T> {\n private _items = this.createItems();\n metadata = this.createMetadata();\n data = daffIdentifiableArrayToDict(this._items);\n\n constructor(\n private itemFactory: DaffModelFactory<T>,\n private metadataFactory: DaffCollectionMetadataFactory,\n ) {}\n\n private createItems(): T[] {\n return this.itemFactory.createMany();\n }\n\n private createMetadata(): DaffCollectionMetadata {\n return this.metadataFactory.create({\n ids: this._items.map(({ id }) => id),\n count: this._items.length,\n });\n }\n}\n","//@angular/core\nexport { DaffMockCurrencyPipe } from './angular/mocks/pipes/currency';\nexport { DaffInMemoryDataServiceInterface } from './angular/interfaces/in-memory-data-service.interface';\n\n//Core\nexport { DaffCoreTestingModule } from './testing.module';\n\nexport * from './factories/public_api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DaffSortOptionFactory","i1.DaffSortOptionsFactory","i1.DaffNumericallyPaginableFactory","i2.DaffSortableFactory"],"mappings":";;;;;AAKA;;;;;AAKG;MAEU,oBAAoB,CAAA;IAC/B,SAAS,CAAC,KAAa,EAAA,GAAI;;;oIADhB,oBAAoB,EA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AA,IAAA,CAAA,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;AACjC,QAAA,IAAA,CAAA,IAAI,GAAG,2BAA2B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAK5C;IAEI,WAAW,GAAA;AACjB,QAAA,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;KACtC;IAEO,cAAc,GAAA;AACpB,QAAA,OAAO,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;AACjC,YAAA,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;AACpC,YAAA,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;AAC1B,SAAA,CAAC,CAAC;KACJ;AACF;;ACnCD;;ACAA;;AAEG;;;;"}
@@ -233,8 +233,8 @@ class DaffErrorStorageService {
233
233
  }
234
234
  }
235
235
  DaffErrorStorageService.ERROR_MESSAGE = 'The DaffErrorStorageService always throws an error.';
236
- /** @nocollapse */ /** @nocollapse */ DaffErrorStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffErrorStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
237
- /** @nocollapse */ /** @nocollapse */ DaffErrorStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffErrorStorageService, providedIn: 'root' });
236
+ /** @nocollapse */ DaffErrorStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffErrorStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
237
+ /** @nocollapse */ DaffErrorStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffErrorStorageService, providedIn: 'root' });
238
238
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffErrorStorageService, decorators: [{
239
239
  type: Injectable,
240
240
  args: [{
@@ -277,8 +277,8 @@ class DaffServerErrorStorageService {
277
277
  }
278
278
  }
279
279
  DaffServerErrorStorageService.ERROR_MESSAGE = 'The DaffServerErrorStorageService always throws an error.';
280
- /** @nocollapse */ /** @nocollapse */ DaffServerErrorStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerErrorStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
281
- /** @nocollapse */ /** @nocollapse */ DaffServerErrorStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerErrorStorageService, providedIn: 'root' });
280
+ /** @nocollapse */ DaffServerErrorStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerErrorStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
281
+ /** @nocollapse */ DaffServerErrorStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerErrorStorageService, providedIn: 'root' });
282
282
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerErrorStorageService, decorators: [{
283
283
  type: Injectable,
284
284
  args: [{
@@ -317,8 +317,8 @@ class DaffLocalStorageService {
317
317
  localStorage.clear();
318
318
  }
319
319
  }
320
- /** @nocollapse */ /** @nocollapse */ DaffLocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffLocalStorageService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
321
- /** @nocollapse */ /** @nocollapse */ DaffLocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffLocalStorageService, providedIn: 'root' });
320
+ /** @nocollapse */ DaffLocalStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffLocalStorageService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
321
+ /** @nocollapse */ DaffLocalStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffLocalStorageService, providedIn: 'root' });
322
322
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffLocalStorageService, decorators: [{
323
323
  type: Injectable,
324
324
  args: [{
@@ -342,8 +342,8 @@ class DaffNoopStorageService {
342
342
  removeItem(key) { }
343
343
  ;
344
344
  }
345
- /** @nocollapse */ /** @nocollapse */ DaffNoopStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNoopStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
346
- /** @nocollapse */ /** @nocollapse */ DaffNoopStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNoopStorageService, providedIn: 'root' });
345
+ /** @nocollapse */ DaffNoopStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNoopStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
346
+ /** @nocollapse */ DaffNoopStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNoopStorageService, providedIn: 'root' });
347
347
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffNoopStorageService, decorators: [{
348
348
  type: Injectable,
349
349
  args: [{
@@ -401,8 +401,8 @@ class DaffServerBase64Service {
401
401
  return Buffer.from(str, 'base64').toString('ascii');
402
402
  }
403
403
  }
404
- /** @nocollapse */ /** @nocollapse */ DaffServerBase64Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerBase64Service, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
405
- /** @nocollapse */ /** @nocollapse */ DaffServerBase64Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerBase64Service, providedIn: 'root' });
404
+ /** @nocollapse */ DaffServerBase64Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerBase64Service, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
405
+ /** @nocollapse */ DaffServerBase64Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerBase64Service, providedIn: 'root' });
406
406
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffServerBase64Service, decorators: [{
407
407
  type: Injectable,
408
408
  args: [{
@@ -429,8 +429,8 @@ class DaffBrowserBase64Service {
429
429
  return atob(str);
430
430
  }
431
431
  }
432
- /** @nocollapse */ /** @nocollapse */ DaffBrowserBase64Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBrowserBase64Service, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
433
- /** @nocollapse */ /** @nocollapse */ DaffBrowserBase64Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBrowserBase64Service, providedIn: 'root' });
432
+ /** @nocollapse */ DaffBrowserBase64Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBrowserBase64Service, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
433
+ /** @nocollapse */ DaffBrowserBase64Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBrowserBase64Service, providedIn: 'root' });
434
434
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: DaffBrowserBase64Service, decorators: [{
435
435
  type: Injectable,
436
436
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-core.mjs","sources":["../../../libs/core/src/utils/long-arithmetic.ts","../../../libs/core/src/utils/range.ts","../../../libs/core/src/utils/shuffle.ts","../../../libs/core/src/utils/random-subset.ts","../../../libs/core/src/utils/random-slice.ts","../../../libs/core/src/utils/array-to-dict.ts","../../../libs/core/src/utils/sample.ts","../../../libs/core/src/utils/unique.ts","../../../libs/core/src/errors/inheritable-error.ts","../../../libs/core/src/errors/is-error.ts","../../../libs/core/src/storage/error/error.ts","../../../libs/core/src/storage/error/error.service.ts","../../../libs/core/src/storage/server-error/server-error.ts","../../../libs/core/src/storage/server-error/server-error.service.ts","../../../libs/core/src/storage/localstorage/localstorage.service.ts","../../../libs/core/src/storage/noopstorage/noopstorage.service.ts","../../../libs/core/src/storage/persistence.interface.ts","../../../libs/core/src/storage/persistence-server-safe.token.ts","../../../libs/core/src/operators/backoff.pipe.ts","../../../libs/core/src/base64/server/server.service.ts","../../../libs/core/src/base64/browser/browser.service.ts","../../../libs/core/src/base64/base64.interface.ts","../../../libs/core/src/collection/sortable.ts","../../../libs/core/src/collection/page-out-of-bounds.error.ts","../../../libs/core/src/collection/error-map.ts","../../../libs/core/src/collection/build-metadata.ts","../../../libs/core/src/collection/build-request.ts","../../../libs/core/src/identifiable/array-to-dict.ts","../../../libs/core/src/daffodil-core.ts"],"sourcesContent":["/**\n * A helper function to get the number of decimal significant figures of a number.\n * This function will fail if the given number has more than 16 significant figures or\n * the value of the number is greater than 10^11\n *\n * @param number\n */\nfunction daffPrecision(number: number): number {\n let p = 10000;\n if(number === undefined || number === null) {\n return p;\n }\n while (Math.round(number * p) / p !== number) {\n p *= 10;\n }\n return p;\n}\n\n/**\n * A function to add long numbers accurately with conversions and integer math.\n * This function only guarantees correct answers when the numbers given and the result are less than\n * 16 significant figures and less than 10^11\n *\n * @param numbers\n */\nexport function daffAdd(...numbers: number[]): number {\n if(numbers.length < 2) {\n throw new Error('Provide at least 2 numbers for daffAdd.');\n }\n const precision = Math.max(...numbers.map(daffPrecision));\n return numbers.reduce((acc, number) => acc + Math.round(number*precision), 0) / precision;\n}\n\n/**\n * A function to subtract long numbers accurately with conversions and integer math.\n * This function only guarantees correct answers when the numbers given and the result are each less than\n * 16 significant figures and less than 10^11\n *\n * @param numbers\n */\nexport function daffSubtract(...numbers: number[]): number {\n if(numbers.length < 2) {\n throw new Error('Provide at least 2 numbers for daffSubtract.');\n }\n const precision = Math.max(...numbers.map(daffPrecision));\n return numbers.slice(1).reduce(\n (acc, number) => acc - Math.round(number*precision),\n Math.round(numbers[0]*precision),\n ) / precision;\n}\n\n/**\n * A function to multiply long numbers accurately with conversions and integer math.\n * This function only guarantees correct answers when the numbers given and the result are each less than 16 significant figures\n * and less than 10^11\n *\n * @param numbers\n */\nexport function daffMultiply(...numbers: number[]): number {\n if(numbers.length < 2) {\n throw new Error('Provide at least 2 numbers for daffMultiply.');\n }\n const precision = Math.max(...numbers.map(daffPrecision));\n return numbers.reduce(\n (acc, number) => acc * Math.round(number*precision),\n 1,\n ) / Math.pow(precision, numbers.length);\n}\n\n/**\n * A function to divide long numbers accurately with conversions and integer math.\n * This function only guarantees correct answers when the numbers given and the result are each less than 16 significant figures\n * and less than 10^11\n *\n * Returns NaN when attempting to use NaN as an input.\n * Returns NaN when attempting to divide by 0 or null.\n *\n * @param numbers\n */\nexport function daffDivide(...numbers: number[]): number {\n if(numbers.length < 2) {\n throw new Error('Provide at least 2 numbers for daffDivide.');\n }\n // TODO(griest024): use better condition after IE support is dropped\n const illegalOperation = numbers.filter(isNaN).length > 0\n || numbers.slice(1).filter(n => n === 0 || n === null).length > 0;\n if (illegalOperation) {\n return NaN;\n }\n const precision = Math.max(...numbers.map(daffPrecision));\n return numbers.slice(1).reduce(\n (acc, number) => acc / Math.round(number*precision),\n Math.round(numbers[0]*precision),\n ) * Math.pow(precision, numbers.length - 2);\n}\n","/**\n * Range\n *\n * Range accepts two inputs, a `start` and an `end`\n * and returns an array filled with numbers from\n * `start` to `end`.\n *\n * @param start\n * @param end\n * @returns number\n */\nexport const range = (start: number, end: number): Array<number> =>\n Array.apply(null, Array(end - start + 1)).map((val, index) => index + start);\n\n","/**\n * Immutable Fisher-Yates Shuffle\n * https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle\n */\nexport const shuffle = <T>(array: T[]): T[] => {\n const result = [];\n array.forEach((el, i) => {\n const s = Math.floor(Math.random() * i);\n if( s !== i ){\n result[i] = result[s];\n }\n result[s] = el;\n });\n return result;\n};\n","import { shuffle } from './shuffle';\n\n/**\n * Returns a random subset of an array in a random order.\n *\n * @param array\n * @param length\n */\nexport const randomSubset = <T>(array: T[], length?: number): T[] => {\n if(length > array.length){\n throw new Error('Requested length is longer than array length.');\n }\n length = length ? length : Math.floor(Math.random() * array.length);\n return shuffle(array).slice(0, length);\n};\n","/**\n * Returns a random slice of an array.\n * An optional length may be specified.\n *\n * @param array\n */\nexport const randomSlice = <T>(array: T[], length?: number): T[] => {\n if(array.length === 0) {\n return [];\n };\n if(length > array.length) {\n throw new Error('Requested length is longer than array length.');\n }\n const arrayLength = length || Math.floor(Math.random() * array.length);\n const start = Math.floor(Math.random() * (array.length - arrayLength + 1));\n const end = start + arrayLength;\n return array.slice(start, end);\n};\n","type Dictionary = Record<string | number | symbol, any>;\n\n/**\n * Converts an array into a dictionary.\n * Dictionary values are keyed by the return of the specified `getKey`.\n */\nexport const daffArrayToDict = <T extends Dictionary>(array: T[], getKey: (val: T) => keyof Dictionary): Record<keyof Dictionary, T> =>\n array.reduce(\n (dict, val) => {\n dict[getKey(val)] = val;\n return dict;\n },\n {},\n );\n","import { randomSlice } from './random-slice';\n\n/**\n * Returns a random element of an array.\n */\nexport const sample = <T>(array: T[]): T => randomSlice(array, 1)[0];\n","/**\n * Filters an array of elements, removing duplicates.\n * Does not guarantee order of filtered elements.\n *\n * An optional comparator function may be passed for arbitrary comparison behavior.\n * The default is a strict equality comparison: `a === b`.\n */\nexport const unique = <T>(array: T[], comparator: (a: T, b: T) => boolean = (a, b) => a === b): T[] =>\n array.filter((a, index) => array.slice(index + 1).filter(b => comparator(a, b)).length === 0);\n","/**\n * A class which allows you to appropriately check the inheritance of an error.\n *\n * In typescript, when you try to extend an error with a specialized error class,\n * if you try to call something like:\n *\n * ```ts\n * class MyError extends Error {}\n *\n * let myError = new MyError();\n *\n * myError instanceof MyError; // returns false\n * ```\n *\n * You will see unexpected things. This class fixes that issue as described here\n * https://github.com/microsoft/TypeScript/issues/13965\n */\nexport class DaffInheritableError extends Error {\n __proto__: Error;\n\n recoverable = false;\n\n constructor(message?: string) {\n\t super(message);\n\t const trueProto = new.target.prototype;\n\n\t Object.setPrototypeOf(this, trueProto);\n }\n}\n","import { DaffError } from './error.interface';\nimport { DaffInheritableError } from './inheritable-error';\n\n/**\n * Checks if the passed object is a {@link DaffError}\n */\nexport const daffIsError = (error: any): boolean =>\n error instanceof DaffInheritableError || !!(<DaffError>error).code;\n","import {\n DaffError,\n DaffInheritableError,\n} from '../../errors/public_api';\n\nexport class DaffStorageServiceError extends DaffInheritableError implements DaffError {\n public readonly code: string = 'DAFF_STORAGE_FAILURE';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffPersistenceService } from '../persistence.interface';\nimport { DaffStorageServiceError } from './error';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffErrorStorageService implements DaffPersistenceService {\n static readonly ERROR_MESSAGE = 'The DaffErrorStorageService always throws an error.';\n\n setItem(key: string, value: any): void {\n this.throwError();\n }\n\n getItem(key: string): any {\n this.throwError();\n }\n\n removeItem(key: string): any {\n this.throwError();\n }\n\n clear(){\n this.throwError();\n }\n\n private throwError() {\n throw new DaffStorageServiceError(DaffErrorStorageService.ERROR_MESSAGE);\n }\n}\n","import { DaffError } from '../../errors/public_api';\nimport { DaffStorageServiceError } from '../error/error';\n\n/**\n * An error thrown when there is an attempt to access storage on the server and none is available.\n */\nexport class DaffServerSideStorageError extends DaffStorageServiceError implements DaffError {\n public readonly code: string = 'DAFF_SERVER_STORAGE_FAILURE';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffPersistenceService } from '../persistence.interface';\nimport { DaffServerSideStorageError } from './server-error';\n\n/**\n * A storage service meant to be loaded into SSR contexts.\n * It will always throw the {@link DaffServerSideStorageError}.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffServerErrorStorageService implements DaffPersistenceService {\n static readonly ERROR_MESSAGE = 'The DaffServerErrorStorageService always throws an error.';\n\n setItem(key: string, value: any): void {\n this.throwError();\n }\n\n getItem(key: string): any {\n this.throwError();\n }\n\n removeItem(key: string): any {\n this.throwError();\n }\n\n clear(){\n this.throwError();\n }\n\n private throwError() {\n throw new DaffServerSideStorageError(DaffServerErrorStorageService.ERROR_MESSAGE);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Injectable,\n Inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffPersistenceService } from '../persistence.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffLocalStorageService implements DaffPersistenceService {\n constructor(@Inject(PLATFORM_ID) platformId: string){\n if(!isPlatformBrowser(platformId)){\n throw new Error('The DaffLocalStorageService can only be instantiated in the browser.');\n }\n }\n\n /**\n * Persist the given item into local storage.\n */\n setItem(key: string, value: any): void {\n localStorage.setItem(key, value);\n }\n\n /**\n * Retrieve the given item from localstorage.\n */\n getItem(key: string): any {\n return localStorage.getItem(key);\n }\n\n /**\n * Remove a given item from localstorage\n */\n removeItem(key: string): any {\n localStorage.removeItem(key);\n }\n\n clear(){\n localStorage.clear();\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffPersistenceService } from '../persistence.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffNoopStorageService implements DaffPersistenceService {\n setItem(key: string, value: any): void {};\n getItem(key: string): any {};\n clear(): void {};\n removeItem(key: string): void {};\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n InjectionToken,\n inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffLocalStorageService } from './localstorage/localstorage.service';\nimport { DaffServerErrorStorageService } from './server-error/public_api';\n\nexport interface DaffPersistenceService {\n setItem(key: string, value: any): void;\n getItem(key: string): any;\n clear(): void;\n removeItem(key: string): void;\n}\n\nexport const DaffPersistenceServiceToken = new InjectionToken<DaffPersistenceService>('DaffPersistenceService', {\n providedIn: 'root',\n factory: () => isPlatformBrowser(inject<string>(PLATFORM_ID))\n ? new DaffLocalStorageService(inject<string>(PLATFORM_ID))\n : new DaffServerErrorStorageService(),\n});\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n InjectionToken,\n inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffNoopStorageService } from './noopstorage/noopstorage.service';\nimport {\n DaffPersistenceService,\n DaffPersistenceServiceToken,\n} from './persistence.interface';\n\n/**\n * Provides noop for the persistence service on the server.\n */\nexport const DaffServerSafePersistenceServiceToken = new InjectionToken<\nDaffPersistenceService\n>('DaffServerSafePersistenceService', {\n providedIn: 'root',\n factory: () =>\n isPlatformBrowser(inject<string>(PLATFORM_ID))\n ? inject<DaffPersistenceService>(DaffPersistenceServiceToken)\n : inject<DaffPersistenceService>(DaffNoopStorageService),\n});\n","import {\n pipe,\n timer,\n throwError,\n} from 'rxjs';\nimport {\n retryWhen,\n mergeMap,\n} from 'rxjs/operators';\n\n/**\n * Retries failed Observables\n *\n * @param maxTries The maximum number of tries the observable will be tried\n * @param ms The initial amount of time\n */\nexport function backoff(maxTries: number, ms: number) {\n return pipe(\n retryWhen(attempt => attempt.pipe(\n mergeMap((shadowedAttempt: Error, i) => {\n if(i >= maxTries) {\n return throwError(shadowedAttempt);\n }\n return timer(ms*Math.pow(2,i));\n }),\n )),\n );\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Inject,\n Injectable,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffBase64Service } from '../base64.interface';\n\ndeclare const Buffer;\n\n/**\n * A base64 service meant to be loaded into SSR contexts.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffServerBase64Service implements DaffBase64Service {\n constructor(@Inject(PLATFORM_ID) platformId: string){\n if (isPlatformBrowser(platformId)){\n throw new Error('The DaffBrowserBase64Service can only be instantiated on the server.');\n }\n }\n\n encode(str: string): string {\n return Buffer.from(str).toString('base64');\n }\n\n decode(str: string): string {\n return Buffer.from(str, 'base64').toString('ascii');\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Injectable,\n Inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffBase64Service } from '../base64.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffBrowserBase64Service implements DaffBase64Service {\n constructor(@Inject(PLATFORM_ID) platformId: string){\n if(!isPlatformBrowser(platformId)){\n throw new Error('The DaffBrowserBase64Service can only be instantiated in the browser.');\n }\n }\n\n encode(str: string): string {\n return btoa(str);\n }\n\n decode(str: string): string {\n return atob(str);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n InjectionToken,\n inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffBrowserBase64Service } from './browser/browser.service';\nimport { DaffServerBase64Service } from './server/public_api';\n\n/**\n * A service for encoding and decoding base64 strings.\n */\nexport interface DaffBase64Service {\n /**\n * Encodes an ASCII string to base64.\n */\n encode(str: string): string;\n /**\n * Decodes a base64 string to ASCII.\n */\n decode(str: string): string;\n}\n\n/**\n * A token which creates a base64 service appropriate for the current environment, i.e., browser vs. server.\n */\nexport const DaffBase64ServiceToken = new InjectionToken<DaffBase64Service>('DaffBase64Service', {\n providedIn: 'root',\n factory: () => isPlatformBrowser(inject<string>(PLATFORM_ID))\n ? new DaffBrowserBase64Service(inject<string>(PLATFORM_ID))\n : new DaffServerBase64Service(inject<string>(PLATFORM_ID)),\n});\n","/**\n * The metadata that describes the sorting behavior of a collection of elements.\n */\nexport interface DaffSortOptions {\n default: DaffSortOption['value'];\n options: DaffSortOption[];\n}\n\n\n/**\n * One particular option used to sort a collection of elements;\n */\nexport interface DaffSortOption {\n label: string;\n value: any;\n}\n\n/**\n * The direction in which to sort a list of elements, e.g. if the list was\n * sorted alphabetically, \"Ascending\" would be from \"A-Z\",\n * and \"Descending\" would be from \"Z-A\".\n */\nexport enum DaffSortDirectionEnum {\n Ascending = 'ASC',\n Descending = 'DSC'\n}\n\n/**\n * Describes the properties of a collection that make the collection able to be\n * sorted by Daffodil.\n */\nexport interface DaffSortable {\n\n /**\n * The available options by which to sort the collection.\n */\n sortOptions: DaffSortOptions;\n\n /**\n * The currently applied sorting option.\n */\n appliedSortOption: DaffSortOption['value'];\n\n /**\n * The currently applied sort direction.\n */\n appliedSortDirection: DaffSortDirectionEnum;\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '../errors/public_api';\n\nexport const DAFF_COLLECTION_PAGE_OUT_OF_BOUNDS_ERROR_CODE = 'DAFF_COLLECTION_PAGE_OUT_OF_BOUNDS';\n\n/**\n * An error thrown when the requested page is greater than the number of available pages.\n */\nexport class DaffCollectionPageOutOfBoundsError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_COLLECTION_PAGE_OUT_OF_BOUNDS_ERROR_CODE;\n\n constructor(message?: string) {\n\t super(message);\n }\n}\n","import {\n DaffCollectionPageOutOfBoundsError,\n DAFF_COLLECTION_PAGE_OUT_OF_BOUNDS_ERROR_CODE,\n} from './page-out-of-bounds.error';\n\nexport const daffCollectionErrorMap = {\n [DAFF_COLLECTION_PAGE_OUT_OF_BOUNDS_ERROR_CODE]: DaffCollectionPageOutOfBoundsError,\n};\n","import { DaffCollectionMetadata } from './metadata.interface';\nimport { DaffCollectionRequest } from './request.interface';\n\ntype MetadataRequestIntersection = keyof DaffCollectionMetadata & keyof DaffCollectionRequest;\n\nconst allowedMetadataKeys: MetadataRequestIntersection[] = [\n 'appliedSortOption',\n 'appliedSortDirection',\n 'currentPage',\n 'pageSize',\n];\n\n/**\n * Extracts the part of the {@link DaffCollectionRequest} that can be directly set in {@link DaffCollectionMetadata}.\n */\nexport const daffCollectionBuildMetadataFromRequest = (request: DaffCollectionRequest): Partial<DaffCollectionMetadata> =>\n allowedMetadataKeys.reduce(<K extends MetadataRequestIntersection>(acc: Partial<DaffCollectionMetadata>, key: K) => {\n if (request[key]) {\n acc[key] = request[key];\n }\n return acc;\n }, <Partial<DaffCollectionMetadata>>{});\n","import { DaffCollectionMetadata } from './metadata.interface';\nimport { DaffCollectionRequest } from './request.interface';\n\n/**\n * Builds a {@link DaffCollectionRequest} from {@link DaffCollectionMetadata}.\n */\nexport const daffCollectionBuildRequestFromMetadata = (metadata: DaffCollectionMetadata): Partial<DaffCollectionRequest> => ({\n appliedSortOption: metadata.appliedSortOption,\n appliedSortDirection: metadata.appliedSortDirection,\n currentPage: metadata.currentPage,\n pageSize: metadata.pageSize,\n});\n","import { daffArrayToDict } from '../utils/public_api';\nimport { DaffIdentifiable } from './identifiable.interface';\n\n/**\n * Transforms an array of {@link DaffIdentifiable} objects to a dictionary of those objects keyed by ID.\n */\nexport const daffIdentifiableArrayToDict = <T extends DaffIdentifiable = DaffIdentifiable>(ary: T[]): Record<T['id'], T> =>\n daffArrayToDict(ary, ({ id }) => id);\n","/**\n * Generated bundle index.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qCAAqC;AAElG;;AAEG;AACG,MAAO,kCAAmC,SAAQ,oBAAoB,CAAA;AAG1E,IAAA,WAAA,CAAY,OAAgB,EAAA;QAC3B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHA,IAAI,CAAA,IAAA,GAAW,6CAA6C,CAAC;KAI5E;AACF;;ACXY,MAAA,sBAAsB,GAAG;IACpC,CAAC,6CAA6C,GAAG,kCAAkC;;;ACDrF,MAAM,mBAAmB,GAAkC;IACzD,mBAAmB;IACnB,sBAAsB;IACtB,aAAa;IACb,UAAU;CACX,CAAC;AAEF;;AAEG;AACU,MAAA,sCAAsC,GAAG,CAAC,OAA8B,KACnF,mBAAmB,CAAC,MAAM,CAAC,CAAwC,GAAoC,EAAE,GAAM,KAAI;AACjH,IAAA,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE;QAChB,GAAG,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;AACzB,KAAA;AACD,IAAA,OAAO,GAAG,CAAC;AACb,CAAC,EAAmC,EAAE;;AClBxC;;AAEG;MACU,sCAAsC,GAAG,CAAC,QAAgC,MAAsC;IAC3H,iBAAiB,EAAE,QAAQ,CAAC,iBAAiB;IAC7C,oBAAoB,EAAE,QAAQ,CAAC,oBAAoB;IACnD,WAAW,EAAE,QAAQ,CAAC,WAAW;IACjC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;AAC5B,CAAA;;ACRD;;AAEG;MACU,2BAA2B,GAAG,CAAgD,GAAQ,KACjG,eAAe,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE;;ACPrC;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-core.mjs","sources":["../../../libs/core/src/utils/long-arithmetic.ts","../../../libs/core/src/utils/range.ts","../../../libs/core/src/utils/shuffle.ts","../../../libs/core/src/utils/random-subset.ts","../../../libs/core/src/utils/random-slice.ts","../../../libs/core/src/utils/array-to-dict.ts","../../../libs/core/src/utils/sample.ts","../../../libs/core/src/utils/unique.ts","../../../libs/core/src/errors/inheritable-error.ts","../../../libs/core/src/errors/is-error.ts","../../../libs/core/src/storage/error/error.ts","../../../libs/core/src/storage/error/error.service.ts","../../../libs/core/src/storage/server-error/server-error.ts","../../../libs/core/src/storage/server-error/server-error.service.ts","../../../libs/core/src/storage/localstorage/localstorage.service.ts","../../../libs/core/src/storage/noopstorage/noopstorage.service.ts","../../../libs/core/src/storage/persistence.interface.ts","../../../libs/core/src/storage/persistence-server-safe.token.ts","../../../libs/core/src/operators/backoff.pipe.ts","../../../libs/core/src/base64/server/server.service.ts","../../../libs/core/src/base64/browser/browser.service.ts","../../../libs/core/src/base64/base64.interface.ts","../../../libs/core/src/collection/sortable.ts","../../../libs/core/src/collection/page-out-of-bounds.error.ts","../../../libs/core/src/collection/error-map.ts","../../../libs/core/src/collection/build-metadata.ts","../../../libs/core/src/collection/build-request.ts","../../../libs/core/src/identifiable/array-to-dict.ts","../../../libs/core/src/daffodil-core.ts"],"sourcesContent":["/**\n * A helper function to get the number of decimal significant figures of a number.\n * This function will fail if the given number has more than 16 significant figures or\n * the value of the number is greater than 10^11\n *\n * @param number\n */\nfunction daffPrecision(number: number): number {\n let p = 10000;\n if(number === undefined || number === null) {\n return p;\n }\n while (Math.round(number * p) / p !== number) {\n p *= 10;\n }\n return p;\n}\n\n/**\n * A function to add long numbers accurately with conversions and integer math.\n * This function only guarantees correct answers when the numbers given and the result are less than\n * 16 significant figures and less than 10^11\n *\n * @param numbers\n */\nexport function daffAdd(...numbers: number[]): number {\n if(numbers.length < 2) {\n throw new Error('Provide at least 2 numbers for daffAdd.');\n }\n const precision = Math.max(...numbers.map(daffPrecision));\n return numbers.reduce((acc, number) => acc + Math.round(number*precision), 0) / precision;\n}\n\n/**\n * A function to subtract long numbers accurately with conversions and integer math.\n * This function only guarantees correct answers when the numbers given and the result are each less than\n * 16 significant figures and less than 10^11\n *\n * @param numbers\n */\nexport function daffSubtract(...numbers: number[]): number {\n if(numbers.length < 2) {\n throw new Error('Provide at least 2 numbers for daffSubtract.');\n }\n const precision = Math.max(...numbers.map(daffPrecision));\n return numbers.slice(1).reduce(\n (acc, number) => acc - Math.round(number*precision),\n Math.round(numbers[0]*precision),\n ) / precision;\n}\n\n/**\n * A function to multiply long numbers accurately with conversions and integer math.\n * This function only guarantees correct answers when the numbers given and the result are each less than 16 significant figures\n * and less than 10^11\n *\n * @param numbers\n */\nexport function daffMultiply(...numbers: number[]): number {\n if(numbers.length < 2) {\n throw new Error('Provide at least 2 numbers for daffMultiply.');\n }\n const precision = Math.max(...numbers.map(daffPrecision));\n return numbers.reduce(\n (acc, number) => acc * Math.round(number*precision),\n 1,\n ) / Math.pow(precision, numbers.length);\n}\n\n/**\n * A function to divide long numbers accurately with conversions and integer math.\n * This function only guarantees correct answers when the numbers given and the result are each less than 16 significant figures\n * and less than 10^11\n *\n * Returns NaN when attempting to use NaN as an input.\n * Returns NaN when attempting to divide by 0 or null.\n *\n * @param numbers\n */\nexport function daffDivide(...numbers: number[]): number {\n if(numbers.length < 2) {\n throw new Error('Provide at least 2 numbers for daffDivide.');\n }\n // TODO(griest024): use better condition after IE support is dropped\n const illegalOperation = numbers.filter(isNaN).length > 0\n || numbers.slice(1).filter(n => n === 0 || n === null).length > 0;\n if (illegalOperation) {\n return NaN;\n }\n const precision = Math.max(...numbers.map(daffPrecision));\n return numbers.slice(1).reduce(\n (acc, number) => acc / Math.round(number*precision),\n Math.round(numbers[0]*precision),\n ) * Math.pow(precision, numbers.length - 2);\n}\n","/**\n * Range\n *\n * Range accepts two inputs, a `start` and an `end`\n * and returns an array filled with numbers from\n * `start` to `end`.\n *\n * @param start\n * @param end\n * @returns number\n */\nexport const range = (start: number, end: number): Array<number> =>\n Array.apply(null, Array(end - start + 1)).map((val, index) => index + start);\n\n","/**\n * Immutable Fisher-Yates Shuffle\n * https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle\n */\nexport const shuffle = <T>(array: T[]): T[] => {\n const result = [];\n array.forEach((el, i) => {\n const s = Math.floor(Math.random() * i);\n if( s !== i ){\n result[i] = result[s];\n }\n result[s] = el;\n });\n return result;\n};\n","import { shuffle } from './shuffle';\n\n/**\n * Returns a random subset of an array in a random order.\n *\n * @param array\n * @param length\n */\nexport const randomSubset = <T>(array: T[], length?: number): T[] => {\n if(length > array.length){\n throw new Error('Requested length is longer than array length.');\n }\n length = length ? length : Math.floor(Math.random() * array.length);\n return shuffle(array).slice(0, length);\n};\n","/**\n * Returns a random slice of an array.\n * An optional length may be specified.\n *\n * @param array\n */\nexport const randomSlice = <T>(array: T[], length?: number): T[] => {\n if(array.length === 0) {\n return [];\n };\n if(length > array.length) {\n throw new Error('Requested length is longer than array length.');\n }\n const arrayLength = length || Math.floor(Math.random() * array.length);\n const start = Math.floor(Math.random() * (array.length - arrayLength + 1));\n const end = start + arrayLength;\n return array.slice(start, end);\n};\n","type Dictionary = Record<string | number | symbol, any>;\n\n/**\n * Converts an array into a dictionary.\n * Dictionary values are keyed by the return of the specified `getKey`.\n */\nexport const daffArrayToDict = <T extends Dictionary>(array: T[], getKey: (val: T) => keyof Dictionary): Record<keyof Dictionary, T> =>\n array.reduce(\n (dict, val) => {\n dict[getKey(val)] = val;\n return dict;\n },\n {},\n );\n","import { randomSlice } from './random-slice';\n\n/**\n * Returns a random element of an array.\n */\nexport const sample = <T>(array: T[]): T => randomSlice(array, 1)[0];\n","/**\n * Filters an array of elements, removing duplicates.\n * Does not guarantee order of filtered elements.\n *\n * An optional comparator function may be passed for arbitrary comparison behavior.\n * The default is a strict equality comparison: `a === b`.\n */\nexport const unique = <T>(array: T[], comparator: (a: T, b: T) => boolean = (a, b) => a === b): T[] =>\n array.filter((a, index) => array.slice(index + 1).filter(b => comparator(a, b)).length === 0);\n","/**\n * A class which allows you to appropriately check the inheritance of an error.\n *\n * In typescript, when you try to extend an error with a specialized error class,\n * if you try to call something like:\n *\n * ```ts\n * class MyError extends Error {}\n *\n * let myError = new MyError();\n *\n * myError instanceof MyError; // returns false\n * ```\n *\n * You will see unexpected things. This class fixes that issue as described here\n * https://github.com/microsoft/TypeScript/issues/13965\n */\nexport class DaffInheritableError extends Error {\n __proto__: Error;\n\n recoverable = false;\n\n constructor(message?: string) {\n\t super(message);\n\t const trueProto = new.target.prototype;\n\n\t Object.setPrototypeOf(this, trueProto);\n }\n}\n","import { DaffError } from './error.interface';\nimport { DaffInheritableError } from './inheritable-error';\n\n/**\n * Checks if the passed object is a {@link DaffError}\n */\nexport const daffIsError = (error: any): boolean =>\n error instanceof DaffInheritableError || !!(<DaffError>error).code;\n","import {\n DaffError,\n DaffInheritableError,\n} from '../../errors/public_api';\n\nexport class DaffStorageServiceError extends DaffInheritableError implements DaffError {\n public readonly code: string = 'DAFF_STORAGE_FAILURE';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffPersistenceService } from '../persistence.interface';\nimport { DaffStorageServiceError } from './error';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffErrorStorageService implements DaffPersistenceService {\n static readonly ERROR_MESSAGE = 'The DaffErrorStorageService always throws an error.';\n\n setItem(key: string, value: any): void {\n this.throwError();\n }\n\n getItem(key: string): any {\n this.throwError();\n }\n\n removeItem(key: string): any {\n this.throwError();\n }\n\n clear(){\n this.throwError();\n }\n\n private throwError() {\n throw new DaffStorageServiceError(DaffErrorStorageService.ERROR_MESSAGE);\n }\n}\n","import { DaffError } from '../../errors/public_api';\nimport { DaffStorageServiceError } from '../error/error';\n\n/**\n * An error thrown when there is an attempt to access storage on the server and none is available.\n */\nexport class DaffServerSideStorageError extends DaffStorageServiceError implements DaffError {\n public readonly code: string = 'DAFF_SERVER_STORAGE_FAILURE';\n\n constructor(public message: string) {\n super(message);\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffPersistenceService } from '../persistence.interface';\nimport { DaffServerSideStorageError } from './server-error';\n\n/**\n * A storage service meant to be loaded into SSR contexts.\n * It will always throw the {@link DaffServerSideStorageError}.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffServerErrorStorageService implements DaffPersistenceService {\n static readonly ERROR_MESSAGE = 'The DaffServerErrorStorageService always throws an error.';\n\n setItem(key: string, value: any): void {\n this.throwError();\n }\n\n getItem(key: string): any {\n this.throwError();\n }\n\n removeItem(key: string): any {\n this.throwError();\n }\n\n clear(){\n this.throwError();\n }\n\n private throwError() {\n throw new DaffServerSideStorageError(DaffServerErrorStorageService.ERROR_MESSAGE);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Injectable,\n Inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffPersistenceService } from '../persistence.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffLocalStorageService implements DaffPersistenceService {\n constructor(@Inject(PLATFORM_ID) platformId: string){\n if(!isPlatformBrowser(platformId)){\n throw new Error('The DaffLocalStorageService can only be instantiated in the browser.');\n }\n }\n\n /**\n * Persist the given item into local storage.\n */\n setItem(key: string, value: any): void {\n localStorage.setItem(key, value);\n }\n\n /**\n * Retrieve the given item from localstorage.\n */\n getItem(key: string): any {\n return localStorage.getItem(key);\n }\n\n /**\n * Remove a given item from localstorage\n */\n removeItem(key: string): any {\n localStorage.removeItem(key);\n }\n\n clear(){\n localStorage.clear();\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffPersistenceService } from '../persistence.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffNoopStorageService implements DaffPersistenceService {\n setItem(key: string, value: any): void {};\n getItem(key: string): any {};\n clear(): void {};\n removeItem(key: string): void {};\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n InjectionToken,\n inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffLocalStorageService } from './localstorage/localstorage.service';\nimport { DaffServerErrorStorageService } from './server-error/public_api';\n\nexport interface DaffPersistenceService {\n setItem(key: string, value: any): void;\n getItem(key: string): any;\n clear(): void;\n removeItem(key: string): void;\n}\n\nexport const DaffPersistenceServiceToken = new InjectionToken<DaffPersistenceService>('DaffPersistenceService', {\n providedIn: 'root',\n factory: () => isPlatformBrowser(inject<string>(PLATFORM_ID))\n ? new DaffLocalStorageService(inject<string>(PLATFORM_ID))\n : new DaffServerErrorStorageService(),\n});\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n InjectionToken,\n inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffNoopStorageService } from './noopstorage/noopstorage.service';\nimport {\n DaffPersistenceService,\n DaffPersistenceServiceToken,\n} from './persistence.interface';\n\n/**\n * Provides noop for the persistence service on the server.\n */\nexport const DaffServerSafePersistenceServiceToken = new InjectionToken<\nDaffPersistenceService\n>('DaffServerSafePersistenceService', {\n providedIn: 'root',\n factory: () =>\n isPlatformBrowser(inject<string>(PLATFORM_ID))\n ? inject<DaffPersistenceService>(DaffPersistenceServiceToken)\n : inject<DaffPersistenceService>(DaffNoopStorageService),\n});\n","import {\n pipe,\n timer,\n throwError,\n} from 'rxjs';\nimport {\n retryWhen,\n mergeMap,\n} from 'rxjs/operators';\n\n/**\n * Retries failed Observables\n *\n * @param maxTries The maximum number of tries the observable will be tried\n * @param ms The initial amount of time\n */\nexport function backoff(maxTries: number, ms: number) {\n return pipe(\n retryWhen(attempt => attempt.pipe(\n mergeMap((shadowedAttempt: Error, i) => {\n if(i >= maxTries) {\n return throwError(shadowedAttempt);\n }\n return timer(ms*Math.pow(2,i));\n }),\n )),\n );\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Inject,\n Injectable,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffBase64Service } from '../base64.interface';\n\ndeclare const Buffer;\n\n/**\n * A base64 service meant to be loaded into SSR contexts.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffServerBase64Service implements DaffBase64Service {\n constructor(@Inject(PLATFORM_ID) platformId: string){\n if (isPlatformBrowser(platformId)){\n throw new Error('The DaffBrowserBase64Service can only be instantiated on the server.');\n }\n }\n\n encode(str: string): string {\n return Buffer.from(str).toString('base64');\n }\n\n decode(str: string): string {\n return Buffer.from(str, 'base64').toString('ascii');\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n Injectable,\n Inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffBase64Service } from '../base64.interface';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffBrowserBase64Service implements DaffBase64Service {\n constructor(@Inject(PLATFORM_ID) platformId: string){\n if(!isPlatformBrowser(platformId)){\n throw new Error('The DaffBrowserBase64Service can only be instantiated in the browser.');\n }\n }\n\n encode(str: string): string {\n return btoa(str);\n }\n\n decode(str: string): string {\n return atob(str);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n InjectionToken,\n inject,\n PLATFORM_ID,\n} from '@angular/core';\n\nimport { DaffBrowserBase64Service } from './browser/browser.service';\nimport { DaffServerBase64Service } from './server/public_api';\n\n/**\n * A service for encoding and decoding base64 strings.\n */\nexport interface DaffBase64Service {\n /**\n * Encodes an ASCII string to base64.\n */\n encode(str: string): string;\n /**\n * Decodes a base64 string to ASCII.\n */\n decode(str: string): string;\n}\n\n/**\n * A token which creates a base64 service appropriate for the current environment, i.e., browser vs. server.\n */\nexport const DaffBase64ServiceToken = new InjectionToken<DaffBase64Service>('DaffBase64Service', {\n providedIn: 'root',\n factory: () => isPlatformBrowser(inject<string>(PLATFORM_ID))\n ? new DaffBrowserBase64Service(inject<string>(PLATFORM_ID))\n : new DaffServerBase64Service(inject<string>(PLATFORM_ID)),\n});\n","/**\n * The metadata that describes the sorting behavior of a collection of elements.\n */\nexport interface DaffSortOptions {\n default: DaffSortOption['value'];\n options: DaffSortOption[];\n}\n\n\n/**\n * One particular option used to sort a collection of elements;\n */\nexport interface DaffSortOption {\n label: string;\n value: any;\n}\n\n/**\n * The direction in which to sort a list of elements, e.g. if the list was\n * sorted alphabetically, \"Ascending\" would be from \"A-Z\",\n * and \"Descending\" would be from \"Z-A\".\n */\nexport enum DaffSortDirectionEnum {\n Ascending = 'ASC',\n Descending = 'DSC'\n}\n\n/**\n * Describes the properties of a collection that make the collection able to be\n * sorted by Daffodil.\n */\nexport interface DaffSortable {\n\n /**\n * The available options by which to sort the collection.\n */\n sortOptions: DaffSortOptions;\n\n /**\n * The currently applied sorting option.\n */\n appliedSortOption: DaffSortOption['value'];\n\n /**\n * The currently applied sort direction.\n */\n appliedSortDirection: DaffSortDirectionEnum;\n}\n","import {\n DaffError,\n DaffInheritableError,\n} from '../errors/public_api';\n\nexport const DAFF_COLLECTION_PAGE_OUT_OF_BOUNDS_ERROR_CODE = 'DAFF_COLLECTION_PAGE_OUT_OF_BOUNDS';\n\n/**\n * An error thrown when the requested page is greater than the number of available pages.\n */\nexport class DaffCollectionPageOutOfBoundsError extends DaffInheritableError implements DaffError {\n public readonly code: string = DAFF_COLLECTION_PAGE_OUT_OF_BOUNDS_ERROR_CODE;\n\n constructor(message?: string) {\n\t super(message);\n }\n}\n","import {\n DaffCollectionPageOutOfBoundsError,\n DAFF_COLLECTION_PAGE_OUT_OF_BOUNDS_ERROR_CODE,\n} from './page-out-of-bounds.error';\n\nexport const daffCollectionErrorMap = {\n [DAFF_COLLECTION_PAGE_OUT_OF_BOUNDS_ERROR_CODE]: DaffCollectionPageOutOfBoundsError,\n};\n","import { DaffCollectionMetadata } from './metadata.interface';\nimport { DaffCollectionRequest } from './request.interface';\n\ntype MetadataRequestIntersection = keyof DaffCollectionMetadata & keyof DaffCollectionRequest;\n\nconst allowedMetadataKeys: MetadataRequestIntersection[] = [\n 'appliedSortOption',\n 'appliedSortDirection',\n 'currentPage',\n 'pageSize',\n];\n\n/**\n * Extracts the part of the {@link DaffCollectionRequest} that can be directly set in {@link DaffCollectionMetadata}.\n */\nexport const daffCollectionBuildMetadataFromRequest = (request: DaffCollectionRequest): Partial<DaffCollectionMetadata> =>\n allowedMetadataKeys.reduce(<K extends MetadataRequestIntersection>(acc: Partial<DaffCollectionMetadata>, key: K) => {\n if (request[key]) {\n acc[key] = request[key];\n }\n return acc;\n }, <Partial<DaffCollectionMetadata>>{});\n","import { DaffCollectionMetadata } from './metadata.interface';\nimport { DaffCollectionRequest } from './request.interface';\n\n/**\n * Builds a {@link DaffCollectionRequest} from {@link DaffCollectionMetadata}.\n */\nexport const daffCollectionBuildRequestFromMetadata = (metadata: DaffCollectionMetadata): Partial<DaffCollectionRequest> => ({\n appliedSortOption: metadata.appliedSortOption,\n appliedSortDirection: metadata.appliedSortDirection,\n currentPage: metadata.currentPage,\n pageSize: metadata.pageSize,\n});\n","import { daffArrayToDict } from '../utils/public_api';\nimport { DaffIdentifiable } from './identifiable.interface';\n\n/**\n * Transforms an array of {@link DaffIdentifiable} objects to a dictionary of those objects keyed by ID.\n */\nexport const daffIdentifiableArrayToDict = <T extends DaffIdentifiable = DaffIdentifiable>(ary: T[]): Record<T['id'], T> =>\n daffArrayToDict(ary, ({ id }) => id);\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;;;;AAMG;AACH,SAAS,aAAa,CAAC,MAAc,EAAA;IACnC,IAAI,CAAC,GAAG,KAAK,CAAC;AACd,IAAA,IAAG,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,EAAE;AAC1C,QAAA,OAAO,CAAC,CAAC;AACV,KAAA;AACD,IAAA,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,MAAM,EAAE;QAC5C,CAAC,IAAI,EAAE,CAAC;AACT,KAAA;AACD,IAAA,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;;;;AAMG;AACa,SAAA,OAAO,CAAC,GAAG,OAAiB,EAAA;AAC1C,IAAA,IAAG,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;AACrB,QAAA,MAA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G,OAAO,CAAC,GAAG,CAAC,CAAC;AACzB,KAAA;AACD,IAAA,OAAO,GAAG,CAAC;AACb,CAAC,EAAmC,EAAE;;AClBxC;;AAEG;MACU,sCAAsC,GAAG,CAAC,QAAgC,MAAsC;IAC3H,iBAAiB,EAAE,QAAQ,CAAC,iBAAiB;IAC7C,oBAAoB,EAAE,QAAQ,CAAC,oBAAoB;IACnD,WAAW,EAAE,QAAQ,CAAC,WAAW;IACjC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;AAC5B,CAAA;;ACRD;;AAEG;MACU,2BAA2B,GAAG,CAAgD,GAAQ,KACjG,eAAe,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE;;ACPrC;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daffodil/core",
3
- "version": "0.44.0",
3
+ "version": "0.45.1",
4
4
  "description": "Interfaces built for daffodil/state",
5
5
  "repository": {
6
6
  "type": "git",