@truenas/ui-components 0.3.16 → 0.3.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.3.16",
3
+ "version": "0.3.18",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org",
6
6
  "access": "public"
@@ -7979,10 +7979,12 @@ declare class TnStepComponent {
7979
7979
  optional: _angular_core.InputSignal<boolean>;
7980
7980
  completed: _angular_core.InputSignal<boolean>;
7981
7981
  hasError: _angular_core.InputSignal<boolean>;
7982
+ /** Message shown beneath the step label while the step is in an error state. */
7983
+ errorMessage: _angular_core.InputSignal<string | undefined>;
7982
7984
  data: _angular_core.InputSignal<unknown>;
7983
7985
  content: _angular_core.Signal<TemplateRef<unknown>>;
7984
7986
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnStepComponent, never>;
7985
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnStepComponent, "tn-step", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "optional": { "alias": "optional"; "required": false; "isSignal": true; }; "completed": { "alias": "completed"; "required": false; "isSignal": true; }; "hasError": { "alias": "hasError"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
7987
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnStepComponent, "tn-step", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "optional": { "alias": "optional"; "required": false; "isSignal": true; }; "completed": { "alias": "completed"; "required": false; "isSignal": true; }; "hasError": { "alias": "hasError"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
7986
7988
  }
7987
7989
 
7988
7990
  declare class TnStepperComponent {
@@ -8004,11 +8006,14 @@ declare class TnStepperComponent {
8004
8006
  data: unknown;
8005
8007
  }[]>;
8006
8008
  steps: _angular_core.Signal<readonly TnStepComponent[]>;
8007
- private cdr;
8009
+ readonly maxReachedIndex: _angular_core.WritableSignal<number>;
8008
8010
  constructor();
8009
- onWindowResize(_event: Event): void;
8011
+ onWindowResize(): void;
8010
8012
  private _getStepData;
8011
- isWideScreen: _angular_core.Signal<boolean>;
8013
+ private isWideScreen;
8014
+ isVertical: _angular_core.Signal<boolean>;
8015
+ readonly stepEditable: _angular_core.Signal<boolean[]>;
8016
+ readonly stepGated: _angular_core.Signal<boolean[]>;
8012
8017
  selectStep(index: number): void;
8013
8018
  canSelectStep(index: number): boolean;
8014
8019
  next(): void;
@@ -8018,6 +8023,87 @@ declare class TnStepperComponent {
8018
8023
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnStepperComponent, "tn-stepper", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "linear": { "alias": "linear"; "required": false; "isSignal": true; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; }, { "selectedIndex": "selectedIndexChange"; "selectionChange": "selectionChange"; "completed": "completed"; }, ["steps"], never, true, never>;
8019
8024
  }
8020
8025
 
8026
+ /**
8027
+ * Advances the ancestor `<tn-stepper>` to the next step when the host is clicked.
8028
+ *
8029
+ * Mirrors Angular Material's `matStepperNext`. Place it on a button (native
8030
+ * `<button>` or `<tn-button>`) rendered inside a `<tn-step>` — including step
8031
+ * content that lives in a projected child component. The directive resolves the
8032
+ * stepper through the element injector, so a disabled host simply emits no click
8033
+ * and navigation is naturally gated.
8034
+ *
8035
+ * @example
8036
+ * ```html
8037
+ * <tn-button [tnStepperNext] [disabled]="form.invalid" [label]="'Next' | translate" />
8038
+ * ```
8039
+ */
8040
+ declare class TnStepperNextDirective {
8041
+ protected stepper: TnStepperComponent;
8042
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnStepperNextDirective, never>;
8043
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnStepperNextDirective, "[tnStepperNext]", never, {}, {}, never, never, true, never>;
8044
+ }
8045
+
8046
+ /**
8047
+ * Moves the ancestor `<tn-stepper>` to the previous step when the host is clicked.
8048
+ *
8049
+ * Mirrors Angular Material's `matStepperPrevious`. Place it on a button (native
8050
+ * `<button>` or `<tn-button>`) rendered inside a `<tn-step>` — including step
8051
+ * content that lives in a projected child component. The directive resolves the
8052
+ * stepper through the element injector.
8053
+ *
8054
+ * @example
8055
+ * ```html
8056
+ * <tn-button [tnStepperPrevious] [label]="'Back' | translate" />
8057
+ * ```
8058
+ */
8059
+ declare class TnStepperPreviousDirective {
8060
+ protected stepper: TnStepperComponent;
8061
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnStepperPreviousDirective, never>;
8062
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnStepperPreviousDirective, "[tnStepperPrevious]", never, {}, {}, never, never, true, never>;
8063
+ }
8064
+
8065
+ /**
8066
+ * Harness for interacting with `tn-stepper` in tests.
8067
+ *
8068
+ * @example
8069
+ * ```typescript
8070
+ * const stepper = await loader.getHarness(TnStepperHarness);
8071
+ * expect(await stepper.getStepLabels()).toEqual(['Provider', 'What and When']);
8072
+ * expect(await stepper.getSelectedIndex()).toBe(0);
8073
+ * await stepper.selectStep(1);
8074
+ * ```
8075
+ */
8076
+ declare class TnStepperHarness extends ComponentHarness {
8077
+ /** The selector for the host element of a `TnStepperComponent` instance. */
8078
+ static hostSelector: string;
8079
+ /**
8080
+ * Gets a `HarnessPredicate` used to search for a stepper with specific attributes.
8081
+ *
8082
+ * @param options Options for filtering which stepper instances are considered a match.
8083
+ */
8084
+ static with(options?: StepperHarnessFilters): HarnessPredicate<TnStepperHarness>;
8085
+ private headers;
8086
+ /** Gets the number of steps. */
8087
+ getStepCount(): Promise<number>;
8088
+ /** Gets all step labels as strings, in order. */
8089
+ getStepLabels(): Promise<string[]>;
8090
+ /** Gets the zero-based index of the currently selected step, or -1 if none. */
8091
+ getSelectedIndex(): Promise<number>;
8092
+ /** Whether the step at `index` is marked completed. */
8093
+ isStepCompleted(index: number): Promise<boolean>;
8094
+ /** Whether the step at `index` is marked as having an error. */
8095
+ isStepError(index: number): Promise<boolean>;
8096
+ /** Selects the step at `index` by clicking its header. Respects linear gating. */
8097
+ selectStep(index: number): Promise<void>;
8098
+ /** Gets the orientation of the stepper. */
8099
+ getOrientation(): Promise<'horizontal' | 'vertical'>;
8100
+ }
8101
+ /** A set of criteria for filtering a list of `TnStepperHarness` instances. */
8102
+ interface StepperHarnessFilters extends BaseHarnessFilters {
8103
+ /** Filters by stepper orientation. */
8104
+ orientation?: 'horizontal' | 'vertical';
8105
+ }
8106
+
8021
8107
  declare class TnFilePickerComponent implements ControlValueAccessor, OnInit, OnDestroy {
8022
8108
  mode: _angular_core.InputSignal<FilePickerMode>;
8023
8109
  multiSelect: _angular_core.InputSignal<boolean>;
@@ -8736,5 +8822,5 @@ declare const TN_THEME_DEFINITIONS: readonly TnThemeDefinition[];
8736
8822
  */
8737
8823
  declare const THEME_MAP: Map<TnTheme, TnThemeDefinition>;
8738
8824
 
8739
- export { CommonShortcuts, DEFAULT_THEME, DiskIconComponent, DiskType, FileSizePipe, InputType, LIGHT_THEME, LabelMarkupPipe, LabelTextPipe, LinuxModifierKeys, LinuxShortcuts, ModifierKeys, QuickShortcuts, ShortcutBuilder, StripMntPrefixPipe, THEME_MAP, THEME_STORAGE_KEY, TN_FORM_FIELD_ERRORS, TN_TABLE_PAGER_DEFAULT_LABELS, TN_TABLE_PAGER_LABELS, TN_TEST_ATTR, TN_THEME_DEFINITIONS, TnAutocompleteComponent, TnAutocompleteHarness, TnBannerActionDirective, TnBannerComponent, TnBannerHarness, TnBrandedSpinnerComponent, TnButtonComponent, TnButtonHarness, TnButtonToggleComponent, TnButtonToggleGroupComponent, TnButtonToggleGroupHarness, TnButtonToggleHarness, TnCalendarComponent, TnCalendarHeaderComponent, TnCardComponent, TnCardFooterActionsDirective, TnCardHeaderActionsDirective, TnCardHeaderDirective, TnCellDefDirective, TnCheckboxComponent, TnCheckboxHarness, TnCheckboxLabelDirective, TnChipComponent, TnChipHarness, TnChipInputComponent, TnChipInputHarness, TnConfirmDialogComponent, TnDateInputComponent, TnDateInputHarness, TnDateRangeInputComponent, TnDateRangeInputHarness, TnDetailRowDefDirective, TnDialog, TnDialogHarness, TnDialogShellComponent, TnDialogTesting, TnDividerComponent, TnDividerDirective, TnDrawerComponent, TnDrawerContainerComponent, TnDrawerContainerHarness, TnDrawerContentComponent, TnDrawerHarness, TnEmptyComponent, TnEmptyHarness, TnExpansionPanelComponent, TnExpansionPanelHarness, TnFileInputComponent, TnFileInputHarness, TnFilePickerComponent, TnFilePickerPopupComponent, TnFormFieldComponent, TnFormFieldHarness, TnFormSectionComponent, TnFormSectionHarness, TnHeaderCellDefDirective, TnIconButtonComponent, TnIconButtonHarness, TnIconComponent, TnIconHarness, TnIconRegistryService, TnIconTesting, TnInputComponent, TnInputDirective, TnInputHarness, TnKeyboardShortcutComponent, TnKeyboardShortcutService, TnListAvatarDirective, TnListComponent, TnListIconDirective, TnListItemComponent, TnListItemLineDirective, TnListItemPrimaryDirective, TnListItemSecondaryDirective, TnListItemTitleDirective, TnListItemTrailingDirective, TnListOptionComponent, TnListSubheaderComponent, TnMenuActivateHoverDirective, TnMenuComponent, TnMenuHarness, TnMenuItemComponent, TnMenuTesting, TnMenuTriggerDirective, TnMonthViewComponent, TnMultiYearViewComponent, TnNestedTreeNodeComponent, TnParticleProgressBarComponent, TnProgressBarComponent, TnRadioComponent, TnRadioHarness, TnSelectComponent, TnSelectHarness, TnSelectionListComponent, TnSidePanelActionDirective, TnSidePanelComponent, TnSidePanelHarness, TnSidePanelHeaderActionDirective, TnSlideToggleComponent, TnSlideToggleHarness, TnSliderComponent, TnSliderThumbDirective, TnSliderWithLabelDirective, TnSpinnerComponent, TnSpriteLoaderService, TnStepComponent, TnStepperComponent, TnTabComponent, TnTabHarness, TnTabPanelComponent, TnTabPanelHarness, TnTableColumnDirective, TnTableComponent, TnTableHarness, TnTablePagerComponent, TnTablePagerHarness, TnTabsComponent, TnTabsHarness, TnTestIdDirective, TnTheme, TnThemeService, TnTimeInputComponent, TnToastComponent, TnToastMock, TnToastPosition, TnToastRef, TnToastService, TnToastTesting, TnToastType, TnTooltipComponent, TnTooltipDirective, TnTreeComponent, TnTreeFlatDataSource, TnTreeFlattener, TnTreeNodeComponent, TnTreeNodeOutletDirective, TruncatePathPipe, WindowsModifierKeys, WindowsShortcuts, composeTestId, controlTestId, createLucideLibrary, createShortcut, defaultSpriteBasePath, defaultSpriteConfigPath, formatSize, kebabTestSegment, labelMarkupToHtml, labelMarkupToText, libIconMarker, parseLabelMarkup, parseSize, registerLucideIcons, scopeTestId, setupLucideIntegration, tnIconMarker, writeTestId };
8740
- export type { AutocompleteHarnessFilters, BannerHarnessFilters, ButtonHarnessFilters, ButtonToggleHarnessFilters, CalendarCell, CheckboxHarnessFilters, ChipColor, ChipHarnessFilters, CreateFolderEvent, DateInputHarnessFilters, DateRange, DateRangeInputHarnessFilters, DialogHarnessFilters, EmptyHarnessFilters, ExpansionPanelHarnessFilters, FileInputHarnessFilters, FilePickerCallbacks, FilePickerError, FilePickerMode, FileSystemItem, FormFieldHarnessFilters, FormSectionHarnessFilters, IconButtonHarnessFilters, IconHarnessFilters, IconLibrary, IconLibraryType, IconResult, IconSize, IconSource, IconTestingMockOverrides, InputHarnessFilters, KeyCombination, LabelMarkupSegment, LabelMarkupSegmentType, LabelType, LucideIconOptions, MenuHarnessFilters, MockIconRegistry, MockSpriteLoader, PathSegment, PlatformType, ProgressBarMode, RadioHarnessFilters, ResolvedIcon, SelectHarnessFilters, ShortcutHandler, SidePanelHarnessFilters, SizeStandard, SlideToggleColor, SlideToggleHarnessFilters, SpinnerMode, SpriteConfig, SubscriptSizing, TabChangeEvent, TabHarnessFilters, TabPanelHarnessFilters, TabsHarnessFilters, TnAutocompleteOption, TnBannerType, TnButtonToggleType, TnCardAction, TnCardControl, TnCardFooterLink, TnCardHeaderStatus, TnChipInputHarnessFilters, TnChipInputOption, TnConfirmDialogData, TnDialogDefaults, TnDialogOpenTarget, TnDrawerMode, TnDrawerPosition, TnEmptySize, TnFlatTreeNode, TnFormFieldErrorMessage, TnFormFieldErrorMessages, TnFormFieldErrorResolver, TnMenuItem, TnSelectOption, TnSelectOptionGroup, TnSelectionChange, TnSortEvent, TnTableDataProvider, TnTableDataSource, TnTableHarnessFilters, TnTablePagerHarnessFilters, TnTablePagerLabels, TnTablePagination, TnTestAttrName, TnTestIdValue, TnThemeDefinition, TnToastCall, TnToastConfig, TooltipPosition, YearCell };
8825
+ export { CommonShortcuts, DEFAULT_THEME, DiskIconComponent, DiskType, FileSizePipe, InputType, LIGHT_THEME, LabelMarkupPipe, LabelTextPipe, LinuxModifierKeys, LinuxShortcuts, ModifierKeys, QuickShortcuts, ShortcutBuilder, StripMntPrefixPipe, THEME_MAP, THEME_STORAGE_KEY, TN_FORM_FIELD_ERRORS, TN_TABLE_PAGER_DEFAULT_LABELS, TN_TABLE_PAGER_LABELS, TN_TEST_ATTR, TN_THEME_DEFINITIONS, TnAutocompleteComponent, TnAutocompleteHarness, TnBannerActionDirective, TnBannerComponent, TnBannerHarness, TnBrandedSpinnerComponent, TnButtonComponent, TnButtonHarness, TnButtonToggleComponent, TnButtonToggleGroupComponent, TnButtonToggleGroupHarness, TnButtonToggleHarness, TnCalendarComponent, TnCalendarHeaderComponent, TnCardComponent, TnCardFooterActionsDirective, TnCardHeaderActionsDirective, TnCardHeaderDirective, TnCellDefDirective, TnCheckboxComponent, TnCheckboxHarness, TnCheckboxLabelDirective, TnChipComponent, TnChipHarness, TnChipInputComponent, TnChipInputHarness, TnConfirmDialogComponent, TnDateInputComponent, TnDateInputHarness, TnDateRangeInputComponent, TnDateRangeInputHarness, TnDetailRowDefDirective, TnDialog, TnDialogHarness, TnDialogShellComponent, TnDialogTesting, TnDividerComponent, TnDividerDirective, TnDrawerComponent, TnDrawerContainerComponent, TnDrawerContainerHarness, TnDrawerContentComponent, TnDrawerHarness, TnEmptyComponent, TnEmptyHarness, TnExpansionPanelComponent, TnExpansionPanelHarness, TnFileInputComponent, TnFileInputHarness, TnFilePickerComponent, TnFilePickerPopupComponent, TnFormFieldComponent, TnFormFieldHarness, TnFormSectionComponent, TnFormSectionHarness, TnHeaderCellDefDirective, TnIconButtonComponent, TnIconButtonHarness, TnIconComponent, TnIconHarness, TnIconRegistryService, TnIconTesting, TnInputComponent, TnInputDirective, TnInputHarness, TnKeyboardShortcutComponent, TnKeyboardShortcutService, TnListAvatarDirective, TnListComponent, TnListIconDirective, TnListItemComponent, TnListItemLineDirective, TnListItemPrimaryDirective, TnListItemSecondaryDirective, TnListItemTitleDirective, TnListItemTrailingDirective, TnListOptionComponent, TnListSubheaderComponent, TnMenuActivateHoverDirective, TnMenuComponent, TnMenuHarness, TnMenuItemComponent, TnMenuTesting, TnMenuTriggerDirective, TnMonthViewComponent, TnMultiYearViewComponent, TnNestedTreeNodeComponent, TnParticleProgressBarComponent, TnProgressBarComponent, TnRadioComponent, TnRadioHarness, TnSelectComponent, TnSelectHarness, TnSelectionListComponent, TnSidePanelActionDirective, TnSidePanelComponent, TnSidePanelHarness, TnSidePanelHeaderActionDirective, TnSlideToggleComponent, TnSlideToggleHarness, TnSliderComponent, TnSliderThumbDirective, TnSliderWithLabelDirective, TnSpinnerComponent, TnSpriteLoaderService, TnStepComponent, TnStepperComponent, TnStepperHarness, TnStepperNextDirective, TnStepperPreviousDirective, TnTabComponent, TnTabHarness, TnTabPanelComponent, TnTabPanelHarness, TnTableColumnDirective, TnTableComponent, TnTableHarness, TnTablePagerComponent, TnTablePagerHarness, TnTabsComponent, TnTabsHarness, TnTestIdDirective, TnTheme, TnThemeService, TnTimeInputComponent, TnToastComponent, TnToastMock, TnToastPosition, TnToastRef, TnToastService, TnToastTesting, TnToastType, TnTooltipComponent, TnTooltipDirective, TnTreeComponent, TnTreeFlatDataSource, TnTreeFlattener, TnTreeNodeComponent, TnTreeNodeOutletDirective, TruncatePathPipe, WindowsModifierKeys, WindowsShortcuts, composeTestId, controlTestId, createLucideLibrary, createShortcut, defaultSpriteBasePath, defaultSpriteConfigPath, formatSize, kebabTestSegment, labelMarkupToHtml, labelMarkupToText, libIconMarker, parseLabelMarkup, parseSize, registerLucideIcons, scopeTestId, setupLucideIntegration, tnIconMarker, writeTestId };
8826
+ export type { AutocompleteHarnessFilters, BannerHarnessFilters, ButtonHarnessFilters, ButtonToggleHarnessFilters, CalendarCell, CheckboxHarnessFilters, ChipColor, ChipHarnessFilters, CreateFolderEvent, DateInputHarnessFilters, DateRange, DateRangeInputHarnessFilters, DialogHarnessFilters, EmptyHarnessFilters, ExpansionPanelHarnessFilters, FileInputHarnessFilters, FilePickerCallbacks, FilePickerError, FilePickerMode, FileSystemItem, FormFieldHarnessFilters, FormSectionHarnessFilters, IconButtonHarnessFilters, IconHarnessFilters, IconLibrary, IconLibraryType, IconResult, IconSize, IconSource, IconTestingMockOverrides, InputHarnessFilters, KeyCombination, LabelMarkupSegment, LabelMarkupSegmentType, LabelType, LucideIconOptions, MenuHarnessFilters, MockIconRegistry, MockSpriteLoader, PathSegment, PlatformType, ProgressBarMode, RadioHarnessFilters, ResolvedIcon, SelectHarnessFilters, ShortcutHandler, SidePanelHarnessFilters, SizeStandard, SlideToggleColor, SlideToggleHarnessFilters, SpinnerMode, SpriteConfig, StepperHarnessFilters, SubscriptSizing, TabChangeEvent, TabHarnessFilters, TabPanelHarnessFilters, TabsHarnessFilters, TnAutocompleteOption, TnBannerType, TnButtonToggleType, TnCardAction, TnCardControl, TnCardFooterLink, TnCardHeaderStatus, TnChipInputHarnessFilters, TnChipInputOption, TnConfirmDialogData, TnDialogDefaults, TnDialogOpenTarget, TnDrawerMode, TnDrawerPosition, TnEmptySize, TnFlatTreeNode, TnFormFieldErrorMessage, TnFormFieldErrorMessages, TnFormFieldErrorResolver, TnMenuItem, TnSelectOption, TnSelectOptionGroup, TnSelectionChange, TnSortEvent, TnTableDataProvider, TnTableDataSource, TnTableHarnessFilters, TnTablePagerHarnessFilters, TnTablePagerLabels, TnTablePagination, TnTestAttrName, TnTestIdValue, TnThemeDefinition, TnToastCall, TnToastConfig, TooltipPosition, YearCell };