@mathstack/ui 0.0.1-beta.1 → 0.0.1-beta.3

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.
Files changed (38) hide show
  1. package/README.md +9 -0
  2. package/fesm2022/mathstack-ui.mjs +175 -176
  3. package/fesm2022/mathstack-ui.mjs.map +1 -1
  4. package/package.json +7 -7
  5. package/types/mathstack-ui.d.ts +618 -0
  6. package/index.d.ts +0 -5
  7. package/lib/combobox/combobox-label/combobox-label.component.d.ts +0 -11
  8. package/lib/combobox/combobox.component.d.ts +0 -20
  9. package/lib/combobox/combobox.module.d.ts +0 -15
  10. package/lib/combobox/combobox.service.d.ts +0 -124
  11. package/lib/combobox/editable-textbox/editable-textbox.component.d.ts +0 -39
  12. package/lib/combobox/index.d.ts +0 -11
  13. package/lib/combobox/listbox/active-index.service.d.ts +0 -32
  14. package/lib/combobox/listbox/listbox-filtering.service.d.ts +0 -12
  15. package/lib/combobox/listbox/listbox-scroll.service.d.ts +0 -11
  16. package/lib/combobox/listbox/listbox.component.d.ts +0 -58
  17. package/lib/combobox/listbox-group/listbox-group.component.d.ts +0 -16
  18. package/lib/combobox/listbox-label/listbox-label.component.d.ts +0 -12
  19. package/lib/combobox/listbox-option/listbox-option.component.d.ts +0 -52
  20. package/lib/combobox/select-all-listbox-option/select-all-listbox-option.component.d.ts +0 -24
  21. package/lib/combobox/textbox/textbox.component.d.ts +0 -41
  22. package/lib/directory/directory.component.d.ts +0 -44
  23. package/lib/directory/index.d.ts +0 -1
  24. package/lib/table/index.d.ts +0 -4
  25. package/lib/table/single-sort-header/single-sort-header.component.d.ts +0 -9
  26. package/lib/table/table-column.d.ts +0 -53
  27. package/lib/table/table.component.d.ts +0 -27
  28. package/lib/table/table.config.d.ts +0 -5
  29. package/lib/table/table.module.d.ts +0 -11
  30. package/lib/tabs/index.d.ts +0 -6
  31. package/lib/tabs/tab-body.component.d.ts +0 -8
  32. package/lib/tabs/tab-content.directive.d.ts +0 -15
  33. package/lib/tabs/tab-item.component.d.ts +0 -16
  34. package/lib/tabs/tab-label.component.d.ts +0 -10
  35. package/lib/tabs/tabs.component.d.ts +0 -24
  36. package/lib/tabs/tabs.module.d.ts +0 -11
  37. package/lib/tabs/tabs.service.d.ts +0 -9
  38. package/public-api.d.ts +0 -4
@@ -1,20 +0,0 @@
1
- import { Platform } from '@angular/cdk/platform';
2
- import { DestroyRef, ElementRef, NgZone, OnDestroy, OnInit } from '@angular/core';
3
- import { ComboboxLabelComponent } from './combobox-label/combobox-label.component';
4
- import { ComboboxService } from './combobox.service';
5
- import * as i0 from "@angular/core";
6
- export declare class ComboboxComponent implements OnInit, OnDestroy {
7
- service: ComboboxService;
8
- platform: Platform;
9
- private zone;
10
- private document;
11
- private elRef;
12
- private destroyRef;
13
- labelComponent: ComboboxLabelComponent;
14
- constructor(service: ComboboxService, platform: Platform, zone: NgZone, document: Document, elRef: ElementRef, destroyRef: DestroyRef);
15
- ngOnInit(): void;
16
- ngOnDestroy(): void;
17
- handleOutsideClick(): void;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<ComboboxComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<ComboboxComponent, "hsi-ui-combobox", never, {}, {}, ["labelComponent"], ["*"], true, never>;
20
- }
@@ -1,15 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./combobox.component";
3
- import * as i2 from "./combobox-label/combobox-label.component";
4
- import * as i3 from "./textbox/textbox.component";
5
- import * as i4 from "./listbox/listbox.component";
6
- import * as i5 from "./listbox-group/listbox-group.component";
7
- import * as i6 from "./listbox-option/listbox-option.component";
8
- import * as i7 from "./listbox-label/listbox-label.component";
9
- import * as i8 from "./editable-textbox/editable-textbox.component";
10
- import * as i9 from "./select-all-listbox-option/select-all-listbox-option.component";
11
- export declare class HsiUiComboboxModule {
12
- static ɵfac: i0.ɵɵFactoryDeclaration<HsiUiComboboxModule, never>;
13
- static ɵmod: i0.ɵɵNgModuleDeclaration<HsiUiComboboxModule, never, [typeof i1.ComboboxComponent, typeof i2.ComboboxLabelComponent, typeof i3.TextboxComponent, typeof i4.ListboxComponent, typeof i5.ListboxGroupComponent, typeof i6.ListboxOptionComponent, typeof i7.ListboxLabelComponent, typeof i8.EditableTextboxComponent, typeof i9.SelectAllListboxOptionComponent], [typeof i1.ComboboxComponent, typeof i2.ComboboxLabelComponent, typeof i3.TextboxComponent, typeof i4.ListboxComponent, typeof i5.ListboxGroupComponent, typeof i7.ListboxLabelComponent, typeof i6.ListboxOptionComponent, typeof i8.EditableTextboxComponent, typeof i9.SelectAllListboxOptionComponent]>;
14
- static ɵinj: i0.ɵɵInjectorDeclaration<HsiUiComboboxModule>;
15
- }
@@ -1,124 +0,0 @@
1
- import { Platform } from '@angular/cdk/platform';
2
- import { QueryList } from '@angular/core';
3
- import { Observable, Subject } from 'rxjs';
4
- import { ComboboxLabelComponent } from './combobox-label/combobox-label.component';
5
- import { ListboxGroupComponent } from './listbox-group/listbox-group.component';
6
- import { ListboxOptionComponent, ListboxOptionPropertyChange } from './listbox-option/listbox-option.component';
7
- import { SelectAllListboxOptionComponent } from './select-all-listbox-option/select-all-listbox-option.component';
8
- import * as i0 from "@angular/core";
9
- export declare enum FocusTextbox {
10
- default = "default",
11
- includeMobile = "includeMobile"
12
- }
13
- export interface KeyboardEventWithAutocomplete {
14
- event: KeyboardEvent;
15
- autoComplete: AutoComplete;
16
- inputHasText: boolean;
17
- }
18
- export declare enum Key {
19
- ArrowDown = "ArrowDown",
20
- ArrowUp = "ArrowUp",
21
- End = "End",
22
- Enter = "Enter",
23
- Escape = "Escape",
24
- Home = "Home",
25
- LeftArrow = "ArrowLeft",
26
- PageDown = "PageDown",
27
- PageUp = "PageUp",
28
- RightArrow = "ArrowRight",
29
- Space = " ",
30
- Tab = "Tab"
31
- }
32
- export declare enum OptionAction {
33
- first = "first",
34
- last = "last",
35
- next = "next",
36
- nullActiveIndex = "nullActiveIndex",
37
- pageDown = "pageDown",
38
- pageUp = "pageUp",
39
- previous = "previous",
40
- select = "select",
41
- zeroActiveIndex = "zeroActiveIndex"
42
- }
43
- export declare enum ListboxAction {
44
- close = "close",
45
- open = "open",
46
- closeSelect = "closeSelect"
47
- }
48
- export declare enum TextboxAction {
49
- focus = "focus",
50
- setTextToValue = "setTextToValue",
51
- cursorRight = "cursorRight",
52
- cursorLeft = "cursorLeft",
53
- cursorFirst = "cursorFirst",
54
- cursorLast = "cursorLast",
55
- addChar = "addChar",
56
- type = "type"
57
- }
58
- export declare enum AutoComplete {
59
- none = "none",
60
- list = "list",
61
- both = "both",
62
- inline = "inline"
63
- }
64
- export type ComboboxAction = OptionAction | ListboxAction | TextboxAction;
65
- export declare class ComboboxService {
66
- private platform;
67
- id: string;
68
- scrollContainerId: string;
69
- comboboxLabelId: string;
70
- autoComplete: AutoComplete;
71
- hasEditableTextbox: boolean;
72
- ignoreBlur: boolean;
73
- isMultiSelect: boolean;
74
- nullActiveIdOnClose: boolean;
75
- scrollWhenOpened: boolean;
76
- shouldAutoSelectOnListboxClose: boolean;
77
- activeDescendant$: Observable<string>;
78
- allOptions: ListboxOptionComponent[];
79
- allOptions$: Observable<ListboxOptionComponent[]>;
80
- destroy$: Subject<void>;
81
- groups$: Observable<ListboxGroupComponent[]>;
82
- optionPropertyChanges$: Observable<ListboxOptionPropertyChange>;
83
- private focusTextbox;
84
- focusTextbox$: Observable<FocusTextbox>;
85
- private isKeyboardEvent;
86
- isKeyboardEvent$: Observable<boolean>;
87
- private _isOpen;
88
- isOpen$: Observable<boolean>;
89
- private label;
90
- label$: Observable<ComboboxLabelComponent>;
91
- private optionAction;
92
- optionAction$: Observable<string>;
93
- private projectedContentIsInDOM;
94
- projectedContentIsInDOM$: Observable<boolean>;
95
- private selectedOptionsToEmit;
96
- selectedOptionsToEmit$: Observable<ListboxOptionComponent[]>;
97
- private textboxBlur;
98
- textboxBlur$: Observable<void>;
99
- private touched;
100
- touched$: Observable<boolean>;
101
- constructor(platform: Platform);
102
- get isOpen(): boolean;
103
- initActiveDescendant(source$?: Observable<string>): void;
104
- setLabel(label: ComboboxLabelComponent): void;
105
- openListbox(): void;
106
- closeListbox(): void;
107
- toggleListbox(): void;
108
- setProjectedContentIsInDOM(): void;
109
- emitTextboxBlur(): void;
110
- setTouched(): void;
111
- emitTextboxFocus(focus?: FocusTextbox): void;
112
- emitOptionAction(action: OptionAction | string): void;
113
- isMobile(): boolean;
114
- setProjectedContent(groups: QueryList<ListboxGroupComponent>, options: QueryList<ListboxOptionComponent>): void;
115
- setGroups(groups: QueryList<ListboxGroupComponent>): void;
116
- setAllOptions(groups: QueryList<ListboxGroupComponent>, options: QueryList<ListboxOptionComponent>): void;
117
- setSelectedOptionsToEmit(selected: ListboxOptionComponent[]): void;
118
- getSelectedOptions(options: ListboxOptionComponent[]): ListboxOptionComponent[];
119
- isSelectAllListboxOption(option: ListboxOptionComponent): option is SelectAllListboxOptionComponent;
120
- setIsKeyboardEvent(isKeyboardEvent: boolean): void;
121
- destroy(): void;
122
- static ɵfac: i0.ɵɵFactoryDeclaration<ComboboxService, never>;
123
- static ɵprov: i0.ɵɵInjectableDeclaration<ComboboxService>;
124
- }
@@ -1,39 +0,0 @@
1
- import { AfterViewInit, ElementRef, EventEmitter, OnInit } from '@angular/core';
2
- import { FormControl } from '@angular/forms';
3
- import { BehaviorSubject } from 'rxjs';
4
- import { ComboboxAction } from '../combobox.service';
5
- import { ListboxOptionComponent } from '../listbox-option/listbox-option.component';
6
- import { TextboxComponent } from '../textbox/textbox.component';
7
- import * as i0 from "@angular/core";
8
- export declare class EditableTextboxComponent extends TextboxComponent implements OnInit, AfterViewInit {
9
- inputElRef: ElementRef<HTMLInputElement>;
10
- autoSelect: boolean;
11
- autoSelectTrigger: 'any' | 'character';
12
- displaySelected: boolean;
13
- initialValue: string;
14
- inputType: 'text' | 'search';
15
- ngFormControl: FormControl<string>;
16
- placeholder: string;
17
- valueChanges: EventEmitter<string>;
18
- moveFocusToTextboxKeys: string[];
19
- value: BehaviorSubject<string>;
20
- value$: import("rxjs").Observable<string>;
21
- openKeys: string[];
22
- ngOnInit(): void;
23
- ngAfterViewInit(): void;
24
- setLabel(): void;
25
- onSelectionChange(selectedOptions: ListboxOptionComponent[]): void;
26
- onInputChange(value: string): void;
27
- setAndEmitValue(value: string): void;
28
- setValue(value: string): void;
29
- emitValue(value: string): void;
30
- handleClick(): void;
31
- protected setAutoSelectWhenInputIsEmpty(): void;
32
- onEscape(): void;
33
- getActionFromKeydownEvent(event: KeyboardEvent): ComboboxAction;
34
- getActionFromKeydownEventWhenOpen(event: KeyboardEvent): ComboboxAction;
35
- handleKeyboardAction(action: string, event: KeyboardEvent): void;
36
- isPrintableCharacter(str: string): RegExpMatchArray;
37
- static ɵfac: i0.ɵɵFactoryDeclaration<EditableTextboxComponent, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<EditableTextboxComponent, "hsi-ui-editable-textbox", never, { "autoSelect": { "alias": "autoSelect"; "required": false; }; "autoSelectTrigger": { "alias": "autoSelectTrigger"; "required": false; }; "displaySelected": { "alias": "displaySelected"; "required": false; }; "initialValue": { "alias": "initialValue"; "required": false; }; "inputType": { "alias": "inputType"; "required": false; }; "ngFormControl": { "alias": "ngFormControl"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "valueChanges": "valueChanges"; }, never, ["[boxIcon]"], true, never>;
39
- }
@@ -1,11 +0,0 @@
1
- export * from './combobox-label/combobox-label.component';
2
- export * from './combobox.component';
3
- export * from './combobox.module';
4
- export * from './combobox.service';
5
- export * from './editable-textbox/editable-textbox.component';
6
- export * from './listbox-group/listbox-group.component';
7
- export * from './listbox-label/listbox-label.component';
8
- export * from './listbox-option/listbox-option.component';
9
- export * from './listbox/listbox.component';
10
- export * from './select-all-listbox-option/select-all-listbox-option.component';
11
- export * from './textbox/textbox.component';
@@ -1,32 +0,0 @@
1
- import { DestroyRef, ElementRef } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import { ComboboxService, OptionAction } from '../combobox.service';
4
- import { ListboxOptionComponent } from '../listbox-option/listbox-option.component';
5
- import { ListboxFilteringService } from './listbox-filtering.service';
6
- import { ListboxScrollService } from './listbox-scroll.service';
7
- import * as i0 from "@angular/core";
8
- export declare class ActiveIndexService {
9
- private service;
10
- private filtering;
11
- private scrolling;
12
- private activeIndex;
13
- activeIndex$: Observable<number>;
14
- scrollContentRef: ElementRef<HTMLDivElement>;
15
- constructor(service: ComboboxService, filtering: ListboxFilteringService, scrolling: ListboxScrollService);
16
- init(allOptions$: Observable<ListboxOptionComponent[]>, destroyRef: DestroyRef): void;
17
- setScrollContentRef(scrollContentRef: ElementRef): void;
18
- initActiveId(): void;
19
- listenToActions(allOptions$: Observable<ListboxOptionComponent[]>, destroyRef: DestroyRef): void;
20
- private setNextActiveIndex;
21
- private setPrevActiveIndex;
22
- setActiveIndex(index: number | null, actionIfDisabled: OptionAction.next | OptionAction.previous | null, options: ListboxOptionComponent[], scrollToIndex?: boolean): void;
23
- handleActiveIndexWhenCannotBeSet(): void;
24
- private handleScrollingForNewIndex;
25
- private getIndexForAction;
26
- actionIsTypingChar(action: OptionAction | string): boolean;
27
- updateActiveIndexFromKeyChar(char: string, options: ListboxOptionComponent[]): void;
28
- private setActiveDescendant;
29
- setActiveIndexToFirstSelectedOrDefault(options: ListboxOptionComponent[]): void;
30
- static ɵfac: i0.ɵɵFactoryDeclaration<ActiveIndexService, never>;
31
- static ɵprov: i0.ɵɵInjectableDeclaration<ActiveIndexService>;
32
- }
@@ -1,12 +0,0 @@
1
- import { ListboxOptionComponent } from '../listbox-option/listbox-option.component';
2
- import * as i0 from "@angular/core";
3
- export declare class ListboxFilteringService {
4
- searchTimeout: ReturnType<typeof setTimeout>;
5
- searchString: string;
6
- updateSearchString(char: string): void;
7
- resetSearch(): void;
8
- getIndexByLetter(options: ListboxOptionComponent[], searchString: string, startIndex: number): number;
9
- filterOptionsBySearchString(options: ListboxOptionComponent[], searchString: string, exclude?: ListboxOptionComponent[]): ListboxOptionComponent[];
10
- static ɵfac: i0.ɵɵFactoryDeclaration<ListboxFilteringService, never>;
11
- static ɵprov: i0.ɵɵInjectableDeclaration<ListboxFilteringService>;
12
- }
@@ -1,11 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class ListboxScrollService {
3
- private document;
4
- constructor(document: Document);
5
- isElementInView(element: HTMLElement): boolean;
6
- isScrollable(element: HTMLElement): boolean;
7
- maintainElementVisibility(activeElement: HTMLElement, scrollParent: HTMLElement): void;
8
- scrollToTop(scrollParent: HTMLElement): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<ListboxScrollService, never>;
10
- static ɵprov: i0.ɵɵInjectableDeclaration<ListboxScrollService>;
11
- }
@@ -1,58 +0,0 @@
1
- import { AfterContentInit, AfterViewInit, DestroyRef, ElementRef, EventEmitter, OnChanges, QueryList, SimpleChanges } from '@angular/core';
2
- import { FormControl } from '@angular/forms';
3
- import { ComboboxService, OptionAction } from '../combobox.service';
4
- import { ListboxGroupComponent } from '../listbox-group/listbox-group.component';
5
- import { ListboxLabelComponent } from '../listbox-label/listbox-label.component';
6
- import { ListboxOptionComponent } from '../listbox-option/listbox-option.component';
7
- import { SelectAllListboxOptionComponent } from '../select-all-listbox-option/select-all-listbox-option.component';
8
- import { ActiveIndexService } from './active-index.service';
9
- import { ListboxFilteringService } from './listbox-filtering.service';
10
- import { ListboxScrollService } from './listbox-scroll.service';
11
- import * as i0 from "@angular/core";
12
- export type SelectedCountLabel = {
13
- singular: string;
14
- plural: string;
15
- };
16
- export declare class ListboxComponent implements OnChanges, AfterContentInit, AfterViewInit {
17
- service: ComboboxService;
18
- activeIndex: ActiveIndexService;
19
- protected filtering: ListboxFilteringService;
20
- protected scrolling: ListboxScrollService;
21
- protected destroyRef: DestroyRef;
22
- ngFormControl: FormControl<any | any[]>;
23
- findsOptionOnTyping: boolean;
24
- isMultiSelect: boolean;
25
- maxHeight: number;
26
- valueChanges: EventEmitter<any>;
27
- scrollableContentRef: ElementRef<HTMLDivElement>;
28
- label: ListboxLabelComponent;
29
- options: QueryList<ListboxOptionComponent>;
30
- groups: QueryList<ListboxGroupComponent>;
31
- constructor(service: ComboboxService, activeIndex: ActiveIndexService, filtering: ListboxFilteringService, scrolling: ListboxScrollService, destroyRef: DestroyRef);
32
- ngOnChanges(changes: SimpleChanges): void;
33
- ngAfterContentInit(): void;
34
- ngAfterViewInit(): void;
35
- setOnOptionChanges(): void;
36
- setSelectedEmitting(): void;
37
- emitValue(selections: any[]): void;
38
- setOnBlurEvent(): void;
39
- shouldAutoSelectOptionOnBlur(activeIndex: number, options: ListboxOptionComponent[]): boolean;
40
- setOptionAction(): void;
41
- actionIsTypingChar(action: OptionAction | string): boolean;
42
- setResetOnClose(): void;
43
- resetScroll(): void;
44
- getListboxLabelAsBoxPlaceholder(): string;
45
- selectOptionFromIndex(index: number, options: ListboxOptionComponent[]): void;
46
- handleOptionClick(event: MouseEvent, optionIndex: number, groupIndex?: number): void;
47
- handleOptionSelect(optionIndex: number, options: ListboxOptionComponent[], groupIndex?: number): void;
48
- toggleOptionSelected(option: ListboxOptionComponent, options: ListboxOptionComponent[]): void;
49
- updateSelectedOptionsToEmit(options: ListboxOptionComponent[]): void;
50
- selectSingleSelectOption(option: ListboxOptionComponent, options: ListboxOptionComponent[]): void;
51
- isSelectAllListboxOption(option: ListboxOptionComponent): option is SelectAllListboxOptionComponent;
52
- getOptionIndexFromGroups(groupIndex: number, optionIndex: number): number;
53
- getSelectedOptions(options: ListboxOptionComponent[]): ListboxOptionComponent[];
54
- updateActiveIndexOnExternalChanges(): void;
55
- handleOptionMousedown(): void;
56
- static ɵfac: i0.ɵɵFactoryDeclaration<ListboxComponent, never>;
57
- static ɵcmp: i0.ɵɵComponentDeclaration<ListboxComponent, "hsi-ui-listbox", never, { "ngFormControl": { "alias": "ngFormControl"; "required": false; }; "findsOptionOnTyping": { "alias": "findsOptionOnTyping"; "required": false; }; "isMultiSelect": { "alias": "isMultiSelect"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; }, { "valueChanges": "valueChanges"; }, ["label", "options", "groups"], never, true, never>;
58
- }
@@ -1,16 +0,0 @@
1
- import { AfterContentInit, QueryList } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import { ComboboxService } from '../combobox.service';
4
- import { ListboxLabelComponent } from '../listbox-label/listbox-label.component';
5
- import { ListboxOptionComponent } from '../listbox-option/listbox-option.component';
6
- import * as i0 from "@angular/core";
7
- export declare class ListboxGroupComponent implements AfterContentInit {
8
- service: ComboboxService;
9
- label: ListboxLabelComponent;
10
- options: QueryList<ListboxOptionComponent>;
11
- options$: Observable<ListboxOptionComponent[]>;
12
- constructor(service: ComboboxService);
13
- ngAfterContentInit(): void;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<ListboxGroupComponent, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<ListboxGroupComponent, "hsi-ui-listbox-group", never, {}, {}, ["label", "options"], ["*"], true, never>;
16
- }
@@ -1,12 +0,0 @@
1
- import { ElementRef, TemplateRef } from '@angular/core';
2
- import { ComboboxService } from '../combobox.service';
3
- import * as i0 from "@angular/core";
4
- export declare class ListboxLabelComponent {
5
- private service;
6
- labelContent: TemplateRef<unknown>;
7
- label: ElementRef<HTMLParagraphElement>;
8
- id: string;
9
- constructor(service: ComboboxService);
10
- static ɵfac: i0.ɵɵFactoryDeclaration<ListboxLabelComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<ListboxLabelComponent, "hsi-ui-listbox-label", never, {}, {}, never, ["*"], true, never>;
12
- }
@@ -1,52 +0,0 @@
1
- import { ElementRef, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
2
- import { BehaviorSubject } from 'rxjs';
3
- import { ComboboxService } from '../combobox.service';
4
- import * as i0 from "@angular/core";
5
- export interface ListboxOptionPropertyChange {
6
- property: 'selected' | 'disabled';
7
- value: boolean;
8
- comboboxId: string;
9
- id: number;
10
- optionValue: string | number | boolean;
11
- }
12
- export declare class ListboxOptionComponent implements OnChanges {
13
- protected service: ComboboxService;
14
- label: ElementRef<HTMLDivElement>;
15
- template: TemplateRef<unknown>;
16
- boxDisplayLabel: string;
17
- value: any;
18
- /** Whether the option is selected.
19
- * If this property is changed during this component's lifecycle, no new value will be emitted from the listbox.
20
- * Box label and select all button will respond to changes.
21
- * @default false
22
- */
23
- selected: boolean;
24
- /** Whether the option is selected.
25
- * If this property is changed during this component's lifecycle, no new value will be emitted from the listbox.
26
- * Box label and select all button will respond to changes.
27
- * @default false
28
- */
29
- disabled: boolean;
30
- ariaLabel: string;
31
- id: number;
32
- protected _selected: BehaviorSubject<boolean>;
33
- selected$: import("rxjs").Observable<boolean>;
34
- private _disabled;
35
- disabled$: import("rxjs").Observable<boolean>;
36
- private externalPropertyChanges;
37
- externalPropertyChanges$: import("rxjs").Observable<ListboxOptionPropertyChange>;
38
- constructor(service: ComboboxService);
39
- get valueToEmit(): any | string;
40
- ngOnChanges(changes: SimpleChanges): void;
41
- isFirstChangeAndValueIsFalse(change: SimpleChanges, property: 'selected' | 'disabled'): boolean;
42
- getPropertyChange(property: 'selected' | 'disabled'): ListboxOptionPropertyChange;
43
- protected updateSelected(selected: boolean): void;
44
- private updateDisabled;
45
- select(): void;
46
- deselect(): void;
47
- toggleSelected(): void;
48
- isSelected(): boolean;
49
- isDisabled(): boolean;
50
- static ɵfac: i0.ɵɵFactoryDeclaration<ListboxOptionComponent, never>;
51
- static ɵcmp: i0.ɵɵComponentDeclaration<ListboxOptionComponent, "hsi-ui-listbox-option", never, { "boxDisplayLabel": { "alias": "boxDisplayLabel"; "required": false; }; "value": { "alias": "value"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, {}, never, ["*", "[selectedIcon]", "[unselectedIcon]"], true, never>;
52
- }
@@ -1,24 +0,0 @@
1
- import { DestroyRef, OnChanges } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import { ComboboxService } from '../combobox.service';
4
- import { ListboxGroupComponent } from '../listbox-group/listbox-group.component';
5
- import { ListboxOptionComponent } from '../listbox-option/listbox-option.component';
6
- import { ListboxComponent } from '../listbox/listbox.component';
7
- import * as i0 from "@angular/core";
8
- export declare class SelectAllListboxOptionComponent extends ListboxOptionComponent implements OnChanges {
9
- private listboxComponent;
10
- private destroyRef;
11
- boxDisplayLabel: string;
12
- controlledOptions$: Observable<ListboxOptionComponent[]>;
13
- controlledOptions: ListboxOptionComponent[];
14
- constructor(service: ComboboxService, listboxComponent: ListboxComponent, destroyRef: DestroyRef);
15
- ngOnChanges(): void;
16
- protected updateSelected(selected: boolean): void;
17
- setControlledOptions(): void;
18
- getControlledOptionsFromGroups(groups: ListboxGroupComponent[]): ListboxOptionComponent[];
19
- listenForOptionSelections(): void;
20
- updateSelectAllSelected(controlledOptions: ListboxOptionComponent[]): void;
21
- toggleSelected(): void;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<SelectAllListboxOptionComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<SelectAllListboxOptionComponent, "hsi-ui-select-all-listbox-option", never, { "boxDisplayLabel": { "alias": "boxDisplayLabel"; "required": false; }; }, {}, never, ["*", "[selectedIcon]", "[unselectedIcon]"], true, never>;
24
- }
@@ -1,41 +0,0 @@
1
- import { AfterViewInit, DestroyRef, ElementRef, NgZone, OnInit } from '@angular/core';
2
- import { BehaviorSubject } from 'rxjs';
3
- import { ComboboxAction, ComboboxService } from '../combobox.service';
4
- import { ListboxOptionComponent } from '../listbox-option/listbox-option.component';
5
- import { SelectedCountLabel } from '../listbox/listbox.component';
6
- import * as i0 from "@angular/core";
7
- export declare class TextboxComponent implements OnInit, AfterViewInit {
8
- ariaLabel: string;
9
- selectedCountLabel?: SelectedCountLabel;
10
- customLabel: (selectedOptions: ListboxOptionComponent[]) => string;
11
- dynamicLabel: boolean;
12
- findsOptionOnTyping: boolean;
13
- box: ElementRef<HTMLDivElement>;
14
- boxIcon: ElementRef<HTMLDivElement>;
15
- openKeys: string[];
16
- label: BehaviorSubject<string>;
17
- label$: import("rxjs").Observable<string>;
18
- protected destroyRef: DestroyRef;
19
- service: ComboboxService;
20
- private platform;
21
- protected zone: NgZone;
22
- ngOnInit(): void;
23
- ngAfterViewInit(): void;
24
- setFocusListener(): void;
25
- focusBox(): void;
26
- handleBlur(event: FocusEvent): void;
27
- isHtmlElement(target: EventTarget): target is HTMLElement;
28
- isMobile(): boolean;
29
- handleClick(): void;
30
- handleKeydown(event: KeyboardEvent): void;
31
- onEscape(): void;
32
- getActionFromKeydownEvent(event: KeyboardEvent): ComboboxAction;
33
- isTypingCharacter(event: KeyboardEvent): boolean;
34
- getActionFromKeyEventWhenOpen(event: KeyboardEvent): ComboboxAction;
35
- handleKeyboardAction(action: ComboboxAction, event: KeyboardEvent): void;
36
- setLabel(): void;
37
- getComputedLabel(touched: boolean, options: ListboxOptionComponent[]): string;
38
- getDefaultLabel(selectedOptions: ListboxOptionComponent[]): string;
39
- static ɵfac: i0.ɵɵFactoryDeclaration<TextboxComponent, never>;
40
- static ɵcmp: i0.ɵɵComponentDeclaration<TextboxComponent, "hsi-ui-textbox", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "selectedCountLabel": { "alias": "selectedCountLabel"; "required": false; }; "customLabel": { "alias": "customLabel"; "required": false; }; "dynamicLabel": { "alias": "dynamicLabel"; "required": false; }; "findsOptionOnTyping": { "alias": "findsOptionOnTyping"; "required": false; }; }, {}, never, ["[boxIcon]", "[boxLabel]"], true, never>;
41
- }
@@ -1,44 +0,0 @@
1
- import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
- import { BehaviorSubject } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- export interface HsiUiDirectoryItem {
5
- name: string;
6
- value?: string;
7
- children?: HsiUiDirectoryItem[];
8
- }
9
- export interface HsiUiDirectorySelection {
10
- activePath: string;
11
- selectedItem: string;
12
- }
13
- export declare class HsiUiDirectoryComponent implements OnChanges {
14
- items: HsiUiDirectoryItem[];
15
- level: number;
16
- path: string;
17
- terminalItemsAreSelectable: boolean;
18
- selectionElementRole: string;
19
- /**
20
- * Sets the activePath and selectedItem.
21
- */
22
- selection: HsiUiDirectorySelection;
23
- /**
24
- * Emits the activePath and selectedItem when a leaf item is selected.
25
- *
26
- * Constructed from the `value` of each item if provided, otherwise uses `name`.
27
- */
28
- selectionChanges: EventEmitter<HsiUiDirectorySelection>;
29
- /**
30
- * @internal
31
- *
32
- * Internal, will have no effect if provided at root level.
33
- */
34
- stateChanges: EventEmitter<HsiUiDirectorySelection>;
35
- state: BehaviorSubject<HsiUiDirectorySelection>;
36
- state$: import("rxjs").Observable<HsiUiDirectorySelection>;
37
- open: {};
38
- ngOnChanges(changes: SimpleChanges): void;
39
- toggleOpen(key: string): void;
40
- selectItem(item: HsiUiDirectoryItem): void;
41
- setState(state: HsiUiDirectorySelection): void;
42
- static ɵfac: i0.ɵɵFactoryDeclaration<HsiUiDirectoryComponent, never>;
43
- static ɵcmp: i0.ɵɵComponentDeclaration<HsiUiDirectoryComponent, "hsi-ui-directory", never, { "items": { "alias": "items"; "required": false; }; "level": { "alias": "level"; "required": false; }; "path": { "alias": "path"; "required": false; }; "terminalItemsAreSelectable": { "alias": "terminalItemsAreSelectable"; "required": false; }; "selectionElementRole": { "alias": "selectionElementRole"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; }, { "selectionChanges": "selectionChanges"; "stateChanges": "stateChanges"; }, never, never, true, never>;
44
- }
@@ -1 +0,0 @@
1
- export * from './directory.component';
@@ -1,4 +0,0 @@
1
- export * from './table-column';
2
- export * from './table.component';
3
- export * from './table.config';
4
- export * from './table.module';
@@ -1,9 +0,0 @@
1
- import { TableColumn } from '../table-column';
2
- import * as i0 from "@angular/core";
3
- export declare class SingleSortHeaderComponent<Datum> {
4
- column: TableColumn<Datum>;
5
- sortIcon: string;
6
- getColumnSortClasses(): string[];
7
- static ɵfac: i0.ɵɵFactoryDeclaration<SingleSortHeaderComponent<any>, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<SingleSortHeaderComponent<any>, "[hsi-ui-single-sort-header]", never, { "column": { "alias": "column"; "required": false; }; "sortIcon": { "alias": "sortIcon"; "required": false; }; }, {}, never, never, false, never>;
9
- }
@@ -1,53 +0,0 @@
1
- export declare enum SortDirection {
2
- asc = "asc",
3
- desc = "desc"
4
- }
5
- export type SortDirectionType = keyof typeof SortDirection;
6
- export type TableValue = string | number | boolean | Date;
7
- export type TableCellAlignment = 'left' | 'center' | 'right';
8
- export declare class TableColumn<Datum> {
9
- /**
10
- * The label of the column. Used in the table header.
11
- * */
12
- label: string;
13
- /**
14
- * Function to extract the value to be sorted on from the datum.
15
- * If not provided, the formatted value will be used for sorting.
16
- */
17
- getSortValue: (x: Datum) => TableValue;
18
- /**
19
- * Function to format the value for display in the table.
20
- */
21
- getFormattedValue: (x: Datum) => string;
22
- /**
23
- * Function to determine the alignment of the cell content.
24
- */
25
- getAlignment: (x: Datum) => TableCellAlignment;
26
- /**
27
- * Width of the column. Can be a percentage or pixel value.
28
- */
29
- width: string;
30
- /**
31
- * Function to determine the sort order of the column.
32
- * If not provided, sort with use d3.ascending on the getSortValue or getFormattedValue.
33
- */
34
- ascendingSortFunction: (a: Datum, b: Datum) => number;
35
- sortDirection: SortDirectionType;
36
- /**
37
- * Whether the column is sortable.
38
- */
39
- sortable: boolean;
40
- activelySorted: boolean;
41
- /**
42
- * The sort order of the column. Used to determine the order of sorting when multiple columns are sorted.
43
- * Sorting tiebreaks are determined by increasing sortOrder number.
44
- **/
45
- sortOrder: number;
46
- /**
47
- * Whether the column is a row header.
48
- */
49
- isRowHeader: boolean;
50
- readonly initialSortDirection: SortDirectionType;
51
- constructor(init?: Partial<TableColumn<Datum>>);
52
- defaultSort(a: Datum, b: Datum): number;
53
- }
@@ -1,27 +0,0 @@
1
- import { DestroyRef, OnInit } from '@angular/core';
2
- import { BehaviorSubject, Observable } from 'rxjs';
3
- import { TableColumn } from './table-column';
4
- import { HsiUiTableConfig } from './table.config';
5
- import * as i0 from "@angular/core";
6
- export declare class TableComponent<Datum> implements OnInit {
7
- private destroyRef;
8
- config$: Observable<HsiUiTableConfig<Datum>>;
9
- sortIcon: string;
10
- data$: Observable<Datum[]>;
11
- columns$: Observable<TableColumn<Datum>[]>;
12
- tableHeaders$: Observable<string[]>;
13
- sort: BehaviorSubject<TableColumn<Datum>>;
14
- sort$: Observable<TableColumn<Datum>>;
15
- constructor(destroyRef: DestroyRef);
16
- ngOnInit(): void;
17
- setTableData(): void;
18
- getMinSortOrderColumn(columns: TableColumn<Datum>[]): TableColumn<Datum>;
19
- getColumnsWithNewSortApplied(activeSortColumn: TableColumn<Datum>, columns: TableColumn<Datum>[], toggleSortDirection?: boolean): TableColumn<Datum>[];
20
- setTableHeaders(): void;
21
- validateRowHeaders(): void;
22
- sortTableByColumn(column: TableColumn<Datum>): void;
23
- sortData(data: Datum[], primaryColumnSort: TableColumn<Datum>, columns: TableColumn<Datum>[]): Datum[];
24
- columnTrackingFunction(_: number, column: TableColumn<Datum>): string;
25
- static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, never>;
26
- static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "hsi-ui-table", never, { "config$": { "alias": "config$"; "required": false; }; "sortIcon": { "alias": "sortIcon"; "required": false; }; }, {}, never, never, false, never>;
27
- }
@@ -1,5 +0,0 @@
1
- import { TableColumn } from './table-column';
2
- export declare class HsiUiTableConfig<Datum> {
3
- data: Datum[];
4
- columns: TableColumn<Datum>[];
5
- }