@galadrim/galadmin 0.1.139 → 0.1.141
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/api.js +1 -1
- package/dist/api.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +8 -8
- package/package.json +1 -1
- package/src/api.ts +1 -1
- package/src/types/config.ts +339 -331
package/dist/types/config.d.ts
CHANGED
|
@@ -86,12 +86,12 @@ export type TextareaColumn = {
|
|
|
86
86
|
name: string;
|
|
87
87
|
};
|
|
88
88
|
export type RichTextColumn = {
|
|
89
|
-
dataType:
|
|
89
|
+
dataType: 'richText';
|
|
90
90
|
htmlField: string;
|
|
91
91
|
contentField?: string;
|
|
92
92
|
};
|
|
93
93
|
export type BetterRichTextColumn = {
|
|
94
|
-
dataType:
|
|
94
|
+
dataType: 'betterRichText';
|
|
95
95
|
htmlField: string;
|
|
96
96
|
fileUploadProperties?: FileUploadProperties;
|
|
97
97
|
};
|
|
@@ -207,7 +207,7 @@ export type CreateConfig = {
|
|
|
207
207
|
redirectToCreatedItems?: boolean;
|
|
208
208
|
};
|
|
209
209
|
export type TablePanel = {
|
|
210
|
-
type:
|
|
210
|
+
type: 'table';
|
|
211
211
|
query: string;
|
|
212
212
|
formattedQuery?: string;
|
|
213
213
|
canDownload?: boolean;
|
|
@@ -216,7 +216,7 @@ export type TablePanel = {
|
|
|
216
216
|
canCreate?: boolean;
|
|
217
217
|
canImport?: boolean;
|
|
218
218
|
importFileTypes?: string[];
|
|
219
|
-
parseImportFile?: (file: FormDataFile) => Promise<any[]>;
|
|
219
|
+
parseImportFile?: (file: FormDataFile, id?: any) => Promise<any[]>;
|
|
220
220
|
createConfig?: CreateConfig;
|
|
221
221
|
tableName?: string;
|
|
222
222
|
primaryId?: string;
|
|
@@ -237,14 +237,14 @@ export type TablePanel = {
|
|
|
237
237
|
}) => void;
|
|
238
238
|
};
|
|
239
239
|
export type MapPanel = {
|
|
240
|
-
type:
|
|
240
|
+
type: 'map';
|
|
241
241
|
query: string;
|
|
242
242
|
latitudeField: string;
|
|
243
243
|
longitudeField: string;
|
|
244
244
|
zoom?: number;
|
|
245
245
|
};
|
|
246
246
|
export type GalleryPanel = {
|
|
247
|
-
type:
|
|
247
|
+
type: 'gallery';
|
|
248
248
|
query: string;
|
|
249
249
|
canDelete?: boolean;
|
|
250
250
|
canCreate?: boolean;
|
|
@@ -260,13 +260,13 @@ export type GalleryPanel = {
|
|
|
260
260
|
data: any;
|
|
261
261
|
}) => void;
|
|
262
262
|
deleteCallback?: string;
|
|
263
|
-
deleteCallbackFunction?: ({ id, deletedRecord }: {
|
|
263
|
+
deleteCallbackFunction?: ({ id, deletedRecord, }: {
|
|
264
264
|
id: number;
|
|
265
265
|
deletedRecord?: any;
|
|
266
266
|
}) => void;
|
|
267
267
|
};
|
|
268
268
|
export type ChatPanel = {
|
|
269
|
-
type:
|
|
269
|
+
type: 'chat';
|
|
270
270
|
getMessagesQuery: string;
|
|
271
271
|
postMessageUrl: string;
|
|
272
272
|
messageField: string;
|
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -465,7 +465,7 @@ export default (db, config, user) => {
|
|
|
465
465
|
return res.status(500).send("\"createConfig\" doit être défini dans la configuration du panneau.");
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
-
const records = await panel.parseImportFile(files.data[0]);
|
|
468
|
+
const records = await panel.parseImportFile(files.data[0], fields.recordId[0]);
|
|
469
469
|
const columns = [];
|
|
470
470
|
if (records.length === 0) {
|
|
471
471
|
return res.send({
|