@smallpearl/ngx-helper 0.33.50 → 20.0.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/core/index.d.ts +3 -1
- package/entities/index.d.ts +313 -2
- package/entity-field/index.d.ts +101 -2
- package/fesm2022/smallpearl-ngx-helper-entities.mjs +18 -18
- package/fesm2022/smallpearl-ngx-helper-entities.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-entity-field.mjs +5 -4
- package/fesm2022/smallpearl-ngx-helper-entity-field.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-forms.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-hover-dropdown.mjs +6 -6
- package/fesm2022/smallpearl-ngx-helper-hover-dropdown.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-locale.mjs +6 -6
- package/fesm2022/smallpearl-ngx-helper-locale.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-busy-wheel.mjs +57 -31
- package/fesm2022/smallpearl-ngx-helper-mat-busy-wheel.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-context-menu.mjs +15 -15
- package/fesm2022/smallpearl-ngx-helper-mat-context-menu.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-entity-crud.mjs +346 -334
- package/fesm2022/smallpearl-ngx-helper-mat-entity-crud.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-entity-list.mjs +152 -146
- package/fesm2022/smallpearl-ngx-helper-mat-entity-list.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-file-input.mjs +5 -5
- package/fesm2022/smallpearl-ngx-helper-mat-file-input.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-form-error.mjs +19 -19
- package/fesm2022/smallpearl-ngx-helper-mat-form-error.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-select-entity.mjs +25 -26
- package/fesm2022/smallpearl-ngx-helper-mat-select-entity.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-select-infinite-scroll.mjs +7 -7
- package/fesm2022/smallpearl-ngx-helper-mat-select-infinite-scroll.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-side-menu-layout.mjs +24 -24
- package/fesm2022/smallpearl-ngx-helper-mat-side-menu-layout.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-mat-tel-input.mjs +8 -9
- package/fesm2022/smallpearl-ngx-helper-mat-tel-input.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-sideload.mjs.map +1 -1
- package/fesm2022/smallpearl-ngx-helper-stationary-with-line-items.mjs +35 -35
- package/fesm2022/smallpearl-ngx-helper-stationary-with-line-items.mjs.map +1 -1
- package/forms/index.d.ts +55 -1
- package/hover-dropdown/index.d.ts +44 -1
- package/index.d.ts +4 -5
- package/locale/index.d.ts +55 -5
- package/mat-busy-wheel/index.d.ts +165 -4
- package/mat-context-menu/index.d.ts +65 -1
- package/mat-entity-crud/index.d.ts +1075 -6
- package/mat-entity-list/index.d.ts +394 -3
- package/mat-file-input/index.d.ts +61 -1
- package/mat-form-error/index.d.ts +184 -6
- package/mat-select-entity/index.d.ts +194 -1
- package/mat-select-infinite-scroll/index.d.ts +45 -2
- package/mat-side-menu-layout/index.d.ts +180 -6
- package/mat-tel-input/index.d.ts +169 -2
- package/package.json +8 -8
- package/sideload/index.d.ts +20 -1
- package/stationary-with-line-items/index.d.ts +78 -1
- package/core/src/version.d.ts +0 -1
- package/entities/src/paged-loader.d.ts +0 -219
- package/entities/src/paginator.d.ts +0 -87
- package/entity-field/src/entity-field.d.ts +0 -70
- package/entity-field/src/provider.d.ts +0 -27
- package/forms/src/validation-error-handler.d.ts +0 -52
- package/hover-dropdown/src/hover-dropdown.directive.d.ts +0 -41
- package/locale/src/currency.pipe.d.ts +0 -14
- package/locale/src/date.pipe.d.ts +0 -14
- package/locale/src/format-currency.d.ts +0 -1
- package/locale/src/format-date.d.ts +0 -2
- package/locale/src/is-empty.d.ts +0 -1
- package/locale/src/providers.d.ts +0 -20
- package/mat-busy-wheel/src/busy-wheel-op.d.ts +0 -65
- package/mat-busy-wheel/src/busy-wheel.component.d.ts +0 -12
- package/mat-busy-wheel/src/busy-wheel.service.d.ts +0 -42
- package/mat-busy-wheel/src/host-busy-wheel.directive.d.ts +0 -35
- package/mat-context-menu/src/mat-context-menu.component.d.ts +0 -61
- package/mat-entity-crud/src/convert-context-input-to-http-context.d.ts +0 -11
- package/mat-entity-crud/src/default-config.d.ts +0 -9
- package/mat-entity-crud/src/form-view-host.component.d.ts +0 -41
- package/mat-entity-crud/src/mat-entity-crud-form-base.d.ts +0 -277
- package/mat-entity-crud/src/mat-entity-crud-internal-types.d.ts +0 -131
- package/mat-entity-crud/src/mat-entity-crud-item-action.d.ts +0 -68
- package/mat-entity-crud/src/mat-entity-crud-types.d.ts +0 -149
- package/mat-entity-crud/src/mat-entity-crud.component.d.ts +0 -366
- package/mat-entity-crud/src/preview-host.component.d.ts +0 -21
- package/mat-entity-crud/src/preview-pane.component.d.ts +0 -31
- package/mat-entity-crud/src/providers.d.ts +0 -3
- package/mat-entity-list/src/config.d.ts +0 -6
- package/mat-entity-list/src/mat-entity-list-types.d.ts +0 -128
- package/mat-entity-list/src/mat-entity-list.component.d.ts +0 -259
- package/mat-entity-list/src/providers.d.ts +0 -3
- package/mat-file-input/src/mat-file-input.component.d.ts +0 -58
- package/mat-form-error/src/locales/en.d.ts +0 -4
- package/mat-form-error/src/locales/hu.d.ts +0 -4
- package/mat-form-error/src/locales/index.d.ts +0 -5
- package/mat-form-error/src/locales/pt-br.d.ts +0 -4
- package/mat-form-error/src/locales/zh-hans.d.ts +0 -4
- package/mat-form-error/src/locales/zh-hant.d.ts +0 -4
- package/mat-form-error/src/ngx-error-list.component.d.ts +0 -9
- package/mat-form-error/src/ngx-mat-error-control.d.ts +0 -17
- package/mat-form-error/src/ngx-mat-error-def.directive.d.ts +0 -30
- package/mat-form-error/src/ngx-mat-errors-for-date-range-picker.directive.d.ts +0 -8
- package/mat-form-error/src/ngx-mat-errors.component.d.ts +0 -44
- package/mat-form-error/src/types.d.ts +0 -68
- package/mat-form-error/src/utils/coerce-to-observable.d.ts +0 -3
- package/mat-form-error/src/utils/distinct-until-error-changed.d.ts +0 -2
- package/mat-form-error/src/utils/find-error-for-control.d.ts +0 -9
- package/mat-form-error/src/utils/get-abstract-controls.d.ts +0 -3
- package/mat-form-error/src/utils/get-control-with-error.d.ts +0 -3
- package/mat-select-entity/src/mat-select-entity.component.d.ts +0 -190
- package/mat-select-infinite-scroll/src/mat-select-infinite-scroll.directive.d.ts +0 -19
- package/mat-select-infinite-scroll/src/mat-select-infinite-scroll.service.d.ts +0 -25
- package/mat-side-menu-layout/src/layout.service.d.ts +0 -23
- package/mat-side-menu-layout/src/mat-menu-layout.component.d.ts +0 -39
- package/mat-side-menu-layout/src/mat-menu-layout.module.d.ts +0 -18
- package/mat-side-menu-layout/src/mat-menu-list-item.component.d.ts +0 -36
- package/mat-side-menu-layout/src/mat-menu-pane.component.d.ts +0 -66
- package/mat-side-menu-layout/src/nav-item.d.ts +0 -10
- package/mat-tel-input/src/country-codes.d.ts +0 -5
- package/mat-tel-input/src/mat-telephone.component.d.ts +0 -129
- package/mat-tel-input/src/providers.d.ts +0 -38
- package/ngx-helper.d.ts +0 -2
- package/public-api.d.ts +0 -1
- package/sideload/src/sideload.d.ts +0 -18
- package/stationary-with-line-items/src/stationary-with-line-items.component.d.ts +0 -74
|
@@ -1 +1,194 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _angular_material_form_field from '@angular/material/form-field';
|
|
2
|
+
import { MatFormFieldControl } from '@angular/material/form-field';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { OnInit, OnDestroy, AfterViewInit, EventEmitter, TemplateRef, ChangeDetectorRef, ElementRef } from '@angular/core';
|
|
5
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
6
|
+
import { HttpContextToken } from '@angular/common/http';
|
|
7
|
+
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
8
|
+
import { MatSelect, MatSelectChange } from '@angular/material/select';
|
|
9
|
+
import { TranslocoService } from '@jsverse/transloco';
|
|
10
|
+
import { SPPagedEntityLoader } from '@smallpearl/ngx-helper/entities';
|
|
11
|
+
import { Subject } from 'rxjs';
|
|
12
|
+
|
|
13
|
+
interface SPMatSelectEntityHttpContext {
|
|
14
|
+
entityName: string;
|
|
15
|
+
entityNamePlural: string;
|
|
16
|
+
endpoint: string;
|
|
17
|
+
}
|
|
18
|
+
declare const SP_MAT_SELECT_ENTITY_HTTP_CONTEXT: HttpContextToken<SPMatSelectEntityHttpContext>;
|
|
19
|
+
type EntityGroup<TEntity> = {
|
|
20
|
+
label: string;
|
|
21
|
+
entities: TEntity[];
|
|
22
|
+
};
|
|
23
|
+
type SPMatSelectEntityResponseParser = <TEntity extends {
|
|
24
|
+
[P in IdKey]: PropertyKey;
|
|
25
|
+
}, IdKey extends string = 'id'>(response: any) => Array<TEntity>;
|
|
26
|
+
/**
|
|
27
|
+
* This is a generic component to display a <mat-select> for a FK field
|
|
28
|
+
* where the select's options are dynamically loaded from the server using
|
|
29
|
+
* the given url (or URL). The objects thus retrieved should have a
|
|
30
|
+
* unique 'id' field that will be used as the value of each `option` element.
|
|
31
|
+
* Therefore upon selection of an `option` element, the `select` value will
|
|
32
|
+
* be set to the object's `id` property. By default 'id' is used as its id,
|
|
33
|
+
* but this can be customized by specifying the `idKey' property value.
|
|
34
|
+
*/
|
|
35
|
+
declare class SPMatSelectEntityComponent<TEntity extends {
|
|
36
|
+
[P in IdKey]: PropertyKey;
|
|
37
|
+
}, IdKey extends string = 'id'> extends SPPagedEntityLoader<TEntity, IdKey> implements OnInit, OnDestroy, AfterViewInit, ControlValueAccessor, MatFormFieldControl<string | number | string[] | number[]> {
|
|
38
|
+
labelFn: _angular_core.InputSignal<((entity: TEntity) => string) | undefined>;
|
|
39
|
+
filterFn: _angular_core.InputSignal<((entity: TEntity, search: string) => boolean) | undefined>;
|
|
40
|
+
inlineNew: _angular_core.InputSignal<boolean>;
|
|
41
|
+
multiple: _angular_core.InputSignal<boolean>;
|
|
42
|
+
readonly: _angular_core.InputSignal<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* The entity key name that is used to classify entities into groups or
|
|
45
|
+
* a function that takes a TEntity and returns the group id (string).
|
|
46
|
+
* Entities with the same key value will be grouped together. If this is
|
|
47
|
+
* specified, grouping will be enabled.
|
|
48
|
+
* @see groupByFn
|
|
49
|
+
*/
|
|
50
|
+
groupOptionsKey: _angular_core.InputSignal<string | ((entity: TEntity) => string) | undefined>;
|
|
51
|
+
/**
|
|
52
|
+
* A function that a group id (string/number) and returns the label (string).
|
|
53
|
+
* Defaults to a function that returns the group id as string.
|
|
54
|
+
*/
|
|
55
|
+
groupLabelFn: _angular_core.InputSignal<(groupId: string | number) => string>;
|
|
56
|
+
selectionChange: EventEmitter<TEntity | TEntity[]>;
|
|
57
|
+
createNewItemSelected: EventEmitter<void>;
|
|
58
|
+
readonly searchText: _angular_core.InputSignal<string | undefined>;
|
|
59
|
+
readonly notFoundText: _angular_core.InputSignal<string | undefined>;
|
|
60
|
+
readonly createNewText: _angular_core.InputSignal<string | undefined>;
|
|
61
|
+
controlType: string;
|
|
62
|
+
/**
|
|
63
|
+
* Template for the option label. If not provided, the default label
|
|
64
|
+
* function will be used. Option label is what is placed inside the
|
|
65
|
+
* <mat-option> tag. The template gets an implicit 'entity' variable
|
|
66
|
+
* in the context, value for which is the entity object.
|
|
67
|
+
*
|
|
68
|
+
* For example:
|
|
69
|
+
* ```
|
|
70
|
+
* <sp-mat-select-entity
|
|
71
|
+
* [url]="'/api/v1/customers/'"
|
|
72
|
+
* [labelFn]="entity => entity.name"
|
|
73
|
+
* [optionLabelTemplate]="optionLabelTemplate"
|
|
74
|
+
* ></sp-mat-select-entity>
|
|
75
|
+
* <ng-template #optionLabelTemplate let-entity>
|
|
76
|
+
* {{ entity.name }} - {{ entity.description }}
|
|
77
|
+
* </ng-template>
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
optionLabelTemplate: _angular_core.InputSignal<TemplateRef<any> | undefined>;
|
|
81
|
+
protected _entityLabelFn: _angular_core.Signal<(entity: TEntity) => string>;
|
|
82
|
+
protected _group: _angular_core.Signal<boolean>;
|
|
83
|
+
stateChanges: Subject<void>;
|
|
84
|
+
focused: boolean;
|
|
85
|
+
touched: boolean;
|
|
86
|
+
selectValue: string | number | string[] | number[];
|
|
87
|
+
_initialValue: string | number | string[] | number[] | undefined;
|
|
88
|
+
lastSelectValue: string | number | string[] | number[];
|
|
89
|
+
searching: boolean;
|
|
90
|
+
filterStr: string;
|
|
91
|
+
filter$: Subject<string>;
|
|
92
|
+
onChanged: (_: any) => void;
|
|
93
|
+
onTouched: () => void;
|
|
94
|
+
matSelect: _angular_core.Signal<MatSelect | undefined>;
|
|
95
|
+
filteredValues: Subject<TEntity[]>;
|
|
96
|
+
filteredGroupedValues: Subject<EntityGroup<TEntity>[]>;
|
|
97
|
+
destroy: Subject<void>;
|
|
98
|
+
static nextId: number;
|
|
99
|
+
id: string;
|
|
100
|
+
private _placeholder;
|
|
101
|
+
protected cdr: ChangeDetectorRef;
|
|
102
|
+
protected _elementRef: ElementRef<any>;
|
|
103
|
+
protected _formField: _angular_material_form_field.MatFormField | null;
|
|
104
|
+
ngControl: NgControl | null;
|
|
105
|
+
transloco: TranslocoService;
|
|
106
|
+
constructor();
|
|
107
|
+
/**
|
|
108
|
+
* Conditions for loading entities:
|
|
109
|
+
*
|
|
110
|
+
* 1. When the select is opened, if entities have not already been loaded.
|
|
111
|
+
* 2. When the search string changes.
|
|
112
|
+
* 3. When the scroll reaches the bottom and more entities are available
|
|
113
|
+
* to be loaded.
|
|
114
|
+
*
|
|
115
|
+
* We need to create an 'observer-loop' that can handle the above.
|
|
116
|
+
*/
|
|
117
|
+
ngOnInit(): void;
|
|
118
|
+
ngOnDestroy(): void;
|
|
119
|
+
ngAfterViewInit(): void;
|
|
120
|
+
addEntity(entity: TEntity): void;
|
|
121
|
+
get selectTriggerValue(): string;
|
|
122
|
+
get selectTriggerValueAsArray(): (string | number)[];
|
|
123
|
+
entityId(entity: TEntity): any;
|
|
124
|
+
writeValue(entityId: string | number | string[] | number[]): void;
|
|
125
|
+
registerOnChange(fn: any): void;
|
|
126
|
+
registerOnTouched(fn: any): void;
|
|
127
|
+
get entities(): TEntity[];
|
|
128
|
+
set entities(items: TEntity[]);
|
|
129
|
+
get value(): string | number | string[] | number[];
|
|
130
|
+
set value(val: string | number | string[] | number[]);
|
|
131
|
+
get shouldLabelFloat(): boolean;
|
|
132
|
+
userAriaDescribedBy: string;
|
|
133
|
+
get placeholder(): string;
|
|
134
|
+
set placeholder(value: string);
|
|
135
|
+
get required(): boolean;
|
|
136
|
+
set required(req: boolean);
|
|
137
|
+
private _required;
|
|
138
|
+
get disabled(): boolean;
|
|
139
|
+
set disabled(value: BooleanInput);
|
|
140
|
+
private _disabled;
|
|
141
|
+
get empty(): boolean;
|
|
142
|
+
get errorState(): boolean;
|
|
143
|
+
onFocusIn(event: FocusEvent): void;
|
|
144
|
+
onFocusOut(event: FocusEvent): void;
|
|
145
|
+
setDescribedByIds(ids: string[]): void;
|
|
146
|
+
onContainerClick(event: MouseEvent): void;
|
|
147
|
+
setDisabledState(isDisabled: boolean): void;
|
|
148
|
+
onSelectOpened(ev: any): void;
|
|
149
|
+
onSelectionChange(ev: MatSelectChange): void;
|
|
150
|
+
/**
|
|
151
|
+
* Wrapper to filter entities based on whether grouping is enabled or not.
|
|
152
|
+
* Calls one of the two filtering methods -- filterGroupedEntities() or
|
|
153
|
+
* filterNonGroupedEntities().
|
|
154
|
+
* @param entities
|
|
155
|
+
* @param filterStr
|
|
156
|
+
* @returns
|
|
157
|
+
*/
|
|
158
|
+
filterEntities(entities: TEntity[], filterStr: string): void;
|
|
159
|
+
/**
|
|
160
|
+
* Filters the entities based on the search string.
|
|
161
|
+
* @param search The search string to filter entities.
|
|
162
|
+
* @returns The number of entities in the filtered result set or undefined.
|
|
163
|
+
*/
|
|
164
|
+
filterNonGroupedEntities(entities: TEntity[], search: string): void;
|
|
165
|
+
/**
|
|
166
|
+
* Filtering grouped entities logic works like this. If the search string
|
|
167
|
+
* matches a group label, the entire group is to be included in the results.
|
|
168
|
+
* However, if the search string only matches certain entities, only those
|
|
169
|
+
* groups are to be included and within those groups, only entities whose
|
|
170
|
+
* label matches the search string are to be included in the result set.
|
|
171
|
+
* @param search
|
|
172
|
+
* @returns number of groups in the filtered result set.
|
|
173
|
+
*/
|
|
174
|
+
filterGroupedEntities(entities: TEntity[], search: string): void;
|
|
175
|
+
/**
|
|
176
|
+
* Helper to arrange the given array of entities into groups based on the
|
|
177
|
+
* value for `groupOptionsKey`.
|
|
178
|
+
* @param entities
|
|
179
|
+
* @returns EntityGroup<TEntity>[]
|
|
180
|
+
*/
|
|
181
|
+
protected groupEntities(entities: TEntity[]): EntityGroup<TEntity>[];
|
|
182
|
+
private getHttpReqContext;
|
|
183
|
+
/**
|
|
184
|
+
* If more entities are available, load the next page of entities.
|
|
185
|
+
* This method is triggered when user scrolls to the bottom of the options
|
|
186
|
+
* list. Well almost to the bottom of the options list. :)
|
|
187
|
+
*/
|
|
188
|
+
onInfiniteScroll(): void;
|
|
189
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SPMatSelectEntityComponent<any, any>, never>;
|
|
190
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SPMatSelectEntityComponent<any, any>, "sp-mat-select-entity", never, { "labelFn": { "alias": "labelFn"; "required": false; "isSignal": true; }; "filterFn": { "alias": "filterFn"; "required": false; "isSignal": true; }; "inlineNew": { "alias": "inlineNew"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "groupOptionsKey": { "alias": "groupOptionsKey"; "required": false; "isSignal": true; }; "groupLabelFn": { "alias": "groupLabelFn"; "required": false; "isSignal": true; }; "searchText": { "alias": "searchText"; "required": false; "isSignal": true; }; "notFoundText": { "alias": "notFoundText"; "required": false; "isSignal": true; }; "createNewText": { "alias": "createNewText"; "required": false; "isSignal": true; }; "optionLabelTemplate": { "alias": "optionLabelTemplate"; "required": false; "isSignal": true; }; "entities": { "alias": "entities"; "required": false; }; "value": { "alias": "value"; "required": false; }; "userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "selectionChange": "selectionChange"; "createNewItemSelected": "createNewItemSelected"; }, never, never, true, never>;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export { SPMatSelectEntityComponent, SP_MAT_SELECT_ENTITY_HTTP_CONTEXT };
|
|
194
|
+
export type { SPMatSelectEntityHttpContext, SPMatSelectEntityResponseParser };
|
|
@@ -1,2 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { NgZone, OnDestroy, AfterViewInit, EventEmitter } from '@angular/core';
|
|
3
|
+
import { MatSelect } from '@angular/material/select';
|
|
4
|
+
|
|
5
|
+
declare class MatSelectInfiniteScrollService {
|
|
6
|
+
private ngZone;
|
|
7
|
+
private threshold;
|
|
8
|
+
private debounceTime;
|
|
9
|
+
private complete;
|
|
10
|
+
private thrPx;
|
|
11
|
+
private thrPc;
|
|
12
|
+
private destroyed$;
|
|
13
|
+
private selectItemHeightPx;
|
|
14
|
+
private panel;
|
|
15
|
+
constructor(ngZone: NgZone);
|
|
16
|
+
initialize(panel: Element, selectItemHeightPx: number, config: {
|
|
17
|
+
threshold: string;
|
|
18
|
+
debounceTime: number;
|
|
19
|
+
complete: boolean;
|
|
20
|
+
}): void;
|
|
21
|
+
evaluateThreshold(): void;
|
|
22
|
+
registerScrollListener(infiniteScrollCallback: () => void): void;
|
|
23
|
+
handleScrollEvent(event: Event, infiniteScrollCallback: () => void): void;
|
|
24
|
+
destroy(): void;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatSelectInfiniteScrollService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MatSelectInfiniteScrollService>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare class MatSelectInfiniteScrollDirective implements OnDestroy, AfterViewInit {
|
|
30
|
+
protected matSelect: MatSelect;
|
|
31
|
+
private infiniteScrollService;
|
|
32
|
+
threshold: string;
|
|
33
|
+
debounceTime: number;
|
|
34
|
+
complete: boolean;
|
|
35
|
+
infiniteScroll: EventEmitter<void>;
|
|
36
|
+
private destroyed$;
|
|
37
|
+
constructor(matSelect: MatSelect, infiniteScrollService: MatSelectInfiniteScrollService);
|
|
38
|
+
ngAfterViewInit(): void;
|
|
39
|
+
getSelectItemHeightPx(panel: Element): number;
|
|
40
|
+
ngOnDestroy(): void;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatSelectInfiniteScrollDirective, never>;
|
|
42
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatSelectInfiniteScrollDirective, "[msInfiniteScroll]", never, { "threshold": { "alias": "threshold"; "required": false; }; "debounceTime": { "alias": "debounceTime"; "required": false; }; "complete": { "alias": "complete"; "required": false; }; }, { "infiniteScroll": "infiniteScroll"; }, never, never, true, never>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { MatSelectInfiniteScrollDirective, MatSelectInfiniteScrollService };
|
|
@@ -1,6 +1,180 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { OnDestroy, OnInit, QueryList, ChangeDetectorRef, AfterViewInit, OnChanges, TemplateRef, Injector, SimpleChanges } from '@angular/core';
|
|
4
|
+
import * as i5 from '@angular/router';
|
|
5
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
6
|
+
import { Subject, BehaviorSubject } from 'rxjs';
|
|
7
|
+
import * as i11 from '@angular/material/dialog';
|
|
8
|
+
import { MatDialog } from '@angular/material/dialog';
|
|
9
|
+
import * as i6 from '@angular/material/sidenav';
|
|
10
|
+
import { MatSidenav } from '@angular/material/sidenav';
|
|
11
|
+
import * as i4 from '@angular/common';
|
|
12
|
+
import * as i7 from '@angular/material/toolbar';
|
|
13
|
+
import * as i8 from '@angular/material/icon';
|
|
14
|
+
import * as i9 from '@angular/material/button';
|
|
15
|
+
import * as i10 from '@angular/material/menu';
|
|
16
|
+
import * as i12 from '@angular/material/list';
|
|
17
|
+
|
|
18
|
+
interface SideMenuLayoutProps {
|
|
19
|
+
smallScreen: boolean;
|
|
20
|
+
toolbarHeight: number;
|
|
21
|
+
}
|
|
22
|
+
declare class LayoutService implements OnDestroy {
|
|
23
|
+
breakpointObserver: BreakpointObserver;
|
|
24
|
+
marginTop: number;
|
|
25
|
+
toolbarHeight: number;
|
|
26
|
+
smallScreen: boolean;
|
|
27
|
+
destroy: Subject<void>;
|
|
28
|
+
_previousUrl: string;
|
|
29
|
+
layoutChanged: BehaviorSubject<SideMenuLayoutProps>;
|
|
30
|
+
constructor(breakpointObserver: BreakpointObserver, router: Router);
|
|
31
|
+
ngOnDestroy(): void;
|
|
32
|
+
get previousUrl(): string;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LayoutService, never>;
|
|
34
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LayoutService>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface NavItem {
|
|
38
|
+
text: string;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
icon?: string;
|
|
41
|
+
iconType?: 'mat' | 'bi' | 'fa';
|
|
42
|
+
route?: string;
|
|
43
|
+
children?: NavItem[];
|
|
44
|
+
backButton?: boolean;
|
|
45
|
+
backHref?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
declare class SPMatMenuListItemComponent implements OnInit, OnDestroy {
|
|
49
|
+
route: ActivatedRoute;
|
|
50
|
+
router: Router;
|
|
51
|
+
private dialog;
|
|
52
|
+
private cdr;
|
|
53
|
+
expanded: boolean;
|
|
54
|
+
highlighted: boolean;
|
|
55
|
+
ariaExpanded: boolean;
|
|
56
|
+
item: NavItem;
|
|
57
|
+
depth: number;
|
|
58
|
+
parent: SPMatMenuListItemComponent;
|
|
59
|
+
showIcon: boolean;
|
|
60
|
+
children: QueryList<SPMatMenuListItemComponent>;
|
|
61
|
+
constructor(route: ActivatedRoute, router: Router, dialog: MatDialog, cdr: ChangeDetectorRef);
|
|
62
|
+
ngOnInit(): void;
|
|
63
|
+
ngOnDestroy(): void;
|
|
64
|
+
get isHighlighted(): boolean;
|
|
65
|
+
toggleHighlight(highlight: boolean): void;
|
|
66
|
+
/**
|
|
67
|
+
* Expand a parent container menu item.
|
|
68
|
+
*/
|
|
69
|
+
expand(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Collapse an expanded parent container menu item.
|
|
72
|
+
*/
|
|
73
|
+
collapse(): void;
|
|
74
|
+
checkChildrenForHighlight(lastUrlSegment: string): boolean;
|
|
75
|
+
onItemSelected(ev: Event, item: NavItem): void;
|
|
76
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SPMatMenuListItemComponent, never>;
|
|
77
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SPMatMenuListItemComponent, "ngx-mat-menu-list-item", never, { "highlighted": { "alias": "highlighted"; "required": false; }; "item": { "alias": "item"; "required": false; }; "depth": { "alias": "depth"; "required": false; }; "parent": { "alias": "parent"; "required": false; }; "showIcon": { "alias": "showIcon"; "required": false; }; }, {}, never, never, false, never>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
declare class SPMatMenuPaneComponent implements OnInit, OnDestroy, AfterViewInit, OnChanges {
|
|
81
|
+
cdr: ChangeDetectorRef;
|
|
82
|
+
private layoutService;
|
|
83
|
+
private router;
|
|
84
|
+
private injector;
|
|
85
|
+
menuTitle: string;
|
|
86
|
+
showBackButton: boolean;
|
|
87
|
+
defaultBackButtonHref: string;
|
|
88
|
+
backButtonText: string;
|
|
89
|
+
menuItems: NavItem[];
|
|
90
|
+
brandingText: string;
|
|
91
|
+
brandingImage: string;
|
|
92
|
+
matSideNav: MatSidenav | undefined;
|
|
93
|
+
appVersion: string;
|
|
94
|
+
menuPaneFooterContent: TemplateRef<any>;
|
|
95
|
+
showIcons: boolean;
|
|
96
|
+
baseUrl: string;
|
|
97
|
+
layout: SideMenuLayoutProps;
|
|
98
|
+
backButtonNavItem: NavItem | undefined;
|
|
99
|
+
destroy: Subject<void>;
|
|
100
|
+
menuItemComps: i0.Signal<readonly SPMatMenuListItemComponent[]>;
|
|
101
|
+
menuItemComps$: i0.EffectRef;
|
|
102
|
+
constructor(cdr: ChangeDetectorRef, layoutService: LayoutService, router: Router, injector: Injector);
|
|
103
|
+
ngOnInit(): void;
|
|
104
|
+
ngOnDestroy(): void;
|
|
105
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
106
|
+
ngAfterViewInit(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Highlights the menu item for the specified URL.
|
|
109
|
+
*
|
|
110
|
+
* @param url the full url of the current navigation
|
|
111
|
+
*
|
|
112
|
+
* The way this function works is like this.
|
|
113
|
+
*
|
|
114
|
+
* It first finds the NavItem matching the given URL in url arg. It does
|
|
115
|
+
* this by removing the baseUrl from the url and then comparing the
|
|
116
|
+
* NavItem.route attached to each SPMatMenuListItemComponent. This is done
|
|
117
|
+
* recursively covering all NavItem.children. When a matching NavItem is
|
|
118
|
+
* found, the function goes on to find the SPMatMenuListItemComponent which
|
|
119
|
+
* has this NavItem attached to it. This too is done recursively to find
|
|
120
|
+
* the innermost NavItem with matching URL.
|
|
121
|
+
*
|
|
122
|
+
* When a matching SPMatMenuListItemComponent is found, it first deselects
|
|
123
|
+
* the previous SPMatMenuListItemComponent selection and then goes on to
|
|
124
|
+
* select the newly matched SPMatMenuListItemComponent. If the
|
|
125
|
+
* SPMatMenuListItemComponent is a child of a parent NavItem, the parent
|
|
126
|
+
* NavItem is expanded. Similarly when deselecting the current selection,
|
|
127
|
+
* if it belongs to a parent NavItem and the parent is not shared by the
|
|
128
|
+
* currently matched SPMatMenuListItemComponent, it collapses the parent
|
|
129
|
+
* of the previously selected SPMatMenuListItemComponent. (Quite a mouthful
|
|
130
|
+
* of a sentence, but it's exactly how it works.)
|
|
131
|
+
*/
|
|
132
|
+
highlightUrlMenuItem(url: string): void;
|
|
133
|
+
private _curHighlitedMenuItemComp;
|
|
134
|
+
highlightMenuItemComp(menuItemComp: SPMatMenuListItemComponent): void;
|
|
135
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SPMatMenuPaneComponent, never>;
|
|
136
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SPMatMenuPaneComponent, "ngx-mat-menu-pane", never, { "menuTitle": { "alias": "menuTitle"; "required": false; }; "showBackButton": { "alias": "showBackButton"; "required": false; }; "defaultBackButtonHref": { "alias": "defaultBackButtonHref"; "required": false; }; "backButtonText": { "alias": "backButtonText"; "required": false; }; "menuItems": { "alias": "menuItems"; "required": false; }; "brandingText": { "alias": "brandingText"; "required": false; }; "brandingImage": { "alias": "brandingImage"; "required": false; }; "matSideNav": { "alias": "matSideNav"; "required": false; }; "appVersion": { "alias": "appVersion"; "required": false; }; "menuPaneFooterContent": { "alias": "menuPaneFooterContent"; "required": false; }; "showIcons": { "alias": "showIcons"; "required": false; }; "baseUrl": { "alias": "baseUrl"; "required": false; }; }, {}, never, never, false, never>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
declare class SPMatMenuLayoutComponent implements OnInit, OnDestroy {
|
|
140
|
+
private layoutService;
|
|
141
|
+
private cdr;
|
|
142
|
+
menuNav: MatSidenav;
|
|
143
|
+
layout: SideMenuLayoutProps;
|
|
144
|
+
destroy: Subject<void>;
|
|
145
|
+
containerHeight: number;
|
|
146
|
+
topBottomPadding: number;
|
|
147
|
+
baseUrl: string;
|
|
148
|
+
showBackButton: boolean;
|
|
149
|
+
defaultBackButtonHref: string;
|
|
150
|
+
backButtonText: string;
|
|
151
|
+
brandingImage: string;
|
|
152
|
+
brandingText: string;
|
|
153
|
+
appTitle: string;
|
|
154
|
+
menuTitle: string;
|
|
155
|
+
menuItems: NavItem[];
|
|
156
|
+
menuPaneFooterContent: TemplateRef<any>;
|
|
157
|
+
toolbarEndContent: TemplateRef<any>;
|
|
158
|
+
infoPaneContent: TemplateRef<any>;
|
|
159
|
+
toolbarTitleContent: TemplateRef<any>;
|
|
160
|
+
infoPaneMinWidth: number;
|
|
161
|
+
infoPaneMaxWidth: number;
|
|
162
|
+
contentContainerClass: string;
|
|
163
|
+
showIcons: boolean;
|
|
164
|
+
readonly infoPane: MatSidenav;
|
|
165
|
+
constructor(layoutService: LayoutService, cdr: ChangeDetectorRef);
|
|
166
|
+
ngOnInit(): void;
|
|
167
|
+
ngOnDestroy(): void;
|
|
168
|
+
onToggleMenuPane(): void;
|
|
169
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SPMatMenuLayoutComponent, never>;
|
|
170
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SPMatMenuLayoutComponent, "sp-mat-menu-layout", never, { "baseUrl": { "alias": "baseUrl"; "required": false; }; "showBackButton": { "alias": "showBackButton"; "required": false; }; "defaultBackButtonHref": { "alias": "defaultBackButtonHref"; "required": false; }; "backButtonText": { "alias": "backButtonText"; "required": false; }; "brandingImage": { "alias": "brandingImage"; "required": false; }; "brandingText": { "alias": "brandingText"; "required": false; }; "appTitle": { "alias": "appTitle"; "required": false; }; "menuTitle": { "alias": "menuTitle"; "required": false; }; "menuItems": { "alias": "menuItems"; "required": false; }; "menuPaneFooterContent": { "alias": "menuPaneFooterContent"; "required": false; }; "toolbarEndContent": { "alias": "toolbarEndContent"; "required": false; }; "infoPaneContent": { "alias": "infoPaneContent"; "required": false; }; "toolbarTitleContent": { "alias": "toolbarTitleContent"; "required": false; }; "infoPaneMinWidth": { "alias": "infoPaneMinWidth"; "required": false; }; "infoPaneMaxWidth": { "alias": "infoPaneMaxWidth"; "required": false; }; "contentContainerClass": { "alias": "contentContainerClass"; "required": false; }; "showIcons": { "alias": "showIcons"; "required": false; }; }, {}, never, never, false, never>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
declare class SPMatMenuLayoutModule {
|
|
174
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SPMatMenuLayoutModule, never>;
|
|
175
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SPMatMenuLayoutModule, [typeof SPMatMenuPaneComponent, typeof SPMatMenuListItemComponent, typeof SPMatMenuLayoutComponent], [typeof i4.CommonModule, typeof i5.RouterOutlet, typeof i6.MatSidenavModule, typeof i7.MatToolbarModule, typeof i8.MatIconModule, typeof i9.MatButtonModule, typeof i10.MatMenuModule, typeof i11.MatDialogModule, typeof i12.MatListModule], [typeof SPMatMenuPaneComponent, typeof SPMatMenuListItemComponent, typeof SPMatMenuLayoutComponent]>;
|
|
176
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<SPMatMenuLayoutModule>;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export { LayoutService, SPMatMenuLayoutComponent, SPMatMenuLayoutModule, SPMatMenuListItemComponent, SPMatMenuPaneComponent };
|
|
180
|
+
export type { NavItem, SideMenuLayoutProps };
|
package/mat-tel-input/index.d.ts
CHANGED
|
@@ -1,2 +1,169 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken, OnInit, OnDestroy, ElementRef, Injector, ChangeDetectorRef } from '@angular/core';
|
|
4
|
+
import * as rxjs from 'rxjs';
|
|
5
|
+
import { Observable, BehaviorSubject, ReplaySubject, Subject } from 'rxjs';
|
|
6
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
7
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
8
|
+
import { ControlValueAccessor, NgControl, FormGroup, FormControl, AbstractControl, FormBuilder } from '@angular/forms';
|
|
9
|
+
import { MatFormFieldControl, MatFormField } from '@angular/material/form-field';
|
|
10
|
+
import { MatSelect, MatSelectChange } from '@angular/material/select';
|
|
11
|
+
|
|
12
|
+
interface QQMatTelephoneInputConfig {
|
|
13
|
+
/**
|
|
14
|
+
* Provider function to detect geographi location and return it
|
|
15
|
+
* to the control. If implemented, the control would call this
|
|
16
|
+
* function during initialization and auto-select the
|
|
17
|
+
* country returned.
|
|
18
|
+
* @param http
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
getCountryCode?: (http: HttpClient) => Observable<{
|
|
22
|
+
ip: string;
|
|
23
|
+
countryCode: string;
|
|
24
|
+
regionCode: string;
|
|
25
|
+
city: string;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* When user explicitly selects a country from the country
|
|
29
|
+
* drop down, this function will be called giving the client a chance
|
|
30
|
+
* to save it either to a persistent storage or a session variable.
|
|
31
|
+
*/
|
|
32
|
+
saveCountrySelection?: (countryInfo: {
|
|
33
|
+
code: string;
|
|
34
|
+
name: string;
|
|
35
|
+
callingCode: number;
|
|
36
|
+
}) => Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Countries supported by the telephone control. The string is a
|
|
39
|
+
* regex pattern that will be used to filter supported countries.
|
|
40
|
+
* So if you specify ".*", it'll list all countries of the world.
|
|
41
|
+
* "TW|SG|MY" restricts the coutries list to Taiwan, Singapore &
|
|
42
|
+
* Malaysia.
|
|
43
|
+
*/
|
|
44
|
+
countries?: string;
|
|
45
|
+
}
|
|
46
|
+
declare const QQMAT_TELEPHONE_INPUT_CONFIG_PROVIDER: InjectionToken<QQMatTelephoneInputConfig>;
|
|
47
|
+
|
|
48
|
+
interface CountryInfo {
|
|
49
|
+
name: string;
|
|
50
|
+
code: string;
|
|
51
|
+
callingCode: number;
|
|
52
|
+
}
|
|
53
|
+
/** Data structure for holding telephone number. */
|
|
54
|
+
declare class ISOTelNumber {
|
|
55
|
+
country: string;
|
|
56
|
+
national: string;
|
|
57
|
+
constructor(country: string, national: string);
|
|
58
|
+
}
|
|
59
|
+
declare class SPMatTelephoneInputComponent implements OnInit, OnDestroy, ControlValueAccessor, MatFormFieldControl<ISOTelNumber> {
|
|
60
|
+
private injector;
|
|
61
|
+
private cdr;
|
|
62
|
+
private http;
|
|
63
|
+
private _focusMonitor;
|
|
64
|
+
private _elementRef;
|
|
65
|
+
_formField: MatFormField;
|
|
66
|
+
ngControl: NgControl;
|
|
67
|
+
static nextId: number;
|
|
68
|
+
countrySelect: MatSelect;
|
|
69
|
+
nationalInput: ElementRef;
|
|
70
|
+
mobile: boolean;
|
|
71
|
+
allowedCountries: string;
|
|
72
|
+
defaultCountry: string;
|
|
73
|
+
filter$: BehaviorSubject<string>;
|
|
74
|
+
countries$: rxjs.Observable<CountryInfo[]>;
|
|
75
|
+
countries: Array<CountryInfo>;
|
|
76
|
+
filteredCountries: ReplaySubject<CountryInfo[]>;
|
|
77
|
+
isDisabled: boolean;
|
|
78
|
+
private _onChange;
|
|
79
|
+
private control;
|
|
80
|
+
private onCountrySelectFocus;
|
|
81
|
+
private onCountrySelectBlur;
|
|
82
|
+
phoneUtil: any;
|
|
83
|
+
parts: FormGroup<{
|
|
84
|
+
country: FormControl<CountryInfo | null>;
|
|
85
|
+
national: FormControl<string | null>;
|
|
86
|
+
}>;
|
|
87
|
+
stateChanges: Subject<void>;
|
|
88
|
+
focused: boolean;
|
|
89
|
+
touched: boolean;
|
|
90
|
+
controlType: string;
|
|
91
|
+
id: string;
|
|
92
|
+
onChange: (_: any) => void;
|
|
93
|
+
onTouched: () => void;
|
|
94
|
+
telForm: FormGroup<{}>;
|
|
95
|
+
/** control for the MatSelect filter keyword */
|
|
96
|
+
countryFilterCtrl: FormControl<string | null>;
|
|
97
|
+
get empty(): boolean;
|
|
98
|
+
get shouldLabelFloat(): boolean;
|
|
99
|
+
userAriaDescribedBy: string;
|
|
100
|
+
get placeholder(): string;
|
|
101
|
+
set placeholder(value: string);
|
|
102
|
+
private _placeholder;
|
|
103
|
+
get required(): boolean;
|
|
104
|
+
set required(value: BooleanInput);
|
|
105
|
+
private _required;
|
|
106
|
+
searchText: string;
|
|
107
|
+
noEntriesFoundLabel: string;
|
|
108
|
+
get disabled(): boolean;
|
|
109
|
+
set disabled(value: BooleanInput);
|
|
110
|
+
private _disabled;
|
|
111
|
+
destroy: Subject<void>;
|
|
112
|
+
get value(): ISOTelNumber | null;
|
|
113
|
+
set value(tel: ISOTelNumber | null);
|
|
114
|
+
get errorState(): boolean;
|
|
115
|
+
onFocusIn(event: FocusEvent): void;
|
|
116
|
+
onFocusOut(event: FocusEvent): void;
|
|
117
|
+
autoFocusNext(control: AbstractControl, nextElement?: HTMLInputElement): void;
|
|
118
|
+
autoFocusPrev(control: AbstractControl, prevElement: HTMLInputElement): void;
|
|
119
|
+
setDescribedByIds(ids: string[]): void;
|
|
120
|
+
onContainerClick(): void;
|
|
121
|
+
constructor(injector: Injector, cdr: ChangeDetectorRef, http: HttpClient, _focusMonitor: FocusMonitor, _elementRef: ElementRef<HTMLElement>, _formField: MatFormField, ngControl: NgControl, formBuilder: FormBuilder);
|
|
122
|
+
ngOnInit(): void;
|
|
123
|
+
protected setInitialValue(): void;
|
|
124
|
+
private filterCountries;
|
|
125
|
+
ngAfterViewInit(): void;
|
|
126
|
+
ngOnDestroy(): void;
|
|
127
|
+
/**
|
|
128
|
+
* Set the country code to the given code.
|
|
129
|
+
*
|
|
130
|
+
* @param code Numeric country code to set the value of the country
|
|
131
|
+
* ion-select to. Will validate the code against a built-in country
|
|
132
|
+
* code list.
|
|
133
|
+
*/
|
|
134
|
+
setCountryCode(code: string): void;
|
|
135
|
+
writeValue(telNumber: string): void;
|
|
136
|
+
registerOnChange(fn: any): void;
|
|
137
|
+
registerOnTouched(fn: any): void;
|
|
138
|
+
setDisabledState(isDisabled: boolean): void;
|
|
139
|
+
onCountryChange(ev: MatSelectChange): void;
|
|
140
|
+
onNationalNumberChange(ev: Event): void;
|
|
141
|
+
/**
|
|
142
|
+
* Returns the telephone number in ISO8601 format.
|
|
143
|
+
* @param numberParts
|
|
144
|
+
* @returns
|
|
145
|
+
*/
|
|
146
|
+
private ISOTelephoneNumber;
|
|
147
|
+
private notifyChange;
|
|
148
|
+
get placeholderText(): string;
|
|
149
|
+
get hasErrors(): boolean;
|
|
150
|
+
private disableComponents;
|
|
151
|
+
/**
|
|
152
|
+
* Returns the full telephone number, combining the selected
|
|
153
|
+
* country code with the national number.
|
|
154
|
+
*
|
|
155
|
+
* Leading zeros in the national number are removed.
|
|
156
|
+
*
|
|
157
|
+
* Validates the entered number using google-libphonenumber and if
|
|
158
|
+
* invalid, returns an empty string.
|
|
159
|
+
*/
|
|
160
|
+
private getTelephoneNumberParts;
|
|
161
|
+
private getAllowedCountries;
|
|
162
|
+
private detectCountry;
|
|
163
|
+
private initCountries;
|
|
164
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SPMatTelephoneInputComponent, [null, null, null, null, null, { optional: true; }, { optional: true; self: true; }, null]>;
|
|
165
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SPMatTelephoneInputComponent, "sp-mat-telephone-input", never, { "mobile": { "alias": "mobile"; "required": false; }; "allowedCountries": { "alias": "allowedCountries"; "required": false; }; "defaultCountry": { "alias": "defaultCountry"; "required": false; }; "userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "searchText": { "alias": "searchText"; "required": false; }; "noEntriesFoundLabel": { "alias": "noEntriesFoundLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, true, never>;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export { ISOTelNumber, QQMAT_TELEPHONE_INPUT_CONFIG_PROVIDER, SPMatTelephoneInputComponent };
|
|
169
|
+
export type { QQMatTelephoneInputConfig };
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"path": "src/assets/i18n/"
|
|
7
7
|
}
|
|
8
8
|
],
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "20.0.2",
|
|
10
10
|
"peerDependencies": {
|
|
11
11
|
"@angular/common": "^19.1.0",
|
|
12
12
|
"@angular/core": "^19.1.0",
|
|
@@ -48,10 +48,6 @@
|
|
|
48
48
|
"types": "./entities/index.d.ts",
|
|
49
49
|
"default": "./fesm2022/smallpearl-ngx-helper-entities.mjs"
|
|
50
50
|
},
|
|
51
|
-
"./hover-dropdown": {
|
|
52
|
-
"types": "./hover-dropdown/index.d.ts",
|
|
53
|
-
"default": "./fesm2022/smallpearl-ngx-helper-hover-dropdown.mjs"
|
|
54
|
-
},
|
|
55
51
|
"./entity-field": {
|
|
56
52
|
"types": "./entity-field/index.d.ts",
|
|
57
53
|
"default": "./fesm2022/smallpearl-ngx-helper-entity-field.mjs"
|
|
@@ -60,14 +56,18 @@
|
|
|
60
56
|
"types": "./forms/index.d.ts",
|
|
61
57
|
"default": "./fesm2022/smallpearl-ngx-helper-forms.mjs"
|
|
62
58
|
},
|
|
63
|
-
"./
|
|
64
|
-
"types": "./
|
|
65
|
-
"default": "./fesm2022/smallpearl-ngx-helper-
|
|
59
|
+
"./hover-dropdown": {
|
|
60
|
+
"types": "./hover-dropdown/index.d.ts",
|
|
61
|
+
"default": "./fesm2022/smallpearl-ngx-helper-hover-dropdown.mjs"
|
|
66
62
|
},
|
|
67
63
|
"./locale": {
|
|
68
64
|
"types": "./locale/index.d.ts",
|
|
69
65
|
"default": "./fesm2022/smallpearl-ngx-helper-locale.mjs"
|
|
70
66
|
},
|
|
67
|
+
"./mat-busy-wheel": {
|
|
68
|
+
"types": "./mat-busy-wheel/index.d.ts",
|
|
69
|
+
"default": "./fesm2022/smallpearl-ngx-helper-mat-busy-wheel.mjs"
|
|
70
|
+
},
|
|
71
71
|
"./mat-context-menu": {
|
|
72
72
|
"types": "./mat-context-menu/index.d.ts",
|
|
73
73
|
"default": "./fesm2022/smallpearl-ngx-helper-mat-context-menu.mjs"
|
package/sideload/index.d.ts
CHANGED
|
@@ -1 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A function to merge sideloaded content into the main object thereby returning
|
|
3
|
+
* a composite object.
|
|
4
|
+
*
|
|
5
|
+
* @param resp - the JSON response object, typically received from remote for
|
|
6
|
+
* an HTTP request.
|
|
7
|
+
* @param targetObjKey - the key name of the target object into which the
|
|
8
|
+
* sideloaded data are to be merged.
|
|
9
|
+
* @param idKey - idKey. Function assumes that all the objects use the same
|
|
10
|
+
* key name as the unique object identifier.
|
|
11
|
+
* @param sideloadDataMap: An array of [string, string], where the first
|
|
12
|
+
* element specifies the property name of the target object and the second
|
|
13
|
+
* element the sideload data element's key. This is useful when the the
|
|
14
|
+
* target objet's property name that is to be merged with sideload data do not
|
|
15
|
+
* match.
|
|
16
|
+
* @returns Object with sideloaded data merged into the target object.
|
|
17
|
+
*/
|
|
18
|
+
declare function sideloadToComposite(resp: any, targetObjKey: string, idKey?: string, mergeStrategy?: 'inplace' | 'append', appendObjSuffix?: string, sideloadDataMap?: Array<[string, string, string?]>): any;
|
|
19
|
+
|
|
20
|
+
export { sideloadToComposite };
|