@saltcorn/data 0.9.2-rc.1 → 0.9.3-beta.0
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/base-plugin/actions.d.ts +16 -128
- package/dist/base-plugin/actions.d.ts.map +1 -1
- package/dist/base-plugin/actions.js +8 -3
- package/dist/base-plugin/actions.js.map +1 -1
- package/dist/base-plugin/index.d.ts +335 -335
- package/dist/base-plugin/types.d.ts.map +1 -1
- package/dist/base-plugin/types.js +8 -2
- package/dist/base-plugin/types.js.map +1 -1
- package/dist/base-plugin/viewtemplates/edit.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/edit.js +23 -14
- package/dist/base-plugin/viewtemplates/edit.js.map +1 -1
- package/dist/base-plugin/viewtemplates/feed.d.ts +1 -1
- package/dist/base-plugin/viewtemplates/filter.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/filter.js +24 -9
- package/dist/base-plugin/viewtemplates/filter.js.map +1 -1
- package/dist/base-plugin/viewtemplates/show.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/show.js +16 -15
- 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 +17 -8
- package/dist/base-plugin/viewtemplates/viewable_fields.js.map +1 -1
- package/dist/db/fixtures.d.ts.map +1 -1
- package/dist/db/fixtures.js +593 -0
- package/dist/db/fixtures.js.map +1 -1
- package/dist/models/config.d.ts.map +1 -1
- package/dist/models/config.js +5 -0
- package/dist/models/config.js.map +1 -1
- package/dist/models/page.d.ts.map +1 -1
- package/dist/models/page.js +2 -0
- package/dist/models/page.js.map +1 -1
- package/dist/models/plugin.js +1 -1
- package/dist/models/plugin.js.map +1 -1
- package/dist/models/table.d.ts.map +1 -1
- package/dist/models/table.js +2 -0
- package/dist/models/table.js.map +1 -1
- package/dist/models/trigger.d.ts.map +1 -1
- package/dist/models/trigger.js +2 -0
- package/dist/models/trigger.js.map +1 -1
- package/dist/models/view.d.ts.map +1 -1
- package/dist/models/view.js +2 -0
- package/dist/models/view.js.map +1 -1
- package/dist/models/workflow.d.ts.map +1 -1
- package/dist/models/workflow.js +5 -2
- package/dist/models/workflow.js.map +1 -1
- package/dist/plugin-helper.d.ts +20 -6
- package/dist/plugin-helper.d.ts.map +1 -1
- package/dist/plugin-helper.js +81 -40
- package/dist/plugin-helper.js.map +1 -1
- package/dist/tests/auth.test.js +4 -4
- package/dist/tests/auth.test.js.map +1 -1
- package/dist/tests/auxtest.test.js +8 -4
- package/dist/tests/auxtest.test.js.map +1 -1
- package/dist/tests/common_helpers.d.ts +0 -1
- package/dist/tests/common_helpers.d.ts.map +1 -1
- package/dist/tests/common_helpers.js +1 -239
- package/dist/tests/common_helpers.js.map +1 -1
- package/dist/tests/table.test.js +22 -12
- package/dist/tests/table.test.js.map +1 -1
- package/dist/tests/view.test.js +14 -2
- package/dist/tests/view.test.js.map +1 -1
- package/dist/tests/workflow.test.js +4 -0
- package/dist/tests/workflow.test.js.map +1 -1
- package/package.json +7 -7
|
@@ -393,100 +393,7 @@ export const types: ({
|
|
|
393
393
|
show: {
|
|
394
394
|
isEdit: boolean;
|
|
395
395
|
description: string;
|
|
396
|
-
run: (
|
|
397
|
-
};
|
|
398
|
-
checkboxes: {
|
|
399
|
-
isEdit: boolean;
|
|
400
|
-
description: string;
|
|
401
|
-
run: (v: any) => any;
|
|
402
|
-
};
|
|
403
|
-
TrueFalse: {
|
|
404
|
-
isEdit: boolean;
|
|
405
|
-
description: string;
|
|
406
|
-
run: (v: any) => "" | "True" | "False";
|
|
407
|
-
};
|
|
408
|
-
edit: {
|
|
409
|
-
isEdit: boolean;
|
|
410
|
-
description: string;
|
|
411
|
-
configFields: {
|
|
412
|
-
name: string;
|
|
413
|
-
label: string;
|
|
414
|
-
type: string;
|
|
415
|
-
attributes: {
|
|
416
|
-
options: string[];
|
|
417
|
-
};
|
|
418
|
-
}[];
|
|
419
|
-
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
420
|
-
};
|
|
421
|
-
switch: {
|
|
422
|
-
isEdit: boolean;
|
|
423
|
-
description: string;
|
|
424
|
-
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
425
|
-
};
|
|
426
|
-
show_with_html: {
|
|
427
|
-
configFields: {
|
|
428
|
-
input_type: string;
|
|
429
|
-
name: string;
|
|
430
|
-
label: string;
|
|
431
|
-
sublabel: string;
|
|
432
|
-
default: string;
|
|
433
|
-
attributes: {
|
|
434
|
-
mode: string;
|
|
435
|
-
};
|
|
436
|
-
}[];
|
|
437
|
-
isEdit: boolean;
|
|
438
|
-
description: string;
|
|
439
|
-
run: (v: any, req: any, attrs?: {}) => any;
|
|
440
|
-
};
|
|
441
|
-
tristate: {
|
|
442
|
-
isEdit: boolean;
|
|
443
|
-
description: string;
|
|
444
|
-
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
445
|
-
};
|
|
446
|
-
};
|
|
447
|
-
attributes: object[];
|
|
448
|
-
readFromFormRecord: (rec: any, name: string) => boolean | null;
|
|
449
|
-
read: (v: object) => boolean | null;
|
|
450
|
-
readFromDB: (v: object) => object;
|
|
451
|
-
listAs: (v: object) => object;
|
|
452
|
-
validate: () => boolean;
|
|
453
|
-
} | {
|
|
454
|
-
name: string;
|
|
455
|
-
sql_name: string;
|
|
456
|
-
js_type: string;
|
|
457
|
-
contract: () => Function;
|
|
458
|
-
attributes: object[];
|
|
459
|
-
fieldviews: {
|
|
460
|
-
show: {
|
|
461
|
-
isEdit: boolean;
|
|
462
|
-
description: string;
|
|
463
|
-
run: (d: any, req: any, attrs?: {}) => any;
|
|
464
|
-
};
|
|
465
|
-
showDay: {
|
|
466
|
-
isEdit: boolean;
|
|
467
|
-
description: string;
|
|
468
|
-
run: (d: any, req: any) => any;
|
|
469
|
-
};
|
|
470
|
-
format: {
|
|
471
|
-
isEdit: boolean;
|
|
472
|
-
description: string;
|
|
473
|
-
configFields: {
|
|
474
|
-
name: string;
|
|
475
|
-
label: string;
|
|
476
|
-
type: string;
|
|
477
|
-
sublabel: string;
|
|
478
|
-
}[];
|
|
479
|
-
run: (d: any, req: any, options: any) => any;
|
|
480
|
-
};
|
|
481
|
-
relative: {
|
|
482
|
-
isEdit: boolean;
|
|
483
|
-
description: string;
|
|
484
|
-
run: (d: any, req: any) => string;
|
|
485
|
-
};
|
|
486
|
-
yearsAgo: {
|
|
487
|
-
isEdit: boolean;
|
|
488
|
-
description: string;
|
|
489
|
-
run: (d: any, req: any) => string;
|
|
396
|
+
run: (s: any) => any;
|
|
490
397
|
};
|
|
491
398
|
show_with_html: {
|
|
492
399
|
configFields: {
|
|
@@ -509,17 +416,9 @@ export const types: ({
|
|
|
509
416
|
description: string;
|
|
510
417
|
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
511
418
|
};
|
|
512
|
-
editDay: {
|
|
513
|
-
isEdit: boolean;
|
|
514
|
-
blockDisplay: boolean;
|
|
515
|
-
description: string;
|
|
516
|
-
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
517
|
-
};
|
|
518
|
-
};
|
|
519
|
-
presets: {
|
|
520
|
-
Now: () => Date;
|
|
521
419
|
};
|
|
522
|
-
|
|
420
|
+
attributes: object[];
|
|
421
|
+
read: (v: object) => object;
|
|
523
422
|
validate: () => boolean;
|
|
524
423
|
} | {
|
|
525
424
|
name: string;
|
|
@@ -652,11 +551,38 @@ export const types: ({
|
|
|
652
551
|
sql_name: string;
|
|
653
552
|
js_type: string;
|
|
654
553
|
contract: () => Function;
|
|
554
|
+
attributes: object[];
|
|
655
555
|
fieldviews: {
|
|
656
556
|
show: {
|
|
657
557
|
isEdit: boolean;
|
|
658
558
|
description: string;
|
|
659
|
-
run: (
|
|
559
|
+
run: (d: any, req: any, attrs?: {}) => any;
|
|
560
|
+
};
|
|
561
|
+
showDay: {
|
|
562
|
+
isEdit: boolean;
|
|
563
|
+
description: string;
|
|
564
|
+
run: (d: any, req: any) => any;
|
|
565
|
+
};
|
|
566
|
+
format: {
|
|
567
|
+
isEdit: boolean;
|
|
568
|
+
description: string;
|
|
569
|
+
configFields: {
|
|
570
|
+
name: string;
|
|
571
|
+
label: string;
|
|
572
|
+
type: string;
|
|
573
|
+
sublabel: string;
|
|
574
|
+
}[];
|
|
575
|
+
run: (d: any, req: any, options: any) => any;
|
|
576
|
+
};
|
|
577
|
+
relative: {
|
|
578
|
+
isEdit: boolean;
|
|
579
|
+
description: string;
|
|
580
|
+
run: (d: any, req: any) => string;
|
|
581
|
+
};
|
|
582
|
+
yearsAgo: {
|
|
583
|
+
isEdit: boolean;
|
|
584
|
+
description: string;
|
|
585
|
+
run: (d: any, req: any) => string;
|
|
660
586
|
};
|
|
661
587
|
show_with_html: {
|
|
662
588
|
configFields: {
|
|
@@ -679,12 +605,122 @@ export const types: ({
|
|
|
679
605
|
description: string;
|
|
680
606
|
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
681
607
|
};
|
|
608
|
+
editDay: {
|
|
609
|
+
isEdit: boolean;
|
|
610
|
+
blockDisplay: boolean;
|
|
611
|
+
description: string;
|
|
612
|
+
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
presets: {
|
|
616
|
+
Now: () => Date;
|
|
617
|
+
};
|
|
618
|
+
read: (v: object, attrs: object) => object;
|
|
619
|
+
validate: () => boolean;
|
|
620
|
+
} | {
|
|
621
|
+
name: string;
|
|
622
|
+
sql_name: string;
|
|
623
|
+
js_type: string;
|
|
624
|
+
contract: () => Function;
|
|
625
|
+
fieldviews: {
|
|
626
|
+
show: {
|
|
627
|
+
isEdit: boolean;
|
|
628
|
+
description: string;
|
|
629
|
+
run: (v: any) => any;
|
|
630
|
+
};
|
|
631
|
+
checkboxes: {
|
|
632
|
+
isEdit: boolean;
|
|
633
|
+
description: string;
|
|
634
|
+
run: (v: any) => any;
|
|
635
|
+
};
|
|
636
|
+
TrueFalse: {
|
|
637
|
+
isEdit: boolean;
|
|
638
|
+
description: string;
|
|
639
|
+
run: (v: any) => "" | "True" | "False";
|
|
640
|
+
};
|
|
641
|
+
edit: {
|
|
642
|
+
isEdit: boolean;
|
|
643
|
+
description: string;
|
|
644
|
+
configFields: {
|
|
645
|
+
name: string;
|
|
646
|
+
label: string;
|
|
647
|
+
type: string;
|
|
648
|
+
attributes: {
|
|
649
|
+
options: string[];
|
|
650
|
+
};
|
|
651
|
+
}[];
|
|
652
|
+
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
653
|
+
};
|
|
654
|
+
switch: {
|
|
655
|
+
isEdit: boolean;
|
|
656
|
+
description: string;
|
|
657
|
+
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
658
|
+
};
|
|
659
|
+
show_with_html: {
|
|
660
|
+
configFields: {
|
|
661
|
+
input_type: string;
|
|
662
|
+
name: string;
|
|
663
|
+
label: string;
|
|
664
|
+
sublabel: string;
|
|
665
|
+
default: string;
|
|
666
|
+
attributes: {
|
|
667
|
+
mode: string;
|
|
668
|
+
};
|
|
669
|
+
}[];
|
|
670
|
+
isEdit: boolean;
|
|
671
|
+
description: string;
|
|
672
|
+
run: (v: any, req: any, attrs?: {}) => any;
|
|
673
|
+
};
|
|
674
|
+
tristate: {
|
|
675
|
+
isEdit: boolean;
|
|
676
|
+
description: string;
|
|
677
|
+
run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
|
|
678
|
+
};
|
|
682
679
|
};
|
|
683
680
|
attributes: object[];
|
|
684
|
-
|
|
681
|
+
readFromFormRecord: (rec: any, name: string) => boolean | null;
|
|
682
|
+
read: (v: object) => boolean | null;
|
|
683
|
+
readFromDB: (v: object) => object;
|
|
684
|
+
listAs: (v: object) => object;
|
|
685
685
|
validate: () => boolean;
|
|
686
686
|
})[];
|
|
687
687
|
export const viewtemplates: ({
|
|
688
|
+
name: string;
|
|
689
|
+
description: string;
|
|
690
|
+
configuration_workflow: (req: object) => import("../models/workflow");
|
|
691
|
+
run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
|
|
692
|
+
list_view: string;
|
|
693
|
+
show_view: string;
|
|
694
|
+
subtables: object;
|
|
695
|
+
}, state: any, extraArgs: any, { getRowQuery }: {
|
|
696
|
+
getRowQuery: any;
|
|
697
|
+
}) => Promise<div>;
|
|
698
|
+
get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
|
|
699
|
+
list_view: string;
|
|
700
|
+
show_view: any;
|
|
701
|
+
}) => Promise<object[]>;
|
|
702
|
+
display_state_form: ({ list_view, _omit_state_form }: {
|
|
703
|
+
list_view: string;
|
|
704
|
+
_omit_state_form: boolean;
|
|
705
|
+
}) => boolean;
|
|
706
|
+
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
707
|
+
table_id: any;
|
|
708
|
+
viewname: any;
|
|
709
|
+
configuration: {
|
|
710
|
+
columns: any;
|
|
711
|
+
default_state: any;
|
|
712
|
+
};
|
|
713
|
+
req: any;
|
|
714
|
+
}) => {
|
|
715
|
+
getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
716
|
+
};
|
|
717
|
+
connectedObjects: ({ list_view, subtables }: {
|
|
718
|
+
list_view: any;
|
|
719
|
+
subtables: any;
|
|
720
|
+
}) => Promise<{
|
|
721
|
+
embeddedViews: import("../models/view")[];
|
|
722
|
+
}>;
|
|
723
|
+
} | {
|
|
688
724
|
name: string;
|
|
689
725
|
description: string;
|
|
690
726
|
configuration_workflow: (req: object) => import("../models/workflow");
|
|
@@ -747,156 +783,7 @@ export const viewtemplates: ({
|
|
|
747
783
|
} | {
|
|
748
784
|
name: string;
|
|
749
785
|
description: string;
|
|
750
|
-
|
|
751
|
-
run: (table_id: number, viewname: string, cfg: any, state: string, { res, req }: {
|
|
752
|
-
req: object;
|
|
753
|
-
res: object;
|
|
754
|
-
}, { editQuery }: {
|
|
755
|
-
editQuery: any;
|
|
756
|
-
}) => Promise<import("../models/form")>;
|
|
757
|
-
runMany: (table_id: number, viewname: string, { columns, layout, auto_save, split_paste }: {
|
|
758
|
-
columns: any;
|
|
759
|
-
layout: any;
|
|
760
|
-
}, state: State, extra: object, { editManyQuery, getRowQuery, optionsQuery }: {
|
|
761
|
-
editManyQuery: any;
|
|
762
|
-
getRowQuery: any;
|
|
763
|
-
optionsQuery: any;
|
|
764
|
-
}) => Promise<import("../models/form")[]>;
|
|
765
|
-
runPost: (table_id: number, viewname: string, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, dest_url_formula, page_when_done, }: {
|
|
766
|
-
columns: object[];
|
|
767
|
-
layout: Layout;
|
|
768
|
-
fixed: object;
|
|
769
|
-
view_when_done: boolean;
|
|
770
|
-
formula_destinations: object[];
|
|
771
|
-
}, state: object, body: any, { res, req, redirect }: {
|
|
772
|
-
res: object;
|
|
773
|
-
req: object;
|
|
774
|
-
redirect: string;
|
|
775
|
-
}, { tryInsertQuery, tryUpdateQuery, getRowQuery, saveFileQuery, optionsQuery, getRowByIdQuery, }: {
|
|
776
|
-
tryInsertQuery: any;
|
|
777
|
-
tryUpdateQuery: any;
|
|
778
|
-
getRowQuery: any;
|
|
779
|
-
saveFileQuery: any;
|
|
780
|
-
optionsQuery: any;
|
|
781
|
-
getRowByIdQuery: any;
|
|
782
|
-
}, remote: any) => Promise<void>;
|
|
783
|
-
get_state_fields: (table_id: any, viewname: any, { columns }: {
|
|
784
|
-
columns: any;
|
|
785
|
-
}) => Promise<object[]>;
|
|
786
|
-
initial_config: Function;
|
|
787
|
-
display_state_form: boolean;
|
|
788
|
-
authorise_post: ({ body, table_id, req }: {
|
|
789
|
-
body: object;
|
|
790
|
-
table_id: string;
|
|
791
|
-
req: object;
|
|
792
|
-
}, { authorizePostQuery }: {
|
|
793
|
-
authorizePostQuery: any;
|
|
794
|
-
}) => Promise<boolean>;
|
|
795
|
-
authorise_get: ({ query, table_id, req }: {
|
|
796
|
-
query: object;
|
|
797
|
-
rest: any;
|
|
798
|
-
}, { authorizeGetQuery }: {
|
|
799
|
-
authorizeGetQuery: any;
|
|
800
|
-
}) => Promise<boolean>;
|
|
801
|
-
getStringsForI18n({ layout }: {
|
|
802
|
-
layout: Layout;
|
|
803
|
-
}): string[];
|
|
804
|
-
queries: ({ table_id, name, configuration: { columns, default_state, layout, auto_save, split_paste, destination_type, }, req, res, }: {
|
|
805
|
-
table_id: any;
|
|
806
|
-
name: any;
|
|
807
|
-
configuration: {
|
|
808
|
-
columns: any;
|
|
809
|
-
default_state: any;
|
|
810
|
-
layout: any;
|
|
811
|
-
auto_save: any;
|
|
812
|
-
split_paste: any;
|
|
813
|
-
destination_type: any;
|
|
814
|
-
};
|
|
815
|
-
req: any;
|
|
816
|
-
res: any;
|
|
817
|
-
}) => {
|
|
818
|
-
editQuery(state: any, mobileReferrer: any): Promise<import("../models/form")>;
|
|
819
|
-
editManyQuery(state: any, { limit, offset, orderBy, orderDesc, where }: {
|
|
820
|
-
limit: any;
|
|
821
|
-
offset: any;
|
|
822
|
-
orderBy: any;
|
|
823
|
-
orderDesc: any;
|
|
824
|
-
where: any;
|
|
825
|
-
}): Promise<{
|
|
826
|
-
table: import("../models/table") | null;
|
|
827
|
-
fields: import("../models/field")[];
|
|
828
|
-
rows: import("@saltcorn/db-common/internal").Row[];
|
|
829
|
-
}>;
|
|
830
|
-
tryInsertQuery(row: any): Promise<{
|
|
831
|
-
error: string;
|
|
832
|
-
} | {
|
|
833
|
-
success: any;
|
|
834
|
-
}>;
|
|
835
|
-
tryUpdateQuery(row: any, id: any): Promise<any>;
|
|
836
|
-
saveFileQuery(fieldVal: any, fieldId: any, fieldView: any, row: any): Promise<string | number>;
|
|
837
|
-
authorizePostQuery(body: any, table_id: any): Promise<boolean | "" | null | undefined>;
|
|
838
|
-
authorizeGetQuery(query: any, table_id: any): Promise<string | boolean | null | undefined>;
|
|
839
|
-
getRowQuery(table_id: any, view_select: any, row_id: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
840
|
-
getRowByIdQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
841
|
-
actionQuery(): Promise<{
|
|
842
|
-
json: any;
|
|
843
|
-
}>;
|
|
844
|
-
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
|
|
845
|
-
updateMatchingQuery(where: any, updateVals: any, repeatFields: any, childRows: any): Promise<any[] | {
|
|
846
|
-
rowError: any;
|
|
847
|
-
inEditError?: undefined;
|
|
848
|
-
error?: undefined;
|
|
849
|
-
} | {
|
|
850
|
-
inEditError: any;
|
|
851
|
-
rowError?: undefined;
|
|
852
|
-
error?: undefined;
|
|
853
|
-
} | {
|
|
854
|
-
error: any;
|
|
855
|
-
rowError?: undefined;
|
|
856
|
-
inEditError?: undefined;
|
|
857
|
-
}>;
|
|
858
|
-
};
|
|
859
|
-
routes: {
|
|
860
|
-
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
861
|
-
columns: object[];
|
|
862
|
-
layout: any;
|
|
863
|
-
}, body: any, { req, res }: {
|
|
864
|
-
req: object;
|
|
865
|
-
res: any;
|
|
866
|
-
}, { actionQuery }: {
|
|
867
|
-
actionQuery: any;
|
|
868
|
-
}) => Promise<object>;
|
|
869
|
-
update_matching_rows: (table_id: any, viewname: any, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, dest_url_formula, page_when_done, }: {
|
|
870
|
-
columns: any;
|
|
871
|
-
layout: any;
|
|
872
|
-
fixed: any;
|
|
873
|
-
view_when_done: any;
|
|
874
|
-
formula_destinations: any;
|
|
875
|
-
auto_save: any;
|
|
876
|
-
destination_type: any;
|
|
877
|
-
dest_url_formula: any;
|
|
878
|
-
page_when_done: any;
|
|
879
|
-
}, body: any, { req, res, redirect }: {
|
|
880
|
-
req: any;
|
|
881
|
-
res: any;
|
|
882
|
-
redirect: any;
|
|
883
|
-
}, { updateMatchingQuery, getRowQuery, saveFileQuery, optionsQuery, getRowByIdQuery, }: {
|
|
884
|
-
updateMatchingQuery: any;
|
|
885
|
-
getRowQuery: any;
|
|
886
|
-
saveFileQuery: any;
|
|
887
|
-
optionsQuery: any;
|
|
888
|
-
getRowByIdQuery: any;
|
|
889
|
-
}) => Promise<void>;
|
|
890
|
-
};
|
|
891
|
-
configCheck: (view: any) => Promise<{
|
|
892
|
-
errors: string[];
|
|
893
|
-
warnings: string[];
|
|
894
|
-
}>;
|
|
895
|
-
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
896
|
-
} | {
|
|
897
|
-
name: string;
|
|
898
|
-
description: string;
|
|
899
|
-
get_state_fields: () => object[];
|
|
786
|
+
get_state_fields: () => object[];
|
|
900
787
|
configuration_workflow: (req: object) => import("../models/workflow");
|
|
901
788
|
run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
|
|
902
789
|
columns: object[];
|
|
@@ -967,49 +854,13 @@ export const viewtemplates: ({
|
|
|
967
854
|
warnings: string[];
|
|
968
855
|
}>;
|
|
969
856
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
970
|
-
} | {
|
|
971
|
-
name: string;
|
|
972
|
-
description: string;
|
|
973
|
-
configuration_workflow: (req: object) => import("../models/workflow");
|
|
974
|
-
run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
|
|
975
|
-
list_view: string;
|
|
976
|
-
show_view: string;
|
|
977
|
-
subtables: object;
|
|
978
|
-
}, state: any, extraArgs: any, { getRowQuery }: {
|
|
979
|
-
getRowQuery: any;
|
|
980
|
-
}) => Promise<div>;
|
|
981
|
-
get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
|
|
982
|
-
list_view: string;
|
|
983
|
-
show_view: any;
|
|
984
|
-
}) => Promise<object[]>;
|
|
985
|
-
display_state_form: ({ list_view, _omit_state_form }: {
|
|
986
|
-
list_view: string;
|
|
987
|
-
_omit_state_form: boolean;
|
|
988
|
-
}) => boolean;
|
|
989
|
-
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
990
|
-
table_id: any;
|
|
991
|
-
viewname: any;
|
|
992
|
-
configuration: {
|
|
993
|
-
columns: any;
|
|
994
|
-
default_state: any;
|
|
995
|
-
};
|
|
996
|
-
req: any;
|
|
997
|
-
}) => {
|
|
998
|
-
getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
999
|
-
};
|
|
1000
|
-
connectedObjects: ({ list_view, subtables }: {
|
|
1001
|
-
list_view: any;
|
|
1002
|
-
subtables: any;
|
|
1003
|
-
}) => Promise<{
|
|
1004
|
-
embeddedViews: import("../models/view")[];
|
|
1005
|
-
}>;
|
|
1006
857
|
} | {
|
|
1007
858
|
name: string;
|
|
1008
859
|
description: string;
|
|
1009
860
|
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1010
861
|
run: (table_id: number, viewname: string, { show_view, order_field, descending, view_to_create, create_view_display, in_card, view_decoration, initial_open_accordions, title_formula, masonry_columns, rows_per_page, hide_pagination, create_view_label, create_view_location, create_link_style, create_link_size, always_create_view, include_fml, empty_view, groupby, ...cols }: {
|
|
1011
862
|
show_view: string;
|
|
1012
|
-
order_field:
|
|
863
|
+
order_field: void;
|
|
1013
864
|
descending: boolean;
|
|
1014
865
|
view_to_create?: string | undefined;
|
|
1015
866
|
create_view_display: string;
|
|
@@ -1043,48 +894,6 @@ export const viewtemplates: ({
|
|
|
1043
894
|
countRowsQuery(state: any): Promise<number>;
|
|
1044
895
|
};
|
|
1045
896
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1046
|
-
} | {
|
|
1047
|
-
name: string;
|
|
1048
|
-
description: string;
|
|
1049
|
-
get_state_fields: () => object[];
|
|
1050
|
-
configuration_workflow: () => import("../models/workflow");
|
|
1051
|
-
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
1052
|
-
columns: object[];
|
|
1053
|
-
layout: object;
|
|
1054
|
-
}, state: object, extra: object, { distinctValuesQuery }: {
|
|
1055
|
-
distinctValuesQuery: any;
|
|
1056
|
-
}) => Promise<Layout>;
|
|
1057
|
-
initial_config: () => Promise<object>;
|
|
1058
|
-
display_state_form: boolean;
|
|
1059
|
-
getStringsForI18n({ layout }: {
|
|
1060
|
-
layout: any;
|
|
1061
|
-
}): string[];
|
|
1062
|
-
routes: {
|
|
1063
|
-
run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
|
|
1064
|
-
req: any;
|
|
1065
|
-
res: any;
|
|
1066
|
-
}, { actionQuery }: {
|
|
1067
|
-
actionQuery: any;
|
|
1068
|
-
}) => Promise<any>;
|
|
1069
|
-
};
|
|
1070
|
-
queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
|
|
1071
|
-
table_id: any;
|
|
1072
|
-
viewname: any;
|
|
1073
|
-
configuration: {
|
|
1074
|
-
columns: any;
|
|
1075
|
-
};
|
|
1076
|
-
req: any;
|
|
1077
|
-
res: any;
|
|
1078
|
-
exttable_name: any;
|
|
1079
|
-
}) => {
|
|
1080
|
-
actionQuery(state: any, rndid: any): Promise<{
|
|
1081
|
-
json: any;
|
|
1082
|
-
}>;
|
|
1083
|
-
distinctValuesQuery(state: any): Promise<{
|
|
1084
|
-
distinct_values: {};
|
|
1085
|
-
role: any;
|
|
1086
|
-
}>;
|
|
1087
|
-
};
|
|
1088
897
|
} | {
|
|
1089
898
|
name: string;
|
|
1090
899
|
description: string;
|
|
@@ -1185,6 +994,197 @@ export const viewtemplates: ({
|
|
|
1185
994
|
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
|
|
1186
995
|
};
|
|
1187
996
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
997
|
+
} | {
|
|
998
|
+
name: string;
|
|
999
|
+
description: string;
|
|
1000
|
+
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1001
|
+
run: (table_id: number, viewname: string, cfg: any, state: string, { res, req }: {
|
|
1002
|
+
req: object;
|
|
1003
|
+
res: object;
|
|
1004
|
+
}, { editQuery }: {
|
|
1005
|
+
editQuery: any;
|
|
1006
|
+
}) => Promise<import("../models/form")>;
|
|
1007
|
+
runMany: (table_id: number, viewname: string, { columns, layout, auto_save, split_paste }: {
|
|
1008
|
+
columns: any;
|
|
1009
|
+
layout: any;
|
|
1010
|
+
}, state: State, extra: object, { editManyQuery, getRowQuery, optionsQuery }: {
|
|
1011
|
+
editManyQuery: any;
|
|
1012
|
+
getRowQuery: any;
|
|
1013
|
+
optionsQuery: any;
|
|
1014
|
+
}) => Promise<import("../models/form")[]>;
|
|
1015
|
+
runPost: (table_id: number, viewname: string, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, dest_url_formula, page_when_done, }: {
|
|
1016
|
+
columns: object[];
|
|
1017
|
+
layout: Layout;
|
|
1018
|
+
fixed: object;
|
|
1019
|
+
view_when_done: boolean;
|
|
1020
|
+
formula_destinations: object[];
|
|
1021
|
+
}, state: object, body: any, { res, req, redirect }: {
|
|
1022
|
+
res: object;
|
|
1023
|
+
req: object;
|
|
1024
|
+
redirect: string;
|
|
1025
|
+
}, { tryInsertQuery, tryUpdateQuery, getRowQuery, saveFileQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1026
|
+
tryInsertQuery: any;
|
|
1027
|
+
tryUpdateQuery: any;
|
|
1028
|
+
getRowQuery: any;
|
|
1029
|
+
saveFileQuery: any;
|
|
1030
|
+
optionsQuery: any;
|
|
1031
|
+
getRowByIdQuery: any;
|
|
1032
|
+
}, remote: any) => Promise<void>;
|
|
1033
|
+
get_state_fields: (table_id: any, viewname: any, { columns }: {
|
|
1034
|
+
columns: any;
|
|
1035
|
+
}) => Promise<object[]>;
|
|
1036
|
+
initial_config: Function;
|
|
1037
|
+
display_state_form: boolean;
|
|
1038
|
+
authorise_post: ({ body, table_id, req }: {
|
|
1039
|
+
body: object;
|
|
1040
|
+
table_id: string;
|
|
1041
|
+
req: object;
|
|
1042
|
+
}, { authorizePostQuery }: {
|
|
1043
|
+
authorizePostQuery: any;
|
|
1044
|
+
}) => Promise<boolean>;
|
|
1045
|
+
authorise_get: ({ query, table_id, req }: {
|
|
1046
|
+
query: object;
|
|
1047
|
+
rest: any;
|
|
1048
|
+
}, { authorizeGetQuery }: {
|
|
1049
|
+
authorizeGetQuery: any;
|
|
1050
|
+
}) => Promise<boolean>;
|
|
1051
|
+
getStringsForI18n({ layout }: {
|
|
1052
|
+
layout: Layout;
|
|
1053
|
+
}): string[];
|
|
1054
|
+
queries: ({ table_id, name, configuration: { columns, default_state, layout, auto_save, split_paste, destination_type, }, req, res, }: {
|
|
1055
|
+
table_id: any;
|
|
1056
|
+
name: any;
|
|
1057
|
+
configuration: {
|
|
1058
|
+
columns: any;
|
|
1059
|
+
default_state: any;
|
|
1060
|
+
layout: any;
|
|
1061
|
+
auto_save: any;
|
|
1062
|
+
split_paste: any;
|
|
1063
|
+
destination_type: any;
|
|
1064
|
+
};
|
|
1065
|
+
req: any;
|
|
1066
|
+
res: any;
|
|
1067
|
+
}) => {
|
|
1068
|
+
editQuery(state: any, mobileReferrer: any): Promise<import("../models/form")>;
|
|
1069
|
+
editManyQuery(state: any, { limit, offset, orderBy, orderDesc, where }: {
|
|
1070
|
+
limit: any;
|
|
1071
|
+
offset: any;
|
|
1072
|
+
orderBy: any;
|
|
1073
|
+
orderDesc: any;
|
|
1074
|
+
where: any;
|
|
1075
|
+
}): Promise<{
|
|
1076
|
+
table: import("../models/table") | null;
|
|
1077
|
+
fields: import("../models/field")[];
|
|
1078
|
+
rows: import("@saltcorn/db-common/internal").Row[];
|
|
1079
|
+
}>;
|
|
1080
|
+
tryInsertQuery(row: any): Promise<{
|
|
1081
|
+
error: string;
|
|
1082
|
+
} | {
|
|
1083
|
+
success: any;
|
|
1084
|
+
}>;
|
|
1085
|
+
tryUpdateQuery(row: any, id: any): Promise<any>;
|
|
1086
|
+
saveFileQuery(fieldVal: any, fieldId: any, fieldView: any, row: any): Promise<string | number>;
|
|
1087
|
+
authorizePostQuery(body: any, table_id: any): Promise<boolean | "" | null | undefined>;
|
|
1088
|
+
authorizeGetQuery(query: any, table_id: any): Promise<string | boolean | null | undefined>;
|
|
1089
|
+
getRowQuery(table_id: any, view_select: any, row_id: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1090
|
+
getRowByIdQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1091
|
+
actionQuery(): Promise<{
|
|
1092
|
+
json: any;
|
|
1093
|
+
}>;
|
|
1094
|
+
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
|
|
1095
|
+
updateMatchingQuery(where: any, updateVals: any, repeatFields: any, childRows: any): Promise<any[] | {
|
|
1096
|
+
rowError: any;
|
|
1097
|
+
inEditError?: undefined;
|
|
1098
|
+
error?: undefined;
|
|
1099
|
+
} | {
|
|
1100
|
+
inEditError: any;
|
|
1101
|
+
rowError?: undefined;
|
|
1102
|
+
error?: undefined;
|
|
1103
|
+
} | {
|
|
1104
|
+
error: any;
|
|
1105
|
+
rowError?: undefined;
|
|
1106
|
+
inEditError?: undefined;
|
|
1107
|
+
}>;
|
|
1108
|
+
};
|
|
1109
|
+
routes: {
|
|
1110
|
+
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
1111
|
+
columns: object[];
|
|
1112
|
+
layout: any;
|
|
1113
|
+
}, body: any, { req, res }: {
|
|
1114
|
+
req: object;
|
|
1115
|
+
res: any;
|
|
1116
|
+
}, { actionQuery }: {
|
|
1117
|
+
actionQuery: any;
|
|
1118
|
+
}) => Promise<object>;
|
|
1119
|
+
update_matching_rows: (table_id: any, viewname: any, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, dest_url_formula, page_when_done, }: {
|
|
1120
|
+
columns: any;
|
|
1121
|
+
layout: any;
|
|
1122
|
+
fixed: any;
|
|
1123
|
+
view_when_done: any;
|
|
1124
|
+
formula_destinations: any;
|
|
1125
|
+
auto_save: any;
|
|
1126
|
+
destination_type: any;
|
|
1127
|
+
dest_url_formula: any;
|
|
1128
|
+
page_when_done: any;
|
|
1129
|
+
}, body: any, { req, res, redirect }: {
|
|
1130
|
+
req: any;
|
|
1131
|
+
res: any;
|
|
1132
|
+
redirect: any;
|
|
1133
|
+
}, { updateMatchingQuery, getRowQuery, saveFileQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1134
|
+
updateMatchingQuery: any;
|
|
1135
|
+
getRowQuery: any;
|
|
1136
|
+
saveFileQuery: any;
|
|
1137
|
+
optionsQuery: any;
|
|
1138
|
+
getRowByIdQuery: any;
|
|
1139
|
+
}) => Promise<void>;
|
|
1140
|
+
};
|
|
1141
|
+
configCheck: (view: any) => Promise<{
|
|
1142
|
+
errors: string[];
|
|
1143
|
+
warnings: string[];
|
|
1144
|
+
}>;
|
|
1145
|
+
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1146
|
+
} | {
|
|
1147
|
+
name: string;
|
|
1148
|
+
description: string;
|
|
1149
|
+
get_state_fields: () => object[];
|
|
1150
|
+
configuration_workflow: () => import("../models/workflow");
|
|
1151
|
+
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
1152
|
+
columns: object[];
|
|
1153
|
+
layout: object;
|
|
1154
|
+
}, state: object, extra: object, { distinctValuesQuery }: {
|
|
1155
|
+
distinctValuesQuery: any;
|
|
1156
|
+
}) => Promise<Layout>;
|
|
1157
|
+
initial_config: () => Promise<object>;
|
|
1158
|
+
display_state_form: boolean;
|
|
1159
|
+
getStringsForI18n({ layout }: {
|
|
1160
|
+
layout: any;
|
|
1161
|
+
}): string[];
|
|
1162
|
+
routes: {
|
|
1163
|
+
run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
|
|
1164
|
+
req: any;
|
|
1165
|
+
res: any;
|
|
1166
|
+
}, { actionQuery }: {
|
|
1167
|
+
actionQuery: any;
|
|
1168
|
+
}) => Promise<any>;
|
|
1169
|
+
};
|
|
1170
|
+
queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
|
|
1171
|
+
table_id: any;
|
|
1172
|
+
viewname: any;
|
|
1173
|
+
configuration: {
|
|
1174
|
+
columns: any;
|
|
1175
|
+
};
|
|
1176
|
+
req: any;
|
|
1177
|
+
res: any;
|
|
1178
|
+
exttable_name: any;
|
|
1179
|
+
}) => {
|
|
1180
|
+
actionQuery(state: any, rndid: any): Promise<{
|
|
1181
|
+
json: any;
|
|
1182
|
+
}>;
|
|
1183
|
+
distinctValuesQuery(state: any): Promise<{
|
|
1184
|
+
distinct_values: {};
|
|
1185
|
+
role: any;
|
|
1186
|
+
}>;
|
|
1187
|
+
};
|
|
1188
1188
|
})[];
|
|
1189
1189
|
import fileviews = require("./fileviews");
|
|
1190
1190
|
import actions = require("./actions");
|