From e7f8797e611d0b7a751b18feae94cf6a01fd59fc Mon Sep 17 00:00:00 2001 From: Eric Simonton <8042088+ersimont@users.noreply.github.com> Date: Mon, 1 Jan 2024 14:58:38 -1000 Subject: [PATCH] feat(signal-state): Introducing a new library to the S-Libs family: Signal State! A state management library similar to App State, built on Angular Signals instead of RxJS. --- .../signal_store___build.xml | 13 ++ .../signal_store___test_server.xml | 13 ++ README.md | 1 + angular.json | 39 ++++ package.json | 4 + projects/app-state/README.md | 65 +----- .../src/app/api-tests/signal-store.spec.ts | 15 ++ .../integration/src/app/app.component.html | 4 +- projects/integration/src/app/app.config.ts | 3 +- projects/integration/src/app/app.routes.ts | 5 + .../deep-performance.component.html | 6 + .../deep-performance.component.ts | 39 ++++ .../signal-store-performance.component.html | 3 + .../signal-store-performance.component.scss | 0 .../signal-store-performance.component.ts | 13 ++ .../wide-performance.component.html | 6 + .../wide-performance.component.ts | 39 ++++ projects/ng-app-state/README.md | 2 + projects/signal-store/.eslintrc.json | 14 ++ projects/signal-store/README.md | 117 ++++++++++ projects/signal-store/ng-package.json | 8 + projects/signal-store/package.json | 22 ++ .../signal-store/src/lib/child-store.spec.ts | 38 ++++ projects/signal-store/src/lib/child-store.ts | 35 +++ projects/signal-store/src/lib/index.ts | 4 + .../signal-store/src/lib/root-store.spec.ts | 36 +++ projects/signal-store/src/lib/root-store.ts | 18 ++ projects/signal-store/src/lib/store.spec.ts | 207 ++++++++++++++++++ projects/signal-store/src/lib/store.ts | 89 ++++++++ projects/signal-store/src/lib/utils/index.ts | 1 + .../src/lib/utils/persistent-store.spec.ts | 142 ++++++++++++ .../src/lib/utils/persistent-store.ts | 168 ++++++++++++++ .../src/performance/counter-state.ts | 3 + .../src/performance/deep-performance.ts | 76 +++++++ .../src/performance/performance-utils.ts | 14 ++ .../src/performance/performance.spec.ts | 60 +++++ .../src/performance/wide-performance.ts | 64 ++++++ projects/signal-store/src/public-api.ts | 6 + .../src/test-helpers/readme.spec.ts | 67 ++++++ .../src/test-helpers/test-state.ts | 13 ++ projects/signal-store/tsconfig.lib.json | 12 + projects/signal-store/tsconfig.lib.prod.json | 10 + projects/signal-store/tsconfig.spec.json | 9 + scripts/shared.ts | 1 + 44 files changed, 1442 insertions(+), 62 deletions(-) create mode 100644 .idea/runConfigurations/signal_store___build.xml create mode 100644 .idea/runConfigurations/signal_store___test_server.xml create mode 100644 projects/integration/src/app/api-tests/signal-store.spec.ts create mode 100644 projects/integration/src/app/signal-store-performance/deep-performance/deep-performance.component.html create mode 100644 projects/integration/src/app/signal-store-performance/deep-performance/deep-performance.component.ts create mode 100644 projects/integration/src/app/signal-store-performance/signal-store-performance.component.html create mode 100644 projects/integration/src/app/signal-store-performance/signal-store-performance.component.scss create mode 100644 projects/integration/src/app/signal-store-performance/signal-store-performance.component.ts create mode 100644 projects/integration/src/app/signal-store-performance/wide-performance/wide-performance.component.html create mode 100644 projects/integration/src/app/signal-store-performance/wide-performance/wide-performance.component.ts create mode 100644 projects/signal-store/.eslintrc.json create mode 100644 projects/signal-store/README.md create mode 100644 projects/signal-store/ng-package.json create mode 100644 projects/signal-store/package.json create mode 100644 projects/signal-store/src/lib/child-store.spec.ts create mode 100644 projects/signal-store/src/lib/child-store.ts create mode 100644 projects/signal-store/src/lib/index.ts create mode 100644 projects/signal-store/src/lib/root-store.spec.ts create mode 100644 projects/signal-store/src/lib/root-store.ts create mode 100644 projects/signal-store/src/lib/store.spec.ts create mode 100644 projects/signal-store/src/lib/store.ts create mode 100644 projects/signal-store/src/lib/utils/index.ts create mode 100644 projects/signal-store/src/lib/utils/persistent-store.spec.ts create mode 100644 projects/signal-store/src/lib/utils/persistent-store.ts create mode 100644 projects/signal-store/src/performance/counter-state.ts create mode 100644 projects/signal-store/src/performance/deep-performance.ts create mode 100644 projects/signal-store/src/performance/performance-utils.ts create mode 100644 projects/signal-store/src/performance/performance.spec.ts create mode 100644 projects/signal-store/src/performance/wide-performance.ts create mode 100644 projects/signal-store/src/public-api.ts create mode 100644 projects/signal-store/src/test-helpers/readme.spec.ts create mode 100644 projects/signal-store/src/test-helpers/test-state.ts create mode 100644 projects/signal-store/tsconfig.lib.json create mode 100644 projects/signal-store/tsconfig.lib.prod.json create mode 100644 projects/signal-store/tsconfig.spec.json diff --git a/.idea/runConfigurations/signal_store___build.xml b/.idea/runConfigurations/signal_store___build.xml new file mode 100644 index 00000000..1ff7f4a0 --- /dev/null +++ b/.idea/runConfigurations/signal_store___build.xml @@ -0,0 +1,13 @@ + + + + + +