@daffodil/core 0.88.1 → 0.90.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 +77 -21
- package/fesm2022/daffodil-core.mjs.map +1 -1
- package/graphql/index.d.ts +64 -1
- package/index.d.ts +1322 -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,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>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ExistingProvider, InjectionToken, Type } from '@angular/core';
|
|
2
|
-
/**
|
|
3
|
-
* A injection token to hold and provide a singleton service.
|
|
4
|
-
*/
|
|
5
|
-
export interface DaffSingletonInjectionToken<T = unknown> {
|
|
6
|
-
/**
|
|
7
|
-
* The injection token.
|
|
8
|
-
* Its default value is an empty array.
|
|
9
|
-
*/
|
|
10
|
-
token: InjectionToken<T>;
|
|
11
|
-
/**
|
|
12
|
-
* A helper function to provide the service class to the token.
|
|
13
|
-
*/
|
|
14
|
-
provider: <R extends T = T>(klass: Type<R>) => ExistingProvider;
|
|
15
|
-
}
|
package/kindable/public_api.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DaffKindable } from './kindable.interface';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An object that has a location referenced by a URL.
|
|
3
|
-
*/
|
|
4
|
-
export interface DaffLocatable {
|
|
5
|
-
/**
|
|
6
|
-
* The URL describing the location of the entity.
|
|
7
|
-
* It should be relative to the domain root with a leading slash, i.e. `/path/to/entity`.
|
|
8
|
-
*/
|
|
9
|
-
url: string;
|
|
10
|
-
}
|
package/merge/merge.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { DaffMergeStrategy } from './strategy.type';
|
|
2
|
-
/**
|
|
3
|
-
* Merges dictionaries with a specific strategy for handling collisions.
|
|
4
|
-
* @see {@link DaffMergeStrategy}.
|
|
5
|
-
*
|
|
6
|
-
* @example Merging two dictionaries with predefined mergers
|
|
7
|
-
*
|
|
8
|
-
* ```ts
|
|
9
|
-
* const a = {
|
|
10
|
-
* ary: [1, 2],
|
|
11
|
-
* obj: {foo: 5, bar: 10}
|
|
12
|
-
* }
|
|
13
|
-
* const a = {
|
|
14
|
-
* ary: [3, 4],
|
|
15
|
-
* obj: {foo: 6},
|
|
16
|
-
* fish: 'tacos'
|
|
17
|
-
* }
|
|
18
|
-
* const result = daffMerge(
|
|
19
|
-
* [a, b],
|
|
20
|
-
* {
|
|
21
|
-
* ary: daffArrayConcatMerger,
|
|
22
|
-
* obj: daffDictAssignMerger
|
|
23
|
-
* }
|
|
24
|
-
* )
|
|
25
|
-
* ```
|
|
26
|
-
* the value of result would be:
|
|
27
|
-
* ```ts
|
|
28
|
-
* {
|
|
29
|
-
* ary: [1, 2, 3, 4],
|
|
30
|
-
* obj: {foo: 6, bar: 10},
|
|
31
|
-
* fish: 'tacos'
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @example Merging two dictionaries with predefined mergers
|
|
36
|
-
*
|
|
37
|
-
* ```ts
|
|
38
|
-
* const a = {
|
|
39
|
-
* ary: [1, 2],
|
|
40
|
-
* obj: {foo: 5, bar: 10}
|
|
41
|
-
* }
|
|
42
|
-
* const a = {
|
|
43
|
-
* ary: [3, 4],
|
|
44
|
-
* obj: {foo: 6},
|
|
45
|
-
* fish: 'tacos'
|
|
46
|
-
* }
|
|
47
|
-
* const result = daffMerge(
|
|
48
|
-
* [a, b],
|
|
49
|
-
* {
|
|
50
|
-
* ary: daffArrayConcatMerger,
|
|
51
|
-
* obj: daffDictAssignMerger
|
|
52
|
-
* }
|
|
53
|
-
* )
|
|
54
|
-
* ```
|
|
55
|
-
* the value of result would be:
|
|
56
|
-
* ```ts
|
|
57
|
-
* {
|
|
58
|
-
* ary: [1, 2, 3, 4],
|
|
59
|
-
* obj: {foo: 6, bar: 10},
|
|
60
|
-
* fish: 'tacos'
|
|
61
|
-
* }
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
export declare const daffMerge: <T extends Record<string, unknown> = Record<string, unknown>>(dicts: Array<T>, strategy?: DaffMergeStrategy<T>) => T;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function daffArrayConcatMerger<T extends Array<unknown> = Array<unknown>>(a: T, b: T): T;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function daffDictAssignMerger<T extends Record<string, unknown> = Record<string, unknown>>(a: T, b: T): T;
|
package/merge/mergers/type.d.ts
DELETED
package/merge/public_api.d.ts
DELETED
package/merge/strategy.type.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { DaffMerger } from './mergers/public_api';
|
|
2
|
-
/**
|
|
3
|
-
* A strategy for merging objects of the same structure.
|
|
4
|
-
* Each key can contain a merger function for handling collisions.
|
|
5
|
-
*/
|
|
6
|
-
export type DaffMergeStrategy<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
7
|
-
[k in keyof T]?: DaffMerger<T[k]>;
|
|
8
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
/**
|
|
3
|
-
* Accepts a list of input observables and emits true when all of the inputs emit a truthy value.
|
|
4
|
-
* Does not emit until all of the input streams have emitted at least once.
|
|
5
|
-
*/
|
|
6
|
-
export declare const allOf: (items: Observable<boolean>[]) => Observable<boolean>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
/**
|
|
3
|
-
* Accepts a list of input observables and emits true when any of the inputs emit a truthy value.
|
|
4
|
-
* Does not emit until all of the input streams have emitted at least once.
|
|
5
|
-
*/
|
|
6
|
-
export declare const anyOf: (items: Observable<boolean>[]) => Observable<boolean>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retries failed Observables
|
|
3
|
-
*
|
|
4
|
-
* @param maxTries The maximum number of tries the observable will be tried
|
|
5
|
-
* @param ms The initial amount of time
|
|
6
|
-
*/
|
|
7
|
-
export declare function backoff(maxTries: number, ms: number): import("rxjs").UnaryFunction<import("rxjs").Observable<unknown>, import("rxjs").Observable<unknown>>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { DaffError } from '../errors/public_api';
|
|
3
|
-
/**
|
|
4
|
-
* Catches errors and invokes the callback with an array of errors.
|
|
5
|
-
*/
|
|
6
|
-
export declare const catchAndArrayifyErrors: <TReturn, TError extends DaffError = DaffError>(transformError: (errors: TError[]) => Observable<TReturn>) => import("rxjs").UnaryFunction<Observable<unknown>, Observable<TReturn>>;
|
package/orderable/orderable.d.ts
DELETED
package/public_api.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export { DaffLocatable } from './locateable/locateable.interface';
|
|
2
|
-
export { DaffCanonicallyLocatable } from './canonically-locateable/canonically-locateable.interface';
|
|
3
|
-
export { Constructable } from './constructable/constructable';
|
|
4
|
-
export * from './base64/public_api';
|
|
5
|
-
export * from './collection/public_api';
|
|
6
|
-
export * from './decorators/public_api';
|
|
7
|
-
export * from './errors/public_api';
|
|
8
|
-
export * from './filterable/public_api';
|
|
9
|
-
export * from './filters/public_api';
|
|
10
|
-
export * from './identifiable/public_api';
|
|
11
|
-
export * from './injection-tokens/public_api';
|
|
12
|
-
export * from './kindable/public_api';
|
|
13
|
-
export * from './merge/public_api';
|
|
14
|
-
export * from './operators/public_api';
|
|
15
|
-
export * from './storage/public_api';
|
|
16
|
-
export * from './types/public_api';
|
|
17
|
-
export * from './utils/public_api';
|
|
18
|
-
export * from './validator/public_api';
|
|
19
|
-
export { DaffOrderable } from './orderable/orderable';
|
|
20
|
-
export { MaybeAsync } from './async/maybe.type';
|
package/routing/public_api.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { DaffFilterEqualRequest } from '@daffodil/core';
|
|
2
|
-
import { DaffRoutingQueryParamFilterRequestBuilder } from './type';
|
|
3
|
-
/**
|
|
4
|
-
* A standard filter request builder that creates an equal filter request with the query params values.
|
|
5
|
-
*/
|
|
6
|
-
export declare const daffRoutingQueryParamFilterRequestEqualBuilder: DaffRoutingQueryParamFilterRequestBuilder<DaffFilterEqualRequest>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ParamMap } from '@angular/router';
|
|
2
|
-
import { DaffFilterRequest } from '@daffodil/core';
|
|
3
|
-
/**
|
|
4
|
-
* Accepts a list of values set to a particular URL query param and returns a filter request.
|
|
5
|
-
*/
|
|
6
|
-
export type DaffRoutingQueryParamFilterRequestBuilder<T extends DaffFilterRequest = DaffFilterRequest> = (filterName: string, qpValue: ReturnType<ParamMap['getAll']>) => T;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DaffFilter } from '@daffodil/core';
|
|
2
|
-
import { DaffRoutingQueryParamFilterRequestBuilder } from './request-builder/type';
|
|
3
|
-
export interface DaffRoutingQueryParamFilter {
|
|
4
|
-
/**
|
|
5
|
-
* The name of the filter.
|
|
6
|
-
*/
|
|
7
|
-
filterName: DaffFilter['name'];
|
|
8
|
-
/**
|
|
9
|
-
* The query param to use for this filter.
|
|
10
|
-
*/
|
|
11
|
-
queryParam: string;
|
|
12
|
-
/**
|
|
13
|
-
* The filter request builder.
|
|
14
|
-
*/
|
|
15
|
-
builder: DaffRoutingQueryParamFilterRequestBuilder;
|
|
16
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { UrlSerializer } from '@angular/router';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
/**
|
|
4
|
-
* Processes URIs to remove extraneous Angular-specific information.
|
|
5
|
-
*/
|
|
6
|
-
export declare class DaffRoutingUriNormalizer {
|
|
7
|
-
private urlParser;
|
|
8
|
-
constructor(urlParser: UrlSerializer);
|
|
9
|
-
/**
|
|
10
|
-
* Normalizes an Angular router path into a useable URI.
|
|
11
|
-
* e.g. `normalize('some/url.html(secondary:outlet)?query=param#fragment')` -> `'some/url.html?query=param#fragment'`
|
|
12
|
-
*
|
|
13
|
-
* Optionally accepts an outlet to target.
|
|
14
|
-
* e.g. `normalize('some/url.html(secondary:outlet)?query=param#fragment', 'secondary')` -> `'outlet?query=param#fragment'`
|
|
15
|
-
*
|
|
16
|
-
* @param uri The URI to normalize.
|
|
17
|
-
* @param outlet An optional outlet to process into a URI.
|
|
18
|
-
*/
|
|
19
|
-
normalize(uri: string, outlet?: string): string;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DaffRoutingUriNormalizer, never>;
|
|
21
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<DaffRoutingUriNormalizer>;
|
|
22
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Truncates the file extension from the end of the URI.
|
|
3
|
-
* Captures the truncated URI in the `uri` named group.
|
|
4
|
-
*/
|
|
5
|
-
export declare const DAFF_TRUNCATE_FILE_EXTENSION_REGEX: RegExp;
|
|
6
|
-
/**
|
|
7
|
-
* Truncates the file extension from the end of the URI.
|
|
8
|
-
*/
|
|
9
|
-
export declare const daffUriTruncateFileExtension: (uri: string) => string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A regex to truncate the leading slash from a URI,
|
|
3
|
-
* capturing the truncated in the `uri` group.
|
|
4
|
-
* e.g. /foo/bar/baz.html -> foo/bar/baz.html
|
|
5
|
-
*/
|
|
6
|
-
export declare const DAFF_TRUNCATE_LEADING_SLASH_REGEX: RegExp;
|
|
7
|
-
/**
|
|
8
|
-
* Truncates the leading slash from a URI.
|
|
9
|
-
* e.g. /foo/bar/baz.html -> foo/bar/baz.html
|
|
10
|
-
*/
|
|
11
|
-
export declare const daffUriTruncateLeadingSlash: (uri: string) => string;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { daffUriTruncateFileExtension, DAFF_TRUNCATE_FILE_EXTENSION_REGEX, } from './file-extension';
|
|
2
|
-
export { daffUriTruncateLeadingPathSegments } from './leading-path-segments';
|
|
3
|
-
export { daffUriTruncateLeadingSlash, DAFF_TRUNCATE_LEADING_SLASH_REGEX, } from './leading-slash';
|
|
4
|
-
export { daffUriTruncateQueryFragment } from './query-fragment';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { DaffStateError } from '../errors/state-error.interface';
|
|
3
|
-
export interface DaffFailable {
|
|
4
|
-
/**
|
|
5
|
-
* A list of errors that occured during the operation.
|
|
6
|
-
*/
|
|
7
|
-
readonly payload: DaffStateError[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* An action that represents a failure of an operation.
|
|
11
|
-
*/
|
|
12
|
-
export interface DaffFailureAction extends DaffFailable, Action {
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './failure.type';
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { DaffCollectionMetadata, DaffFilterRequest, DaffFilterToggleRequest } from '@daffodil/core';
|
|
3
|
-
/**
|
|
4
|
-
* An action for changing the number of items shown on each page for this collection.
|
|
5
|
-
*/
|
|
6
|
-
export interface DaffCollectionChangePageSize extends Action {
|
|
7
|
-
/**
|
|
8
|
-
* The number of items per page.
|
|
9
|
-
*/
|
|
10
|
-
readonly pageSize: DaffCollectionMetadata['pageSize'];
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* An action for changing the current page of items for this collection.
|
|
14
|
-
*/
|
|
15
|
-
export interface DaffCollectionChangeCurrentPage extends Action {
|
|
16
|
-
/**
|
|
17
|
-
* The current page of items for this collection.
|
|
18
|
-
*/
|
|
19
|
-
readonly currentPage: DaffCollectionMetadata['currentPage'];
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* An action for changing the sorting option for this collection.
|
|
23
|
-
*/
|
|
24
|
-
export interface DaffCollectionChangeSortingOption extends Action {
|
|
25
|
-
/**
|
|
26
|
-
* The sort option to be applied.
|
|
27
|
-
*/
|
|
28
|
-
readonly sort: {
|
|
29
|
-
option: DaffCollectionMetadata['appliedSortOption'];
|
|
30
|
-
direction: DaffCollectionMetadata['appliedSortDirection'];
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* An action for replacing the filters for the collection.
|
|
35
|
-
* All existing filters will be removed and the specified filters will be applied.
|
|
36
|
-
*/
|
|
37
|
-
export interface DaffCollectionReplaceFilters extends Action {
|
|
38
|
-
/**
|
|
39
|
-
* Filters to be set on the collection.
|
|
40
|
-
*/
|
|
41
|
-
readonly filters: DaffFilterRequest[];
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* An action for applying the specified filters for the collection.
|
|
45
|
-
*/
|
|
46
|
-
export interface DaffCollectionApplyFilters extends Action {
|
|
47
|
-
/**
|
|
48
|
-
* Filters to be applied to the collection.
|
|
49
|
-
*/
|
|
50
|
-
readonly filters: DaffFilterRequest[];
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* An action for removing the specified filters for the collection.
|
|
54
|
-
*/
|
|
55
|
-
export interface DaffCollectionRemoveFilters extends Action {
|
|
56
|
-
/**
|
|
57
|
-
* Filters to be removed from the collection.
|
|
58
|
-
*/
|
|
59
|
-
readonly filters: DaffFilterRequest[];
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* An action for removing all the filters for the collection.
|
|
63
|
-
*/
|
|
64
|
-
export type DaffCollectionClearFilters = Action;
|
|
65
|
-
/**
|
|
66
|
-
* An action for toggling a filters for the collection.
|
|
67
|
-
*/
|
|
68
|
-
export interface DaffCollectionToggleFilter extends Action {
|
|
69
|
-
/**
|
|
70
|
-
* Filter to be toggled on the collection.
|
|
71
|
-
*/
|
|
72
|
-
readonly filter: DaffFilterToggleRequest;
|
|
73
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { DaffCollectionMetadata, DaffCollectionRequest, DaffFilters } from '@daffodil/core';
|
|
2
|
-
/**
|
|
3
|
-
* Provides an abstracted way to manage a collection state.
|
|
4
|
-
*/
|
|
5
|
-
export declare class DaffCollectionStateAdapter<T extends DaffCollectionMetadata = DaffCollectionMetadata> {
|
|
6
|
-
/**
|
|
7
|
-
* Stores a collection request in state.
|
|
8
|
-
* This is useful when you want to preemptively reduce a request before waiting for a response.
|
|
9
|
-
*/
|
|
10
|
-
storeRequest(request: DaffCollectionRequest, state: T): T;
|
|
11
|
-
/**
|
|
12
|
-
* Sets the page size.
|
|
13
|
-
*/
|
|
14
|
-
setPageSize(size: number, state: T): T;
|
|
15
|
-
/**
|
|
16
|
-
* Sets the current page.
|
|
17
|
-
*/
|
|
18
|
-
setCurrentPage(page: number, state: T): T;
|
|
19
|
-
/**
|
|
20
|
-
* Sets the sorting option and direction.
|
|
21
|
-
*/
|
|
22
|
-
setSort(option: string, direction: string, state: T): T;
|
|
23
|
-
/**
|
|
24
|
-
* Sets the collection filters.
|
|
25
|
-
*/
|
|
26
|
-
setFilters(filters: DaffFilters, state: T): T;
|
|
27
|
-
/**
|
|
28
|
-
* Set the entire collection metadata at once.
|
|
29
|
-
*/
|
|
30
|
-
setMetadata(metadata: DaffCollectionMetadata, state: T): T;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Create the adapter for the collection state.
|
|
34
|
-
*/
|
|
35
|
-
export declare const getCollectionStateAdapter: <T extends DaffCollectionMetadata = DaffCollectionMetadata>() => DaffCollectionStateAdapter<T>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Store, Action } from '@ngrx/store';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffCollectionMetadata, DaffCollectionRequest, DaffFilters, DaffSortDirectionEnum, DaffSortOption } from '@daffodil/core';
|
|
4
|
-
import { DaffCollectionFacadeInterface } from './facade.interface';
|
|
5
|
-
import { DaffCollectionMemoizedSelectors } from './selector-factory';
|
|
6
|
-
/**
|
|
7
|
-
* An abstract class for a collection facade.
|
|
8
|
-
* It is configurable via its constructor parameters.
|
|
9
|
-
* The particular collection state from which
|
|
10
|
-
* this facade will read is determined by the selectors passed.
|
|
11
|
-
*
|
|
12
|
-
* @inheritdoc
|
|
13
|
-
*/
|
|
14
|
-
export declare abstract class DaffCollectionFacade<TState, TMetadata extends DaffCollectionMetadata = DaffCollectionMetadata> implements DaffCollectionFacadeInterface<TMetadata> {
|
|
15
|
-
protected store: Store<TState>;
|
|
16
|
-
metadata$: Observable<TMetadata>;
|
|
17
|
-
request$: Observable<DaffCollectionRequest>;
|
|
18
|
-
count$: Observable<number>;
|
|
19
|
-
currentPage$: Observable<number>;
|
|
20
|
-
totalPages$: Observable<number>;
|
|
21
|
-
pageSize$: Observable<number>;
|
|
22
|
-
sortOptions$: Observable<DaffSortOption[]>;
|
|
23
|
-
appliedSortOption$: Observable<string>;
|
|
24
|
-
appliedSortDirection$: Observable<DaffSortDirectionEnum>;
|
|
25
|
-
filters$: Observable<DaffFilters>;
|
|
26
|
-
appliedFilters$: Observable<DaffFilters>;
|
|
27
|
-
constructor(store: Store<TState>, selectors: DaffCollectionMemoizedSelectors<TState, TMetadata>);
|
|
28
|
-
/**
|
|
29
|
-
* Dispatches the given action.
|
|
30
|
-
*
|
|
31
|
-
* @param action action to dispatch.
|
|
32
|
-
*/
|
|
33
|
-
dispatch(action: Action): void;
|
|
34
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Action } from '@ngrx/store';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { DaffFilters, DaffSortDirectionEnum, DaffSortOption } from '@daffodil/core';
|
|
4
|
-
import { DaffCollectionMetadata, DaffCollectionRequest } from '@daffodil/core';
|
|
5
|
-
import { DaffStoreFacade } from '../store/facade';
|
|
6
|
-
/**
|
|
7
|
-
* A facade for interacting with a collection state.
|
|
8
|
-
*/
|
|
9
|
-
export interface DaffCollectionFacadeInterface<TMetadata extends DaffCollectionMetadata = DaffCollectionMetadata> extends DaffStoreFacade<Action> {
|
|
10
|
-
/**
|
|
11
|
-
* The page metadata for the collection.
|
|
12
|
-
*/
|
|
13
|
-
metadata$: Observable<TMetadata>;
|
|
14
|
-
/**
|
|
15
|
-
* Builds a request that matches the current collection.
|
|
16
|
-
*/
|
|
17
|
-
request$: Observable<DaffCollectionRequest>;
|
|
18
|
-
/**
|
|
19
|
-
* The number of items in the collection.
|
|
20
|
-
*/
|
|
21
|
-
count$: Observable<number>;
|
|
22
|
-
/**
|
|
23
|
-
* The current page of items for the collection.
|
|
24
|
-
*/
|
|
25
|
-
currentPage$: Observable<number>;
|
|
26
|
-
/**
|
|
27
|
-
* The number of pages of items available in the collection.
|
|
28
|
-
*/
|
|
29
|
-
totalPages$: Observable<number>;
|
|
30
|
-
/**
|
|
31
|
-
* The number of items per page for the collection.
|
|
32
|
-
*/
|
|
33
|
-
pageSize$: Observable<number>;
|
|
34
|
-
/**
|
|
35
|
-
* The sort options available for the items of the collection.
|
|
36
|
-
*/
|
|
37
|
-
sortOptions$: Observable<DaffSortOption[]>;
|
|
38
|
-
/**
|
|
39
|
-
* The sort options available for the items of the collection.
|
|
40
|
-
*/
|
|
41
|
-
appliedSortOption$: Observable<string>;
|
|
42
|
-
/**
|
|
43
|
-
* The sort options available for the items of the collection.
|
|
44
|
-
*/
|
|
45
|
-
appliedSortDirection$: Observable<DaffSortDirectionEnum>;
|
|
46
|
-
/**
|
|
47
|
-
* The filters available for the entities of the collection.
|
|
48
|
-
*/
|
|
49
|
-
filters$: Observable<DaffFilters>;
|
|
50
|
-
/**
|
|
51
|
-
* The sort options available for the entities of the collection.
|
|
52
|
-
*/
|
|
53
|
-
appliedFilters$: Observable<DaffFilters>;
|
|
54
|
-
}
|