@saltcorn/builder 1.4.0-beta.1 → 1.4.0-beta.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saltcorn/builder",
|
|
3
|
-
"version": "1.4.0-beta.
|
|
3
|
+
"version": "1.4.0-beta.3",
|
|
4
4
|
"description": "Drag and drop view builder for Saltcorn, open-source no-code platform",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"homepage": "https://saltcorn.com",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@babel/preset-react": "7.24.7",
|
|
21
21
|
"@craftjs/core": "0.1.0-beta.20",
|
|
22
22
|
"@craftjs/utils": "0.1.0-beta.20",
|
|
23
|
-
"@saltcorn/common-code": "1.4.0-beta.
|
|
23
|
+
"@saltcorn/common-code": "1.4.0-beta.3",
|
|
24
24
|
"saltcorn-craft-layers-noeye": "0.1.0-beta.22",
|
|
25
25
|
"@fonticonpicker/react-fonticonpicker": "1.2.0",
|
|
26
26
|
"@fortawesome/fontawesome-svg-core": "1.2.34",
|
|
@@ -895,6 +895,7 @@ const ConfigField = ({
|
|
|
895
895
|
} else prop[field.name] = v;
|
|
896
896
|
});
|
|
897
897
|
onChange && onChange(field.name, v, setProp);
|
|
898
|
+
apply_showif();
|
|
898
899
|
};
|
|
899
900
|
let stored_value = configuration
|
|
900
901
|
? configuration[field.name]
|
|
@@ -967,7 +968,26 @@ const ConfigField = ({
|
|
|
967
968
|
))}
|
|
968
969
|
</select>
|
|
969
970
|
);
|
|
970
|
-
}
|
|
971
|
+
}
|
|
972
|
+
else if (field.attributes?.calcOptions) {
|
|
973
|
+
return (
|
|
974
|
+
<select
|
|
975
|
+
className={`field-${field?.name} form-control form-select`}
|
|
976
|
+
name={field?.name}
|
|
977
|
+
value={value || ""}
|
|
978
|
+
onChange={(e) => e.target && myOnChange(e.target.value)}
|
|
979
|
+
onBlur={(e) => e.target && myOnChange(e.target.value)}
|
|
980
|
+
data-calc-options={encodeURIComponent(
|
|
981
|
+
JSON.stringify(field.attributes.calcOptions)
|
|
982
|
+
)}
|
|
983
|
+
autocomplete= {"off"}
|
|
984
|
+
data-fieldname={field?.name}
|
|
985
|
+
>
|
|
986
|
+
<option value=""></option>
|
|
987
|
+
</select>
|
|
988
|
+
);
|
|
989
|
+
}
|
|
990
|
+
else
|
|
971
991
|
return (
|
|
972
992
|
<input
|
|
973
993
|
type="text"
|
|
@@ -1093,6 +1113,7 @@ const ConfigField = ({
|
|
|
1093
1113
|
name={field?.name}
|
|
1094
1114
|
onChange={(e) => e.target && myOnChange(e.target.value)}
|
|
1095
1115
|
onBlur={(e) => e.target && myOnChange(e.target.value)}
|
|
1116
|
+
data-fieldname={field?.name}
|
|
1096
1117
|
>
|
|
1097
1118
|
{(field.options || []).map((o, ix) =>
|
|
1098
1119
|
o.name && o.label ? (
|