@testgorilla/tgo-ui 3.13.0 → 3.13.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/components/multi-input/multi-input.component.d.ts +23 -43
- package/components/multi-input/multi-input.model.d.ts +4 -1
- package/components/multi-input/required-multi-input.validator.d.ts +3 -0
- package/components/side-panel/side-panel.component.d.ts +1 -1
- package/components/side-panel/side-panel.model.d.ts +25 -0
- package/components/side-panel/side-panel.service.d.ts +5 -4
- package/esm2022/components/multi-input/multi-input.component.mjs +80 -148
- package/esm2022/components/multi-input/multi-input.model.mjs +1 -1
- package/esm2022/components/multi-input/required-multi-input.validator.mjs +14 -0
- package/esm2022/components/side-panel/side-panel.component.mjs +3 -3
- package/esm2022/components/side-panel/side-panel.model.mjs +31 -1
- package/esm2022/components/side-panel/side-panel.service.mjs +19 -7
- package/fesm2022/testgorilla-tgo-ui.mjs +139 -154
- package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { EventEmitter, OnInit
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { AbstractControl, ControlValueAccessor, FormBuilder, FormControl, NgControl, ValidatorFn } from '@angular/forms';
|
|
3
|
-
import { ApplicationTheme } from '../../models/application-theme.model';
|
|
4
3
|
import { MultiInputValue } from './multi-input.model';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export declare class MultiInputComponent implements ControlValueAccessor, OnInit {
|
|
7
6
|
protected ngControl: NgControl;
|
|
8
|
-
private readonly defaultAppTheme;
|
|
9
7
|
private readonly fb;
|
|
10
8
|
/**
|
|
11
9
|
*
|
|
@@ -13,112 +11,105 @@ export declare class MultiInputComponent implements ControlValueAccessor, OnInit
|
|
|
13
11
|
* @type {Record<string, string | null | number>[]}
|
|
14
12
|
* @memberof MultiInputComponent
|
|
15
13
|
*/
|
|
16
|
-
itemsList: Record<string, string |
|
|
14
|
+
itemsList: import("@angular/core").InputSignal<Record<string, string | number | null>[]>;
|
|
17
15
|
/**
|
|
18
16
|
*
|
|
19
17
|
* @description The field to be displayed in the dropdown
|
|
20
18
|
* @type {string}
|
|
21
19
|
* @memberof MultiInputComponent
|
|
22
20
|
*/
|
|
23
|
-
itemTextField: string
|
|
21
|
+
itemTextField: import("@angular/core").InputSignal<string>;
|
|
24
22
|
/**
|
|
25
23
|
*
|
|
26
24
|
* @description The value to be displayed in the droddown
|
|
27
25
|
* @type {string}
|
|
28
26
|
* @memberof MultiInputComponent
|
|
29
27
|
*/
|
|
30
|
-
itemValueField: string
|
|
28
|
+
itemValueField: import("@angular/core").InputSignal<string>;
|
|
31
29
|
/**
|
|
32
30
|
*
|
|
33
31
|
* @description The Value of the multi input
|
|
34
32
|
* @type {MultiInputValue}
|
|
35
33
|
* @memberof MultiInputComponent
|
|
36
34
|
*/
|
|
37
|
-
|
|
35
|
+
value: import("@angular/core").InputSignal<MultiInputValue | undefined>;
|
|
38
36
|
/**
|
|
39
37
|
*
|
|
40
38
|
* @description Disables the multi input
|
|
41
39
|
* @type {boolean}
|
|
42
40
|
* @memberof MultiInputComponent
|
|
43
41
|
*/
|
|
44
|
-
disabled: boolean
|
|
42
|
+
disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
45
43
|
/**
|
|
46
44
|
*
|
|
47
45
|
* @description Defines if the multi input is required
|
|
48
46
|
* @type {boolean}
|
|
49
47
|
* @memberof MultiInputComponent
|
|
50
48
|
*/
|
|
51
|
-
required: boolean
|
|
49
|
+
required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
52
50
|
/**
|
|
53
51
|
*
|
|
54
52
|
* @description Defines the label of the multi input
|
|
55
53
|
* @type {string}
|
|
56
54
|
* @memberof MultiInputComponent
|
|
57
55
|
*/
|
|
58
|
-
label: string
|
|
56
|
+
label: import("@angular/core").InputSignal<string>;
|
|
59
57
|
/**
|
|
60
58
|
*
|
|
61
59
|
* @description Defines the placeholder of the multi input
|
|
62
60
|
* @type {string}
|
|
63
61
|
* @memberof MultiInputComponent
|
|
64
62
|
*/
|
|
65
|
-
placeholder: string
|
|
63
|
+
placeholder: import("@angular/core").InputSignal<string>;
|
|
66
64
|
/**
|
|
67
65
|
*
|
|
68
66
|
* @description Allow decimal values in the multi input
|
|
69
67
|
* @type {boolean}
|
|
70
68
|
* @memberof MultiInputComponent
|
|
71
69
|
*/
|
|
72
|
-
allowDecimal: boolean
|
|
70
|
+
allowDecimal: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
73
71
|
/**
|
|
74
72
|
*
|
|
75
73
|
* @description Allow negative values in the multi input
|
|
76
74
|
* @type {boolean}
|
|
77
75
|
* @memberof MultiInputComponent
|
|
78
76
|
*/
|
|
79
|
-
allowNegative: boolean
|
|
80
|
-
/**
|
|
81
|
-
*
|
|
82
|
-
* @description The theme of the application
|
|
83
|
-
* @type {ApplicationTheme}
|
|
84
|
-
* @memberof MultiInputComponent
|
|
85
|
-
*/
|
|
86
|
-
applicationTheme: ApplicationTheme;
|
|
77
|
+
allowNegative: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
87
78
|
/**
|
|
88
79
|
*
|
|
89
80
|
* @description The errors of the multi input
|
|
90
81
|
* @type {string[]}
|
|
91
82
|
* @memberof MultiInputComponent
|
|
92
83
|
*/
|
|
93
|
-
errors: string[]
|
|
84
|
+
errors: import("@angular/core").InputSignal<string[]>;
|
|
94
85
|
/**
|
|
95
86
|
*
|
|
96
87
|
* @description Hide built in errors for Reactive Forms
|
|
97
88
|
* @type {boolean}
|
|
98
89
|
* @memberof MultiInputComponent
|
|
99
90
|
*/
|
|
100
|
-
hideBuiltInErrors: boolean
|
|
91
|
+
hideBuiltInErrors: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
101
92
|
/**
|
|
102
93
|
*
|
|
103
94
|
* @description Hide label in errors
|
|
104
95
|
* @type {boolean}
|
|
105
96
|
* @memberof MultiInputComponent
|
|
106
97
|
*/
|
|
107
|
-
hideLabelInErrors: boolean
|
|
98
|
+
hideLabelInErrors: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
108
99
|
/**
|
|
109
100
|
*
|
|
110
101
|
* @description The maximum characters allowed in the multi input
|
|
111
102
|
* @type {number}
|
|
112
103
|
* @memberof MultiInputComponent
|
|
113
104
|
*/
|
|
114
|
-
maxCharacters: number
|
|
105
|
+
maxCharacters: import("@angular/core").InputSignal<number>;
|
|
115
106
|
/**
|
|
116
107
|
*
|
|
117
108
|
* @description The validators to apply to input field
|
|
118
109
|
* @type {Validators[]}
|
|
119
110
|
* @memberof MultiInputComponent
|
|
120
111
|
*/
|
|
121
|
-
validators: ValidatorFn[]
|
|
112
|
+
validators: import("@angular/core").InputSignal<ValidatorFn[]>;
|
|
122
113
|
/**
|
|
123
114
|
*
|
|
124
115
|
* @description The width of the multi input
|
|
@@ -136,36 +127,25 @@ export declare class MultiInputComponent implements ControlValueAccessor, OnInit
|
|
|
136
127
|
* @ignore
|
|
137
128
|
*/
|
|
138
129
|
onTouch: () => void;
|
|
139
|
-
private _value;
|
|
140
|
-
protected showError: boolean;
|
|
141
130
|
protected readonly multiInputForm: import("@angular/forms").FormGroup<{
|
|
142
131
|
[x: string]: FormControl<unknown>;
|
|
132
|
+
value: FormControl<unknown>;
|
|
143
133
|
}>;
|
|
144
|
-
constructor(ngControl: NgControl,
|
|
134
|
+
constructor(ngControl: NgControl, fb: FormBuilder);
|
|
145
135
|
ngOnInit(): void;
|
|
146
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
147
136
|
writeValue(value: MultiInputValue): void;
|
|
137
|
+
patchForm(value: MultiInputValue | undefined): void;
|
|
148
138
|
setDisabledState(isDisabled: boolean): void;
|
|
149
139
|
registerOnChange(fn: any): void;
|
|
150
140
|
registerOnTouched(fn: any): void;
|
|
151
141
|
protected valueChanged(value: MultiInputValue): void;
|
|
152
|
-
get
|
|
153
|
-
protected get
|
|
154
|
-
protected get dropdownControl(): AbstractControl<string | null> | null;
|
|
155
|
-
protected get inputControl(): AbstractControl<number | null> | null;
|
|
156
|
-
protected checkFormErrors(): void;
|
|
142
|
+
protected get dropdownControl(): AbstractControl<unknown>;
|
|
143
|
+
protected get inputControl(): AbstractControl<unknown>;
|
|
157
144
|
protected markAsTouched(): void;
|
|
158
145
|
protected addDropdownControl(): void;
|
|
159
146
|
protected get controlHasError(): boolean;
|
|
160
147
|
protected getValueLength(): number;
|
|
161
|
-
private addValidation;
|
|
162
148
|
private updateDisableState;
|
|
163
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MultiInputComponent, [{ optional: true; self: true; },
|
|
164
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MultiInputComponent, "ui-multi-input", never, { "itemsList": { "alias": "itemsList"; "required": true; }; "itemTextField": { "alias": "itemTextField"; "required": true; }; "itemValueField": { "alias": "itemValueField"; "required": true; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "allowDecimal": { "alias": "allowDecimal"; "required": false; }; "allowNegative": { "alias": "allowNegative"; "required": false;
|
|
165
|
-
static ngAcceptInputType_disabled: unknown;
|
|
166
|
-
static ngAcceptInputType_required: unknown;
|
|
167
|
-
static ngAcceptInputType_allowDecimal: unknown;
|
|
168
|
-
static ngAcceptInputType_allowNegative: unknown;
|
|
169
|
-
static ngAcceptInputType_hideBuiltInErrors: unknown;
|
|
170
|
-
static ngAcceptInputType_hideLabelInErrors: unknown;
|
|
149
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MultiInputComponent, [{ optional: true; self: true; }, null]>;
|
|
150
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MultiInputComponent, "ui-multi-input", never, { "itemsList": { "alias": "itemsList"; "required": true; "isSignal": true; }; "itemTextField": { "alias": "itemTextField"; "required": true; "isSignal": true; }; "itemValueField": { "alias": "itemValueField"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "allowDecimal": { "alias": "allowDecimal"; "required": false; "isSignal": true; }; "allowNegative": { "alias": "allowNegative"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "hideBuiltInErrors": { "alias": "hideBuiltInErrors"; "required": false; "isSignal": true; }; "hideLabelInErrors": { "alias": "hideLabelInErrors"; "required": false; "isSignal": true; }; "maxCharacters": { "alias": "maxCharacters"; "required": false; "isSignal": true; }; "validators": { "alias": "validators"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; }, { "valueChange": "valueChange"; }, never, ["[custom-errors]"], false, never>;
|
|
171
151
|
}
|
|
@@ -16,7 +16,7 @@ export declare class SidePanelComponent {
|
|
|
16
16
|
sidePanelConfig: SidePanelConfig;
|
|
17
17
|
constructor();
|
|
18
18
|
open(): void;
|
|
19
|
-
close(): void;
|
|
19
|
+
close(result?: any): void;
|
|
20
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<SidePanelComponent, never>;
|
|
21
21
|
static ɵcmp: i0.ɵɵComponentDeclaration<SidePanelComponent, "ui-side-panel", never, {}, {}, never, never, true, never>;
|
|
22
22
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
export type SidePanelPosition = 'left' | 'right';
|
|
3
4
|
export declare enum SidePanelAnimationState {
|
|
4
5
|
Open = "open",
|
|
@@ -19,3 +20,27 @@ export declare class SidePanelConfig {
|
|
|
19
20
|
}
|
|
20
21
|
export declare const defaultSidePanelConfig: SidePanelConfig;
|
|
21
22
|
export declare const SIDE_PANEL_CONFIG: InjectionToken<SidePanelConfig>;
|
|
23
|
+
/**
|
|
24
|
+
* Reference to a side panel opened via the SidePanelService.
|
|
25
|
+
* Similar to MatDialogRef from Angular Material.
|
|
26
|
+
*/
|
|
27
|
+
export declare class SidePanelRef<T = any, R = any> {
|
|
28
|
+
private readonly _afterClosed;
|
|
29
|
+
/**
|
|
30
|
+
* Instance of the component loaded into the side panel.
|
|
31
|
+
* Will be undefined if a TemplateRef was used instead of a component.
|
|
32
|
+
*/
|
|
33
|
+
componentInstance?: R;
|
|
34
|
+
/**
|
|
35
|
+
* Observable that emits when the side panel is closed.
|
|
36
|
+
* Emits the result passed to the close method, or undefined if no result was provided.
|
|
37
|
+
*/
|
|
38
|
+
afterClosed(): Observable<T | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Closes the side panel with an optional result.
|
|
41
|
+
* @param result Optional data to be emitted via afterClosed()
|
|
42
|
+
*/
|
|
43
|
+
close(result?: T): void;
|
|
44
|
+
/** @internal */
|
|
45
|
+
_emitClose(result?: T): void;
|
|
46
|
+
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { Injector, TemplateRef, Type } from '@angular/core';
|
|
2
|
-
import { SidePanelConfig } from './side-panel.model';
|
|
2
|
+
import { SidePanelConfig, SidePanelRef } from './side-panel.model';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SidePanelService {
|
|
5
5
|
private SidePanelComponentRef?;
|
|
6
6
|
private contentComponentRef?;
|
|
7
7
|
private embeddedViewRef?;
|
|
8
|
+
private currentSidePanelRef?;
|
|
8
9
|
private defaultSidePanelConfig;
|
|
9
10
|
private injector;
|
|
10
11
|
private appRef;
|
|
11
12
|
constructor();
|
|
12
|
-
open(content: Type<
|
|
13
|
-
close(): void;
|
|
14
|
-
destroyComponent(): void;
|
|
13
|
+
open<T = any, R = any>(content: Type<R> | TemplateRef<any>, config: Partial<SidePanelConfig>, parentInjector?: Injector): SidePanelRef<T, R>;
|
|
14
|
+
close<T = any>(result?: T): void;
|
|
15
|
+
destroyComponent<T = any>(result?: T): void;
|
|
15
16
|
private createSidePanelInjector;
|
|
16
17
|
private createSidePanelComponent;
|
|
17
18
|
private loadComponent;
|