@forgeroute/ui 0.4.91 → 0.4.92
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 +2 -2
- package/fesm2022/forgeroute-ui-offline.mjs.map +1 -1
- package/fesm2022/{forgeroute-ui-ui-labels.es-BxCsxFEd.mjs → forgeroute-ui-ui-labels.es-Rw5Xm65S.mjs} +3 -1
- package/fesm2022/{forgeroute-ui-ui-labels.es-BxCsxFEd.mjs.map → forgeroute-ui-ui-labels.es-Rw5Xm65S.mjs.map} +1 -1
- package/fesm2022/forgeroute-ui.mjs +120 -18
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-offline.d.ts +14 -3
- package/types/forgeroute-ui.d.ts +105 -26
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { EnvironmentProviders, InjectionToken } from "@angular/core";
|
|
2
|
+
import { EnvironmentProviders, InjectionToken, Injector } from "@angular/core";
|
|
3
3
|
import { Subject } from "rxjs";
|
|
4
4
|
import { HttpContextToken, HttpInterceptorFn } from "@angular/common/http";
|
|
5
5
|
import { QueuedNote, UiLabelsService, UiNotesQueue } from "@forgeroute/ui";
|
|
@@ -184,11 +184,22 @@ export declare class OfflineStore {
|
|
|
184
184
|
}
|
|
185
185
|
/** string = path prefix or substring after the origin is stripped; RegExp is tested on path + query. */
|
|
186
186
|
export type UrlMatcher = string | RegExp;
|
|
187
|
+
/**
|
|
188
|
+
* What a {@link QueueRule.label} callback receives as its 4th argument: the app's injector, so the label can read app services (the signed-in company's
|
|
189
|
+
* user type, a language service ...) with `ctx.injector.get(Token)` or `runInInjectionContext(ctx.injector, () => inject(Token))`. It is the injector of the
|
|
190
|
+
* HTTP request being queued; the callback runs synchronously while the change is being queued.
|
|
191
|
+
*/
|
|
192
|
+
export interface QueueLabelContext {
|
|
193
|
+
readonly injector: Injector;
|
|
194
|
+
}
|
|
187
195
|
export interface QueueRule {
|
|
188
196
|
pattern: RegExp;
|
|
189
197
|
methods: readonly string[];
|
|
190
|
-
/**
|
|
191
|
-
|
|
198
|
+
/**
|
|
199
|
+
* Plain-words name of the change shown in the pending-changes list (e.g. "Add lot 12"). A callback that takes only (method, url, body) keeps working
|
|
200
|
+
* unchanged; the optional 4th argument is a {@link QueueLabelContext} for labels that need app state.
|
|
201
|
+
*/
|
|
202
|
+
label?: (method: string, url: string, body: unknown, ctx: QueueLabelContext) => string;
|
|
192
203
|
entityType?: (url: string) => string | undefined;
|
|
193
204
|
}
|
|
194
205
|
export interface OfflineSupportConfig {
|
package/types/forgeroute-ui.d.ts
CHANGED
|
@@ -385,6 +385,27 @@ export type BulkUpdateOption<T = any> = string | {
|
|
|
385
385
|
* { field: 'status', allowedFrom: { SENT: ['DRAFT'] }, canChange: (row, target) => target !== 'SENT' || canSend(row) }
|
|
386
386
|
*/
|
|
387
387
|
canChange?: (row: T, target: string) => boolean;
|
|
388
|
+
/**
|
|
389
|
+
* Field changes (`{ field, canApply }`): a rule on the WHOLE selection, in addition to the per-row `allowedFrom` / `canChange`. Called with every
|
|
390
|
+
* selected row of the loaded page and the target value; return `true` to allow, `false` (generic reason) or a string (the reason shown to the
|
|
391
|
+
* user) to refuse. Use it for a rule no single row can express ("an Archived invoice batch must all belong to one customer", "all rows must
|
|
392
|
+
* share the same status"). Keep it identical to the backend rule. A target it refuses is listed in the select but disabled, with a visible
|
|
393
|
+
* "<option>: <reason>" hint, and Apply re-checks it (a refused target is never confirmed or sent; the reason is shown as an error toast). A function that throws counts as
|
|
394
|
+
* refused. It only sees rows on the loaded page. Ignored for Delete and direct actions. Omit it and nothing changes.
|
|
395
|
+
*
|
|
396
|
+
* { field: 'status', canApply: (rows, target) => target !== 'MERGED' || new Set(rows.map(r => r.customerId)).size === 1 || 'Rows must belong to one customer.' }
|
|
397
|
+
*/
|
|
398
|
+
canApply?: (rows: T[], target: string) => boolean | string;
|
|
399
|
+
/**
|
|
400
|
+
* Field changes (`{ field, listAll }`): list the FULL set of values in the "Change <column>" select instead of only the values the
|
|
401
|
+
* /filter-counts response currently carries (which omits values no row has yet). `true` = the filter-count values plus every target of
|
|
402
|
+
* `allowedFrom` that is not already listed; a list of values = exactly that set, in that order (labelled through the column's `badgeFn`). The
|
|
403
|
+
* `exclude`, `allowedFrom`, `canChange` and `canApply` rules and the "not already held by every selected row" rule still apply, so listing a
|
|
404
|
+
* value never offers a change the table knows the server refuses. An empty list is ignored. Omit it and nothing changes.
|
|
405
|
+
*
|
|
406
|
+
* { field: 'status', listAll: ['DRAFT', 'SENT', 'SIGNED', 'VOIDED'], allowedFrom: { SENT: ['DRAFT'], SIGNED: ['SENT'], VOIDED: ['DRAFT', 'SENT'] } }
|
|
407
|
+
*/
|
|
408
|
+
listAll?: true | readonly string[];
|
|
388
409
|
/**
|
|
389
410
|
* Direct bulk action (`{ field: 'resend', action: true, label: 'Resend' }`): a bulk-bar button that is neither a field change nor
|
|
390
411
|
* Delete. `field` is the action key (no column needed), the button type is `action-<field>` and there is no inline select.
|
|
@@ -501,6 +522,10 @@ export interface BulkActionDef {
|
|
|
501
522
|
deletable?: (row: any) => boolean;
|
|
502
523
|
/** Field changes: per-row check that the server will accept the move to a target (from `{ field, canChange }`). */
|
|
503
524
|
canChange?: (row: any, target: string) => boolean;
|
|
525
|
+
/** Field changes: rule on the whole selection (from `{ field, canApply }`): true = allowed, false / a string = refused (the string is the reason). */
|
|
526
|
+
canApply?: (rows: any[], target: string) => boolean | string;
|
|
527
|
+
/** Field changes: list the full value set (from `{ field, listAll }`): `true` or the exact list of values. */
|
|
528
|
+
listAll?: true | readonly string[];
|
|
504
529
|
/** True for a direct bulk action (from `{ field, action: true, label }`); `type` is `action-<key>` and `field` is not set (no inline select). */
|
|
505
530
|
action?: boolean;
|
|
506
531
|
/** Direct action: which rows the server will accept (from `{ field, action: true, eligible }`). */
|
|
@@ -2105,6 +2130,8 @@ export declare const UI_DEFAULT_LABELS: {
|
|
|
2105
2130
|
readonly 'dataTable.skipAlreadyHas_other': "{{ count }} selected rows already have this value and will be skipped.";
|
|
2106
2131
|
readonly 'dataTable.noChangesBlocked': "No changes — the selected rows can't be changed to {{ option }}.";
|
|
2107
2132
|
readonly 'dataTable.noChangesAlready': "No changes — all selected {{ item }} already have {{ option }}.";
|
|
2133
|
+
readonly 'dataTable.bulkCannotApply': "The selected rows can't all be changed to {{ option }} together.";
|
|
2134
|
+
readonly 'dataTable.bulkOptionBlocked': "{{ option }}: {{ reason }}";
|
|
2108
2135
|
readonly 'dataTable.doneUpdated': "updated";
|
|
2109
2136
|
readonly 'dataTable.doneDeleted': "deleted";
|
|
2110
2137
|
readonly 'dataTable.doneDownloaded': "downloaded";
|
|
@@ -3861,8 +3888,17 @@ export declare class DataTableComponent<T extends Record<string, any>> implement
|
|
|
3861
3888
|
private _actionKeyLabel;
|
|
3862
3889
|
/** Runs a direct action's `eligible` predicate; a predicate that throws counts as "row not eligible". */
|
|
3863
3890
|
private _isActionEligible;
|
|
3864
|
-
/** Options for a field-based bulk action: the field's options minus the entry's `exclude` values. */
|
|
3891
|
+
/** Options for a field-based bulk action: the field's options (or, with `listAll`, its full value set) minus the entry's `exclude` values. */
|
|
3865
3892
|
private _bulkOptionsFor;
|
|
3893
|
+
/**
|
|
3894
|
+
* `listAll` options: a list of values = exactly that set in that order; `true` = the usual options (filter counts, or the page's distinct values)
|
|
3895
|
+
* plus every `allowedFrom` target not yet listed. Labels go through the column's `badgeFn`, like the usual options. Blank and repeated values are dropped.
|
|
3896
|
+
*/
|
|
3897
|
+
private _listAllOptions;
|
|
3898
|
+
/** The loaded-page rows the user has selected. */
|
|
3899
|
+
private _selectedRows;
|
|
3900
|
+
/** The `canApply` verdict of a bulk change for the whole selection: allowed, or the reason it is refused (a throwing rule refuses). */
|
|
3901
|
+
private _applyVerdict;
|
|
3866
3902
|
/** True when a row whose field currently holds `current` may be moved to `target` by this action. */
|
|
3867
3903
|
private _canBulkMove;
|
|
3868
3904
|
/** True when `value` is in the action's `exclude` list (ignoring case, spaces, dashes and underscores). */
|
|
@@ -3878,10 +3914,16 @@ export declare class DataTableComponent<T extends Record<string, any>> implement
|
|
|
3878
3914
|
protected _bulkSelectStr: string;
|
|
3879
3915
|
/** Options for the active bulk action's inline select, filtered to exclude no-ops. */
|
|
3880
3916
|
protected readonly _eligibleBulkOptions: Signal<{
|
|
3881
|
-
[key: string]: any;
|
|
3882
3917
|
value: string;
|
|
3883
3918
|
label: string;
|
|
3919
|
+
disabled?: boolean;
|
|
3884
3920
|
}[]>;
|
|
3921
|
+
/** Id prefix of the reason hints beside the inline select (the select is linked to them with aria-describedby). */
|
|
3922
|
+
protected readonly _bulkHintId: string;
|
|
3923
|
+
/** Space-separated ids of the reason hints, for the select's `aria-describedby` ('' = none, no attribute). */
|
|
3924
|
+
protected readonly _bulkOptionHintIds: Signal<string>;
|
|
3925
|
+
/** "<option>: <reason>" for each target the whole-selection rule (`canApply`) refuses right now; shown as visible text beside the inline select. */
|
|
3926
|
+
protected readonly _bulkOptionHints: Signal<string[]>;
|
|
3885
3927
|
protected readonly _allSelected: Signal<boolean>;
|
|
3886
3928
|
protected readonly _someSelected: Signal<boolean>;
|
|
3887
3929
|
/**
|
|
@@ -4350,7 +4392,7 @@ export declare class SidePanelComponent implements OnDestroy {
|
|
|
4350
4392
|
readonly cancelLabel: import("@angular/core").Signal<string>;
|
|
4351
4393
|
/** Right-aligned primary action button label. Empty string = hidden. */
|
|
4352
4394
|
readonly primaryLabel: import("@angular/core").InputSignal<string>;
|
|
4353
|
-
readonly primaryVariant: import("@angular/core").InputSignal<"
|
|
4395
|
+
readonly primaryVariant: import("@angular/core").InputSignal<"primary" | "danger" | "warning">;
|
|
4354
4396
|
readonly primaryLoading: import("@angular/core").InputSignal<boolean>;
|
|
4355
4397
|
readonly primaryDisabled: import("@angular/core").InputSignal<boolean>;
|
|
4356
4398
|
/** `data-testid` of the Cancel button; none when empty (default). */
|
|
@@ -5349,7 +5391,7 @@ export declare class TooltipDirective {
|
|
|
5349
5391
|
/** Tooltip text; empty or null disables the tooltip. */
|
|
5350
5392
|
readonly uiTooltip: import("@angular/core").InputSignal<string | null | undefined>;
|
|
5351
5393
|
/** Preferred side; flips to the other side when there is no room. */
|
|
5352
|
-
readonly tooltipPosition: import("@angular/core").InputSignal<"
|
|
5394
|
+
readonly tooltipPosition: import("@angular/core").InputSignal<"bottom" | "top">;
|
|
5353
5395
|
private readonly host;
|
|
5354
5396
|
private readonly doc;
|
|
5355
5397
|
private bubble;
|
|
@@ -5815,7 +5857,7 @@ export declare class CheckboxComponent implements ControlValueAccessor, Validato
|
|
|
5815
5857
|
* 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.
|
|
5816
5858
|
* Default null: plain label text, exactly as before. Single mode only.
|
|
5817
5859
|
*/
|
|
5818
|
-
readonly headingLevel: import("@angular/core").InputSignal<1 |
|
|
5860
|
+
readonly headingLevel: import("@angular/core").InputSignal<1 | 2 | 3 | 4 | 5 | 6 | null>;
|
|
5819
5861
|
readonly indeterminate: import("@angular/core").InputSignal<boolean>;
|
|
5820
5862
|
readonly checked: import("@angular/core").ModelSignal<boolean>;
|
|
5821
5863
|
/**
|
|
@@ -6250,7 +6292,7 @@ export declare class StepperComponent {
|
|
|
6250
6292
|
* its circle, one continuous line behind the circles that fills as steps complete; a complete step shows a check, the current step an
|
|
6251
6293
|
* accent ring with a dot, an upcoming step an empty circle (no numbers). Circles are 40px (32px with `size="sm"`).
|
|
6252
6294
|
*/
|
|
6253
|
-
readonly labelPosition: import("@angular/core").InputSignal<"
|
|
6295
|
+
readonly labelPosition: import("@angular/core").InputSignal<"beside" | "below">;
|
|
6254
6296
|
/** Viewport width in px below which a horizontal stepper is drawn vertical (labels beside the circles), e.g. `640`. null (default) = never. */
|
|
6255
6297
|
readonly stackBelow: import("@angular/core").InputSignal<number | null>;
|
|
6256
6298
|
/** CSS length (e.g. `10.5rem`): horizontal only - the list gets `min-width: calc(<step count> * <value>)`. Empty (default) = no minimum. */
|
|
@@ -6282,7 +6324,7 @@ export declare class StepperComponent {
|
|
|
6282
6324
|
protected readonly rows: import("@angular/core").Signal<{
|
|
6283
6325
|
step: StepperStep;
|
|
6284
6326
|
index: number;
|
|
6285
|
-
state: "
|
|
6327
|
+
state: "complete" | "current" | "upcoming";
|
|
6286
6328
|
error: boolean;
|
|
6287
6329
|
errorMessage: string;
|
|
6288
6330
|
selectable: boolean;
|
|
@@ -6912,7 +6954,7 @@ export declare class ButtonComponent {
|
|
|
6912
6954
|
* `ghost-start`: a ghost button for list / section toggles - a full-width row with its content aligned to the start, transparent
|
|
6913
6955
|
* background, hover tint and the normal focus ring. Pair it with `ariaExpanded` / `ariaPressed`; the label may contain a heading element.
|
|
6914
6956
|
*/
|
|
6915
|
-
readonly variant: import("@angular/core").InputSignal<"
|
|
6957
|
+
readonly variant: import("@angular/core").InputSignal<"primary" | "secondary" | "danger" | "warning" | "link" | "ghost" | "ghost-start" | "tab" | "icon" | "icon-danger">;
|
|
6916
6958
|
/** 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`). */
|
|
6917
6959
|
readonly routerLink: import("@angular/core").InputSignal<string | readonly unknown[] | null>;
|
|
6918
6960
|
/** Query params of the `routerLink` (e.g. `{ section: 'deal-defaults' }`). */
|
|
@@ -6933,7 +6975,7 @@ export declare class ButtonComponent {
|
|
|
6933
6975
|
*/
|
|
6934
6976
|
readonly href: import("@angular/core").InputSignal<string | null>;
|
|
6935
6977
|
/** Where to open the `href` (`_blank` = a new tab). */
|
|
6936
|
-
readonly target: import("@angular/core").InputSignal<"
|
|
6978
|
+
readonly target: import("@angular/core").InputSignal<"_self" | "_blank" | "_parent" | "_top" | null>;
|
|
6937
6979
|
/** `rel` of the `href` link. A `_blank` target always gets `noopener noreferrer` added. */
|
|
6938
6980
|
readonly rel: import("@angular/core").InputSignal<string | null>;
|
|
6939
6981
|
/** The href when it is allowed (http, https, mailto, tel, sms or a relative URL), else null. */
|
|
@@ -6957,8 +6999,8 @@ export declare class ButtonComponent {
|
|
|
6957
6999
|
private readonly _narrow;
|
|
6958
7000
|
readonly color: import("@angular/core").InputSignal<string | undefined>;
|
|
6959
7001
|
readonly active: import("@angular/core").InputSignal<boolean>;
|
|
6960
|
-
readonly size: import("@angular/core").InputSignal<"
|
|
6961
|
-
readonly type: import("@angular/core").InputSignal<"
|
|
7002
|
+
readonly size: import("@angular/core").InputSignal<"sm" | "md" | "lg" | "xs">;
|
|
7003
|
+
readonly type: import("@angular/core").InputSignal<"reset" | "submit" | "button">;
|
|
6962
7004
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
6963
7005
|
readonly loading: import("@angular/core").InputSignal<boolean>;
|
|
6964
7006
|
readonly fullWidth: import("@angular/core").InputSignal<boolean>;
|
|
@@ -7601,7 +7643,7 @@ export declare class ImportSourceGridComponent {
|
|
|
7601
7643
|
/** The `value` of the picked source (highlighted). `tile` only: the `card` appearance does not keep a selection. */
|
|
7602
7644
|
readonly selected: import("@angular/core").InputSignal<string>;
|
|
7603
7645
|
/** `tile`: the compact buttons of the import window. `card`: one `ui-detail-card` per source with its own select button (used on a page). */
|
|
7604
|
-
readonly appearance: import("@angular/core").InputSignal<"
|
|
7646
|
+
readonly appearance: import("@angular/core").InputSignal<"card" | "tile">;
|
|
7605
7647
|
/** `card`: disables every card's button (for example while the page is saving). */
|
|
7606
7648
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
7607
7649
|
/** `card`: the text of each card's button. */
|
|
@@ -8089,7 +8131,7 @@ export declare class TextInputComponent implements ControlValueAccessor, Validat
|
|
|
8089
8131
|
readonly passwordRequirements: import("@angular/core").InputSignal<boolean>;
|
|
8090
8132
|
/** Rules for `passwordRequirements`; default = the library's five rules (8+ characters, upper, lower, digit, special). */
|
|
8091
8133
|
readonly passwordRules: import("@angular/core").InputSignal<readonly PasswordRule[] | undefined>;
|
|
8092
|
-
readonly type: import("@angular/core").InputSignal<"number" | "email" | "text" | "
|
|
8134
|
+
readonly type: import("@angular/core").InputSignal<"number" | "email" | "text" | "tel" | "password" | "url">;
|
|
8093
8135
|
readonly maxlength: import("@angular/core").InputSignal<number | undefined>;
|
|
8094
8136
|
readonly required: import("@angular/core").InputSignal<boolean>;
|
|
8095
8137
|
readonly autocomplete: import("@angular/core").InputSignal<string>;
|
|
@@ -8098,7 +8140,7 @@ export declare class TextInputComponent implements ControlValueAccessor, Validat
|
|
|
8098
8140
|
* `search`, `text`, `none`). Empty (default) = the browser's default for the field, except `type="tel"`, which keeps `tel`.
|
|
8099
8141
|
* It only picks the keyboard; it does not restrict what can be typed or pasted.
|
|
8100
8142
|
*/
|
|
8101
|
-
readonly inputmode: import("@angular/core").InputSignal<"" | "email" | "text" | "decimal" | "none" | "search" | "tel" | "url"
|
|
8143
|
+
readonly inputmode: import("@angular/core").InputSignal<"" | "email" | "text" | "numeric" | "decimal" | "none" | "search" | "tel" | "url">;
|
|
8102
8144
|
readonly readonly: import("@angular/core").InputSignal<boolean>;
|
|
8103
8145
|
readonly hint: import("@angular/core").InputSignal<string>;
|
|
8104
8146
|
/** 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. */
|
|
@@ -8170,7 +8212,7 @@ export declare class TextInputComponent implements ControlValueAccessor, Validat
|
|
|
8170
8212
|
protected readonly _stepAttr: import("@angular/core").Signal<string | null>;
|
|
8171
8213
|
protected readonly _revealable: import("@angular/core").Signal<boolean>;
|
|
8172
8214
|
protected readonly _shown: import("@angular/core").WritableSignal<boolean>;
|
|
8173
|
-
protected readonly _inputType: import("@angular/core").Signal<"number" | "email" | "text" | "
|
|
8215
|
+
protected readonly _inputType: import("@angular/core").Signal<"number" | "email" | "text" | "tel" | "password" | "url">;
|
|
8174
8216
|
protected readonly _eyePath: string;
|
|
8175
8217
|
protected readonly _eyeOffPath: string;
|
|
8176
8218
|
protected readonly _showRequirements: import("@angular/core").Signal<boolean>;
|
|
@@ -9920,7 +9962,7 @@ export declare class DropdownComponent {
|
|
|
9920
9962
|
readonly loader: import("@angular/core").InputSignal<(() => Promise<DropdownItem[]>) | null>;
|
|
9921
9963
|
readonly active: import("@angular/core").InputSignal<boolean>;
|
|
9922
9964
|
readonly activeValue: import("@angular/core").InputSignal<string>;
|
|
9923
|
-
readonly variant: import("@angular/core").InputSignal<"
|
|
9965
|
+
readonly variant: import("@angular/core").InputSignal<"badge" | "button">;
|
|
9924
9966
|
/** Trigger size for `variant="button"`: `sm` (default, the compact toolbar look) or `md` (same padding and type as a medium `ui-button`). */
|
|
9925
9967
|
readonly size: import("@angular/core").InputSignal<"sm" | "md">;
|
|
9926
9968
|
readonly menuWidth: import("@angular/core").InputSignal<string>;
|
|
@@ -10236,7 +10278,7 @@ export declare class FormSectionComponent {
|
|
|
10236
10278
|
}, {}, never, ["*"], true, never>;
|
|
10237
10279
|
}
|
|
10238
10280
|
export declare class FormRowComponent {
|
|
10239
|
-
readonly cols: import("@angular/core").InputSignal<1 |
|
|
10281
|
+
readonly cols: import("@angular/core").InputSignal<1 | 2 | 3 | 4>;
|
|
10240
10282
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormRowComponent, never>;
|
|
10241
10283
|
static ɵcmp: i0.ɵɵComponentDeclaration<FormRowComponent, "ui-form-row", never, {
|
|
10242
10284
|
"cols": {
|
|
@@ -11569,9 +11611,9 @@ export declare class ChipGroupComponent {
|
|
|
11569
11611
|
readonly spaceAbove: import("@angular/core").InputSignal<"none" | "sm" | "md">;
|
|
11570
11612
|
/** Space below the chip group. */
|
|
11571
11613
|
readonly spaceBelow: import("@angular/core").InputSignal<"none" | "sm" | "md">;
|
|
11572
|
-
protected readonly _gap: import("@angular/core").Signal<"
|
|
11573
|
-
protected readonly _spaceAbove: import("@angular/core").Signal<"0" | "
|
|
11574
|
-
protected readonly _spaceBelow: import("@angular/core").Signal<"0" | "
|
|
11614
|
+
protected readonly _gap: import("@angular/core").Signal<"6px" | "12px" | "8px">;
|
|
11615
|
+
protected readonly _spaceAbove: import("@angular/core").Signal<"0" | "6px" | "12px">;
|
|
11616
|
+
protected readonly _spaceBelow: import("@angular/core").Signal<"0" | "6px" | "12px">;
|
|
11575
11617
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChipGroupComponent, never>;
|
|
11576
11618
|
static ɵcmp: i0.ɵɵComponentDeclaration<ChipGroupComponent, "ui-chip-group", never, {
|
|
11577
11619
|
"gap": {
|
|
@@ -11645,6 +11687,21 @@ export type ErrorAction = 'load' | 'save' | 'create' | 'update' | 'delete' | 'se
|
|
|
11645
11687
|
* re-thrown unchanged (same instance), so `instanceof HttpErrorResponse` checks keep working.
|
|
11646
11688
|
*/
|
|
11647
11689
|
export declare const errorContextInterceptor: HttpInterceptorFn;
|
|
11690
|
+
/**
|
|
11691
|
+
* Whole fallback sentences an app supplies instead of a bare noun phrase, so a translated app never gets an English noun inside a sentence of another
|
|
11692
|
+
* language. Pass it as the 2nd argument of {@link getErrorMessage} in place of the `fallbackContext` string. Texts are used exactly as given (no
|
|
11693
|
+
* placeholders, no article handling) except that they are trimmed and `failed` gets a full stop when it does not already end with sentence punctuation; a missing or blank entry falls back to the library's own sentence built from `context` (default "data").
|
|
11694
|
+
*/
|
|
11695
|
+
export interface ErrorFallback {
|
|
11696
|
+
/** The sentence for "it failed" (no server message; status 0, 408, 429, 5xx, other statuses, an unknown error), e.g. "No se pudo guardar el contacto.". The library's follow-up ("Please try again.") is appended after it as before. */
|
|
11697
|
+
failed?: string;
|
|
11698
|
+
/** The whole 403 sentence, e.g. "No tienes permiso para guardar el contacto.". */
|
|
11699
|
+
noPermission?: string;
|
|
11700
|
+
/** The whole 404 sentence, e.g. "No se encontró el contacto.". */
|
|
11701
|
+
notFound?: string;
|
|
11702
|
+
/** Noun phrase used by any library sentence this object does not replace (same rules as the string form). */
|
|
11703
|
+
context?: string;
|
|
11704
|
+
}
|
|
11648
11705
|
/**
|
|
11649
11706
|
* Extracts a user-friendly error message from any error response.
|
|
11650
11707
|
* Prioritizes: backend message > status text > typed fallback.
|
|
@@ -11655,8 +11712,11 @@ export declare const errorContextInterceptor: HttpInterceptorFn;
|
|
|
11655
11712
|
* `fallbackContext` is a bare noun phrase ("contact", "your invoices"); an empty or whitespace-only one becomes "data".
|
|
11656
11713
|
* The 404 text starts with "The <context>", so one leading article ("the", "a", "an") on the context is dropped
|
|
11657
11714
|
* there: "the contact" and "a contact" both read "The contact you're looking for could not be found.".
|
|
11715
|
+
*
|
|
11716
|
+
* `fallbackContext` may instead be an {@link ErrorFallback} carrying the whole sentences (`failed`, `noPermission`, `notFound`), for apps whose language the
|
|
11717
|
+
* library's "There was an error <verb> <noun>." template does not fit. The string form is unchanged.
|
|
11658
11718
|
*/
|
|
11659
|
-
export declare function getErrorMessage(error: unknown, fallbackContext?: string, action?: ErrorAction): string;
|
|
11719
|
+
export declare function getErrorMessage(error: unknown, fallbackContext?: string | ErrorFallback, action?: ErrorAction): string;
|
|
11660
11720
|
export interface UsStateOption {
|
|
11661
11721
|
value: string;
|
|
11662
11722
|
label: string;
|
|
@@ -14343,7 +14403,7 @@ export declare class PdfHotspotComponent {
|
|
|
14343
14403
|
/** `ready`: clickable; `blocked`: disabled (a prerequisite is missing); `signed`: shows `image`. */
|
|
14344
14404
|
readonly state: import("@angular/core").InputSignal<"ready" | "blocked" | "signed">;
|
|
14345
14405
|
/** `warning` gives the ready state an amber look (e.g. for initials), default is blue. */
|
|
14346
|
-
readonly tone: import("@angular/core").InputSignal<"
|
|
14406
|
+
readonly tone: import("@angular/core").InputSignal<"primary" | "warning">;
|
|
14347
14407
|
/** Text of the ready button (e.g. "Sign Here"). */
|
|
14348
14408
|
readonly labelInput: import("@angular/core").InputSignal<string | null>;
|
|
14349
14409
|
readonly label: import("@angular/core").Signal<string>;
|
|
@@ -14483,7 +14543,7 @@ export declare class DetailCardComponent {
|
|
|
14483
14543
|
/** true (default) = the title is displayed in capitals (CSS only); false = shown as written. The text, aria-label and heading name are never changed. */
|
|
14484
14544
|
readonly uppercaseTitle: import("@angular/core").InputSignal<boolean>;
|
|
14485
14545
|
/** 1-6 makes the title a real heading for screen readers (role=heading, aria-level); null keeps it plain text. */
|
|
14486
|
-
readonly headingLevel: import("@angular/core").InputSignal<1 |
|
|
14546
|
+
readonly headingLevel: import("@angular/core").InputSignal<1 | 2 | 3 | 4 | 5 | 6 | null>;
|
|
14487
14547
|
/** Optional id for the title text; the card is then labelled by it. Without it the title is the card's aria-label. */
|
|
14488
14548
|
readonly titleId: import("@angular/core").InputSignal<string>;
|
|
14489
14549
|
/** Accessible name of the card when the header gives none (no header, or no title). A visible title wins; blank = no name. */
|
|
@@ -17286,7 +17346,7 @@ export declare class SetupWizardComponent {
|
|
|
17286
17346
|
protected customHintId(): string;
|
|
17287
17347
|
protected readonly importBlocked: import("@angular/core").Signal<boolean>;
|
|
17288
17348
|
/** 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). */
|
|
17289
|
-
protected readonly splitTab: import("@angular/core").WritableSignal<"
|
|
17349
|
+
protected readonly splitTab: import("@angular/core").WritableSignal<"main" | "extra">;
|
|
17290
17350
|
protected readonly splitTabs: import("@angular/core").Signal<{
|
|
17291
17351
|
key: string;
|
|
17292
17352
|
label: string;
|
|
@@ -19549,7 +19609,7 @@ export declare class PaymentSidePanelComponent {
|
|
|
19549
19609
|
private readonly terminalAvailable;
|
|
19550
19610
|
/** value -> label of every live method the rendered plugins contribute (the first plugin wins a duplicate value). */
|
|
19551
19611
|
private readonly liveMethods;
|
|
19552
|
-
protected readonly kind: import("@angular/core").Signal<"none" | "
|
|
19612
|
+
protected readonly kind: import("@angular/core").Signal<"none" | "live" | "terminal" | "manual">;
|
|
19553
19613
|
private kindOf;
|
|
19554
19614
|
/** 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. */
|
|
19555
19615
|
readonly methodList: import("@angular/core").Signal<PaymentMethodOption[]>;
|
|
@@ -20023,21 +20083,38 @@ export interface ModuleLabelOverrides<K extends string = string> {
|
|
|
20023
20083
|
en?: Partial<Readonly<Record<K, string>>>;
|
|
20024
20084
|
es?: Partial<Readonly<Record<K, string>>>;
|
|
20025
20085
|
}
|
|
20086
|
+
/**
|
|
20087
|
+
* Where the overrides of one `provideModuleLabelOverrides` call come from: a plain object (read once, as always) or a function - typically a `computed` / signal
|
|
20088
|
+
* - that returns the overrides and is called on EVERY text lookup, so the texts follow runtime state (the signed-in company's user type ...) and an OnPush
|
|
20089
|
+
* template that reads them re-renders when a signal the function reads changes. A function that returns null / undefined / a non-object contributes nothing.
|
|
20090
|
+
*/
|
|
20091
|
+
export type ModuleLabelOverridesSource<K extends string = string> = ModuleLabelOverrides<K> | (() => ModuleLabelOverrides<K> | null | undefined);
|
|
20092
|
+
interface CleanOverrides {
|
|
20093
|
+
readonly en: Record<string, string>;
|
|
20094
|
+
readonly es: Record<string, string>;
|
|
20095
|
+
}
|
|
20026
20096
|
/**
|
|
20027
20097
|
* Lets the host app change single texts of a module, with the semantics of `UiLabelsService.setLabels`: a key the module does not have is ignored, a blank text
|
|
20028
20098
|
* is ignored (the module's own text stays) and the placeholders must be exactly those of the module's English text of that key (otherwise ignored).
|
|
20029
20099
|
* Several calls for one namespace merge; the later one wins.
|
|
20100
|
+
* `overrides` may also be a function / signal returning the overrides (see {@link ModuleLabelOverridesSource}): it is evaluated on every lookup with the same
|
|
20101
|
+
* rules, so the texts follow runtime state. A static object behaves exactly as before.
|
|
20030
20102
|
*/
|
|
20031
|
-
export declare function provideModuleLabelOverrides<K extends string = string>(namespace: string | Pick<ModuleLabelsHandle<K>, 'namespace'>, overrides:
|
|
20103
|
+
export declare function provideModuleLabelOverrides<K extends string = string>(namespace: string | Pick<ModuleLabelsHandle<K>, 'namespace'>, overrides: ModuleLabelOverridesSource<K>): EnvironmentProviders;
|
|
20032
20104
|
type Status = 'idle' | 'loading' | 'done' | 'failed';
|
|
20033
20105
|
interface ModuleState {
|
|
20034
20106
|
readonly handle: ModuleLabelsHandle<string>;
|
|
20035
20107
|
readonly status: WritableSignal<Status>;
|
|
20036
20108
|
readonly spanish: WritableSignal<Readonly<Record<string, string>> | null>;
|
|
20109
|
+
/** The merged overrides of the static entries; the whole answer when `sources` is null. */
|
|
20037
20110
|
readonly overrides: {
|
|
20038
20111
|
en: Record<string, string>;
|
|
20039
20112
|
es: Record<string, string>;
|
|
20040
20113
|
};
|
|
20114
|
+
/** Only set when at least one entry is a function: every entry of the namespace in registration order, merged afresh on each lookup. */
|
|
20115
|
+
readonly sources: readonly (CleanOverrides | (() => ModuleLabelOverrides | null | undefined))[] | null;
|
|
20116
|
+
/** Set once a function entry threw and the dev warning was shown. */
|
|
20117
|
+
warned?: boolean;
|
|
20041
20118
|
}
|
|
20042
20119
|
/** Root-level store of the module labels of one application: language, lazily loaded Spanish dictionaries (once per module), host overrides. */
|
|
20043
20120
|
export declare class ModuleLabelsRegistry implements OnDestroy {
|
|
@@ -20053,6 +20130,8 @@ export declare class ModuleLabelsRegistry implements OnDestroy {
|
|
|
20053
20130
|
stateFor(handle: ModuleLabelsHandle<string>): ModuleState;
|
|
20054
20131
|
/** Downloads the Spanish texts once per module (a failed download is tried again the next time Spanish becomes active). */
|
|
20055
20132
|
private load;
|
|
20133
|
+
/** The overrides in force right now: the precomputed static merge, or (a function / signal entry exists) a fresh merge of every entry in order. A throwing function counts as no overrides. */
|
|
20134
|
+
private currentOverrides;
|
|
20056
20135
|
create<K extends string>(handle: ModuleLabelsHandle<K>): ModuleLabels<K>;
|
|
20057
20136
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModuleLabelsRegistry, never>;
|
|
20058
20137
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|