@vuetify/nightly 3.8.5-master.2025-05-14 → 3.8.5-master.2025-05-15
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 +10 -3
- package/dist/json/attributes.json +3103 -3103
- package/dist/json/importMap-labs.json +6 -6
- package/dist/json/importMap.json +140 -140
- package/dist/json/web-types.json +5966 -5966
- package/dist/vuetify-labs.cjs +13 -31
- package/dist/vuetify-labs.css +3666 -3666
- package/dist/vuetify-labs.d.ts +590 -587
- package/dist/vuetify-labs.esm.js +13 -31
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +13 -31
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +13 -31
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +2923 -2923
- package/dist/vuetify.d.ts +502 -499
- package/dist/vuetify.esm.js +13 -31
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +13 -31
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +570 -568
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAutocomplete/VAutocomplete.d.ts +84 -84
- package/lib/components/VCheckbox/VCheckbox.d.ts +12 -12
- package/lib/components/VCombobox/VCombobox.d.ts +84 -84
- package/lib/components/VFileInput/VFileInput.d.ts +30 -30
- package/lib/components/VInput/VInput.d.ts +12 -12
- package/lib/components/VNumberInput/VNumberInput.d.ts +80 -80
- package/lib/components/VRadioGroup/VRadioGroup.d.ts +12 -12
- package/lib/components/VRangeSlider/VRangeSlider.d.ts +12 -12
- package/lib/components/VSelect/VSelect.d.ts +84 -84
- package/lib/components/VSlider/VSlider.d.ts +12 -12
- package/lib/components/VSwitch/VSwitch.d.ts +12 -12
- package/lib/components/VTextField/VTextField.d.ts +30 -30
- package/lib/components/VTextarea/VTextarea.d.ts +30 -30
- package/lib/components/VValidation/VValidation.d.ts +8 -8
- package/lib/composables/validation.d.ts +6 -5
- package/lib/composables/validation.js +4 -29
- package/lib/composables/validation.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +44 -44
- package/lib/framework.js +1 -1
- package/lib/labs/VColorInput/VColorInput.d.ts +12 -12
- package/lib/labs/VDateInput/VDateInput.d.ts +84 -84
- package/lib/labs/rules/rules.d.ts +9 -5
- package/lib/labs/rules/rules.js +73 -51
- package/lib/labs/rules/rules.js.map +1 -1
- package/package.json +1 -1
@@ -268,14 +268,14 @@ export declare const makeVTextareaProps: <Defaults extends {
|
|
268
268
|
default: unknown extends Defaults["readonly"] ? boolean | null : NonNullable<boolean | null> | Defaults["readonly"];
|
269
269
|
};
|
270
270
|
rules: unknown extends Defaults["rules"] ? {
|
271
|
-
type: PropType<readonly import("../../types.js").ValidationRule[]>;
|
271
|
+
type: PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
272
272
|
default: () => never[];
|
273
273
|
} : Omit<{
|
274
|
-
type: PropType<readonly import("../../types.js").ValidationRule[]>;
|
274
|
+
type: PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
275
275
|
default: () => never[];
|
276
276
|
}, "type" | "default"> & {
|
277
|
-
type: PropType<unknown extends Defaults["rules"] ? readonly import("../../
|
278
|
-
default: unknown extends Defaults["rules"] ? readonly import("../../
|
277
|
+
type: PropType<unknown extends Defaults["rules"] ? readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] : readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] | Defaults["rules"]>;
|
278
|
+
default: unknown extends Defaults["rules"] ? readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] : readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[] | Defaults["rules"];
|
279
279
|
};
|
280
280
|
modelValue: unknown extends Defaults["modelValue"] ? null : {
|
281
281
|
type: PropType<unknown extends Defaults["modelValue"] ? any : any>;
|
@@ -451,7 +451,7 @@ export declare const VTextarea: {
|
|
451
451
|
disabled: boolean;
|
452
452
|
readonly: boolean | null;
|
453
453
|
messages: string | readonly string[];
|
454
|
-
rules: readonly import("../../
|
454
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
455
455
|
focused: boolean;
|
456
456
|
errorMessages: string | readonly string[] | null;
|
457
457
|
maxErrors: string | number;
|
@@ -574,7 +574,7 @@ export declare const VTextarea: {
|
|
574
574
|
disabled: boolean | null;
|
575
575
|
readonly: boolean | null;
|
576
576
|
messages: string | readonly string[];
|
577
|
-
rules: readonly import("../../
|
577
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
578
578
|
focused: boolean;
|
579
579
|
errorMessages: string | readonly string[] | null;
|
580
580
|
maxErrors: string | number;
|
@@ -590,7 +590,7 @@ export declare const VTextarea: {
|
|
590
590
|
disabled: boolean | null;
|
591
591
|
readonly: boolean | null;
|
592
592
|
messages: string | readonly string[];
|
593
|
-
rules: readonly import("../../
|
593
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
594
594
|
focused: boolean;
|
595
595
|
errorMessages: string | readonly string[] | null;
|
596
596
|
maxErrors: string | number;
|
@@ -645,7 +645,7 @@ export declare const VTextarea: {
|
|
645
645
|
disabled: boolean | null;
|
646
646
|
readonly: boolean | null;
|
647
647
|
messages: string | readonly string[];
|
648
|
-
rules: readonly import("../../
|
648
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
649
649
|
focused: boolean;
|
650
650
|
errorMessages: string | readonly string[] | null;
|
651
651
|
maxErrors: string | number;
|
@@ -690,7 +690,7 @@ export declare const VTextarea: {
|
|
690
690
|
disabled: boolean | null;
|
691
691
|
readonly: boolean | null;
|
692
692
|
messages: string | readonly string[];
|
693
|
-
rules: readonly import("../../
|
693
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
694
694
|
focused: boolean;
|
695
695
|
errorMessages: string | readonly string[] | null;
|
696
696
|
maxErrors: string | number;
|
@@ -732,7 +732,7 @@ export declare const VTextarea: {
|
|
732
732
|
disabled: boolean | null;
|
733
733
|
readonly: boolean | null;
|
734
734
|
messages: string | readonly string[];
|
735
|
-
rules: readonly import("../../
|
735
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
736
736
|
focused: boolean;
|
737
737
|
errorMessages: string | readonly string[] | null;
|
738
738
|
maxErrors: string | number;
|
@@ -748,7 +748,7 @@ export declare const VTextarea: {
|
|
748
748
|
disabled: boolean | null;
|
749
749
|
readonly: boolean | null;
|
750
750
|
messages: string | readonly string[];
|
751
|
-
rules: readonly import("../../
|
751
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
752
752
|
focused: boolean;
|
753
753
|
errorMessages: string | readonly string[] | null;
|
754
754
|
maxErrors: string | number;
|
@@ -812,7 +812,7 @@ export declare const VTextarea: {
|
|
812
812
|
disabled: boolean;
|
813
813
|
readonly: boolean | null;
|
814
814
|
messages: string | readonly string[];
|
815
|
-
rules: readonly import("../../
|
815
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
816
816
|
focused: boolean;
|
817
817
|
errorMessages: string | readonly string[] | null;
|
818
818
|
maxErrors: string | number;
|
@@ -868,7 +868,7 @@ export declare const VTextarea: {
|
|
868
868
|
disabled: boolean;
|
869
869
|
readonly: boolean | null;
|
870
870
|
messages: string | readonly string[];
|
871
|
-
rules: readonly import("../../
|
871
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
872
872
|
focused: boolean;
|
873
873
|
errorMessages: string | readonly string[] | null;
|
874
874
|
maxErrors: string | number;
|
@@ -991,7 +991,7 @@ export declare const VTextarea: {
|
|
991
991
|
disabled: boolean | null;
|
992
992
|
readonly: boolean | null;
|
993
993
|
messages: string | readonly string[];
|
994
|
-
rules: readonly import("../../
|
994
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
995
995
|
focused: boolean;
|
996
996
|
errorMessages: string | readonly string[] | null;
|
997
997
|
maxErrors: string | number;
|
@@ -1007,7 +1007,7 @@ export declare const VTextarea: {
|
|
1007
1007
|
disabled: boolean | null;
|
1008
1008
|
readonly: boolean | null;
|
1009
1009
|
messages: string | readonly string[];
|
1010
|
-
rules: readonly import("../../
|
1010
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1011
1011
|
focused: boolean;
|
1012
1012
|
errorMessages: string | readonly string[] | null;
|
1013
1013
|
maxErrors: string | number;
|
@@ -1062,7 +1062,7 @@ export declare const VTextarea: {
|
|
1062
1062
|
disabled: boolean | null;
|
1063
1063
|
readonly: boolean | null;
|
1064
1064
|
messages: string | readonly string[];
|
1065
|
-
rules: readonly import("../../
|
1065
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1066
1066
|
focused: boolean;
|
1067
1067
|
errorMessages: string | readonly string[] | null;
|
1068
1068
|
maxErrors: string | number;
|
@@ -1107,7 +1107,7 @@ export declare const VTextarea: {
|
|
1107
1107
|
disabled: boolean | null;
|
1108
1108
|
readonly: boolean | null;
|
1109
1109
|
messages: string | readonly string[];
|
1110
|
-
rules: readonly import("../../
|
1110
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1111
1111
|
focused: boolean;
|
1112
1112
|
errorMessages: string | readonly string[] | null;
|
1113
1113
|
maxErrors: string | number;
|
@@ -1149,7 +1149,7 @@ export declare const VTextarea: {
|
|
1149
1149
|
disabled: boolean | null;
|
1150
1150
|
readonly: boolean | null;
|
1151
1151
|
messages: string | readonly string[];
|
1152
|
-
rules: readonly import("../../
|
1152
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1153
1153
|
focused: boolean;
|
1154
1154
|
errorMessages: string | readonly string[] | null;
|
1155
1155
|
maxErrors: string | number;
|
@@ -1165,7 +1165,7 @@ export declare const VTextarea: {
|
|
1165
1165
|
disabled: boolean | null;
|
1166
1166
|
readonly: boolean | null;
|
1167
1167
|
messages: string | readonly string[];
|
1168
|
-
rules: readonly import("../../
|
1168
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1169
1169
|
focused: boolean;
|
1170
1170
|
errorMessages: string | readonly string[] | null;
|
1171
1171
|
maxErrors: string | number;
|
@@ -1224,7 +1224,7 @@ export declare const VTextarea: {
|
|
1224
1224
|
disabled: boolean;
|
1225
1225
|
readonly: boolean | null;
|
1226
1226
|
messages: string | readonly string[];
|
1227
|
-
rules: readonly import("../../
|
1227
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1228
1228
|
focused: boolean;
|
1229
1229
|
errorMessages: string | readonly string[] | null;
|
1230
1230
|
maxErrors: string | number;
|
@@ -1261,7 +1261,7 @@ export declare const VTextarea: {
|
|
1261
1261
|
disabled: boolean;
|
1262
1262
|
readonly: boolean | null;
|
1263
1263
|
messages: string | readonly string[];
|
1264
|
-
rules: readonly import("../../
|
1264
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1265
1265
|
focused: boolean;
|
1266
1266
|
errorMessages: string | readonly string[] | null;
|
1267
1267
|
maxErrors: string | number;
|
@@ -1384,7 +1384,7 @@ export declare const VTextarea: {
|
|
1384
1384
|
disabled: boolean | null;
|
1385
1385
|
readonly: boolean | null;
|
1386
1386
|
messages: string | readonly string[];
|
1387
|
-
rules: readonly import("../../
|
1387
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1388
1388
|
focused: boolean;
|
1389
1389
|
errorMessages: string | readonly string[] | null;
|
1390
1390
|
maxErrors: string | number;
|
@@ -1400,7 +1400,7 @@ export declare const VTextarea: {
|
|
1400
1400
|
disabled: boolean | null;
|
1401
1401
|
readonly: boolean | null;
|
1402
1402
|
messages: string | readonly string[];
|
1403
|
-
rules: readonly import("../../
|
1403
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1404
1404
|
focused: boolean;
|
1405
1405
|
errorMessages: string | readonly string[] | null;
|
1406
1406
|
maxErrors: string | number;
|
@@ -1455,7 +1455,7 @@ export declare const VTextarea: {
|
|
1455
1455
|
disabled: boolean | null;
|
1456
1456
|
readonly: boolean | null;
|
1457
1457
|
messages: string | readonly string[];
|
1458
|
-
rules: readonly import("../../
|
1458
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1459
1459
|
focused: boolean;
|
1460
1460
|
errorMessages: string | readonly string[] | null;
|
1461
1461
|
maxErrors: string | number;
|
@@ -1500,7 +1500,7 @@ export declare const VTextarea: {
|
|
1500
1500
|
disabled: boolean | null;
|
1501
1501
|
readonly: boolean | null;
|
1502
1502
|
messages: string | readonly string[];
|
1503
|
-
rules: readonly import("../../
|
1503
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1504
1504
|
focused: boolean;
|
1505
1505
|
errorMessages: string | readonly string[] | null;
|
1506
1506
|
maxErrors: string | number;
|
@@ -1542,7 +1542,7 @@ export declare const VTextarea: {
|
|
1542
1542
|
disabled: boolean | null;
|
1543
1543
|
readonly: boolean | null;
|
1544
1544
|
messages: string | readonly string[];
|
1545
|
-
rules: readonly import("../../
|
1545
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1546
1546
|
focused: boolean;
|
1547
1547
|
errorMessages: string | readonly string[] | null;
|
1548
1548
|
maxErrors: string | number;
|
@@ -1558,7 +1558,7 @@ export declare const VTextarea: {
|
|
1558
1558
|
disabled: boolean | null;
|
1559
1559
|
readonly: boolean | null;
|
1560
1560
|
messages: string | readonly string[];
|
1561
|
-
rules: readonly import("../../
|
1561
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1562
1562
|
focused: boolean;
|
1563
1563
|
errorMessages: string | readonly string[] | null;
|
1564
1564
|
maxErrors: string | number;
|
@@ -1622,7 +1622,7 @@ export declare const VTextarea: {
|
|
1622
1622
|
disabled: boolean;
|
1623
1623
|
readonly: boolean | null;
|
1624
1624
|
messages: string | readonly string[];
|
1625
|
-
rules: readonly import("../../
|
1625
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
1626
1626
|
focused: boolean;
|
1627
1627
|
errorMessages: string | readonly string[] | null;
|
1628
1628
|
maxErrors: string | number;
|
@@ -1724,7 +1724,7 @@ export declare const VTextarea: {
|
|
1724
1724
|
default: null;
|
1725
1725
|
};
|
1726
1726
|
rules: {
|
1727
|
-
type: PropType<readonly import("../../types.js").ValidationRule[]>;
|
1727
|
+
type: PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
1728
1728
|
default: () => never[];
|
1729
1729
|
};
|
1730
1730
|
modelValue: null;
|
@@ -1841,7 +1841,7 @@ export declare const VTextarea: {
|
|
1841
1841
|
default: null;
|
1842
1842
|
};
|
1843
1843
|
rules: {
|
1844
|
-
type: PropType<readonly import("../../types.js").ValidationRule[]>;
|
1844
|
+
type: PropType<readonly (import("../../types.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
1845
1845
|
default: () => never[];
|
1846
1846
|
};
|
1847
1847
|
modelValue: null;
|
@@ -8,7 +8,7 @@ export declare const VValidation: {
|
|
8
8
|
error: boolean;
|
9
9
|
disabled: boolean | null;
|
10
10
|
readonly: boolean | null;
|
11
|
-
rules: readonly import("../../composables/validation.js").
|
11
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
12
12
|
focused: boolean;
|
13
13
|
errorMessages: string | readonly string[] | null;
|
14
14
|
maxErrors: string | number;
|
@@ -26,7 +26,7 @@ export declare const VValidation: {
|
|
26
26
|
error: boolean;
|
27
27
|
disabled: boolean | null;
|
28
28
|
readonly: boolean | null;
|
29
|
-
rules: readonly import("../../composables/validation.js").
|
29
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
30
30
|
focused: boolean;
|
31
31
|
errorMessages: string | readonly string[] | null;
|
32
32
|
maxErrors: string | number;
|
@@ -57,7 +57,7 @@ export declare const VValidation: {
|
|
57
57
|
error: boolean;
|
58
58
|
disabled: boolean | null;
|
59
59
|
readonly: boolean | null;
|
60
|
-
rules: readonly import("../../composables/validation.js").
|
60
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
61
61
|
focused: boolean;
|
62
62
|
errorMessages: string | readonly string[] | null;
|
63
63
|
maxErrors: string | number;
|
@@ -73,7 +73,7 @@ export declare const VValidation: {
|
|
73
73
|
error: boolean;
|
74
74
|
disabled: boolean | null;
|
75
75
|
readonly: boolean | null;
|
76
|
-
rules: readonly import("../../composables/validation.js").
|
76
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
77
77
|
focused: boolean;
|
78
78
|
errorMessages: string | readonly string[] | null;
|
79
79
|
maxErrors: string | number;
|
@@ -85,7 +85,7 @@ export declare const VValidation: {
|
|
85
85
|
error: boolean;
|
86
86
|
disabled: boolean | null;
|
87
87
|
readonly: boolean | null;
|
88
|
-
rules: readonly import("../../composables/validation.js").
|
88
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
89
89
|
focused: boolean;
|
90
90
|
errorMessages: string | readonly string[] | null;
|
91
91
|
maxErrors: string | number;
|
@@ -103,7 +103,7 @@ export declare const VValidation: {
|
|
103
103
|
error: boolean;
|
104
104
|
disabled: boolean | null;
|
105
105
|
readonly: boolean | null;
|
106
|
-
rules: readonly import("../../composables/validation.js").
|
106
|
+
rules: readonly (string | boolean | PromiseLike<import("../../composables/validation.js").ValidationResult> | ((value: any) => import("../../composables/validation.js").ValidationResult) | ((value: any) => PromiseLike<import("../../composables/validation.js").ValidationResult>) | [string, any, (string | undefined)?])[];
|
107
107
|
focused: boolean;
|
108
108
|
errorMessages: string | readonly string[] | null;
|
109
109
|
maxErrors: string | number;
|
@@ -149,7 +149,7 @@ export declare const VValidation: {
|
|
149
149
|
default: null;
|
150
150
|
};
|
151
151
|
rules: {
|
152
|
-
type: import("vue").PropType<readonly import("../../composables/validation.js").ValidationRule[]>;
|
152
|
+
type: import("vue").PropType<readonly (import("../../composables/validation.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
153
153
|
default: () => never[];
|
154
154
|
};
|
155
155
|
modelValue: null;
|
@@ -178,7 +178,7 @@ export declare const VValidation: {
|
|
178
178
|
default: null;
|
179
179
|
};
|
180
180
|
rules: {
|
181
|
-
type: import("vue").PropType<readonly import("../../composables/validation.js").ValidationRule[]>;
|
181
|
+
type: import("vue").PropType<readonly (import("../../composables/validation.js").ValidationRule | import("../../labs/rules/index.js").ValidationAlias)[]>;
|
182
182
|
default: () => never[];
|
183
183
|
};
|
184
184
|
modelValue: null;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { PropType } from 'vue';
|
2
|
+
import type { ValidationAlias } from "../labs/rules/index.js";
|
2
3
|
import type { EventProp, MaybeRef } from "../util/index.js";
|
3
4
|
export type ValidationResult = string | boolean;
|
4
5
|
export type ValidationRule = ValidationResult | PromiseLike<ValidationResult> | ((value: any) => ValidationResult) | ((value: any) => PromiseLike<ValidationResult>);
|
@@ -13,7 +14,7 @@ export interface ValidationProps {
|
|
13
14
|
name: string | undefined;
|
14
15
|
label: string | undefined;
|
15
16
|
readonly: boolean | null;
|
16
|
-
rules: readonly ValidationRule[];
|
17
|
+
rules: readonly (ValidationRule | ValidationAlias)[];
|
17
18
|
modelValue: any;
|
18
19
|
'onUpdate:modelValue': EventProp | undefined;
|
19
20
|
validateOn?: ValidateOn;
|
@@ -95,14 +96,14 @@ export declare const makeValidationProps: <Defaults extends {
|
|
95
96
|
default: unknown extends Defaults["readonly"] ? boolean | null : NonNullable<boolean | null> | Defaults["readonly"];
|
96
97
|
};
|
97
98
|
rules: unknown extends Defaults["rules"] ? {
|
98
|
-
type: PropType<readonly ValidationRule[]>;
|
99
|
+
type: PropType<readonly (ValidationRule | ValidationAlias)[]>;
|
99
100
|
default: () => never[];
|
100
101
|
} : Omit<{
|
101
|
-
type: PropType<readonly ValidationRule[]>;
|
102
|
+
type: PropType<readonly (ValidationRule | ValidationAlias)[]>;
|
102
103
|
default: () => never[];
|
103
104
|
}, "type" | "default"> & {
|
104
|
-
type: PropType<unknown extends Defaults["rules"] ? readonly
|
105
|
-
default: unknown extends Defaults["rules"] ? readonly
|
105
|
+
type: PropType<unknown extends Defaults["rules"] ? readonly (string | boolean | PromiseLike<ValidationResult> | ((value: any) => ValidationResult) | ((value: any) => PromiseLike<ValidationResult>) | [string, any, (string | undefined)?])[] : readonly (string | boolean | PromiseLike<ValidationResult> | ((value: any) => ValidationResult) | ((value: any) => PromiseLike<ValidationResult>) | [string, any, (string | undefined)?])[] | Defaults["rules"]>;
|
106
|
+
default: unknown extends Defaults["rules"] ? readonly (string | boolean | PromiseLike<ValidationResult> | ((value: any) => ValidationResult) | ((value: any) => PromiseLike<ValidationResult>) | [string, any, (string | undefined)?])[] : readonly (string | boolean | PromiseLike<ValidationResult> | ((value: any) => ValidationResult) | ((value: any) => PromiseLike<ValidationResult>) | [string, any, (string | undefined)?])[] | Defaults["rules"];
|
106
107
|
};
|
107
108
|
modelValue: unknown extends Defaults["modelValue"] ? null : {
|
108
109
|
type: PropType<unknown extends Defaults["modelValue"] ? any : any>;
|
@@ -2,12 +2,10 @@
|
|
2
2
|
import { makeFocusProps } from "./focus.js";
|
3
3
|
import { useForm } from "./form.js";
|
4
4
|
import { useProxiedModel } from "./proxiedModel.js";
|
5
|
-
import { useToggleScope } from "./toggleScope.js";
|
6
|
-
// Utilities
|
5
|
+
import { useToggleScope } from "./toggleScope.js";
|
6
|
+
import { useRules } from "../labs/rules/index.js"; // Utilities
|
7
7
|
import { computed, nextTick, onBeforeMount, onBeforeUnmount, onMounted, ref, shallowRef, unref, useId, watch } from 'vue';
|
8
8
|
import { getCurrentInstance, getCurrentInstanceName, propsFactory, wrapInArray } from "../util/index.js"; // Types
|
9
|
-
// type ValidationRuleParams = [any, string?]
|
10
|
-
// type ValidationAlias = string | [string, ...ValidationRuleParams]
|
11
9
|
export const makeValidationProps = propsFactory({
|
12
10
|
disabled: {
|
13
11
|
type: Boolean,
|
@@ -30,7 +28,6 @@ export const makeValidationProps = propsFactory({
|
|
30
28
|
},
|
31
29
|
rules: {
|
32
30
|
type: Array,
|
33
|
-
// type: Array as PropType<readonly (ValidationRule | ValidationAlias)[]>,
|
34
31
|
default: () => []
|
35
32
|
},
|
36
33
|
modelValue: null,
|
@@ -44,7 +41,7 @@ export function useValidation(props) {
|
|
44
41
|
const model = useProxiedModel(props, 'modelValue');
|
45
42
|
const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue);
|
46
43
|
const form = useForm(props);
|
47
|
-
|
44
|
+
const rules = useRules(() => props.rules);
|
48
45
|
const internalErrorMessages = ref([]);
|
49
46
|
const isPristine = shallowRef(true);
|
50
47
|
const isDirty = computed(() => !!(wrapInArray(model.value === '' ? null : model.value).length || wrapInArray(validationModel.value === '' ? null : validationModel.value).length));
|
@@ -84,28 +81,6 @@ export function useValidation(props) {
|
|
84
81
|
});
|
85
82
|
const vm = getCurrentInstance('validation');
|
86
83
|
const uid = computed(() => props.name ?? unref(id));
|
87
|
-
|
88
|
-
// const resolvedRules = computed(() => props.rules.map(rule => {
|
89
|
-
// let ruleName: string | null = null
|
90
|
-
// let ruleParams: ValidationRuleParams = [undefined]
|
91
|
-
// if (Array.isArray(rule)) {
|
92
|
-
// ruleName = rule[0]
|
93
|
-
// ruleParams = rule.slice(1) as ValidationRuleParams
|
94
|
-
// } else if (typeof rule === 'string') {
|
95
|
-
// ruleName = rule
|
96
|
-
// }
|
97
|
-
|
98
|
-
// if (ruleName !== null) {
|
99
|
-
// if (ruleName.startsWith('$')) {
|
100
|
-
// ruleName = ruleName.slice(1)
|
101
|
-
// }
|
102
|
-
|
103
|
-
// return rules?.[ruleName]?.(...ruleParams)
|
104
|
-
// } else {
|
105
|
-
// return rule
|
106
|
-
// }
|
107
|
-
// }))
|
108
|
-
|
109
84
|
onBeforeMount(() => {
|
110
85
|
form.register?.({
|
111
86
|
id: uid.value,
|
@@ -161,7 +136,7 @@ export function useValidation(props) {
|
|
161
136
|
let silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
162
137
|
const results = [];
|
163
138
|
isValidating.value = true;
|
164
|
-
for (const rule of
|
139
|
+
for (const rule of rules.value) {
|
165
140
|
if (results.length >= Number(props.maxErrors ?? 1)) {
|
166
141
|
break;
|
167
142
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"validation.js","names":["makeFocusProps","useForm","useProxiedModel","useToggleScope","computed","nextTick","onBeforeMount","onBeforeUnmount","onMounted","ref","shallowRef","unref","useId","watch","getCurrentInstance","getCurrentInstanceName","propsFactory","wrapInArray","makeValidationProps","disabled","type","Boolean","default","error","errorMessages","Array","String","maxErrors","Number","name","label","readonly","rules","modelValue","validateOn","validationValue","useValidation","props","arguments","length","undefined","id","model","validationModel","value","form","internalErrorMessages","isPristine","isDirty","concat","slice","Math","max","set","Set","split","input","has","blur","invalidInput","lazy","eager","isValid","isValidating","validationClasses","isDisabled","isReadonly","vm","uid","register","validate","reset","resetValidation","unregister","update","focused","unwatch","val","silent","results","rule","handler","result","console","warn","push"],"sources":["../../src/composables/validation.ts"],"sourcesContent":["// Composables\nimport { makeFocusProps } from '@/composables/focus'\nimport { useForm } from '@/composables/form'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useToggleScope } from '@/composables/toggleScope'\n// import { useRules } from '@/labs/rules'\n\n// Utilities\nimport { computed, nextTick, onBeforeMount, onBeforeUnmount, onMounted, ref, shallowRef, unref, useId, watch } from 'vue'\nimport { getCurrentInstance, getCurrentInstanceName, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { EventProp, MaybeRef } from '@/util'\n\nexport type ValidationResult = string | boolean\nexport type ValidationRule =\n | ValidationResult\n | PromiseLike<ValidationResult>\n | ((value: any) => ValidationResult)\n | ((value: any) => PromiseLike<ValidationResult>)\n\ntype ValidateOnValue = 'blur' | 'input' | 'submit' | 'invalid-input'\ntype ValidateOn =\n | ValidateOnValue\n | `${ValidateOnValue} lazy`\n | `${ValidateOnValue} eager`\n | `lazy ${ValidateOnValue}`\n | `eager ${ValidateOnValue}`\n | 'lazy'\n | 'eager'\n\n// type ValidationRuleParams = [any, string?]\n// type ValidationAlias = string | [string, ...ValidationRuleParams]\n\nexport interface ValidationProps {\n disabled: boolean | null\n error: boolean\n errorMessages: string | readonly string[] | null\n focused: boolean\n maxErrors: string | number\n name: string | undefined\n label: string | undefined\n readonly: boolean | null\n rules: readonly ValidationRule[]\n // rules: readonly (ValidationRule | ValidationAlias)[]\n modelValue: any\n 'onUpdate:modelValue': EventProp | undefined\n validateOn?: ValidateOn\n validationValue: any\n}\n\nexport const makeValidationProps = propsFactory({\n disabled: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n error: Boolean,\n errorMessages: {\n type: [Array, String] as PropType<string | readonly string[] | null>,\n default: () => ([]),\n },\n maxErrors: {\n type: [Number, String],\n default: 1,\n },\n name: String,\n label: String,\n readonly: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n rules: {\n type: Array as PropType<readonly ValidationRule[]>,\n // type: Array as PropType<readonly (ValidationRule | ValidationAlias)[]>,\n default: () => ([]),\n },\n modelValue: null,\n validateOn: String as PropType<ValidationProps['validateOn']>,\n validationValue: null,\n\n ...makeFocusProps(),\n}, 'validation')\n\nexport function useValidation (\n props: ValidationProps,\n name = getCurrentInstanceName(),\n id: MaybeRef<string | number> = useId(),\n) {\n const model = useProxiedModel(props, 'modelValue')\n const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue)\n const form = useForm(props)\n // const rules = useRules()\n const internalErrorMessages = ref<string[]>([])\n const isPristine = shallowRef(true)\n const isDirty = computed(() => !!(\n wrapInArray(model.value === '' ? null : model.value).length ||\n wrapInArray(validationModel.value === '' ? null : validationModel.value).length\n ))\n const errorMessages = computed(() => {\n return props.errorMessages?.length\n ? wrapInArray(props.errorMessages).concat(internalErrorMessages.value).slice(0, Math.max(0, Number(props.maxErrors)))\n : internalErrorMessages.value\n })\n const validateOn = computed(() => {\n let value = (props.validateOn ?? form.validateOn?.value) || 'input'\n if (value === 'lazy') value = 'input lazy'\n if (value === 'eager') value = 'input eager'\n const set = new Set(value?.split(' ') ?? [])\n\n return {\n input: set.has('input'),\n blur: set.has('blur') || set.has('input') || set.has('invalid-input'),\n invalidInput: set.has('invalid-input'),\n lazy: set.has('lazy'),\n eager: set.has('eager'),\n }\n })\n const isValid = computed(() => {\n if (props.error || props.errorMessages?.length) return false\n if (!props.rules.length) return true\n if (isPristine.value) {\n return internalErrorMessages.value.length || validateOn.value.lazy ? null : true\n } else {\n return !internalErrorMessages.value.length\n }\n })\n const isValidating = shallowRef(false)\n const validationClasses = computed(() => {\n return {\n [`${name}--error`]: isValid.value === false,\n [`${name}--dirty`]: isDirty.value,\n [`${name}--disabled`]: form.isDisabled.value,\n [`${name}--readonly`]: form.isReadonly.value,\n }\n })\n\n const vm = getCurrentInstance('validation')\n const uid = computed(() => props.name ?? unref(id))\n\n // const resolvedRules = computed(() => props.rules.map(rule => {\n // let ruleName: string | null = null\n // let ruleParams: ValidationRuleParams = [undefined]\n // if (Array.isArray(rule)) {\n // ruleName = rule[0]\n // ruleParams = rule.slice(1) as ValidationRuleParams\n // } else if (typeof rule === 'string') {\n // ruleName = rule\n // }\n\n // if (ruleName !== null) {\n // if (ruleName.startsWith('$')) {\n // ruleName = ruleName.slice(1)\n // }\n\n // return rules?.[ruleName]?.(...ruleParams)\n // } else {\n // return rule\n // }\n // }))\n\n onBeforeMount(() => {\n form.register?.({\n id: uid.value,\n vm,\n validate,\n reset,\n resetValidation,\n })\n })\n\n onBeforeUnmount(() => {\n form.unregister?.(uid.value)\n })\n\n onMounted(async () => {\n if (!validateOn.value.lazy) {\n await validate(!validateOn.value.eager)\n }\n form.update?.(uid.value, isValid.value, errorMessages.value)\n })\n\n useToggleScope(() => validateOn.value.input || (validateOn.value.invalidInput && isValid.value === false), () => {\n watch(validationModel, () => {\n if (validationModel.value != null) {\n validate()\n } else if (props.focused) {\n const unwatch = watch(() => props.focused, val => {\n if (!val) validate()\n\n unwatch()\n })\n }\n })\n })\n\n useToggleScope(() => validateOn.value.blur, () => {\n watch(() => props.focused, val => {\n if (!val) validate()\n })\n })\n\n watch([isValid, errorMessages], () => {\n form.update?.(uid.value, isValid.value, errorMessages.value)\n })\n\n async function reset () {\n model.value = null\n await nextTick()\n await resetValidation()\n }\n\n async function resetValidation () {\n isPristine.value = true\n if (!validateOn.value.lazy) {\n await validate(!validateOn.value.eager)\n } else {\n internalErrorMessages.value = []\n }\n }\n\n async function validate (silent = false) {\n const results = []\n\n isValidating.value = true\n\n for (const rule of props.rules) {\n if (results.length >= Number(props.maxErrors ?? 1)) {\n break\n }\n\n const handler = typeof rule === 'function' ? rule : () => rule\n const result = await handler(validationModel.value)\n\n if (result === true) continue\n\n if (result !== false && typeof result !== 'string') {\n // eslint-disable-next-line no-console\n console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`)\n\n continue\n }\n\n results.push(result || '')\n }\n\n internalErrorMessages.value = results\n isValidating.value = false\n isPristine.value = silent\n\n return internalErrorMessages.value\n }\n\n return {\n errorMessages,\n isDirty,\n isDisabled: form.isDisabled,\n isReadonly: form.isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc;AAAA,SACdC,OAAO;AAAA,SACPC,eAAe;AAAA,SACfC,cAAc,4BACvB;AAEA;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAChHC,kBAAkB,EAAEC,sBAAsB,EAAEC,YAAY,EAAEC,WAAW,4BAE9E;AAqBA;AACA;AAmBA,OAAO,MAAMC,mBAAmB,GAAGF,YAAY,CAAC;EAC9CG,QAAQ,EAAE;IACRC,IAAI,EAAEC,OAAmC;IACzCC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAEF,OAAO;EACdG,aAAa,EAAE;IACbJ,IAAI,EAAE,CAACK,KAAK,EAAEC,MAAM,CAAgD;IACpEJ,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDK,SAAS,EAAE;IACTP,I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AAK,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;QAClD;QACAC,OAAO,CAACC,IAAI,CAAC,GAAGF,MAAM,6EAA6E,CAAC;QAEpG;MACF;MAEAH,OAAO,CAACM,IAAI,CAACH,MAAM,IAAI,EAAE,CAAC;IAC5B;IAEApC,qBAAqB,CAACF,KAAK,GAAGmC,OAAO;IACrChB,YAAY,CAACnB,KAAK,GAAG,KAAK;IAC1BG,UAAU,CAACH,KAAK,GAAGkC,MAAM;IAEzB,OAAOhC,qBAAqB,CAACF,KAAK;EACpC;EAEA,OAAO;IACLpB,aAAa;IACbwB,OAAO;IACPiB,UAAU,EAAEpB,IAAI,CAACoB,UAAU;IAC3BC,UAAU,EAAErB,IAAI,CAACqB,UAAU;IAC3BnB,UAAU;IACVe,OAAO;IACPC,YAAY;IACZQ,KAAK;IACLC,eAAe;IACfF,QAAQ;IACRN;EACF,CAAC;AACH","ignoreList":[]}
|
1
|
+
{"version":3,"file":"validation.js","names":["makeFocusProps","useForm","useProxiedModel","useToggleScope","useRules","computed","nextTick","onBeforeMount","onBeforeUnmount","onMounted","ref","shallowRef","unref","useId","watch","getCurrentInstance","getCurrentInstanceName","propsFactory","wrapInArray","makeValidationProps","disabled","type","Boolean","default","error","errorMessages","Array","String","maxErrors","Number","name","label","readonly","rules","modelValue","validateOn","validationValue","useValidation","props","arguments","length","undefined","id","model","validationModel","value","form","internalErrorMessages","isPristine","isDirty","concat","slice","Math","max","set","Set","split","input","has","blur","invalidInput","lazy","eager","isValid","isValidating","validationClasses","isDisabled","isReadonly","vm","uid","register","validate","reset","resetValidation","unregister","update","focused","unwatch","val","silent","results","rule","handler","result","console","warn","push"],"sources":["../../src/composables/validation.ts"],"sourcesContent":["// Composables\nimport { makeFocusProps } from '@/composables/focus'\nimport { useForm } from '@/composables/form'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useToggleScope } from '@/composables/toggleScope'\nimport { useRules } from '@/labs/rules'\n\n// Utilities\nimport { computed, nextTick, onBeforeMount, onBeforeUnmount, onMounted, ref, shallowRef, unref, useId, watch } from 'vue'\nimport { getCurrentInstance, getCurrentInstanceName, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { ValidationAlias } from '@/labs/rules'\nimport type { EventProp, MaybeRef } from '@/util'\n\nexport type ValidationResult = string | boolean\nexport type ValidationRule =\n | ValidationResult\n | PromiseLike<ValidationResult>\n | ((value: any) => ValidationResult)\n | ((value: any) => PromiseLike<ValidationResult>)\n\ntype ValidateOnValue = 'blur' | 'input' | 'submit' | 'invalid-input'\ntype ValidateOn =\n | ValidateOnValue\n | `${ValidateOnValue} lazy`\n | `${ValidateOnValue} eager`\n | `lazy ${ValidateOnValue}`\n | `eager ${ValidateOnValue}`\n | 'lazy'\n | 'eager'\n\nexport interface ValidationProps {\n disabled: boolean | null\n error: boolean\n errorMessages: string | readonly string[] | null\n focused: boolean\n maxErrors: string | number\n name: string | undefined\n label: string | undefined\n readonly: boolean | null\n rules: readonly (ValidationRule | ValidationAlias)[]\n modelValue: any\n 'onUpdate:modelValue': EventProp | undefined\n validateOn?: ValidateOn\n validationValue: any\n}\n\nexport const makeValidationProps = propsFactory({\n disabled: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n error: Boolean,\n errorMessages: {\n type: [Array, String] as PropType<string | readonly string[] | null>,\n default: () => ([]),\n },\n maxErrors: {\n type: [Number, String],\n default: 1,\n },\n name: String,\n label: String,\n readonly: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n rules: {\n type: Array as PropType<readonly (ValidationRule | ValidationAlias)[]>,\n default: () => ([]),\n },\n modelValue: null,\n validateOn: String as PropType<ValidationProps['validateOn']>,\n validationValue: null,\n\n ...makeFocusProps(),\n}, 'validation')\n\nexport function useValidation (\n props: ValidationProps,\n name = getCurrentInstanceName(),\n id: MaybeRef<string | number> = useId(),\n) {\n const model = useProxiedModel(props, 'modelValue')\n const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue)\n const form = useForm(props)\n const rules = useRules(() => props.rules)\n const internalErrorMessages = ref<string[]>([])\n const isPristine = shallowRef(true)\n const isDirty = computed(() => !!(\n wrapInArray(model.value === '' ? null : model.value).length ||\n wrapInArray(validationModel.value === '' ? null : validationModel.value).length\n ))\n const errorMessages = computed(() => {\n return props.errorMessages?.length\n ? wrapInArray(props.errorMessages).concat(internalErrorMessages.value).slice(0, Math.max(0, Number(props.maxErrors)))\n : internalErrorMessages.value\n })\n const validateOn = computed(() => {\n let value = (props.validateOn ?? form.validateOn?.value) || 'input'\n if (value === 'lazy') value = 'input lazy'\n if (value === 'eager') value = 'input eager'\n const set = new Set(value?.split(' ') ?? [])\n\n return {\n input: set.has('input'),\n blur: set.has('blur') || set.has('input') || set.has('invalid-input'),\n invalidInput: set.has('invalid-input'),\n lazy: set.has('lazy'),\n eager: set.has('eager'),\n }\n })\n const isValid = computed(() => {\n if (props.error || props.errorMessages?.length) return false\n if (!props.rules.length) return true\n if (isPristine.value) {\n return internalErrorMessages.value.length || validateOn.value.lazy ? null : true\n } else {\n return !internalErrorMessages.value.length\n }\n })\n const isValidating = shallowRef(false)\n const validationClasses = computed(() => {\n return {\n [`${name}--error`]: isValid.value === false,\n [`${name}--dirty`]: isDirty.value,\n [`${name}--disabled`]: form.isDisabled.value,\n [`${name}--readonly`]: form.isReadonly.value,\n }\n })\n\n const vm = getCurrentInstance('validation')\n const uid = computed(() => props.name ?? unref(id))\n\n onBeforeMount(() => {\n form.register?.({\n id: uid.value,\n vm,\n validate,\n reset,\n resetValidation,\n })\n })\n\n onBeforeUnmount(() => {\n form.unregister?.(uid.value)\n })\n\n onMounted(async () => {\n if (!validateOn.value.lazy) {\n await validate(!validateOn.value.eager)\n }\n form.update?.(uid.value, isValid.value, errorMessages.value)\n })\n\n useToggleScope(() => validateOn.value.input || (validateOn.value.invalidInput && isValid.value === false), () => {\n watch(validationModel, () => {\n if (validationModel.value != null) {\n validate()\n } else if (props.focused) {\n const unwatch = watch(() => props.focused, val => {\n if (!val) validate()\n\n unwatch()\n })\n }\n })\n })\n\n useToggleScope(() => validateOn.value.blur, () => {\n watch(() => props.focused, val => {\n if (!val) validate()\n })\n })\n\n watch([isValid, errorMessages], () => {\n form.update?.(uid.value, isValid.value, errorMessages.value)\n })\n\n async function reset () {\n model.value = null\n await nextTick()\n await resetValidation()\n }\n\n async function resetValidation () {\n isPristine.value = true\n if (!validateOn.value.lazy) {\n await validate(!validateOn.value.eager)\n } else {\n internalErrorMessages.value = []\n }\n }\n\n async function validate (silent = false) {\n const results = []\n\n isValidating.value = true\n\n for (const rule of rules.value) {\n if (results.length >= Number(props.maxErrors ?? 1)) {\n break\n }\n\n const handler = typeof rule === 'function' ? rule : () => rule\n const result = await handler(validationModel.value)\n\n if (result === true) continue\n\n if (result !== false && typeof result !== 'string') {\n // eslint-disable-next-line no-console\n console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`)\n\n continue\n }\n\n results.push(result || '')\n }\n\n internalErrorMessages.value = results\n isValidating.value = false\n isPristine.value = silent\n\n return internalErrorMessages.value\n }\n\n return {\n errorMessages,\n isDirty,\n isDisabled: form.isDisabled,\n isReadonly: form.isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc;AAAA,SACdC,OAAO;AAAA,SACPC,eAAe;AAAA,SACfC,cAAc;AAAA,SACdC,QAAQ,kCAEjB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAChHC,kBAAkB,EAAEC,sBAAsB,EAAEC,YAAY,EAAEC,WAAW,4BAE9E;AAsCA,OAAO,MAAMC,mBAAmB,GAAGF,YAAY,CAAC;EAC9CG,QAAQ,EAAE;IACRC,IAAI,EAAEC,OAAmC;I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IAAI,GAAG,MAAMA,IAAI;MAC9D,MAAME,MAAM,GAAG,MAAMD,OAAO,CAACtC,eAAe,CAACC,KAAK,CAAC;MAEnD,IAAIsC,MAAM,KAAK,IAAI,EAAE;MAErB,IAAIA,MAAM,KAAK,KAAK,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;QAClD;QACAC,OAAO,CAACC,IAAI,CAAC,GAAGF,MAAM,6EAA6E,CAAC;QAEpG;MACF;MAEAH,OAAO,CAACM,IAAI,CAACH,MAAM,IAAI,EAAE,CAAC;IAC5B;IAEApC,qBAAqB,CAACF,KAAK,GAAGmC,OAAO;IACrChB,YAAY,CAACnB,KAAK,GAAG,KAAK;IAC1BG,UAAU,CAACH,KAAK,GAAGkC,MAAM;IAEzB,OAAOhC,qBAAqB,CAACF,KAAK;EACpC;EAEA,OAAO;IACLpB,aAAa;IACbwB,OAAO;IACPiB,UAAU,EAAEpB,IAAI,CAACoB,UAAU;IAC3BC,UAAU,EAAErB,IAAI,CAACqB,UAAU;IAC3BnB,UAAU;IACVe,OAAO;IACPC,YAAY;IACZQ,KAAK;IACLC,eAAe;IACfF,QAAQ;IACRN;EACF,CAAC;AACH","ignoreList":[]}
|
package/lib/entry-bundler.js
CHANGED
@@ -16,7 +16,7 @@ export const createVuetify = function () {
|
|
16
16
|
...options
|
17
17
|
});
|
18
18
|
};
|
19
|
-
export const version = "3.8.5-master.2025-05-
|
19
|
+
export const version = "3.8.5-master.2025-05-15";
|
20
20
|
createVuetify.version = version;
|
21
21
|
export { blueprints, components, directives };
|
22
22
|
export * from "./composables/index.js";
|