@sumaris-net/ngx-components 2.8.3 → 2.8.5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sumaris-net/ngx-components",
3
3
  "description": "SUMARiS Angular components",
4
- "version": "2.8.3",
4
+ "version": "2.8.5",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -12,8 +12,10 @@ import * as i10 from "@angular/material/checkbox";
12
12
  import * as i11 from "ngx-material-timepicker";
13
13
  import * as i12 from "@ngx-translate/core";
14
14
  import * as i13 from "../../directives/directives.module";
15
+ import * as i14 from "@angular/material/icon";
16
+ import * as i15 from "@angular/material/button";
15
17
  export declare class SharedMatBooleanModule {
16
18
  static ɵfac: i0.ɵɵFactoryDeclaration<SharedMatBooleanModule, never>;
17
- static ɵmod: i0.ɵɵNgModuleDeclaration<SharedMatBooleanModule, [typeof i1.MatBooleanField], [typeof i2.CommonModule, typeof i3.IonicModule, typeof i4.ReactiveFormsModule, typeof i5.SharedPipesModule, typeof i6.MatCommonModule, typeof i7.MatFormFieldModule, typeof i8.MatInputModule, typeof i9.MatRadioModule, typeof i10.MatCheckboxModule, typeof i11.NgxMaterialTimepickerModule, typeof i12.TranslateModule, typeof i13.SharedDirectivesModule], [typeof i1.MatBooleanField]>;
19
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SharedMatBooleanModule, [typeof i1.MatBooleanField], [typeof i2.CommonModule, typeof i3.IonicModule, typeof i4.ReactiveFormsModule, typeof i5.SharedPipesModule, typeof i6.MatCommonModule, typeof i7.MatFormFieldModule, typeof i8.MatInputModule, typeof i9.MatRadioModule, typeof i10.MatCheckboxModule, typeof i11.NgxMaterialTimepickerModule, typeof i12.TranslateModule, typeof i13.SharedDirectivesModule, typeof i14.MatIcon, typeof i15.MatIconButton], [typeof i1.MatBooleanField]>;
18
20
  static ɵinj: i0.ɵɵInjectorDeclaration<SharedMatBooleanModule>;
19
21
  }
@@ -1,14 +1,23 @@
1
- import { ChangeDetectorRef, ElementRef, EventEmitter, OnInit } from '@angular/core';
1
+ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
2
  import { MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-field';
3
3
  import { ControlValueAccessor, FormGroupDirective, UntypedFormControl } from '@angular/forms';
4
- import { MatRadioButton, MatRadioChange } from '@angular/material/radio';
4
+ import { MatRadioButton, MatRadioChange, MatRadioGroup } from '@angular/material/radio';
5
5
  import { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';
6
6
  import { InputElement } from '../../inputs';
7
7
  import { AppFloatLabelType } from '../../form/field.model';
8
8
  import * as i0 from "@angular/core";
9
- export declare class MatBooleanField implements OnInit, ControlValueAccessor, InputElement {
9
+ export declare class MatBooleanField implements OnInit, ControlValueAccessor, InputElement, OnDestroy {
10
10
  private cd;
11
+ protected el: ElementRef<HTMLElement>;
11
12
  private formGroupDir;
13
+ private _onChangeCallback;
14
+ private _onTouchedCallback;
15
+ private _writing;
16
+ protected _value: boolean;
17
+ protected _tabindex: number;
18
+ protected _showRadio: boolean;
19
+ protected _focused: boolean;
20
+ radioGroup: MatRadioGroup;
12
21
  yesButton: MatRadioButton;
13
22
  noButton: MatRadioButton;
14
23
  checkboxButton: MatCheckbox;
@@ -31,20 +40,19 @@ export declare class MatBooleanField implements OnInit, ControlValueAccessor, In
31
40
  showButtonIcons: boolean;
32
41
  yesIcon: string;
33
42
  noIcon: string;
34
- showRadio: boolean;
35
- onPressEnter: EventEmitter<any>;
36
- onBlur: EventEmitter<FocusEvent>;
37
- protected _value: boolean;
38
- protected _tabindex: number;
39
- private _onChangeCallback;
40
- private _onTouchedCallback;
41
- private _writing;
42
- constructor(cd: ChangeDetectorRef, formGroupDir: FormGroupDirective);
43
- get tabindex(): number;
43
+ clearable: boolean;
44
+ labelPosition: 'after' | 'before';
44
45
  set tabindex(value: number);
45
- get value(): any;
46
+ get tabindex(): number;
47
+ set showRadio(v: any);
48
+ get showRadio(): any;
46
49
  set value(v: any);
50
+ get value(): any;
51
+ keyupEnter: EventEmitter<any>;
52
+ blurred: EventEmitter<FocusEvent>;
53
+ constructor(cd: ChangeDetectorRef, el: ElementRef<HTMLElement>, formGroupDir: FormGroupDirective);
47
54
  ngOnInit(): void;
55
+ ngOnDestroy(): void;
48
56
  writeValue(value: any, event?: Event): void;
49
57
  registerOnChange(fn: any): void;
50
58
  registerOnTouched(fn: any): void;
@@ -54,11 +62,17 @@ export declare class MatBooleanField implements OnInit, ControlValueAccessor, In
54
62
  onRadioValueChanged(event: MatRadioChange): void;
55
63
  onCheckboxValueChanged(event: MatCheckboxChange): void;
56
64
  private checkIfTouched;
65
+ /**
66
+ * Show/Hide the fake input
67
+ */
68
+ private updateFakeInput;
57
69
  /**
58
70
  * This is a special case, because, this component has a temporary component displayed before the first focus event
59
71
  */
60
72
  private updateTabIndex;
61
73
  private markForCheck;
62
- static ɵfac: i0.ɵɵFactoryDeclaration<MatBooleanField, [null, { optional: true; }]>;
63
- 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; }; "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; }; "showRadio": { "alias": "showRadio"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "onPressEnter": "keyup.enter"; "onBlur": "onBlur"; }, never, ["[matPrefix]", "[matSuffix]"], false, never>;
74
+ clear(event?: Event): void;
75
+ protected onBlur(event?: FocusEvent): void;
76
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatBooleanField, [null, null, { optional: true; }]>;
77
+ 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; }; "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"; "blurred": "blur"; }, never, ["[matPrefix]", "[matSuffix]"], false, never>;
64
78
  }
@@ -16,6 +16,7 @@ export declare class BooleanTestPage extends AppForm<any> implements OnInit, Aft
16
16
  ngAfterViewInit(): void;
17
17
  toggleMode(value: any): void;
18
18
  protected markForCheck(): void;
19
+ protected clearControlValue(path: string, event?: Event): void;
19
20
  static ɵfac: i0.ɵɵFactoryDeclaration<BooleanTestPage, never>;
20
21
  static ɵcmp: i0.ɵɵComponentDeclaration<BooleanTestPage, "app-boolean-test-page", never, {}, {}, never, never, false, never>;
21
22
  }
@@ -2,7 +2,7 @@
2
2
  "name": "ngx-sumaris-components",
3
3
  "short_name": "ngx-sumaris-components",
4
4
  "manifest_version": 1,
5
- "version": "2.8.3",
5
+ "version": "2.8.5",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{