@trops/dash-core 0.1.57 → 0.1.58
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/index.esm.js +32 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7214,6 +7214,38 @@ var ProviderForm = function ProviderForm(_ref) {
|
|
|
7214
7214
|
},
|
|
7215
7215
|
placeholder: "Enter ".concat(fieldConfig.displayName.toLowerCase()),
|
|
7216
7216
|
className: errors[fieldName] ? "border-red-500" : ""
|
|
7217
|
+
}), fieldConfig.type === "file" && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7218
|
+
className: "flex gap-2",
|
|
7219
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7220
|
+
className: "flex-1",
|
|
7221
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
|
|
7222
|
+
value: formData[fieldName] || "",
|
|
7223
|
+
onChange: function onChange(value) {
|
|
7224
|
+
return handleInputChange(fieldName, value);
|
|
7225
|
+
},
|
|
7226
|
+
placeholder: "Select a file...",
|
|
7227
|
+
className: errors[fieldName] ? "border-red-500" : ""
|
|
7228
|
+
})
|
|
7229
|
+
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
7230
|
+
onClick: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
7231
|
+
var filepath;
|
|
7232
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
7233
|
+
while (1) switch (_context.prev = _context.next) {
|
|
7234
|
+
case 0:
|
|
7235
|
+
_context.next = 1;
|
|
7236
|
+
return window.mainApi.dialog.chooseFile(true, ["json"]);
|
|
7237
|
+
case 1:
|
|
7238
|
+
filepath = _context.sent;
|
|
7239
|
+
if (filepath) handleInputChange(fieldName, filepath);
|
|
7240
|
+
case 2:
|
|
7241
|
+
case "end":
|
|
7242
|
+
return _context.stop();
|
|
7243
|
+
}
|
|
7244
|
+
}, _callee);
|
|
7245
|
+
})),
|
|
7246
|
+
className: "px-3 py-1.5 text-sm rounded bg-white/10 hover:bg-white/20 transition-colors",
|
|
7247
|
+
children: "Browse"
|
|
7248
|
+
})]
|
|
7217
7249
|
}), errors[fieldName] && /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
7218
7250
|
className: "text-sm text-red-500 dark:text-red-400",
|
|
7219
7251
|
children: errors[fieldName]
|