@truenas/ui-components 0.3.0 → 0.3.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/package.json
CHANGED
|
@@ -2155,6 +2155,144 @@ declare class TnChipComponent implements AfterViewInit, OnDestroy {
|
|
|
2155
2155
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnChipComponent, "tn-chip", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; }, { "onClose": "onClose"; "onClick": "onClick"; }, never, never, true, never>;
|
|
2156
2156
|
}
|
|
2157
2157
|
|
|
2158
|
+
/**
|
|
2159
|
+
* Harness for interacting with tn-chip in tests.
|
|
2160
|
+
* Provides methods for reading chip state and simulating user interactions
|
|
2161
|
+
* (selecting the chip and dismissing a closable chip).
|
|
2162
|
+
*
|
|
2163
|
+
* @example
|
|
2164
|
+
* ```typescript
|
|
2165
|
+
* // Find a chip by label and click it
|
|
2166
|
+
* const chip = await loader.getHarness(TnChipHarness.with({ label: 'Active' }));
|
|
2167
|
+
* await chip.click();
|
|
2168
|
+
*
|
|
2169
|
+
* // Dismiss a closable chip
|
|
2170
|
+
* const filter = await loader.getHarness(TnChipHarness.with({ label: 'Has SSH Access' }));
|
|
2171
|
+
* if (await filter.isClosable()) {
|
|
2172
|
+
* await filter.close();
|
|
2173
|
+
* }
|
|
2174
|
+
* ```
|
|
2175
|
+
*/
|
|
2176
|
+
declare class TnChipHarness extends ComponentHarness {
|
|
2177
|
+
/**
|
|
2178
|
+
* The selector for the host element of a `TnChipComponent` instance.
|
|
2179
|
+
*/
|
|
2180
|
+
static hostSelector: string;
|
|
2181
|
+
private _chip;
|
|
2182
|
+
private _label;
|
|
2183
|
+
private _icon;
|
|
2184
|
+
private _closeButton;
|
|
2185
|
+
/**
|
|
2186
|
+
* Gets a `HarnessPredicate` that can be used to search for a chip
|
|
2187
|
+
* with specific attributes.
|
|
2188
|
+
*
|
|
2189
|
+
* @param options Options for filtering which chip instances are considered a match.
|
|
2190
|
+
* @returns A `HarnessPredicate` configured with the given options.
|
|
2191
|
+
*
|
|
2192
|
+
* @example
|
|
2193
|
+
* ```typescript
|
|
2194
|
+
* // Find chip by exact label
|
|
2195
|
+
* const chip = await loader.getHarness(TnChipHarness.with({ label: 'Production' }));
|
|
2196
|
+
*
|
|
2197
|
+
* // Find chip with regex pattern
|
|
2198
|
+
* const chip = await loader.getHarness(TnChipHarness.with({ label: /access/i }));
|
|
2199
|
+
* ```
|
|
2200
|
+
*/
|
|
2201
|
+
static with(options?: ChipHarnessFilters): HarnessPredicate<TnChipHarness>;
|
|
2202
|
+
/**
|
|
2203
|
+
* Gets the chip's label text.
|
|
2204
|
+
*
|
|
2205
|
+
* @returns Promise resolving to the chip's text content.
|
|
2206
|
+
*
|
|
2207
|
+
* @example
|
|
2208
|
+
* ```typescript
|
|
2209
|
+
* const chip = await loader.getHarness(TnChipHarness);
|
|
2210
|
+
* expect(await chip.getLabel()).toBe('Active');
|
|
2211
|
+
* ```
|
|
2212
|
+
*/
|
|
2213
|
+
getLabel(): Promise<string>;
|
|
2214
|
+
/**
|
|
2215
|
+
* Gets the chip's color variant (`primary`, `secondary`, or `accent`).
|
|
2216
|
+
*
|
|
2217
|
+
* @returns Promise resolving to the chip's color.
|
|
2218
|
+
*
|
|
2219
|
+
* @example
|
|
2220
|
+
* ```typescript
|
|
2221
|
+
* const chip = await loader.getHarness(TnChipHarness);
|
|
2222
|
+
* expect(await chip.getColor()).toBe('primary');
|
|
2223
|
+
* ```
|
|
2224
|
+
*/
|
|
2225
|
+
getColor(): Promise<ChipColor>;
|
|
2226
|
+
/**
|
|
2227
|
+
* Checks whether the chip is disabled.
|
|
2228
|
+
*
|
|
2229
|
+
* @returns Promise resolving to true if the chip is disabled.
|
|
2230
|
+
*
|
|
2231
|
+
* @example
|
|
2232
|
+
* ```typescript
|
|
2233
|
+
* const chip = await loader.getHarness(TnChipHarness);
|
|
2234
|
+
* expect(await chip.isDisabled()).toBe(false);
|
|
2235
|
+
* ```
|
|
2236
|
+
*/
|
|
2237
|
+
isDisabled(): Promise<boolean>;
|
|
2238
|
+
/**
|
|
2239
|
+
* Checks whether the chip renders a close (dismiss) button.
|
|
2240
|
+
*
|
|
2241
|
+
* @returns Promise resolving to true if the chip is closable.
|
|
2242
|
+
*
|
|
2243
|
+
* @example
|
|
2244
|
+
* ```typescript
|
|
2245
|
+
* const chip = await loader.getHarness(TnChipHarness);
|
|
2246
|
+
* expect(await chip.isClosable()).toBe(true);
|
|
2247
|
+
* ```
|
|
2248
|
+
*/
|
|
2249
|
+
isClosable(): Promise<boolean>;
|
|
2250
|
+
/**
|
|
2251
|
+
* Checks whether the chip renders a leading icon.
|
|
2252
|
+
*
|
|
2253
|
+
* @returns Promise resolving to true if the chip has an icon.
|
|
2254
|
+
*
|
|
2255
|
+
* @example
|
|
2256
|
+
* ```typescript
|
|
2257
|
+
* const chip = await loader.getHarness(TnChipHarness);
|
|
2258
|
+
* expect(await chip.hasIcon()).toBe(true);
|
|
2259
|
+
* ```
|
|
2260
|
+
*/
|
|
2261
|
+
hasIcon(): Promise<boolean>;
|
|
2262
|
+
/**
|
|
2263
|
+
* Clicks the chip body, triggering its `onClick` output.
|
|
2264
|
+
*
|
|
2265
|
+
* @returns Promise that resolves when the click action is complete.
|
|
2266
|
+
*
|
|
2267
|
+
* @example
|
|
2268
|
+
* ```typescript
|
|
2269
|
+
* const chip = await loader.getHarness(TnChipHarness.with({ label: 'Active' }));
|
|
2270
|
+
* await chip.click();
|
|
2271
|
+
* ```
|
|
2272
|
+
*/
|
|
2273
|
+
click(): Promise<void>;
|
|
2274
|
+
/**
|
|
2275
|
+
* Clicks the chip's close button, triggering its `onClose` output.
|
|
2276
|
+
* Throws if the chip is not closable.
|
|
2277
|
+
*
|
|
2278
|
+
* @returns Promise that resolves when the close action is complete.
|
|
2279
|
+
*
|
|
2280
|
+
* @example
|
|
2281
|
+
* ```typescript
|
|
2282
|
+
* const chip = await loader.getHarness(TnChipHarness.with({ label: 'Has SSH Access' }));
|
|
2283
|
+
* await chip.close();
|
|
2284
|
+
* ```
|
|
2285
|
+
*/
|
|
2286
|
+
close(): Promise<void>;
|
|
2287
|
+
}
|
|
2288
|
+
/**
|
|
2289
|
+
* A set of criteria that can be used to filter a list of `TnChipHarness` instances.
|
|
2290
|
+
*/
|
|
2291
|
+
interface ChipHarnessFilters extends BaseHarnessFilters {
|
|
2292
|
+
/** Filters by the chip's label text. Supports string or regex matching. */
|
|
2293
|
+
label?: string | RegExp;
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2158
2296
|
declare class TnCardHeaderDirective {
|
|
2159
2297
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnCardHeaderDirective, never>;
|
|
2160
2298
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnCardHeaderDirective, "[tnCardHeader]", never, {}, {}, never, never, true, never>;
|
|
@@ -7845,5 +7983,5 @@ declare const TN_THEME_DEFINITIONS: readonly TnThemeDefinition[];
|
|
|
7845
7983
|
*/
|
|
7846
7984
|
declare const THEME_MAP: Map<TnTheme, TnThemeDefinition>;
|
|
7847
7985
|
|
|
7848
|
-
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, TnCardHeaderDirective, TnCellDefDirective, TnCheckboxComponent, TnCheckboxHarness, TnCheckboxLabelDirective, TnChipComponent, TnConfirmDialogComponent, TnDateInputComponent, TnDateInputHarness, TnDateRangeInputComponent, TnDateRangeInputHarness, TnDetailRowDefDirective, TnDialog, TnDialogHarness, TnDialogShellComponent, TnDialogTesting, TnDividerComponent, TnDividerDirective, TnDrawerComponent, TnDrawerContainerComponent, TnDrawerContainerHarness, TnDrawerContentComponent, TnDrawerHarness, TnEmptyComponent, TnEmptyHarness, TnExpansionPanelComponent, TnExpansionPanelHarness, TnFilePickerComponent, TnFilePickerPopupComponent, TnFormFieldComponent, TnFormFieldHarness, 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, createLucideLibrary, createShortcut, defaultSpriteBasePath, defaultSpriteConfigPath, formatSize, kebabTestSegment, labelMarkupToHtml, labelMarkupToText, libIconMarker, parseLabelMarkup, parseSize, registerLucideIcons, scopeTestId, setupLucideIntegration, tnIconMarker, writeTestId };
|
|
7849
|
-
export type { AutocompleteHarnessFilters, BannerHarnessFilters, ButtonHarnessFilters, ButtonToggleHarnessFilters, CalendarCell, CheckboxHarnessFilters, ChipColor, CreateFolderEvent, DateInputHarnessFilters, DateRange, DateRangeInputHarnessFilters, DialogHarnessFilters, EmptyHarnessFilters, ExpansionPanelHarnessFilters, FilePickerCallbacks, FilePickerError, FilePickerMode, FileSystemItem, FormFieldHarnessFilters, 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, 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 };
|
|
7986
|
+
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, TnCardHeaderDirective, TnCellDefDirective, TnCheckboxComponent, TnCheckboxHarness, TnCheckboxLabelDirective, TnChipComponent, TnChipHarness, TnConfirmDialogComponent, TnDateInputComponent, TnDateInputHarness, TnDateRangeInputComponent, TnDateRangeInputHarness, TnDetailRowDefDirective, TnDialog, TnDialogHarness, TnDialogShellComponent, TnDialogTesting, TnDividerComponent, TnDividerDirective, TnDrawerComponent, TnDrawerContainerComponent, TnDrawerContainerHarness, TnDrawerContentComponent, TnDrawerHarness, TnEmptyComponent, TnEmptyHarness, TnExpansionPanelComponent, TnExpansionPanelHarness, TnFilePickerComponent, TnFilePickerPopupComponent, TnFormFieldComponent, TnFormFieldHarness, 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, createLucideLibrary, createShortcut, defaultSpriteBasePath, defaultSpriteConfigPath, formatSize, kebabTestSegment, labelMarkupToHtml, labelMarkupToText, libIconMarker, parseLabelMarkup, parseSize, registerLucideIcons, scopeTestId, setupLucideIntegration, tnIconMarker, writeTestId };
|
|
7987
|
+
export type { AutocompleteHarnessFilters, BannerHarnessFilters, ButtonHarnessFilters, ButtonToggleHarnessFilters, CalendarCell, CheckboxHarnessFilters, ChipColor, ChipHarnessFilters, CreateFolderEvent, DateInputHarnessFilters, DateRange, DateRangeInputHarnessFilters, DialogHarnessFilters, EmptyHarnessFilters, ExpansionPanelHarnessFilters, FilePickerCallbacks, FilePickerError, FilePickerMode, FileSystemItem, FormFieldHarnessFilters, 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, 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 };
|