crud-page-react 0.0.2 → 0.0.5
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/README.md +50 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.esm.js +132 -90
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +132 -90
- package/dist/index.js.map +1 -1
- package/dist/types/schema.d.ts +10 -0
- package/package.json +1 -1
package/dist/types/schema.d.ts
CHANGED
|
@@ -127,17 +127,27 @@ export interface ActionPermission {
|
|
|
127
127
|
role?: string[];
|
|
128
128
|
condition?: string;
|
|
129
129
|
}
|
|
130
|
+
export interface ActionApiConfig {
|
|
131
|
+
url: string;
|
|
132
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
133
|
+
data?: Record<string, unknown>;
|
|
134
|
+
headers?: Record<string, string>;
|
|
135
|
+
responseType?: 'json' | 'blob' | 'text';
|
|
136
|
+
}
|
|
130
137
|
export interface ActionSchema {
|
|
131
138
|
key: string;
|
|
132
139
|
label: string;
|
|
133
140
|
type: ActionType;
|
|
134
141
|
icon?: string;
|
|
135
142
|
danger?: boolean;
|
|
143
|
+
color?: string;
|
|
136
144
|
permission?: ActionPermission;
|
|
145
|
+
condition?: Record<string, unknown>;
|
|
137
146
|
confirm?: {
|
|
138
147
|
title: string;
|
|
139
148
|
content?: string;
|
|
140
149
|
};
|
|
150
|
+
api?: ActionApiConfig;
|
|
141
151
|
}
|
|
142
152
|
export interface PaginationConfig {
|
|
143
153
|
pageSize?: number;
|