@daffodil/core 0.88.1 → 0.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/external-script/index.d.ts +95 -1
- package/external-script/testing/index.d.ts +44 -1
- package/fesm2022/daffodil-core-external-script-testing.mjs +3 -3
- package/fesm2022/daffodil-core-external-script-testing.mjs.map +1 -1
- package/fesm2022/daffodil-core-external-script.mjs +4 -5
- package/fesm2022/daffodil-core-external-script.mjs.map +1 -1
- package/fesm2022/daffodil-core-graphql.mjs +3 -3
- package/fesm2022/daffodil-core-graphql.mjs.map +1 -1
- package/fesm2022/daffodil-core-routing.mjs +3 -3
- package/fesm2022/daffodil-core-routing.mjs.map +1 -1
- package/fesm2022/daffodil-core-state-testing.mjs +6 -6
- package/fesm2022/daffodil-core-state-testing.mjs.map +1 -1
- package/fesm2022/daffodil-core-state.mjs +2 -0
- package/fesm2022/daffodil-core-state.mjs.map +1 -1
- package/fesm2022/daffodil-core-testing.mjs +67 -67
- package/fesm2022/daffodil-core-testing.mjs.map +1 -1
- package/fesm2022/daffodil-core.mjs +51 -21
- package/fesm2022/daffodil-core.mjs.map +1 -1
- package/graphql/index.d.ts +64 -1
- package/index.d.ts +1305 -1
- package/package.json +1 -1
- package/routing/index.d.ts +86 -1
- package/state/index.d.ts +649 -1
- package/state/testing/index.d.ts +46 -1
- package/testing/index.d.ts +363 -1
- package/async/maybe.type.d.ts +0 -2
- package/base64/base64.interface.d.ts +0 -14
- package/base64/browser/browser.service.d.ts +0 -12
- package/base64/public_api.d.ts +0 -3
- package/base64/server/public_api.d.ts +0 -1
- package/base64/server/server.service.d.ts +0 -14
- package/canonically-locateable/canonically-locateable.interface.d.ts +0 -9
- package/collection/build-metadata.d.ts +0 -6
- package/collection/build-request.d.ts +0 -6
- package/collection/collection.interface.d.ts +0 -16
- package/collection/countable.interface.d.ts +0 -9
- package/collection/error-map.d.ts +0 -4
- package/collection/metadata.interface.d.ts +0 -12
- package/collection/page-out-of-bounds.error.d.ts +0 -9
- package/collection/paginable.d.ts +0 -10
- package/collection/public_api.d.ts +0 -10
- package/collection/request.interface.d.ts +0 -27
- package/collection/sortable.d.ts +0 -41
- package/constructable/constructable.d.ts +0 -24
- package/decorators/debounce.decorator.d.ts +0 -47
- package/decorators/public_api.d.ts +0 -1
- package/errors/error-map.d.ts +0 -8
- package/errors/error.interface.d.ts +0 -17
- package/errors/inheritable-error.d.ts +0 -22
- package/errors/is-error.d.ts +0 -4
- package/errors/public_api.d.ts +0 -4
- package/external-script/external-script.service.d.ts +0 -50
- package/external-script/interface.d.ts +0 -11
- package/external-script/public_api.d.ts +0 -3
- package/external-script/script.d.ts +0 -32
- package/external-script/testing/constants.d.ts +0 -4
- package/external-script/testing/external-script.service.d.ts +0 -37
- package/external-script/testing/public_api.d.ts +0 -2
- package/filterable/filter-base.d.ts +0 -24
- package/filterable/filter-option-base.d.ts +0 -9
- package/filterable/filter-option.d.ts +0 -6
- package/filterable/filter-request.d.ts +0 -7
- package/filterable/filter-toggle-request.d.ts +0 -6
- package/filterable/filter.d.ts +0 -9
- package/filterable/filterable.d.ts +0 -10
- package/filterable/filters.type.d.ts +0 -5
- package/filterable/public_api.d.ts +0 -12
- package/filterable/type/equal/filter.d.ts +0 -24
- package/filterable/type/equal/option.d.ts +0 -19
- package/filterable/type/equal/public_api.d.ts +0 -4
- package/filterable/type/equal/request.d.ts +0 -18
- package/filterable/type/equal/toggle-request.d.ts +0 -18
- package/filterable/type/filter-type.d.ts +0 -7
- package/filterable/type/range/filter-base.d.ts +0 -23
- package/filterable/type/range/option.d.ts +0 -14
- package/filterable/type/range/pair.d.ts +0 -20
- package/filterable/type/range/public_api.d.ts +0 -6
- package/filterable/type/range/request-base.d.ts +0 -20
- package/filterable/type/range/request-option.d.ts +0 -14
- package/filterable/type/range/separator.d.ts +0 -5
- package/filterable/type/range-numeric/filter.d.ts +0 -11
- package/filterable/type/range-numeric/public_api.d.ts +0 -3
- package/filterable/type/range-numeric/request.d.ts +0 -11
- package/filterable/type/range-numeric/toggle-request.d.ts +0 -12
- package/filters/array-to-dict/array-to-dict.d.ts +0 -5
- package/filters/behaviors/apply/apply-filter.d.ts +0 -8
- package/filters/behaviors/apply/apply-request-to-filters.d.ts +0 -8
- package/filters/behaviors/apply/apply-requests-to-filters.d.ts +0 -8
- package/filters/behaviors/apply/public_api.d.ts +0 -3
- package/filters/behaviors/clear/clear-filter.d.ts +0 -8
- package/filters/behaviors/clear/clear-filters.d.ts +0 -8
- package/filters/behaviors/clear/public_api.d.ts +0 -2
- package/filters/behaviors/remove/public_api.d.ts +0 -3
- package/filters/behaviors/remove/remove-filter.d.ts +0 -9
- package/filters/behaviors/remove/remove-request-from-filters.d.ts +0 -8
- package/filters/behaviors/remove/remove-requests-from-filters.d.ts +0 -9
- package/filters/behaviors/toggle/public_api.d.ts +0 -2
- package/filters/behaviors/toggle/toggle-request-on-filters.d.ts +0 -6
- package/filters/behaviors/toggle/toggle.d.ts +0 -6
- package/filters/compute-applied-filters/compute-applied-filters.d.ts +0 -6
- package/filters/errors/codes.enum.d.ts +0 -9
- package/filters/errors/filter-not-found.error.d.ts +0 -8
- package/filters/errors/public_api.d.ts +0 -4
- package/filters/errors/request-name-mismatch.error.d.ts +0 -9
- package/filters/errors/request-type-mismatch.error.d.ts +0 -9
- package/filters/errors/unknown-filter-type.error.d.ts +0 -9
- package/filters/find-applied/find-applied-options.d.ts +0 -5
- package/filters/find-applied/public_api.d.ts +0 -1
- package/filters/is-applied/is-filter-applied.d.ts +0 -5
- package/filters/is-applied/is-toggle-request-applied-to-filter.d.ts +0 -5
- package/filters/is-applied/public_api.d.ts +0 -2
- package/filters/public_api.d.ts +0 -13
- package/filters/to-request/filter-to-request.d.ts +0 -6
- package/filters/to-request/filters-to-requests.d.ts +0 -6
- package/filters/to-request/public_api.d.ts +0 -2
- package/filters/type/equal/array-to-dict/option.d.ts +0 -5
- package/filters/type/equal/behaviors/apply/apply.d.ts +0 -8
- package/filters/type/equal/behaviors/clear/clear.d.ts +0 -8
- package/filters/type/equal/behaviors/remove/remove.d.ts +0 -11
- package/filters/type/equal/behaviors/toggle/toggle.d.ts +0 -11
- package/filters/type/equal/is-applied/is-applied.d.ts +0 -5
- package/filters/type/equal/is-applied/is-toggle-request-applied-to-filter.d.ts +0 -5
- package/filters/type/equal/public_api.d.ts +0 -1
- package/filters/type/equal/to-request/filter-to-request.d.ts +0 -5
- package/filters/type/range/array-to-dict/pair.d.ts +0 -5
- package/filters/type/range/behaviors/apply/apply.d.ts +0 -8
- package/filters/type/range/behaviors/clear/clear.d.ts +0 -8
- package/filters/type/range/behaviors/remove/remove.d.ts +0 -11
- package/filters/type/range/behaviors/toggle/toggle.d.ts +0 -10
- package/filters/type/range/compute-pair-label.d.ts +0 -1
- package/filters/type/range/is-applied/is-applied.d.ts +0 -5
- package/filters/type/range/is-applied/is-toggle-request-applied-to-filter.d.ts +0 -5
- package/filters/type/range/public_api.d.ts +0 -2
- package/filters/type/range/to-request/filter-to-request.d.ts +0 -5
- package/filters/type/range-numeric/to-request/filter-to-request.d.ts +0 -5
- package/filters/validators/public_api.d.ts +0 -2
- package/filters/validators/request-name-match.d.ts +0 -7
- package/filters/validators/request-type-match.d.ts +0 -7
- package/graphql/apollo/cacheable-operations/cacheable-operations-link.interface.d.ts +0 -4
- package/graphql/apollo/public_api.d.ts +0 -3
- package/graphql/apollo/queued-apollo/queued-apollo.service.d.ts +0 -29
- package/graphql/apollo/validator/type.d.ts +0 -8
- package/graphql/fragments/build-fragment-definition.d.ts +0 -8
- package/graphql/fragments/build-fragment-name-spread.d.ts +0 -11
- package/graphql/fragments/public_api.d.ts +0 -2
- package/graphql/public_api.d.ts +0 -2
- package/identifiable/array-to-dict.d.ts +0 -5
- package/identifiable/identifiable.interface.d.ts +0 -10
- package/identifiable/public_api.d.ts +0 -2
- package/injection-tokens/config.factory.d.ts +0 -9
- package/injection-tokens/config.type.d.ts +0 -18
- package/injection-tokens/multi.factory.d.ts +0 -8
- package/injection-tokens/multi.type.d.ts +0 -15
- package/injection-tokens/public_api.d.ts +0 -10
- package/injection-tokens/services.factory.d.ts +0 -8
- package/injection-tokens/services.type.d.ts +0 -15
- package/injection-tokens/single.factory.d.ts +0 -8
- package/injection-tokens/single.type.d.ts +0 -14
- package/injection-tokens/singleton.factory.d.ts +0 -8
- package/injection-tokens/singleton.type.d.ts +0 -15
- package/injection-tokens/token-constuctor-params.type.d.ts +0 -3
- package/kindable/kindable.interface.d.ts +0 -9
- package/kindable/public_api.d.ts +0 -1
- package/locateable/locateable.interface.d.ts +0 -10
- package/merge/merge.d.ts +0 -64
- package/merge/mergers/array-concat.d.ts +0 -1
- package/merge/mergers/dict-assign.d.ts +0 -1
- package/merge/mergers/public_api.d.ts +0 -3
- package/merge/mergers/type.d.ts +0 -4
- package/merge/public_api.d.ts +0 -3
- package/merge/strategy.type.d.ts +0 -8
- package/operators/all-of.pipe.d.ts +0 -6
- package/operators/any-of.pipe.d.ts +0 -6
- package/operators/backoff.pipe.d.ts +0 -7
- package/operators/catch-and-arrayify-errors.pipe.d.ts +0 -6
- package/operators/public_api.d.ts +0 -4
- package/orderable/orderable.d.ts +0 -9
- package/public_api.d.ts +0 -20
- package/routing/public_api.d.ts +0 -2
- package/routing/query-param-filter/public_api.d.ts +0 -2
- package/routing/query-param-filter/request-builder/equal.d.ts +0 -6
- package/routing/query-param-filter/request-builder/public_api.d.ts +0 -2
- package/routing/query-param-filter/request-builder/type.d.ts +0 -6
- package/routing/query-param-filter/type.d.ts +0 -16
- package/routing/uri/normalizer.service.d.ts +0 -22
- package/routing/uri/public_api.d.ts +0 -2
- package/routing/uri/truncation/file-extension.d.ts +0 -9
- package/routing/uri/truncation/leading-path-segments.d.ts +0 -5
- package/routing/uri/truncation/leading-slash.d.ts +0 -11
- package/routing/uri/truncation/public_api.d.ts +0 -4
- package/routing/uri/truncation/query-fragment.d.ts +0 -5
- package/state/actions/failure.type.d.ts +0 -13
- package/state/actions/public_api.d.ts +0 -1
- package/state/collection/actions.d.ts +0 -73
- package/state/collection/adapter.class.d.ts +0 -35
- package/state/collection/facade.d.ts +0 -34
- package/state/collection/facade.interface.d.ts +0 -54
- package/state/collection/initial-state.d.ts +0 -2
- package/state/collection/public_api.d.ts +0 -6
- package/state/collection/selector-factory.d.ts +0 -62
- package/state/errors/errorable.type.d.ts +0 -7
- package/state/errors/public_api.d.ts +0 -3
- package/state/errors/state-error.interface.d.ts +0 -18
- package/state/errors/transform-error-to-state-error.d.ts +0 -7
- package/state/operation/adapter.d.ts +0 -24
- package/state/operation/entity/adapter.d.ts +0 -84
- package/state/operation/entity/helpers/create-fake-id.d.ts +0 -7
- package/state/operation/entity/public_api.d.ts +0 -5
- package/state/operation/entity/selectors.d.ts +0 -24
- package/state/operation/entity/state.type.d.ts +0 -8
- package/state/operation/entity/type.d.ts +0 -15
- package/state/operation/facade.type.d.ts +0 -34
- package/state/operation/public_api.d.ts +0 -5
- package/state/operation/selectors.d.ts +0 -38
- package/state/operation/state.d.ts +0 -9
- package/state/operators/public_api.d.ts +0 -1
- package/state/operators/substream.pipe.d.ts +0 -26
- package/state/public_api.d.ts +0 -8
- package/state/reducers/create-meta.d.ts +0 -5
- package/state/reducers/identity.d.ts +0 -6
- package/state/reducers/public_api.d.ts +0 -2
- package/state/states/helpers.d.ts +0 -9
- package/state/states/loading.d.ts +0 -5
- package/state/states/mutable-loading.d.ts +0 -6
- package/state/states/public_api.d.ts +0 -5
- package/state/states/state.enum.d.ts +0 -48
- package/state/states/stateable.interface.d.ts +0 -8
- package/state/store/facade.d.ts +0 -3
- package/state/testing/mock-collection-facade.d.ts +0 -26
- package/state/testing/mock-operation-facade.d.ts +0 -20
- package/state/testing/public_api.d.ts +0 -2
- package/storage/error/error.d.ts +0 -7
- package/storage/error/error.service.d.ts +0 -15
- package/storage/error/public_api.d.ts +0 -2
- package/storage/localstorage/localstorage.service.d.ts +0 -23
- package/storage/noopstorage/noopstorage.service.d.ts +0 -13
- package/storage/persistence-server-safe.token.d.ts +0 -2
- package/storage/persistence.interface.d.ts +0 -7
- package/storage/public_api.d.ts +0 -6
- package/storage/server-error/public_api.d.ts +0 -2
- package/storage/server-error/server-error.d.ts +0 -11
- package/storage/server-error/server-error.service.d.ts +0 -18
- package/testing/angular/mocks/pipes/currency.d.ts +0 -13
- package/testing/factories/collection/metadata.factory.d.ts +0 -29
- package/testing/factories/collection/mock-collection.class.d.ts +0 -18
- package/testing/factories/collection/numerically-paginable.factory.d.ts +0 -8
- package/testing/factories/collection/public_api.d.ts +0 -7
- package/testing/factories/collection/request.factory.d.ts +0 -25
- package/testing/factories/collection/sort-option.factory.d.ts +0 -8
- package/testing/factories/collection/sort-options.factory.d.ts +0 -9
- package/testing/factories/collection/sortable.factory.d.ts +0 -9
- package/testing/factories/factory.d.ts +0 -42
- package/testing/factories/factory.interface.d.ts +0 -4
- package/testing/factories/filters/filter.factory.d.ts +0 -18
- package/testing/factories/filters/public_api.d.ts +0 -4
- package/testing/factories/filters/request.factory.d.ts +0 -13
- package/testing/factories/filters/toggle-request.d.ts +0 -18
- package/testing/factories/filters/type/equal/option.d.ts +0 -17
- package/testing/factories/filters/type/equal/public_api.d.ts +0 -3
- package/testing/factories/filters/type/equal/request.d.ts +0 -16
- package/testing/factories/filters/type/equal/toggle-request.d.ts +0 -16
- package/testing/factories/filters/type/equal.d.ts +0 -17
- package/testing/factories/filters/type/public_api.d.ts +0 -4
- package/testing/factories/filters/type/range-numeric/option.d.ts +0 -15
- package/testing/factories/filters/type/range-numeric/pair.d.ts +0 -23
- package/testing/factories/filters/type/range-numeric/public_api.d.ts +0 -5
- package/testing/factories/filters/type/range-numeric/request-option.d.ts +0 -15
- package/testing/factories/filters/type/range-numeric/request.d.ts +0 -23
- package/testing/factories/filters/type/range-numeric/toggle-request.d.ts +0 -20
- package/testing/factories/filters/type/range-numeric.d.ts +0 -19
- package/testing/factories/identifiable.factory.d.ts +0 -11
- package/testing/factories/public_api.d.ts +0 -5
- package/testing/public_api.d.ts +0 -4
- package/testing/testing.module.d.ts +0 -7
- package/testing/unique/enforce.d.ts +0 -7
- package/types/html.type.d.ts +0 -5
- package/types/id.type.d.ts +0 -1
- package/types/public_api.d.ts +0 -2
- package/utils/array-to-dict.d.ts +0 -7
- package/utils/collect.d.ts +0 -6
- package/utils/identity.d.ts +0 -5
- package/utils/long-arithmetic.d.ts +0 -43
- package/utils/observe.d.ts +0 -9
- package/utils/public_api.d.ts +0 -16
- package/utils/random-slice.d.ts +0 -7
- package/utils/random-subset.d.ts +0 -7
- package/utils/range.d.ts +0 -12
- package/utils/sample.d.ts +0 -4
- package/utils/shallow-compare.d.ts +0 -6
- package/utils/shuffle.d.ts +0 -5
- package/utils/unique.d.ts +0 -8
- package/validator/field-presence.d.ts +0 -6
- package/validator/public_api.d.ts +0 -1
|
@@ -1 +1,95 @@
|
|
|
1
|
-
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Represents the structure of an external script that can be loaded into a document.
|
|
6
|
+
*
|
|
7
|
+
* @example Using DaffExternalScript interface to define an external script object
|
|
8
|
+
* ```ts
|
|
9
|
+
* const externalScript: DaffExternalScript = {
|
|
10
|
+
* src: 'https://example.com/script.js',
|
|
11
|
+
* async: true,
|
|
12
|
+
* defer: false,
|
|
13
|
+
* 'data-custom-attribute': 'value',
|
|
14
|
+
* };
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
interface DaffExternalScript {
|
|
18
|
+
/** The source URL of the script. */
|
|
19
|
+
src: string;
|
|
20
|
+
/**
|
|
21
|
+
* Optional. Indicates whether the script should be loaded asynchronously.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
async?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Optional. Indicates whether the script should be deferred in loading.
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
defer?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Optional. Custom attributes for the script.
|
|
32
|
+
* The keys must start with 'data-' followed by any string.
|
|
33
|
+
*/
|
|
34
|
+
[key: `data-${string}`]: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface DaffExternalScriptServiceInterface {
|
|
38
|
+
/**
|
|
39
|
+
* Load a script into the document.
|
|
40
|
+
* @param name The name of the script.
|
|
41
|
+
* @param script The script object containing details like src, async, defer, and custom attributes.
|
|
42
|
+
* @returns An Observable that emits true when the script is loaded successfully, or emits an error if loading fails.
|
|
43
|
+
*/
|
|
44
|
+
load(name: string, script: DaffExternalScript): Observable<boolean>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface LoadedExternalScript extends DaffExternalScript {
|
|
48
|
+
ready: boolean | undefined;
|
|
49
|
+
subject: Observable<boolean>;
|
|
50
|
+
el: HTMLElement | undefined;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A service for loading external scripts into the document.
|
|
54
|
+
*
|
|
55
|
+
* ### Usage example
|
|
56
|
+
*
|
|
57
|
+
* @example Loading an external script into the document
|
|
58
|
+
*
|
|
59
|
+
* ```ts
|
|
60
|
+
* import { DOCUMENT } from '@angular/common';
|
|
61
|
+
* import { inject } from '@angular/core';
|
|
62
|
+
*
|
|
63
|
+
* import { DaffExternalScriptService } from '@daffodil/core/external-script';
|
|
64
|
+
*
|
|
65
|
+
* const externalScriptService = new DaffExternalScriptService(inject(DOCUMENT));
|
|
66
|
+
*
|
|
67
|
+
* externalScriptService.load('exampleScript', {
|
|
68
|
+
* src: 'https://example.com/script.js',
|
|
69
|
+
* async: true,
|
|
70
|
+
* defer: false,
|
|
71
|
+
* 'data-custom-attribute': 'value',
|
|
72
|
+
* }).subscribe({
|
|
73
|
+
* next: (result) => {
|
|
74
|
+
* console.log('Script loaded successfully:', result);
|
|
75
|
+
* },
|
|
76
|
+
* error: (error) => {
|
|
77
|
+
* console.error('Error loading script:', error);
|
|
78
|
+
* },
|
|
79
|
+
* });
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
declare class DaffExternalScriptService implements DaffExternalScriptServiceInterface {
|
|
83
|
+
readonly scriptMap: Map<string, LoadedExternalScript>;
|
|
84
|
+
private doc;
|
|
85
|
+
constructor(doc: any);
|
|
86
|
+
/**
|
|
87
|
+
* @inheritdoc
|
|
88
|
+
*/
|
|
89
|
+
load(name: string, script: DaffExternalScript): Observable<boolean>;
|
|
90
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffExternalScriptService, never>;
|
|
91
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffExternalScriptService>;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { DaffExternalScriptService };
|
|
95
|
+
export type { DaffExternalScript, DaffExternalScriptServiceInterface };
|
|
@@ -1 +1,44 @@
|
|
|
1
|
-
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { DaffExternalScriptServiceInterface, DaffExternalScript } from '@daffodil/core/external-script';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A service for loading external scripts into the document.
|
|
7
|
+
*
|
|
8
|
+
* @example Loading an external script into the document
|
|
9
|
+
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { DaffExternalScriptTestingService } from '@daffodil/core/external-script/testing';
|
|
12
|
+
*
|
|
13
|
+
* const externalScriptService = new DaffExternalScriptTestingService();
|
|
14
|
+
*
|
|
15
|
+
* externalScriptService.load(TestScripts.SUCCESS, {
|
|
16
|
+
* src: 'https://example.com/script.js',
|
|
17
|
+
* async: true,
|
|
18
|
+
* defer: false,
|
|
19
|
+
* 'data-custom-attribute': 'value',
|
|
20
|
+
* }).subscribe({
|
|
21
|
+
* next: (result) => {
|
|
22
|
+
* console.log('Script loaded successfully:', result);
|
|
23
|
+
* },
|
|
24
|
+
* error: (error) => {
|
|
25
|
+
* console.error('Error loading script:', error);
|
|
26
|
+
* },
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
declare class DaffExternalScriptTestingService implements DaffExternalScriptServiceInterface {
|
|
31
|
+
/**
|
|
32
|
+
* @inheritdoc
|
|
33
|
+
*/
|
|
34
|
+
load(name: string, script: DaffExternalScript): Observable<boolean>;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffExternalScriptTestingService, never>;
|
|
36
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffExternalScriptTestingService>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare const enum TestScripts {
|
|
40
|
+
SUCCESS = "0",
|
|
41
|
+
FAILURE = "1"
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { DaffExternalScriptTestingService, TestScripts };
|
|
@@ -39,10 +39,10 @@ class DaffExternalScriptTestingService {
|
|
|
39
39
|
return throwError(() => new Error(`Failed to load ${script.src}`));
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
43
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
42
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffExternalScriptTestingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
43
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffExternalScriptTestingService, providedIn: 'root' }); }
|
|
44
44
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffExternalScriptTestingService, decorators: [{
|
|
46
46
|
type: Injectable,
|
|
47
47
|
args: [{
|
|
48
48
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-core-external-script-testing.mjs","sources":["../../../libs/core/external-script/testing/src/external-script.service.ts","../../../libs/core/external-script/testing/src/daffodil-core-external-script-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n throwError,\n} from 'rxjs';\n\nimport {
|
|
1
|
+
{"version":3,"file":"daffodil-core-external-script-testing.mjs","sources":["../../../libs/core/external-script/testing/src/external-script.service.ts","../../../libs/core/external-script/testing/src/daffodil-core-external-script-testing.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n Observable,\n of,\n throwError,\n} from 'rxjs';\n\nimport {\n DaffExternalScriptServiceInterface ,\n DaffExternalScript,\n} from '@daffodil/core/external-script';\n\nimport { TestScripts } from './constants';\n\n/**\n * A service for loading external scripts into the document.\n *\n * @example Loading an external script into the document\n *\n * ```ts\n * import { DaffExternalScriptTestingService } from '@daffodil/core/external-script/testing';\n *\n * const externalScriptService = new DaffExternalScriptTestingService();\n *\n * externalScriptService.load(TestScripts.SUCCESS, {\n * src: 'https://example.com/script.js',\n * async: true,\n * defer: false,\n * 'data-custom-attribute': 'value',\n * }).subscribe({\n * next: (result) => {\n * console.log('Script loaded successfully:', result);\n * },\n * error: (error) => {\n * console.error('Error loading script:', error);\n * },\n * });\n * ```\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffExternalScriptTestingService implements DaffExternalScriptServiceInterface {\n\n /**\n * @inheritdoc\n */\n load(name: string, script: DaffExternalScript): Observable<boolean> {\n switch(name) {\n case TestScripts.SUCCESS:\n return of(true);\n default:\n return throwError(() => new Error(`Failed to load ${ script.src }`));\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAcA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;MAIU,gCAAgC,CAAA;AAE3C;;AAEG;IACH,IAAI,CAAC,IAAY,EAAE,MAA0B,EAAA;QAC3C,QAAO,IAAI;AACT,YAAA,KAAA,GAAA;AACE,gBAAA,OAAO,EAAE,CAAC,IAAI,CAAC;AACjB,YAAA;AACE,gBAAA,OAAO,UAAU,CAAC,MAAM,IAAI,KAAK,CAAC,CAAA,eAAA,EAAmB,MAAM,CAAC,GAAI,CAAA,CAAE,CAAC,CAAC;;IAE1E;iIAZW,gCAAgC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAhC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gCAAgC,cAF/B,MAAM,EAAA,CAAA,CAAA;;2FAEP,gCAAgC,EAAA,UAAA,EAAA,CAAA;kBAH5C,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACzCD;;AAEG;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { DOCUMENT } from '@angular/common';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Inject, Injectable } from '@angular/core';
|
|
2
|
+
import { DOCUMENT, Inject, Injectable } from '@angular/core';
|
|
4
3
|
import { BehaviorSubject } from 'rxjs';
|
|
5
4
|
import { filter } from 'rxjs/operators';
|
|
6
5
|
|
|
@@ -76,10 +75,10 @@ class DaffExternalScriptService {
|
|
|
76
75
|
this.scriptMap.set(name, { ...script, ready: undefined, subject: readySubject, el: scriptEl });
|
|
77
76
|
return readySubject.pipe(filter((s) => s !== undefined));
|
|
78
77
|
}
|
|
79
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
80
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
78
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffExternalScriptService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
79
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffExternalScriptService, providedIn: 'root' }); }
|
|
81
80
|
}
|
|
82
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffExternalScriptService, decorators: [{
|
|
83
82
|
type: Injectable,
|
|
84
83
|
args: [{
|
|
85
84
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-core-external-script.mjs","sources":["../../../libs/core/external-script/src/external-script.service.ts","../../../libs/core/external-script/src/daffodil-core-external-script.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"daffodil-core-external-script.mjs","sources":["../../../libs/core/external-script/src/external-script.service.ts","../../../libs/core/external-script/src/daffodil-core-external-script.ts"],"sourcesContent":["\nimport {\n Inject,\n Injectable,\n DOCUMENT,\n} from '@angular/core';\nimport {\n BehaviorSubject,\n Observable,\n} from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { DaffExternalScriptServiceInterface } from './interface';\nimport { DaffExternalScript } from './script';\n\nexport interface LoadedExternalScript extends DaffExternalScript {\n ready: boolean | undefined;\n subject: Observable<boolean>;\n el: HTMLElement | undefined;\n}\n\n/**\n * A service for loading external scripts into the document.\n *\n * ### Usage example\n *\n * @example Loading an external script into the document\n *\n * ```ts\n * import { DOCUMENT } from '@angular/common';\n * import { inject } from '@angular/core';\n *\n * import { DaffExternalScriptService } from '@daffodil/core/external-script';\n *\n * const externalScriptService = new DaffExternalScriptService(inject(DOCUMENT));\n *\n * externalScriptService.load('exampleScript', {\n * src: 'https://example.com/script.js',\n * async: true,\n * defer: false,\n * 'data-custom-attribute': 'value',\n * }).subscribe({\n * next: (result) => {\n * console.log('Script loaded successfully:', result);\n * },\n * error: (error) => {\n * console.error('Error loading script:', error);\n * },\n * });\n * ```\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffExternalScriptService implements DaffExternalScriptServiceInterface {\n readonly scriptMap: Map<string, LoadedExternalScript> = new Map();\n private doc: Document;\n\n constructor(\n @Inject(DOCUMENT) doc,\n ) {\n this.doc = doc;\n }\n\n /**\n * @inheritdoc\n */\n load(name: string, script: DaffExternalScript): Observable<boolean> {\n // Don't load the same script twice.\n if(this.scriptMap.has(name)){\n return this.scriptMap.get(name).subject;\n }\n\n const scriptEl = this.doc.createElement('script');\n\n scriptEl.setAttribute('type', 'text/javascript');\n\n scriptEl.setAttribute('src', script.src);\n\n scriptEl.setAttribute('charset', 'utf-8');\n\n // Set custom attributes prefixed with 'data-'.\n Object.keys(script).filter(key => key.startsWith('data-')).map((key) => {\n // setAttribute would lowercase the value of \"key\", which isn't always correct.\n // setAttributeNS maintains key casing.\n scriptEl.setAttributeNS(null, key,script[key]);\n });\n\n if(script.async) {\n scriptEl.async = true;\n }\n\n if(script.defer) {\n scriptEl.defer = true;\n }\n\n const readySubject = new BehaviorSubject<boolean | undefined>(undefined);\n\n scriptEl.onload = () => {\n this.scriptMap.get(name).ready = true;\n readySubject.next(true);\n };\n\n scriptEl.onerror = () => {\n this.scriptMap.get(name).ready = false;\n readySubject.error(new Error(`Failed to load ${ script.src }`));\n };\n\n this.doc.body.appendChild(scriptEl);\n this.scriptMap.set(name, { ...script, ready: undefined, subject: readySubject, el: scriptEl });\n\n return readySubject.pipe(\n filter((s) => s !== undefined),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAqBA;;;;;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HrC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAMI,MAAM;2BAAC,QAAQ;;;AC3DpB;;AAEG;;;;"}
|
|
@@ -89,10 +89,10 @@ class DaffQueuedApollo {
|
|
|
89
89
|
this.queue.shift();
|
|
90
90
|
this.queue[0]?.();
|
|
91
91
|
}
|
|
92
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
93
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
92
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffQueuedApollo, deps: [{ token: i1.Apollo }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
93
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffQueuedApollo, providedIn: 'root' }); }
|
|
94
94
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffQueuedApollo, decorators: [{
|
|
96
96
|
type: Injectable,
|
|
97
97
|
args: [{
|
|
98
98
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-core-graphql.mjs","sources":["../../../libs/core/graphql/src/fragments/build-fragment-name-spread.ts","../../../libs/core/graphql/src/fragments/build-fragment-definition.ts","../../../libs/core/graphql/src/apollo/queued-apollo/queued-apollo.service.ts","../../../libs/core/graphql/src/daffodil-core-graphql.ts"],"sourcesContent":["import {\n DocumentNode,\n FragmentDefinitionNode,\n} from 'graphql';\n\nimport { unique } from '@daffodil/core';\n\nexport const getFragmentNames = (fragment: DocumentNode) =>\n fragment.definitions.filter(def =>\n def.kind === 'FragmentDefinition',\n ).map(def =>\n (<FragmentDefinitionNode>def).name.value,\n );\n\n/**\n * Builds a list of the first fragment name present inside the specified GraphQL document nodes.\n * Returns an empty array if no fragments have been defined or if null is passed.\n *\n * @param fragments The created fragments.\n */\nconst daffGetFragmentNames = (...fragments: DocumentNode[]): string[] =>\n fragments.reduce((acc, fragment) => {\n const names = getFragmentNames(fragment);\n if (names[0]) {\n acc.push(names[0]);\n }\n return acc;\n }, []);\n\n/**\n * Builds a string of fragment names that can be interpolated into a GraphQL query.\n * Each name is separated by a newline character: '\\n'.\n * If an empty array is passed, an empty string is returned.\n * Only the first fragment name from each passed fragment is returned.\n *\n * @param fragments A list of GraphQL documents that contain fragments.\n */\nexport const daffBuildFragmentNameSpread = (...fragments: DocumentNode[]): string =>\n unique(daffGetFragmentNames(...fragments)).reduce((acc, name) => acc.concat(`...${name}\\n`), '');\n","import { DocumentNode } from 'graphql';\n\n/**\n * Builds a string of fragment definitions that can be interpolated into a GraphQL query.\n * Each definition is separated by a newline character: '\\n'.\n *\n * @param documents A list of GraphQL documents that should only contain fragments.\n */\nexport const daffBuildFragmentDefinition = (...documents: DocumentNode[]): string =>\n documents.reduce((acc, fragment) => acc.concat(`${fragment.loc.source.body}\\n`), '');\n","import { Injectable } from '@angular/core';\nimport {\n MutationOptions,\n FetchResult,\n} from '@apollo/client/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n Subscriber,\n Subscription,\n} from 'rxjs';\n\n/**\n * A service that will queue mutate calls to Apollo.\n * It will not send subsequent mutate requests until the previous one has been completed.\n * This is useful for avoiding race conditions on the backend.\n * This should be used alongside Apollo.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffQueuedApollo {\n queue: (() => void)[] = [];\n\n constructor(\n private apollo: Apollo,\n ) {}\n\n /**\n * Queue up a mutate request.\n * The request will not actually be queued until the returned observable is subscribed.\n * If the queue is empty, the request will be sent when it enters the queue.\n * Otherwise, it will be sent when it reaches the front of the queue.\n * The observable will complete after it emits once.\n *\n * @param options Mutation options.\n */\n mutate<T, V = Record<string, any>>(options: MutationOptions<T, V>): Observable<FetchResult<T>> {\n return new Observable(subscriber => this.addRequestToQueue(subscriber, this.apollo.mutate(options)));\n }\n\n private addRequestToQueue(subscriber: Subscriber<any>, request: Observable<any>): void {\n this.queue.push(() => {\n const sub = request.subscribe({\n next: response => {\n // emit the outer observable\n subscriber.next(response);\n subscriber.complete();\n\n this.finishRequestSubscription(sub);\n },\n error: error => {\n subscriber.error(error);\n this.finishRequestSubscription(sub);\n },\n complete: () => {\n subscriber.complete();\n this.finishRequestSubscription(sub);\n },\n });\n });\n\n // start the queue if previously empty\n if (this.queue.length === 1) {\n this.queue[0]();\n }\n }\n\n private finishRequestSubscription(requestSubscription: Subscription): void {\n requestSubscription.unsubscribe();\n\n // process queue\n this.queue.shift();\n this.queue[0]?.();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAOO,MAAM,gBAAgB,GAAG,CAAC,QAAsB,KACrD,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,IAC7B,GAAG,CAAC,IAAI,KAAK,oBAAoB,CAClC,CAAC,GAAG,CAAC,GAAG,IACkB,GAAI,CAAC,IAAI,CAAC,KAAK,CACzC;AAEH;;;;;AAKG;AACH,MAAM,oBAAoB,GAAG,CAAC,GAAG,SAAyB,KACxD,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,KAAI;AACjC,IAAA,MAAM,KAAK,GAAG,gBAAgB,CAAC,QAAQ,CAAC;AACxC,IAAA,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;QACZ,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"daffodil-core-graphql.mjs","sources":["../../../libs/core/graphql/src/fragments/build-fragment-name-spread.ts","../../../libs/core/graphql/src/fragments/build-fragment-definition.ts","../../../libs/core/graphql/src/apollo/queued-apollo/queued-apollo.service.ts","../../../libs/core/graphql/src/daffodil-core-graphql.ts"],"sourcesContent":["import {\n DocumentNode,\n FragmentDefinitionNode,\n} from 'graphql';\n\nimport { unique } from '@daffodil/core';\n\nexport const getFragmentNames = (fragment: DocumentNode) =>\n fragment.definitions.filter(def =>\n def.kind === 'FragmentDefinition',\n ).map(def =>\n (<FragmentDefinitionNode>def).name.value,\n );\n\n/**\n * Builds a list of the first fragment name present inside the specified GraphQL document nodes.\n * Returns an empty array if no fragments have been defined or if null is passed.\n *\n * @param fragments The created fragments.\n */\nconst daffGetFragmentNames = (...fragments: DocumentNode[]): string[] =>\n fragments.reduce((acc, fragment) => {\n const names = getFragmentNames(fragment);\n if (names[0]) {\n acc.push(names[0]);\n }\n return acc;\n }, []);\n\n/**\n * Builds a string of fragment names that can be interpolated into a GraphQL query.\n * Each name is separated by a newline character: '\\n'.\n * If an empty array is passed, an empty string is returned.\n * Only the first fragment name from each passed fragment is returned.\n *\n * @param fragments A list of GraphQL documents that contain fragments.\n */\nexport const daffBuildFragmentNameSpread = (...fragments: DocumentNode[]): string =>\n unique(daffGetFragmentNames(...fragments)).reduce((acc, name) => acc.concat(`...${name}\\n`), '');\n","import { DocumentNode } from 'graphql';\n\n/**\n * Builds a string of fragment definitions that can be interpolated into a GraphQL query.\n * Each definition is separated by a newline character: '\\n'.\n *\n * @param documents A list of GraphQL documents that should only contain fragments.\n */\nexport const daffBuildFragmentDefinition = (...documents: DocumentNode[]): string =>\n documents.reduce((acc, fragment) => acc.concat(`${fragment.loc.source.body}\\n`), '');\n","import { Injectable } from '@angular/core';\nimport {\n MutationOptions,\n FetchResult,\n} from '@apollo/client/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n Subscriber,\n Subscription,\n} from 'rxjs';\n\n/**\n * A service that will queue mutate calls to Apollo.\n * It will not send subsequent mutate requests until the previous one has been completed.\n * This is useful for avoiding race conditions on the backend.\n * This should be used alongside Apollo.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffQueuedApollo {\n queue: (() => void)[] = [];\n\n constructor(\n private apollo: Apollo,\n ) {}\n\n /**\n * Queue up a mutate request.\n * The request will not actually be queued until the returned observable is subscribed.\n * If the queue is empty, the request will be sent when it enters the queue.\n * Otherwise, it will be sent when it reaches the front of the queue.\n * The observable will complete after it emits once.\n *\n * @param options Mutation options.\n */\n mutate<T, V = Record<string, any>>(options: MutationOptions<T, V>): Observable<FetchResult<T>> {\n return new Observable(subscriber => this.addRequestToQueue(subscriber, this.apollo.mutate(options)));\n }\n\n private addRequestToQueue(subscriber: Subscriber<any>, request: Observable<any>): void {\n this.queue.push(() => {\n const sub = request.subscribe({\n next: response => {\n // emit the outer observable\n subscriber.next(response);\n subscriber.complete();\n\n this.finishRequestSubscription(sub);\n },\n error: error => {\n subscriber.error(error);\n this.finishRequestSubscription(sub);\n },\n complete: () => {\n subscriber.complete();\n this.finishRequestSubscription(sub);\n },\n });\n });\n\n // start the queue if previously empty\n if (this.queue.length === 1) {\n this.queue[0]();\n }\n }\n\n private finishRequestSubscription(requestSubscription: Subscription): void {\n requestSubscription.unsubscribe();\n\n // process queue\n this.queue.shift();\n this.queue[0]?.();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAOO,MAAM,gBAAgB,GAAG,CAAC,QAAsB,KACrD,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,IAC7B,GAAG,CAAC,IAAI,KAAK,oBAAoB,CAClC,CAAC,GAAG,CAAC,GAAG,IACkB,GAAI,CAAC,IAAI,CAAC,KAAK,CACzC;AAEH;;;;;AAKG;AACH,MAAM,oBAAoB,GAAG,CAAC,GAAG,SAAyB,KACxD,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,KAAI;AACjC,IAAA,MAAM,KAAK,GAAG,gBAAgB,CAAC,QAA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ACpBD;;AAEG;;;;"}
|
|
@@ -67,10 +67,10 @@ class DaffRoutingUriNormalizer {
|
|
|
67
67
|
};
|
|
68
68
|
return this.urlParser.serialize(urlTree);
|
|
69
69
|
}
|
|
70
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
71
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
70
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffRoutingUriNormalizer, deps: [{ token: i1.UrlSerializer }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
71
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffRoutingUriNormalizer, providedIn: 'root' }); }
|
|
72
72
|
}
|
|
73
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
73
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: DaffRoutingUriNormalizer, decorators: [{
|
|
74
74
|
type: Injectable,
|
|
75
75
|
args: [{
|
|
76
76
|
providedIn: 'root',
|
|
@@ -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/query-param-filter/request-builder/equal.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","import {\n DaffFilterEqualRequest,\n DaffFilterType,\n} from '@daffodil/core';\n\nimport { DaffRoutingQueryParamFilterRequestBuilder } from './type';\n\n/**\n * A standard filter request builder that creates an equal filter request with the query params values.\n */\nexport const daffRoutingQueryParamFilterRequestEqualBuilder: DaffRoutingQueryParamFilterRequestBuilder<DaffFilterEqualRequest>\n = (filterName, qpValue) => ({\n type: DaffFilterType.Equal,\n name: filterName,\n value: qpValue,\n });\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;AAGG;AACI,MAAM,kCAAkC,GAAG;AAClD;;AAEG;MACU,4BAA4B,GAAG,CAAC,GAAW,KAAa,GAAG,CAAC,KAAK,CAAC,kCAAkC,CAAC,GAAG,CAAC,CAAC,IAAI;;ACR3H;;;AAGG;
|
|
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/query-param-filter/request-builder/equal.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","import {\n DaffFilterEqualRequest,\n DaffFilterType,\n} from '@daffodil/core';\n\nimport { DaffRoutingQueryParamFilterRequestBuilder } from './type';\n\n/**\n * A standard filter request builder that creates an equal filter request with the query params values.\n */\nexport const daffRoutingQueryParamFilterRequestEqualBuilder: DaffRoutingQueryParamFilterRequestBuilder<DaffFilterEqualRequest>\n = (filterName, qpValue) => ({\n type: DaffFilterType.Equal,\n name: filterName,\n value: qpValue,\n });\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;;;AAGG;AACI,MAAM,kCAAkC,GAAG;AAClD;;AAEG;MACU,4BAA4B,GAAG,CAAC,GAAW,KAAa,GAAG,CAAC,KAAK,CAAC,kCAAkC,CAAC,GAAG,CAAC,CAAC,IAAI;;ACR3H;;;AAGG;AACI,MAAM,kCAAkC,GAAG,CAAC,GAAW,KAC5D,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG;;ACLpB;;;;AAIG;AACI,MAAM,iCAAiC,GAAG;AACjD;;;AAGG;MACU,2BAA2B,GAAG,CAAC,GAAW,KACrD,GAAG,CAAC,KAAK,CAAC,iCAAiC,CAAC,EAAE,MAAM,CAAC,GAAG,IAAI;;ACX9D;;;AAGG;AACI,MAAM,4BAA4B,GAAG,CAAC,GAAW,KAAY;AAClE,IAAA,IAAG,GAAG,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;AACjB,QAAA,GAAG,GAAG,CAAA,CAAA,EAAI,GAAG,CAAA,CAAE;IACjB;IACA,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;AACxC;;ACFA;;AAEG;MAIU,wBAAwB,CAAA;AACnC,IAAA,WAAA,CACU,SAAwB,EAAA;QAAxB,IAAA,CAAA,SAAS,GAAT,SAAS;IAChB;AAEH;;;;;;;;;AASG;AACH,IAAA,SAAS,CAAC,GAAW,EAAE,MAAM,GAAG,cAAc,EAAA;QAC5C,MAAM,OAAO,GAAY,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC;AAClD,QAAA,OAAO,CAAC,IAAI,CAAC,QAAQ,GAAG;YACtB,CAAC,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;SAChD;QAED,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC;IAC1C;iIAtBW,wBAAwB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,aAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxB,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,wBAAwB,cAFvB,MAAM,EAAA,CAAA,CAAA;;2FAEP,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACLD;;AAEG;AACI,MAAM,8CAA8C,GACxD,CAAC,UAAU,EAAE,OAAO,MAAM;IAC1B,IAAI,EAAE,cAAc,CAAC,KAAK;AAC1B,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,KAAK,EAAE,OAAO;AACf,CAAA;;ACfF;;AAEG;;;;"}
|
|
@@ -23,10 +23,10 @@ class MockDaffCollectionFacade {
|
|
|
23
23
|
}
|
|
24
24
|
dispatch(action) { }
|
|
25
25
|
;
|
|
26
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
27
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
26
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffCollectionFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
27
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffCollectionFacade, providedIn: 'root' }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffCollectionFacade, decorators: [{
|
|
30
30
|
type: Injectable,
|
|
31
31
|
args: [{ providedIn: 'root' }]
|
|
32
32
|
}] });
|
|
@@ -47,10 +47,10 @@ class MockDaffOperationStateFacade {
|
|
|
47
47
|
}
|
|
48
48
|
dispatch(action) { }
|
|
49
49
|
;
|
|
50
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
51
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
50
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffOperationStateFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
51
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffOperationStateFacade, providedIn: 'root' }); }
|
|
52
52
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: MockDaffOperationStateFacade, decorators: [{
|
|
54
54
|
type: Injectable,
|
|
55
55
|
args: [{ providedIn: 'root' }]
|
|
56
56
|
}] });
|
|
@@ -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/mock-operation-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 DaffFilters,\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 filters$: BehaviorSubject<DaffFilters> = new BehaviorSubject({});\n appliedFilters$: BehaviorSubject<DaffFilters> = new BehaviorSubject({});\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport {\n DaffOperationStateFacadeInterface,\n DaffState,\n DaffStateError,\n} from '@daffodil/core/state';\n\n/**\n * Can be used to mock out the {@link DaffOperationStateFacade} in testing environments.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffOperationStateFacade implements DaffOperationStateFacadeInterface {\n loadingState$ = new BehaviorSubject<DaffState>(DaffState.Stable);\n loading$ = new BehaviorSubject<boolean>(false);\n resolving$ = new BehaviorSubject<boolean>(false);\n mutating$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n hasErrors$ = new BehaviorSubject<boolean>(false);\n\n dispatch(action: Action) {};\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAaA;;;;AAIG;MAEU,wBAAwB,CAAA;AADrC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,SAAS,GAA4C,IAAI,eAAe,CAAC,IAAI,CAAC;AAC9E,QAAA,IAAA,CAAA,QAAQ,GAA2C,IAAI,eAAe,CAAC,IAAI,CAAC;AAC5E,QAAA,IAAA,CAAA,MAAM,GAA4B,IAAI,eAAe,CAAC,CAAC,CAAC;AACxD,QAAA,IAAA,CAAA,YAAY,GAA4B,IAAI,eAAe,CAAC,CAAC,CAAC;AAC9D,QAAA,IAAA,CAAA,WAAW,GAA4B,IAAI,eAAe,CAAC,CAAC,CAAC;AAC7D,QAAA,IAAA,CAAA,SAAS,GAA4B,IAAI,eAAe,CAAC,CAAC,CAAC;AAC3D,QAAA,IAAA,CAAA,YAAY,GAAsC,IAAI,eAAe,CAAC,EAAE,CAAC;AACzE,QAAA,IAAA,CAAA,kBAAkB,GAA4B,IAAI,eAAe,CAAC,IAAI,CAAC;AACvE,QAAA,IAAA,CAAA,qBAAqB,GAA2C,IAAI,eAAe,CAAC,IAAI,CAAC;AACzF,QAAA,IAAA,CAAA,QAAQ,GAAiC,IAAI,eAAe,CAAC,EAAE,CAAC;AAChE,QAAA,IAAA,CAAA,eAAe,GAAiC,IAAI,eAAe,CAAC,EAAE,CAAC;AAGxE;IADC,QAAQ,CAAC,MAAc,EAAA;;
|
|
1
|
+
{"version":3,"file":"daffodil-core-state-testing.mjs","sources":["../../../libs/core/state/testing/src/mock-collection-facade.ts","../../../libs/core/state/testing/src/mock-operation-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 DaffFilters,\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 filters$: BehaviorSubject<DaffFilters> = new BehaviorSubject({});\n appliedFilters$: BehaviorSubject<DaffFilters> = new BehaviorSubject({});\n\n dispatch(action: Action) {};\n}\n","import { Injectable } from '@angular/core';\nimport { Action } from '@ngrx/store';\nimport { BehaviorSubject } from 'rxjs';\n\nimport {\n DaffOperationStateFacadeInterface,\n DaffState,\n DaffStateError,\n} from '@daffodil/core/state';\n\n/**\n * Can be used to mock out the {@link DaffOperationStateFacade} in testing environments.\n *\n * @inheritdoc\n */\n@Injectable({ providedIn: 'root' })\nexport class MockDaffOperationStateFacade implements DaffOperationStateFacadeInterface {\n loadingState$ = new BehaviorSubject<DaffState>(DaffState.Stable);\n loading$ = new BehaviorSubject<boolean>(false);\n resolving$ = new BehaviorSubject<boolean>(false);\n mutating$ = new BehaviorSubject<boolean>(false);\n errors$ = new BehaviorSubject<DaffStateError[]>([]);\n hasErrors$ = new BehaviorSubject<boolean>(false);\n\n dispatch(action: Action) {};\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAaA;;;;AAIG;MAEU,wBAAwB,CAAA;AADrC,IAAA,WAAA,GAAA;AAEE,QAAA,IAAA,CAAA,SAAS,GAA4C,IAAI,eAAe,CAAC,IAAI,CAAC;AAC9E,QAAA,IAAA,CAAA,QAAQ,GAA2C,IAAI,eAAe,CAAC,IAAI,CAAC;AAC5E,QAAA,IAAA,CAAA,MAAM,GAA4B,IAAI,eAAe,CAAC,CAAC,CAAC;AACxD,QAAA,IAAA,CAAA,YAAY,GAA4B,IAAI,eAAe,CAAC,CAAC,CAAC;AAC9D,QAAA,IAAA,CAAA,WAAW,GAA4B,IAAI,eAAe,CAAC,CAAC,CAAC;AAC7D,QAAA,IAAA,CAAA,SAAS,GAA4B,IAAI,eAAe,CAAC,CAAC,CAAC;AAC3D,QAAA,IAAA,CAAA,YAAY,GAAsC,IAAI,eAAe,CAAC,EAAE,CAAC;AACzE,QAAA,IAAA,CAAA,kBAAkB,GAA4B,IAAI,eAAe,CAAC,IAAI,CAAC;AACvE,QAAA,IAAA,CAAA,qBAAqB,GAA2C,IAAI,eAAe,CAAC,IAAI,CAAC;AACzF,QAAA,IAAA,CAAA,QAAQ,GAAiC,IAAI,eAAe,CAAC,EAAE,CAAC;AAChE,QAAA,IAAA,CAAA,eAAe,GAAiC,IAAI,eAAe,CAAC,EAAE,CAAC;AAGxE,IAAA;IADC,QAAQ,CAAC,MAAc,EAAA,EAAG;;iIAbf,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAxB,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBA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
|
274
274
|
;
|
|
275
275
|
|
|
276
|
+
// ngrx does not export EntitySelectors so we gotta do this nonsense
|
|
277
|
+
const giveMeType = (adapter) => adapter.getSelectors((state) => ({ ids: [], entities: {} }));
|
|
276
278
|
/**
|
|
277
279
|
* Creates a set of selectors for an entity operation state.
|
|
278
280
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-core-state.mjs","sources":["../../../libs/core/state/src/collection/adapter.class.ts","../../../libs/core/state/src/collection/initial-state.ts","../../../libs/core/state/src/collection/selector-factory.ts","../../../libs/core/state/src/collection/facade.ts","../../../libs/core/state/src/errors/transform-error-to-state-error.ts","../../../libs/core/state/src/operation/adapter.ts","../../../libs/core/state/src/operation/state.ts","../../../libs/core/state/src/states/helpers.ts","../../../libs/core/state/src/operation/selectors.ts","../../../libs/core/state/src/operation/entity/selectors.ts","../../../libs/core/state/src/operation/entity/adapter.ts","../../../libs/core/state/src/operation/entity/helpers/create-fake-id.ts","../../../libs/core/state/src/operators/substream.pipe.ts","../../../libs/core/state/src/reducers/create-meta.ts","../../../libs/core/state/src/reducers/identity.ts","../../../libs/core/state/src/daffodil-core-state.ts"],"sourcesContent":["import { defaultMemoize } from '@ngrx/store';\n\nimport {\n daffCollectionBuildMetadataFromRequest,\n DaffCollectionMetadata,\n DaffCollectionRequest,\n DaffFilters,\n} from '@daffodil/core';\n\n/**\n * Provides an abstracted way to manage a collection state.\n */\nexport class DaffCollectionStateAdapter<T extends DaffCollectionMetadata = DaffCollectionMetadata> {\n /**\n * Stores a collection request in state.\n * This is useful when you want to preemptively reduce a request before waiting for a response.\n */\n storeRequest(request: DaffCollectionRequest, state: T): T {\n return {\n ...state,\n ...daffCollectionBuildMetadataFromRequest(request),\n };\n }\n\n /**\n * Sets the page size.\n */\n setPageSize(size: number, state: T): T {\n return {\n ...state,\n pageSize: size,\n currentPage: 1,\n };\n }\n\n /**\n * Sets the current page.\n */\n setCurrentPage(page: number, state: T): T {\n return {\n ...state,\n currentPage: page,\n };\n }\n\n /**\n * Sets the sorting option and direction.\n */\n setSort(option: string, direction: string, state: T): T {\n return {\n ...state,\n appliedSortOption: option,\n appliedSortDirection: direction,\n };\n }\n\n /**\n * Sets the collection filters.\n */\n setFilters(filters: DaffFilters, state: T): T {\n return {\n ...state,\n currentPage: 1,\n filters: filters || {},\n };\n }\n\n /**\n * Set the entire collection metadata at once.\n */\n setMetadata(metadata: DaffCollectionMetadata, state: T): T {\n return {\n ...state,\n ids: metadata.ids,\n count: metadata.count,\n currentPage: metadata.currentPage,\n pageSize: metadata.pageSize,\n sortOptions: metadata.sortOptions,\n totalPages: metadata.totalPages,\n appliedSortOption: metadata.appliedSortOption || state.appliedSortOption,\n appliedSortDirection: metadata.appliedSortDirection || state.appliedSortDirection,\n filters: metadata.filters || {},\n };\n }\n}\n\n/**\n * Create the adapter for the collection state.\n */\nexport const getCollectionStateAdapter: <T extends DaffCollectionMetadata = DaffCollectionMetadata>() => DaffCollectionStateAdapter<T>\n = defaultMemoize(() => new DaffCollectionStateAdapter()).memoized;\n","import { DaffCollectionMetadata } from '@daffodil/core';\n\nexport const daffCollectionReducerInitialState: DaffCollectionMetadata = {\n count: 0,\n appliedSortOption: null,\n appliedSortDirection: null,\n currentPage: null,\n pageSize: null,\n totalPages: null,\n sortOptions: {\n default: null,\n options: [],\n },\n ids: [],\n filters: {},\n};\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n DaffCollectionMetadata,\n DaffCollectionRequest,\n daffComputeAppliedFilters,\n DaffFilters,\n} from '@daffodil/core';\n\n/**\n * An interface to describe all selectors related to the collection metadata.\n */\nexport interface DaffCollectionMemoizedSelectors<\n TState,\n TMetadata extends DaffCollectionMetadata = DaffCollectionMetadata\n> {\n /**\n * Selects the metadata for the collection.\n */\n selectCollectionMetadata: MemoizedSelector<TState, TMetadata>;\n /**\n * Builds a request that matches the current collection.\n */\n selectCollectionRequest: MemoizedSelector<TState, DaffCollectionRequest>;\n /**\n * Selects the total number of items of the collection.\n */\n selectCollectionCount: MemoizedSelector<TState, TMetadata['count']>;\n /**\n * Selects the current page of items of the collection.\n */\n selectCollectionCurrentPage: MemoizedSelector<TState, TMetadata['currentPage']>;\n /**\n * Selects the total number of pages of items that exist in the collection.\n */\n selectCollectionTotalPages: MemoizedSelector<TState, TMetadata['totalPages']>;\n /**\n * Selects the number of items on each collection.\n */\n selectCollectionPageSize: MemoizedSelector<TState, TMetadata['pageSize']>;\n /**\n * Selects the sort options that may be applied to the collection.\n */\n selectCollectionSortOptions: MemoizedSelector<TState, TMetadata['sortOptions']['options']>;\n /**\n * Selects the applied sorting option if one is applied.\n */\n selectCollectionAppliedSortOption: MemoizedSelector<TState, TMetadata['appliedSortOption']>;\n /**\n * Selects the applied sorting direction if a sorting option is applied.\n */\n selectCollectionAppliedSortDirection: MemoizedSelector<TState, TMetadata['appliedSortDirection']>;\n /**\n * Selects the applied sorting direction if a sorting option is applied.\n */\n selectCollectionIds: MemoizedSelector<TState, TMetadata['ids']>;\n /**\n * Selects the filters that may be applied to the collection.\n */\n selectCollectionFilters: MemoizedSelector<TState, TMetadata['filters']>;\n /**\n * Returns a dict of filters and only their applied options.\n * Filters with no applied options will be omitted.\n */\n selectCollectionAppliedFilters: MemoizedSelector<TState, DaffFilters>;\n}\n\n/**\n * Creates collection selectors.\n *\n * @param selectCollectionState A selector for the particular collection state upon which the returned selectors should operate.\n */\nexport const daffCollectionSelectorFactory = <\n TState,\n TMetadata extends DaffCollectionMetadata = DaffCollectionMetadata\n>(\n selectCollectionState: MemoizedSelector<TState, TMetadata>,\n): DaffCollectionMemoizedSelectors<TState, TMetadata> => {\n\n const selectCollectionMetadata = createSelector(\n selectCollectionState,\n state => state,\n );\n\n const selectCollectionRequest = createSelector(\n selectCollectionMetadata,\n metadata => ({\n appliedSortOption: metadata.appliedSortOption,\n appliedSortDirection: metadata.appliedSortDirection,\n currentPage: metadata.currentPage,\n pageSize: metadata.pageSize,\n }),\n );\n\n const selectCollectionCount = createSelector(\n selectCollectionMetadata,\n state => state.count,\n );\n\n const selectCollectionCurrentPage = createSelector(\n selectCollectionMetadata,\n state => state.currentPage,\n );\n\n const selectCollectionTotalPages = createSelector(\n selectCollectionMetadata,\n state => state.totalPages,\n );\n\n const selectCollectionPageSize = createSelector(\n selectCollectionMetadata,\n state => state.pageSize,\n );\n\n const selectCollectionSortOptions = createSelector(\n selectCollectionMetadata,\n state => state.sortOptions.options,\n );\n\n const selectCollectionAppliedSortOption = createSelector(\n selectCollectionMetadata,\n state => state.appliedSortOption,\n );\n\n const selectCollectionAppliedSortDirection = createSelector(\n selectCollectionMetadata,\n state => state.appliedSortDirection,\n );\n\n const selectCollectionIds = createSelector(\n selectCollectionMetadata,\n state => state.ids,\n );\n\n const selectCollectionFilters = createSelector(\n selectCollectionMetadata,\n state => state.filters,\n );\n\n const selectCollectionAppliedFilters = createSelector(\n selectCollectionFilters,\n filters => daffComputeAppliedFilters(filters),\n );\n\n return {\n selectCollectionMetadata,\n selectCollectionRequest,\n selectCollectionCount,\n selectCollectionCurrentPage,\n selectCollectionTotalPages,\n selectCollectionPageSize,\n selectCollectionSortOptions,\n selectCollectionAppliedSortOption,\n selectCollectionAppliedSortDirection,\n selectCollectionIds,\n selectCollectionFilters,\n selectCollectionAppliedFilters,\n };\n};\n","import {\n Store,\n select,\n Action,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport {\n DaffCollectionMetadata,\n DaffCollectionRequest,\n DaffFilters,\n DaffSortDirectionEnum,\n DaffSortOption,\n} from '@daffodil/core';\n\nimport { DaffCollectionFacadeInterface } from './facade.interface';\nimport { DaffCollectionMemoizedSelectors } from './selector-factory';\n\n/**\n * An abstract class for a collection facade.\n * It is configurable via its constructor parameters.\n * The particular collection state from which\n * this facade will read is determined by the selectors passed.\n *\n * @inheritdoc\n */\nexport abstract class DaffCollectionFacade<\n TState,\n TMetadata extends DaffCollectionMetadata = DaffCollectionMetadata\n> implements DaffCollectionFacadeInterface<TMetadata> {\n metadata$: Observable<TMetadata>;\n request$: Observable<DaffCollectionRequest>;\n count$: Observable<number>;\n currentPage$: Observable<number>;\n totalPages$: Observable<number>;\n pageSize$: Observable<number>;\n sortOptions$: Observable<DaffSortOption[]>;\n appliedSortOption$: Observable<string>;\n appliedSortDirection$: Observable<DaffSortDirectionEnum>;\n filters$: Observable<DaffFilters>;\n appliedFilters$: Observable<DaffFilters>;\n\n constructor(\n protected store: Store<TState>,\n selectors: DaffCollectionMemoizedSelectors<TState, TMetadata>,\n ) {\n this.metadata$ = this.store.pipe(select(selectors.selectCollectionMetadata));\n this.request$ = this.store.pipe(select(selectors.selectCollectionRequest));\n this.count$ = this.store.pipe(select(selectors.selectCollectionCount));\n this.currentPage$ = this.store.pipe(select(selectors.selectCollectionCurrentPage));\n this.totalPages$ = this.store.pipe(select(selectors.selectCollectionTotalPages));\n this.pageSize$ = this.store.pipe(select(selectors.selectCollectionPageSize));\n this.sortOptions$ = this.store.pipe(select(selectors.selectCollectionSortOptions));\n this.appliedSortOption$ = this.store.pipe(select(selectors.selectCollectionAppliedSortOption));\n this.appliedSortDirection$ = this.store.pipe(select(selectors.selectCollectionAppliedSortDirection));\n this.filters$ = this.store.pipe(select(selectors.selectCollectionFilters));\n this.appliedFilters$ = this.store.pipe(select(selectors.selectCollectionAppliedFilters));\n }\n\n /**\n * Dispatches the given action.\n *\n * @param action action to dispatch.\n */\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { DaffError } from '@daffodil/core';\n\nimport { DaffStateError } from './state-error.interface';\n\nexport type ErrorTransformer = (DaffError) => DaffStateError;\n\n/**\n * Transforms an error instance to a state error object.\n */\nexport function daffTransformErrorToStateError({ code, message, recoverable }: DaffError): DaffStateError {\n return { code, message, recoverable };\n}\n","import { DaffOperationState } from './state';\nimport { DaffState } from '../states/public_api';\n\n/**\n * Puts the state in a \"resolving\" state that correspondes to loading platform data in a GET fashion.\n * Sets loading to `DaffState.Resolving`\n */\nexport function daffStartResolution <T extends DaffOperationState = DaffOperationState>(state: T): T {\n return {\n ...state,\n daffState: DaffState.Resolving,\n };\n};\n\n/**\n * Puts the state in a \"mutating\" state that correspondes to loading platform data in a POST or PUT fashion.\n */\nexport function daffStartMutation <T extends DaffOperationState = DaffOperationState>(state: T): T {\n return {\n ...state,\n daffState: DaffState.Updating,\n };\n};\n\n/**\n * Indicates a successfully completed operation.\n * Sets loading to stable and resets errors.\n */\nexport function daffCompleteOperation <T extends DaffOperationState = DaffOperationState>(state: T): T {\n return {\n ...state,\n daffState: DaffState.Stable,\n daffErrors: [],\n };\n};\n\n/**\n * Indicates a failed operation.\n * Sets loading to stable and stores errors.\n */\nexport function daffOperationFailed <T extends DaffOperationState = DaffOperationState>(errors: T['daffErrors'], state: T): T {\n return {\n ...state,\n daffState: DaffState.Error,\n daffErrors: errors,\n };\n};\n\n/**\n * Resets errors.\n */\nexport function daffClearErrors <T extends DaffOperationState = DaffOperationState>(state: T): T {\n return {\n ...state,\n daffErrors: [],\n };\n};\n","import { DaffErrorable } from '../errors/public_api';\nimport {\n DaffState,\n DaffStateable,\n} from '../states/public_api';\n\n/**\n * A basic operation state.\n * Represents the current state of an operation and any associated errors.\n */\nexport interface DaffOperationState extends DaffErrorable, DaffStateable {}\n\nexport const daffOperationInitialState: DaffOperationState = {\n daffState: DaffState.Stable,\n daffErrors: [],\n};\n","import { DaffState } from './state.enum';\n\n/**\n * Returns whether the state is one that represents an operation in progress.\n */\nexport function daffStateIsLoading(daffState: DaffState): boolean {\n return daffStateIsMutating(daffState) || daffState === DaffState.Resolving;\n}\n\n/**\n * Returns whether the state is one that represents a mutable operation in progress.\n */\nexport function daffStateIsMutating(daffState: DaffState): boolean {\n return daffState === DaffState.Adding\n || daffState === DaffState.Updating\n || daffState === DaffState.Deleting;\n}\n","import {\n createSelector,\n MemoizedSelector,\n Selector,\n} from '@ngrx/store';\n\nimport { DaffOperationState } from './state';\nimport {\n DaffState,\n daffStateIsLoading,\n daffStateIsMutating,\n} from '../states/public_api';\n\n/**\n * Selectors for an operation state.\n */\nexport interface DaffOperationStateSelectors<\n TRootState,\n TState extends DaffOperationState = DaffOperationState\n> {\n /**\n * Selects the loading state enum.\n */\n selectLoadingState: MemoizedSelector<TRootState, TState['daffState']>;\n /**\n * Selects whether the operation state is in any of the loading states.\n */\n selectLoading: MemoizedSelector<TRootState, boolean>;\n /**\n * Selects whether the operation state is resolving.\n */\n selectResolving: MemoizedSelector<TRootState, boolean>;\n /**\n * Selects whether the operation state is mutating.\n */\n selectMutating: MemoizedSelector<TRootState, boolean>;\n /**\n * Selects the errors in the operation state.\n */\n selectErrors: MemoizedSelector<TRootState, TState['daffErrors']>;\n /**\n * Selects whether the operation state has any errors.\n * If so, it should be considered to be in an \"error\" state.\n */\n selectHasErrors: MemoizedSelector<TRootState, boolean>;\n}\n\n/**\n * Creates a set of selectors for an operation state.\n *\n * @param selectState The feature selector for the operation state.\n */\nexport function daffOperationStateSelectorFactory <\n TRootState,\n TState extends DaffOperationState = DaffOperationState\n>(\n selectState: Selector<TRootState, TState>,\n): DaffOperationStateSelectors<TRootState, TState> {\n const selectLoadingState = createSelector(\n selectState,\n state => state.daffState,\n );\n const selectLoading = createSelector(\n selectLoadingState,\n loadingState => daffStateIsLoading(loadingState),\n );\n const selectResolving = createSelector(\n selectLoadingState,\n loadingState => loadingState === DaffState.Resolving,\n );\n const selectMutating = createSelector(\n selectLoadingState,\n loadingState => daffStateIsMutating(loadingState),\n );\n const selectErrors = createSelector(\n selectState,\n state => state.daffErrors,\n );\n const selectHasErrors = createSelector(\n selectErrors,\n errors => errors.length > 0,\n );\n\n return {\n selectLoadingState,\n selectLoading,\n selectResolving,\n selectMutating,\n selectErrors,\n selectHasErrors,\n };\n};\n","import type { EntitySelectors } from '@ngrx/entity/src/models';\nimport {\n createSelector,\n defaultMemoize,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffIdentifiable } from '@daffodil/core';\n\nimport { DaffOperationEntity } from './type';\n\n/**\n * Selectors for an operation state.\n */\nexport interface DaffOperationEntityStateSelectors<\n TRootState,\n T extends DaffIdentifiable = DaffIdentifiable\n> extends EntitySelectors<DaffOperationEntity<T>, TRootState> {\n /**\n * Selects an entity by ID.\n */\n selectEntity: (id: T['id']) => MemoizedSelector<TRootState, DaffOperationEntity<T>>;\n\n /**\n * Optimistically selects the list of entities.\n * This excludes temporary entities with errors.\n */\n selectOptimisticList: MemoizedSelector<TRootState, DaffOperationEntity<T>[]>;\n}\n\n/**\n * Creates a set of selectors for an entity operation state.\n *\n * @param selectState The feature selector for the entity operation state.\n */\nexport function daffOperationEntityStateSelectorFactory<\n TRootState,\n T extends DaffIdentifiable = DaffIdentifiable\n>(\n entitySelectors: EntitySelectors<DaffOperationEntity<T>, TRootState>,\n): DaffOperationEntityStateSelectors<TRootState, T> {\n const selectEntity: (id: T['id']) => MemoizedSelector<TRootState, DaffOperationEntity<T>>\n = defaultMemoize((id) => createSelector(\n entitySelectors.selectEntities,\n entities => entities[id],\n )).memoized;\n\n const selectOptimisticList = createSelector(\n entitySelectors.selectAll,\n (entities) => entities.filter(entity =>\n // ignore entities that are deleting\n // entity.daffState !== DaffState.Deleting &&\n // ignore placeholders with errors\n !(entity.daffTemp && entity.daffErrors.length > 0),\n ),\n );\n\n return {\n ...entitySelectors,\n selectEntity,\n selectOptimisticList,\n };\n};\n","import {\n createEntityAdapter,\n EntityAdapter,\n} from '@ngrx/entity';\n\nimport { DaffIdentifiable } from '@daffodil/core';\n\nimport {\n daffOperationEntityStateSelectorFactory,\n DaffOperationEntityStateSelectors,\n} from './selectors';\nimport { DaffOperationEntityState } from './state.type';\nimport { DaffOperationEntity } from './type';\nimport { DaffStateError } from '../../errors/public_api';\nimport { DaffState } from '../../states/public_api';\n\n/**\n * An entity state adapter that takes care of managing contextual operation and error state for entities.\n */\nexport interface DaffOperationEntityStateAdapterInterface<T extends DaffIdentifiable = DaffIdentifiable> {\n /**\n * Stores a list of entities in state and resets them all to stable.\n */\n list<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entities: T[], state: S): S;\n /**\n * Optimistically adds a placeholder entity into state if necessary and sets the entity to resolving.\n */\n preload<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(id: string, state: S): S;\n /**\n * Upserts the entity into state and resets operation state and errors.\n */\n load<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: T, state: S): S;\n /**\n * Adds a placeholder entity into state if `placeholderId` is specified and sets state to adding.\n */\n preadd<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: T, state: S, placeholderId?: string): S;\n /**\n * Adds the entity into state, sets operation state to added, and resets errors.\n */\n add<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: T, state: S, placeholderId?: string): S;\n /**\n * Sets the entity's operation state to mutating.\n */\n preupdate<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: Partial<T> & DaffIdentifiable, state: S): S;\n /**\n * Upserts the entity into state, sets operation state to mutated, and resets errors.\n */\n update<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: Partial<T> & DaffIdentifiable, state: S): S;\n /**\n * Sets the entity's operation state to deleting.\n */\n preremove<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, state: S): S;\n /**\n * Removes the entity from state.\n */\n remove<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, state: S): S;\n /**\n * Resets the entity's operation state and stores errors on the entity.\n */\n operationFailed<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, errors: DaffStateError[], state: S): S;\n /**\n * Resets the entity's operation state to stable.\n */\n resetState<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, state: S): S;\n /**\n * Gets an empty entity state.\n */\n getInitialState<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(state?: S): S;\n /**\n * Gets entity selectors.\n */\n getSelectors<TRootState>(selectState: (state: TRootState) => DaffOperationEntityState<T>): DaffOperationEntityStateSelectors<TRootState, T>;\n}\n\n/**\n * @inheritdoc\n */\nexport class DaffOperationEntityStateAdapter<T extends DaffIdentifiable = DaffIdentifiable> implements DaffOperationEntityStateAdapterInterface<T> {\n constructor(\n protected adapter: EntityAdapter<DaffOperationEntity<T>> = createEntityAdapter<DaffOperationEntity<T>>(),\n ) {}\n\n list<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entities: T[], state: S): S {\n return this.adapter.setAll(\n entities.map<DaffOperationEntity<T>>(entity => ({\n daffState: DaffState.Stable,\n ...entity,\n daffErrors: [],\n daffTemp: false,\n })),\n state,\n );\n }\n\n preload<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(id: string, state: S): S {\n return this.adapter.upsertOne(<DaffOperationEntity<T>>{\n // TODO: allow for non identifiable entities?\n id,\n daffState: DaffState.Resolving,\n daffErrors: [],\n daffTemp: !state.entities[id],\n }, state);\n }\n\n load<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: T, state: S): S {\n return this.adapter.upsertOne({\n daffState: DaffState.Stable,\n ...entity,\n daffErrors: [],\n daffTemp: false,\n }, state);\n }\n\n preadd<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: T, state: S, placeholderId?: string): S {\n return placeholderId\n ? this.adapter.upsertOne({\n ...entity,\n // TODO: allow for non identifiable entities?\n id: placeholderId,\n daffState: DaffState.Adding,\n daffErrors: [],\n daffTemp: true,\n }, state)\n : state;\n }\n\n add<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: T, state: S, placeholderId?: string): S {\n return this.adapter.upsertOne(\n {\n daffState: DaffState.Added,\n ...entity,\n daffErrors: [],\n daffTemp: false,\n },\n placeholderId ? this.adapter.removeOne(placeholderId, state) : state,\n );\n }\n\n preupdate<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: Partial<T> & DaffIdentifiable, state: S): S {\n return this.adapter.upsertOne({\n ...state.entities[entity.id],\n daffState: DaffState.Updating,\n daffErrors: [],\n }, state);\n }\n\n update<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: Partial<T> & DaffIdentifiable, state: S): S {\n return this.adapter.updateOne({\n id: entity.id,\n changes: <Partial<DaffOperationEntity<T>>>{\n daffState: DaffState.Updated,\n ...entity,\n daffErrors: [],\n daffTemp: false,\n },\n }, state);\n }\n\n preremove<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, state: S): S {\n return this.adapter.upsertOne({\n ...state.entities[key],\n daffErrors: [],\n daffState: DaffState.Deleting,\n }, state);\n }\n\n remove<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, state: S): S {\n return this.adapter.removeOne(key, state);\n }\n\n operationFailed<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, errors: DaffStateError[], state: S): S {\n return state.entities[key] ? this.adapter.upsertOne({\n ...state.entities[key],\n daffState: DaffState.Error,\n daffErrors: errors,\n }, state) : state;\n }\n\n resetState<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, state: S): S {\n return state.entities[key] ? this.adapter.upsertOne({\n ...state.entities[key],\n daffState: DaffState.Stable,\n }, state) : state;\n }\n\n getInitialState<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(state?: S): S {\n return this.adapter.getInitialState(state);\n }\n\n getSelectors<TRootState>(selectState: (state: TRootState) => DaffOperationEntityState<T>): DaffOperationEntityStateSelectors<TRootState, T> {\n return daffOperationEntityStateSelectorFactory<TRootState, T>(this.adapter.getSelectors(selectState));\n }\n}\n\nexport function daffCreateOperationEntityStateAdapter<T extends DaffIdentifiable = DaffIdentifiable>(adapter: EntityAdapter<DaffOperationEntity<T>> = createEntityAdapter<DaffOperationEntity<T>>()): DaffOperationEntityStateAdapter<T> {\n return new DaffOperationEntityStateAdapter(adapter);\n}\n","/**\n * Generate a fake ID for use with placeholder entities.\n *\n * @param key An optional key that can augment the randomly generated ID.\n * @returns A string cont\n */\nexport function daffOperationEntityCreateFakeId(key: string = ''): string {\n return `ε-${Date.now()}-${key}`;\n}\n","import { Action } from '@ngrx/store';\nimport { pipe } from 'rxjs';\nimport {\n scan,\n filter,\n} from 'rxjs/operators';\n\nexport type ActionType = Action['type'];\nexport type ActionSequenceStep = ActionType | ActionType[];\nexport type ActionSequence = ActionSequenceStep[];\n\nconst compareActionSequenceStep = (step: ActionSequenceStep, action: Action): boolean => Array.isArray(step)\n ? step.reduce((acc, type) => acc || action.type === type, false)\n : action.type === step;\n\n/**\n * Watches for a particular stream of actions in the specified order and\n * emits a list of those actions once all sequence steps have been matched.\n *\n * This will find the first occurence of the substream and not necessarily the most concise or recent substream.\n * For example, substream([A, B]) encountering an action stream of [A1, A2, B1, B2] will emit [A1, B1].\n * When a substream is found and emitted, the list is reset and it will continue to listen to the action stream.\n *\n * You can indicate that a particular step in the sequence can be matched by mutiple actions by passing an array for that step.\n * For example, if the first step of the sequence could be action A or action B: substream([[A, B], C]).\n * An action stream of [A1, C1] would cause substream to emit [A1, C1].\n * An action stream of [B1, C1] would cause substream to emit [B1, C1].\n * An action stream of [A1, B1, C1] would cause substream to emit [A1, C1].\n *\n * You can optionally pass a list of terminators.\n * If a terminator is encountered in the action stream, any partially matched substream is reset.\n * For example, substream([A, B], C) would not emit anything for an action stream of [A1, C1, B1].\n *\n * @param sequence The sequence of action types that define the substream to listen for.\n * @param terminators A list of terminators, any of which interrupt and reset a partially matched substream.\n */\nexport const substream = (sequence: ActionSequence, ...terminators: ActionType[]) => {\n const isFullMatch = matchedSubstream => matchedSubstream.length === sequence.length;\n const accumulateMatchedSubstream = (matchedSubstream, action) =>\n compareActionSequenceStep(sequence[matchedSubstream.length], action)\n ? [\n ...matchedSubstream,\n action,\n ]\n : matchedSubstream;\n\n return pipe(\n scan<Action, Action[]>((matchedSubstream, action) =>\n terminators.indexOf(action.type) > -1\n // terminator found, reset the list\n ? []\n : accumulateMatchedSubstream(\n // reset the list if fully matched\n isFullMatch(matchedSubstream) ? [] : matchedSubstream,\n action,\n ),\n []),\n filter(isFullMatch),\n );\n};\n","import {\n Action,\n ActionReducer,\n} from '@ngrx/store';\n\n/**\n * Creates and returns a composite reducer that invokes each of the passed reducers in turn.\n */\nexport function daffComposeReducers<\n T,\n V extends Action = Action\n>(reducers: ActionReducer<T, V>[]): ActionReducer<T, V> {\n return (state: T, action: V): T =>\n reducers.reduce((nextState, reducer) => reducer(nextState, action), state);\n}\n","import { Action } from '@ngrx/store';\n\n/**\n * A simple reducer that simply returns the passed state.\n * This is useful for stubbing out parts of state that are not covered in an injected extra reducer map.\n */\nexport const daffIdentityReducer = <T = unknown>(state: T, action: Action): T => state;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AASA;;AAEG;MACU,0BAA0B,CAAA;AACrC;;;AAGG;IACH,YAAY,CAAC,OAA8B,EAAE,KAAQ,EAAA;QACnD,OAAO;AACL,YAAA,GAAG,KAAK;YACR,GAAG,sCAAsC,CAAC,OAAO,CAAC;SACnD;;AAGH;;AAEG;IACH,WAAW,CAAC,IAAY,EAAE,KAAQ,EAAA;QAChC,OAAO;AACL,YAAA,GAAG,KAAK;AACR,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,WAAW,EAAE,CAAC;SACf;;AAGH;;AAEG;IACH,cAAc,CAAC,IAAY,EAAE,KAAQ,EAAA;QACnC,OAAO;AACL,YAAA,GAAG,KAAK;AACR,YAAA,WAAW,EAAE,IAAI;SAClB;;AAGH;;AAEG;AACH,IAAA,OAAO,CAAC,MAAc,EAAE,SAAiB,EAAE,KAAQ,EAAA;QACjD,OAAO;AACL,YAAA,GAAG,KAAK;AACR,YAAA,iBAAiB,EAAE,MAAM;AACzB,YAAA,oBAAoB,EAAE,SAAS;SAChC;;AAGH;;AAEG;IACH,UAAU,CAAC,OAAoB,EAAE,KAAQ,EAAA;QACvC,OAAO;AACL,YAAA,GAAG,KAAK;AACR,YAAA,WAAW,EAAE,CAAC;YACd,OAAO,EAAE,OAAO,IAAI,EAAE;SACvB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AAC,GAAG,EAAE,GAAG,gBAAgB,EACrD,MAAM,CACP,EACL,EAAE,CAAC,EACH,MAAM,CAAC,WAAW,CAAC,CACpB;AACH;;ACtDA;;AAEG;AACG,SAAU,mBAAmB,CAGjC,QAA+B,EAAA;IAC/B,OAAO,CAAC,KAAQ,EAAE,MAAS,KACzB,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,OAAO,KAAK,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC;AAC9E;;ACZA;;;AAGG;AACI,MAAM,mBAAmB,GAAG,CAAc,KAAQ,EAAE,MAAc,KAAQ;;ACNjF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-core-state.mjs","sources":["../../../libs/core/state/src/collection/adapter.class.ts","../../../libs/core/state/src/collection/initial-state.ts","../../../libs/core/state/src/collection/selector-factory.ts","../../../libs/core/state/src/collection/facade.ts","../../../libs/core/state/src/errors/transform-error-to-state-error.ts","../../../libs/core/state/src/operation/adapter.ts","../../../libs/core/state/src/operation/state.ts","../../../libs/core/state/src/states/helpers.ts","../../../libs/core/state/src/operation/selectors.ts","../../../libs/core/state/src/operation/entity/selectors.ts","../../../libs/core/state/src/operation/entity/adapter.ts","../../../libs/core/state/src/operation/entity/helpers/create-fake-id.ts","../../../libs/core/state/src/operators/substream.pipe.ts","../../../libs/core/state/src/reducers/create-meta.ts","../../../libs/core/state/src/reducers/identity.ts","../../../libs/core/state/src/daffodil-core-state.ts"],"sourcesContent":["import { defaultMemoize } from '@ngrx/store';\n\nimport {\n daffCollectionBuildMetadataFromRequest,\n DaffCollectionMetadata,\n DaffCollectionRequest,\n DaffFilters,\n} from '@daffodil/core';\n\n/**\n * Provides an abstracted way to manage a collection state.\n */\nexport class DaffCollectionStateAdapter<T extends DaffCollectionMetadata = DaffCollectionMetadata> {\n /**\n * Stores a collection request in state.\n * This is useful when you want to preemptively reduce a request before waiting for a response.\n */\n storeRequest(request: DaffCollectionRequest, state: T): T {\n return {\n ...state,\n ...daffCollectionBuildMetadataFromRequest(request),\n };\n }\n\n /**\n * Sets the page size.\n */\n setPageSize(size: number, state: T): T {\n return {\n ...state,\n pageSize: size,\n currentPage: 1,\n };\n }\n\n /**\n * Sets the current page.\n */\n setCurrentPage(page: number, state: T): T {\n return {\n ...state,\n currentPage: page,\n };\n }\n\n /**\n * Sets the sorting option and direction.\n */\n setSort(option: string, direction: string, state: T): T {\n return {\n ...state,\n appliedSortOption: option,\n appliedSortDirection: direction,\n };\n }\n\n /**\n * Sets the collection filters.\n */\n setFilters(filters: DaffFilters, state: T): T {\n return {\n ...state,\n currentPage: 1,\n filters: filters || {},\n };\n }\n\n /**\n * Set the entire collection metadata at once.\n */\n setMetadata(metadata: DaffCollectionMetadata, state: T): T {\n return {\n ...state,\n ids: metadata.ids,\n count: metadata.count,\n currentPage: metadata.currentPage,\n pageSize: metadata.pageSize,\n sortOptions: metadata.sortOptions,\n totalPages: metadata.totalPages,\n appliedSortOption: metadata.appliedSortOption || state.appliedSortOption,\n appliedSortDirection: metadata.appliedSortDirection || state.appliedSortDirection,\n filters: metadata.filters || {},\n };\n }\n}\n\n/**\n * Create the adapter for the collection state.\n */\nexport const getCollectionStateAdapter: <T extends DaffCollectionMetadata = DaffCollectionMetadata>() => DaffCollectionStateAdapter<T>\n = defaultMemoize(() => new DaffCollectionStateAdapter()).memoized;\n","import { DaffCollectionMetadata } from '@daffodil/core';\n\nexport const daffCollectionReducerInitialState: DaffCollectionMetadata = {\n count: 0,\n appliedSortOption: null,\n appliedSortDirection: null,\n currentPage: null,\n pageSize: null,\n totalPages: null,\n sortOptions: {\n default: null,\n options: [],\n },\n ids: [],\n filters: {},\n};\n","import {\n createSelector,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport {\n DaffCollectionMetadata,\n DaffCollectionRequest,\n daffComputeAppliedFilters,\n DaffFilters,\n} from '@daffodil/core';\n\n/**\n * An interface to describe all selectors related to the collection metadata.\n */\nexport interface DaffCollectionMemoizedSelectors<\n TState,\n TMetadata extends DaffCollectionMetadata = DaffCollectionMetadata\n> {\n /**\n * Selects the metadata for the collection.\n */\n selectCollectionMetadata: MemoizedSelector<TState, TMetadata>;\n /**\n * Builds a request that matches the current collection.\n */\n selectCollectionRequest: MemoizedSelector<TState, DaffCollectionRequest>;\n /**\n * Selects the total number of items of the collection.\n */\n selectCollectionCount: MemoizedSelector<TState, TMetadata['count']>;\n /**\n * Selects the current page of items of the collection.\n */\n selectCollectionCurrentPage: MemoizedSelector<TState, TMetadata['currentPage']>;\n /**\n * Selects the total number of pages of items that exist in the collection.\n */\n selectCollectionTotalPages: MemoizedSelector<TState, TMetadata['totalPages']>;\n /**\n * Selects the number of items on each collection.\n */\n selectCollectionPageSize: MemoizedSelector<TState, TMetadata['pageSize']>;\n /**\n * Selects the sort options that may be applied to the collection.\n */\n selectCollectionSortOptions: MemoizedSelector<TState, TMetadata['sortOptions']['options']>;\n /**\n * Selects the applied sorting option if one is applied.\n */\n selectCollectionAppliedSortOption: MemoizedSelector<TState, TMetadata['appliedSortOption']>;\n /**\n * Selects the applied sorting direction if a sorting option is applied.\n */\n selectCollectionAppliedSortDirection: MemoizedSelector<TState, TMetadata['appliedSortDirection']>;\n /**\n * Selects the applied sorting direction if a sorting option is applied.\n */\n selectCollectionIds: MemoizedSelector<TState, TMetadata['ids']>;\n /**\n * Selects the filters that may be applied to the collection.\n */\n selectCollectionFilters: MemoizedSelector<TState, TMetadata['filters']>;\n /**\n * Returns a dict of filters and only their applied options.\n * Filters with no applied options will be omitted.\n */\n selectCollectionAppliedFilters: MemoizedSelector<TState, DaffFilters>;\n}\n\n/**\n * Creates collection selectors.\n *\n * @param selectCollectionState A selector for the particular collection state upon which the returned selectors should operate.\n */\nexport const daffCollectionSelectorFactory = <\n TState,\n TMetadata extends DaffCollectionMetadata = DaffCollectionMetadata\n>(\n selectCollectionState: MemoizedSelector<TState, TMetadata>,\n): DaffCollectionMemoizedSelectors<TState, TMetadata> => {\n\n const selectCollectionMetadata = createSelector(\n selectCollectionState,\n state => state,\n );\n\n const selectCollectionRequest = createSelector(\n selectCollectionMetadata,\n metadata => ({\n appliedSortOption: metadata.appliedSortOption,\n appliedSortDirection: metadata.appliedSortDirection,\n currentPage: metadata.currentPage,\n pageSize: metadata.pageSize,\n }),\n );\n\n const selectCollectionCount = createSelector(\n selectCollectionMetadata,\n state => state.count,\n );\n\n const selectCollectionCurrentPage = createSelector(\n selectCollectionMetadata,\n state => state.currentPage,\n );\n\n const selectCollectionTotalPages = createSelector(\n selectCollectionMetadata,\n state => state.totalPages,\n );\n\n const selectCollectionPageSize = createSelector(\n selectCollectionMetadata,\n state => state.pageSize,\n );\n\n const selectCollectionSortOptions = createSelector(\n selectCollectionMetadata,\n state => state.sortOptions.options,\n );\n\n const selectCollectionAppliedSortOption = createSelector(\n selectCollectionMetadata,\n state => state.appliedSortOption,\n );\n\n const selectCollectionAppliedSortDirection = createSelector(\n selectCollectionMetadata,\n state => state.appliedSortDirection,\n );\n\n const selectCollectionIds = createSelector(\n selectCollectionMetadata,\n state => state.ids,\n );\n\n const selectCollectionFilters = createSelector(\n selectCollectionMetadata,\n state => state.filters,\n );\n\n const selectCollectionAppliedFilters = createSelector(\n selectCollectionFilters,\n filters => daffComputeAppliedFilters(filters),\n );\n\n return {\n selectCollectionMetadata,\n selectCollectionRequest,\n selectCollectionCount,\n selectCollectionCurrentPage,\n selectCollectionTotalPages,\n selectCollectionPageSize,\n selectCollectionSortOptions,\n selectCollectionAppliedSortOption,\n selectCollectionAppliedSortDirection,\n selectCollectionIds,\n selectCollectionFilters,\n selectCollectionAppliedFilters,\n };\n};\n","import {\n Store,\n select,\n Action,\n} from '@ngrx/store';\nimport { Observable } from 'rxjs';\n\nimport {\n DaffCollectionMetadata,\n DaffCollectionRequest,\n DaffFilters,\n DaffSortDirectionEnum,\n DaffSortOption,\n} from '@daffodil/core';\n\nimport { DaffCollectionFacadeInterface } from './facade.interface';\nimport { DaffCollectionMemoizedSelectors } from './selector-factory';\n\n/**\n * An abstract class for a collection facade.\n * It is configurable via its constructor parameters.\n * The particular collection state from which\n * this facade will read is determined by the selectors passed.\n *\n * @inheritdoc\n */\nexport abstract class DaffCollectionFacade<\n TState,\n TMetadata extends DaffCollectionMetadata = DaffCollectionMetadata\n> implements DaffCollectionFacadeInterface<TMetadata> {\n metadata$: Observable<TMetadata>;\n request$: Observable<DaffCollectionRequest>;\n count$: Observable<number>;\n currentPage$: Observable<number>;\n totalPages$: Observable<number>;\n pageSize$: Observable<number>;\n sortOptions$: Observable<DaffSortOption[]>;\n appliedSortOption$: Observable<string>;\n appliedSortDirection$: Observable<DaffSortDirectionEnum>;\n filters$: Observable<DaffFilters>;\n appliedFilters$: Observable<DaffFilters>;\n\n constructor(\n protected store: Store<TState>,\n selectors: DaffCollectionMemoizedSelectors<TState, TMetadata>,\n ) {\n this.metadata$ = this.store.pipe(select(selectors.selectCollectionMetadata));\n this.request$ = this.store.pipe(select(selectors.selectCollectionRequest));\n this.count$ = this.store.pipe(select(selectors.selectCollectionCount));\n this.currentPage$ = this.store.pipe(select(selectors.selectCollectionCurrentPage));\n this.totalPages$ = this.store.pipe(select(selectors.selectCollectionTotalPages));\n this.pageSize$ = this.store.pipe(select(selectors.selectCollectionPageSize));\n this.sortOptions$ = this.store.pipe(select(selectors.selectCollectionSortOptions));\n this.appliedSortOption$ = this.store.pipe(select(selectors.selectCollectionAppliedSortOption));\n this.appliedSortDirection$ = this.store.pipe(select(selectors.selectCollectionAppliedSortDirection));\n this.filters$ = this.store.pipe(select(selectors.selectCollectionFilters));\n this.appliedFilters$ = this.store.pipe(select(selectors.selectCollectionAppliedFilters));\n }\n\n /**\n * Dispatches the given action.\n *\n * @param action action to dispatch.\n */\n dispatch(action: Action) {\n this.store.dispatch(action);\n }\n}\n","import { DaffError } from '@daffodil/core';\n\nimport { DaffStateError } from './state-error.interface';\n\nexport type ErrorTransformer = (DaffError) => DaffStateError;\n\n/**\n * Transforms an error instance to a state error object.\n */\nexport function daffTransformErrorToStateError({ code, message, recoverable }: DaffError): DaffStateError {\n return { code, message, recoverable };\n}\n","import { DaffOperationState } from './state';\nimport { DaffState } from '../states/public_api';\n\n/**\n * Puts the state in a \"resolving\" state that correspondes to loading platform data in a GET fashion.\n * Sets loading to `DaffState.Resolving`\n */\nexport function daffStartResolution <T extends DaffOperationState = DaffOperationState>(state: T): T {\n return {\n ...state,\n daffState: DaffState.Resolving,\n };\n};\n\n/**\n * Puts the state in a \"mutating\" state that correspondes to loading platform data in a POST or PUT fashion.\n */\nexport function daffStartMutation <T extends DaffOperationState = DaffOperationState>(state: T): T {\n return {\n ...state,\n daffState: DaffState.Updating,\n };\n};\n\n/**\n * Indicates a successfully completed operation.\n * Sets loading to stable and resets errors.\n */\nexport function daffCompleteOperation <T extends DaffOperationState = DaffOperationState>(state: T): T {\n return {\n ...state,\n daffState: DaffState.Stable,\n daffErrors: [],\n };\n};\n\n/**\n * Indicates a failed operation.\n * Sets loading to stable and stores errors.\n */\nexport function daffOperationFailed <T extends DaffOperationState = DaffOperationState>(errors: T['daffErrors'], state: T): T {\n return {\n ...state,\n daffState: DaffState.Error,\n daffErrors: errors,\n };\n};\n\n/**\n * Resets errors.\n */\nexport function daffClearErrors <T extends DaffOperationState = DaffOperationState>(state: T): T {\n return {\n ...state,\n daffErrors: [],\n };\n};\n","import { DaffErrorable } from '../errors/public_api';\nimport {\n DaffState,\n DaffStateable,\n} from '../states/public_api';\n\n/**\n * A basic operation state.\n * Represents the current state of an operation and any associated errors.\n */\nexport interface DaffOperationState extends DaffErrorable, DaffStateable {}\n\nexport const daffOperationInitialState: DaffOperationState = {\n daffState: DaffState.Stable,\n daffErrors: [],\n};\n","import { DaffState } from './state.enum';\n\n/**\n * Returns whether the state is one that represents an operation in progress.\n */\nexport function daffStateIsLoading(daffState: DaffState): boolean {\n return daffStateIsMutating(daffState) || daffState === DaffState.Resolving;\n}\n\n/**\n * Returns whether the state is one that represents a mutable operation in progress.\n */\nexport function daffStateIsMutating(daffState: DaffState): boolean {\n return daffState === DaffState.Adding\n || daffState === DaffState.Updating\n || daffState === DaffState.Deleting;\n}\n","import {\n createSelector,\n MemoizedSelector,\n Selector,\n} from '@ngrx/store';\n\nimport { DaffOperationState } from './state';\nimport {\n DaffState,\n daffStateIsLoading,\n daffStateIsMutating,\n} from '../states/public_api';\n\n/**\n * Selectors for an operation state.\n */\nexport interface DaffOperationStateSelectors<\n TRootState,\n TState extends DaffOperationState = DaffOperationState\n> {\n /**\n * Selects the loading state enum.\n */\n selectLoadingState: MemoizedSelector<TRootState, TState['daffState']>;\n /**\n * Selects whether the operation state is in any of the loading states.\n */\n selectLoading: MemoizedSelector<TRootState, boolean>;\n /**\n * Selects whether the operation state is resolving.\n */\n selectResolving: MemoizedSelector<TRootState, boolean>;\n /**\n * Selects whether the operation state is mutating.\n */\n selectMutating: MemoizedSelector<TRootState, boolean>;\n /**\n * Selects the errors in the operation state.\n */\n selectErrors: MemoizedSelector<TRootState, TState['daffErrors']>;\n /**\n * Selects whether the operation state has any errors.\n * If so, it should be considered to be in an \"error\" state.\n */\n selectHasErrors: MemoizedSelector<TRootState, boolean>;\n}\n\n/**\n * Creates a set of selectors for an operation state.\n *\n * @param selectState The feature selector for the operation state.\n */\nexport function daffOperationStateSelectorFactory <\n TRootState,\n TState extends DaffOperationState = DaffOperationState\n>(\n selectState: Selector<TRootState, TState>,\n): DaffOperationStateSelectors<TRootState, TState> {\n const selectLoadingState = createSelector(\n selectState,\n state => state.daffState,\n );\n const selectLoading = createSelector(\n selectLoadingState,\n loadingState => daffStateIsLoading(loadingState),\n );\n const selectResolving = createSelector(\n selectLoadingState,\n loadingState => loadingState === DaffState.Resolving,\n );\n const selectMutating = createSelector(\n selectLoadingState,\n loadingState => daffStateIsMutating(loadingState),\n );\n const selectErrors = createSelector(\n selectState,\n state => state.daffErrors,\n );\n const selectHasErrors = createSelector(\n selectErrors,\n errors => errors.length > 0,\n );\n\n return {\n selectLoadingState,\n selectLoading,\n selectResolving,\n selectMutating,\n selectErrors,\n selectHasErrors,\n };\n};\n","import { EntityAdapter } from '@ngrx/entity';\nimport {\n createSelector,\n defaultMemoize,\n MemoizedSelector,\n} from '@ngrx/store';\n\nimport { DaffIdentifiable } from '@daffodil/core';\n\nimport { DaffOperationEntity } from './type';\n\n// ngrx does not export EntitySelectors so we gotta do this nonsense\nconst giveMeType = <T, V>(adapter: EntityAdapter<T>) => adapter.getSelectors<V>((state) => ({ ids: [], entities: {}}));\ntype EntitySelectors<T, V> = ReturnType<typeof giveMeType<T, V>>;\n\n/**\n * Selectors for an operation state.\n */\nexport interface DaffOperationEntityStateSelectors<\n TRootState,\n T extends DaffIdentifiable = DaffIdentifiable\n> extends EntitySelectors<DaffOperationEntity<T>, TRootState> {\n /**\n * Selects an entity by ID.\n */\n selectEntity: (id: T['id']) => MemoizedSelector<TRootState, DaffOperationEntity<T>>;\n\n /**\n * Optimistically selects the list of entities.\n * This excludes temporary entities with errors.\n */\n selectOptimisticList: MemoizedSelector<TRootState, DaffOperationEntity<T>[]>;\n}\n\n/**\n * Creates a set of selectors for an entity operation state.\n *\n * @param selectState The feature selector for the entity operation state.\n */\nexport function daffOperationEntityStateSelectorFactory<\n TRootState,\n T extends DaffIdentifiable = DaffIdentifiable\n>(\n entitySelectors: EntitySelectors<DaffOperationEntity<T>, TRootState>,\n): DaffOperationEntityStateSelectors<TRootState, T> {\n const selectEntity: (id: T['id']) => MemoizedSelector<TRootState, DaffOperationEntity<T>>\n = defaultMemoize((id) => createSelector(\n entitySelectors.selectEntities,\n entities => entities[id],\n )).memoized;\n\n const selectOptimisticList = createSelector(\n entitySelectors.selectAll,\n (entities) => entities.filter(entity =>\n // ignore entities that are deleting\n // entity.daffState !== DaffState.Deleting &&\n // ignore placeholders with errors\n !(entity.daffTemp && entity.daffErrors.length > 0),\n ),\n );\n\n return {\n ...entitySelectors,\n selectEntity,\n selectOptimisticList,\n };\n};\n","import {\n createEntityAdapter,\n EntityAdapter,\n} from '@ngrx/entity';\n\nimport { DaffIdentifiable } from '@daffodil/core';\n\nimport {\n daffOperationEntityStateSelectorFactory,\n DaffOperationEntityStateSelectors,\n} from './selectors';\nimport { DaffOperationEntityState } from './state.type';\nimport { DaffOperationEntity } from './type';\nimport { DaffStateError } from '../../errors/public_api';\nimport { DaffState } from '../../states/public_api';\n\n/**\n * An entity state adapter that takes care of managing contextual operation and error state for entities.\n */\nexport interface DaffOperationEntityStateAdapterInterface<T extends DaffIdentifiable = DaffIdentifiable> {\n /**\n * Stores a list of entities in state and resets them all to stable.\n */\n list<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entities: T[], state: S): S;\n /**\n * Optimistically adds a placeholder entity into state if necessary and sets the entity to resolving.\n */\n preload<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(id: string, state: S): S;\n /**\n * Upserts the entity into state and resets operation state and errors.\n */\n load<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: T, state: S): S;\n /**\n * Adds a placeholder entity into state if `placeholderId` is specified and sets state to adding.\n */\n preadd<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: T, state: S, placeholderId?: string): S;\n /**\n * Adds the entity into state, sets operation state to added, and resets errors.\n */\n add<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: T, state: S, placeholderId?: string): S;\n /**\n * Sets the entity's operation state to mutating.\n */\n preupdate<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: Partial<T> & DaffIdentifiable, state: S): S;\n /**\n * Upserts the entity into state, sets operation state to mutated, and resets errors.\n */\n update<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: Partial<T> & DaffIdentifiable, state: S): S;\n /**\n * Sets the entity's operation state to deleting.\n */\n preremove<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, state: S): S;\n /**\n * Removes the entity from state.\n */\n remove<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, state: S): S;\n /**\n * Resets the entity's operation state and stores errors on the entity.\n */\n operationFailed<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, errors: DaffStateError[], state: S): S;\n /**\n * Resets the entity's operation state to stable.\n */\n resetState<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, state: S): S;\n /**\n * Gets an empty entity state.\n */\n getInitialState<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(state?: S): S;\n /**\n * Gets entity selectors.\n */\n getSelectors<TRootState>(selectState: (state: TRootState) => DaffOperationEntityState<T>): DaffOperationEntityStateSelectors<TRootState, T>;\n}\n\n/**\n * @inheritdoc\n */\nexport class DaffOperationEntityStateAdapter<T extends DaffIdentifiable = DaffIdentifiable> implements DaffOperationEntityStateAdapterInterface<T> {\n constructor(\n protected adapter: EntityAdapter<DaffOperationEntity<T>> = createEntityAdapter<DaffOperationEntity<T>>(),\n ) {}\n\n list<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entities: T[], state: S): S {\n return this.adapter.setAll(\n entities.map<DaffOperationEntity<T>>(entity => ({\n daffState: DaffState.Stable,\n ...entity,\n daffErrors: [],\n daffTemp: false,\n })),\n state,\n );\n }\n\n preload<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(id: string, state: S): S {\n return this.adapter.upsertOne(<DaffOperationEntity<T>>{\n // TODO: allow for non identifiable entities?\n id,\n daffState: DaffState.Resolving,\n daffErrors: [],\n daffTemp: !state.entities[id],\n }, state);\n }\n\n load<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: T, state: S): S {\n return this.adapter.upsertOne({\n daffState: DaffState.Stable,\n ...entity,\n daffErrors: [],\n daffTemp: false,\n }, state);\n }\n\n preadd<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: T, state: S, placeholderId?: string): S {\n return placeholderId\n ? this.adapter.upsertOne({\n ...entity,\n // TODO: allow for non identifiable entities?\n id: placeholderId,\n daffState: DaffState.Adding,\n daffErrors: [],\n daffTemp: true,\n }, state)\n : state;\n }\n\n add<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: T, state: S, placeholderId?: string): S {\n return this.adapter.upsertOne(\n {\n daffState: DaffState.Added,\n ...entity,\n daffErrors: [],\n daffTemp: false,\n },\n placeholderId ? this.adapter.removeOne(placeholderId, state) : state,\n );\n }\n\n preupdate<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: Partial<T> & DaffIdentifiable, state: S): S {\n return this.adapter.upsertOne({\n ...state.entities[entity.id],\n daffState: DaffState.Updating,\n daffErrors: [],\n }, state);\n }\n\n update<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(entity: Partial<T> & DaffIdentifiable, state: S): S {\n return this.adapter.updateOne({\n id: entity.id,\n changes: <Partial<DaffOperationEntity<T>>>{\n daffState: DaffState.Updated,\n ...entity,\n daffErrors: [],\n daffTemp: false,\n },\n }, state);\n }\n\n preremove<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, state: S): S {\n return this.adapter.upsertOne({\n ...state.entities[key],\n daffErrors: [],\n daffState: DaffState.Deleting,\n }, state);\n }\n\n remove<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, state: S): S {\n return this.adapter.removeOne(key, state);\n }\n\n operationFailed<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, errors: DaffStateError[], state: S): S {\n return state.entities[key] ? this.adapter.upsertOne({\n ...state.entities[key],\n daffState: DaffState.Error,\n daffErrors: errors,\n }, state) : state;\n }\n\n resetState<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(key: string, state: S): S {\n return state.entities[key] ? this.adapter.upsertOne({\n ...state.entities[key],\n daffState: DaffState.Stable,\n }, state) : state;\n }\n\n getInitialState<S extends DaffOperationEntityState<T> = DaffOperationEntityState<T>>(state?: S): S {\n return this.adapter.getInitialState(state);\n }\n\n getSelectors<TRootState>(selectState: (state: TRootState) => DaffOperationEntityState<T>): DaffOperationEntityStateSelectors<TRootState, T> {\n return daffOperationEntityStateSelectorFactory<TRootState, T>(this.adapter.getSelectors(selectState));\n }\n}\n\nexport function daffCreateOperationEntityStateAdapter<T extends DaffIdentifiable = DaffIdentifiable>(adapter: EntityAdapter<DaffOperationEntity<T>> = createEntityAdapter<DaffOperationEntity<T>>()): DaffOperationEntityStateAdapter<T> {\n return new DaffOperationEntityStateAdapter(adapter);\n}\n","/**\n * Generate a fake ID for use with placeholder entities.\n *\n * @param key An optional key that can augment the randomly generated ID.\n * @returns A string cont\n */\nexport function daffOperationEntityCreateFakeId(key: string = ''): string {\n return `ε-${Date.now()}-${key}`;\n}\n","import { Action } from '@ngrx/store';\nimport { pipe } from 'rxjs';\nimport {\n scan,\n filter,\n} from 'rxjs/operators';\n\nexport type ActionType = Action['type'];\nexport type ActionSequenceStep = ActionType | ActionType[];\nexport type ActionSequence = ActionSequenceStep[];\n\nconst compareActionSequenceStep = (step: ActionSequenceStep, action: Action): boolean => Array.isArray(step)\n ? step.reduce((acc, type) => acc || action.type === type, false)\n : action.type === step;\n\n/**\n * Watches for a particular stream of actions in the specified order and\n * emits a list of those actions once all sequence steps have been matched.\n *\n * This will find the first occurence of the substream and not necessarily the most concise or recent substream.\n * For example, substream([A, B]) encountering an action stream of [A1, A2, B1, B2] will emit [A1, B1].\n * When a substream is found and emitted, the list is reset and it will continue to listen to the action stream.\n *\n * You can indicate that a particular step in the sequence can be matched by mutiple actions by passing an array for that step.\n * For example, if the first step of the sequence could be action A or action B: substream([[A, B], C]).\n * An action stream of [A1, C1] would cause substream to emit [A1, C1].\n * An action stream of [B1, C1] would cause substream to emit [B1, C1].\n * An action stream of [A1, B1, C1] would cause substream to emit [A1, C1].\n *\n * You can optionally pass a list of terminators.\n * If a terminator is encountered in the action stream, any partially matched substream is reset.\n * For example, substream([A, B], C) would not emit anything for an action stream of [A1, C1, B1].\n *\n * @param sequence The sequence of action types that define the substream to listen for.\n * @param terminators A list of terminators, any of which interrupt and reset a partially matched substream.\n */\nexport const substream = (sequence: ActionSequence, ...terminators: ActionType[]) => {\n const isFullMatch = matchedSubstream => matchedSubstream.length === sequence.length;\n const accumulateMatchedSubstream = (matchedSubstream, action) =>\n compareActionSequenceStep(sequence[matchedSubstream.length], action)\n ? [\n ...matchedSubstream,\n action,\n ]\n : matchedSubstream;\n\n return pipe(\n scan<Action, Action[]>((matchedSubstream, action) =>\n terminators.indexOf(action.type) > -1\n // terminator found, reset the list\n ? []\n : accumulateMatchedSubstream(\n // reset the list if fully matched\n isFullMatch(matchedSubstream) ? [] : matchedSubstream,\n action,\n ),\n []),\n filter(isFullMatch),\n );\n};\n","import {\n Action,\n ActionReducer,\n} from '@ngrx/store';\n\n/**\n * Creates and returns a composite reducer that invokes each of the passed reducers in turn.\n */\nexport function daffComposeReducers<\n T,\n V extends Action = Action\n>(reducers: ActionReducer<T, V>[]): ActionReducer<T, V> {\n return (state: T, action: V): T =>\n reducers.reduce((nextState, reducer) => reducer(nextState, action), state);\n}\n","import { Action } from '@ngrx/store';\n\n/**\n * A simple reducer that simply returns the passed state.\n * This is useful for stubbing out parts of state that are not covered in an injected extra reducer map.\n */\nexport const daffIdentityReducer = <T = unknown>(state: T, action: Action): T => state;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AASA;;AAEG;MACU,0BAA0B,CAAA;AACrC;;;AAGG;IACH,YAAY,CAAC,OAA8B,EAAE,KAAQ,EAAA;QACnD,OAAO;AACL,YAAA,GAAG,KAAK;YACR,GAAG,sCAAsC,CAAC,OAAO,CAAC;SACnD;IACH;AAEA;;AAEG;IACH,WAAW,CAAC,IAAY,EAAE,KAAQ,EAAA;QAChC,OAAO;AACL,YAAA,GAAG,KAAK;AACR,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,WAAW,EAAE,CAAC;SACf;IACH;AAEA;;AAEG;IACH,cAAc,CAAC,IAAY,EAAE,KAAQ,EAAA;QACnC,OAAO;AACL,YAAA,GAAG,KAAK;AACR,YAAA,WAAW,EA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