@zambon-dev/ui 1.11.0 → 1.12.0
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/CHANGELOG.md +78 -1
- package/fesm2022/zambon-dev-ui-framework.mjs +6 -4
- package/fesm2022/zambon-dev-ui-framework.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-library.mjs +142 -46
- package/fesm2022/zambon-dev-ui-library.mjs.map +1 -1
- package/fesm2022/zambon-dev-ui-shared.mjs +1 -0
- package/fesm2022/zambon-dev-ui-shared.mjs.map +1 -1
- package/i18n/framework/en.json +1 -0
- package/i18n/framework/pt.json +1 -0
- package/package.json +1 -1
- package/types/zambon-dev-ui-library.d.ts +69 -3
package/i18n/framework/en.json
CHANGED
package/i18n/framework/pt.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zambon-dev/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "Angular 22 component library and application shell: form controls, a virtual-scroll data grid, modals, ribbon, sidebar, tabbed navigation, view base classes and authentication layouts, themed with Tailwind CSS 4 tokens.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -269,6 +269,11 @@ export type GridConfigs = {
|
|
|
269
269
|
/** How tightly a data grid sets its rows. See `DataGridConfigs.density`. */
|
|
270
270
|
export type DataGridDensity = 'comfortable' | 'compact';
|
|
271
271
|
export type DataGridConfigs = GridConfigs & {
|
|
272
|
+
/**
|
|
273
|
+
* Hidden header text for an `actions` column whose `headerName` is empty, so screen readers can
|
|
274
|
+
* name the column. A translation key or plain text. Defaults to `Actions`.
|
|
275
|
+
*/
|
|
276
|
+
actionsColumnText?: string;
|
|
272
277
|
/**
|
|
273
278
|
* How tightly the grid sets its rows. `compact` uses 32px rows and tighter cell padding, for
|
|
274
279
|
* dense screens. A `rowHeight` other than the default 41.6px still wins, in either density.
|
|
@@ -771,6 +776,8 @@ export declare class CatalogSelectComponent extends BaseComponent implements OnI
|
|
|
771
776
|
protected get formDisplayControlName(): string;
|
|
772
777
|
protected get isInvalid(): boolean;
|
|
773
778
|
protected get isTouched(): boolean;
|
|
779
|
+
/** Shared by the field's label and its input, which this component renders in its own template. */
|
|
780
|
+
protected get inputId(): string;
|
|
774
781
|
protected get listboxId(): string;
|
|
775
782
|
/**
|
|
776
783
|
* Whether the button that empties the field is offered.
|
|
@@ -1018,7 +1025,15 @@ export declare abstract class GridDataset extends BaseDataset {
|
|
|
1018
1025
|
get parentEntityId(): any;
|
|
1019
1026
|
set parentEntityId(value: any);
|
|
1020
1027
|
constructor();
|
|
1021
|
-
|
|
1028
|
+
/**
|
|
1029
|
+
* Adds a row after the loaded ones, without a reload.
|
|
1030
|
+
*
|
|
1031
|
+
* @param addedToSource Leave it `true` when the API already holds the row among the rows the grid
|
|
1032
|
+
* has loaded, such as a saved order an API lists newest first. The next block then starts one
|
|
1033
|
+
* row later, so the row is not loaded twice. Pass `false` for a row only the grid holds, such as
|
|
1034
|
+
* a new row still to be saved, so no row is skipped.
|
|
1035
|
+
*/
|
|
1036
|
+
addNewRow(row: any, addedToSource?: boolean): void;
|
|
1022
1037
|
/** The key of the currently focused row, or null. Read by DataGridRowComponent's host binding. */
|
|
1023
1038
|
get focusedRowKey(): string | null;
|
|
1024
1039
|
clearFocusedRow(): void;
|
|
@@ -1029,7 +1044,14 @@ export declare abstract class GridDataset extends BaseDataset {
|
|
|
1029
1044
|
isKeyExists(key: string): boolean;
|
|
1030
1045
|
loadRows(): void;
|
|
1031
1046
|
refresh(): void;
|
|
1032
|
-
|
|
1047
|
+
/**
|
|
1048
|
+
* Removes loaded rows by their keys, without a reload.
|
|
1049
|
+
*
|
|
1050
|
+
* @param deletedFromSource Pass `true` when the API has already deleted the rows. Its later rows
|
|
1051
|
+
* then move up, so the next block starts that many rows earlier and none is skipped. Leave it
|
|
1052
|
+
* `false` when the rows only leave the grid, such as a removal still to be saved.
|
|
1053
|
+
*/
|
|
1054
|
+
removeKeys(keys: string[], deletedFromSource?: boolean): void;
|
|
1033
1055
|
setFilters(filters?: {
|
|
1034
1056
|
[key: string]: string;
|
|
1035
1057
|
}): void;
|
|
@@ -1127,7 +1149,7 @@ export declare abstract class DataGridDataset extends GridDataset {
|
|
|
1127
1149
|
getSelectedRowsData(): any[];
|
|
1128
1150
|
isKeySelected(key: any): boolean;
|
|
1129
1151
|
refresh(): void;
|
|
1130
|
-
removeKeys(keys: string[]): void;
|
|
1152
|
+
removeKeys(keys: string[], deletedFromSource?: boolean): void;
|
|
1131
1153
|
selectRow(key: string): void;
|
|
1132
1154
|
selectRowID(id: any): void;
|
|
1133
1155
|
selectRows(keys: string[]): void;
|
|
@@ -1415,6 +1437,8 @@ export declare class DataGridComponent extends BaseComponent implements OnInit,
|
|
|
1415
1437
|
protected get allRowsSelected(): boolean;
|
|
1416
1438
|
/** Whether some, but not all, loaded rows are selected: the select-all checkbox is indeterminate. */
|
|
1417
1439
|
protected get someRowsSelected(): boolean;
|
|
1440
|
+
/** Names an `actions` column that has no heading of its own, for screen readers only. */
|
|
1441
|
+
protected get actionsColumnText(): string;
|
|
1418
1442
|
protected get selectAllText(): string;
|
|
1419
1443
|
protected get selectionColWidth(): string;
|
|
1420
1444
|
/**
|
|
@@ -1783,6 +1807,8 @@ export declare class DateInputComponent implements ControlValueAccessor, Validat
|
|
|
1783
1807
|
readonly invalid: InputSignal<boolean>;
|
|
1784
1808
|
/** Accessible name of the date text field, when no visible label names it. Defaults to none. */
|
|
1785
1809
|
readonly ariaLabel: InputSignal<string | undefined>;
|
|
1810
|
+
/** `id` of the text field, so a `<label for>` can name it. `lib-form-input` sets it for its group's label. No `id` by default. */
|
|
1811
|
+
readonly inputId: InputSignal<string | undefined>;
|
|
1786
1812
|
/** Emits when a text field of the input loses focus. */
|
|
1787
1813
|
readonly blurred: OutputEmitterRef<void>;
|
|
1788
1814
|
/** Emits when a text field of the input gains focus. */
|
|
@@ -1886,6 +1912,11 @@ export declare class DateInputComponent implements ControlValueAccessor, Validat
|
|
|
1886
1912
|
"required": false;
|
|
1887
1913
|
"isSignal": true;
|
|
1888
1914
|
};
|
|
1915
|
+
"inputId": {
|
|
1916
|
+
"alias": "inputId";
|
|
1917
|
+
"required": false;
|
|
1918
|
+
"isSignal": true;
|
|
1919
|
+
};
|
|
1889
1920
|
}, {
|
|
1890
1921
|
"blurred": "blurred";
|
|
1891
1922
|
"focused": "focused";
|
|
@@ -1909,6 +1940,11 @@ export declare class FormInputComponent extends BaseComponent implements OnInit
|
|
|
1909
1940
|
readonly disabledControlName: InputSignal<string | undefined>;
|
|
1910
1941
|
/** Styles a read-only input like a disabled one. Defaults to `true`. */
|
|
1911
1942
|
readonly displayReadOnlyAsDisabled: InputSignal<boolean>;
|
|
1943
|
+
/**
|
|
1944
|
+
* `id` of the native input or textarea, so a `<label for>` can name it. `lib-form-input-group`
|
|
1945
|
+
* sets it for its own label. No `id` by default.
|
|
1946
|
+
*/
|
|
1947
|
+
readonly inputId: InputSignal<string | undefined>;
|
|
1912
1948
|
/** Shows the field in its error style. Defaults to `false`. */
|
|
1913
1949
|
readonly invalid: InputSignal<boolean>;
|
|
1914
1950
|
/** Disables the input when it shows `fixedValue` (no `controlName`). Has no effect on a form control. Defaults to `true`. */
|
|
@@ -2027,6 +2063,11 @@ export declare class FormInputComponent extends BaseComponent implements OnInit
|
|
|
2027
2063
|
"required": false;
|
|
2028
2064
|
"isSignal": true;
|
|
2029
2065
|
};
|
|
2066
|
+
"inputId": {
|
|
2067
|
+
"alias": "inputId";
|
|
2068
|
+
"required": false;
|
|
2069
|
+
"isSignal": true;
|
|
2070
|
+
};
|
|
2030
2071
|
"invalid": {
|
|
2031
2072
|
"alias": "invalid";
|
|
2032
2073
|
"required": false;
|
|
@@ -2110,6 +2151,11 @@ export declare class FormInputGroupComponent extends BaseComponent implements On
|
|
|
2110
2151
|
readonly fixedValue: InputSignal<any>;
|
|
2111
2152
|
/** Display format passed to the inner `lib-form-input`: a date pattern or a number digits string. */
|
|
2112
2153
|
readonly format: InputSignal<string | undefined>;
|
|
2154
|
+
/**
|
|
2155
|
+
* `id` of the native input, which the label names with `for`. Defaults to a generated id. A
|
|
2156
|
+
* custom `template` must put this id on its own input for the label to name it.
|
|
2157
|
+
*/
|
|
2158
|
+
readonly inputId: InputSignal<string | undefined>;
|
|
2113
2159
|
/** Text of the label, as a translation key. Defaults to empty. */
|
|
2114
2160
|
readonly label: InputSignal<string>;
|
|
2115
2161
|
/** Passed to the inner `lib-form-input`; disables it only when it shows a fixed value. Defaults to `true`. */
|
|
@@ -2141,6 +2187,14 @@ export declare class FormInputGroupComponent extends BaseComponent implements On
|
|
|
2141
2187
|
readonly validations: InputSignal<{
|
|
2142
2188
|
[id: string]: string;
|
|
2143
2189
|
}>;
|
|
2190
|
+
private static instances;
|
|
2191
|
+
/**
|
|
2192
|
+
* What the label's `for` and the input's `id` share. It used to be the control name, which no
|
|
2193
|
+
* input carried, so the label named nothing: a click on it did not focus the field and a screen
|
|
2194
|
+
* reader announced the field without its label.
|
|
2195
|
+
*/
|
|
2196
|
+
protected readonly resolvedInputId: Signal<string>;
|
|
2197
|
+
private readonly generatedInputId;
|
|
2144
2198
|
protected readonly formGroupDirective: FormGroupDirective;
|
|
2145
2199
|
protected readonly formGroupName: FormGroupName;
|
|
2146
2200
|
protected formService: FormService;
|
|
@@ -2191,6 +2245,11 @@ export declare class FormInputGroupComponent extends BaseComponent implements On
|
|
|
2191
2245
|
"required": false;
|
|
2192
2246
|
"isSignal": true;
|
|
2193
2247
|
};
|
|
2248
|
+
"inputId": {
|
|
2249
|
+
"alias": "inputId";
|
|
2250
|
+
"required": false;
|
|
2251
|
+
"isSignal": true;
|
|
2252
|
+
};
|
|
2194
2253
|
"label": {
|
|
2195
2254
|
"alias": "label";
|
|
2196
2255
|
"required": false;
|
|
@@ -2744,6 +2803,8 @@ export declare class NumberInputComponent implements ControlValueAccessor, Valid
|
|
|
2744
2803
|
readonly invalid: InputSignal<boolean>;
|
|
2745
2804
|
/** Accessible name of the field, when no visible label names it. Defaults to none. */
|
|
2746
2805
|
readonly ariaLabel: InputSignal<string | undefined>;
|
|
2806
|
+
/** `id` of the text field, so a `<label for>` can name it. `lib-form-input` sets it for its group's label. No `id` by default. */
|
|
2807
|
+
readonly inputId: InputSignal<string | undefined>;
|
|
2747
2808
|
/** Emits when the field loses focus. */
|
|
2748
2809
|
readonly blurred: OutputEmitterRef<void>;
|
|
2749
2810
|
/** Emits when the field gains focus. */
|
|
@@ -2853,6 +2914,11 @@ export declare class NumberInputComponent implements ControlValueAccessor, Valid
|
|
|
2853
2914
|
"required": false;
|
|
2854
2915
|
"isSignal": true;
|
|
2855
2916
|
};
|
|
2917
|
+
"inputId": {
|
|
2918
|
+
"alias": "inputId";
|
|
2919
|
+
"required": false;
|
|
2920
|
+
"isSignal": true;
|
|
2921
|
+
};
|
|
2856
2922
|
}, {
|
|
2857
2923
|
"blurred": "blurred";
|
|
2858
2924
|
"focused": "focused";
|