@forgeroute/ui 0.4.81 → 0.4.83
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/fesm2022/forgeroute-ui-offline.mjs +280 -25
- package/fesm2022/forgeroute-ui-offline.mjs.map +1 -1
- package/fesm2022/{forgeroute-ui-ui-labels.es-B48eQLyT.mjs → forgeroute-ui-ui-labels.es-DPY2FHcg.mjs} +27 -1
- package/fesm2022/{forgeroute-ui-ui-labels.es-B48eQLyT.mjs.map → forgeroute-ui-ui-labels.es-DPY2FHcg.mjs.map} +1 -1
- package/fesm2022/forgeroute-ui.mjs +90 -18
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-offline.d.ts +104 -5
- package/types/forgeroute-ui.d.ts +53 -5
package/package.json
CHANGED
|
@@ -39,6 +39,8 @@ export interface OfflineMutation {
|
|
|
39
39
|
dependsOn?: string[];
|
|
40
40
|
/** The temp ids behind `dependsOn`, same order (needed after the create row is gone to find its `idmap` entry). */
|
|
41
41
|
dependsOnTempIds?: string[];
|
|
42
|
+
/** Set by "Keep my version": the conflict stamp fields were removed from the body on the user's explicit choice, so this change overwrites the server's newer version. Kept for traceability. */
|
|
43
|
+
overwrite?: boolean;
|
|
42
44
|
}
|
|
43
45
|
export type NewMutation = Omit<OfflineMutation, 'seq'>;
|
|
44
46
|
export interface CachedEntry {
|
|
@@ -121,6 +123,21 @@ export declare class OfflineStore {
|
|
|
121
123
|
* Returns the reset row, or null when the row is missing, belongs to another user, or is being sent right now (live claim).
|
|
122
124
|
*/
|
|
123
125
|
resetForRetry(id: string, userId: string, now?: number): Promise<OfflineMutation | null>;
|
|
126
|
+
/**
|
|
127
|
+
* The user's "Keep my version": in ONE transaction, only for a row in status `conflict` that belongs to `userId` and whose body has at least one of
|
|
128
|
+
* the stamp `fields`: removes those fields from the body, gives it a NEW idempotency key (the old one is bound to the stored 409 on the server), sets it
|
|
129
|
+
* back to pending with 0 attempts and marks `overwrite: true`. id, seq, createdAt and dependencies are kept. LATER rows of the same record are NOT
|
|
130
|
+
* touched here: they keep their stamp (and stay held / pending) until the overwrite has really been delivered; only then does the replayer call
|
|
131
|
+
* `stripStampsAfter`. So if the overwrite fails for good or is discarded, a later edit is never sent unstamped.
|
|
132
|
+
* Returns the row, or null when it is missing, foreign, not in conflict, or has no stamp field (nothing to overwrite: it would re-send an unchanged body).
|
|
133
|
+
*/
|
|
134
|
+
resetForKeepMine(id: string, userId: string, fields: readonly string[], newKey: string): Promise<OfflineMutation | null>;
|
|
135
|
+
/**
|
|
136
|
+
* Called after a "Keep my version" overwrite was DELIVERED: removes the stamp `fields` from every row of `userId` for the same record (entityType +
|
|
137
|
+
* entityId) with a higher seq than `afterSeq` that is still `pending` (marks them `overwrite: true`), so they do not each turn into another conflict.
|
|
138
|
+
* failed / conflict / syncing rows and rows of other records are left exactly as they are. Returns how many rows changed.
|
|
139
|
+
*/
|
|
140
|
+
stripStampsAfter(userId: string, entityType: string, entityId: string, afterSeq: number, fields: readonly string[]): Promise<number>;
|
|
124
141
|
get(id: string): Promise<OfflineMutation | null>;
|
|
125
142
|
/** Deletes the row; with `ifOwner` only while that owner still holds the claim. Returns whether a row was deleted. */
|
|
126
143
|
delete(id: string, opts?: {
|
|
@@ -225,7 +242,21 @@ export interface OfflineSupportConfig {
|
|
|
225
242
|
* with kind `dependency` instead of being sent with a wrong id).
|
|
226
243
|
*/
|
|
227
244
|
createdId?: (body: unknown, row: OfflineMutation) => string | number | undefined;
|
|
245
|
+
/**
|
|
246
|
+
* Names of top-level JSON body fields that carry the "record as the editor loaded it" stamp (e.g. `expectedUpdatedAt`). Default `[]` = the
|
|
247
|
+
* "Keep my version" feature is OFF. When a replayed change gets 409 the row becomes `conflict`; `OfflineSupportService.keepMine(rowId)` then removes
|
|
248
|
+
* these fields from the stored body (so the server no longer compares) and sends the change again: last write wins, by the user's explicit choice.
|
|
249
|
+
*/
|
|
250
|
+
conflictStampFields?: string[];
|
|
251
|
+
/**
|
|
252
|
+
* The `code` the backend puts in the JSON body of its 409 "this request is already being processed" answer (the first copy of the same
|
|
253
|
+
* Idempotency-Key is still running). Such a 409 is NOT a conflict: the row stays pending and is sent again later (back-off, or the `Retry-After`
|
|
254
|
+
* header when present). Default `IDEMPOTENCY_IN_PROGRESS_CODE` (`'IDEMPOTENCY_IN_PROGRESS'`).
|
|
255
|
+
*/
|
|
256
|
+
idempotencyInProgressCode?: string;
|
|
228
257
|
}
|
|
258
|
+
/** Default `code` of the backend's "same request still running" 409 (see `OfflineSupportConfig.idempotencyInProgressCode`). */
|
|
259
|
+
export declare const IDEMPOTENCY_IN_PROGRESS_CODE = "IDEMPOTENCY_IN_PROGRESS";
|
|
229
260
|
export declare const OFFLINE_SUPPORT_CONFIG: InjectionToken<OfflineSupportConfig>;
|
|
230
261
|
/** Header the replayer sets on every replayed request; the idempotency and offline interceptors let such requests through untouched. */
|
|
231
262
|
export declare const OFFLINE_REPLAY_HEADER = "X-Offline-Replay";
|
|
@@ -267,12 +298,18 @@ export interface ResolvedOfflineConfig {
|
|
|
267
298
|
maxQueue: number;
|
|
268
299
|
maxAttempts: number;
|
|
269
300
|
createdId: (body: unknown, row: OfflineMutation) => string | number | undefined;
|
|
301
|
+
conflictStampFields: readonly string[];
|
|
302
|
+
idempotencyInProgressCode: string;
|
|
270
303
|
}
|
|
271
304
|
/** Default for `createdId`: `body.id`, else `body.data.id` (string or finite number), otherwise undefined. */
|
|
272
305
|
export declare function defaultCreatedId(body: unknown): string | number | undefined;
|
|
273
306
|
export declare const DEFAULT_LIST_TTL_MS: number;
|
|
274
307
|
export declare const DEFAULT_DETAIL_TTL_MS: number;
|
|
275
308
|
export declare function resolveConfig(cfg: OfflineSupportConfig): ResolvedOfflineConfig;
|
|
309
|
+
/** True when the body is a JSON object that has at least one of the `fields` as a top-level key. */
|
|
310
|
+
export declare function hasStampField(body: unknown, fields: readonly string[]): boolean;
|
|
311
|
+
/** The body without the `fields` (top-level only; every other field is kept as it is). A body that is not a JSON object is returned unchanged. */
|
|
312
|
+
export declare function stripStampFields(body: unknown, fields: readonly string[]): unknown;
|
|
276
313
|
/** Path + query of a URL with the origin removed ('https://x.test/api/a?b=1' -> '/api/a?b=1'). Relative URLs are returned as they are. */
|
|
277
314
|
export declare function pathAndQuery(url: string): string;
|
|
278
315
|
/** Path only (no query) of a URL with the origin removed. */
|
|
@@ -404,6 +441,15 @@ export interface ReplayResult {
|
|
|
404
441
|
conflicts: number;
|
|
405
442
|
blockedByAuth: boolean;
|
|
406
443
|
}
|
|
444
|
+
/** What "Keep my version" ended with: `sent` (delivered), `shortly` (still queued, goes out on its own) or `failed` (refused again / a new conflict). */
|
|
445
|
+
export type KeepMineOutcome = 'sent' | 'shortly' | 'failed';
|
|
446
|
+
export interface KeepMineRun {
|
|
447
|
+
applied: boolean;
|
|
448
|
+
result: ReplayResult | null;
|
|
449
|
+
followUp: ReplayResult | null;
|
|
450
|
+
/** null when nothing was applied. */
|
|
451
|
+
outcome: KeepMineOutcome | null;
|
|
452
|
+
}
|
|
407
453
|
/** `navigator.locks`, or null when the browser has none (older Safari) - the replayer then falls back to an in-tab mutex plus a localStorage lease. */
|
|
408
454
|
export declare const OFFLINE_LOCK_MANAGER: InjectionToken<LockManager | null>;
|
|
409
455
|
export type LeaseStorage = Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>;
|
|
@@ -430,9 +476,13 @@ type Outcome = {
|
|
|
430
476
|
action: 'retry';
|
|
431
477
|
kind: Extract<MutationErrorKind, 'server' | 'network' | 'timeout'>;
|
|
432
478
|
status: number;
|
|
479
|
+
retryAfterMs?: number;
|
|
433
480
|
};
|
|
434
|
-
/**
|
|
435
|
-
|
|
481
|
+
/**
|
|
482
|
+
* Maps what a replayed request ended with to what happens to its row. Anything unknown stays retryable: only a real 4xx answer is final.
|
|
483
|
+
* A 409 whose body `code` is `inProgressCode` (the same Idempotency-Key is still being processed) is transient: retry, honouring `Retry-After`.
|
|
484
|
+
*/
|
|
485
|
+
export declare function classifyReplay(err: unknown, inProgressCode?: string): Outcome;
|
|
436
486
|
/**
|
|
437
487
|
* Sends the signed-in user's saved changes, oldest first, when the connection is back. Safe by construction:
|
|
438
488
|
* - one run at a time per browser (navigator.locks, or in-tab mutex + localStorage lease), and every row is `claim`ed atomically in IndexedDB;
|
|
@@ -480,8 +530,27 @@ export declare class OfflineReplayer {
|
|
|
480
530
|
replayAll(trigger: ReplayTrigger): Promise<ReplayResult | null>;
|
|
481
531
|
/** Puts one row (any status, conflict and failed included) back to pending with 0 attempts and sends only that row. */
|
|
482
532
|
retryOne(id: string): Promise<ReplayResult | null>;
|
|
483
|
-
/**
|
|
533
|
+
/**
|
|
534
|
+
* "Keep my version" for one conflict row: strips the configured stamp fields from its body, gives it a new idempotency key, puts it back to pending
|
|
535
|
+
* and sends ONLY that row first (same claim / lock / ordering rules as `retryOne`). When that overwrite was DELIVERED (2xx, row deleted) it then starts
|
|
536
|
+
* one normal full run (`replayAll('online')`, the run a reconnect starts), so the later changes to the same record that were held behind the conflict
|
|
537
|
+
* and any other due change go out right away. If the overwrite did not go through, nothing else is started and the later changes stay held.
|
|
538
|
+
* `applied` is false when nothing was changed: the feature is off, nobody is signed in, or the row is missing, foreign, no longer a conflict, or has no stamp field (nothing to overwrite). The later still-pending rows of the same record keep their stamp until the overwrite is delivered; the run that delivers it removes it from them (`stripStampsAfter`). When the run could not start (another tab holds the lock) `result` is null and the row stays pending: the next normal run sends it.
|
|
539
|
+
* `outcome` tells the user what happened (`sent` / `shortly` / `failed`, null when not applied). `result` is the overwrite's own run; `followUp` is the normal run that came after it (null when none was started).
|
|
540
|
+
*/
|
|
541
|
+
keepMineOne(id: string): Promise<KeepMineRun>;
|
|
542
|
+
/** sent = delivered; shortly = it is still queued (no run could start because another tab holds the lock, still pending / being sent, or waiting out a retry); failed = refused again or a new conflict. */
|
|
543
|
+
private keepMineOutcome;
|
|
544
|
+
/** Deletes one row of the signed-in user (the user chose to discard it). When that row was a stuck (failed / conflict) one with later pending changes of the same record behind it, one normal drain follows so they go out. */
|
|
484
545
|
discard(id: string): Promise<void>;
|
|
546
|
+
private readonly discardDrains;
|
|
547
|
+
/** Resolves when EVERY drain started by a `discard` (also overlapping ones) has finished; immediately when none is running. Never rejects. */
|
|
548
|
+
drainSettled(): Promise<void>;
|
|
549
|
+
/**
|
|
550
|
+
* `replayAll('online')` joins a run that is already in flight, but that run decided up front which records are blocked and never looks at the
|
|
551
|
+
* discarded record again. So when a run was in flight (a full run, or a single-row retry / keep-my-version run), one FRESH run follows it.
|
|
552
|
+
*/
|
|
553
|
+
private drainAfterDiscard;
|
|
485
554
|
/** Deletes all rows of the signed-in user (the user chose to discard everything). */
|
|
486
555
|
discardAll(): Promise<void>;
|
|
487
556
|
/** Re-reads the counts for the signed-in user (zeros when nobody is signed in or storage is unavailable). */
|
|
@@ -542,6 +611,14 @@ export declare function isRequestTimeoutError(e: unknown): e is RequestTimeoutEr
|
|
|
542
611
|
* `null` (default) = the configured read / write / long timeout. A value of 0 or less switches the timeout off for that request.
|
|
543
612
|
*/
|
|
544
613
|
export declare const REQUEST_TIMEOUT_MS: HttpContextToken<number | null>;
|
|
614
|
+
/**
|
|
615
|
+
* Marks ONE request as long-running, whatever its URL: `http.get('/api/x?size=10000', { context: new HttpContext().set(REQUEST_LONG, true) })`.
|
|
616
|
+
* Same effect as a `longRequests` match, a blob download or an upload: it uses the long timeout (unless `REQUEST_TIMEOUT_MS` overrides it), is not
|
|
617
|
+
* counted in the slow-answer rule, never arms the "stuck" timer (so no "Slow connection" banner) and a failed read is not retried automatically.
|
|
618
|
+
* `longRequests` matches the URL WITHOUT its query string, so a request that is long only because of its parameters (a table Export asking for
|
|
619
|
+
* 10,000 rows) needs this token, set by the host app in an HTTP interceptor placed BEFORE the offline interceptors.
|
|
620
|
+
*/
|
|
621
|
+
export declare const REQUEST_LONG: HttpContextToken<boolean>;
|
|
545
622
|
/**
|
|
546
623
|
* Gives every write under `apiPrefix` an `Idempotency-Key: <uuid>` unless the caller already set one (callers that must keep ONE key across
|
|
547
624
|
* user retries set it themselves). The same key goes on the queued row and on every replay, so the server can recognise a repeat.
|
|
@@ -582,6 +659,11 @@ export type CrossTabMessage = {
|
|
|
582
659
|
};
|
|
583
660
|
/** Creates the cross-tab channel; null when the browser has no BroadcastChannel (the focus / visibility poll still keeps tabs in step). */
|
|
584
661
|
export declare function createChannel(name: string): BroadcastChannel | null;
|
|
662
|
+
/** `keepMine` was refused: `disabled` = `conflictStampFields` is empty, `notFound` = no such row for the signed-in user, `notConflict` = the row is not in status conflict, `noStamp` = its body has none of the configured stamp fields (nothing to overwrite). */
|
|
663
|
+
export declare class KeepMineError extends Error {
|
|
664
|
+
readonly reason: 'disabled' | 'notFound' | 'notConflict' | 'noStamp';
|
|
665
|
+
constructor(reason: 'disabled' | 'notFound' | 'notConflict' | 'noStamp', message: string);
|
|
666
|
+
}
|
|
585
667
|
/**
|
|
586
668
|
* What the app talks to: counts, the list for the pending-changes drawer, Sync now / Retry / Discard, and the session helpers.
|
|
587
669
|
* Everything is scoped to `config.getUserId()`; nothing here ever deletes saved changes unless the user chose it
|
|
@@ -645,6 +727,15 @@ export declare class OfflineSupportService {
|
|
|
645
727
|
/** "Sync now": sends everything due, even rows waiting out a backoff. */
|
|
646
728
|
syncNow(): Promise<ReplayResult | null>;
|
|
647
729
|
retry(id: string): Promise<void>;
|
|
730
|
+
/** True when "Keep my version" can be offered for this row: the feature is on (`conflictStampFields` not empty), the row is a conflict, and its body has at least one stamp field. */
|
|
731
|
+
canKeepMine(row: OfflineMutation): boolean;
|
|
732
|
+
/**
|
|
733
|
+
* The user chose "Keep my version" for a conflict row: the stamp fields are removed from its body, it gets a new idempotency key, goes back to pending and
|
|
734
|
+
* only that row is sent first and, once it is delivered, one normal sync follows (later changes to the same record and other due changes go out). Last write wins here, by the user's explicit choice (the server can no longer detect a newer edit, so no second 409 for the stamp).
|
|
735
|
+
* Resolves with what happened: `sent` (delivered), `shortly` (still queued: another tab holds the sync lock, or it waits for a retry) or `failed` (refused again or a new conflict; the change stays saved on the device).
|
|
736
|
+
* Throws `KeepMineError` when the feature is off, the row does not exist, it is not in status `conflict`, or its body has no stamp field (`noStamp`; same rule as `canKeepMine`).
|
|
737
|
+
*/
|
|
738
|
+
keepMine(id: string): Promise<KeepMineOutcome>;
|
|
648
739
|
discard(id: string): Promise<void>;
|
|
649
740
|
discardAll(): Promise<void>;
|
|
650
741
|
/**
|
|
@@ -775,14 +866,14 @@ export declare class ConnectionBannerComponent {
|
|
|
775
866
|
type PendingRow = ReturnType<OfflineSupportService['rows']>[number];
|
|
776
867
|
/**
|
|
777
868
|
* Side panel that lists every change saved on this device and not yet accepted by the server, with plain-words reasons and
|
|
778
|
-
* the actions Retry / Discard per change, Sync all and Discard all. Open it from `(viewChanges)` of `<ui-connection-banner>`:
|
|
869
|
+
* the actions Retry / Discard per change (a conflict row, when `conflictStampFields` is configured, offers "Keep my version" and "Discard my change" instead of Retry), Sync all and Discard all. Open it from `(viewChanges)` of `<ui-connection-banner>`:
|
|
779
870
|
*
|
|
780
871
|
* <ui-pending-changes-drawer [open]="drawerOpen()" (closed)="drawerOpen.set(false)" />
|
|
781
872
|
*
|
|
782
873
|
* Raw server text is never shown: the wording comes from `lastError.kind`. Discards ask first (ConfirmService). Results are announced
|
|
783
874
|
* in a polite live region that exists from the first render. Test ids: pending-drawer-live, pending-drawer-auth, pending-drawer-list,
|
|
784
875
|
* pending-drawer-empty, pending-row-<id>, pending-row-status-<id>, pending-row-error-<id>, pending-row-time-<id>, pending-row-retry-<id>,
|
|
785
|
-
* pending-row-discard-<id>, pending-drawer-sync-all, pending-drawer-discard-all.
|
|
876
|
+
* pending-row-keep-mine-<id>, pending-row-discard-<id>, pending-drawer-sync-all, pending-drawer-discard-all.
|
|
786
877
|
*/
|
|
787
878
|
export declare class PendingChangesDrawerComponent {
|
|
788
879
|
protected readonly labels: UiLabelsService;
|
|
@@ -796,15 +887,23 @@ export declare class PendingChangesDrawerComponent {
|
|
|
796
887
|
protected readonly rows: import("@angular/core").Signal<readonly import("@forgeroute/ui/offline").OfflineMutation[]>;
|
|
797
888
|
protected readonly announcement: import("@angular/core").WritableSignal<string>;
|
|
798
889
|
private readonly now;
|
|
890
|
+
/** Rows whose Retry / Keep my version (confirm or request) is in flight: their buttons are disabled so a second click cannot start it twice. */
|
|
891
|
+
private readonly busyIds;
|
|
799
892
|
constructor();
|
|
800
893
|
protected statusText(row: PendingRow): string;
|
|
801
894
|
/** Plain words from the error KIND; the server's own text (`lastError.message`) is never shown. */
|
|
802
895
|
protected errorText(row: PendingRow): string;
|
|
803
896
|
protected canRetry(row: PendingRow): boolean;
|
|
897
|
+
protected discardText(row: PendingRow): string;
|
|
898
|
+
protected discardName(row: PendingRow): string;
|
|
804
899
|
protected iso(row: PendingRow): string;
|
|
805
900
|
protected absolute(row: PendingRow): string;
|
|
806
901
|
protected savedText(row: PendingRow): string;
|
|
902
|
+
protected isBusy(row: PendingRow): boolean;
|
|
903
|
+
private setBusy;
|
|
807
904
|
protected retry(row: PendingRow): Promise<void>;
|
|
905
|
+
/** "Keep my version": asks first (the other person's version is lost), then removes the stamp and sends only this change, then says what happened (sent / will be sent shortly / could not be sent). */
|
|
906
|
+
protected keepMine(row: PendingRow): Promise<void>;
|
|
808
907
|
protected syncAll(): Promise<void>;
|
|
809
908
|
protected discard(row: PendingRow): Promise<void>;
|
|
810
909
|
protected discardAll(): Promise<void>;
|
package/types/forgeroute-ui.d.ts
CHANGED
|
@@ -2035,6 +2035,17 @@ export declare const UI_DEFAULT_LABELS: {
|
|
|
2035
2035
|
readonly 'dataTable.deleteConfirm': "Delete this record? This cannot be undone.";
|
|
2036
2036
|
readonly 'dataTable.deleteFailed': "Failed to delete. Please try again.";
|
|
2037
2037
|
readonly 'dataTable.genericError': "Something went wrong. Please try again.";
|
|
2038
|
+
readonly 'dataTable.loadError.offline': "You're offline, so your {{ items }} can't be shown. Reconnect to the internet and try again.";
|
|
2039
|
+
readonly 'dataTable.loadError.noCopy': "You're offline, so your {{ items }} can't be shown. There is no saved copy of this view on this device. Reconnect to the internet and try again.";
|
|
2040
|
+
readonly 'dataTable.loadError.unreachable': "Your {{ items }} can't load because the app can't reach the server. Your internet may be down or the server may be having a problem. Check your connection and try again.";
|
|
2041
|
+
readonly 'dataTable.loadError.timeout': "Your {{ items }} are taking too long to load. Your connection may be slow. Wait a moment and try again.";
|
|
2042
|
+
readonly 'dataTable.loadError.session': "Your session has ended, so your {{ items }} can't load. Sign in again to continue.";
|
|
2043
|
+
readonly 'dataTable.loadError.forbidden': "You don't have permission to view {{ items }}. Ask an administrator for access.";
|
|
2044
|
+
readonly 'dataTable.loadError.server': "The server had a problem loading your {{ items }}. This is usually temporary. Try again in a few minutes.";
|
|
2045
|
+
readonly 'dataTable.loadError.other': "Your {{ items }} couldn't be loaded. Try again, and contact support if it keeps happening.";
|
|
2046
|
+
readonly 'dataTable.actionError.offline': "You're offline, so this change wasn't made. Reconnect to the internet and try again.";
|
|
2047
|
+
readonly 'dataTable.actionError.unreachable': "This change wasn't made because the app can't reach the server. Check your connection and try again.";
|
|
2048
|
+
readonly 'dataTable.actionError.timeout': "This is taking too long, and the change may not have been saved. Check the list before you try again.";
|
|
2038
2049
|
readonly 'dataTable.noneDeletable': "None of the selected rows can be deleted.";
|
|
2039
2050
|
readonly 'dataTable.whatWillHappen': "What will happen";
|
|
2040
2051
|
readonly 'dataTable.never': "Never";
|
|
@@ -2171,6 +2182,21 @@ export declare const UI_DEFAULT_LABELS: {
|
|
|
2171
2182
|
readonly 'connection.result.syncStarted': "Sending your saved changes…";
|
|
2172
2183
|
readonly 'connection.result.discarded': "Discarded \"{{ label }}\".";
|
|
2173
2184
|
readonly 'connection.result.discardedAll': "Discarded all saved changes.";
|
|
2185
|
+
readonly 'connection.conflict.rowText': "This was changed by someone else after you saved it offline, so your change was not applied.";
|
|
2186
|
+
readonly 'connection.conflict.keepMine': "Keep my version";
|
|
2187
|
+
readonly 'connection.conflict.keepMineNamed': "Keep my version of {{ label }}";
|
|
2188
|
+
readonly 'connection.conflict.discard': "Discard my change";
|
|
2189
|
+
readonly 'connection.conflict.discardNamed': "Discard my change: {{ label }}";
|
|
2190
|
+
readonly 'connection.conflict.confirmTitle': "Keep my version?";
|
|
2191
|
+
readonly 'connection.conflict.confirmMessage': "Replace the newer version? Your change will overwrite what someone else saved. The other version is lost.";
|
|
2192
|
+
readonly 'connection.conflict.result.keeping': "Sending your version of \"{{ label }}\"…";
|
|
2193
|
+
readonly 'connection.conflict.error.disabled': "Keep my version is not turned on for this app.";
|
|
2194
|
+
readonly 'connection.conflict.error.notFound': "This saved change no longer exists.";
|
|
2195
|
+
readonly 'connection.conflict.error.notConflict': "This change is not waiting for your decision.";
|
|
2196
|
+
readonly 'connection.conflict.error.noStamp': "There is nothing to overwrite for this change.";
|
|
2197
|
+
readonly 'connection.conflict.result.sent': "Your version of \"{{ label }}\" was sent.";
|
|
2198
|
+
readonly 'connection.conflict.result.shortly': "Your version of \"{{ label }}\" will be sent shortly.";
|
|
2199
|
+
readonly 'connection.conflict.error.unknown': "Your version could not be sent yet. Your change is still saved on this device.";
|
|
2174
2200
|
readonly 'common.example': "e.g. {{ value }}";
|
|
2175
2201
|
readonly 'format.durationMinSec': "{{ m }}m {{ s }}s";
|
|
2176
2202
|
readonly 'format.durationSec': "{{ s }}s";
|
|
@@ -5396,7 +5422,7 @@ export declare class CheckboxComponent implements ControlValueAccessor, Validato
|
|
|
5396
5422
|
* clicking it still toggles the box - e.g. a product name that is both the heading of its card and the label of its checkbox.
|
|
5397
5423
|
* Default null: plain label text, exactly as before. Single mode only.
|
|
5398
5424
|
*/
|
|
5399
|
-
readonly headingLevel: import("@angular/core").InputSignal<
|
|
5425
|
+
readonly headingLevel: import("@angular/core").InputSignal<1 | 2 | 3 | 4 | 5 | 6 | null>;
|
|
5400
5426
|
readonly indeterminate: import("@angular/core").InputSignal<boolean>;
|
|
5401
5427
|
readonly checked: import("@angular/core").ModelSignal<boolean>;
|
|
5402
5428
|
/**
|
|
@@ -6371,7 +6397,7 @@ export declare class PhoneNumberPickerComponent {
|
|
|
6371
6397
|
protected readonly modeCtl: FormControl<string>;
|
|
6372
6398
|
protected readonly zipCtl: FormControl<string>;
|
|
6373
6399
|
protected readonly areaCtl: FormControl<string>;
|
|
6374
|
-
protected readonly step: import("@angular/core").WritableSignal<
|
|
6400
|
+
protected readonly step: import("@angular/core").WritableSignal<1 | 2 | 3>;
|
|
6375
6401
|
protected readonly mode: import("@angular/core").WritableSignal<PhoneNumberSearchMode>;
|
|
6376
6402
|
private readonly _zip;
|
|
6377
6403
|
private readonly _area;
|
|
@@ -7673,7 +7699,7 @@ export declare class TextInputComponent implements ControlValueAccessor, Validat
|
|
|
7673
7699
|
* `search`, `text`, `none`). Empty (default) = the browser's default for the field, except `type="tel"`, which keeps `tel`.
|
|
7674
7700
|
* It only picks the keyboard; it does not restrict what can be typed or pasted.
|
|
7675
7701
|
*/
|
|
7676
|
-
readonly inputmode: import("@angular/core").InputSignal<"" | "
|
|
7702
|
+
readonly inputmode: import("@angular/core").InputSignal<"" | "numeric" | "decimal" | "email" | "text" | "none" | "search" | "tel" | "url">;
|
|
7677
7703
|
readonly readonly: import("@angular/core").InputSignal<boolean>;
|
|
7678
7704
|
readonly hint: import("@angular/core").InputSignal<string>;
|
|
7679
7705
|
/** Id(s) of an external element that also describes this control (e.g. one shared error text for a group of fields). Space separated; MERGED after the control's own hint / error id in `aria-describedby`, never replacing it. Empty = unchanged. */
|
|
@@ -9809,7 +9835,7 @@ export declare class FormSectionComponent {
|
|
|
9809
9835
|
}, {}, never, ["*"], true, never>;
|
|
9810
9836
|
}
|
|
9811
9837
|
export declare class FormRowComponent {
|
|
9812
|
-
readonly cols: import("@angular/core").InputSignal<
|
|
9838
|
+
readonly cols: import("@angular/core").InputSignal<1 | 2 | 3 | 4>;
|
|
9813
9839
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormRowComponent, never>;
|
|
9814
9840
|
static ɵcmp: i0.ɵɵComponentDeclaration<FormRowComponent, "ui-form-row", never, {
|
|
9815
9841
|
"cols": {
|
|
@@ -13924,7 +13950,7 @@ export declare class DetailCardComponent {
|
|
|
13924
13950
|
/** true (default) = the title is displayed in capitals (CSS only); false = shown as written. The text, aria-label and heading name are never changed. */
|
|
13925
13951
|
readonly uppercaseTitle: import("@angular/core").InputSignal<boolean>;
|
|
13926
13952
|
/** 1-6 makes the title a real heading for screen readers (role=heading, aria-level); null keeps it plain text. */
|
|
13927
|
-
readonly headingLevel: import("@angular/core").InputSignal<
|
|
13953
|
+
readonly headingLevel: import("@angular/core").InputSignal<1 | 2 | 3 | 4 | 5 | 6 | null>;
|
|
13928
13954
|
/** Optional id for the title text; the card is then labelled by it. Without it the title is the card's aria-label. */
|
|
13929
13955
|
readonly titleId: import("@angular/core").InputSignal<string>;
|
|
13930
13956
|
/** Accessible name of the card when the header gives none (no header, or no title). A visible title wins; blank = no name. */
|
|
@@ -16151,6 +16177,28 @@ export declare function downloadBlob(blob: Blob, fileName: string): void;
|
|
|
16151
16177
|
* downloads folder.
|
|
16152
16178
|
*/
|
|
16153
16179
|
export declare function fileNameFromContentDisposition(header: string | null | undefined): string;
|
|
16180
|
+
/** One cell of a CSV row: text, a number, or nothing (`null` / `undefined` become an empty cell). */
|
|
16181
|
+
export type CsvCell = string | number | null | undefined;
|
|
16182
|
+
/**
|
|
16183
|
+
* CSV / formula-injection guard. Excel, Sheets and Numbers run a cell that starts with = + - @ (or a tab / carriage return) as a
|
|
16184
|
+
* formula - also after leading spaces, which some spreadsheets skip - and exports carry free text (names, notes, subjects). Such a TEXT cell gets a leading apostrophe so it opens as plain text.
|
|
16185
|
+
* Numbers, and strings that are only a signed number with an optional currency symbol or percent sign (-12.50, -$12.50, +15125550177, -3%),
|
|
16186
|
+
* cannot form a formula and are left exactly as they are, so negative amounts and phone numbers keep their value.
|
|
16187
|
+
*/
|
|
16188
|
+
export declare function csvSafeText(cell: CsvCell): string;
|
|
16189
|
+
/** One CSV cell as it is written to the file: formula-guarded, and wrapped in double quotes (inner quotes doubled) when it holds a comma, quote or line break. */
|
|
16190
|
+
export declare function csvCell(cell: CsvCell): string;
|
|
16191
|
+
/** The text of a CSV file (RFC 4180): the header row, then one line per row, comma separated, `\n` line ends, no trailing line break. */
|
|
16192
|
+
export declare function toCsv(headers: readonly CsvCell[], rows: readonly (readonly CsvCell[])[]): string;
|
|
16193
|
+
export interface DownloadCsvOptions {
|
|
16194
|
+
/** Start the file with a UTF-8 byte order mark so Excel reads accents correctly (default `false`). */
|
|
16195
|
+
bom?: boolean;
|
|
16196
|
+
}
|
|
16197
|
+
/**
|
|
16198
|
+
* Builds a CSV file from `headers` and `rows` (see {@link toCsv}) and starts its download as `fileName`
|
|
16199
|
+
* (`.csv` is added when the name has no extension of that kind). Uses {@link downloadBlob}, so it works in Firefox and Safari.
|
|
16200
|
+
*/
|
|
16201
|
+
export declare function downloadCsv(fileName: string, headers: readonly CsvCell[], rows: readonly (readonly CsvCell[])[], options?: DownloadCsvOptions): void;
|
|
16154
16202
|
/**
|
|
16155
16203
|
* Builds a universal maps URL that opens turn-by-turn navigation.
|
|
16156
16204
|
*
|