@saltcorn/data 0.9.1-beta.11 → 0.9.1-beta.12

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.
@@ -1,4 +1,141 @@
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
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
34
+ };
35
+ switch: {
36
+ isEdit: boolean;
37
+ description: string;
38
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
39
+ };
40
+ show_with_html: {
41
+ configFields: {
42
+ input_type: string;
43
+ name: string;
44
+ label: string;
45
+ sublabel: string;
46
+ default: string;
47
+ attributes: {
48
+ mode: string;
49
+ };
50
+ }[];
51
+ isEdit: boolean;
52
+ description: string;
53
+ run: (v: any, req: any, attrs?: {}) => any;
54
+ };
55
+ tristate: {
56
+ isEdit: boolean;
57
+ description: string;
58
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
59
+ };
60
+ };
61
+ attributes: object[];
62
+ readFromFormRecord: (rec: any, name: string) => boolean | null;
63
+ read: (v: object) => boolean | null;
64
+ readFromDB: (v: object) => object;
65
+ listAs: (v: object) => object;
66
+ validate: () => boolean;
67
+ } | {
68
+ name: string;
69
+ sql_name: string;
70
+ js_type: string;
71
+ contract: () => Function;
72
+ attributes: object[];
73
+ fieldviews: {
74
+ show: {
75
+ isEdit: boolean;
76
+ description: string;
77
+ run: (d: any, req: any, attrs?: {}) => any;
78
+ };
79
+ showDay: {
80
+ isEdit: boolean;
81
+ description: string;
82
+ run: (d: any, req: any) => any;
83
+ };
84
+ format: {
85
+ isEdit: boolean;
86
+ description: string;
87
+ configFields: {
88
+ name: string;
89
+ label: string;
90
+ type: string;
91
+ sublabel: string;
92
+ }[];
93
+ run: (d: any, req: any, options: any) => any;
94
+ };
95
+ relative: {
96
+ isEdit: boolean;
97
+ description: string;
98
+ run: (d: any, req: any) => string;
99
+ };
100
+ yearsAgo: {
101
+ isEdit: boolean;
102
+ description: string;
103
+ run: (d: any, req: any) => string;
104
+ };
105
+ show_with_html: {
106
+ configFields: {
107
+ input_type: string;
108
+ name: string;
109
+ label: string;
110
+ sublabel: string;
111
+ default: string;
112
+ attributes: {
113
+ mode: string;
114
+ };
115
+ }[];
116
+ isEdit: boolean;
117
+ description: string;
118
+ run: (v: any, req: any, attrs?: {}) => any;
119
+ };
120
+ edit: {
121
+ isEdit: boolean;
122
+ blockDisplay: boolean;
123
+ description: string;
124
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
125
+ };
126
+ editDay: {
127
+ isEdit: boolean;
128
+ blockDisplay: boolean;
129
+ description: string;
130
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
131
+ };
132
+ };
133
+ presets: {
134
+ Now: () => Date;
135
+ };
136
+ read: (v: object, attrs: object) => object;
137
+ validate: () => boolean;
138
+ } | {
2
139
  name: string;
3
140
  sql_name: string;
4
141
  js_type: string;
@@ -388,40 +525,108 @@ export const types: ({
388
525
  name: string;
389
526
  sql_name: string;
390
527
  js_type: string;
391
- contract: () => Function;
528
+ contract: ({ min, max }: {
529
+ min: number;
530
+ max: number;
531
+ }) => Function;
392
532
  fieldviews: {
393
533
  show: {
394
534
  isEdit: boolean;
395
535
  description: string;
396
- run: (v: any) => any;
536
+ run: (s: any) => string;
397
537
  };
398
- checkboxes: {
538
+ edit: {
399
539
  isEdit: boolean;
540
+ blockDisplay: boolean;
400
541
  description: string;
401
- run: (v: any) => any;
542
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
402
543
  };
403
- TrueFalse: {
544
+ number_slider: {
545
+ configFields: (field: any) => {
546
+ name: string;
547
+ type: any;
548
+ required: boolean;
549
+ }[];
404
550
  isEdit: boolean;
405
551
  description: string;
406
- run: (v: any) => "" | "True" | "False";
552
+ blockDisplay: boolean;
553
+ run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any) => any;
407
554
  };
408
- edit: {
555
+ range_interval: {
556
+ configFields: (field: any) => {
557
+ name: string;
558
+ type: any;
559
+ required: boolean;
560
+ }[];
409
561
  isEdit: boolean;
562
+ isFilter: boolean;
563
+ blockDisplay: boolean;
410
564
  description: string;
411
- configFields: {
565
+ run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any, state?: {}) => any;
566
+ };
567
+ progress_bar: {
568
+ configFields: (field: any) => ({
569
+ name: string;
570
+ type: any;
571
+ required: boolean;
572
+ label?: undefined;
573
+ } | {
412
574
  name: string;
575
+ type: string;
413
576
  label: string;
577
+ required?: undefined;
578
+ })[];
579
+ isEdit: boolean;
580
+ description: string;
581
+ run: (v: any, req: any, attrs?: {}) => any;
582
+ };
583
+ heat_cell: {
584
+ configFields: (field: any) => ({
585
+ name: string;
586
+ type: any;
587
+ required: boolean;
588
+ label?: undefined;
589
+ attributes?: undefined;
590
+ default?: undefined;
591
+ } | {
592
+ name: string;
414
593
  type: string;
594
+ label: string;
595
+ required: boolean;
415
596
  attributes: {
416
597
  options: string[];
417
598
  };
418
- }[];
419
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
420
- };
421
- switch: {
599
+ default?: undefined;
600
+ } | {
601
+ name: string;
602
+ type: string;
603
+ label: string;
604
+ required?: undefined;
605
+ attributes?: undefined;
606
+ default?: undefined;
607
+ } | {
608
+ name: string;
609
+ type: string;
610
+ label: string;
611
+ default: number;
612
+ required?: undefined;
613
+ attributes?: undefined;
614
+ })[];
422
615
  isEdit: boolean;
423
616
  description: string;
424
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
617
+ run: (v: any, req: any, attrs?: {}) => any;
618
+ };
619
+ above_input: {
620
+ isEdit: boolean;
621
+ isFilter: boolean;
622
+ blockDisplay: boolean;
623
+ run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any, state?: {}) => any;
624
+ };
625
+ below_input: {
626
+ isEdit: boolean;
627
+ isFilter: boolean;
628
+ blockDisplay: boolean;
629
+ run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any, state?: {}) => any;
425
630
  };
426
631
  show_with_html: {
427
632
  configFields: {
@@ -438,229 +643,24 @@ export const types: ({
438
643
  description: string;
439
644
  run: (v: any, req: any, attrs?: {}) => any;
440
645
  };
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
646
  };
447
647
  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;
648
+ read: (v: object) => string | number | undefined;
649
+ validate: ({ min, max }: object) => boolean | object;
453
650
  } | {
454
651
  name: string;
455
652
  sql_name: string;
456
653
  js_type: string;
457
654
  contract: () => Function;
458
- attributes: object[];
459
655
  fieldviews: {
460
656
  show: {
461
657
  isEdit: boolean;
462
658
  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;
659
+ run: (s: any) => any;
469
660
  };
470
- format: {
471
- isEdit: boolean;
472
- description: string;
661
+ show_with_html: {
473
662
  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;
490
- };
491
- show_with_html: {
492
- configFields: {
493
- input_type: string;
494
- name: string;
495
- label: string;
496
- sublabel: string;
497
- default: string;
498
- attributes: {
499
- mode: string;
500
- };
501
- }[];
502
- isEdit: boolean;
503
- description: string;
504
- run: (v: any, req: any, attrs?: {}) => any;
505
- };
506
- edit: {
507
- isEdit: boolean;
508
- blockDisplay: boolean;
509
- description: string;
510
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
511
- };
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
- };
522
- read: (v: object, attrs: object) => object;
523
- validate: () => boolean;
524
- } | {
525
- name: string;
526
- sql_name: string;
527
- js_type: string;
528
- contract: ({ min, max }: {
529
- min: number;
530
- max: number;
531
- }) => Function;
532
- fieldviews: {
533
- show: {
534
- isEdit: boolean;
535
- description: string;
536
- run: (s: any) => string;
537
- };
538
- edit: {
539
- isEdit: boolean;
540
- blockDisplay: boolean;
541
- description: string;
542
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
543
- };
544
- number_slider: {
545
- configFields: (field: any) => {
546
- name: string;
547
- type: any;
548
- required: boolean;
549
- }[];
550
- isEdit: boolean;
551
- description: string;
552
- blockDisplay: boolean;
553
- run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any) => any;
554
- };
555
- range_interval: {
556
- configFields: (field: any) => {
557
- name: string;
558
- type: any;
559
- required: boolean;
560
- }[];
561
- isEdit: boolean;
562
- isFilter: boolean;
563
- blockDisplay: boolean;
564
- description: string;
565
- run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any, state?: {}) => any;
566
- };
567
- progress_bar: {
568
- configFields: (field: any) => ({
569
- name: string;
570
- type: any;
571
- required: boolean;
572
- label?: undefined;
573
- } | {
574
- name: string;
575
- type: string;
576
- label: string;
577
- required?: undefined;
578
- })[];
579
- isEdit: boolean;
580
- description: string;
581
- run: (v: any, req: any, attrs?: {}) => any;
582
- };
583
- heat_cell: {
584
- configFields: (field: any) => ({
585
- name: string;
586
- type: any;
587
- required: boolean;
588
- label?: undefined;
589
- attributes?: undefined;
590
- default?: undefined;
591
- } | {
592
- name: string;
593
- type: string;
594
- label: string;
595
- required: boolean;
596
- attributes: {
597
- options: string[];
598
- };
599
- default?: undefined;
600
- } | {
601
- name: string;
602
- type: string;
603
- label: string;
604
- required?: undefined;
605
- attributes?: undefined;
606
- default?: undefined;
607
- } | {
608
- name: string;
609
- type: string;
610
- label: string;
611
- default: number;
612
- required?: undefined;
613
- attributes?: undefined;
614
- })[];
615
- isEdit: boolean;
616
- description: string;
617
- run: (v: any, req: any, attrs?: {}) => any;
618
- };
619
- above_input: {
620
- isEdit: boolean;
621
- isFilter: boolean;
622
- blockDisplay: boolean;
623
- run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any, state?: {}) => any;
624
- };
625
- below_input: {
626
- isEdit: boolean;
627
- isFilter: boolean;
628
- blockDisplay: boolean;
629
- run: (nm: any, v: any, attrs: {} | undefined, cls: any, required: any, field: any, state?: {}) => any;
630
- };
631
- show_with_html: {
632
- configFields: {
633
- input_type: string;
634
- name: string;
635
- label: string;
636
- sublabel: string;
637
- default: string;
638
- attributes: {
639
- mode: string;
640
- };
641
- }[];
642
- isEdit: boolean;
643
- description: string;
644
- run: (v: any, req: any, attrs?: {}) => any;
645
- };
646
- };
647
- attributes: object[];
648
- read: (v: object) => string | number | undefined;
649
- validate: ({ min, max }: object) => boolean | object;
650
- } | {
651
- name: string;
652
- sql_name: string;
653
- js_type: string;
654
- contract: () => Function;
655
- fieldviews: {
656
- show: {
657
- isEdit: boolean;
658
- description: string;
659
- run: (s: any) => any;
660
- };
661
- show_with_html: {
662
- configFields: {
663
- input_type: string;
663
+ input_type: string;
664
664
  name: string;
665
665
  label: string;
666
666
  sublabel: string;
@@ -687,63 +687,45 @@ export const types: ({
687
687
  export const viewtemplates: ({
688
688
  name: string;
689
689
  description: string;
690
- configuration_workflow: (req: object) => import("../models/workflow");
691
- 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, }: {
692
- columns: object[];
693
- view_to_create?: string | undefined;
694
- create_view_display: string;
695
- create_view_label?: string | undefined;
696
- default_state?: object | undefined;
697
- create_view_location?: string | undefined;
698
- }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
699
- listQuery: any;
700
- }) => Promise<any>;
701
- view_quantity: string;
702
- get_state_fields: (table_id: string, viewname: any, { columns }: {
690
+ get_state_fields: () => object[];
691
+ configuration_workflow: () => import("../models/workflow");
692
+ run: (table_id: number, viewname: string, { columns, layout }: {
703
693
  columns: object[];
704
- }) => Function;
705
- initial_config: Function;
706
- on_delete: (table_id: any, viewname: string, { default_state }: {
707
- default_state: any;
708
- }) => Promise<void>;
694
+ layout: object;
695
+ }, state: object, extra: object, { distinctValuesQuery }: {
696
+ distinctValuesQuery: any;
697
+ }) => Promise<Layout>;
698
+ initial_config: () => Promise<object>;
699
+ display_state_form: boolean;
700
+ getStringsForI18n({ layout }: {
701
+ layout: any;
702
+ }): string[];
709
703
  routes: {
710
- run_action: (table_id: number, viewname: any, { columns, layout }: {
711
- columns: object[];
712
- layout: any;
713
- }, body: object, { req, res }: {
714
- req: object;
704
+ run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
705
+ req: any;
715
706
  res: any;
716
- }, { getRowQuery }: {
717
- getRowQuery: any;
718
- }) => Promise<object>;
707
+ }, { actionQuery }: {
708
+ actionQuery: any;
709
+ }) => Promise<any>;
719
710
  };
720
- display_state_form: (opts: object) => boolean;
721
- default_state_form: ({ default_state }: object) => boolean;
722
- getStringsForI18n({ columns, create_view_label }: {
723
- columns: any;
724
- create_view_label: any;
725
- }): string[];
726
- queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
711
+ queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
727
712
  table_id: any;
728
- exttable_name: any;
729
- name: any;
713
+ viewname: any;
730
714
  configuration: {
731
715
  columns: any;
732
- default_state: any;
733
716
  };
734
717
  req: any;
718
+ res: any;
719
+ exttable_name: any;
735
720
  }) => {
736
- listQuery(state: any, stateHash: any): Promise<{
737
- rows: import("@saltcorn/db-common/internal").Row[];
738
- rowCount: number;
721
+ actionQuery(state: any, rndid: any): Promise<{
722
+ json: any;
723
+ }>;
724
+ distinctValuesQuery(state: any): Promise<{
725
+ distinct_values: {};
726
+ role: any;
739
727
  }>;
740
- getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
741
728
  };
742
- configCheck: (view: any) => Promise<{
743
- errors: string[];
744
- warnings: string[];
745
- }>;
746
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
747
729
  } | {
748
730
  name: string;
749
731
  description: string;
@@ -888,10 +870,150 @@ export const viewtemplates: ({
888
870
  getRowByIdQuery: any;
889
871
  }) => Promise<void>;
890
872
  };
891
- configCheck: (view: any) => Promise<{
892
- errors: string[];
893
- warnings: string[];
894
- }>;
873
+ configCheck: (view: any) => Promise<{
874
+ errors: string[];
875
+ warnings: string[];
876
+ }>;
877
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
878
+ } | {
879
+ name: string;
880
+ description: string;
881
+ configuration_workflow: (req: object) => import("../models/workflow");
882
+ run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
883
+ participant_field: string;
884
+ msg_relation: string;
885
+ msgsender_field: any;
886
+ msgview: string;
887
+ msgform: string;
888
+ participant_maxread_field: string;
889
+ }, state: object, { req, res }: {
890
+ req: object;
891
+ res: object;
892
+ }, { getRowQuery, updateQuery, optionsQuery }: {
893
+ getRowQuery: any;
894
+ updateQuery: any;
895
+ optionsQuery: any;
896
+ }) => Promise<div>;
897
+ get_state_fields: () => object[];
898
+ display_state_form: boolean;
899
+ routes: {
900
+ submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
901
+ participant_field: string;
902
+ msg_relation: string;
903
+ msgsender_field: any;
904
+ msgview: string;
905
+ msgform: string;
906
+ participant_maxread_field: string;
907
+ }, body: any, { req, res }: {
908
+ req: object;
909
+ res: object;
910
+ }, { submitAjaxQuery }: {
911
+ submitAjaxQuery: any;
912
+ }) => Promise<object>;
913
+ ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
914
+ participant_field: string;
915
+ participant_maxread_field: string;
916
+ }, body: any, { req, res }: {
917
+ req: object;
918
+ res: object;
919
+ }, { ackReadQuery }: {
920
+ ackReadQuery: any;
921
+ }) => Promise<void>;
922
+ fetch_older_msg: (table_id: any, viewname: any, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: object, body: object, { req, res }: string, { fetchOlderMsgQuery }: any) => Promise<object>;
923
+ };
924
+ noAutoTest: boolean;
925
+ authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
926
+ participant_field: object;
927
+ }, room_id: string, user: object) => Promise<object>;
928
+ virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
929
+ participant_field: any;
930
+ msg_relation: string;
931
+ msgsender_field: string;
932
+ msgview: string;
933
+ msgform: any;
934
+ participant_maxread_field: any;
935
+ }) => object[];
936
+ getStringsForI18n(): object[];
937
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
938
+ table_id: any;
939
+ viewname: any;
940
+ configuration: {
941
+ columns: any;
942
+ default_state: any;
943
+ };
944
+ req: any;
945
+ }) => {
946
+ 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>;
947
+ updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
948
+ submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
949
+ json: {
950
+ msgid: {
951
+ error: string;
952
+ } | {
953
+ success: any;
954
+ };
955
+ error?: undefined;
956
+ };
957
+ } | {
958
+ json: {
959
+ error: any;
960
+ msgid?: undefined;
961
+ };
962
+ }>;
963
+ ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
964
+ json: {
965
+ error: string;
966
+ success?: undefined;
967
+ };
968
+ } | {
969
+ json: {
970
+ success: string;
971
+ error?: undefined;
972
+ };
973
+ }>;
974
+ fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
975
+ optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
976
+ };
977
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
978
+ } | {
979
+ name: string;
980
+ description: string;
981
+ configuration_workflow: (req: object) => import("../models/workflow");
982
+ 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 }: {
983
+ show_view: string;
984
+ order_field: name;
985
+ descending: boolean;
986
+ view_to_create?: string | undefined;
987
+ create_view_display: string;
988
+ in_card: boolean;
989
+ masonry_columns: string;
990
+ rows_per_page?: number | undefined;
991
+ hide_pagination: boolean;
992
+ create_view_label?: string | undefined;
993
+ create_view_location?: string | undefined;
994
+ always_create_view: boolean;
995
+ cols: any;
996
+ }, state: object, extraArgs: any, { countRowsQuery }: {
997
+ countRowsQuery: any;
998
+ }) => Promise<div>;
999
+ get_state_fields: (table_id: number, viewname: any, { show_view }: {
1000
+ show_view: any;
1001
+ }) => Promise<import("../models/field")>;
1002
+ display_state_form: boolean;
1003
+ getStringsForI18n({ create_view_label }: {
1004
+ create_view_label: any;
1005
+ }): string[] | Object[];
1006
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1007
+ table_id: any;
1008
+ viewname: any;
1009
+ configuration: {
1010
+ columns: any;
1011
+ default_state: any;
1012
+ };
1013
+ req: any;
1014
+ }) => {
1015
+ countRowsQuery(state: any): Promise<number>;
1016
+ };
895
1017
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
896
1018
  } | {
897
1019
  name: string;
@@ -971,179 +1093,81 @@ export const viewtemplates: ({
971
1093
  name: string;
972
1094
  description: string;
973
1095
  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
- } | {
1007
- name: string;
1008
- description: string;
1009
- configuration_workflow: (req: object) => import("../models/workflow");
1010
- 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
- show_view: string;
1012
- order_field: name;
1013
- descending: boolean;
1096
+ 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, }: {
1097
+ columns: object[];
1014
1098
  view_to_create?: string | undefined;
1015
1099
  create_view_display: string;
1016
- in_card: boolean;
1017
- masonry_columns: string;
1018
- rows_per_page?: number | undefined;
1019
- hide_pagination: boolean;
1020
1100
  create_view_label?: string | undefined;
1101
+ default_state?: object | undefined;
1021
1102
  create_view_location?: string | undefined;
1022
- always_create_view: boolean;
1023
- cols: any;
1024
- }, state: object, extraArgs: any, { countRowsQuery }: {
1025
- countRowsQuery: any;
1026
- }) => Promise<div>;
1027
- get_state_fields: (table_id: number, viewname: any, { show_view }: {
1028
- show_view: any;
1029
- }) => Promise<import("../models/field")>;
1030
- display_state_form: boolean;
1031
- getStringsForI18n({ create_view_label }: {
1032
- create_view_label: any;
1033
- }): string[] | Object[];
1034
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1035
- table_id: any;
1036
- viewname: any;
1037
- configuration: {
1038
- columns: any;
1039
- default_state: any;
1040
- };
1041
- req: any;
1042
- }) => {
1043
- countRowsQuery(state: any): Promise<number>;
1044
- };
1045
- 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 }: {
1103
+ }, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
1104
+ listQuery: any;
1105
+ }) => Promise<any>;
1106
+ view_quantity: string;
1107
+ get_state_fields: (table_id: string, viewname: any, { columns }: {
1052
1108
  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[];
1109
+ }) => Function;
1110
+ initial_config: Function;
1111
+ on_delete: (table_id: any, viewname: string, { default_state }: {
1112
+ default_state: any;
1113
+ }) => Promise<void>;
1062
1114
  routes: {
1063
- run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
1064
- req: any;
1115
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
1116
+ columns: object[];
1117
+ layout: any;
1118
+ }, body: object, { req, res }: {
1119
+ req: object;
1065
1120
  res: any;
1066
- }, { actionQuery }: {
1067
- actionQuery: any;
1068
- }) => Promise<any>;
1121
+ }, { getRowQuery }: {
1122
+ getRowQuery: any;
1123
+ }) => Promise<object>;
1069
1124
  };
1070
- queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
1125
+ display_state_form: (opts: object) => boolean;
1126
+ default_state_form: ({ default_state }: object) => boolean;
1127
+ getStringsForI18n({ columns, create_view_label }: {
1128
+ columns: any;
1129
+ create_view_label: any;
1130
+ }): string[];
1131
+ queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
1071
1132
  table_id: any;
1072
- viewname: any;
1133
+ exttable_name: any;
1134
+ name: any;
1073
1135
  configuration: {
1074
1136
  columns: any;
1137
+ default_state: any;
1075
1138
  };
1076
1139
  req: any;
1077
- res: any;
1078
- exttable_name: any;
1079
1140
  }) => {
1080
- actionQuery(state: any, rndid: any): Promise<{
1081
- json: any;
1082
- }>;
1083
- distinctValuesQuery(state: any): Promise<{
1084
- distinct_values: {};
1085
- role: any;
1141
+ listQuery(state: any, stateHash: any): Promise<{
1142
+ rows: import("@saltcorn/db-common/internal").Row[];
1143
+ rowCount: number;
1086
1144
  }>;
1145
+ getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1087
1146
  };
1147
+ configCheck: (view: any) => Promise<{
1148
+ errors: string[];
1149
+ warnings: string[];
1150
+ }>;
1151
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1088
1152
  } | {
1089
1153
  name: string;
1090
1154
  description: string;
1091
1155
  configuration_workflow: (req: object) => import("../models/workflow");
1092
- run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1093
- participant_field: string;
1094
- msg_relation: string;
1095
- msgsender_field: any;
1096
- msgview: string;
1097
- msgform: string;
1098
- participant_maxread_field: string;
1099
- }, state: object, { req, res }: {
1100
- req: object;
1101
- res: object;
1102
- }, { getRowQuery, updateQuery, optionsQuery }: {
1156
+ run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
1157
+ list_view: string;
1158
+ show_view: string;
1159
+ subtables: object;
1160
+ }, state: any, extraArgs: any, { getRowQuery }: {
1103
1161
  getRowQuery: any;
1104
- updateQuery: any;
1105
- optionsQuery: any;
1106
1162
  }) => Promise<div>;
1107
- get_state_fields: () => object[];
1108
- display_state_form: boolean;
1109
- routes: {
1110
- submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1111
- participant_field: string;
1112
- msg_relation: string;
1113
- msgsender_field: any;
1114
- msgview: string;
1115
- msgform: string;
1116
- participant_maxread_field: string;
1117
- }, body: any, { req, res }: {
1118
- req: object;
1119
- res: object;
1120
- }, { submitAjaxQuery }: {
1121
- submitAjaxQuery: any;
1122
- }) => Promise<object>;
1123
- ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1124
- participant_field: string;
1125
- participant_maxread_field: string;
1126
- }, body: any, { req, res }: {
1127
- req: object;
1128
- res: object;
1129
- }, { ackReadQuery }: {
1130
- ackReadQuery: any;
1131
- }) => Promise<void>;
1132
- fetch_older_msg: (table_id: any, viewname: any, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: object, body: object, { req, res }: string, { fetchOlderMsgQuery }: any) => Promise<object>;
1133
- };
1134
- noAutoTest: boolean;
1135
- authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1136
- participant_field: object;
1137
- }, room_id: string, user: object) => Promise<object>;
1138
- virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1139
- participant_field: any;
1140
- msg_relation: string;
1141
- msgsender_field: string;
1142
- msgview: string;
1143
- msgform: any;
1144
- participant_maxread_field: any;
1145
- }) => object[];
1146
- getStringsForI18n(): object[];
1163
+ get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1164
+ list_view: string;
1165
+ show_view: any;
1166
+ }) => Promise<object[]>;
1167
+ display_state_form: ({ list_view, _omit_state_form }: {
1168
+ list_view: string;
1169
+ _omit_state_form: boolean;
1170
+ }) => boolean;
1147
1171
  queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1148
1172
  table_id: any;
1149
1173
  viewname: any;
@@ -1153,38 +1177,14 @@ export const viewtemplates: ({
1153
1177
  };
1154
1178
  req: any;
1155
1179
  }) => {
1156
- 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>;
1157
- updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1158
- submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1159
- json: {
1160
- msgid: {
1161
- error: string;
1162
- } | {
1163
- success: any;
1164
- };
1165
- error?: undefined;
1166
- };
1167
- } | {
1168
- json: {
1169
- error: any;
1170
- msgid?: undefined;
1171
- };
1172
- }>;
1173
- ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1174
- json: {
1175
- error: string;
1176
- success?: undefined;
1177
- };
1178
- } | {
1179
- json: {
1180
- success: string;
1181
- error?: undefined;
1182
- };
1183
- }>;
1184
- fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1185
- optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1180
+ getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1186
1181
  };
1187
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1182
+ connectedObjects: ({ list_view, subtables }: {
1183
+ list_view: any;
1184
+ subtables: any;
1185
+ }) => Promise<{
1186
+ embeddedViews: import("../models/view")[];
1187
+ }>;
1188
1188
  })[];
1189
1189
  import fileviews = require("./fileviews");
1190
1190
  import actions = require("./actions");