| method | Description | Example |
|---|---|---|
| get() | Get the current snapshot of the store state. | |
| set(state) | Update the store state. Merges shallowly. | |
| pick(...keys) | Select specific properties from the state. Guaranteed to be non-nullable (throws if null/undefined). | |
Get the current snapshot of the store state.
Update the store state. Merges shallowly.
Select specific properties from the state. Guaranteed to be non-nullable (throws if null/undefined).
| field | Description |
|---|---|
| st.<model>: Full | null | The single instance of the model. |
| st.<model>Loading: string | boolean | Loading status of the single instance. |
| st.<model>Form: Default | Form state for creating or updating. |
| st.<model>FormLoading: string | boolean | Loading status of the form. |
| st.<model>Submit: Submit | Start time of the latest submit. |
| st.<model>ViewAt: Date | Time when the detailed view was accessed. |
| st.<model>Modal: string | null | Modal ID associated with this model. |
The single instance of the model.
Loading status of the single instance.
Form state for creating or updating.
Loading status of the form.
Start time of the latest submit.
Time when the detailed view was accessed.
Modal ID associated with this model.
| method | Description |
|---|---|
| create<Class>InForm(options?): Promise<void> | Create a document using form state. |
| update<Class>InForm(options?): Promise<void> | Update a document using form state. |
| create<Class>(data, options?): Promise<void> | Create a new document with data. |
| update<Class>(id, data, options?): Promise<void> | Update an existing document. |
| remove<Class>(id, options?): Promise<void> | Remove a document. |
| check<Class>Submitable(disabled?): Promise<void> | Check if the form can be submitted. |
| submit<Class>(options?): Promise<void> | Submit the form (create or update). |
| new<Class>(partial?, options?): void | Initialize form for new creation. |
| edit<Class>(model, options?): Promise<void> | Initialize form for editing. |
| merge<Class>(model, data, options?): Promise<void> | Merge data into existing document. |
| view<Class>(model, options?): Promise<void> | Open detailed view. |
| set<Class>(...models): void | Manually set model cache. |
| reset<Class>(model?): void | Reset model state. |
Create a document using form state.
Update a document using form state.
Create a new document with data.
Update an existing document.
Remove a document.
Check if the form can be submitted.
Submit the form (create or update).
Initialize form for new creation.
Initialize form for editing.
Merge data into existing document.
Open detailed view.
Manually set model cache.
Reset model state.
| field | Description |
|---|---|
| st.default<Class>: Default | Default value for the slice. |
| st.<slice>List: DataList<Light> | List of data loaded by init/refresh. |
| st.<slice>ListLoading: boolean | Loading status of the list. |
| st.<slice>InitList: DataList<Light> | Initial list snapshot. |
| st.<slice>InitAt: Date | Time when the list was initialized. |
| st.<slice>Selection: DataList<Light> | Selected items in the list. |
| st.<slice>Insight: Insight | Insight data for the list (e.g. counts). |
| st.lastPageOf<Slice>: number | Last accessed page number. |
| st.pageOf<Slice>: number | Current page number. |
| st.limitOf<Slice>: number | Items per page. |
| st.queryArgsOf<Slice>: QueryArgs | Current query arguments. |
| st.sortOf<Slice>: Sort | Current sort setting. |
Default value for the slice.
List of data loaded by init/refresh.
Loading status of the list.
Initial list snapshot.
Time when the list was initialized.
Selected items in the list.
Insight data for the list (e.g. counts).
Last accessed page number.
Current page number.
Items per page.
Current query arguments.
Current sort setting.
| method | Description |
|---|---|
| init<Slice>(...args): Promise<void> | Initialize list with query args. |
| refresh<Slice>(initForm?): Promise<void> | Reload list with strict consistency. |
| select<Slice>(model, options?): void | Update selection state. |
| setPageOf<Slice>(page, options?): Promise<void> | Change page and reload. |
| addPageOf<Slice>(page, options?): Promise<void> | Load next page and append. |
| setLimitOf<Slice>(limit, options?): Promise<void> | Change list limit and reload. |
| setQueryArgsOf<Slice>(...args): Promise<void> | Change query arguments and reload. |
| setSortOf<Slice>(sort, options?): Promise<void> | Change sort and reload. |
Initialize list with query args.
Reload list with strict consistency.
Update selection state.
Change page and reload.
Load next page and append.
Change list limit and reload.
Change query arguments and reload.
Change sort and reload.