@flusys/ng-ui 8.1.5 → 9.0.1
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/README.md +48 -3
- package/fesm2022/flusys-ng-ui.mjs +1068 -736
- package/fesm2022/flusys-ng-ui.mjs.map +1 -1
- package/package.json +8 -5
- package/themes/tailwind.scss +11 -7
- package/types/flusys-ng-ui.d.ts +114 -30
package/README.md
CHANGED
|
@@ -161,6 +161,19 @@ export class SomePage {}
|
|
|
161
161
|
|
|
162
162
|
---
|
|
163
163
|
|
|
164
|
+
## Disabled State
|
|
165
|
+
|
|
166
|
+
Every component with a `disabled` input handles it the same way:
|
|
167
|
+
|
|
168
|
+
- **Form controls** (`select`, `multiselect`, `checkbox`, `radiobutton`, `toggleswitch`, `togglebutton`, `selectbutton`, `password`, `inputnumber`, `inputotp`, `datepicker`, `autocomplete`, `cascadeselect`, `treeselect`, `colorpicker`, `listbox`, `rating`, `knob`, `slider`) expose `isDisabled()`, which combines the `disabled` input with `setDisabledState()`. That covers `[formField]`, `FormControl.disable()` and `[(ngModel)] [disabled]`.
|
|
169
|
+
- **Host clicks are blocked while disabled.** Buttons, `fButton`, split buttons, speed dial, chips, tabs, accordion headers, inplace, file upload, tree, order list, pick list, organization chart and all of the form controls above swallow clicks and middle-clicks in the capture phase, so a consumer's `(click)` or `routerLink` on the host never fires while the component is disabled.
|
|
170
|
+
- **`fButton` on non-button hosts** (e.g. `<a fButton routerLink>`) also drops out of the tab order while disabled or loading, and restores the consumer's own `tabindex` afterwards.
|
|
171
|
+
- **Disabled menu items** in `menu`, `menubar`, `tieredmenu`, `contextmenu`, `megamenu`, `panelmenu` and `breadcrumb` render with no `href`, don't navigate, and don't run `command`.
|
|
172
|
+
|
|
173
|
+
Use `(onChange)` to react to value changes, not `(click)` on the host: a `<label>` click re-dispatches a second click to the inner input.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
164
177
|
## Buttons & Actions
|
|
165
178
|
|
|
166
179
|
### ButtonComponent
|
|
@@ -183,6 +196,8 @@ Attribute-directive version of the button — apply button styling to a native `
|
|
|
183
196
|
|
|
184
197
|
Key inputs: `severity`, `text`, `outlined`, `link`, `rounded`, `raised`, `fluid`, `disabled`, `loading`, `size`, `label`, `icon`, `iconPos`, `ariaLabel`, `plain`.
|
|
185
198
|
|
|
199
|
+
`icon` and `loadingIcon` are Lucide names (same as `ui-icon`); the directive renders a real `ui-icon` before or after the label, and a spinning `loader-circle` while `loading`.
|
|
200
|
+
|
|
186
201
|
### SplitButtonComponent
|
|
187
202
|
|
|
188
203
|
Primary action button with an attached dropdown menu. Selector: `f-splitbutton`.
|
|
@@ -378,7 +393,21 @@ File upload with drag-drop, auto-upload, and progress. Selector: `f-fileupload`.
|
|
|
378
393
|
<f-fileupload accept="image/*" [maxFileSize]="2000000" [multiple]="true" (onSelect)="onFilesSelected($event)" (onError)="onUploadError($event)" />
|
|
379
394
|
```
|
|
380
395
|
|
|
381
|
-
Key inputs: `name`, `accept`, `multiple`, `auto`, `maxFileSize`, `fileLimit`, `disabled`, `url`, `customUpload`, `
|
|
396
|
+
Key inputs: `name`, `accept`, `multiple`, `auto`, `maxFileSize`, `fileLimit`, `disabled`, `url`, `customUpload`, `mode` (`advanced | basic`). Outputs: `onSelect` (`FileSelectEvent`), `onRemove` (`FileRemoveEvent`), `onClear`, `onError` (`FileErrorEvent[]`).
|
|
397
|
+
|
|
398
|
+
Text inputs (English defaults — bind translated strings): `chooseLabel`, `uploadLabel`, `cancelLabel`, `removeLabel` (per-file remove button's accessible name), `dragDropLabel`, `dragDropHintLabel`.
|
|
399
|
+
|
|
400
|
+
Pass `<ng-template #content>` (or `fTemplate="content"`) to replace the default drop zone and file list in advanced mode. Drag-and-drop still works on the wrapper. Context (`FileUploadContentContext`): `$implicit`/`files`, `items`, `disabled`, `removeFile(file)`, `clear()`.
|
|
401
|
+
|
|
402
|
+
```html
|
|
403
|
+
<f-fileupload [chooseLabel]="'storage.button.choose.file' | translate">
|
|
404
|
+
<ng-template #content let-files let-removeFile="removeFile">
|
|
405
|
+
@for (file of files; track file.name) {
|
|
406
|
+
<button fButton [text]="true" [ariaLabel]="'shared.remove' | translate" (click)="removeFile(file)">{{ file.name }}</button>
|
|
407
|
+
}
|
|
408
|
+
</ng-template>
|
|
409
|
+
</f-fileupload>
|
|
410
|
+
```
|
|
382
411
|
|
|
383
412
|
### AutoCompleteComponent
|
|
384
413
|
|
|
@@ -388,7 +417,23 @@ Type-ahead input backed by an async or static suggestion list. Selector: `f-auto
|
|
|
388
417
|
<f-autocomplete [suggestions]="filteredUsers()" field="name" [(ngModel)]="selectedUser" (completeMethod)="search($event.query)" />
|
|
389
418
|
```
|
|
390
419
|
|
|
391
|
-
Key inputs: `suggestions`, `field`, `placeholder`, `disabled`, `dropdown`, `forceSelection`, `multiple`, `delay`, `minLength`, `invalid`, `touched`, `appendTo` (`self | body`). Outputs: `completeMethod` (`AutoCompleteCompleteEvent`), `onSelect` (`AutoCompleteSelectEvent`), `onUnselect`, `onClear`, `onChange`.
|
|
420
|
+
Key inputs: `suggestions`, `field`, `placeholder`, `ariaLabel`, `disabled`, `dropdown`, `forceSelection`, `multiple`, `delay`, `minLength`, `completeOnFocus`, `freeText`, `filterLocally`, `invalid`, `touched`, `appendTo` (`self | body`). Outputs: `completeMethod` (`AutoCompleteCompleteEvent`), `onSelect` (`AutoCompleteSelectEvent`), `onUnselect`, `onClear`, `onChange`.
|
|
421
|
+
|
|
422
|
+
**Editable combobox (free text + suggestions).** By default only a picked suggestion reaches the model; typed text stays in the input. `freeText` writes every keystroke to the model (single mode), so the value can be anything the user types, with the suggestions as shortcuts. `filterLocally` filters a static `suggestions` list case-insensitively by the typed text, with no `completeMethod` handler needed (grouped lists are filtered per group, empty groups dropped). Focusing the input or pressing the dropdown button shows the full list again. In `freeText` mode the panel stays closed rather than showing the empty message when nothing matches, and clearing sets `''` instead of `null`.
|
|
423
|
+
|
|
424
|
+
```html
|
|
425
|
+
<f-autocomplete
|
|
426
|
+
freeText
|
|
427
|
+
filterLocally
|
|
428
|
+
completeOnFocus
|
|
429
|
+
dropdown
|
|
430
|
+
[minLength]="0"
|
|
431
|
+
[delay]="0"
|
|
432
|
+
[suggestions]="['input.email', 'loop.item', 'user.id']"
|
|
433
|
+
[ariaLabel]="'app.field' | translate"
|
|
434
|
+
[(ngModel)]="path"
|
|
435
|
+
/>
|
|
436
|
+
```
|
|
392
437
|
|
|
393
438
|
### ColorPickerComponent
|
|
394
439
|
|
|
@@ -478,7 +523,7 @@ Select input backed by a hierarchical tree of options. Selector: `f-treeselect`.
|
|
|
478
523
|
<f-treeselect [options]="orgTree" [(ngModel)]="selectedNode" selectionMode="checkbox" [filter]="true" />
|
|
479
524
|
```
|
|
480
525
|
|
|
481
|
-
Key inputs: `options` (`TreeNode[]`), `placeholder`, `disabled`, `filter`, `selectionMode` (`single | multiple | checkbox`), `invalid`, `touched`, `appendTo` (`self | body`).
|
|
526
|
+
Key inputs: `options` (`TreeNode[]`), `placeholder`, `inputId` (id of the trigger, for `<label for>`), `disabled`, `filter`, `filterBy`, `selectionMode` (`single | multiple | checkbox`), `propagateSelectionDown` / `propagateSelectionUp` (checkbox cascading), `invalid`, `touched`, `appendTo` (`self | body`). A node with `selectable: false` is a heading: clicking it expands or collapses it, and it never becomes part of the value.
|
|
482
527
|
|
|
483
528
|
### IconFieldComponent / InputIconComponent
|
|
484
529
|
|