@ngxs/store 3.8.1 → 3.8.2-dev.master-a75608e
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/esm2020/internals/index.mjs +6 -0
- package/esm2020/internals/initial-state.mjs +18 -0
- package/esm2020/internals/internal-tokens.mjs +6 -0
- package/{esm2015/internals/ngxs-bootstrapper.js → esm2020/internals/ngxs-bootstrapper.mjs} +4 -4
- package/esm2020/internals/src/symbols.mjs +11 -0
- package/esm2020/internals/symbols.mjs +11 -0
- package/esm2020/internals/testing/fresh-platform.mjs +72 -0
- package/{esm2015/internals/testing/helpers/ngxs-test.component.js → esm2020/internals/testing/helpers/ngxs-test.component.mjs} +4 -4
- package/esm2020/internals/testing/helpers/ngxs-test.module.mjs +20 -0
- package/{esm2015/internals/testing/ngxs.setup.js → esm2020/internals/testing/ngxs.setup.mjs} +4 -2
- package/esm2020/internals/testing/symbol.mjs +2 -0
- package/esm2020/operators/patch.mjs +21 -0
- package/esm2020/src/actions/actions.mjs +16 -0
- package/{esm2015/src/actions-stream.js → esm2020/src/actions-stream.mjs} +7 -7
- package/esm2020/src/configs/messages.config.mjs +48 -0
- package/{esm2015/src/decorators/select/select-factory.js → esm2020/src/decorators/select/select-factory.mjs} +4 -4
- package/esm2020/src/decorators/selector/selector.mjs +32 -0
- package/esm2020/src/decorators/state.mjs +36 -0
- package/{esm2015/src/dev-features/ngxs-development.module.js → esm2020/src/dev-features/ngxs-development.module.mjs} +5 -5
- package/{esm2015/src/dev-features/ngxs-unhandled-actions-logger.js → esm2020/src/dev-features/ngxs-unhandled-actions-logger.mjs} +4 -4
- package/{esm2015/src/execution/dispatch-outside-zone-ngxs-execution-strategy.js → esm2020/src/execution/dispatch-outside-zone-ngxs-execution-strategy.mjs} +4 -4
- package/{esm2015/src/execution/internal-ngxs-execution-strategy.js → esm2020/src/execution/internal-ngxs-execution-strategy.mjs} +4 -4
- package/{esm2015/src/execution/noop-ngxs-execution-strategy.js → esm2020/src/execution/noop-ngxs-execution-strategy.mjs} +4 -4
- package/esm2020/src/execution/symbols.mjs +27 -0
- package/{esm2015/src/internal/custom-rxjs-subjects.js → esm2020/src/internal/custom-rxjs-subjects.mjs} +2 -2
- package/{esm2015/src/internal/dispatcher.js → esm2020/src/internal/dispatcher.mjs} +11 -11
- package/{esm2015/src/internal/error-handler.js → esm2020/src/internal/error-handler.mjs} +5 -5
- package/esm2020/src/internal/internals.mjs +248 -0
- package/esm2020/src/internal/lifecycle-state-manager.mjs +97 -0
- package/esm2020/src/internal/state-context-factory.mjs +68 -0
- package/esm2020/src/internal/state-factory.mjs +292 -0
- package/{esm2015/src/internal/state-operations.js → esm2020/src/internal/state-operations.mjs} +5 -5
- package/esm2020/src/internal/state-operators.mjs +20 -0
- package/esm2020/src/internal/state-stream.mjs +27 -0
- package/{esm2015/src/ivy/ivy-enabled-in-dev-mode.js → esm2020/src/ivy/ivy-enabled-in-dev-mode.mjs} +2 -2
- package/esm2020/src/module.mjs +27 -0
- package/esm2020/src/modules/ngxs-feature.module.mjs +18 -0
- package/esm2020/src/modules/ngxs-root.module.mjs +18 -0
- package/{esm2015/src/operators/of-action.js → esm2020/src/operators/of-action.mjs} +10 -10
- package/{esm2015/src/plugin-manager.js → esm2020/src/plugin-manager.mjs} +4 -4
- package/esm2020/src/public_api.mjs +28 -0
- package/esm2020/src/selectors/create-model-selector.mjs +30 -0
- package/esm2020/src/selectors/create-pick-selector.mjs +16 -0
- package/esm2020/src/selectors/create-property-selectors.mjs +20 -0
- package/esm2020/src/selectors/selector-metadata.mjs +35 -0
- package/esm2020/src/selectors/selector-types.util.mjs +2 -0
- package/esm2020/src/standalone-features/feature-providers.mjs +20 -0
- package/esm2020/src/standalone-features/index.mjs +4 -0
- package/esm2020/src/standalone-features/initializers.mjs +86 -0
- package/esm2020/src/standalone-features/plugin.mjs +20 -0
- package/esm2020/src/standalone-features/provide-states.mjs +26 -0
- package/esm2020/src/standalone-features/provide-store.mjs +26 -0
- package/esm2020/src/standalone-features/root-providers.mjs +47 -0
- package/{esm2015/src/store.js → esm2020/src/store.mjs} +6 -5
- package/esm2020/src/symbols.mjs +65 -0
- package/esm2020/src/utils/store-validators.mjs +25 -0
- package/esm2020/src/utils/utils.mjs +92 -0
- package/fesm2015/{ngxs-store-internals-testing.js → ngxs-store-internals-testing.mjs} +19 -13
- package/fesm2015/ngxs-store-internals-testing.mjs.map +1 -0
- package/fesm2015/{ngxs-store-internals.js → ngxs-store-internals.mjs} +21 -21
- package/fesm2015/ngxs-store-internals.mjs.map +1 -0
- package/fesm2015/{ngxs-store-operators.js → ngxs-store-operators.mjs} +2 -2
- package/fesm2015/ngxs-store-operators.mjs.map +1 -0
- package/fesm2015/ngxs-store.mjs +2454 -0
- package/fesm2015/ngxs-store.mjs.map +1 -0
- package/fesm2020/ngxs-store-internals-testing.mjs +180 -0
- package/fesm2020/ngxs-store-internals-testing.mjs.map +1 -0
- package/fesm2020/ngxs-store-internals.mjs +114 -0
- package/fesm2020/ngxs-store-internals.mjs.map +1 -0
- package/fesm2020/ngxs-store-operators.mjs +202 -0
- package/fesm2020/ngxs-store-operators.mjs.map +1 -0
- package/{fesm2015/ngxs-store.js → fesm2020/ngxs-store.mjs} +1190 -1036
- package/fesm2020/ngxs-store.mjs.map +1 -0
- package/internals/index.d.ts +1 -2
- package/internals/initial-state.d.ts +1 -1
- package/internals/src/symbols.d.ts +4 -1
- package/internals/symbols.d.ts +4 -1
- package/internals/testing/helpers/ngxs-test.component.d.ts +1 -1
- package/internals/testing/symbol.d.ts +2 -2
- package/package.json +49 -12
- package/schematics/collection.json +36 -0
- package/schematics/src/actions/actions.factory.d.ts +3 -0
- package/schematics/src/actions/actions.factory.js +22 -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 +28 -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 +86 -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__ +7 -0
- package/schematics/src/starter-kit/files/store/auth/auth.state.spec.ts__template__ +54 -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__ +11 -0
- package/schematics/src/starter-kit/files/store/dashboard/states/dictionary/dictionary.actions.ts__template__ +13 -0
- package/schematics/src/starter-kit/files/store/dashboard/states/dictionary/dictionary.state.spec.ts__template__ +91 -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__ +60 -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__ +38 -0
- package/schematics/src/starter-kit/files/store/store.module.ts__template__ +22 -0
- package/schematics/src/starter-kit/schema.json +18 -0
- package/schematics/src/starter-kit/starter-kit.factory.d.ts +3 -0
- package/schematics/src/starter-kit/starter-kit.factory.js +12 -0
- package/schematics/src/starter-kit/starter-kit.factory.js.map +1 -0
- package/schematics/src/state/files/__name__.state.spec.ts__template__ +24 -0
- package/schematics/src/state/files/__name__.state.ts__template__ +22 -0
- package/schematics/src/state/schema.json +33 -0
- package/schematics/src/state/state.factory.d.ts +3 -0
- package/schematics/src/state/state.factory.js +20 -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__ +25 -0
- package/schematics/src/store/files/__name__.state.ts__template__ +29 -0
- package/schematics/src/store/schema.json +33 -0
- package/schematics/src/store/store.factory.d.ts +3 -0
- package/schematics/src/store/store.factory.js +20 -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 +21 -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 +9 -0
- package/schematics/src/utils/normalize-options.js +24 -0
- package/schematics/src/utils/normalize-options.js.map +1 -0
- package/schematics/src/utils/project.d.ts +16 -0
- package/schematics/src/utils/project.js +40 -0
- package/schematics/src/utils/project.js.map +1 -0
- package/schematics/src/utils/versions.json +3 -0
- package/src/actions/actions.d.ts +2 -2
- package/src/configs/messages.config.d.ts +2 -0
- package/src/decorators/state.d.ts +2 -2
- package/src/execution/symbols.d.ts +8 -2
- package/src/internal/custom-rxjs-subjects.d.ts +1 -1
- package/src/internal/internals.d.ts +5 -5
- package/src/internal/lifecycle-state-manager.d.ts +3 -1
- package/src/internal/state-factory.d.ts +1 -1
- 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/public_api.d.ts +5 -4
- package/src/selectors/selector-types.util.d.ts +3 -3
- package/src/standalone-features/feature-providers.d.ts +7 -0
- package/src/standalone-features/index.d.ts +3 -0
- package/src/standalone-features/initializers.d.ts +29 -0
- package/src/standalone-features/plugin.d.ts +17 -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/symbols.d.ts +5 -8
- package/src/utils/store-validators.d.ts +3 -6
- package/bundles/ngxs-store-internals-testing.umd.js +0 -547
- package/bundles/ngxs-store-internals-testing.umd.js.map +0 -1
- package/bundles/ngxs-store-internals.umd.js +0 -155
- 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 -2960
- package/bundles/ngxs-store.umd.js.map +0 -1
- package/esm2015/internals/angular.js +0 -13
- package/esm2015/internals/index.js +0 -6
- package/esm2015/internals/initial-state.js +0 -17
- package/esm2015/internals/internal-tokens.js +0 -5
- 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/symbol.js +0 -2
- package/esm2015/operators/patch.js +0 -21
- package/esm2015/src/actions/actions.js +0 -22
- package/esm2015/src/configs/messages.config.js +0 -36
- package/esm2015/src/decorators/selector/selector.js +0 -32
- package/esm2015/src/decorators/state.js +0 -38
- package/esm2015/src/execution/symbols.js +0 -23
- 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 -70
- package/esm2015/src/internal/state-factory.js +0 -291
- package/esm2015/src/internal/state-operators.js +0 -20
- package/esm2015/src/internal/state-stream.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/public_api.js +0 -27
- package/esm2015/src/selectors/create-model-selector.js +0 -28
- package/esm2015/src/selectors/create-pick-selector.js +0 -14
- package/esm2015/src/selectors/create-property-selectors.js +0 -18
- package/esm2015/src/selectors/selector-metadata.js +0 -30
- package/esm2015/src/selectors/selector-types.util.js +0 -2
- package/esm2015/src/symbols.js +0 -58
- package/esm2015/src/utils/store-validators.js +0 -27
- package/esm2015/src/utils/utils.js +0 -92
- package/fesm2015/ngxs-store-internals-testing.js.map +0 -1
- 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/angular.d.ts +0 -1
- package/internals/ngxs-store-internals.d.ts +0 -5
- package/internals/package.json +0 -10
- 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/{esm2015/index.js → esm2020/index.mjs} +0 -0
- /package/{esm2015/internals/memoize.js → esm2020/internals/memoize.mjs} +0 -0
- /package/{esm2015/internals/ngxs-store-internals.js → esm2020/internals/ngxs-store-internals.mjs} +0 -0
- /package/{esm2015/internals/testing/index.js → esm2020/internals/testing/index.mjs} +0 -0
- /package/{esm2015/internals/testing/ngxs-store-internals-testing.js → esm2020/internals/testing/ngxs-store-internals-testing.mjs} +0 -0
- /package/{esm2015/internals/testing/skip-console-logging.js → esm2020/internals/testing/skip-console-logging.mjs} +0 -0
- /package/{esm2015/ngxs-store.js → esm2020/ngxs-store.mjs} +0 -0
- /package/{esm2015/operators/append.js → esm2020/operators/append.mjs} +0 -0
- /package/{esm2015/operators/compose.js → esm2020/operators/compose.mjs} +0 -0
- /package/{esm2015/operators/iif.js → esm2020/operators/iif.mjs} +0 -0
- /package/{esm2015/operators/index.js → esm2020/operators/index.mjs} +0 -0
- /package/{esm2015/operators/insert-item.js → esm2020/operators/insert-item.mjs} +0 -0
- /package/{esm2015/operators/ngxs-store-operators.js → esm2020/operators/ngxs-store-operators.mjs} +0 -0
- /package/{esm2015/operators/remove-item.js → esm2020/operators/remove-item.mjs} +0 -0
- /package/{esm2015/operators/types.js → esm2020/operators/types.mjs} +0 -0
- /package/{esm2015/operators/update-item.js → esm2020/operators/update-item.mjs} +0 -0
- /package/{esm2015/operators/utils.js → esm2020/operators/utils.mjs} +0 -0
- /package/{esm2015/src/actions/symbols.js → esm2020/src/actions/symbols.mjs} +0 -0
- /package/{esm2015/src/decorators/action.js → esm2020/src/decorators/action.mjs} +0 -0
- /package/{esm2015/src/decorators/select/select.js → esm2020/src/decorators/select/select.mjs} +0 -0
- /package/{esm2015/src/decorators/select/symbols.js → esm2020/src/decorators/select/symbols.mjs} +0 -0
- /package/{esm2015/src/decorators/selector/symbols.js → esm2020/src/decorators/selector/symbols.mjs} +0 -0
- /package/{esm2015/src/decorators/selector-options.js → esm2020/src/decorators/selector-options.mjs} +0 -0
- /package/{esm2015/src/dev-features/symbols.js → esm2020/src/dev-features/symbols.mjs} +0 -0
- /package/{esm2015/src/operators/leave-ngxs.js → esm2020/src/operators/leave-ngxs.mjs} +0 -0
- /package/{esm2015/src/plugin_api.js → esm2020/src/plugin_api.mjs} +0 -0
- /package/{esm2015/src/private_api.js → esm2020/src/private_api.mjs} +0 -0
- /package/{esm2015/src/public_to_deprecate.js → esm2020/src/public_to_deprecate.mjs} +0 -0
- /package/{esm2015/src/selectors/create-selector.js → esm2020/src/selectors/create-selector.mjs} +0 -0
- /package/{esm2015/src/selectors/index.js → esm2020/src/selectors/index.mjs} +0 -0
- /package/{esm2015/src/selectors/selector-checks.util.js → esm2020/src/selectors/selector-checks.util.mjs} +0 -0
- /package/{esm2015/src/selectors/selector-models.js → esm2020/src/selectors/selector-models.mjs} +0 -0
- /package/{esm2015/src/selectors/selector-utils.js → esm2020/src/selectors/selector-utils.mjs} +0 -0
- /package/{esm2015/src/state-token/state-token.js → esm2020/src/state-token/state-token.mjs} +0 -0
- /package/{esm2015/src/state-token/symbols.js → esm2020/src/state-token/symbols.mjs} +0 -0
- /package/{esm2015/src/utils/compose.js → esm2020/src/utils/compose.mjs} +0 -0
- /package/{esm2015/src/utils/freeze.js → esm2020/src/utils/freeze.mjs} +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { Action, Selector, State, StateContext } from '@ngxs/store';
|
|
3
|
+
import { DictionaryReset, SetDictionaryData } from './dictionary.actions';
|
|
4
|
+
|
|
5
|
+
export interface DictionaryStateModel {
|
|
6
|
+
content: any[];
|
|
7
|
+
page: number;
|
|
8
|
+
size: number;
|
|
9
|
+
totalPages: number;
|
|
10
|
+
totalElements: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@State<DictionaryStateModel>({
|
|
14
|
+
name: 'dictionary',
|
|
15
|
+
defaults: {
|
|
16
|
+
content: [],
|
|
17
|
+
page: 0,
|
|
18
|
+
size: 0,
|
|
19
|
+
totalPages: 0,
|
|
20
|
+
totalElements: 0
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
@Injectable()
|
|
24
|
+
export class DictionaryState {
|
|
25
|
+
@Selector()
|
|
26
|
+
public static getDictionaryState(state: DictionaryStateModel): DictionaryStateModel {
|
|
27
|
+
return DictionaryState.getInstanceState(state);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@Selector()
|
|
31
|
+
public static getDictionaryContent(state: DictionaryStateModel) {
|
|
32
|
+
return state.content;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
private static setInstanceState(state: DictionaryStateModel): DictionaryStateModel {
|
|
36
|
+
return { ...state };
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
private static getInstanceState(state: DictionaryStateModel): DictionaryStateModel {
|
|
40
|
+
return { ...state };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@Action(SetDictionaryData)
|
|
44
|
+
public setTasks(
|
|
45
|
+
{ setState }: StateContext<DictionaryStateModel>,
|
|
46
|
+
{ payload }: SetDictionaryData
|
|
47
|
+
) {
|
|
48
|
+
setState(DictionaryState.setInstanceState(payload));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@Action(DictionaryReset)
|
|
52
|
+
public resetTasks({ setState }: StateContext<DictionaryStateModel>) {
|
|
53
|
+
const initialState = {
|
|
54
|
+
content: [],
|
|
55
|
+
page: 0,
|
|
56
|
+
size: 0,
|
|
57
|
+
totalPages: 0,
|
|
58
|
+
totalElements: 0
|
|
59
|
+
};
|
|
60
|
+
setState(initialState);
|
|
61
|
+
}
|
|
62
|
+
}
|
package/schematics/src/starter-kit/files/store/dashboard/states/user/user.state.spec.ts__template__
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { NgxsModule, Store } from '@ngxs/store';
|
|
2
|
+
import { TestBed } from '@angular/core/testing';
|
|
3
|
+
import { UserStateModel, UserState } from './user.state';
|
|
4
|
+
import { SetUser } from './user.actions';
|
|
5
|
+
|
|
6
|
+
describe('[TEST]: User state', () => {
|
|
7
|
+
let store: Store;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
imports: [NgxsModule.forRoot([UserState])],
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
store = TestBed.inject(Store);
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('Should be state is UserStateModel', () => {
|
|
18
|
+
// Arrange
|
|
19
|
+
const user: UserStateModel = {
|
|
20
|
+
userId: '',
|
|
21
|
+
departmentCode: '',
|
|
22
|
+
departmentName: '',
|
|
23
|
+
email: '',
|
|
24
|
+
firstName: '',
|
|
25
|
+
lastName: '',
|
|
26
|
+
fullName: '',
|
|
27
|
+
positionId: '',
|
|
28
|
+
positionName: ''
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// Act
|
|
32
|
+
store.dispatch(new SetUser(user));
|
|
33
|
+
const actual = store.selectSnapshot(({ user }) => user);
|
|
34
|
+
|
|
35
|
+
// Assert
|
|
36
|
+
expect(actual).toEqual(user);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('Should be state is filled UserStateModel', () => {
|
|
40
|
+
// Arrange
|
|
41
|
+
const user: UserStateModel = {
|
|
42
|
+
userId: '12',
|
|
43
|
+
departmentCode: '2392',
|
|
44
|
+
departmentName: 'Main office',
|
|
45
|
+
email: 'agordon@google.com',
|
|
46
|
+
firstName: 'Adam',
|
|
47
|
+
lastName: 'Gordon',
|
|
48
|
+
fullName: 'Adam Gordon',
|
|
49
|
+
positionId: '102003',
|
|
50
|
+
positionName: 'admin'
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
// Act
|
|
54
|
+
store.dispatch(new SetUser(user));
|
|
55
|
+
const actual = store.selectSnapshot<UserStateModel>(({ user }) => user);
|
|
56
|
+
|
|
57
|
+
// Assert
|
|
58
|
+
expect(actual).toEqual(user);
|
|
59
|
+
});
|
|
60
|
+
});
|
package/schematics/src/starter-kit/files/store/dashboard/states/user/user.state.ts__template__
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { Action, Selector, State, StateContext } from '@ngxs/store';
|
|
3
|
+
import { SetUser } from './user.actions';
|
|
4
|
+
|
|
5
|
+
export interface UserStateModel {
|
|
6
|
+
userId: string;
|
|
7
|
+
email: string;
|
|
8
|
+
firstName: string;
|
|
9
|
+
lastName: string;
|
|
10
|
+
fullName: string;
|
|
11
|
+
positionId: string;
|
|
12
|
+
positionName: string;
|
|
13
|
+
departmentCode: string;
|
|
14
|
+
departmentName: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@State<UserStateModel>({
|
|
18
|
+
name: 'user',
|
|
19
|
+
defaults: {
|
|
20
|
+
userId: '',
|
|
21
|
+
email: '',
|
|
22
|
+
firstName: '',
|
|
23
|
+
lastName: '',
|
|
24
|
+
fullName: '',
|
|
25
|
+
positionId: '',
|
|
26
|
+
positionName: '',
|
|
27
|
+
departmentCode: '',
|
|
28
|
+
departmentName: ''
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
@Injectable()
|
|
32
|
+
export class UserState {
|
|
33
|
+
@Selector()
|
|
34
|
+
public static getUser(state: UserStateModel): UserStateModel {
|
|
35
|
+
return state;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@Action(SetUser)
|
|
39
|
+
public setUser(ctx: StateContext<UserStateModel>, { payload }: SetUser) {
|
|
40
|
+
ctx.setState(payload);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { AuthState } from './auth/auth.state';
|
|
2
|
+
import { DashboardStates, DashboardState } from './dashboard';
|
|
3
|
+
import { NgxsConfig } from '@ngxs/store/src/symbols';
|
|
4
|
+
import { NgxsDevtoolsOptions } from '@ngxs/devtools-plugin/src/symbols';
|
|
5
|
+
import { NgxsLoggerPluginOptions } from '@ngxs/logger-plugin/src/symbols';
|
|
6
|
+
|
|
7
|
+
export const STATES_MODULES = [AuthState, DashboardState, ...DashboardStates];
|
|
8
|
+
|
|
9
|
+
export const OPTIONS_CONFIG: Partial<NgxsConfig> = {
|
|
10
|
+
/**
|
|
11
|
+
* Run in development mode. This will add additional debugging features:
|
|
12
|
+
* - Object.freeze on the state and actions to guarantee immutability
|
|
13
|
+
* todo: you need set production mode
|
|
14
|
+
* import { environment } from '@env';
|
|
15
|
+
* developmentMode: !environment.production
|
|
16
|
+
*/
|
|
17
|
+
developmentMode: true
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const DEVTOOLS_REDUX_CONFIG: NgxsDevtoolsOptions = {
|
|
21
|
+
/**
|
|
22
|
+
* Whether the dev tools is enabled or note. Useful for setting during production.
|
|
23
|
+
* todo: you need set production mode
|
|
24
|
+
* import { environment } from '@env';
|
|
25
|
+
* disabled: environment.production
|
|
26
|
+
*/
|
|
27
|
+
disabled: false
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const LOGGER_CONFIG: NgxsLoggerPluginOptions = {
|
|
31
|
+
/**
|
|
32
|
+
* Disable the logger. Useful for prod mode..
|
|
33
|
+
* todo: you need set production mode
|
|
34
|
+
* import { environment } from '@env';
|
|
35
|
+
* disabled: environment.production
|
|
36
|
+
*/
|
|
37
|
+
disabled: false
|
|
38
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { NgxsModule } from '@ngxs/store';
|
|
4
|
+
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin';
|
|
5
|
+
import { NgxsReduxDevtoolsPluginModule } from '@ngxs/devtools-plugin';
|
|
6
|
+
import {
|
|
7
|
+
DEVTOOLS_REDUX_CONFIG,
|
|
8
|
+
LOGGER_CONFIG,
|
|
9
|
+
OPTIONS_CONFIG,
|
|
10
|
+
STATES_MODULES
|
|
11
|
+
} from './store.config';
|
|
12
|
+
|
|
13
|
+
@NgModule({
|
|
14
|
+
imports: [
|
|
15
|
+
CommonModule,
|
|
16
|
+
NgxsModule.forRoot(STATES_MODULES, OPTIONS_CONFIG),
|
|
17
|
+
NgxsReduxDevtoolsPluginModule.forRoot(DEVTOOLS_REDUX_CONFIG),
|
|
18
|
+
NgxsLoggerPluginModule.forRoot(LOGGER_CONFIG)
|
|
19
|
+
],
|
|
20
|
+
exports: [NgxsModule]
|
|
21
|
+
})
|
|
22
|
+
export class NgxsStoreModule {}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "SchematicsNgxsStarterKit",
|
|
4
|
+
"title": "Ngxs Starter Kit Options Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"path": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The path to create the starter kit."
|
|
10
|
+
},
|
|
11
|
+
"spec": {
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"description": "Specifies if a spec file is generated.",
|
|
14
|
+
"default": true
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": ["path"]
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.starterKit = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const normalize_options_1 = require("../utils/normalize-options");
|
|
6
|
+
const generate_utils_1 = require("../utils/generate-utils");
|
|
7
|
+
function starterKit(options) {
|
|
8
|
+
const normalizedPath = (0, normalize_options_1.normalizePath)(options.path);
|
|
9
|
+
return (0, generate_utils_1.generateFiles)((0, schematics_1.url)('./files'), normalizedPath, options, options.spec);
|
|
10
|
+
}
|
|
11
|
+
exports.starterKit = starterKit;
|
|
12
|
+
//# sourceMappingURL=starter-kit.factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"starter-kit.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/starter-kit/starter-kit.factory.ts"],"names":[],"mappings":";;;AAAA,2DAAuD;AAEvD,kEAA2D;AAC3D,4DAAwD;AAExD,SAAgB,UAAU,CAAC,OAAyB;IAClD,MAAM,cAAc,GAAG,IAAA,iCAAa,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD,OAAO,IAAA,8BAAa,EAAC,IAAA,gBAAG,EAAC,SAAS,CAAC,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9E,CAAC;AAJD,gCAIC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
import { NgxsModule, Store } from '@ngxs/store';
|
|
3
|
+
import { <%= classify(name) %>State, <%= classify(name) %>StateModel } from './<%= dasherize(name) %>.state';
|
|
4
|
+
|
|
5
|
+
describe('<%= classify(name) %> state', () => {
|
|
6
|
+
let store: Store;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
TestBed.configureTestingModule({
|
|
10
|
+
imports: [NgxsModule.forRoot([<%= classify(name) %>State])]
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
store = TestBed.inject(Store);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('should create an empty state', () => {
|
|
17
|
+
const actual = store.selectSnapshot(<%= classify(name) %>State.getState);
|
|
18
|
+
const expected: <%= classify(name) %>StateModel = {
|
|
19
|
+
items: []
|
|
20
|
+
};
|
|
21
|
+
expect(actual).toEqual(expected);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { State, Selector } from '@ngxs/store';
|
|
3
|
+
|
|
4
|
+
export interface <%= classify(name) %>StateModel {
|
|
5
|
+
items: string[];
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@State<<%= classify(name) %>StateModel>({
|
|
9
|
+
name: '<%= camelize(name) %>',
|
|
10
|
+
defaults: {
|
|
11
|
+
items: []
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
@Injectable()
|
|
15
|
+
export class <%= classify(name) %>State {
|
|
16
|
+
|
|
17
|
+
@Selector()
|
|
18
|
+
public static getState(state: <%= classify(name) %>StateModel) {
|
|
19
|
+
return state;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "SchematicsNgxsState",
|
|
4
|
+
"title": "Ngxs State Options Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"description": "The name of the state.",
|
|
9
|
+
"type": "string",
|
|
10
|
+
"$default": {
|
|
11
|
+
"$source": "argv",
|
|
12
|
+
"index": 0
|
|
13
|
+
},
|
|
14
|
+
"x-prompt": "What name would you like to use for the state?"
|
|
15
|
+
},
|
|
16
|
+
"path": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"format": "path",
|
|
19
|
+
"description": "The path to create the state."
|
|
20
|
+
},
|
|
21
|
+
"spec": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"description": "Specifies if a spec file is generated.",
|
|
24
|
+
"default": true
|
|
25
|
+
},
|
|
26
|
+
"flat": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"default": false,
|
|
29
|
+
"description": "Flag to indicate if a dir is created."
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": ["name"]
|
|
33
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.state = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const properties_1 = require("../utils/common/properties");
|
|
6
|
+
const normalize_options_1 = require("../utils/normalize-options");
|
|
7
|
+
const generate_utils_1 = require("../utils/generate-utils");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
function state(options) {
|
|
10
|
+
if ((0, properties_1.isEmpty)(options.name)) {
|
|
11
|
+
throw new schematics_1.SchematicsException('Invalid options, "name" is required.');
|
|
12
|
+
}
|
|
13
|
+
const normalizedOptions = (0, normalize_options_1.normalizeBaseOptions)(options);
|
|
14
|
+
const path = options.flat
|
|
15
|
+
? normalizedOptions.path
|
|
16
|
+
: (0, path_1.join)(normalizedOptions.path, normalizedOptions.name);
|
|
17
|
+
return (0, generate_utils_1.generateFiles)((0, schematics_1.url)('./files'), path, options, options.spec);
|
|
18
|
+
}
|
|
19
|
+
exports.state = state;
|
|
20
|
+
//# sourceMappingURL=state.factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/state/state.factory.ts"],"names":[],"mappings":";;;AAAA,2DAA4E;AAE5E,2DAAqD;AACrD,kEAAkE;AAClE,4DAAwD;AACxD,+BAA4B;AAE5B,SAAgB,KAAK,CAAC,OAAoB;IACxC,IAAI,IAAA,oBAAO,EAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACzB,MAAM,IAAI,gCAAmB,CAAC,sCAAsC,CAAC,CAAC;KACvE;IAED,MAAM,iBAAiB,GAAG,IAAA,wCAAoB,EAAC,OAAO,CAAC,CAAC;IACxD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI;QACvB,CAAC,CAAC,iBAAiB,CAAC,IAAI;QACxB,CAAC,CAAC,IAAA,WAAI,EAAC,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEzD,OAAO,IAAA,8BAAa,EAAC,IAAA,gBAAG,EAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AACpE,CAAC;AAXD,sBAWC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
import { NgxsModule, Store } from '@ngxs/store';
|
|
3
|
+
import { <%= classify(name) %>State, <%= classify(name) %>StateModel } from './<%= dasherize(name) %>.state';
|
|
4
|
+
import { <%= classify(name) %>Action } from './<%= dasherize(name) %>.actions';
|
|
5
|
+
|
|
6
|
+
describe('<%= classify(name) %> store', () => {
|
|
7
|
+
let store: Store;
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
TestBed.configureTestingModule({
|
|
10
|
+
imports: [NgxsModule.forRoot([<%= classify(name) %>State])]
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
store = TestBed.inject(Store);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('should create an action and add an item', () => {
|
|
17
|
+
const expected: <%= classify(name) %>StateModel = {
|
|
18
|
+
items: ['item-1']
|
|
19
|
+
};
|
|
20
|
+
store.dispatch(new <%= classify(name) %>Action('item-1'));
|
|
21
|
+
const actual = store.selectSnapshot(<%= classify(name) %>State.getState);
|
|
22
|
+
expect(actual).toEqual(expected);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { State, Action, Selector, StateContext } from '@ngxs/store';
|
|
3
|
+
import { <%= classify(name) %>Action } from './<%= dasherize(name) %>.actions';
|
|
4
|
+
|
|
5
|
+
export interface <%= classify(name) %>StateModel {
|
|
6
|
+
items: string[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@State<<%= classify(name) %>StateModel>({
|
|
10
|
+
name: '<%= camelize(name) %>',
|
|
11
|
+
defaults: {
|
|
12
|
+
items: []
|
|
13
|
+
}
|
|
14
|
+
})
|
|
15
|
+
@Injectable()
|
|
16
|
+
export class <%= classify(name) %>State {
|
|
17
|
+
|
|
18
|
+
@Selector()
|
|
19
|
+
public static getState(state: <%= classify(name) %>StateModel) {
|
|
20
|
+
return state;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@Action(<%= classify(name) %>Action)
|
|
24
|
+
public add(ctx: StateContext<<%= classify(name) %>StateModel>, { payload }: <%= classify(name) %>Action) {
|
|
25
|
+
const stateModel = ctx.getState();
|
|
26
|
+
stateModel.items = [...stateModel.items, payload];
|
|
27
|
+
ctx.setState(stateModel);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "SchematicsNgxsStore",
|
|
4
|
+
"title": "Ngxs Store Options Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"description": "The name of the store.",
|
|
9
|
+
"type": "string",
|
|
10
|
+
"$default": {
|
|
11
|
+
"$source": "argv",
|
|
12
|
+
"index": 0
|
|
13
|
+
},
|
|
14
|
+
"x-prompt": "What name would you like to use for the store?"
|
|
15
|
+
},
|
|
16
|
+
"path": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"format": "path",
|
|
19
|
+
"description": "The path to create the store."
|
|
20
|
+
},
|
|
21
|
+
"spec": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"description": "Specifies if a spec file is generated.",
|
|
24
|
+
"default": true
|
|
25
|
+
},
|
|
26
|
+
"flat": {
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"default": false,
|
|
29
|
+
"description": "Flag to indicate if a dir is created."
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": ["name"]
|
|
33
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.store = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const properties_1 = require("../utils/common/properties");
|
|
6
|
+
const normalize_options_1 = require("../utils/normalize-options");
|
|
7
|
+
const generate_utils_1 = require("../utils/generate-utils");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
function store(options) {
|
|
10
|
+
if ((0, properties_1.isEmpty)(options.name)) {
|
|
11
|
+
throw new schematics_1.SchematicsException('Invalid options, "name" is required.');
|
|
12
|
+
}
|
|
13
|
+
const normalizedOptions = (0, normalize_options_1.normalizeBaseOptions)(options);
|
|
14
|
+
const path = options.flat
|
|
15
|
+
? normalizedOptions.path
|
|
16
|
+
: (0, path_1.join)(normalizedOptions.path, normalizedOptions.name);
|
|
17
|
+
return (0, generate_utils_1.generateFiles)((0, schematics_1.url)('./files'), path, options, options.spec);
|
|
18
|
+
}
|
|
19
|
+
exports.store = store;
|
|
20
|
+
//# sourceMappingURL=store.factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.factory.js","sourceRoot":"","sources":["../../../../../packages/store/schematics/src/store/store.factory.ts"],"names":[],"mappings":";;;AAAA,2DAA4E;AAE5E,2DAAqD;AACrD,kEAAkE;AAClE,4DAAwD;AACxD,+BAA4B;AAE5B,SAAgB,KAAK,CAAC,OAAoB;IACxC,IAAI,IAAA,oBAAO,EAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACzB,MAAM,IAAI,gCAAmB,CAAC,sCAAsC,CAAC,CAAC;KACvE;IAED,MAAM,iBAAiB,GAAG,IAAA,wCAAoB,EAAC,OAAO,CAAC,CAAC;IACxD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI;QACvB,CAAC,CAAC,iBAAiB,CAAC,IAAI;QACxB,CAAC,CAAC,IAAA,WAAI,EAAC,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEzD,OAAO,IAAA,8BAAa,EAAC,IAAA,gBAAG,EAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;AACpE,CAAC;AAXD,sBAWC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum LIBRARIES {
|
|
2
|
+
DEVTOOLS = "@ngxs/devtools-plugin",
|
|
3
|
+
FORM = "@ngxs/form-plugin",
|
|
4
|
+
HMR = "@ngxs/hmr-plugin",
|
|
5
|
+
LOGGER = "@ngxs/logger-plugin",
|
|
6
|
+
ROUTER = "@ngxs/router-plugin",
|
|
7
|
+
STORAGE = "@ngxs/storage-plugin",
|
|
8
|
+
STORE = "@ngxs/store",
|
|
9
|
+
WEBSOCKET = "@ngxs/websocket-plugin"
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LIBRARIES = void 0;
|
|
4
|
+
var LIBRARIES;
|
|
5
|
+
(function (LIBRARIES) {
|
|
6
|
+
LIBRARIES["DEVTOOLS"] = "@ngxs/devtools-plugin";
|
|
7
|
+
LIBRARIES["FORM"] = "@ngxs/form-plugin";
|
|
8
|
+
LIBRARIES["HMR"] = "@ngxs/hmr-plugin";
|
|
9
|
+
LIBRARIES["LOGGER"] = "@ngxs/logger-plugin";
|
|
10
|
+
LIBRARIES["ROUTER"] = "@ngxs/router-plugin";
|
|
11
|
+
LIBRARIES["STORAGE"] = "@ngxs/storage-plugin";
|
|
12
|
+
LIBRARIES["STORE"] = "@ngxs/store";
|
|
13
|
+
LIBRARIES["WEBSOCKET"] = "@ngxs/websocket-plugin";
|
|
14
|
+
})(LIBRARIES = exports.LIBRARIES || (exports.LIBRARIES = {}));
|
|
15
|
+
//# sourceMappingURL=lib.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.config.js","sourceRoot":"","sources":["../../../../../../packages/store/schematics/src/utils/common/lib.config.ts"],"names":[],"mappings":";;;AAAA,IAAY,SASX;AATD,WAAY,SAAS;IACnB,+CAAkC,CAAA;IAClC,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,2CAA8B,CAAA;IAC9B,2CAA8B,CAAA;IAC9B,6CAAgC,CAAA;IAChC,kCAAqB,CAAA;IACrB,iDAAoC,CAAA;AACtC,CAAC,EATW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QASpB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TSCONFIG_SPEC_JSON = exports.ANGULAR_JSON = exports.PACKAGE_JSON = void 0;
|
|
4
|
+
exports.PACKAGE_JSON = 'package.json';
|
|
5
|
+
exports.ANGULAR_JSON = 'angular.json';
|
|
6
|
+
exports.TSCONFIG_SPEC_JSON = 'src/tsconfig.spec.json';
|
|
7
|
+
//# sourceMappingURL=project-files.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-files.config.js","sourceRoot":"","sources":["../../../../../../packages/store/schematics/src/utils/common/project-files.config.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,cAAc,CAAC;AAC9B,QAAA,YAAY,GAAG,cAAc,CAAC;AAC9B,QAAA,kBAAkB,GAAG,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isEmpty(value: string | undefined): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isEmpty = void 0;
|
|
4
|
+
function isEmpty(value) {
|
|
5
|
+
return typeof value !== 'undefined' && !value.trim().length;
|
|
6
|
+
}
|
|
7
|
+
exports.isEmpty = isEmpty;
|
|
8
|
+
//# sourceMappingURL=properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../../../../packages/store/schematics/src/utils/common/properties.ts"],"names":[],"mappings":";;;AAAA,SAAgB,OAAO,CAAC,KAAyB;IAC/C,OAAO,OAAO,KAAK,KAAK,WAAW,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC;AAC9D,CAAC;AAFD,0BAEC"}
|