@truenas/ui-components 0.8.16 → 0.8.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truenas/ui-components",
3
- "version": "0.8.16",
3
+ "version": "0.8.18",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org",
6
6
  "access": "public"
@@ -7558,10 +7558,13 @@ export declare class TnTabComponent implements AfterContentInit {
7558
7558
  selectTab: (index: number) => void;
7559
7559
  };
7560
7560
  elementRef: ElementRef<any>;
7561
+ private tabButton;
7561
7562
  protected hasIconContent: import("@angular/core").WritableSignal<boolean>;
7562
7563
  ngAfterContentInit(): void;
7563
7564
  onClick(): void;
7564
7565
  onKeydown(event: KeyboardEvent): void;
7566
+ /** Focuses the `button[role="tab"]`; the `tn-tab` host has no tabindex and cannot take focus. */
7567
+ focus(): void;
7565
7568
  classes: import("@angular/core").Signal<string>;
7566
7569
  tabIndex: import("@angular/core").Signal<-1 | 0>;
7567
7570
  /** This tab's own id, which its panel points back at with `aria-labelledby`. */
@@ -18362,6 +18365,11 @@ export declare class TnFilePickerComponent implements ControlValueAccessor, OnIn
18362
18365
  * path to the popup.
18363
18366
  */
18364
18367
  openOnClick: import("@angular/core").InputSignal<boolean>;
18368
+ /**
18369
+ * Left at its English default, the input shows
18370
+ * `TN_FILE_PICKER_LABELS.placeholder` instead, so an app-root labels
18371
+ * provider translates it; any other value is shown as given.
18372
+ */
18365
18373
  placeholder: import("@angular/core").InputSignal<string>;
18366
18374
  disabled: import("@angular/core").InputSignal<boolean>;
18367
18375
  /**
@@ -18446,6 +18454,8 @@ export declare class TnFilePickerComponent implements ControlValueAccessor, OnIn
18446
18454
  * on disk after it was listed.
18447
18455
  */
18448
18456
  private listedItems;
18457
+ protected readonly labels: import("@angular/core").Signal<import("@truenas/ui-components").TnFilePickerLabels>;
18458
+ protected readonly resolvedPlaceholder: import("@angular/core").Signal<string>;
18449
18459
  isDisabled: import("@angular/core").Signal<boolean>;
18450
18460
  private effectiveCallbacks;
18451
18461
  private effectiveStartPath;
@@ -18696,6 +18706,70 @@ export declare class TnFilePickerComponent implements ControlValueAccessor, OnIn
18696
18706
  "error": "error";
18697
18707
  }, never, never, true, never>;
18698
18708
  }
18709
+ /**
18710
+ * Every string `tn-file-picker` and its popup render or announce. Consumers
18711
+ * translate them once at the app root by providing `TN_FILE_PICKER_LABELS` —
18712
+ * typically wired to an i18n service — instead of per call site. A
18713
+ * `placeholder` input bound to anything but its English default wins over
18714
+ * `placeholder` here.
18715
+ *
18716
+ * Strings that carry a value (a count, a path, a name) are functions, so the
18717
+ * consumer decides how to place it: a word order, an ICU plural, a translated
18718
+ * template — the library imposes no placeholder syntax.
18719
+ */
18720
+ export interface TnFilePickerLabels {
18721
+ /** Empty path input. */
18722
+ placeholder: string;
18723
+ /** Accessible name of the folder button that opens the popup. */
18724
+ openPicker: string;
18725
+ /** Accessible name of the breadcrumb `nav`. */
18726
+ breadcrumb: string;
18727
+ /** Accessible name of a collapsed (`…`) or nameless breadcrumb segment. */
18728
+ navigateTo: (path: string) => string;
18729
+ loading: string;
18730
+ /** The listing's empty state. */
18731
+ noItems: string;
18732
+ /** Visually hidden header of the multi-select checkbox column. */
18733
+ selectColumn: string;
18734
+ /** Accessible name of an item's multi-select checkbox. */
18735
+ selectItem: (name: string) => string;
18736
+ /** Accessible name and tooltip of a directory's open (chevron) button. */
18737
+ openItem: (name: string) => string;
18738
+ nameColumn: string;
18739
+ sizeColumn: string;
18740
+ modifiedColumn: string;
18741
+ /** Footer, while items are picked. */
18742
+ itemsSelected: (count: number) => string;
18743
+ /** Footer, when the browsed directory itself would be picked. */
18744
+ currentDirectorySelected: string;
18745
+ /** Footer, when nothing is picked and the directory cannot be. */
18746
+ noItemsSelected: string;
18747
+ clearSelection: string;
18748
+ /** The footer button that applies the selection. */
18749
+ select: string;
18750
+ /** Accessible name of the inline creation row's input, from the action's label. */
18751
+ inlineCreateName: (actionLabel: string) => string;
18752
+ /** Inline creation row, when the `create` callback rejects with something other than an Error. */
18753
+ inlineCreateFailed: string;
18754
+ /** Modified column, for an item changed today / yesterday; `time` is already formatted. */
18755
+ today: (time: string) => string;
18756
+ yesterday: (time: string) => string;
18757
+ /** Error messages — shown in the popup and carried by the `error` output. */
18758
+ pathOutsideRoot: (rootPath: string) => string;
18759
+ invalidPath: (path: string) => string;
18760
+ pathValidationFailed: string;
18761
+ loadFailed: string;
18762
+ createFailed: string;
18763
+ createdOutsideRoot: (rootPath: string) => string;
18764
+ }
18765
+ /** English defaults used when no `TN_FILE_PICKER_LABELS` provider is registered. */
18766
+ export declare const TN_FILE_PICKER_DEFAULT_LABELS: TnFilePickerLabels;
18767
+ /**
18768
+ * DI token for app-wide file picker labels. Provide either a static object or a
18769
+ * `Signal<TnFilePickerLabels>` — the latter lets an open picker follow a
18770
+ * language change.
18771
+ */
18772
+ export declare const TN_FILE_PICKER_LABELS: InjectionToken<TnFilePickerLabels | Signal<TnFilePickerLabels>>;
18699
18773
  /**
18700
18774
  * Harness for interacting with tn-file-picker in tests.
18701
18775
  *
@@ -19022,6 +19096,7 @@ export declare class TnFilePickerPopupComponent {
19022
19096
  * one popup can be open at a time.
19023
19097
  */
19024
19098
  testIdBase: import("@angular/core").InputSignal<TnTestIdValue>;
19099
+ protected readonly labels: import("@angular/core").Signal<import("@truenas/ui-components").TnFilePickerLabels>;
19025
19100
  private iconRegistry;
19026
19101
  private elementRef;
19027
19102
  constructor();