@sumaris-net/ngx-components 2.7.3-rc5 → 2.7.3-rc50

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 (45) hide show
  1. package/esm2022/src/app/admin/users/users.mjs +2 -2
  2. package/esm2022/src/app/core/account/account.page.mjs +1 -1
  3. package/esm2022/src/app/core/form/properties/properties.form.mjs +1 -1
  4. package/esm2022/src/app/core/form/properties/properties.table.mjs +1 -1
  5. package/esm2022/src/app/core/register/register.form.mjs +1 -1
  6. package/esm2022/src/app/core/services/config/core.config.mjs +7 -1
  7. package/esm2022/src/app/core/settings/settings.page.mjs +1 -1
  8. package/esm2022/src/app/core/table/testing/table-validator.service.mjs +4 -1
  9. package/esm2022/src/app/core/table/testing/table.testing.mjs +39 -20
  10. package/esm2022/src/app/shared/form/field.component.mjs +10 -7
  11. package/esm2022/src/app/shared/material/autocomplete/material.autocomplete.mjs +8 -5
  12. package/esm2022/src/app/shared/material/autocomplete/testing/autocomplete.test.mjs +3 -3
  13. package/esm2022/src/app/shared/material/boolean/material.boolean.mjs +3 -3
  14. package/esm2022/src/app/shared/material/boolean/testing/boolean.test.page.mjs +3 -2
  15. package/esm2022/src/app/shared/material/chips/material.chips.mjs +3 -3
  16. package/esm2022/src/app/shared/material/datetime/material.date.mjs +10 -3
  17. package/esm2022/src/app/shared/material/datetime/material.datetime.mjs +70 -41
  18. package/esm2022/src/app/shared/material/datetime/testing/mat-date-time.test.mjs +7 -6
  19. package/esm2022/src/app/shared/material/latlong/material.latlong.mjs +16 -11
  20. package/esm2022/src/app/shared/material/latlong/testing/latlong.test.mjs +7 -3
  21. package/esm2022/src/app/shared/material/material.config.mjs +2 -1
  22. package/esm2022/src/app/shared/material/testing/common.test.mjs +14 -9
  23. package/esm2022/src/app/shared/pipes/maskito.pipe.mjs +37 -16
  24. package/fesm2022/sumaris-net.ngx-components.mjs +247 -143
  25. package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
  26. package/package.json +1 -1
  27. package/src/app/core/services/config/core.config.d.ts +1 -0
  28. package/src/app/shared/form/field.component.d.ts +5 -3
  29. package/src/app/shared/material/autocomplete/material.autocomplete.d.ts +1 -0
  30. package/src/app/shared/material/datetime/material.date.d.ts +1 -0
  31. package/src/app/shared/material/datetime/material.datetime.d.ts +25 -22
  32. package/src/app/shared/material/datetime/testing/mat-date-time.test.d.ts +2 -2
  33. package/src/app/shared/material/latlong/material.latlong.d.ts +5 -3
  34. package/src/app/shared/material/latlong/testing/latlong.test.d.ts +4 -0
  35. package/src/app/shared/material/material.config.d.ts +2 -1
  36. package/src/assets/manifest.json +1 -1
  37. package/src/theme/_material.globals.scss +0 -36
  38. package/src/theme/_material.scss +34 -8
  39. package/src/theme/_mixins.scss +6 -4
  40. package/src/theme/_ngx-components.forms.scss +201 -0
  41. package/src/theme/_ngx-components.globals.scss +7 -4
  42. package/src/theme/_ngx-components.scss +11 -203
  43. package/src/theme/_ngx-components.table.scss +104 -134
  44. package/src/theme/_ngx-components.tabs.scss +0 -324
  45. package/src/theme/_theme.scss +1 -0
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.7.3-rc5",
4
+ "version": "2.7.3-rc50",
5
5
  "author": "contact@e-is.pro",
6
6
  "license": "AGPL-3.0",
7
7
  "readmeFilename": "README.md",
@@ -24,6 +24,7 @@ export declare const CORE_CONFIG_OPTIONS: Readonly<{
24
24
  COLOR_WARNING: FormFieldDefinition<string, import("../../../shared/form/field.model").FormFieldType, any>;
25
25
  COLOR_ACCENT: FormFieldDefinition<string, import("../../../shared/form/field.model").FormFieldType, any>;
26
26
  COLOR_DANGER: FormFieldDefinition<string, import("../../../shared/form/field.model").FormFieldType, any>;
27
+ FORM_FIELD_BACKGROUND_COLOR: FormFieldDefinition<string, import("../../../shared/form/field.model").FormFieldType, any>;
27
28
  ANDROID_INSTALL_URL: FormFieldDefinition<string, import("../../../shared/form/field.model").FormFieldType, any>;
28
29
  DB_TIMEZONE: FormFieldDefinition<string, import("../../../shared/form/field.model").FormFieldType, any>;
29
30
  ACCOUNT_READONLY: FormFieldDefinition<string, import("../../../shared/form/field.model").FormFieldType, any>;
@@ -1,12 +1,13 @@
1
1
  import { ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, Injector, OnInit } from '@angular/core';
2
2
  import { ControlValueAccessor, FormGroupDirective, UntypedFormControl } from '@angular/forms';
3
- import { DisplayFn, FormFieldDefinition, FormFieldType, AppFloatLabelType } from './field.model';
3
+ import { AppFloatLabelType, DisplayFn, FormFieldDefinition, FormFieldType } from './field.model';
4
4
  import { TranslateService } from '@ngx-translate/core';
5
5
  import { filterNumberInput, selectInputContent } from '../inputs';
6
6
  import { Property } from '../types';
7
7
  import { ThemePalette } from '@angular/material/core';
8
8
  import { PredefinedColors } from '@ionic/core';
9
9
  import { MatAutocompleteField } from '../material/autocomplete/material.autocomplete';
10
+ import { MatFormFieldAppearance } from '@angular/material/form-field';
10
11
  import * as i0 from "@angular/core";
11
12
  export declare class AppFormField implements OnInit, ControlValueAccessor {
12
13
  protected translate: TranslateService;
@@ -29,12 +30,13 @@ export declare class AppFormField implements OnInit, ControlValueAccessor {
29
30
  placeholder: string;
30
31
  compact: boolean;
31
32
  floatLabel: AppFloatLabelType;
33
+ appearance: MatFormFieldAppearance;
32
34
  tabindex: number;
33
35
  autofocus: boolean;
34
36
  clearable: boolean;
35
37
  chipColor: ThemePalette | PredefinedColors;
36
- debug: boolean;
37
38
  classList: string;
39
+ debug: boolean;
38
40
  onKeyupEnter: EventEmitter<any>;
39
41
  get value(): any;
40
42
  matInput: ElementRef;
@@ -67,5 +69,5 @@ export declare class AppFormField implements OnInit, ControlValueAccessor {
67
69
  }): void;
68
70
  protected updateTabIndex(timeout?: number): void;
69
71
  static ɵfac: i0.ɵɵFactoryDeclaration<AppFormField, [null, null, null, { optional: true; }]>;
70
- static ɵcmp: i0.ɵɵComponentDeclaration<AppFormField, "app-form-field", never, { "definition": { "alias": "definition"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "chipColor": { "alias": "chipColor"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "classList": { "alias": "class"; "required": false; }; }, { "onKeyupEnter": "keyup.enter"; }, never, ["[matSuffix]", "[matSuffix]", "[matSuffix]", "[matSuffix]", "[matSuffix]", "[matSuffix]", "[matPrefix]", "[matSuffix]", "[matSuffix]", "[matPrefix]", "[matSuffix]", "[matPrefix]", "[matSuffix]", "[matSuffix]"], false, never>;
72
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppFormField, "app-form-field", never, { "definition": { "alias": "definition"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "chipColor": { "alias": "chipColor"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; }, { "onKeyupEnter": "keyup.enter"; }, never, ["[matSuffix]", "[matSuffix]", "[matSuffix]", "[matSuffix]", "[matSuffix]", "[matSuffix]", "[matPrefix]", "[matSuffix]", "[matSuffix]", "[matPrefix]", "[matSuffix]", "[matPrefix]", "[matSuffix]", "[matSuffix]"], false, never>;
71
73
  }
@@ -112,6 +112,7 @@ export declare class MatAutocompleteField implements OnInit, AfterViewInit, OnDe
112
112
  filterInputTextFocusEvent(event: FocusEvent): boolean;
113
113
  protected filterInputTextBlurEvent(event: FocusEvent): void;
114
114
  protected ionSearchBarChanged(event: Event): void;
115
+ ionSearchBarChanged1(event: any): void;
115
116
  filterMatSelectFocusEvent(event: FocusEvent): void;
116
117
  filterMatSelectBlurEvent(event: FocusEvent): boolean;
117
118
  clearValue(event?: Event): void;
@@ -61,6 +61,7 @@ export declare class MatDate implements OnInit, AfterViewInit, OnDestroy, Contro
61
61
  clear(): void;
62
62
  protected _onDatePickerChange(event: MatDatepickerInputEvent<Moment>): void;
63
63
  protected _openDatePickerIfMobile(event: Event): void;
64
+ protected _onBlur(): void;
64
65
  protected _checkIfTouched(opts?: {
65
66
  emitEvent?: boolean;
66
67
  }): void;
@@ -36,35 +36,38 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
36
36
  private _formControl;
37
37
  private _controlName;
38
38
  private _required;
39
+ private _appearance;
39
40
  private _subscriptSizing;
41
+ private readonly _defaultAppearance;
40
42
  private readonly _defaultSubscriptSizing;
41
- dateControl: UntypedFormControl;
42
- timeControl: UntypedFormControl;
43
- displayPattern: string;
44
- datePattern: string;
45
- timePattern: string;
46
- locale: string;
47
- maskitoDateOptions: MaskitoOptions;
48
- maskitoTimeOptions: MaskitoOptions;
49
- datePlaceholder: string;
50
- timePlaceholder: string;
51
- set subscriptSizing(value: SubscriptSizing);
52
- get subscriptSizing(): SubscriptSizing;
53
- set formControl(value: UntypedFormControl);
54
- get formControl(): UntypedFormControl;
55
- set formControlName(value: string);
56
- get formControlName(): string;
57
- set required(value: boolean | any);
58
- get required(): boolean | any;
43
+ protected dateControl: UntypedFormControl;
44
+ protected timeControl: UntypedFormControl;
45
+ protected displayPattern: string;
46
+ protected datePattern: string;
47
+ protected timePattern: string;
48
+ protected locale: string;
49
+ protected maskitoDateOptions: MaskitoOptions;
50
+ protected maskitoTimeOptions: MaskitoOptions;
51
+ protected datePlaceholder: string;
52
+ protected timePlaceholder: string;
59
53
  placeholder: string;
60
54
  floatLabel: AppFloatLabelType;
61
- appearance: MatFormFieldAppearance;
62
55
  mobile: boolean;
63
56
  compact: boolean;
64
57
  autofocus: boolean;
65
58
  startDate: Moment | null;
66
59
  clearable: boolean;
67
60
  datePickerFilter: DateFilterFn<Moment>;
61
+ set appearance(value: MatFormFieldAppearance);
62
+ get appearance(): MatFormFieldAppearance;
63
+ set subscriptSizing(value: SubscriptSizing);
64
+ get subscriptSizing(): SubscriptSizing;
65
+ set formControl(value: UntypedFormControl);
66
+ get formControl(): UntypedFormControl;
67
+ set formControlName(value: string);
68
+ get formControlName(): string;
69
+ set required(value: boolean | any);
70
+ get required(): boolean | any;
68
71
  set readonly(value: boolean);
69
72
  get readonly(): boolean;
70
73
  set tabindex(value: number);
@@ -77,7 +80,6 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
77
80
  matError: MatError;
78
81
  constructor(dateAdapter: MomentDateAdapter, translate: TranslateService, formBuilder: UntypedFormBuilder, cd: ChangeDetectorRef, formGroupDir: FormGroupDirective, defaultOptions?: MatFormFieldDefaultOptions);
79
82
  ngOnInit(): void;
80
- _getDisplayedMessages(): 'error' | 'hint';
81
83
  ngAfterViewInit(): void;
82
84
  ngOnDestroy(): void;
83
85
  writeValue(value: any): void;
@@ -95,9 +97,10 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
95
97
  protected _onTimePickerChange(timeStr: string): void;
96
98
  protected _openDatePickerIfMobile(event?: Event, datePicker?: MatDatepicker<any>): void;
97
99
  protected _openTimePickerIfMobile(event?: Event): void;
100
+ protected _onBlur(): void;
98
101
  protected _checkIfTouched(): void;
99
102
  protected _preventEvent(event?: Event): void;
100
- private updatePattern;
103
+ private updateTranslations;
101
104
  private onFormChange;
102
105
  private emitChange;
103
106
  private updateTabIndex;
@@ -107,6 +110,6 @@ export declare class MatDateTime implements OnInit, AfterViewInit, OnDestroy, Co
107
110
  private updateDateMaskOptions;
108
111
  private updateTimeMaskOptions;
109
112
  static ɵfac: i0.ɵɵFactoryDeclaration<MatDateTime, [null, null, null, null, { optional: true; }, null]>;
110
- static ɵcmp: i0.ɵɵComponentDeclaration<MatDateTime, "mat-date-time-field", never, { "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "required": { "alias": "required"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "mobile": { "alias": "mobile"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "startDate": { "alias": "startDate"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "datePickerFilter": { "alias": "datePickerFilter"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; }, {}, ["matError"], ["mat-error", "mat-hint", "[matPrefix]"], false, never>;
113
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatDateTime, "mat-date-time-field", never, { "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; }; "startDate": { "alias": "startDate"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "datePickerFilter": { "alias": "datePickerFilter"; "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; }; }, {}, ["matError"], ["mat-error", "mat-hint:not([align='end'])", "mat-hint[align='end']", "[matPrefix]"], false, never>;
111
114
  }
112
115
  export {};
@@ -16,12 +16,12 @@ export declare class DateTimeTestPage implements OnInit {
16
16
  memoryTimer: Subscription;
17
17
  form: UntypedFormGroup;
18
18
  mode: 'mobile' | 'desktop' | 'memory' | 'temp';
19
- mobileApparence: MatFormFieldAppearance;
19
+ appearance: MatFormFieldAppearance;
20
20
  noTimeProperty: string;
21
21
  constructor(platform: Platform, formBuilder: UntypedFormBuilder, cd: ChangeDetectorRef);
22
22
  ngOnInit(): void;
23
23
  toggleMode(value: any): void;
24
- toggleMobileApparence(event: MatCheckboxChange): void;
24
+ toggleAppearance(event: MatCheckboxChange): void;
25
25
  loadData(): Promise<void>;
26
26
  doSubmit(event: any): void;
27
27
  log(message: string): void;
@@ -15,7 +15,9 @@ export declare class MatLatLongField implements OnInit, OnDestroy, ControlValueA
15
15
  private _formatOptions;
16
16
  private _disabling;
17
17
  private _writing;
18
+ private _appearance;
18
19
  private _subscriptSizing;
20
+ private readonly _defaultAppearance;
19
21
  private readonly _defaultSubscriptSizing;
20
22
  _readonly: boolean;
21
23
  _formatFn: LatLongFormatFn;
@@ -31,13 +33,14 @@ export declare class MatLatLongField implements OnInit, OnDestroy, ControlValueA
31
33
  pattern: LatLongPattern;
32
34
  required: boolean;
33
35
  floatLabel: AppFloatLabelType;
34
- appearance: MatFormFieldAppearance;
35
36
  placeholder: string;
36
37
  tabindex: number;
37
38
  defaultSign: '-' | '+' | '+ ' | '- ';
38
39
  maxDecimals: number;
39
40
  placeholderChar: string;
40
41
  autofocus: boolean;
42
+ set appearance(value: MatFormFieldAppearance);
43
+ get appearance(): MatFormFieldAppearance;
41
44
  set readonly(value: boolean);
42
45
  get readonly(): boolean;
43
46
  set subscriptSizing(value: SubscriptSizing);
@@ -48,7 +51,6 @@ export declare class MatLatLongField implements OnInit, OnDestroy, ControlValueA
48
51
  matError: MatError;
49
52
  constructor(formBuilder: UntypedFormBuilder, cd: ChangeDetectorRef, formGroupDir: FormGroupDirective, defaultOptions?: MatFormFieldDefaultOptions);
50
53
  ngOnInit(): void;
51
- _getDisplayedMessages(): 'error' | 'hint';
52
54
  ngOnDestroy(): void;
53
55
  writeValue(obj: any): void;
54
56
  registerOnChange(fn: any): void;
@@ -69,5 +71,5 @@ export declare class MatLatLongField implements OnInit, OnDestroy, ControlValueA
69
71
  private checkIfTouched;
70
72
  private markForCheck;
71
73
  static ɵfac: i0.ɵɵFactoryDeclaration<MatLatLongField, [null, null, { optional: true; }, null]>;
72
- static ɵcmp: i0.ɵɵComponentDeclaration<MatLatLongField, "mat-latlong-field", never, { "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "type": { "alias": "type"; "required": false; }; "pattern": { "alias": "latLongPattern"; "required": false; }; "required": { "alias": "required"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "defaultSign": { "alias": "defaultSign"; "required": false; }; "maxDecimals": { "alias": "maxDecimals"; "required": false; }; "placeholderChar": { "alias": "placeholderChar"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; }, { "onBlur": "onBlur"; "onFocus": "onFocus"; }, ["matError"], ["mat-error", "mat-hint:not([align='end'])", "mat-hint[align='end']", "[matPrefix]", "[matSuffix]"], false, never>;
74
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatLatLongField, "mat-latlong-field", never, { "formControl": { "alias": "formControl"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "type": { "alias": "type"; "required": false; }; "pattern": { "alias": "latLongPattern"; "required": false; }; "required": { "alias": "required"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "defaultSign": { "alias": "defaultSign"; "required": false; }; "maxDecimals": { "alias": "maxDecimals"; "required": false; }; "placeholderChar": { "alias": "placeholderChar"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; }, { "onBlur": "onBlur"; "onFocus": "onFocus"; }, ["matError"], ["mat-error", "mat-hint:not([align='end'])", "mat-hint[align='end']", "[matPrefix]", "[matSuffix]"], false, never>;
73
75
  }
@@ -1,6 +1,8 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
3
3
  import { PlatformService } from '../../../../core/services/platform.service';
4
+ import { MatFormFieldAppearance } from '@angular/material/form-field';
5
+ import { MatCheckboxChange } from '@angular/material/checkbox';
4
6
  import * as i0 from "@angular/core";
5
7
  export declare class LatLongTestPage implements OnInit {
6
8
  protected formBuilder: UntypedFormBuilder;
@@ -8,12 +10,14 @@ export declare class LatLongTestPage implements OnInit {
8
10
  form: UntypedFormGroup;
9
11
  geoPositionMessage: string;
10
12
  mode: string;
13
+ appearance: MatFormFieldAppearance;
11
14
  constructor(formBuilder: UntypedFormBuilder, platform: PlatformService);
12
15
  ngOnInit(): void;
13
16
  toggleMode(value: any): void;
14
17
  loadData(): Promise<void>;
15
18
  doSubmit(event: any): void;
16
19
  geoPosition(event: Event, controlName?: string): Promise<void>;
20
+ toggleAppearance(event: MatCheckboxChange): void;
17
21
  stringify: {
18
22
  (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
19
23
  (value: any, replacer?: (string | number)[], space?: string | number): string;
@@ -1,2 +1,3 @@
1
- import { SubscriptSizing } from '@angular/material/form-field';
1
+ import { MatFormFieldAppearance, SubscriptSizing } from '@angular/material/form-field';
2
2
  export declare const MAT_FORM_FIELD_DEFAULT_SUBSCRIPT_SIZING: SubscriptSizing;
3
+ export declare const MAT_FORM_FIELD_DEFAULT_APPEARANCE: MatFormFieldAppearance;
@@ -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.7.3-rc5",
5
+ "version": "2.7.3-rc50",
6
6
  "default_locale": "fr",
7
7
  "description": "Angular components for building beautiful and responsive Apps",
8
8
  "icons": [{
@@ -2,7 +2,6 @@
2
2
  // Import material theme
3
3
  // --------------------------------------------------
4
4
  @use '@angular/material' as mat;
5
- @include mat.core();
6
5
 
7
6
  // Define the palettes for your theme using the Material Design palettes available in palette.scss
8
7
  // (imported above). For each palette, you can optionally specify a default, lighter, and darker
@@ -40,22 +39,6 @@ $mat-indigo-app: (
40
39
  A700: white
41
40
  )
42
41
  );
43
- //mat.$light-theme-background-palette: (
44
- // status-bar: map_get(mat.$grey-palette, 300),
45
- // app-bar: map_get(mat.$grey-palette, 100),
46
- // background: var(--background, map_get(mat.$grey-palette, 50)),
47
- // hover: rgba(black, 0.04), // TODO(kara): check style with Material Design UX
48
- // card: white,
49
- // dialog: white,
50
- // disabled-button: rgba(black, 0.12),
51
- // raised-button: white,
52
- // focused-button: rgba(black, 0.12),
53
- // selected-button: map_get(mat.$grey-palette, 300),
54
- // selected-disabled-button: map_get(mat.$grey-palette, 400),
55
- // disabled-button-toggle: map_get(mat.$grey-palette, 200),
56
- // unselected-chip: map_get(mat.$grey-palette, 300),
57
- // disabled-list-option: map_get(mat.$grey-palette, 200),
58
- //);
59
42
 
60
43
  // FIXME: Why loader toolbar is so dark ?
61
44
  $candy-app-primary: mat.define-palette($mat-indigo-app, 500, 100, 900);
@@ -75,28 +58,9 @@ $candy-app-theme: mat.define-light-theme((
75
58
 
76
59
  ));
77
60
 
78
- @include mat.all-component-themes($candy-app-theme);
79
-
80
-
81
61
  // --------------------------------------------------
82
62
  // Material theme
83
63
  // --------------------------------------------------
84
- //$primary: mat.define-palette(mat.$indigo-palette, 500);
85
- //$accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
86
- //$warn: mat.define-palette(mat.$red-palette);
87
- //
88
- //$theme: mat.define-light-theme((
89
- // color: (
90
- // primary: $primary,
91
- // accent: $accent,
92
- // warn: $warn,
93
- // ),
94
- // typography: mat.define-typography-config(),
95
- // density: 0,
96
- //));
97
- //@include mat.all-component-themes($theme);
98
-
99
-
100
64
 
101
65
  // Expose some variables
102
66
  $mat-tab-link-height: 48px !default;
@@ -1,3 +1,11 @@
1
+ @use '@angular/material' as mat;
2
+
3
+ // --------------------------------------------------
4
+ // Standard metrial style
5
+ // --------------------------------------------------
6
+ @include mat.core();
7
+ @include mat.all-component-themes($candy-app-theme);
8
+
1
9
  // --------------------------------------------------
2
10
  // Override material style
3
11
  // --------------------------------------------------
@@ -28,33 +36,51 @@
28
36
  }
29
37
 
30
38
  // Icon, Button
39
+ .mat-button.mat-primary,
31
40
  .mat-icon.mat-primary,
32
41
  .mat-icon-button.mat-primary,
33
- .mat-button.mat-primary,
42
+ .mat-mdc-button.mat-primary,
43
+ .mat-mdc-icon-button.mat-primary,
34
44
  .mat-stroked-button.mat-primary {
35
45
  color: var(--ion-color-tertiary, $tertiary);
36
46
  }
37
- .mat-icon.mat-secondary,
38
47
  .mat-button.mat-secondary,
48
+ .mat-icon.mat-secondary,
39
49
  .mat-icon-button.mat-secondary,
50
+ .mat-mdc-button.mat-secondary,
51
+ .mat-mdc-icon-button.mat-secondary,
40
52
  .mat-stroked-button.mat-secondary {
41
53
  color: var(--ion-color-secondary, $secondary);
42
54
  }
43
- .mat-icon.mat-accent,
44
55
  .mat-button.mat-accent,
56
+ .mat-icon.mat-accent,
45
57
  .mat-icon-button.mat-accent,
58
+ .mat-mdc-button.mat-accent,
59
+ .mat-mdc-icon-button.mat-accent,
46
60
  .mat-stroked-button.mat-accent {
47
- color: var(--ion-color-accent);
61
+ color: var(--ion-color-accent, $accent);
48
62
  }
49
63
  .mdc-button {
50
64
  --mdc-typography-button-letter-spacing: normal;
51
65
  --mdc-text-button-label-text-tracking: normal;
52
66
  }
53
-
54
- // Badge
55
- .mdc-tab .mat-badge-content {
56
- padding-left: 2px;
67
+ .mat-mdc-menu-item {
68
+ --mat-menu-item-label-text-tracking: normal;
69
+ --mat-menu-item-label-text-size: 14px;
70
+ --mat-menu-item-icon-color: #0000008a;
57
71
  }
72
+ .mat-mdc-option {
73
+ --mat-option-label-text-tracking: normal;
74
+ --mat-option-label-text-size: 16px;
75
+ }
76
+ .mat-mdc-select {
77
+ --mat-select-trigger-text-font: inherit;
78
+ --mat-select-trigger-text-tracking: normal;
79
+ --mat-select-trigger-text-size: inherit;
80
+ --mat-select-disabled-trigger-text-color: inherit;
81
+ --mat-select-trigger-text-line-height: inherit;
82
+ }
83
+
58
84
  .mat-badge-primary .mat-badge-content {
59
85
  background-color: var(--ion-color-tertiary);
60
86
  color: var(--ion-color-tertiary-contrast);
@@ -98,21 +98,23 @@
98
98
  --ion-grid-column-padding: #{$ion-grid-column-padding};
99
99
  --ion-padding: #{$ion-padding};
100
100
  --ion-margin: #{$ion-margin};
101
+ --ion-toolbar-height: #{$ion-toolbar-height};
101
102
 
102
103
  --expansion-panel-padding: var(--ion-padding);
103
104
  --expansion-panel-header-padding: var(--ion-padding);
104
105
 
105
106
  --mat-toolbar-height: #{$mat-toolbar-height-desktop};
106
107
  --mat-paginator-height: mat.$paginator-height;
107
- --ion-toolbar-height: #{$ion-toolbar-height};
108
+ --mat-tab-link-height: #{$mat-tab-link-height};
109
+ --mat-tab-bar-height: #{$mat-tab-bar-height};
108
110
 
109
111
  --app-table-header-height: #{$app-table-header-height};
110
112
  --app-toolbar-height: #{$app-toolbar-height};
111
- //--app-paginator-height: #{$app-paginator-height};
113
+ --app-paginator-height: #{$app-paginator-height};
112
114
  --app-form-buttons-bar-height: #{$app-form-buttons-bar-height};
113
115
  --app-footer-height: var(--app-form-buttons-bar-height);
114
- --mat-tab-link-height: #{$mat-tab-link-height};
115
- --mat-tab-bar-height: #{$mat-tab-bar-height};
116
+ --app-form-field-background-color: #{$app-form-field-background-color};
117
+ --app-form-field-disabled-background-color: #{$app-form-field-disabled-background-color};
116
118
  }
117
119
 
118
120
  @mixin css-variables-to-root-mobile() {
@@ -0,0 +1,201 @@
1
+
2
+ // --------------------------------------------------
3
+ // Material Forms
4
+ // --------------------------------------------------
5
+ .form-container,
6
+ form.form-container {
7
+ color: #{$app-form-color};
8
+ @include font-size(16px);
9
+
10
+ --mdc-filled-text-field-container-color: var(--app-form-field-background-color);
11
+ --mdc-filled-text-field-disabled-container-color: var(--app-form-field-disabled-background-color);
12
+ --mat-form-field-state-layer-color: var(--app-form-field-focus-background-color);
13
+ --mat-form-field-container-height: 45px;
14
+ --mat-form-field-container-text-size: inherit;
15
+ --mat-form-field-filled-label-display: block;
16
+ --mat-form-field-container-vertical-padding: 8px;
17
+ --mat-form-field-filled-with-label-container-padding-top: 18px;
18
+ --mat-form-field-filled-with-label-container-padding-bottom: 0px;
19
+ --mdc-filled-text-field-label-text-tracking: normal;
20
+ --mat-select-trigger-text-size: var(--mat-form-field-container-text-size);
21
+
22
+ .mat-form-field-disabled,
23
+ .mat-mdc-input-element:disabled {
24
+ color: #{$app-form-color-disabled} !important;
25
+ }
26
+
27
+ .mat-form-field-disabled {
28
+ .mat-mdc-form-field-infix {
29
+ min-height: var(--mat-form-field-container-height);
30
+ }
31
+ }
32
+
33
+ mat-form-field,
34
+ mat-autocomplete-field,
35
+ app-form-field {
36
+ width: 100%;
37
+ }
38
+
39
+ .mat-mdc-form-field {
40
+ &:not(.mat-mdc-form-field-has-icon-prefix) {
41
+ .mdc-text-field {
42
+ padding-left: 4px;
43
+ }
44
+ }
45
+
46
+ ion-icon[matPrefix],
47
+ mat-icon[matPrefix],
48
+ .mat-mdc-form-field-icon-prefix {
49
+
50
+ --mdc-icon-button-icon-size: 24px;
51
+ --mdc-icon-button-icon-color: inherit;
52
+ --mdc-icon-button-state-layer-size: 48px;
53
+ --mdc-icon-button-margin-vertical: 12px;
54
+
55
+ ion-icon, .mat-icon {
56
+ font-size: var(--mdc-icon-button-icon-size) !important;
57
+ line-height: 1.125;
58
+ height: var(--mdc-icon-button-icon-size);
59
+ width: var(--mdc-icon-button-icon-size);
60
+ margin-left: var(--mdc-icon-button-margin-vertical);
61
+ margin-right: var(--mdc-icon-button-margin-vertical);
62
+ position: relative;
63
+ color: var(--mdc-icon-button-icon-color);
64
+ fill: var(--mdc-icon-button-icon-color);
65
+ }
66
+ }
67
+
68
+ ion-icon[matSuffix],
69
+ mat-icon[matSuffix],
70
+ .mat-mdc-form-field-icon-suffix {
71
+ white-space: nowrap;
72
+
73
+ .mat-mdc-icon-button {
74
+ --mdc-icon-button-state-layer-size: 24px;
75
+ --mdc-icon-button-icon-size: 16px;
76
+ --mdc-icon-button-padding: 4px;
77
+ padding: var(--mdc-icon-button-padding);
78
+
79
+ &.large {
80
+ --mdc-icon-button-state-layer-size: 48px;
81
+ --mdc-icon-button-icon-size: 24px;
82
+ --mdc-icon-button-padding: 12px;
83
+ }
84
+
85
+ ion-icon, .mat-icon {
86
+ height: var(--mdc-icon-button-icon-size);
87
+ width: var(--mdc-icon-button-icon-size);
88
+ font-size: var(--mdc-icon-button-icon-size);
89
+ }
90
+
91
+ .mat-mdc-button-touch-target {
92
+ width: var(--mdc-icon-button-state-layer-size);
93
+ }
94
+ }
95
+
96
+ ion-icon, .mat-icon {
97
+
98
+ &.large {
99
+ $font-size: calculateRem(14px);
100
+ font-size: $font-size;
101
+ line-height: 1.125;
102
+ }
103
+ }
104
+
105
+ }
106
+
107
+ // When field use choice button, reduce the font size, and optimize layout
108
+ button.mat-mdc-form-field-button,
109
+ ion-button.mat-mdc-form-field-button {
110
+ @include font-size-important(12px);
111
+ margin: 0;
112
+ white-space: normal;
113
+ }
114
+
115
+ // Used to customize mat-boolean-field
116
+ &.mat-boolean-field-checkbox {
117
+ --mdc-checkbox-state-layer-size: 20px;
118
+
119
+ .mat-mdc-form-field-infix {
120
+ padding-top: 16px;
121
+ }
122
+
123
+ .mdc-floating-label {
124
+ transform: unset !important;
125
+ padding-left: 30px;
126
+ top: 20px;
127
+ }
128
+ }
129
+
130
+ &.mat-boolean-field-radio {
131
+ --mdc-radio-state-layer-size: 20px;
132
+
133
+ .mat-mdc-radio-button {
134
+ padding-left: 8px;
135
+ }
136
+ }
137
+
138
+ &.mat-boolean-field-button {
139
+ .mat-mdc-form-field-infix {
140
+ padding-top: calc(var(--mat-form-field-filled-with-label-container-padding-top, 0px) + 4px);
141
+ }
142
+ }
143
+ }
144
+
145
+ .mat-mdc-form-field-subscript-wrapper {
146
+ mat-hint {
147
+ --color: rgb(115,115,115);
148
+ color: var(--color);
149
+ }
150
+ }
151
+
152
+ /* -- Computed field -- */
153
+
154
+ // Set color on computed field (if enable or disable)
155
+ .computed .mat-mdc-form-field,
156
+ .mat-mdc-form-field .computed,
157
+ .mat-mdc-form-field.computed,
158
+ .computed .mat-mdc-form-field .mat-mdc-input-element:disabled,
159
+ .mat-mdc-form-field .computed .mat-mdc-input-element:disabled,
160
+ .mat-mdc-form-field.computed .mat-mdc-input-element:disabled {
161
+ color: var(--ion-color-primary-tint) !important;
162
+ font-style: italic;
163
+ }
164
+
165
+ /* MatSwipeField */
166
+ mat-swipe-field {
167
+
168
+ .mdc-floating-label--float-above {
169
+ transform: translateY(-106%) translateX(40px) scale(0.75) !important;
170
+ }
171
+ }
172
+
173
+
174
+ }
175
+ // Manage first child grid inside a form
176
+ form.form-container > ion-grid,
177
+ ion-grid.form-container {
178
+ padding: 0;
179
+
180
+ & > ion-row {
181
+ // No between grid rows
182
+ padding: 0;
183
+
184
+ & > ion-col {
185
+
186
+ // No top/bottom padding between grid cell
187
+ padding-bottom: 0;
188
+ padding-top: 0;
189
+
190
+ & > ion-label {
191
+ color: var(--ion-color-primary100);
192
+ padding-inline-end: 5px;
193
+ }
194
+
195
+ & > ion-label[text-wrap] {
196
+ word-wrap: normal;
197
+ white-space: normal;
198
+ }
199
+ }
200
+ }
201
+ }
@@ -16,7 +16,10 @@ $app-form-buttons-bar-height: 56px !default;
16
16
  $app-select-option-border-color: rgba(0, 0, 0, 0.12) !default;
17
17
  $app-table-border-color: rgba(0, 0, 0, 0.08) !default;
18
18
 
19
- $app-form-field-background-color: rgba(0,0,0,0) !default;
20
- //$app-form-field-background-color: whitesmoke !default;
21
- $app-form-field-focus-background-color: rgba(0, 0, 0, 0) !default;
22
- //$app-form-field-focus-background-color: rgba(0, 0, 0, 0.87) !default;
19
+ // Form's field background
20
+ $app-form-field-background-color: rgb(245,245,245) !default;
21
+ $app-form-field-disabled-background-color: #fafafa !default;
22
+
23
+ // Form fields background : transparent
24
+ //$app-form-field-background-color: transparent !default;
25
+ //$app-form-field-disabled-background-color: transparent !default;