@flywheel-io/vision 19.4.1 → 19.5.0
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/components/menu/menu-container/menu-container.component.d.ts +2 -1
- package/components/menu/menu-item/menu-item.component.d.ts +4 -4
- package/components/select-menu/select-menu.component.d.ts +23 -10
- package/components/timezone-select/time-zone-select.component.d.ts +38 -0
- package/components/wrapped-input/wrapped-input.component.d.ts +1 -1
- package/directives/NoopValueAccessor.directive.d.ts +15 -0
- package/fesm2022/flywheel-io-vision.mjs +260 -116
- package/fesm2022/flywheel-io-vision.mjs.map +1 -1
- package/package.json +2 -1
- package/public-api.d.ts +2 -0
|
@@ -7,6 +7,7 @@ import { FwMenuItemGroupComponent } from '../menu-item-group/menu-item-group.com
|
|
|
7
7
|
import { FwMenuSeparatorComponent } from '../menu-separator/menu-separator.component';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
import * as i1 from "@angular/cdk/coercion";
|
|
10
|
+
export type MenuFilterFn = (filter: string, menuItems: readonly FwMenuItemComponent[]) => FwMenuItemComponent[];
|
|
10
11
|
export declare class FwMenuContainerComponent implements AfterViewInit {
|
|
11
12
|
private sanitizer;
|
|
12
13
|
width?: string;
|
|
@@ -22,7 +23,7 @@ export declare class FwMenuContainerComponent implements AfterViewInit {
|
|
|
22
23
|
filteredMenuItems: FwMenuItemComponent[];
|
|
23
24
|
filteredMenuItemChange: import("@angular/core").OutputEmitterRef<FwMenuItemComponent[]>;
|
|
24
25
|
private defaultFilterFn;
|
|
25
|
-
filterFn: import("@angular/core").InputSignal<
|
|
26
|
+
filterFn: import("@angular/core").InputSignal<MenuFilterFn>;
|
|
26
27
|
filterChanged: import("@angular/core").OutputEmitterRef<string>;
|
|
27
28
|
filterRef: FwTextInputComponent;
|
|
28
29
|
menu: FwMenuComponent;
|
|
@@ -22,25 +22,25 @@ export declare class FwMenuItemComponent implements OnChanges, OnDestroy, AfterC
|
|
|
22
22
|
subItemsOpen: boolean;
|
|
23
23
|
mouseEnterHandler: import("@angular/core").ModelSignal<MouseEnterHandler>;
|
|
24
24
|
click: EventEmitter<string>;
|
|
25
|
-
focused
|
|
25
|
+
focused: import("@angular/core").ModelSignal<boolean>;
|
|
26
26
|
selected?: boolean;
|
|
27
27
|
subItems: QueryList<FwMenuSubItemComponent>;
|
|
28
28
|
private subscriptions;
|
|
29
29
|
constructor(elementRef: ElementRef<HTMLElement>);
|
|
30
|
-
scrollIntoView(): void;
|
|
30
|
+
scrollIntoView(options?: ScrollIntoViewOptions): void;
|
|
31
31
|
ngOnChanges(changes: SimpleChanges): void;
|
|
32
32
|
ngOnDestroy(): void;
|
|
33
33
|
ngAfterContentInit(): void;
|
|
34
34
|
onMouseEnter(event: PointerEvent): void;
|
|
35
35
|
updateLayout(): void;
|
|
36
36
|
toggleSubItemsView(): void;
|
|
37
|
-
handleClick(evt
|
|
37
|
+
handleClick(evt: Event): void;
|
|
38
38
|
/**
|
|
39
39
|
* stops the browser built-in tooltip from showing up
|
|
40
40
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/title
|
|
41
41
|
*/
|
|
42
42
|
get attrTitle(): string;
|
|
43
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<FwMenuItemComponent, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FwMenuItemComponent, "fw-menu-item", never, { "value": { "alias": "value"; "required": false; }; "size": { "alias": "size"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; "checkboxColor": { "alias": "checkboxColor"; "required": false; }; "multiSelect": { "alias": "multiSelect"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; "href": { "alias": "href"; "required": false; }; "target": { "alias": "target"; "required": false; }; "subItemsOpen": { "alias": "subItemsOpen"; "required": false; }; "mouseEnterHandler": { "alias": "mouseEnterHandler"; "required": false; "isSignal": true; }; "focused": { "alias": "focused"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; }, { "mouseEnterHandler": "mouseEnterHandlerChange"; "click": "click"; }, ["subItems"], ["fw-avatar", "p", "fw-badge", "fw-icon", "fw-icon-button", "fw-menu-sub-item"], true, never>;
|
|
44
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FwMenuItemComponent, "fw-menu-item", never, { "value": { "alias": "value"; "required": false; }; "size": { "alias": "size"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showCheckbox": { "alias": "showCheckbox"; "required": false; }; "checkboxColor": { "alias": "checkboxColor"; "required": false; }; "multiSelect": { "alias": "multiSelect"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; "href": { "alias": "href"; "required": false; }; "target": { "alias": "target"; "required": false; }; "subItemsOpen": { "alias": "subItemsOpen"; "required": false; }; "mouseEnterHandler": { "alias": "mouseEnterHandler"; "required": false; "isSignal": true; }; "focused": { "alias": "focused"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; }; }, { "mouseEnterHandler": "mouseEnterHandlerChange"; "click": "click"; "focused": "focusedChange"; }, ["subItems"], ["fw-avatar", "p", "fw-badge", "fw-icon", "fw-icon-button", "fw-menu-sub-item"], true, never>;
|
|
45
45
|
}
|
|
46
46
|
export {};
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { CdkMenuTrigger } from '@angular/cdk/menu';
|
|
2
|
-
import { EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
4
4
|
import { IconType } from '../icon/icon.types';
|
|
5
5
|
import { FwMenuComponent } from '../menu/menu.component';
|
|
6
|
+
import { MenuFilterFn } from '../menu/menu-container/menu-container.component';
|
|
6
7
|
import { FwMenuItemComponent } from '../menu/menu-item/menu-item.component';
|
|
7
8
|
import { FwMenuItemGroupComponent } from '../menu/menu-item-group/menu-item-group.component';
|
|
8
9
|
import { FwMenuSeparatorComponent } from '../menu/menu-separator/menu-separator.component';
|
|
9
10
|
import { FwTextInputComponent } from '../text-input/text-input.component';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
|
-
|
|
12
|
+
type DisplayFn = (menuItem: FwMenuItemComponent) => string;
|
|
13
|
+
export declare class FwSelectMenuComponent implements OnInit, OnDestroy, ControlValueAccessor {
|
|
12
14
|
private ngControl;
|
|
13
15
|
outsideClick(evt: any): void;
|
|
14
16
|
get disabledClass(): boolean;
|
|
15
|
-
options: import("@angular/core").InputSignal<
|
|
17
|
+
options: import("@angular/core").InputSignal<Object[]>;
|
|
16
18
|
valueProperty: import("@angular/core").InputSignal<string>;
|
|
17
19
|
useFullOptionAsValue: import("@angular/core").InputSignal<boolean>;
|
|
18
20
|
titleProperty: import("@angular/core").InputSignal<string>;
|
|
@@ -37,35 +39,45 @@ export declare class FwSelectMenuComponent implements OnDestroy, ControlValueAcc
|
|
|
37
39
|
menuSeparators: import("@angular/core").Signal<readonly FwMenuSeparatorComponent[]>;
|
|
38
40
|
change: EventEmitter<any>;
|
|
39
41
|
readonly filterChanged: EventEmitter<string>;
|
|
40
|
-
selectValue: string
|
|
41
|
-
|
|
42
|
-
selectIcon: IconType | '';
|
|
42
|
+
selectValue: import("@angular/core").WritableSignal<string>;
|
|
43
|
+
selectIcon: IconType | undefined;
|
|
43
44
|
filterValue: import("@angular/core").WritableSignal<string>;
|
|
45
|
+
private menuItemClickSubscriptions;
|
|
44
46
|
private subscriptions;
|
|
45
47
|
private _isOpen;
|
|
46
48
|
focused: number;
|
|
47
49
|
inFocusOpen: boolean;
|
|
48
50
|
preFocusValue: any;
|
|
49
51
|
isTyping: import("@angular/core").WritableSignal<boolean>;
|
|
52
|
+
valueDisplayFn: import("@angular/core").InputSignal<DisplayFn>;
|
|
53
|
+
custom(menuItem: FwMenuItemComponent): string;
|
|
54
|
+
private defaultFilterFn;
|
|
55
|
+
/**
|
|
56
|
+
* function for customizing the filter behavior of the select
|
|
57
|
+
* ! WARNING ! only works with content-projected menu items, does not work with the `options` input
|
|
58
|
+
*/
|
|
59
|
+
filterFn: import("@angular/core").InputSignal<MenuFilterFn>;
|
|
50
60
|
inputDisplayValue: import("@angular/core").Signal<string>;
|
|
51
61
|
get value(): any;
|
|
52
62
|
set value(newValue: any);
|
|
53
63
|
private _value;
|
|
54
64
|
constructor(ngControl: NgControl);
|
|
65
|
+
ngOnInit(): void;
|
|
66
|
+
selectTitle: import("@angular/core").WritableSignal<string>;
|
|
55
67
|
private subscribeToMenuItems;
|
|
56
68
|
private menuItemsWatcher;
|
|
57
69
|
ngOnDestroy(): void;
|
|
58
70
|
get invalid(): boolean;
|
|
59
71
|
get touched(): boolean;
|
|
60
|
-
filteredOptions: import("@angular/core").Signal<
|
|
72
|
+
filteredOptions: import("@angular/core").Signal<Object[]>;
|
|
61
73
|
optionsWithValues: import("@angular/core").Signal<{
|
|
62
|
-
raw:
|
|
74
|
+
raw: Object;
|
|
63
75
|
trackingId: any;
|
|
64
76
|
value: any;
|
|
65
77
|
}[]>;
|
|
66
78
|
onChange(newValue: any): void;
|
|
67
79
|
onTouched: () => void;
|
|
68
|
-
externalOnChange:
|
|
80
|
+
externalOnChange: (_val: unknown) => void;
|
|
69
81
|
registerOnChange(fn: (value: any) => void): void;
|
|
70
82
|
registerOnTouched(fn: () => {}): void;
|
|
71
83
|
setDisabledState(isDisabled: boolean): void;
|
|
@@ -94,5 +106,6 @@ export declare class FwSelectMenuComponent implements OnDestroy, ControlValueAcc
|
|
|
94
106
|
onFilterChanged(value: string): void;
|
|
95
107
|
onInputChange(event: Event): void;
|
|
96
108
|
static ɵfac: i0.ɵɵFactoryDeclaration<FwSelectMenuComponent, [{ optional: true; self: true; }]>;
|
|
97
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FwSelectMenuComponent, "fw-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "valueProperty": { "alias": "valueProperty"; "required": false; "isSignal": true; }; "useFullOptionAsValue": { "alias": "useFullOptionAsValue"; "required": false; "isSignal": true; }; "titleProperty": { "alias": "titleProperty"; "required": false; "isSignal": true; }; "iconProperty": { "alias": "iconProperty"; "required": false; "isSignal": true; }; "staticIcon": { "alias": "staticIcon"; "required": false; "isSignal": true; }; "descriptionProperty": { "alias": "descriptionProperty"; "required": false; "isSignal": true; }; "showFilter": { "alias": "showFilter"; "required": false; "isSignal": true; }; "showReset": { "alias": "showReset"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errored": { "alias": "errored"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "optionsWidth": { "alias": "optionsWidth"; "required": false; "isSignal": true; }; "minOptionsHeight": { "alias": "minOptionsHeight"; "required": false; "isSignal": true; }; "maxOptionsHeight": { "alias": "maxOptionsHeight"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; }; }, { "disabled": "disabledChange"; "change": "change"; "filterChanged": "filterChanged"; }, ["menuItems", "menuItemGroups", "menuSeparators"], ["[fw-menu-item, fw-menu-separator, fw-menu-item-group]"], true, never>;
|
|
109
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FwSelectMenuComponent, "fw-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "valueProperty": { "alias": "valueProperty"; "required": false; "isSignal": true; }; "useFullOptionAsValue": { "alias": "useFullOptionAsValue"; "required": false; "isSignal": true; }; "titleProperty": { "alias": "titleProperty"; "required": false; "isSignal": true; }; "iconProperty": { "alias": "iconProperty"; "required": false; "isSignal": true; }; "staticIcon": { "alias": "staticIcon"; "required": false; "isSignal": true; }; "descriptionProperty": { "alias": "descriptionProperty"; "required": false; "isSignal": true; }; "showFilter": { "alias": "showFilter"; "required": false; "isSignal": true; }; "showReset": { "alias": "showReset"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errored": { "alias": "errored"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "optionsWidth": { "alias": "optionsWidth"; "required": false; "isSignal": true; }; "minOptionsHeight": { "alias": "minOptionsHeight"; "required": false; "isSignal": true; }; "maxOptionsHeight": { "alias": "maxOptionsHeight"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "valueDisplayFn": { "alias": "valueDisplayFn"; "required": false; "isSignal": true; }; "filterFn": { "alias": "filterFn"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; }; }, { "disabled": "disabledChange"; "change": "change"; "filterChanged": "filterChanged"; }, ["menuItems", "menuItemGroups", "menuSeparators"], ["[fw-menu-item, fw-menu-separator, fw-menu-item-group]"], true, never>;
|
|
98
110
|
}
|
|
111
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { FormControl, NgControl } from '@angular/forms';
|
|
3
|
+
import { FwMenuItemComponent, MenuFilterFn } from '../../public-api';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../../directives/NoopValueAccessor.directive";
|
|
6
|
+
interface TimeZoneOption {
|
|
7
|
+
name: string;
|
|
8
|
+
fullTZ: string;
|
|
9
|
+
description: string;
|
|
10
|
+
}
|
|
11
|
+
interface TimeZoneOptionsByRegion {
|
|
12
|
+
[region: string]: TimeZoneOption[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Form control for selecting a time zone, based on fw-select
|
|
16
|
+
* @see [Vision Docs](https://cdn.flywheel.io/docs/vision/latest/?path=/docs/form-controls-timezone-select--docs)
|
|
17
|
+
*/
|
|
18
|
+
export declare class FwTimeZoneSelectComponent implements OnInit {
|
|
19
|
+
protected ngControl: NgControl;
|
|
20
|
+
protected internalControl: FormControl<string>;
|
|
21
|
+
/**
|
|
22
|
+
* whether the control pre-populates the user's timezone on init
|
|
23
|
+
*/
|
|
24
|
+
prefillTimeZone: import("@angular/core").InputSignal<boolean>;
|
|
25
|
+
protected timezonesByRegion: import("@angular/core").WritableSignal<TimeZoneOptionsByRegion>;
|
|
26
|
+
protected regions: import("@angular/core").WritableSignal<string[]>;
|
|
27
|
+
protected usersTimezone: import("@angular/core").WritableSignal<string>;
|
|
28
|
+
ngOnInit(): void;
|
|
29
|
+
protected readonly filterFn: MenuFilterFn;
|
|
30
|
+
protected readonly displayFn: (menuItem: FwMenuItemComponent) => string;
|
|
31
|
+
private buildTimezoneList;
|
|
32
|
+
private parseTimeZoneName;
|
|
33
|
+
private getTimeZoneOffset;
|
|
34
|
+
private getTimeZoneAcronym;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FwTimeZoneSelectComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FwTimeZoneSelectComponent, "fw-time-zone-select", never, { "prefillTimeZone": { "alias": "prefillTimeZone"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.NoopValueAccessorDirective; inputs: {}; outputs: {}; }]>;
|
|
37
|
+
}
|
|
38
|
+
export {};
|
|
@@ -9,5 +9,5 @@ export declare class FwWrappedInputComponent {
|
|
|
9
9
|
required?: boolean;
|
|
10
10
|
class: boolean;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<FwWrappedInputComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FwWrappedInputComponent, "fw-wrapped-input", never, { "title": { "alias": "title"; "required": false; }; "status": { "alias": "status"; "required": false; }; "statusColor": { "alias": "statusColor"; "required": false; }; "description": { "alias": "description"; "required": false; }; "helperText": { "alias": "helperText"; "required": false; }; "errorText": { "alias": "errorText"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, {}, never, ["fw-form-heading", "fw-button-toggle, fw-date-input, fw-text-input, fw-number-input, fw-phone-input, fw-textarea-input, fw-select, fw-multi-select, fw-checkbox, fw-typeahead"], true, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FwWrappedInputComponent, "fw-wrapped-input", never, { "title": { "alias": "title"; "required": false; }; "status": { "alias": "status"; "required": false; }; "statusColor": { "alias": "statusColor"; "required": false; }; "description": { "alias": "description"; "required": false; }; "helperText": { "alias": "helperText"; "required": false; }; "errorText": { "alias": "errorText"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, {}, never, ["fw-form-heading", "fw-button-toggle, fw-date-input, fw-text-input, fw-number-input, fw-phone-input, fw-textarea-input, fw-select, fw-multi-select, fw-checkbox, fw-typeahead, fw-time-zone-select"], true, never>;
|
|
13
13
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Directive for forwarding an ngControl to a child component
|
|
5
|
+
*
|
|
6
|
+
* Intended to be used as a host directive
|
|
7
|
+
* @see [Medium Article on the approach](https://medium.com/netanelbasal/forwarding-form-controls-to-custom-control-components-in-angular-701e8406cc55)
|
|
8
|
+
*/
|
|
9
|
+
export declare class NoopValueAccessorDirective implements ControlValueAccessor {
|
|
10
|
+
writeValue(_obj: any): void;
|
|
11
|
+
registerOnChange(_fn: any): void;
|
|
12
|
+
registerOnTouched(_fn: any): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NoopValueAccessorDirective, never>;
|
|
14
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NoopValueAccessorDirective, never, never, {}, {}, never, never, true, never>;
|
|
15
|
+
}
|