@sumaris-net/ngx-components 2.7.3-rc15 → 2.7.3-rc18
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/esm2022/src/app/admin/users/users.mjs +2 -2
- package/esm2022/src/app/core/account/account.page.mjs +1 -1
- package/esm2022/src/app/core/form/properties/properties.form.mjs +1 -1
- package/esm2022/src/app/core/form/properties/properties.table.mjs +1 -1
- package/esm2022/src/app/core/register/register.form.mjs +1 -1
- package/esm2022/src/app/core/settings/settings.page.mjs +1 -1
- package/esm2022/src/app/shared/form/field.component.mjs +10 -7
- package/esm2022/src/app/shared/material/autocomplete/material.autocomplete.mjs +8 -5
- package/esm2022/src/app/shared/material/testing/common.test.mjs +3 -3
- package/fesm2022/sumaris-net.ngx-components.mjs +24 -18
- package/fesm2022/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/shared/form/field.component.d.ts +5 -3
- package/src/app/shared/material/autocomplete/material.autocomplete.d.ts +1 -0
- package/src/assets/manifest.json +1 -1
- package/src/theme/_material.scss +2 -1
- package/src/theme/_ngx-components.scss +40 -32
- package/src/theme/_ngx-components.table.scss +5 -14
package/package.json
CHANGED
|
@@ -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
|
|
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; }; "
|
|
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;
|
package/src/assets/manifest.json
CHANGED
|
@@ -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-
|
|
5
|
+
"version": "2.7.3-rc18",
|
|
6
6
|
"default_locale": "fr",
|
|
7
7
|
"description": "Angular components for building beautiful and responsive Apps",
|
|
8
8
|
"icons": [{
|
package/src/theme/_material.scss
CHANGED
|
@@ -57,13 +57,14 @@
|
|
|
57
57
|
}
|
|
58
58
|
.mat-mdc-option {
|
|
59
59
|
--mat-option-label-text-tracking: normal;
|
|
60
|
-
--mat-option-label-text-size:
|
|
60
|
+
--mat-option-label-text-size: 16px;
|
|
61
61
|
}
|
|
62
62
|
.mat-mdc-select {
|
|
63
63
|
--mat-select-trigger-text-font: inherit;
|
|
64
64
|
--mat-select-trigger-text-tracking: normal;
|
|
65
65
|
--mat-select-trigger-text-size: inherit;
|
|
66
66
|
--mat-select-disabled-trigger-text-color: inherit;
|
|
67
|
+
--mat-select-trigger-text-line-height: inherit;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
// Badge
|
|
@@ -132,19 +132,20 @@ ion-menu.menu-side-left {
|
|
|
132
132
|
.form-container,
|
|
133
133
|
form.form-container {
|
|
134
134
|
color: #{$app-form-color};
|
|
135
|
+
@include font-size(16px);
|
|
136
|
+
|
|
135
137
|
--mdc-filled-text-field-container-color: #{$app-form-field-background-color};
|
|
136
138
|
--mdc-filled-text-field-disabled-container-color: #{$app-form-field-background-color};
|
|
137
139
|
--mat-form-field-state-layer-color: #{$app-form-field-focus-background-color};
|
|
138
140
|
--mat-form-field-container-height: 45px;
|
|
139
|
-
--mat-form-field-container-text-size:
|
|
141
|
+
--mat-form-field-container-text-size: inherit;
|
|
140
142
|
--mat-form-field-filled-label-display: block;
|
|
141
|
-
--mat-form-field-container-vertical-padding:
|
|
143
|
+
--mat-form-field-container-vertical-padding: 8px;
|
|
142
144
|
--mat-form-field-filled-with-label-container-padding-top: 16px;
|
|
143
145
|
--mat-form-field-filled-with-label-container-padding-bottom: 0px;
|
|
144
146
|
--mdc-filled-text-field-label-text-tracking: normal;
|
|
145
147
|
--mat-select-trigger-text-size: var(--mat-form-field-container-text-size);
|
|
146
148
|
|
|
147
|
-
@include font-size(14px);
|
|
148
149
|
|
|
149
150
|
.mat-form-field-disabled,
|
|
150
151
|
.mat-mdc-input-element:disabled {
|
|
@@ -153,7 +154,7 @@ form.form-container {
|
|
|
153
154
|
|
|
154
155
|
// TODO BLA: voir si utile ?
|
|
155
156
|
.mat-form-field-disabled {
|
|
156
|
-
.mat-mdc-form-field-infix{
|
|
157
|
+
.mat-mdc-form-field-infix {
|
|
157
158
|
min-height: 41px;
|
|
158
159
|
}
|
|
159
160
|
}
|
|
@@ -176,15 +177,17 @@ form.form-container {
|
|
|
176
177
|
mat-icon[matPrefix],
|
|
177
178
|
.mat-mdc-form-field-icon-prefix {
|
|
178
179
|
|
|
180
|
+
--mdc-icon-button-icon-size: calculateRem(24px);
|
|
181
|
+
--mdc-icon-button-state-layer-size: calculateRem(28px);
|
|
182
|
+
--mdc-icon-button-margin-vertical: calc((var(--mdc-icon-button-state-layer-size) - var(--mdc-icon-button-state-layer-size)) / 2);
|
|
183
|
+
|
|
179
184
|
ion-icon, .mat-icon {
|
|
180
|
-
|
|
181
|
-
$margin-vertical: calculateRem(4px);
|
|
182
|
-
font-size: $font-size !important;
|
|
185
|
+
font-size: var(--mdc-icon-button-icon-size) !important;
|
|
183
186
|
line-height: 1.125;
|
|
184
|
-
height:
|
|
185
|
-
width:
|
|
186
|
-
margin-left:
|
|
187
|
-
margin-right:
|
|
187
|
+
height: var(--mdc-icon-button-icon-size);
|
|
188
|
+
width: var(--mdc-icon-button-icon-size);
|
|
189
|
+
margin-left: var(--mdc-icon-button-margin-vertical);
|
|
190
|
+
margin-right: var(--mdc-icon-button-margin-vertical);
|
|
188
191
|
position: relative;
|
|
189
192
|
}
|
|
190
193
|
}
|
|
@@ -193,15 +196,24 @@ form.form-container {
|
|
|
193
196
|
mat-icon[matSuffix],
|
|
194
197
|
.mat-mdc-form-field-icon-suffix {
|
|
195
198
|
white-space: nowrap;
|
|
199
|
+
align-self: baseline;
|
|
196
200
|
|
|
197
201
|
.mat-mdc-icon-button {
|
|
198
|
-
--mdc-icon-button-
|
|
199
|
-
--mdc-icon-button-
|
|
200
|
-
|
|
202
|
+
--mdc-icon-button-state-layer-size: 22px;
|
|
203
|
+
--mdc-icon-button-padding: 4px;
|
|
204
|
+
--mdc-icon-button-icon-size: 14px;
|
|
205
|
+
padding: var(--mdc-icon-button-padding);
|
|
206
|
+
|
|
207
|
+
&.large {
|
|
208
|
+
--mdc-icon-button-state-layer-size: 48px;
|
|
209
|
+
--mdc-icon-button-padding: 12px;
|
|
210
|
+
--mdc-icon-button-icon-size: 24px;
|
|
211
|
+
}
|
|
201
212
|
|
|
202
|
-
ion-icon, .mat-icon
|
|
213
|
+
ion-icon, .mat-icon {
|
|
214
|
+
height: var(--mdc-icon-button-icon-size);
|
|
215
|
+
width: var(--mdc-icon-button-icon-size);
|
|
203
216
|
font-size: var(--mdc-icon-button-icon-size);
|
|
204
|
-
line-height: var(--mdc-icon-button-icon-size);
|
|
205
217
|
}
|
|
206
218
|
|
|
207
219
|
.mat-mdc-button-touch-target {
|
|
@@ -212,7 +224,7 @@ form.form-container {
|
|
|
212
224
|
ion-icon, .mat-icon {
|
|
213
225
|
|
|
214
226
|
&.large {
|
|
215
|
-
$font-size: calculateRem(
|
|
227
|
+
$font-size: calculateRem(14px);
|
|
216
228
|
font-size: $font-size;
|
|
217
229
|
line-height: 1.125;
|
|
218
230
|
}
|
|
@@ -263,12 +275,12 @@ form.form-container {
|
|
|
263
275
|
/* -- Computed field -- */
|
|
264
276
|
|
|
265
277
|
// Set color on computed field (if enable or disable)
|
|
266
|
-
.computed mat-mdc-form-field,
|
|
267
|
-
mat-mdc-form-field .computed,
|
|
268
|
-
mat-mdc-form-field.computed,
|
|
269
|
-
.computed mat-mdc-form-field .mat-mdc-input-element:disabled,
|
|
270
|
-
mat-mdc-form-field .computed .mat-mdc-input-element:disabled,
|
|
271
|
-
mat-mdc-form-field.computed .mat-mdc-input-element:disabled {
|
|
278
|
+
.computed .mat-mdc-form-field,
|
|
279
|
+
.mat-mdc-form-field .computed,
|
|
280
|
+
.mat-mdc-form-field.computed,
|
|
281
|
+
.computed .mat-mdc-form-field .mat-mdc-input-element:disabled,
|
|
282
|
+
.mat-mdc-form-field .computed .mat-mdc-input-element:disabled,
|
|
283
|
+
.mat-mdc-form-field.computed .mat-mdc-input-element:disabled {
|
|
272
284
|
color: var(--ion-color-primary-tint) !important;
|
|
273
285
|
font-style: italic;
|
|
274
286
|
}
|
|
@@ -358,12 +370,6 @@ mat-option {
|
|
|
358
370
|
flex-grow: 1;
|
|
359
371
|
}
|
|
360
372
|
.mat-option-text:not(:has(ion-row)),
|
|
361
|
-
|
|
362
|
-
// TODO : Disabled : mat-option already have padding : this is redundant
|
|
363
|
-
//.mdc-list-item__primary-text:not(:has(ion-row)) {
|
|
364
|
-
// padding: 0 16px;
|
|
365
|
-
//}
|
|
366
|
-
|
|
367
373
|
.mat-option-text:has(ion-searchbar),
|
|
368
374
|
.mdc-list-item__primary-text:has(ion-searchbar) {
|
|
369
375
|
padding: 0 !important;
|
|
@@ -471,7 +477,7 @@ ion-list,
|
|
|
471
477
|
}
|
|
472
478
|
}
|
|
473
479
|
|
|
474
|
-
.mat-mdc-
|
|
480
|
+
.mat-mdc-optgroup.mat-select-searchbar,
|
|
475
481
|
.mat-mdc-option.mat-autocomplete-searchbar
|
|
476
482
|
{
|
|
477
483
|
padding: 0 !important;
|
|
@@ -479,8 +485,10 @@ ion-list,
|
|
|
479
485
|
background-color: var(--ion-color-secondary100) !important;
|
|
480
486
|
pointer-events: inherit !important;
|
|
481
487
|
|
|
482
|
-
.mdc-
|
|
483
|
-
|
|
488
|
+
.mat-mdc-optgroup-label {
|
|
489
|
+
background-color: var(--ion-color-secondary100) !important;
|
|
490
|
+
padding: 0;
|
|
491
|
+
display: block;
|
|
484
492
|
}
|
|
485
493
|
|
|
486
494
|
/* hide pseudo checkbox, in the searchbar*/
|
|
@@ -276,26 +276,19 @@
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
-
//.mdc-line-ripple--deactivating {
|
|
280
|
-
// display: none;
|
|
281
|
-
//}
|
|
282
|
-
|
|
283
|
-
mat-mdc-form-field,
|
|
284
279
|
mat-autocomplete-field,
|
|
285
|
-
app-form-field
|
|
280
|
+
app-form-field {
|
|
281
|
+
width: 100%;
|
|
282
|
+
}
|
|
283
|
+
|
|
286
284
|
.mat-mdc-form-field {
|
|
287
285
|
width: 100%;
|
|
286
|
+
padding-top: 1px;
|
|
288
287
|
--mat-form-field-container-text-size: 14px;
|
|
289
288
|
--mdc-filled-text-field-label-text-size: var(--mat-form-field-container-text-size);
|
|
290
289
|
--mat-select-trigger-text-size: var(--mat-form-field-container-text-size);
|
|
291
290
|
--mat-mdc-form-field-height: calc(var(--mat-row-height) - 2px);
|
|
292
|
-
// TODO
|
|
293
|
-
// use -- active- boder : 0;
|
|
294
291
|
height: var(--mat-mdc-form-field-height);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.mat-mdc-form-field {
|
|
298
|
-
padding-top: 1px;
|
|
299
292
|
|
|
300
293
|
.mat-mdc-form-field-label {
|
|
301
294
|
width: 100%;
|
|
@@ -410,8 +403,6 @@
|
|
|
410
403
|
}
|
|
411
404
|
|
|
412
405
|
mat-error {
|
|
413
|
-
//font-size: ;
|
|
414
|
-
//--mdc-typography-caption-font-size: 10px;
|
|
415
406
|
font-size: 10px;
|
|
416
407
|
}
|
|
417
408
|
|