@forgeroute/ui 0.4.83 → 0.4.84
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 +179 -22
- package/fesm2022/forgeroute-ui-offline.mjs.map +1 -1
- package/fesm2022/{forgeroute-ui-ui-labels.es-DPY2FHcg.mjs → forgeroute-ui-ui-labels.es-CujY_jus.mjs} +13 -1
- package/fesm2022/{forgeroute-ui-ui-labels.es-DPY2FHcg.mjs.map → forgeroute-ui-ui-labels.es-CujY_jus.mjs.map} +1 -1
- package/fesm2022/forgeroute-ui.mjs +327 -131
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-messaging.d.ts +1 -1
- package/types/forgeroute-ui-offline.d.ts +25 -3
- package/types/forgeroute-ui-stripe.d.ts +1 -1
- package/types/forgeroute-ui.d.ts +119 -25
package/package.json
CHANGED
|
@@ -619,7 +619,7 @@ export declare class DocumentSendOptionsComponent implements UiFieldValidity {
|
|
|
619
619
|
/** Roles of documents whose row had no `signerRoles` and that the host resolves (`signers().resolveRoles`). */
|
|
620
620
|
readonly roleStates: import("@angular/core").WritableSignal<Record<string, RoleState>>;
|
|
621
621
|
/** The envelope's documents: `loading` / `error` while the panel reads them (`loadDocuments`), `ready` once known. */
|
|
622
|
-
readonly envelopeStatus: import("@angular/core").WritableSignal<"
|
|
622
|
+
readonly envelopeStatus: import("@angular/core").WritableSignal<"error" | "loading" | "ready" | "idle">;
|
|
623
623
|
private envelopeSub;
|
|
624
624
|
private readonly roleSubs;
|
|
625
625
|
/** The sender opened the collapsed "Signing options" line. */
|
|
@@ -2,7 +2,7 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
import { EnvironmentProviders, InjectionToken } from "@angular/core";
|
|
3
3
|
import { Subject } from "rxjs";
|
|
4
4
|
import { HttpContextToken, HttpInterceptorFn } from "@angular/common/http";
|
|
5
|
-
import { UiLabelsService } from "@forgeroute/ui";
|
|
5
|
+
import { QueuedNote, UiLabelsService, UiNotesQueue } from "@forgeroute/ui";
|
|
6
6
|
export type MutationStatus = 'pending' | 'syncing' | 'failed' | 'conflict';
|
|
7
7
|
export type MutationErrorKind = 'conflict' | 'rejected' | 'auth' | 'server' | 'network' | 'timeout' | 'dependency';
|
|
8
8
|
export interface MutationError {
|
|
@@ -541,8 +541,8 @@ export declare class OfflineReplayer {
|
|
|
541
541
|
keepMineOne(id: string): Promise<KeepMineRun>;
|
|
542
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
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. */
|
|
545
|
-
discard(id: string): Promise<
|
|
544
|
+
/** Deletes one row of the signed-in user (the user chose to discard it). Resolves `true` when this call found and deleted the row, `false` when it was already gone (e.g. delivered meanwhile) or is not the user's. 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. */
|
|
545
|
+
discard(id: string): Promise<boolean>;
|
|
546
546
|
private readonly discardDrains;
|
|
547
547
|
/** Resolves when EVERY drain started by a `discard` (also overlapping ones) has finished; immediately when none is running. Never rejects. */
|
|
548
548
|
drainSettled(): Promise<void>;
|
|
@@ -736,6 +736,13 @@ export declare class OfflineSupportService {
|
|
|
736
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
737
|
*/
|
|
738
738
|
keepMine(id: string): Promise<KeepMineOutcome>;
|
|
739
|
+
/** Rows the USER discarded (id -> when), set before the row is deleted so a reader that sees the row leave can tell a discard from a delivery. */
|
|
740
|
+
private readonly discardedIds;
|
|
741
|
+
/** A discard mark only matters while its row leaves the list; it expires after this many ms (and the map is emptied when it grows past 500). */
|
|
742
|
+
private static readonly DISCARD_MARK_MS;
|
|
743
|
+
/** True when the row with this id left the list because the user discarded it (not because it was delivered). */
|
|
744
|
+
wasDiscarded(id: string): boolean;
|
|
745
|
+
private markDiscarded;
|
|
739
746
|
discard(id: string): Promise<void>;
|
|
740
747
|
discardAll(): Promise<void>;
|
|
741
748
|
/**
|
|
@@ -780,6 +787,21 @@ export declare class OfflineSupportService {
|
|
|
780
787
|
* `provideHttpClient(withInterceptors([..., ...offlineHttpInterceptors]))`.
|
|
781
788
|
*/
|
|
782
789
|
export declare function provideOfflineSupport(config: OfflineSupportConfig): EnvironmentProviders;
|
|
790
|
+
/**
|
|
791
|
+
* Lets `ui-notes` show the note changes the offline layer has saved on the device. It reads `OfflineSupportService.rows` (the offline layer's own
|
|
792
|
+
* list - nothing is copied or cached here) and keeps the rows whose URL belongs to the notes list asked for. Provided as `UI_NOTES_QUEUE` by
|
|
793
|
+
* `provideOfflineSupport`; the app still decides whether notes may be queued at all (its `allowQueue` rules / `blockOffline`).
|
|
794
|
+
*/
|
|
795
|
+
export declare class OfflineNotesQueue implements UiNotesQueue {
|
|
796
|
+
private readonly support;
|
|
797
|
+
private readonly connection;
|
|
798
|
+
readonly offline: import("@angular/core").Signal<boolean>;
|
|
799
|
+
wasDiscarded(rowId: string): boolean;
|
|
800
|
+
queuedFor(listPath: string, itemPrefix: string): readonly QueuedNote[];
|
|
801
|
+
private toQueued;
|
|
802
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OfflineNotesQueue, never>;
|
|
803
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
804
|
+
}
|
|
783
805
|
/** How long the green "All changes synced" bar stays after a sync. */
|
|
784
806
|
export declare const SYNCED_FLASH_MS = 3000;
|
|
785
807
|
export type ConnectionBannerKind = 'auth' | 'offline' | 'unreachable' | 'syncing' | 'attention' | 'slow' | 'synced';
|
|
@@ -1314,7 +1314,7 @@ export declare class StripeConnectComponent {
|
|
|
1314
1314
|
readonly navigateTab: import("@angular/core").InputSignal<((url: string) => void) | null>;
|
|
1315
1315
|
protected readonly visible: import("@angular/core").Signal<boolean>;
|
|
1316
1316
|
/** Which screen the card shows. */
|
|
1317
|
-
protected readonly state: import("@angular/core").Signal<"
|
|
1317
|
+
protected readonly state: import("@angular/core").Signal<"complete" | "none" | "verifying" | "incomplete">;
|
|
1318
1318
|
/** What the persistent status region says: the current state, plus "Loading." while a request runs. Empty while nothing is shown. */
|
|
1319
1319
|
protected readonly liveText: import("@angular/core").Signal<string>;
|
|
1320
1320
|
/** The user pressed a button that started a request: when the screen then changes, focus moves to the new screen (the pressed button is gone). */
|
package/types/forgeroute-ui.d.ts
CHANGED
|
@@ -1792,6 +1792,18 @@ export declare const UI_DEFAULT_LABELS: {
|
|
|
1792
1792
|
readonly 'messagingSendMessagePanel.enterValue': "Enter {{ name }}...";
|
|
1793
1793
|
readonly 'messagingTemplatePicker.custom': "Custom";
|
|
1794
1794
|
readonly 'messagingTemplatePicker.system': "System";
|
|
1795
|
+
readonly 'notes.queued.waiting': "Waiting to send";
|
|
1796
|
+
readonly 'notes.queued.sending': "Sending…";
|
|
1797
|
+
readonly 'notes.queued.deleteWaiting': "Waiting to delete";
|
|
1798
|
+
readonly 'notes.queued.deleteSending': "Deleting…";
|
|
1799
|
+
readonly 'notes.queued.failed': "Not sent. This change needs your attention.";
|
|
1800
|
+
readonly 'notes.queued.conflict': "Not sent. Someone else changed this note.";
|
|
1801
|
+
readonly 'notes.queued.addedAnnounce': "Note saved on this device. Waiting to send.";
|
|
1802
|
+
readonly 'notes.queued.editedAnnounce': "Note change saved on this device. Waiting to send.";
|
|
1803
|
+
readonly 'notes.queued.deletedAnnounce': "Note deletion saved on this device. Waiting to send.";
|
|
1804
|
+
readonly 'notes.queued.problemAnnounce': "A note change could not be sent.";
|
|
1805
|
+
readonly 'notes.queued.offlineSome': "You're offline, so only the notes saved on this device are shown here.";
|
|
1806
|
+
readonly 'notes.queued.offlineNone': "You're offline, so the notes can't be loaded right now. A note you add is saved on this device and sent when you're back online.";
|
|
1795
1807
|
readonly 'notes.you': "You";
|
|
1796
1808
|
readonly 'passwordRequirements.met': "met";
|
|
1797
1809
|
readonly 'passwordRequirements.notMet': "not met";
|
|
@@ -2975,7 +2987,7 @@ export declare class SelectComponent implements ControlValueAccessor, Validator,
|
|
|
2975
2987
|
readonly error: import("@angular/core").InputSignal<string>;
|
|
2976
2988
|
/** Reveal the built-in error messages now (e.g. after a failed Save click), without waiting for blur. */
|
|
2977
2989
|
readonly showErrors: import("@angular/core").InputSignal<boolean>;
|
|
2978
|
-
readonly size: import("@angular/core").InputSignal<"
|
|
2990
|
+
readonly size: import("@angular/core").InputSignal<"sm" | "default">;
|
|
2979
2991
|
readonly _disabledInput: import("@angular/core").InputSignal<boolean>;
|
|
2980
2992
|
private readonly _cvaDisabled;
|
|
2981
2993
|
protected readonly disabled: import("@angular/core").Signal<boolean>;
|
|
@@ -4204,7 +4216,7 @@ export declare class SidePanelComponent implements OnDestroy {
|
|
|
4204
4216
|
readonly cancelLabel: import("@angular/core").Signal<string>;
|
|
4205
4217
|
/** Right-aligned primary action button label. Empty string = hidden. */
|
|
4206
4218
|
readonly primaryLabel: import("@angular/core").InputSignal<string>;
|
|
4207
|
-
readonly primaryVariant: import("@angular/core").InputSignal<"
|
|
4219
|
+
readonly primaryVariant: import("@angular/core").InputSignal<"warning" | "primary" | "danger">;
|
|
4208
4220
|
readonly primaryLoading: import("@angular/core").InputSignal<boolean>;
|
|
4209
4221
|
readonly primaryDisabled: import("@angular/core").InputSignal<boolean>;
|
|
4210
4222
|
/** `data-testid` of the Cancel button; none when empty (default). */
|
|
@@ -4336,7 +4348,7 @@ export declare class ModalComponent implements OnInit, OnDestroy {
|
|
|
4336
4348
|
*/
|
|
4337
4349
|
readonly describedBy: import("@angular/core").InputSignal<string | null>;
|
|
4338
4350
|
readonly maxWidth: import("@angular/core").InputSignal<string>;
|
|
4339
|
-
readonly bodyOverflow: import("@angular/core").InputSignal<"
|
|
4351
|
+
readonly bodyOverflow: import("@angular/core").InputSignal<"hidden" | "visible" | "auto">;
|
|
4340
4352
|
/** `data-testid` of the dialog element itself (the host `<ui-modal>` is always in the page, the dialog only while open). None when empty. */
|
|
4341
4353
|
readonly dialogTestId: import("@angular/core").InputSignal<string>;
|
|
4342
4354
|
/** Hides the header X button (e.g. while a request is running). Escape and a backdrop click still close unless `closable` is false. */
|
|
@@ -5001,7 +5013,7 @@ export declare class AudioPlayerComponent {
|
|
|
5001
5013
|
/** Accessible name of the player. */
|
|
5002
5014
|
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
5003
5015
|
/** How much to load before play: 'metadata' (default), 'auto' or 'none'. */
|
|
5004
|
-
readonly preload: import("@angular/core").InputSignal<"
|
|
5016
|
+
readonly preload: import("@angular/core").InputSignal<"none" | "metadata" | "auto">;
|
|
5005
5017
|
/** Fires when the browser can't load or decode the source. */
|
|
5006
5018
|
readonly playbackError: import("@angular/core").OutputEmitterRef<void>;
|
|
5007
5019
|
protected readonly failed: import("@angular/core").WritableSignal<boolean>;
|
|
@@ -5422,7 +5434,7 @@ export declare class CheckboxComponent implements ControlValueAccessor, Validato
|
|
|
5422
5434
|
* 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.
|
|
5423
5435
|
* Default null: plain label text, exactly as before. Single mode only.
|
|
5424
5436
|
*/
|
|
5425
|
-
readonly headingLevel: import("@angular/core").InputSignal<1 | 2 |
|
|
5437
|
+
readonly headingLevel: import("@angular/core").InputSignal<1 | 2 | 5 | 3 | 4 | 6 | null>;
|
|
5426
5438
|
readonly indeterminate: import("@angular/core").InputSignal<boolean>;
|
|
5427
5439
|
readonly checked: import("@angular/core").ModelSignal<boolean>;
|
|
5428
5440
|
/**
|
|
@@ -5851,7 +5863,7 @@ export declare class StepperComponent {
|
|
|
5851
5863
|
* its circle, one continuous line behind the circles that fills as steps complete; a complete step shows a check, the current step an
|
|
5852
5864
|
* accent ring with a dot, an upcoming step an empty circle (no numbers). Circles are 40px (32px with `size="sm"`).
|
|
5853
5865
|
*/
|
|
5854
|
-
readonly labelPosition: import("@angular/core").InputSignal<"
|
|
5866
|
+
readonly labelPosition: import("@angular/core").InputSignal<"below" | "beside">;
|
|
5855
5867
|
/** Viewport width in px below which a horizontal stepper is drawn vertical (labels beside the circles), e.g. `640`. null (default) = never. */
|
|
5856
5868
|
readonly stackBelow: import("@angular/core").InputSignal<number | null>;
|
|
5857
5869
|
/** CSS length (e.g. `10.5rem`): horizontal only - the list gets `min-width: calc(<step count> * <value>)`. Empty (default) = no minimum. */
|
|
@@ -6513,7 +6525,7 @@ export declare class ButtonComponent {
|
|
|
6513
6525
|
* `ghost-start`: a ghost button for list / section toggles - a full-width row with its content aligned to the start, transparent
|
|
6514
6526
|
* background, hover tint and the normal focus ring. Pair it with `ariaExpanded` / `ariaPressed`; the label may contain a heading element.
|
|
6515
6527
|
*/
|
|
6516
|
-
readonly variant: import("@angular/core").InputSignal<"
|
|
6528
|
+
readonly variant: import("@angular/core").InputSignal<"warning" | "link" | "primary" | "secondary" | "danger" | "icon" | "ghost" | "ghost-start" | "tab" | "icon-danger">;
|
|
6517
6529
|
/** Renders an anchor to this route instead of a button (use with `variant="link"` for an inline text link). `['/settings']` or `'/settings'`. While `disabled` or `loading` it renders a non-clickable `<span role="link" aria-disabled>` with no href (like `href`). */
|
|
6518
6530
|
readonly routerLink: import("@angular/core").InputSignal<string | readonly unknown[] | null>;
|
|
6519
6531
|
/** Query params of the `routerLink` (e.g. `{ section: 'deal-defaults' }`). */
|
|
@@ -6534,7 +6546,7 @@ export declare class ButtonComponent {
|
|
|
6534
6546
|
*/
|
|
6535
6547
|
readonly href: import("@angular/core").InputSignal<string | null>;
|
|
6536
6548
|
/** Where to open the `href` (`_blank` = a new tab). */
|
|
6537
|
-
readonly target: import("@angular/core").InputSignal<"
|
|
6549
|
+
readonly target: import("@angular/core").InputSignal<"_blank" | "_self" | "_parent" | "_top" | null>;
|
|
6538
6550
|
/** `rel` of the `href` link. A `_blank` target always gets `noopener noreferrer` added. */
|
|
6539
6551
|
readonly rel: import("@angular/core").InputSignal<string | null>;
|
|
6540
6552
|
/** The href when it is allowed (http, https, mailto, tel, sms or a relative URL), else null. */
|
|
@@ -7202,7 +7214,7 @@ export declare class ImportSourceGridComponent {
|
|
|
7202
7214
|
/** The `value` of the picked source (highlighted). `tile` only: the `card` appearance does not keep a selection. */
|
|
7203
7215
|
readonly selected: import("@angular/core").InputSignal<string>;
|
|
7204
7216
|
/** `tile`: the compact buttons of the import window. `card`: one `ui-detail-card` per source with its own select button (used on a page). */
|
|
7205
|
-
readonly appearance: import("@angular/core").InputSignal<"
|
|
7217
|
+
readonly appearance: import("@angular/core").InputSignal<"tile" | "card">;
|
|
7206
7218
|
/** `card`: disables every card's button (for example while the page is saving). */
|
|
7207
7219
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
7208
7220
|
/** `card`: the text of each card's button. */
|
|
@@ -7690,7 +7702,7 @@ export declare class TextInputComponent implements ControlValueAccessor, Validat
|
|
|
7690
7702
|
readonly passwordRequirements: import("@angular/core").InputSignal<boolean>;
|
|
7691
7703
|
/** Rules for `passwordRequirements`; default = the library's five rules (8+ characters, upper, lower, digit, special). */
|
|
7692
7704
|
readonly passwordRules: import("@angular/core").InputSignal<readonly PasswordRule[] | undefined>;
|
|
7693
|
-
readonly type: import("@angular/core").InputSignal<"number" | "email" | "text" | "
|
|
7705
|
+
readonly type: import("@angular/core").InputSignal<"number" | "email" | "text" | "password" | "tel" | "url">;
|
|
7694
7706
|
readonly maxlength: import("@angular/core").InputSignal<number | undefined>;
|
|
7695
7707
|
readonly required: import("@angular/core").InputSignal<boolean>;
|
|
7696
7708
|
readonly autocomplete: import("@angular/core").InputSignal<string>;
|
|
@@ -7699,7 +7711,7 @@ export declare class TextInputComponent implements ControlValueAccessor, Validat
|
|
|
7699
7711
|
* `search`, `text`, `none`). Empty (default) = the browser's default for the field, except `type="tel"`, which keeps `tel`.
|
|
7700
7712
|
* It only picks the keyboard; it does not restrict what can be typed or pasted.
|
|
7701
7713
|
*/
|
|
7702
|
-
readonly inputmode: import("@angular/core").InputSignal<"" | "
|
|
7714
|
+
readonly inputmode: import("@angular/core").InputSignal<"" | "email" | "text" | "none" | "search" | "tel" | "url" | "decimal" | "numeric">;
|
|
7703
7715
|
readonly readonly: import("@angular/core").InputSignal<boolean>;
|
|
7704
7716
|
readonly hint: import("@angular/core").InputSignal<string>;
|
|
7705
7717
|
/** 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. */
|
|
@@ -7771,7 +7783,7 @@ export declare class TextInputComponent implements ControlValueAccessor, Validat
|
|
|
7771
7783
|
protected readonly _stepAttr: import("@angular/core").Signal<string | null>;
|
|
7772
7784
|
protected readonly _revealable: import("@angular/core").Signal<boolean>;
|
|
7773
7785
|
protected readonly _shown: import("@angular/core").WritableSignal<boolean>;
|
|
7774
|
-
protected readonly _inputType: import("@angular/core").Signal<"number" | "email" | "text" | "
|
|
7786
|
+
protected readonly _inputType: import("@angular/core").Signal<"number" | "email" | "text" | "password" | "tel" | "url">;
|
|
7775
7787
|
protected readonly _eyePath: string;
|
|
7776
7788
|
protected readonly _eyeOffPath: string;
|
|
7777
7789
|
protected readonly _showRequirements: import("@angular/core").Signal<boolean>;
|
|
@@ -8722,7 +8734,7 @@ export declare class CopyFieldComponent implements OnDestroy {
|
|
|
8722
8734
|
/** Neither the Clipboard API nor the fallback could copy. */
|
|
8723
8735
|
readonly copyFailed: import("@angular/core").OutputEmitterRef<void>;
|
|
8724
8736
|
protected readonly _id: string;
|
|
8725
|
-
protected readonly _state: import("@angular/core").WritableSignal<"
|
|
8737
|
+
protected readonly _state: import("@angular/core").WritableSignal<"failed" | "idle" | "copied">;
|
|
8726
8738
|
protected readonly _announcement: import("@angular/core").Signal<string>;
|
|
8727
8739
|
protected readonly _buttonName: import("@angular/core").Signal<string>;
|
|
8728
8740
|
protected readonly _describedBy: import("@angular/core").Signal<string | null>;
|
|
@@ -9932,7 +9944,7 @@ export type ListItemIconColor = 'slate' | 'amber' | 'red' | 'blue' | 'green' | '
|
|
|
9932
9944
|
export declare class ListItemComponent implements AfterContentChecked {
|
|
9933
9945
|
private readonly host;
|
|
9934
9946
|
/** Show a radio button, checkbox, or nothing on the left. */
|
|
9935
|
-
readonly leading: import("@angular/core").InputSignal<"none" | "
|
|
9947
|
+
readonly leading: import("@angular/core").InputSignal<"none" | "radio" | "checkbox">;
|
|
9936
9948
|
/** `name` attribute for the radio/checkbox (groups radios together). */
|
|
9937
9949
|
readonly inputName: import("@angular/core").InputSignal<string>;
|
|
9938
9950
|
/** `id` attribute for the radio/checkbox (links the label). */
|
|
@@ -10296,6 +10308,44 @@ export declare class CardListItemComponent {
|
|
|
10296
10308
|
"action": "action";
|
|
10297
10309
|
}, never, ["[card-list-inline]", "[card-list-action]", "*", "[card-stats]", "[card-detail]"], true, never>;
|
|
10298
10310
|
}
|
|
10311
|
+
/** Where a note change saved on the device is in the offline layer. */
|
|
10312
|
+
export type QueuedNoteState = 'waiting' | 'sending' | 'failed' | 'conflict';
|
|
10313
|
+
/** One note change that was saved while offline and has not been delivered yet. */
|
|
10314
|
+
export interface QueuedNote {
|
|
10315
|
+
/** The id of the saved change (the offline layer's row), unique per change. */
|
|
10316
|
+
rowId: string;
|
|
10317
|
+
/** `add` = a new note, `edit` = new text for the note `noteId`, `delete` = the note `noteId` is to be deleted. */
|
|
10318
|
+
kind: 'add' | 'edit' | 'delete';
|
|
10319
|
+
/** The note an `edit` / `delete` is about; empty for an `add`. */
|
|
10320
|
+
noteId: string;
|
|
10321
|
+
/** The text of an `add` / `edit` (already trimmed, as it will be sent); empty for a `delete`. */
|
|
10322
|
+
text: string;
|
|
10323
|
+
/** When the change was saved on the device (ms since the epoch). */
|
|
10324
|
+
createdAt: number;
|
|
10325
|
+
state: QueuedNoteState;
|
|
10326
|
+
}
|
|
10327
|
+
/**
|
|
10328
|
+
* The small contract between `ui-notes` and an offline layer (the `@forgeroute/ui/offline` entry point provides it). It is optional: when nothing
|
|
10329
|
+
* provides `UI_NOTES_QUEUE`, `ui-notes` behaves exactly as it always did. It holds no data of its own: `queuedFor` reads the offline layer's own
|
|
10330
|
+
* saved-change list (a signal), so calling it inside a `computed` / template stays reactive.
|
|
10331
|
+
*/
|
|
10332
|
+
export interface UiNotesQueue {
|
|
10333
|
+
/**
|
|
10334
|
+
* The saved changes that belong to one notes list, oldest first. `listPath` is the list URL (`<base>/notes/contact/5` or `<base><basePath>`;
|
|
10335
|
+
* an `add` is a POST to exactly this path) and `itemPrefix` the URL of a single note up to its id (`<base>/notes/` or `<base><basePath>/`; an
|
|
10336
|
+
* `edit` is a PUT and a `delete` a DELETE to `<itemPrefix><noteId>`). Origin and query are ignored when comparing.
|
|
10337
|
+
*/
|
|
10338
|
+
queuedFor(listPath: string, itemPrefix: string): readonly QueuedNote[];
|
|
10339
|
+
/** True while the browser is offline or the server cannot be reached: a failed load is then expected and shows no error toast. */
|
|
10340
|
+
readonly offline: () => boolean;
|
|
10341
|
+
/**
|
|
10342
|
+
* True when the saved change left the list because the USER discarded it. Any other departure (the change was delivered, or the session ended) makes
|
|
10343
|
+
* `ui-notes` reload the list and keep showing that change until the answer arrives, so a delivered note never flashes away or shows stale text.
|
|
10344
|
+
*/
|
|
10345
|
+
wasDiscarded(rowId: string): boolean;
|
|
10346
|
+
}
|
|
10347
|
+
/** Optional provider of queued notes. Provided automatically by `provideOfflineSupport` from `@forgeroute/ui/offline`; absent = `ui-notes` is unchanged. */
|
|
10348
|
+
export declare const UI_NOTES_QUEUE: InjectionToken<UiNotesQueue>;
|
|
10299
10349
|
/** A note as the notes API returns it. */
|
|
10300
10350
|
export interface NoteItem {
|
|
10301
10351
|
id: string;
|
|
@@ -10304,6 +10354,13 @@ export interface NoteItem {
|
|
|
10304
10354
|
createdAt: string;
|
|
10305
10355
|
updatedAt: string;
|
|
10306
10356
|
}
|
|
10357
|
+
/** A note as listed: a server note, or one saved on the device (`queued`) that the server does not have yet / has a pending change for. */
|
|
10358
|
+
interface NoteView extends NoteItem {
|
|
10359
|
+
queued?: {
|
|
10360
|
+
kind: QueuedNote['kind'];
|
|
10361
|
+
state: QueuedNote['state'];
|
|
10362
|
+
};
|
|
10363
|
+
}
|
|
10307
10364
|
/**
|
|
10308
10365
|
* Longest note body, in characters, counted AFTER trimming. Matches the backend `NoteController` cap (10000 after trim; the server trims first,
|
|
10309
10366
|
* so leading / trailing spaces never count). The add box and the edit box block Add Note / Save above it and show "Too long (max 10000 characters).".
|
|
@@ -10326,6 +10383,11 @@ export declare const NOTES_MAX_LENGTH = 10000;
|
|
|
10326
10383
|
* A note may hold at most `NOTES_MAX_LENGTH` (10000) characters after trimming; longer text (typed or pasted) shows the field's
|
|
10327
10384
|
* "Too long" message at once and Add Note / Save stay disabled, so no request is sent.
|
|
10328
10385
|
* Pagination is the library `ui-pagination` (shown only above one page). Cmd/Ctrl+Enter in the add box adds the note.
|
|
10386
|
+
*
|
|
10387
|
+
* Offline (optional): when an offline layer provides `UI_NOTES_QUEUE` (`provideOfflineSupport` from `@forgeroute/ui/offline` does), a note added, edited
|
|
10388
|
+
* or deleted while offline is shown at once with "Waiting to send" (text in the card, announced in a live region), replaced by the real note after the
|
|
10389
|
+
* layer delivered it, and marked "Not sent" when the change failed or conflicted (it disappears if the user discards it). A note that is waiting has no
|
|
10390
|
+
* edit / delete icons. Without a provider nothing of this exists. See `docs/notes-offline.md`.
|
|
10329
10391
|
*/
|
|
10330
10392
|
export declare class NotesComponent {
|
|
10331
10393
|
protected readonly labels: UiLabelsService;
|
|
@@ -10363,6 +10425,22 @@ export declare class NotesComponent {
|
|
|
10363
10425
|
readonly totalElements: import("@angular/core").WritableSignal<number>;
|
|
10364
10426
|
readonly editingId: import("@angular/core").WritableSignal<string | null>;
|
|
10365
10427
|
readonly deletingId: import("@angular/core").WritableSignal<string | null>;
|
|
10428
|
+
/** Optional offline layer (see `UI_NOTES_QUEUE`). Absent = every queue-related behaviour below is off. */
|
|
10429
|
+
protected readonly queue: import("@forgeroute/ui").UiNotesQueue | null;
|
|
10430
|
+
protected readonly announcement: import("@angular/core").WritableSignal<string>;
|
|
10431
|
+
/** Saved changes that just left the queue (delivered) and are still shown until the reload that fetches the real data has answered. Each knows its list. */
|
|
10432
|
+
private readonly settling;
|
|
10433
|
+
/** Overlay clean-ups waiting for the NEWEST load to answer (an older, superseded load never runs them). */
|
|
10434
|
+
private afters;
|
|
10435
|
+
/** Number of the newest load; an answer from an older load is ignored. */
|
|
10436
|
+
private loadSeq;
|
|
10437
|
+
/** True when the last load failed while the offline layer says we are offline (the list then shows only what is saved on this device). */
|
|
10438
|
+
readonly offlineLoadFailed: import("@angular/core").WritableSignal<boolean>;
|
|
10439
|
+
/**
|
|
10440
|
+
* What the list shows: with an offline layer, notes saved on this device are shown right away - new notes first on page 1 (newest first, like the
|
|
10441
|
+
* server's order), and a note with a saved edit / delete keeps its place, marked as waiting. Without one it is exactly `notes()`.
|
|
10442
|
+
*/
|
|
10443
|
+
readonly shown: import("@angular/core").Signal<NoteView[]>;
|
|
10366
10444
|
newBody: string;
|
|
10367
10445
|
editBody: string;
|
|
10368
10446
|
/** Up to two initials of the author's name for the avatar ("Ana Lopez" -> "AL"); "Y" for the current user's own unnamed notes. */
|
|
@@ -10373,13 +10451,29 @@ export declare class NotesComponent {
|
|
|
10373
10451
|
protected validBody(text: string): boolean;
|
|
10374
10452
|
private get listUrl();
|
|
10375
10453
|
private noteUrl;
|
|
10454
|
+
/** The URL of one note up to its id (`.../notes/` or `<basePath>/`). */
|
|
10455
|
+
private get itemPrefix();
|
|
10376
10456
|
private get ready();
|
|
10377
10457
|
/** Request body for create / update: `{ content }` for a `basePath` API, `{ body }` for the generic one. */
|
|
10378
10458
|
private payload;
|
|
10379
10459
|
/** Accepts `body` or `content` as the text and a missing `updatedAt`. */
|
|
10380
10460
|
private normalize;
|
|
10381
10461
|
constructor();
|
|
10382
|
-
|
|
10462
|
+
/** The label under a queued note: what is waiting and why it may be stuck (text, not colour alone). */
|
|
10463
|
+
protected queuedText(q: {
|
|
10464
|
+
kind: QueuedNote['kind'];
|
|
10465
|
+
state: QueuedNote['state'];
|
|
10466
|
+
}): string;
|
|
10467
|
+
/** Says it in the live region; clears first so the same words twice in a row are read twice. */
|
|
10468
|
+
private announce;
|
|
10469
|
+
/** True when the answer is the offline layer's "saved on this device" reply (and an offline layer is present). */
|
|
10470
|
+
private savedOffline;
|
|
10471
|
+
/**
|
|
10472
|
+
* Loads one page. Only the NEWEST load's answer is applied (an older answer arriving late is ignored, so stale data never overwrites newer data and
|
|
10473
|
+
* `loading` stays true until the latest answer). `after` (overlay clean-up of delivered changes) runs when the newest load has answered - also when
|
|
10474
|
+
* a later load superseded the one it was given to, so the overlay drops in the same render the replacing data arrives.
|
|
10475
|
+
*/
|
|
10476
|
+
loadPage(p: number, after?: () => void): void;
|
|
10383
10477
|
addNote(): void;
|
|
10384
10478
|
startEdit(note: NoteItem): void;
|
|
10385
10479
|
cancelEdit(): void;
|
|
@@ -11086,9 +11180,9 @@ export declare class ChipGroupComponent {
|
|
|
11086
11180
|
readonly spaceAbove: import("@angular/core").InputSignal<"none" | "sm" | "md">;
|
|
11087
11181
|
/** Space below the chip group. */
|
|
11088
11182
|
readonly spaceBelow: import("@angular/core").InputSignal<"none" | "sm" | "md">;
|
|
11089
|
-
protected readonly _gap: import("@angular/core").Signal<"
|
|
11090
|
-
protected readonly _spaceAbove: import("@angular/core").Signal<"0" | "
|
|
11091
|
-
protected readonly _spaceBelow: import("@angular/core").Signal<"0" | "
|
|
11183
|
+
protected readonly _gap: import("@angular/core").Signal<"8px" | "12px" | "6px">;
|
|
11184
|
+
protected readonly _spaceAbove: import("@angular/core").Signal<"0" | "12px" | "6px">;
|
|
11185
|
+
protected readonly _spaceBelow: import("@angular/core").Signal<"0" | "12px" | "6px">;
|
|
11092
11186
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChipGroupComponent, never>;
|
|
11093
11187
|
static ɵcmp: i0.ɵɵComponentDeclaration<ChipGroupComponent, "ui-chip-group", never, {
|
|
11094
11188
|
"gap": {
|
|
@@ -11507,7 +11601,7 @@ export declare class IconComponent {
|
|
|
11507
11601
|
readonly ariaLabel: import("@angular/core").InputSignal<string>;
|
|
11508
11602
|
/** Icon size in px. */
|
|
11509
11603
|
readonly size: import("@angular/core").InputSignal<number>;
|
|
11510
|
-
readonly variant: import("@angular/core").InputSignal<"
|
|
11604
|
+
readonly variant: import("@angular/core").InputSignal<"danger" | "default">;
|
|
11511
11605
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
11512
11606
|
/** The host is running the request this icon started: a spinner replaces the picture and the button is disabled (no click) until it is false again. */
|
|
11513
11607
|
readonly loading: import("@angular/core").InputSignal<boolean>;
|
|
@@ -11961,7 +12055,7 @@ export declare class AddressInputComponent implements ControlValueAccessor, Vali
|
|
|
11961
12055
|
* the object. `valueChange` always emits the object. A written string is read with `parseAddressValue` for display only: the control keeps
|
|
11962
12056
|
* the original text until the user edits a field (so a text the parser cannot split is not rewritten on load).
|
|
11963
12057
|
*/
|
|
11964
|
-
readonly valueFormat: import("@angular/core").InputSignal<"object" | "
|
|
12058
|
+
readonly valueFormat: import("@angular/core").InputSignal<"object" | "text" | "auto">;
|
|
11965
12059
|
/** ZIP rule; the default is the US 5 digits / 5+4 rule. `null` accepts any non-empty ZIP. The ZIP is validated and stored trimmed. */
|
|
11966
12060
|
readonly zipPattern: import("@angular/core").InputSignal<RegExp | null>;
|
|
11967
12061
|
/** Message shown when the ZIP breaks `zipPattern`. */
|
|
@@ -13810,7 +13904,7 @@ export declare class PdfHotspotComponent {
|
|
|
13810
13904
|
/** `ready`: clickable; `blocked`: disabled (a prerequisite is missing); `signed`: shows `image`. */
|
|
13811
13905
|
readonly state: import("@angular/core").InputSignal<"ready" | "blocked" | "signed">;
|
|
13812
13906
|
/** `warning` gives the ready state an amber look (e.g. for initials), default is blue. */
|
|
13813
|
-
readonly tone: import("@angular/core").InputSignal<"
|
|
13907
|
+
readonly tone: import("@angular/core").InputSignal<"warning" | "primary">;
|
|
13814
13908
|
/** Text of the ready button (e.g. "Sign Here"). */
|
|
13815
13909
|
readonly labelInput: import("@angular/core").InputSignal<string | null>;
|
|
13816
13910
|
readonly label: import("@angular/core").Signal<string>;
|
|
@@ -13950,7 +14044,7 @@ export declare class DetailCardComponent {
|
|
|
13950
14044
|
/** true (default) = the title is displayed in capitals (CSS only); false = shown as written. The text, aria-label and heading name are never changed. */
|
|
13951
14045
|
readonly uppercaseTitle: import("@angular/core").InputSignal<boolean>;
|
|
13952
14046
|
/** 1-6 makes the title a real heading for screen readers (role=heading, aria-level); null keeps it plain text. */
|
|
13953
|
-
readonly headingLevel: import("@angular/core").InputSignal<1 | 2 |
|
|
14047
|
+
readonly headingLevel: import("@angular/core").InputSignal<1 | 2 | 5 | 3 | 4 | 6 | null>;
|
|
13954
14048
|
/** Optional id for the title text; the card is then labelled by it. Without it the title is the card's aria-label. */
|
|
13955
14049
|
readonly titleId: import("@angular/core").InputSignal<string>;
|
|
13956
14050
|
/** Accessible name of the card when the header gives none (no header, or no title). A visible title wins; blank = no name. */
|
|
@@ -13964,7 +14058,7 @@ export declare class DetailCardComponent {
|
|
|
13964
14058
|
/** Background colour of the footer bar (the `[card-footer]` slot) as any CSS colour. Empty = no colour of its own. */
|
|
13965
14059
|
readonly footerBackground: import("@angular/core").InputSignal<string>;
|
|
13966
14060
|
/** Alignment of the `[card-footer]` content: `'start'` (default, unchanged) or `'end'` = a right-aligned action row with an 8px gap. */
|
|
13967
|
-
readonly footerAlign: import("@angular/core").InputSignal<"
|
|
14061
|
+
readonly footerAlign: import("@angular/core").InputSignal<"end" | "start">;
|
|
13968
14062
|
/** Text colour as any CSS colour (`#fff`, `var(--on-dark)` …). Empty = the default colours. Colours the title, subtitle, chevron and body text. */
|
|
13969
14063
|
readonly textColor: import("@angular/core").InputSignal<string>;
|
|
13970
14064
|
/** false = no header at all (no title, edit button, toggle or divider): the card is only the body, always open. */
|
|
@@ -16703,7 +16797,7 @@ export declare class SetupWizardComponent {
|
|
|
16703
16797
|
protected customHintId(): string;
|
|
16704
16798
|
protected readonly importBlocked: import("@angular/core").Signal<boolean>;
|
|
16705
16799
|
/** The step's own two parts (`splitLayout`) show as two tabs, one card at a time; this is the open one (it starts on the app's part on every visit). */
|
|
16706
|
-
protected readonly splitTab: import("@angular/core").WritableSignal<"
|
|
16800
|
+
protected readonly splitTab: import("@angular/core").WritableSignal<"extra" | "main">;
|
|
16707
16801
|
protected readonly splitTabs: import("@angular/core").Signal<{
|
|
16708
16802
|
key: string;
|
|
16709
16803
|
label: string;
|
|
@@ -18966,7 +19060,7 @@ export declare class PaymentSidePanelComponent {
|
|
|
18966
19060
|
private readonly terminalAvailable;
|
|
18967
19061
|
/** value -> label of every live method the rendered plugins contribute (the first plugin wins a duplicate value). */
|
|
18968
19062
|
private readonly liveMethods;
|
|
18969
|
-
protected readonly kind: import("@angular/core").Signal<"none" | "
|
|
19063
|
+
protected readonly kind: import("@angular/core").Signal<"none" | "manual" | "live" | "terminal">;
|
|
18970
19064
|
private kindOf;
|
|
18971
19065
|
/** The method list as shown: record-only built-ins (a plugin takes over its own values), plugin extras, and only manual ones while a split is being built. */
|
|
18972
19066
|
readonly methodList: import("@angular/core").Signal<PaymentMethodOption[]>;
|