@db-ux/ngx-core-components 4.5.4-tailwind-inline-5d37a00 → 4.6.0
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @db-ux/ngx-core-components
|
|
2
2
|
|
|
3
|
+
## 4.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- refactor: exclude whitelabel-theme from default bundle to reduce size and to align with "how to import a theme" - [see commit f272967](https://github.com/db-ux-design-system/core-web/commit/f272967acb7a37dc9b07d9786134e437b284e9b6)
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- fix: issue with tailwind duplicating some classes by using `@theme` inline - [see commit 92de4e6](https://github.com/db-ux-design-system/core-web/commit/92de4e6e5fdad3be5629d7457944d3b9b7396cf4)
|
|
12
|
+
|
|
13
|
+
- fix(number input): prevent from clearing on intermediate decimal entry - [see commit aa85967](https://github.com/db-ux-design-system/core-web/commit/aa85967ffeaa685f6b647069d0e1d415d812dc87):
|
|
14
|
+
- fix(input,textarea): allow using `undefined` as `value`
|
|
15
|
+
|
|
3
16
|
## 4.5.4
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -1054,9 +1054,30 @@ const CardBehaviorList = ['static', 'interactive'];
|
|
|
1054
1054
|
const CardElevationLevelList = ['1', '2', '3'];
|
|
1055
1055
|
|
|
1056
1056
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1057
|
-
const
|
|
1058
|
-
|
|
1059
|
-
|
|
1057
|
+
const specialNumberCharacters = ['.', ',', 'e', 'E', '+', '-'];
|
|
1058
|
+
const handleFrameworkEventAngular = (component, event, modelValue = 'value', lastValue) => {
|
|
1059
|
+
const value = event.target[modelValue];
|
|
1060
|
+
const type = event.target?.type;
|
|
1061
|
+
if (!value && value !== '' && ['date', 'time', 'week', 'month', 'datetime-local'].includes(type)) {
|
|
1062
|
+
// If value is empty and type date we skip `writingValue` function
|
|
1063
|
+
return;
|
|
1064
|
+
}
|
|
1065
|
+
if (type === 'number') {
|
|
1066
|
+
if (event.type === 'input') {
|
|
1067
|
+
if (specialNumberCharacters.includes(event.data) || specialNumberCharacters.some(specialCharacter => lastValue?.toString().includes(specialCharacter)) && event.inputType === 'deleteContentBackward') {
|
|
1068
|
+
// Skip `writingValue` function if number type and input event
|
|
1069
|
+
// and `.` or `,` or 'e', 'E', '+', '-' was typed
|
|
1070
|
+
// or content was deleted but last number had a `.`
|
|
1071
|
+
return;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
else if (event.type === 'change') {
|
|
1075
|
+
// Skip `writingValue` function if number type and change event
|
|
1076
|
+
return;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
component.propagateChange(value);
|
|
1080
|
+
component.writeValue(value);
|
|
1060
1081
|
};
|
|
1061
1082
|
const handleFrameworkEventVue = (emit, event, modelValue = 'value') => {
|
|
1062
1083
|
// TODO: Replace this with the solution out of https://github.com/BuilderIO/mitosis/issues/833 after this has been "solved"
|
|
@@ -2486,7 +2507,7 @@ class DBInput {
|
|
|
2486
2507
|
this.input.emit(event);
|
|
2487
2508
|
}
|
|
2488
2509
|
}
|
|
2489
|
-
handleFrameworkEventAngular(this, event);
|
|
2510
|
+
handleFrameworkEventAngular(this, event, "value", this._value());
|
|
2490
2511
|
this.handleValidation();
|
|
2491
2512
|
}
|
|
2492
2513
|
handleChange(event, reset) {
|
|
@@ -2496,7 +2517,7 @@ class DBInput {
|
|
|
2496
2517
|
this.change.emit(event);
|
|
2497
2518
|
}
|
|
2498
2519
|
}
|
|
2499
|
-
handleFrameworkEventAngular(this, event);
|
|
2520
|
+
handleFrameworkEventAngular(this, event, "value", this._value());
|
|
2500
2521
|
this.handleValidation();
|
|
2501
2522
|
}
|
|
2502
2523
|
handleBlur(event) {
|
|
@@ -2652,9 +2673,7 @@ class DBInput {
|
|
|
2652
2673
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
2653
2674
|
this.value();
|
|
2654
2675
|
// ---
|
|
2655
|
-
|
|
2656
|
-
this._value.set(this.value());
|
|
2657
|
-
}
|
|
2676
|
+
this._value.set(this.value());
|
|
2658
2677
|
}, {
|
|
2659
2678
|
// Enable writing to signals inside effects
|
|
2660
2679
|
});
|
|
@@ -2722,12 +2741,6 @@ class DBInput {
|
|
|
2722
2741
|
}
|
|
2723
2742
|
}
|
|
2724
2743
|
writeValue(value) {
|
|
2725
|
-
if (!value && value !== "" && (this.type() === "date" ||
|
|
2726
|
-
this.type() === "time" ||
|
|
2727
|
-
this.type() === "week" ||
|
|
2728
|
-
this.type() === "month" ||
|
|
2729
|
-
this.type() === "datetime-local"))
|
|
2730
|
-
return;
|
|
2731
2744
|
this.value.set(value);
|
|
2732
2745
|
if (this._ref()?.nativeElement) {
|
|
2733
2746
|
this.renderer.setProperty(this._ref()?.nativeElement, 'value', value);
|
|
@@ -2783,7 +2796,7 @@ class DBInput {
|
|
|
2783
2796
|
[disabled]="getBoolean(disabled(), 'disabled')"
|
|
2784
2797
|
[required]="getBoolean(required(), 'required')"
|
|
2785
2798
|
[attr.step]="getStep(step())"
|
|
2786
|
-
[value]="value() ?? _value()"
|
|
2799
|
+
[value]="value() ?? _value() ?? ''"
|
|
2787
2800
|
[attr.maxLength]="getNumber(maxLength(), maxlength())"
|
|
2788
2801
|
[attr.minLength]="getNumber(minLength(), minlength())"
|
|
2789
2802
|
[attr.max]="getInputValue(max(), type())"
|
|
@@ -2872,7 +2885,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
|
|
|
2872
2885
|
[disabled]="getBoolean(disabled(), 'disabled')"
|
|
2873
2886
|
[required]="getBoolean(required(), 'required')"
|
|
2874
2887
|
[attr.step]="getStep(step())"
|
|
2875
|
-
[value]="value() ?? _value()"
|
|
2888
|
+
[value]="value() ?? _value() ?? ''"
|
|
2876
2889
|
[attr.maxLength]="getNumber(maxLength(), maxlength())"
|
|
2877
2890
|
[attr.minLength]="getNumber(minLength(), minlength())"
|
|
2878
2891
|
[attr.max]="getInputValue(max(), type())"
|
|
@@ -7110,7 +7123,7 @@ class DBSelect {
|
|
|
7110
7123
|
[attr.id]="_id()"
|
|
7111
7124
|
[attr.name]="name()"
|
|
7112
7125
|
[attr.size]="size()"
|
|
7113
|
-
[value]="value() ?? _value()"
|
|
7126
|
+
[value]="value() ?? _value() ?? ''"
|
|
7114
7127
|
[attr.autocomplete]="autocomplete()"
|
|
7115
7128
|
[attr.multiple]="multiple()"
|
|
7116
7129
|
(input)="handleInput($event)"
|
|
@@ -7214,7 +7227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
|
|
|
7214
7227
|
[attr.id]="_id()"
|
|
7215
7228
|
[attr.name]="name()"
|
|
7216
7229
|
[attr.size]="size()"
|
|
7217
|
-
[value]="value() ?? _value()"
|
|
7230
|
+
[value]="value() ?? _value() ?? ''"
|
|
7218
7231
|
[attr.autocomplete]="autocomplete()"
|
|
7219
7232
|
[attr.multiple]="multiple()"
|
|
7220
7233
|
(input)="handleInput($event)"
|
|
@@ -8646,9 +8659,7 @@ class DBTextarea {
|
|
|
8646
8659
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
8647
8660
|
this.value();
|
|
8648
8661
|
// ---
|
|
8649
|
-
|
|
8650
|
-
this._value.set(this.value());
|
|
8651
|
-
}
|
|
8662
|
+
this._value.set(this.value());
|
|
8652
8663
|
}, {
|
|
8653
8664
|
// Enable writing to signals inside effects
|
|
8654
8665
|
});
|
|
@@ -8775,7 +8786,7 @@ class DBTextarea {
|
|
|
8775
8786
|
(change)="handleChange($event)"
|
|
8776
8787
|
(blur)="handleBlur($event)"
|
|
8777
8788
|
(focus)="handleFocus($event)"
|
|
8778
|
-
[value]="value() ?? _value()"
|
|
8789
|
+
[value]="value() ?? _value() ?? ''"
|
|
8779
8790
|
[attr.aria-describedby]="ariaDescribedBy() ?? _descByIds()"
|
|
8780
8791
|
[attr.placeholder]="placeholder() ?? DEFAULT_PLACEHOLDER"
|
|
8781
8792
|
[attr.rows]="getNumber(rows(), DEFAULT_ROWS)"
|
|
@@ -8844,7 +8855,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImpor
|
|
|
8844
8855
|
(change)="handleChange($event)"
|
|
8845
8856
|
(blur)="handleBlur($event)"
|
|
8846
8857
|
(focus)="handleFocus($event)"
|
|
8847
|
-
[value]="value() ?? _value()"
|
|
8858
|
+
[value]="value() ?? _value() ?? ''"
|
|
8848
8859
|
[attr.aria-describedby]="ariaDescribedBy() ?? _descByIds()"
|
|
8849
8860
|
[attr.placeholder]="placeholder() ?? DEFAULT_PLACEHOLDER"
|
|
8850
8861
|
[attr.rows]="getNumber(rows(), DEFAULT_ROWS)"
|