@theseam/ui-common 1.0.2-beta.83 → 1.0.2-beta.84
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/carousel/index.d.ts +21 -1
- package/datatable/index.d.ts +299 -3
- package/datatable-alterations-display/index.d.ts +61 -1
- package/fesm2022/theseam-ui-common-carousel.mjs +48 -1
- package/fesm2022/theseam-ui-common-carousel.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs +197 -1
- package/fesm2022/theseam-ui-common-datatable-alterations-display.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-datatable.mjs +668 -4
- package/fesm2022/theseam-ui-common-datatable.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-file-input.mjs +156 -1
- package/fesm2022/theseam-ui-common-file-input.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-icon.mjs +72 -1
- package/fesm2022/theseam-ui-common-icon.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-tooltip.mjs +110 -1
- package/fesm2022/theseam-ui-common-tooltip.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-widget.mjs +23 -1
- package/fesm2022/theseam-ui-common-widget.mjs.map +1 -1
- package/file-input/index.d.ts +78 -1
- package/icon/index.d.ts +33 -3
- package/package.json +1 -1
- package/tooltip/index.d.ts +40 -2
- package/widget/index.d.ts +17 -2
package/file-input/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import * as _angular_core from '@angular/core';
|
|
|
4
4
|
import { AfterViewInit } from '@angular/core';
|
|
5
5
|
import * as _fortawesome_fontawesome_common_types from '@fortawesome/fontawesome-common-types';
|
|
6
6
|
import { ControlValueAccessor } from '@angular/forms';
|
|
7
|
+
import { ComponentHarness } from '@angular/cdk/testing';
|
|
7
8
|
|
|
8
9
|
/** Tagged union describing where a file item's bytes (or asset pointer) live. */
|
|
9
10
|
type SeamFileItemSource = {
|
|
@@ -186,5 +187,81 @@ declare class TheSeamFileFieldComponent implements ControlValueAccessor {
|
|
|
186
187
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TheSeamFileFieldComponent, "seam-file-field", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxSize": { "alias": "maxSize"; "required": false; "isSignal": true; }; "maxFiles": { "alias": "maxFiles"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "previewMode": { "alias": "previewMode"; "required": false; "isSignal": true; }; "showTileName": { "alias": "showTileName"; "required": false; "isSignal": true; }; "promptText": { "alias": "promptText"; "required": false; "isSignal": true; }; "promptSuffix": { "alias": "promptSuffix"; "required": false; "isSignal": true; }; "replaceText": { "alias": "replaceText"; "required": false; "isSignal": true; }; "hideErrors": { "alias": "hideErrors"; "required": false; "isSignal": true; }; }, { "rejected": "rejected"; }, never, never, true, never>;
|
|
187
188
|
}
|
|
188
189
|
|
|
189
|
-
|
|
190
|
+
/**
|
|
191
|
+
* Test harness for an element with `[seamFileDropZone]` attached.
|
|
192
|
+
*
|
|
193
|
+
* Usage:
|
|
194
|
+
* ```ts
|
|
195
|
+
* const harness = await loader.getHarness(TheSeamFileDropZoneHarness)
|
|
196
|
+
* await harness.dropFiles([new File(['x'], 'x.txt')])
|
|
197
|
+
* expect(await harness.isOver()).toBe(false)
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
200
|
+
declare class TheSeamFileDropZoneHarness extends ComponentHarness {
|
|
201
|
+
static hostSelector: string;
|
|
202
|
+
isOver(): Promise<boolean>;
|
|
203
|
+
dropFiles(files: File[]): Promise<void>;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Test harness for `<seam-file-input>`.
|
|
208
|
+
*/
|
|
209
|
+
declare class TheSeamFileInputHarness extends ComponentHarness {
|
|
210
|
+
static hostSelector: string;
|
|
211
|
+
private _zone;
|
|
212
|
+
private _prompt;
|
|
213
|
+
private _errors;
|
|
214
|
+
private _native;
|
|
215
|
+
/** Trimmed prompt text including the bold portion and suffix. */
|
|
216
|
+
getPromptText(): Promise<string>;
|
|
217
|
+
/** Component renders `tabindex=-1` on the zone when disabled. */
|
|
218
|
+
isDisabled(): Promise<boolean>;
|
|
219
|
+
/** Trimmed error line text, or null when no errors are visible. */
|
|
220
|
+
getErrorMessage(): Promise<string | null>;
|
|
221
|
+
/**
|
|
222
|
+
* Simulates drop of files on the zone. The directive performs validation
|
|
223
|
+
* and emits `filesAdded` / `rejected` via the component.
|
|
224
|
+
*/
|
|
225
|
+
dropFiles(files: File[]): Promise<void>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Test harness for `<seam-file-tile>`.
|
|
230
|
+
*/
|
|
231
|
+
declare class TheSeamFileTileHarness extends ComponentHarness {
|
|
232
|
+
static hostSelector: string;
|
|
233
|
+
private _root;
|
|
234
|
+
private _rowName;
|
|
235
|
+
private _previewName;
|
|
236
|
+
private _remove;
|
|
237
|
+
private _clickableBody;
|
|
238
|
+
getName(): Promise<string>;
|
|
239
|
+
getVariant(): Promise<SeamFileTileVariant>;
|
|
240
|
+
/** True when a consumer has wired `(itemClick)` AND the tile isn't disabled. */
|
|
241
|
+
isClickable(): Promise<boolean>;
|
|
242
|
+
click(): Promise<void>;
|
|
243
|
+
clickRemove(): Promise<void>;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Test harness for `<seam-file-field>`. Delegates to tile/input harnesses
|
|
248
|
+
* for their respective pieces.
|
|
249
|
+
*/
|
|
250
|
+
declare class TheSeamFileFieldHarness extends ComponentHarness {
|
|
251
|
+
static hostSelector: string;
|
|
252
|
+
private _replace;
|
|
253
|
+
private _allInputs;
|
|
254
|
+
private _tiles;
|
|
255
|
+
/**
|
|
256
|
+
* Returns the visible embedded file-input harness, or null when the field
|
|
257
|
+
* is in the filled single-mode state (visible input replaced by tile).
|
|
258
|
+
* In filled single-mode the hidden input still exists but is not returned.
|
|
259
|
+
*/
|
|
260
|
+
getInputHarness(): Promise<TheSeamFileInputHarness | null>;
|
|
261
|
+
getTiles(): Promise<TheSeamFileTileHarness[]>;
|
|
262
|
+
getReplaceButtonText(): Promise<string | null>;
|
|
263
|
+
clickReplace(): Promise<void>;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export { TheSeamFileDropZoneDirective, TheSeamFileDropZoneHarness, TheSeamFileFieldComponent, TheSeamFileFieldHarness, TheSeamFileInputComponent, TheSeamFileInputHarness, TheSeamFileTileComponent, TheSeamFileTileHarness, iconForMime, seamFileItemFromFile, seamFileItemFromUrl, seamFilesFromItems };
|
|
190
267
|
export type { SeamFileItem, SeamFileItemFromUrlOptions, SeamFileItemSource, SeamFileRejection, SeamFileRejectionReason, SeamFileTileVariant };
|
package/icon/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { DoCheck, ElementRef, Renderer2, OnInit } from '@angular/core';
|
|
3
3
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
-
import { IconProp, IconDefinition, SizeProp } from '@fortawesome/fontawesome-svg-core';
|
|
4
|
+
import { IconProp, IconDefinition, SizeProp, IconLookup } from '@fortawesome/fontawesome-svg-core';
|
|
5
5
|
import { ThemeTypes } from '@theseam/ui-common/models';
|
|
6
6
|
import * as _angular_animations from '@angular/animations';
|
|
7
7
|
import * as i4 from '@angular/common';
|
|
8
8
|
import * as i5 from '@fortawesome/angular-fontawesome';
|
|
9
|
+
import { BaseHarnessFilters, ContentContainerComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
|
|
9
10
|
|
|
10
11
|
type SeamIcon = IconProp | IconDefinition | string;
|
|
11
12
|
|
|
@@ -189,5 +190,34 @@ declare function fileExtensionIcon(extension: string | null | undefined, default
|
|
|
189
190
|
|
|
190
191
|
declare function getKnownIcon(iconStr: string): SeamIcon | undefined;
|
|
191
192
|
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
/**
|
|
194
|
+
* Returns only IconLookup for FontAwesome icons
|
|
195
|
+
*/
|
|
196
|
+
type TestSeamIcon = string | IconLookup;
|
|
197
|
+
declare function toIconLookup(icon: IconDefinition): IconLookup;
|
|
198
|
+
/** A set of criteria that can be used to filter a list of `TheSeamIconComponentHarness` instances. */
|
|
199
|
+
interface TheSeamIconComponentHarnessFilters extends BaseHarnessFilters {
|
|
200
|
+
/** Only find instances whose text matches the given value. */
|
|
201
|
+
icon?: string | RegExp | SeamIcon;
|
|
202
|
+
}
|
|
203
|
+
declare class TheSeamIconComponentHarness extends ContentContainerComponentHarness<string> {
|
|
204
|
+
/** The selector for the host element of a `TheSeamIconComponent` instance. */
|
|
205
|
+
static hostSelector: string;
|
|
206
|
+
private readonly _imgElement;
|
|
207
|
+
private readonly _svgElement;
|
|
208
|
+
/**
|
|
209
|
+
* Gets a `HarnessPredicate` that can be used to search for a menu item with specific attributes.
|
|
210
|
+
* @param options Options for filtering which menu item instances are considered a match.
|
|
211
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
212
|
+
*/
|
|
213
|
+
static with<T extends TheSeamIconComponentHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamIconComponentHarnessFilters): HarnessPredicate<T>;
|
|
214
|
+
/** Whether the menu is disabled. */
|
|
215
|
+
isDisabled(): Promise<boolean>;
|
|
216
|
+
/** Get icon image. */
|
|
217
|
+
getIcon(): Promise<TestSeamIcon | undefined>;
|
|
218
|
+
/** Get icon type. */
|
|
219
|
+
getIconType(): Promise<string | undefined>;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export { DEFAULT_FILE_EXTENSION_ICON, IconBtnComponent, IconComponent, IconNotificationComponent, TheSeamIconComponentHarness, TheSeamIconModule, fileExtensionIcon, getKnownIcon, pulseAnimation, toIconLookup };
|
|
223
|
+
export type { SeamIcon, TestSeamIcon, TheSeamIconComponentHarnessFilters, TheSeamIconType };
|
package/package.json
CHANGED
package/tooltip/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { AnimationEvent } from '@angular/animations';
|
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
import * as i1 from '@angular/common';
|
|
6
6
|
import * as i2 from '@angular/cdk/overlay';
|
|
7
|
+
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate, ElementDimensions } from '@angular/cdk/testing';
|
|
7
8
|
|
|
8
9
|
type TheSeamTooltipPlacement = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'left-top' | 'left-bottom' | 'right' | 'right-top' | 'right-bottom' | 'auto';
|
|
9
10
|
declare class TheSeamTooltipComponent implements OnDestroy {
|
|
@@ -114,5 +115,42 @@ declare class TheSeamTooltipModule {
|
|
|
114
115
|
static ɵinj: i0.ɵɵInjectorDeclaration<TheSeamTooltipModule>;
|
|
115
116
|
}
|
|
116
117
|
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
interface TheSeamTooltipHarnessFilters extends BaseHarnessFilters {
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Harness for interacting with tooltip directives in tests
|
|
122
|
+
*/
|
|
123
|
+
declare class TheSeamTooltipHarness extends ComponentHarness {
|
|
124
|
+
static hostSelector: string;
|
|
125
|
+
/**
|
|
126
|
+
* Gets a `HarnessPredicate` that can be used to search for a tooltip with specific attributes
|
|
127
|
+
*/
|
|
128
|
+
static with(options?: TheSeamTooltipHarnessFilters): HarnessPredicate<TheSeamTooltipHarness>;
|
|
129
|
+
/** Hovers over the element to show the tooltip */
|
|
130
|
+
hover(): Promise<void>;
|
|
131
|
+
/** Moves the mouse away from the element to hide the tooltip */
|
|
132
|
+
mouseAway(): Promise<void>;
|
|
133
|
+
/** Focuses the element to show the tooltip */
|
|
134
|
+
focus(): Promise<void>;
|
|
135
|
+
/** Blurs the element to hide the tooltip */
|
|
136
|
+
blur(): Promise<void>;
|
|
137
|
+
/** Clicks the element */
|
|
138
|
+
click(): Promise<void>;
|
|
139
|
+
/** Gets whether the tooltip is currently visible */
|
|
140
|
+
isTooltipVisible(): Promise<boolean>;
|
|
141
|
+
/** Gets the visible tooltip text content */
|
|
142
|
+
getVisibleTooltipText(): Promise<string | null>;
|
|
143
|
+
/** Gets the visible tooltip classes */
|
|
144
|
+
getVisibleTooltipClasses(): Promise<string[]>;
|
|
145
|
+
/** Gets the tooltip ID from the aria-describedby attribute */
|
|
146
|
+
private _getTooltipId;
|
|
147
|
+
/** Waits for the tooltip to appear */
|
|
148
|
+
waitForTooltipToShow(timeout?: number): Promise<void>;
|
|
149
|
+
/** Waits for the tooltip to disappear */
|
|
150
|
+
waitForTooltipToHide(timeout?: number): Promise<void>;
|
|
151
|
+
getTriggerDimensions(): Promise<ElementDimensions | null>;
|
|
152
|
+
getTooltipDimensions(): Promise<ElementDimensions | null>;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export { TheSeamTooltipComponent, TheSeamTooltipDirective, TheSeamTooltipHarness, TheSeamTooltipModule };
|
|
156
|
+
export type { TheSeamTooltipHarnessFilters, TheSeamTooltipPlacement, TheSeamTooltipPlacementInput, TheSeamTooltipTrigger };
|
package/widget/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import * as i7 from '@fortawesome/angular-fontawesome';
|
|
|
22
22
|
import * as i9 from '@theseam/ui-common/loading';
|
|
23
23
|
import * as i12 from '@angular/cdk/table';
|
|
24
24
|
import * as i24 from '@angular/router';
|
|
25
|
+
import { BaseHarnessFilters, ContentContainerComponentHarness, ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
|
|
25
26
|
|
|
26
27
|
type Writeable<T> = {
|
|
27
28
|
-readonly [P in keyof T]-?: T[P];
|
|
@@ -531,5 +532,19 @@ declare class TheSeamWidgetModule {
|
|
|
531
532
|
static ɵinj: i0.ɵɵInjectorDeclaration<TheSeamWidgetModule>;
|
|
532
533
|
}
|
|
533
534
|
|
|
534
|
-
|
|
535
|
-
|
|
535
|
+
/** A set of criteria that can be used to filter a list of `TheSeamWidgetHarness` instances. */
|
|
536
|
+
interface TheSeamWidgetHarnessFilters extends BaseHarnessFilters {
|
|
537
|
+
}
|
|
538
|
+
declare class TheSeamWidgetHarness extends ContentContainerComponentHarness<string> {
|
|
539
|
+
/** The selector for the host element of a `WidgetComponent` instance. */
|
|
540
|
+
static hostSelector: string;
|
|
541
|
+
/**
|
|
542
|
+
* Gets a `HarnessPredicate` that can be used to search for a menu item with specific attributes.
|
|
543
|
+
* @param options Options for filtering which menu item instances are considered a match.
|
|
544
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
545
|
+
*/
|
|
546
|
+
static with<T extends TheSeamWidgetHarness>(this: ComponentHarnessConstructor<T>, options?: TheSeamWidgetHarnessFilters): HarnessPredicate<T>;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
export { CURRENT_WIDGET_PREFERENCES_VERSION, EMPTY_WIDGET_PREFERENCES, THESEAM_WIDGETS, THESEAM_WIDGET_ACCESSOR, THESEAM_WIDGET_DATA, THESEAM_WIDGET_DEFAULTS, THESEAM_WIDGET_PREFERENCES_ACCESSOR, TheSeamWidgetButtonGroupModule, TheSeamWidgetContentHeaderModule, TheSeamWidgetDescriptionModule, TheSeamWidgetEmptyLabelModule, TheSeamWidgetFooterLinkModule, TheSeamWidgetFooterTextModule, TheSeamWidgetHarness, TheSeamWidgetHeaderBadgeModule, TheSeamWidgetListGroupModule, TheSeamWidgetModule, TheSeamWidgetTableModule, TheSeamWidgetTileListModule, TheSeamWidgetTileModule, WidgetButtonGroupComponent, WidgetComponent, WidgetContentHeaderComponent, WidgetDescriptionComponent, WidgetDragHandleDirective, WidgetEmptyLabelComponent, WidgetFooterComponent, WidgetFooterLinkComponent, WidgetFooterTextComponent, WidgetHeaderBadgeComponent, WidgetIconTplDirective, WidgetListGroupComponent, WidgetListGroupItemAnchorComponent, WidgetListGroupItemButtonComponent, WidgetListGroupItemComponent, WidgetListGroupItemIconTplDirective, WidgetPreferencesService, WidgetRegistryService, WidgetTableComponent, WidgetTileComponent, WidgetTileFooterComponent, WidgetTileFooterItemComponent, WidgetTileGroupComponent, WidgetTileListComponent, WidgetTileSecondaryIconDirective, WidgetTitleTplDirective, extendStyles, toggleNativeDragInteractions };
|
|
550
|
+
export type { IWidgetRegistryRecord, TheSeamWidgetAccessor, TheSeamWidgetData, TheSeamWidgetDefaults, TheSeamWidgetHarnessFilters, TheSeamWidgetPreferences, TheSeamWidgetPreferences_v1 };
|