@db-ux/ngx-core-components 4.3.0 → 4.3.2-consolidation-7549d9f
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,11 @@
|
|
|
1
1
|
# @db-ux/ngx-core-components
|
|
2
2
|
|
|
3
|
+
## 4.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(angular): issue with form-components not applying value changes because of [attr.value] instead of native [value] binding - [see commit 61ab4a3](https://github.com/db-ux-design-system/core-web/commit/61ab4a3e9a781459b829c74cf23624a23edd9e3f)
|
|
8
|
+
|
|
3
9
|
## 4.3.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -1393,7 +1393,7 @@ class DBCheckbox {
|
|
|
1393
1393
|
[attr.name]="name()"
|
|
1394
1394
|
[checked]="getBoolean(checked(), 'checked')"
|
|
1395
1395
|
[disabled]="getBoolean(disabled(), 'disabled')"
|
|
1396
|
-
[
|
|
1396
|
+
[value]="value()"
|
|
1397
1397
|
[required]="getBoolean(required(), 'required')"
|
|
1398
1398
|
(change)="handleChange($event)"
|
|
1399
1399
|
(blur)="handleBlur($event)"
|
|
@@ -1454,7 +1454,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
1454
1454
|
[attr.name]="name()"
|
|
1455
1455
|
[checked]="getBoolean(checked(), 'checked')"
|
|
1456
1456
|
[disabled]="getBoolean(disabled(), 'disabled')"
|
|
1457
|
-
[
|
|
1457
|
+
[value]="value()"
|
|
1458
1458
|
[required]="getBoolean(required(), 'required')"
|
|
1459
1459
|
(change)="handleChange($event)"
|
|
1460
1460
|
(blur)="handleBlur($event)"
|
|
@@ -2350,7 +2350,7 @@ class DBInput {
|
|
|
2350
2350
|
this._invalidMessage = signal(undefined, ...(ngDevMode ? [{ debugName: "_invalidMessage" }] : []));
|
|
2351
2351
|
this._dataListId = signal(undefined, ...(ngDevMode ? [{ debugName: "_dataListId" }] : []));
|
|
2352
2352
|
this._descByIds = signal(undefined, ...(ngDevMode ? [{ debugName: "_descByIds" }] : []));
|
|
2353
|
-
this._value = signal(
|
|
2353
|
+
this._value = signal("", ...(ngDevMode ? [{ debugName: "_value" }] : []));
|
|
2354
2354
|
this._voiceOverFallback = signal("", ...(ngDevMode ? [{ debugName: "_voiceOverFallback" }] : []));
|
|
2355
2355
|
this.abortController = signal(undefined, ...(ngDevMode ? [{ debugName: "abortController" }] : []));
|
|
2356
2356
|
if (typeof window !== "undefined") {
|
|
@@ -2387,7 +2387,9 @@ class DBInput {
|
|
|
2387
2387
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
2388
2388
|
this.value();
|
|
2389
2389
|
// ---
|
|
2390
|
-
|
|
2390
|
+
if (this.value() !== undefined) {
|
|
2391
|
+
this._value.set(this.value());
|
|
2392
|
+
}
|
|
2391
2393
|
}, {
|
|
2392
2394
|
// Enable writing to signals inside effects
|
|
2393
2395
|
});
|
|
@@ -2395,7 +2397,10 @@ class DBInput {
|
|
|
2395
2397
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
2396
2398
|
this._ref();
|
|
2397
2399
|
// ---
|
|
2398
|
-
|
|
2400
|
+
// If angular uses ngModel value and _value are null
|
|
2401
|
+
// then the value will be set afterward and the _ref will be refreshed
|
|
2402
|
+
const addResetListener = !(this.value() === null && this._value() === null);
|
|
2403
|
+
if (this._ref()?.nativeElement && addResetListener) {
|
|
2399
2404
|
const defaultValue = undefined;
|
|
2400
2405
|
let controller = this.abortController();
|
|
2401
2406
|
if (!controller) {
|
|
@@ -2513,7 +2518,7 @@ class DBInput {
|
|
|
2513
2518
|
[disabled]="getBoolean(disabled(), 'disabled')"
|
|
2514
2519
|
[required]="getBoolean(required(), 'required')"
|
|
2515
2520
|
[attr.step]="getStep(step())"
|
|
2516
|
-
[
|
|
2521
|
+
[value]="value() ?? _value()"
|
|
2517
2522
|
[attr.maxLength]="getNumber(maxLength(), maxlength())"
|
|
2518
2523
|
[attr.minLength]="getNumber(minLength(), minlength())"
|
|
2519
2524
|
[attr.max]="getInputValue(max(), type())"
|
|
@@ -2538,7 +2543,7 @@ class DBInput {
|
|
|
2538
2543
|
<datalist [attr.id]="_dataListId()">
|
|
2539
2544
|
@for (option of getDataList();track trackByOption0(i, option);let i =
|
|
2540
2545
|
$index) {
|
|
2541
|
-
<option [
|
|
2546
|
+
<option [value]="option.value">{{option.label}}</option>
|
|
2542
2547
|
}
|
|
2543
2548
|
</datalist>
|
|
2544
2549
|
}
|
|
@@ -2601,7 +2606,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2601
2606
|
[disabled]="getBoolean(disabled(), 'disabled')"
|
|
2602
2607
|
[required]="getBoolean(required(), 'required')"
|
|
2603
2608
|
[attr.step]="getStep(step())"
|
|
2604
|
-
[
|
|
2609
|
+
[value]="value() ?? _value()"
|
|
2605
2610
|
[attr.maxLength]="getNumber(maxLength(), maxlength())"
|
|
2606
2611
|
[attr.minLength]="getNumber(minLength(), minlength())"
|
|
2607
2612
|
[attr.max]="getInputValue(max(), type())"
|
|
@@ -2626,7 +2631,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2626
2631
|
<datalist [attr.id]="_dataListId()">
|
|
2627
2632
|
@for (option of getDataList();track trackByOption0(i, option);let i =
|
|
2628
2633
|
$index) {
|
|
2629
|
-
<option [
|
|
2634
|
+
<option [value]="option.value">{{option.label}}</option>
|
|
2630
2635
|
}
|
|
2631
2636
|
</datalist>
|
|
2632
2637
|
}
|
|
@@ -3221,6 +3226,14 @@ class DBCustomSelect {
|
|
|
3221
3226
|
activeElement.click();
|
|
3222
3227
|
event.preventDefault();
|
|
3223
3228
|
}
|
|
3229
|
+
else if (activeElement.getAttribute("type") === "search") {
|
|
3230
|
+
// When Enter is pressed in search field, select the first available option
|
|
3231
|
+
const firstOption = this._options()?.find((opt) => !opt.isGroupTitle && !opt.disabled);
|
|
3232
|
+
if (firstOption?.value) {
|
|
3233
|
+
this.handleSelect(firstOption.value);
|
|
3234
|
+
event.preventDefault();
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3224
3237
|
}
|
|
3225
3238
|
}
|
|
3226
3239
|
else if (event.key === "ArrowDown" ||
|
|
@@ -4464,7 +4477,7 @@ class DBDrawer {
|
|
|
4464
4477
|
const open = Boolean(this.open());
|
|
4465
4478
|
if (open && !this._ref()?.nativeElement.open) {
|
|
4466
4479
|
if (this.dialogContainerRef()?.nativeElement) {
|
|
4467
|
-
this.dialogContainerRef()
|
|
4480
|
+
(this.dialogContainerRef()?.nativeElement).removeAttribute("data-transition");
|
|
4468
4481
|
}
|
|
4469
4482
|
if (this.position() === "absolute" ||
|
|
4470
4483
|
this.backdrop() === "none" ||
|
|
@@ -4474,15 +4487,17 @@ class DBDrawer {
|
|
|
4474
4487
|
else {
|
|
4475
4488
|
this._ref()?.nativeElement.showModal();
|
|
4476
4489
|
}
|
|
4490
|
+
void delay(() => {
|
|
4491
|
+
if (this.dialogContainerRef()?.nativeElement) {
|
|
4492
|
+
(this.dialogContainerRef()?.nativeElement).dataset["transition"] = "open";
|
|
4493
|
+
}
|
|
4494
|
+
}, 1);
|
|
4477
4495
|
}
|
|
4478
4496
|
if (!open && this._ref()?.nativeElement.open) {
|
|
4479
4497
|
if (this.dialogContainerRef()?.nativeElement) {
|
|
4480
|
-
this.dialogContainerRef()
|
|
4498
|
+
(this.dialogContainerRef()?.nativeElement).dataset["transition"] = "close";
|
|
4481
4499
|
}
|
|
4482
|
-
delay(() => {
|
|
4483
|
-
if (this.dialogContainerRef()?.nativeElement) {
|
|
4484
|
-
this.dialogContainerRef().nativeElement.hidden = false;
|
|
4485
|
-
}
|
|
4500
|
+
void delay(() => {
|
|
4486
4501
|
this._ref()?.nativeElement?.close();
|
|
4487
4502
|
}, 401);
|
|
4488
4503
|
}
|
|
@@ -6236,7 +6251,7 @@ class DBRadio {
|
|
|
6236
6251
|
[attr.name]="name()"
|
|
6237
6252
|
[checked]="getBoolean(checked(), 'checked')"
|
|
6238
6253
|
[disabled]="getBoolean(disabled(), 'disabled')"
|
|
6239
|
-
[
|
|
6254
|
+
[value]="value()"
|
|
6240
6255
|
[required]="getBoolean(required(), 'required')"
|
|
6241
6256
|
(input)="handleInput($event)"
|
|
6242
6257
|
(change)="handleChange($event)"
|
|
@@ -6269,7 +6284,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
6269
6284
|
[attr.name]="name()"
|
|
6270
6285
|
[checked]="getBoolean(checked(), 'checked')"
|
|
6271
6286
|
[disabled]="getBoolean(disabled(), 'disabled')"
|
|
6272
|
-
[
|
|
6287
|
+
[value]="value()"
|
|
6273
6288
|
[required]="getBoolean(required(), 'required')"
|
|
6274
6289
|
(input)="handleInput($event)"
|
|
6275
6290
|
(change)="handleChange($event)"
|
|
@@ -6533,7 +6548,10 @@ class DBSelect {
|
|
|
6533
6548
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
6534
6549
|
this._ref();
|
|
6535
6550
|
// ---
|
|
6536
|
-
|
|
6551
|
+
// If angular uses ngModel value and _value are null
|
|
6552
|
+
// then the value will be set afterward and the _ref will be refreshed
|
|
6553
|
+
const addResetListener = !(this.value() === null && this._value() === null);
|
|
6554
|
+
if (this._ref()?.nativeElement && addResetListener) {
|
|
6537
6555
|
const defaultValue = undefined;
|
|
6538
6556
|
let controller = this.abortController();
|
|
6539
6557
|
if (!controller) {
|
|
@@ -7140,7 +7158,7 @@ class DBSwitch {
|
|
|
7140
7158
|
[attr.id]="_id()"
|
|
7141
7159
|
#_ref
|
|
7142
7160
|
[checked]="getBoolean(checked(), 'checked')"
|
|
7143
|
-
[
|
|
7161
|
+
[value]="value()"
|
|
7144
7162
|
[disabled]="getBoolean(disabled(), 'disabled')"
|
|
7145
7163
|
[attr.aria-invalid]="validation() === 'invalid' ? 'true' : undefined"
|
|
7146
7164
|
[attr.aria-describedby]="_descByIds()"
|
|
@@ -7209,7 +7227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
7209
7227
|
[attr.id]="_id()"
|
|
7210
7228
|
#_ref
|
|
7211
7229
|
[checked]="getBoolean(checked(), 'checked')"
|
|
7212
|
-
[
|
|
7230
|
+
[value]="value()"
|
|
7213
7231
|
[disabled]="getBoolean(disabled(), 'disabled')"
|
|
7214
7232
|
[attr.aria-invalid]="validation() === 'invalid' ? 'true' : undefined"
|
|
7215
7233
|
[attr.aria-describedby]="_descByIds()"
|
|
@@ -8103,7 +8121,9 @@ class DBTextarea {
|
|
|
8103
8121
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
8104
8122
|
this.value();
|
|
8105
8123
|
// ---
|
|
8106
|
-
|
|
8124
|
+
if (this.value() !== undefined) {
|
|
8125
|
+
this._value.set(this.value());
|
|
8126
|
+
}
|
|
8107
8127
|
}, {
|
|
8108
8128
|
// Enable writing to signals inside effects
|
|
8109
8129
|
});
|
|
@@ -8111,7 +8131,10 @@ class DBTextarea {
|
|
|
8111
8131
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
8112
8132
|
this._ref();
|
|
8113
8133
|
// ---
|
|
8114
|
-
|
|
8134
|
+
// If angular uses ngModel value and _value are null
|
|
8135
|
+
// then the value will be set afterward and the _ref will be refreshed
|
|
8136
|
+
const addResetListener = !(this.value() === null && this._value() === null);
|
|
8137
|
+
if (this._ref()?.nativeElement && addResetListener) {
|
|
8115
8138
|
const defaultValue = undefined;
|
|
8116
8139
|
let controller = this.abortController();
|
|
8117
8140
|
if (!controller) {
|
|
@@ -8227,7 +8250,7 @@ class DBTextarea {
|
|
|
8227
8250
|
(change)="handleChange($event)"
|
|
8228
8251
|
(blur)="handleBlur($event)"
|
|
8229
8252
|
(focus)="handleFocus($event)"
|
|
8230
|
-
[
|
|
8253
|
+
[value]="value() ?? _value()"
|
|
8231
8254
|
[attr.aria-describedby]="ariaDescribedBy() ?? _descByIds()"
|
|
8232
8255
|
[attr.placeholder]="placeholder() ?? DEFAULT_PLACEHOLDER"
|
|
8233
8256
|
[attr.rows]="getNumber(rows(), DEFAULT_ROWS)"
|
|
@@ -8296,7 +8319,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
8296
8319
|
(change)="handleChange($event)"
|
|
8297
8320
|
(blur)="handleBlur($event)"
|
|
8298
8321
|
(focus)="handleFocus($event)"
|
|
8299
|
-
[
|
|
8322
|
+
[value]="value() ?? _value()"
|
|
8300
8323
|
[attr.aria-describedby]="ariaDescribedBy() ?? _descByIds()"
|
|
8301
8324
|
[attr.placeholder]="placeholder() ?? DEFAULT_PLACEHOLDER"
|
|
8302
8325
|
[attr.rows]="getNumber(rows(), DEFAULT_ROWS)"
|