@saltcorn/data 0.9.4-beta.9 → 0.9.5-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base-plugin/actions.d.ts +124 -58
- package/dist/base-plugin/actions.d.ts.map +1 -1
- package/dist/base-plugin/actions.js +95 -20
- package/dist/base-plugin/actions.js.map +1 -1
- package/dist/base-plugin/fieldviews.d.ts.map +1 -1
- package/dist/base-plugin/fieldviews.js +9 -1
- package/dist/base-plugin/fieldviews.js.map +1 -1
- package/dist/base-plugin/fileviews.d.ts +13 -0
- package/dist/base-plugin/fileviews.js +42 -2
- package/dist/base-plugin/fileviews.js.map +1 -1
- package/dist/base-plugin/index.d.ts +187 -183
- package/dist/base-plugin/index.d.ts.map +1 -1
- package/dist/base-plugin/types.d.ts.map +1 -1
- package/dist/base-plugin/types.js +19 -10
- package/dist/base-plugin/types.js.map +1 -1
- package/dist/base-plugin/viewtemplates/edit.d.ts +4 -1
- package/dist/base-plugin/viewtemplates/edit.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/edit.js +109 -33
- package/dist/base-plugin/viewtemplates/edit.js.map +1 -1
- package/dist/base-plugin/viewtemplates/feed.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/feed.js +4 -1
- package/dist/base-plugin/viewtemplates/feed.js.map +1 -1
- package/dist/base-plugin/viewtemplates/filter.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/filter.js +66 -5
- package/dist/base-plugin/viewtemplates/filter.js.map +1 -1
- package/dist/base-plugin/viewtemplates/list.d.ts +3 -2
- package/dist/base-plugin/viewtemplates/list.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/list.js +274 -38
- package/dist/base-plugin/viewtemplates/list.js.map +1 -1
- package/dist/base-plugin/viewtemplates/show.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/show.js +80 -26
- package/dist/base-plugin/viewtemplates/show.js.map +1 -1
- package/dist/base-plugin/viewtemplates/viewable_fields.d.ts +2 -1
- package/dist/base-plugin/viewtemplates/viewable_fields.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/viewable_fields.js +147 -23
- package/dist/base-plugin/viewtemplates/viewable_fields.js.map +1 -1
- package/dist/db/connect.d.ts.map +1 -1
- package/dist/db/connect.js +20 -0
- package/dist/db/connect.js.map +1 -1
- package/dist/db/fixtures.d.ts.map +1 -1
- package/dist/db/fixtures.js +47 -0
- package/dist/db/fixtures.js.map +1 -1
- package/dist/db/state.d.ts +5 -0
- package/dist/db/state.d.ts.map +1 -1
- package/dist/db/state.js +18 -0
- package/dist/db/state.js.map +1 -1
- package/dist/migrations/202402071125.d.ts +2 -0
- package/dist/migrations/202402071125.d.ts.map +1 -0
- package/dist/migrations/202402071125.js +4 -0
- package/dist/migrations/202402071125.js.map +1 -0
- package/dist/models/config.d.ts.map +1 -1
- package/dist/models/config.js +27 -0
- package/dist/models/config.js.map +1 -1
- package/dist/models/email.d.ts.map +1 -1
- package/dist/models/email.js +6 -2
- package/dist/models/email.js.map +1 -1
- package/dist/models/field.d.ts.map +1 -1
- package/dist/models/field.js +2 -2
- package/dist/models/field.js.map +1 -1
- package/dist/models/file.d.ts +2 -0
- package/dist/models/file.d.ts.map +1 -1
- package/dist/models/file.js +9 -0
- package/dist/models/file.js.map +1 -1
- package/dist/models/internal/query.d.ts +6 -0
- package/dist/models/internal/query.d.ts.map +1 -0
- package/dist/models/internal/query.js +86 -0
- package/dist/models/internal/query.js.map +1 -0
- package/dist/models/page.d.ts.map +1 -1
- package/dist/models/page.js +4 -0
- package/dist/models/page.js.map +1 -1
- package/dist/models/page_group.d.ts +1 -0
- package/dist/models/page_group.d.ts.map +1 -1
- package/dist/models/page_group.js +1 -0
- package/dist/models/page_group.js.map +1 -1
- package/dist/models/table.d.ts +18 -4
- package/dist/models/table.d.ts.map +1 -1
- package/dist/models/table.js +84 -52
- package/dist/models/table.js.map +1 -1
- package/dist/models/tag_entry.d.ts.map +1 -1
- package/dist/models/tag_entry.js +9 -0
- package/dist/models/tag_entry.js.map +1 -1
- package/dist/models/trigger.d.ts +3 -3
- package/dist/models/trigger.d.ts.map +1 -1
- package/dist/models/trigger.js +69 -7
- package/dist/models/trigger.js.map +1 -1
- package/dist/models/user.d.ts.map +1 -1
- package/dist/models/user.js +5 -4
- package/dist/models/user.js.map +1 -1
- package/dist/models/view.d.ts +1 -0
- package/dist/models/view.d.ts.map +1 -1
- package/dist/models/view.js +6 -0
- package/dist/models/view.js.map +1 -1
- package/dist/plugin-helper.d.ts.map +1 -1
- package/dist/plugin-helper.js +56 -17
- package/dist/plugin-helper.js.map +1 -1
- package/dist/tests/actions.test.js +143 -2
- package/dist/tests/actions.test.js.map +1 -1
- package/dist/tests/auth.test.js +101 -1
- package/dist/tests/auth.test.js.map +1 -1
- package/dist/tests/calc.test.js +20 -0
- package/dist/tests/calc.test.js.map +1 -1
- package/dist/tests/edit.test.js +558 -0
- package/dist/tests/edit.test.js.map +1 -1
- package/dist/tests/filter.test.d.ts +2 -0
- package/dist/tests/filter.test.d.ts.map +1 -0
- package/dist/tests/filter.test.js +438 -0
- package/dist/tests/filter.test.js.map +1 -0
- package/dist/tests/list.test.d.ts +2 -0
- package/dist/tests/list.test.d.ts.map +1 -0
- package/dist/tests/list.test.js +903 -0
- package/dist/tests/list.test.js.map +1 -0
- package/dist/tests/show.test.d.ts +2 -0
- package/dist/tests/show.test.d.ts.map +1 -0
- package/dist/tests/show.test.js +325 -0
- package/dist/tests/show.test.js.map +1 -0
- package/dist/tests/table.test.js +213 -56
- package/dist/tests/table.test.js.map +1 -1
- package/dist/tests/table_history.test.js +51 -0
- package/dist/tests/table_history.test.js.map +1 -1
- package/dist/tests/tag.test.js +1 -1
- package/dist/tests/tag.test.js.map +1 -1
- package/dist/tests/view.test.js +15 -1
- package/dist/tests/view.test.js.map +1 -1
- package/dist/utils.d.ts +2 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +19 -0
- package/dist/utils.js.map +1 -1
- package/package.json +8 -8
|
@@ -880,6 +880,8 @@ export const viewtemplates: ({
|
|
|
880
880
|
optionsQuery: any;
|
|
881
881
|
getRowByIdQuery: any;
|
|
882
882
|
}, remote: any) => Promise<void>;
|
|
883
|
+
openDataStream: (tableId: any, viewName: any, id: any, fieldName: any, fieldView: any, user: any, configuration: any, targetOpts: any) => Promise<any>;
|
|
884
|
+
authorizeDataStream: (view: any, id: any, fieldName: any, user: any, targetOpts: any) => Promise<boolean>;
|
|
883
885
|
get_state_fields: (table_id: any, viewname: any, { columns }: {
|
|
884
886
|
columns: any;
|
|
885
887
|
}) => Promise<object[]>;
|
|
@@ -901,7 +903,7 @@ export const viewtemplates: ({
|
|
|
901
903
|
getStringsForI18n({ layout }: {
|
|
902
904
|
layout: Layout;
|
|
903
905
|
}): string[];
|
|
904
|
-
queries: ({ table_id, name, configuration: { columns, default_state, layout, auto_save, split_paste, destination_type, }, req, res, }: {
|
|
906
|
+
queries: ({ table_id, name, configuration: { columns, default_state, layout, auto_save, split_paste, destination_type, fixed, }, req, res, }: {
|
|
905
907
|
table_id: any;
|
|
906
908
|
name: any;
|
|
907
909
|
configuration: {
|
|
@@ -911,6 +913,7 @@ export const viewtemplates: ({
|
|
|
911
913
|
auto_save: any;
|
|
912
914
|
split_paste: any;
|
|
913
915
|
destination_type: any;
|
|
916
|
+
fixed: any;
|
|
914
917
|
};
|
|
915
918
|
req: any;
|
|
916
919
|
res: any;
|
|
@@ -999,141 +1002,62 @@ export const viewtemplates: ({
|
|
|
999
1002
|
name: string;
|
|
1000
1003
|
description: string;
|
|
1001
1004
|
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1002
|
-
run: (table_id: string, viewname: string, {
|
|
1003
|
-
|
|
1004
|
-
msg_relation: string;
|
|
1005
|
-
msgsender_field: any;
|
|
1006
|
-
msgview: string;
|
|
1007
|
-
msgform: string;
|
|
1008
|
-
participant_maxread_field: string;
|
|
1009
|
-
}, state: object, { req, res }: {
|
|
1010
|
-
req: object;
|
|
1011
|
-
res: object;
|
|
1012
|
-
}, { getRowQuery, updateQuery, optionsQuery }: {
|
|
1013
|
-
getRowQuery: any;
|
|
1014
|
-
updateQuery: any;
|
|
1015
|
-
optionsQuery: any;
|
|
1016
|
-
}) => Promise<div>;
|
|
1017
|
-
get_state_fields: () => object[];
|
|
1018
|
-
display_state_form: boolean;
|
|
1019
|
-
routes: {
|
|
1020
|
-
submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
|
|
1021
|
-
participant_field: string;
|
|
1022
|
-
msg_relation: string;
|
|
1023
|
-
msgsender_field: any;
|
|
1024
|
-
msgview: string;
|
|
1025
|
-
msgform: string;
|
|
1026
|
-
participant_maxread_field: string;
|
|
1027
|
-
}, body: any, { req, res }: {
|
|
1028
|
-
req: object;
|
|
1029
|
-
res: object;
|
|
1030
|
-
}, { submitAjaxQuery }: {
|
|
1031
|
-
submitAjaxQuery: any;
|
|
1032
|
-
}) => Promise<object>;
|
|
1033
|
-
ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
|
|
1034
|
-
participant_field: string;
|
|
1035
|
-
participant_maxread_field: string;
|
|
1036
|
-
}, body: any, { req, res }: {
|
|
1037
|
-
req: object;
|
|
1038
|
-
res: object;
|
|
1039
|
-
}, { ackReadQuery }: {
|
|
1040
|
-
ackReadQuery: any;
|
|
1041
|
-
}) => Promise<void>;
|
|
1042
|
-
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>;
|
|
1043
|
-
};
|
|
1044
|
-
noAutoTest: boolean;
|
|
1045
|
-
authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
|
|
1046
|
-
participant_field: object;
|
|
1047
|
-
}, room_id: string, user: object) => Promise<object>;
|
|
1048
|
-
virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
|
|
1049
|
-
participant_field: any;
|
|
1050
|
-
msg_relation: string;
|
|
1051
|
-
msgsender_field: string;
|
|
1052
|
-
msgview: string;
|
|
1053
|
-
msgform: any;
|
|
1054
|
-
participant_maxread_field: any;
|
|
1055
|
-
}) => object[];
|
|
1056
|
-
getStringsForI18n(): object[];
|
|
1057
|
-
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
1058
|
-
table_id: any;
|
|
1059
|
-
viewname: any;
|
|
1060
|
-
configuration: {
|
|
1061
|
-
columns: any;
|
|
1062
|
-
default_state: any;
|
|
1063
|
-
};
|
|
1064
|
-
req: any;
|
|
1065
|
-
}) => {
|
|
1066
|
-
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>;
|
|
1067
|
-
updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
|
|
1068
|
-
submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
|
|
1069
|
-
json: {
|
|
1070
|
-
msgid: {
|
|
1071
|
-
error: string;
|
|
1072
|
-
} | {
|
|
1073
|
-
success: any;
|
|
1074
|
-
};
|
|
1075
|
-
error?: undefined;
|
|
1076
|
-
};
|
|
1077
|
-
} | {
|
|
1078
|
-
json: {
|
|
1079
|
-
error: any;
|
|
1080
|
-
msgid?: undefined;
|
|
1081
|
-
};
|
|
1082
|
-
}>;
|
|
1083
|
-
ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
|
|
1084
|
-
json: {
|
|
1085
|
-
error: string;
|
|
1086
|
-
success?: undefined;
|
|
1087
|
-
};
|
|
1088
|
-
} | {
|
|
1089
|
-
json: {
|
|
1090
|
-
success: string;
|
|
1091
|
-
error?: undefined;
|
|
1092
|
-
};
|
|
1093
|
-
}>;
|
|
1094
|
-
fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1095
|
-
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
|
|
1096
|
-
};
|
|
1097
|
-
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1098
|
-
} | {
|
|
1099
|
-
name: string;
|
|
1100
|
-
description: string;
|
|
1101
|
-
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1102
|
-
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 }: {
|
|
1103
|
-
show_view: string;
|
|
1104
|
-
order_field: void;
|
|
1105
|
-
descending: boolean;
|
|
1005
|
+
run: (table_id: string | number, viewname: string, { columns, layout, view_to_create, create_view_display, create_view_label, default_state, create_view_location, create_link_style, create_link_size, create_view_showif, }: {
|
|
1006
|
+
columns: object[];
|
|
1106
1007
|
view_to_create?: string | undefined;
|
|
1107
1008
|
create_view_display: string;
|
|
1108
|
-
in_card: boolean;
|
|
1109
|
-
masonry_columns: string;
|
|
1110
|
-
rows_per_page?: number | undefined;
|
|
1111
|
-
hide_pagination: boolean;
|
|
1112
1009
|
create_view_label?: string | undefined;
|
|
1010
|
+
default_state?: object | undefined;
|
|
1113
1011
|
create_view_location?: string | undefined;
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1012
|
+
}, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
|
|
1013
|
+
listQuery: any;
|
|
1014
|
+
}) => Promise<any>;
|
|
1015
|
+
view_quantity: string;
|
|
1016
|
+
get_state_fields: (table_id: string, viewname: any, { columns }: {
|
|
1017
|
+
columns: object[];
|
|
1018
|
+
}) => Function;
|
|
1019
|
+
initial_config: Function;
|
|
1020
|
+
on_delete: (table_id: any, viewname: string, { default_state }: {
|
|
1021
|
+
default_state: any;
|
|
1022
|
+
}) => Promise<void>;
|
|
1023
|
+
routes: {
|
|
1024
|
+
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
1025
|
+
columns: object[];
|
|
1026
|
+
layout: any;
|
|
1027
|
+
}, body: object, { req, res }: {
|
|
1028
|
+
req: object;
|
|
1029
|
+
res: any;
|
|
1030
|
+
}, { getRowQuery }: {
|
|
1031
|
+
getRowQuery: any;
|
|
1032
|
+
}) => Promise<object>;
|
|
1033
|
+
};
|
|
1034
|
+
display_state_form: (opts: object) => boolean;
|
|
1035
|
+
default_state_form: ({ default_state }: object) => boolean;
|
|
1036
|
+
getStringsForI18n({ columns, create_view_label }: {
|
|
1037
|
+
columns: any;
|
|
1124
1038
|
create_view_label: any;
|
|
1125
|
-
}): string[]
|
|
1126
|
-
queries: ({ table_id,
|
|
1039
|
+
}): string[];
|
|
1040
|
+
queries: ({ table_id, exttable_name, name, configuration: { columns, layout, default_state }, req, }: {
|
|
1127
1041
|
table_id: any;
|
|
1128
|
-
|
|
1042
|
+
exttable_name: any;
|
|
1043
|
+
name: any;
|
|
1129
1044
|
configuration: {
|
|
1130
1045
|
columns: any;
|
|
1046
|
+
layout: any;
|
|
1131
1047
|
default_state: any;
|
|
1132
1048
|
};
|
|
1133
1049
|
req: any;
|
|
1134
1050
|
}) => {
|
|
1135
|
-
|
|
1051
|
+
listQuery(state: any, stateHash: any): Promise<{
|
|
1052
|
+
rows: import("@saltcorn/db-common/internal").Row[];
|
|
1053
|
+
rowCount: number;
|
|
1054
|
+
}>;
|
|
1055
|
+
getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1136
1056
|
};
|
|
1057
|
+
configCheck: (view: any) => Promise<{
|
|
1058
|
+
errors: string[];
|
|
1059
|
+
warnings: string[];
|
|
1060
|
+
}>;
|
|
1137
1061
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1138
1062
|
} | {
|
|
1139
1063
|
name: string;
|
|
@@ -1210,66 +1134,6 @@ export const viewtemplates: ({
|
|
|
1210
1134
|
warnings: string[];
|
|
1211
1135
|
}>;
|
|
1212
1136
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1213
|
-
} | {
|
|
1214
|
-
name: string;
|
|
1215
|
-
description: string;
|
|
1216
|
-
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1217
|
-
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, }: {
|
|
1218
|
-
columns: object[];
|
|
1219
|
-
view_to_create?: string | undefined;
|
|
1220
|
-
create_view_display: string;
|
|
1221
|
-
create_view_label?: string | undefined;
|
|
1222
|
-
default_state?: object | undefined;
|
|
1223
|
-
create_view_location?: string | undefined;
|
|
1224
|
-
}, stateWithId?: object | undefined, extraOpts: object, { listQuery }: {
|
|
1225
|
-
listQuery: any;
|
|
1226
|
-
}) => Promise<any>;
|
|
1227
|
-
view_quantity: string;
|
|
1228
|
-
get_state_fields: (table_id: string, viewname: any, { columns }: {
|
|
1229
|
-
columns: object[];
|
|
1230
|
-
}) => Function;
|
|
1231
|
-
initial_config: Function;
|
|
1232
|
-
on_delete: (table_id: any, viewname: string, { default_state }: {
|
|
1233
|
-
default_state: any;
|
|
1234
|
-
}) => Promise<void>;
|
|
1235
|
-
routes: {
|
|
1236
|
-
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
1237
|
-
columns: object[];
|
|
1238
|
-
layout: any;
|
|
1239
|
-
}, body: object, { req, res }: {
|
|
1240
|
-
req: object;
|
|
1241
|
-
res: any;
|
|
1242
|
-
}, { getRowQuery }: {
|
|
1243
|
-
getRowQuery: any;
|
|
1244
|
-
}) => Promise<object>;
|
|
1245
|
-
};
|
|
1246
|
-
display_state_form: (opts: object) => boolean;
|
|
1247
|
-
default_state_form: ({ default_state }: object) => boolean;
|
|
1248
|
-
getStringsForI18n({ columns, create_view_label }: {
|
|
1249
|
-
columns: any;
|
|
1250
|
-
create_view_label: any;
|
|
1251
|
-
}): string[];
|
|
1252
|
-
queries: ({ table_id, exttable_name, name, configuration: { columns, default_state }, req, }: {
|
|
1253
|
-
table_id: any;
|
|
1254
|
-
exttable_name: any;
|
|
1255
|
-
name: any;
|
|
1256
|
-
configuration: {
|
|
1257
|
-
columns: any;
|
|
1258
|
-
default_state: any;
|
|
1259
|
-
};
|
|
1260
|
-
req: any;
|
|
1261
|
-
}) => {
|
|
1262
|
-
listQuery(state: any, stateHash: any): Promise<{
|
|
1263
|
-
rows: import("@saltcorn/db-common/internal").Row[];
|
|
1264
|
-
rowCount: number;
|
|
1265
|
-
}>;
|
|
1266
|
-
getRowQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1267
|
-
};
|
|
1268
|
-
configCheck: (view: any) => Promise<{
|
|
1269
|
-
errors: string[];
|
|
1270
|
-
warnings: string[];
|
|
1271
|
-
}>;
|
|
1272
|
-
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1273
1137
|
} | {
|
|
1274
1138
|
name: string;
|
|
1275
1139
|
description: string;
|
|
@@ -1306,6 +1170,146 @@ export const viewtemplates: ({
|
|
|
1306
1170
|
}) => Promise<{
|
|
1307
1171
|
embeddedViews: import("../models/view")[];
|
|
1308
1172
|
}>;
|
|
1173
|
+
} | {
|
|
1174
|
+
name: string;
|
|
1175
|
+
description: string;
|
|
1176
|
+
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1177
|
+
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 }: {
|
|
1178
|
+
show_view: string;
|
|
1179
|
+
order_field: void;
|
|
1180
|
+
descending: boolean;
|
|
1181
|
+
view_to_create?: string | undefined;
|
|
1182
|
+
create_view_display: string;
|
|
1183
|
+
in_card: boolean;
|
|
1184
|
+
masonry_columns: string;
|
|
1185
|
+
rows_per_page?: number | undefined;
|
|
1186
|
+
hide_pagination: boolean;
|
|
1187
|
+
create_view_label?: string | undefined;
|
|
1188
|
+
create_view_location?: string | undefined;
|
|
1189
|
+
always_create_view: boolean;
|
|
1190
|
+
cols: any;
|
|
1191
|
+
}, state: object, extraArgs: any, { countRowsQuery }: {
|
|
1192
|
+
countRowsQuery: any;
|
|
1193
|
+
}) => Promise<div>;
|
|
1194
|
+
get_state_fields: (table_id: number, viewname: any, { show_view }: {
|
|
1195
|
+
show_view: any;
|
|
1196
|
+
}) => Promise<import("../models/field")>;
|
|
1197
|
+
display_state_form: boolean;
|
|
1198
|
+
getStringsForI18n({ create_view_label }: {
|
|
1199
|
+
create_view_label: any;
|
|
1200
|
+
}): string[] | Object[];
|
|
1201
|
+
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
1202
|
+
table_id: any;
|
|
1203
|
+
viewname: any;
|
|
1204
|
+
configuration: {
|
|
1205
|
+
columns: any;
|
|
1206
|
+
default_state: any;
|
|
1207
|
+
};
|
|
1208
|
+
req: any;
|
|
1209
|
+
}) => {
|
|
1210
|
+
countRowsQuery(state: any): Promise<number>;
|
|
1211
|
+
};
|
|
1212
|
+
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1213
|
+
} | {
|
|
1214
|
+
name: string;
|
|
1215
|
+
description: string;
|
|
1216
|
+
configuration_workflow: (req: object) => import("../models/workflow");
|
|
1217
|
+
run: (table_id: string, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
|
|
1218
|
+
participant_field: string;
|
|
1219
|
+
msg_relation: string;
|
|
1220
|
+
msgsender_field: any;
|
|
1221
|
+
msgview: string;
|
|
1222
|
+
msgform: string;
|
|
1223
|
+
participant_maxread_field: string;
|
|
1224
|
+
}, state: object, { req, res }: {
|
|
1225
|
+
req: object;
|
|
1226
|
+
res: object;
|
|
1227
|
+
}, { getRowQuery, updateQuery, optionsQuery }: {
|
|
1228
|
+
getRowQuery: any;
|
|
1229
|
+
updateQuery: any;
|
|
1230
|
+
optionsQuery: any;
|
|
1231
|
+
}) => Promise<div>;
|
|
1232
|
+
get_state_fields: () => object[];
|
|
1233
|
+
display_state_form: boolean;
|
|
1234
|
+
routes: {
|
|
1235
|
+
submit_msg_ajax: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
|
|
1236
|
+
participant_field: string;
|
|
1237
|
+
msg_relation: string;
|
|
1238
|
+
msgsender_field: any;
|
|
1239
|
+
msgview: string;
|
|
1240
|
+
msgform: string;
|
|
1241
|
+
participant_maxread_field: string;
|
|
1242
|
+
}, body: any, { req, res }: {
|
|
1243
|
+
req: object;
|
|
1244
|
+
res: object;
|
|
1245
|
+
}, { submitAjaxQuery }: {
|
|
1246
|
+
submitAjaxQuery: any;
|
|
1247
|
+
}) => Promise<object>;
|
|
1248
|
+
ack_read: (table_id: any, viewname: any, { participant_field, participant_maxread_field }: {
|
|
1249
|
+
participant_field: string;
|
|
1250
|
+
participant_maxread_field: string;
|
|
1251
|
+
}, body: any, { req, res }: {
|
|
1252
|
+
req: object;
|
|
1253
|
+
res: object;
|
|
1254
|
+
}, { ackReadQuery }: {
|
|
1255
|
+
ackReadQuery: any;
|
|
1256
|
+
}) => Promise<void>;
|
|
1257
|
+
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>;
|
|
1258
|
+
};
|
|
1259
|
+
noAutoTest: boolean;
|
|
1260
|
+
authorize_join: ({ table_id, min_role, configuration: { participant_field } }: {
|
|
1261
|
+
participant_field: object;
|
|
1262
|
+
}, room_id: string, user: object) => Promise<object>;
|
|
1263
|
+
virtual_triggers: (table_id: any, viewname: string, { participant_field, msg_relation, msgsender_field, msgview, msgform, participant_maxread_field, }: {
|
|
1264
|
+
participant_field: any;
|
|
1265
|
+
msg_relation: string;
|
|
1266
|
+
msgsender_field: string;
|
|
1267
|
+
msgview: string;
|
|
1268
|
+
msgform: any;
|
|
1269
|
+
participant_maxread_field: any;
|
|
1270
|
+
}) => object[];
|
|
1271
|
+
getStringsForI18n(): object[];
|
|
1272
|
+
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
1273
|
+
table_id: any;
|
|
1274
|
+
viewname: any;
|
|
1275
|
+
configuration: {
|
|
1276
|
+
columns: any;
|
|
1277
|
+
default_state: any;
|
|
1278
|
+
};
|
|
1279
|
+
req: any;
|
|
1280
|
+
}) => {
|
|
1281
|
+
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>;
|
|
1282
|
+
updateQuery(partRow: any, part_table_name: any, max_read_id: any, part_maxread_field: any): Promise<void>;
|
|
1283
|
+
submitAjaxQuery(msg_relation: any, participant_field: any, body: any, msgform: any, msgsender_field: any, participant_maxread_field: any): Promise<{
|
|
1284
|
+
json: {
|
|
1285
|
+
msgid: {
|
|
1286
|
+
error: string;
|
|
1287
|
+
} | {
|
|
1288
|
+
success: any;
|
|
1289
|
+
};
|
|
1290
|
+
error?: undefined;
|
|
1291
|
+
};
|
|
1292
|
+
} | {
|
|
1293
|
+
json: {
|
|
1294
|
+
error: any;
|
|
1295
|
+
msgid?: undefined;
|
|
1296
|
+
};
|
|
1297
|
+
}>;
|
|
1298
|
+
ackReadQuery(participant_field: any, participant_maxread_field: any, body: any): Promise<{
|
|
1299
|
+
json: {
|
|
1300
|
+
error: string;
|
|
1301
|
+
success?: undefined;
|
|
1302
|
+
};
|
|
1303
|
+
} | {
|
|
1304
|
+
json: {
|
|
1305
|
+
success: string;
|
|
1306
|
+
error?: undefined;
|
|
1307
|
+
};
|
|
1308
|
+
}>;
|
|
1309
|
+
fetchOlderMsgQuery(participant_field: any, body: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1310
|
+
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<any>;
|
|
1311
|
+
};
|
|
1312
|
+
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1309
1313
|
})[];
|
|
1310
1314
|
import fileviews = require("./fileviews");
|
|
1311
1315
|
import actions = require("./actions");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../base-plugin/index.js"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAsD;AACtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA2E;;;;4CAG9D,MAAM;yCAYN,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../base-plugin/types.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../base-plugin/types.js"],"names":[],"mappings":";gBAkfa,MAAM;oBAEN,MAAM;;IAQL,+CA6EX;IAMS;;gBAK+D;;;;;YAehE,6BAAyB;;;;;;;YAKzB,mCACiE;;;;;;;;YAKjE,mCAA+C;;;;;;;;;;;;;;YAc/C,4DAIJ;;;;;;;;;;;;;;;YAkBI,yDAGG;;;;;;;;YAUH,yDAAmE;;;;;;;;YAWnE,mCAA6B;;;;;;;;;;YAapB;;;;;;;;;;;;;;;;;;;;;iBAwCb;;YACI,6FAsFG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B;;;;kBApchB,MAAM;;sBAEN,MAAM;;;;IAOP,uCAAa;;wBACZ,MAAM,EAAE;;;;;;;;YAuBV,0DAOJ;;;;;;;;;YAWI,8CAKG;;;;;;;;;;;;;;;YAkBH,4DAWJ;;;;;;;;YAUI,iDAKJ;;;;;;;;YAWI,iDAGJ;;;;;;;;;;;YAaI,8FAkBD;;;;;;;;;;;YAaC,8FAkBD;;;;;;QASD,qBAAgB;;;IAOjB,yDAWL;;IAKS,sCAA2C;;;;kBAzV1C,MAAM;;sBAEN,MAAM;;;;IAUP;;;iBAAmD;;;;;;;;YAepD,uCAAc;;;;;;;;;;;;;;;;;YAkBd,8FAoBD;;;;;;;;;;;;;;;;;;;YAvmCH,qHAaD;;;;;;;;;wBAomCO,MAAM,EAAE;;IAWb,+DAYL;;IAMC,mEAKC;;;;kBAlMQ,MAAM;;sBAEN,MAAM;;;;IAOP,uCAAY;;;;;;;;YAeb,oCAMG;;;;;;;;;;;;YAYH,8FAWD;;;;;;wBAGG,MAAM,EAAE;;IAMb,0CAOL;;IAIS,sCAET;;;;;;;;;;;;;;;;;;;IA9pCI,0DAGJ"}
|
|
@@ -16,6 +16,7 @@ const { localeDate, localeDateTime } = require("@saltcorn/markup");
|
|
|
16
16
|
const { freeVariables, eval_expression } = require("../models/expression");
|
|
17
17
|
const Table = require("../models/table");
|
|
18
18
|
const _ = require("underscore");
|
|
19
|
+
const { interpolate } = require("../utils");
|
|
19
20
|
const isdef = (x) => (typeof x === "undefined" || x === null ? false : true);
|
|
20
21
|
const eqStr = (x, y) => `${x}` === `${y}`;
|
|
21
22
|
const number_slider = (type) => ({
|
|
@@ -215,11 +216,7 @@ const show_with_html = {
|
|
|
215
216
|
isEdit: false,
|
|
216
217
|
description: "Show value with any HTML code",
|
|
217
218
|
run: (v, req, attrs = {}) => {
|
|
218
|
-
const
|
|
219
|
-
evaluate: /\{\{#(.+?)\}\}/g,
|
|
220
|
-
interpolate: /\{\{([^#].+?)\}\}/g,
|
|
221
|
-
});
|
|
222
|
-
const rendered = template({ it: v, user: req?.user });
|
|
219
|
+
const rendered = interpolate(attrs?.code, { it: v }, req?.user);
|
|
223
220
|
return rendered;
|
|
224
221
|
},
|
|
225
222
|
};
|
|
@@ -653,12 +650,18 @@ const string = {
|
|
|
653
650
|
onChange: attrs.onChange,
|
|
654
651
|
onBlur: attrs.onChange,
|
|
655
652
|
autocomplete: "off",
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
option({ value: "" }, attrs.
|
|
653
|
+
required: attrs.placeholder && (required || attrs.force_required),
|
|
654
|
+
}, attrs.placeholder && (required || attrs.force_required)
|
|
655
|
+
? [
|
|
656
|
+
option({ value: "", disabled: true, selected: !v }, attrs.placeholder),
|
|
660
657
|
...getStrOptions(v, attrs.options),
|
|
661
|
-
]
|
|
658
|
+
]
|
|
659
|
+
: required || attrs.force_required
|
|
660
|
+
? getStrOptions(v, attrs.options)
|
|
661
|
+
: [
|
|
662
|
+
option({ value: "" }, attrs.neutral_label || ""),
|
|
663
|
+
...getStrOptions(v, attrs.options),
|
|
664
|
+
])
|
|
662
665
|
: attrs.options
|
|
663
666
|
? none_available(required)
|
|
664
667
|
: attrs.calcOptions
|
|
@@ -1058,6 +1061,11 @@ const int = {
|
|
|
1058
1061
|
label: "Read-only",
|
|
1059
1062
|
type: "Bool",
|
|
1060
1063
|
},
|
|
1064
|
+
{
|
|
1065
|
+
name: "autofocus",
|
|
1066
|
+
label: "Autofocus",
|
|
1067
|
+
type: "Bool",
|
|
1068
|
+
},
|
|
1061
1069
|
],
|
|
1062
1070
|
run: (nm, v, attrs, cls, required, field) => {
|
|
1063
1071
|
const id = `input${text_attr(nm)}`;
|
|
@@ -1072,6 +1080,7 @@ const int = {
|
|
|
1072
1080
|
class: ["form-control", cls],
|
|
1073
1081
|
disabled: attrs.disabled,
|
|
1074
1082
|
readonly: attrs.readonly,
|
|
1083
|
+
autofocus: attrs.autofocus,
|
|
1075
1084
|
"data-fieldname": text_attr(field.name),
|
|
1076
1085
|
name,
|
|
1077
1086
|
onChange: attrs.onChange,
|