@daffodil/core 0.87.2 → 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 +4 -38
- 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 +125 -33
- 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/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 -19
- package/routing/public_api.d.ts +0 -3
- 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/reducers/clear-errors/navigated-entity-reducer-factory.d.ts +0 -7
- package/routing/reducers/clear-errors/navigated.reducer.d.ts +0 -6
- package/routing/reducers/clear-errors/public_api.d.ts +0 -2
- package/routing/reducers/public_api.d.ts +0 -1
- 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,9 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRequest, DaffFilter } from '../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Undoes any applied options of a {@link DaffFilter} that match the
|
|
4
|
-
* {@link DaffFilterRequest}, returning the {@link DaffFilter}.
|
|
5
|
-
*
|
|
6
|
-
* @idempotent {filter}
|
|
7
|
-
* @pure
|
|
8
|
-
*/
|
|
9
|
-
export declare const daffRemoveFilter: (request: DaffFilterRequest, filter: DaffFilter) => DaffFilter;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRequest, DaffFilters } from '../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Undoes any applied options of a particular filter of a dictionary of {@link DaffFilter}
|
|
4
|
-
* that match the {@link DaffFilterRequest}, returning the dictionary of {@link DaffFilter}.
|
|
5
|
-
*
|
|
6
|
-
* @idempotent {filters}
|
|
7
|
-
*/
|
|
8
|
-
export declare const daffRemoveRequestFromFilters: (request: DaffFilterRequest, filters: DaffFilters) => DaffFilters;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRequest, DaffFilters } from '../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Undoes all applied options of a dictionary of {@link DaffFilter}
|
|
4
|
-
* that match any of the {@link DaffFilterRequest},
|
|
5
|
-
* returning the updated dictionary of {@link DaffFilter}.
|
|
6
|
-
*
|
|
7
|
-
* @idempotent {filters}
|
|
8
|
-
*/
|
|
9
|
-
export declare const daffRemoveRequestsFromFilters: (requests: (DaffFilterRequest)[], filters: DaffFilters) => DaffFilters;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DaffFilters, DaffFilterToggleRequest } from '../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Toggles the state of a filter option in the {@link DaffFilters}
|
|
4
|
-
* that matches the {@link DaffFilterToggleRequest}.
|
|
5
|
-
*/
|
|
6
|
-
export declare const daffToggleRequestOnFilters: (request: DaffFilterToggleRequest, filters: DaffFilters) => DaffFilters;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DaffFilterToggleRequest, DaffFilter } from '../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Toggles the state of the filters (and their options) in the {@link DaffFilter}
|
|
4
|
-
* that match the {@link DaffFilterToggleRequest} .
|
|
5
|
-
*/
|
|
6
|
-
export declare function daffToggleFilter(request: DaffFilterToggleRequest, filter: DaffFilter): DaffFilter;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DaffFilters } from '../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Returns a {@link DaffFilters} and only their applied options.
|
|
4
|
-
* {@link DaffFilter} that have no applied options will be omitted.
|
|
5
|
-
*/
|
|
6
|
-
export declare const daffComputeAppliedFilters: (filters: DaffFilters) => DaffFilters;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The error codes applicable to the filter behaviors of `@daffodil/core`.
|
|
3
|
-
*/
|
|
4
|
-
export declare enum DaffFilterErrorCodes {
|
|
5
|
-
FILTER_REQUEST_TYPE_MISMATCH = "DAFF_FILTER_REQUEST_TYPE_MISMATCH",
|
|
6
|
-
FILTER_REQUEST_NAME_MISMATCH = "DAFF_FILTER_REQUEST_NAME_MISMATCH",
|
|
7
|
-
FILTER_NOT_FOUND = "DAFF_FILTER_NOT_FOUND",
|
|
8
|
-
UNKNOWN_FILTER_TYPE = "DAFF_FILTER_UNKNOWN_TYPE"
|
|
9
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '../../errors/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when a lookup for a filter.
|
|
4
|
-
*/
|
|
5
|
-
export declare class DaffFilterNotFound extends DaffInheritableError implements DaffError {
|
|
6
|
-
readonly code: string;
|
|
7
|
-
constructor(message?: string);
|
|
8
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { DaffFilterNotFound } from './filter-not-found.error';
|
|
2
|
-
export { DaffFilterRequestTypeMismatch } from './request-type-mismatch.error';
|
|
3
|
-
export { DaffFilterRequestNameMismatch } from './request-name-mismatch.error';
|
|
4
|
-
export { DaffFilterUnknownType } from './unknown-filter-type.error';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '../../errors/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when an operation targeting a filter matching one name
|
|
4
|
-
* matches a filter of another name.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffFilterRequestNameMismatch extends DaffInheritableError implements DaffError {
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(message?: string);
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '../../errors/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when an operation targeting a filter matching one type
|
|
4
|
-
* matches a filter of another type.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffFilterRequestTypeMismatch extends DaffInheritableError implements DaffError {
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(message?: string);
|
|
9
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DaffError, DaffInheritableError } from '../../errors/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* An error thrown when an operation targeting a filter matches a type unknown
|
|
4
|
-
* to Daffodil.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffFilterUnknownType extends DaffInheritableError implements DaffError {
|
|
7
|
-
readonly code: string;
|
|
8
|
-
constructor(message?: string);
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { daffFilterFindAppliedOptions } from './find-applied-options';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DaffFilter, DaffFilterToggleRequest } from '../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Determines whether or not a {@link DaffFilterToggleRequest} is already applied to a {@link DaffFilter}.
|
|
4
|
-
*/
|
|
5
|
-
export declare const daffIsToggleRequestAppliedToFilter: (request: DaffFilterToggleRequest, filter: DaffFilter) => boolean;
|
package/filters/public_api.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from './behaviors/apply/public_api';
|
|
2
|
-
export * from './behaviors/clear/public_api';
|
|
3
|
-
export * from './behaviors/remove/public_api';
|
|
4
|
-
export * from './behaviors/toggle/public_api';
|
|
5
|
-
export * from './is-applied/public_api';
|
|
6
|
-
export * from './find-applied/public_api';
|
|
7
|
-
export * from './to-request/public_api';
|
|
8
|
-
export * from './type/range/public_api';
|
|
9
|
-
export * from './type/equal/public_api';
|
|
10
|
-
export * from './validators/public_api';
|
|
11
|
-
export * from './errors/public_api';
|
|
12
|
-
export { daffFilterArrayToDict } from './array-to-dict/array-to-dict';
|
|
13
|
-
export { daffComputeAppliedFilters } from './compute-applied-filters/compute-applied-filters';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DaffFilter, DaffFilterRequest } from '../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Builds a filter request from a filter.
|
|
4
|
-
* Returns null if the filter does not have at least one applied option.
|
|
5
|
-
*/
|
|
6
|
-
export declare function daffFilterToRequest(filter: DaffFilter): DaffFilterRequest | null;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRequest, DaffFilters } from '../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Builds a list of filter requests from a list of filters.
|
|
4
|
-
* Requests are only built for the filters that have at least one applied option.
|
|
5
|
-
*/
|
|
6
|
-
export declare function daffFiltersToRequests(filters: DaffFilters): DaffFilterRequest[];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DaffFilterEqualOption } from '../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Converts a list of equal filter options to a dict of options keyed by option value.
|
|
4
|
-
*/
|
|
5
|
-
export declare const daffFilterEqualOptionArrayToDict: (options: DaffFilterEqualOption[]) => Record<DaffFilterEqualOption["value"], DaffFilterEqualOption>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffFilterEqual, DaffFilterEqualRequest } from '../../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Applies a {@link DaffFilterEqualRequest} to a {@link DaffFilterEqual}
|
|
4
|
-
*
|
|
5
|
-
* @idempotent {filter}
|
|
6
|
-
* @docs-private
|
|
7
|
-
*/
|
|
8
|
-
export declare const daffApplyFilterEqual: (request: DaffFilterEqualRequest, filter: DaffFilterEqual) => DaffFilterEqual;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffFilterEqual } from '../../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Unapplies the applied filter options of a {@link DaffFilterEqual}
|
|
4
|
-
*
|
|
5
|
-
* @idempotent {filter}
|
|
6
|
-
* @docs-private
|
|
7
|
-
*/
|
|
8
|
-
export declare const daffClearFilterEqual: (filter: DaffFilterEqual) => DaffFilterEqual;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DaffFilterEqualRequest, DaffFilter, DaffFilterEqual } from '../../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Removes the matching filter options of a {@link DaffFilterEqual}
|
|
4
|
-
* that match the {@link DaffFilterEqualRequest}
|
|
5
|
-
*
|
|
6
|
-
* If there are no matching options, returns the original {@link DaffFilterEqual}
|
|
7
|
-
*
|
|
8
|
-
* @idempotent {filter}
|
|
9
|
-
* @docs-private
|
|
10
|
-
*/
|
|
11
|
-
export declare const daffRemoveFilterEqual: (request: DaffFilterEqualRequest, filter: DaffFilterEqual) => DaffFilter;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DaffFilterEqual } from '../../../../../filterable/public_api';
|
|
2
|
-
import { DaffFilterEqualToggleRequest } from '../../../../../filterable/public_api';
|
|
3
|
-
/**
|
|
4
|
-
* Oscillates the applied state of the matching filter options of a {@link DaffFilterEqual}
|
|
5
|
-
* that match the {@link DaffFilterEqualRequest}
|
|
6
|
-
*
|
|
7
|
-
* If there are no matching options, returns the original {@link DaffFilterEqual}
|
|
8
|
-
*
|
|
9
|
-
* @docs-private
|
|
10
|
-
*/
|
|
11
|
-
export declare const daffToggleFilterEqual: (request: DaffFilterEqualToggleRequest, filter: DaffFilterEqual) => DaffFilterEqual;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DaffFilterEqualToggleRequest, DaffFilterEqual } from '../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Determines whether or not any {@link DaffFilterEqual} options matching {@link DaffFilterEqualToggleRequest} are applied.
|
|
4
|
-
*/
|
|
5
|
-
export declare const daffIsEqualToggleRequestAppliedToFilter: (request: DaffFilterEqualToggleRequest, filter: DaffFilterEqual) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { daffFilterEqualOptionArrayToDict } from './array-to-dict/option';
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DaffFilterEqual, DaffFilterEqualRequest } from '../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Builds an {@link DaffFilterEqualRequest} from the passed filter and options.
|
|
4
|
-
*/
|
|
5
|
-
export declare const daffFilterEqualToRequest: (filter: DaffFilterEqual) => DaffFilterEqualRequest | null;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRangePair } from '../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Transforms an {@link DaffFilterRangePair[]} to a dictionary.
|
|
4
|
-
*/
|
|
5
|
-
export declare const daffFilterRangePairArrayToDict: <T>(pairs: DaffFilterRangePair<T>[]) => Record<string, DaffFilterRangePair<T>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRangeRequestBase, DaffFilterRangeBase } from '../../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Applies a {@link DaffFilterRangeRequestBase} to a {@link DaffFilterRangeBase}
|
|
4
|
-
*
|
|
5
|
-
* @idempotent {filter}
|
|
6
|
-
* @docs-private
|
|
7
|
-
*/
|
|
8
|
-
export declare const daffApplyFilterRange: <T, U extends DaffFilterRangeRequestBase<T>, V extends DaffFilterRangeBase<T>>(request: U, filter: V) => V;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRangeBase } from '../../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Unapplies the applied filter options of a {@link DaffFilterRangeBase}
|
|
4
|
-
*
|
|
5
|
-
* @idempotent {filter}
|
|
6
|
-
* @docs-private
|
|
7
|
-
*/
|
|
8
|
-
export declare const daffClearFilterRange: <T, U extends DaffFilterRangeBase<T>>(filter: U) => U;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRangeRequestBase, DaffFilterRangeBase } from '../../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Removes the matching filter options of a {@link DaffFilterRangeBase}
|
|
4
|
-
* that match the {@link DaffFilterRangeRequestBase}
|
|
5
|
-
*
|
|
6
|
-
* If there are no matching options, returns the original {@link DaffFilterRangeBase}
|
|
7
|
-
*
|
|
8
|
-
* @idempotent {filter}
|
|
9
|
-
* @docs-private
|
|
10
|
-
*/
|
|
11
|
-
export declare const daffRemoveFilterRange: <T, U extends DaffFilterRangeBase<T>>(request: DaffFilterRangeRequestBase<T>, filter: U) => U;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRangeBase, DaffFilterRangeRequestBase } from '../../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Oscillates the applied state of the matching filter options of a {@link DaffFilterRangeBase}
|
|
4
|
-
* that match the {@link DaffFilterRangeRequestBase}
|
|
5
|
-
*
|
|
6
|
-
* If there are no matching options, returns the original {@link DaffFilterRangeBase}
|
|
7
|
-
*
|
|
8
|
-
* @docs-private
|
|
9
|
-
*/
|
|
10
|
-
export declare const daffToggleFilterRange: <T, U extends DaffFilterRangeBase<T>>(request: DaffFilterRangeRequestBase<T>, filter: U) => U;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const daffFilterComputeRangePairLabel: (min: any, max: any) => string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRangeRequestBase, DaffFilterRangeBase } from '../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Determines whether or not any {@link DaffFilterRangeBase} options matching {@link DaffFilterRangeRequestBase} are applied.
|
|
4
|
-
*/
|
|
5
|
-
export declare const daffIsRangeToggleRequestAppliedToFilter: <T>(request: DaffFilterRangeRequestBase<T>, filter: DaffFilterRangeBase<T>) => boolean;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRangeBase, DaffFilterRangeRequestBase } from '../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Builds a {@link DaffFilterRangeRequestBase} from the passed {@link DaffFilterRangeBase} and options.
|
|
4
|
-
*/
|
|
5
|
-
export declare const daffFilterRangeToRequest: <T, U extends DaffFilterRangeBase<T>>(filter: U) => DaffFilterRangeRequestBase<T>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRangeNumeric, DaffFilterRangeNumericRequest } from '../../../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Transforms a {@link DaffFilterRangeNumeric} into a {@link DaffFilterRangeNumericRequest}
|
|
4
|
-
*/
|
|
5
|
-
export declare const daffFilterRangeNumericToRequest: (filter: DaffFilterRangeNumeric) => DaffFilterRangeNumericRequest;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRequest, DaffFilter, DaffFilterToggleRequest } from '../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Ensures that the names of the filter and the filter request match.
|
|
4
|
-
*
|
|
5
|
-
* @throws {@link DaffFilterNotFound} if the names do not match.
|
|
6
|
-
*/
|
|
7
|
-
export declare const daffFilterValidateRequestNameMatch: (request: DaffFilterRequest | DaffFilterToggleRequest, filter: DaffFilter) => void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { DaffFilterRequest, DaffFilter, DaffFilterToggleRequest } from '../../filterable/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* Ensures that the types of the filter and the filter request match.
|
|
4
|
-
*
|
|
5
|
-
* @throws {@link DaffFilterRequestTypeMismatch} if the types do not match.
|
|
6
|
-
*/
|
|
7
|
-
export declare const daffFilterValidateRequestTypeMatch: (request: DaffFilterRequest | DaffFilterToggleRequest, filter: DaffFilter) => void;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { MutationOptions, FetchResult } from '@apollo/client/core';
|
|
2
|
-
import { Apollo } from 'apollo-angular';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
/**
|
|
6
|
-
* A service that will queue mutate calls to Apollo.
|
|
7
|
-
* It will not send subsequent mutate requests until the previous one has been completed.
|
|
8
|
-
* This is useful for avoiding race conditions on the backend.
|
|
9
|
-
* This should be used alongside Apollo.
|
|
10
|
-
*/
|
|
11
|
-
export declare class DaffQueuedApollo {
|
|
12
|
-
private apollo;
|
|
13
|
-
queue: (() => void)[];
|
|
14
|
-
constructor(apollo: Apollo);
|
|
15
|
-
/**
|
|
16
|
-
* Queue up a mutate request.
|
|
17
|
-
* The request will not actually be queued until the returned observable is subscribed.
|
|
18
|
-
* If the queue is empty, the request will be sent when it enters the queue.
|
|
19
|
-
* Otherwise, it will be sent when it reaches the front of the queue.
|
|
20
|
-
* The observable will complete after it emits once.
|
|
21
|
-
*
|
|
22
|
-
* @param options Mutation options.
|
|
23
|
-
*/
|
|
24
|
-
mutate<T, V = Record<string, any>>(options: MutationOptions<T, V>): Observable<FetchResult<T>>;
|
|
25
|
-
private addRequestToQueue;
|
|
26
|
-
private finishRequestSubscription;
|
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffQueuedApollo, never>;
|
|
28
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffQueuedApollo>;
|
|
29
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ApolloQueryResult } from '@apollo/client/core';
|
|
2
|
-
/**
|
|
3
|
-
* A validator for a GraphQL Apollo response.
|
|
4
|
-
* Throws errors to indicate that the response is not valid.
|
|
5
|
-
* Returns the response and throws no errors to indicate that the response
|
|
6
|
-
* is valid as far as this particular validator is concerned.
|
|
7
|
-
*/
|
|
8
|
-
export type GraphQlApolloValidator<T> = (response: ApolloQueryResult<T>) => ApolloQueryResult<T>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DocumentNode } from 'graphql';
|
|
2
|
-
/**
|
|
3
|
-
* Builds a string of fragment definitions that can be interpolated into a GraphQL query.
|
|
4
|
-
* Each definition is separated by a newline character: '\n'.
|
|
5
|
-
*
|
|
6
|
-
* @param documents A list of GraphQL documents that should only contain fragments.
|
|
7
|
-
*/
|
|
8
|
-
export declare const daffBuildFragmentDefinition: (...documents: DocumentNode[]) => string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DocumentNode } from 'graphql';
|
|
2
|
-
export declare const getFragmentNames: (fragment: DocumentNode) => string[];
|
|
3
|
-
/**
|
|
4
|
-
* Builds a string of fragment names that can be interpolated into a GraphQL query.
|
|
5
|
-
* Each name is separated by a newline character: '\n'.
|
|
6
|
-
* If an empty array is passed, an empty string is returned.
|
|
7
|
-
* Only the first fragment name from each passed fragment is returned.
|
|
8
|
-
*
|
|
9
|
-
* @param fragments A list of GraphQL documents that contain fragments.
|
|
10
|
-
*/
|
|
11
|
-
export declare const daffBuildFragmentNameSpread: (...fragments: DocumentNode[]) => string;
|
package/graphql/public_api.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DaffIdentifiable } from './identifiable.interface';
|
|
2
|
-
/**
|
|
3
|
-
* Transforms an array of {@link DaffIdentifiable} objects to a dictionary of those objects keyed by ID.
|
|
4
|
-
*/
|
|
5
|
-
export declare const daffIdentifiableArrayToDict: <T extends DaffIdentifiable = DaffIdentifiable>(ary: T[]) => Record<T["id"], T>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { DaffConfigInjectionToken } from './config.type';
|
|
3
|
-
import { TokenDesc, TokenOptions } from './token-constuctor-params.type';
|
|
4
|
-
/**
|
|
5
|
-
* Creates an injection token/provider pair for a DI token that holds a configuration.
|
|
6
|
-
*
|
|
7
|
-
* See {@link DaffConfigInjectionToken}.
|
|
8
|
-
*/
|
|
9
|
-
export declare const createConfigInjectionToken: <T = unknown>(defaultConfig: T | InjectionToken<T>, desc: TokenDesc<T>, options?: Partial<TokenOptions<T>>) => DaffConfigInjectionToken<T>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, FactoryProvider } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* A injection token to hold and provide a config value.
|
|
4
|
-
*/
|
|
5
|
-
export interface DaffConfigInjectionToken<T = unknown> {
|
|
6
|
-
/**
|
|
7
|
-
* The injection token.
|
|
8
|
-
* Its default value is the default config passed during token creation.
|
|
9
|
-
*/
|
|
10
|
-
token: InjectionToken<T>;
|
|
11
|
-
/**
|
|
12
|
-
* A helper function to provide a value to the token.
|
|
13
|
-
* It will shallow merge the passed config with the default config
|
|
14
|
-
* with the passed config keys taking precedence.
|
|
15
|
-
* An injection token containing a config may also be passed.
|
|
16
|
-
*/
|
|
17
|
-
provider: <R extends T = T>(config: Partial<R> | InjectionToken<Partial<R>>) => FactoryProvider;
|
|
18
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffMultiInjectionToken } from './multi.type';
|
|
2
|
-
import { TokenDesc, TokenOptions } from './token-constuctor-params.type';
|
|
3
|
-
/**
|
|
4
|
-
* Creates an injection token/provider pair for a multi valued DI token.
|
|
5
|
-
*
|
|
6
|
-
* See {@link DaffMultiInjectionToken}.
|
|
7
|
-
*/
|
|
8
|
-
export declare const createMultiInjectionToken: <T = unknown>(desc: TokenDesc<Array<T>>, options?: Partial<TokenOptions<Array<T>>>) => DaffMultiInjectionToken<T>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* A injection token to hold and provide multiple values.
|
|
4
|
-
*/
|
|
5
|
-
export interface DaffMultiInjectionToken<T = unknown> {
|
|
6
|
-
/**
|
|
7
|
-
* The injection token.
|
|
8
|
-
* Its default value is an empty array.
|
|
9
|
-
*/
|
|
10
|
-
token: InjectionToken<Array<T>>;
|
|
11
|
-
/**
|
|
12
|
-
* A helper function to provide values to the token.
|
|
13
|
-
*/
|
|
14
|
-
provider: <R extends T = T>(...values: Array<R>) => Array<ValueProvider>;
|
|
15
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './single.type';
|
|
2
|
-
export * from './single.factory';
|
|
3
|
-
export * from './multi.type';
|
|
4
|
-
export * from './multi.factory';
|
|
5
|
-
export * from './config.type';
|
|
6
|
-
export * from './config.factory';
|
|
7
|
-
export * from './services.type';
|
|
8
|
-
export * from './services.factory';
|
|
9
|
-
export * from './singleton.type';
|
|
10
|
-
export * from './singleton.factory';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffServicesInjectionToken } from './services.type';
|
|
2
|
-
import { TokenDesc, TokenOptions } from './token-constuctor-params.type';
|
|
3
|
-
/**
|
|
4
|
-
* Creates an injection token/provider pair for a DI token that holds services.
|
|
5
|
-
*
|
|
6
|
-
* See {@link DaffServicesInjectionToken}.
|
|
7
|
-
*/
|
|
8
|
-
export declare const createServicesInjectionToken: <T = unknown>(desc: TokenDesc<Array<T>>, options?: Partial<TokenOptions<Array<T>>>) => DaffServicesInjectionToken<T>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ExistingProvider, InjectionToken, Type } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* A injection token to hold and provide multiple services.
|
|
4
|
-
*/
|
|
5
|
-
export interface DaffServicesInjectionToken<T = unknown> {
|
|
6
|
-
/**
|
|
7
|
-
* The injection token.
|
|
8
|
-
* Its default value is an empty array.
|
|
9
|
-
*/
|
|
10
|
-
token: InjectionToken<Array<T>>;
|
|
11
|
-
/**
|
|
12
|
-
* A helper function to provide service classes to the token.
|
|
13
|
-
*/
|
|
14
|
-
provider: <R extends T = T>(...classes: Array<Type<R>>) => Array<ExistingProvider>;
|
|
15
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffSingleInjectionToken } from './single.type';
|
|
2
|
-
import { TokenDesc, TokenOptions } from './token-constuctor-params.type';
|
|
3
|
-
/**
|
|
4
|
-
* Creates an injection token/provider pair for a single valued DI token.
|
|
5
|
-
*
|
|
6
|
-
* See {@link DaffSingleInjectionToken}.
|
|
7
|
-
*/
|
|
8
|
-
export declare const createSingleInjectionToken: <T = unknown>(desc: TokenDesc<T>, options?: TokenOptions<T>) => DaffSingleInjectionToken<T>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { InjectionToken, ValueProvider } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* A injection token to hold and provide a single value.
|
|
4
|
-
*/
|
|
5
|
-
export interface DaffSingleInjectionToken<T = unknown> {
|
|
6
|
-
/**
|
|
7
|
-
* The injection token.
|
|
8
|
-
*/
|
|
9
|
-
token: InjectionToken<T>;
|
|
10
|
-
/**
|
|
11
|
-
* A helper function to provide a value to the token.
|
|
12
|
-
*/
|
|
13
|
-
provider: <R extends T = T>(value: R) => ValueProvider;
|
|
14
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffSingletonInjectionToken } from './singleton.type';
|
|
2
|
-
import { TokenDesc, TokenOptions } from './token-constuctor-params.type';
|
|
3
|
-
/**
|
|
4
|
-
* Creates an injection token/provider pair for a DI token that holds a singleton service.
|
|
5
|
-
*
|
|
6
|
-
* See {@link DaffSingletonInjectionToken}.
|
|
7
|
-
*/
|
|
8
|
-
export declare const createSingletonInjectionToken: <T = unknown>(desc: TokenDesc<T>, options?: TokenOptions<T>) => DaffSingletonInjectionToken<T>;
|