@vsn-ux/ngx-gaia 0.13.0 → 0.14.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/docs/data-select.md +16 -3
- package/docs/form-field.md +18 -7
- package/docs/text-area.md +1 -1
- package/docs/textarea.md +1 -1
- package/fesm2022/vsn-ux-ngx-gaia.mjs +139 -78
- package/fesm2022/vsn-ux-ngx-gaia.mjs.map +1 -1
- package/package.json +1 -1
- package/types/vsn-ux-ngx-gaia.d.ts +45 -26
package/docs/data-select.md
CHANGED
|
@@ -36,7 +36,9 @@ Data select component that automatically generates options from an items array.
|
|
|
36
36
|
- `bindValue: string` - Property path to use as option value
|
|
37
37
|
- `bindLabel: string` - Property path to use as option label
|
|
38
38
|
- `groupBy: string | ((item: IGaSelectOption) => string)` - Property or function for grouping options
|
|
39
|
-
- `
|
|
39
|
+
- `valueLoading: boolean` - Show loading spinner in the trigger area (default: false)
|
|
40
|
+
- `optionsLoading: boolean` - Show loading spinner in the dropdown options list (default: false)
|
|
41
|
+
- `loading: boolean` - **Deprecated.** Maps to `optionsLoading`. Use `valueLoading` or `optionsLoading` instead (default: false)
|
|
40
42
|
- `labelHidden: boolean` - Use when the connected label is not visible; keeps the placeholder always shown so the component remains identifiable (default: false)
|
|
41
43
|
- `withOptionInput: boolean | null` - Show radio/checkbox in options (default: null)
|
|
42
44
|
- `valueDisplayLimit: number | null` - Limit number of displayed values in multi-select (default: null)
|
|
@@ -187,7 +189,7 @@ Searchable with custom filtering (server-side)
|
|
|
187
189
|
searchable
|
|
188
190
|
customFilter
|
|
189
191
|
[items]="filteredOptions.value() ?? []"
|
|
190
|
-
[
|
|
192
|
+
[optionsLoading]="filteredOptions.isLoading()"
|
|
191
193
|
(searchValueChange)="searchText.set($event)"
|
|
192
194
|
[(value)]="selected"
|
|
193
195
|
/>
|
|
@@ -333,12 +335,23 @@ Infinite scroll with optionsEndReached
|
|
|
333
335
|
```html
|
|
334
336
|
<ga-data-select
|
|
335
337
|
[items]="items"
|
|
336
|
-
[
|
|
338
|
+
[optionsLoading]="isLoading"
|
|
337
339
|
(optionsEndReached)="loadMore()"
|
|
338
340
|
[(value)]="selected"
|
|
339
341
|
/>
|
|
340
342
|
```
|
|
341
343
|
|
|
344
|
+
Value loading
|
|
345
|
+
|
|
346
|
+
```html
|
|
347
|
+
<ga-data-select
|
|
348
|
+
[items]="options"
|
|
349
|
+
[valueLoading]="isLoading"
|
|
350
|
+
placeholder="Select option"
|
|
351
|
+
[(value)]="selected"
|
|
352
|
+
/>
|
|
353
|
+
```
|
|
354
|
+
|
|
342
355
|
i18n configuration
|
|
343
356
|
|
|
344
357
|
```typescript
|
package/docs/form-field.md
CHANGED
|
@@ -33,12 +33,24 @@ Information text component.
|
|
|
33
33
|
|
|
34
34
|
## `[gaFormControl]`
|
|
35
35
|
|
|
36
|
-
Form control directive.
|
|
36
|
+
Form control directive that tracks validation state and manages ARIA attributes (`aria-invalid`, `aria-errormessage`). Automatically applied as a host directive on Gaia form controls (`gaInput`, `gaTextArea`, `ga-select`, `ga-data-select`, `ga-switch`, `ga-checkbox`, `ga-radio-group`). Use it explicitly only for custom (non-Gaia) controls inside `<ga-form-field>`.
|
|
37
37
|
|
|
38
38
|
### Inputs
|
|
39
39
|
|
|
40
40
|
- `gaFormControl: NgControl | string` - Optional explicit NgControl reference or control name
|
|
41
41
|
|
|
42
|
+
## `[gaFormFieldIgnore]`
|
|
43
|
+
|
|
44
|
+
Opt-out directive. When placed on a Gaia form control inside `<ga-form-field>`, prevents its implicit `gaFormControl` from registering with the form field. Useful when multiple form controls exist in a single form field and only one should drive the error callout.
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<ga-form-field>
|
|
48
|
+
<ga-label>Primary</ga-label>
|
|
49
|
+
<input gaInput [formControl]="mainCtrl" />
|
|
50
|
+
<ga-select gaFormFieldIgnore [formControl]="auxCtrl">...</ga-select>
|
|
51
|
+
</ga-form-field>
|
|
52
|
+
```
|
|
53
|
+
|
|
42
54
|
## `[gaError]`
|
|
43
55
|
|
|
44
56
|
Directive for defining error message templates. Displays the template when the specified error key exists on the control. Does not set errors; only provides the message display for existing errors.
|
|
@@ -69,12 +81,12 @@ Standalone directive for connecting form controls to form field labels. Import `
|
|
|
69
81
|
|
|
70
82
|
## Signal Forms Support
|
|
71
83
|
|
|
72
|
-
The form field works with Angular Signal Forms (`[formField]` directive)
|
|
84
|
+
The form field works with Angular Signal Forms (`[formField]` directive):
|
|
73
85
|
|
|
74
86
|
```html
|
|
75
87
|
<ga-form-field>
|
|
76
88
|
<ga-label>Email</ga-label>
|
|
77
|
-
<input
|
|
89
|
+
<input gaInput [formField]="myForm.email" />
|
|
78
90
|
</ga-form-field>
|
|
79
91
|
```
|
|
80
92
|
|
|
@@ -93,7 +105,7 @@ Complete form field
|
|
|
93
105
|
```html
|
|
94
106
|
<ga-form-field>
|
|
95
107
|
<ga-label state="(optional)" definition="Help text">Field Label</ga-label>
|
|
96
|
-
<input
|
|
108
|
+
<input gaInput [(ngModel)]="value" required />
|
|
97
109
|
<ga-info>Additional information</ga-info>
|
|
98
110
|
<ng-template gaError="required">This field is required</ng-template>
|
|
99
111
|
</ga-form-field>
|
|
@@ -105,7 +117,6 @@ Manually setting errors with gaFormControlErrors
|
|
|
105
117
|
<ga-form-field>
|
|
106
118
|
<ga-label>Password</ga-label>
|
|
107
119
|
<input
|
|
108
|
-
gaFormControl
|
|
109
120
|
gaInput
|
|
110
121
|
[gaFormControlErrors]="{ weakPassword: isPasswordWeak ? 'Password too weak' : null }"
|
|
111
122
|
[(ngModel)]="password"
|
|
@@ -155,7 +166,7 @@ Global error override behavior
|
|
|
155
166
|
```html
|
|
156
167
|
<ga-form-field>
|
|
157
168
|
<ga-label>Password</ga-label>
|
|
158
|
-
<input
|
|
169
|
+
<input gaInput [(ngModel)]="password" required minlength="8" />
|
|
159
170
|
<!-- This custom template overrides the global 'required' error -->
|
|
160
171
|
<ng-template gaError="required">Password is required</ng-template>
|
|
161
172
|
<!-- The 'minlength' error will use the global message if configured -->
|
|
@@ -175,7 +186,7 @@ emailForm = form(this.model, (schemaPath) => {
|
|
|
175
186
|
```html
|
|
176
187
|
<ga-form-field>
|
|
177
188
|
<ga-label>Email</ga-label>
|
|
178
|
-
<input
|
|
189
|
+
<input gaInput [formField]="emailForm.email" />
|
|
179
190
|
<!-- No gaError templates needed — messages from validators are used automatically -->
|
|
180
191
|
</ga-form-field>
|
|
181
192
|
```
|
package/docs/text-area.md
CHANGED
package/docs/textarea.md
CHANGED