@saltcorn/data 0.9.3 → 0.9.4-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.
Files changed (40) hide show
  1. package/dist/base-plugin/fieldviews.d.ts.map +1 -1
  2. package/dist/base-plugin/fieldviews.js +4 -2
  3. package/dist/base-plugin/fieldviews.js.map +1 -1
  4. package/dist/base-plugin/index.d.ts +509 -411
  5. package/dist/base-plugin/index.d.ts.map +1 -1
  6. package/dist/base-plugin/types.d.ts +57 -8
  7. package/dist/base-plugin/types.d.ts.map +1 -1
  8. package/dist/base-plugin/types.js +92 -8
  9. package/dist/base-plugin/types.js.map +1 -1
  10. package/dist/base-plugin/viewtemplates/edit.d.ts.map +1 -1
  11. package/dist/base-plugin/viewtemplates/edit.js +33 -5
  12. package/dist/base-plugin/viewtemplates/edit.js.map +1 -1
  13. package/dist/base-plugin/viewtemplates/feed.d.ts.map +1 -1
  14. package/dist/base-plugin/viewtemplates/feed.js +20 -7
  15. package/dist/base-plugin/viewtemplates/feed.js.map +1 -1
  16. package/dist/base-plugin/viewtemplates/list.d.ts.map +1 -1
  17. package/dist/base-plugin/viewtemplates/list.js +10 -0
  18. package/dist/base-plugin/viewtemplates/list.js.map +1 -1
  19. package/dist/base-plugin/viewtemplates/show.d.ts.map +1 -1
  20. package/dist/base-plugin/viewtemplates/show.js +5 -1
  21. package/dist/base-plugin/viewtemplates/show.js.map +1 -1
  22. package/dist/base-plugin/viewtemplates/viewable_fields.d.ts.map +1 -1
  23. package/dist/base-plugin/viewtemplates/viewable_fields.js +28 -11
  24. package/dist/base-plugin/viewtemplates/viewable_fields.js.map +1 -1
  25. package/dist/db/fixtures.d.ts.map +1 -1
  26. package/dist/db/fixtures.js +256 -0
  27. package/dist/db/fixtures.js.map +1 -1
  28. package/dist/models/index.d.ts +2 -1
  29. package/dist/models/index.d.ts.map +1 -1
  30. package/dist/models/index.js +3 -1
  31. package/dist/models/index.js.map +1 -1
  32. package/dist/models/user.d.ts +1 -1
  33. package/dist/models/user.d.ts.map +1 -1
  34. package/dist/plugin-helper.js +3 -3
  35. package/dist/plugin-helper.js.map +1 -1
  36. package/dist/tests/auxtest.test.js +1 -0
  37. package/dist/tests/auxtest.test.js.map +1 -1
  38. package/dist/tests/fieldviews.test.js.map +1 -1
  39. package/dist/tests/view.test.js +1 -1
  40. package/package.json +16 -16
@@ -1,4 +1,151 @@
1
1
  export const types: ({
2
+ name: string;
3
+ sql_name: string;
4
+ js_type: string;
5
+ contract: () => Function;
6
+ fieldviews: {
7
+ show: {
8
+ isEdit: boolean;
9
+ description: string;
10
+ run: (v: any) => any;
11
+ };
12
+ checkboxes: {
13
+ isEdit: boolean;
14
+ description: string;
15
+ run: (v: any) => any;
16
+ };
17
+ TrueFalse: {
18
+ isEdit: boolean;
19
+ description: string;
20
+ run: (v: any) => "" | "True" | "False";
21
+ };
22
+ edit: {
23
+ isEdit: boolean;
24
+ description: string;
25
+ configFields: ({
26
+ name: string;
27
+ label: string;
28
+ type: string;
29
+ attributes: {
30
+ options: string[];
31
+ };
32
+ } | {
33
+ name: string;
34
+ label: string;
35
+ type: string;
36
+ attributes?: undefined;
37
+ })[];
38
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
39
+ };
40
+ switch: {
41
+ isEdit: boolean;
42
+ description: string;
43
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
44
+ };
45
+ show_with_html: {
46
+ configFields: {
47
+ input_type: string;
48
+ name: string;
49
+ label: string;
50
+ sublabel: string;
51
+ default: string;
52
+ attributes: {
53
+ mode: string;
54
+ };
55
+ }[];
56
+ isEdit: boolean;
57
+ description: string;
58
+ run: (v: any, req: any, attrs?: {}) => any;
59
+ };
60
+ tristate: {
61
+ isEdit: boolean;
62
+ description: string;
63
+ configFields: {
64
+ name: string;
65
+ label: string;
66
+ type: string;
67
+ }[];
68
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
69
+ };
70
+ };
71
+ attributes: object[];
72
+ readFromFormRecord: (rec: any, name: string) => boolean | null;
73
+ read: (v: object) => boolean | null;
74
+ readFromDB: (v: object) => object;
75
+ listAs: (v: object) => object;
76
+ validate: () => boolean;
77
+ } | {
78
+ name: string;
79
+ sql_name: string;
80
+ js_type: string;
81
+ contract: () => Function;
82
+ attributes: object[];
83
+ fieldviews: {
84
+ show: {
85
+ isEdit: boolean;
86
+ description: string;
87
+ run: (d: any, req: any, attrs?: {}) => any;
88
+ };
89
+ showDay: {
90
+ isEdit: boolean;
91
+ description: string;
92
+ run: (d: any, req: any) => any;
93
+ };
94
+ format: {
95
+ isEdit: boolean;
96
+ description: string;
97
+ configFields: {
98
+ name: string;
99
+ label: string;
100
+ type: string;
101
+ sublabel: string;
102
+ }[];
103
+ run: (d: any, req: any, options: any) => any;
104
+ };
105
+ relative: {
106
+ isEdit: boolean;
107
+ description: string;
108
+ run: (d: any, req: any) => string;
109
+ };
110
+ yearsAgo: {
111
+ isEdit: boolean;
112
+ description: string;
113
+ run: (d: any, req: any) => string;
114
+ };
115
+ show_with_html: {
116
+ configFields: {
117
+ input_type: string;
118
+ name: string;
119
+ label: string;
120
+ sublabel: string;
121
+ default: string;
122
+ attributes: {
123
+ mode: string;
124
+ };
125
+ }[];
126
+ isEdit: boolean;
127
+ description: string;
128
+ run: (v: any, req: any, attrs?: {}) => any;
129
+ };
130
+ edit: {
131
+ isEdit: boolean;
132
+ blockDisplay: boolean;
133
+ description: string;
134
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
135
+ };
136
+ editDay: {
137
+ isEdit: boolean;
138
+ blockDisplay: boolean;
139
+ description: string;
140
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
141
+ };
142
+ };
143
+ presets: {
144
+ Now: () => Date;
145
+ };
146
+ read: (v: object, attrs: object) => object;
147
+ validate: () => boolean;
148
+ } | {
2
149
  name: string;
3
150
  sql_name: string;
4
151
  js_type: string;
@@ -274,14 +421,42 @@ export const types: ({
274
421
  progress_bar: {
275
422
  configFields: (field: any) => ({
276
423
  name: string;
424
+ type: string;
425
+ label: string;
426
+ required?: undefined;
427
+ showIf?: undefined;
428
+ class?: undefined;
429
+ showif?: undefined;
430
+ } | {
431
+ name: string;
432
+ label: string;
277
433
  type: any;
278
434
  required: boolean;
279
- label?: undefined;
435
+ showIf: {
436
+ max_min_formula: boolean;
437
+ };
438
+ class?: undefined;
439
+ showif?: undefined;
440
+ } | {
441
+ name: string;
442
+ label: string;
443
+ type: string;
444
+ class: string;
445
+ showIf: {
446
+ max_min_formula: boolean;
447
+ };
448
+ required?: undefined;
449
+ showif?: undefined;
280
450
  } | {
281
451
  name: string;
282
452
  type: string;
283
453
  label: string;
454
+ showif: {
455
+ radial: boolean;
456
+ };
284
457
  required?: undefined;
458
+ showIf?: undefined;
459
+ class?: undefined;
285
460
  })[];
286
461
  isEdit: boolean;
287
462
  description: string;
@@ -290,33 +465,54 @@ export const types: ({
290
465
  heat_cell: {
291
466
  configFields: (field: any) => ({
292
467
  name: string;
293
- type: any;
294
- required: boolean;
295
- label?: undefined;
468
+ type: string;
469
+ label: string;
470
+ required?: undefined;
471
+ showIf?: undefined;
472
+ class?: undefined;
296
473
  attributes?: undefined;
297
474
  default?: undefined;
298
475
  } | {
299
476
  name: string;
300
- type: string;
301
477
  label: string;
478
+ type: any;
302
479
  required: boolean;
303
- attributes: {
304
- options: string[];
480
+ showIf: {
481
+ max_min_formula: boolean;
305
482
  };
483
+ class?: undefined;
484
+ attributes?: undefined;
306
485
  default?: undefined;
307
486
  } | {
308
487
  name: string;
309
- type: string;
310
488
  label: string;
489
+ type: string;
490
+ class: string;
491
+ showIf: {
492
+ max_min_formula: boolean;
493
+ };
311
494
  required?: undefined;
312
495
  attributes?: undefined;
313
496
  default?: undefined;
497
+ } | {
498
+ name: string;
499
+ type: string;
500
+ label: string;
501
+ required: boolean;
502
+ attributes: {
503
+ options: string[];
504
+ };
505
+ showIf?: undefined;
506
+ class?: undefined;
507
+ default?: undefined;
314
508
  } | {
315
509
  name: string;
316
510
  type: string;
317
511
  label: string;
318
512
  default: number;
319
513
  required?: undefined;
514
+ showIf?: undefined;
515
+ class?: undefined;
320
516
  attributes?: undefined;
321
517
  })[];
322
518
  isEdit: boolean;
@@ -398,40 +594,7 @@ export const types: ({
398
594
  show: {
399
595
  isEdit: boolean;
400
596
  description: string;
401
- run: (v: any) => any;
402
- };
403
- checkboxes: {
404
- isEdit: boolean;
405
- description: string;
406
- run: (v: any) => any;
407
- };
408
- TrueFalse: {
409
- isEdit: boolean;
410
- description: string;
411
- run: (v: any) => "" | "True" | "False";
412
- };
413
- edit: {
414
- isEdit: boolean;
415
- description: string;
416
- configFields: ({
417
- name: string;
418
- label: string;
419
- type: string;
420
- attributes: {
421
- options: string[];
422
- };
423
- } | {
424
- name: string;
425
- label: string;
426
- type: string;
427
- attributes?: undefined;
428
- })[];
429
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
430
- };
431
- switch: {
432
- isEdit: boolean;
433
- description: string;
434
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
597
+ run: (s: any) => any;
435
598
  };
436
599
  show_with_html: {
437
600
  configFields: {
@@ -448,111 +611,33 @@ export const types: ({
448
611
  description: string;
449
612
  run: (v: any, req: any, attrs?: {}) => any;
450
613
  };
451
- tristate: {
614
+ edit: {
452
615
  isEdit: boolean;
616
+ blockDisplay: boolean;
453
617
  description: string;
454
- configFields: {
455
- name: string;
456
- label: string;
457
- type: string;
458
- }[];
459
618
  run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
460
619
  };
461
620
  };
462
621
  attributes: object[];
463
- readFromFormRecord: (rec: any, name: string) => boolean | null;
464
- read: (v: object) => boolean | null;
465
- readFromDB: (v: object) => object;
466
- listAs: (v: object) => object;
622
+ read: (v: object) => object;
467
623
  validate: () => boolean;
468
624
  } | {
469
625
  name: string;
470
626
  sql_name: string;
471
627
  js_type: string;
472
- contract: () => Function;
473
- attributes: object[];
628
+ contract: ({ min, max }: {
629
+ min: number;
630
+ max: number;
631
+ }) => Function;
474
632
  fieldviews: {
475
633
  show: {
476
634
  isEdit: boolean;
477
635
  description: string;
478
- run: (d: any, req: any, attrs?: {}) => any;
479
- };
480
- showDay: {
481
- isEdit: boolean;
482
- description: string;
483
- run: (d: any, req: any) => any;
636
+ run: (s: any) => string;
484
637
  };
485
- format: {
638
+ edit: {
486
639
  isEdit: boolean;
487
- description: string;
488
- configFields: {
489
- name: string;
490
- label: string;
491
- type: string;
492
- sublabel: string;
493
- }[];
494
- run: (d: any, req: any, options: any) => any;
495
- };
496
- relative: {
497
- isEdit: boolean;
498
- description: string;
499
- run: (d: any, req: any) => string;
500
- };
501
- yearsAgo: {
502
- isEdit: boolean;
503
- description: string;
504
- run: (d: any, req: any) => string;
505
- };
506
- show_with_html: {
507
- configFields: {
508
- input_type: string;
509
- name: string;
510
- label: string;
511
- sublabel: string;
512
- default: string;
513
- attributes: {
514
- mode: string;
515
- };
516
- }[];
517
- isEdit: boolean;
518
- description: string;
519
- run: (v: any, req: any, attrs?: {}) => any;
520
- };
521
- edit: {
522
- isEdit: boolean;
523
- blockDisplay: boolean;
524
- description: string;
525
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
526
- };
527
- editDay: {
528
- isEdit: boolean;
529
- blockDisplay: boolean;
530
- description: string;
531
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
532
- };
533
- };
534
- presets: {
535
- Now: () => Date;
536
- };
537
- read: (v: object, attrs: object) => object;
538
- validate: () => boolean;
539
- } | {
540
- name: string;
541
- sql_name: string;
542
- js_type: string;
543
- contract: ({ min, max }: {
544
- min: number;
545
- max: number;
546
- }) => Function;
547
- fieldviews: {
548
- show: {
549
- isEdit: boolean;
550
- description: string;
551
- run: (s: any) => string;
552
- };
553
- edit: {
554
- isEdit: boolean;
555
- blockDisplay: boolean;
640
+ blockDisplay: boolean;
556
641
  description: string;
557
642
  configFields: {
558
643
  name: string;
@@ -587,14 +672,42 @@ export const types: ({
587
672
  progress_bar: {
588
673
  configFields: (field: any) => ({
589
674
  name: string;
675
+ type: string;
676
+ label: string;
677
+ required?: undefined;
678
+ showIf?: undefined;
679
+ class?: undefined;
680
+ showif?: undefined;
681
+ } | {
682
+ name: string;
683
+ label: string;
590
684
  type: any;
591
685
  required: boolean;
592
- label?: undefined;
686
+ showIf: {
687
+ max_min_formula: boolean;
688
+ };
689
+ class?: undefined;
690
+ showif?: undefined;
691
+ } | {
692
+ name: string;
693
+ label: string;
694
+ type: string;
695
+ class: string;
696
+ showIf: {
697
+ max_min_formula: boolean;
698
+ };
699
+ required?: undefined;
700
+ showif?: undefined;
593
701
  } | {
594
702
  name: string;
595
703
  type: string;
596
704
  label: string;
705
+ showif: {
706
+ radial: boolean;
707
+ };
597
708
  required?: undefined;
709
+ showIf?: undefined;
710
+ class?: undefined;
598
711
  })[];
599
712
  isEdit: boolean;
600
713
  description: string;
@@ -603,33 +716,54 @@ export const types: ({
603
716
  heat_cell: {
604
717
  configFields: (field: any) => ({
605
718
  name: string;
606
- type: any;
607
- required: boolean;
608
- label?: undefined;
719
+ type: string;
720
+ label: string;
721
+ required?: undefined;
722
+ showIf?: undefined;
723
+ class?: undefined;
609
724
  attributes?: undefined;
610
725
  default?: undefined;
611
726
  } | {
612
727
  name: string;
613
- type: string;
614
728
  label: string;
729
+ type: any;
615
730
  required: boolean;
616
- attributes: {
617
- options: string[];
731
+ showIf: {
732
+ max_min_formula: boolean;
618
733
  };
734
+ class?: undefined;
735
+ attributes?: undefined;
619
736
  default?: undefined;
620
737
  } | {
621
738
  name: string;
622
- type: string;
623
739
  label: string;
740
+ type: string;
741
+ class: string;
742
+ showIf: {
743
+ max_min_formula: boolean;
744
+ };
624
745
  required?: undefined;
625
746
  attributes?: undefined;
626
747
  default?: undefined;
748
+ } | {
749
+ name: string;
750
+ type: string;
751
+ label: string;
752
+ required: boolean;
753
+ attributes: {
754
+ options: string[];
755
+ };
756
+ showIf?: undefined;
757
+ class?: undefined;
758
+ default?: undefined;
627
759
  } | {
628
760
  name: string;
629
761
  type: string;
630
762
  label: string;
631
763
  default: number;
632
764
  required?: undefined;
765
+ showIf?: undefined;
766
+ class?: undefined;
633
767
  attributes?: undefined;
634
768
  })[];
635
769
  isEdit: boolean;
@@ -667,103 +801,49 @@ export const types: ({
667
801
  attributes: object[];
668
802
  read: (v: object) => string | number | undefined;
669
803
  validate: ({ min, max }: object) => boolean | object;
670
- } | {
671
- name: string;
672
- sql_name: string;
673
- js_type: string;
674
- contract: () => Function;
675
- fieldviews: {
676
- show: {
677
- isEdit: boolean;
678
- description: string;
679
- run: (s: any) => any;
680
- };
681
- show_with_html: {
682
- configFields: {
683
- input_type: string;
684
- name: string;
685
- label: string;
686
- sublabel: string;
687
- default: string;
688
- attributes: {
689
- mode: string;
690
- };
691
- }[];
692
- isEdit: boolean;
693
- description: string;
694
- run: (v: any, req: any, attrs?: {}) => any;
695
- };
696
- edit: {
697
- isEdit: boolean;
698
- blockDisplay: boolean;
699
- description: string;
700
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
701
- };
702
- };
703
- attributes: object[];
704
- read: (v: object) => object;
705
- validate: () => boolean;
706
804
  })[];
707
805
  export const viewtemplates: ({
708
806
  name: string;
709
807
  description: string;
710
- configuration_workflow: (req: object) => import("../models/workflow");
711
- run: (table_id: string | number, viewname: string, { columns, view_to_create, create_view_display, create_view_label, default_state, create_view_location, create_link_style, create_link_size, create_view_showif, }: {
712
- columns: object[];
713
- view_to_create?: string | undefined;
714
- create_view_display: string;
715
- create_view_label?: string | undefined;
716
- default_state?: object | undefined;
717
- create_view_location?: string | undefined;
718
- }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
719
- listQuery: any;
720
- }) => Promise<any>;
721
- view_quantity: string;
722
- get_state_fields: (table_id: string, viewname: any, { columns }: {
808
+ get_state_fields: () => object[];
809
+ configuration_workflow: () => import("../models/workflow");
810
+ run: (table_id: number, viewname: string, { columns, layout }: {
723
811
  columns: object[];
724
- }) => Function;
725
- initial_config: Function;
726
- on_delete: (table_id: any, viewname: string, { default_state }: {
727
- default_state: any;
728
- }) => Promise<void>;
812
+ layout: object;
813
+ }, state: object, extra: object, { distinctValuesQuery }: {
814
+ distinctValuesQuery: any;
815
+ }) => Promise<Layout>;
816
+ initial_config: () => Promise<object>;
817
+ display_state_form: boolean;
818
+ getStringsForI18n({ layout }: {
819
+ layout: any;
820
+ }): string[];
729
821
  routes: {
730
- run_action: (table_id: number, viewname: any, { columns, layout }: {
731
- columns: object[];
732
- layout: any;
733
- }, body: object, { req, res }: {
734
- req: object;
822
+ run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
823
+ req: any;
735
824
  res: any;
736
- }, { getRowQuery }: {
737
- getRowQuery: any;
738
- }) => Promise<object>;
825
+ }, { actionQuery }: {
826
+ actionQuery: any;
827
+ }) => Promise<any>;
739
828
  };
740
- display_state_form: (opts: object) => boolean;
741
- default_state_form: ({ default_state }: object) => boolean;
742
- getStringsForI18n({ columns, create_view_label }: {
743
- columns: any;
744
- create_view_label: any;
745
- }): string[];
746
- queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
829
+ queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
747
830
  table_id: any;
748
- exttable_name: any;
749
- name: any;
831
+ viewname: any;
750
832
  configuration: {
751
833
  columns: any;
752
- default_state: any;
753
834
  };
754
835
  req: any;
836
+ res: any;
837
+ exttable_name: any;
755
838
  }) => {
756
- listQuery(state: any, stateHash: any): Promise<{
757
- rows: import("@saltcorn/db-common/internal").Row[];
758
- rowCount: number;
839
+ actionQuery(state: any, rndid: any): Promise<{
840
+ json: any;
841
+ }>;
842
+ distinctValuesQuery(state: any): Promise<{
843
+ distinct_values: {};
844
+ role: any;
759
845
  }>;
760
- getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
761
846
  };
762
- configCheck: (view: any) => Promise<{
763
- errors: string[];
764
- warnings: string[];
765
- }>;
766
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
767
847
  } | {
768
848
  name: string;
769
849
  description: string;
@@ -914,198 +994,6 @@ export const viewtemplates: ({
914
994
  warnings: string[];
915
995
  }>;
916
996
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
917
- } | {
918
- name: string;
919
- description: string;
920
- get_state_fields: () => object[];
921
- configuration_workflow: (req: object) => import("../models/workflow");
922
- run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
923
- columns: object[];
924
- layout: object;
925
- page_title?: string | undefined;
926
- page_title_formula: boolean;
927
- }, state: object, extra: object, { showQuery }: {
928
- showQuery: any;
929
- }) => Promise<string>;
930
- runMany: (table_id: number, viewname: string, { columns, layout }: {
931
- columns: object[];
932
- layout: object;
933
- }, state: object, extra: object, { runManyQuery }: {
934
- runManyQuery: any;
935
- }) => Promise<object[]>;
936
- renderRows: (table: object, viewname: string, { columns, layout }: {
937
- columns: object[];
938
- layout: object;
939
- }, extra: object, rows: object[], state: any) => Promise<string>;
940
- initial_config: Function;
941
- display_state_form: boolean;
942
- routes: {
943
- run_action: (table_id: number, viewname: any, { columns, layout }: {
944
- columns: object[];
945
- layout: any;
946
- }, body: any, { req, res }: {
947
- req: object;
948
- res: any;
949
- }, { actionQuery }: {
950
- actionQuery: any;
951
- }) => Promise<object>;
952
- };
953
- getStringsForI18n({ layout }: {
954
- layout: object;
955
- }): string[];
956
- queries: ({ table_id, exttable_name, name, configuration: { columns, layout }, req, res, }: {
957
- table_id: any;
958
- exttable_name: any;
959
- name: any;
960
- configuration: {
961
- columns: any;
962
- layout: any;
963
- };
964
- req: any;
965
- res: any;
966
- }) => {
967
- showQuery(state: any, fields: any): Promise<{
968
- rows: null;
969
- message: string;
970
- } | {
971
- rows: import("@saltcorn/db-common/internal").Row[];
972
- message: null;
973
- }>;
974
- runManyQuery(state: any, { where, limit, offset, joinFieldsExtra, orderBy, orderDesc }: {
975
- where: any;
976
- limit: any;
977
- offset: any;
978
- joinFieldsExtra: any;
979
- orderBy: any;
980
- orderDesc: any;
981
- }): Promise<import("@saltcorn/db-common/internal").Row[]>;
982
- actionQuery(): Promise<{
983
- json: any;
984
- }>;
985
- };
986
- configCheck: (view: any) => Promise<{
987
- errors: string[];
988
- warnings: string[];
989
- }>;
990
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
991
- } | {
992
- name: string;
993
- description: string;
994
- configuration_workflow: (req: object) => import("../models/workflow");
995
- run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
996
- list_view: string;
997
- show_view: string;
998
- subtables: object;
999
- }, state: any, extraArgs: any, { getRowQuery }: {
1000
- getRowQuery: any;
1001
- }) => Promise<div>;
1002
- get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1003
- list_view: string;
1004
- show_view: any;
1005
- }) => Promise<object[]>;
1006
- display_state_form: ({ list_view, _omit_state_form }: {
1007
- list_view: string;
1008
- _omit_state_form: boolean;
1009
- }) => boolean;
1010
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1011
- table_id: any;
1012
- viewname: any;
1013
- configuration: {
1014
- columns: any;
1015
- default_state: any;
1016
- };
1017
- req: any;
1018
- }) => {
1019
- getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1020
- };
1021
- connectedObjects: ({ list_view, subtables }: {
1022
- list_view: any;
1023
- subtables: any;
1024
- }) => Promise<{
1025
- embeddedViews: import("../models/view")[];
1026
- }>;
1027
- } | {
1028
- name: string;
1029
- description: string;
1030
- configuration_workflow: (req: object) => import("../models/workflow");
1031
- 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, create_view_showif, always_create_view, include_fml, exclusion_relation, exclusion_where, empty_view, groupby, ...cols }: {
1032
- show_view: string;
1033
- order_field: void;
1034
- descending: boolean;
1035
- view_to_create?: string | undefined;
1036
- create_view_display: string;
1037
- in_card: boolean;
1038
- masonry_columns: string;
1039
- rows_per_page?: number | undefined;
1040
- hide_pagination: boolean;
1041
- create_view_label?: string | undefined;
1042
- create_view_location?: string | undefined;
1043
- always_create_view: boolean;
1044
- cols: any;
1045
- }, state: object, extraArgs: any, { countRowsQuery }: {
1046
- countRowsQuery: any;
1047
- }) => Promise<div>;
1048
- get_state_fields: (table_id: number, viewname: any, { show_view }: {
1049
- show_view: any;
1050
- }) => Promise<import("../models/field")>;
1051
- display_state_form: boolean;
1052
- getStringsForI18n({ create_view_label }: {
1053
- create_view_label: any;
1054
- }): string[] | Object[];
1055
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1056
- table_id: any;
1057
- viewname: any;
1058
- configuration: {
1059
- columns: any;
1060
- default_state: any;
1061
- };
1062
- req: any;
1063
- }) => {
1064
- countRowsQuery(state: any): Promise<number>;
1065
- };
1066
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1067
- } | {
1068
- name: string;
1069
- description: string;
1070
- get_state_fields: () => object[];
1071
- configuration_workflow: () => import("../models/workflow");
1072
- run: (table_id: number, viewname: string, { columns, layout }: {
1073
- columns: object[];
1074
- layout: object;
1075
- }, state: object, extra: object, { distinctValuesQuery }: {
1076
- distinctValuesQuery: any;
1077
- }) => Promise<Layout>;
1078
- initial_config: () => Promise<object>;
1079
- display_state_form: boolean;
1080
- getStringsForI18n({ layout }: {
1081
- layout: any;
1082
- }): string[];
1083
- routes: {
1084
- run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
1085
- req: any;
1086
- res: any;
1087
- }, { actionQuery }: {
1088
- actionQuery: any;
1089
- }) => Promise<any>;
1090
- };
1091
- queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
1092
- table_id: any;
1093
- viewname: any;
1094
- configuration: {
1095
- columns: any;
1096
- };
1097
- req: any;
1098
- res: any;
1099
- exttable_name: any;
1100
- }) => {
1101
- actionQuery(state: any, rndid: any): Promise<{
1102
- json: any;
1103
- }>;
1104
- distinctValuesQuery(state: any): Promise<{
1105
- distinct_values: {};
1106
- role: any;
1107
- }>;
1108
- };
1109
997
  } | {
1110
998
  name: string;
1111
999
  description: string;
@@ -1206,6 +1094,216 @@ export const viewtemplates: ({
1206
1094
  optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1207
1095
  };
1208
1096
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1097
+ } | {
1098
+ name: string;
1099
+ description: string;
1100
+ configuration_workflow: (req: object) => import("../models/workflow");
1101
+ 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, create_view_showif, always_create_view, include_fml, exclusion_relation, exclusion_where, empty_view, groupby, ...cols }: {
1102
+ show_view: string;
1103
+ order_field: void;
1104
+ descending: boolean;
1105
+ view_to_create?: string | undefined;
1106
+ create_view_display: string;
1107
+ in_card: boolean;
1108
+ masonry_columns: string;
1109
+ rows_per_page?: number | undefined;
1110
+ hide_pagination: boolean;
1111
+ create_view_label?: string | undefined;
1112
+ create_view_location?: string | undefined;
1113
+ always_create_view: boolean;
1114
+ cols: any;
1115
+ }, state: object, extraArgs: any, { countRowsQuery }: {
1116
+ countRowsQuery: any;
1117
+ }) => Promise<div>;
1118
+ get_state_fields: (table_id: number, viewname: any, { show_view }: {
1119
+ show_view: any;
1120
+ }) => Promise<import("../models/field")>;
1121
+ display_state_form: boolean;
1122
+ getStringsForI18n({ create_view_label }: {
1123
+ create_view_label: any;
1124
+ }): string[] | Object[];
1125
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1126
+ table_id: any;
1127
+ viewname: any;
1128
+ configuration: {
1129
+ columns: any;
1130
+ default_state: any;
1131
+ };
1132
+ req: any;
1133
+ }) => {
1134
+ countRowsQuery(state: any): Promise<number>;
1135
+ };
1136
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1137
+ } | {
1138
+ name: string;
1139
+ description: string;
1140
+ get_state_fields: () => object[];
1141
+ configuration_workflow: (req: object) => import("../models/workflow");
1142
+ run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
1143
+ columns: object[];
1144
+ layout: object;
1145
+ page_title?: string | undefined;
1146
+ page_title_formula: boolean;
1147
+ }, state: object, extra: object, { showQuery }: {
1148
+ showQuery: any;
1149
+ }) => Promise<string>;
1150
+ runMany: (table_id: number, viewname: string, { columns, layout }: {
1151
+ columns: object[];
1152
+ layout: object;
1153
+ }, state: object, extra: object, { runManyQuery }: {
1154
+ runManyQuery: any;
1155
+ }) => Promise<object[]>;
1156
+ renderRows: (table: object, viewname: string, { columns, layout }: {
1157
+ columns: object[];
1158
+ layout: object;
1159
+ }, extra: object, rows: object[], state: any) => Promise<string>;
1160
+ initial_config: Function;
1161
+ display_state_form: boolean;
1162
+ routes: {
1163
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
1164
+ columns: object[];
1165
+ layout: any;
1166
+ }, body: any, { req, res }: {
1167
+ req: object;
1168
+ res: any;
1169
+ }, { actionQuery }: {
1170
+ actionQuery: any;
1171
+ }) => Promise<object>;
1172
+ };
1173
+ getStringsForI18n({ layout }: {
1174
+ layout: object;
1175
+ }): string[];
1176
+ queries: ({ table_id, exttable_name, name, configuration: { columns, layout }, req, res, }: {
1177
+ table_id: any;
1178
+ exttable_name: any;
1179
+ name: any;
1180
+ configuration: {
1181
+ columns: any;
1182
+ layout: any;
1183
+ };
1184
+ req: any;
1185
+ res: any;
1186
+ }) => {
1187
+ showQuery(state: any, fields: any): Promise<{
1188
+ rows: null;
1189
+ message: string;
1190
+ } | {
1191
+ rows: import("@saltcorn/db-common/internal").Row[];
1192
+ message: null;
1193
+ }>;
1194
+ runManyQuery(state: any, { where, limit, offset, joinFieldsExtra, orderBy, orderDesc }: {
1195
+ where: any;
1196
+ limit: any;
1197
+ offset: any;
1198
+ joinFieldsExtra: any;
1199
+ orderBy: any;
1200
+ orderDesc: any;
1201
+ }): Promise<import("@saltcorn/db-common/internal").Row[]>;
1202
+ actionQuery(): Promise<{
1203
+ json: any;
1204
+ }>;
1205
+ };
1206
+ configCheck: (view: any) => Promise<{
1207
+ errors: string[];
1208
+ warnings: string[];
1209
+ }>;
1210
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1211
+ } | {
1212
+ name: string;
1213
+ description: string;
1214
+ configuration_workflow: (req: object) => import("../models/workflow");
1215
+ run: (table_id: string | number, viewname: string, { columns, view_to_create, create_view_display, create_view_label, default_state, create_view_location, create_link_style, create_link_size, create_view_showif, }: {
1216
+ columns: object[];
1217
+ view_to_create?: string | undefined;
1218
+ create_view_display: string;
1219
+ create_view_label?: string | undefined;
1220
+ default_state?: object | undefined;
1221
+ create_view_location?: string | undefined;
1222
+ }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
1223
+ listQuery: any;
1224
+ }) => Promise<any>;
1225
+ view_quantity: string;
1226
+ get_state_fields: (table_id: string, viewname: any, { columns }: {
1227
+ columns: object[];
1228
+ }) => Function;
1229
+ initial_config: Function;
1230
+ on_delete: (table_id: any, viewname: string, { default_state }: {
1231
+ default_state: any;
1232
+ }) => Promise<void>;
1233
+ routes: {
1234
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
1235
+ columns: object[];
1236
+ layout: any;
1237
+ }, body: object, { req, res }: {
1238
+ req: object;
1239
+ res: any;
1240
+ }, { getRowQuery }: {
1241
+ getRowQuery: any;
1242
+ }) => Promise<object>;
1243
+ };
1244
+ display_state_form: (opts: object) => boolean;
1245
+ default_state_form: ({ default_state }: object) => boolean;
1246
+ getStringsForI18n({ columns, create_view_label }: {
1247
+ columns: any;
1248
+ create_view_label: any;
1249
+ }): string[];
1250
+ queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
1251
+ table_id: any;
1252
+ exttable_name: any;
1253
+ name: any;
1254
+ configuration: {
1255
+ columns: any;
1256
+ default_state: any;
1257
+ };
1258
+ req: any;
1259
+ }) => {
1260
+ listQuery(state: any, stateHash: any): Promise<{
1261
+ rows: import("@saltcorn/db-common/internal").Row[];
1262
+ rowCount: number;
1263
+ }>;
1264
+ getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1265
+ };
1266
+ configCheck: (view: any) => Promise<{
1267
+ errors: string[];
1268
+ warnings: string[];
1269
+ }>;
1270
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1271
+ } | {
1272
+ name: string;
1273
+ description: string;
1274
+ configuration_workflow: (req: object) => import("../models/workflow");
1275
+ run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
1276
+ list_view: string;
1277
+ show_view: string;
1278
+ subtables: object;
1279
+ }, state: any, extraArgs: any, { getRowQuery }: {
1280
+ getRowQuery: any;
1281
+ }) => Promise<div>;
1282
+ get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1283
+ list_view: string;
1284
+ show_view: any;
1285
+ }) => Promise<object[]>;
1286
+ display_state_form: ({ list_view, _omit_state_form }: {
1287
+ list_view: string;
1288
+ _omit_state_form: boolean;
1289
+ }) => boolean;
1290
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1291
+ table_id: any;
1292
+ viewname: any;
1293
+ configuration: {
1294
+ columns: any;
1295
+ default_state: any;
1296
+ };
1297
+ req: any;
1298
+ }) => {
1299
+ getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1300
+ };
1301
+ connectedObjects: ({ list_view, subtables }: {
1302
+ list_view: any;
1303
+ subtables: any;
1304
+ }) => Promise<{
1305
+ embeddedViews: import("../models/view")[];
1306
+ }>;
1209
1307
  })[];
1210
1308
  import fileviews = require("./fileviews");
1211
1309
  import actions = require("./actions");