arkenstone-ui 0.0.35 → 0.0.37
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.
|
@@ -3,6 +3,10 @@ import { FieldConfig } from './types';
|
|
|
3
3
|
interface GenericFormProps {
|
|
4
4
|
fields: FieldConfig[];
|
|
5
5
|
initialValues?: any;
|
|
6
|
+
updateFormValues?: {
|
|
7
|
+
data: any;
|
|
8
|
+
loadData: boolean;
|
|
9
|
+
};
|
|
6
10
|
onSubmit: (values: any) => void;
|
|
7
11
|
isLoading?: boolean;
|
|
8
12
|
isCreating: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ColumnDef } from '@tanstack/react-table';
|
|
2
2
|
import { ServiceFactory } from '../../services/service-factory';
|
|
3
|
-
export type InputType =
|
|
3
|
+
export type InputType = "text" | "number" | "email" | "password" | "textarea" | "select" | "checkbox" | "date" | "image" | "custom";
|
|
4
4
|
export interface ValidationRule {
|
|
5
5
|
required?: boolean;
|
|
6
6
|
min?: number;
|
|
@@ -41,15 +41,15 @@ export interface FieldConfig {
|
|
|
41
41
|
error?: string;
|
|
42
42
|
}) => React.ReactNode;
|
|
43
43
|
}
|
|
44
|
-
export type LayoutType =
|
|
44
|
+
export type LayoutType = "split-view" | "modal" | "tab-view" | "fullscreen";
|
|
45
45
|
export interface DataManagerConfig<T extends object> {
|
|
46
46
|
title: string;
|
|
47
47
|
description?: string;
|
|
48
48
|
service: ServiceFactory<T, any, any, any>;
|
|
49
49
|
layout: LayoutType;
|
|
50
|
-
modalSize?:
|
|
50
|
+
modalSize?: "sm" | "md" | "lg" | "xl" | "full";
|
|
51
51
|
display: {
|
|
52
|
-
type:
|
|
52
|
+
type: "table" | "list" | "grid";
|
|
53
53
|
columns: ColumnDef<T>[];
|
|
54
54
|
searchKeys?: string[];
|
|
55
55
|
renderItem?: (item: T) => React.ReactNode;
|
|
@@ -65,5 +65,9 @@ export interface DataManagerConfig<T extends object> {
|
|
|
65
65
|
*/
|
|
66
66
|
disablePartialUpdate?: boolean;
|
|
67
67
|
};
|
|
68
|
+
updateFormValues?: {
|
|
69
|
+
data: any;
|
|
70
|
+
loadData: boolean;
|
|
71
|
+
};
|
|
68
72
|
devMode?: boolean;
|
|
69
73
|
}
|