@masterteam/components 0.0.188 → 0.0.189
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/assets/common.css +1 -1
- package/assets/i18n/ar.json +1 -1
- package/fesm2022/masterteam-components-entities.mjs +10 -2
- package/fesm2022/masterteam-components-entities.mjs.map +1 -1
- package/fesm2022/masterteam-components-location-field.mjs +68 -6
- package/fesm2022/masterteam-components-location-field.mjs.map +1 -1
- package/fesm2022/masterteam-components-user-search-field.mjs +57 -6
- package/fesm2022/masterteam-components-user-search-field.mjs.map +1 -1
- package/fesm2022/masterteam-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-location-field.d.ts +13 -1
- package/types/masterteam-components-table.d.ts +2 -2
- package/types/masterteam-components-user-search-field.d.ts +9 -2
- package/types/masterteam-components.d.ts +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
2
3
|
import { ControlValueAccessor, Validators, NgControl, FormGroup, FormControl } from '@angular/forms';
|
|
3
4
|
import { AutoComplete } from 'primeng/autocomplete';
|
|
4
5
|
import { isInvalid } from '@masterteam/components';
|
|
@@ -26,7 +27,7 @@ interface LocationFieldConfiguration {
|
|
|
26
27
|
nominatimBaseUrl?: string;
|
|
27
28
|
[key: string]: unknown;
|
|
28
29
|
}
|
|
29
|
-
declare class LocationField implements ControlValueAccessor {
|
|
30
|
+
declare class LocationField implements ControlValueAccessor, OnDestroy {
|
|
30
31
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
31
32
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
32
33
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
@@ -52,9 +53,15 @@ declare class LocationField implements ControlValueAccessor {
|
|
|
52
53
|
private readonly transloco;
|
|
53
54
|
private readonly http;
|
|
54
55
|
private readonly searchTerms;
|
|
56
|
+
private inputFocused;
|
|
57
|
+
private selectionSettling;
|
|
58
|
+
private ignoreSearchResultsUntilNextSearch;
|
|
59
|
+
private clearSuggestionsWhenAutocompleteSettles;
|
|
60
|
+
private suggestionsClearFallbackHandle;
|
|
55
61
|
protected onTouched: () => void;
|
|
56
62
|
private onModelChange;
|
|
57
63
|
constructor();
|
|
64
|
+
ngOnDestroy(): void;
|
|
58
65
|
protected search(event: {
|
|
59
66
|
query: string;
|
|
60
67
|
}): void;
|
|
@@ -64,12 +71,17 @@ declare class LocationField implements ControlValueAccessor {
|
|
|
64
71
|
value: LocationValue;
|
|
65
72
|
}): void;
|
|
66
73
|
protected onClear(): void;
|
|
74
|
+
protected onAutocompleteHide(): void;
|
|
67
75
|
protected openManualDialog(): void;
|
|
68
76
|
writeValue(value: unknown): void;
|
|
69
77
|
registerOnChange(fn: (value: LocationValue | null) => void): void;
|
|
70
78
|
registerOnTouched(fn: () => void): void;
|
|
71
79
|
setDisabledState(disabled: boolean): void;
|
|
72
80
|
private setValue;
|
|
81
|
+
private deferSuggestionsClearUntilAutocompleteSettles;
|
|
82
|
+
private clearSuggestionsAfterAutocompleteSettled;
|
|
83
|
+
private cancelDeferredSuggestionsClear;
|
|
84
|
+
private cancelSuggestionsClearFallback;
|
|
73
85
|
private searchLocations;
|
|
74
86
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LocationField, never>;
|
|
75
87
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LocationField, "mt-location-field", never, { "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "searchUrl": { "alias": "searchUrl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -239,7 +239,7 @@ declare class Table {
|
|
|
239
239
|
captionStartContent: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
240
240
|
captionEndContent: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
241
241
|
emptyContent: _angular_core.Signal<TemplateRef<any> | undefined>;
|
|
242
|
-
paginatorPosition: _angular_core.InputSignal<"
|
|
242
|
+
paginatorPosition: _angular_core.InputSignal<"center" | "end" | "start">;
|
|
243
243
|
alwaysShowPaginator: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
244
244
|
rowsPerPageOptions: _angular_core.InputSignal<number[]>;
|
|
245
245
|
pageSize: _angular_core.ModelSignal<number>;
|
|
@@ -248,7 +248,7 @@ declare class Table {
|
|
|
248
248
|
filterTerm: _angular_core.ModelSignal<string>;
|
|
249
249
|
groupBy: _angular_core.ModelSignal<string | null>;
|
|
250
250
|
sortField: _angular_core.WritableSignal<string | null>;
|
|
251
|
-
sortDirection: _angular_core.WritableSignal<"
|
|
251
|
+
sortDirection: _angular_core.WritableSignal<"desc" | "asc" | null>;
|
|
252
252
|
confirmationService: ConfirmationService;
|
|
253
253
|
private readonly exportService;
|
|
254
254
|
private readonly transloco;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnInit } from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, Validators, NgControl } from '@angular/forms';
|
|
4
4
|
import { AutoComplete } from 'primeng/autocomplete';
|
|
5
5
|
import { isInvalid } from '@masterteam/components';
|
|
@@ -17,7 +17,7 @@ interface User {
|
|
|
17
17
|
*/
|
|
18
18
|
isLinkedToCurrentApplication?: boolean;
|
|
19
19
|
}
|
|
20
|
-
declare class UserSearchField implements ControlValueAccessor, OnInit {
|
|
20
|
+
declare class UserSearchField implements ControlValueAccessor, OnInit, OnDestroy {
|
|
21
21
|
readonly hint: _angular_core.InputSignal<string | undefined>;
|
|
22
22
|
readonly label: _angular_core.InputSignal<string | undefined>;
|
|
23
23
|
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
@@ -37,10 +37,13 @@ declare class UserSearchField implements ControlValueAccessor, OnInit {
|
|
|
37
37
|
readonly size: _angular_core.InputSignal<"small" | "large" | undefined>;
|
|
38
38
|
filteredUsers: _angular_core.WritableSignal<User[]>;
|
|
39
39
|
private searchTerms;
|
|
40
|
+
private readonly document;
|
|
40
41
|
private committedValueVersion;
|
|
41
42
|
private blurCleanupHandle;
|
|
42
43
|
private inputFocused;
|
|
43
44
|
private suggestionPointerActive;
|
|
45
|
+
private hasUncommittedSearchText;
|
|
46
|
+
private ignoreSearchResultsUntilNextSearch;
|
|
44
47
|
/**
|
|
45
48
|
* In single-select mode, `true` when the currently selected user is no
|
|
46
49
|
* longer linked to the application. Drives the inline info badge/tooltip.
|
|
@@ -49,6 +52,7 @@ declare class UserSearchField implements ControlValueAccessor, OnInit {
|
|
|
49
52
|
readonly unlinkedSingleUser: _angular_core.Signal<boolean>;
|
|
50
53
|
private readonly translocoService;
|
|
51
54
|
readonly autocomplete: _angular_core.Signal<AutoComplete | undefined>;
|
|
55
|
+
private readonly handleDocumentPointerDown;
|
|
52
56
|
onTouched: () => void;
|
|
53
57
|
onModelChange: (value: any) => void;
|
|
54
58
|
ngControl: NgControl | null;
|
|
@@ -56,6 +60,7 @@ declare class UserSearchField implements ControlValueAccessor, OnInit {
|
|
|
56
60
|
isInvalid: typeof isInvalid;
|
|
57
61
|
constructor();
|
|
58
62
|
ngOnInit(): void;
|
|
63
|
+
ngOnDestroy(): void;
|
|
59
64
|
search(event: {
|
|
60
65
|
query: string;
|
|
61
66
|
}): void;
|
|
@@ -75,11 +80,13 @@ declare class UserSearchField implements ControlValueAccessor, OnInit {
|
|
|
75
80
|
registerOnTouched(fn: any): void;
|
|
76
81
|
setDisabledState(disabled: boolean): void;
|
|
77
82
|
onSuggestionPointerDown(): void;
|
|
83
|
+
private isOwnAutocompleteOption;
|
|
78
84
|
getUsers(): void;
|
|
79
85
|
private getInputElement;
|
|
80
86
|
private cancelPendingBlurCleanup;
|
|
81
87
|
private resetUncommittedSearch;
|
|
82
88
|
private clearInput;
|
|
89
|
+
private writeInput;
|
|
83
90
|
private clearSearchState;
|
|
84
91
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserSearchField, never>;
|
|
85
92
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserSearchField, "mt-user-search-field", never, { "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "isMultiple": { "alias": "isMultiple"; "required": false; "isSignal": true; }; "apiUrl": { "alias": "apiUrl"; "required": true; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "paramName": { "alias": "paramName"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -39,7 +39,7 @@ declare const MT_DATE_FORMATS: InjectionToken<MTDateFormats>;
|
|
|
39
39
|
declare function toAngularDateFormat(format: string): string;
|
|
40
40
|
declare function provideMTDateFormats(formats: Partial<MTDateFormats>): EnvironmentProviders;
|
|
41
41
|
|
|
42
|
-
type FieldType = 'text' | 'textarea' | 'select' | 'date' | 'number' | 'slider' | 'multi-select' | 'pick-list' | 'checkbox' | 'icon-field' | 'color-picker' | 'location' | 'spacer' | 'lookup-matrix' | string;
|
|
42
|
+
type FieldType = 'text' | 'textarea' | 'select' | 'date' | 'number' | 'slider' | 'multi-select' | 'pick-list' | 'checkbox' | 'icon-field' | 'color-picker' | 'location' | 'spacer' | 'entity-preview' | 'lookup-matrix' | string;
|
|
43
43
|
type ValidatorType = 'required' | 'email' | 'minLength' | 'maxLength' | 'min' | 'max' | 'pattern' | 'custom';
|
|
44
44
|
type FieldRelationAction = 'enable' | 'disable' | 'show' | 'hide';
|
|
45
45
|
interface FieldRelationConfig {
|