@trops/dash-core 0.1.454 → 0.1.455
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 +89 -31
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +89 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43931,7 +43931,9 @@ var ProviderDetail = function ProviderDetail(_ref) {
|
|
|
43931
43931
|
_ref$catalogAuthComma = _ref.catalogAuthCommand,
|
|
43932
43932
|
catalogAuthCommand = _ref$catalogAuthComma === void 0 ? null : _ref$catalogAuthComma,
|
|
43933
43933
|
_ref$catalogCredentia = _ref.catalogCredentialSchema,
|
|
43934
|
-
catalogCredentialSchema = _ref$catalogCredentia === void 0 ? {} : _ref$catalogCredentia
|
|
43934
|
+
catalogCredentialSchema = _ref$catalogCredentia === void 0 ? {} : _ref$catalogCredentia,
|
|
43935
|
+
_ref$onBack = _ref.onBack,
|
|
43936
|
+
onBack = _ref$onBack === void 0 ? null : _ref$onBack;
|
|
43935
43937
|
var appContext = React.useContext(AppContext);
|
|
43936
43938
|
var dashApi = appContext === null || appContext === void 0 ? void 0 : appContext.dashApi;
|
|
43937
43939
|
var isMcp = (provider === null || provider === void 0 ? void 0 : provider.providerClass) === "mcp";
|
|
@@ -44260,7 +44262,15 @@ var ProviderDetail = function ProviderDetail(_ref) {
|
|
|
44260
44262
|
className: "flex flex-col flex-1 min-h-0",
|
|
44261
44263
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
44262
44264
|
className: "flex-1 min-h-0 overflow-y-auto p-6 space-y-5",
|
|
44263
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
44265
|
+
children: [onBack && /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
44266
|
+
type: "button",
|
|
44267
|
+
onClick: onBack,
|
|
44268
|
+
className: "flex items-center gap-2 text-sm opacity-60 hover:opacity-100 transition-opacity",
|
|
44269
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
44270
|
+
icon: "chevron-left",
|
|
44271
|
+
className: "h-3 w-3"
|
|
44272
|
+
}), "Back"]
|
|
44273
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading3, {
|
|
44264
44274
|
title: isCreating ? "New Provider" : "Edit Provider",
|
|
44265
44275
|
padding: false
|
|
44266
44276
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -45854,7 +45864,9 @@ var McpCatalogDetail = function McpCatalogDetail(_ref) {
|
|
|
45854
45864
|
var onSave = _ref.onSave,
|
|
45855
45865
|
onCancel = _ref.onCancel,
|
|
45856
45866
|
_ref$initialSelectedI = _ref.initialSelectedId,
|
|
45857
|
-
initialSelectedId = _ref$initialSelectedI === void 0 ? null : _ref$initialSelectedI
|
|
45867
|
+
initialSelectedId = _ref$initialSelectedI === void 0 ? null : _ref$initialSelectedI,
|
|
45868
|
+
_ref$onBack = _ref.onBack,
|
|
45869
|
+
onBack = _ref$onBack === void 0 ? null : _ref$onBack;
|
|
45858
45870
|
var appContext = React.useContext(AppContext);
|
|
45859
45871
|
var dashApi = appContext === null || appContext === void 0 ? void 0 : appContext.dashApi;
|
|
45860
45872
|
var _useState = React.useState([]),
|
|
@@ -46505,7 +46517,15 @@ var McpCatalogDetail = function McpCatalogDetail(_ref) {
|
|
|
46505
46517
|
className: "flex flex-col flex-1 min-h-0",
|
|
46506
46518
|
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
46507
46519
|
className: "flex-1 min-h-0 overflow-y-auto p-6 space-y-4",
|
|
46508
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("
|
|
46520
|
+
children: [onBack && /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
46521
|
+
type: "button",
|
|
46522
|
+
onClick: onBack,
|
|
46523
|
+
className: "flex items-center gap-2 text-sm opacity-60 hover:opacity-100 transition-opacity",
|
|
46524
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
46525
|
+
icon: "chevron-left",
|
|
46526
|
+
className: "h-3 w-3"
|
|
46527
|
+
}), "Back"]
|
|
46528
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
46509
46529
|
className: "flex items-center justify-between",
|
|
46510
46530
|
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading3, {
|
|
46511
46531
|
title: "Add MCP Server",
|
|
@@ -46682,7 +46702,9 @@ var WebSocketProviderForm = function WebSocketProviderForm(_ref) {
|
|
|
46682
46702
|
_ref$initialCredentia = _ref.initialCredentials,
|
|
46683
46703
|
initialCredentials = _ref$initialCredentia === void 0 ? {} : _ref$initialCredentia,
|
|
46684
46704
|
onSave = _ref.onSave,
|
|
46685
|
-
onCancel = _ref.onCancel
|
|
46705
|
+
onCancel = _ref.onCancel,
|
|
46706
|
+
_ref$onBack = _ref.onBack,
|
|
46707
|
+
onBack = _ref$onBack === void 0 ? null : _ref$onBack;
|
|
46686
46708
|
var _useState = React.useState(initialName),
|
|
46687
46709
|
_useState2 = _slicedToArray(_useState, 2),
|
|
46688
46710
|
name = _useState2[0],
|
|
@@ -46896,7 +46918,15 @@ var WebSocketProviderForm = function WebSocketProviderForm(_ref) {
|
|
|
46896
46918
|
className: "flex flex-col flex-1 min-h-0",
|
|
46897
46919
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
46898
46920
|
className: "flex-1 min-h-0 overflow-y-auto p-6 space-y-5",
|
|
46899
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
46921
|
+
children: [onBack && /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
46922
|
+
type: "button",
|
|
46923
|
+
onClick: onBack,
|
|
46924
|
+
className: "flex items-center gap-2 text-sm opacity-60 hover:opacity-100 transition-opacity",
|
|
46925
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
46926
|
+
icon: "chevron-left",
|
|
46927
|
+
className: "h-3 w-3"
|
|
46928
|
+
}), "Back"]
|
|
46929
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.SubHeading3, {
|
|
46900
46930
|
title: isEditMode ? "Edit WebSocket Provider" : "New WebSocket Provider",
|
|
46901
46931
|
padding: false
|
|
46902
46932
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
@@ -47218,42 +47248,50 @@ var ProvidersSection = function ProvidersSection(_ref) {
|
|
|
47218
47248
|
_useState0 = _slicedToArray(_useState9, 2),
|
|
47219
47249
|
isShowingClassChooser = _useState0[0],
|
|
47220
47250
|
setIsShowingClassChooser = _useState0[1];
|
|
47251
|
+
// Tracks whether the current create-flow detail was reached via the
|
|
47252
|
+
// chooser (vs. the Widget Builder deep-link or list-edit). Only the
|
|
47253
|
+
// chooser-entry path renders the "← Back" affordance, since that's
|
|
47254
|
+
// the only path that has somewhere to go back to.
|
|
47221
47255
|
var _useState1 = React.useState(false),
|
|
47222
47256
|
_useState10 = _slicedToArray(_useState1, 2),
|
|
47223
|
-
|
|
47224
|
-
|
|
47225
|
-
var _useState11 = React.useState(
|
|
47257
|
+
cameFromClassChooser = _useState10[0],
|
|
47258
|
+
setCameFromClassChooser = _useState10[1];
|
|
47259
|
+
var _useState11 = React.useState(false),
|
|
47226
47260
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
47227
|
-
|
|
47228
|
-
|
|
47261
|
+
isEditing = _useState12[0],
|
|
47262
|
+
setIsEditing = _useState12[1];
|
|
47229
47263
|
var _useState13 = React.useState(""),
|
|
47230
47264
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
47231
|
-
|
|
47232
|
-
|
|
47233
|
-
var _useState15 = React.useState(
|
|
47265
|
+
formName = _useState14[0],
|
|
47266
|
+
setFormName = _useState14[1];
|
|
47267
|
+
var _useState15 = React.useState(""),
|
|
47234
47268
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
47235
|
-
|
|
47236
|
-
|
|
47237
|
-
var _useState17 = React.useState(
|
|
47269
|
+
formType = _useState16[0],
|
|
47270
|
+
setFormType = _useState16[1];
|
|
47271
|
+
var _useState17 = React.useState({}),
|
|
47238
47272
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
47239
|
-
|
|
47240
|
-
|
|
47241
|
-
var _useState19 = React.useState(
|
|
47273
|
+
formCredentials = _useState18[0],
|
|
47274
|
+
setFormCredentials = _useState18[1];
|
|
47275
|
+
var _useState19 = React.useState(null),
|
|
47242
47276
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
47243
|
-
|
|
47244
|
-
|
|
47277
|
+
deleteTarget = _useState20[0],
|
|
47278
|
+
setDeleteTarget = _useState20[1];
|
|
47245
47279
|
var _useState21 = React.useState(false),
|
|
47246
47280
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
47247
|
-
|
|
47248
|
-
|
|
47281
|
+
isAddingMcp = _useState22[0],
|
|
47282
|
+
setIsAddingMcp = _useState22[1];
|
|
47249
47283
|
var _useState23 = React.useState(false),
|
|
47250
47284
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
47251
|
-
|
|
47252
|
-
|
|
47285
|
+
isEditingMcp = _useState24[0],
|
|
47286
|
+
setIsEditingMcp = _useState24[1];
|
|
47253
47287
|
var _useState25 = React.useState(false),
|
|
47254
47288
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
47255
|
-
|
|
47256
|
-
|
|
47289
|
+
isAddingWs = _useState26[0],
|
|
47290
|
+
setIsAddingWs = _useState26[1];
|
|
47291
|
+
var _useState27 = React.useState(false),
|
|
47292
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
|
47293
|
+
isEditingWs = _useState28[0],
|
|
47294
|
+
setIsEditingWs = _useState28[1];
|
|
47257
47295
|
|
|
47258
47296
|
// Row ID counter for env/header rows in MCP edit mode
|
|
47259
47297
|
var nextRowIdRef = React.useRef(0);
|
|
@@ -47536,6 +47574,10 @@ var ProvidersSection = function ProvidersSection(_ref) {
|
|
|
47536
47574
|
resetForm();
|
|
47537
47575
|
setSelectedName(null);
|
|
47538
47576
|
setIsShowingClassChooser(false);
|
|
47577
|
+
// External create requests (deep-link or header button) do NOT
|
|
47578
|
+
// come via the chooser, so any leftover "came from chooser" state
|
|
47579
|
+
// from a prior session must be cleared before routing.
|
|
47580
|
+
setCameFromClassChooser(false);
|
|
47539
47581
|
if (initialProviderClass === "mcp") {
|
|
47540
47582
|
// MCP class: open the catalog detail. Pre-select happens in
|
|
47541
47583
|
// McpCatalogDetail via the initialSelectedId prop passed below.
|
|
@@ -47663,13 +47705,26 @@ var ProvidersSection = function ProvidersSection(_ref) {
|
|
|
47663
47705
|
})]
|
|
47664
47706
|
})]
|
|
47665
47707
|
});
|
|
47708
|
+
|
|
47709
|
+
// Closes whichever create-flow detail is open and re-opens the
|
|
47710
|
+
// class chooser. Only attached to the detail's onBack prop when
|
|
47711
|
+
// the user reached it via the chooser (cameFromClassChooser).
|
|
47712
|
+
var goBackToClassChooser = function goBackToClassChooser() {
|
|
47713
|
+
resetForm();
|
|
47714
|
+
setIsAddingWs(false);
|
|
47715
|
+
setIsAddingMcp(false);
|
|
47716
|
+
setIsCreating(false);
|
|
47717
|
+
setCameFromClassChooser(false);
|
|
47718
|
+
setIsShowingClassChooser(true);
|
|
47719
|
+
};
|
|
47666
47720
|
var detailContent = null;
|
|
47667
47721
|
if (isAddingWs) {
|
|
47668
47722
|
detailContent = /*#__PURE__*/jsxRuntime.jsx(WebSocketProviderForm, {
|
|
47669
47723
|
onSave: handleWsSave,
|
|
47670
47724
|
onCancel: function onCancel() {
|
|
47671
47725
|
return setIsAddingWs(false);
|
|
47672
|
-
}
|
|
47726
|
+
},
|
|
47727
|
+
onBack: cameFromClassChooser ? goBackToClassChooser : null
|
|
47673
47728
|
});
|
|
47674
47729
|
} else if (isEditingWs && selectedName && selectedProvider) {
|
|
47675
47730
|
var wc = selectedProvider.wsConfig || {};
|
|
@@ -47699,6 +47754,7 @@ var ProvidersSection = function ProvidersSection(_ref) {
|
|
|
47699
47754
|
detailContent = /*#__PURE__*/jsxRuntime.jsx(NewProviderPicker, {
|
|
47700
47755
|
onSelect: function onSelect(cls) {
|
|
47701
47756
|
setIsShowingClassChooser(false);
|
|
47757
|
+
setCameFromClassChooser(true);
|
|
47702
47758
|
if (cls === "mcp") {
|
|
47703
47759
|
setIsAddingMcp(true);
|
|
47704
47760
|
} else if (cls === "websocket") {
|
|
@@ -47714,7 +47770,8 @@ var ProvidersSection = function ProvidersSection(_ref) {
|
|
|
47714
47770
|
onCancel: function onCancel() {
|
|
47715
47771
|
return setIsAddingMcp(false);
|
|
47716
47772
|
},
|
|
47717
|
-
initialSelectedId: initialProviderType
|
|
47773
|
+
initialSelectedId: initialProviderType,
|
|
47774
|
+
onBack: cameFromClassChooser ? goBackToClassChooser : null
|
|
47718
47775
|
});
|
|
47719
47776
|
} else if (isCreating) {
|
|
47720
47777
|
detailContent = /*#__PURE__*/jsxRuntime.jsx(ProviderDetail, {
|
|
@@ -47729,7 +47786,8 @@ var ProvidersSection = function ProvidersSection(_ref) {
|
|
|
47729
47786
|
onCancelEdit: function onCancelEdit() {
|
|
47730
47787
|
resetForm();
|
|
47731
47788
|
setIsCreating(false);
|
|
47732
|
-
}
|
|
47789
|
+
},
|
|
47790
|
+
onBack: cameFromClassChooser ? goBackToClassChooser : null
|
|
47733
47791
|
});
|
|
47734
47792
|
} else if (isEditingMcp && selectedName && selectedProvider) {
|
|
47735
47793
|
var mc = selectedProvider.mcpConfig || {};
|