@sebgroup/green-angular 4.6.1 → 4.6.2
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/esm2022/src/v-angular/dropdown/typeahead/index.mjs +4 -1
- package/esm2022/src/v-angular/dropdown/typeahead/typeahead.directive.mjs +177 -0
- package/esm2022/v-angular/base-control-value-accessor/base-control-value-accessor.component.mjs +287 -0
- package/esm2022/v-angular/base-control-value-accessor/base-control-value-accessor.module.mjs +17 -0
- package/esm2022/v-angular/base-control-value-accessor/index.mjs +3 -0
- package/esm2022/v-angular/breadcrumbs/breadcrumbs.component.mjs +25 -0
- package/esm2022/v-angular/breadcrumbs/breadcrumbs.module.mjs +20 -0
- package/esm2022/v-angular/breadcrumbs/index.mjs +3 -0
- package/esm2022/v-angular/button/button.component.mjs +108 -0
- package/esm2022/v-angular/button/button.module.mjs +20 -0
- package/esm2022/v-angular/button/index.mjs +3 -0
- package/esm2022/v-angular/card/card.component.mjs +11 -0
- package/esm2022/v-angular/card/card.module.mjs +18 -0
- package/esm2022/v-angular/card/index.mjs +3 -0
- package/esm2022/v-angular/checkbox/checkbox.component.mjs +72 -0
- package/esm2022/v-angular/checkbox/checkbox.module.mjs +19 -0
- package/esm2022/v-angular/checkbox/index.mjs +3 -0
- package/esm2022/v-angular/dropdown/dropdown-list/dropdown-list.component.mjs +256 -0
- package/esm2022/v-angular/dropdown/dropdown-list/index.mjs +2 -0
- package/esm2022/v-angular/dropdown/dropdown.component.mjs +239 -0
- package/esm2022/v-angular/dropdown/dropdown.module.mjs +22 -0
- package/esm2022/v-angular/dropdown/index.mjs +6 -0
- package/esm2022/v-angular/dropdown/typeahead/index.mjs +6 -0
- package/esm2022/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.mjs +98 -0
- package/esm2022/v-angular/dropdown/typeahead/typeahead-highlight/typeahead-highlight.component.mjs +85 -0
- package/esm2022/v-angular/dropdown/typeahead/typeahead-input/typeahead-input.component.mjs +132 -0
- package/esm2022/v-angular/dropdown/typeahead/typeahead.directive.mjs +177 -0
- package/esm2022/v-angular/dropdown/typeahead/typeahead.module.mjs +33 -0
- package/esm2022/v-angular/i18n/i18n.json +12 -0
- package/esm2022/v-angular/i18n/i18n.module.mjs +83 -0
- package/esm2022/v-angular/i18n/i18n.test.module.mjs +89 -0
- package/esm2022/v-angular/i18n/index.mjs +3 -0
- package/esm2022/v-angular/index.mjs +17 -0
- package/esm2022/v-angular/info-circle/index.mjs +3 -0
- package/esm2022/v-angular/info-circle/info-circle.component.mjs +28 -0
- package/esm2022/v-angular/info-circle/info-circle.module.mjs +21 -0
- package/esm2022/v-angular/input/index.mjs +3 -0
- package/esm2022/v-angular/input/input.component.mjs +221 -0
- package/esm2022/v-angular/input/input.module.mjs +32 -0
- package/esm2022/v-angular/input-mask/config.mjs +9 -0
- package/esm2022/v-angular/input-mask/constants.mjs +2 -0
- package/esm2022/v-angular/input-mask/index.mjs +6 -0
- package/esm2022/v-angular/input-mask/input-mask-format.pipe.mjs +20 -0
- package/esm2022/v-angular/input-mask/input-mask.directive.mjs +165 -0
- package/esm2022/v-angular/input-mask/input-mask.module.mjs +35 -0
- package/esm2022/v-angular/input-mask/input-mask.types.mjs +2 -0
- package/esm2022/v-angular/modal/dialog/dialog.component.mjs +190 -0
- package/esm2022/v-angular/modal/fold-out/fold-out.component.mjs +56 -0
- package/esm2022/v-angular/modal/fold-out/fold-out.directive.mjs +19 -0
- package/esm2022/v-angular/modal/index.mjs +6 -0
- package/esm2022/v-angular/modal/modal.globals.mjs +20 -0
- package/esm2022/v-angular/modal/modal.module.mjs +40 -0
- package/esm2022/v-angular/modal/modal.types.mjs +2 -0
- package/esm2022/v-angular/modal/slide-out/slide-out.component.mjs +229 -0
- package/esm2022/v-angular/radio/index.mjs +3 -0
- package/esm2022/v-angular/radio/radio.component.mjs +130 -0
- package/esm2022/v-angular/radio/radio.module.mjs +20 -0
- package/esm2022/v-angular/sebgroup-green-angular-v-angular.mjs +5 -0
- package/esm2022/v-angular/textarea/index.mjs +3 -0
- package/esm2022/v-angular/textarea/textarea.component.mjs +101 -0
- package/esm2022/v-angular/textarea/textarea.module.mjs +18 -0
- package/esm2022/v-angular/tooltip/index.mjs +3 -0
- package/esm2022/v-angular/tooltip/tooltip.directive.mjs +273 -0
- package/esm2022/v-angular/tooltip/tooltip.module.mjs +18 -0
- package/esm2022/v-angular/v-angular.module.mjs +76 -0
- package/fesm2022/sebgroup-green-angular-src-v-angular-dropdown.mjs +172 -3
- package/fesm2022/sebgroup-green-angular-src-v-angular-dropdown.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-v-angular.mjs +3341 -0
- package/fesm2022/sebgroup-green-angular-v-angular.mjs.map +1 -0
- package/package.json +8 -2
- package/src/v-angular/dropdown/typeahead/index.d.ts +3 -0
- package/src/v-angular/dropdown/typeahead/typeahead.directive.d.ts +76 -0
- package/v-angular/base-control-value-accessor/base-control-value-accessor.component.d.ts +124 -0
- package/v-angular/base-control-value-accessor/base-control-value-accessor.module.d.ts +7 -0
- package/v-angular/base-control-value-accessor/index.d.ts +2 -0
- package/v-angular/breadcrumbs/breadcrumbs.component.d.ts +18 -0
- package/v-angular/breadcrumbs/breadcrumbs.module.d.ts +10 -0
- package/v-angular/breadcrumbs/index.d.ts +2 -0
- package/v-angular/button/button.component.d.ts +62 -0
- package/v-angular/button/button.module.d.ts +10 -0
- package/v-angular/button/index.d.ts +2 -0
- package/v-angular/card/card.component.d.ts +5 -0
- package/v-angular/card/card.module.d.ts +8 -0
- package/v-angular/card/index.d.ts +2 -0
- package/v-angular/checkbox/checkbox.component.d.ts +27 -0
- package/v-angular/checkbox/checkbox.module.d.ts +9 -0
- package/v-angular/checkbox/index.d.ts +2 -0
- package/v-angular/dropdown/dropdown-list/dropdown-list.component.d.ts +89 -0
- package/v-angular/dropdown/dropdown-list/index.d.ts +1 -0
- package/v-angular/dropdown/dropdown.component.d.ts +99 -0
- package/v-angular/dropdown/dropdown.module.d.ts +12 -0
- package/v-angular/dropdown/index.d.ts +5 -0
- package/v-angular/dropdown/typeahead/index.d.ts +5 -0
- package/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.d.ts +34 -0
- package/v-angular/dropdown/typeahead/typeahead-highlight/typeahead-highlight.component.d.ts +34 -0
- package/v-angular/dropdown/typeahead/typeahead-input/typeahead-input.component.d.ts +59 -0
- package/v-angular/dropdown/typeahead/typeahead.directive.d.ts +76 -0
- package/v-angular/dropdown/typeahead/typeahead.module.d.ts +11 -0
- package/v-angular/i18n/i18n.module.d.ts +15 -0
- package/v-angular/i18n/i18n.test.module.d.ts +27 -0
- package/v-angular/i18n/index.d.ts +2 -0
- package/v-angular/index.d.ts +16 -0
- package/v-angular/info-circle/index.d.ts +2 -0
- package/v-angular/info-circle/info-circle.component.d.ts +16 -0
- package/v-angular/info-circle/info-circle.module.d.ts +10 -0
- package/v-angular/input/index.d.ts +2 -0
- package/v-angular/input/input.component.d.ts +90 -0
- package/v-angular/input/input.module.d.ts +11 -0
- package/v-angular/input-mask/config.d.ts +6 -0
- package/v-angular/input-mask/constants.d.ts +2 -0
- package/v-angular/input-mask/index.d.ts +5 -0
- package/v-angular/input-mask/input-mask-format.pipe.d.ts +8 -0
- package/v-angular/input-mask/input-mask.directive.d.ts +39 -0
- package/v-angular/input-mask/input-mask.module.d.ts +11 -0
- package/v-angular/input-mask/input-mask.types.d.ts +20 -0
- package/v-angular/modal/dialog/dialog.component.d.ts +55 -0
- package/v-angular/modal/fold-out/fold-out.component.d.ts +24 -0
- package/v-angular/modal/fold-out/fold-out.directive.d.ts +6 -0
- package/v-angular/modal/index.d.ts +5 -0
- package/v-angular/modal/modal.globals.d.ts +13 -0
- package/v-angular/modal/modal.module.d.ts +13 -0
- package/v-angular/modal/modal.types.d.ts +5 -0
- package/v-angular/modal/slide-out/slide-out.component.d.ts +76 -0
- package/v-angular/radio/index.d.ts +2 -0
- package/v-angular/radio/radio.component.d.ts +48 -0
- package/v-angular/radio/radio.module.d.ts +9 -0
- package/v-angular/textarea/index.d.ts +2 -0
- package/v-angular/textarea/textarea.component.d.ts +44 -0
- package/v-angular/textarea/textarea.module.d.ts +8 -0
- package/v-angular/tooltip/index.d.ts +2 -0
- package/v-angular/tooltip/tooltip.directive.d.ts +106 -0
- package/v-angular/tooltip/tooltip.module.d.ts +8 -0
- package/v-angular/v-angular.module.d.ts +22 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from './typeahead-highlight/typeahead-highlight.component';
|
|
2
|
+
export * from './typeahead-input/typeahead-input.component';
|
|
3
|
+
export * from './typeahead-dropdown-list/typeahead-dropdown-list.component';
|
|
4
|
+
export * from './typeahead.directive';
|
|
5
|
+
export * from './typeahead.module';
|
package/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { TranslocoScope } from '@ngneat/transloco';
|
|
3
|
+
import { OptionBase } from '@sebgroup/green-angular/src/v-angular/core';
|
|
4
|
+
import { NgvDropdownListComponent } from '../../dropdown-list/dropdown-list.component';
|
|
5
|
+
import { NgvInputComponent } from '@sebgroup/green-angular/src/v-angular/input';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class NgvTypeaheadDropdownListComponent extends NgvDropdownListComponent implements OnInit, OnDestroy {
|
|
8
|
+
protected translocoScope: TranslocoScope;
|
|
9
|
+
private element;
|
|
10
|
+
hostComponent: NgvInputComponent;
|
|
11
|
+
/** Formats each item that is displayed as an option. Only applies format if the option if it implement Option interface. */
|
|
12
|
+
resultFormatter?: (option: OptionBase<any>) => string;
|
|
13
|
+
/** Formats the selected item in the input when dropdown is opened. If no function is provided, it will display the value of the selected objects label property */
|
|
14
|
+
selectedFormatter?: (selected: OptionBase<any>) => string;
|
|
15
|
+
private _destroy$;
|
|
16
|
+
constructor(translocoScope: TranslocoScope, element: ElementRef);
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
/** @Internal Subscribe to click outside dropdownList and input to close dropdownList */
|
|
20
|
+
private subscribeToOutsideClickEvent;
|
|
21
|
+
/** @Internal Update state of the host-input to reflect the selected value */
|
|
22
|
+
private handleSelectedValueChanges;
|
|
23
|
+
/** @Internal Expand the dropdown when input receives focus. If no state, set empty string in input */
|
|
24
|
+
private handleFocusChanges;
|
|
25
|
+
/**
|
|
26
|
+
* @internal Formats the selected option to display in the input. Interpolate the returned value
|
|
27
|
+
* since we don't know the return type or label type.
|
|
28
|
+
* @param value The selected value
|
|
29
|
+
* @returns The formatted value
|
|
30
|
+
*/
|
|
31
|
+
private formatSelected;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvTypeaheadDropdownListComponent, [{ optional: true; skipSelf: true; }, null]>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgvTypeaheadDropdownListComponent, "nggv-typeahead-dropdown-list", never, { "hostComponent": { "alias": "hostComponent"; "required": false; }; "resultFormatter": { "alias": "resultFormatter"; "required": false; }; "selectedFormatter": { "alias": "selectedFormatter"; "required": false; }; }, {}, never, never, false, never>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NgvTypeaheadHighlightComponent implements OnChanges {
|
|
4
|
+
/** The text that is displayed in the dropdown list */
|
|
5
|
+
textContent?: string;
|
|
6
|
+
/** The substring that should be highlighted within textContent */
|
|
7
|
+
textToHighlight?: string;
|
|
8
|
+
prefix?: string;
|
|
9
|
+
match?: string;
|
|
10
|
+
suffix?: string;
|
|
11
|
+
text: string;
|
|
12
|
+
input: string;
|
|
13
|
+
/**
|
|
14
|
+
* Regexp of characters that are allowed in textContent without being found in textToHighlight
|
|
15
|
+
* Allow whitespaces.
|
|
16
|
+
* */
|
|
17
|
+
allowedNonMatchingChars: RegExp;
|
|
18
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
19
|
+
private updateValues;
|
|
20
|
+
/**
|
|
21
|
+
* Function that finds the start and end index of where the input is located within the text to display.
|
|
22
|
+
* First occurence is returned. Allows for spaces to occur despite input not matching space.
|
|
23
|
+
* Loops through each character in splittedText and when a char in splittedText equlas the first character of
|
|
24
|
+
* splittedInput, evaluate wether it's match on the entire input.
|
|
25
|
+
* - If it's => return indexes.
|
|
26
|
+
* - If it's not => break out and check next char in outer loop.
|
|
27
|
+
* @param splittedText the text content splitted in an array
|
|
28
|
+
* @param splittedInput the input splitted in an array
|
|
29
|
+
* @returns { start: number, end: number } Indexes of where the match starts and ends in the text displatyed
|
|
30
|
+
*/
|
|
31
|
+
private getHighlightedPart;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvTypeaheadHighlightComponent, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgvTypeaheadHighlightComponent, "nggv-typeahead-highlight", never, { "textContent": { "alias": "textContent"; "required": false; }; "textToHighlight": { "alias": "textToHighlight"; "required": false; }; }, {}, never, never, false, never>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
+
import { NgControl } from '@angular/forms';
|
|
3
|
+
import { TranslocoScope } from '@ngneat/transloco';
|
|
4
|
+
import { OptionBase } from '@sebgroup/green-angular/src/v-angular/core';
|
|
5
|
+
import { NgvDropdownComponent } from '../../dropdown.component';
|
|
6
|
+
import { NgvInputComponent } from '@sebgroup/green-angular/src/v-angular/input';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class NgvTypeaheadInputComponent extends NgvInputComponent implements OnInit, OnDestroy {
|
|
9
|
+
private element;
|
|
10
|
+
private renderer2;
|
|
11
|
+
ngControl: NgControl;
|
|
12
|
+
protected translocoScope: TranslocoScope;
|
|
13
|
+
protected cdr: ChangeDetectorRef;
|
|
14
|
+
/** Reference to the host dropdown */
|
|
15
|
+
hostComponent: NgvDropdownComponent;
|
|
16
|
+
/** Formats each item that is displayed as an option. Only applies format if the option if it implement Option interface. */
|
|
17
|
+
resultFormatter?: (option: OptionBase<any>) => string;
|
|
18
|
+
/** Formats the selected item in the input when dropdown is opened. If no function is provided, it will display the value of the selected objects label property */
|
|
19
|
+
selectedFormatter?: (selected: OptionBase<any>) => string;
|
|
20
|
+
get dropdownButton(): HTMLElement;
|
|
21
|
+
/** Boolean to indicate wether the dropdown is expanded or not, to apply appropriate styling */
|
|
22
|
+
expanded: boolean;
|
|
23
|
+
/** Used to determine the height of the inputin html */
|
|
24
|
+
buttonHeight?: number;
|
|
25
|
+
constructor(element: ElementRef, renderer2: Renderer2, ngControl: NgControl, translocoScope: TranslocoScope, cdr: ChangeDetectorRef);
|
|
26
|
+
ngOnInit(): void;
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
* Allow space to be inputted as text
|
|
30
|
+
* @param event fired containing which key was released.
|
|
31
|
+
*/
|
|
32
|
+
onKeyUp(event: KeyboardEvent): void;
|
|
33
|
+
/**
|
|
34
|
+
* @internal
|
|
35
|
+
* First time the dropdown is expanded, move the input sp it becomes a child of the dropdown button
|
|
36
|
+
* to better reflect semantics and styling.
|
|
37
|
+
*/
|
|
38
|
+
private moveInput;
|
|
39
|
+
/**
|
|
40
|
+
* @internal
|
|
41
|
+
* When dropdown is expanded, focus on the input. If a value is selected, set it in the input.
|
|
42
|
+
* When the dropdown is collapsed, empty the input from text.
|
|
43
|
+
*/
|
|
44
|
+
private handleExpandedChange;
|
|
45
|
+
/**
|
|
46
|
+
* @internal Formats the selected option to display in the input. Interpolate the returned value
|
|
47
|
+
* since we don't know the return type or label type.
|
|
48
|
+
* @param value The selected value
|
|
49
|
+
* @returns The formatted value
|
|
50
|
+
*/
|
|
51
|
+
private formatSelected;
|
|
52
|
+
/**
|
|
53
|
+
* Sets the input programmatically instead of native HTML input event.
|
|
54
|
+
* @param input
|
|
55
|
+
*/
|
|
56
|
+
private setInput;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvTypeaheadInputComponent, [null, null, { optional: true; self: true; }, { optional: true; }, null]>;
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgvTypeaheadInputComponent, "nggv-typeahead-input", never, { "hostComponent": { "alias": "hostComponent"; "required": false; }; "resultFormatter": { "alias": "resultFormatter"; "required": false; }; "selectedFormatter": { "alias": "selectedFormatter"; "required": false; }; }, {}, never, never, false, never>;
|
|
59
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { ComponentRef, ElementRef, EventEmitter, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { OperatorFunction } from 'rxjs';
|
|
3
|
+
import { Option, OptionBase } from '@sebgroup/green-angular/src/v-angular/core';
|
|
4
|
+
import { NgvDropdownComponent } from '../dropdown.component';
|
|
5
|
+
import { NgvInputComponent } from '@sebgroup/green-angular/src/v-angular/input';
|
|
6
|
+
import { NgvTypeaheadDropdownListComponent } from '../typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component';
|
|
7
|
+
import { NgvTypeaheadInputComponent } from './typeahead-input/typeahead-input.component';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class NgvTypeaheadDirective<K = string | null | undefined, V = string | null | undefined, T extends Option<K, V> = Option<K, V>> implements OnInit, OnDestroy {
|
|
10
|
+
private viewContainerRef;
|
|
11
|
+
private element;
|
|
12
|
+
private hostDropdown;
|
|
13
|
+
private hostInput;
|
|
14
|
+
/** Function that filter the inputvalue */
|
|
15
|
+
set ngvTypeahead(value: OperatorFunction<string, T[]> | undefined);
|
|
16
|
+
/** Formats each item that is displayed as an option. Only applies format if the option if it implement Option interface. */
|
|
17
|
+
resultFormatter?: (option: OptionBase<any>) => string;
|
|
18
|
+
/** Formats the selected item in the input when dropdown is opened. If no function is provided, it will display the value of the selected objects label property */
|
|
19
|
+
selectedFormatter?: (selected: OptionBase<any>) => string;
|
|
20
|
+
/** Allow option to be unselected in the dropdown even if it is required. Defaults to true */
|
|
21
|
+
allowUnselect: boolean;
|
|
22
|
+
/** Custom label for the unselect option */
|
|
23
|
+
unselectLabel?: string;
|
|
24
|
+
/** Emits the entered string the user has written in the input */
|
|
25
|
+
filterPhraseChange: EventEmitter<string>;
|
|
26
|
+
/** Forward text inputs to apply the filter function*/
|
|
27
|
+
onNgvInput(event: any): void;
|
|
28
|
+
/** Helper to the determine if the host is nggv-drodpown or nggv-input*/
|
|
29
|
+
get hostIsDropdown(): boolean;
|
|
30
|
+
/** Predefined options */
|
|
31
|
+
get defaultNullishOption(): OptionBase<any>;
|
|
32
|
+
get emptyOption(): OptionBase<any>;
|
|
33
|
+
/** Name of the component. nggv-dropdown if NgvDropdownComponent or nggv-input if NgvInputComponent */
|
|
34
|
+
get localName(): any;
|
|
35
|
+
dropdownListComponent: ComponentRef<NgvTypeaheadDropdownListComponent>;
|
|
36
|
+
inputComponent: ComponentRef<NgvTypeaheadInputComponent>;
|
|
37
|
+
private typeaheadFunction?;
|
|
38
|
+
private inputValue$;
|
|
39
|
+
private inputSubscription$?;
|
|
40
|
+
private onDestroy$;
|
|
41
|
+
constructor(viewContainerRef: ViewContainerRef, element: ElementRef, hostDropdown: NgvDropdownComponent, hostInput: NgvInputComponent);
|
|
42
|
+
ngOnInit(): void;
|
|
43
|
+
ngOnDestroy(): void;
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
* Core functionality of typeahead. Emits input, then filters the result based on the supplied function
|
|
47
|
+
* If directive is applied on nggv-input, manually show or hide options in the list.
|
|
48
|
+
* If directive is applied on nggv-dropdown, let the dropdown itself choose when to open or close
|
|
49
|
+
*/
|
|
50
|
+
private handleInputChanges;
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* Creates a nggv-input if the host itself is not a text-input
|
|
54
|
+
* Set styles to not display the input when closed
|
|
55
|
+
* Trigger filtering when changes occur in the field
|
|
56
|
+
* */
|
|
57
|
+
private createInput;
|
|
58
|
+
/** @internal Creates a nggv-dropdown-list if the host itself is a nggv-input */
|
|
59
|
+
private createDropdownList;
|
|
60
|
+
/**
|
|
61
|
+
* @internal Sets the options the user can select.
|
|
62
|
+
* If the host is a nggv-dropdown, utilize the dropdown itself to display the options
|
|
63
|
+
* If the host is a nggv-input, use the created nggv-dropdown-list to displaye the options
|
|
64
|
+
* @param filteredValues The options to display in the dropdown
|
|
65
|
+
* @param emptyInput If the input is empty
|
|
66
|
+
*/
|
|
67
|
+
private setOptions;
|
|
68
|
+
/**
|
|
69
|
+
* @internal Formats the available options to display in the dropdown list
|
|
70
|
+
* @param options The selected value
|
|
71
|
+
* @returns The formatted value
|
|
72
|
+
*/
|
|
73
|
+
private formatOptions;
|
|
74
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvTypeaheadDirective<any, any, any>, [null, null, { optional: true; host: true; }, { optional: true; host: true; }]>;
|
|
75
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgvTypeaheadDirective<any, any, any>, "nggv-input[ngvTypeahead]", never, { "ngvTypeahead": { "alias": "ngvTypeahead"; "required": false; }; "resultFormatter": { "alias": "resultFormatter"; "required": false; }; "selectedFormatter": { "alias": "selectedFormatter"; "required": false; }; "allowUnselect": { "alias": "allowUnselect"; "required": false; }; "unselectLabel": { "alias": "unselectLabel"; "required": false; }; }, { "filterPhraseChange": "filterPhraseChange"; }, never, never, true, never>;
|
|
76
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./typeahead-highlight/typeahead-highlight.component";
|
|
3
|
+
import * as i2 from "./typeahead-input/typeahead-input.component";
|
|
4
|
+
import * as i3 from "./typeahead-dropdown-list/typeahead-dropdown-list.component";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "@sebgroup/green-angular/src/v-angular/tooltip";
|
|
7
|
+
export declare class NgvTypeaheadModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvTypeaheadModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgvTypeaheadModule, [typeof i1.NgvTypeaheadHighlightComponent, typeof i2.NgvTypeaheadInputComponent, typeof i3.NgvTypeaheadDropdownListComponent], [typeof i4.CommonModule, typeof i5.NgvTooltipModule], [typeof i1.NgvTypeaheadHighlightComponent, typeof i2.NgvTypeaheadInputComponent, typeof i3.NgvTypeaheadDropdownListComponent]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgvTypeaheadModule>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HashMap, TranslocoMissingHandler, TranslocoMissingHandlerData, TranslocoTranspiler } from '@ngneat/transloco';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@ngneat/transloco";
|
|
4
|
+
export declare class NgvMissingHandler implements TranslocoMissingHandler {
|
|
5
|
+
private transpiler;
|
|
6
|
+
constructor(transpiler: TranslocoTranspiler);
|
|
7
|
+
handle(key: string, _: TranslocoMissingHandlerData, params: HashMap): any;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvMissingHandler, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NgvMissingHandler>;
|
|
10
|
+
}
|
|
11
|
+
export declare class NgvI18nModule {
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvI18nModule, never>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgvI18nModule, never, never, [typeof i1.TranslocoModule]>;
|
|
14
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgvI18nModule>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { HashMap, Translation, TranslocoConfig, TranslocoFallbackStrategy, TranslocoInterceptor, TranslocoMissingHandler, TranslocoTranspilerFunction } from '@ngneat/transloco';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
export declare class TranslocoMockPipe implements PipeTransform {
|
|
6
|
+
transform: (value: number) => number;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslocoMockPipe, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TranslocoMockPipe, "transloco", false>;
|
|
9
|
+
}
|
|
10
|
+
export declare class TranslocoMockTranspiler implements TranslocoTranspilerFunction {
|
|
11
|
+
transpile: (..._args: string[]) => string;
|
|
12
|
+
}
|
|
13
|
+
export declare class TranslocoMockMissingHandler implements TranslocoMissingHandler {
|
|
14
|
+
handle: (key: string, _: TranslocoConfig, _params: HashMap) => string;
|
|
15
|
+
}
|
|
16
|
+
export declare class TranslocoMockStrategy implements TranslocoFallbackStrategy {
|
|
17
|
+
getNextLangs: (_failedLang: string) => any;
|
|
18
|
+
}
|
|
19
|
+
export declare class TranslocoMockInterceptor implements TranslocoInterceptor {
|
|
20
|
+
preSaveTranslation(translation: Translation, _lang: string): Translation;
|
|
21
|
+
preSaveTranslationKey(_key: string, value: string, _lang: string): string;
|
|
22
|
+
}
|
|
23
|
+
export declare class NgvI18nTestModule {
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvI18nTestModule, never>;
|
|
25
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgvI18nTestModule, [typeof TranslocoMockPipe], [typeof i1.CommonModule], [typeof TranslocoMockPipe]>;
|
|
26
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgvI18nTestModule>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './base-control-value-accessor';
|
|
2
|
+
export * from './breadcrumbs';
|
|
3
|
+
export * from './button';
|
|
4
|
+
export * from './card';
|
|
5
|
+
export * from './checkbox';
|
|
6
|
+
export * from './dropdown';
|
|
7
|
+
export * from './dropdown/dropdown-list';
|
|
8
|
+
export * from './i18n';
|
|
9
|
+
export * from './info-circle';
|
|
10
|
+
export * from './input';
|
|
11
|
+
export * from './input-mask';
|
|
12
|
+
export * from './modal';
|
|
13
|
+
export * from './radio';
|
|
14
|
+
export * from './textarea';
|
|
15
|
+
export * from './tooltip';
|
|
16
|
+
export * from './v-angular.module';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import '@sebgroup/green-core/components/icon/icons/circle-info';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* A button that will present an explanation to a problem/question.
|
|
5
|
+
* https://designlibrary.sebgroup.com/components/component-contextual-help-button
|
|
6
|
+
*/
|
|
7
|
+
export declare class NgvInfoCircleComponent {
|
|
8
|
+
/** Special property used for selecting DOM elements during automated UI testing. */
|
|
9
|
+
thook: string;
|
|
10
|
+
/**
|
|
11
|
+
* Text to display in tooltip when mouse hovers over icon.
|
|
12
|
+
*/
|
|
13
|
+
info: string;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvInfoCircleComponent, never>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgvInfoCircleComponent, "nggv-info-circle", never, { "thook": { "alias": "thook"; "required": false; }; "info": { "alias": "info"; "required": false; }; }, {}, never, never, false, never>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./info-circle.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@sebgroup/green-angular/src/lib/shared";
|
|
5
|
+
import * as i4 from "@sebgroup/green-angular/src/v-angular/tooltip";
|
|
6
|
+
export declare class NgvInfoCircleModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvInfoCircleModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgvInfoCircleModule, [typeof i1.NgvInfoCircleComponent], [typeof i2.CommonModule, typeof i3.NggCoreWrapperModule, typeof i4.NgvTooltipModule], [typeof i1.NgvInfoCircleComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgvInfoCircleModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { NgControl, UntypedFormControl } from '@angular/forms';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import { TranslocoScope } from '@ngneat/transloco';
|
|
5
|
+
import type { InputmaskOptions } from '@sebgroup/green-angular/src/v-angular/input-mask';
|
|
6
|
+
import { NgvBaseControlValueAccessorComponent } from '@sebgroup/green-angular/src/v-angular/base-control-value-accessor';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Input fields allow users to add and edit text.
|
|
10
|
+
* https://designlibrary.sebgroup.com/components/component-input
|
|
11
|
+
*/
|
|
12
|
+
export declare class NgvInputComponent extends NgvBaseControlValueAccessorComponent implements OnInit, OnDestroy {
|
|
13
|
+
ngControl: NgControl;
|
|
14
|
+
protected translocoScope: TranslocoScope;
|
|
15
|
+
protected cdr: ChangeDetectorRef;
|
|
16
|
+
/** Adding .gds-form-item as a class to host element */
|
|
17
|
+
class: string;
|
|
18
|
+
/** Special property used for selecting DOM elements during automated UI testing. */
|
|
19
|
+
thook: string;
|
|
20
|
+
/** Type of input field. Should avoid types that modify field too much such as range. */
|
|
21
|
+
type: string;
|
|
22
|
+
/** Text shown before input has a written value. */
|
|
23
|
+
placeholder?: string;
|
|
24
|
+
/** If set to "on", hint for form autofill feature. */
|
|
25
|
+
autocomplete: string;
|
|
26
|
+
/** If set to true, the value will not be editable. */
|
|
27
|
+
readonly: boolean;
|
|
28
|
+
/** If set to true, enables the Angular template-driven email validator. */
|
|
29
|
+
email: boolean;
|
|
30
|
+
/** Minimum value required for numeric input types. */
|
|
31
|
+
min: number;
|
|
32
|
+
/** Maximum value required for numeric input types. */
|
|
33
|
+
max: number;
|
|
34
|
+
/** Incremental values that are valid for numeric input types. */
|
|
35
|
+
step: number;
|
|
36
|
+
/** Minimum length (number of characters) of value. */
|
|
37
|
+
set minLength(length: number);
|
|
38
|
+
/**
|
|
39
|
+
* Minimum length (number of characters) of value.
|
|
40
|
+
* @deprecated minlength triggers angular-template-validation. Use @Input() minLength instead.
|
|
41
|
+
*/
|
|
42
|
+
set minlength(length: number);
|
|
43
|
+
get minlength(): number;
|
|
44
|
+
/** Maximum length (number of characters) of value. */
|
|
45
|
+
set maxLength(length: number);
|
|
46
|
+
get maxlength(): number;
|
|
47
|
+
/**
|
|
48
|
+
* Maximum length (number of characters) of value.
|
|
49
|
+
* @deprecated maxlength triggers angular-template-validation. Use @Input() maxLength instead.
|
|
50
|
+
*/
|
|
51
|
+
set maxlength(length: number);
|
|
52
|
+
private _maxlength;
|
|
53
|
+
private _minlength;
|
|
54
|
+
/** Wether to show label that tells how many characters are still left to be entered. Will only be set if maxLength is also set */
|
|
55
|
+
private _showCharacterCountDown;
|
|
56
|
+
set showCharacterCountdown(option: boolean);
|
|
57
|
+
get showCharacterCountdown(): boolean;
|
|
58
|
+
/** Pattern the value must match to be valid. */
|
|
59
|
+
pattern: string;
|
|
60
|
+
/** Amount of time to wait until emitting (ngvINput) event */
|
|
61
|
+
debounceTime: number;
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated
|
|
64
|
+
* Text to put in badge
|
|
65
|
+
*/
|
|
66
|
+
badgeText: string;
|
|
67
|
+
/** Settings for input mask if requested */
|
|
68
|
+
private _inputMask;
|
|
69
|
+
set inputMask(newInputMask: InputmaskOptions<any>);
|
|
70
|
+
get inputMask(): InputmaskOptions<any>;
|
|
71
|
+
/** Emits every time the value of the inner input field changes, independantly of updates on the formcontroller */
|
|
72
|
+
ngvInput: EventEmitter<any>;
|
|
73
|
+
private _formControl;
|
|
74
|
+
get control(): UntypedFormControl;
|
|
75
|
+
/** Returns if maxlength is used */
|
|
76
|
+
get hasMaxLength(): boolean;
|
|
77
|
+
/** Toggler for showing or hiding the input field */
|
|
78
|
+
hideInput$: Subject<boolean>;
|
|
79
|
+
protected inputChange$: Subject<any>;
|
|
80
|
+
protected _destroy$: Subject<boolean>;
|
|
81
|
+
constructor(ngControl: NgControl, translocoScope: TranslocoScope, cdr: ChangeDetectorRef);
|
|
82
|
+
ngOnInit(): void;
|
|
83
|
+
ngOnDestroy(): void;
|
|
84
|
+
writeValue(value: any): void;
|
|
85
|
+
cutTextAfterMaxLength(value: any): any;
|
|
86
|
+
/** @internal */
|
|
87
|
+
onInput(event: Event): void;
|
|
88
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvInputComponent, [{ optional: true; self: true; }, { optional: true; }, null]>;
|
|
89
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgvInputComponent, "nggv-input", never, { "thook": { "alias": "thook"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "autocomplete": { "alias": "autocomplete"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "email": { "alias": "email"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "step": { "alias": "step"; "required": false; }; "minLength": { "alias": "minLength"; "required": false; }; "minlength": { "alias": "minlength"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "showCharacterCountdown": { "alias": "showCharacterCountdown"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "debounceTime": { "alias": "debounceTime"; "required": false; }; "badgeText": { "alias": "badgeText"; "required": false; }; "inputMask": { "alias": "inputMask"; "required": false; }; }, { "ngvInput": "ngvInput"; }, never, ["[slot='prefix']", "[slot='suffix']", "*"], false, never>;
|
|
90
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./input.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@sebgroup/green-angular/src/v-angular/i18n";
|
|
5
|
+
import * as i4 from "@sebgroup/green-angular/src/v-angular/input-mask";
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
export declare class NgvInputModule {
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvInputModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgvInputModule, [typeof i1.NgvInputComponent], [typeof i2.CommonModule, typeof i3.NgvI18nModule, typeof i4.NgvInputMaskModule, typeof i5.ReactiveFormsModule], [typeof i1.NgvInputComponent]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgvInputModule>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import type { InputmaskOptions } from './input-mask.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class InputMaskFormatPipe implements PipeTransform {
|
|
5
|
+
transform<T = any>(value: any, options: InputmaskOptions<T>): any;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputMaskFormatPipe, never>;
|
|
7
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<InputMaskFormatPipe, "ngvInputMaskFormat", false>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, NgZone, OnDestroy, OnInit, Renderer2 } from '@angular/core';
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, NgControl, Validator } from '@angular/forms';
|
|
3
|
+
import type Inputmask from 'inputmask';
|
|
4
|
+
import { InputMaskConfig } from './config';
|
|
5
|
+
import type { InputmaskOptions } from './input-mask.types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class NgvInputMaskDirective<T = any> implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, Validator {
|
|
8
|
+
ngControl: NgControl;
|
|
9
|
+
private platformId;
|
|
10
|
+
private elementRef;
|
|
11
|
+
private renderer;
|
|
12
|
+
private ngZone;
|
|
13
|
+
/** Input settings of directive */
|
|
14
|
+
ngvInputMask: InputmaskOptions<T>;
|
|
15
|
+
inputMaskPlugin: Inputmask.Instance | undefined;
|
|
16
|
+
nativeInputElement: HTMLInputElement | undefined;
|
|
17
|
+
defaultInputMaskConfig: InputMaskConfig;
|
|
18
|
+
private mutationObserver;
|
|
19
|
+
constructor(ngControl: NgControl, config: InputMaskConfig, platformId: string, elementRef: ElementRef<HTMLInputElement | any>, renderer: Renderer2, ngZone: NgZone);
|
|
20
|
+
onInput: (_: any) => void;
|
|
21
|
+
onTouched: (_: any) => void;
|
|
22
|
+
onKeyUp(event: KeyboardEvent): void;
|
|
23
|
+
ngOnInit(): void;
|
|
24
|
+
ngOnDestroy(): void;
|
|
25
|
+
initInputMask(): void;
|
|
26
|
+
ngAfterViewInit(): void;
|
|
27
|
+
get inputMaskOptions(): Inputmask.Options;
|
|
28
|
+
writeValue(value: string): void;
|
|
29
|
+
registerOnChange(fn: (_: T | null) => void): void;
|
|
30
|
+
registerOnTouched(fn: any): void;
|
|
31
|
+
validate: (control: AbstractControl) => {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
} | null;
|
|
34
|
+
setDisabledState(disabled: boolean): void;
|
|
35
|
+
private get control();
|
|
36
|
+
private setNativeInputElement;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvInputMaskDirective<any>, [{ optional: true; self: true; }, null, null, null, null, null]>;
|
|
38
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgvInputMaskDirective<any>, "[ngvInputMask]", never, { "ngvInputMask": { "alias": "ngvInputMask"; "required": false; }; }, {}, never, never, false, never>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { InputMaskConfig } from './config';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./input-mask.directive";
|
|
5
|
+
import * as i2 from "./input-mask-format.pipe";
|
|
6
|
+
export declare class NgvInputMaskModule {
|
|
7
|
+
static forRoot(config?: Partial<InputMaskConfig>): ModuleWithProviders<NgvInputMaskModule>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvInputMaskModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgvInputMaskModule, [typeof i1.NgvInputMaskDirective, typeof i2.InputMaskFormatPipe], never, [typeof i1.NgvInputMaskDirective, typeof i2.InputMaskFormatPipe]>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgvInputMaskModule>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type Inputmask from 'inputmask';
|
|
2
|
+
export type InputmaskOptions<T> = Inputmask.Options & {
|
|
3
|
+
parser?: (value: any) => T;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Useful when you want to add input-mask on input which is child of your component
|
|
7
|
+
*
|
|
8
|
+
* @since 2.1.0
|
|
9
|
+
*/
|
|
10
|
+
export type InputMaskConfig = {
|
|
11
|
+
/**
|
|
12
|
+
* If set true, MutationObserver will be used to look for changes until it finds input with inputSelector
|
|
13
|
+
*/
|
|
14
|
+
isAsync: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* CSS like selector, which will be used with `querySelector` to get the native input.
|
|
17
|
+
* If your input is loaded lazily, please use `isAsync` option with this
|
|
18
|
+
*/
|
|
19
|
+
inputSelector: string;
|
|
20
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { DialogButtons } from '../modal.types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface DialogEvent<T = any> {
|
|
5
|
+
original: Event | undefined;
|
|
6
|
+
payload: T | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare class NgvDialogComponent implements OnInit {
|
|
9
|
+
dialogRef: ElementRef | undefined;
|
|
10
|
+
/** Special property used for selecting DOM elements during automated UI testing. */
|
|
11
|
+
thook: string;
|
|
12
|
+
/** @internal */
|
|
13
|
+
baseClass: boolean;
|
|
14
|
+
/** @internal Defines the default visibility state of the dialog. */
|
|
15
|
+
shown: boolean;
|
|
16
|
+
/** @internal */
|
|
17
|
+
get ariaHidden(): boolean;
|
|
18
|
+
/** Defines the default visibility state of the dialog. */
|
|
19
|
+
initiallyShown: boolean;
|
|
20
|
+
/** Sets modal heading. Will be translated (using transloco) if the string matches a cms key. */
|
|
21
|
+
heading: string;
|
|
22
|
+
/**
|
|
23
|
+
* Sets modal title. Will be translated (using transloco) if the string matches a cms key.
|
|
24
|
+
* @deprecated - use heading instead.
|
|
25
|
+
*/
|
|
26
|
+
title: string;
|
|
27
|
+
/** Sets content body and can contain html code. The content body can also be set by nesting children to the dialog tag. */
|
|
28
|
+
content?: string;
|
|
29
|
+
/** Defines if dialog should close on action. */
|
|
30
|
+
autoClose: boolean;
|
|
31
|
+
/** An array of event payloads that will be added to every click context menu item click. */
|
|
32
|
+
payload: any;
|
|
33
|
+
dialogTitleId: string;
|
|
34
|
+
dialogBodyId: string;
|
|
35
|
+
/** It gives an ability for parent component to control if modal should be closed on esc button click. */
|
|
36
|
+
closeModalOnEscape: boolean;
|
|
37
|
+
_buttons: DialogButtons | undefined;
|
|
38
|
+
/** Buttons are defined as a key-value pair where key is one of "positive|neutral|negative" and value is the button label. */
|
|
39
|
+
set buttons(buttons: DialogButtons);
|
|
40
|
+
ngvCloseEvent: EventEmitter<DialogEvent<any>>;
|
|
41
|
+
ngvPositiveEvent: EventEmitter<DialogEvent<any>>;
|
|
42
|
+
ngvNeutralEvent: EventEmitter<DialogEvent<any>>;
|
|
43
|
+
ngvNegativeEvent: EventEmitter<DialogEvent<any>>;
|
|
44
|
+
protected _previous: HTMLElement | undefined;
|
|
45
|
+
protected _firstFocusable: HTMLElement | undefined;
|
|
46
|
+
protected _lastFocusable: HTMLElement | undefined;
|
|
47
|
+
ngOnInit(): void;
|
|
48
|
+
onAction(event: Event, action: string): void;
|
|
49
|
+
open(opener?: HTMLElement): boolean;
|
|
50
|
+
protected _limitFocusable(): void;
|
|
51
|
+
close(event?: Event, initiator?: string): void;
|
|
52
|
+
focusTrap(event: KeyboardEvent): void;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvDialogComponent, never>;
|
|
54
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgvDialogComponent, "nggv-dialog", ["dialog"], { "thook": { "alias": "thook"; "required": false; }; "shown": { "alias": "shown"; "required": false; }; "initiallyShown": { "alias": "initiallyShown"; "required": false; }; "heading": { "alias": "heading"; "required": false; }; "title": { "alias": "title"; "required": false; }; "content": { "alias": "content"; "required": false; }; "autoClose": { "alias": "autoClose"; "required": false; }; "payload": { "alias": "payload"; "required": false; }; "dialogTitleId": { "alias": "dialogTitleId"; "required": false; }; "dialogBodyId": { "alias": "dialogBodyId"; "required": false; }; "closeModalOnEscape": { "alias": "closeModalOnEscape"; "required": false; }; "buttons": { "alias": "buttons"; "required": false; }; }, { "ngvCloseEvent": "ngvCloseEvent"; "ngvPositiveEvent": "ngvPositiveEvent"; "ngvNeutralEvent": "ngvNeutralEvent"; "ngvNegativeEvent": "ngvNegativeEvent"; }, never, ["*"], false, never>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ElementRef, OnDestroy } from '@angular/core';
|
|
2
|
+
import '@sebgroup/green-core/components/icon/icons/dot-grid-one-horizontal';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NgvFoldOutComponent implements OnDestroy {
|
|
6
|
+
/** Special property used for selecting DOM elements during automated UI testing. */
|
|
7
|
+
thook: string;
|
|
8
|
+
inputRef?: ElementRef;
|
|
9
|
+
/** Aligns the dropdown list with the buttons right or left side */
|
|
10
|
+
alignOptions: 'left' | 'right';
|
|
11
|
+
onClickSubscription: Subscription | undefined;
|
|
12
|
+
/** @internal */
|
|
13
|
+
shown: boolean;
|
|
14
|
+
constructor();
|
|
15
|
+
ngOnDestroy(): void;
|
|
16
|
+
/** Toggle display of the option list */
|
|
17
|
+
toggleVisibility(event?: Event, setVisibility?: boolean): void;
|
|
18
|
+
/**
|
|
19
|
+
* Closes the fold-out on click outside.
|
|
20
|
+
*/
|
|
21
|
+
subscribeToOutsideClickEvent(): void;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgvFoldOutComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgvFoldOutComponent, "nggv-fold-out", never, { "thook": { "alias": "thook"; "required": false; }; "alignOptions": { "alias": "alignOptions"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
24
|
+
}
|