@effect-app/vue-components 2.3.0 → 2.3.1
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.
|
@@ -6,7 +6,7 @@ import { type OF, type OmegaFormReturn } from "./useOmegaForm";
|
|
|
6
6
|
export type Leaves<T, Path extends string = ""> = T extends ReadonlyArray<infer U> ? Leaves<U, `${Path}[${number}]`> & {} : {
|
|
7
7
|
[K in keyof T]: T[K] extends string | boolean | number | null | undefined | symbol | bigint ? `${Path extends "" ? "" : `${Path}.`}${K & string}` : Leaves<T[K], `${Path extends "" ? "" : `${Path}.`}${K & string}`> & {};
|
|
8
8
|
}[keyof T];
|
|
9
|
-
export type BaseProps<From> = {
|
|
9
|
+
export type BaseProps<From, TName extends NestedKeyOf<From> = NestedKeyOf<From>> = {
|
|
10
10
|
/**
|
|
11
11
|
* Will fallback to i18n when not specified.
|
|
12
12
|
* Can also be provided via #label slot for custom HTML labels.
|
|
@@ -14,7 +14,7 @@ export type BaseProps<From> = {
|
|
|
14
14
|
*/
|
|
15
15
|
label?: string;
|
|
16
16
|
validators?: FieldValidators<From>;
|
|
17
|
-
name: Leaves<From>;
|
|
17
|
+
name: TName & Leaves<From>;
|
|
18
18
|
/**
|
|
19
19
|
* Optional class to apply to the input element.
|
|
20
20
|
* - If a string is provided, it will be used instead of the general class
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ export type Leaves<T, Path extends string = ""> = T extends ReadonlyArray<infer
|
|
|
15
15
|
: Leaves<T[K], `${Path extends "" ? "" : `${Path}.`}${K & string}`> & {}
|
|
16
16
|
}[keyof T]
|
|
17
17
|
|
|
18
|
-
export type BaseProps<From> = {
|
|
18
|
+
export type BaseProps<From, TName extends NestedKeyOf<From> = NestedKeyOf<From>> = {
|
|
19
19
|
/**
|
|
20
20
|
* Will fallback to i18n when not specified.
|
|
21
21
|
* Can also be provided via #label slot for custom HTML labels.
|
|
@@ -24,7 +24,7 @@ export type BaseProps<From> = {
|
|
|
24
24
|
label?: string
|
|
25
25
|
validators?: FieldValidators<From>
|
|
26
26
|
// Use FlexibleArrayPath: if name contains [], just use TName; otherwise intersect with Leaves<From>
|
|
27
|
-
name: Leaves<From>
|
|
27
|
+
name: TName & Leaves<From>
|
|
28
28
|
/**
|
|
29
29
|
* Optional class to apply to the input element.
|
|
30
30
|
* - If a string is provided, it will be used instead of the general class
|