@molecule/app-angular 1.0.3 → 1.0.4
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 +22 -13
- package/package.json +7 -7
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-23T15:23:09.411Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-angular
|
|
@@ -147,6 +147,15 @@ interface AuthClient<T = UserProfile, TRegister extends RegisterExtraShape<TRegi
|
|
|
147
147
|
* Gets the current user.
|
|
148
148
|
*/
|
|
149
149
|
getUser(): T | null;
|
|
150
|
+
/**
|
|
151
|
+
* Optional ownership marker for the current session. Compare values only within
|
|
152
|
+
* this client: replacing or ending a session changes it, including re-adopting
|
|
153
|
+
* the same token and user. Profile updates and same-session refreshes keep it.
|
|
154
|
+
* Consumers can use it to discard stale async work without treating editable
|
|
155
|
+
* user fields as an immutable account identifier. Providers without this
|
|
156
|
+
* capability require the consumer's own stable identity check.
|
|
157
|
+
*/
|
|
158
|
+
getSessionRevision?(): number;
|
|
150
159
|
/**
|
|
151
160
|
* Updates the cached user object (state + persistent storage) without
|
|
152
161
|
* hitting the network. Intended for local refreshes after a per-app
|
|
@@ -221,6 +230,9 @@ interface AuthClient<T = UserProfile, TRegister extends RegisterExtraShape<TRegi
|
|
|
221
230
|
confirmPasswordReset(data: PasswordResetConfirm): Promise<void>;
|
|
222
231
|
/**
|
|
223
232
|
* Updates the current user's profile.
|
|
233
|
+
* Returns the saved response. If the session is explicitly replaced or ended
|
|
234
|
+
* while the request is pending, that response does not replace the current
|
|
235
|
+
* session's user or persisted cache.
|
|
224
236
|
*/
|
|
225
237
|
updateProfile(data: Partial<T>): Promise<T>;
|
|
226
238
|
/**
|
|
@@ -279,16 +291,6 @@ interface AuthClient<T = UserProfile, TRegister extends RegisterExtraShape<TRegi
|
|
|
279
291
|
* Resolves IMMEDIATELY when no restore is in flight: before `initialize()` is ever
|
|
280
292
|
* called, and after it has finished. A restore that failed resolves too (it settled the
|
|
281
293
|
* question), so an HTTP client can await this before every request without risking one
|
|
282
|
-
* held forever. That is what makes the fetch-before-restore race impossible: a page that
|
|
283
|
-
* fetches viewer-dependent data on mount waits here instead of going out anonymously
|
|
284
|
-
* (see `setAuthGate` in `@molecule/app-http`).
|
|
285
|
-
*
|
|
286
|
-
* Optional: a provider that restores no session has nothing to wait for. Without it, an
|
|
287
|
-
* HTTP client bonded to that provider sends first-paint requests unauthenticated.
|
|
288
|
-
*
|
|
289
|
-
* A provider whose restore sends a request THROUGH the gated HTTP client must send that
|
|
290
|
-
* request with `skipAuthGate: true` (`RequestConfig` in `@molecule/app-http`): the gate
|
|
291
|
-
* waits on this promise, so holding the restore's own request makes the gate wait on
|
|
292
294
|
// … truncated — the full declaration is in node_modules/@molecule/app-angular/dist
|
|
293
295
|
```
|
|
294
296
|
|
|
@@ -371,7 +373,13 @@ interface FormController<T extends Record<string, unknown> = Record<string, unkn
|
|
|
371
373
|
*/
|
|
372
374
|
validate(): Promise<boolean>
|
|
373
375
|
/**
|
|
374
|
-
* Resets the form
|
|
376
|
+
* Resets the form and clears errors, touched fields and submission state.
|
|
377
|
+
*
|
|
378
|
+
* With no argument it restores the current baseline — the initial
|
|
379
|
+
* `defaultValues`, or the values a previous `reset(values)` established.
|
|
380
|
+
* Passing `values` merges them over the current baseline and makes the
|
|
381
|
+
* result the new baseline, so a form reset to freshly loaded or saved data
|
|
382
|
+
* reads clean (`isDirty === false`).
|
|
375
383
|
*/
|
|
376
384
|
reset(values?: Partial<T>): void
|
|
377
385
|
/**
|
|
@@ -403,7 +411,8 @@ Form creation options.
|
|
|
403
411
|
```typescript
|
|
404
412
|
interface FormOptions<T extends Record<string, unknown>> {
|
|
405
413
|
/**
|
|
406
|
-
* Default values
|
|
414
|
+
* Default values, captured as the form's clean baseline when the controller
|
|
415
|
+
* is created. Mutating this object afterwards does not change the baseline.
|
|
407
416
|
*/
|
|
408
417
|
defaultValues?: Partial<T>
|
|
409
418
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-angular",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Angular framework bindings for molecule.dev",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"rxjs": "^7.8.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@angular/compiler": "22.
|
|
44
|
-
"@angular/compiler-cli": "22.
|
|
45
|
-
"@angular/core": "22.
|
|
46
|
-
"@molecule/app-utilities": "1.0.
|
|
47
|
-
"@types/node": "26.
|
|
43
|
+
"@angular/compiler": "22.2.3",
|
|
44
|
+
"@angular/compiler-cli": "22.2.3",
|
|
45
|
+
"@angular/core": "22.2.3",
|
|
46
|
+
"@molecule/app-utilities": "1.0.5",
|
|
47
|
+
"@types/node": "26.6.5",
|
|
48
48
|
"rxjs": "7.8.2",
|
|
49
49
|
"typescript": "6.0.3",
|
|
50
|
-
"vitest": "4.1.
|
|
50
|
+
"vitest": "4.1.12"
|
|
51
51
|
},
|
|
52
52
|
"repository": {
|
|
53
53
|
"type": "git",
|