@saltcorn/data 1.4.3 → 1.4.5
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/index.d.ts +243 -243
- package/dist/base-plugin/index.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/list.d.ts.map +1 -1
- package/dist/base-plugin/viewtemplates/list.js +13 -1
- package/dist/base-plugin/viewtemplates/list.js.map +1 -1
- package/dist/models/expression.d.ts.map +1 -1
- package/dist/models/expression.js +1 -1
- package/dist/models/expression.js.map +1 -1
- package/dist/models/metadata.d.ts +2 -1
- package/dist/models/metadata.d.ts.map +1 -1
- package/dist/models/metadata.js +5 -0
- package/dist/models/metadata.js.map +1 -1
- package/package.json +8 -8
- package/dist/migrations/202510110312.d.ts +0 -3
- package/dist/migrations/202510110312.d.ts.map +0 -1
- package/dist/migrations/202510110312.js +0 -37
- package/dist/migrations/202510110312.js.map +0 -1
- package/dist/migrations/202511081024.d.ts +0 -2
- package/dist/migrations/202511081024.d.ts.map +0 -1
- package/dist/migrations/202511081024.js +0 -4
- package/dist/migrations/202511081024.js.map +0 -1
- package/dist/mobile-mocks/models/internal/mail_queue.d.ts +0 -1
- package/dist/mobile-mocks/models/internal/mail_queue.d.ts.map +0 -1
- package/dist/mobile-mocks/models/internal/mail_queue.js +0 -2
- package/dist/mobile-mocks/models/internal/mail_queue.js.map +0 -1
- package/dist/mobile-mocks/npm/apns2.d.ts +0 -1
- package/dist/mobile-mocks/npm/apns2.d.ts.map +0 -1
- package/dist/mobile-mocks/npm/apns2.js +0 -2
- package/dist/mobile-mocks/npm/apns2.js.map +0 -1
- package/dist/mobile-mocks/npm/dockerode.d.ts +0 -1
- package/dist/mobile-mocks/npm/dockerode.d.ts.map +0 -1
- package/dist/mobile-mocks/npm/dockerode.js +0 -2
- package/dist/mobile-mocks/npm/dockerode.js.map +0 -1
- package/dist/mobile-mocks/npm/vm2.d.ts +0 -1
- package/dist/mobile-mocks/npm/vm2.d.ts.map +0 -1
- package/dist/mobile-mocks/npm/vm2.js +0 -2
- package/dist/mobile-mocks/npm/vm2.js.map +0 -1
- package/dist/mobile-mocks/npm/xml2js.d.ts +0 -1
- package/dist/mobile-mocks/npm/xml2js.d.ts.map +0 -1
- package/dist/mobile-mocks/npm/xml2js.js +0 -2
- package/dist/mobile-mocks/npm/xml2js.js.map +0 -1
- package/dist/models/internal/mail_queue.d.ts +0 -24
- package/dist/models/internal/mail_queue.d.ts.map +0 -1
- package/dist/models/internal/mail_queue.js +0 -172
- package/dist/models/internal/mail_queue.js.map +0 -1
- package/dist/models/internal/s3_helpers.d.ts +0 -54
- package/dist/models/internal/s3_helpers.d.ts.map +0 -1
- package/dist/models/internal/s3_helpers.js +0 -561
- package/dist/models/internal/s3_helpers.js.map +0 -1
- package/dist/viewable_fields.d.ts +0 -227
- package/dist/viewable_fields.d.ts.map +0 -1
- package/dist/viewable_fields.js +0 -1923
- package/dist/viewable_fields.js.map +0 -1
|
@@ -1028,6 +1028,31 @@ export const types: ({
|
|
|
1028
1028
|
validate: () => boolean;
|
|
1029
1029
|
})[];
|
|
1030
1030
|
export const viewtemplates: ({
|
|
1031
|
+
name: string;
|
|
1032
|
+
description: string;
|
|
1033
|
+
configuration_workflow: (req: object) => import("../models").Workflow;
|
|
1034
|
+
run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
|
|
1035
|
+
list_view: string;
|
|
1036
|
+
show_view: string;
|
|
1037
|
+
subtables: object;
|
|
1038
|
+
}, state: any, extraArgs: any, { getRowQuery }: {
|
|
1039
|
+
getRowQuery: any;
|
|
1040
|
+
}) => Promise<import("@saltcorn/markup/types").TagFunction>;
|
|
1041
|
+
get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
|
|
1042
|
+
list_view: string;
|
|
1043
|
+
show_view: any;
|
|
1044
|
+
}) => Promise<object[]>;
|
|
1045
|
+
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
1046
|
+
list_view: string;
|
|
1047
|
+
_omit_state_form: boolean;
|
|
1048
|
+
}) => boolean;
|
|
1049
|
+
connectedObjects: ({ list_view, subtables }: {
|
|
1050
|
+
list_view: any;
|
|
1051
|
+
subtables: any;
|
|
1052
|
+
}) => Promise<{
|
|
1053
|
+
embeddedViews: import("../models").View[];
|
|
1054
|
+
}>;
|
|
1055
|
+
} | {
|
|
1031
1056
|
name: string;
|
|
1032
1057
|
description: string;
|
|
1033
1058
|
configuration_workflow: (req: object) => import("../models").Workflow;
|
|
@@ -1094,183 +1119,6 @@ export const viewtemplates: ({
|
|
|
1094
1119
|
warnings: string[];
|
|
1095
1120
|
}>;
|
|
1096
1121
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1097
|
-
} | {
|
|
1098
|
-
name: string;
|
|
1099
|
-
description: string;
|
|
1100
|
-
configuration_workflow: (req: object) => import("../models").Workflow;
|
|
1101
|
-
run: (table_id: number, viewname: string, cfg: any, state: string, { res, req, isPreview, hiddenLoginDest }: {
|
|
1102
|
-
req: object;
|
|
1103
|
-
res: object;
|
|
1104
|
-
}, { editQuery }: {
|
|
1105
|
-
editQuery: any;
|
|
1106
|
-
}) => Promise<import("../models").Form>;
|
|
1107
|
-
runMany: (table_id: number, viewname: string, { columns, layout, auto_save, split_paste, confirm_leave, enable_realtime, update_events, }: {
|
|
1108
|
-
columns: any;
|
|
1109
|
-
layout: any;
|
|
1110
|
-
}, state: State, extra: object, { editManyQuery, getRowQuery, optionsQuery }: {
|
|
1111
|
-
editManyQuery: any;
|
|
1112
|
-
getRowQuery: any;
|
|
1113
|
-
optionsQuery: any;
|
|
1114
|
-
}) => Promise<import("../models").Form[]>;
|
|
1115
|
-
runPost: (table_id: number, viewname: string, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, dest_url_formula, page_when_done, page_group_when_done, }: {
|
|
1116
|
-
columns: object[];
|
|
1117
|
-
layout: Layout;
|
|
1118
|
-
fixed: object;
|
|
1119
|
-
view_when_done: boolean;
|
|
1120
|
-
formula_destinations: object[];
|
|
1121
|
-
}, state: object, body: any, { res, req, redirect }: {
|
|
1122
|
-
res: object;
|
|
1123
|
-
req: object;
|
|
1124
|
-
redirect: string;
|
|
1125
|
-
}, { tryInsertQuery, tryUpdateQuery, getRowQuery, saveFileQuery, saveFileFromContentsQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1126
|
-
tryInsertQuery: any;
|
|
1127
|
-
tryUpdateQuery: any;
|
|
1128
|
-
getRowQuery: any;
|
|
1129
|
-
saveFileQuery: any;
|
|
1130
|
-
saveFileFromContentsQuery: any;
|
|
1131
|
-
optionsQuery: any;
|
|
1132
|
-
getRowByIdQuery: any;
|
|
1133
|
-
}, remote: any) => Promise<void>;
|
|
1134
|
-
openDataStream: (tableId: any, viewName: any, id: any, fieldName: any, fieldView: any, user: any, configuration: any, targetOpts: any) => Promise<any>;
|
|
1135
|
-
authorizeDataStream: (view: any, id: any, fieldName: any, user: any, targetOpts: any) => Promise<boolean>;
|
|
1136
|
-
get_state_fields: (table_id: any, viewname: any, { columns }: {
|
|
1137
|
-
columns: any;
|
|
1138
|
-
}) => Promise<object[]>;
|
|
1139
|
-
initial_config: Function;
|
|
1140
|
-
createBasicView: ({ table, viewname, template_view, template_table, all_views_created, }: {
|
|
1141
|
-
table: any;
|
|
1142
|
-
viewname: any;
|
|
1143
|
-
template_view: any;
|
|
1144
|
-
template_table: any;
|
|
1145
|
-
all_views_created: any;
|
|
1146
|
-
}) => Promise<any>;
|
|
1147
|
-
authorise_post: ({ body, table_id, req }: {
|
|
1148
|
-
body: object;
|
|
1149
|
-
table_id: string;
|
|
1150
|
-
req: object;
|
|
1151
|
-
}, { authorizePostQuery }: {
|
|
1152
|
-
authorizePostQuery: any;
|
|
1153
|
-
}) => Promise<boolean>;
|
|
1154
|
-
virtual_triggers: (table_id: any, viewname: any, { enable_realtime, update_events }: {
|
|
1155
|
-
enable_realtime: any;
|
|
1156
|
-
update_events: any;
|
|
1157
|
-
}) => {
|
|
1158
|
-
when_trigger: string;
|
|
1159
|
-
table_id: any;
|
|
1160
|
-
run: (row: any, { old_row, user }: {
|
|
1161
|
-
old_row: any;
|
|
1162
|
-
user: any;
|
|
1163
|
-
}) => Promise<void>;
|
|
1164
|
-
}[];
|
|
1165
|
-
authorise_get: ({ query, table_id, req }: {
|
|
1166
|
-
query: object;
|
|
1167
|
-
rest: any[];
|
|
1168
|
-
}, { authorizeGetQuery }: {
|
|
1169
|
-
authorizeGetQuery: any;
|
|
1170
|
-
}) => Promise<boolean>;
|
|
1171
|
-
getStringsForI18n({ layout }: {
|
|
1172
|
-
layout: Layout;
|
|
1173
|
-
}): string[];
|
|
1174
|
-
queries: ({ table_id, name, configuration: { columns, default_state, layout, auto_save, split_paste, destination_type, fixed, confirm_leave, auto_create, delete_unchanged_auto_create, enable_realtime, update_events, }, req, res, }: {
|
|
1175
|
-
table_id: any;
|
|
1176
|
-
name: any;
|
|
1177
|
-
configuration: {
|
|
1178
|
-
columns: any;
|
|
1179
|
-
default_state: any;
|
|
1180
|
-
layout: any;
|
|
1181
|
-
auto_save: any;
|
|
1182
|
-
split_paste: any;
|
|
1183
|
-
destination_type: any;
|
|
1184
|
-
fixed: any;
|
|
1185
|
-
confirm_leave: any;
|
|
1186
|
-
auto_create: any;
|
|
1187
|
-
delete_unchanged_auto_create: any;
|
|
1188
|
-
enable_realtime: any;
|
|
1189
|
-
update_events: any;
|
|
1190
|
-
};
|
|
1191
|
-
req: any;
|
|
1192
|
-
res: any;
|
|
1193
|
-
}) => {
|
|
1194
|
-
editQuery(state: any, mobileReferrer: any, isPreview: any, hiddenLoginDest: any): Promise<import("../models").Form>;
|
|
1195
|
-
editManyQuery(state: any, { limit, offset, orderBy, orderDesc, where }: {
|
|
1196
|
-
limit: any;
|
|
1197
|
-
offset: any;
|
|
1198
|
-
orderBy: any;
|
|
1199
|
-
orderDesc: any;
|
|
1200
|
-
where: any;
|
|
1201
|
-
}): Promise<{
|
|
1202
|
-
table: import("../models").Table | null;
|
|
1203
|
-
fields: import("../models").Field[];
|
|
1204
|
-
rows: import("@saltcorn/db-common/internal").Row[];
|
|
1205
|
-
}>;
|
|
1206
|
-
tryInsertQuery(row: any): Promise<{
|
|
1207
|
-
error: string;
|
|
1208
|
-
} | {
|
|
1209
|
-
success: import("@saltcorn/db-common/internal").PrimaryKeyValue;
|
|
1210
|
-
}>;
|
|
1211
|
-
tryUpdateQuery(row: any, id: any): Promise<any>;
|
|
1212
|
-
saveFileQuery(fieldVal: any, fieldId: any, fieldView: any, row: any): Promise<string | number>;
|
|
1213
|
-
saveFileFromContentsQuery(fieldVal: any, fieldId: any, fieldView: any, row: any, filename: any, encoding?: string): Promise<string | number>;
|
|
1214
|
-
authorizePostQuery(body: any, table_id: any): Promise<boolean | "" | null>;
|
|
1215
|
-
authorizeGetQuery(query: any, table_id: any): Promise<string | number | boolean | null | undefined>;
|
|
1216
|
-
getRowQuery(table_id: any, view_select: any, row_id: any, order_field: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1217
|
-
getRowByIdQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1218
|
-
actionQuery(): Promise<any>;
|
|
1219
|
-
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1220
|
-
updateMatchingQuery(where: any, updateVals: any, repeatFields: any, childRows: any): Promise<any[] | {
|
|
1221
|
-
rowError: any;
|
|
1222
|
-
inEditError?: undefined;
|
|
1223
|
-
error?: undefined;
|
|
1224
|
-
} | {
|
|
1225
|
-
inEditError: any;
|
|
1226
|
-
rowError?: undefined;
|
|
1227
|
-
error?: undefined;
|
|
1228
|
-
} | {
|
|
1229
|
-
error: any;
|
|
1230
|
-
rowError?: undefined;
|
|
1231
|
-
inEditError?: undefined;
|
|
1232
|
-
}>;
|
|
1233
|
-
};
|
|
1234
|
-
routes: {
|
|
1235
|
-
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
1236
|
-
columns: object[];
|
|
1237
|
-
layout: any;
|
|
1238
|
-
}, body: any, { req, res }: {
|
|
1239
|
-
req: object;
|
|
1240
|
-
res: any;
|
|
1241
|
-
}, { actionQuery }: {
|
|
1242
|
-
actionQuery: any;
|
|
1243
|
-
}) => Promise<object>;
|
|
1244
|
-
update_matching_rows: (table_id: any, viewname: any, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, dest_url_formula, page_when_done, page_group_when_done, }: {
|
|
1245
|
-
columns: any;
|
|
1246
|
-
layout: any;
|
|
1247
|
-
fixed: any;
|
|
1248
|
-
view_when_done: any;
|
|
1249
|
-
formula_destinations: any;
|
|
1250
|
-
auto_save: any;
|
|
1251
|
-
destination_type: any;
|
|
1252
|
-
dest_url_formula: any;
|
|
1253
|
-
page_when_done: any;
|
|
1254
|
-
page_group_when_done: any;
|
|
1255
|
-
}, body: any, { req, res, redirect }: {
|
|
1256
|
-
req: any;
|
|
1257
|
-
res: any;
|
|
1258
|
-
redirect: any;
|
|
1259
|
-
}, { updateMatchingQuery, getRowQuery, saveFileQuery, saveFileFromContentsQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1260
|
-
updateMatchingQuery: any;
|
|
1261
|
-
getRowQuery: any;
|
|
1262
|
-
saveFileQuery: any;
|
|
1263
|
-
saveFileFromContentsQuery: any;
|
|
1264
|
-
optionsQuery: any;
|
|
1265
|
-
getRowByIdQuery: any;
|
|
1266
|
-
}) => Promise<void>;
|
|
1267
|
-
};
|
|
1268
|
-
interpolate_title_string(table_id: any, title: any, state: any): Promise<string>;
|
|
1269
|
-
configCheck: (view: any) => Promise<{
|
|
1270
|
-
errors: string[];
|
|
1271
|
-
warnings: string[];
|
|
1272
|
-
}>;
|
|
1273
|
-
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1274
1122
|
} | {
|
|
1275
1123
|
name: string;
|
|
1276
1124
|
description: string;
|
|
@@ -1350,31 +1198,6 @@ export const viewtemplates: ({
|
|
|
1350
1198
|
warnings: string[];
|
|
1351
1199
|
}>;
|
|
1352
1200
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1353
|
-
} | {
|
|
1354
|
-
name: string;
|
|
1355
|
-
description: string;
|
|
1356
|
-
configuration_workflow: (req: object) => import("../models").Workflow;
|
|
1357
|
-
run: (table_id: string, viewname: string, { list_view, show_view, list_width, subtables }: {
|
|
1358
|
-
list_view: string;
|
|
1359
|
-
show_view: string;
|
|
1360
|
-
subtables: object;
|
|
1361
|
-
}, state: any, extraArgs: any, { getRowQuery }: {
|
|
1362
|
-
getRowQuery: any;
|
|
1363
|
-
}) => Promise<import("@saltcorn/markup/types").TagFunction>;
|
|
1364
|
-
get_state_fields: (table_id: any, viewname: any, { list_view, show_view }: {
|
|
1365
|
-
list_view: string;
|
|
1366
|
-
show_view: any;
|
|
1367
|
-
}) => Promise<object[]>;
|
|
1368
|
-
queries: ({ table_id, viewname, configuration: { columns, default_state }, req, }: {
|
|
1369
|
-
list_view: string;
|
|
1370
|
-
_omit_state_form: boolean;
|
|
1371
|
-
}) => boolean;
|
|
1372
|
-
connectedObjects: ({ list_view, subtables }: {
|
|
1373
|
-
list_view: any;
|
|
1374
|
-
subtables: any;
|
|
1375
|
-
}) => Promise<{
|
|
1376
|
-
embeddedViews: import("../models").View[];
|
|
1377
|
-
}>;
|
|
1378
1201
|
} | {
|
|
1379
1202
|
name: string;
|
|
1380
1203
|
description: string;
|
|
@@ -1419,47 +1242,6 @@ export const viewtemplates: ({
|
|
|
1419
1242
|
}[]>;
|
|
1420
1243
|
};
|
|
1421
1244
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1422
|
-
} | {
|
|
1423
|
-
name: string;
|
|
1424
|
-
description: string;
|
|
1425
|
-
get_state_fields: () => object[];
|
|
1426
|
-
configuration_workflow: (req: any) => import("../models").Workflow;
|
|
1427
|
-
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
1428
|
-
columns: object[];
|
|
1429
|
-
layout: object;
|
|
1430
|
-
}, state: object, extra: object, { distinctValuesQuery, optionsQuery }: {
|
|
1431
|
-
distinctValuesQuery: any;
|
|
1432
|
-
optionsQuery: any;
|
|
1433
|
-
}) => Promise<Layout>;
|
|
1434
|
-
initial_config: () => Promise<object>;
|
|
1435
|
-
getStringsForI18n({ layout }: {
|
|
1436
|
-
layout: any;
|
|
1437
|
-
}): string[];
|
|
1438
|
-
routes: {
|
|
1439
|
-
run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
|
|
1440
|
-
req: any;
|
|
1441
|
-
res: any;
|
|
1442
|
-
}, { actionQuery }: {
|
|
1443
|
-
actionQuery: any;
|
|
1444
|
-
}) => Promise<any>;
|
|
1445
|
-
};
|
|
1446
|
-
queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
|
|
1447
|
-
table_id: any;
|
|
1448
|
-
viewname: any;
|
|
1449
|
-
configuration: {
|
|
1450
|
-
columns: any;
|
|
1451
|
-
};
|
|
1452
|
-
req: any;
|
|
1453
|
-
res: any;
|
|
1454
|
-
exttable_name: any;
|
|
1455
|
-
}) => {
|
|
1456
|
-
optionsQuery(reftable_name: any, type: any, attributes: any, whereWithExisting: any, user: any): Promise<any>;
|
|
1457
|
-
actionQuery(state: any, rndid: any): Promise<any>;
|
|
1458
|
-
distinctValuesQuery(state: any): Promise<{
|
|
1459
|
-
distinct_values: {};
|
|
1460
|
-
role: any;
|
|
1461
|
-
}>;
|
|
1462
|
-
};
|
|
1463
1245
|
} | {
|
|
1464
1246
|
name: string;
|
|
1465
1247
|
description: string;
|
|
@@ -1581,6 +1363,224 @@ export const viewtemplates: ({
|
|
|
1581
1363
|
req: any;
|
|
1582
1364
|
}) => {};
|
|
1583
1365
|
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1366
|
+
} | {
|
|
1367
|
+
name: string;
|
|
1368
|
+
description: string;
|
|
1369
|
+
configuration_workflow: (req: object) => import("../models").Workflow;
|
|
1370
|
+
run: (table_id: number, viewname: string, cfg: any, state: string, { res, req, isPreview, hiddenLoginDest }: {
|
|
1371
|
+
req: object;
|
|
1372
|
+
res: object;
|
|
1373
|
+
}, { editQuery }: {
|
|
1374
|
+
editQuery: any;
|
|
1375
|
+
}) => Promise<import("../models").Form>;
|
|
1376
|
+
runMany: (table_id: number, viewname: string, { columns, layout, auto_save, split_paste, confirm_leave, enable_realtime, update_events, }: {
|
|
1377
|
+
columns: any;
|
|
1378
|
+
layout: any;
|
|
1379
|
+
}, state: State, extra: object, { editManyQuery, getRowQuery, optionsQuery }: {
|
|
1380
|
+
editManyQuery: any;
|
|
1381
|
+
getRowQuery: any;
|
|
1382
|
+
optionsQuery: any;
|
|
1383
|
+
}) => Promise<import("../models").Form[]>;
|
|
1384
|
+
runPost: (table_id: number, viewname: string, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, dest_url_formula, page_when_done, page_group_when_done, }: {
|
|
1385
|
+
columns: object[];
|
|
1386
|
+
layout: Layout;
|
|
1387
|
+
fixed: object;
|
|
1388
|
+
view_when_done: boolean;
|
|
1389
|
+
formula_destinations: object[];
|
|
1390
|
+
}, state: object, body: any, { res, req, redirect }: {
|
|
1391
|
+
res: object;
|
|
1392
|
+
req: object;
|
|
1393
|
+
redirect: string;
|
|
1394
|
+
}, { tryInsertQuery, tryUpdateQuery, getRowQuery, saveFileQuery, saveFileFromContentsQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1395
|
+
tryInsertQuery: any;
|
|
1396
|
+
tryUpdateQuery: any;
|
|
1397
|
+
getRowQuery: any;
|
|
1398
|
+
saveFileQuery: any;
|
|
1399
|
+
saveFileFromContentsQuery: any;
|
|
1400
|
+
optionsQuery: any;
|
|
1401
|
+
getRowByIdQuery: any;
|
|
1402
|
+
}, remote: any) => Promise<void>;
|
|
1403
|
+
openDataStream: (tableId: any, viewName: any, id: any, fieldName: any, fieldView: any, user: any, configuration: any, targetOpts: any) => Promise<any>;
|
|
1404
|
+
authorizeDataStream: (view: any, id: any, fieldName: any, user: any, targetOpts: any) => Promise<boolean>;
|
|
1405
|
+
get_state_fields: (table_id: any, viewname: any, { columns }: {
|
|
1406
|
+
columns: any;
|
|
1407
|
+
}) => Promise<object[]>;
|
|
1408
|
+
initial_config: Function;
|
|
1409
|
+
createBasicView: ({ table, viewname, template_view, template_table, all_views_created, }: {
|
|
1410
|
+
table: any;
|
|
1411
|
+
viewname: any;
|
|
1412
|
+
template_view: any;
|
|
1413
|
+
template_table: any;
|
|
1414
|
+
all_views_created: any;
|
|
1415
|
+
}) => Promise<any>;
|
|
1416
|
+
authorise_post: ({ body, table_id, req }: {
|
|
1417
|
+
body: object;
|
|
1418
|
+
table_id: string;
|
|
1419
|
+
req: object;
|
|
1420
|
+
}, { authorizePostQuery }: {
|
|
1421
|
+
authorizePostQuery: any;
|
|
1422
|
+
}) => Promise<boolean>;
|
|
1423
|
+
virtual_triggers: (table_id: any, viewname: any, { enable_realtime, update_events }: {
|
|
1424
|
+
enable_realtime: any;
|
|
1425
|
+
update_events: any;
|
|
1426
|
+
}) => {
|
|
1427
|
+
when_trigger: string;
|
|
1428
|
+
table_id: any;
|
|
1429
|
+
run: (row: any, { old_row, user }: {
|
|
1430
|
+
old_row: any;
|
|
1431
|
+
user: any;
|
|
1432
|
+
}) => Promise<void>;
|
|
1433
|
+
}[];
|
|
1434
|
+
authorise_get: ({ query, table_id, req }: {
|
|
1435
|
+
query: object;
|
|
1436
|
+
rest: any[];
|
|
1437
|
+
}, { authorizeGetQuery }: {
|
|
1438
|
+
authorizeGetQuery: any;
|
|
1439
|
+
}) => Promise<boolean>;
|
|
1440
|
+
getStringsForI18n({ layout }: {
|
|
1441
|
+
layout: Layout;
|
|
1442
|
+
}): string[];
|
|
1443
|
+
queries: ({ table_id, name, configuration: { columns, default_state, layout, auto_save, split_paste, destination_type, fixed, confirm_leave, auto_create, delete_unchanged_auto_create, enable_realtime, update_events, }, req, res, }: {
|
|
1444
|
+
table_id: any;
|
|
1445
|
+
name: any;
|
|
1446
|
+
configuration: {
|
|
1447
|
+
columns: any;
|
|
1448
|
+
default_state: any;
|
|
1449
|
+
layout: any;
|
|
1450
|
+
auto_save: any;
|
|
1451
|
+
split_paste: any;
|
|
1452
|
+
destination_type: any;
|
|
1453
|
+
fixed: any;
|
|
1454
|
+
confirm_leave: any;
|
|
1455
|
+
auto_create: any;
|
|
1456
|
+
delete_unchanged_auto_create: any;
|
|
1457
|
+
enable_realtime: any;
|
|
1458
|
+
update_events: any;
|
|
1459
|
+
};
|
|
1460
|
+
req: any;
|
|
1461
|
+
res: any;
|
|
1462
|
+
}) => {
|
|
1463
|
+
editQuery(state: any, mobileReferrer: any, isPreview: any, hiddenLoginDest: any): Promise<import("../models").Form>;
|
|
1464
|
+
editManyQuery(state: any, { limit, offset, orderBy, orderDesc, where }: {
|
|
1465
|
+
limit: any;
|
|
1466
|
+
offset: any;
|
|
1467
|
+
orderBy: any;
|
|
1468
|
+
orderDesc: any;
|
|
1469
|
+
where: any;
|
|
1470
|
+
}): Promise<{
|
|
1471
|
+
table: import("../models").Table | null;
|
|
1472
|
+
fields: import("../models").Field[];
|
|
1473
|
+
rows: import("@saltcorn/db-common/internal").Row[];
|
|
1474
|
+
}>;
|
|
1475
|
+
tryInsertQuery(row: any): Promise<{
|
|
1476
|
+
error: string;
|
|
1477
|
+
} | {
|
|
1478
|
+
success: import("@saltcorn/db-common/internal").PrimaryKeyValue;
|
|
1479
|
+
}>;
|
|
1480
|
+
tryUpdateQuery(row: any, id: any): Promise<any>;
|
|
1481
|
+
saveFileQuery(fieldVal: any, fieldId: any, fieldView: any, row: any): Promise<string | number>;
|
|
1482
|
+
saveFileFromContentsQuery(fieldVal: any, fieldId: any, fieldView: any, row: any, filename: any, encoding?: string): Promise<string | number>;
|
|
1483
|
+
authorizePostQuery(body: any, table_id: any): Promise<boolean | "" | null>;
|
|
1484
|
+
authorizeGetQuery(query: any, table_id: any): Promise<string | number | boolean | null | undefined>;
|
|
1485
|
+
getRowQuery(table_id: any, view_select: any, row_id: any, order_field: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1486
|
+
getRowByIdQuery(id: any): Promise<import("@saltcorn/db-common/internal").Row | null>;
|
|
1487
|
+
actionQuery(): Promise<any>;
|
|
1488
|
+
optionsQuery(reftable_name: any, type: any, attributes: any, where: any): Promise<import("@saltcorn/db-common/internal").Row[]>;
|
|
1489
|
+
updateMatchingQuery(where: any, updateVals: any, repeatFields: any, childRows: any): Promise<any[] | {
|
|
1490
|
+
rowError: any;
|
|
1491
|
+
inEditError?: undefined;
|
|
1492
|
+
error?: undefined;
|
|
1493
|
+
} | {
|
|
1494
|
+
inEditError: any;
|
|
1495
|
+
rowError?: undefined;
|
|
1496
|
+
error?: undefined;
|
|
1497
|
+
} | {
|
|
1498
|
+
error: any;
|
|
1499
|
+
rowError?: undefined;
|
|
1500
|
+
inEditError?: undefined;
|
|
1501
|
+
}>;
|
|
1502
|
+
};
|
|
1503
|
+
routes: {
|
|
1504
|
+
run_action: (table_id: number, viewname: any, { columns, layout }: {
|
|
1505
|
+
columns: object[];
|
|
1506
|
+
layout: any;
|
|
1507
|
+
}, body: any, { req, res }: {
|
|
1508
|
+
req: object;
|
|
1509
|
+
res: any;
|
|
1510
|
+
}, { actionQuery }: {
|
|
1511
|
+
actionQuery: any;
|
|
1512
|
+
}) => Promise<object>;
|
|
1513
|
+
update_matching_rows: (table_id: any, viewname: any, { columns, layout, fixed, view_when_done, formula_destinations, auto_save, destination_type, dest_url_formula, page_when_done, page_group_when_done, }: {
|
|
1514
|
+
columns: any;
|
|
1515
|
+
layout: any;
|
|
1516
|
+
fixed: any;
|
|
1517
|
+
view_when_done: any;
|
|
1518
|
+
formula_destinations: any;
|
|
1519
|
+
auto_save: any;
|
|
1520
|
+
destination_type: any;
|
|
1521
|
+
dest_url_formula: any;
|
|
1522
|
+
page_when_done: any;
|
|
1523
|
+
page_group_when_done: any;
|
|
1524
|
+
}, body: any, { req, res, redirect }: {
|
|
1525
|
+
req: any;
|
|
1526
|
+
res: any;
|
|
1527
|
+
redirect: any;
|
|
1528
|
+
}, { updateMatchingQuery, getRowQuery, saveFileQuery, saveFileFromContentsQuery, optionsQuery, getRowByIdQuery, }: {
|
|
1529
|
+
updateMatchingQuery: any;
|
|
1530
|
+
getRowQuery: any;
|
|
1531
|
+
saveFileQuery: any;
|
|
1532
|
+
saveFileFromContentsQuery: any;
|
|
1533
|
+
optionsQuery: any;
|
|
1534
|
+
getRowByIdQuery: any;
|
|
1535
|
+
}) => Promise<void>;
|
|
1536
|
+
};
|
|
1537
|
+
interpolate_title_string(table_id: any, title: any, state: any): Promise<string>;
|
|
1538
|
+
configCheck: (view: any) => Promise<{
|
|
1539
|
+
errors: string[];
|
|
1540
|
+
warnings: string[];
|
|
1541
|
+
}>;
|
|
1542
|
+
connectedObjects: (configuration: any) => Promise<import("@saltcorn/types/base_types").ConnectedObjects>;
|
|
1543
|
+
} | {
|
|
1544
|
+
name: string;
|
|
1545
|
+
description: string;
|
|
1546
|
+
get_state_fields: () => object[];
|
|
1547
|
+
configuration_workflow: (req: any) => import("../models").Workflow;
|
|
1548
|
+
run: (table_id: number, viewname: string, { columns, layout }: {
|
|
1549
|
+
columns: object[];
|
|
1550
|
+
layout: object;
|
|
1551
|
+
}, state: object, extra: object, { distinctValuesQuery, optionsQuery }: {
|
|
1552
|
+
distinctValuesQuery: any;
|
|
1553
|
+
optionsQuery: any;
|
|
1554
|
+
}) => Promise<Layout>;
|
|
1555
|
+
initial_config: () => Promise<object>;
|
|
1556
|
+
getStringsForI18n({ layout }: {
|
|
1557
|
+
layout: any;
|
|
1558
|
+
}): string[];
|
|
1559
|
+
routes: {
|
|
1560
|
+
run_action: (table_id: any, viewname: any, config: any, body: any, { req, res }: {
|
|
1561
|
+
req: any;
|
|
1562
|
+
res: any;
|
|
1563
|
+
}, { actionQuery }: {
|
|
1564
|
+
actionQuery: any;
|
|
1565
|
+
}) => Promise<any>;
|
|
1566
|
+
};
|
|
1567
|
+
queries: ({ table_id, viewname, configuration: { columns }, req, res, exttable_name, }: {
|
|
1568
|
+
table_id: any;
|
|
1569
|
+
viewname: any;
|
|
1570
|
+
configuration: {
|
|
1571
|
+
columns: any;
|
|
1572
|
+
};
|
|
1573
|
+
req: any;
|
|
1574
|
+
res: any;
|
|
1575
|
+
exttable_name: any;
|
|
1576
|
+
}) => {
|
|
1577
|
+
optionsQuery(reftable_name: any, type: any, attributes: any, whereWithExisting: any, user: any): Promise<any>;
|
|
1578
|
+
actionQuery(state: any, rndid: any): Promise<any>;
|
|
1579
|
+
distinctValuesQuery(state: any): Promise<{
|
|
1580
|
+
distinct_values: {};
|
|
1581
|
+
role: any;
|
|
1582
|
+
}>;
|
|
1583
|
+
};
|
|
1584
1584
|
})[];
|
|
1585
1585
|
import fileviews = require("./fileviews");
|
|
1586
1586
|
import actions = require("./actions");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../base-plugin/index.js"],"names":[],"mappings":"AAwCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;cA0Bspf,KAAK;;;;;;;gBAAozwB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAAq4jC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAnrnE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAjBjrM;;;;0CAGW,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../base-plugin/viewtemplates/list.js"],"names":[],"mappings":"AAkIA;;;GAGG;AACH,4CAHW,MAAM,GACJ,QAAQ,CAstBjB;AAgGJ;;;;;;;;;;;;;GAaG;AACH,8BAbW,MAAM,GAAC,MAAM,YACb,MAAM,8KAEd;IAAuB,OAAO,EAAtB,MAAM,EAAE;IACM,cAAc;IACf,mBAAmB,EAAhC,MAAM;IACQ,iBAAiB;IACjB,aAAa;IACb,oBAAoB;CAC1C,gBAAQ,MAAM,aACN,MAAM;;IACJ,OAAO,CAAC,GAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../base-plugin/viewtemplates/list.js"],"names":[],"mappings":"AAkIA;;;GAGG;AACH,4CAHW,MAAM,GACJ,QAAQ,CAstBjB;AAgGJ;;;;;;;;;;;;;GAaG;AACH,8BAbW,MAAM,GAAC,MAAM,YACb,MAAM,8KAEd;IAAuB,OAAO,EAAtB,MAAM,EAAE;IACM,cAAc;IACf,mBAAmB,EAAhC,MAAM;IACQ,iBAAiB;IACjB,aAAa;IACb,oBAAoB;CAC1C,gBAAQ,MAAM,aACN,MAAM;;IACJ,OAAO,CAAC,GAAC,CAAC,CA2dtB;AArkBD;;;;;;GAMG;AACH,2CANW,MAAM,YACN,GAAC,eAET;IAAuB,OAAO,EAAtB,MAAM,EAAE;CAChB,YAqBF;AAoBD,uBAAuB;AACvB,sCA6CE;AAz0BF;;;;;;GAMG;AACH,oCANW,GAAC,YACD,MAAM,qBAEd;IAAgB,aAAa,EAArB,GAAC;CACT,GAAU,OAAO,CAAC,IAAI,CAAC,CAYzB;AAgzCD;;;;;;;;;;;GAWG;AACH,sCAXW,MAAM,YACN,GAAC,sCAET;IAA0B,OAAO,EAAzB,MAAM,EAAE;IACG,MAAM,EAAjB,GAAC;CACT,QAAQ,MAAM,gBAEd;IAAwB,GAAG,EAAnB,MAAM;IACK,GAAG,EAAd,GAAC;CACT;;IAAU,OAAO,CAAC,MAAM,CAAC,CA8D3B;AACD;;;;;;iBAyLC;;yBAGY,MAAM;gCAEN,MAAM;kCAKN,MAAM;;;;AAUG,8DAHT,MAAM,GACJ,OAAO,CAwCnB;AACD;;;;;GAKG;AACH,kFAJG;IAAgB,OAAO,EAAf,GAAC;IACO,iBAAiB,EAAzB,GAAC;CACT,GAAU,MAAM,EAAE,CAoBpB;AAEQ;;;;;;;;;;;;;;;;EA4HP;AACW;;;GAEZ;AACiB,6HAMjB"}
|
|
@@ -989,8 +989,20 @@ const run = async (table_id, viewname, { columns, layout, view_to_create, create
|
|
|
989
989
|
const is_row_click = (default_state?._row_click_url_formula ||
|
|
990
990
|
default_state?._row_click_action) &&
|
|
991
991
|
default_state?._row_click_type !== "Nothing";
|
|
992
|
+
const use_layout = (layout?.besides || []).filter((col) => {
|
|
993
|
+
if (col?.showif) {
|
|
994
|
+
const fvs = freeVariables(col.showif);
|
|
995
|
+
const used_fields = [...fvs].map((fv) => fv.split(/(\?\.|\.|Ⱶ)/)[0]);
|
|
996
|
+
if (used_fields.some((fnm) => fnm === "row" || fields.map((f) => f.name).includes(fnm)))
|
|
997
|
+
return true;
|
|
998
|
+
//save to eval
|
|
999
|
+
return eval_expression(col.showif, {}, extraOpts.req?.user, "List column showif expression");
|
|
1000
|
+
}
|
|
1001
|
+
else
|
|
1002
|
+
return true;
|
|
1003
|
+
});
|
|
992
1004
|
const tfields = layout?.list_columns
|
|
993
|
-
? get_viewable_fields_from_layout(viewname, statehash, table, fields, columns, false, extraOpts.req, __, state, viewname,
|
|
1005
|
+
? get_viewable_fields_from_layout(viewname, statehash, table, fields, columns, false, extraOpts.req, __, state, viewname, use_layout, viewResults, is_row_click)
|
|
994
1006
|
: get_viewable_fields(viewname, statehash, table, fields, columns, false, extraOpts.req, __, state, viewname, is_row_click);
|
|
995
1007
|
const rows_per_page = (default_state && default_state._rows_per_page) || 20;
|
|
996
1008
|
const current_page = parseInt(state[`_${statehash}_page`]) || 1;
|