@saltcorn/server 0.7.0-beta.1 → 0.7.0-beta.2
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/locales/en.json +4 -1
- package/package.json +8 -8
- package/public/saltcorn-builder.css +3 -0
- package/public/saltcorn.js +20 -1
- package/routes/homepage.js +1 -1
- package/routes/plugins.js +3 -1
package/locales/en.json
CHANGED
|
@@ -867,5 +867,8 @@
|
|
|
867
867
|
"Save before going back": "Save before going back",
|
|
868
868
|
"Reload after going back": "Reload after going back",
|
|
869
869
|
"2FA policy": "2FA policy",
|
|
870
|
-
"Steps to go back": "Steps to go back"
|
|
870
|
+
"Steps to go back": "Steps to go back",
|
|
871
|
+
"Place in dropdown": "Place in dropdown",
|
|
872
|
+
"Hide null columns": "Hide null columns",
|
|
873
|
+
"Do not display a column if it contains entirely missing values": "Do not display a column if it contains entirely missing values"
|
|
871
874
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saltcorn/server",
|
|
3
|
-
"version": "0.7.0-beta.
|
|
3
|
+
"version": "0.7.0-beta.2",
|
|
4
4
|
"description": "Server app for Saltcorn, open-source no-code platform",
|
|
5
5
|
"homepage": "https://saltcorn.com",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@saltcorn/base-plugin": "0.7.0-beta.
|
|
10
|
-
"@saltcorn/builder": "0.7.0-beta.
|
|
11
|
-
"@saltcorn/data": "0.7.0-beta.
|
|
12
|
-
"@saltcorn/admin-models": "0.7.0-beta.
|
|
13
|
-
"@saltcorn/markup": "0.7.0-beta.
|
|
14
|
-
"@saltcorn/sbadmin2": "0.7.0-beta.
|
|
9
|
+
"@saltcorn/base-plugin": "0.7.0-beta.2",
|
|
10
|
+
"@saltcorn/builder": "0.7.0-beta.2",
|
|
11
|
+
"@saltcorn/data": "0.7.0-beta.2",
|
|
12
|
+
"@saltcorn/admin-models": "0.7.0-beta.2",
|
|
13
|
+
"@saltcorn/markup": "0.7.0-beta.2",
|
|
14
|
+
"@saltcorn/sbadmin2": "0.7.0-beta.2",
|
|
15
15
|
"@socket.io/cluster-adapter": "^0.1.0",
|
|
16
16
|
"@socket.io/sticky": "^1.0.1",
|
|
17
17
|
"aws-sdk": "^2.1037.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"greenlock": "^4.0.4",
|
|
32
32
|
"greenlock-express": "^4.0.3",
|
|
33
33
|
"helmet": "^3.23.3",
|
|
34
|
-
"i18n": "^0.
|
|
34
|
+
"i18n": "^0.14.0",
|
|
35
35
|
"live-plugin-manager": "^0.16.0",
|
|
36
36
|
"moment": "^2.27.0",
|
|
37
37
|
"multer": "^1.4.3",
|
package/public/saltcorn.js
CHANGED
|
@@ -751,14 +751,33 @@ function room_older(viewname, room_id, btn) {
|
|
|
751
751
|
);
|
|
752
752
|
}
|
|
753
753
|
|
|
754
|
-
function fill_formula_btn_click(btn) {
|
|
754
|
+
async function fill_formula_btn_click(btn, k) {
|
|
755
755
|
const formula = decodeURIComponent($(btn).attr("data-formula"));
|
|
756
|
+
const free_vars = JSON.parse(
|
|
757
|
+
decodeURIComponent($(btn).attr("data-formula-free-vars"))
|
|
758
|
+
);
|
|
759
|
+
const table = JSON.parse(
|
|
760
|
+
decodeURIComponent($(btn).attr("data-formula-table"))
|
|
761
|
+
);
|
|
756
762
|
const rec = get_form_record($(btn), true);
|
|
763
|
+
const rec_ids = get_form_record($(btn));
|
|
764
|
+
for (const fv of free_vars) {
|
|
765
|
+
if (fv.includes(".")) {
|
|
766
|
+
const kpath = fv.split(".");
|
|
767
|
+
const [refNm, targetNm] = kpath;
|
|
768
|
+
const reffield = table.fields.find((f) => f.name === refNm);
|
|
769
|
+
const resp = await $.ajax(
|
|
770
|
+
`/api/${reffield.reftable_name}?id=${rec_ids[refNm]}`
|
|
771
|
+
);
|
|
772
|
+
rec[refNm] = resp.success[0];
|
|
773
|
+
}
|
|
774
|
+
}
|
|
757
775
|
const val = new Function(
|
|
758
776
|
`{${Object.keys(rec).join(",")}}`,
|
|
759
777
|
"return " + formula
|
|
760
778
|
)(rec);
|
|
761
779
|
$(btn).closest(".input-group").find("input").val(val);
|
|
780
|
+
if (k) k();
|
|
762
781
|
}
|
|
763
782
|
|
|
764
783
|
/*
|
package/routes/homepage.js
CHANGED
|
@@ -265,7 +265,7 @@ const packTab = (req, packlist) =>
|
|
|
265
265
|
{ class: "pb-3 pt-2 pe-4" },
|
|
266
266
|
p(req.__("Instead of building, get up and running in no time with packs")),
|
|
267
267
|
p(
|
|
268
|
-
{ class: "
|
|
268
|
+
{ class: "fst-italic" },
|
|
269
269
|
req.__(
|
|
270
270
|
"Packs are collections of tables, views and plugins that give you a full application which you can then edit to suit your needs."
|
|
271
271
|
)
|
package/routes/plugins.js
CHANGED
|
@@ -646,7 +646,9 @@ router.get(
|
|
|
646
646
|
error_catcher(async (req, res) => {
|
|
647
647
|
const { plugin } = req.params;
|
|
648
648
|
const filepath = req.params[0];
|
|
649
|
-
const location = getState().plugin_locations[
|
|
649
|
+
const location = getState().plugin_locations[
|
|
650
|
+
plugin.includes("@") ? plugin.split("@")[0] : plugin
|
|
651
|
+
];
|
|
650
652
|
if (location) {
|
|
651
653
|
const safeFile = path
|
|
652
654
|
.normalize(filepath)
|