@fireflysemantics/slice 17.0.1 → 17.0.2
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 +126 -11
- package/package.json +1 -1
package/README.md
CHANGED
@@ -1,27 +1,142 @@
|
|
1
|
+

|
2
|
+
|
1
3
|
# @fireflysemantics/slice
|
2
4
|
|
3
|
-
|
5
|
+
Lightweight Javascript Reactive State Management for Angular Applications.
|
6
|
+
|
7
|
+
If you like the [@fireflysemantics/slice API](https://fireflysemantics.github.io/slice/doc/) please star our [Github Repository](https://github.com/fireflysemantics/slice).
|
8
|
+
|
9
|
+
# Install
|
10
|
+
|
11
|
+
|
12
|
+
Install Slice with the `nanoid` peer dependency:
|
13
|
+
|
14
|
+
- `v17.0.x` for Angular 17
|
15
|
+
- `v16.2.x` for Angular 16
|
16
|
+
- `v15.2.x` for Angular 15
|
17
|
+
|
18
|
+
So for example for an Angular 15 project run.
|
19
|
+
|
20
|
+
```
|
21
|
+
npm i @fireflysemantics/slice@15.2.x nanoid
|
22
|
+
```
|
23
|
+
For Angular 17 run.
|
24
|
+
|
25
|
+
```
|
26
|
+
npm i @fireflysemantics/slice@lastest nanoid
|
27
|
+
```
|
28
|
+
|
29
|
+
# Firefly Semantics Slice Development Center Media and Documentation
|
30
|
+
|
31
|
+
## Concepts
|
32
|
+
|
33
|
+
- [What is Reactive State Management](https://developer.fireflysemantics.com/concepts/concepts--slice--what-is-reactive-state-management)
|
34
|
+
|
35
|
+
## Guides
|
36
|
+
|
37
|
+
- [An Introduction to the Firefly Semantics Slice Reactive Object Store](https://developer.fireflysemantics.com/guides/guides--introduction-to-the-firefly-semantics-slice-reactive-object-store)
|
38
|
+
- [Introduction to the Firefly Semantics Slice Reactive Entity Store ](https://developer.fireflysemantics.com/guides/guides--introduction-to-the-firefly-semantics-slice-reactive-entity-store)
|
39
|
+
- [Creating a Reactive Todo Application With the Firefly Semantics Slice State Manager](https://developer.fireflysemantics.com/guides/guides--slice--creating-a-reactive-todo-application-with-the-firefly-semantics-slice-state-manager)
|
40
|
+
- [Recreating the Ngrx Demo with Slice](https://developer.fireflysemantics.com/guides/guides--recreating-the-ngrx-demo-app-with-firefly-semantics-slice-state-manager)
|
41
|
+
- [Firefly Semantics Slice Entity Store Active API Guide](https://developer.fireflysemantics.com/guides/guides--slice--managing-active-entities-with-firefly-semantics-slice)
|
4
42
|
|
5
|
-
## Development server
|
6
43
|
|
7
|
-
|
44
|
+
## Tasks
|
8
45
|
|
9
|
-
|
46
|
+
- [Creating a Minimal Slice Object Store](https://developer.fireflysemantics.com/examples/examples--slice--minimal-slice-object-store)
|
47
|
+
- [Creating a Minimal Angular Slice Object Store Angular State Service ](https://developer.fireflysemantics.com/examples/examples--slice--minial-angular-slice-object-store-state-service)
|
48
|
+
- [Changing the Firefly Semantics Slice EStore Default Configuration](https://developer.fireflysemantics.com/tasks/tasks--slice--changing-the-fireflysemantics-slice-estore-default-configuration)
|
49
|
+
- [Observing the Currently Active Entities with Slice](https://developer.fireflysemantics.com/tasks/tasks--slice--observing-currently-active-entities-with-slice)
|
50
|
+
- [Derived Reactive Observable State with Slice](https://developer.fireflysemantics.com/tasks/tasks--slice--derived-reactive-observable-state-with-slice)
|
51
|
+
- [Reactive Event Driven Actions with Firefly Semantics Slice](https://developer.fireflysemantics.com/tasks/tasks--slice--reactive-event-driven-actions-with-firefly-semantics-slice)
|
52
|
+
- [Unsubscribing From Firefly Semantics Slice Object Store Observables in Angular](https://developer.fireflysemantics.com/tasks/tasks--slice--unsubscribing-from-firefly-semantics-slice-object-store-observables-in-angular)
|
53
|
+
- [Creating Proxies to Slice Object Store Observables](https://developer.fireflysemantics.com/tasks/tasks--slice--creating-proxies-to-slice-object-store-observables)
|
54
|
+
- [Getting a Snapshot of a Slice Object Store Value](https://developer.fireflysemantics.com/tasks/tasks--slice--getting-a-snapshot-of-a-slice-object-store-value)
|
55
|
+
- [Accessing Slice Object Store Observables In Angular Templates](https://developer.fireflysemantics.com/tasks/tasks--slice--accessing-slice-object-store-observables-in-angular-templates)
|
56
|
+
- [Observing the Count of Items in a Firefly Semantics Slice Entity Store](https://developer.fireflysemantics.com/tasks/tasks--slice--observing-the-count-of-items-in-a-firefly-semantics-slice-entity-store)
|
57
|
+
- [Setting and Observing Firefly Semantics Slice Entity Store Queries](https://developer.fireflysemantics.com/tasks/tasks--slice--setting-and-observing-firefly-semantics-slice-entity-store-queries)
|
58
|
+
- [Taking a Count Snapshot of a Firefly Semantics Slice Entity Store](https://developer.fireflysemantics.com/tasks/tasks--slice--taking-a-count-snapshot-of-a-firefly-semantics-slice-entity-store)
|
59
|
+
- [Taking a Query Snapshot of a Firefly Semantics Slice Entity Store](https://developer.fireflysemantics.com/tasks/tasks--slice--taking-a-query-snapshot-of-a-firefly-semantics-slice-entity-store)
|
60
|
+
- [Adding Slices to an Firefly Semantics Slice Entity Store](https://developer.fireflysemantics.com/tasks/tasks--slice--adding-slices-to-the-firefly-semantics-entity-store)
|
61
|
+
- [Adding Search To the Firefly Semantics Slice Angular Todo Application](https://developer.fireflysemantics.com/tasks/tasks--slice--adding-search-to-the-firefly-semantics-slice-angular-todo-application)
|
62
|
+
- [Comparing Firefly Semantics Slice Entities](https://developer.fireflysemantics.com/tasks/tasks--slice--comparing-firefly-semantics-slice-entities)
|
63
|
+
- [Filtering Firefly Semantics Slice Object Store Observables by Property Value](https://developer.fireflysemantics.com/tasks/tasks--slice--filtering-firefly-semantics-slice-object-store-observables-by-property-value)
|
10
64
|
|
11
|
-
|
65
|
+
|
66
|
+
## Youtube
|
67
|
+
|
68
|
+
- [What is Reactive State Management](https://youtu.be/kEta1LBVw0c)
|
69
|
+
- [An Introduction to the Firefly Semantics Slice Reactive Object Store](https://youtu.be/_3_mEKw3bM0)
|
70
|
+
- [Introduction to the Firefly Semantics Slice Reactive Entity Store ](https://youtu.be/Boj3-va-TKk)
|
71
|
+
- [Creating a Reactive Todo Application With the Firefly Semantics Slice State Manager](https://youtu.be/Y3AxSIiBdWg)
|
72
|
+
- [Recreating the Ngrx Demo with Slice](https://youtu.be/4t95RvJSY_8)
|
73
|
+
- [Setting and Observing the Firefly Semantics Slice Entity Store Query](https://youtu.be/_L5ya1CWaYU)
|
74
|
+
- [Observing the Count of Items in a Firefly Semantics Slice Entity Store](https://youtu.be/5kqr_XW2QuI)
|
75
|
+
- [Taking a Count Snapshot of a Firefly Semantics Slice Entity Store](https://youtu.be/n37sz4LPV08)
|
76
|
+
- [Taking a Query Snapshot of a Firefly Semantics Slice Entity Store](https://youtu.be/AFk5p0pNxSk)
|
77
|
+
- [Adding Slices to an Firefly Semantics Slice Entity Store](https://youtu.be/z2U6OTAsc4I)
|
78
|
+
- [Adding Search To the Firefly Semantics Slice Angular Todo Application](https://youtu.be/OkiBnU3Q6RU)
|
79
|
+
- [Converting the Angular Todo Application From Materialize to Angular Material](https://youtu.be/GPfF31hwxQk)
|
80
|
+
- [Firefly Semantics Slice Entity Store Active API Guide](https://youtu.be/fInpMcZ9Ry8)
|
81
|
+
- [Comparing Firefly Semantics Slice Entities](https://youtu.be/AYc3Pf9fSKg)
|
82
|
+
- [Derived Reactive Observable State with Slice](https://youtu.be/eDJkSgYhFIM)
|
83
|
+
|
84
|
+
## Examples
|
85
|
+
|
86
|
+
- [Minimal Slice Object Store](https://developer.fireflysemantics.com/examples/examples--slice--minimal-slice-object-store)
|
87
|
+
- [Minimal Angular Slice Object Store State Service](https://developer.fireflysemantics.com/examples/examples--slice--minial-angular-slice-object-store-state-service)
|
88
|
+
|
89
|
+
# API Documentation
|
90
|
+
|
91
|
+
See [Typedoc API Documentation](https://fireflysemantics.github.io/slice/doc/)
|
92
|
+
|
93
|
+
The documentation for the API includes simple examples of how to apply the API to a use case.
|
94
|
+
|
95
|
+
# Overview
|
96
|
+
|
97
|
+
Lightweight Reactive Server, Mobile, and Web Application State Management Built with `RxJS` and `Typescript`.
|
98
|
+
|
99
|
+
The API is designed to be as minimal as possible and should deliver the same features as other comparable frameworks with about 1/3 the lines of code.
|
100
|
+
|
101
|
+
It offers two types of reactive data stores:
|
102
|
+
- Entity stores (EStore<E>) for structured entity like data (Customer, Product, User, ...)
|
103
|
+
- Entity stores can be "Live filtered" by adding slices. For example separating Todo entities into complete and incomplete compartments. Slices are also obserable.
|
104
|
+
- Object store (Key value store) for unstructured data
|
105
|
+
|
106
|
+
Even though Angular is used for prototype applications, it should work well for:
|
107
|
+
- Single page applications
|
108
|
+
- Progressive web applications
|
109
|
+
- React applications
|
110
|
+
- Node applications / Pure Javascript Applications
|
111
|
+
- Mobile Applications
|
12
112
|
|
13
113
|
## Build
|
14
114
|
|
15
|
-
Run `
|
115
|
+
Run `npm run c` to build the project. The build artifacts will be stored in the `dist/` directory.
|
16
116
|
|
17
117
|
## Running unit tests
|
18
118
|
|
19
|
-
Run `ng test` to execute the unit tests via [
|
119
|
+
Run `ng test` to execute the unit tests via [Jest](https://jestjs.io/).
|
120
|
+
|
20
121
|
|
21
|
-
##
|
122
|
+
## Features
|
22
123
|
|
23
|
-
|
124
|
+
- Live Stackblitz demoes
|
125
|
+
- [Typedoc with inlined examples](https://fireflysemantics.github.io/slice/doc/)
|
126
|
+
- [Well documented test cases run with Jest - Each file has a corresponding `.spec` file](https://github.com/fireflysemantics/slice/tree/master/src)
|
127
|
+
- Stream both Entity and Object Stores for UI Updates via RxJS
|
128
|
+
- Define entities using Typescript classes, interfaces, or types
|
129
|
+
- [Active state tracking](https://medium.com/@ole.ersoy/monitoring-the-currently-active-entity-with-slice-ff7c9b7826e8)
|
130
|
+
- [Supports for Optimistic User Interfaces](https://medium.com/@ole.ersoy/optimistic-user-identity-management-with-slice-a2b66efe780c)
|
131
|
+
- RESTful API for performing CRUD operations that stream both full and delta updates
|
132
|
+
- Dynamic creation of both object and entity stores
|
133
|
+
- Observable delta updates for Entities
|
134
|
+
- Real time application of Slice `Predicate<E>` filtering that is `Observable`
|
135
|
+
- `Predicate` based snapshots of entities
|
136
|
+
- Observable `count` of entities in the entity store. The `count` feature can also be `Predicate` filtered.
|
137
|
+
- Configurable global id (Client side id - `gid`) and server id (`id`) id property names for entities.
|
138
|
+
- The stream of entities can be sorted via an optional boolean expression passed to `observe`.
|
24
139
|
|
25
|
-
##
|
140
|
+
## Tests
|
26
141
|
|
27
|
-
|
142
|
+
See the [test cases](https://github.com/fireflysemantics/slice/).
|