next-recomponents 1.4.7 → 1.4.9
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.mts +3 -5
- package/dist/index.d.ts +3 -5
- package/package.json +1 -1
- package/src/table/index.tsx +1 -3
- package/src/use-resources/types.ts +4 -2
package/dist/index.d.mts
CHANGED
|
@@ -69,9 +69,7 @@ interface TableProps extends React.DetailedHTMLProps<React.TableHTMLAttributes<H
|
|
|
69
69
|
exportName?: string;
|
|
70
70
|
onSave?: (e: {
|
|
71
71
|
data: Record<string, any>;
|
|
72
|
-
}) => void | Promise<
|
|
73
|
-
data: Record<string, any>;
|
|
74
|
-
}) => void>;
|
|
72
|
+
}) => void | Promise<void>;
|
|
75
73
|
loader: React.ReactNode;
|
|
76
74
|
}
|
|
77
75
|
declare function Table({ ...props }: TableProps): react_jsx_runtime.JSX.Element;
|
|
@@ -102,8 +100,8 @@ type EnhancedEndpoints<T extends Record<string, ItemsRecord>> = {
|
|
|
102
100
|
typeof: T[K]["typeof"];
|
|
103
101
|
state: "success" | "loading" | "error";
|
|
104
102
|
show: (props: ShowOptions) => Promise<Array<T[K]["typeof"]>>;
|
|
105
|
-
create: (data: Partial<T[K]["typeof"]>) => Promise<T[K]["typeof"]>;
|
|
106
|
-
update: (id: number | string, data: Partial<T[K]["typeof"]>) => Promise<T[K]["typeof"]>;
|
|
103
|
+
create: (data: Partial<T[K]["typeof"]> | Partial<T[K]["typeof"]>[]) => Promise<T[K]["typeof"]>;
|
|
104
|
+
update: (id: number | string, data: Partial<T[K]["typeof"]> | Partial<T[K]["typeof"]>[]) => Promise<T[K]["typeof"]>;
|
|
107
105
|
remove: (id: number | string) => Promise<T[K]["typeof"]>;
|
|
108
106
|
find: (id: number | string, props?: Record<string, string>) => Promise<T[K]["typeof"]>;
|
|
109
107
|
getAllPages: (limit: number) => Promise<Array<T[K]["typeof"]>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -69,9 +69,7 @@ interface TableProps extends React.DetailedHTMLProps<React.TableHTMLAttributes<H
|
|
|
69
69
|
exportName?: string;
|
|
70
70
|
onSave?: (e: {
|
|
71
71
|
data: Record<string, any>;
|
|
72
|
-
}) => void | Promise<
|
|
73
|
-
data: Record<string, any>;
|
|
74
|
-
}) => void>;
|
|
72
|
+
}) => void | Promise<void>;
|
|
75
73
|
loader: React.ReactNode;
|
|
76
74
|
}
|
|
77
75
|
declare function Table({ ...props }: TableProps): react_jsx_runtime.JSX.Element;
|
|
@@ -102,8 +100,8 @@ type EnhancedEndpoints<T extends Record<string, ItemsRecord>> = {
|
|
|
102
100
|
typeof: T[K]["typeof"];
|
|
103
101
|
state: "success" | "loading" | "error";
|
|
104
102
|
show: (props: ShowOptions) => Promise<Array<T[K]["typeof"]>>;
|
|
105
|
-
create: (data: Partial<T[K]["typeof"]>) => Promise<T[K]["typeof"]>;
|
|
106
|
-
update: (id: number | string, data: Partial<T[K]["typeof"]>) => Promise<T[K]["typeof"]>;
|
|
103
|
+
create: (data: Partial<T[K]["typeof"]> | Partial<T[K]["typeof"]>[]) => Promise<T[K]["typeof"]>;
|
|
104
|
+
update: (id: number | string, data: Partial<T[K]["typeof"]> | Partial<T[K]["typeof"]>[]) => Promise<T[K]["typeof"]>;
|
|
107
105
|
remove: (id: number | string) => Promise<T[K]["typeof"]>;
|
|
108
106
|
find: (id: number | string, props?: Record<string, string>) => Promise<T[K]["typeof"]>;
|
|
109
107
|
getAllPages: (limit: number) => Promise<Array<T[K]["typeof"]>>;
|
package/package.json
CHANGED
package/src/table/index.tsx
CHANGED
|
@@ -14,9 +14,7 @@ export interface TableProps
|
|
|
14
14
|
totals?: Array<string>;
|
|
15
15
|
symbols?: Record<string, ReactNode>;
|
|
16
16
|
exportName?: string;
|
|
17
|
-
onSave?: (e: {
|
|
18
|
-
data: Record<string, any>;
|
|
19
|
-
}) => void | Promise<(e: { data: Record<string, any> }) => void>;
|
|
17
|
+
onSave?: (e: { data: Record<string, any> }) => void | Promise<void>;
|
|
20
18
|
loader: React.ReactNode;
|
|
21
19
|
}
|
|
22
20
|
|
|
@@ -20,10 +20,12 @@ export type EnhancedEndpoints<T extends Record<string, ItemsRecord>> = {
|
|
|
20
20
|
typeof: T[K]["typeof"];
|
|
21
21
|
state: "success" | "loading" | "error";
|
|
22
22
|
show: (props: ShowOptions) => Promise<Array<T[K]["typeof"]>>;
|
|
23
|
-
create: (
|
|
23
|
+
create: (
|
|
24
|
+
data: Partial<T[K]["typeof"]> | Partial<T[K]["typeof"]>[]
|
|
25
|
+
) => Promise<T[K]["typeof"]>;
|
|
24
26
|
update: (
|
|
25
27
|
id: number | string,
|
|
26
|
-
data: Partial<T[K]["typeof"]>
|
|
28
|
+
data: Partial<T[K]["typeof"]> | Partial<T[K]["typeof"]>[]
|
|
27
29
|
) => Promise<T[K]["typeof"]>;
|
|
28
30
|
remove: (id: number | string) => Promise<T[K]["typeof"]>;
|
|
29
31
|
find: (
|