@molecule/app-svelte 3.0.0 → 3.2.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 +66 -49
- package/dist/stores/auth.d.ts +9 -0
- package/dist/stores/auth.d.ts.map +1 -1
- package/dist/stores/auth.js +15 -2
- package/dist/stores/auth.js.map +1 -1
- package/dist/stores/forms.d.ts +16 -4
- package/dist/stores/forms.d.ts.map +1 -1
- package/dist/stores/forms.js +18 -17
- package/dist/stores/forms.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-10-
|
|
6
|
+
Generated: 2026-10-31T13:49:38.487Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-svelte
|
|
@@ -112,7 +112,10 @@ Reactive authentication state snapshot (initialized, authenticated, user, loadin
|
|
|
112
112
|
interface AuthState<T = UserProfile> {
|
|
113
113
|
/**
|
|
114
114
|
* The session's state as one value — render from this instead of combining
|
|
115
|
-
* `initialized`/`authenticated`/`loading`.
|
|
115
|
+
* `initialized`/`authenticated`/`loading`. `'loading'` is undecided, so wait
|
|
116
|
+
* and redirect only on `'unauthenticated'`; `'unavailable'` keeps the candidate
|
|
117
|
+
* for retry and can have a null profile. A restore failure other than 401/403
|
|
118
|
+
* never signs out. See {@link AuthStatus}.
|
|
116
119
|
*/
|
|
117
120
|
status: AuthStatus
|
|
118
121
|
/**
|
|
@@ -120,11 +123,14 @@ interface AuthState<T = UserProfile> {
|
|
|
120
123
|
*/
|
|
121
124
|
initialized: boolean
|
|
122
125
|
/**
|
|
123
|
-
* Whether the
|
|
126
|
+
* Whether the client has an authenticated session. This is not a server
|
|
127
|
+
* confirmation flag: during `'unavailable'` it can be false for a retained
|
|
128
|
+
* token/cookie-only candidate with no cached profile. Use `status` for redirects.
|
|
124
129
|
*/
|
|
125
130
|
authenticated: boolean
|
|
126
131
|
/**
|
|
127
|
-
* Current user
|
|
132
|
+
* Current user, or null when none is cached. In particular, an `'unavailable'`
|
|
133
|
+
* token/cookie-only restore has a retained candidate but no profile yet.
|
|
128
134
|
*/
|
|
129
135
|
user: T | null
|
|
130
136
|
/**
|
|
@@ -178,12 +184,23 @@ interface AuthClient<T = UserProfile, TRegister extends RegisterExtraShape<TRegi
|
|
|
178
184
|
* Updates the cached user object (state + persistent storage) without
|
|
179
185
|
* hitting the network. Intended for local refreshes after a per-app
|
|
180
186
|
* mutation (e.g., the user just PATCHed their own profile and the
|
|
181
|
-
* server returned the canonical row).
|
|
187
|
+
* server returned the canonical row). A non-null profile does NOT change
|
|
188
|
+
* tokens or sign the client in: `authenticated` and `status` are unchanged,
|
|
189
|
+
* so an anonymous client stays anonymous. Use {@link login} /
|
|
190
|
+
* {@link register} for a credential exchange, or {@link setSession} when
|
|
191
|
+
* the token was issued outside the client.
|
|
182
192
|
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
193
|
+
* Passing `null` on a signed-in client, or while any session operation is
|
|
194
|
+
* pending, ends the local session: it clears the access token, refresh token
|
|
195
|
+
* and cached user, stops automatic refresh, and settles `authenticated: false`
|
|
196
|
+
* with `status: 'unauthenticated'` in one notification. Every older operation
|
|
197
|
+
* loses session ownership, and a persistent sign-out marker prevents a reload
|
|
198
|
+
* from restoring its credentials or a late cookie. A late credential exchange
|
|
199
|
+
* is revoked best-effort when a logout endpoint is configured, without blocking
|
|
200
|
+
* the caller. This method does not otherwise call the server for a settled
|
|
201
|
+
* session; use {@link logout} for explicit server revocation. On a settled
|
|
202
|
+
* anonymous client, `null` only clears the cached profile and leaves tokens
|
|
203
|
+
* and auth state unchanged.
|
|
187
204
|
*/
|
|
188
205
|
setUser(user: T | null): void;
|
|
189
206
|
/**
|
|
@@ -198,10 +215,13 @@ interface AuthClient<T = UserProfile, TRegister extends RegisterExtraShape<TRegi
|
|
|
198
215
|
* which would violate the storage contract and make a stored bearer token
|
|
199
216
|
* JS-readable (XSS-exfiltratable). Pass `null` to clear it.
|
|
200
217
|
*
|
|
201
|
-
* This changes token storage only
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
218
|
+
* This changes token storage only: passing `null` does not by itself sign a
|
|
219
|
+
* signed-in client out, and a non-null token does not sign an anonymous
|
|
220
|
+
* client in (`authenticated` and `status` are unchanged). Use {@link logout}
|
|
221
|
+
* to end a session, or {@link setUser} with `null` for local-only sign-out.
|
|
222
|
+
* Use {@link login} / {@link register} for a credential exchange, or call
|
|
223
|
+
* {@link setSession} with the token and user to establish an already-issued
|
|
224
|
+
* session.
|
|
205
225
|
*/
|
|
206
226
|
setAccessToken(token: string | null): void;
|
|
207
227
|
/**
|
|
@@ -226,7 +246,16 @@ interface AuthClient<T = UserProfile, TRegister extends RegisterExtraShape<TRegi
|
|
|
226
246
|
*/
|
|
227
247
|
login(credentials: LoginCredentials): Promise<AuthResult<T>>;
|
|
228
248
|
/**
|
|
229
|
-
* Logs out the current user.
|
|
249
|
+
* Logs out the current user. The server request is best-effort: a missing
|
|
250
|
+
* logout route (404), any other HTTP failure, or a network error never makes
|
|
251
|
+
* this method reject. It always clears the access token, refresh token and
|
|
252
|
+
* cached user, stops automatic refresh, and publishes one settled
|
|
253
|
+
* `authenticated: false`, `status: 'unauthenticated'` transition. Every pending
|
|
254
|
+
* session operation loses ownership; a persistent marker prevents reload from
|
|
255
|
+
* restoring an older session, and late credentials are revoked best-effort.
|
|
256
|
+
*
|
|
257
|
+
* When the API has no logout route, set {@link AuthClientConfigOptions.logoutEndpoint}
|
|
258
|
+
* to `null` (or `''`) to skip the request. Local sign-out still happens.
|
|
230
259
|
*/
|
|
231
260
|
logout(): Promise<void>;
|
|
232
261
|
/**
|
|
@@ -278,37 +307,6 @@ interface AuthClient<T = UserProfile, TRegister extends RegisterExtraShape<TRegi
|
|
|
278
307
|
* until the cookie restore decides.
|
|
279
308
|
*
|
|
280
309
|
* Do not put this call (or a `/me` request of your own) in front of the first
|
|
281
|
-
* render, and do not render a loading screen over a session it just restored:
|
|
282
|
-
* `whenRestored()` already resolves as soon as the restore has settled, and the
|
|
283
|
-
* HTTP gate built on it holds requests for exactly that window.
|
|
284
|
-
*/
|
|
285
|
-
initialize(): Promise<void>;
|
|
286
|
-
/**
|
|
287
|
-
* Re-checks a restored session against the server, in the background — the
|
|
288
|
-
* boot-time validation an app with a stored token needs when a revoked or
|
|
289
|
-
* expired token must sign the user out. Call it AFTER the first render
|
|
290
|
-
* (`initialize()` restores synchronously from storage; this costs one request).
|
|
291
|
-
*
|
|
292
|
-
* - The server confirms the user: the session is refreshed and {@link AuthState.status}
|
|
293
|
-
* stays `'authenticated'`.
|
|
294
|
-
* - The server answers 401 or 403: the token is dead — the stored session is
|
|
295
|
-
* cleared and the status becomes `'unauthenticated'`.
|
|
296
|
-
* - The server cannot confirm the session — a network failure, a 5xx, or a 404
|
|
297
|
-
* from a misconfigured {@link AuthClientConfig.currentUserEndpoint}: the
|
|
298
|
-
* session (token AND user) is KEPT and the status becomes `'unavailable'`, so
|
|
299
|
-
* the app can retry instead of signing the user out over a bad connection or a
|
|
300
|
-
* route that does not exist. The 404 error names `currentUserEndpoint`.
|
|
301
|
-
*
|
|
302
|
-
* Do not hand-write this beside the client: a parallel token/user store for a
|
|
303
|
-
* "validating"/"unavailable" flag is the race this method removes.
|
|
304
|
-
*
|
|
305
|
-
* Optional: a provider with no restorable session has nothing to validate.
|
|
306
|
-
*/
|
|
307
|
-
validateSession?(): Promise<void>;
|
|
308
|
-
/**
|
|
309
|
-
* Resolves when the session restore started by `initialize()` has settled — the point
|
|
310
|
-
* after which the client knows whether this visitor is signed in.
|
|
311
|
-
*
|
|
312
310
|
// … truncated — the full declaration is in node_modules/@molecule/app-svelte/dist
|
|
313
311
|
```
|
|
314
312
|
|
|
@@ -397,9 +395,20 @@ interface FormController<T extends FormValuesConstraint<T> = Record<string, unkn
|
|
|
397
395
|
* `defaultValues`, or the values a previous `reset(values)` established.
|
|
398
396
|
* Passing `values` merges them over the current baseline and makes the
|
|
399
397
|
* result the new baseline, so a form reset to freshly loaded or saved data
|
|
400
|
-
* reads clean (`isDirty === false`).
|
|
398
|
+
* reads clean (`isDirty === false`). A changed non-null `id` replaces the
|
|
399
|
+
* record and cancels a pending submit.
|
|
401
400
|
*/
|
|
402
401
|
reset(values?: Partial<T>): void
|
|
402
|
+
/**
|
|
403
|
+
* Applies externally loaded values without clearing submission state.
|
|
404
|
+
*
|
|
405
|
+
* The new clean baseline is the original `defaultValues` plus this latest
|
|
406
|
+
* record, never a merge of earlier records. With `keepDirtyValues`, edited
|
|
407
|
+
* fields retain their values while pristine fields take the loaded values.
|
|
408
|
+
* A changed non-null `id` still replaces the record and cancels a pending
|
|
409
|
+
* submit. Equal-content baselines cause no update.
|
|
410
|
+
*/
|
|
411
|
+
updateValues(values: Partial<T>, resetOptions?: FormResetOptions): void
|
|
403
412
|
/**
|
|
404
413
|
* Handles form submission.
|
|
405
414
|
*/
|
|
@@ -433,6 +442,14 @@ interface FormOptions<T extends FormValuesConstraint<T>> {
|
|
|
433
442
|
* is created. Mutating this object afterwards does not change the baseline.
|
|
434
443
|
*/
|
|
435
444
|
defaultValues?: Partial<T>
|
|
445
|
+
/**
|
|
446
|
+
* Externally loaded values, merged over `defaultValues` as the clean
|
|
447
|
+
* baseline. Framework bindings also apply later content changes; use
|
|
448
|
+
* `resetOptions.keepDirtyValues` to preserve edits while pristine fields fill.
|
|
449
|
+
*/
|
|
450
|
+
values?: Partial<T>
|
|
451
|
+
/** Controls how framework bindings apply changed `values`. */
|
|
452
|
+
resetOptions?: FormResetOptions
|
|
436
453
|
/**
|
|
437
454
|
* Validation mode.
|
|
438
455
|
*/
|
|
@@ -1645,14 +1662,14 @@ Create form stores from a form provider and options.
|
|
|
1645
1662
|
```typescript
|
|
1646
1663
|
function createFormStores<T extends FormValuesConstraint<T>>(
|
|
1647
1664
|
provider: FormProvider,
|
|
1648
|
-
options:
|
|
1665
|
+
options: SvelteFormOptions<T>,
|
|
1649
1666
|
): FormStores<T>
|
|
1650
1667
|
```
|
|
1651
1668
|
|
|
1652
1669
|
- `provider` — Form provider instance
|
|
1653
|
-
- `options` —
|
|
1670
|
+
- `options` — Narrowed creation options; `values` and `resetOptions` are not accepted.
|
|
1654
1671
|
|
|
1655
|
-
**Returns:** Form stores and actions
|
|
1672
|
+
**Returns:** Form stores and actions, including `updateValues(values, { keepDirtyValues })` for explicit late-record delivery. `keepDirtyValues` defaults to false; true retains edited fields while pristine fields take the delivered record.
|
|
1656
1673
|
|
|
1657
1674
|
#### `createFieldStore(controller, name)`
|
|
1658
1675
|
|
package/dist/stores/auth.d.ts
CHANGED
|
@@ -13,6 +13,15 @@ interface AuthStores<T, TRegister extends RegisterExtraShape<TRegister> = Record
|
|
|
13
13
|
user: Readable<T | null>;
|
|
14
14
|
isAuthenticated: Readable<boolean>;
|
|
15
15
|
isLoading: Readable<boolean>;
|
|
16
|
+
/**
|
|
17
|
+
* True once the auth status has left `'loading'` — the session is decided: signed in,
|
|
18
|
+
* signed out, or unavailable. Gate a public page's first render on it
|
|
19
|
+
* (`{#if $sessionReady}`) so a handler that checks `user` never runs against a session
|
|
20
|
+
* restore still in flight. `'unavailable'` also becomes ready and may still have a
|
|
21
|
+
* null user. Without a session hint, an anonymous visitor settles in microtasks without
|
|
22
|
+
* a request.
|
|
23
|
+
*/
|
|
24
|
+
sessionReady: Readable<boolean>;
|
|
16
25
|
error?: Readable<string | null>;
|
|
17
26
|
login: (credentials: LoginCredentials) => Promise<AuthResult<T>>;
|
|
18
27
|
logout: () => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","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CAC9B,CAAC,GAAG,OAAO,EACX,SAAS,SAAS,kBAAkB,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,KACnE,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG;IAC9B,KAAK,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;CAC/B,CAwDA;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,CAAC,GAAG,OAAO,EACX,SAAS,SAAS,kBAAkB,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,EACtE,MAAM,EAAE,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,SAAS,CAAC,CA6B5D"}
|
package/dist/stores/auth.js
CHANGED
|
@@ -28,15 +28,22 @@ export function createAuthStores() {
|
|
|
28
28
|
const client = getAuthClient();
|
|
29
29
|
// Main state store
|
|
30
30
|
const state = readable(client.getState(), (set) => {
|
|
31
|
-
|
|
31
|
+
const unsubscribe = client.onAuthChange(() => {
|
|
32
32
|
set(client.getState());
|
|
33
33
|
});
|
|
34
|
+
// Refresh after subscribing, including after a period with no subscribers.
|
|
35
|
+
set(client.getState());
|
|
36
|
+
return unsubscribe;
|
|
34
37
|
});
|
|
35
38
|
// Derived stores
|
|
36
39
|
const user = derived(state, ($state) => $state.user);
|
|
37
40
|
const isAuthenticated = derived(state, ($state) => $state.authenticated);
|
|
38
41
|
const isLoading = derived(state, ($state) => $state.loading);
|
|
39
42
|
const error = derived(state, ($state) => $state.error);
|
|
43
|
+
// The session is decided — signed in, signed out, or unavailable. Derived from the SAME
|
|
44
|
+
// state store as `user`, so the flip and the user it decided land in one update: a page
|
|
45
|
+
// gated on `$sessionReady` reads the restored user when restoration succeeds.
|
|
46
|
+
const sessionReady = derived(state, ($state) => $state.status !== 'loading');
|
|
40
47
|
// Actions
|
|
41
48
|
const login = (credentials) => {
|
|
42
49
|
return client.login(credentials);
|
|
@@ -55,6 +62,7 @@ export function createAuthStores() {
|
|
|
55
62
|
user,
|
|
56
63
|
isAuthenticated,
|
|
57
64
|
isLoading,
|
|
65
|
+
sessionReady,
|
|
58
66
|
error,
|
|
59
67
|
login,
|
|
60
68
|
logout,
|
|
@@ -72,18 +80,23 @@ export function createAuthStores() {
|
|
|
72
80
|
*/
|
|
73
81
|
export function createAuthStoresFromClient(client) {
|
|
74
82
|
const state = readable(client.getState(), (set) => {
|
|
75
|
-
|
|
83
|
+
const unsubscribe = client.onAuthChange(() => {
|
|
76
84
|
set(client.getState());
|
|
77
85
|
});
|
|
86
|
+
// A readable caches its last value while stopped; auth keeps changing.
|
|
87
|
+
set(client.getState());
|
|
88
|
+
return unsubscribe;
|
|
78
89
|
});
|
|
79
90
|
const user = derived(state, ($state) => $state.user);
|
|
80
91
|
const isAuthenticated = derived(state, ($state) => $state.authenticated);
|
|
81
92
|
const isLoading = derived(state, ($state) => $state.loading);
|
|
93
|
+
const sessionReady = derived(state, ($state) => $state.status !== 'loading');
|
|
82
94
|
return {
|
|
83
95
|
state,
|
|
84
96
|
user,
|
|
85
97
|
isAuthenticated,
|
|
86
98
|
isLoading,
|
|
99
|
+
sessionReady,
|
|
87
100
|
login: (credentials) => client.login(credentials),
|
|
88
101
|
logout: () => client.logout(),
|
|
89
102
|
register: (data) => client.register(data),
|
package/dist/stores/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/stores/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAiB,QAAQ,EAAE,MAAM,cAAc,CAAA;AAW/D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/stores/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAiB,QAAQ,EA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,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAC1E,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,MAAoB,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,SAAS,CAAC,CAAA;IAE1F,OAAO;QACL,KAAK;QACL,IAAI;QACJ,eAAe;QACf,SAAS;QACT,YAAY;QACZ,KAAK,EAAE,CAAC,WAA6B,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC;QACnE,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE;QAC7B,QAAQ,EAAE,CAAC,IAA6B,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAClE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE;KAChC,CAAA;AACH,CAAC"}
|
package/dist/stores/forms.d.ts
CHANGED
|
@@ -4,7 +4,15 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
import { type Readable } from 'svelte/store';
|
|
7
|
-
import type { FieldRegistration, FieldState, FormController, FormOptions, FormProvider, FormState, FormValuesConstraint, RegisterOptions } from '@molecule/app-forms';
|
|
7
|
+
import type { FieldRegistration, FieldState, FormController, FormOptions, FormProvider, FormResetOptions, FormState, FormValuesConstraint, RegisterOptions } from '@molecule/app-forms';
|
|
8
|
+
/**
|
|
9
|
+
* Svelte form creation options. Unlike `FormOptions`, this narrowed type does
|
|
10
|
+
* not accept `values` or `resetOptions`: store-backed getters are not observed.
|
|
11
|
+
* Deliver records after creation through the returned `updateValues(values,
|
|
12
|
+
* { keepDirtyValues })` method. The option defaults to false; pass true to retain
|
|
13
|
+
* edited fields while pristine fields take the record.
|
|
14
|
+
*/
|
|
15
|
+
type SvelteFormOptions<T extends FormValuesConstraint<T>> = Omit<FormOptions<T>, 'values' | 'resetOptions'>;
|
|
8
16
|
/**
|
|
9
17
|
* Form stores and actions return type.
|
|
10
18
|
*/
|
|
@@ -27,6 +35,8 @@ interface FormStores<T extends FormValuesConstraint<T>> {
|
|
|
27
35
|
handleSubmit: (onSubmit: (values: T) => void | Promise<void>, onError?: (errors: Partial<Record<keyof T, string>>) => void) => (event?: {
|
|
28
36
|
preventDefault?: () => void;
|
|
29
37
|
}) => Promise<void>;
|
|
38
|
+
/** Deliver a record; `keepDirtyValues` retains edits while pristine fields fill. */
|
|
39
|
+
updateValues: (values: Partial<T>, resetOptions?: FormResetOptions) => void;
|
|
30
40
|
reset: (values?: Partial<T>) => void;
|
|
31
41
|
validate: () => Promise<boolean>;
|
|
32
42
|
destroy: () => void;
|
|
@@ -36,8 +46,10 @@ interface FormStores<T extends FormValuesConstraint<T>> {
|
|
|
36
46
|
* Create form stores from a form provider and options.
|
|
37
47
|
*
|
|
38
48
|
* @param provider - Form provider instance
|
|
39
|
-
* @param options -
|
|
40
|
-
* @returns Form stores and actions
|
|
49
|
+
* @param options - Narrowed creation options; `values` and `resetOptions` are not accepted.
|
|
50
|
+
* @returns Form stores and actions, including `updateValues(values, { keepDirtyValues })`
|
|
51
|
+
* for explicit late-record delivery. `keepDirtyValues` defaults to false; true retains
|
|
52
|
+
* edited fields while pristine fields take the delivered record.
|
|
41
53
|
*
|
|
42
54
|
* @example
|
|
43
55
|
* ```svelte
|
|
@@ -72,7 +84,7 @@ interface FormStores<T extends FormValuesConstraint<T>> {
|
|
|
72
84
|
* </form>
|
|
73
85
|
* ```
|
|
74
86
|
*/
|
|
75
|
-
export declare function createFormStores<T extends FormValuesConstraint<T>>(provider: FormProvider, options:
|
|
87
|
+
export declare function createFormStores<T extends FormValuesConstraint<T>>(provider: FormProvider, options: SvelteFormOptions<T>): FormStores<T>;
|
|
76
88
|
/**
|
|
77
89
|
* Create a readable store that tracks a single field's state.
|
|
78
90
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../src/stores/forms.ts"],"names":[],"mappings":"AAAA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;IACnB,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,CAAA;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,CAAC,EAChE,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC5B,UAAU,CAAC,CAAC,CAAC,CAqGf;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EACnF,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,EAC7B,IAAI,EAAE,CAAC,GACN,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAI5B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EACnF,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,EAC7B,IAAI,EAAE,CAAC,GACN,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAIhB"}
|
package/dist/stores/forms.js
CHANGED
|
@@ -4,12 +4,21 @@
|
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
6
|
import { derived, readable } from 'svelte/store';
|
|
7
|
+
/** Subscribe first, then publish state delivered before this readable started. */
|
|
8
|
+
function subscribeAndRefresh(controller, read, set) {
|
|
9
|
+
const refresh = () => set(read());
|
|
10
|
+
const unsubscribe = controller.subscribe(refresh);
|
|
11
|
+
refresh();
|
|
12
|
+
return unsubscribe;
|
|
13
|
+
}
|
|
7
14
|
/**
|
|
8
15
|
* Create form stores from a form provider and options.
|
|
9
16
|
*
|
|
10
17
|
* @param provider - Form provider instance
|
|
11
|
-
* @param options -
|
|
12
|
-
* @returns Form stores and actions
|
|
18
|
+
* @param options - Narrowed creation options; `values` and `resetOptions` are not accepted.
|
|
19
|
+
* @returns Form stores and actions, including `updateValues(values, { keepDirtyValues })`
|
|
20
|
+
* for explicit late-record delivery. `keepDirtyValues` defaults to false; true retains
|
|
21
|
+
* edited fields while pristine fields take the delivered record.
|
|
13
22
|
*
|
|
14
23
|
* @example
|
|
15
24
|
* ```svelte
|
|
@@ -47,11 +56,7 @@ import { derived, readable } from 'svelte/store';
|
|
|
47
56
|
export function createFormStores(provider, options) {
|
|
48
57
|
const controller = provider.createForm(options);
|
|
49
58
|
// Main form state store
|
|
50
|
-
const formState = readable(controller.getState(), (set) =>
|
|
51
|
-
return controller.subscribe((state) => {
|
|
52
|
-
set(state);
|
|
53
|
-
});
|
|
54
|
-
});
|
|
59
|
+
const formState = readable(controller.getState(), (set) => subscribeAndRefresh(controller, () => controller.getState(), set));
|
|
55
60
|
// Derived stores
|
|
56
61
|
const isValid = derived(formState, ($state) => $state.isValid);
|
|
57
62
|
const isDirty = derived(formState, ($state) => $state.isDirty);
|
|
@@ -90,6 +95,9 @@ export function createFormStores(provider, options) {
|
|
|
90
95
|
const handleSubmit = (onSubmit, onError) => {
|
|
91
96
|
return controller.handleSubmit(onSubmit, onError);
|
|
92
97
|
};
|
|
98
|
+
const updateValues = (values, resetOptions = {}) => {
|
|
99
|
+
controller.updateValues(values, resetOptions);
|
|
100
|
+
};
|
|
93
101
|
const reset = (values) => {
|
|
94
102
|
controller.reset(values);
|
|
95
103
|
};
|
|
@@ -112,6 +120,7 @@ export function createFormStores(provider, options) {
|
|
|
112
120
|
setError,
|
|
113
121
|
clearErrors,
|
|
114
122
|
handleSubmit,
|
|
123
|
+
updateValues,
|
|
115
124
|
reset,
|
|
116
125
|
validate,
|
|
117
126
|
destroy,
|
|
@@ -141,11 +150,7 @@ export function createFormStores(provider, options) {
|
|
|
141
150
|
* ```
|
|
142
151
|
*/
|
|
143
152
|
export function createFieldStore(controller, name) {
|
|
144
|
-
return readable(controller.getFieldState(name), (set) =>
|
|
145
|
-
return controller.subscribe(() => {
|
|
146
|
-
set(controller.getFieldState(name));
|
|
147
|
-
});
|
|
148
|
-
});
|
|
153
|
+
return readable(controller.getFieldState(name), (set) => subscribeAndRefresh(controller, () => controller.getFieldState(name), set));
|
|
149
154
|
}
|
|
150
155
|
/**
|
|
151
156
|
* Create a readable store that tracks a single field's value.
|
|
@@ -169,10 +174,6 @@ export function createFieldStore(controller, name) {
|
|
|
169
174
|
* ```
|
|
170
175
|
*/
|
|
171
176
|
export function createWatchStore(controller, name) {
|
|
172
|
-
return readable(controller.getValue(name), (set) =>
|
|
173
|
-
return controller.subscribe(() => {
|
|
174
|
-
set(controller.getValue(name));
|
|
175
|
-
});
|
|
176
|
-
});
|
|
177
|
+
return readable(controller.getValue(name), (set) => subscribeAndRefresh(controller, () => controller.getValue(name), set));
|
|
177
178
|
}
|
|
178
179
|
//# sourceMappingURL=forms.js.map
|
package/dist/stores/forms.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../src/stores/forms.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAiB,QAAQ,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../src/stores/forms.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAiB,QAAQ,EAAE,MAAM,cAAc,CAAA;AAc/D,kFAAkF;AAClF,SAAS,mBAAmB,CAC1B,UAA6B,EAC7B,IAAa,EACb,GAAuB;IAEvB,MAAM,OAAO,GAAG,GAAS,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;IACvC,MAAM,WAAW,GAAG,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;IACjD,OAAO,EAAE,CAAA;IACT,OAAO,WAAW,CA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