@saltcorn/data 1.1.1-beta.2 → 1.1.1-beta.4

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 (54) hide show
  1. package/dist/app-locales/public/da.json +3 -0
  2. package/dist/base-plugin/index.d.ts +405 -405
  3. package/dist/base-plugin/viewtemplates/show.d.ts.map +1 -1
  4. package/dist/base-plugin/viewtemplates/show.js +1 -0
  5. package/dist/base-plugin/viewtemplates/show.js.map +1 -1
  6. package/dist/base-plugin/viewtemplates/workflow-room.d.ts.map +1 -1
  7. package/dist/base-plugin/viewtemplates/workflow-room.js +3 -0
  8. package/dist/base-plugin/viewtemplates/workflow-room.js.map +1 -1
  9. package/dist/db/state.d.ts +1 -0
  10. package/dist/db/state.d.ts.map +1 -1
  11. package/dist/db/state.js +12 -0
  12. package/dist/db/state.js.map +1 -1
  13. package/dist/migrations/202501181435.d.ts +2 -0
  14. package/dist/migrations/202501181435.d.ts.map +1 -0
  15. package/dist/migrations/202501181435.js +18 -0
  16. package/dist/migrations/202501181435.js.map +1 -0
  17. package/dist/migrations/202501181437.d.ts +2 -0
  18. package/dist/migrations/202501181437.d.ts.map +1 -0
  19. package/dist/migrations/202501181437.js +22 -0
  20. package/dist/migrations/202501181437.js.map +1 -0
  21. package/dist/migrations/202501181439.d.ts +2 -0
  22. package/dist/migrations/202501181439.d.ts.map +1 -0
  23. package/dist/migrations/202501181439.js +22 -0
  24. package/dist/migrations/202501181439.js.map +1 -0
  25. package/dist/migrations/202501181440.d.ts +2 -0
  26. package/dist/migrations/202501181440.d.ts.map +1 -0
  27. package/dist/migrations/202501181440.js +22 -0
  28. package/dist/migrations/202501181440.js.map +1 -0
  29. package/dist/models/field.d.ts +1 -0
  30. package/dist/models/field.d.ts.map +1 -1
  31. package/dist/models/field.js +65 -1
  32. package/dist/models/field.js.map +1 -1
  33. package/dist/models/table.d.ts.map +1 -1
  34. package/dist/models/table.js +46 -1
  35. package/dist/models/table.js.map +1 -1
  36. package/dist/models/trigger.d.ts.map +1 -1
  37. package/dist/models/trigger.js +1 -0
  38. package/dist/models/trigger.js.map +1 -1
  39. package/dist/models/workflow_run.d.ts +2 -1
  40. package/dist/models/workflow_run.d.ts.map +1 -1
  41. package/dist/models/workflow_run.js +38 -1
  42. package/dist/models/workflow_run.js.map +1 -1
  43. package/dist/models/workflow_step.d.ts +18 -18
  44. package/dist/models/workflow_step.d.ts.map +1 -1
  45. package/dist/models/workflow_step.js +36 -1
  46. package/dist/models/workflow_step.js.map +1 -1
  47. package/dist/plugin-helper.d.ts +0 -1
  48. package/dist/plugin-helper.d.ts.map +1 -1
  49. package/dist/plugin-helper.js +2 -0
  50. package/dist/plugin-helper.js.map +1 -1
  51. package/dist/tests/calc.test.js +83 -2
  52. package/dist/tests/calc.test.js.map +1 -1
  53. package/dist/utils.d.ts +3 -3
  54. package/package.json +8 -8
@@ -554,113 +554,7 @@ export const types: ({
554
554
  show: {
555
555
  isEdit: boolean;
556
556
  description: string;
557
- run: (v: any, req: any) => any;
558
- };
559
- checkboxes: {
560
- isEdit: boolean;
561
- description: string;
562
- run: (v: any) => any;
563
- };
564
- TrueFalse: {
565
- isEdit: boolean;
566
- description: string;
567
- run: (v: any) => "" | "True" | "False";
568
- };
569
- edit: {
570
- isEdit: boolean;
571
- description: string;
572
- configFields: ({
573
- name: string;
574
- label: string;
575
- type: string;
576
- attributes: {
577
- options: string[];
578
- };
579
- } | {
580
- name: string;
581
- label: string;
582
- type: string;
583
- attributes?: undefined;
584
- })[];
585
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
586
- };
587
- switch: {
588
- isEdit: boolean;
589
- description: string;
590
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
591
- };
592
- show_with_html: {
593
- configFields: {
594
- input_type: string;
595
- name: string;
596
- label: string;
597
- sublabel: string;
598
- default: string;
599
- attributes: {
600
- mode: string;
601
- };
602
- }[];
603
- isEdit: boolean;
604
- description: string;
605
- run: (v: any, req: any, attrs?: {}) => any;
606
- };
607
- tristate: {
608
- isEdit: boolean;
609
- description: string;
610
- configFields: {
611
- name: string;
612
- label: string;
613
- type: string;
614
- }[];
615
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
616
- };
617
- };
618
- attributes: object[];
619
- readFromFormRecord: (rec: any, name: string) => boolean | null;
620
- read: (v: object) => boolean | null;
621
- readFromDB: (v: object) => object;
622
- listAs: (v: object) => object;
623
- validate: () => boolean;
624
- } | {
625
- name: string;
626
- description: string;
627
- sql_name: string;
628
- js_type: string;
629
- contract: () => Function;
630
- attributes: object[];
631
- fieldviews: {
632
- show: {
633
- isEdit: boolean;
634
- description: string;
635
- run: (d: any, req: any, attrs?: {}) => any;
636
- };
637
- showDay: {
638
- isEdit: boolean;
639
- description: string;
640
- run: (d: any, req: any) => any;
641
- };
642
- format: {
643
- isEdit: boolean;
644
- description: string;
645
- configFields: {
646
- name: string;
647
- label: string;
648
- type: string;
649
- help: {
650
- topic: string;
651
- };
652
- }[];
653
- run: (d: any, req: any, options: any) => any;
654
- };
655
- relative: {
656
- isEdit: boolean;
657
- description: string;
658
- run: (d: any, req: any) => string;
659
- };
660
- yearsAgo: {
661
- isEdit: boolean;
662
- description: string;
663
- run: (d: any, req: any) => string;
557
+ run: (s: any) => any;
664
558
  };
665
559
  show_with_html: {
666
560
  configFields: {
@@ -683,17 +577,9 @@ export const types: ({
683
577
  description: string;
684
578
  run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
685
579
  };
686
- editDay: {
687
- isEdit: boolean;
688
- blockDisplay: boolean;
689
- description: string;
690
- run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
691
- };
692
- };
693
- presets: {
694
- Now: () => Date;
695
580
  };
696
- read: (v: object, attrs: object) => object;
581
+ attributes: object[];
582
+ read: (v: object) => object;
697
583
  validate: () => boolean;
698
584
  } | {
699
585
  name: string;
@@ -948,11 +834,40 @@ export const types: ({
948
834
  sql_name: string;
949
835
  js_type: string;
950
836
  contract: () => Function;
837
+ attributes: object[];
951
838
  fieldviews: {
952
839
  show: {
953
840
  isEdit: boolean;
954
841
  description: string;
955
- run: (s: any) => any;
842
+ run: (d: any, req: any, attrs?: {}) => any;
843
+ };
844
+ showDay: {
845
+ isEdit: boolean;
846
+ description: string;
847
+ run: (d: any, req: any) => any;
848
+ };
849
+ format: {
850
+ isEdit: boolean;
851
+ description: string;
852
+ configFields: {
853
+ name: string;
854
+ label: string;
855
+ type: string;
856
+ help: {
857
+ topic: string;
858
+ };
859
+ }[];
860
+ run: (d: any, req: any, options: any) => any;
861
+ };
862
+ relative: {
863
+ isEdit: boolean;
864
+ description: string;
865
+ run: (d: any, req: any) => string;
866
+ };
867
+ yearsAgo: {
868
+ isEdit: boolean;
869
+ description: string;
870
+ run: (d: any, req: any) => string;
956
871
  };
957
872
  show_with_html: {
958
873
  configFields: {
@@ -975,44 +890,115 @@ export const types: ({
975
890
  description: string;
976
891
  run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
977
892
  };
893
+ editDay: {
894
+ isEdit: boolean;
895
+ blockDisplay: boolean;
896
+ description: string;
897
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
898
+ };
899
+ };
900
+ presets: {
901
+ Now: () => Date;
902
+ };
903
+ read: (v: object, attrs: object) => object;
904
+ validate: () => boolean;
905
+ } | {
906
+ name: string;
907
+ description: string;
908
+ sql_name: string;
909
+ js_type: string;
910
+ contract: () => Function;
911
+ fieldviews: {
912
+ show: {
913
+ isEdit: boolean;
914
+ description: string;
915
+ run: (v: any, req: any) => any;
916
+ };
917
+ checkboxes: {
918
+ isEdit: boolean;
919
+ description: string;
920
+ run: (v: any) => any;
921
+ };
922
+ TrueFalse: {
923
+ isEdit: boolean;
924
+ description: string;
925
+ run: (v: any) => "" | "True" | "False";
926
+ };
927
+ edit: {
928
+ isEdit: boolean;
929
+ description: string;
930
+ configFields: ({
931
+ name: string;
932
+ label: string;
933
+ type: string;
934
+ attributes: {
935
+ options: string[];
936
+ };
937
+ } | {
938
+ name: string;
939
+ label: string;
940
+ type: string;
941
+ attributes?: undefined;
942
+ })[];
943
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
944
+ };
945
+ switch: {
946
+ isEdit: boolean;
947
+ description: string;
948
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
949
+ };
950
+ show_with_html: {
951
+ configFields: {
952
+ input_type: string;
953
+ name: string;
954
+ label: string;
955
+ sublabel: string;
956
+ default: string;
957
+ attributes: {
958
+ mode: string;
959
+ };
960
+ }[];
961
+ isEdit: boolean;
962
+ description: string;
963
+ run: (v: any, req: any, attrs?: {}) => any;
964
+ };
965
+ tristate: {
966
+ isEdit: boolean;
967
+ description: string;
968
+ configFields: {
969
+ name: string;
970
+ label: string;
971
+ type: string;
972
+ }[];
973
+ run: (nm: any, v: any, attrs: any, cls: any, required: any, field: any) => any;
974
+ };
978
975
  };
979
976
  attributes: object[];
980
- read: (v: object) => object;
977
+ readFromFormRecord: (rec: any, name: string) => boolean | null;
978
+ read: (v: object) => boolean | null;
979
+ readFromDB: (v: object) => object;
980
+ listAs: (v: object) => object;
981
981
  validate: () => boolean;
982
982
  })[];
983
983
  export const viewtemplates: ({
984
984
  name: string;
985
985
  description: string;
986
986
  configuration_workflow: (req: object) => import("../models/workflow");
987
- run: (table_id: any, viewname: any, { workflow, prev_runs }: {
988
- workflow: any;
989
- prev_runs: any;
990
- }, state: any, { req, res, isPreview }: {
991
- req: any;
992
- res: any;
993
- isPreview: any;
994
- }, { getRowQuery, updateQuery, optionsQuery }: {
987
+ run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
988
+ list_view: string;
989
+ show_view: string;
990
+ subtables: object;
991
+ }, state: any, extraArgs: any, { getRowQuery }: {
995
992
  getRowQuery: any;
996
- updateQuery: any;
997
- optionsQuery: any;
998
- }) => Promise<any>;
999
- tableless: boolean;
1000
- get_state_fields: () => never[];
1001
- display_state_form: boolean;
1002
- routes: {
1003
- submit_form: (table_id: any, viewname: any, { workflow }: {
1004
- workflow: any;
1005
- }, body: any, { req }: {
1006
- req: any;
1007
- }) => Promise<{
1008
- json: {
1009
- success: string;
1010
- eval_js: string;
1011
- };
1012
- }>;
1013
- };
1014
- noAutoTest: boolean;
1015
- getStringsForI18n(): object[];
993
+ }) => Promise<div>;
994
+ get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
995
+ list_view: string;
996
+ show_view: any;
997
+ }) => Promise<object[]>;
998
+ display_state_form: ({ list_view, _omit_state_form }: {
999
+ list_view: string;
1000
+ _omit_state_form: boolean;
1001
+ }) => boolean;
1016
1002
  queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1017
1003
  table_id: any;
1018
1004
  viewname: any;
@@ -1021,8 +1007,15 @@ export const viewtemplates: ({
1021
1007
  default_state: any;
1022
1008
  };
1023
1009
  req: any;
1024
- }) => {};
1025
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1010
+ }) => {
1011
+ getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1012
+ };
1013
+ connectedObjects: ({ list_view, subtables }: {
1014
+ list_view: any;
1015
+ subtables: any;
1016
+ }) => Promise<{
1017
+ embeddedViews: import("../models/view")[];
1018
+ }>;
1026
1019
  } | {
1027
1020
  name: string;
1028
1021
  description: string;
@@ -1084,6 +1077,269 @@ export const viewtemplates: ({
1084
1077
  warnings: string[];
1085
1078
  }>;
1086
1079
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1080
+ } | {
1081
+ name: string;
1082
+ description: string;
1083
+ get_state_fields: () => object[];
1084
+ configuration_workflow: (req: object) => import("../models/workflow");
1085
+ run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
1086
+ columns: object[];
1087
+ layout: object;
1088
+ page_title?: string | undefined;
1089
+ page_title_formula: boolean;
1090
+ }, state: object, extra: object, { showQuery }: {
1091
+ showQuery: any;
1092
+ }) => Promise<string>;
1093
+ runMany: (table_id: number, viewname: string, { columns, layout }: {
1094
+ columns: object[];
1095
+ layout: object;
1096
+ }, state: object, extra: object, { runManyQuery }: {
1097
+ runManyQuery: any;
1098
+ }) => Promise<object[]>;
1099
+ renderRows: (table: object, viewname: string, { columns, layout }: {
1100
+ columns: object[];
1101
+ layout: object;
1102
+ }, extra: object, rows: object[], state: any) => Promise<string>;
1103
+ initial_config: Function;
1104
+ display_state_form: boolean;
1105
+ routes: {
1106
+ run_action: (table_id: number, viewname: any, { columns, layout }: {
1107
+ columns: object[];
1108
+ layout: any;
1109
+ }, body: any, { req, res }: {
1110
+ req: object;
1111
+ res: any;
1112
+ }, { actionQuery }: {
1113
+ actionQuery: any;
1114
+ }) => Promise<object>;
1115
+ };
1116
+ getStringsForI18n({ layout }: {
1117
+ layout: object;
1118
+ }): string[];
1119
+ interpolate_title_string(table_id: any, title: any, state: any): Promise<any>;
1120
+ queries: ({ table_id, exttable_name, name, configuration: { columns, layout }, req, res, }: {
1121
+ table_id: any;
1122
+ exttable_name: any;
1123
+ name: any;
1124
+ configuration: {
1125
+ columns: any;
1126
+ layout: any;
1127
+ };
1128
+ req: any;
1129
+ res: any;
1130
+ }) => {
1131
+ showQuery(state: any): Promise<{
1132
+ rows: null;
1133
+ message: string;
1134
+ } | {
1135
+ rows: import("@saltcorn/db-common/internal").Row[];
1136
+ message: null;
1137
+ }>;
1138
+ runManyQuery(state: any, { where, limit, offset, joinFieldsExtra, orderBy, orderDesc }: {
1139
+ where: any;
1140
+ limit: any;
1141
+ offset: any;
1142
+ joinFieldsExtra: any;
1143
+ orderBy: any;
1144
+ orderDesc: any;
1145
+ }): Promise<import("@saltcorn/db-common/internal").Row[]>;
1146
+ actionQuery(): Promise<{
1147
+ json: any;
1148
+ }>;
1149
+ };
1150
+ configCheck: (view: any) => Promise<{
1151
+ errors: string[];
1152
+ warnings: string[];
1153
+ }>;
1154
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1155
+ } | {
1156
+ name: string;
1157
+ description: string;
1158
+ configuration_workflow: (req: object) => import("../models/workflow");
1159
+ 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, lazy_accordions, ...cols }: {
1160
+ show_view: string;
1161
+ order_field: void;
1162
+ descending: boolean;
1163
+ view_to_create?: string | undefined;
1164
+ create_view_display: string;
1165
+ in_card: boolean;
1166
+ masonry_columns: string;
1167
+ rows_per_page?: number | undefined;
1168
+ hide_pagination: boolean;
1169
+ create_view_label?: string | undefined;
1170
+ create_view_location?: string | undefined;
1171
+ always_create_view: boolean;
1172
+ cols: any;
1173
+ }, state: object, extraArgs: any, { countRowsQuery, runManyQuery }: {
1174
+ countRowsQuery: any;
1175
+ runManyQuery: any;
1176
+ }) => Promise<div>;
1177
+ get_state_fields: (table_id: number, viewname: any, { show_view }: {
1178
+ show_view: any;
1179
+ }) => Promise<import("../models/field")>;
1180
+ display_state_form: boolean;
1181
+ getStringsForI18n({ create_view_label }: {
1182
+ create_view_label: any;
1183
+ }): string[] | Object[];
1184
+ queries: ({ table_id, viewname, configuration: { show_view }, req, res, }: {
1185
+ table_id: any;
1186
+ viewname: any;
1187
+ configuration: {
1188
+ show_view: any;
1189
+ };
1190
+ req: any;
1191
+ res: any;
1192
+ }) => {
1193
+ countRowsQuery(state: any): Promise<number>;
1194
+ runManyQuery(state: any, qextra: any, selectOpts0: any): Promise<string[] | {
1195
+ html: string;
1196
+ row: any;
1197
+ }[]>;
1198
+ };
1199
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1200
+ } | {
1201
+ name: string;
1202
+ description: string;
1203
+ configuration_workflow: (req: object) => import("../models/workflow");
1204
+ run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1205
+ participant_field: string;
1206
+ msg_relation: string;
1207
+ msgsender_field: any;
1208
+ msgview: string;
1209
+ msgform: string;
1210
+ participant_maxread_field: string;
1211
+ }, state: object, { req, res }: {
1212
+ req: object;
1213
+ res: object;
1214
+ }, { getRowQuery, updateQuery, optionsQuery }: {
1215
+ getRowQuery: any;
1216
+ updateQuery: any;
1217
+ optionsQuery: any;
1218
+ }) => Promise<div>;
1219
+ get_state_fields: () => object[];
1220
+ display_state_form: boolean;
1221
+ routes: {
1222
+ submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1223
+ participant_field: string;
1224
+ msg_relation: string;
1225
+ msgsender_field: any;
1226
+ msgview: string;
1227
+ msgform: string;
1228
+ participant_maxread_field: string;
1229
+ }, body: any, { req, res }: {
1230
+ req: object;
1231
+ res: object;
1232
+ }, { submitAjaxQuery }: {
1233
+ submitAjaxQuery: any;
1234
+ }) => Promise<object>;
1235
+ ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1236
+ participant_field: string;
1237
+ participant_maxread_field: string;
1238
+ }, body: any, { req, res }: {
1239
+ req: object;
1240
+ res: object;
1241
+ }, { ackReadQuery }: {
1242
+ ackReadQuery: any;
1243
+ }) => Promise<void>;
1244
+ 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>;
1245
+ };
1246
+ noAutoTest: boolean;
1247
+ authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1248
+ participant_field: object;
1249
+ }, room_id: string, user: object) => Promise<object>;
1250
+ virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1251
+ participant_field: any;
1252
+ msg_relation: string;
1253
+ msgsender_field: string;
1254
+ msgview: string;
1255
+ msgform: any;
1256
+ participant_maxread_field: any;
1257
+ }) => object[];
1258
+ getStringsForI18n(): object[];
1259
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1260
+ table_id: any;
1261
+ viewname: any;
1262
+ configuration: {
1263
+ columns: any;
1264
+ default_state: any;
1265
+ };
1266
+ req: any;
1267
+ }) => {
1268
+ 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>;
1269
+ updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1270
+ submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1271
+ json: {
1272
+ msgid: {
1273
+ error: string;
1274
+ } | {
1275
+ success: any;
1276
+ };
1277
+ error?: undefined;
1278
+ };
1279
+ } | {
1280
+ json: {
1281
+ error: any;
1282
+ msgid?: undefined;
1283
+ };
1284
+ }>;
1285
+ ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1286
+ json: {
1287
+ error: string;
1288
+ success?: undefined;
1289
+ };
1290
+ } | {
1291
+ json: {
1292
+ success: string;
1293
+ error?: undefined;
1294
+ };
1295
+ }>;
1296
+ fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1297
+ optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1298
+ };
1299
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1300
+ } | {
1301
+ name: string;
1302
+ description: string;
1303
+ configuration_workflow: (req: object) => import("../models/workflow");
1304
+ run: (table_id: any, viewname: any, { workflow, prev_runs }: {
1305
+ workflow: any;
1306
+ prev_runs: any;
1307
+ }, state: any, { req, res, isPreview }: {
1308
+ req: any;
1309
+ res: any;
1310
+ isPreview: any;
1311
+ }, { getRowQuery, updateQuery, optionsQuery }: {
1312
+ getRowQuery: any;
1313
+ updateQuery: any;
1314
+ optionsQuery: any;
1315
+ }) => Promise<any>;
1316
+ tableless: boolean;
1317
+ get_state_fields: () => never[];
1318
+ display_state_form: boolean;
1319
+ routes: {
1320
+ submit_form: (table_id: any, viewname: any, { workflow }: {
1321
+ workflow: any;
1322
+ }, body: any, { req }: {
1323
+ req: any;
1324
+ }) => Promise<{
1325
+ json: {
1326
+ success: string;
1327
+ eval_js: string;
1328
+ };
1329
+ }>;
1330
+ };
1331
+ noAutoTest: boolean;
1332
+ getStringsForI18n(): object[];
1333
+ queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1334
+ table_id: any;
1335
+ viewname: any;
1336
+ configuration: {
1337
+ columns: any;
1338
+ default_state: any;
1339
+ };
1340
+ req: any;
1341
+ }) => {};
1342
+ connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1087
1343
  } | {
1088
1344
  name: string;
1089
1345
  description: string;
@@ -1244,162 +1500,6 @@ export const viewtemplates: ({
1244
1500
  warnings: string[];
1245
1501
  }>;
1246
1502
  connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1247
- } | {
1248
- name: string;
1249
- description: string;
1250
- get_state_fields: () => object[];
1251
- configuration_workflow: (req: object) => import("../models/workflow");
1252
- run: (table_id: string, viewname: string, { columns, layout, page_title, page_title_formula }: {
1253
- columns: object[];
1254
- layout: object;
1255
- page_title?: string | undefined;
1256
- page_title_formula: boolean;
1257
- }, state: object, extra: object, { showQuery }: {
1258
- showQuery: any;
1259
- }) => Promise<string>;
1260
- runMany: (table_id: number, viewname: string, { columns, layout }: {
1261
- columns: object[];
1262
- layout: object;
1263
- }, state: object, extra: object, { runManyQuery }: {
1264
- runManyQuery: any;
1265
- }) => Promise<object[]>;
1266
- renderRows: (table: object, viewname: string, { columns, layout }: {
1267
- columns: object[];
1268
- layout: object;
1269
- }, extra: object, rows: object[], state: any) => Promise<string>;
1270
- initial_config: Function;
1271
- display_state_form: boolean;
1272
- routes: {
1273
- run_action: (table_id: number, viewname: any, { columns, layout }: {
1274
- columns: object[];
1275
- layout: any;
1276
- }, body: any, { req, res }: {
1277
- req: object;
1278
- res: any;
1279
- }, { actionQuery }: {
1280
- actionQuery: any;
1281
- }) => Promise<object>;
1282
- };
1283
- getStringsForI18n({ layout }: {
1284
- layout: object;
1285
- }): string[];
1286
- interpolate_title_string(table_id: any, title: any, state: any): Promise<any>;
1287
- queries: ({ table_id, exttable_name, name, configuration: { columns, layout }, req, res, }: {
1288
- table_id: any;
1289
- exttable_name: any;
1290
- name: any;
1291
- configuration: {
1292
- columns: any;
1293
- layout: any;
1294
- };
1295
- req: any;
1296
- res: any;
1297
- }) => {
1298
- showQuery(state: any): Promise<{
1299
- rows: null;
1300
- message: string;
1301
- } | {
1302
- rows: import("@saltcorn/db-common/internal").Row[];
1303
- message: null;
1304
- }>;
1305
- runManyQuery(state: any, { where, limit, offset, joinFieldsExtra, orderBy, orderDesc }: {
1306
- where: any;
1307
- limit: any;
1308
- offset: any;
1309
- joinFieldsExtra: any;
1310
- orderBy: any;
1311
- orderDesc: any;
1312
- }): Promise<import("@saltcorn/db-common/internal").Row[]>;
1313
- actionQuery(): Promise<{
1314
- json: any;
1315
- }>;
1316
- };
1317
- configCheck: (view: any) => Promise<{
1318
- errors: string[];
1319
- warnings: string[];
1320
- }>;
1321
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1322
- } | {
1323
- name: string;
1324
- description: string;
1325
- configuration_workflow: (req: object) => import("../models/workflow");
1326
- run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
1327
- list_view: string;
1328
- show_view: string;
1329
- subtables: object;
1330
- }, state: any, extraArgs: any, { getRowQuery }: {
1331
- getRowQuery: any;
1332
- }) => Promise<div>;
1333
- get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
1334
- list_view: string;
1335
- show_view: any;
1336
- }) => Promise<object[]>;
1337
- display_state_form: ({ list_view, _omit_state_form }: {
1338
- list_view: string;
1339
- _omit_state_form: boolean;
1340
- }) => boolean;
1341
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1342
- table_id: any;
1343
- viewname: any;
1344
- configuration: {
1345
- columns: any;
1346
- default_state: any;
1347
- };
1348
- req: any;
1349
- }) => {
1350
- getRowQuery(uniques: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1351
- };
1352
- connectedObjects: ({ list_view, subtables }: {
1353
- list_view: any;
1354
- subtables: any;
1355
- }) => Promise<{
1356
- embeddedViews: import("../models/view")[];
1357
- }>;
1358
- } | {
1359
- name: string;
1360
- description: string;
1361
- configuration_workflow: (req: object) => import("../models/workflow");
1362
- 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, lazy_accordions, ...cols }: {
1363
- show_view: string;
1364
- order_field: void;
1365
- descending: boolean;
1366
- view_to_create?: string | undefined;
1367
- create_view_display: string;
1368
- in_card: boolean;
1369
- masonry_columns: string;
1370
- rows_per_page?: number | undefined;
1371
- hide_pagination: boolean;
1372
- create_view_label?: string | undefined;
1373
- create_view_location?: string | undefined;
1374
- always_create_view: boolean;
1375
- cols: any;
1376
- }, state: object, extraArgs: any, { countRowsQuery, runManyQuery }: {
1377
- countRowsQuery: any;
1378
- runManyQuery: any;
1379
- }) => Promise<div>;
1380
- get_state_fields: (table_id: number, viewname: any, { show_view }: {
1381
- show_view: any;
1382
- }) => Promise<import("../models/field")>;
1383
- display_state_form: boolean;
1384
- getStringsForI18n({ create_view_label }: {
1385
- create_view_label: any;
1386
- }): string[] | Object[];
1387
- queries: ({ table_id, viewname, configuration: { show_view }, req, res, }: {
1388
- table_id: any;
1389
- viewname: any;
1390
- configuration: {
1391
- show_view: any;
1392
- };
1393
- req: any;
1394
- res: any;
1395
- }) => {
1396
- countRowsQuery(state: any): Promise<number>;
1397
- runManyQuery(state: any, qextra: any, selectOpts0: any): Promise<string[] | {
1398
- html: string;
1399
- row: any;
1400
- }[]>;
1401
- };
1402
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1403
1503
  } | {
1404
1504
  name: string;
1405
1505
  description: string;
@@ -1444,106 +1544,6 @@ export const viewtemplates: ({
1444
1544
  role: any;
1445
1545
  }>;
1446
1546
  };
1447
- } | {
1448
- name: string;
1449
- description: string;
1450
- configuration_workflow: (req: object) => import("../models/workflow");
1451
- run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1452
- participant_field: string;
1453
- msg_relation: string;
1454
- msgsender_field: any;
1455
- msgview: string;
1456
- msgform: string;
1457
- participant_maxread_field: string;
1458
- }, state: object, { req, res }: {
1459
- req: object;
1460
- res: object;
1461
- }, { getRowQuery, updateQuery, optionsQuery }: {
1462
- getRowQuery: any;
1463
- updateQuery: any;
1464
- optionsQuery: any;
1465
- }) => Promise<div>;
1466
- get_state_fields: () => object[];
1467
- display_state_form: boolean;
1468
- routes: {
1469
- submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1470
- participant_field: string;
1471
- msg_relation: string;
1472
- msgsender_field: any;
1473
- msgview: string;
1474
- msgform: string;
1475
- participant_maxread_field: string;
1476
- }, body: any, { req, res }: {
1477
- req: object;
1478
- res: object;
1479
- }, { submitAjaxQuery }: {
1480
- submitAjaxQuery: any;
1481
- }) => Promise<object>;
1482
- ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
1483
- participant_field: string;
1484
- participant_maxread_field: string;
1485
- }, body: any, { req, res }: {
1486
- req: object;
1487
- res: object;
1488
- }, { ackReadQuery }: {
1489
- ackReadQuery: any;
1490
- }) => Promise<void>;
1491
- 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>;
1492
- };
1493
- noAutoTest: boolean;
1494
- authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
1495
- participant_field: object;
1496
- }, room_id: string, user: object) => Promise<object>;
1497
- virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
1498
- participant_field: any;
1499
- msg_relation: string;
1500
- msgsender_field: string;
1501
- msgview: string;
1502
- msgform: any;
1503
- participant_maxread_field: any;
1504
- }) => object[];
1505
- getStringsForI18n(): object[];
1506
- queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
1507
- table_id: any;
1508
- viewname: any;
1509
- configuration: {
1510
- columns: any;
1511
- default_state: any;
1512
- };
1513
- req: any;
1514
- }) => {
1515
- 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>;
1516
- updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
1517
- submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
1518
- json: {
1519
- msgid: {
1520
- error: string;
1521
- } | {
1522
- success: any;
1523
- };
1524
- error?: undefined;
1525
- };
1526
- } | {
1527
- json: {
1528
- error: any;
1529
- msgid?: undefined;
1530
- };
1531
- }>;
1532
- ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
1533
- json: {
1534
- error: string;
1535
- success?: undefined;
1536
- };
1537
- } | {
1538
- json: {
1539
- success: string;
1540
- error?: undefined;
1541
- };
1542
- }>;
1543
- fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
1544
- optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
1545
- };
1546
- connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
1547
1547
  })[];
1548
1548
  import fileviews = require("./fileviews");
1549
1549
  import actions = require("./actions");