@db-ux/ngx-core-components 4.13.1-angular-signal-forms9-42cbbed → 4.13.1-angular-signal-forms10-4a8c8e1
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.
|
@@ -1470,7 +1470,7 @@ class DBCheckbox {
|
|
|
1470
1470
|
const signalFormErrors = this.errors();
|
|
1471
1471
|
if (Array.isArray(signalFormErrors) && signalFormErrors.length > 0) {
|
|
1472
1472
|
this._descByIds.set(this._invalidMessageId());
|
|
1473
|
-
this._invalidMessage.set(signalFormErrors[0].message
|
|
1473
|
+
this._invalidMessage.set(this.invalidMessage() || signalFormErrors[0].message || this._ref()?.nativeElement?.validationMessage || DEFAULT_INVALID_MESSAGE);
|
|
1474
1474
|
this._validMessage.set('');
|
|
1475
1475
|
this._valid.set('invalid');
|
|
1476
1476
|
if (hasVoiceOver()) {
|
|
@@ -1530,6 +1530,7 @@ class DBCheckbox {
|
|
|
1530
1530
|
this.handleValidation();
|
|
1531
1531
|
}
|
|
1532
1532
|
handleBlur(event) {
|
|
1533
|
+
this.propagateTouched();
|
|
1533
1534
|
if (this.blur) {
|
|
1534
1535
|
this.blur.emit(event);
|
|
1535
1536
|
}
|
|
@@ -1614,6 +1615,14 @@ class DBCheckbox {
|
|
|
1614
1615
|
/** @internal Signal Forms validation state */
|
|
1615
1616
|
this._valid = signal(undefined, ...(ngDevMode ? [{ debugName: "_valid" }] : /* istanbul ignore next */ []));
|
|
1616
1617
|
if (typeof window !== "undefined") {
|
|
1618
|
+
// Signal Forms: re-run validation when errors or validation prop changes externally
|
|
1619
|
+
effect(() => {
|
|
1620
|
+
this.errors();
|
|
1621
|
+
this.validation();
|
|
1622
|
+
this.handleValidation();
|
|
1623
|
+
}, Number(VERSION.major) < 19
|
|
1624
|
+
? { allowSignalWrites: true }
|
|
1625
|
+
: undefined);
|
|
1617
1626
|
effect(() => {
|
|
1618
1627
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
1619
1628
|
this.id();
|
|
@@ -1770,8 +1779,11 @@ class DBCheckbox {
|
|
|
1770
1779
|
}
|
|
1771
1780
|
/** @legacy CVA - will be removed in a future major version */
|
|
1772
1781
|
registerOnTouched(onTouched) {
|
|
1782
|
+
this.propagateTouched = onTouched;
|
|
1773
1783
|
}
|
|
1774
1784
|
/** @legacy CVA - will be removed in a future major version */
|
|
1785
|
+
propagateTouched() { }
|
|
1786
|
+
/** @legacy CVA - will be removed in a future major version */
|
|
1775
1787
|
setDisabledState(disabled) {
|
|
1776
1788
|
this.disabled.set(disabled);
|
|
1777
1789
|
}
|
|
@@ -2748,8 +2760,11 @@ class DBCustomSelectListItem {
|
|
|
2748
2760
|
}
|
|
2749
2761
|
/** @legacy CVA - will be removed in a future major version */
|
|
2750
2762
|
registerOnTouched(onTouched) {
|
|
2763
|
+
this.propagateTouched = onTouched;
|
|
2751
2764
|
}
|
|
2752
2765
|
/** @legacy CVA - will be removed in a future major version */
|
|
2766
|
+
propagateTouched() { }
|
|
2767
|
+
/** @legacy CVA - will be removed in a future major version */
|
|
2753
2768
|
setDisabledState(disabled) {
|
|
2754
2769
|
this.disabled.set(disabled);
|
|
2755
2770
|
}
|
|
@@ -2980,7 +2995,7 @@ class DBInput {
|
|
|
2980
2995
|
const signalFormErrors = this.errors();
|
|
2981
2996
|
if (Array.isArray(signalFormErrors) && signalFormErrors.length > 0) {
|
|
2982
2997
|
this._descByIds.set(this._invalidMessageId());
|
|
2983
|
-
this._invalidMessage.set(signalFormErrors[0].message
|
|
2998
|
+
this._invalidMessage.set(this.invalidMessage() || signalFormErrors[0].message || this._ref()?.nativeElement?.validationMessage || DEFAULT_INVALID_MESSAGE);
|
|
2984
2999
|
this._validMessage.set('');
|
|
2985
3000
|
this._valid.set('invalid');
|
|
2986
3001
|
if (hasVoiceOver()) {
|
|
@@ -3052,6 +3067,7 @@ class DBInput {
|
|
|
3052
3067
|
this.handleValidation();
|
|
3053
3068
|
}
|
|
3054
3069
|
handleBlur(event) {
|
|
3070
|
+
this.propagateTouched();
|
|
3055
3071
|
if (this.blur) {
|
|
3056
3072
|
this.blur.emit(event);
|
|
3057
3073
|
}
|
|
@@ -3188,6 +3204,14 @@ class DBInput {
|
|
|
3188
3204
|
/** @internal Signal Forms validation state */
|
|
3189
3205
|
this._valid = signal(undefined, ...(ngDevMode ? [{ debugName: "_valid" }] : /* istanbul ignore next */ []));
|
|
3190
3206
|
if (typeof window !== "undefined") {
|
|
3207
|
+
// Signal Forms: re-run validation when errors or validation prop changes externally
|
|
3208
|
+
effect(() => {
|
|
3209
|
+
this.errors();
|
|
3210
|
+
this.validation();
|
|
3211
|
+
this.handleValidation();
|
|
3212
|
+
}, Number(VERSION.major) < 19
|
|
3213
|
+
? { allowSignalWrites: true }
|
|
3214
|
+
: undefined);
|
|
3191
3215
|
effect(() => {
|
|
3192
3216
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
3193
3217
|
this.id();
|
|
@@ -3325,8 +3349,11 @@ class DBInput {
|
|
|
3325
3349
|
}
|
|
3326
3350
|
/** @legacy CVA - will be removed in a future major version */
|
|
3327
3351
|
registerOnTouched(onTouched) {
|
|
3352
|
+
this.propagateTouched = onTouched;
|
|
3328
3353
|
}
|
|
3329
3354
|
/** @legacy CVA - will be removed in a future major version */
|
|
3355
|
+
propagateTouched() { }
|
|
3356
|
+
/** @legacy CVA - will be removed in a future major version */
|
|
3330
3357
|
setDisabledState(disabled) {
|
|
3331
3358
|
this.disabled.set(disabled);
|
|
3332
3359
|
}
|
|
@@ -4046,7 +4073,7 @@ class DBCustomSelect {
|
|
|
4046
4073
|
const signalFormErrors = this.errors();
|
|
4047
4074
|
if (Array.isArray(signalFormErrors) && signalFormErrors.length > 0) {
|
|
4048
4075
|
this._descByIds.set(this._invalidMessageId());
|
|
4049
|
-
this._invalidMessage.set(signalFormErrors[0].message
|
|
4076
|
+
this._invalidMessage.set(this.invalidMessage() || signalFormErrors[0].message || this._ref()?.nativeElement?.validationMessage || DEFAULT_INVALID_MESSAGE);
|
|
4050
4077
|
this._validMessage.set('');
|
|
4051
4078
|
this._valid.set('invalid');
|
|
4052
4079
|
this._validity.set('invalid');
|
|
@@ -4660,6 +4687,14 @@ class DBCustomSelect {
|
|
|
4660
4687
|
this.value.set(vals ?? []);
|
|
4661
4688
|
}, ...(ngDevMode ? [{ debugName: "_syncValuesToValue" }] : /* istanbul ignore next */ []));
|
|
4662
4689
|
if (typeof window !== "undefined") {
|
|
4690
|
+
// Signal Forms: re-run validation when errors or validation prop changes externally
|
|
4691
|
+
effect(() => {
|
|
4692
|
+
this.errors();
|
|
4693
|
+
this.validation();
|
|
4694
|
+
this.handleValidation();
|
|
4695
|
+
}, Number(VERSION.major) < 19
|
|
4696
|
+
? { allowSignalWrites: true }
|
|
4697
|
+
: undefined);
|
|
4663
4698
|
effect(() => {
|
|
4664
4699
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
4665
4700
|
this.id();
|
|
@@ -5003,8 +5038,11 @@ class DBCustomSelect {
|
|
|
5003
5038
|
}
|
|
5004
5039
|
/** @legacy CVA - will be removed in a future major version */
|
|
5005
5040
|
registerOnTouched(onTouched) {
|
|
5041
|
+
this.propagateTouched = onTouched;
|
|
5006
5042
|
}
|
|
5007
5043
|
/** @legacy CVA - will be removed in a future major version */
|
|
5044
|
+
propagateTouched() { }
|
|
5045
|
+
/** @legacy CVA - will be removed in a future major version */
|
|
5008
5046
|
setDisabledState(disabled) {
|
|
5009
5047
|
this.disabled.set(disabled);
|
|
5010
5048
|
}
|
|
@@ -7684,6 +7722,7 @@ class DBRadio {
|
|
|
7684
7722
|
handleFrameworkEventAngular(this, event);
|
|
7685
7723
|
}
|
|
7686
7724
|
handleBlur(event) {
|
|
7725
|
+
this.propagateTouched();
|
|
7687
7726
|
if (this.blur) {
|
|
7688
7727
|
this.blur.emit(event);
|
|
7689
7728
|
}
|
|
@@ -7871,8 +7910,11 @@ class DBRadio {
|
|
|
7871
7910
|
}
|
|
7872
7911
|
/** @legacy CVA - will be removed in a future major version */
|
|
7873
7912
|
registerOnTouched(onTouched) {
|
|
7913
|
+
this.propagateTouched = onTouched;
|
|
7874
7914
|
}
|
|
7875
7915
|
/** @legacy CVA - will be removed in a future major version */
|
|
7916
|
+
propagateTouched() { }
|
|
7917
|
+
/** @legacy CVA - will be removed in a future major version */
|
|
7876
7918
|
setDisabledState(disabled) {
|
|
7877
7919
|
this.disabled.set(disabled);
|
|
7878
7920
|
}
|
|
@@ -8078,7 +8120,7 @@ class DBSelect {
|
|
|
8078
8120
|
const signalFormErrors = this.errors();
|
|
8079
8121
|
if (Array.isArray(signalFormErrors) && signalFormErrors.length > 0) {
|
|
8080
8122
|
this._descByIds.set(this._invalidMessageId());
|
|
8081
|
-
this._invalidMessage.set(signalFormErrors[0].message
|
|
8123
|
+
this._invalidMessage.set(this.invalidMessage() || signalFormErrors[0].message || this._ref()?.nativeElement?.validationMessage || DEFAULT_INVALID_MESSAGE);
|
|
8082
8124
|
this._validMessage.set('');
|
|
8083
8125
|
this._valid.set('invalid');
|
|
8084
8126
|
if (hasVoiceOver()) {
|
|
@@ -8155,6 +8197,7 @@ class DBSelect {
|
|
|
8155
8197
|
this.handleValidation();
|
|
8156
8198
|
}
|
|
8157
8199
|
handleBlur(event) {
|
|
8200
|
+
this.propagateTouched();
|
|
8158
8201
|
if (this.blur) {
|
|
8159
8202
|
this.blur.emit(event);
|
|
8160
8203
|
}
|
|
@@ -8270,6 +8313,14 @@ class DBSelect {
|
|
|
8270
8313
|
/** @internal Signal Forms validation state */
|
|
8271
8314
|
this._valid = signal(undefined, ...(ngDevMode ? [{ debugName: "_valid" }] : /* istanbul ignore next */ []));
|
|
8272
8315
|
if (typeof window !== "undefined") {
|
|
8316
|
+
// Signal Forms: re-run validation when errors or validation prop changes externally
|
|
8317
|
+
effect(() => {
|
|
8318
|
+
this.errors();
|
|
8319
|
+
this.validation();
|
|
8320
|
+
this.handleValidation();
|
|
8321
|
+
}, Number(VERSION.major) < 19
|
|
8322
|
+
? { allowSignalWrites: true }
|
|
8323
|
+
: undefined);
|
|
8273
8324
|
effect(() => {
|
|
8274
8325
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
8275
8326
|
this.id();
|
|
@@ -8416,8 +8467,11 @@ class DBSelect {
|
|
|
8416
8467
|
}
|
|
8417
8468
|
/** @legacy CVA - will be removed in a future major version */
|
|
8418
8469
|
registerOnTouched(onTouched) {
|
|
8470
|
+
this.propagateTouched = onTouched;
|
|
8419
8471
|
}
|
|
8420
8472
|
/** @legacy CVA - will be removed in a future major version */
|
|
8473
|
+
propagateTouched() { }
|
|
8474
|
+
/** @legacy CVA - will be removed in a future major version */
|
|
8421
8475
|
setDisabledState(disabled) {
|
|
8422
8476
|
this.disabled.set(disabled);
|
|
8423
8477
|
}
|
|
@@ -8792,7 +8846,7 @@ class DBSwitch {
|
|
|
8792
8846
|
const signalFormErrors = this.errors();
|
|
8793
8847
|
if (Array.isArray(signalFormErrors) && signalFormErrors.length > 0) {
|
|
8794
8848
|
this._descByIds.set(this._invalidMessageId());
|
|
8795
|
-
this._invalidMessage.set(signalFormErrors[0].message
|
|
8849
|
+
this._invalidMessage.set(this.invalidMessage() || signalFormErrors[0].message || this._ref()?.nativeElement?.validationMessage || DEFAULT_INVALID_MESSAGE);
|
|
8796
8850
|
this._validMessage.set('');
|
|
8797
8851
|
this._valid.set('invalid');
|
|
8798
8852
|
if (hasVoiceOver()) {
|
|
@@ -8856,6 +8910,7 @@ class DBSwitch {
|
|
|
8856
8910
|
handleFrameworkEventAngular(this, event, "checked");
|
|
8857
8911
|
}
|
|
8858
8912
|
handleBlur(event) {
|
|
8913
|
+
this.propagateTouched();
|
|
8859
8914
|
if (this.blur) {
|
|
8860
8915
|
this.blur.emit(event);
|
|
8861
8916
|
}
|
|
@@ -8953,6 +9008,14 @@ class DBSwitch {
|
|
|
8953
9008
|
/** @internal Signal Forms validation state */
|
|
8954
9009
|
this._valid = signal(undefined, ...(ngDevMode ? [{ debugName: "_valid" }] : /* istanbul ignore next */ []));
|
|
8955
9010
|
if (typeof window !== "undefined") {
|
|
9011
|
+
// Signal Forms: re-run validation when errors or validation prop changes externally
|
|
9012
|
+
effect(() => {
|
|
9013
|
+
this.errors();
|
|
9014
|
+
this.validation();
|
|
9015
|
+
this.handleValidation();
|
|
9016
|
+
}, Number(VERSION.major) < 19
|
|
9017
|
+
? { allowSignalWrites: true }
|
|
9018
|
+
: undefined);
|
|
8956
9019
|
effect(() => {
|
|
8957
9020
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
8958
9021
|
this.id();
|
|
@@ -9074,8 +9137,11 @@ class DBSwitch {
|
|
|
9074
9137
|
}
|
|
9075
9138
|
/** @legacy CVA - will be removed in a future major version */
|
|
9076
9139
|
registerOnTouched(onTouched) {
|
|
9140
|
+
this.propagateTouched = onTouched;
|
|
9077
9141
|
}
|
|
9078
9142
|
/** @legacy CVA - will be removed in a future major version */
|
|
9143
|
+
propagateTouched() { }
|
|
9144
|
+
/** @legacy CVA - will be removed in a future major version */
|
|
9079
9145
|
setDisabledState(disabled) {
|
|
9080
9146
|
this.disabled.set(disabled);
|
|
9081
9147
|
}
|
|
@@ -9401,8 +9467,11 @@ class DBTabItem {
|
|
|
9401
9467
|
}
|
|
9402
9468
|
/** @legacy CVA - will be removed in a future major version */
|
|
9403
9469
|
registerOnTouched(onTouched) {
|
|
9470
|
+
this.propagateTouched = onTouched;
|
|
9404
9471
|
}
|
|
9405
9472
|
/** @legacy CVA - will be removed in a future major version */
|
|
9473
|
+
propagateTouched() { }
|
|
9474
|
+
/** @legacy CVA - will be removed in a future major version */
|
|
9406
9475
|
setDisabledState(disabled) {
|
|
9407
9476
|
this.disabled.set(disabled);
|
|
9408
9477
|
}
|
|
@@ -11192,7 +11261,7 @@ class DBTextarea {
|
|
|
11192
11261
|
const signalFormErrors = this.errors();
|
|
11193
11262
|
if (Array.isArray(signalFormErrors) && signalFormErrors.length > 0) {
|
|
11194
11263
|
this._descByIds.set(this._invalidMessageId());
|
|
11195
|
-
this._invalidMessage.set(signalFormErrors[0].message
|
|
11264
|
+
this._invalidMessage.set(this.invalidMessage() || signalFormErrors[0].message || this._ref()?.nativeElement?.validationMessage || DEFAULT_INVALID_MESSAGE);
|
|
11196
11265
|
this._validMessage.set('');
|
|
11197
11266
|
this._valid.set('invalid');
|
|
11198
11267
|
if (hasVoiceOver()) {
|
|
@@ -11261,6 +11330,7 @@ class DBTextarea {
|
|
|
11261
11330
|
this.handleValidation();
|
|
11262
11331
|
}
|
|
11263
11332
|
handleBlur(event) {
|
|
11333
|
+
this.propagateTouched();
|
|
11264
11334
|
if (this.blur) {
|
|
11265
11335
|
this.blur.emit(event);
|
|
11266
11336
|
}
|
|
@@ -11364,6 +11434,14 @@ class DBTextarea {
|
|
|
11364
11434
|
/** @internal Signal Forms validation state */
|
|
11365
11435
|
this._valid = signal(undefined, ...(ngDevMode ? [{ debugName: "_valid" }] : /* istanbul ignore next */ []));
|
|
11366
11436
|
if (typeof window !== "undefined") {
|
|
11437
|
+
// Signal Forms: re-run validation when errors or validation prop changes externally
|
|
11438
|
+
effect(() => {
|
|
11439
|
+
this.errors();
|
|
11440
|
+
this.validation();
|
|
11441
|
+
this.handleValidation();
|
|
11442
|
+
}, Number(VERSION.major) < 19
|
|
11443
|
+
? { allowSignalWrites: true }
|
|
11444
|
+
: undefined);
|
|
11367
11445
|
effect(() => {
|
|
11368
11446
|
// --- Mitosis: Workaround to make sure the effect() is triggered ---
|
|
11369
11447
|
this.id();
|
|
@@ -11500,8 +11578,11 @@ class DBTextarea {
|
|
|
11500
11578
|
}
|
|
11501
11579
|
/** @legacy CVA - will be removed in a future major version */
|
|
11502
11580
|
registerOnTouched(onTouched) {
|
|
11581
|
+
this.propagateTouched = onTouched;
|
|
11503
11582
|
}
|
|
11504
11583
|
/** @legacy CVA - will be removed in a future major version */
|
|
11584
|
+
propagateTouched() { }
|
|
11585
|
+
/** @legacy CVA - will be removed in a future major version */
|
|
11505
11586
|
setDisabledState(disabled) {
|
|
11506
11587
|
this.disabled.set(disabled);
|
|
11507
11588
|
}
|