iss-ctrl 0.0.16 → 0.0.18
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/fesm2022/{iss-ctrl-iss-ctrl-CUlx5aua.mjs → iss-ctrl-iss-ctrl-C_ZiixeF.mjs} +60 -38
- package/fesm2022/iss-ctrl-iss-ctrl-C_ZiixeF.mjs.map +1 -0
- package/fesm2022/{iss-ctrl-load-event-B2HY44Lg.mjs → iss-ctrl-load-event-DIPikCdF.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-event-B2HY44Lg.mjs.map → iss-ctrl-load-event-DIPikCdF.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-load-options-event-Bvfi4PZq.mjs → iss-ctrl-load-options-event-DOlkFXz5.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-options-event-Bvfi4PZq.mjs.map → iss-ctrl-load-options-event-DOlkFXz5.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-load-value-event-Bq6nRj3K.mjs → iss-ctrl-load-value-event-BjsuFpPf.mjs} +3 -3
- package/fesm2022/{iss-ctrl-load-value-event-Bq6nRj3K.mjs.map → iss-ctrl-load-value-event-BjsuFpPf.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-note.field-DpXXdNd0.mjs → iss-ctrl-note.field-CakHrlcq.mjs} +2 -2
- package/fesm2022/{iss-ctrl-note.field-DpXXdNd0.mjs.map → iss-ctrl-note.field-CakHrlcq.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-replace-api-keys-Dbdwgl4g.mjs → iss-ctrl-replace-api-keys-C-G34VNS.mjs} +2 -2
- package/fesm2022/{iss-ctrl-replace-api-keys-Dbdwgl4g.mjs.map → iss-ctrl-replace-api-keys-C-G34VNS.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-set-value-event-CXVuywEr.mjs → iss-ctrl-set-value-event-C-uD228s.mjs} +2 -2
- package/fesm2022/{iss-ctrl-set-value-event-CXVuywEr.mjs.map → iss-ctrl-set-value-event-C-uD228s.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-table.field-C5SDeghW.mjs → iss-ctrl-table.field-Ce1KnlZO.mjs} +2 -2
- package/fesm2022/{iss-ctrl-table.field-C5SDeghW.mjs.map → iss-ctrl-table.field-Ce1KnlZO.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-trigger-based-on-json-value-Ck642ldN.mjs → iss-ctrl-trigger-based-on-json-value-D5S3shyl.mjs} +2 -2
- package/fesm2022/{iss-ctrl-trigger-based-on-json-value-Ck642ldN.mjs.map → iss-ctrl-trigger-based-on-json-value-D5S3shyl.mjs.map} +1 -1
- package/fesm2022/{iss-ctrl-user-picker.field-69Tqgu2G.mjs → iss-ctrl-user-picker.field-C7DZ3ck2.mjs} +2 -2
- package/fesm2022/{iss-ctrl-user-picker.field-69Tqgu2G.mjs.map → iss-ctrl-user-picker.field-C7DZ3ck2.mjs.map} +1 -1
- package/fesm2022/iss-ctrl.mjs +1 -1
- package/package.json +1 -1
- package/types/iss-ctrl.d.ts +11 -0
- package/upgrade.scss +108 -75
- package/fesm2022/iss-ctrl-iss-ctrl-CUlx5aua.mjs.map +0 -1
package/types/iss-ctrl.d.ts
CHANGED
|
@@ -124,6 +124,15 @@ declare class ControlBase implements ControlValueAccessor, Validator {
|
|
|
124
124
|
writeValue(value: string | FormData | Date | null): void;
|
|
125
125
|
markAsTouched(): void;
|
|
126
126
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
127
|
+
/**
|
|
128
|
+
* Whether the control currently holds no value.
|
|
129
|
+
*
|
|
130
|
+
* Reflected on the host as `iss-ctrl-empty`, which is what `upgrade.scss` uses to keep the
|
|
131
|
+
* resting outline of an empty field: Material's own `mat-form-field-hide-placeholder` drops
|
|
132
|
+
* off the moment the field is focused, so the border would change colour on focus alone.
|
|
133
|
+
* Override it in a control whose value does not live on {@link ControlBase.ctrl}.
|
|
134
|
+
*/
|
|
135
|
+
protected isEmpty(): boolean;
|
|
127
136
|
protected onTouch: () => void;
|
|
128
137
|
protected onPropagateValue: (_: any) => void;
|
|
129
138
|
protected emitValue(value?: any): void;
|
|
@@ -203,6 +212,7 @@ declare class ChipsControl extends ControlBase {
|
|
|
203
212
|
writeValue(value: string | null): void;
|
|
204
213
|
remove(keyword: string): void;
|
|
205
214
|
add(event: MatChipInputEvent): void;
|
|
215
|
+
protected isEmpty(): boolean;
|
|
206
216
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChipsControl, never>;
|
|
207
217
|
static ɵcmp: i0.ɵɵComponentDeclaration<ChipsControl, "iss-ctrl-chips", never, {}, {}, never, ["label"], true, never>;
|
|
208
218
|
}
|
|
@@ -356,6 +366,7 @@ declare class DateRangePickerControl extends ControlBase implements OnInit, OnDe
|
|
|
356
366
|
clear(event: MouseEvent): void;
|
|
357
367
|
writeValue(value: string | FormData | null): void;
|
|
358
368
|
ngOnDestroy(): void;
|
|
369
|
+
protected isEmpty(): boolean;
|
|
359
370
|
protected openPicker(picker: any): void;
|
|
360
371
|
protected calendarDaysFilter: (d: Date | null) => boolean;
|
|
361
372
|
static ɵfac: i0.ɵɵFactoryDeclaration<DateRangePickerControl, never>;
|
package/upgrade.scss
CHANGED
|
@@ -1,75 +1,108 @@
|
|
|
1
|
-
html {
|
|
2
|
-
// --mat-form-field-container-height: 50px !important;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
//mat-mdc-form-field mat-mdc-form-field-type-mat-input mat-form-field-appearance-fill mat-form-field-hide-placeholder mat-primary ng-untouched ng-pristine ng-valid mat-form-field-animations-enabled
|
|
6
|
-
//mat-mdc-form-field mat-mdc-form-field-type-mat-input mat-form-field-appearance-fill mat-form-field-hide-placeholder mat-primary ng-untouched ng-pristine ng-valid mat-form-field-animations-enabled
|
|
7
|
-
//mat-mdc-form-field mat-mdc-form-field-type-mat-input mat-mdc-form-field-has-icon-suffix mat-form-field-appearance-fill mat-primary ng-untouched ng-pristine ng-valid mat-form-field-animations-enabled
|
|
8
|
-
// mat-mdc-form-field mat-mdc-form-field-type-mat-input mat-form-field-appearance-fill mat-primary mat-form-field-animations-enabled ng-dirty ng-invalid mat-form-field-invalid ng-touched
|
|
9
|
-
mat-form-field {
|
|
10
|
-
--input-height: 55px;
|
|
11
|
-
--input-radius: 8px;
|
|
12
|
-
|
|
13
|
-
&.mat-mdc-form-field {
|
|
14
|
-
.mdc-text-field--invalid.mat-mdc-text-field-wrapper {
|
|
15
|
-
border: 1px solid var(--red) !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&.mat-form-field-animations-enabled .mat-mdc-form-field-infix {
|
|
19
|
-
// padding-top: 10px !important;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
span[mattextsuffix],
|
|
24
|
-
span[matsuffix] {
|
|
25
|
-
// margin-bottom: 6px;
|
|
26
|
-
// display: block;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
mat-error {
|
|
31
|
-
--mat-form-field-error-text-color: var(--red);
|
|
32
|
-
font-size: 12px !important;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.custom-textarea {
|
|
36
|
-
--input-height: 100px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.mat-mdc-standard-chip {
|
|
40
|
-
--mat-chip-container-shape-radius: 8px;
|
|
41
|
-
--mat-chip-elevated-container-color: var(--white);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.search-container mat-form-field {
|
|
45
|
-
--input-height: 30px;
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// The basic-ui form-field reset hides .mdc-floating-label for every mat-form-field, so the label
|
|
50
|
-
// space is opt-in: only a control that projects a <label> carrying actual text turns it back on,
|
|
51
|
-
// together with the padding that space needs. An omitted label leaves <mat-label> without a
|
|
52
|
-
// <label> child, and one that interpolates to "" leaves that child :empty — neither matches, so
|
|
53
|
-
// both collapse with no runtime check, and a label that arrives later simply shows up.
|
|
54
|
-
mat-form-field.mat-mdc-form-field:has(mat-label > label:not(:empty)) {
|
|
55
|
-
.mdc-floating-label {
|
|
56
|
-
display: block !important;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.mat-mdc-form-field-infix {
|
|
60
|
-
padding-top: 10px !important;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
mat-form-field.mat-mdc-form-field
|
|
66
|
-
.mat-mdc-input-element::placeholder {
|
|
67
|
-
|
|
68
|
-
--placeholder-fc: transparent !important;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
mat-form-field.mat-mdc-form-field.mat-focused
|
|
73
|
-
.mat-mdc-input-element::placeholder {
|
|
74
|
-
--placeholder-fc: var(--dark-gray) !important;
|
|
75
|
-
}
|
|
1
|
+
html {
|
|
2
|
+
// --mat-form-field-container-height: 50px !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
//mat-mdc-form-field mat-mdc-form-field-type-mat-input mat-form-field-appearance-fill mat-form-field-hide-placeholder mat-primary ng-untouched ng-pristine ng-valid mat-form-field-animations-enabled
|
|
6
|
+
//mat-mdc-form-field mat-mdc-form-field-type-mat-input mat-form-field-appearance-fill mat-form-field-hide-placeholder mat-primary ng-untouched ng-pristine ng-valid mat-form-field-animations-enabled
|
|
7
|
+
//mat-mdc-form-field mat-mdc-form-field-type-mat-input mat-mdc-form-field-has-icon-suffix mat-form-field-appearance-fill mat-primary ng-untouched ng-pristine ng-valid mat-form-field-animations-enabled
|
|
8
|
+
// mat-mdc-form-field mat-mdc-form-field-type-mat-input mat-form-field-appearance-fill mat-primary mat-form-field-animations-enabled ng-dirty ng-invalid mat-form-field-invalid ng-touched
|
|
9
|
+
mat-form-field {
|
|
10
|
+
--input-height: 55px;
|
|
11
|
+
--input-radius: 8px;
|
|
12
|
+
|
|
13
|
+
&.mat-mdc-form-field {
|
|
14
|
+
.mdc-text-field--invalid.mat-mdc-text-field-wrapper {
|
|
15
|
+
border: 1px solid var(--red) !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&.mat-form-field-animations-enabled .mat-mdc-form-field-infix {
|
|
19
|
+
// padding-top: 10px !important;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
span[mattextsuffix],
|
|
24
|
+
span[matsuffix] {
|
|
25
|
+
// margin-bottom: 6px;
|
|
26
|
+
// display: block;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
mat-error {
|
|
31
|
+
--mat-form-field-error-text-color: var(--red);
|
|
32
|
+
font-size: 12px !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.custom-textarea {
|
|
36
|
+
--input-height: 100px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.mat-mdc-standard-chip {
|
|
40
|
+
--mat-chip-container-shape-radius: 8px;
|
|
41
|
+
--mat-chip-elevated-container-color: var(--white);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.search-container mat-form-field {
|
|
45
|
+
--input-height: 30px;
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// The basic-ui form-field reset hides .mdc-floating-label for every mat-form-field, so the label
|
|
50
|
+
// space is opt-in: only a control that projects a <label> carrying actual text turns it back on,
|
|
51
|
+
// together with the padding that space needs. An omitted label leaves <mat-label> without a
|
|
52
|
+
// <label> child, and one that interpolates to "" leaves that child :empty — neither matches, so
|
|
53
|
+
// both collapse with no runtime check, and a label that arrives later simply shows up.
|
|
54
|
+
mat-form-field.mat-mdc-form-field:has(mat-label > label:not(:empty)) {
|
|
55
|
+
.mdc-floating-label {
|
|
56
|
+
display: block !important;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.mat-mdc-form-field-infix {
|
|
60
|
+
padding-top: 10px !important;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
mat-form-field.mat-mdc-form-field
|
|
66
|
+
.mat-mdc-input-element::placeholder {
|
|
67
|
+
|
|
68
|
+
--placeholder-fc: transparent !important;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
mat-form-field.mat-mdc-form-field.mat-focused
|
|
73
|
+
.mat-mdc-input-element::placeholder {
|
|
74
|
+
--placeholder-fc: var(--dark-gray) !important;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
// Outline states. Focus is not a state: while the user is in a field the outline keeps the
|
|
79
|
+
// colour it had before the caret arrived, so the only thing the outline reports is validity.
|
|
80
|
+
//
|
|
81
|
+
// --input-border-idle snapshots the field's resting border on the mat-form-field element, which
|
|
82
|
+
// is also where per-instance overrides such as .filter-input redefine it — so a field with a
|
|
83
|
+
// custom resting border keeps that one while focused instead of falling back to the default.
|
|
84
|
+
mat-form-field {
|
|
85
|
+
--input-border-idle: var(--input-border-active, 1px solid var(--black));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
mat-form-field.mat-mdc-form-field .mdc-text-field--focused {
|
|
89
|
+
--input-border-active: var(--input-border-idle);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// An empty field rests on the plain border, and stays there while the caret is in it. The base
|
|
93
|
+
// stylesheet keys that off Material's mat-form-field-hide-placeholder, which Material drops as
|
|
94
|
+
// soon as the field is focused — so the emptiness comes from the control itself instead, through
|
|
95
|
+
// the iss-ctrl-empty host class that ControlBase.isEmpty() reflects.
|
|
96
|
+
.iss-ctrl-empty > mat-form-field.mat-mdc-form-field .mdc-text-field {
|
|
97
|
+
--input-border-active: var(--input-border);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Red belongs to a field the user has actually left in a bad state. Angular puts ng-touched and
|
|
101
|
+
// ng-invalid on the control host (iss-ctrl-*) — the same condition <iss-validation-message-viewer>
|
|
102
|
+
// uses — and that is the only reliable signal here: the mat control is bound to the control's
|
|
103
|
+
// internal FormControl, which carries no validators, so Material's own --invalid state stays off
|
|
104
|
+
// for everything but the errors it raises itself (a datepicker parse/min/max failure, say).
|
|
105
|
+
// The child combinator keeps an invalid *form* ancestor from painting every field inside it red.
|
|
106
|
+
.ng-touched.ng-invalid > mat-form-field.mat-mdc-form-field .mdc-text-field {
|
|
107
|
+
--input-border-active: var(--input-border-invalid);
|
|
108
|
+
}
|