@forgeroute/ui 0.5.18 → 0.5.20

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.
Files changed (35) hide show
  1. package/fesm2022/forgeroute-ui-boards.mjs +2 -2
  2. package/fesm2022/forgeroute-ui-boards.mjs.map +1 -1
  3. package/fesm2022/forgeroute-ui-chip.mjs +25 -6
  4. package/fesm2022/forgeroute-ui-chip.mjs.map +1 -1
  5. package/fesm2022/{forgeroute-ui-core-ui-labels.es-Woi3az70.mjs → forgeroute-ui-core-ui-labels.es-ChTmqFlw.mjs} +37 -10
  6. package/fesm2022/forgeroute-ui-core-ui-labels.es-ChTmqFlw.mjs.map +1 -0
  7. package/fesm2022/forgeroute-ui-core.mjs +94 -19
  8. package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
  9. package/fesm2022/forgeroute-ui-data-table-core.mjs +217 -26
  10. package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -1
  11. package/fesm2022/forgeroute-ui-messaging.mjs +19 -2
  12. package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
  13. package/fesm2022/forgeroute-ui-more-menu.mjs +61 -8
  14. package/fesm2022/forgeroute-ui-more-menu.mjs.map +1 -1
  15. package/fesm2022/forgeroute-ui-multi-select.mjs +2 -1
  16. package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -1
  17. package/fesm2022/forgeroute-ui-payments.mjs +870 -57
  18. package/fesm2022/forgeroute-ui-payments.mjs.map +1 -1
  19. package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
  20. package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
  21. package/fesm2022/forgeroute-ui-stripe.mjs +815 -49
  22. package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
  23. package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -1
  24. package/package.json +2 -6
  25. package/types/forgeroute-ui-chip.d.ts +11 -1
  26. package/types/forgeroute-ui-core.d.ts +65 -12
  27. package/types/forgeroute-ui-data-table-core.d.ts +60 -1
  28. package/types/forgeroute-ui-messaging.d.ts +15 -5
  29. package/types/forgeroute-ui-more-menu.d.ts +7 -0
  30. package/types/forgeroute-ui-payments.d.ts +332 -8
  31. package/types/forgeroute-ui-quickbooks.d.ts +2 -2
  32. package/types/forgeroute-ui-square.d.ts +1 -1
  33. package/types/forgeroute-ui-stripe.d.ts +293 -20
  34. package/types/forgeroute-ui-table-types.d.ts +29 -0
  35. package/fesm2022/forgeroute-ui-core-ui-labels.es-Woi3az70.mjs.map +0 -1
@@ -441,6 +441,21 @@ export declare class DataTableComponent<T extends Record<string, any>> implement
441
441
  }>;
442
442
  /** Emitted after a built-in single-row delete completes successfully. */
443
443
  readonly rowDeleted: import("@angular/core").OutputEmitterRef<T>;
444
+ /**
445
+ * Emitted when a row's ⋮ menu opens (table rows and phone cards), with that row. Library source 2026-11-21. The table fetches nothing: a host that needs fresh data for a row-dependent action (is this unit
446
+ * still bookable? is a reader payment still open?) reads it here and updates what `actionsFn` returns (the host's `getRowActions` cache key must include what it refreshed). Not emitted for read-only users
447
+ * who have no menu, and not again while the same menu stays open.
448
+ */
449
+ readonly rowMenuOpen: import("@angular/core").OutputEmitterRef<{
450
+ item: T;
451
+ }>;
452
+ /**
453
+ * Words an error for the user (library source 2026-11-21, additive; default `null` = every message as before). Called with the failed request's error (an `HttpErrorResponse`, or the offline layer's error)
454
+ * for: the table's load-failure message (the text replaces the "Your items couldn't be loaded..." sentence next to "Try again"), and the failure toast of a bulk action (Delete, Change <field>, a direct
455
+ * action, a file action) and of the built-in row delete. The text it returns (trimmed, not empty) is used; `null` / `undefined` / `''` (or a throw) keeps the table's own wording for that error, so a host can
456
+ * word only the errors it knows (e.g. a 409 `{ code: 'reader_busy' }` of its own backend).
457
+ */
458
+ readonly errorTextFn: import("@angular/core").InputSignal<((err: unknown) => string | null | undefined) | null>;
444
459
  /**
445
460
  * Optional drag-and-drop ordering of the rows. Off by default; when `true` (and the user has full access) every row gets a grip
446
461
  * (drag it, or focus it and use the arrow keys / Home / End; phone cards get Move up / Move down buttons). Reordering is only
@@ -733,6 +748,13 @@ export declare class DataTableComponent<T extends Record<string, any>> implement
733
748
  * skipped-rows sentence, appended on a new paragraph unless the copy sets `omitSkippedNote`.
734
749
  */
735
750
  private _hostConfirm;
751
+ /**
752
+ * The host's reasons for the rows a field change skips (`{ field, skipReason }`): one `{ row, reason }` per skipped row that cannot move to the target and got a non-empty reason.
753
+ * A row that already holds the value is not asked. A callback that throws, or a non-string / blank answer, gives no reason; the text is single-lined and capped at 300 characters.
754
+ */
755
+ private _skipReasonsFor;
756
+ /** The confirm bullets for the skip reasons: one line per distinct reason in first-seen order, "<reason> (<rows>)". */
757
+ private _skipReasonLines;
736
758
  /** Why a bulk action can't be used right now ('' = it can). Only Delete with `deletable` and a direct action with `eligible` can be blocked. */
737
759
  protected _bulkBlockedReason(def: BulkActionDef): string;
738
760
  /** A panel action is not shown while the host says it is unavailable or no selected row is eligible. Everything else is always shown. */
@@ -753,8 +775,13 @@ export declare class DataTableComponent<T extends Record<string, any>> implement
753
775
  private _runDirectAction;
754
776
  /** Direct action that returns a file: POST `{ ids }` asking for a blob, save it as one download, toast, clear the selection. */
755
777
  private _runDownloadAction;
756
- /** The `{ message }` of a failed file request: with a blob response the error body arrives as a Blob, so it is read as text first. */
778
+ /**
779
+ * The wording of a failed file request. With a blob response the error body arrives as a Blob, so it is parsed first (JSON `{ message, code, ... }`) and the host's `errorTextFn` gets the SAME shape as for any other failed request
780
+ * (`err.error.code`, `err.error.message`, ...): an `HttpErrorResponse` carrying the parsed object (the offline layer's plain errors keep their shape with `error` replaced). A body that is not JSON is passed as it came (a Blob).
781
+ */
757
782
  private _downloadErrorMessage;
783
+ /** The error with its Blob body replaced by the parsed JSON object (same error when the body is no Blob or no JSON object). */
784
+ private _parsedBlobError;
758
785
  /** Called when the user clicks a bulk action button in the selection bar. */
759
786
  protected onBulkActionClick(def: BulkActionDef): void;
760
787
  /** True while the field-change confirmation dialog is open (guards against a second Apply click). */
@@ -886,6 +913,32 @@ export declare class DataTableComponent<T extends Record<string, any>> implement
886
913
  /** Row actions visible for the current permission: everything for 'full'; otherwise only View (`type: 'view'`) and actions marked
887
914
  * `allowReadOnly` (never the built-in delete). The Actions column itself is shown only while some row has a visible action. */
888
915
  protected _rowActions(col: ColumnDef, item: T): RowAction[];
916
+ /**
917
+ * Pure derivation memo (never server data): the resolved action of one row + action type, kept weakly by the row object. The same row, the same host action object and the same resolved `disabled` /
918
+ * `disabledReason` give back the SAME object, so a host's own `_rowActionsCache` identity survives change detection and the row menu is not re-rendered for nothing.
919
+ */
920
+ private readonly _resolvedActionCache;
921
+ /** The last list returned per row + actions column: an equal list (same action objects in the same order, and none of them changed in place) is returned as the same array. */
922
+ private readonly _actionListCache;
923
+ /**
924
+ * What the row menu draws or decides from an action object, captured by value: a host that mutates an action IN PLACE (a new `label`, `icon`, `variant`) still gets a re-render, because the memo compares these values and not only the object's identity.
925
+ * (Treating a RowAction as immutable is still the recommended way; this makes the memo safe if it is not.)
926
+ */
927
+ private _actionShape;
928
+ private _sameShape;
929
+ private _stableActionList;
930
+ /**
931
+ * `disabled` and `disabledReason` given as functions are resolved here with the row (the menu has no row and calls them with `null`): `disabled: r => r.x` works.
932
+ * A function that throws counts as "not disabled" / "no reason" (never breaks rendering). A string reason and an action with no function keep the host's object untouched; the array keeps its identity when nothing needs resolving.
933
+ * A resolved action object is reused while its source object and the resolved values are unchanged (see `_resolvedActionCache`).
934
+ */
935
+ private _withResolvedReasons;
936
+ /** The host's wording of an error (`errorTextFn`), or `null` when it has none (or throws): the table then words the error itself. */
937
+ private _hostErrorText;
938
+ /** The failure text of a table action: the host's (`errorTextFn`), else the server's own message / the cause-based sentence. */
939
+ private _actionError;
940
+ /** The sentence a bulk response adds after the standard summary: its readable `message`, plus a different readable `skippedReason`. */
941
+ private _bulkServerMessage;
889
942
  protected onTableRowAction(type: string, col: ColumnDef, item: T): Promise<void>;
890
943
  private isNumericCol;
891
944
  protected resolveCellAlign(col: ColumnDef, item: T): 'left' | 'right' | 'center';
@@ -1112,6 +1165,11 @@ export declare class DataTableComponent<T extends Record<string, any>> implement
1112
1165
  "required": false;
1113
1166
  "isSignal": true;
1114
1167
  };
1168
+ "errorTextFn": {
1169
+ "alias": "errorTextFn";
1170
+ "required": false;
1171
+ "isSignal": true;
1172
+ };
1115
1173
  "reorderable": {
1116
1174
  "alias": "reorderable";
1117
1175
  "required": false;
@@ -1137,6 +1195,7 @@ export declare class DataTableComponent<T extends Record<string, any>> implement
1137
1195
  "bulkPanelClick": "bulkPanelClick";
1138
1196
  "loaded": "loaded";
1139
1197
  "rowDeleted": "rowDeleted";
1198
+ "rowMenuOpen": "rowMenuOpen";
1140
1199
  "rowReorder": "rowReorder";
1141
1200
  }, never, never, true, never>;
1142
1201
  }
@@ -122,7 +122,7 @@ export declare class TemplatePickerComponent {
122
122
  private readonly host;
123
123
  private readonly search$;
124
124
  /** Filter results to a specific channel: 'email', 'text', or omit for all. */
125
- readonly channel: import("@angular/core").InputSignal<"" | "email" | "text">;
125
+ readonly channel: import("@angular/core").InputSignal<"" | "text" | "email">;
126
126
  readonly selectedId: import("@angular/core").InputSignal<string | null>;
127
127
  readonly labelInput: import("@angular/core").InputSignal<string | null>;
128
128
  readonly label: import("@angular/core").Signal<string>;
@@ -553,7 +553,7 @@ export declare class DocumentSendOptionsComponent implements UiFieldValidity {
553
553
  /** API root from FORGEROUTE_CONFIG (e.g. a cross-origin prod API); falls back to same-origin `/api`. */
554
554
  private readonly apiBase;
555
555
  /** `email` → purpose select + attachment allowed; `text` → link only (purpose fixed to e-signature). */
556
- readonly channel: import("@angular/core").InputSignal<"email" | "text">;
556
+ readonly channel: import("@angular/core").InputSignal<"text" | "email">;
557
557
  readonly labelInput: import("@angular/core").InputSignal<string | null>;
558
558
  readonly label: import("@angular/core").Signal<string>;
559
559
  /** When true, at least one document must be chosen. The message forms leave it false: documents are optional there. */
@@ -629,7 +629,7 @@ export declare class DocumentSendOptionsComponent implements UiFieldValidity {
629
629
  /** Roles of documents whose row had no `signerRoles` and that the host resolves (`signers().resolveRoles`). */
630
630
  readonly roleStates: import("@angular/core").WritableSignal<Record<string, RoleState>>;
631
631
  /** The envelope's documents: `loading` / `error` while the panel reads them (`loadDocuments`), `ready` once known. */
632
- readonly envelopeStatus: import("@angular/core").WritableSignal<"idle" | "loading" | "ready" | "error">;
632
+ readonly envelopeStatus: import("@angular/core").WritableSignal<"error" | "loading" | "ready" | "idle">;
633
633
  private envelopeSub;
634
634
  private readonly roleSubs;
635
635
  /** The sender opened the collapsed "Signing options" line. */
@@ -2020,13 +2020,18 @@ export declare class SendMessagePanelComponent {
2020
2020
  * somebody can receive that channel; otherwise the usual default applies (email if anybody has an email, else text). null (default) = the usual default.
2021
2021
  * `textEnabled` must already be known when the panel opens for `'text'` to take effect (bind `[recipients]` after async settings loaded, or re-open).
2022
2022
  */
2023
- readonly initialChannel: import("@angular/core").InputSignal<"email" | "text" | null>;
2023
+ readonly initialChannel: import("@angular/core").InputSignal<"text" | "email" | null>;
2024
2024
  /** Bulk mode: the plural noun in "To: 12 residents" (default `recipients`, localized). */
2025
2025
  readonly recipientNoun: import("@angular/core").InputSignal<string>;
2026
2026
  /** Bulk mode: the singular noun used when exactly one is selected; empty = the plural without a trailing "s". */
2027
2027
  readonly recipientNounSingular: import("@angular/core").InputSignal<string>;
2028
2028
  /** Pass true when Twilio / SMS is enabled in the consuming app's settings. */
2029
2029
  readonly textEnabled: import("@angular/core").InputSignal<boolean>;
2030
+ /**
2031
+ * false hides the notices under "To" (why a channel is missing: "Text messaging is not enabled...", "<name> has not opted in to texts", "add a phone number...").
2032
+ * For a host that opens the panel for an email-only job (e.g. a reply on an email log), where those texts are noise. Default true = unchanged.
2033
+ */
2034
+ readonly showContactNotices: import("@angular/core").InputSignal<boolean>;
2030
2035
  /** Panel header. */
2031
2036
  readonly titleInput: import("@angular/core").InputSignal<string | null>;
2032
2037
  readonly title: import("@angular/core").Signal<string>;
@@ -2251,7 +2256,7 @@ export declare class SendMessagePanelComponent {
2251
2256
  readonly activeContact: import("@angular/core").WritableSignal<MessageContact | null>;
2252
2257
  /** What the sender should know about the picked contact before sending (why a channel is missing, what to add). */
2253
2258
  readonly contactNotices: import("@angular/core").Signal<string[]>;
2254
- readonly channel: import("@angular/core").WritableSignal<"email" | "text">;
2259
+ readonly channel: import("@angular/core").WritableSignal<"text" | "email">;
2255
2260
  readonly valid: import("@angular/core").WritableSignal<boolean>;
2256
2261
  /** A send is in flight in the active form: the Send button spins and stays disabled. */
2257
2262
  readonly busy: import("@angular/core").WritableSignal<boolean>;
@@ -2308,6 +2313,11 @@ export declare class SendMessagePanelComponent {
2308
2313
  "required": false;
2309
2314
  "isSignal": true;
2310
2315
  };
2316
+ "showContactNotices": {
2317
+ "alias": "showContactNotices";
2318
+ "required": false;
2319
+ "isSignal": true;
2320
+ };
2311
2321
  "titleInput": {
2312
2322
  "alias": "title";
2313
2323
  "required": false;
@@ -17,6 +17,8 @@ export declare class MoreMenuComponent {
17
17
  readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
18
18
  readonly actions: import("@angular/core").InputSignal<RowAction[]>;
19
19
  readonly actionClick: import("@angular/core").OutputEmitterRef<string>;
20
+ /** The menu was opened (the ⋮ trigger was pressed and the dropdown is showing). Library source 2026-11-21. */
21
+ readonly opened: import("@angular/core").OutputEmitterRef<void>;
20
22
  protected readonly open: import("@angular/core").WritableSignal<boolean>;
21
23
  protected readonly openUp: import("@angular/core").WritableSignal<boolean>;
22
24
  /** Caps the dropdown to the space on the side it opens, so it never runs off-screen; it scrolls instead. */
@@ -40,6 +42,10 @@ export declare class MoreMenuComponent {
40
42
  protected readonly visibleActions: () => RowAction[];
41
43
  protected resolveIcon(action: RowAction): string;
42
44
  protected isDisabled(action: RowAction): boolean;
45
+ /** The visible reason of a DISABLED action (`RowAction.disabledReason`), or '' when there is none. A function reason is called with `null` here; `ui-data-table` resolves it with the row before handing the actions over. */
46
+ protected reasonFor(action: RowAction): string;
47
+ private readonly _uid;
48
+ protected reasonId(action: RowAction): string;
43
49
  toggle(event: Event): void;
44
50
  /**
45
51
  * Decides where the open dropdown goes: below the trigger when its real height fits, otherwise above when there is more
@@ -87,5 +93,6 @@ export declare class MoreMenuComponent {
87
93
  };
88
94
  }, {
89
95
  "actionClick": "actionClick";
96
+ "opened": "opened";
90
97
  }, never, never, true, never>;
91
98
  }