rd-outer-component 0.0.73 → 0.0.74
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/esm2020/lib/modules/custom-input/custom-input.component.mjs +7 -7
- package/esm2020/lib/modules/custom-input-amount/custom-input-amount.component.mjs +5 -5
- package/esm2020/lib/modules/custom-select/custom-select.component.mjs +2 -2
- package/esm2020/lib/modules/custom-textarea/custom-textarea.component.mjs +4 -4
- package/esm2020/lib/utils/form-vaild-lang.mjs +7 -7
- package/fesm2015/rd-outer-component.mjs +20 -20
- package/fesm2015/rd-outer-component.mjs.map +1 -1
- package/fesm2020/rd-outer-component.mjs +20 -20
- package/fesm2020/rd-outer-component.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -246,13 +246,13 @@ function numberToBig(value, precision = 6, mode = 'cut') {
|
|
|
246
246
|
|
|
247
247
|
const translations = {
|
|
248
248
|
en: {
|
|
249
|
-
pleaseEnter: 'Please enter',
|
|
250
|
-
lengthCannotBeLess: 'Length cannot be less than the minimum length',
|
|
251
|
-
lengthCannotExceed: 'Length cannot exceed the maximum length',
|
|
249
|
+
pleaseEnter: 'Please enter ',
|
|
250
|
+
lengthCannotBeLess: ' Length cannot be less than the minimum length ',
|
|
251
|
+
lengthCannotExceed: ' Length cannot exceed the maximum length ',
|
|
252
252
|
validationFailed: 'Validation failed',
|
|
253
|
-
cannotBeLessThan: 'cannot be less than the minimum value',
|
|
254
|
-
cannotExceed: 'cannot exceed the maximum value',
|
|
255
|
-
maxDecimalPlaces: 'The maximum number of decimal places is',
|
|
253
|
+
cannotBeLessThan: ' cannot be less than the minimum value ',
|
|
254
|
+
cannotExceed: ' cannot exceed the maximum value ',
|
|
255
|
+
maxDecimalPlaces: 'The maximum number of decimal places is ',
|
|
256
256
|
clearFilter: 'Clear filter',
|
|
257
257
|
},
|
|
258
258
|
zh: {
|
|
@@ -279,22 +279,22 @@ class CustomInputComponent {
|
|
|
279
279
|
switch (firstError) {
|
|
280
280
|
case 'required':
|
|
281
281
|
return (msg ||
|
|
282
|
-
`${getTranslation(this.lang, 'pleaseEnter')}
|
|
282
|
+
`${getTranslation(this.lang, 'pleaseEnter')}${this.label.toLowerCase()}`);
|
|
283
283
|
case 'min':
|
|
284
284
|
return (msg ||
|
|
285
|
-
`${this.label}
|
|
285
|
+
`${this.label}${getTranslation(this.lang, 'cannotBeLessThan')}${formatBigNumber(this.min)}`);
|
|
286
286
|
case 'max':
|
|
287
287
|
return (msg ||
|
|
288
|
-
`${this.label} ${getTranslation(this.lang, 'cannotExceed')}
|
|
288
|
+
`${this.label} ${getTranslation(this.lang, 'cannotExceed')}${formatBigNumber(this.max)}`);
|
|
289
289
|
case 'precision':
|
|
290
290
|
return (msg ||
|
|
291
|
-
`${getTranslation(this.lang, 'maxDecimalPlaces')}
|
|
291
|
+
`${getTranslation(this.lang, 'maxDecimalPlaces')}${this.maskNumber}`);
|
|
292
292
|
case 'minLength':
|
|
293
293
|
return (msg ||
|
|
294
|
-
`${getTranslation(this.lang, 'lengthCannotBeLess')}
|
|
294
|
+
`${getTranslation(this.lang, 'lengthCannotBeLess')}${this.minLength}`);
|
|
295
295
|
case 'maxLength':
|
|
296
296
|
return (msg ||
|
|
297
|
-
`${getTranslation(this.lang, 'lengthCannotExceed')}
|
|
297
|
+
`${getTranslation(this.lang, 'lengthCannotExceed')}${this.maxLength}`);
|
|
298
298
|
case 'custom':
|
|
299
299
|
return (this.control?.errors['custom'] ||
|
|
300
300
|
getTranslation(this.lang, 'validationFailed'));
|
|
@@ -533,13 +533,13 @@ class CustomTextareaComponent {
|
|
|
533
533
|
switch (firstError) {
|
|
534
534
|
case 'required':
|
|
535
535
|
return (msg ||
|
|
536
|
-
`${getTranslation(this.lang, 'pleaseEnter')}
|
|
536
|
+
`${getTranslation(this.lang, 'pleaseEnter')}${this.label.toLowerCase()}`);
|
|
537
537
|
case 'minLength':
|
|
538
538
|
return (msg ||
|
|
539
|
-
`${getTranslation(this.lang, 'lengthCannotBeLess')}
|
|
539
|
+
`${getTranslation(this.lang, 'lengthCannotBeLess')}${this.minLength}`);
|
|
540
540
|
case 'maxLength':
|
|
541
541
|
return (msg ||
|
|
542
|
-
`${getTranslation(this.lang, 'lengthCannotExceed')}
|
|
542
|
+
`${getTranslation(this.lang, 'lengthCannotExceed')}${this.maxLength}`);
|
|
543
543
|
case 'custom':
|
|
544
544
|
return (this.control?.errors['custom'] ||
|
|
545
545
|
getTranslation(this.lang, 'validationFailed'));
|
|
@@ -749,16 +749,16 @@ class CustomInputAmountComponent {
|
|
|
749
749
|
switch (firstError) {
|
|
750
750
|
case 'required':
|
|
751
751
|
return (msg ||
|
|
752
|
-
`${getTranslation(this.lang, 'pleaseEnter')}
|
|
752
|
+
`${getTranslation(this.lang, 'pleaseEnter')}${this.label.toLowerCase()}`);
|
|
753
753
|
case 'min':
|
|
754
754
|
return (msg ||
|
|
755
|
-
`${this.label}
|
|
755
|
+
`${this.label}${getTranslation(this.lang, 'cannotBeLessThan')}${formatBigNumber(this.min)}`);
|
|
756
756
|
case 'max':
|
|
757
757
|
return (msg ||
|
|
758
|
-
`${this.label} ${getTranslation(this.lang, 'cannotExceed')}
|
|
758
|
+
`${this.label} ${getTranslation(this.lang, 'cannotExceed')}${formatBigNumber(this.max)}`);
|
|
759
759
|
case 'precision':
|
|
760
760
|
return (msg ||
|
|
761
|
-
`${getTranslation(this.lang, 'maxDecimalPlaces')}
|
|
761
|
+
`${getTranslation(this.lang, 'maxDecimalPlaces')}${this.nzPrecision}`);
|
|
762
762
|
case 'custom':
|
|
763
763
|
return (this.control?.errors['custom'] ||
|
|
764
764
|
getTranslation(this.lang, 'validationFailed'));
|
|
@@ -1075,7 +1075,7 @@ class CustomSelectComponent {
|
|
|
1075
1075
|
switch (firstError) {
|
|
1076
1076
|
case 'required':
|
|
1077
1077
|
return (msg ||
|
|
1078
|
-
`${getTranslation(this.lang, 'pleaseEnter')}
|
|
1078
|
+
`${getTranslation(this.lang, 'pleaseEnter')}${this.label.toLowerCase()}`);
|
|
1079
1079
|
case 'custom':
|
|
1080
1080
|
return (this.control?.errors['custom'] ||
|
|
1081
1081
|
getTranslation(this.lang, 'validationFailed'));
|