@sumaris-net/ngx-components 18.26.13 → 18.27.0-alpha1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/doc/changelog.md +3 -1
  2. package/esm2022/public_api.mjs +2 -1
  3. package/esm2022/src/app/core/core.module.mjs +4 -1
  4. package/esm2022/src/app/core/form/form.utils.mjs +12 -1
  5. package/esm2022/src/app/shared/field-accessor.mjs +16 -0
  6. package/esm2022/src/app/shared/focusable.mjs +1 -1
  7. package/esm2022/src/app/shared/inputs.mjs +22 -3
  8. package/esm2022/src/app/shared/material/autocomplete/material.autocomplete.mjs +175 -46
  9. package/esm2022/src/app/shared/material/boolean/material.boolean.mjs +69 -23
  10. package/esm2022/src/app/shared/material/datetime/material.date.mjs +18 -4
  11. package/esm2022/src/app/shared/material/datetime/material.datetime.mjs +116 -28
  12. package/esm2022/src/app/shared/material/duration/duration.module.mjs +10 -3
  13. package/esm2022/src/app/shared/material/duration/material.duration.mjs +63 -33
  14. package/esm2022/src/app/shared/material/duration/testing/mat-duration.test.mjs +3 -3
  15. package/esm2022/src/app/shared/material/latlong/material.latlong-input.mjs +14 -1
  16. package/esm2022/src/app/shared/material/latlong/material.latlong.mjs +16 -1
  17. package/esm2022/src/app/shared/material/testing/common.test.mjs +218 -27
  18. package/fesm2022/sumaris-net.ngx-components.mjs +985 -429
  19. package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
  20. package/package.json +1 -1
  21. package/public_api.d.ts +1 -0
  22. package/src/app/core/core.module.d.ts +15 -15
  23. package/src/app/core/form/form.utils.d.ts +7 -0
  24. package/src/app/shared/field-accessor.d.ts +51 -0
  25. package/src/app/shared/focusable.d.ts +3 -1
  26. package/src/app/shared/inputs.d.ts +3 -1
  27. package/src/app/shared/material/autocomplete/material.autocomplete.d.ts +20 -7
  28. package/src/app/shared/material/boolean/material.boolean.d.ts +12 -4
  29. package/src/app/shared/material/datetime/material.date.d.ts +6 -2
  30. package/src/app/shared/material/datetime/material.datetime.d.ts +20 -4
  31. package/src/app/shared/material/duration/duration.module.d.ts +3 -1
  32. package/src/app/shared/material/duration/material.duration.d.ts +15 -13
  33. package/src/app/shared/material/latlong/material.latlong-input.d.ts +5 -3
  34. package/src/app/shared/material/latlong/material.latlong.d.ts +5 -1
  35. package/src/app/shared/material/testing/common.test.d.ts +49 -6
  36. package/src/assets/i18n/en.json +1 -1
  37. package/src/assets/manifest.json +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "18.26.13",
4
+ "version": "18.27.0-alpha1",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
package/public_api.d.ts CHANGED
@@ -127,6 +127,7 @@ export * from './src/app/shared/types';
127
127
  export * from './src/app/shared/dates';
128
128
  export * from './src/app/shared/functions';
129
129
  export * from './src/app/shared/focusable';
130
+ export * from './src/app/shared/field-accessor';
130
131
  export * from './src/app/shared/regexps';
131
132
  export * from './src/app/shared/services';
132
133
  export * from './src/app/shared/forms';
@@ -7,23 +7,23 @@ import * as i4 from "@ionic/storage-angular";
7
7
  import * as i5 from "./graphql/graphql.module";
8
8
  import * as i6 from "./menu/menu.module";
9
9
  import * as i7 from "./icon/icon.module";
10
- import * as i8 from "./account/account.module";
11
- import * as i9 from "./register/register.module";
12
- import * as i10 from "./auth/auth.module";
13
- import * as i11 from "./home/home.module";
14
- import * as i12 from "./about/about.module";
15
- import * as i13 from "./settings/settings.module";
16
- import * as i14 from "./peer/select-peer.module";
17
- import * as i15 from "./form/form.module";
18
- import * as i16 from "./table/table.module";
19
- import * as i17 from "./install/install-upgrade-card.module";
20
- import * as i18 from "./offline/update-offline-mode-card.module";
21
- import * as i19 from "./services/pipes/pipes.module";
22
- import * as i20 from "./account/password/change-password.module";
23
- import * as i21 from "./icon/icon-selector.module";
10
+ import * as i8 from "./icon/icon-selector.module";
11
+ import * as i9 from "./account/account.module";
12
+ import * as i10 from "./register/register.module";
13
+ import * as i11 from "./auth/auth.module";
14
+ import * as i12 from "./home/home.module";
15
+ import * as i13 from "./about/about.module";
16
+ import * as i14 from "./settings/settings.module";
17
+ import * as i15 from "./peer/select-peer.module";
18
+ import * as i16 from "./form/form.module";
19
+ import * as i17 from "./table/table.module";
20
+ import * as i18 from "./install/install-upgrade-card.module";
21
+ import * as i19 from "./offline/update-offline-mode-card.module";
22
+ import * as i20 from "./services/pipes/pipes.module";
23
+ import * as i21 from "./account/password/change-password.module";
24
24
  export declare class CoreModule {
25
25
  static forRoot(): ModuleWithProviders<CoreModule>;
26
26
  static ɵfac: i0.ɵɵFactoryDeclaration<CoreModule, never>;
27
- static ɵmod: i0.ɵɵNgModuleDeclaration<CoreModule, never, [typeof i1.SharedModule, typeof i2.RouterModule, typeof i3.CacheModule, typeof i4.IonicStorageModule, typeof i5.AppGraphQLModule, typeof i6.AppMenuModule, typeof i7.AppIconModule, typeof i8.AppAccountModule, typeof i9.AppRegisterModule, typeof i10.AppAuthModule, typeof i11.AppHomePageModule, typeof i12.AppAboutModalModule, typeof i13.AppSettingsPageModule, typeof i14.AppSelectPeerModule, typeof i15.AppFormModule, typeof i16.AppTableModule, typeof i17.AppInstallUpgradeCardModule, typeof i18.AppUpdateOfflineModeCardModule, typeof i19.CorePipesModule], [typeof i1.SharedModule, typeof i2.RouterModule, typeof i5.AppGraphQLModule, typeof i6.AppMenuModule, typeof i9.AppRegisterModule, typeof i20.AppChangePasswordModule, typeof i10.AppAuthModule, typeof i11.AppHomePageModule, typeof i12.AppAboutModalModule, typeof i13.AppSettingsPageModule, typeof i7.AppIconModule, typeof i21.AppIconSelectorModule, typeof i14.AppSelectPeerModule, typeof i15.AppFormModule, typeof i16.AppTableModule, typeof i17.AppInstallUpgradeCardModule, typeof i18.AppUpdateOfflineModeCardModule, typeof i19.CorePipesModule]>;
27
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CoreModule, never, [typeof i1.SharedModule, typeof i2.RouterModule, typeof i3.CacheModule, typeof i4.IonicStorageModule, typeof i5.AppGraphQLModule, typeof i6.AppMenuModule, typeof i7.AppIconModule, typeof i8.AppIconSelectorModule, typeof i9.AppAccountModule, typeof i10.AppRegisterModule, typeof i11.AppAuthModule, typeof i12.AppHomePageModule, typeof i13.AppAboutModalModule, typeof i14.AppSettingsPageModule, typeof i15.AppSelectPeerModule, typeof i16.AppFormModule, typeof i17.AppTableModule, typeof i18.AppInstallUpgradeCardModule, typeof i19.AppUpdateOfflineModeCardModule, typeof i20.CorePipesModule], [typeof i1.SharedModule, typeof i2.RouterModule, typeof i5.AppGraphQLModule, typeof i6.AppMenuModule, typeof i10.AppRegisterModule, typeof i21.AppChangePasswordModule, typeof i11.AppAuthModule, typeof i12.AppHomePageModule, typeof i13.AppAboutModalModule, typeof i14.AppSettingsPageModule, typeof i7.AppIconModule, typeof i8.AppIconSelectorModule, typeof i15.AppSelectPeerModule, typeof i16.AppFormModule, typeof i17.AppTableModule, typeof i18.AppInstallUpgradeCardModule, typeof i19.AppUpdateOfflineModeCardModule, typeof i20.CorePipesModule]>;
28
28
  static ɵinj: i0.ɵɵInjectorDeclaration<CoreModule>;
29
29
  }
@@ -289,6 +289,12 @@ export declare class AppFormUtils {
289
289
  * @return {void} Does not return a value.
290
290
  */
291
291
  static setFormErrors: typeof setFormErrors;
292
+ /**
293
+ * Retrieves the name of the control.
294
+ *
295
+ * @param {AbstractControl} control - A form control, form group, or form array
296
+ */
297
+ static getControlName: typeof getControlName;
292
298
  }
293
299
  export declare function isControlHasInput(controls: {
294
300
  [key: string]: AbstractControl;
@@ -299,3 +305,4 @@ export declare function setCalculatedValue(controls: {
299
305
  export declare function resetCalculatedValue(controls: {
300
306
  [key: string]: AbstractControl;
301
307
  }, controlName: string): void;
308
+ export declare function getControlName(control: AbstractControl): string | undefined;
@@ -0,0 +1,51 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { FocusOrigin } from '@angular/cdk/a11y';
3
+ /**
4
+ * Generic interface for programmatic access to a form field.
5
+ *
6
+ * Implemented by form field components (autocomplete, date, duration, boolean, etc.)
7
+ * to allow external code to focus, write values, or type text without knowing
8
+ * the concrete component type.
9
+ *
10
+ * Use cases: barcode scanner navigation, voice dictation, keyboard shortcuts,
11
+ * test automation — any scenario that needs programmatic field interaction.
12
+ */
13
+ export interface ControlFieldAccessor {
14
+ /** Set focus on this field */
15
+ focus(options?: FocusOptions, origin?: FocusOrigin): void;
16
+ /** Write a value to the field (equivalent to ControlValueAccessor.writeValue) */
17
+ writeValue(value: any): void;
18
+ clearValue(): void;
19
+ readonly focused: boolean;
20
+ /** The formControl name, if this field is part of a reactive form */
21
+ readonly controlName?: string;
22
+ }
23
+ /**
24
+ * Extended interface for fields that accept typed text input
25
+ * (autocomplete search text, text inputs, textareas).
26
+ *
27
+ * Unlike writeValue() which sets the final value, typeText() simulates
28
+ * the user typing characters — useful for autocomplete filtering where
29
+ * the search text is not the final value.
30
+ */
31
+ export interface TextControlFieldAccessor extends ControlFieldAccessor {
32
+ /**
33
+ * Type text into the input field (e.g. autocomplete search text).
34
+ * Appends to existing text or replaces it, depending on the component.
35
+ */
36
+ typeText(text: string): void;
37
+ }
38
+ /**
39
+ * Injection token for IInputFieldAccessor.
40
+ *
41
+ * Components that implement IInputFieldAccessor should provide themselves:
42
+ * ```typescript
43
+ * @Component({
44
+ * providers: [{ provide: INPUT_FIELD_ACCESSOR, useExisting: MyFieldComponent }]
45
+ * })
46
+ * ```
47
+ *
48
+ * Consumers (e.g. barcode navigation directives) inject this token with @Host()
49
+ * to access the field handler of the component they're placed on.
50
+ */
51
+ export declare const INPUT_FIELD_ACCESSOR: InjectionToken<ControlFieldAccessor>;
@@ -1,4 +1,6 @@
1
+ import { FocusOrigin } from '@angular/cdk/a11y';
1
2
  export interface FocusableElement {
2
- focus(): any;
3
+ /** Set focus on this field */
4
+ focus(options?: FocusOptions, origin?: FocusOrigin): void;
3
5
  }
4
6
  export declare function isFocusableElement(object: any): object is FocusableElement;
@@ -1,12 +1,14 @@
1
1
  import { ElementRef, QueryList } from '@angular/core';
2
2
  import { FocusableElement } from './focusable';
3
+ import { FocusOrigin } from '@angular/cdk/a11y';
3
4
  export declare function selectInputContentFromEvent(event: Event): boolean;
4
5
  export declare function selectInputContent(input: HTMLInputElement | HTMLTextAreaElement | any): boolean;
5
6
  export declare function selectInputRange(input: HTMLInputElement | HTMLTextAreaElement, startIndex: number, endIndex?: number, direction?: 'backward' | 'forward' | 'none'): boolean;
6
7
  export declare function getCaretPosition(input: any): number;
8
+ export declare function setCaretPosition(input: any, position: number): boolean;
7
9
  export declare function moveInputCaretToSeparator(event: KeyboardEvent, separator: string, forward?: boolean): boolean;
8
10
  export declare function filterNumberInput(event: KeyboardEvent, allowDecimals: boolean, decimalSeparator?: string): void;
9
- export declare function focusInput<T = any>(element: ElementRef<T>): void;
11
+ export declare function focusInput<T = any>(element: ElementRef<T>, options?: FocusOptions, origin?: FocusOrigin): void;
10
12
  export declare function setTabIndex<T = any>(element: ElementRef<T>, tabIndex: number): void;
11
13
  export interface InputElement extends FocusableElement {
12
14
  tabindex?: number;
@@ -3,12 +3,14 @@ import { ControlValueAccessor, FormGroupDirective, UntypedFormControl } from '@a
3
3
  import { BehaviorSubject, Observable } from 'rxjs';
4
4
  import { SuggestFn } from '../../services/entity-service.class';
5
5
  import { InputElement } from '../../inputs';
6
+ import { TextControlFieldAccessor } from '../../field-accessor';
6
7
  import { MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-field';
7
- import { MatSelect, MatSelectChange } from '@angular/material/select';
8
+ import { MatOption, MatSelect, MatSelectChange } from '@angular/material/select';
8
9
  import { MatAutocomplete, MatAutocompleteSelectedEvent, MatAutocompleteTrigger } from '@angular/material/autocomplete';
9
10
  import { IonSearchbar, ModalController } from '@ionic/angular';
10
11
  import { MatAutocompleteFieldConfig } from './material.autocomplete.config';
11
12
  import { AppFloatLabelType, DisplayFn, EqualsFn } from '../../types';
13
+ import { FocusOrigin } from '@angular/cdk/a11y';
12
14
  import * as i0 from "@angular/core";
13
15
  export interface MatAutocompleteFieldSelectChange {
14
16
  source: MatSelect | MatAutocomplete;
@@ -18,7 +20,7 @@ export interface MatAutocompleteFieldToggleFavorite {
18
20
  source: MatSelect | MatAutocomplete;
19
21
  value: any;
20
22
  }
21
- export declare class MatAutocompleteField implements OnInit, AfterViewInit, OnDestroy, InputElement, ControlValueAccessor {
23
+ export declare class MatAutocompleteField implements OnInit, AfterViewInit, OnDestroy, InputElement, TextControlFieldAccessor, ControlValueAccessor {
22
24
  protected injector: Injector;
23
25
  protected el: ElementRef<HTMLElement>;
24
26
  protected cd: ChangeDetectorRef;
@@ -43,12 +45,14 @@ export declare class MatAutocompleteField implements OnInit, AfterViewInit, OnDe
43
45
  protected _$filteredItems: BehaviorSubject<any[]>;
44
46
  protected _selectedItem: any;
45
47
  protected _displayValue: string;
48
+ protected _hiddenSearchText: string;
46
49
  protected _moreItemsCount: number;
47
50
  protected _fetchMore$: EventEmitter<Event>;
48
51
  protected _defaultPanelWidth: string;
49
52
  protected _focused: boolean;
50
53
  protected _panelClosedAtTime: number;
51
54
  protected get searchText(): string | undefined;
55
+ protected showTooltip: boolean;
52
56
  equals: EqualsFn;
53
57
  logPrefix: string;
54
58
  formControl: UntypedFormControl;
@@ -110,7 +114,7 @@ export declare class MatAutocompleteField implements OnInit, AfterViewInit, OnDe
110
114
  get classList(): string;
111
115
  clicked: EventEmitter<MouseEvent>;
112
116
  blurred: EventEmitter<FocusEvent>;
113
- focused: EventEmitter<FocusEvent>;
117
+ focusedChanges: EventEmitter<FocusEvent>;
114
118
  dropButtonClick: EventEmitter<Event>;
115
119
  keydownEscape: EventEmitter<Event>;
116
120
  keydownBackspace: EventEmitter<Event>;
@@ -131,7 +135,8 @@ export declare class MatAutocompleteField implements OnInit, AfterViewInit, OnDe
131
135
  autocompleteTrigger: MatAutocompleteTrigger;
132
136
  panelHeaderTemplate?: TemplateRef<any>;
133
137
  panelFooterTemplate?: TemplateRef<any>;
134
- showTooltip: boolean;
138
+ get focused(): boolean;
139
+ get controlName(): string;
135
140
  constructor(injector: Injector, el: ElementRef<HTMLElement>, cd: ChangeDetectorRef, modalController: ModalController, renderer: Renderer2, formGroupDir: FormGroupDirective);
136
141
  get itemCount(): number;
137
142
  get canFetchMore(): boolean;
@@ -158,7 +163,9 @@ export declare class MatAutocompleteField implements OnInit, AfterViewInit, OnDe
158
163
  registerOnChange(fn: any): void;
159
164
  registerOnTouched(fn: any): void;
160
165
  setDisabledState(isDisabled: boolean): void;
161
- focus(): void;
166
+ focus(options?: FocusOptions, origin?: FocusOrigin): void;
167
+ /** ITextInputFieldAccessor: type text into the search input and trigger suggest */
168
+ typeText(text: string): void;
162
169
  filterInputTextFocusEvent(event: FocusEvent): boolean;
163
170
  protected filterInputTextBlurEvent(event: FocusEvent): void;
164
171
  protected emitEnter(event: Event | KeyboardEvent): void;
@@ -176,8 +183,9 @@ export declare class MatAutocompleteField implements OnInit, AfterViewInit, OnDe
176
183
  closePanel(): void;
177
184
  protected markAsLoading(): void;
178
185
  protected onSelectionChange(event: MatSelectChange): void;
186
+ onMatSelectOpenedChange(opened: boolean): void;
179
187
  protected onOptionSelected(event: MatAutocompleteSelectedEvent): void;
180
- protected toggleShowPanel(event: Event): void;
188
+ protected toggleShowPanel(event?: Event): void;
181
189
  private suggest;
182
190
  private fetchMore;
183
191
  private updateImplicitValue;
@@ -199,8 +207,13 @@ export declare class MatAutocompleteField implements OnInit, AfterViewInit, OnDe
199
207
  private setInputTextValue;
200
208
  protected onBackspace(event: Event): void;
201
209
  protected toggleFavoriteClick(event: UIEvent, value: any): void;
210
+ protected hasValidValue(): boolean;
211
+ protected clearSearchbar(): void;
212
+ protected selectFirstOptionByText(text: string): Promise<void>;
213
+ protected scrollToOption(option: MatOption, opts?: ScrollIntoViewOptions): Promise<void>;
214
+ private _matSelectSearchChanged;
202
215
  static ɵfac: i0.ɵɵFactoryDeclaration<MatAutocompleteField, [null, null, null, null, null, { optional: true; }]>;
203
- static ɵcmp: i0.ɵɵComponentDeclaration<MatAutocompleteField, "mat-autocomplete-field", never, { "equals": { "alias": "equals"; "required": false; }; "logPrefix": { "alias": "logPrefix"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "label": { "alias": "label"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "suggestFn": { "alias": "suggestFn"; "required": false; }; "required": { "alias": "required"; "required": false; }; "hideRequiredMarker": { "alias": "hideRequiredMarker"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "showPanelHeader": { "alias": "showPanelHeader"; "required": false; }; "showPanelFooter": { "alias": "showPanelFooter"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "debounceTime": { "alias": "debounceTime"; "required": false; }; "displaySeparator": { "alias": "displaySeparator"; "required": false; }; "displayWith": { "alias": "displayWith"; "required": false; }; "displayAttributes": { "alias": "displayAttributes"; "required": false; }; "displayColumnSizes": { "alias": "displayColumnSizes"; "required": false; }; "displayColumnNames": { "alias": "displayColumnNames"; "required": false; }; "highlightAccent": { "alias": "highlightAccent"; "required": false; }; "showAllOnFocus": { "alias": "showAllOnFocus"; "required": false; }; "showPanelOnFocus": { "alias": "showPanelOnFocus"; "required": false; }; "reloadItemsOnFocus": { "alias": "reloadItemsOnFocus"; "required": false; }; "clearInvalidValueOnBlur": { "alias": "clearInvalidValueOnBlur"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "config": { "alias": "config"; "required": false; }; "i18nPrefix": { "alias": "i18nPrefix"; "required": false; }; "noResultMessage": { "alias": "noResultMessage"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "matAutocompletePosition": { "alias": "matAutocompletePosition"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "fetchMoreThreshold": { "alias": "fetchMoreThreshold"; "required": false; }; "suggestLengthThreshold": { "alias": "suggestLengthThreshold"; "required": false; }; "showLoadingSpinner": { "alias": "showLoadingSpinner"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "showSearchBar": { "alias": "showSearchBar"; "required": false; }; "stickySearchBar": { "alias": "stickySearchBar"; "required": false; }; "applyImplicitValue": { "alias": "applyImplicitValue"; "required": false; }; "dropButtonTitle": { "alias": "dropButtonTitle"; "required": false; }; "clearButtonTitle": { "alias": "clearButtonTitle"; "required": false; }; "trimSearchText": { "alias": "trimSearchText"; "required": false; }; "splitSearchText": { "alias": "splitSearchText"; "required": false; }; "selectInputContentOnFocus": { "alias": "selectInputContentOnFocus"; "required": false; }; "selectInputContentOnFocusDelay": { "alias": "selectInputContentOnFocusDelay"; "required": false; }; "previewImplicitValue": { "alias": "previewImplicitValue"; "required": false; }; "showFavorites": { "alias": "showFavorites"; "required": false; }; "toggleFavoriteTitle": { "alias": "toggleFavoriteTitle"; "required": false; }; "favoriteItems": { "alias": "favoriteItems"; "required": false; }; "colSizes": { "alias": "colSizes"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, { "clicked": "click"; "blurred": "blur"; "focused": "focus"; "dropButtonClick": "dropButtonClick"; "keydownEscape": "keydown.escape"; "keydownBackspace": "keydown.backspace"; "keyupEnter": "keyup.enter"; "arrowUp": "arrowUp"; "arrowDown": "arrowDown"; "enter": "enter"; "selectionChange": "selectionChange"; "openedChange": "openedChange"; "toggleFavorite": "toggleFavorite"; }, ["panelHeaderTemplate", "panelFooterTemplate"], ["[matAfter]", "[matPrefix]", "[matSuffix]", "mat-error,[matError]", "mat-hint:not([align='end']),[matHint]", "mat-hint[align='end']"], false, never>;
216
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatAutocompleteField, "mat-autocomplete-field", never, { "equals": { "alias": "equals"; "required": false; }; "logPrefix": { "alias": "logPrefix"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "label": { "alias": "label"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "suggestFn": { "alias": "suggestFn"; "required": false; }; "required": { "alias": "required"; "required": false; }; "hideRequiredMarker": { "alias": "hideRequiredMarker"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "showPanelHeader": { "alias": "showPanelHeader"; "required": false; }; "showPanelFooter": { "alias": "showPanelFooter"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "debounceTime": { "alias": "debounceTime"; "required": false; }; "displaySeparator": { "alias": "displaySeparator"; "required": false; }; "displayWith": { "alias": "displayWith"; "required": false; }; "displayAttributes": { "alias": "displayAttributes"; "required": false; }; "displayColumnSizes": { "alias": "displayColumnSizes"; "required": false; }; "displayColumnNames": { "alias": "displayColumnNames"; "required": false; }; "highlightAccent": { "alias": "highlightAccent"; "required": false; }; "showAllOnFocus": { "alias": "showAllOnFocus"; "required": false; }; "showPanelOnFocus": { "alias": "showPanelOnFocus"; "required": false; }; "reloadItemsOnFocus": { "alias": "reloadItemsOnFocus"; "required": false; }; "clearInvalidValueOnBlur": { "alias": "clearInvalidValueOnBlur"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "config": { "alias": "config"; "required": false; }; "i18nPrefix": { "alias": "i18nPrefix"; "required": false; }; "noResultMessage": { "alias": "noResultMessage"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "matAutocompletePosition": { "alias": "matAutocompletePosition"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "fetchMoreThreshold": { "alias": "fetchMoreThreshold"; "required": false; }; "suggestLengthThreshold": { "alias": "suggestLengthThreshold"; "required": false; }; "showLoadingSpinner": { "alias": "showLoadingSpinner"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "showSearchBar": { "alias": "showSearchBar"; "required": false; }; "stickySearchBar": { "alias": "stickySearchBar"; "required": false; }; "applyImplicitValue": { "alias": "applyImplicitValue"; "required": false; }; "dropButtonTitle": { "alias": "dropButtonTitle"; "required": false; }; "clearButtonTitle": { "alias": "clearButtonTitle"; "required": false; }; "trimSearchText": { "alias": "trimSearchText"; "required": false; }; "splitSearchText": { "alias": "splitSearchText"; "required": false; }; "selectInputContentOnFocus": { "alias": "selectInputContentOnFocus"; "required": false; }; "selectInputContentOnFocusDelay": { "alias": "selectInputContentOnFocusDelay"; "required": false; }; "previewImplicitValue": { "alias": "previewImplicitValue"; "required": false; }; "showFavorites": { "alias": "showFavorites"; "required": false; }; "toggleFavoriteTitle": { "alias": "toggleFavoriteTitle"; "required": false; }; "favoriteItems": { "alias": "favoriteItems"; "required": false; }; "colSizes": { "alias": "colSizes"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, { "clicked": "click"; "blurred": "blur"; "focusedChanges": "focus"; "dropButtonClick": "dropButtonClick"; "keydownEscape": "keydown.escape"; "keydownBackspace": "keydown.backspace"; "keyupEnter": "keyup.enter"; "arrowUp": "arrowUp"; "arrowDown": "arrowDown"; "enter": "enter"; "selectionChange": "selectionChange"; "openedChange": "openedChange"; "toggleFavorite": "toggleFavorite"; }, ["panelHeaderTemplate", "panelFooterTemplate"], ["[matAfter]", "[matPrefix]", "[matSuffix]", "mat-error,[matError]", "mat-hint:not([align='end']),[matHint]", "mat-hint[align='end']"], false, never>;
204
217
  static ngAcceptInputType_required: unknown;
205
218
  static ngAcceptInputType_hideRequiredMarker: unknown;
206
219
  static ngAcceptInputType_mobile: unknown;
@@ -4,9 +4,11 @@ import { ControlValueAccessor, FormGroupDirective, UntypedFormControl } from '@a
4
4
  import { MatRadioButton, MatRadioChange } from '@angular/material/radio';
5
5
  import { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';
6
6
  import { InputElement } from '../../inputs';
7
+ import { ControlFieldAccessor } from '../../field-accessor';
7
8
  import { AppFloatLabelType } from '../../types';
9
+ import { FocusOrigin } from '@angular/cdk/a11y';
8
10
  import * as i0 from "@angular/core";
9
- export declare class MatBooleanField implements OnInit, ControlValueAccessor, InputElement, OnDestroy {
11
+ export declare class MatBooleanField implements OnInit, ControlValueAccessor, InputElement, ControlFieldAccessor, OnDestroy {
10
12
  private cd;
11
13
  private formGroupDir;
12
14
  private _onChangeCallback;
@@ -21,6 +23,8 @@ export declare class MatBooleanField implements OnInit, ControlValueAccessor, In
21
23
  yesRadioButton: MatRadioButton;
22
24
  noRadioButton: MatRadioButton;
23
25
  checkboxButton: MatCheckbox;
26
+ yesButtonRef: ElementRef;
27
+ noButtonRef: ElementRef;
24
28
  disabled: boolean;
25
29
  formControl: UntypedFormControl;
26
30
  formControlName: string;
@@ -49,9 +53,11 @@ export declare class MatBooleanField implements OnInit, ControlValueAccessor, In
49
53
  set value(v: any);
50
54
  get value(): any;
51
55
  keyupEnter: EventEmitter<any>;
52
- focused: EventEmitter<FocusEvent>;
56
+ focusedChanges: EventEmitter<FocusEvent>;
53
57
  blurred: EventEmitter<FocusEvent>;
54
58
  showTooltip: boolean;
59
+ get focused(): boolean;
60
+ get controlName(): string;
55
61
  constructor(cd: ChangeDetectorRef, formGroupDir: FormGroupDirective);
56
62
  ngOnInit(): void;
57
63
  ngOnDestroy(): void;
@@ -59,14 +65,15 @@ export declare class MatBooleanField implements OnInit, ControlValueAccessor, In
59
65
  registerOnChange(fn: any): void;
60
66
  registerOnTouched(fn: any): void;
61
67
  setDisabledState(isDisabled: boolean): void;
68
+ focus(opts?: FocusOptions, origin?: FocusOrigin): void;
62
69
  protected onFocusFakeInput(event: FocusEvent): void;
63
70
  protected onBlurInput(event: FocusEvent): void;
64
- focus(): void;
65
71
  protected onRadioValueChanged(event: MatRadioChange): void;
66
72
  protected onCheckboxValueChanged(event: MatCheckboxChange): void;
67
73
  toggleValue(event?: Event): void;
68
74
  private emitChange;
69
75
  private _checkIfTouched;
76
+ private _markAsBlurred;
70
77
  /**
71
78
  * Show/Hide the fake input
72
79
  */
@@ -79,8 +86,9 @@ export declare class MatBooleanField implements OnInit, ControlValueAccessor, In
79
86
  clearValue(event?: Event): void;
80
87
  protected get radioButtonElements(): HTMLElement[];
81
88
  protected get inputsElements(): HTMLElement[];
89
+ protected get buttonsElements(): HTMLElement[];
82
90
  static ɵfac: i0.ɵɵFactoryDeclaration<MatBooleanField, [null, { optional: true; }]>;
83
- static ɵcmp: i0.ɵɵComponentDeclaration<MatBooleanField, "mat-boolean-field", never, { "disabled": { "alias": "disabled"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "style": { "alias": "style"; "required": false; }; "buttonsColCount": { "alias": "buttonsColCount"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "yesLabel": { "alias": "yesLabel"; "required": false; }; "noLabel": { "alias": "noLabel"; "required": false; }; "showButtonIcons": { "alias": "showButtonIcons"; "required": false; }; "yesIcon": { "alias": "yesIcon"; "required": false; }; "noIcon": { "alias": "noIcon"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "showRadio": { "alias": "showRadio"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "keyupEnter": "keyup.enter"; "focused": "focus"; "blurred": "blur"; }, never, ["[matPrefix]", "[matSuffix]"], false, never>;
91
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatBooleanField, "mat-boolean-field", never, { "disabled": { "alias": "disabled"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "style": { "alias": "style"; "required": false; }; "buttonsColCount": { "alias": "buttonsColCount"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "yesLabel": { "alias": "yesLabel"; "required": false; }; "noLabel": { "alias": "noLabel"; "required": false; }; "showButtonIcons": { "alias": "showButtonIcons"; "required": false; }; "yesIcon": { "alias": "yesIcon"; "required": false; }; "noIcon": { "alias": "noIcon"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "showRadio": { "alias": "showRadio"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "keyupEnter": "keyup.enter"; "focusedChanges": "focus"; "blurred": "blur"; }, never, ["[matPrefix]", "[matSuffix]"], false, never>;
84
92
  static ngAcceptInputType_disabled: unknown;
85
93
  static ngAcceptInputType_readonly: unknown;
86
94
  static ngAcceptInputType_required: unknown;
@@ -5,11 +5,12 @@ import { Moment } from 'moment';
5
5
  import { InputElement } from '../../inputs';
6
6
  import { MatFormFieldAppearance, MatFormFieldDefaultOptions, SubscriptSizing } from '@angular/material/form-field';
7
7
  import { DateFilterFn, MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';
8
+ import { ControlFieldAccessor, TextControlFieldAccessor } from '../../field-accessor';
8
9
  import { MomentDateAdapter } from '@angular/material-moment-adapter';
9
10
  import { MaskitoOptions } from '@maskito/core';
10
11
  import { AppFloatLabelType } from '../../types';
11
12
  import * as i0 from "@angular/core";
12
- export declare class MatDate implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, InputElement {
13
+ export declare class MatDate implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, InputElement, ControlFieldAccessor, TextControlFieldAccessor {
13
14
  private dateAdapter;
14
15
  private translate;
15
16
  private formBuilder;
@@ -53,6 +54,8 @@ export declare class MatDate implements OnInit, AfterViewInit, OnDestroy, Contro
53
54
  get tabindex(): number;
54
55
  get value(): any;
55
56
  get disabled(): boolean;
57
+ get focused(): boolean;
58
+ get controlName(): string;
56
59
  datePicker: MatDatepicker<Moment>;
57
60
  _matInput: ElementRef;
58
61
  constructor(dateAdapter: MomentDateAdapter, translate: TranslateService, formBuilder: UntypedFormBuilder, cd: ChangeDetectorRef, formGroupDir: FormGroupDirective, defaultOptions?: MatFormFieldDefaultOptions);
@@ -65,7 +68,8 @@ export declare class MatDate implements OnInit, AfterViewInit, OnDestroy, Contro
65
68
  setDisabledState(isDisabled: boolean): void;
66
69
  openDatePicker(event?: Event): void;
67
70
  focus(): void;
68
- clear(event: Event): void;
71
+ typeText(text: string): void;
72
+ clearValue(event?: Event): void;
69
73
  protected _onDatePickerChange(event: MatDatepickerInputEvent<Moment>): void;
70
74
  protected _openDatePickerIfMobile(event: Event): void;
71
75
  protected _onBlur(): void;
@@ -4,6 +4,7 @@ import { ControlValueAccessor, FormGroupDirective, UntypedFormBuilder, UntypedFo
4
4
  import { TranslateService } from '@ngx-translate/core';
5
5
  import { Moment } from 'moment';
6
6
  import { InputElement } from '../../inputs';
7
+ import { ControlFieldAccessor, TextControlFieldAccessor } from '../../field-accessor';
7
8
  import { DateFilterFn, MatDatepicker, MatDatepickerInputEvent } from '@angular/material/datepicker';
8
9
  import { MomentDateAdapter } from '@angular/material-moment-adapter';
9
10
  import { MaskitoOptions } from '@maskito/core';
@@ -13,7 +14,7 @@ declare interface NgxTimePicker {
13
14
  open(): any;
14
15
  close(): any;
15
16
  }
16
- export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, InputElement {
17
+ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, InputElement, ControlFieldAccessor, TextControlFieldAccessor {
17
18
  private dateAdapter;
18
19
  private translate;
19
20
  private formBuilder;
@@ -80,10 +81,12 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
80
81
  get tabindex(): number;
81
82
  get value(): any;
82
83
  get disabled(): boolean;
84
+ get focused(): boolean;
85
+ get controlName(): string;
83
86
  datePicker: MatDatepicker<Moment>;
84
87
  timePicker: NgxTimePicker;
85
88
  _matInputs: QueryList<ElementRef>;
86
- focused: EventEmitter<FocusEvent>;
89
+ focusedChanges: EventEmitter<FocusEvent>;
87
90
  blurred: EventEmitter<FocusEvent>;
88
91
  keydownEscape: EventEmitter<Event>;
89
92
  keyupEnter: EventEmitter<Event>;
@@ -99,7 +102,8 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
99
102
  openTimePicker(event?: Event, timePicker?: NgxTimePicker): void;
100
103
  private fixTimePickerPosition;
101
104
  focus(): void;
102
- clear(event?: Event): void;
105
+ typeText(text: string): void;
106
+ clearValue(event?: Event): void;
103
107
  protected _setFormControlName(controlName: string): void;
104
108
  protected _setFormControl(control: UntypedFormControl): void;
105
109
  protected _updateControlValidators(control: UntypedFormControl, required: boolean): void;
@@ -112,18 +116,30 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
112
116
  protected _onBlur(event: FocusEvent): void;
113
117
  protected _checkIfTouched(): void;
114
118
  protected _preventEvent(event?: Event): void;
119
+ protected hasValidValue(): boolean;
115
120
  private updateTranslations;
116
121
  private updateDisplayPattern;
117
122
  private updateDateMaskOptions;
118
123
  private updateTimeMaskOptions;
119
124
  private onFormChange;
125
+ private parseDateTime;
126
+ private parseDate;
127
+ private parseTime;
128
+ /**
129
+ * Cleans and formats a given date string by removing invalid characters and ensuring
130
+ * placeholders for empty month or year fields.
131
+ *
132
+ * @param {string} dateStr - The input date string that needs to be cleaned and formatted.
133
+ * @return {string | null} A cleaned and formatted date string, or null if the input is empty or invalid.
134
+ */
135
+ private cleanDateStr;
120
136
  private emitChange;
121
137
  private updateTabIndex;
122
138
  private markAsTouched;
123
139
  private markAsDirty;
124
140
  private markForCheck;
125
141
  static ɵfac: i0.ɵɵFactoryDeclaration<MatDateTime, [null, null, null, null, null, { optional: true; }, null]>;
126
- static ɵcmp: i0.ɵɵComponentDeclaration<MatDateTime, "mat-date-time-field", never, { "logPrefix": { "alias": "logPrefix"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "datePickerFilter": { "alias": "datePickerFilter"; "required": false; }; "allowNoTime": { "alias": "allowNoTime"; "required": false; }; "dottedMinutesInGap": { "alias": "dottedMinutesInGap"; "required": false; }; "timeHoursOnly": { "alias": "timeHoursOnly"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "style": { "alias": "style"; "required": false; }; "hourMinWidth": { "alias": "hourMinWidth"; "required": false; }; "hourMaxWidth": { "alias": "hourMaxWidth"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; }, { "focused": "focus"; "blurred": "blur"; "keydownEscape": "keydown.escape"; "keyupEnter": "keyup.enter"; }, never, ["[matPrefix]", "[matSuffix]", "mat-error,[matError]", "mat-hint:not([align='end']),[matHint]", "mat-hint[align='end']"], false, never>;
142
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatDateTime, "mat-date-time-field", never, { "logPrefix": { "alias": "logPrefix"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "datePickerFilter": { "alias": "datePickerFilter"; "required": false; }; "allowNoTime": { "alias": "allowNoTime"; "required": false; }; "dottedMinutesInGap": { "alias": "dottedMinutesInGap"; "required": false; }; "timeHoursOnly": { "alias": "timeHoursOnly"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "style": { "alias": "style"; "required": false; }; "hourMinWidth": { "alias": "hourMinWidth"; "required": false; }; "hourMaxWidth": { "alias": "hourMaxWidth"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; }, { "focusedChanges": "focus"; "blurred": "blur"; "keydownEscape": "keydown.escape"; "keyupEnter": "keyup.enter"; }, never, ["[matPrefix]", "[matSuffix]", "mat-error,[matError]", "mat-hint:not([align='end']),[matHint]", "mat-hint[align='end']"], false, never>;
127
143
  static ngAcceptInputType_mobile: unknown;
128
144
  static ngAcceptInputType_compact: unknown;
129
145
  static ngAcceptInputType_autofocus: unknown;
@@ -11,8 +11,10 @@ import * as i9 from "@angular/material-moment-adapter";
11
11
  import * as i10 from "@ngx-translate/core";
12
12
  import * as i11 from "@maskito/angular";
13
13
  import * as i12 from "../../directives/directives.module";
14
+ import * as i13 from "@angular/material/icon";
15
+ import * as i14 from "@angular/material/tooltip";
14
16
  export declare class SharedMatDurationModule {
15
17
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedMatDurationModule, never>;
16
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedMatDurationModule, [typeof i1.MatDuration], [typeof i2.CommonModule, typeof i3.IonicModule, typeof i4.ReactiveFormsModule, typeof i5.SharedPipesModule, typeof i6.MatCommonModule, typeof i7.MatFormFieldModule, typeof i8.MatInputModule, typeof i6.MatRippleModule, typeof i9.MatMomentDateModule, typeof i10.TranslateModule, typeof i11.MaskitoDirective, typeof i12.SharedDirectivesModule], [typeof i1.MatDuration]>;
18
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedMatDurationModule, [typeof i1.MatDuration], [typeof i2.CommonModule, typeof i3.IonicModule, typeof i4.ReactiveFormsModule, typeof i5.SharedPipesModule, typeof i6.MatCommonModule, typeof i7.MatFormFieldModule, typeof i8.MatInputModule, typeof i6.MatRippleModule, typeof i9.MatMomentDateModule, typeof i10.TranslateModule, typeof i11.MaskitoDirective, typeof i12.SharedDirectivesModule, typeof i13.MatIcon, typeof i14.MatTooltip], [typeof i1.MatDuration]>;
17
19
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedMatDurationModule>;
18
20
  }
@@ -1,16 +1,12 @@
1
1
  import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, QueryList } from '@angular/core';
2
- import { Platform } from '@ionic/angular';
3
- import { DateAdapter } from '@angular/material/core';
4
2
  import { ControlValueAccessor, FormGroupDirective, UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
5
3
  import { TranslateService } from '@ngx-translate/core';
6
- import { Moment } from 'moment';
7
4
  import { InputElement } from '../../inputs';
5
+ import { ControlFieldAccessor, TextControlFieldAccessor } from '../../field-accessor';
8
6
  import { MatFormFieldAppearance } from '@angular/material/form-field';
9
7
  import { AppFloatLabelType } from '../../types';
10
8
  import * as i0 from "@angular/core";
11
- export declare class MatDuration implements OnInit, OnDestroy, ControlValueAccessor, InputElement {
12
- private dateAdapter;
13
- private translate;
9
+ export declare class MatDuration implements OnInit, OnDestroy, ControlValueAccessor, InputElement, ControlFieldAccessor, TextControlFieldAccessor {
14
10
  private formBuilder;
15
11
  private cd;
16
12
  private formGroupDir;
@@ -21,9 +17,11 @@ export declare class MatDuration implements OnInit, OnDestroy, ControlValueAcces
21
17
  private disabling;
22
18
  private _tabindex;
23
19
  private _value;
24
- textControl: UntypedFormControl;
25
- maskitoPlaceholder: string;
26
- readonly durationMask: (string | RegExp)[];
20
+ protected readonly durationMask: (string | RegExp)[];
21
+ protected dayUnit: string;
22
+ protected textControl: UntypedFormControl;
23
+ protected maskitoPlaceholder: string;
24
+ protected showTooltip: boolean;
27
25
  disabled: boolean;
28
26
  formControl: UntypedFormControl;
29
27
  formControlName: string;
@@ -35,16 +33,19 @@ export declare class MatDuration implements OnInit, OnDestroy, ControlValueAcces
35
33
  compact: boolean;
36
34
  maxDecimals: number;
37
35
  placeholderChar: string;
36
+ clearButtonTitle: string;
38
37
  set tabindex(value: number);
39
38
  get tabindex(): number;
40
39
  clearable: boolean;
41
40
  matInputs: QueryList<ElementRef>;
42
41
  get value(): any;
43
- protected dayUnit: string;
44
- constructor(platform: Platform, dateAdapter: DateAdapter<Moment>, translate: TranslateService, formBuilder: UntypedFormBuilder, cd: ChangeDetectorRef, formGroupDir: FormGroupDirective);
42
+ get focused(): any;
43
+ get controlName(): string;
44
+ constructor(translate: TranslateService, formBuilder: UntypedFormBuilder, cd: ChangeDetectorRef, formGroupDir: FormGroupDirective);
45
45
  ngOnInit(): void;
46
46
  ngOnDestroy(): void;
47
47
  writeValue(obj: any): void;
48
+ clearValue(event?: Event): void;
48
49
  registerOnChange(fn: any): void;
49
50
  registerOnTouched(fn: any): void;
50
51
  setDisabledState(isDisabled: boolean): void;
@@ -52,11 +53,12 @@ export declare class MatDuration implements OnInit, OnDestroy, ControlValueAcces
52
53
  checkIfTouched(): void;
53
54
  preventEvent(event: Event): void;
54
55
  focus(): void;
56
+ typeText(text: string): void;
55
57
  moveCaretToSeparator(event: any, forward: boolean): boolean;
56
58
  protected updateTabIndex(): void;
57
59
  protected markForCheck(): void;
58
- static ɵfac: i0.ɵɵFactoryDeclaration<MatDuration, [null, null, null, null, null, { optional: true; }]>;
59
- static ɵcmp: i0.ɵɵComponentDeclaration<MatDuration, "mat-duration-field", never, { "disabled": { "alias": "disabled"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "maxDecimals": { "alias": "maxDecimals"; "required": false; }; "placeholderChar": { "alias": "placeholderChar"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; }, {}, never, ["[matPrefix]", "mat-error"], false, never>;
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatDuration, [null, null, null, { optional: true; }]>;
61
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatDuration, "mat-duration-field", never, { "disabled": { "alias": "disabled"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "maxDecimals": { "alias": "maxDecimals"; "required": false; }; "placeholderChar": { "alias": "placeholderChar"; "required": false; }; "clearButtonTitle": { "alias": "clearButtonTitle"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; }, {}, never, ["[matPrefix]", "mat-error"], false, never>;
60
62
  static ngAcceptInputType_disabled: unknown;
61
63
  static ngAcceptInputType_readonly: unknown;
62
64
  static ngAcceptInputType_required: unknown;
@@ -4,6 +4,7 @@ import { LatLongPattern, LatLongSign, LatLongType } from './latlong.utils';
4
4
  import { MaskitoOptions } from '@maskito/core';
5
5
  import { MatFormField, MatFormFieldControl } from '@angular/material/form-field';
6
6
  import { Subject } from 'rxjs';
7
+ import { FocusOrigin } from '@angular/cdk/a11y';
7
8
  import * as i0 from "@angular/core";
8
9
  export declare class MatLatLongFieldInput implements MatFormFieldControl<number>, ControlValueAccessor, OnInit, OnDestroy {
9
10
  private _elementRef;
@@ -69,9 +70,10 @@ export declare class MatLatLongFieldInput implements MatFormFieldControl<number>
69
70
  constructor(_elementRef: ElementRef<HTMLElement>, _formField: MatFormField, ngControl: NgControl);
70
71
  ngOnInit(): void;
71
72
  ngOnDestroy(): void;
72
- onFocusIn(event: FocusEvent): void;
73
- onFocusOut(event: FocusEvent): void;
74
- updatePattern(pattern: LatLongPattern): void;
73
+ focus(options?: FocusOptions, origin?: FocusOrigin): void;
74
+ protected onFocusIn(event: FocusEvent): void;
75
+ protected onFocusOut(event: FocusEvent): void;
76
+ private updatePattern;
75
77
  protected updateFormGroup(value: number | null): void;
76
78
  handleInput(controlName: string, nextControlName?: string): void;
77
79
  autoFocusNext(controlName: string, nextControlName?: string): void;
@@ -4,8 +4,10 @@ import { MatFormFieldAppearance, MatFormFieldDefaultOptions, SubscriptSizing } f
4
4
  import { LatLongPattern, LatLongSign, LatLongType } from './latlong.utils';
5
5
  import { MatLatLongFieldInput } from './material.latlong-input';
6
6
  import { AppFloatLabelType } from '../../types';
7
+ import { ControlFieldAccessor } from '../../field-accessor';
8
+ import { FocusOrigin } from '@angular/cdk/a11y';
7
9
  import * as i0 from "@angular/core";
8
- export declare class MatLatLongField implements ControlValueAccessor, OnInit, AfterViewInit, OnDestroy {
10
+ export declare class MatLatLongField implements ControlValueAccessor, OnInit, AfterViewInit, OnDestroy, ControlFieldAccessor {
9
11
  private cd;
10
12
  private formGroupDir;
11
13
  private _subscription;
@@ -64,6 +66,7 @@ export declare class MatLatLongField implements ControlValueAccessor, OnInit, Af
64
66
  set subscriptSizing(value: SubscriptSizing);
65
67
  get subscriptSizing(): SubscriptSizing;
66
68
  get disabled(): any;
69
+ get focused(): boolean;
67
70
  input: MatLatLongFieldInput;
68
71
  pendingValue: any;
69
72
  pendingValueSet: boolean;
@@ -78,6 +81,7 @@ export declare class MatLatLongField implements ControlValueAccessor, OnInit, Af
78
81
  ngOnInit(): void;
79
82
  ngAfterViewInit(): void;
80
83
  ngOnDestroy(): void;
84
+ focus(options?: FocusOptions, origin?: FocusOrigin): void;
81
85
  clearValue(event?: Event): void;
82
86
  private markForCheck;
83
87
  static ɵfac: i0.ɵɵFactoryDeclaration<MatLatLongField, [null, { optional: true; }, null]>;