@trops/dash-core 0.1.120 → 0.1.121

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 CHANGED
@@ -31,8 +31,8 @@ import algoliasearch from 'algoliasearch';
31
31
  import { InstantSearch, Hits } from 'react-instantsearch-hooks-web';
32
32
  import { Link } from 'react-router-dom';
33
33
 
34
- function ownKeys$B(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
35
- function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$B(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$B(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
34
+ function ownKeys$C(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
35
+ function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$C(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$C(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
36
36
  var event = {
37
37
  list: new Map(),
38
38
  // Map(1) { '<widget-UUID>' => { 'CustomSearchbar[10].searchQueryChanged': [] } }
@@ -94,7 +94,7 @@ var event = {
94
94
  uuid: subscriber["uuid"]
95
95
  };
96
96
  if ("action" in subscriber && subscriber.action !== undefined) {
97
- subscriber["action"](_objectSpread$B({}, objectToSend));
97
+ subscriber["action"](_objectSpread$C({}, objectToSend));
98
98
  }
99
99
  });
100
100
  }
@@ -2534,8 +2534,8 @@ var DashboardWrapper = function DashboardWrapper(_ref) {
2534
2534
  });
2535
2535
  };
2536
2536
 
2537
- function ownKeys$A(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2538
- function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$A(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$A(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2537
+ function ownKeys$B(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2538
+ function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$B(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$B(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2539
2539
  var DashboardThemeProvider = function DashboardThemeProvider(_ref) {
2540
2540
  var themeKey = _ref.themeKey,
2541
2541
  children = _ref.children;
@@ -2547,7 +2547,7 @@ var DashboardThemeProvider = function DashboardThemeProvider(_ref) {
2547
2547
  var dashboardTheme = themes[themeKey];
2548
2548
  var themeValue = dashboardTheme ? dashboardTheme[themeVariant] || null : null;
2549
2549
  if (!themeValue) return null;
2550
- return _objectSpread$A(_objectSpread$A({}, parentContext), {}, {
2550
+ return _objectSpread$B(_objectSpread$B({}, parentContext), {}, {
2551
2551
  currentTheme: themeValue,
2552
2552
  currentThemeKey: themeKey,
2553
2553
  theme: themeValue,
@@ -2565,8 +2565,8 @@ var DashboardThemeProvider = function DashboardThemeProvider(_ref) {
2565
2565
  });
2566
2566
  };
2567
2567
 
2568
- function ownKeys$z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2569
- function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2568
+ function ownKeys$A(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2569
+ function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$A(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$A(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2570
2570
  var AppThemeScope = function AppThemeScope(_ref) {
2571
2571
  var children = _ref.children;
2572
2572
  var ctx = useContext(ThemeContext);
@@ -2574,7 +2574,7 @@ var AppThemeScope = function AppThemeScope(_ref) {
2574
2574
  children: children
2575
2575
  });
2576
2576
  return /*#__PURE__*/jsx(ThemeContext.Provider, {
2577
- value: _objectSpread$z(_objectSpread$z({}, ctx), {}, {
2577
+ value: _objectSpread$A(_objectSpread$A({}, ctx), {}, {
2578
2578
  currentTheme: ctx.appTheme,
2579
2579
  currentThemeKey: ctx.appThemeKey,
2580
2580
  theme: ctx.appTheme,
@@ -2686,8 +2686,8 @@ var LayoutContainer = function LayoutContainer(_ref) {
2686
2686
  });
2687
2687
  };
2688
2688
 
2689
- function ownKeys$y(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2690
- function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2689
+ function ownKeys$z(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2690
+ function _objectSpread$z(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$z(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
2691
2691
  function _createForOfIteratorHelper$a(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$a(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
2692
2692
  function _unsupportedIterableToArray$a(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$a(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$a(r, a) : void 0; } }
2693
2693
  function _arrayLikeToArray$a(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -2931,7 +2931,7 @@ function createLayoutFromTemplate(template) {
2931
2931
  try {
2932
2932
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
2933
2933
  var cell = _step.value;
2934
- grid[cell.key] = _objectSpread$y({
2934
+ grid[cell.key] = _objectSpread$z({
2935
2935
  component: null,
2936
2936
  hide: cell.hide || false
2937
2937
  }, cell.span ? {
@@ -3446,7 +3446,8 @@ var StarRating = function StarRating(_ref) {
3446
3446
 
3447
3447
  var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
3448
3448
  var dashboardPackage = _ref.dashboardPackage,
3449
- appId = _ref.appId;
3449
+ appId = _ref.appId,
3450
+ onInstallComplete = _ref.onInstallComplete;
3450
3451
  var _useContext = useContext(ThemeContext),
3451
3452
  currentTheme = _useContext.currentTheme;
3452
3453
  var panelStyles = getStylesForItem(themeObjects.PANEL, currentTheme, {
@@ -3516,6 +3517,9 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
3516
3517
  status: result !== null && result !== void 0 && result.success ? "success" : "error",
3517
3518
  message: result !== null && result !== void 0 && result.success ? "Dashboard \"".concat(((_result$workspace = result.workspace) === null || _result$workspace === void 0 ? void 0 : _result$workspace.name) || pkg.name, "\" installed successfully.") : (result === null || result === void 0 ? void 0 : result.error) || "Installation failed."
3518
3519
  });
3520
+ if (result !== null && result !== void 0 && result.success && onInstallComplete) {
3521
+ onInstallComplete(result);
3522
+ }
3519
3523
  _context.next = 5;
3520
3524
  break;
3521
3525
  case 4:
@@ -3706,7 +3710,8 @@ var RegistryDashboardDetail = function RegistryDashboardDetail(_ref) {
3706
3710
 
3707
3711
  var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
3708
3712
  var onBack = _ref.onBack,
3709
- appId = _ref.appId;
3713
+ appId = _ref.appId,
3714
+ onInstallComplete = _ref.onInstallComplete;
3710
3715
  var _useContext = useContext(ThemeContext),
3711
3716
  currentTheme = _useContext.currentTheme;
3712
3717
  var panelStyles = getStylesForItem(themeObjects.PANEL, currentTheme, {
@@ -3814,7 +3819,8 @@ var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
3814
3819
  })
3815
3820
  }), /*#__PURE__*/jsx(RegistryDashboardDetail, {
3816
3821
  dashboardPackage: selectedPackage,
3817
- appId: appId
3822
+ appId: appId,
3823
+ onInstallComplete: onInstallComplete
3818
3824
  })]
3819
3825
  });
3820
3826
  }
@@ -3909,6 +3915,8 @@ var DiscoverDashboardsDetail = function DiscoverDashboardsDetail(_ref) {
3909
3915
  });
3910
3916
  };
3911
3917
 
3918
+ function ownKeys$y(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3919
+ function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3912
3920
  var LayoutManagerModal = function LayoutManagerModal(_ref) {
3913
3921
  var open = _ref.open,
3914
3922
  setIsOpen = _ref.setIsOpen,
@@ -3918,7 +3926,9 @@ var LayoutManagerModal = function LayoutManagerModal(_ref) {
3918
3926
  _ref$onSaveMenuItem = _ref.onSaveMenuItem,
3919
3927
  onSaveMenuItem = _ref$onSaveMenuItem === void 0 ? null : _ref$onSaveMenuItem,
3920
3928
  appId = _ref.appId,
3921
- onReloadWorkspaces = _ref.onReloadWorkspaces;
3929
+ onReloadWorkspaces = _ref.onReloadWorkspaces,
3930
+ _ref$onOpenWorkspace = _ref.onOpenWorkspace,
3931
+ onOpenWorkspace = _ref$onOpenWorkspace === void 0 ? null : _ref$onOpenWorkspace;
3922
3932
  var _useContext = useContext(ThemeContext),
3923
3933
  themes = _useContext.themes,
3924
3934
  appThemeKey = _useContext.themeKey;
@@ -3951,19 +3961,31 @@ var LayoutManagerModal = function LayoutManagerModal(_ref) {
3951
3961
  localMenuItems = _useState12[0],
3952
3962
  setLocalMenuItems = _useState12[1];
3953
3963
 
3954
- // Inline new-folder form state
3955
- var _useState13 = useState(false),
3964
+ // Post-install workspace for registry stepper customization
3965
+ var _useState13 = useState(null),
3956
3966
  _useState14 = _slicedToArray(_useState13, 2),
3957
- isCreatingFolder = _useState14[0],
3958
- setIsCreatingFolder = _useState14[1];
3959
- var _useState15 = useState(""),
3967
+ importedWorkspace = _useState14[0],
3968
+ setImportedWorkspace = _useState14[1];
3969
+
3970
+ // Pre-import file selection (file preview, not yet saved)
3971
+ var _useState15 = useState(null),
3960
3972
  _useState16 = _slicedToArray(_useState15, 2),
3961
- newFolderName = _useState16[0],
3962
- setNewFolderName = _useState16[1];
3963
- var _useState17 = useState(null),
3973
+ selectedFile = _useState16[0],
3974
+ setSelectedFile = _useState16[1];
3975
+
3976
+ // Inline new-folder form state
3977
+ var _useState17 = useState(false),
3964
3978
  _useState18 = _slicedToArray(_useState17, 2),
3965
- newFolderIcon = _useState18[0],
3966
- setNewFolderIcon = _useState18[1];
3979
+ isCreatingFolder = _useState18[0],
3980
+ setIsCreatingFolder = _useState18[1];
3981
+ var _useState19 = useState(""),
3982
+ _useState20 = _slicedToArray(_useState19, 2),
3983
+ newFolderName = _useState20[0],
3984
+ setNewFolderName = _useState20[1];
3985
+ var _useState21 = useState(null),
3986
+ _useState22 = _slicedToArray(_useState21, 2),
3987
+ newFolderIcon = _useState22[0],
3988
+ setNewFolderIcon = _useState22[1];
3967
3989
 
3968
3990
  // Reset state when modal opens
3969
3991
  useEffect(function () {
@@ -3975,6 +3997,8 @@ var LayoutManagerModal = function LayoutManagerModal(_ref) {
3975
3997
  setSelectedMenuId(menuItems && menuItems.length > 0 ? menuItems[0].id : 1);
3976
3998
  setSelectedTemplate(layoutTemplates[0]);
3977
3999
  setSelectedThemeKey(null);
4000
+ setImportedWorkspace(null);
4001
+ setSelectedFile(null);
3978
4002
  setIsCreatingFolder(false);
3979
4003
  setNewFolderName("");
3980
4004
  setNewFolderIcon(null);
@@ -4017,29 +4041,29 @@ var LayoutManagerModal = function LayoutManagerModal(_ref) {
4017
4041
  setActiveStep(2);
4018
4042
  }
4019
4043
  function handleMethodSelect(method) {
4020
- if (method === "import") {
4021
- handleImportFromFile();
4022
- } else {
4023
- setCreationMethod(method);
4024
- }
4044
+ setCreationMethod(method);
4025
4045
  }
4026
4046
  function handleImportFromFile() {
4027
4047
  return _handleImportFromFile.apply(this, arguments);
4028
4048
  }
4029
4049
  function _handleImportFromFile() {
4030
4050
  _handleImportFromFile = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
4031
- var result;
4051
+ var result, _result$dashboardConf, _result$dashboardConf2, _result$dashboardConf3, _result$dashboardConf4;
4032
4052
  return _regeneratorRuntime.wrap(function (_context) {
4033
4053
  while (1) switch (_context.prev = _context.next) {
4034
4054
  case 0:
4035
4055
  _context.prev = 0;
4036
4056
  _context.next = 1;
4037
- return window.mainApi.dashboardConfig.importDashboardConfig(appId);
4057
+ return window.mainApi.dashboardConfig.selectDashboardFile();
4038
4058
  case 1:
4039
4059
  result = _context.sent;
4040
4060
  if (result && !result.canceled && result.success) {
4041
- onReloadWorkspaces && onReloadWorkspaces();
4042
- handleClose();
4061
+ setSelectedFile(result);
4062
+ setDashboardName(((_result$dashboardConf = result.dashboardConfig) === null || _result$dashboardConf === void 0 || (_result$dashboardConf = _result$dashboardConf.workspace) === null || _result$dashboardConf === void 0 ? void 0 : _result$dashboardConf.name) || ((_result$dashboardConf2 = result.dashboardConfig) === null || _result$dashboardConf2 === void 0 ? void 0 : _result$dashboardConf2.name) || "");
4063
+ setSelectedMenuId(((_result$dashboardConf3 = result.dashboardConfig) === null || _result$dashboardConf3 === void 0 || (_result$dashboardConf3 = _result$dashboardConf3.workspace) === null || _result$dashboardConf3 === void 0 ? void 0 : _result$dashboardConf3.menuId) || (menuItems.length > 0 ? menuItems[0].id : 1));
4064
+ setSelectedThemeKey(((_result$dashboardConf4 = result.dashboardConfig) === null || _result$dashboardConf4 === void 0 || (_result$dashboardConf4 = _result$dashboardConf4.workspace) === null || _result$dashboardConf4 === void 0 ? void 0 : _result$dashboardConf4.themeKey) || null);
4065
+ setActiveStep(0);
4066
+ setCreationMethod("import");
4043
4067
  }
4044
4068
  _context.next = 3;
4045
4069
  break;
@@ -4054,10 +4078,392 @@ var LayoutManagerModal = function LayoutManagerModal(_ref) {
4054
4078
  }));
4055
4079
  return _handleImportFromFile.apply(this, arguments);
4056
4080
  }
4081
+ function handleRegistryInstallComplete(result) {
4082
+ var _result$workspace, _result$workspace2, _result$workspace3;
4083
+ setImportedWorkspace(result.workspace);
4084
+ setDashboardName(((_result$workspace = result.workspace) === null || _result$workspace === void 0 ? void 0 : _result$workspace.name) || "");
4085
+ setSelectedMenuId(((_result$workspace2 = result.workspace) === null || _result$workspace2 === void 0 ? void 0 : _result$workspace2.menuId) || (menuItems.length > 0 ? menuItems[0].id : 1));
4086
+ setSelectedThemeKey(((_result$workspace3 = result.workspace) === null || _result$workspace3 === void 0 ? void 0 : _result$workspace3.themeKey) || null);
4087
+ setActiveStep(0);
4088
+ }
4089
+ function handleImportRegistryConfirm() {
4090
+ return _handleImportRegistryConfirm.apply(this, arguments);
4091
+ }
4092
+ function _handleImportRegistryConfirm() {
4093
+ _handleImportRegistryConfirm = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
4094
+ var menuId, newItem, result, updatedWorkspace;
4095
+ return _regeneratorRuntime.wrap(function (_context2) {
4096
+ while (1) switch (_context2.prev = _context2.next) {
4097
+ case 0:
4098
+ menuId = selectedMenuId;
4099
+ if (isCreatingFolder && newFolderName.trim() && newFolderIcon) {
4100
+ newItem = {
4101
+ id: Date.now(),
4102
+ name: newFolderName.trim(),
4103
+ icon: newFolderIcon
4104
+ };
4105
+ menuId = newItem.id;
4106
+ if (onSaveMenuItem) {
4107
+ onSaveMenuItem(newItem);
4108
+ }
4109
+ }
4110
+
4111
+ // Import flow: file not yet saved, call importDashboardConfig with overrides
4112
+ if (!(creationMethod === "import" && selectedFile)) {
4113
+ _context2.next = 5;
4114
+ break;
4115
+ }
4116
+ _context2.prev = 1;
4117
+ _context2.next = 2;
4118
+ return window.mainApi.dashboardConfig.importDashboardConfig(appId, {
4119
+ filePath: selectedFile.filePath,
4120
+ name: dashboardName.trim(),
4121
+ menuId: menuId,
4122
+ themeKey: selectedThemeKey
4123
+ });
4124
+ case 2:
4125
+ result = _context2.sent;
4126
+ if (result && result.success) {
4127
+ onReloadWorkspaces && onReloadWorkspaces();
4128
+ if (onOpenWorkspace && result.workspace) {
4129
+ onOpenWorkspace(result.workspace);
4130
+ }
4131
+ handleClose();
4132
+ }
4133
+ _context2.next = 4;
4134
+ break;
4135
+ case 3:
4136
+ _context2.prev = 3;
4137
+ _context2["catch"](1);
4138
+ case 4:
4139
+ return _context2.abrupt("return");
4140
+ case 5:
4141
+ if (importedWorkspace) {
4142
+ _context2.next = 6;
4143
+ break;
4144
+ }
4145
+ return _context2.abrupt("return");
4146
+ case 6:
4147
+ updatedWorkspace = _objectSpread$y(_objectSpread$y({}, importedWorkspace), {}, {
4148
+ name: dashboardName.trim(),
4149
+ menuId: menuId,
4150
+ themeKey: selectedThemeKey
4151
+ });
4152
+ _context2.prev = 7;
4153
+ _context2.next = 8;
4154
+ return window.mainApi.workspace.saveWorkspaceForApplication(appId, updatedWorkspace);
4155
+ case 8:
4156
+ onReloadWorkspaces && onReloadWorkspaces();
4157
+ if (onOpenWorkspace) {
4158
+ onOpenWorkspace(updatedWorkspace);
4159
+ }
4160
+ handleClose();
4161
+ _context2.next = 10;
4162
+ break;
4163
+ case 9:
4164
+ _context2.prev = 9;
4165
+ _context2["catch"](7);
4166
+ case 10:
4167
+ case "end":
4168
+ return _context2.stop();
4169
+ }
4170
+ }, _callee2, null, [[1, 3], [7, 9]]);
4171
+ }));
4172
+ return _handleImportRegistryConfirm.apply(this, arguments);
4173
+ }
4057
4174
  var selectedFolder = localMenuItems.find(function (item) {
4058
4175
  return item.id === selectedMenuId;
4059
4176
  });
4060
4177
 
4178
+ // ─── Shared step renderers ──────────────────────────────────────
4179
+ function renderNameStep() {
4180
+ return /*#__PURE__*/jsxs("div", {
4181
+ className: "flex flex-row w-full h-full",
4182
+ children: [/*#__PURE__*/jsxs("div", {
4183
+ className: "flex flex-col w-1/3 p-6 py-10 space-y-4 justify-start",
4184
+ children: [/*#__PURE__*/jsx(Heading, {
4185
+ title: "Name",
4186
+ padding: false,
4187
+ textColor: "text-gray-300"
4188
+ }), /*#__PURE__*/jsx("p", {
4189
+ className: "text-base font-normal text-gray-400",
4190
+ children: "Give your new dashboard a name."
4191
+ }), dashboardName.trim() && /*#__PURE__*/jsxs("div", {
4192
+ className: "flex flex-row items-center space-x-2 mt-4 pt-4 border-t border-gray-700",
4193
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4194
+ icon: "clone",
4195
+ className: "text-blue-400"
4196
+ }), /*#__PURE__*/jsx("span", {
4197
+ className: "text-sm font-medium text-gray-300",
4198
+ children: dashboardName.trim()
4199
+ })]
4200
+ })]
4201
+ }), /*#__PURE__*/jsx("div", {
4202
+ className: "flex flex-col w-2/3 p-6 justify-start pt-10",
4203
+ children: /*#__PURE__*/jsx(InputText, {
4204
+ value: dashboardName,
4205
+ onChange: function onChange(val) {
4206
+ return setDashboardName(val);
4207
+ },
4208
+ placeholder: "Dashboard name",
4209
+ autoFocus: true
4210
+ })
4211
+ })]
4212
+ });
4213
+ }
4214
+ function renderFolderStep() {
4215
+ return /*#__PURE__*/jsxs("div", {
4216
+ className: "flex flex-row w-full h-full",
4217
+ children: [/*#__PURE__*/jsxs("div", {
4218
+ className: "flex flex-col w-1/3 p-6 py-10 space-y-4 justify-start",
4219
+ children: [/*#__PURE__*/jsx(Heading, {
4220
+ title: "Organize",
4221
+ padding: false,
4222
+ textColor: "text-gray-300"
4223
+ }), /*#__PURE__*/jsx("p", {
4224
+ className: "text-base font-normal text-gray-400",
4225
+ children: "Assign this dashboard to a folder for easy organization in the sidebar."
4226
+ }), selectedFolder && /*#__PURE__*/jsxs("div", {
4227
+ className: "flex flex-row items-center space-x-2 mt-4 pt-4 border-t border-gray-700",
4228
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4229
+ icon: selectedFolder.icon || selectedFolder.folder || "folder",
4230
+ className: "text-blue-400"
4231
+ }), /*#__PURE__*/jsx("span", {
4232
+ className: "text-sm font-medium text-gray-300",
4233
+ children: selectedFolder.name
4234
+ })]
4235
+ })]
4236
+ }), /*#__PURE__*/jsxs("div", {
4237
+ className: "flex flex-col w-2/3 p-6 overflow-y-auto space-y-2",
4238
+ children: [!isCreatingFolder ? /*#__PURE__*/jsxs("button", {
4239
+ type: "button",
4240
+ className: "flex flex-row items-center space-x-3 px-4 py-3 rounded-lg cursor-pointer transition-all text-gray-400 hover:text-gray-200 hover:bg-gray-700",
4241
+ onClick: function onClick() {
4242
+ return setIsCreatingFolder(true);
4243
+ },
4244
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4245
+ icon: "plus",
4246
+ className: "w-5 h-5"
4247
+ }), /*#__PURE__*/jsx("span", {
4248
+ className: "text-sm font-medium",
4249
+ children: "Create New Folder"
4250
+ })]
4251
+ }) : /*#__PURE__*/jsxs("div", {
4252
+ className: "flex flex-col space-y-3 p-4 rounded-lg bg-gray-800 border border-gray-700",
4253
+ children: [/*#__PURE__*/jsxs("div", {
4254
+ className: "flex flex-row items-center justify-between",
4255
+ children: [/*#__PURE__*/jsx("span", {
4256
+ className: "text-sm font-medium text-gray-300",
4257
+ children: "New Folder"
4258
+ }), /*#__PURE__*/jsx("button", {
4259
+ type: "button",
4260
+ className: "text-gray-500 hover:text-gray-300 transition-colors",
4261
+ onClick: handleCancelNewFolder,
4262
+ children: /*#__PURE__*/jsx(FontAwesomeIcon, {
4263
+ icon: "xmark"
4264
+ })
4265
+ })]
4266
+ }), /*#__PURE__*/jsx(InputText, {
4267
+ value: newFolderName,
4268
+ onChange: function onChange(val) {
4269
+ return setNewFolderName(val);
4270
+ },
4271
+ placeholder: "Folder name"
4272
+ }), /*#__PURE__*/jsx("div", {
4273
+ className: "grid grid-cols-10 gap-2",
4274
+ children: FOLDER_ICONS.map(function (icon) {
4275
+ var isIconSelected = icon === newFolderIcon;
4276
+ return /*#__PURE__*/jsx("div", {
4277
+ className: "flex items-center justify-center p-2 rounded cursor-pointer transition-all ".concat(isIconSelected ? "bg-blue-600 ring-2 ring-blue-400 text-white" : "bg-gray-700 text-gray-400 hover:bg-gray-600 hover:text-gray-200"),
4278
+ onClick: function onClick() {
4279
+ return setNewFolderIcon(icon);
4280
+ },
4281
+ children: /*#__PURE__*/jsx(FontAwesomeIcon, {
4282
+ icon: icon
4283
+ })
4284
+ }, icon);
4285
+ })
4286
+ })]
4287
+ }), localMenuItems.length > 0 && /*#__PURE__*/jsx("div", {
4288
+ className: "border-t border-gray-700 my-2"
4289
+ }), localMenuItems.map(function (item) {
4290
+ var isSelected = !isCreatingFolder && item.id === selectedMenuId;
4291
+ return /*#__PURE__*/jsxs("div", {
4292
+ className: "flex flex-row items-center space-x-3 px-4 py-3 rounded-lg cursor-pointer transition-all ".concat(isSelected ? "ring-2 ring-blue-500 bg-gray-700" : "hover:bg-gray-750 hover:ring-1 hover:ring-gray-600 bg-gray-800/50"),
4293
+ onClick: function onClick() {
4294
+ setSelectedMenuId(item.id);
4295
+ setIsCreatingFolder(false);
4296
+ setNewFolderName("");
4297
+ setNewFolderIcon(null);
4298
+ },
4299
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4300
+ icon: item.icon || item.folder || "folder",
4301
+ className: "w-5 h-5 ".concat(isSelected ? "text-blue-400" : "text-gray-400")
4302
+ }), /*#__PURE__*/jsx("span", {
4303
+ className: "text-sm font-medium ".concat(isSelected ? "text-blue-300" : "text-gray-300"),
4304
+ children: item.name
4305
+ }), isSelected && /*#__PURE__*/jsx(FontAwesomeIcon, {
4306
+ icon: "check",
4307
+ className: "ml-auto text-blue-400 text-sm"
4308
+ })]
4309
+ }, item.id);
4310
+ })]
4311
+ })]
4312
+ });
4313
+ }
4314
+ function renderThemeStep() {
4315
+ return /*#__PURE__*/jsxs("div", {
4316
+ className: "flex flex-row w-full h-full",
4317
+ children: [/*#__PURE__*/jsxs("div", {
4318
+ className: "flex flex-col w-1/3 p-6 py-10 space-y-4 justify-start",
4319
+ children: [/*#__PURE__*/jsx(Heading, {
4320
+ title: "Theme",
4321
+ padding: false,
4322
+ textColor: "text-gray-300"
4323
+ }), /*#__PURE__*/jsx("p", {
4324
+ className: "text-base font-normal text-gray-400",
4325
+ children: "Choose a theme for this dashboard, or use the application default."
4326
+ }), selectedThemeKey !== null && themes && themes[selectedThemeKey] && /*#__PURE__*/jsxs(Fragment, {
4327
+ children: [/*#__PURE__*/jsxs("div", {
4328
+ className: "flex flex-row items-center space-x-2 mt-4 pt-4 border-t border-gray-700",
4329
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4330
+ icon: "palette",
4331
+ className: "text-blue-400"
4332
+ }), /*#__PURE__*/jsx("span", {
4333
+ className: "text-sm font-medium text-gray-300",
4334
+ children: themes[selectedThemeKey].name || selectedThemeKey
4335
+ })]
4336
+ }), /*#__PURE__*/jsxs("div", {
4337
+ className: "flex flex-row space-x-2 mt-3",
4338
+ children: [themes[selectedThemeKey].primary && /*#__PURE__*/jsx("div", {
4339
+ className: "w-8 h-8 rounded bg-".concat(themes[selectedThemeKey].primary, "-500")
4340
+ }), themes[selectedThemeKey].secondary && /*#__PURE__*/jsx("div", {
4341
+ className: "w-8 h-8 rounded bg-".concat(themes[selectedThemeKey].secondary, "-500")
4342
+ }), themes[selectedThemeKey].tertiary && /*#__PURE__*/jsx("div", {
4343
+ className: "w-8 h-8 rounded bg-".concat(themes[selectedThemeKey].tertiary, "-500")
4344
+ })]
4345
+ })]
4346
+ }), selectedThemeKey === null && /*#__PURE__*/jsxs("div", {
4347
+ className: "flex flex-row items-center space-x-2 mt-4 pt-4 border-t border-gray-700",
4348
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4349
+ icon: "palette",
4350
+ className: "text-blue-400"
4351
+ }), /*#__PURE__*/jsx("span", {
4352
+ className: "text-sm font-medium text-gray-300",
4353
+ children: "App Default"
4354
+ })]
4355
+ })]
4356
+ }), /*#__PURE__*/jsxs("div", {
4357
+ className: "flex flex-col w-2/3 p-6 overflow-y-auto space-y-2",
4358
+ children: [/*#__PURE__*/jsxs("div", {
4359
+ className: "flex flex-row items-center px-4 py-3 rounded-lg cursor-pointer transition-all ".concat(selectedThemeKey === null ? "ring-2 ring-blue-500 bg-gray-700" : "hover:bg-gray-750 hover:ring-1 hover:ring-gray-600 bg-gray-800/50"),
4360
+ onClick: function onClick() {
4361
+ return setSelectedThemeKey(null);
4362
+ },
4363
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4364
+ icon: "palette",
4365
+ className: "w-5 h-5 mr-3 ".concat(selectedThemeKey === null ? "text-blue-400" : "text-gray-400")
4366
+ }), /*#__PURE__*/jsx("span", {
4367
+ className: "text-sm font-medium ".concat(selectedThemeKey === null ? "text-blue-300" : "text-gray-300"),
4368
+ children: "App Default"
4369
+ }), /*#__PURE__*/jsx("div", {
4370
+ className: "flex flex-row space-x-1 ml-auto",
4371
+ children: themes && appThemeKey && themes[appThemeKey] && /*#__PURE__*/jsxs(Fragment, {
4372
+ children: [themes[appThemeKey].primary && /*#__PURE__*/jsx("div", {
4373
+ className: "w-4 h-4 rounded bg-".concat(themes[appThemeKey].primary, "-500")
4374
+ }), themes[appThemeKey].secondary && /*#__PURE__*/jsx("div", {
4375
+ className: "w-4 h-4 rounded bg-".concat(themes[appThemeKey].secondary, "-500")
4376
+ }), themes[appThemeKey].tertiary && /*#__PURE__*/jsx("div", {
4377
+ className: "w-4 h-4 rounded bg-".concat(themes[appThemeKey].tertiary, "-500")
4378
+ })]
4379
+ })
4380
+ })]
4381
+ }), themes && Object.entries(themes).map(function (_ref2) {
4382
+ var _ref3 = _slicedToArray(_ref2, 2),
4383
+ key = _ref3[0],
4384
+ t = _ref3[1];
4385
+ var isThemeSelected = selectedThemeKey === key;
4386
+ return /*#__PURE__*/jsxs("div", {
4387
+ className: "flex flex-row items-center px-4 py-3 rounded-lg cursor-pointer transition-all ".concat(isThemeSelected ? "ring-2 ring-blue-500 bg-gray-700" : "hover:bg-gray-750 hover:ring-1 hover:ring-gray-600 bg-gray-800/50"),
4388
+ onClick: function onClick() {
4389
+ return setSelectedThemeKey(key);
4390
+ },
4391
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4392
+ icon: "palette",
4393
+ className: "w-5 h-5 mr-3 ".concat(isThemeSelected ? "text-blue-400" : "text-gray-400")
4394
+ }), /*#__PURE__*/jsx("span", {
4395
+ className: "text-sm font-medium ".concat(isThemeSelected ? "text-blue-300" : "text-gray-300"),
4396
+ children: t.name || key
4397
+ }), /*#__PURE__*/jsxs("div", {
4398
+ className: "flex flex-row space-x-1 ml-auto",
4399
+ children: [t.primary && /*#__PURE__*/jsx("div", {
4400
+ className: "w-4 h-4 rounded bg-".concat(t.primary, "-500")
4401
+ }), t.secondary && /*#__PURE__*/jsx("div", {
4402
+ className: "w-4 h-4 rounded bg-".concat(t.secondary, "-500")
4403
+ }), t.tertiary && /*#__PURE__*/jsx("div", {
4404
+ className: "w-4 h-4 rounded bg-".concat(t.tertiary, "-500")
4405
+ })]
4406
+ })]
4407
+ }, key);
4408
+ })]
4409
+ })]
4410
+ });
4411
+ }
4412
+ function renderFileStep() {
4413
+ var fileName = selectedFile !== null && selectedFile !== void 0 && selectedFile.filePath ? selectedFile.filePath.split("/").pop() : null;
4414
+ return /*#__PURE__*/jsxs("div", {
4415
+ className: "flex flex-row w-full h-full",
4416
+ children: [/*#__PURE__*/jsxs("div", {
4417
+ className: "flex flex-col w-1/3 p-6 py-10 space-y-4 justify-start",
4418
+ children: [/*#__PURE__*/jsx(Heading, {
4419
+ title: "File",
4420
+ padding: false,
4421
+ textColor: "text-gray-300"
4422
+ }), /*#__PURE__*/jsxs("p", {
4423
+ className: "text-base font-normal text-gray-400",
4424
+ children: ["Select a dashboard ZIP file downloaded from the registry or shared by a developer you trust. The filename should begin with", " ", /*#__PURE__*/jsx("code", {
4425
+ className: "text-gray-300",
4426
+ children: "dashboard"
4427
+ }), " and end with", " ", /*#__PURE__*/jsx("code", {
4428
+ className: "text-gray-300",
4429
+ children: ".zip"
4430
+ }), "."]
4431
+ }), fileName && /*#__PURE__*/jsxs("div", {
4432
+ className: "flex flex-row items-center space-x-2 mt-4 pt-4 border-t border-gray-700",
4433
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4434
+ icon: "file-zipper",
4435
+ className: "text-blue-400"
4436
+ }), /*#__PURE__*/jsx("span", {
4437
+ className: "text-sm font-medium text-gray-300",
4438
+ children: fileName
4439
+ })]
4440
+ })]
4441
+ }), /*#__PURE__*/jsxs("div", {
4442
+ className: "flex flex-col w-2/3 p-6 justify-start pt-10 space-y-4",
4443
+ children: [fileName && /*#__PURE__*/jsxs("div", {
4444
+ className: "flex flex-row items-center space-x-3 p-4 rounded-lg bg-gray-800 border border-gray-700",
4445
+ children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4446
+ icon: "file-zipper",
4447
+ className: "text-blue-400 text-lg"
4448
+ }), /*#__PURE__*/jsx("span", {
4449
+ className: "text-sm font-medium text-gray-300 truncate",
4450
+ children: fileName
4451
+ })]
4452
+ }), /*#__PURE__*/jsx(Button, {
4453
+ onClick: handleImportFromFile,
4454
+ title: "Choose File",
4455
+ textSize: "text-base",
4456
+ padding: "py-2 px-4",
4457
+ backgroundColor: "bg-blue-600",
4458
+ textColor: "text-white",
4459
+ hoverTextColor: "hover:text-white",
4460
+ hoverBackgroundColor: "hover:bg-blue-500",
4461
+ icon: "folder-open"
4462
+ })]
4463
+ })]
4464
+ });
4465
+ }
4466
+
4061
4467
  // ─── Render body based on creationMethod ─────────────────────────
4062
4468
  function renderBody() {
4063
4469
  if (creationMethod === null) {
@@ -4076,7 +4482,9 @@ var LayoutManagerModal = function LayoutManagerModal(_ref) {
4076
4482
  })
4077
4483
  });
4078
4484
  }
4079
- if (creationMethod === "registry") {
4485
+
4486
+ // Registry browser: show until install completes
4487
+ if (creationMethod === "registry" && !importedWorkspace) {
4080
4488
  return /*#__PURE__*/jsx(Panel, {
4081
4489
  backgroundColor: "bg-slate-800",
4082
4490
  padding: false,
@@ -4087,7 +4495,74 @@ var LayoutManagerModal = function LayoutManagerModal(_ref) {
4087
4495
  onBack: function onBack() {
4088
4496
  return setCreationMethod(null);
4089
4497
  },
4090
- appId: appId
4498
+ appId: appId,
4499
+ onInstallComplete: handleRegistryInstallComplete
4500
+ })
4501
+ })
4502
+ });
4503
+ }
4504
+
4505
+ // Import stepper: 4 steps (File, Name, Folder, Theme)
4506
+ if (creationMethod === "import") {
4507
+ return /*#__PURE__*/jsx(Panel, {
4508
+ backgroundColor: "bg-slate-800",
4509
+ padding: false,
4510
+ children: /*#__PURE__*/jsx(Panel.Body, {
4511
+ scrollable: false,
4512
+ className: "h-full",
4513
+ children: /*#__PURE__*/jsxs(Stepper, {
4514
+ activeStep: activeStep,
4515
+ onStepChange: setActiveStep,
4516
+ showNavigation: false,
4517
+ className: "h-full p-6 pb-0",
4518
+ children: [/*#__PURE__*/jsx(Stepper.Step, {
4519
+ label: "File",
4520
+ description: "Select a file",
4521
+ children: renderFileStep()
4522
+ }), /*#__PURE__*/jsx(Stepper.Step, {
4523
+ label: "Name",
4524
+ description: "Name your dashboard",
4525
+ children: renderNameStep()
4526
+ }), /*#__PURE__*/jsx(Stepper.Step, {
4527
+ label: "Organize",
4528
+ description: "Choose a folder",
4529
+ children: renderFolderStep()
4530
+ }), /*#__PURE__*/jsx(Stepper.Step, {
4531
+ label: "Choose Theme",
4532
+ description: "Dashboard theme",
4533
+ children: renderThemeStep()
4534
+ })]
4535
+ })
4536
+ })
4537
+ });
4538
+ }
4539
+
4540
+ // Registry stepper: 3 steps (Name, Folder, Theme)
4541
+ if (creationMethod === "registry" && importedWorkspace) {
4542
+ return /*#__PURE__*/jsx(Panel, {
4543
+ backgroundColor: "bg-slate-800",
4544
+ padding: false,
4545
+ children: /*#__PURE__*/jsx(Panel.Body, {
4546
+ scrollable: false,
4547
+ className: "h-full",
4548
+ children: /*#__PURE__*/jsxs(Stepper, {
4549
+ activeStep: activeStep,
4550
+ onStepChange: setActiveStep,
4551
+ showNavigation: false,
4552
+ className: "h-full p-6 pb-0",
4553
+ children: [/*#__PURE__*/jsx(Stepper.Step, {
4554
+ label: "Name",
4555
+ description: "Name your dashboard",
4556
+ children: renderNameStep()
4557
+ }), /*#__PURE__*/jsx(Stepper.Step, {
4558
+ label: "Organize",
4559
+ description: "Choose a folder",
4560
+ children: renderFolderStep()
4561
+ }), /*#__PURE__*/jsx(Stepper.Step, {
4562
+ label: "Choose Theme",
4563
+ description: "Dashboard theme",
4564
+ children: renderThemeStep()
4565
+ })]
4091
4566
  })
4092
4567
  })
4093
4568
  });
@@ -4108,39 +4583,7 @@ var LayoutManagerModal = function LayoutManagerModal(_ref) {
4108
4583
  children: [/*#__PURE__*/jsx(Stepper.Step, {
4109
4584
  label: "Name",
4110
4585
  description: "Name your dashboard",
4111
- children: /*#__PURE__*/jsxs("div", {
4112
- className: "flex flex-row w-full h-full",
4113
- children: [/*#__PURE__*/jsxs("div", {
4114
- className: "flex flex-col w-1/3 p-6 py-10 space-y-4 justify-start",
4115
- children: [/*#__PURE__*/jsx(Heading, {
4116
- title: "Name",
4117
- padding: false,
4118
- textColor: "text-gray-300"
4119
- }), /*#__PURE__*/jsx("p", {
4120
- className: "text-base font-normal text-gray-400",
4121
- children: "Give your new dashboard a name."
4122
- }), dashboardName.trim() && /*#__PURE__*/jsxs("div", {
4123
- className: "flex flex-row items-center space-x-2 mt-4 pt-4 border-t border-gray-700",
4124
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4125
- icon: "clone",
4126
- className: "text-blue-400"
4127
- }), /*#__PURE__*/jsx("span", {
4128
- className: "text-sm font-medium text-gray-300",
4129
- children: dashboardName.trim()
4130
- })]
4131
- })]
4132
- }), /*#__PURE__*/jsx("div", {
4133
- className: "flex flex-col w-2/3 p-6 justify-start pt-10",
4134
- children: /*#__PURE__*/jsx(InputText, {
4135
- value: dashboardName,
4136
- onChange: function onChange(val) {
4137
- return setDashboardName(val);
4138
- },
4139
- placeholder: "Dashboard name",
4140
- autoFocus: true
4141
- })
4142
- })]
4143
- })
4586
+ children: renderNameStep()
4144
4587
  }), /*#__PURE__*/jsx(Stepper.Step, {
4145
4588
  label: "Choose Layout",
4146
4589
  description: "Pick a template",
@@ -4152,203 +4595,11 @@ var LayoutManagerModal = function LayoutManagerModal(_ref) {
4152
4595
  }), /*#__PURE__*/jsx(Stepper.Step, {
4153
4596
  label: "Organize",
4154
4597
  description: "Choose a folder",
4155
- children: /*#__PURE__*/jsxs("div", {
4156
- className: "flex flex-row w-full h-full",
4157
- children: [/*#__PURE__*/jsxs("div", {
4158
- className: "flex flex-col w-1/3 p-6 py-10 space-y-4 justify-start",
4159
- children: [/*#__PURE__*/jsx(Heading, {
4160
- title: "Organize",
4161
- padding: false,
4162
- textColor: "text-gray-300"
4163
- }), /*#__PURE__*/jsx("p", {
4164
- className: "text-base font-normal text-gray-400",
4165
- children: "Assign this dashboard to a folder for easy organization in the sidebar."
4166
- }), selectedFolder && /*#__PURE__*/jsxs("div", {
4167
- className: "flex flex-row items-center space-x-2 mt-4 pt-4 border-t border-gray-700",
4168
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4169
- icon: selectedFolder.icon || selectedFolder.folder || "folder",
4170
- className: "text-blue-400"
4171
- }), /*#__PURE__*/jsx("span", {
4172
- className: "text-sm font-medium text-gray-300",
4173
- children: selectedFolder.name
4174
- })]
4175
- })]
4176
- }), /*#__PURE__*/jsxs("div", {
4177
- className: "flex flex-col w-2/3 p-6 overflow-y-auto space-y-2",
4178
- children: [!isCreatingFolder ? /*#__PURE__*/jsxs("button", {
4179
- type: "button",
4180
- className: "flex flex-row items-center space-x-3 px-4 py-3 rounded-lg cursor-pointer transition-all text-gray-400 hover:text-gray-200 hover:bg-gray-700",
4181
- onClick: function onClick() {
4182
- return setIsCreatingFolder(true);
4183
- },
4184
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4185
- icon: "plus",
4186
- className: "w-5 h-5"
4187
- }), /*#__PURE__*/jsx("span", {
4188
- className: "text-sm font-medium",
4189
- children: "Create New Folder"
4190
- })]
4191
- }) : /*#__PURE__*/jsxs("div", {
4192
- className: "flex flex-col space-y-3 p-4 rounded-lg bg-gray-800 border border-gray-700",
4193
- children: [/*#__PURE__*/jsxs("div", {
4194
- className: "flex flex-row items-center justify-between",
4195
- children: [/*#__PURE__*/jsx("span", {
4196
- className: "text-sm font-medium text-gray-300",
4197
- children: "New Folder"
4198
- }), /*#__PURE__*/jsx("button", {
4199
- type: "button",
4200
- className: "text-gray-500 hover:text-gray-300 transition-colors",
4201
- onClick: handleCancelNewFolder,
4202
- children: /*#__PURE__*/jsx(FontAwesomeIcon, {
4203
- icon: "xmark"
4204
- })
4205
- })]
4206
- }), /*#__PURE__*/jsx(InputText, {
4207
- value: newFolderName,
4208
- onChange: function onChange(val) {
4209
- return setNewFolderName(val);
4210
- },
4211
- placeholder: "Folder name"
4212
- }), /*#__PURE__*/jsx("div", {
4213
- className: "grid grid-cols-10 gap-2",
4214
- children: FOLDER_ICONS.map(function (icon) {
4215
- var isIconSelected = icon === newFolderIcon;
4216
- return /*#__PURE__*/jsx("div", {
4217
- className: "flex items-center justify-center p-2 rounded cursor-pointer transition-all ".concat(isIconSelected ? "bg-blue-600 ring-2 ring-blue-400 text-white" : "bg-gray-700 text-gray-400 hover:bg-gray-600 hover:text-gray-200"),
4218
- onClick: function onClick() {
4219
- return setNewFolderIcon(icon);
4220
- },
4221
- children: /*#__PURE__*/jsx(FontAwesomeIcon, {
4222
- icon: icon
4223
- })
4224
- }, icon);
4225
- })
4226
- })]
4227
- }), localMenuItems.length > 0 && /*#__PURE__*/jsx("div", {
4228
- className: "border-t border-gray-700 my-2"
4229
- }), localMenuItems.map(function (item) {
4230
- var isSelected = !isCreatingFolder && item.id === selectedMenuId;
4231
- return /*#__PURE__*/jsxs("div", {
4232
- className: "flex flex-row items-center space-x-3 px-4 py-3 rounded-lg cursor-pointer transition-all ".concat(isSelected ? "ring-2 ring-blue-500 bg-gray-700" : "hover:bg-gray-750 hover:ring-1 hover:ring-gray-600 bg-gray-800/50"),
4233
- onClick: function onClick() {
4234
- setSelectedMenuId(item.id);
4235
- setIsCreatingFolder(false);
4236
- setNewFolderName("");
4237
- setNewFolderIcon(null);
4238
- },
4239
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4240
- icon: item.icon || item.folder || "folder",
4241
- className: "w-5 h-5 ".concat(isSelected ? "text-blue-400" : "text-gray-400")
4242
- }), /*#__PURE__*/jsx("span", {
4243
- className: "text-sm font-medium ".concat(isSelected ? "text-blue-300" : "text-gray-300"),
4244
- children: item.name
4245
- }), isSelected && /*#__PURE__*/jsx(FontAwesomeIcon, {
4246
- icon: "check",
4247
- className: "ml-auto text-blue-400 text-sm"
4248
- })]
4249
- }, item.id);
4250
- })]
4251
- })]
4252
- })
4598
+ children: renderFolderStep()
4253
4599
  }), /*#__PURE__*/jsx(Stepper.Step, {
4254
4600
  label: "Choose Theme",
4255
4601
  description: "Dashboard theme",
4256
- children: /*#__PURE__*/jsxs("div", {
4257
- className: "flex flex-row w-full h-full",
4258
- children: [/*#__PURE__*/jsxs("div", {
4259
- className: "flex flex-col w-1/3 p-6 py-10 space-y-4 justify-start",
4260
- children: [/*#__PURE__*/jsx(Heading, {
4261
- title: "Theme",
4262
- padding: false,
4263
- textColor: "text-gray-300"
4264
- }), /*#__PURE__*/jsx("p", {
4265
- className: "text-base font-normal text-gray-400",
4266
- children: "Choose a theme for this dashboard, or use the application default."
4267
- }), selectedThemeKey !== null && themes && themes[selectedThemeKey] && /*#__PURE__*/jsxs(Fragment, {
4268
- children: [/*#__PURE__*/jsxs("div", {
4269
- className: "flex flex-row items-center space-x-2 mt-4 pt-4 border-t border-gray-700",
4270
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4271
- icon: "palette",
4272
- className: "text-blue-400"
4273
- }), /*#__PURE__*/jsx("span", {
4274
- className: "text-sm font-medium text-gray-300",
4275
- children: themes[selectedThemeKey].name || selectedThemeKey
4276
- })]
4277
- }), /*#__PURE__*/jsxs("div", {
4278
- className: "flex flex-row space-x-2 mt-3",
4279
- children: [themes[selectedThemeKey].primary && /*#__PURE__*/jsx("div", {
4280
- className: "w-8 h-8 rounded bg-".concat(themes[selectedThemeKey].primary, "-500")
4281
- }), themes[selectedThemeKey].secondary && /*#__PURE__*/jsx("div", {
4282
- className: "w-8 h-8 rounded bg-".concat(themes[selectedThemeKey].secondary, "-500")
4283
- }), themes[selectedThemeKey].tertiary && /*#__PURE__*/jsx("div", {
4284
- className: "w-8 h-8 rounded bg-".concat(themes[selectedThemeKey].tertiary, "-500")
4285
- })]
4286
- })]
4287
- }), selectedThemeKey === null && /*#__PURE__*/jsxs("div", {
4288
- className: "flex flex-row items-center space-x-2 mt-4 pt-4 border-t border-gray-700",
4289
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4290
- icon: "palette",
4291
- className: "text-blue-400"
4292
- }), /*#__PURE__*/jsx("span", {
4293
- className: "text-sm font-medium text-gray-300",
4294
- children: "App Default"
4295
- })]
4296
- })]
4297
- }), /*#__PURE__*/jsxs("div", {
4298
- className: "flex flex-col w-2/3 p-6 overflow-y-auto space-y-2",
4299
- children: [/*#__PURE__*/jsxs("div", {
4300
- className: "flex flex-row items-center px-4 py-3 rounded-lg cursor-pointer transition-all ".concat(selectedThemeKey === null ? "ring-2 ring-blue-500 bg-gray-700" : "hover:bg-gray-750 hover:ring-1 hover:ring-gray-600 bg-gray-800/50"),
4301
- onClick: function onClick() {
4302
- return setSelectedThemeKey(null);
4303
- },
4304
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4305
- icon: "palette",
4306
- className: "w-5 h-5 mr-3 ".concat(selectedThemeKey === null ? "text-blue-400" : "text-gray-400")
4307
- }), /*#__PURE__*/jsx("span", {
4308
- className: "text-sm font-medium ".concat(selectedThemeKey === null ? "text-blue-300" : "text-gray-300"),
4309
- children: "App Default"
4310
- }), /*#__PURE__*/jsx("div", {
4311
- className: "flex flex-row space-x-1 ml-auto",
4312
- children: themes && appThemeKey && themes[appThemeKey] && /*#__PURE__*/jsxs(Fragment, {
4313
- children: [themes[appThemeKey].primary && /*#__PURE__*/jsx("div", {
4314
- className: "w-4 h-4 rounded bg-".concat(themes[appThemeKey].primary, "-500")
4315
- }), themes[appThemeKey].secondary && /*#__PURE__*/jsx("div", {
4316
- className: "w-4 h-4 rounded bg-".concat(themes[appThemeKey].secondary, "-500")
4317
- }), themes[appThemeKey].tertiary && /*#__PURE__*/jsx("div", {
4318
- className: "w-4 h-4 rounded bg-".concat(themes[appThemeKey].tertiary, "-500")
4319
- })]
4320
- })
4321
- })]
4322
- }), themes && Object.entries(themes).map(function (_ref2) {
4323
- var _ref3 = _slicedToArray(_ref2, 2),
4324
- key = _ref3[0],
4325
- t = _ref3[1];
4326
- var isThemeSelected = selectedThemeKey === key;
4327
- return /*#__PURE__*/jsxs("div", {
4328
- className: "flex flex-row items-center px-4 py-3 rounded-lg cursor-pointer transition-all ".concat(isThemeSelected ? "ring-2 ring-blue-500 bg-gray-700" : "hover:bg-gray-750 hover:ring-1 hover:ring-gray-600 bg-gray-800/50"),
4329
- onClick: function onClick() {
4330
- return setSelectedThemeKey(key);
4331
- },
4332
- children: [/*#__PURE__*/jsx(FontAwesomeIcon, {
4333
- icon: "palette",
4334
- className: "w-5 h-5 mr-3 ".concat(isThemeSelected ? "text-blue-400" : "text-gray-400")
4335
- }), /*#__PURE__*/jsx("span", {
4336
- className: "text-sm font-medium ".concat(isThemeSelected ? "text-blue-300" : "text-gray-300"),
4337
- children: t.name || key
4338
- }), /*#__PURE__*/jsxs("div", {
4339
- className: "flex flex-row space-x-1 ml-auto",
4340
- children: [t.primary && /*#__PURE__*/jsx("div", {
4341
- className: "w-4 h-4 rounded bg-".concat(t.primary, "-500")
4342
- }), t.secondary && /*#__PURE__*/jsx("div", {
4343
- className: "w-4 h-4 rounded bg-".concat(t.secondary, "-500")
4344
- }), t.tertiary && /*#__PURE__*/jsx("div", {
4345
- className: "w-4 h-4 rounded bg-".concat(t.tertiary, "-500")
4346
- })]
4347
- })]
4348
- }, key);
4349
- })]
4350
- })]
4351
- })
4602
+ children: renderThemeStep()
4352
4603
  })]
4353
4604
  })
4354
4605
  })
@@ -4376,8 +4627,8 @@ var LayoutManagerModal = function LayoutManagerModal(_ref) {
4376
4627
  });
4377
4628
  }
4378
4629
 
4379
- // Registry screen: Cancel button only (DiscoverDashboardsDetail has its own inline back button)
4380
- if (creationMethod === "registry") {
4630
+ // Registry browser: Cancel only (DiscoverDashboardsDetail has its own inline back button)
4631
+ if (creationMethod === "registry" && !importedWorkspace) {
4381
4632
  return /*#__PURE__*/jsx(Modal.Footer, {
4382
4633
  children: /*#__PURE__*/jsx("div", {
4383
4634
  className: "flex flex-row space-x-2",
@@ -4395,6 +4646,189 @@ var LayoutManagerModal = function LayoutManagerModal(_ref) {
4395
4646
  });
4396
4647
  }
4397
4648
 
4649
+ // Import stepper footer: 4 steps (File, Name, Organize, Theme)
4650
+ if (creationMethod === "import") {
4651
+ return /*#__PURE__*/jsx(Modal.Footer, {
4652
+ children: /*#__PURE__*/jsxs("div", {
4653
+ className: "flex flex-row space-x-2",
4654
+ children: [activeStep === 0 && /*#__PURE__*/jsxs(Fragment, {
4655
+ children: [/*#__PURE__*/jsx(Button, {
4656
+ onClick: handleClose,
4657
+ title: "Cancel",
4658
+ textSize: "text-base xl:text-lg",
4659
+ padding: "py-2 px-4",
4660
+ backgroundColor: "bg-gray-700",
4661
+ textColor: "text-gray-300",
4662
+ hoverTextColor: "hover:text-gray-100",
4663
+ hoverBackgroundColor: "hover:bg-gray-600"
4664
+ }), /*#__PURE__*/jsx(Button, {
4665
+ onClick: function onClick() {
4666
+ return setActiveStep(1);
4667
+ },
4668
+ title: "Next",
4669
+ textSize: "text-base xl:text-lg",
4670
+ padding: "py-2 px-4",
4671
+ backgroundColor: "bg-blue-600",
4672
+ textColor: "text-white",
4673
+ hoverTextColor: "hover:text-white",
4674
+ hoverBackgroundColor: "hover:bg-blue-500",
4675
+ disabled: !selectedFile
4676
+ })]
4677
+ }), activeStep === 1 && /*#__PURE__*/jsxs(Fragment, {
4678
+ children: [/*#__PURE__*/jsx(Button, {
4679
+ onClick: function onClick() {
4680
+ return setActiveStep(0);
4681
+ },
4682
+ title: "Back",
4683
+ textSize: "text-base xl:text-lg",
4684
+ padding: "py-2 px-4",
4685
+ backgroundColor: "bg-gray-700",
4686
+ textColor: "text-gray-300",
4687
+ hoverTextColor: "hover:text-gray-100",
4688
+ hoverBackgroundColor: "hover:bg-gray-600"
4689
+ }), /*#__PURE__*/jsx(Button, {
4690
+ onClick: function onClick() {
4691
+ return setActiveStep(2);
4692
+ },
4693
+ title: "Next",
4694
+ textSize: "text-base xl:text-lg",
4695
+ padding: "py-2 px-4",
4696
+ backgroundColor: "bg-blue-600",
4697
+ textColor: "text-white",
4698
+ hoverTextColor: "hover:text-white",
4699
+ hoverBackgroundColor: "hover:bg-blue-500",
4700
+ disabled: !dashboardName.trim()
4701
+ })]
4702
+ }), activeStep === 2 && /*#__PURE__*/jsxs(Fragment, {
4703
+ children: [/*#__PURE__*/jsx(Button, {
4704
+ onClick: function onClick() {
4705
+ return setActiveStep(1);
4706
+ },
4707
+ title: "Back",
4708
+ textSize: "text-base xl:text-lg",
4709
+ padding: "py-2 px-4",
4710
+ backgroundColor: "bg-gray-700",
4711
+ textColor: "text-gray-300",
4712
+ hoverTextColor: "hover:text-gray-100",
4713
+ hoverBackgroundColor: "hover:bg-gray-600"
4714
+ }), /*#__PURE__*/jsx(Button, {
4715
+ onClick: function onClick() {
4716
+ return setActiveStep(3);
4717
+ },
4718
+ title: "Next",
4719
+ textSize: "text-base xl:text-lg",
4720
+ padding: "py-2 px-4",
4721
+ backgroundColor: "bg-blue-600",
4722
+ textColor: "text-white",
4723
+ hoverTextColor: "hover:text-white",
4724
+ hoverBackgroundColor: "hover:bg-blue-500"
4725
+ })]
4726
+ }), activeStep === 3 && /*#__PURE__*/jsxs(Fragment, {
4727
+ children: [/*#__PURE__*/jsx(Button, {
4728
+ onClick: function onClick() {
4729
+ return setActiveStep(2);
4730
+ },
4731
+ title: "Back",
4732
+ textSize: "text-base xl:text-lg",
4733
+ padding: "py-2 px-4",
4734
+ backgroundColor: "bg-gray-700",
4735
+ textColor: "text-gray-300",
4736
+ hoverTextColor: "hover:text-gray-100",
4737
+ hoverBackgroundColor: "hover:bg-gray-600"
4738
+ }), /*#__PURE__*/jsx(Button, {
4739
+ onClick: handleImportRegistryConfirm,
4740
+ title: "Save",
4741
+ textSize: "text-base xl:text-lg",
4742
+ padding: "py-2 px-4",
4743
+ backgroundColor: "bg-blue-600",
4744
+ textColor: "text-white",
4745
+ hoverTextColor: "hover:text-white",
4746
+ hoverBackgroundColor: "hover:bg-blue-500"
4747
+ })]
4748
+ })]
4749
+ })
4750
+ });
4751
+ }
4752
+
4753
+ // Registry stepper footer: 3 steps (Name, Organize, Theme)
4754
+ if (creationMethod === "registry" && importedWorkspace) {
4755
+ return /*#__PURE__*/jsx(Modal.Footer, {
4756
+ children: /*#__PURE__*/jsxs("div", {
4757
+ className: "flex flex-row space-x-2",
4758
+ children: [activeStep === 0 && /*#__PURE__*/jsxs(Fragment, {
4759
+ children: [/*#__PURE__*/jsx(Button, {
4760
+ onClick: handleClose,
4761
+ title: "Cancel",
4762
+ textSize: "text-base xl:text-lg",
4763
+ padding: "py-2 px-4",
4764
+ backgroundColor: "bg-gray-700",
4765
+ textColor: "text-gray-300",
4766
+ hoverTextColor: "hover:text-gray-100",
4767
+ hoverBackgroundColor: "hover:bg-gray-600"
4768
+ }), /*#__PURE__*/jsx(Button, {
4769
+ onClick: function onClick() {
4770
+ return setActiveStep(1);
4771
+ },
4772
+ title: "Next",
4773
+ textSize: "text-base xl:text-lg",
4774
+ padding: "py-2 px-4",
4775
+ backgroundColor: "bg-blue-600",
4776
+ textColor: "text-white",
4777
+ hoverTextColor: "hover:text-white",
4778
+ hoverBackgroundColor: "hover:bg-blue-500",
4779
+ disabled: !dashboardName.trim()
4780
+ })]
4781
+ }), activeStep === 1 && /*#__PURE__*/jsxs(Fragment, {
4782
+ children: [/*#__PURE__*/jsx(Button, {
4783
+ onClick: function onClick() {
4784
+ return setActiveStep(0);
4785
+ },
4786
+ title: "Back",
4787
+ textSize: "text-base xl:text-lg",
4788
+ padding: "py-2 px-4",
4789
+ backgroundColor: "bg-gray-700",
4790
+ textColor: "text-gray-300",
4791
+ hoverTextColor: "hover:text-gray-100",
4792
+ hoverBackgroundColor: "hover:bg-gray-600"
4793
+ }), /*#__PURE__*/jsx(Button, {
4794
+ onClick: function onClick() {
4795
+ return setActiveStep(2);
4796
+ },
4797
+ title: "Next",
4798
+ textSize: "text-base xl:text-lg",
4799
+ padding: "py-2 px-4",
4800
+ backgroundColor: "bg-blue-600",
4801
+ textColor: "text-white",
4802
+ hoverTextColor: "hover:text-white",
4803
+ hoverBackgroundColor: "hover:bg-blue-500"
4804
+ })]
4805
+ }), activeStep === 2 && /*#__PURE__*/jsxs(Fragment, {
4806
+ children: [/*#__PURE__*/jsx(Button, {
4807
+ onClick: function onClick() {
4808
+ return setActiveStep(1);
4809
+ },
4810
+ title: "Back",
4811
+ textSize: "text-base xl:text-lg",
4812
+ padding: "py-2 px-4",
4813
+ backgroundColor: "bg-gray-700",
4814
+ textColor: "text-gray-300",
4815
+ hoverTextColor: "hover:text-gray-100",
4816
+ hoverBackgroundColor: "hover:bg-gray-600"
4817
+ }), /*#__PURE__*/jsx(Button, {
4818
+ onClick: handleImportRegistryConfirm,
4819
+ title: "Save",
4820
+ textSize: "text-base xl:text-lg",
4821
+ padding: "py-2 px-4",
4822
+ backgroundColor: "bg-blue-600",
4823
+ textColor: "text-white",
4824
+ hoverTextColor: "hover:text-white",
4825
+ hoverBackgroundColor: "hover:bg-blue-500"
4826
+ })]
4827
+ })]
4828
+ })
4829
+ });
4830
+ }
4831
+
4398
4832
  // Template wizard footer
4399
4833
  return /*#__PURE__*/jsx(Modal.Footer, {
4400
4834
  children: /*#__PURE__*/jsxs("div", {
@@ -32764,7 +33198,8 @@ var DashboardsSection = function DashboardsSection(_ref) {
32764
33198
  children: /*#__PURE__*/jsx(SearchInput, {
32765
33199
  value: searchQuery,
32766
33200
  onChange: setSearchQuery,
32767
- placeholder: "Search dashboards..."
33201
+ placeholder: "Search dashboards...",
33202
+ inputClassName: "py-1.5 text-xs"
32768
33203
  })
32769
33204
  }), /*#__PURE__*/jsx(ButtonIcon, {
32770
33205
  icon: "file-import",
@@ -32772,36 +33207,34 @@ var DashboardsSection = function DashboardsSection(_ref) {
32772
33207
  size: "sm",
32773
33208
  title: "Import dashboard"
32774
33209
  })]
32775
- }), /*#__PURE__*/jsx(Tabs3, {
32776
- value: installMode === "marketplace" ? "marketplace" : viewMode,
32777
- onValueChange: function onValueChange(val) {
32778
- if (val === "marketplace") {
32779
- setInstallMode("marketplace");
32780
- setSelectedId(null);
32781
- } else {
32782
- setInstallMode(null);
32783
- setImportResult(null);
32784
- setViewMode(val);
32785
- }
32786
- },
32787
- backgroundColor: "bg-transparent",
32788
- spacing: "p-0",
32789
- children: /*#__PURE__*/jsxs(Tabs3.List, {
32790
- className: "w-full flex",
32791
- spacing: "p-0.5",
32792
- children: [/*#__PURE__*/jsx(Tabs3.Trigger, {
32793
- value: "grouped",
32794
- className: "flex-1",
32795
- children: "Grouped"
32796
- }), /*#__PURE__*/jsx(Tabs3.Trigger, {
32797
- value: "alphabetical",
32798
- className: "flex-1",
32799
- children: "A-Z"
32800
- }), /*#__PURE__*/jsx(Tabs3.Trigger, {
32801
- value: "marketplace",
32802
- className: "flex-1",
32803
- children: "Marketplace"
32804
- })]
33210
+ }), /*#__PURE__*/jsx("div", {
33211
+ className: "flex bg-white/5 rounded-md p-0.5",
33212
+ children: [{
33213
+ key: "grouped",
33214
+ label: "Grouped"
33215
+ }, {
33216
+ key: "alphabetical",
33217
+ label: "A-Z"
33218
+ }, {
33219
+ key: "marketplace",
33220
+ label: "Marketplace"
33221
+ }].map(function (tab) {
33222
+ var currentTab = installMode === "marketplace" ? "marketplace" : viewMode;
33223
+ return /*#__PURE__*/jsx("button", {
33224
+ type: "button",
33225
+ onClick: function onClick() {
33226
+ if (tab.key === "marketplace") {
33227
+ setInstallMode("marketplace");
33228
+ setSelectedId(null);
33229
+ } else {
33230
+ setInstallMode(null);
33231
+ setImportResult(null);
33232
+ setViewMode(tab.key);
33233
+ }
33234
+ },
33235
+ className: "flex-1 px-2 py-0.5 rounded text-[11px] transition-colors ".concat(currentTab === tab.key ? "bg-white/10 font-medium opacity-90" : "opacity-50 hover:opacity-70"),
33236
+ children: tab.label
33237
+ }, tab.key);
32805
33238
  })
32806
33239
  })]
32807
33240
  }), /*#__PURE__*/jsx("div", {
@@ -41615,7 +42048,8 @@ var DashboardStageInner = function DashboardStageInner(_ref2) {
41615
42048
  menuItems: menuItems,
41616
42049
  onSaveMenuItem: handleSaveNewMenuItem,
41617
42050
  appId: credentials === null || credentials === void 0 ? void 0 : credentials.appId,
41618
- onReloadWorkspaces: loadWorkspaces
42051
+ onReloadWorkspaces: loadWorkspaces,
42052
+ onOpenWorkspace: handleOpenTab
41619
42053
  })]
41620
42054
  })]
41621
42055
  }), !popout && /*#__PURE__*/jsx(DashCommandPalette, {