@saltcorn/data 0.7.2-beta.9 → 0.7.3-beta.1
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/app-locales/public/da.json +3 -0
- package/dist/base-plugin/actions.d.ts.map +1 -1
- package/dist/base-plugin/actions.js +15 -0
- package/dist/base-plugin/actions.js.map +1 -1
- package/dist/base-plugin/fieldviews.d.ts.map +1 -1
- package/dist/base-plugin/fieldviews.js +7 -0
- package/dist/base-plugin/fieldviews.js.map +1 -1
- package/dist/base-plugin/index.d.ts +234 -214
- package/dist/base-plugin/index.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/edit.d.ts +29 -1
- package/dist/base-plugin/viewtemplates/edit.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/edit.js +115 -49
- package/dist/base-plugin/viewtemplates/edit.js.map +1 -1
- package/dist/base-plugin/viewtemplates/feed.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/feed.js +1 -0
- package/dist/base-plugin/viewtemplates/feed.js.map +1 -1
- package/dist/base-plugin/viewtemplates/filter.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/filter.js +13 -0
- package/dist/base-plugin/viewtemplates/filter.js.map +1 -1
- package/dist/base-plugin/viewtemplates/list.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/list.js +1 -0
- package/dist/base-plugin/viewtemplates/list.js.map +1 -1
- package/dist/base-plugin/viewtemplates/room.d.ts +7 -1
- package/dist/base-plugin/viewtemplates/room.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/room.js +3 -2
- package/dist/base-plugin/viewtemplates/room.js.map +1 -1
- package/dist/base-plugin/viewtemplates/show.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/show.js +3 -1
- package/dist/base-plugin/viewtemplates/show.js.map +1 -1
- package/dist/base-plugin/viewtemplates/viewable_fields.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/viewable_fields.js +4 -2
- package/dist/base-plugin/viewtemplates/viewable_fields.js.map +1 -1
- package/dist/models/config.d.ts.map +1 -1
- package/dist/models/config.js +20 -0
- package/dist/models/config.js.map +1 -1
- package/dist/models/field.d.ts.map +1 -1
- package/dist/models/field.js +23 -9
- package/dist/models/field.js.map +1 -1
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/page.d.ts.map +1 -1
- package/dist/models/page.js +9 -0
- package/dist/models/page.js.map +1 -1
- package/dist/models/scheduler.d.ts +1 -1
- package/dist/models/scheduler.d.ts.map +1 -1
- package/dist/models/scheduler.js +27 -2
- package/dist/models/scheduler.js.map +1 -1
- package/dist/models/table.d.ts.map +1 -1
- package/dist/models/table.js +3 -1
- package/dist/models/table.js.map +1 -1
- package/dist/plugin-helper.d.ts.map +1 -1
- package/dist/plugin-helper.js +8 -0
- package/dist/plugin-helper.js.map +1 -1
- package/dist/tests/exact_views.test.js +17 -17
- package/dist/tests/exact_views.test.js.map +1 -1
- package/dist/tests/field.test.js +70 -2
- package/dist/tests/field.test.js.map +1 -1
- package/dist/tests/table.test.js +28 -0
- package/dist/tests/table.test.js.map +1 -1
- package/dist/tsconfig.ref.tsbuildinfo +1 -1
- package/package.json +7 -7
|
@@ -256,17 +256,79 @@ export const types: ({
|
|
|
256
256
|
fieldviews: {
|
|
257
257
|
show: {
|
|
258
258
|
isEdit: boolean;
|
|
259
|
-
run: (
|
|
259
|
+
run: (v: any) => any;
|
|
260
|
+
};
|
|
261
|
+
checkboxes: {
|
|
262
|
+
isEdit: boolean;
|
|
263
|
+
run: (v: any) => any;
|
|
264
|
+
};
|
|
265
|
+
TrueFalse: {
|
|
266
|
+
isEdit: boolean;
|
|
267
|
+
run: (v: any) => "" | "True" | "False";
|
|
260
268
|
};
|
|
261
269
|
edit: {
|
|
262
270
|
isEdit: boolean;
|
|
263
|
-
|
|
271
|
+
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
272
|
+
};
|
|
273
|
+
tristate: {
|
|
274
|
+
isEdit: boolean;
|
|
264
275
|
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
265
276
|
};
|
|
266
277
|
};
|
|
267
278
|
attributes: object[];
|
|
268
|
-
|
|
279
|
+
readFromFormRecord: (rec: any, name: string) => boolean | null;
|
|
280
|
+
read: (v: object) => boolean | null;
|
|
281
|
+
readFromDB: (v: object) => object;
|
|
282
|
+
listAs: (v: object) => object;
|
|
269
283
|
validate: () => boolean;
|
|
284
|
+
} | {
|
|
285
|
+
name: string;
|
|
286
|
+
sql_name: string;
|
|
287
|
+
contract: () => Function;
|
|
288
|
+
attributes: object[];
|
|
289
|
+
fieldviews: {
|
|
290
|
+
show: {
|
|
291
|
+
isEdit: boolean;
|
|
292
|
+
run: (d: any, req: any) => any;
|
|
293
|
+
};
|
|
294
|
+
showDay: {
|
|
295
|
+
isEdit: boolean;
|
|
296
|
+
run: (d: any, req: any) => any;
|
|
297
|
+
};
|
|
298
|
+
format: {
|
|
299
|
+
isEdit: boolean;
|
|
300
|
+
configFields: {
|
|
301
|
+
name: string;
|
|
302
|
+
label: string;
|
|
303
|
+
type: string;
|
|
304
|
+
sublabel: string;
|
|
305
|
+
}[];
|
|
306
|
+
run: (d: any, req: any, options: any) => string;
|
|
307
|
+
};
|
|
308
|
+
relative: {
|
|
309
|
+
isEdit: boolean;
|
|
310
|
+
run: (d: any, req: any) => string;
|
|
311
|
+
};
|
|
312
|
+
yearsAgo: {
|
|
313
|
+
isEdit: boolean;
|
|
314
|
+
run: (d: any, req: any) => string;
|
|
315
|
+
};
|
|
316
|
+
edit: {
|
|
317
|
+
isEdit: boolean;
|
|
318
|
+
blockDisplay: boolean;
|
|
319
|
+
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
320
|
+
};
|
|
321
|
+
editDay: {
|
|
322
|
+
isEdit: boolean;
|
|
323
|
+
blockDisplay: boolean;
|
|
324
|
+
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
presets: {
|
|
328
|
+
Now: () => Date;
|
|
329
|
+
};
|
|
330
|
+
read: (v: object, attrs: object) => object;
|
|
331
|
+
validate: ({}: object) => boolean;
|
|
270
332
|
} | {
|
|
271
333
|
name: string;
|
|
272
334
|
sql_name: string;
|
|
@@ -340,81 +402,19 @@ export const types: ({
|
|
|
340
402
|
name: string;
|
|
341
403
|
sql_name: string;
|
|
342
404
|
contract: () => Function;
|
|
343
|
-
attributes: object[];
|
|
344
405
|
fieldviews: {
|
|
345
406
|
show: {
|
|
346
407
|
isEdit: boolean;
|
|
347
|
-
run: (
|
|
348
|
-
};
|
|
349
|
-
showDay: {
|
|
350
|
-
isEdit: boolean;
|
|
351
|
-
run: (d: any, req: any) => any;
|
|
352
|
-
};
|
|
353
|
-
format: {
|
|
354
|
-
isEdit: boolean;
|
|
355
|
-
configFields: {
|
|
356
|
-
name: string;
|
|
357
|
-
label: string;
|
|
358
|
-
type: string;
|
|
359
|
-
sublabel: string;
|
|
360
|
-
}[];
|
|
361
|
-
run: (d: any, req: any, options: any) => string;
|
|
362
|
-
};
|
|
363
|
-
relative: {
|
|
364
|
-
isEdit: boolean;
|
|
365
|
-
run: (d: any, req: any) => string;
|
|
366
|
-
};
|
|
367
|
-
yearsAgo: {
|
|
368
|
-
isEdit: boolean;
|
|
369
|
-
run: (d: any, req: any) => string;
|
|
408
|
+
run: (s: any) => any;
|
|
370
409
|
};
|
|
371
410
|
edit: {
|
|
372
411
|
isEdit: boolean;
|
|
373
412
|
blockDisplay: boolean;
|
|
374
413
|
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
375
414
|
};
|
|
376
|
-
editDay: {
|
|
377
|
-
isEdit: boolean;
|
|
378
|
-
blockDisplay: boolean;
|
|
379
|
-
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
380
|
-
};
|
|
381
|
-
};
|
|
382
|
-
presets: {
|
|
383
|
-
Now: () => Date;
|
|
384
|
-
};
|
|
385
|
-
read: (v: object, attrs: object) => object;
|
|
386
|
-
validate: ({}: object) => boolean;
|
|
387
|
-
} | {
|
|
388
|
-
name: string;
|
|
389
|
-
sql_name: string;
|
|
390
|
-
contract: () => Function;
|
|
391
|
-
fieldviews: {
|
|
392
|
-
show: {
|
|
393
|
-
isEdit: boolean;
|
|
394
|
-
run: (v: any) => any;
|
|
395
|
-
};
|
|
396
|
-
checkboxes: {
|
|
397
|
-
isEdit: boolean;
|
|
398
|
-
run: (v: any) => any;
|
|
399
|
-
};
|
|
400
|
-
TrueFalse: {
|
|
401
|
-
isEdit: boolean;
|
|
402
|
-
run: (v: any) => "" | "True" | "False";
|
|
403
|
-
};
|
|
404
|
-
edit: {
|
|
405
|
-
isEdit: boolean;
|
|
406
|
-
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
407
|
-
};
|
|
408
|
-
tristate: {
|
|
409
|
-
isEdit: boolean;
|
|
410
|
-
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
411
|
-
};
|
|
412
415
|
};
|
|
413
416
|
attributes: object[];
|
|
414
|
-
|
|
415
|
-
read: (v: object) => boolean | null;
|
|
416
|
-
readFromDB: (v: object) => object;
|
|
417
|
-
listAs: (v: object) => object;
|
|
417
|
+
read: (v: object) => object;
|
|
418
418
|
validate: () => boolean;
|
|
419
419
|
})[];
|
|
420
420
|
export const viewtemplates: ({
|
|
@@ -472,92 +472,6 @@ export const viewtemplates: ({
|
|
|
472
472
|
getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
473
473
|
};
|
|
474
474
|
configCheck: (view: any) => Promise<string[]>;
|
|
475
|
-
} | {
|
|
476
|
-
name: string;
|
|
477
|
-
description: string;
|
|
478
|
-
configuration_workflow: (req: object) => import("../models/workflow");
|
|
479
|
-
run: (table_id: number, viewname: string, {}: {
|
|
480
|
-
columns: any;
|
|
481
|
-
layout: any;
|
|
482
|
-
}, state: string, { res, req }: {
|
|
483
|
-
req: object;
|
|
484
|
-
res: object;
|
|
485
|
-
}, { editQuery }: {
|
|
486
|
-
editQuery: any;
|
|
487
|
-
}) => Promise<import("../models/form")>;
|
|
488
|
-
runMany: (table_id: number, viewname: string, { columns, layout, auto_save }: {
|
|
489
|
-
columns: any;
|
|
490
|
-
layout: any;
|
|
491
|
-
}, state: State, extra: object, { editManyQuery, getRowQuery }: {
|
|
492
|
-
editManyQuery: any;
|
|
493
|
-
getRowQuery: any;
|
|
494
|
-
}) => Promise<import("../models/form")[]>;
|
|
495
|
-
runPost: (table_id: number, viewname: string, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, }: {
|
|
496
|
-
columns: object[];
|
|
497
|
-
layout: Layout;
|
|
498
|
-
fixed: object;
|
|
499
|
-
view_when_done: boolean;
|
|
500
|
-
formula_destinations: object[];
|
|
501
|
-
}, state: object, body: any, { res, req, redirect }: {
|
|
502
|
-
res: object;
|
|
503
|
-
req: object;
|
|
504
|
-
redirect: string;
|
|
505
|
-
}, { tryInsertQuery, tryUpdateQuery, getRowQuery }: {
|
|
506
|
-
tryInsertQuery: any;
|
|
507
|
-
tryUpdateQuery: any;
|
|
508
|
-
getRowQuery: any;
|
|
509
|
-
}, remote: any) => Promise<void>;
|
|
510
|
-
get_state_fields: (table_id: any, viewname: any, { columns }: {
|
|
511
|
-
columns: any;
|
|
512
|
-
}) => Promise<object[]>;
|
|
513
|
-
initial_config: Function;
|
|
514
|
-
display_state_form: boolean;
|
|
515
|
-
authorise_post: ({ body, table_id, req }: {
|
|
516
|
-
body: object;
|
|
517
|
-
table_id: string;
|
|
518
|
-
req: object;
|
|
519
|
-
}, { authorizePostQuery }: {
|
|
520
|
-
authorizePostQuery: any;
|
|
521
|
-
}) => Promise<boolean>;
|
|
522
|
-
authorise_get: ({ query, table_id, req }: {
|
|
523
|
-
query: object;
|
|
524
|
-
rest: any;
|
|
525
|
-
}, { authorizeGetQuery }: {
|
|
526
|
-
authorizeGetQuery: any;
|
|
527
|
-
}) => Promise<boolean>;
|
|
528
|
-
getStringsForI18n({ layout }: {
|
|
529
|
-
layout: Layout;
|
|
530
|
-
}): string[];
|
|
531
|
-
queries: ({ table_id, name, configuration: { columns, default_state, layout, auto_save, destination_type, }, req, res, }: {
|
|
532
|
-
table_id: any;
|
|
533
|
-
name: any;
|
|
534
|
-
configuration: {
|
|
535
|
-
columns: any;
|
|
536
|
-
default_state: any;
|
|
537
|
-
layout: any;
|
|
538
|
-
auto_save: any;
|
|
539
|
-
destination_type: any;
|
|
540
|
-
};
|
|
541
|
-
req: any;
|
|
542
|
-
res: any;
|
|
543
|
-
}) => {
|
|
544
|
-
editQuery(state: any): Promise<import("../models/form")>;
|
|
545
|
-
editManyQuery(state: any): Promise<{
|
|
546
|
-
table: import("../models/table") | null;
|
|
547
|
-
fields: import("../models/field")[];
|
|
548
|
-
rows: import("@saltcorn/db-common/internal").Row[];
|
|
549
|
-
}>;
|
|
550
|
-
tryInsertQuery(row: any): Promise<{
|
|
551
|
-
error: string;
|
|
552
|
-
} | {
|
|
553
|
-
success: any;
|
|
554
|
-
}>;
|
|
555
|
-
tryUpdateQuery(row: any, id: any): Promise<import("@saltcorn/types/common_types").ResultMessage>;
|
|
556
|
-
authorizePostQuery(body: any, table_id: any): Promise<boolean | "" | null | undefined>;
|
|
557
|
-
authorizeGetQuery(query: any, table_id: any): Promise<boolean | "" | null | undefined>;
|
|
558
|
-
getRowQuery(table_id: any, view_select: any, row_id: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
559
|
-
};
|
|
560
|
-
configCheck: (view: any) => Promise<string[]>;
|
|
561
475
|
} | {
|
|
562
476
|
name: string;
|
|
563
477
|
description: string;
|
|
@@ -630,36 +544,6 @@ export const viewtemplates: ({
|
|
|
630
544
|
authorizeGetQuery(query: any, table_id: any): Promise<boolean>;
|
|
631
545
|
};
|
|
632
546
|
configCheck: (view: any) => Promise<string[]>;
|
|
633
|
-
} | {
|
|
634
|
-
name: string;
|
|
635
|
-
description: string;
|
|
636
|
-
configuration_workflow: (req: object) => import("../models/workflow");
|
|
637
|
-
run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
|
|
638
|
-
list_view: string;
|
|
639
|
-
show_view: string;
|
|
640
|
-
subtables: object;
|
|
641
|
-
}, state: any, extraArgs: any, { getRowQuery }: {
|
|
642
|
-
getRowQuery: any;
|
|
643
|
-
}) => Promise<div>;
|
|
644
|
-
get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
|
|
645
|
-
list_view: string;
|
|
646
|
-
show_view: any;
|
|
647
|
-
}) => Promise<object[]>;
|
|
648
|
-
display_state_form: ({ list_view, _omit_state_form }: {
|
|
649
|
-
list_view: string;
|
|
650
|
-
_omit_state_form: boolean;
|
|
651
|
-
}) => boolean;
|
|
652
|
-
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
653
|
-
table_id: any;
|
|
654
|
-
viewname: any;
|
|
655
|
-
configuration: {
|
|
656
|
-
columns: any;
|
|
657
|
-
default_state: any;
|
|
658
|
-
};
|
|
659
|
-
req: any;
|
|
660
|
-
}) => {
|
|
661
|
-
getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
662
|
-
};
|
|
663
547
|
} | {
|
|
664
548
|
name: string;
|
|
665
549
|
description: string;
|
|
@@ -699,36 +583,6 @@ export const viewtemplates: ({
|
|
|
699
583
|
}) => {
|
|
700
584
|
countRowsQuery(state: any): Promise<number>;
|
|
701
585
|
};
|
|
702
|
-
} | {
|
|
703
|
-
name: string;
|
|
704
|
-
description: string;
|
|
705
|
-
get_state_fields: () => object[];
|
|
706
|
-
configuration_workflow: () => import("../models/workflow");
|
|
707
|
-
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
708
|
-
columns: object[];
|
|
709
|
-
layout: object;
|
|
710
|
-
}, state: object, extra: object, { distinctValuesQuery }: {
|
|
711
|
-
distinctValuesQuery: any;
|
|
712
|
-
}) => Promise<Layout>;
|
|
713
|
-
initial_config: () => Promise<object>;
|
|
714
|
-
display_state_form: boolean;
|
|
715
|
-
getStringsForI18n({ layout }: {
|
|
716
|
-
layout: any;
|
|
717
|
-
}): string[];
|
|
718
|
-
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
719
|
-
table_id: any;
|
|
720
|
-
viewname: any;
|
|
721
|
-
configuration: {
|
|
722
|
-
columns: any;
|
|
723
|
-
default_state: any;
|
|
724
|
-
};
|
|
725
|
-
req: any;
|
|
726
|
-
}) => {
|
|
727
|
-
distinctValuesQuery(): Promise<{
|
|
728
|
-
distinct_values: {};
|
|
729
|
-
role: any;
|
|
730
|
-
}>;
|
|
731
|
-
};
|
|
732
586
|
} | {
|
|
733
587
|
name: string;
|
|
734
588
|
description: string;
|
|
@@ -798,13 +652,19 @@ export const viewtemplates: ({
|
|
|
798
652
|
}) => {
|
|
799
653
|
getRowQuery(state_id: any, part_table_name: any, part_user_field: any, part_key_to_room: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
800
654
|
updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
|
|
801
|
-
submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any): Promise<{
|
|
655
|
+
submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
|
|
802
656
|
json: {
|
|
657
|
+
msgid: {
|
|
658
|
+
error: string;
|
|
659
|
+
} | {
|
|
660
|
+
success: any;
|
|
661
|
+
};
|
|
803
662
|
error?: undefined;
|
|
804
663
|
};
|
|
805
664
|
} | {
|
|
806
665
|
json: {
|
|
807
666
|
error: any;
|
|
667
|
+
msgid?: undefined;
|
|
808
668
|
};
|
|
809
669
|
}>;
|
|
810
670
|
ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
|
|
@@ -820,6 +680,166 @@ export const viewtemplates: ({
|
|
|
820
680
|
}>;
|
|
821
681
|
fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
822
682
|
};
|
|
683
|
+
} | {
|
|
684
|
+
name: string;
|
|
685
|
+
description: string;
|
|
686
|
+
configuration_workflow: (req: object) => import("../models/workflow");
|
|
687
|
+
run: (table_id: number, viewname: string, {}: {
|
|
688
|
+
columns: any;
|
|
689
|
+
layout: any;
|
|
690
|
+
}, state: string, { res, req }: {
|
|
691
|
+
req: object;
|
|
692
|
+
res: object;
|
|
693
|
+
}, { editQuery }: {
|
|
694
|
+
editQuery: any;
|
|
695
|
+
}) => Promise<import("../models/form")>;
|
|
696
|
+
runMany: (table_id: number, viewname: string, { columns, layout, auto_save }: {
|
|
697
|
+
columns: any;
|
|
698
|
+
layout: any;
|
|
699
|
+
}, state: State, extra: object, { editManyQuery, getRowQuery }: {
|
|
700
|
+
editManyQuery: any;
|
|
701
|
+
getRowQuery: any;
|
|
702
|
+
}) => Promise<import("../models/form")[]>;
|
|
703
|
+
runPost: (table_id: number, viewname: string, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, }: {
|
|
704
|
+
columns: object[];
|
|
705
|
+
layout: Layout;
|
|
706
|
+
fixed: object;
|
|
707
|
+
view_when_done: boolean;
|
|
708
|
+
formula_destinations: object[];
|
|
709
|
+
}, state: object, body: any, { res, req, redirect }: {
|
|
710
|
+
res: object;
|
|
711
|
+
req: object;
|
|
712
|
+
redirect: string;
|
|
713
|
+
}, { tryInsertQuery, tryUpdateQuery, getRowQuery }: {
|
|
714
|
+
tryInsertQuery: any;
|
|
715
|
+
tryUpdateQuery: any;
|
|
716
|
+
getRowQuery: any;
|
|
717
|
+
}, remote: any) => Promise<void>;
|
|
718
|
+
get_state_fields: (table_id: any, viewname: any, { columns }: {
|
|
719
|
+
columns: any;
|
|
720
|
+
}) => Promise<object[]>;
|
|
721
|
+
initial_config: Function;
|
|
722
|
+
display_state_form: boolean;
|
|
723
|
+
authorise_post: ({ body, table_id, req }: {
|
|
724
|
+
body: object;
|
|
725
|
+
table_id: string;
|
|
726
|
+
req: object;
|
|
727
|
+
}, { authorizePostQuery }: {
|
|
728
|
+
authorizePostQuery: any;
|
|
729
|
+
}) => Promise<boolean>;
|
|
730
|
+
authorise_get: ({ query, table_id, req }: {
|
|
731
|
+
query: object;
|
|
732
|
+
rest: any;
|
|
733
|
+
}, { authorizeGetQuery }: {
|
|
734
|
+
authorizeGetQuery: any;
|
|
735
|
+
}) => Promise<boolean>;
|
|
736
|
+
getStringsForI18n({ layout }: {
|
|
737
|
+
layout: Layout;
|
|
738
|
+
}): string[];
|
|
739
|
+
queries: ({ table_id, name, configuration: { columns, default_state, layout, auto_save, destination_type, }, req, res, }: {
|
|
740
|
+
table_id: any;
|
|
741
|
+
name: any;
|
|
742
|
+
configuration: {
|
|
743
|
+
columns: any;
|
|
744
|
+
default_state: any;
|
|
745
|
+
layout: any;
|
|
746
|
+
auto_save: any;
|
|
747
|
+
destination_type: any;
|
|
748
|
+
};
|
|
749
|
+
req: any;
|
|
750
|
+
res: any;
|
|
751
|
+
}) => {
|
|
752
|
+
editQuery(state: any): Promise<import("../models/form")>;
|
|
753
|
+
editManyQuery(state: any, extra: any): Promise<{
|
|
754
|
+
table: import("../models/table") | null;
|
|
755
|
+
fields: import("../models/field")[];
|
|
756
|
+
rows: import("@saltcorn/db-common/internal").Row[];
|
|
757
|
+
}>;
|
|
758
|
+
tryInsertQuery(row: any): Promise<{
|
|
759
|
+
error: string;
|
|
760
|
+
} | {
|
|
761
|
+
success: any;
|
|
762
|
+
}>;
|
|
763
|
+
tryUpdateQuery(row: any, id: any): Promise<import("@saltcorn/types/common_types").ResultMessage>;
|
|
764
|
+
authorizePostQuery(body: any, table_id: any): Promise<boolean | "" | null | undefined>;
|
|
765
|
+
authorizeGetQuery(query: any, table_id: any): Promise<boolean | "" | null | undefined>;
|
|
766
|
+
getRowQuery(table_id: any, view_select: any, row_id: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
767
|
+
actionQuery(): Promise<{
|
|
768
|
+
json: any;
|
|
769
|
+
}>;
|
|
770
|
+
};
|
|
771
|
+
routes: {
|
|
772
|
+
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
773
|
+
columns: object[];
|
|
774
|
+
layout: any;
|
|
775
|
+
}, body: any, { req, res }: {
|
|
776
|
+
req: object;
|
|
777
|
+
res: any;
|
|
778
|
+
}, { actionQuery }: {
|
|
779
|
+
actionQuery: any;
|
|
780
|
+
}) => Promise<object>;
|
|
781
|
+
};
|
|
782
|
+
configCheck: (view: any) => Promise<string[]>;
|
|
783
|
+
} | {
|
|
784
|
+
name: string;
|
|
785
|
+
description: string;
|
|
786
|
+
configuration_workflow: (req: object) => import("../models/workflow");
|
|
787
|
+
run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
|
|
788
|
+
list_view: string;
|
|
789
|
+
show_view: string;
|
|
790
|
+
subtables: object;
|
|
791
|
+
}, state: any, extraArgs: any, { getRowQuery }: {
|
|
792
|
+
getRowQuery: any;
|
|
793
|
+
}) => Promise<div>;
|
|
794
|
+
get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
|
|
795
|
+
list_view: string;
|
|
796
|
+
show_view: any;
|
|
797
|
+
}) => Promise<object[]>;
|
|
798
|
+
display_state_form: ({ list_view, _omit_state_form }: {
|
|
799
|
+
list_view: string;
|
|
800
|
+
_omit_state_form: boolean;
|
|
801
|
+
}) => boolean;
|
|
802
|
+
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
803
|
+
table_id: any;
|
|
804
|
+
viewname: any;
|
|
805
|
+
configuration: {
|
|
806
|
+
columns: any;
|
|
807
|
+
default_state: any;
|
|
808
|
+
};
|
|
809
|
+
req: any;
|
|
810
|
+
}) => {
|
|
811
|
+
getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
812
|
+
};
|
|
813
|
+
} | {
|
|
814
|
+
name: string;
|
|
815
|
+
description: string;
|
|
816
|
+
get_state_fields: () => object[];
|
|
817
|
+
configuration_workflow: () => import("../models/workflow");
|
|
818
|
+
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
819
|
+
columns: object[];
|
|
820
|
+
layout: object;
|
|
821
|
+
}, state: object, extra: object, { distinctValuesQuery }: {
|
|
822
|
+
distinctValuesQuery: any;
|
|
823
|
+
}) => Promise<Layout>;
|
|
824
|
+
initial_config: () => Promise<object>;
|
|
825
|
+
display_state_form: boolean;
|
|
826
|
+
getStringsForI18n({ layout }: {
|
|
827
|
+
layout: any;
|
|
828
|
+
}): string[];
|
|
829
|
+
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
830
|
+
table_id: any;
|
|
831
|
+
viewname: any;
|
|
832
|
+
configuration: {
|
|
833
|
+
columns: any;
|
|
834
|
+
default_state: any;
|
|
835
|
+
};
|
|
836
|
+
req: any;
|
|
837
|
+
}) => {
|
|
838
|
+
distinctValuesQuery(): Promise<{
|
|
839
|
+
distinct_values: {};
|
|
840
|
+
role: any;
|
|
841
|
+
}>;
|
|
842
|
+
};
|
|
823
843
|
})[];
|
|
824
844
|
import fileviews = require("./fileviews");
|
|
825
845
|
import actions = require("./actions");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../base-plugin/index.js"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAsD;AACtD
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../base-plugin/index.js"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAsD;AACtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA2E;;;;4CAG9D,MAAM;yCAYN,MAAM"}
|
|
@@ -102,6 +102,27 @@ export function authorise_post({ body, table_id, req }: {
|
|
|
102
102
|
import Form = require("../../models/form");
|
|
103
103
|
import Table = require("../../models/table");
|
|
104
104
|
import Field = require("../../models/field");
|
|
105
|
+
/**
|
|
106
|
+
* @param {number} table_id
|
|
107
|
+
* @param {*} viewname
|
|
108
|
+
* @param {object} opts
|
|
109
|
+
* @param {object[]} opts.columns
|
|
110
|
+
* @param {*} opts.layout
|
|
111
|
+
* @param {*} body
|
|
112
|
+
* @param {object} optsTwo
|
|
113
|
+
* @param {object} optsTwo.req
|
|
114
|
+
* @param {*} optsTwo.res
|
|
115
|
+
* @returns {Promise<object>}
|
|
116
|
+
*/
|
|
117
|
+
declare function run_action(table_id: number, viewname: any, { columns, layout }: {
|
|
118
|
+
columns: object[];
|
|
119
|
+
layout: any;
|
|
120
|
+
}, body: any, { req, res }: {
|
|
121
|
+
req: object;
|
|
122
|
+
res: any;
|
|
123
|
+
}, { actionQuery }: {
|
|
124
|
+
actionQuery: any;
|
|
125
|
+
}): Promise<object>;
|
|
105
126
|
import Workflow = require("../../models/workflow");
|
|
106
127
|
export declare const name: string;
|
|
107
128
|
export declare const description: string;
|
|
@@ -142,7 +163,7 @@ export declare function queries({ table_id, name, configuration: { columns, defa
|
|
|
142
163
|
res: any;
|
|
143
164
|
}): {
|
|
144
165
|
editQuery(state: any): Promise<Form>;
|
|
145
|
-
editManyQuery(state: any): Promise<{
|
|
166
|
+
editManyQuery(state: any, extra: any): Promise<{
|
|
146
167
|
table: Table | null;
|
|
147
168
|
fields: Field[];
|
|
148
169
|
rows: import("@saltcorn/db-common/internal").Row[];
|
|
@@ -156,6 +177,13 @@ export declare function queries({ table_id, name, configuration: { columns, defa
|
|
|
156
177
|
authorizePostQuery(body: any, table_id: any): Promise<boolean | "" | null | undefined>;
|
|
157
178
|
authorizeGetQuery(query: any, table_id: any): Promise<boolean | "" | null | undefined>;
|
|
158
179
|
getRowQuery(table_id: any, view_select: any, row_id: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
180
|
+
actionQuery(): Promise<{
|
|
181
|
+
json: any;
|
|
182
|
+
}>;
|
|
159
183
|
};
|
|
184
|
+
export declare namespace routes {
|
|
185
|
+
export { run_action };
|
|
186
|
+
}
|
|
160
187
|
export declare function configCheck(view: any): Promise<string[]>;
|
|
188
|
+
export {};
|
|
161
189
|
//# sourceMappingURL=edit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../base-plugin/viewtemplates/edit.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../base-plugin/viewtemplates/edit.js"],"names":[],"mappings":"AAiEA;;;GAGG;AAEH,4CAJW,MAAM,GACJ,QAAQ,CA+PjB;AAgCJ;;;;;;;;;;;GAWG;AACH,8BAXW,MAAM,YACN,MAAM;IAEK,OAAO;IACP,MAAM;UACjB,MAAM;IAEU,GAAG,EAAnB,MAAM;IACU,GAAG,EAAnB,MAAM;;;IACJ,QAAQ,IAAI,CAAC,CAWzB;AAED;;;;;;;;;GASG;AACH,kCATW,MAAM,YACN,MAAM;IAEE,OAAO;IACP,MAAM;wBAEd,MAAM;;;IACJ,QAAQ,IAAI,EAAE,CAAC,CA6B3B;AAoND;;;;;;;;;;;;;;;;GAgBG;AACH,kCAhBW,MAAM,YACN,MAAM;IAEY,OAAO,EAAzB,MAAM,EAAE;IACQ,MAAM;IACN,KAAK,EAArB,MAAM;IACW,cAAc,EAA/B,OAAO;IACW,oBAAoB,EAAtC,MAAM,EAAE;UACR,MAAM;IAGU,GAAG,EAAnB,MAAM;IACU,GAAG,EAAnB,MAAM;IACU,QAAQ,EAAxB,MAAM;;;;;iBACJ,QAAQ,IAAI,CAAC,CA+MzB;AA5gBD;;;;;;GAMG;AACH;IAHmB,OAAO;IACb,QAAQ,MAAM,EAAE,CAAC,CAQ7B;AAcD,uBAAuB;AACvB,sCAAuD;AAugBvD;;;;;;GAMG;AACH;IALwB,IAAI,EAAjB,MAAM;IACO,QAAQ,EAArB,MAAM;IACO,GAAG,EAAhB,MAAM;;;IACJ,QAAQ,OAAO,CAAC,CAO5B;;;;AAED;;;;;;;;;;;GAWG;AACH,sCAXW,MAAM;IAGS,OAAO,EAAtB,MAAM,EAAE;IACA,MAAM;;IAGE,GAAG,EAAnB,MAAM;IACK,GAAG;;;IACZ,QAAQ,MAAM,CAAC,CAe3B;;2BAGY,MAAM;kCAEN,MAAM;yCAQN,OAAO;AASH;;;;;qBAEd;AACD;;;;GAIG;AACH;;aAEC;AAPD;;;;GAIG;AACH;;aAEC;AACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgIP;;;;AAGW,kEAyBZ"}
|