@ngxs/store 3.8.2 → 18.0.0-dev.master-f4c2c19
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/README.md +1 -1
- package/{esm2015/index.js → esm2022/index.mjs} +2 -2
- package/esm2022/internals/custom-rxjs-subjects.mjs +92 -0
- package/esm2022/internals/index.mjs +10 -0
- package/esm2022/internals/initial-state.mjs +18 -0
- package/esm2022/internals/internal-tokens.mjs +6 -0
- package/esm2022/internals/memoize.mjs +45 -0
- package/esm2022/internals/metadata.mjs +57 -0
- package/esm2022/internals/ngxs-app-bootstrapped-state.mjs +19 -0
- package/esm2022/internals/state-stream.mjs +32 -0
- package/esm2022/internals/state-token.mjs +17 -0
- package/esm2022/internals/symbols.mjs +11 -0
- package/esm2022/internals/testing/fresh-platform.mjs +72 -0
- package/{esm2015/internals/testing/helpers/ngxs-test.component.js → esm2022/internals/testing/helpers/ngxs-test.component.mjs} +4 -4
- package/esm2022/internals/testing/helpers/ngxs-test.module.mjs +20 -0
- package/{esm2015/internals/testing/index.js → esm2022/internals/testing/index.mjs} +2 -2
- package/esm2022/internals/testing/ngxs.setup.mjs +48 -0
- package/{esm2015/internals/testing/skip-console-logging.js → esm2022/internals/testing/skip-console-logging.mjs} +1 -1
- package/esm2022/internals/testing/symbol.mjs +2 -0
- package/esm2022/operators/append.mjs +20 -0
- package/esm2022/operators/iif.mjs +38 -0
- package/esm2022/operators/insert-item.mjs +29 -0
- package/esm2022/operators/patch.mjs +21 -0
- package/esm2022/operators/remove-item.mjs +22 -0
- package/esm2022/operators/update-item.mjs +40 -0
- package/esm2022/plugins/actions.mjs +16 -0
- package/esm2022/plugins/index.mjs +4 -0
- package/esm2022/plugins/ngxs-store-plugins.mjs +5 -0
- package/esm2022/plugins/symbols.mjs +6 -0
- package/esm2022/plugins/utils.mjs +51 -0
- package/esm2022/src/actions/symbols.mjs +2 -0
- package/esm2022/src/actions-stream.mjs +52 -0
- package/esm2022/src/configs/messages.config.mjs +48 -0
- package/esm2022/src/decorators/action.mjs +31 -0
- package/esm2022/src/decorators/select/select-factory.mjs +29 -0
- package/esm2022/src/decorators/select/select.mjs +29 -0
- package/esm2022/src/decorators/select/symbols.mjs +29 -0
- package/esm2022/src/decorators/selector/selector.mjs +29 -0
- package/esm2022/src/decorators/selector/symbols.mjs +2 -0
- package/esm2022/src/decorators/selector-options.mjs +21 -0
- package/esm2022/src/decorators/state.mjs +35 -0
- package/esm2022/src/dev-features/ngxs-development.module.mjs +28 -0
- package/esm2022/src/dev-features/ngxs-unhandled-actions-logger.mjs +45 -0
- package/esm2022/src/dev-features/symbols.mjs +7 -0
- package/esm2022/src/execution/dispatch-outside-zone-ngxs-execution-strategy.mjs +55 -0
- package/{esm2015/src/execution/internal-ngxs-execution-strategy.js → esm2022/src/execution/internal-ngxs-execution-strategy.mjs} +6 -6
- package/{esm2015/src/execution/noop-ngxs-execution-strategy.js → esm2022/src/execution/noop-ngxs-execution-strategy.mjs} +4 -4
- package/esm2022/src/execution/symbols.mjs +29 -0
- package/esm2022/src/internal/dispatcher.mjs +106 -0
- package/esm2022/src/internal/fallback-subscriber.mjs +29 -0
- package/esm2022/src/internal/internals.mjs +206 -0
- package/esm2022/src/internal/lifecycle-state-manager.mjs +86 -0
- package/esm2022/src/internal/state-context-factory.mjs +71 -0
- package/esm2022/src/internal/state-factory.mjs +311 -0
- package/esm2022/src/internal/state-operations.mjs +63 -0
- package/esm2022/src/internal/state-operators.mjs +20 -0
- package/esm2022/src/internal/unhandled-rxjs-error-callback.mjs +39 -0
- package/esm2022/src/ivy/ivy-enabled-in-dev-mode.mjs +25 -0
- package/esm2022/src/module.mjs +27 -0
- package/esm2022/src/modules/ngxs-feature.module.mjs +18 -0
- package/esm2022/src/modules/ngxs-root.module.mjs +18 -0
- package/esm2022/src/ngxs-unhandled-error-handler.mjs +29 -0
- package/esm2022/src/operators/of-action.mjs +104 -0
- package/esm2022/src/plugin-manager.mjs +37 -0
- package/esm2022/src/plugin_api.mjs +2 -0
- package/{esm2015/src/private_api.js → esm2022/src/private_api.mjs} +2 -1
- package/esm2022/src/public_api.mjs +20 -0
- package/esm2022/src/selectors/create-model-selector.mjs +30 -0
- package/esm2022/src/selectors/create-pick-selector.mjs +16 -0
- package/esm2022/src/selectors/create-property-selectors.mjs +20 -0
- package/esm2022/src/selectors/create-selector.mjs +9 -0
- package/esm2022/src/selectors/private_api.mjs +2 -0
- package/esm2022/src/selectors/selector-checks.util.mjs +18 -0
- package/esm2022/src/selectors/selector-metadata.mjs +35 -0
- package/esm2022/src/selectors/selector-models.mjs +2 -0
- package/esm2022/src/selectors/selector-types.util.mjs +2 -0
- package/esm2022/src/selectors/selector-utils.mjs +95 -0
- package/esm2022/src/standalone-features/feature-providers.mjs +20 -0
- package/esm2022/src/standalone-features/index.mjs +5 -0
- package/esm2022/src/standalone-features/initializers.mjs +89 -0
- package/esm2022/src/standalone-features/plugin.mjs +20 -0
- package/esm2022/src/standalone-features/preboot.mjs +32 -0
- package/esm2022/src/standalone-features/provide-states.mjs +26 -0
- package/esm2022/src/standalone-features/provide-store.mjs +26 -0
- package/esm2022/src/standalone-features/root-providers.mjs +47 -0
- package/esm2022/src/store.mjs +117 -0
- package/esm2022/src/symbols.mjs +87 -0
- package/esm2022/src/utils/compose.mjs +26 -0
- package/esm2022/src/utils/create-dispatch-map.mjs +11 -0
- package/esm2022/src/utils/create-select-map.mjs +13 -0
- package/esm2022/src/utils/dispatch.mjs +7 -0
- package/{esm2015/src/utils/freeze.js → esm2022/src/utils/freeze.mjs} +1 -1
- package/esm2022/src/utils/public_api.mjs +5 -0
- package/esm2022/src/utils/select.mjs +19 -0
- package/esm2022/src/utils/store-validators.mjs +25 -0
- package/{fesm2015/ngxs-store-internals-testing.js → fesm2022/ngxs-store-internals-testing.mjs} +84 -81
- package/fesm2022/ngxs-store-internals-testing.mjs.map +1 -0
- package/fesm2022/ngxs-store-internals.mjs +296 -0
- package/fesm2022/ngxs-store-internals.mjs.map +1 -0
- package/{fesm2015/ngxs-store-operators.js → fesm2022/ngxs-store-operators.mjs} +3 -3
- package/fesm2022/ngxs-store-operators.mjs.map +1 -0
- package/fesm2022/ngxs-store-plugins.mjs +80 -0
- package/fesm2022/ngxs-store-plugins.mjs.map +1 -0
- package/{fesm2015/ngxs-store.js → fesm2022/ngxs-store.mjs} +1319 -1265
- package/fesm2022/ngxs-store.mjs.map +1 -0
- package/index.d.ts +1 -1
- package/{src/internal → internals}/custom-rxjs-subjects.d.ts +2 -2
- package/internals/index.d.ts +8 -4
- package/internals/initial-state.d.ts +5 -5
- package/internals/memoize.d.ts +1 -1
- package/internals/metadata.d.ts +25 -0
- package/internals/ngxs-app-bootstrapped-state.d.ts +8 -0
- package/internals/state-stream.d.ts +15 -0
- package/internals/state-token.d.ts +7 -0
- package/internals/symbols.d.ts +84 -3
- package/internals/testing/helpers/ngxs-test.component.d.ts +1 -1
- package/internals/testing/index.d.ts +2 -2
- package/internals/testing/symbol.d.ts +2 -2
- package/operators/patch.d.ts +2 -2
- package/operators/types.d.ts +5 -5
- package/operators/utils.d.ts +1 -1
- package/package.json +44 -13
- package/{src/actions → plugins}/actions.d.ts +3 -3
- package/plugins/index.d.ts +3 -0
- package/plugins/symbols.d.ts +13 -0
- package/{src/utils → plugins}/utils.d.ts +0 -17
- package/schematics/collection.json +36 -0
- package/schematics/src/actions/actions.factory.d.ts +3 -0
- package/schematics/src/actions/actions.factory.js +24 -0
- package/schematics/src/actions/actions.factory.js.map +1 -0
- package/schematics/src/actions/files/__name__.actions.ts__template__ +4 -0
- package/schematics/src/actions/schema.json +35 -0
- package/schematics/src/ng-add/add-declaration.d.ts +4 -0
- package/schematics/src/ng-add/add-declaration.js +109 -0
- package/schematics/src/ng-add/add-declaration.js.map +1 -0
- package/schematics/src/ng-add/ng-add.factory.d.ts +9 -0
- package/schematics/src/ng-add/ng-add.factory.js +89 -0
- package/schematics/src/ng-add/ng-add.factory.js.map +1 -0
- package/schematics/src/ng-add/schema.json +72 -0
- package/schematics/src/starter-kit/files/store/auth/auth.actions.ts__template__ +6 -0
- package/schematics/src/starter-kit/files/store/auth/auth.state.spec.ts__template__ +55 -0
- package/schematics/src/starter-kit/files/store/auth/auth.state.ts__template__ +47 -0
- package/schematics/src/starter-kit/files/store/dashboard/index.ts__template__ +4 -0
- package/schematics/src/starter-kit/files/store/dashboard/states/dictionary/dictionary.actions.ts__template__ +10 -0
- package/schematics/src/starter-kit/files/store/dashboard/states/dictionary/dictionary.state.spec.ts__template__ +92 -0
- package/schematics/src/starter-kit/files/store/dashboard/states/dictionary/dictionary.state.ts__template__ +62 -0
- package/schematics/src/starter-kit/files/store/dashboard/states/user/user.actions.ts__template__ +6 -0
- package/schematics/src/starter-kit/files/store/dashboard/states/user/user.state.spec.ts__template__ +61 -0
- package/schematics/src/starter-kit/files/store/dashboard/states/user/user.state.ts__template__ +42 -0
- package/schematics/src/starter-kit/files/store/store.config.ts__template__ +39 -0
- package/schematics/src/starter-kit/files/store/store.module.ts__template__ +22 -0
- package/schematics/src/starter-kit/schema.json +22 -0
- package/schematics/src/starter-kit/starter-kit.factory.d.ts +3 -0
- package/schematics/src/starter-kit/starter-kit.factory.js +21 -0
- package/schematics/src/starter-kit/starter-kit.factory.js.map +1 -0
- package/schematics/src/state/files/__name__.state.spec.ts__template__ +25 -0
- package/schematics/src/state/files/__name__.state.ts__template__ +22 -0
- package/schematics/src/state/schema.json +44 -0
- package/schematics/src/state/state.factory.d.ts +3 -0
- package/schematics/src/state/state.factory.js +29 -0
- package/schematics/src/state/state.factory.js.map +1 -0
- package/schematics/src/store/files/__name__.actions.ts__template__ +4 -0
- package/schematics/src/store/files/__name__.state.spec.ts__template__ +26 -0
- package/schematics/src/store/files/__name__.state.ts__template__ +29 -0
- package/schematics/src/store/schema.json +44 -0
- package/schematics/src/store/store.factory.d.ts +3 -0
- package/schematics/src/store/store.factory.js +29 -0
- package/schematics/src/store/store.factory.js.map +1 -0
- package/schematics/src/utils/common/lib.config.d.ts +10 -0
- package/schematics/src/utils/common/lib.config.js +15 -0
- package/schematics/src/utils/common/lib.config.js.map +1 -0
- package/schematics/src/utils/common/project-files.config.d.ts +3 -0
- package/schematics/src/utils/common/project-files.config.js +7 -0
- package/schematics/src/utils/common/project-files.config.js.map +1 -0
- package/schematics/src/utils/common/properties.d.ts +1 -0
- package/schematics/src/utils/common/properties.js +8 -0
- package/schematics/src/utils/common/properties.js.map +1 -0
- package/schematics/src/utils/config.d.ts +119 -0
- package/schematics/src/utils/config.js +21 -0
- package/schematics/src/utils/config.js.map +1 -0
- package/schematics/src/utils/generate-utils.d.ts +4 -0
- package/schematics/src/utils/generate-utils.js +14 -0
- package/schematics/src/utils/generate-utils.js.map +1 -0
- package/schematics/src/utils/interfaces/package.interface.d.ts +7 -0
- package/schematics/src/utils/interfaces/package.interface.js +3 -0
- package/schematics/src/utils/interfaces/package.interface.js.map +1 -0
- package/schematics/src/utils/ng-utils/README.md +1 -0
- package/schematics/src/utils/ng-utils/ast-utils.d.ts +99 -0
- package/schematics/src/utils/ng-utils/ast-utils.js +517 -0
- package/schematics/src/utils/ng-utils/ast-utils.js.map +1 -0
- package/schematics/src/utils/ng-utils/ng-ast-utils.d.ts +5 -0
- package/schematics/src/utils/ng-utils/ng-ast-utils.js +67 -0
- package/schematics/src/utils/ng-utils/ng-ast-utils.js.map +1 -0
- package/schematics/src/utils/ng-utils/project.d.ts +2 -0
- package/schematics/src/utils/ng-utils/project.js +27 -0
- package/schematics/src/utils/ng-utils/project.js.map +1 -0
- package/schematics/src/utils/ng-utils/standalone/app_config.d.ts +16 -0
- package/schematics/src/utils/ng-utils/standalone/app_config.js +84 -0
- package/schematics/src/utils/ng-utils/standalone/app_config.js.map +1 -0
- package/schematics/src/utils/ng-utils/standalone/code_block.d.ts +46 -0
- package/schematics/src/utils/ng-utils/standalone/code_block.js +73 -0
- package/schematics/src/utils/ng-utils/standalone/code_block.js.map +1 -0
- package/schematics/src/utils/ng-utils/standalone/index.d.ts +1 -0
- package/schematics/src/utils/ng-utils/standalone/index.js +7 -0
- package/schematics/src/utils/ng-utils/standalone/index.js.map +1 -0
- package/schematics/src/utils/ng-utils/standalone/rules.d.ts +38 -0
- package/schematics/src/utils/ng-utils/standalone/rules.js +195 -0
- package/schematics/src/utils/ng-utils/standalone/rules.js.map +1 -0
- package/schematics/src/utils/ng-utils/standalone/util.d.ts +28 -0
- package/schematics/src/utils/ng-utils/standalone/util.js +138 -0
- package/schematics/src/utils/ng-utils/standalone/util.js.map +1 -0
- package/schematics/src/utils/normalize-options.d.ts +11 -0
- package/schematics/src/utils/normalize-options.js +27 -0
- package/schematics/src/utils/normalize-options.js.map +1 -0
- package/schematics/src/utils/project.d.ts +19 -0
- package/schematics/src/utils/project.js +46 -0
- package/schematics/src/utils/project.js.map +1 -0
- package/schematics/src/utils/versions.json +3 -0
- package/src/actions/symbols.d.ts +3 -17
- package/src/actions-stream.d.ts +2 -2
- package/src/configs/messages.config.d.ts +3 -1
- package/src/decorators/action.d.ts +28 -3
- package/src/decorators/select/select.d.ts +3 -0
- package/src/decorators/select/symbols.d.ts +2 -3
- package/src/decorators/selector/selector.d.ts +2 -3
- package/src/decorators/selector/symbols.d.ts +73 -4
- package/src/decorators/selector-options.d.ts +2 -2
- package/src/decorators/state.d.ts +2 -3
- package/src/dev-features/ngxs-development.module.d.ts +1 -0
- package/src/execution/symbols.d.ts +8 -2
- package/src/internal/dispatcher.d.ts +5 -5
- package/src/internal/fallback-subscriber.d.ts +3 -0
- package/src/internal/internals.d.ts +13 -69
- package/src/internal/lifecycle-state-manager.d.ts +6 -6
- package/src/internal/state-factory.d.ts +8 -6
- package/src/internal/state-operations.d.ts +2 -2
- package/src/internal/unhandled-rxjs-error-callback.d.ts +2 -0
- package/src/module.d.ts +3 -14
- package/src/modules/ngxs-feature.module.d.ts +2 -9
- package/src/modules/ngxs-root.module.d.ts +2 -9
- package/src/ngxs-unhandled-error-handler.d.ts +16 -0
- package/src/operators/of-action.d.ts +3 -3
- package/src/plugin-manager.d.ts +1 -1
- package/src/plugin_api.d.ts +1 -5
- package/src/private_api.d.ts +1 -0
- package/src/public_api.d.ts +11 -8
- package/src/selectors/create-model-selector.d.ts +2 -2
- package/src/selectors/create-pick-selector.d.ts +1 -1
- package/src/selectors/create-property-selectors.d.ts +3 -3
- package/src/selectors/create-selector.d.ts +10 -10
- package/src/selectors/private_api.d.ts +7 -0
- package/src/selectors/selector-checks.util.d.ts +2 -2
- package/src/selectors/selector-metadata.d.ts +4 -4
- package/src/selectors/selector-models.d.ts +4 -4
- package/src/selectors/selector-types.util.d.ts +6 -7
- package/src/selectors/selector-utils.d.ts +3 -3
- package/src/standalone-features/feature-providers.d.ts +7 -0
- package/src/standalone-features/index.d.ts +4 -0
- package/src/standalone-features/initializers.d.ts +29 -0
- package/src/standalone-features/plugin.d.ts +17 -0
- package/src/standalone-features/preboot.d.ts +26 -0
- package/src/standalone-features/provide-states.d.ts +18 -0
- package/src/standalone-features/provide-store.d.ts +22 -0
- package/src/standalone-features/root-providers.d.ts +8 -0
- package/src/store.d.ts +13 -15
- package/src/symbols.d.ts +12 -54
- package/src/utils/compose.d.ts +1 -1
- package/src/utils/create-dispatch-map.d.ts +4 -0
- package/src/utils/create-select-map.d.ts +4 -0
- package/src/utils/dispatch.d.ts +2 -0
- package/src/utils/public_api.d.ts +4 -0
- package/src/utils/select.d.ts +16 -0
- package/src/utils/store-validators.d.ts +4 -3
- package/bundles/ngxs-store-internals-testing.umd.js +0 -684
- package/bundles/ngxs-store-internals-testing.umd.js.map +0 -1
- package/bundles/ngxs-store-internals.umd.js +0 -141
- package/bundles/ngxs-store-internals.umd.js.map +0 -1
- package/bundles/ngxs-store-operators.umd.js +0 -224
- package/bundles/ngxs-store-operators.umd.js.map +0 -1
- package/bundles/ngxs-store.umd.js +0 -3076
- package/bundles/ngxs-store.umd.js.map +0 -1
- package/esm2015/internals/index.js +0 -5
- package/esm2015/internals/initial-state.js +0 -17
- package/esm2015/internals/internal-tokens.js +0 -5
- package/esm2015/internals/memoize.js +0 -45
- package/esm2015/internals/ngxs-bootstrapper.js +0 -29
- package/esm2015/internals/src/symbols.js +0 -2
- package/esm2015/internals/symbols.js +0 -2
- package/esm2015/internals/testing/fresh-platform.js +0 -70
- package/esm2015/internals/testing/helpers/ngxs-test.module.js +0 -21
- package/esm2015/internals/testing/ngxs.setup.js +0 -46
- package/esm2015/internals/testing/symbol.js +0 -2
- package/esm2015/operators/append.js +0 -20
- package/esm2015/operators/iif.js +0 -38
- package/esm2015/operators/insert-item.js +0 -29
- package/esm2015/operators/patch.js +0 -21
- package/esm2015/operators/remove-item.js +0 -22
- package/esm2015/operators/update-item.js +0 -40
- package/esm2015/src/actions/actions.js +0 -16
- package/esm2015/src/actions/symbols.js +0 -2
- package/esm2015/src/actions-stream.js +0 -52
- package/esm2015/src/configs/messages.config.js +0 -36
- package/esm2015/src/decorators/action.js +0 -33
- package/esm2015/src/decorators/select/select-factory.js +0 -29
- package/esm2015/src/decorators/select/select.js +0 -26
- package/esm2015/src/decorators/select/symbols.js +0 -29
- package/esm2015/src/decorators/selector/selector.js +0 -32
- package/esm2015/src/decorators/selector/symbols.js +0 -2
- package/esm2015/src/decorators/selector-options.js +0 -21
- package/esm2015/src/decorators/state.js +0 -36
- package/esm2015/src/dev-features/ngxs-development.module.js +0 -22
- package/esm2015/src/dev-features/ngxs-unhandled-actions-logger.js +0 -46
- package/esm2015/src/dev-features/symbols.js +0 -6
- package/esm2015/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js +0 -57
- package/esm2015/src/execution/symbols.js +0 -23
- package/esm2015/src/internal/custom-rxjs-subjects.js +0 -92
- package/esm2015/src/internal/dispatcher.js +0 -104
- package/esm2015/src/internal/error-handler.js +0 -64
- package/esm2015/src/internal/internals.js +0 -248
- package/esm2015/src/internal/lifecycle-state-manager.js +0 -79
- package/esm2015/src/internal/state-context-factory.js +0 -68
- package/esm2015/src/internal/state-factory.js +0 -288
- package/esm2015/src/internal/state-operations.js +0 -63
- package/esm2015/src/internal/state-operators.js +0 -20
- package/esm2015/src/internal/state-stream.js +0 -25
- package/esm2015/src/ivy/ivy-enabled-in-dev-mode.js +0 -25
- package/esm2015/src/module.js +0 -88
- package/esm2015/src/modules/ngxs-feature.module.js +0 -45
- package/esm2015/src/modules/ngxs-root.module.js +0 -41
- package/esm2015/src/operators/of-action.js +0 -102
- package/esm2015/src/plugin-manager.js +0 -37
- package/esm2015/src/plugin_api.js +0 -6
- package/esm2015/src/public_api.js +0 -27
- package/esm2015/src/public_to_deprecate.js +0 -14
- package/esm2015/src/selectors/create-model-selector.js +0 -30
- package/esm2015/src/selectors/create-pick-selector.js +0 -16
- package/esm2015/src/selectors/create-property-selectors.js +0 -20
- package/esm2015/src/selectors/create-selector.js +0 -9
- package/esm2015/src/selectors/selector-checks.util.js +0 -18
- package/esm2015/src/selectors/selector-metadata.js +0 -30
- package/esm2015/src/selectors/selector-models.js +0 -2
- package/esm2015/src/selectors/selector-types.util.js +0 -2
- package/esm2015/src/selectors/selector-utils.js +0 -74
- package/esm2015/src/state-token/state-token.js +0 -17
- package/esm2015/src/state-token/symbols.js +0 -2
- package/esm2015/src/store.js +0 -107
- package/esm2015/src/symbols.js +0 -58
- package/esm2015/src/utils/compose.js +0 -26
- package/esm2015/src/utils/store-validators.js +0 -25
- package/esm2015/src/utils/utils.js +0 -92
- package/fesm2015/ngxs-store-internals-testing.js.map +0 -1
- package/fesm2015/ngxs-store-internals.js +0 -101
- package/fesm2015/ngxs-store-internals.js.map +0 -1
- package/fesm2015/ngxs-store-operators.js.map +0 -1
- package/fesm2015/ngxs-store.js.map +0 -1
- package/internals/ngxs-bootstrapper.d.ts +0 -16
- package/internals/ngxs-store-internals.d.ts +0 -5
- package/internals/package.json +0 -10
- package/internals/src/symbols.d.ts +0 -7
- package/internals/testing/ngxs-store-internals-testing.d.ts +0 -5
- package/internals/testing/package.json +0 -10
- package/ngxs-store.d.ts +0 -5
- package/operators/ngxs-store-operators.d.ts +0 -5
- package/operators/package.json +0 -10
- package/src/internal/error-handler.d.ts +0 -26
- package/src/internal/state-stream.d.ts +0 -14
- package/src/public_to_deprecate.d.ts +0 -21
- package/src/state-token/state-token.d.ts +0 -7
- package/src/state-token/symbols.d.ts +0 -5
- /package/{esm2015/internals/ngxs-store-internals.js → esm2022/internals/ngxs-store-internals.mjs} +0 -0
- /package/{esm2015/internals/testing/ngxs-store-internals-testing.js → esm2022/internals/testing/ngxs-store-internals-testing.mjs} +0 -0
- /package/{esm2015/ngxs-store.js → esm2022/ngxs-store.mjs} +0 -0
- /package/{esm2015/operators/compose.js → esm2022/operators/compose.mjs} +0 -0
- /package/{esm2015/operators/index.js → esm2022/operators/index.mjs} +0 -0
- /package/{esm2015/operators/ngxs-store-operators.js → esm2022/operators/ngxs-store-operators.mjs} +0 -0
- /package/{esm2015/operators/types.js → esm2022/operators/types.mjs} +0 -0
- /package/{esm2015/operators/utils.js → esm2022/operators/utils.mjs} +0 -0
- /package/{esm2015/src/operators/leave-ngxs.js → esm2022/src/operators/leave-ngxs.mjs} +0 -0
- /package/{esm2015/src/selectors/index.js → esm2022/src/selectors/index.mjs} +0 -0
|
@@ -1,47 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
[META_OPTIONS_KEY]?: StoreOptions<U>;
|
|
8
|
-
}
|
|
9
|
-
export declare type StateKeyGraph = PlainObjectOf<string[]>;
|
|
10
|
-
export declare type StatesByName = PlainObjectOf<StateClassInternal>;
|
|
3
|
+
import { ɵPlainObjectOf, ɵStateClassInternal, ɵActionHandlerMetaData } from '@ngxs/store/internals';
|
|
4
|
+
import { NgxsConfig } from '../symbols';
|
|
5
|
+
export type StateKeyGraph = ɵPlainObjectOf<string[]>;
|
|
6
|
+
export type StatesByName = ɵPlainObjectOf<ɵStateClassInternal>;
|
|
11
7
|
export interface StateOperations<T> {
|
|
12
8
|
getState(): T;
|
|
13
|
-
setState(val: T):
|
|
9
|
+
setState(val: T): void;
|
|
14
10
|
dispatch(actionOrActions: any | any[]): Observable<void>;
|
|
15
11
|
}
|
|
16
|
-
export interface MetaDataModel {
|
|
17
|
-
name: string | null;
|
|
18
|
-
actions: PlainObjectOf<ActionHandlerMetaData[]>;
|
|
19
|
-
defaults: any;
|
|
20
|
-
path: string | null;
|
|
21
|
-
makeRootSelector: SelectorFactory | null;
|
|
22
|
-
children?: StateClassInternal[];
|
|
23
|
-
}
|
|
24
|
-
export interface RuntimeSelectorContext {
|
|
25
|
-
getStateGetter(key: any): (state: any) => any;
|
|
26
|
-
getSelectorOptions(localOptions?: SharedSelectorOptions): SharedSelectorOptions;
|
|
27
|
-
}
|
|
28
|
-
export declare type SelectFromRootState = (rootState: any) => any;
|
|
29
|
-
export declare type SelectorFactory = (runtimeContext: RuntimeSelectorContext) => SelectFromRootState;
|
|
30
|
-
export interface SharedSelectorOptions {
|
|
31
|
-
injectContainerState?: boolean;
|
|
32
|
-
suppressErrors?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export interface SelectorMetaDataModel {
|
|
35
|
-
makeRootSelector: SelectorFactory | null;
|
|
36
|
-
originalFn: Function | null;
|
|
37
|
-
containerClass: any;
|
|
38
|
-
selectorName: string | null;
|
|
39
|
-
getSelectorOptions: () => SharedSelectorOptions;
|
|
40
|
-
}
|
|
41
12
|
export interface MappedStore {
|
|
42
13
|
name: string;
|
|
43
14
|
isInitialised: boolean;
|
|
44
|
-
actions:
|
|
15
|
+
actions: ɵPlainObjectOf<ɵActionHandlerMetaData[]>;
|
|
45
16
|
defaults: any;
|
|
46
17
|
instance: any;
|
|
47
18
|
path: string;
|
|
@@ -50,38 +21,17 @@ export interface StatesAndDefaults {
|
|
|
50
21
|
defaults: any;
|
|
51
22
|
states: MappedStore[];
|
|
52
23
|
}
|
|
53
|
-
/**
|
|
54
|
-
* Ensures metadata is attached to the class and returns it.
|
|
55
|
-
*
|
|
56
|
-
* @ignore
|
|
57
|
-
*/
|
|
58
|
-
export declare function ensureStoreMetadata(target: StateClassInternal): MetaDataModel;
|
|
59
|
-
/**
|
|
60
|
-
* Get the metadata attached to the state class if it exists.
|
|
61
|
-
*
|
|
62
|
-
* @ignore
|
|
63
|
-
*/
|
|
64
|
-
export declare function getStoreMetadata(target: StateClassInternal): MetaDataModel;
|
|
65
|
-
/**
|
|
66
|
-
* Ensures metadata is attached to the selector and returns it.
|
|
67
|
-
*
|
|
68
|
-
* @ignore
|
|
69
|
-
*/
|
|
70
|
-
export declare function ensureSelectorMetadata(target: Function): SelectorMetaDataModel;
|
|
71
|
-
/**
|
|
72
|
-
* Get the metadata attached to the selector if it exists.
|
|
73
|
-
*
|
|
74
|
-
* @ignore
|
|
75
|
-
*/
|
|
76
|
-
export declare function getSelectorMetadata(target: any): SelectorMetaDataModel;
|
|
77
24
|
/**
|
|
78
25
|
* Get a deeply nested value. Example:
|
|
79
26
|
*
|
|
80
27
|
* getValue({ foo: bar: [] }, 'foo.bar') //=> []
|
|
81
28
|
*
|
|
82
29
|
* @ignore
|
|
30
|
+
*
|
|
31
|
+
* Marked for removal. It's only used within `createSelectorFn`.
|
|
83
32
|
*/
|
|
84
33
|
export declare function propGetter(paths: string[], config: NgxsConfig): (x: any) => any;
|
|
34
|
+
export declare const ɵPROP_GETTER: InjectionToken<(paths: string[]) => (x: any) => any>;
|
|
85
35
|
/**
|
|
86
36
|
* Given an array of states, it will return a object graph. Example:
|
|
87
37
|
* const states = [
|
|
@@ -100,7 +50,7 @@ export declare function propGetter(paths: string[], config: NgxsConfig): (x: any
|
|
|
100
50
|
*
|
|
101
51
|
* @ignore
|
|
102
52
|
*/
|
|
103
|
-
export declare function buildGraph(stateClasses:
|
|
53
|
+
export declare function buildGraph(stateClasses: ɵStateClassInternal[]): StateKeyGraph;
|
|
104
54
|
/**
|
|
105
55
|
* Given a states array, returns object graph
|
|
106
56
|
* returning the name and state metadata. Example:
|
|
@@ -111,7 +61,7 @@ export declare function buildGraph(stateClasses: StateClassInternal[]): StateKey
|
|
|
111
61
|
*
|
|
112
62
|
* @ignore
|
|
113
63
|
*/
|
|
114
|
-
export declare function nameToState(states:
|
|
64
|
+
export declare function nameToState(states: ɵStateClassInternal[]): ɵPlainObjectOf<ɵStateClassInternal>;
|
|
115
65
|
/**
|
|
116
66
|
* Given a object relationship graph will return the full path
|
|
117
67
|
* for the child items. Example:
|
|
@@ -132,7 +82,7 @@ export declare function nameToState(states: StateClassInternal[]): PlainObjectOf
|
|
|
132
82
|
*
|
|
133
83
|
* @ignore
|
|
134
84
|
*/
|
|
135
|
-
export declare function findFullParentPath(obj: StateKeyGraph, newObj?:
|
|
85
|
+
export declare function findFullParentPath(obj: StateKeyGraph, newObj?: ɵPlainObjectOf<string>): ɵPlainObjectOf<string>;
|
|
136
86
|
/**
|
|
137
87
|
* Given a object graph, it will return the items topologically sorted Example:
|
|
138
88
|
*
|
|
@@ -153,9 +103,3 @@ export declare function findFullParentPath(obj: StateKeyGraph, newObj?: PlainObj
|
|
|
153
103
|
* @ignore
|
|
154
104
|
*/
|
|
155
105
|
export declare function topologicalSort(graph: StateKeyGraph): string[];
|
|
156
|
-
/**
|
|
157
|
-
* Returns if the parameter is a object or not.
|
|
158
|
-
*
|
|
159
|
-
* @ignore
|
|
160
|
-
*/
|
|
161
|
-
export declare function isObject(obj: any): boolean;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ɵNgxsAppBootstrappedState } from '@ngxs/store/internals';
|
|
3
|
+
import { InitState, UpdateState } from '@ngxs/store/plugins';
|
|
3
4
|
import { Store } from '../store';
|
|
4
|
-
import { InternalErrorReporter } from './error-handler';
|
|
5
5
|
import { StateContextFactory } from './state-context-factory';
|
|
6
6
|
import { InternalStateOperations } from './state-operations';
|
|
7
7
|
import { StatesAndDefaults } from './internals';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export declare class LifecycleStateManager implements OnDestroy {
|
|
10
10
|
private _store;
|
|
11
|
-
private _internalErrorReporter;
|
|
12
11
|
private _internalStateOperations;
|
|
13
12
|
private _stateContextFactory;
|
|
14
|
-
private
|
|
13
|
+
private _appBootstrappedState;
|
|
15
14
|
private readonly _destroy$;
|
|
16
|
-
|
|
15
|
+
private _initStateHasBeenDispatched?;
|
|
16
|
+
constructor(_store: Store, _internalStateOperations: InternalStateOperations, _stateContextFactory: StateContextFactory, _appBootstrappedState: ɵNgxsAppBootstrappedState);
|
|
17
17
|
ngOnDestroy(): void;
|
|
18
|
-
ngxsBootstrap
|
|
18
|
+
ngxsBootstrap(action: InitState | UpdateState, results: StatesAndDefaults | undefined): void;
|
|
19
19
|
private _invokeInitOnStates;
|
|
20
20
|
private _invokeBootstrapOnStates;
|
|
21
21
|
private _getStateContext;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Injector, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ɵStateClassInternal, ɵRuntimeSelectorContext } from '@ngxs/store/internals';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
4
|
import { NgxsConfig } from '../symbols';
|
|
4
|
-
import { MappedStore,
|
|
5
|
+
import { MappedStore, StatesAndDefaults, StatesByName } from './internals';
|
|
5
6
|
import { ActionContext, InternalActions } from '../actions-stream';
|
|
6
7
|
import { InternalDispatchedActionResults } from '../internal/dispatcher';
|
|
7
8
|
import { StateContextFactory } from '../internal/state-context-factory';
|
|
@@ -28,6 +29,8 @@ export declare class StateFactory implements OnDestroy {
|
|
|
28
29
|
private _stateContextFactory;
|
|
29
30
|
private _initialState;
|
|
30
31
|
private _actionsSubscription;
|
|
32
|
+
private _propGetter;
|
|
33
|
+
private _ngxsUnhandledErrorHandler;
|
|
31
34
|
constructor(_injector: Injector, _config: NgxsConfig, _parentFactory: StateFactory, _actions: InternalActions, _actionResults: InternalDispatchedActionResults, _stateContextFactory: StateContextFactory, _initialState: any);
|
|
32
35
|
private _states;
|
|
33
36
|
get states(): MappedStore[];
|
|
@@ -35,22 +38,21 @@ export declare class StateFactory implements OnDestroy {
|
|
|
35
38
|
get statesByName(): StatesByName;
|
|
36
39
|
private _statePaths;
|
|
37
40
|
private get statePaths();
|
|
38
|
-
getRuntimeSelectorContext: () =>
|
|
39
|
-
private static _cloneDefaults;
|
|
41
|
+
getRuntimeSelectorContext: () => ɵRuntimeSelectorContext;
|
|
40
42
|
ngOnDestroy(): void;
|
|
41
43
|
/**
|
|
42
44
|
* Add a new state to the global defs.
|
|
43
45
|
*/
|
|
44
|
-
add(stateClasses:
|
|
46
|
+
add(stateClasses: ɵStateClassInternal[]): MappedStore[];
|
|
45
47
|
/**
|
|
46
48
|
* Add a set of states to the store and return the defaults
|
|
47
49
|
*/
|
|
48
|
-
addAndReturnDefaults(stateClasses:
|
|
50
|
+
addAndReturnDefaults(stateClasses: ɵStateClassInternal[]): StatesAndDefaults;
|
|
49
51
|
connectActionHandlers(): void;
|
|
50
52
|
/**
|
|
51
53
|
* Invoke actions on the states.
|
|
52
54
|
*/
|
|
53
|
-
invokeActions(dispatched$: Observable<ActionContext>, action: any): Observable<
|
|
55
|
+
invokeActions(dispatched$: Observable<ActionContext>, action: any): Observable<[any]>;
|
|
54
56
|
private addToStatesMap;
|
|
55
57
|
private addRuntimeInfoToMeta;
|
|
56
58
|
private hasBeenMountedAndBootstrapped;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ɵStateStream } from '@ngxs/store/internals';
|
|
1
2
|
import { StateOperations, StatesAndDefaults } from '../internal/internals';
|
|
2
3
|
import { InternalDispatcher } from '../internal/dispatcher';
|
|
3
|
-
import { StateStream } from './state-stream';
|
|
4
4
|
import { NgxsConfig } from '../symbols';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
@@ -10,7 +10,7 @@ export declare class InternalStateOperations {
|
|
|
10
10
|
private _stateStream;
|
|
11
11
|
private _dispatcher;
|
|
12
12
|
private _config;
|
|
13
|
-
constructor(_stateStream:
|
|
13
|
+
constructor(_stateStream: ɵStateStream, _dispatcher: InternalDispatcher, _config: NgxsConfig);
|
|
14
14
|
/**
|
|
15
15
|
* Returns the root state operators.
|
|
16
16
|
*/
|
package/src/module.d.ts
CHANGED
|
@@ -1,23 +1,12 @@
|
|
|
1
1
|
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ɵStateClass } from '@ngxs/store/internals';
|
|
3
3
|
import { NgxsModuleOptions } from './symbols';
|
|
4
4
|
import { NgxsRootModule } from './modules/ngxs-root.module';
|
|
5
5
|
import { NgxsFeatureModule } from './modules/ngxs-feature.module';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Ngxs Module
|
|
9
|
-
*/
|
|
10
7
|
export declare class NgxsModule {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*/
|
|
14
|
-
static forRoot(states?: StateClass[], options?: NgxsModuleOptions): ModuleWithProviders<NgxsRootModule>;
|
|
15
|
-
/**
|
|
16
|
-
* Feature module factory
|
|
17
|
-
*/
|
|
18
|
-
static forFeature(states?: StateClass[]): ModuleWithProviders<NgxsFeatureModule>;
|
|
19
|
-
private static ngxsTokenProviders;
|
|
20
|
-
private static appBootstrapListenerFactory;
|
|
8
|
+
static forRoot(states?: ɵStateClass[], options?: NgxsModuleOptions): ModuleWithProviders<NgxsRootModule>;
|
|
9
|
+
static forFeature(states?: ɵStateClass[]): ModuleWithProviders<NgxsFeatureModule>;
|
|
21
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsModule, never>;
|
|
22
11
|
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsModule, never, never, never>;
|
|
23
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxsModule>;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { Store } from '../store';
|
|
2
|
-
import { InternalStateOperations } from '../internal/state-operations';
|
|
3
|
-
import { StateFactory } from '../internal/state-factory';
|
|
4
|
-
import { LifecycleStateManager } from '../internal/lifecycle-state-manager';
|
|
5
|
-
import { StateClassInternal } from '../internal/internals';
|
|
6
1
|
import * as i0 from "@angular/core";
|
|
7
2
|
/**
|
|
8
|
-
* Feature module
|
|
9
3
|
* @ignore
|
|
10
4
|
*/
|
|
11
5
|
export declare class NgxsFeatureModule {
|
|
12
|
-
constructor(
|
|
13
|
-
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsFeatureModule, [null, null, null, { optional: true; }, null]>;
|
|
6
|
+
constructor();
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsFeatureModule, never>;
|
|
15
8
|
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsFeatureModule, never, never, never>;
|
|
16
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxsFeatureModule>;
|
|
17
10
|
}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { StateFactory } from '../internal/state-factory';
|
|
2
|
-
import { InternalStateOperations } from '../internal/state-operations';
|
|
3
|
-
import { Store } from '../store';
|
|
4
|
-
import { SelectFactory } from '../decorators/select/select-factory';
|
|
5
|
-
import { StateClassInternal } from '../internal/internals';
|
|
6
|
-
import { LifecycleStateManager } from '../internal/lifecycle-state-manager';
|
|
7
1
|
import * as i0 from "@angular/core";
|
|
8
2
|
/**
|
|
9
|
-
* Root module
|
|
10
3
|
* @ignore
|
|
11
4
|
*/
|
|
12
5
|
export declare class NgxsRootModule {
|
|
13
|
-
constructor(
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsRootModule,
|
|
6
|
+
constructor();
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsRootModule, never>;
|
|
15
8
|
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxsRootModule, never, never, never>;
|
|
16
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxsRootModule>;
|
|
17
10
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export interface NgxsUnhandledErrorContext {
|
|
3
|
+
action: any;
|
|
4
|
+
}
|
|
5
|
+
export declare class NgxsUnhandledErrorHandler {
|
|
6
|
+
private _ngZone;
|
|
7
|
+
private _errorHandler;
|
|
8
|
+
/**
|
|
9
|
+
* The `_unhandledErrorContext` is left unused internally since we do not
|
|
10
|
+
* require it for internal operations. However, developers who wish to provide
|
|
11
|
+
* their own custom error handler may utilize this context information.
|
|
12
|
+
*/
|
|
13
|
+
handleError(error: any, _unhandledErrorContext: NgxsUnhandledErrorContext): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxsUnhandledErrorHandler, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NgxsUnhandledErrorHandler>;
|
|
16
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { OperatorFunction } from 'rxjs';
|
|
2
2
|
import { ActionType } from '../actions/symbols';
|
|
3
3
|
import { ActionContext } from '../actions-stream';
|
|
4
|
-
|
|
4
|
+
type TupleKeys<T extends any[]> = Exclude<keyof T, keyof []>;
|
|
5
5
|
/**
|
|
6
6
|
* Given a POJO, returns the POJO type, given a class constructor object, returns the type of the class.
|
|
7
7
|
*
|
|
8
8
|
* This utility type exists due to the complexity of ActionType being either an ActionDef class or the plain
|
|
9
9
|
* `{ type: string }` type (or similar compatible POJO types).
|
|
10
10
|
*/
|
|
11
|
-
|
|
11
|
+
type Constructed<T> = T extends new (...args: any[]) => infer U ? U : T;
|
|
12
12
|
export interface ActionCompletion<T = any, E = Error> {
|
|
13
13
|
action: T;
|
|
14
14
|
result: {
|
|
@@ -52,5 +52,5 @@ export declare function ofActionCompleted<T extends ActionType[]>(...allowedType
|
|
|
52
52
|
*
|
|
53
53
|
* This will ONLY grab actions that have just thrown an error
|
|
54
54
|
*/
|
|
55
|
-
export declare function ofActionErrored<T extends ActionType[]>(...allowedTypes: T): OperatorFunction<ActionContext<Constructed<T[TupleKeys<T>]>>, Constructed<T[TupleKeys<T>]
|
|
55
|
+
export declare function ofActionErrored<T extends ActionType[]>(...allowedTypes: T): OperatorFunction<ActionContext<Constructed<T[TupleKeys<T>]>>, ActionCompletion<Constructed<T[TupleKeys<T>]>>>;
|
|
56
56
|
export {};
|
package/src/plugin-manager.d.ts
CHANGED
package/src/plugin_api.d.ts
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { NGXS_PLUGINS, NgxsPlugin, NgxsPluginFn, NgxsNextPluginFn } from './symbols';
|
|
3
|
-
export { StateStream } from './internal/state-stream';
|
|
4
|
-
export { getActionTypeFromInstance, setValue, getValue } from './utils/utils';
|
|
5
|
-
export { InitState, UpdateState } from './actions/actions';
|
|
1
|
+
export { InitState, UpdateState, getActionTypeFromInstance, setValue, getValue, NGXS_PLUGINS, NgxsPlugin, NgxsPluginFn, NgxsNextPluginFn } from '@ngxs/store/plugins';
|
package/src/private_api.d.ts
CHANGED
package/src/public_api.d.ts
CHANGED
|
@@ -5,16 +5,19 @@ export { State } from './decorators/state';
|
|
|
5
5
|
export { Select } from './decorators/select/select';
|
|
6
6
|
export { SelectorOptions } from './decorators/selector-options';
|
|
7
7
|
export { Actions, ActionContext, ActionStatus } from './actions-stream';
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export { StateContext, StateOperator, NgxsOnInit, NgxsAfterBootstrap, NgxsOnChanges, NgxsModuleOptions, NgxsSimpleChange, } from './symbols';
|
|
8
|
+
export { ofAction, ofActionDispatched, ofActionSuccessful, ofActionCanceled, ofActionErrored, ofActionCompleted, ActionCompletion } from './operators/of-action';
|
|
9
|
+
export { NgxsConfig, StateContext, StateOperator, NgxsOnInit, NgxsAfterBootstrap, NgxsOnChanges, NgxsModuleOptions, NgxsSimpleChange } from './symbols';
|
|
11
10
|
export { Selector } from './decorators/selector/selector';
|
|
12
|
-
export { getActionTypeFromInstance, actionMatcher } from './utils/utils';
|
|
13
11
|
export { NgxsExecutionStrategy } from './execution/symbols';
|
|
14
|
-
export { ActionType,
|
|
12
|
+
export { ActionType, ActionDef } from './actions/symbols';
|
|
15
13
|
export { NoopNgxsExecutionStrategy } from './execution/noop-ngxs-execution-strategy';
|
|
16
|
-
export {
|
|
14
|
+
export { NgxsUnhandledErrorHandler, NgxsUnhandledErrorContext } from './ngxs-unhandled-error-handler';
|
|
17
15
|
export { NgxsDevelopmentOptions } from './dev-features/symbols';
|
|
18
|
-
export { NgxsDevelopmentModule } from './dev-features/ngxs-development.module';
|
|
16
|
+
export { NgxsDevelopmentModule, withNgxsDevelopmentOptions } from './dev-features/ngxs-development.module';
|
|
19
17
|
export { NgxsUnhandledActionsLogger } from './dev-features/ngxs-unhandled-actions-logger';
|
|
20
|
-
export { createModelSelector, createPickSelector, createPropertySelectors, createSelector, PropertySelectors, TypedSelector
|
|
18
|
+
export { createModelSelector, createPickSelector, createPropertySelectors, createSelector, PropertySelectors, TypedSelector } from './selectors';
|
|
19
|
+
export * from './standalone-features';
|
|
20
|
+
export * from './utils/public_api';
|
|
21
|
+
export { StateToken } from '@ngxs/store/internals';
|
|
22
|
+
export { ɵActionOptions as ActionOptions } from '@ngxs/store/internals';
|
|
23
|
+
export { getActionTypeFromInstance, actionMatcher } from '@ngxs/store/plugins';
|
|
@@ -2,8 +2,8 @@ import { TypedSelector } from './selector-types.util';
|
|
|
2
2
|
interface SelectorMap {
|
|
3
3
|
[key: string]: TypedSelector<any>;
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
type ModelSelector<T extends SelectorMap> = (...args: any[]) => MappedResult<T>;
|
|
6
|
+
type MappedResult<TSelectorMap> = {
|
|
7
7
|
[P in keyof TSelectorMap]: TSelectorMap[P] extends TypedSelector<infer R> ? R : never;
|
|
8
8
|
};
|
|
9
9
|
export declare function createModelSelector<T extends SelectorMap>(selectorMap: T): ModelSelector<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TypedSelector } from './selector-types.util';
|
|
2
|
-
|
|
2
|
+
type KeysToValues<T, Keys extends (keyof T)[]> = {
|
|
3
3
|
[Index in keyof Keys]: Keys[Index] extends keyof T ? T[Keys[Index]] : never;
|
|
4
4
|
};
|
|
5
5
|
export declare function createPickSelector<TModel, Keys extends (keyof TModel)[]>(selector: TypedSelector<TModel>, keys: [...Keys]): (...props: KeysToValues<TModel, Keys>) => Pick<TModel, Keys[number]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
1
|
+
import { ɵSelectorDef } from './selector-types.util';
|
|
2
|
+
export type PropertySelectors<TModel> = {
|
|
3
3
|
[P in keyof NonNullable<TModel>]-?: (model: TModel) => TModel extends null | undefined ? undefined : NonNullable<TModel>[P];
|
|
4
4
|
};
|
|
5
|
-
export declare function createPropertySelectors<TModel>(parentSelector:
|
|
5
|
+
export declare function createPropertySelectors<TModel>(parentSelector: ɵSelectorDef<TModel>): PropertySelectors<TModel>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { CreationMetadata } from './selector-models';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { ɵSelectorDef, ɵSelectorReturnType } from './selector-types.util';
|
|
3
|
+
type SelectorArg = ɵSelectorDef<any>;
|
|
4
4
|
/**
|
|
5
5
|
* Function for creating a selector
|
|
6
6
|
* @param selectors The selectors to use to create the arguments of this function
|
|
7
7
|
* @param originalFn The original function being made into a selector
|
|
8
8
|
* @param creationMetadata
|
|
9
9
|
*/
|
|
10
|
-
export declare function createSelector<S1 extends SelectorArg, TProjector extends (s1:
|
|
11
|
-
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, TProjector extends (s1:
|
|
12
|
-
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, TProjector extends (s1:
|
|
13
|
-
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, TProjector extends (s1:
|
|
14
|
-
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, S5 extends SelectorArg, TProjector extends (s1:
|
|
15
|
-
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, S5 extends SelectorArg, S6 extends SelectorArg, TProjector extends (s1:
|
|
16
|
-
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, S5 extends SelectorArg, S6 extends SelectorArg, S7 extends SelectorArg, TProjector extends (s1:
|
|
17
|
-
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, S5 extends SelectorArg, S6 extends SelectorArg, S7 extends SelectorArg, S8 extends SelectorArg, TProjector extends (s1:
|
|
10
|
+
export declare function createSelector<S1 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>) => any>(selectors: [S1], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
|
|
11
|
+
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>) => any>(selectors: [S1, S2], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
|
|
12
|
+
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>, s3: ɵSelectorReturnType<S3>) => any>(selectors: [S1, S2, S3], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
|
|
13
|
+
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>, s3: ɵSelectorReturnType<S3>, s4: ɵSelectorReturnType<S4>) => any>(selectors: [S1, S2, S3, S4], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
|
|
14
|
+
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, S5 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>, s3: ɵSelectorReturnType<S3>, s4: ɵSelectorReturnType<S4>, s5: ɵSelectorReturnType<S5>) => any>(selectors: [S1, S2, S3, S4, S5], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
|
|
15
|
+
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, S5 extends SelectorArg, S6 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>, s3: ɵSelectorReturnType<S3>, s4: ɵSelectorReturnType<S4>, s5: ɵSelectorReturnType<S5>, s6: ɵSelectorReturnType<S6>) => any>(selectors: [S1, S2, S3, S4, S5, S6], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
|
|
16
|
+
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, S5 extends SelectorArg, S6 extends SelectorArg, S7 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>, s3: ɵSelectorReturnType<S3>, s4: ɵSelectorReturnType<S4>, s5: ɵSelectorReturnType<S5>, s6: ɵSelectorReturnType<S6>, s7: ɵSelectorReturnType<S7>) => any>(selectors: [S1, S2, S3, S4, S5, S6, S7], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
|
|
17
|
+
export declare function createSelector<S1 extends SelectorArg, S2 extends SelectorArg, S3 extends SelectorArg, S4 extends SelectorArg, S5 extends SelectorArg, S6 extends SelectorArg, S7 extends SelectorArg, S8 extends SelectorArg, TProjector extends (s1: ɵSelectorReturnType<S1>, s2: ɵSelectorReturnType<S2>, s3: ɵSelectorReturnType<S3>, s4: ɵSelectorReturnType<S4>, s5: ɵSelectorReturnType<S5>, s6: ɵSelectorReturnType<S6>, s7: ɵSelectorReturnType<S7>, s8: ɵSelectorReturnType<S8>) => any>(selectors: [S1, S2, S3, S4, S5, S6, S7, S8], projector: TProjector, creationMetadata?: Partial<CreationMetadata>): TProjector;
|
|
18
18
|
export declare function createSelector<T extends (...args: any[]) => any>(selectors: SelectorArg[] | undefined, projector: T, creationMetadata?: Partial<CreationMetadata>): T;
|
|
19
19
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These types are exported privately for developers who work on advanced
|
|
3
|
+
* utilities and may need to use these types externally. For instance,
|
|
4
|
+
* they may have a function that accepts selector functions and returns
|
|
5
|
+
* signals with the type corresponding to the return type of those selectors.
|
|
6
|
+
*/
|
|
7
|
+
export { ɵSelectorFunc, ɵStateSelector, ɵSelectorDef, ɵSelectorReturnType } from './selector-types.util';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function ensureValidSelector(selector:
|
|
1
|
+
import { ɵSelectorDef } from './selector-types.util';
|
|
2
|
+
export declare function ensureValidSelector(selector: ɵSelectorDef<any>, context?: {
|
|
3
3
|
prefix?: string;
|
|
4
4
|
noun?: string;
|
|
5
5
|
}): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ɵSelectorMetaDataModel, ɵSharedSelectorOptions } from '@ngxs/store/internals';
|
|
2
2
|
import { CreationMetadata } from './selector-models';
|
|
3
3
|
export declare const selectorOptionsMetaAccessor: {
|
|
4
|
-
getOptions: (target: any) =>
|
|
5
|
-
defineOptions: (target: any, options:
|
|
4
|
+
getOptions: (target: any) => ɵSharedSelectorOptions;
|
|
5
|
+
defineOptions: (target: any, options: ɵSharedSelectorOptions) => void;
|
|
6
6
|
};
|
|
7
|
-
export declare function setupSelectorMetadata<T extends (...args: any[]) => any>(originalFn: T, creationMetadata: Partial<CreationMetadata> | undefined):
|
|
7
|
+
export declare function setupSelectorMetadata<T extends (...args: any[]) => any>(originalFn: T, creationMetadata: Partial<CreationMetadata> | undefined): ɵSelectorMetaDataModel;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ɵSharedSelectorOptions, ɵSelectFromRootState } from '@ngxs/store/internals';
|
|
2
2
|
export interface CreationMetadata {
|
|
3
3
|
containerClass: any;
|
|
4
4
|
selectorName: string;
|
|
5
|
-
getSelectorOptions?: () =>
|
|
5
|
+
getSelectorOptions?: () => ɵSharedSelectorOptions;
|
|
6
6
|
}
|
|
7
7
|
export interface RuntimeSelectorInfo {
|
|
8
|
-
selectorOptions:
|
|
9
|
-
argumentSelectorFunctions:
|
|
8
|
+
selectorOptions: ɵSharedSelectorOptions;
|
|
9
|
+
argumentSelectorFunctions: ɵSelectFromRootState[];
|
|
10
10
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export declare type SelectorReturnType<T extends SelectorDef<any>> = T extends StateToken<infer R1> ? R1 : T extends SelectorFunc<infer R2> ? R2 : T extends StateClass<any> ? any : never;
|
|
1
|
+
import { ɵStateClass, StateToken } from '@ngxs/store/internals';
|
|
2
|
+
export type ɵSelectorFunc<TModel> = (...arg: any[]) => TModel;
|
|
3
|
+
export type TypedSelector<TModel> = StateToken<TModel> | ɵSelectorFunc<TModel>;
|
|
4
|
+
export type ɵStateSelector = ɵStateClass<any>;
|
|
5
|
+
export type ɵSelectorDef<TModel> = ɵStateSelector | TypedSelector<TModel>;
|
|
6
|
+
export type ɵSelectorReturnType<T extends ɵSelectorDef<any>> = T extends StateToken<infer R1> ? R1 : T extends ɵSelectorFunc<infer R2> ? R2 : T extends ɵStateClass<any> ? any : never;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ɵSelectorFactory, ɵSelectorMetaDataModel } from '@ngxs/store/internals';
|
|
2
2
|
import { CreationMetadata } from './selector-models';
|
|
3
|
-
export declare function createRootSelectorFactory<T extends (...args: any[]) => any>(selectorMetaData:
|
|
3
|
+
export declare function createRootSelectorFactory<T extends (...args: any[]) => any>(selectorMetaData: ɵSelectorMetaDataModel, selectors: any[] | undefined, memoizedSelectorFn: T): ɵSelectorFactory;
|
|
4
4
|
export declare function createMemoizedSelectorFn<T extends (...args: any[]) => any>(originalFn: T, creationMetadata: Partial<CreationMetadata> | undefined): T;
|
|
5
5
|
/**
|
|
6
6
|
* This function gets the factory function to create the selector to get the selected slice from the app state
|
|
7
7
|
* @ignore
|
|
8
8
|
*/
|
|
9
|
-
export declare function getRootSelectorFactory(selector: any):
|
|
9
|
+
export declare function getRootSelectorFactory(selector: any): ɵSelectorFactory;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Provider } from '@angular/core';
|
|
2
|
+
import { ɵStateClass } from '@ngxs/store/internals';
|
|
3
|
+
/**
|
|
4
|
+
* This function provides the required providers when calling `NgxsModule.forFeature`
|
|
5
|
+
* or `provideStates`. It is shared between the NgModule and standalone APIs.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getFeatureProviders(states: ɵStateClass[]): Provider[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { InjectionToken, Provider } from '@angular/core';
|
|
2
|
+
/**
|
|
3
|
+
* This function is shared by both NgModule and standalone features.
|
|
4
|
+
* When using `NgxsModule.forRoot` and `provideStore`, we can depend on the
|
|
5
|
+
* same initialization functionality.
|
|
6
|
+
*/
|
|
7
|
+
export declare function rootStoreInitializer(): void;
|
|
8
|
+
/**
|
|
9
|
+
* This function is utilized by both NgModule and standalone features.
|
|
10
|
+
* When using `NgxsModule.forFeature` and `provideStates`, we can depend on
|
|
11
|
+
* the same initialization functionality.
|
|
12
|
+
*/
|
|
13
|
+
export declare function featureStatesInitializer(): void;
|
|
14
|
+
/**
|
|
15
|
+
* InjectionToken that registers the global Store.
|
|
16
|
+
*/
|
|
17
|
+
export declare const NGXS_ROOT_STORE_INITIALIZER: InjectionToken<void>;
|
|
18
|
+
/**
|
|
19
|
+
* InjectionToken that registers feature states.
|
|
20
|
+
*/
|
|
21
|
+
export declare const NGXS_FEATURE_STORE_INITIALIZER: InjectionToken<void>;
|
|
22
|
+
export declare const NGXS_ROOT_ENVIRONMENT_INITIALIZER: Provider[];
|
|
23
|
+
/**
|
|
24
|
+
* The `NGXS_FEATURE_ENVIRONMENT_INITIALIZER` functions as an environment initializer
|
|
25
|
+
* at the `Route` level. Angular Router creates an environment route injector for each
|
|
26
|
+
* matched route where navigation occurs. The injector is created once, ensuring that
|
|
27
|
+
* the feature states initialization only happens once as well.
|
|
28
|
+
*/
|
|
29
|
+
export declare const NGXS_FEATURE_ENVIRONMENT_INITIALIZER: Provider[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EnvironmentProviders, Type } from '@angular/core';
|
|
2
|
+
import { NgxsPlugin } from '@ngxs/store/plugins';
|
|
3
|
+
/**
|
|
4
|
+
* This function registers a custom global plugin for the state.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* bootstrapApplication(AppComponent, {
|
|
8
|
+
* providers: [
|
|
9
|
+
* provideStore(
|
|
10
|
+
* [CountriesState],
|
|
11
|
+
* withNgxsPlugin(LogoutPlugin)
|
|
12
|
+
* )
|
|
13
|
+
* ]
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function withNgxsPlugin(plugin: Type<NgxsPlugin>): EnvironmentProviders;
|