@o3r/core 10.0.0-next.8 → 11.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -13
- package/builders/app-version/index.d.ts.map +1 -1
- package/builders/app-version/index.js +1 -1
- package/builders/app-version/index.js.map +1 -1
- package/builders/app-version/schema.json +1 -1
- package/builders/lib-build/schema.json +1 -1
- package/builders/multi-watcher/schema.json +1 -1
- package/builders/ngc/schema.json +1 -1
- package/builders/pattern-replacement/index.d.ts.map +1 -1
- package/builders/pattern-replacement/index.js +5 -5
- package/builders/pattern-replacement/index.js.map +1 -1
- package/builders/pattern-replacement/schema.json +1 -1
- package/builders/run-script/index.d.ts +4 -0
- package/builders/run-script/index.d.ts.map +1 -0
- package/builders/run-script/index.js +34 -0
- package/builders/run-script/index.js.map +1 -0
- package/builders/run-script/schema.d.ts +6 -0
- package/builders/run-script/schema.d.ts.map +1 -0
- package/{schematics/library → builders/run-script}/schema.js.map +1 -1
- package/builders/run-script/schema.json +15 -0
- package/builders.json +5 -0
- package/collection.json +0 -23
- package/core/application/dgp.interfaces.d.ts +6 -3
- package/core/application/dgp.interfaces.d.ts.map +1 -1
- package/core/devkit/devtools.interface.d.ts +16 -2
- package/core/devkit/devtools.interface.d.ts.map +1 -1
- package/core/index.d.ts +1 -0
- package/core/index.d.ts.map +1 -1
- package/core/index.js +1 -0
- package/core/index.js.map +1 -1
- package/core/interfaces/configuration.d.ts +39 -17
- package/core/interfaces/configuration.d.ts.map +1 -1
- package/core/interfaces/index.d.ts +0 -3
- package/core/interfaces/index.d.ts.map +1 -1
- package/core/interfaces/index.js +0 -3
- package/core/interfaces/index.js.map +1 -1
- package/core/metadata/component.decorator.d.ts +0 -1
- package/core/metadata/component.decorator.d.ts.map +1 -1
- package/core/metadata/component.decorator.js +0 -1
- package/core/metadata/component.decorator.js.map +1 -1
- package/core/metadata/component.identifier.d.ts +7 -0
- package/core/metadata/component.identifier.d.ts.map +1 -0
- package/core/metadata/component.identifier.js +9 -0
- package/core/metadata/component.identifier.js.map +1 -0
- package/core/metadata/index.d.ts +1 -0
- package/core/metadata/index.d.ts.map +1 -1
- package/core/metadata/index.js +1 -0
- package/core/metadata/index.js.map +1 -1
- package/core/rules-engine/index.d.ts +2 -0
- package/core/rules-engine/index.d.ts.map +1 -0
- package/core/rules-engine/index.js +2 -0
- package/core/rules-engine/index.js.map +1 -0
- package/core/rules-engine/rules-engine.interfaces.d.ts +24 -0
- package/core/rules-engine/rules-engine.interfaces.d.ts.map +1 -0
- package/core/rules-engine/rules-engine.interfaces.js +2 -0
- package/core/rules-engine/rules-engine.interfaces.js.map +1 -0
- package/esm2022/core/application/dgp.interfaces.mjs +1 -1
- package/esm2022/core/devkit/devtools.interface.mjs +1 -1
- package/esm2022/core/index.mjs +2 -1
- package/esm2022/core/interfaces/configuration.mjs +1 -1
- package/esm2022/core/interfaces/index.mjs +1 -4
- package/esm2022/core/metadata/component.decorator.mjs +1 -2
- package/esm2022/core/metadata/component.identifier.mjs +9 -0
- package/esm2022/core/metadata/index.mjs +2 -1
- package/esm2022/core/rules-engine/index.mjs +2 -0
- package/esm2022/core/rules-engine/rules-engine.interfaces.mjs +2 -0
- package/esm2022/log/logger.mjs +1 -1
- package/esm2022/messages/message.helpers.mjs +1 -5
- package/esm2022/store/async/async-entity.adapter.mjs +1 -2
- package/esm2022/store/async/async.adapter.mjs +1 -1
- package/esm2022/store/async/async.helpers.mjs +1 -4
- package/esm2022/store/async/async.operators.mjs +3 -4
- package/esm2022/store/async/async.serializer.mjs +1 -4
- package/esm2022/store/index.mjs +1 -2
- package/esm2022/utils/debug/debug.helper.mjs +1 -3
- package/esm2022/utils/deep-fill/deep-fill.mjs +23 -28
- package/esm2022/utils/rendering/rendering.helpers.mjs +1 -2
- package/fesm2022/o3r-core.mjs +47 -169
- package/fesm2022/o3r-core.mjs.map +1 -1
- package/log/logger.d.ts +0 -5
- package/log/logger.d.ts.map +1 -1
- package/messages/message.helpers.d.ts +0 -3
- package/messages/message.helpers.d.ts.map +1 -1
- package/messages/message.helpers.js +0 -4
- package/messages/message.helpers.js.map +1 -1
- package/migration.json +5 -0
- package/package.json +46 -39
- package/schematics/add-modules/index.d.ts +1 -2
- package/schematics/add-modules/index.d.ts.map +1 -1
- package/schematics/add-modules/index.js +16 -9
- package/schematics/add-modules/index.js.map +1 -1
- package/schematics/add-modules/schema.d.ts +5 -1
- package/schematics/add-modules/schema.d.ts.map +1 -1
- package/schematics/add-modules/schema.json +14 -4
- package/schematics/component/container/index.d.ts +0 -1
- package/schematics/component/container/index.d.ts.map +1 -1
- package/schematics/component/container/index.js +1 -3
- package/schematics/component/container/index.js.map +1 -1
- package/schematics/component/container/schema.json +1 -1
- package/schematics/component/index.d.ts.map +1 -1
- package/schematics/component/index.js +5 -2
- package/schematics/component/index.js.map +1 -1
- package/schematics/component/presenter/index.d.ts +0 -1
- package/schematics/component/presenter/index.d.ts.map +1 -1
- package/schematics/component/presenter/index.js +9 -9
- package/schematics/component/presenter/index.js.map +1 -1
- package/schematics/component/presenter/schema.json +4 -3
- package/schematics/component/schema.json +4 -4
- package/schematics/component/structures.types.d.ts +3 -2
- package/schematics/component/structures.types.d.ts.map +1 -1
- package/schematics/component/structures.types.js +1 -0
- package/schematics/component/structures.types.js.map +1 -1
- package/schematics/context-to-component/index.d.ts.map +1 -1
- package/schematics/context-to-component/index.js +1 -1
- package/schematics/context-to-component/index.js.map +1 -1
- package/schematics/context-to-component/schema.json +1 -1
- package/schematics/convert-component/index.js +2 -2
- package/schematics/convert-component/index.js.map +1 -1
- package/schematics/convert-component/schema.json +1 -1
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +30 -31
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/project-setup/index.d.ts +0 -1
- package/schematics/ng-add/project-setup/index.d.ts.map +1 -1
- package/schematics/ng-add/project-setup/index.js +16 -65
- package/schematics/ng-add/project-setup/index.js.map +1 -1
- package/schematics/ng-add/schema.d.ts +7 -46
- package/schematics/ng-add/schema.d.ts.map +1 -1
- package/schematics/ng-add/schema.json +16 -86
- package/schematics/ng-add/updates-for-v8/cms-adapters/update-builders-names.d.ts.map +1 -1
- package/schematics/ng-add/updates-for-v8/cms-adapters/update-builders-names.js +7 -3
- package/schematics/ng-add/updates-for-v8/cms-adapters/update-builders-names.js.map +1 -1
- package/schematics/ng-add/updates-for-v8/generators/update-generators-names.d.ts.map +1 -1
- package/schematics/ng-add/updates-for-v8/generators/update-generators-names.js +7 -2
- package/schematics/ng-add/updates-for-v8/generators/update-generators-names.js.map +1 -1
- package/schematics/ng-add-create/schema.json +1 -1
- package/schematics/ng-add-create/templates/schematics/ng-add/schema.json.template +2 -2
- package/schematics/ng-update/index.d.ts +4 -0
- package/schematics/ng-update/index.d.ts.map +1 -1
- package/schematics/ng-update/index.js +14 -1
- package/schematics/ng-update/index.js.map +1 -1
- package/schematics/ng-update/v10.0/configuration.d.ts +9 -0
- package/schematics/ng-update/v10.0/configuration.d.ts.map +1 -0
- package/schematics/ng-update/v10.0/configuration.js +23 -0
- package/schematics/ng-update/v10.0/configuration.js.map +1 -0
- package/schematics/page/index.d.ts +0 -1
- package/schematics/page/index.d.ts.map +1 -1
- package/schematics/page/index.js +6 -11
- package/schematics/page/index.js.map +1 -1
- package/schematics/page/schema.json +1 -1
- package/schematics/renovate/schema.json +1 -1
- package/schematics/renovate/templates/azure-pipelines.ugrade.yml +1 -1
- package/schematics/rule-factories/additional-modules/index.d.ts +0 -1
- package/schematics/rule-factories/additional-modules/index.d.ts.map +1 -1
- package/schematics/rule-factories/additional-modules/index.js +14 -18
- package/schematics/rule-factories/additional-modules/index.js.map +1 -1
- package/schematics/rule-factories/component/common.js +2 -2
- package/schematics/rule-factories/component/common.js.map +1 -1
- package/schematics/rule-factories/customization-environment/index.d.ts +0 -1
- package/schematics/rule-factories/customization-environment/index.d.ts.map +1 -1
- package/schematics/rule-factories/customization-environment/index.js +9 -30
- package/schematics/rule-factories/customization-environment/index.js.map +1 -1
- package/schematics/rule-factories/index.d.ts +0 -3
- package/schematics/rule-factories/index.d.ts.map +1 -1
- package/schematics/rule-factories/index.js +0 -3
- package/schematics/rule-factories/index.js.map +1 -1
- package/schematics/rule-factories/o3r-basic-updates/index.d.ts +1 -2
- package/schematics/rule-factories/o3r-basic-updates/index.d.ts.map +1 -1
- package/schematics/rule-factories/o3r-basic-updates/index.js +7 -4
- package/schematics/rule-factories/o3r-basic-updates/index.js.map +1 -1
- package/schematics/rule-factories/otter-environment/index.d.ts +0 -1
- package/schematics/rule-factories/otter-environment/index.d.ts.map +1 -1
- package/schematics/rule-factories/otter-environment/index.js +8 -13
- package/schematics/rule-factories/otter-environment/index.js.map +1 -1
- package/schematics/rule-factories/store/index.d.ts.map +1 -1
- package/schematics/rule-factories/store/index.js +30 -13
- package/schematics/rule-factories/store/index.js.map +1 -1
- package/schematics/schematics-update/schema.json +1 -1
- package/schematics/service/index.d.ts +0 -1
- package/schematics/service/index.d.ts.map +1 -1
- package/schematics/service/index.js +1 -2
- package/schematics/service/index.js.map +1 -1
- package/schematics/service/schema.json +1 -1
- package/schematics/shared/presets/all.preset.d.ts +10 -0
- package/schematics/shared/presets/all.preset.d.ts.map +1 -0
- package/schematics/shared/presets/all.preset.js +40 -0
- package/schematics/shared/presets/all.preset.js.map +1 -0
- package/schematics/shared/presets/external.preset.d.ts +10 -0
- package/schematics/shared/presets/external.preset.d.ts.map +1 -0
- package/schematics/shared/presets/external.preset.js +25 -0
- package/schematics/shared/presets/external.preset.js.map +1 -0
- package/schematics/shared/presets/helpers.js +1 -1
- package/schematics/shared/presets/helpers.js.map +1 -1
- package/schematics/shared/presets/index.d.ts +1 -0
- package/schematics/shared/presets/index.d.ts.map +1 -1
- package/schematics/shared/presets/index.js +4 -1
- package/schematics/shared/presets/index.js.map +1 -1
- package/schematics/show-modules/index.d.ts +1 -2
- package/schematics/show-modules/index.d.ts.map +1 -1
- package/schematics/show-modules/index.js +3 -5
- package/schematics/show-modules/index.js.map +1 -1
- package/schematics/show-modules/schema.json +1 -1
- package/schematics/store/entity-async/index.d.ts.map +1 -1
- package/schematics/store/entity-async/index.js +4 -0
- package/schematics/store/entity-async/index.js.map +1 -1
- package/schematics/store/entity-async/schema.json +1 -1
- package/schematics/store/entity-async/templates/__storeName@dasherize__.state.ts +1 -1
- package/schematics/store/entity-sync/index.d.ts.map +1 -1
- package/schematics/store/entity-sync/index.js +4 -0
- package/schematics/store/entity-sync/index.js.map +1 -1
- package/schematics/store/entity-sync/schema.json +1 -1
- package/schematics/store/entity-sync/templates/__storeName@dasherize__.state.ts +1 -1
- package/schematics/store/schema.json +1 -1
- package/schematics/store/simple-async/index.d.ts.map +1 -1
- package/schematics/store/simple-async/index.js +2 -0
- package/schematics/store/simple-async/index.js.map +1 -1
- package/schematics/store/simple-async/schema.json +1 -1
- package/schematics/store/simple-sync/index.d.ts.map +1 -1
- package/schematics/store/simple-sync/index.js +1 -0
- package/schematics/store/simple-sync/index.js.map +1 -1
- package/schematics/store/simple-sync/schema.json +1 -1
- package/schematics/store-action/schema.json +1 -1
- package/store/async/async-entity.adapter.d.ts +0 -8
- package/store/async/async-entity.adapter.d.ts.map +1 -1
- package/store/async/async-entity.adapter.js +0 -1
- package/store/async/async-entity.adapter.js.map +1 -1
- package/store/async/async.adapter.d.ts +0 -13
- package/store/async/async.adapter.d.ts.map +1 -1
- package/store/async/async.adapter.js.map +1 -1
- package/store/async/async.helpers.d.ts +0 -3
- package/store/async/async.helpers.d.ts.map +1 -1
- package/store/async/async.helpers.js +0 -3
- package/store/async/async.helpers.js.map +1 -1
- package/store/async/async.operators.d.ts +2 -3
- package/store/async/async.operators.d.ts.map +1 -1
- package/store/async/async.operators.js +2 -3
- package/store/async/async.operators.js.map +1 -1
- package/store/async/async.serializer.d.ts +0 -3
- package/store/async/async.serializer.d.ts.map +1 -1
- package/store/async/async.serializer.js +0 -3
- package/store/async/async.serializer.js.map +1 -1
- package/store/index.d.ts +0 -1
- package/store/index.d.ts.map +1 -1
- package/store/index.js +0 -1
- package/store/index.js.map +1 -1
- package/utils/debug/debug.helper.d.ts +0 -2
- package/utils/debug/debug.helper.d.ts.map +1 -1
- package/utils/debug/debug.helper.js +0 -2
- package/utils/debug/debug.helper.js.map +1 -1
- package/utils/deep-fill/deep-fill.d.ts +17 -12
- package/utils/deep-fill/deep-fill.d.ts.map +1 -1
- package/utils/deep-fill/deep-fill.js +22 -27
- package/utils/deep-fill/deep-fill.js.map +1 -1
- package/utils/rendering/rendering.helpers.d.ts +0 -1
- package/utils/rendering/rendering.helpers.d.ts.map +1 -1
- package/utils/rendering/rendering.helpers.js +0 -1
- package/utils/rendering/rendering.helpers.js.map +1 -1
- package/builders/package.json +0 -3
- package/core/interfaces/block.d.ts +0 -9
- package/core/interfaces/block.d.ts.map +0 -1
- package/core/interfaces/block.js +0 -2
- package/core/interfaces/block.js.map +0 -1
- package/core/interfaces/exposed-component.d.ts +0 -10
- package/core/interfaces/exposed-component.d.ts.map +0 -1
- package/core/interfaces/exposed-component.js +0 -2
- package/core/interfaces/exposed-component.js.map +0 -1
- package/core/interfaces/page.d.ts +0 -9
- package/core/interfaces/page.d.ts.map +0 -1
- package/core/interfaces/page.js +0 -2
- package/core/interfaces/page.js.map +0 -1
- package/esm2022/core/interfaces/block.mjs +0 -2
- package/esm2022/core/interfaces/exposed-component.mjs +0 -2
- package/esm2022/core/interfaces/page.mjs +0 -2
- package/esm2022/store/storage/index.mjs +0 -2
- package/esm2022/store/storage/store-sync.mjs +0 -111
- package/schematics/application/index.d.ts +0 -9
- package/schematics/application/index.d.ts.map +0 -1
- package/schematics/application/index.js +0 -68
- package/schematics/application/index.js.map +0 -1
- package/schematics/application/schema.d.ts +0 -14
- package/schematics/application/schema.d.ts.map +0 -1
- package/schematics/application/schema.js.map +0 -1
- package/schematics/application/schema.json +0 -38
- package/schematics/application/templates/package.json.template +0 -29
- package/schematics/library/index.d.ts +0 -9
- package/schematics/library/index.d.ts.map +0 -1
- package/schematics/library/index.js +0 -41
- package/schematics/library/index.js.map +0 -1
- package/schematics/library/rules/rules.ng.d.ts +0 -11
- package/schematics/library/rules/rules.ng.d.ts.map +0 -1
- package/schematics/library/rules/rules.ng.js +0 -113
- package/schematics/library/rules/rules.ng.js.map +0 -1
- package/schematics/library/rules/rules.nx.d.ts +0 -10
- package/schematics/library/rules/rules.nx.d.ts.map +0 -1
- package/schematics/library/rules/rules.nx.js +0 -126
- package/schematics/library/rules/rules.nx.js.map +0 -1
- package/schematics/library/rules/shared.d.ts +0 -19
- package/schematics/library/rules/shared.d.ts.map +0 -1
- package/schematics/library/rules/shared.js +0 -84
- package/schematics/library/rules/shared.js.map +0 -1
- package/schematics/library/schema.d.ts +0 -18
- package/schematics/library/schema.d.ts.map +0 -1
- package/schematics/library/schema.js +0 -3
- package/schematics/library/schema.json +0 -51
- package/schematics/library/templates/ng/.eslintrc.js.template +0 -19
- package/schematics/library/templates/ng/.gitignore.template +0 -2
- package/schematics/library/templates/ng/.npmignore.template +0 -0
- package/schematics/library/templates/ng/jest.config.js.template +0 -37
- package/schematics/library/templates/ng/testing/setup-jest.ts.template +0 -2
- package/schematics/library/templates/ng/tsconfig.builders.json.template +0 -22
- package/schematics/library/templates/ng/tsconfig.eslint.json.template +0 -8
- package/schematics/library/templates/ng/tsconfig.json.template +0 -12
- package/schematics/library/templates/ng/tsconfig.spec.json.template +0 -17
- package/schematics/library/templates/nx/.eslintrc.js.template +0 -19
- package/schematics/library/templates/nx/.gitignore.template +0 -2
- package/schematics/library/templates/nx/.npmignore.template +0 -0
- package/schematics/library/templates/nx/jest.config.js.template +0 -37
- package/schematics/library/templates/nx/project.json.template +0 -66
- package/schematics/library/templates/nx/testing/setup-jest.ts.template +0 -2
- package/schematics/library/templates/nx/tsconfig.eslint.json.template +0 -8
- package/schematics/package.json +0 -3
- package/schematics/rule-factories/azure-pipeline/index.d.ts +0 -14
- package/schematics/rule-factories/azure-pipeline/index.d.ts.map +0 -1
- package/schematics/rule-factories/azure-pipeline/index.js +0 -64
- package/schematics/rule-factories/azure-pipeline/index.js.map +0 -1
- package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/attach-files-to-test-results.js.template +0 -147
- package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/compute-deployment-service-url.js.template +0 -20
- package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/gen-pckg-json-e2e.js.template +0 -15
- package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/get-app-version.js.template +0 -36
- package/schematics/rule-factories/azure-pipeline/templates/azure/scripts/e2e/get-major-minor.js.template +0 -8
- package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/allure.yml.template +0 -24
- package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/cascading.yml.template +0 -8
- package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/publish.yml.template +0 -14
- package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/set-version-tag.yml.template +0 -13
- package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/setup.yml.template +0 -21
- package/schematics/rule-factories/azure-pipeline/templates/azure/templates/steps/versioning.yml.template +0 -8
- package/schematics/rule-factories/azure-pipeline/templates/azure-pipelines.yml.template +0 -252
- package/schematics/rule-factories/module-list/index.d.ts +0 -11
- package/schematics/rule-factories/module-list/index.d.ts.map +0 -1
- package/schematics/rule-factories/module-list/index.js +0 -45
- package/schematics/rule-factories/module-list/index.js.map +0 -1
- package/schematics/rule-factories/monorepo/index.d.ts +0 -16
- package/schematics/rule-factories/monorepo/index.d.ts.map +0 -1
- package/schematics/rule-factories/monorepo/index.js +0 -65
- package/schematics/rule-factories/monorepo/index.js.map +0 -1
- package/schematics/rule-factories/renovate/index.d.ts +0 -8
- package/schematics/rule-factories/renovate/index.d.ts.map +0 -1
- package/schematics/rule-factories/renovate/index.js +0 -27
- package/schematics/rule-factories/renovate/index.js.map +0 -1
- package/schematics/rule-factories/renovate/templates/__dot__renovaterc.json.template +0 -61
- package/schematics/sdk/index.d.ts +0 -8
- package/schematics/sdk/index.d.ts.map +0 -1
- package/schematics/sdk/index.js +0 -62
- package/schematics/sdk/index.js.map +0 -1
- package/schematics/sdk/rules/clean-standalone.rule.d.ts +0 -7
- package/schematics/sdk/rules/clean-standalone.rule.d.ts.map +0 -1
- package/schematics/sdk/rules/clean-standalone.rule.js +0 -28
- package/schematics/sdk/rules/clean-standalone.rule.js.map +0 -1
- package/schematics/sdk/rules/rules.ng.d.ts +0 -11
- package/schematics/sdk/rules/rules.ng.d.ts.map +0 -1
- package/schematics/sdk/rules/rules.ng.js +0 -38
- package/schematics/sdk/rules/rules.ng.js.map +0 -1
- package/schematics/sdk/rules/rules.nx.d.ts +0 -11
- package/schematics/sdk/rules/rules.nx.d.ts.map +0 -1
- package/schematics/sdk/rules/rules.nx.js +0 -60
- package/schematics/sdk/rules/rules.nx.js.map +0 -1
- package/schematics/sdk/rules/update-ts-paths.rule.d.ts +0 -10
- package/schematics/sdk/rules/update-ts-paths.rule.d.ts.map +0 -1
- package/schematics/sdk/rules/update-ts-paths.rule.js +0 -41
- package/schematics/sdk/rules/update-ts-paths.rule.js.map +0 -1
- package/schematics/sdk/schema.d.ts +0 -19
- package/schematics/sdk/schema.d.ts.map +0 -1
- package/schematics/sdk/schema.js +0 -3
- package/schematics/sdk/schema.js.map +0 -1
- package/schematics/sdk/schema.json +0 -46
- package/schematics/sdk/templates/jest.config.js.template +0 -12
- package/schematics/store/common/mocks/example-module.d.ts +0 -2
- package/schematics/store/common/mocks/example-module.d.ts.map +0 -1
- package/schematics/store/common/mocks/example-module.js +0 -40
- package/schematics/store/common/mocks/example-module.js.map +0 -1
- package/schematics/store/common/mocks/index.d.ts +0 -2
- package/schematics/store/common/mocks/index.d.ts.map +0 -1
- package/schematics/store/common/mocks/index.js +0 -12
- package/schematics/store/common/mocks/index.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-actions.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-actions.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-actions.js +0 -82
- package/schematics/store/entity-async/mocks/example-actions.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-effect-spec.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-effect-spec.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-effect-spec.js +0 -45
- package/schematics/store/entity-async/mocks/example-effect-spec.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-effect.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-effect.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-effect.js +0 -72
- package/schematics/store/entity-async/mocks/example-effect.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-reducer-spec.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-reducer-spec.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-reducer-spec.js +0 -127
- package/schematics/store/entity-async/mocks/example-reducer-spec.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-reducer.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-reducer.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-reducer.js +0 -69
- package/schematics/store/entity-async/mocks/example-reducer.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-selectors-spec.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-selectors-spec.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-selectors-spec.js +0 -16
- package/schematics/store/entity-async/mocks/example-selectors-spec.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-selectors.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-selectors.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-selectors.js +0 -28
- package/schematics/store/entity-async/mocks/example-selectors.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-state.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-state.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-state.js +0 -39
- package/schematics/store/entity-async/mocks/example-state.js.map +0 -1
- package/schematics/store/entity-async/mocks/example-sync.d.ts +0 -2
- package/schematics/store/entity-async/mocks/example-sync.d.ts.map +0 -1
- package/schematics/store/entity-async/mocks/example-sync.js +0 -29
- package/schematics/store/entity-async/mocks/example-sync.js.map +0 -1
- package/schematics/store/entity-sync/mocks/example-actions.d.ts +0 -2
- package/schematics/store/entity-sync/mocks/example-actions.d.ts.map +0 -1
- package/schematics/store/entity-sync/mocks/example-actions.js +0 -56
- package/schematics/store/entity-sync/mocks/example-actions.js.map +0 -1
- package/schematics/store/entity-sync/mocks/example-reducer-spec.d.ts +0 -2
- package/schematics/store/entity-sync/mocks/example-reducer-spec.d.ts.map +0 -1
- package/schematics/store/entity-sync/mocks/example-reducer-spec.js +0 -85
- package/schematics/store/entity-sync/mocks/example-reducer-spec.js.map +0 -1
- package/schematics/store/entity-sync/mocks/example-reducer.d.ts +0 -2
- package/schematics/store/entity-sync/mocks/example-reducer.d.ts.map +0 -1
- package/schematics/store/entity-sync/mocks/example-reducer.js +0 -51
- package/schematics/store/entity-sync/mocks/example-reducer.js.map +0 -1
- package/schematics/store/entity-sync/mocks/example-selectors-spec.d.ts +0 -2
- package/schematics/store/entity-sync/mocks/example-selectors-spec.d.ts.map +0 -1
- package/schematics/store/entity-sync/mocks/example-selectors-spec.js +0 -10
- package/schematics/store/entity-sync/mocks/example-selectors-spec.js.map +0 -1
- package/schematics/store/entity-sync/mocks/example-selectors.d.ts +0 -2
- package/schematics/store/entity-sync/mocks/example-selectors.d.ts.map +0 -1
- package/schematics/store/entity-sync/mocks/example-selectors.js +0 -25
- package/schematics/store/entity-sync/mocks/example-selectors.js.map +0 -1
- package/schematics/store/entity-sync/mocks/example-state.d.ts +0 -2
- package/schematics/store/entity-sync/mocks/example-state.d.ts.map +0 -1
- package/schematics/store/entity-sync/mocks/example-state.js +0 -37
- package/schematics/store/entity-sync/mocks/example-state.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-actions.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-actions.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-actions.js +0 -56
- package/schematics/store/simple-async/mocks/example-actions.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-effect-spec.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-effect-spec.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-effect-spec.js +0 -45
- package/schematics/store/simple-async/mocks/example-effect-spec.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-effect.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-effect.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-effect.js +0 -54
- package/schematics/store/simple-async/mocks/example-effect.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-reducer-spec.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-reducer-spec.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-reducer-spec.js +0 -58
- package/schematics/store/simple-async/mocks/example-reducer-spec.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-reducer.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-reducer.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-reducer.js +0 -46
- package/schematics/store/simple-async/mocks/example-reducer.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-state.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-state.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-state.js +0 -39
- package/schematics/store/simple-async/mocks/example-state.js.map +0 -1
- package/schematics/store/simple-async/mocks/example-sync.d.ts +0 -2
- package/schematics/store/simple-async/mocks/example-sync.d.ts.map +0 -1
- package/schematics/store/simple-async/mocks/example-sync.js +0 -22
- package/schematics/store/simple-async/mocks/example-sync.js.map +0 -1
- package/schematics/store/simple-sync/mocks/example-actions.d.ts +0 -2
- package/schematics/store/simple-sync/mocks/example-actions.d.ts.map +0 -1
- package/schematics/store/simple-sync/mocks/example-actions.js +0 -28
- package/schematics/store/simple-sync/mocks/example-actions.js.map +0 -1
- package/schematics/store/simple-sync/mocks/example-reducer-spec.d.ts +0 -2
- package/schematics/store/simple-sync/mocks/example-reducer-spec.d.ts.map +0 -1
- package/schematics/store/simple-sync/mocks/example-reducer-spec.js +0 -38
- package/schematics/store/simple-sync/mocks/example-reducer-spec.js.map +0 -1
- package/schematics/store/simple-sync/mocks/example-reducer.d.ts +0 -2
- package/schematics/store/simple-sync/mocks/example-reducer.d.ts.map +0 -1
- package/schematics/store/simple-sync/mocks/example-reducer.js +0 -32
- package/schematics/store/simple-sync/mocks/example-reducer.js.map +0 -1
- package/schematics/store/simple-sync/mocks/example-state.d.ts +0 -2
- package/schematics/store/simple-sync/mocks/example-state.d.ts.map +0 -1
- package/schematics/store/simple-sync/mocks/example-state.js +0 -22
- package/schematics/store/simple-sync/mocks/example-state.js.map +0 -1
- package/store/storage/index.d.ts +0 -2
- package/store/storage/index.d.ts.map +0 -1
- package/store/storage/index.js +0 -2
- package/store/storage/index.js.map +0 -1
- package/store/storage/store-sync.d.ts +0 -113
- package/store/storage/store-sync.d.ts.map +0 -1
- package/store/storage/store-sync.js +0 -111
- package/store/storage/store-sync.js.map +0 -1
- /package/{schematics/application → builders/run-script}/schema.js +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.syncEntityReducerContent = void 0;
|
|
4
|
-
exports.syncEntityReducerContent = `import {createEntityAdapter, EntityAdapter} from '@ngrx/entity';
|
|
5
|
-
import {ActionCreator, createReducer, on, ReducerTypes} from '@ngrx/store';
|
|
6
|
-
import * as actions from './example.actions';
|
|
7
|
-
|
|
8
|
-
import {ExampleState, ExampleStateDetails, ExampleModel} from './example.state';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Example Store adapter
|
|
12
|
-
*/
|
|
13
|
-
export const exampleAdapter: EntityAdapter<ExampleModel> = createEntityAdapter<ExampleModel>({
|
|
14
|
-
selectId: (model) => model.id
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Example Store initial value
|
|
19
|
-
*/
|
|
20
|
-
export const exampleInitialState: ExampleState = exampleAdapter.getInitialState<ExampleStateDetails>({});
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* List of basic actions for Example Store
|
|
24
|
-
*/
|
|
25
|
-
export const exampleReducerFeatures: ReducerTypes<ExampleState, ActionCreator[]>[] = [
|
|
26
|
-
on(actions.setExample, (state, payload) => ({ids: state.ids, entities: state.entities, ...payload.stateDetails})),
|
|
27
|
-
|
|
28
|
-
on(actions.updateExample, (state, payload) => ({...state, ...payload.stateDetails})),
|
|
29
|
-
|
|
30
|
-
on(actions.resetExample, () => exampleInitialState),
|
|
31
|
-
|
|
32
|
-
on(actions.setExampleEntities, (state, payload) => exampleAdapter.addMany(payload.entities, exampleAdapter.removeAll(state))),
|
|
33
|
-
|
|
34
|
-
on(actions.updateExampleEntities, (state, payload) =>
|
|
35
|
-
exampleAdapter.updateMany(payload.entities.map((entity) => ({id: entity.id, changes: entity})), state)),
|
|
36
|
-
|
|
37
|
-
on(actions.upsertExampleEntities, (state, payload) => exampleAdapter.upsertMany(payload.entities, state)),
|
|
38
|
-
|
|
39
|
-
on(actions.clearExampleEntities, (state) => exampleAdapter.removeAll(state))
|
|
40
|
-
];
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Example Store reducer
|
|
44
|
-
*/
|
|
45
|
-
export const exampleReducer = createReducer(
|
|
46
|
-
exampleInitialState,
|
|
47
|
-
...exampleReducerFeatures
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
`;
|
|
51
|
-
//# sourceMappingURL=example-reducer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-reducer.js","sourceRoot":"","sources":["../../../../../schematics/store/entity-sync/mocks/example-reducer.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CvC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-selectors-spec.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/entity-sync/mocks/example-selectors-spec.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B,8HAK1C,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.syncEntitySelectorsSpecContent = void 0;
|
|
4
|
-
exports.syncEntitySelectorsSpecContent = `describe('Empty Example Selectors tests', () => {
|
|
5
|
-
it('Empty test', () => {
|
|
6
|
-
expect(true).toBe(true);
|
|
7
|
-
});
|
|
8
|
-
});
|
|
9
|
-
`;
|
|
10
|
-
//# sourceMappingURL=example-selectors-spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-selectors-spec.js","sourceRoot":"","sources":["../../../../../schematics/store/entity-sync/mocks/example-selectors-spec.ts"],"names":[],"mappings":";;;AAAa,QAAA,8BAA8B,GAAG;;;;;CAK7C,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const syncEntitySelectorsContent = "import {createFeatureSelector, createSelector} from '@ngrx/store';\nimport {exampleAdapter} from './example.reducer';\nimport {EXAMPLE_STORE_NAME, ExampleState} from './example.state';\n\nconst {selectIds, selectEntities, selectAll, selectTotal} = exampleAdapter.getSelectors();\n\n/** Select Example State */\nexport const selectExampleState = createFeatureSelector<ExampleState>(EXAMPLE_STORE_NAME);\n\n/** Select the array of Example ids */\nexport const selectExampleIds = createSelector(selectExampleState, selectIds);\n\n/** Select the array of Example */\nexport const selectAllExample = createSelector(selectExampleState, selectAll);\n\n/** Select the dictionary of Example entities */\nexport const selectExampleEntities = createSelector(selectExampleState, selectEntities);\n\n/** Select the total Example count */\nexport const selectExampleTotal = createSelector(selectExampleState, selectTotal);\n";
|
|
2
|
-
//# sourceMappingURL=example-selectors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-selectors.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/entity-sync/mocks/example-selectors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,m5BAoBtC,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.syncEntitySelectorsContent = void 0;
|
|
4
|
-
exports.syncEntitySelectorsContent = `import {createFeatureSelector, createSelector} from '@ngrx/store';
|
|
5
|
-
import {exampleAdapter} from './example.reducer';
|
|
6
|
-
import {EXAMPLE_STORE_NAME, ExampleState} from './example.state';
|
|
7
|
-
|
|
8
|
-
const {selectIds, selectEntities, selectAll, selectTotal} = exampleAdapter.getSelectors();
|
|
9
|
-
|
|
10
|
-
/** Select Example State */
|
|
11
|
-
export const selectExampleState = createFeatureSelector<ExampleState>(EXAMPLE_STORE_NAME);
|
|
12
|
-
|
|
13
|
-
/** Select the array of Example ids */
|
|
14
|
-
export const selectExampleIds = createSelector(selectExampleState, selectIds);
|
|
15
|
-
|
|
16
|
-
/** Select the array of Example */
|
|
17
|
-
export const selectAllExample = createSelector(selectExampleState, selectAll);
|
|
18
|
-
|
|
19
|
-
/** Select the dictionary of Example entities */
|
|
20
|
-
export const selectExampleEntities = createSelector(selectExampleState, selectEntities);
|
|
21
|
-
|
|
22
|
-
/** Select the total Example count */
|
|
23
|
-
export const selectExampleTotal = createSelector(selectExampleState, selectTotal);
|
|
24
|
-
`;
|
|
25
|
-
//# sourceMappingURL=example-selectors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-selectors.js","sourceRoot":"","sources":["../../../../../schematics/store/entity-sync/mocks/example-selectors.ts"],"names":[],"mappings":";;;AAAa,QAAA,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;CAoBzC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const syncEntityStateContent = "import {Example} from '@api/sdk';\nimport {EntityState} from '@ngrx/entity';\n\n/**\n * Example model\n */\nexport interface ExampleModel extends Example {\n\n}\n\n/**\n * Example state details\n */\nexport interface ExampleStateDetails {}\n\n/**\n * Example store state\n */\nexport interface ExampleState extends EntityState<ExampleModel>, ExampleStateDetails {}\n\n/**\n * Name of the Example Store\n */\nexport const EXAMPLE_STORE_NAME = 'example';\n\n/**\n * Example Store Interface\n */\nexport interface ExampleStore {\n /** Example state */\n [EXAMPLE_STORE_NAME]: ExampleState;\n}\n";
|
|
2
|
-
//# sourceMappingURL=example-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-state.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/entity-sync/mocks/example-state.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,wlBAgClC,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.syncEntityStateContent = void 0;
|
|
4
|
-
exports.syncEntityStateContent = `import {Example} from '@api/sdk';
|
|
5
|
-
import {EntityState} from '@ngrx/entity';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Example model
|
|
9
|
-
*/
|
|
10
|
-
export interface ExampleModel extends Example {
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Example state details
|
|
16
|
-
*/
|
|
17
|
-
export interface ExampleStateDetails {}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Example store state
|
|
21
|
-
*/
|
|
22
|
-
export interface ExampleState extends EntityState<ExampleModel>, ExampleStateDetails {}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Name of the Example Store
|
|
26
|
-
*/
|
|
27
|
-
export const EXAMPLE_STORE_NAME = 'example';
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Example Store Interface
|
|
31
|
-
*/
|
|
32
|
-
export interface ExampleStore {
|
|
33
|
-
/** Example state */
|
|
34
|
-
[EXAMPLE_STORE_NAME]: ExampleState;
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
37
|
-
//# sourceMappingURL=example-state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-state.js","sourceRoot":"","sources":["../../../../../schematics/store/entity-sync/mocks/example-state.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCrC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const asyncSimpleActionsContent = "import {asyncProps, AsyncRequest, FromApiActionPayload, WithRequestId} from '@o3r/core';\nimport {Example} from '@api/sdk';\nimport {createAction, props} from '@ngrx/store';\nimport {ExampleModel} from './example.state';\n\n/** StateDetailsActions */\nconst ACTION_SET = '[Example] set';\nconst ACTION_UPDATE = '[Example] update';\nconst ACTION_RESET = '[Example] reset';\nconst ACTION_FAIL = '[Example] fail';\nconst ACTION_CANCEL_REQUEST = '[Example] cancel request';\n\n/** Async Actions */\nconst ACTION_SET_FROM_API = '[Example] set from api';\nconst ACTION_UPDATE_FROM_API = '[Example] update from api';\n\n/**\n * Clear the current store object and replace it with the new one,\n * update isFailure to false, and update isPending with the boolean given as parameter if defined\n */\nexport const setExample = createAction(ACTION_SET, props<WithRequestId<ExampleModel>>());\n\n/**\n * Change a part or the whole object in the store and update isFailure to false. The pendingUpdate boolean,\n * if set to true or false, will update the isPending property from the StateDetails\n */\nexport const updateExample = createAction(ACTION_UPDATE, props<WithRequestId<Partial<ExampleModel>>>());\n\n/**\n * Clear the whole state, return to the initial one\n */\nexport const resetExample = createAction(ACTION_RESET);\n\n/** Action to cancel a Request ID registered in the store. Can happen from effect based on a switchMap for instance */\nexport const cancelExampleRequest = createAction(ACTION_CANCEL_REQUEST, props<AsyncRequest>());\n\n/**\n * Update isPending from the StateDetails to false, and isFailure to true\n */\nexport const failExample = createAction(ACTION_FAIL, props<WithRequestId<{error: any}>>());\n\n/**\n * Update isPending to true, triggers setFromApi Effect\n */\nexport const setExampleFromApi = createAction(ACTION_SET_FROM_API, asyncProps<FromApiActionPayload<Example>>());\n\n/**\n * Update isPending to true, triggers updateFromApi Effect\n */\nexport const updateExampleFromApi = createAction(ACTION_UPDATE_FROM_API, asyncProps<FromApiActionPayload<Example>>());\n\n";
|
|
2
|
-
//# sourceMappingURL=example-actions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-actions.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-actions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,ijEAmDrC,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.asyncSimpleActionsContent = void 0;
|
|
4
|
-
exports.asyncSimpleActionsContent = `import {asyncProps, AsyncRequest, FromApiActionPayload, WithRequestId} from '@o3r/core';
|
|
5
|
-
import {Example} from '@api/sdk';
|
|
6
|
-
import {createAction, props} from '@ngrx/store';
|
|
7
|
-
import {ExampleModel} from './example.state';
|
|
8
|
-
|
|
9
|
-
/** StateDetailsActions */
|
|
10
|
-
const ACTION_SET = '[Example] set';
|
|
11
|
-
const ACTION_UPDATE = '[Example] update';
|
|
12
|
-
const ACTION_RESET = '[Example] reset';
|
|
13
|
-
const ACTION_FAIL = '[Example] fail';
|
|
14
|
-
const ACTION_CANCEL_REQUEST = '[Example] cancel request';
|
|
15
|
-
|
|
16
|
-
/** Async Actions */
|
|
17
|
-
const ACTION_SET_FROM_API = '[Example] set from api';
|
|
18
|
-
const ACTION_UPDATE_FROM_API = '[Example] update from api';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Clear the current store object and replace it with the new one,
|
|
22
|
-
* update isFailure to false, and update isPending with the boolean given as parameter if defined
|
|
23
|
-
*/
|
|
24
|
-
export const setExample = createAction(ACTION_SET, props<WithRequestId<ExampleModel>>());
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Change a part or the whole object in the store and update isFailure to false. The pendingUpdate boolean,
|
|
28
|
-
* if set to true or false, will update the isPending property from the StateDetails
|
|
29
|
-
*/
|
|
30
|
-
export const updateExample = createAction(ACTION_UPDATE, props<WithRequestId<Partial<ExampleModel>>>());
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Clear the whole state, return to the initial one
|
|
34
|
-
*/
|
|
35
|
-
export const resetExample = createAction(ACTION_RESET);
|
|
36
|
-
|
|
37
|
-
/** Action to cancel a Request ID registered in the store. Can happen from effect based on a switchMap for instance */
|
|
38
|
-
export const cancelExampleRequest = createAction(ACTION_CANCEL_REQUEST, props<AsyncRequest>());
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Update isPending from the StateDetails to false, and isFailure to true
|
|
42
|
-
*/
|
|
43
|
-
export const failExample = createAction(ACTION_FAIL, props<WithRequestId<{error: any}>>());
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Update isPending to true, triggers setFromApi Effect
|
|
47
|
-
*/
|
|
48
|
-
export const setExampleFromApi = createAction(ACTION_SET_FROM_API, asyncProps<FromApiActionPayload<Example>>());
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Update isPending to true, triggers updateFromApi Effect
|
|
52
|
-
*/
|
|
53
|
-
export const updateExampleFromApi = createAction(ACTION_UPDATE_FROM_API, asyncProps<FromApiActionPayload<Example>>());
|
|
54
|
-
|
|
55
|
-
`;
|
|
56
|
-
//# sourceMappingURL=example-actions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-actions.js","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-actions.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDxC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const asyncSimpleEffectSpecContent = "import { getTestBed, TestBed } from '@angular/core/testing';\nimport { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';\nimport { provideMockActions } from '@ngrx/effects/testing';\nimport { Store } from '@ngrx/store';\nimport { ReplaySubject, Subject, Subscription } from 'rxjs';\nimport { ExampleEffect } from './example.effect';\n\ndescribe('Example Effects', () => {\n beforeAll(() => getTestBed().platform || TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {teardown:{destroyAfterEach:false}}));\n\n let effect: ExampleEffect;\n let actions: Subject<any>;\n const subscriptions: Subscription[] = [];\n\n const storeValue = new Subject<any>();\n const mockStore = {\n pipe: jasmine.createSpy('select').and.returnValue(storeValue),\n dispatch: jasmine.createSpy('dispatch')\n };\n\n afterEach(() => subscriptions.forEach((subscription) => subscription.unsubscribe()));\n\n beforeEach(async () => {\n actions = new ReplaySubject(1);\n await TestBed.configureTestingModule({\n providers: [\n provideMockActions(() => actions),\n ExampleEffect,\n {provide: Store, useValue: mockStore}\n ]\n }).compileComponents();\n\n effect = TestBed.inject(ExampleEffect);\n });\n\n it('Check if effect is correctly injected', () => {\n expect(effect).toBeDefined();\n });\n});\n\n";
|
|
2
|
-
//# sourceMappingURL=example-effect-spec.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-effect-spec.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-effect-spec.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,g6CAwCxC,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.asyncSimpleEffectSpecContent = void 0;
|
|
4
|
-
exports.asyncSimpleEffectSpecContent = `import { getTestBed, TestBed } from '@angular/core/testing';
|
|
5
|
-
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';
|
|
6
|
-
import { provideMockActions } from '@ngrx/effects/testing';
|
|
7
|
-
import { Store } from '@ngrx/store';
|
|
8
|
-
import { ReplaySubject, Subject, Subscription } from 'rxjs';
|
|
9
|
-
import { ExampleEffect } from './example.effect';
|
|
10
|
-
|
|
11
|
-
describe('Example Effects', () => {
|
|
12
|
-
beforeAll(() => getTestBed().platform || TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), {teardown:{destroyAfterEach:false}}));
|
|
13
|
-
|
|
14
|
-
let effect: ExampleEffect;
|
|
15
|
-
let actions: Subject<any>;
|
|
16
|
-
const subscriptions: Subscription[] = [];
|
|
17
|
-
|
|
18
|
-
const storeValue = new Subject<any>();
|
|
19
|
-
const mockStore = {
|
|
20
|
-
pipe: jasmine.createSpy('select').and.returnValue(storeValue),
|
|
21
|
-
dispatch: jasmine.createSpy('dispatch')
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
afterEach(() => subscriptions.forEach((subscription) => subscription.unsubscribe()));
|
|
25
|
-
|
|
26
|
-
beforeEach(async () => {
|
|
27
|
-
actions = new ReplaySubject(1);
|
|
28
|
-
await TestBed.configureTestingModule({
|
|
29
|
-
providers: [
|
|
30
|
-
provideMockActions(() => actions),
|
|
31
|
-
ExampleEffect,
|
|
32
|
-
{provide: Store, useValue: mockStore}
|
|
33
|
-
]
|
|
34
|
-
}).compileComponents();
|
|
35
|
-
|
|
36
|
-
effect = TestBed.inject(ExampleEffect);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it('Check if effect is correctly injected', () => {
|
|
40
|
-
expect(effect).toBeDefined();
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
`;
|
|
45
|
-
//# sourceMappingURL=example-effect-spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-effect-spec.js","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-effect-spec.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC3C,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const asyncSimpleEffectContent = "import {Injectable} from '@angular/core';\nimport {Actions, createEffect, ofType} from '@ngrx/effects';\nimport {from, of} from 'rxjs';\nimport {catchError, map, mergeMap} from 'rxjs/operators';\nimport {fromApiEffectSwitchMap} from '@o3r/core';\nimport {\n cancelExampleRequest,\n failExample,\n setExample, setExampleFromApi,\n updateExample, updateExampleFromApi\n} from './example.actions';\n\n/**\n * Service to handle async Example actions\n */\n@Injectable()\nexport class ExampleEffect {\n /**\n * Set the state with the reply content, dispatch failExample if it catches a failure\n */\n public setFromApi$ = createEffect(() =>\n this.actions$.pipe(\n ofType(setExampleFromApi),\n fromApiEffectSwitchMap(\n (reply, action) => setExample({model: reply, requestId: action.requestId}),\n (error, action) => of(failExample({error, requestId: action.requestId})),\n cancelExampleRequest\n )\n )\n );\n\n /**\n * Update the state with the reply content, dispatch failExample if it catches a failure\n */\n public updateFromApi$ = createEffect(() =>\n this.actions$.pipe(\n ofType(updateExampleFromApi),\n mergeMap((payload) =>\n from(payload.call).pipe(\n map((reply) => updateExample({model: reply, requestId: payload.requestId})),\n catchError((err) => of(failExample({error: err, requestId: payload.requestId})))\n )\n )\n )\n );\n\n constructor(protected actions$: Actions) {}\n}\n\n";
|
|
2
|
-
//# sourceMappingURL=example-effect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-effect.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-effect.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,o+CAiDpC,CAAC"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.asyncSimpleEffectContent = void 0;
|
|
4
|
-
exports.asyncSimpleEffectContent = `import {Injectable} from '@angular/core';
|
|
5
|
-
import {Actions, createEffect, ofType} from '@ngrx/effects';
|
|
6
|
-
import {from, of} from 'rxjs';
|
|
7
|
-
import {catchError, map, mergeMap} from 'rxjs/operators';
|
|
8
|
-
import {fromApiEffectSwitchMap} from '@o3r/core';
|
|
9
|
-
import {
|
|
10
|
-
cancelExampleRequest,
|
|
11
|
-
failExample,
|
|
12
|
-
setExample, setExampleFromApi,
|
|
13
|
-
updateExample, updateExampleFromApi
|
|
14
|
-
} from './example.actions';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Service to handle async Example actions
|
|
18
|
-
*/
|
|
19
|
-
@Injectable()
|
|
20
|
-
export class ExampleEffect {
|
|
21
|
-
/**
|
|
22
|
-
* Set the state with the reply content, dispatch failExample if it catches a failure
|
|
23
|
-
*/
|
|
24
|
-
public setFromApi$ = createEffect(() =>
|
|
25
|
-
this.actions$.pipe(
|
|
26
|
-
ofType(setExampleFromApi),
|
|
27
|
-
fromApiEffectSwitchMap(
|
|
28
|
-
(reply, action) => setExample({model: reply, requestId: action.requestId}),
|
|
29
|
-
(error, action) => of(failExample({error, requestId: action.requestId})),
|
|
30
|
-
cancelExampleRequest
|
|
31
|
-
)
|
|
32
|
-
)
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Update the state with the reply content, dispatch failExample if it catches a failure
|
|
37
|
-
*/
|
|
38
|
-
public updateFromApi$ = createEffect(() =>
|
|
39
|
-
this.actions$.pipe(
|
|
40
|
-
ofType(updateExampleFromApi),
|
|
41
|
-
mergeMap((payload) =>
|
|
42
|
-
from(payload.call).pipe(
|
|
43
|
-
map((reply) => updateExample({model: reply, requestId: payload.requestId})),
|
|
44
|
-
catchError((err) => of(failExample({error: err, requestId: payload.requestId})))
|
|
45
|
-
)
|
|
46
|
-
)
|
|
47
|
-
)
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
constructor(protected actions$: Actions) {}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
`;
|
|
54
|
-
//# sourceMappingURL=example-effect.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-effect.js","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-effect.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDvC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const asyncSimpleReducerSpecContent = "import * as actions from './example.actions';\nimport {exampleInitialState, exampleReducer} from './example.reducer';\nimport {ExampleState} from './example.state';\n\ndescribe('Example Store reducer', () => {\n\n const simpleState: ExampleState = {model : null, requestIds: []};\n const firstExample: any = {id: 'example1', genericItems: []};\n const exampleReply: any = {data: {model: firstExample}};\n const secondExample: any = {id: 'example2', genericItems: []};\n\n it('should by default return the initial state', () => {\n const state = exampleReducer(exampleInitialState, {type: 'fake'} as any);\n expect(state).toEqual(exampleInitialState);\n });\n\n describe('Actions on state details ', () => {\n\n it('SET action should clear current cart state details and return a state with the new one', () => {\n const firstState = exampleReducer(simpleState, actions.setExample({model : firstExample}));\n expect(firstState.model!.id).toEqual('example1');\n });\n\n it('UPDATE should update the state details without modifying entities', () => {\n const firstState = exampleReducer({model : firstExample, requestIds: []}, actions.updateExample({model : secondExample}));\n expect(firstState.model!.id).toEqual('example2');\n });\n\n it('RESET action should return initial state', () => {\n const state = exampleReducer(simpleState, actions.resetExample());\n expect(state).toEqual(exampleInitialState);\n });\n\n it('FAIL action should update the isPending to false and the isFailure to true', () => {\n const state = exampleReducer({...exampleInitialState, isPending: true}, actions.failExample({error: {}}));\n expect(state.isPending).toBe(false);\n expect(state.isFailure).toBe(true);\n });\n });\n\n describe('API call actions', () => {\n it('SET_FROM_API action should clear current entities and set new ones', () => {\n const firstState = exampleReducer(exampleInitialState, actions.setExampleFromApi({call: Promise.resolve(exampleReply), requestId: 'test'}));\n expect(firstState.isPending).toEqual(true);\n });\n it('UPDATE_FROM_API action should clear current entities and set new ones', () => {\n const firstState = exampleReducer(exampleInitialState, actions.setExample({model: firstExample}));\n const secondState = exampleReducer(firstState, actions.updateExampleFromApi({call: Promise.resolve(exampleReply), requestId: 'test'}));\n expect(secondState.isPending).toEqual(true);\n });\n });\n});\n\n";
|
|
2
|
-
//# sourceMappingURL=example-reducer-spec.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-reducer-spec.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-reducer-spec.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,4+EAqDzC,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.asyncSimpleReducerSpecContent = void 0;
|
|
4
|
-
exports.asyncSimpleReducerSpecContent = `import * as actions from './example.actions';
|
|
5
|
-
import {exampleInitialState, exampleReducer} from './example.reducer';
|
|
6
|
-
import {ExampleState} from './example.state';
|
|
7
|
-
|
|
8
|
-
describe('Example Store reducer', () => {
|
|
9
|
-
|
|
10
|
-
const simpleState: ExampleState = {model : null, requestIds: []};
|
|
11
|
-
const firstExample: any = {id: 'example1', genericItems: []};
|
|
12
|
-
const exampleReply: any = {data: {model: firstExample}};
|
|
13
|
-
const secondExample: any = {id: 'example2', genericItems: []};
|
|
14
|
-
|
|
15
|
-
it('should by default return the initial state', () => {
|
|
16
|
-
const state = exampleReducer(exampleInitialState, {type: 'fake'} as any);
|
|
17
|
-
expect(state).toEqual(exampleInitialState);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
describe('Actions on state details ', () => {
|
|
21
|
-
|
|
22
|
-
it('SET action should clear current cart state details and return a state with the new one', () => {
|
|
23
|
-
const firstState = exampleReducer(simpleState, actions.setExample({model : firstExample}));
|
|
24
|
-
expect(firstState.model!.id).toEqual('example1');
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('UPDATE should update the state details without modifying entities', () => {
|
|
28
|
-
const firstState = exampleReducer({model : firstExample, requestIds: []}, actions.updateExample({model : secondExample}));
|
|
29
|
-
expect(firstState.model!.id).toEqual('example2');
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it('RESET action should return initial state', () => {
|
|
33
|
-
const state = exampleReducer(simpleState, actions.resetExample());
|
|
34
|
-
expect(state).toEqual(exampleInitialState);
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it('FAIL action should update the isPending to false and the isFailure to true', () => {
|
|
38
|
-
const state = exampleReducer({...exampleInitialState, isPending: true}, actions.failExample({error: {}}));
|
|
39
|
-
expect(state.isPending).toBe(false);
|
|
40
|
-
expect(state.isFailure).toBe(true);
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
describe('API call actions', () => {
|
|
45
|
-
it('SET_FROM_API action should clear current entities and set new ones', () => {
|
|
46
|
-
const firstState = exampleReducer(exampleInitialState, actions.setExampleFromApi({call: Promise.resolve(exampleReply), requestId: 'test'}));
|
|
47
|
-
expect(firstState.isPending).toEqual(true);
|
|
48
|
-
});
|
|
49
|
-
it('UPDATE_FROM_API action should clear current entities and set new ones', () => {
|
|
50
|
-
const firstState = exampleReducer(exampleInitialState, actions.setExample({model: firstExample}));
|
|
51
|
-
const secondState = exampleReducer(firstState, actions.updateExampleFromApi({call: Promise.resolve(exampleReply), requestId: 'test'}));
|
|
52
|
-
expect(secondState.isPending).toEqual(true);
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
`;
|
|
58
|
-
//# sourceMappingURL=example-reducer-spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-reducer-spec.js","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-reducer-spec.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqD5C,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const asyncSimpleReducerContent = "import {ActionCreator, createReducer, on, ReducerTypes} from '@ngrx/store';\nimport {asyncStoreItemAdapter} from '@o3r/core';\nimport * as actions from './example.actions';\nimport {ExampleState} from './example.state';\n\n/**\n * example initial state\n */\nexport const exampleInitialState: ExampleState = {\n model: null,\n requestIds: []\n};\n\n/**\n * List of basic actions for Example Store\n */\nexport const exampleReducerFeatures: ReducerTypes<ExampleState, ActionCreator[]>[] = [\n\n on(actions.setExample, (state, payload) =>\n asyncStoreItemAdapter.resolveRequest({...asyncStoreItemAdapter.extractAsyncStoreItem(state), ...payload}, payload.requestId)\n ),\n\n on(actions.updateExample, (state, payload) => asyncStoreItemAdapter.resolveRequest({...state, ...payload}, payload.requestId)),\n\n on(actions.resetExample, () => exampleInitialState),\n\n on(actions.cancelExampleRequest, (state, action) => asyncStoreItemAdapter.resolveRequest(state, action.requestId)),\n\n on(actions.failExample, (state, payload) => asyncStoreItemAdapter.failRequest(state, payload.requestId)),\n\n on(actions.setExampleFromApi, actions.updateExampleFromApi, (state, payload) =>\n asyncStoreItemAdapter.addRequest(state, payload.requestId))\n];\n\n/**\n * Example Store reducer\n */\nexport const exampleReducer = createReducer(\n exampleInitialState,\n ...exampleReducerFeatures\n);\n";
|
|
2
|
-
//# sourceMappingURL=example-reducer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-reducer.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-reducer.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,w3CAyCrC,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.asyncSimpleReducerContent = void 0;
|
|
4
|
-
exports.asyncSimpleReducerContent = `import {ActionCreator, createReducer, on, ReducerTypes} from '@ngrx/store';
|
|
5
|
-
import {asyncStoreItemAdapter} from '@o3r/core';
|
|
6
|
-
import * as actions from './example.actions';
|
|
7
|
-
import {ExampleState} from './example.state';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* example initial state
|
|
11
|
-
*/
|
|
12
|
-
export const exampleInitialState: ExampleState = {
|
|
13
|
-
model: null,
|
|
14
|
-
requestIds: []
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* List of basic actions for Example Store
|
|
19
|
-
*/
|
|
20
|
-
export const exampleReducerFeatures: ReducerTypes<ExampleState, ActionCreator[]>[] = [
|
|
21
|
-
|
|
22
|
-
on(actions.setExample, (state, payload) =>
|
|
23
|
-
asyncStoreItemAdapter.resolveRequest({...asyncStoreItemAdapter.extractAsyncStoreItem(state), ...payload}, payload.requestId)
|
|
24
|
-
),
|
|
25
|
-
|
|
26
|
-
on(actions.updateExample, (state, payload) => asyncStoreItemAdapter.resolveRequest({...state, ...payload}, payload.requestId)),
|
|
27
|
-
|
|
28
|
-
on(actions.resetExample, () => exampleInitialState),
|
|
29
|
-
|
|
30
|
-
on(actions.cancelExampleRequest, (state, action) => asyncStoreItemAdapter.resolveRequest(state, action.requestId)),
|
|
31
|
-
|
|
32
|
-
on(actions.failExample, (state, payload) => asyncStoreItemAdapter.failRequest(state, payload.requestId)),
|
|
33
|
-
|
|
34
|
-
on(actions.setExampleFromApi, actions.updateExampleFromApi, (state, payload) =>
|
|
35
|
-
asyncStoreItemAdapter.addRequest(state, payload.requestId))
|
|
36
|
-
];
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Example Store reducer
|
|
40
|
-
*/
|
|
41
|
-
export const exampleReducer = createReducer(
|
|
42
|
-
exampleInitialState,
|
|
43
|
-
...exampleReducerFeatures
|
|
44
|
-
);
|
|
45
|
-
`;
|
|
46
|
-
//# sourceMappingURL=example-reducer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-reducer.js","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-reducer.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCxC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const asyncSimpleStateContent = "import {AsyncStoreItem} from '@o3r/core';\nimport {Example} from '@api/sdk';\n/**\n * Example model\n */\nexport interface ExampleModel {\n model: Example | null;\n}\n\n/**\n * Example model details\n */\nexport interface ExampleStateDetails extends AsyncStoreItem {\n}\n\n/**\n * Example store state\n */\nexport interface ExampleState extends ExampleStateDetails, ExampleModel {\n}\n\n/**\n * Name of the Example Store\n */\nexport const EXAMPLE_STORE_NAME = 'example';\n\n/**\n * Example Store Interface\n */\nexport interface ExampleStore {\n /** Example state */\n [EXAMPLE_STORE_NAME]: ExampleState;\n}\n\n";
|
|
2
|
-
//# sourceMappingURL=example-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-state.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-state.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,4mBAkCnC,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.asyncSimpleStateContent = void 0;
|
|
4
|
-
exports.asyncSimpleStateContent = `import {AsyncStoreItem} from '@o3r/core';
|
|
5
|
-
import {Example} from '@api/sdk';
|
|
6
|
-
/**
|
|
7
|
-
* Example model
|
|
8
|
-
*/
|
|
9
|
-
export interface ExampleModel {
|
|
10
|
-
model: Example | null;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Example model details
|
|
15
|
-
*/
|
|
16
|
-
export interface ExampleStateDetails extends AsyncStoreItem {
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Example store state
|
|
21
|
-
*/
|
|
22
|
-
export interface ExampleState extends ExampleStateDetails, ExampleModel {
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Name of the Example Store
|
|
27
|
-
*/
|
|
28
|
-
export const EXAMPLE_STORE_NAME = 'example';
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Example Store Interface
|
|
32
|
-
*/
|
|
33
|
-
export interface ExampleStore {
|
|
34
|
-
/** Example state */
|
|
35
|
-
[EXAMPLE_STORE_NAME]: ExampleState;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
`;
|
|
39
|
-
//# sourceMappingURL=example-state.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-state.js","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-state.ts"],"names":[],"mappings":";;;AAAa,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCtC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const asyncSimpleSyncContent = "import { reviveExample } from '@api/sdk';\n\nimport {asyncSerializer, Serializer} from '@o3r/core';\nimport {exampleInitialState} from './example.reducer';\nimport {ExampleState} from './example.state';\n\nexport const exampleStorageSerializer = asyncSerializer;\n\nexport const exampleStorageDeserializer = (rawObject: any) => {\n return { ...exampleInitialState, model: (rawObject&&rawObject.model) ? reviveExample(rawObject.model) : null } as ExampleState;\n};\n\nexport const exampleStorageSync: Serializer<ExampleState> = {\n serialize: exampleStorageSerializer,\n deserialize: exampleStorageDeserializer\n};\n\n";
|
|
2
|
-
//# sourceMappingURL=example-sync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-sync.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-sync.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,inBAiBlC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.asyncSimpleSyncContent = void 0;
|
|
4
|
-
exports.asyncSimpleSyncContent = `import { reviveExample } from '@api/sdk';
|
|
5
|
-
|
|
6
|
-
import {asyncSerializer, Serializer} from '@o3r/core';
|
|
7
|
-
import {exampleInitialState} from './example.reducer';
|
|
8
|
-
import {ExampleState} from './example.state';
|
|
9
|
-
|
|
10
|
-
export const exampleStorageSerializer = asyncSerializer;
|
|
11
|
-
|
|
12
|
-
export const exampleStorageDeserializer = (rawObject: any) => {
|
|
13
|
-
return { ...exampleInitialState, model: (rawObject&&rawObject.model) ? reviveExample(rawObject.model) : null } as ExampleState;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const exampleStorageSync: Serializer<ExampleState> = {
|
|
17
|
-
serialize: exampleStorageSerializer,
|
|
18
|
-
deserialize: exampleStorageDeserializer
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
`;
|
|
22
|
-
//# sourceMappingURL=example-sync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-sync.js","sourceRoot":"","sources":["../../../../../schematics/store/simple-async/mocks/example-sync.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG;;;;;;;;;;;;;;;;;CAiBrC,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const syncSimpleActionsContent = "import {createAction, props} from '@ngrx/store';\nimport {ExampleState} from './example.state';\n\n/** StateDetailsActions */\nconst ACTION_SET = '[Example] set';\nconst ACTION_UPDATE = '[Example] update';\nconst ACTION_RESET = '[Example] reset';\n\n/**\n * Clear the current store object and replace it with the new one\n */\nexport const setExample = createAction(ACTION_SET, props<{model: ExampleState}>());\n\n/**\n * Change a part or the whole object in the store.\n */\nexport const updateExample = createAction(ACTION_UPDATE, props<Partial<{model: ExampleState}>>());\n\n/**\n * Clear the whole state, return to the initial one\n */\nexport const resetExample = createAction(ACTION_RESET);\n\n";
|
|
2
|
-
//# sourceMappingURL=example-actions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"example-actions.d.ts","sourceRoot":"","sources":["../../../../../schematics/store/simple-sync/mocks/example-actions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,isBAuBpC,CAAC"}
|