@dragonmastery/zinia-forms-core 0.3.9 → 0.3.11
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/dist/index.d.ts +22 -0
- package/dist/index.js +440 -396
- package/dist/index.js.map +1 -1
- package/package.json +11 -10
package/dist/index.d.ts
CHANGED
|
@@ -417,6 +417,9 @@ type ArrayFieldComponent<T, P extends Path<T>> = vue.FunctionalComponent<Omit<Ar
|
|
|
417
417
|
index: number;
|
|
418
418
|
fields: FieldNames<ArrayItemType<T, P>>;
|
|
419
419
|
}) => any;
|
|
420
|
+
fieldSummary: (props: {
|
|
421
|
+
items: ArrayItemType<T, P>[];
|
|
422
|
+
}) => any;
|
|
420
423
|
default: () => any;
|
|
421
424
|
}, {}>;
|
|
422
425
|
/**
|
|
@@ -879,6 +882,8 @@ interface TextareaFieldProps<FormType> {
|
|
|
879
882
|
size?: string;
|
|
880
883
|
variant?: string;
|
|
881
884
|
rows?: number;
|
|
885
|
+
autoExpand?: boolean;
|
|
886
|
+
maxRows?: number;
|
|
882
887
|
}
|
|
883
888
|
|
|
884
889
|
interface TextFieldProps<FormType> {
|
|
@@ -1150,6 +1155,9 @@ interface StyleCreators {
|
|
|
1150
1155
|
index: number;
|
|
1151
1156
|
fields: FieldNames<ItemType>;
|
|
1152
1157
|
}) => any;
|
|
1158
|
+
fieldSummary: (props: {
|
|
1159
|
+
items: ItemType[];
|
|
1160
|
+
}) => any;
|
|
1153
1161
|
default: () => any;
|
|
1154
1162
|
}, {}>;
|
|
1155
1163
|
createTransferListField: <FormType, ItemType = any>() => FunctionalComponent<TransferListFieldProps<FormType, ItemType>, {}, {
|
|
@@ -1353,6 +1361,11 @@ declare function useForm<T extends z.ZodObject<any>, CalcType = (values: z.infer
|
|
|
1353
1361
|
getDisplayText: (path: string) => string;
|
|
1354
1362
|
setSelectedIndex: (path: string, index: number) => void;
|
|
1355
1363
|
getSelectedIndex: (path: string) => number;
|
|
1364
|
+
getArrayItemId: (path: string, index: number) => string;
|
|
1365
|
+
addArrayItemId: (path: string, index?: number) => string;
|
|
1366
|
+
removeArrayItemId: (path: string, index: number) => void;
|
|
1367
|
+
swapArrayItemIds: (path: string, indexA: number, indexB: number) => void;
|
|
1368
|
+
syncArrayItemIds: (path: string) => void;
|
|
1356
1369
|
};
|
|
1357
1370
|
ZiniaForm: vue.FunctionalComponent<FormProps<z.TypeOf<T>>, {}, any, {}>;
|
|
1358
1371
|
ZiniaSubmitButton: vue.FunctionalComponent<SubmitButtonProps<z.TypeOf<T>>, {}, any, {}>;
|
|
@@ -1396,6 +1409,9 @@ declare function useForm<T extends z.ZodObject<any>, CalcType = (values: z.infer
|
|
|
1396
1409
|
[x: string]: string;
|
|
1397
1410
|
};
|
|
1398
1411
|
}) => any;
|
|
1412
|
+
fieldSummary: (props: {
|
|
1413
|
+
items: any[];
|
|
1414
|
+
}) => any;
|
|
1399
1415
|
default: () => any;
|
|
1400
1416
|
}, {}>;
|
|
1401
1417
|
TransferListField: vue.FunctionalComponent<TransferListFieldProps<z.TypeOf<T>, any>, {}, {
|
|
@@ -1507,6 +1523,9 @@ interface ArrayFieldSlots<ItemType> {
|
|
|
1507
1523
|
index: number;
|
|
1508
1524
|
fields: FieldNames<ItemType>;
|
|
1509
1525
|
}) => any;
|
|
1526
|
+
fieldSummary: (props: {
|
|
1527
|
+
items: ItemType[];
|
|
1528
|
+
}) => any;
|
|
1510
1529
|
default: () => any;
|
|
1511
1530
|
}
|
|
1512
1531
|
|
|
@@ -1571,6 +1590,9 @@ declare function generateFieldComponents<T extends z.ZodObject<any>>(schema: T,
|
|
|
1571
1590
|
[x: string]: string;
|
|
1572
1591
|
};
|
|
1573
1592
|
}) => any;
|
|
1593
|
+
fieldSummary: (props: {
|
|
1594
|
+
items: any[];
|
|
1595
|
+
}) => any;
|
|
1574
1596
|
default: () => any;
|
|
1575
1597
|
}, {}>;
|
|
1576
1598
|
TransferListField: vue.FunctionalComponent<TransferListFieldProps<z.TypeOf<T>, any>, {}, {
|