@trops/dash-core 0.1.195 → 0.1.197

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.js CHANGED
@@ -5274,192 +5274,6 @@ var LayoutQuickAddMenu = function LayoutQuickAddMenu(_ref) {
5274
5274
  });
5275
5275
  };
5276
5276
 
5277
- var CATEGORIES = [{
5278
- key: "reporting",
5279
- label: "Reporting",
5280
- icon: "chart-bar",
5281
- description: "Dashboards for data visualization and reports"
5282
- }, {
5283
- key: "monitoring",
5284
- label: "Monitoring",
5285
- icon: "heart-pulse",
5286
- description: "System health, uptime, and performance monitoring"
5287
- }, {
5288
- key: "productivity",
5289
- label: "Productivity",
5290
- icon: "list-check",
5291
- description: "Task tracking, calendars, and workflow management"
5292
- }, {
5293
- key: "development",
5294
- label: "Development",
5295
- icon: "code",
5296
- description: "Code repos, CI/CD, and developer tools"
5297
- }, {
5298
- key: "communication",
5299
- label: "Communication",
5300
- icon: "comments",
5301
- description: "Messages, channels, and team communication"
5302
- }, {
5303
- key: "custom",
5304
- label: "Custom",
5305
- icon: "grid-2",
5306
- description: "Build a fully custom dashboard"
5307
- }];
5308
-
5309
- /**
5310
- * WizardIntentStep
5311
- *
5312
- * Step 0 of the Dashboard Wizard. Presents category cards so the user
5313
- * can indicate what kind of dashboard they want to build.
5314
- * Multi-select — user can pick multiple categories.
5315
- *
5316
- * @param {Object} props
5317
- * @param {Object} props.state - Wizard state from useWizardState
5318
- * @param {Function} props.dispatch - Wizard dispatch from useWizardState
5319
- */
5320
- var WizardIntentStep = function WizardIntentStep(_ref) {
5321
- var state = _ref.state,
5322
- dispatch = _ref.dispatch;
5323
- var handleToggle = function handleToggle(key) {
5324
- dispatch({
5325
- type: "TOGGLE_INTENT",
5326
- payload: key
5327
- });
5328
- };
5329
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
5330
- className: "wizard-intent-step",
5331
- children: [/*#__PURE__*/jsxRuntime.jsx("h3", {
5332
- className: "wizard-step-header",
5333
- children: "What is this dashboard for?"
5334
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
5335
- className: "wizard-card-grid",
5336
- children: CATEGORIES.map(function (cat) {
5337
- return /*#__PURE__*/jsxRuntime.jsx(DashReact.SelectableCard, {
5338
- icon: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5339
- icon: cat.icon,
5340
- fixedWidth: true
5341
- }),
5342
- label: cat.label,
5343
- description: cat.description,
5344
- selected: state.intent.includes(cat.key),
5345
- onSelect: function onSelect() {
5346
- return handleToggle(cat.key);
5347
- }
5348
- }, cat.key);
5349
- })
5350
- })]
5351
- });
5352
- };
5353
-
5354
- var FALLBACK = "puzzle-piece";
5355
-
5356
- /**
5357
- * Resolve an icon name to a valid FontAwesome icon reference.
5358
- * Tries solid (fas) first, then brand (fab). Returns "puzzle-piece" if
5359
- * the icon is falsy or not found in either prefix.
5360
- */
5361
- var resolveIcon = function resolveIcon(iconName) {
5362
- if (!iconName) return FALLBACK;
5363
-
5364
- // Already an array tuple like ["fab", "github"] — pass through
5365
- if (Array.isArray(iconName)) return iconName;
5366
-
5367
- // Try solid
5368
- if (fontawesomeSvgCore.findIconDefinition({
5369
- prefix: "fas",
5370
- iconName: iconName
5371
- })) return iconName;
5372
-
5373
- // Try brand
5374
- if (fontawesomeSvgCore.findIconDefinition({
5375
- prefix: "fab",
5376
- iconName: iconName
5377
- })) return ["fab", iconName];
5378
- return FALLBACK;
5379
- };
5380
-
5381
- var WizardProvidersStep = function WizardProvidersStep(_ref) {
5382
- var state = _ref.state,
5383
- dispatch = _ref.dispatch;
5384
- var _useContext = React.useContext(AppContext),
5385
- providersMap = _useContext.providers;
5386
- var providerList = React.useMemo(function () {
5387
- if (!providersMap || _typeof(providersMap) !== "object") return [];
5388
- return Object.values(providersMap).map(function (p) {
5389
- return {
5390
- key: p.type || p.name,
5391
- name: p.name,
5392
- type: p.type,
5393
- icon: p.icon || p.type,
5394
- configured: !!(p.credentials && Object.keys(p.credentials).length > 0)
5395
- };
5396
- });
5397
- }, [providersMap]);
5398
-
5399
- // Pre-check configured providers on first render
5400
- React.useEffect(function () {
5401
- if (state.providers.length === 0 && providerList.length > 0) {
5402
- var configuredKeys = providerList.filter(function (p) {
5403
- return p.configured;
5404
- }).map(function (p) {
5405
- return p.key;
5406
- });
5407
- if (configuredKeys.length > 0) {
5408
- dispatch({
5409
- type: "SET_PROVIDERS",
5410
- payload: configuredKeys
5411
- });
5412
- }
5413
- }
5414
- }, [providerList, state.providers.length, dispatch]);
5415
- var handleToggle = function handleToggle(key) {
5416
- dispatch({
5417
- type: "TOGGLE_PROVIDER",
5418
- payload: key
5419
- });
5420
- };
5421
- if (providerList.length === 0) {
5422
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
5423
- className: "wizard-providers-step",
5424
- children: [/*#__PURE__*/jsxRuntime.jsx("h3", {
5425
- className: "wizard-step-header",
5426
- children: "Which tools and services do you use?"
5427
- }), /*#__PURE__*/jsxRuntime.jsx("p", {
5428
- className: "wizard-empty-message",
5429
- children: "No providers configured yet. Add providers in Settings first."
5430
- })]
5431
- });
5432
- }
5433
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
5434
- className: "wizard-providers-step",
5435
- children: [/*#__PURE__*/jsxRuntime.jsx("h3", {
5436
- className: "wizard-step-header",
5437
- children: "Which tools and services do you use?"
5438
- }), /*#__PURE__*/jsxRuntime.jsx("div", {
5439
- className: "wizard-card-grid",
5440
- children: providerList.map(function (provider) {
5441
- var isSelected = state.providers.includes(provider.key);
5442
- var needsSetup = isSelected && !provider.configured;
5443
- return /*#__PURE__*/jsxRuntime.jsx(DashReact.SelectableCard, {
5444
- icon: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5445
- icon: resolveIcon(provider.icon),
5446
- fixedWidth: true
5447
- }),
5448
- label: provider.name,
5449
- description: needsSetup ? /*#__PURE__*/jsxRuntime.jsx("span", {
5450
- className: "wizard-needs-setup-badge",
5451
- children: "Needs setup"
5452
- }) : null,
5453
- selected: isSelected,
5454
- onSelect: function onSelect() {
5455
- return handleToggle(provider.key);
5456
- }
5457
- }, provider.key);
5458
- })
5459
- })]
5460
- });
5461
- };
5462
-
5463
5277
  function _createForOfIteratorHelper$e(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray$e(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; } } }; }
5464
5278
  function _unsupportedIterableToArray$e(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$e(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$e(r, a) : void 0; } }
5465
5279
  function _arrayLikeToArray$e(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; }
@@ -5747,372 +5561,408 @@ var useRegistrySearch = function useRegistrySearch() {
5747
5561
  };
5748
5562
  };
5749
5563
 
5750
- var WizardResultsStep = function WizardResultsStep(_ref) {
5564
+ var FALLBACK = "puzzle-piece";
5565
+
5566
+ /**
5567
+ * Resolve an icon name to a valid FontAwesome icon reference.
5568
+ * Tries solid (fas) first, then brand (fab). Returns "puzzle-piece" if
5569
+ * the icon is falsy or not found in either prefix.
5570
+ */
5571
+ var resolveIcon = function resolveIcon(iconName) {
5572
+ if (!iconName) return FALLBACK;
5573
+
5574
+ // Already an array tuple like ["fab", "github"] — pass through
5575
+ if (Array.isArray(iconName)) return iconName;
5576
+
5577
+ // Try solid
5578
+ if (fontawesomeSvgCore.findIconDefinition({
5579
+ prefix: "fas",
5580
+ iconName: iconName
5581
+ })) return iconName;
5582
+
5583
+ // Try brand
5584
+ if (fontawesomeSvgCore.findIconDefinition({
5585
+ prefix: "fab",
5586
+ iconName: iconName
5587
+ })) return ["fab", iconName];
5588
+ return FALLBACK;
5589
+ };
5590
+
5591
+ var DASHBOARD_TAGS$1 = ["productivity", "monitoring", "analytics", "communication", "developer", "sales", "marketing", "finance", "project-management", "social", "news", "utilities"];
5592
+
5593
+ var KNOWN_PROVIDERS = [{
5594
+ key: "google-drive",
5595
+ name: "Google Drive"
5596
+ }, {
5597
+ key: "slack",
5598
+ name: "Slack"
5599
+ }, {
5600
+ key: "github",
5601
+ name: "GitHub"
5602
+ }, {
5603
+ key: "gmail",
5604
+ name: "Gmail"
5605
+ }, {
5606
+ key: "google-calendar",
5607
+ name: "Google Calendar"
5608
+ }, {
5609
+ key: "notion",
5610
+ name: "Notion"
5611
+ }, {
5612
+ key: "linear",
5613
+ name: "Linear"
5614
+ }, {
5615
+ key: "algolia",
5616
+ name: "Algolia"
5617
+ }, {
5618
+ key: "contentful",
5619
+ name: "Contentful"
5620
+ }, {
5621
+ key: "jira",
5622
+ name: "Jira"
5623
+ }, {
5624
+ key: "openai",
5625
+ name: "OpenAI"
5626
+ }, {
5627
+ key: "postgres",
5628
+ name: "PostgreSQL"
5629
+ }];
5630
+
5631
+ /**
5632
+ * WizardDiscoverStep
5633
+ *
5634
+ * Step 0 of the Dashboard Wizard. Combines search, category/provider
5635
+ * filter chips, and results (dashboards + widgets) in a single view.
5636
+ * Replaces the old Intent, Providers, and Results steps.
5637
+ *
5638
+ * - Selecting a dashboard sets path to "prebuilt" and clears widget selections.
5639
+ * - Selecting widgets sets path to "custom" and clears dashboard selection.
5640
+ *
5641
+ * @param {Object} props
5642
+ * @param {Object} props.state - Wizard state from useWizardState
5643
+ * @param {Function} props.dispatch - Wizard dispatch from useWizardState
5644
+ */
5645
+ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
5751
5646
  var state = _ref.state,
5752
5647
  dispatch = _ref.dispatch;
5753
- var _useState = React.useState("prebuilt"),
5754
- _useState2 = _slicedToArray(_useState, 2),
5755
- activeTab = _useState2[0],
5756
- setActiveTab = _useState2[1];
5648
+ var filters = state.filters;
5757
5649
 
5758
- // --- Dashboard search (Tab A) ---
5759
- var _useState3 = React.useState([]),
5760
- _useState4 = _slicedToArray(_useState3, 2),
5761
- dashboards = _useState4[0],
5762
- setDashboards = _useState4[1];
5763
- var _useState5 = React.useState(false),
5764
- _useState6 = _slicedToArray(_useState5, 2),
5765
- dashLoading = _useState6[0],
5766
- setDashLoading = _useState6[1];
5767
- var _useState7 = React.useState(null),
5768
- _useState8 = _slicedToArray(_useState7, 2),
5769
- dashError = _useState8[0],
5770
- setDashError = _useState8[1];
5771
- var dashFilters = React.useMemo(function () {
5772
- return {
5773
- category: state.intent.length ? state.intent.join(",") : undefined,
5774
- providerTypes: state.providers.length ? state.providers : undefined
5775
- };
5776
- }, [state.intent, state.providers]);
5777
- var searchDashboards = React.useCallback(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
5778
- var _window$mainApi;
5779
- var result, _t;
5780
- return _regeneratorRuntime.wrap(function (_context) {
5781
- while (1) switch (_context.prev = _context.next) {
5782
- case 0:
5783
- if ((_window$mainApi = window.mainApi) !== null && _window$mainApi !== void 0 && (_window$mainApi = _window$mainApi.registry) !== null && _window$mainApi !== void 0 && _window$mainApi.searchDashboards) {
5784
- _context.next = 1;
5785
- break;
5786
- }
5787
- setDashboards([]);
5788
- return _context.abrupt("return");
5789
- case 1:
5790
- setDashLoading(true);
5791
- setDashError(null);
5792
- _context.prev = 2;
5793
- _context.next = 3;
5794
- return window.mainApi.registry.searchDashboards("", dashFilters);
5795
- case 3:
5796
- result = _context.sent;
5797
- setDashboards(result.packages || []);
5798
- _context.next = 5;
5799
- break;
5800
- case 4:
5801
- _context.prev = 4;
5802
- _t = _context["catch"](2);
5803
- setDashError(_t.message || "Failed to search dashboards");
5804
- setDashboards([]);
5805
- case 5:
5806
- _context.prev = 5;
5807
- setDashLoading(false);
5808
- return _context.finish(5);
5809
- case 6:
5810
- case "end":
5811
- return _context.stop();
5812
- }
5813
- }, _callee, null, [[2, 4, 5, 6]]);
5814
- })), [dashFilters]);
5815
- React.useEffect(function () {
5816
- searchDashboards();
5817
- }, [searchDashboards]);
5818
-
5819
- // --- Widget search (Tab B) ---
5650
+ // --- Registry search ---
5820
5651
  var _useRegistrySearch = useRegistrySearch({
5821
5652
  filterByCapabilities: true
5822
5653
  }),
5654
+ packages = _useRegistrySearch.packages,
5823
5655
  flatWidgets = _useRegistrySearch.flatWidgets,
5824
- widgetsLoading = _useRegistrySearch.isLoading,
5825
- widgetsError = _useRegistrySearch.error;
5826
-
5827
- // Filter widgets by selected categories + providers
5828
- var filteredWidgets = React.useMemo(function () {
5829
- return flatWidgets.filter(function (w) {
5830
- // Category filter: match if widget's category overlaps user intent
5831
- var catMatch = state.intent.length === 0 || state.intent.some(function (cat) {
5832
- return (w.packageCategory || "").toLowerCase() === cat.toLowerCase();
5833
- });
5834
-
5835
- // Provider filter: match if widget requires any of the selected providers
5836
- var providerMatch = state.providers.length === 0 || (w.providers || []).some(function (p) {
5837
- return state.providers.includes(p.type);
5838
- }) || (w.packageProviders || []).some(function (p) {
5839
- return state.providers.includes(p.type);
5840
- });
5841
- return catMatch && providerMatch;
5842
- });
5843
- }, [flatWidgets, state.intent, state.providers]);
5656
+ isLoading = _useRegistrySearch.isLoading,
5657
+ error = _useRegistrySearch.error,
5658
+ searchQuery = _useRegistrySearch.searchQuery,
5659
+ setSearchQuery = _useRegistrySearch.setSearchQuery;
5844
5660
 
5845
- // --- Tab change: set wizard path ---
5846
- var handleTabChange = React.useCallback(function (tab) {
5847
- setActiveTab(tab);
5661
+ // Sync search query from wizard state on mount
5662
+ React.useEffect(function () {
5663
+ if (filters.query) {
5664
+ setSearchQuery(filters.query);
5665
+ }
5666
+ // eslint-disable-next-line react-hooks/exhaustive-deps
5667
+ }, []);
5668
+ var handleSearchChange = React.useCallback(function (e) {
5669
+ var q = e.target.value;
5670
+ setSearchQuery(q);
5848
5671
  dispatch({
5849
- type: "SET_PATH",
5850
- payload: tab === "prebuilt" ? "prebuilt" : "custom"
5672
+ type: "SET_SEARCH_QUERY",
5673
+ payload: q
5851
5674
  });
5852
- }, [dispatch]);
5675
+ }, [setSearchQuery, dispatch]);
5853
5676
 
5854
- // Set initial path on mount
5855
- React.useEffect(function () {
5856
- if (!state.path) {
5857
- dispatch({
5858
- type: "SET_PATH",
5859
- payload: "prebuilt"
5860
- });
5861
- }
5862
- }, [state.path, dispatch]);
5677
+ // --- Client-side category + provider filtering ---
5678
+ var filteredDashboards = React.useMemo(function () {
5679
+ var dashPkgs = packages.filter(function (pkg) {
5680
+ return (pkg.type || "").toLowerCase() === "dashboard";
5681
+ });
5682
+ return applyFilters(dashPkgs, filters, "package");
5683
+ }, [packages, filters]);
5684
+ var filteredWidgets = React.useMemo(function () {
5685
+ return applyFilters(flatWidgets, filters, "widget");
5686
+ }, [flatWidgets, filters]);
5863
5687
 
5864
- // --- Dashboard selection (single-select) ---
5688
+ // --- Selection handlers ---
5865
5689
  var handleSelectDashboard = React.useCallback(function (dashboard) {
5866
5690
  dispatch({
5867
5691
  type: "SET_SELECTED_DASHBOARD",
5868
5692
  payload: dashboard
5869
5693
  });
5694
+ dispatch({
5695
+ type: "SET_SELECTED_WIDGETS",
5696
+ payload: []
5697
+ });
5698
+ dispatch({
5699
+ type: "SET_PATH",
5700
+ payload: "prebuilt"
5701
+ });
5870
5702
  }, [dispatch]);
5871
-
5872
- // --- Widget selection (multi-select) ---
5873
5703
  var handleToggleWidget = React.useCallback(function (widget) {
5874
5704
  dispatch({
5875
5705
  type: "TOGGLE_WIDGET",
5876
5706
  payload: widget
5877
5707
  });
5708
+ dispatch({
5709
+ type: "SET_SELECTED_DASHBOARD",
5710
+ payload: null
5711
+ });
5712
+ dispatch({
5713
+ type: "SET_PATH",
5714
+ payload: "custom"
5715
+ });
5878
5716
  }, [dispatch]);
5879
5717
  var isWidgetSelected = React.useCallback(function (widget) {
5880
5718
  return state.selectedWidgets.some(function (w) {
5881
5719
  return w.name === widget.name;
5882
5720
  });
5883
5721
  }, [state.selectedWidgets]);
5884
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
5885
- className: "wizard-results-step",
5886
- children: [/*#__PURE__*/jsxRuntime.jsx("h3", {
5887
- className: "wizard-step-header",
5888
- children: "Choose your starting point"
5889
- }), /*#__PURE__*/jsxRuntime.jsxs(DashReact.Tabs3, {
5890
- value: activeTab,
5891
- onValueChange: handleTabChange,
5892
- className: "wizard-results-tabs",
5893
- children: [/*#__PURE__*/jsxRuntime.jsxs(DashReact.Tabs3.List, {
5894
- className: "wizard-results-tab-list",
5895
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.Tabs3.Trigger, {
5896
- value: "prebuilt",
5897
- children: "Pre-built Dashboards"
5898
- }), /*#__PURE__*/jsxRuntime.jsxs(DashReact.Tabs3.Trigger, {
5899
- value: "custom",
5900
- children: ["Build Your Own", state.selectedWidgets.length > 0 && /*#__PURE__*/jsxRuntime.jsx("span", {
5901
- className: "wizard-count-badge",
5902
- children: state.selectedWidgets.length
5903
- })]
5904
- })]
5905
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Tabs3.Content, {
5906
- value: "prebuilt",
5907
- children: /*#__PURE__*/jsxRuntime.jsx(DashboardList, {
5908
- dashboards: dashboards,
5909
- isLoading: dashLoading,
5910
- error: dashError,
5911
- selectedDashboard: state.selectedDashboard,
5912
- onSelect: handleSelectDashboard
5913
- })
5914
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Tabs3.Content, {
5915
- value: "custom",
5916
- children: /*#__PURE__*/jsxRuntime.jsx(WidgetList, {
5917
- widgets: filteredWidgets,
5918
- isLoading: widgetsLoading,
5919
- error: widgetsError,
5920
- isSelected: isWidgetSelected,
5921
- onToggle: handleToggleWidget,
5922
- selectedCount: state.selectedWidgets.length
5923
- })
5924
- })]
5925
- })]
5926
- });
5927
- };
5928
-
5929
- // --- Sub-components ---
5930
5722
 
5931
- var DashboardList = function DashboardList(_ref3) {
5932
- var dashboards = _ref3.dashboards,
5933
- isLoading = _ref3.isLoading,
5934
- error = _ref3.error,
5935
- selectedDashboard = _ref3.selectedDashboard,
5936
- onSelect = _ref3.onSelect;
5937
- if (isLoading) {
5938
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
5939
- className: "wizard-loading",
5940
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5941
- icon: "spinner",
5942
- spin: true,
5943
- fixedWidth: true,
5944
- className: "wizard-loading-icon"
5945
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
5946
- children: "Searching dashboards..."
5947
- })]
5948
- });
5949
- }
5950
- if (error) {
5951
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
5952
- className: "wizard-error",
5953
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5954
- icon: "circle-exclamation",
5955
- fixedWidth: true
5956
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
5957
- children: error
5958
- })]
5959
- });
5960
- }
5961
- if (dashboards.length === 0) {
5962
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
5963
- className: "wizard-empty",
5964
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5965
- icon: "box-open",
5966
- fixedWidth: true,
5967
- className: "wizard-empty-icon"
5968
- }), /*#__PURE__*/jsxRuntime.jsx("p", {
5969
- children: "No pre-built dashboards match your selections."
5970
- }), /*#__PURE__*/jsxRuntime.jsx("p", {
5971
- className: "wizard-empty-hint",
5972
- children: "Try the \"Build Your Own\" tab to pick individual widgets."
5973
- })]
5974
- });
5975
- }
5976
- return /*#__PURE__*/jsxRuntime.jsx("div", {
5977
- className: "wizard-dashboard-list",
5978
- children: dashboards.map(function (dash) {
5979
- var isSelected = selectedDashboard && selectedDashboard.name === dash.name;
5980
- var widgetCount = (dash.widgets || []).length;
5981
- var providerNames = (dash.providers || []).map(function (p) {
5982
- return p.name || p.type;
5983
- }).join(", ");
5984
- return /*#__PURE__*/jsxRuntime.jsxs("button", {
5985
- type: "button",
5986
- className: "wizard-dashboard-card ".concat(isSelected ? "wizard-dashboard-card--selected" : ""),
5987
- onClick: function onClick() {
5988
- return onSelect(dash);
5989
- },
5990
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
5991
- className: "wizard-dashboard-card-header",
5992
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5993
- icon: resolveIcon(dash.icon || "grid-2"),
5994
- fixedWidth: true,
5995
- className: "wizard-dashboard-card-icon"
5996
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
5997
- className: "wizard-dashboard-card-name",
5998
- children: dash.displayName || dash.name
5999
- }), isSelected && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6000
- icon: "circle-check",
6001
- className: "wizard-dashboard-card-check"
6002
- })]
6003
- }), dash.description && /*#__PURE__*/jsxRuntime.jsx("p", {
6004
- className: "wizard-dashboard-card-desc",
6005
- children: dash.description
6006
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
6007
- className: "wizard-dashboard-card-meta",
6008
- children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
6009
- children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
6010
- }), providerNames && /*#__PURE__*/jsxRuntime.jsx("span", {
6011
- children: providerNames
6012
- })]
6013
- })]
6014
- }, dash.name);
6015
- })
6016
- });
6017
- };
6018
- var WidgetList = function WidgetList(_ref4) {
6019
- var widgets = _ref4.widgets,
6020
- isLoading = _ref4.isLoading,
6021
- error = _ref4.error,
6022
- isSelected = _ref4.isSelected,
6023
- onToggle = _ref4.onToggle,
6024
- selectedCount = _ref4.selectedCount;
6025
- if (isLoading) {
6026
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
6027
- className: "wizard-loading",
6028
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6029
- icon: "spinner",
6030
- spin: true,
6031
- fixedWidth: true,
6032
- className: "wizard-loading-icon"
6033
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
6034
- children: "Searching widgets..."
6035
- })]
6036
- });
6037
- }
6038
- if (error) {
6039
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
6040
- className: "wizard-error",
6041
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6042
- icon: "circle-exclamation",
6043
- fixedWidth: true
6044
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
6045
- children: error
6046
- })]
5723
+ // --- Filter chip handlers ---
5724
+ var handleToggleCategory = React.useCallback(function (cat) {
5725
+ return dispatch({
5726
+ type: "TOGGLE_FILTER_CATEGORY",
5727
+ payload: cat
6047
5728
  });
6048
- }
6049
- if (widgets.length === 0) {
6050
- return /*#__PURE__*/jsxRuntime.jsxs("div", {
6051
- className: "wizard-empty",
6052
- children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6053
- icon: "puzzle-piece",
6054
- fixedWidth: true,
6055
- className: "wizard-empty-icon"
6056
- }), /*#__PURE__*/jsxRuntime.jsx("p", {
6057
- children: "No widgets match your selections."
6058
- }), /*#__PURE__*/jsxRuntime.jsx("p", {
6059
- className: "wizard-empty-hint",
6060
- children: "Try adjusting your categories or providers in the previous steps."
6061
- })]
5729
+ }, [dispatch]);
5730
+ var handleToggleProvider = React.useCallback(function (prov) {
5731
+ return dispatch({
5732
+ type: "TOGGLE_FILTER_PROVIDER",
5733
+ payload: prov
6062
5734
  });
6063
- }
5735
+ }, [dispatch]);
5736
+ var hasResults = filteredDashboards.length > 0 || filteredWidgets.length > 0;
5737
+ var hasActiveFilters = filters.categories.length > 0 || filters.providers.length > 0;
6064
5738
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
6065
- className: "wizard-widget-list",
6066
- children: [selectedCount > 0 && /*#__PURE__*/jsxRuntime.jsxs("p", {
6067
- className: "wizard-widget-count",
6068
- children: [selectedCount, " widget", selectedCount !== 1 ? "s" : "", " selected"]
6069
- }), widgets.map(function (widget) {
6070
- var checked = isSelected(widget);
6071
- return /*#__PURE__*/jsxRuntime.jsxs("button", {
6072
- type: "button",
6073
- className: "wizard-widget-card ".concat(checked ? "wizard-widget-card--selected" : ""),
6074
- onClick: function onClick() {
6075
- return onToggle(widget);
6076
- },
6077
- children: [/*#__PURE__*/jsxRuntime.jsx("div", {
6078
- className: "wizard-widget-card-checkbox",
6079
- children: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6080
- icon: checked ? "square-check" : "square",
6081
- fixedWidth: true
5739
+ className: "wizard-discover-step",
5740
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
5741
+ className: "wizard-discover-search",
5742
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", {
5743
+ className: "wizard-discover-search-input",
5744
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5745
+ icon: "magnifying-glass",
5746
+ fixedWidth: true,
5747
+ className: "wizard-discover-search-icon"
5748
+ }), /*#__PURE__*/jsxRuntime.jsx("input", {
5749
+ type: "text",
5750
+ placeholder: "Search registry...",
5751
+ value: searchQuery,
5752
+ onChange: handleSearchChange,
5753
+ className: "wizard-discover-input"
5754
+ })]
5755
+ })
5756
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
5757
+ className: "wizard-discover-filters",
5758
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
5759
+ className: "wizard-discover-filter-row",
5760
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
5761
+ className: "wizard-discover-filter-label",
5762
+ children: "Categories"
5763
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
5764
+ className: "wizard-discover-chips",
5765
+ children: DASHBOARD_TAGS$1.map(function (tag) {
5766
+ return /*#__PURE__*/jsxRuntime.jsx("button", {
5767
+ type: "button",
5768
+ className: "wizard-chip ".concat(filters.categories.includes(tag) ? "wizard-chip--active" : ""),
5769
+ onClick: function onClick() {
5770
+ return handleToggleCategory(tag);
5771
+ },
5772
+ children: tag
5773
+ }, tag);
6082
5774
  })
6083
- }), /*#__PURE__*/jsxRuntime.jsxs("div", {
6084
- className: "wizard-widget-card-info",
6085
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
6086
- className: "wizard-widget-card-header",
6087
- children: [widget.icon && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
6088
- icon: resolveIcon(widget.icon),
6089
- fixedWidth: true,
6090
- className: "wizard-widget-card-icon"
6091
- }), /*#__PURE__*/jsxRuntime.jsx("span", {
6092
- className: "wizard-widget-card-name",
6093
- children: widget.name
5775
+ })]
5776
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
5777
+ className: "wizard-discover-filter-row",
5778
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
5779
+ className: "wizard-discover-filter-label",
5780
+ children: "Providers"
5781
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
5782
+ className: "wizard-discover-chips",
5783
+ children: KNOWN_PROVIDERS.map(function (prov) {
5784
+ return /*#__PURE__*/jsxRuntime.jsx("button", {
5785
+ type: "button",
5786
+ className: "wizard-chip ".concat(filters.providers.includes(prov.key) ? "wizard-chip--active" : ""),
5787
+ onClick: function onClick() {
5788
+ return handleToggleProvider(prov.key);
5789
+ },
5790
+ children: prov.name
5791
+ }, prov.key);
5792
+ })
5793
+ })]
5794
+ })]
5795
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
5796
+ className: "wizard-discover-results",
5797
+ children: isLoading ? /*#__PURE__*/jsxRuntime.jsxs("div", {
5798
+ className: "wizard-loading",
5799
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5800
+ icon: "spinner",
5801
+ spin: true,
5802
+ fixedWidth: true,
5803
+ className: "wizard-loading-icon"
5804
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
5805
+ children: "Searching registry..."
5806
+ })]
5807
+ }) : error ? /*#__PURE__*/jsxRuntime.jsxs("div", {
5808
+ className: "wizard-error",
5809
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5810
+ icon: "circle-exclamation",
5811
+ fixedWidth: true
5812
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
5813
+ children: error
5814
+ })]
5815
+ }) : !hasResults ? /*#__PURE__*/jsxRuntime.jsxs("div", {
5816
+ className: "wizard-empty",
5817
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5818
+ icon: "magnifying-glass",
5819
+ fixedWidth: true,
5820
+ className: "wizard-empty-icon"
5821
+ }), /*#__PURE__*/jsxRuntime.jsx("p", {
5822
+ children: "No results match your search."
5823
+ }), hasActiveFilters && /*#__PURE__*/jsxRuntime.jsx("p", {
5824
+ className: "wizard-empty-hint",
5825
+ children: "Try removing some filters to see more results."
5826
+ })]
5827
+ }) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
5828
+ children: [filteredDashboards.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
5829
+ className: "wizard-discover-section",
5830
+ children: [/*#__PURE__*/jsxRuntime.jsxs("h4", {
5831
+ className: "wizard-discover-section-title",
5832
+ children: ["Dashboards (", filteredDashboards.length, " result", filteredDashboards.length !== 1 ? "s" : "", ")"]
5833
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
5834
+ className: "wizard-dashboard-list",
5835
+ children: filteredDashboards.map(function (dash) {
5836
+ var isSelected = state.selectedDashboard && state.selectedDashboard.name === dash.name;
5837
+ var widgetCount = (dash.widgets || []).length;
5838
+ var providerNames = (dash.providers || []).map(function (p) {
5839
+ return p.name || p.type;
5840
+ }).join(", ");
5841
+ return /*#__PURE__*/jsxRuntime.jsxs("button", {
5842
+ type: "button",
5843
+ className: "wizard-dashboard-card ".concat(isSelected ? "wizard-dashboard-card--selected" : ""),
5844
+ onClick: function onClick() {
5845
+ return handleSelectDashboard(dash);
5846
+ },
5847
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
5848
+ className: "wizard-dashboard-card-header",
5849
+ children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5850
+ icon: resolveIcon(dash.icon || "grid-2"),
5851
+ fixedWidth: true,
5852
+ className: "wizard-dashboard-card-icon"
5853
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
5854
+ className: "wizard-dashboard-card-name",
5855
+ children: dash.displayName || dash.name
5856
+ }), isSelected && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5857
+ icon: "circle-check",
5858
+ className: "wizard-dashboard-card-check"
5859
+ })]
5860
+ }), dash.description && /*#__PURE__*/jsxRuntime.jsx("p", {
5861
+ className: "wizard-dashboard-card-desc",
5862
+ children: dash.description
5863
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
5864
+ className: "wizard-dashboard-card-meta",
5865
+ children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
5866
+ children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
5867
+ }), providerNames && /*#__PURE__*/jsxRuntime.jsx("span", {
5868
+ children: providerNames
5869
+ })]
5870
+ })]
5871
+ }, dash.name);
5872
+ })
5873
+ })]
5874
+ }), filteredWidgets.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
5875
+ className: "wizard-discover-section",
5876
+ children: [/*#__PURE__*/jsxRuntime.jsxs("h4", {
5877
+ className: "wizard-discover-section-title",
5878
+ children: ["Widgets (", filteredWidgets.length, " result", filteredWidgets.length !== 1 ? "s" : "", ")", state.selectedWidgets.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("span", {
5879
+ className: "wizard-count-badge",
5880
+ children: [state.selectedWidgets.length, " selected"]
6094
5881
  })]
6095
- }), widget.description && /*#__PURE__*/jsxRuntime.jsx("p", {
6096
- className: "wizard-widget-card-desc",
6097
- children: widget.description
6098
- }), widget.packageDisplayName && /*#__PURE__*/jsxRuntime.jsx("span", {
6099
- className: "wizard-widget-card-package",
6100
- children: widget.packageDisplayName
5882
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
5883
+ className: "wizard-widget-list",
5884
+ children: filteredWidgets.map(function (widget) {
5885
+ var checked = isWidgetSelected(widget);
5886
+ return /*#__PURE__*/jsxRuntime.jsxs("button", {
5887
+ type: "button",
5888
+ className: "wizard-widget-card ".concat(checked ? "wizard-widget-card--selected" : ""),
5889
+ onClick: function onClick() {
5890
+ return handleToggleWidget(widget);
5891
+ },
5892
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
5893
+ className: "wizard-widget-card-checkbox",
5894
+ children: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5895
+ icon: checked ? "square-check" : "square",
5896
+ fixedWidth: true
5897
+ })
5898
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
5899
+ className: "wizard-widget-card-info",
5900
+ children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
5901
+ className: "wizard-widget-card-header",
5902
+ children: [widget.icon && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
5903
+ icon: resolveIcon(widget.icon),
5904
+ fixedWidth: true,
5905
+ className: "wizard-widget-card-icon"
5906
+ }), /*#__PURE__*/jsxRuntime.jsx("span", {
5907
+ className: "wizard-widget-card-name",
5908
+ children: widget.name
5909
+ })]
5910
+ }), widget.description && /*#__PURE__*/jsxRuntime.jsx("p", {
5911
+ className: "wizard-widget-card-desc",
5912
+ children: widget.description
5913
+ }), widget.packageDisplayName && /*#__PURE__*/jsxRuntime.jsx("span", {
5914
+ className: "wizard-widget-card-package",
5915
+ children: widget.packageDisplayName
5916
+ })]
5917
+ })]
5918
+ }, widget.key);
5919
+ })
6101
5920
  })]
6102
5921
  })]
6103
- }, widget.key);
5922
+ })
6104
5923
  })]
6105
5924
  });
6106
5925
  };
6107
5926
 
5927
+ // --- Helpers ---
5928
+
5929
+ function applyFilters(items, filters, mode) {
5930
+ return items.filter(function (item) {
5931
+ // Category filter
5932
+ if (filters.categories.length > 0) {
5933
+ var itemCategory = mode === "widget" ? (item.packageCategory || "").toLowerCase() : (item.category || "").toLowerCase();
5934
+ if (!filters.categories.some(function (c) {
5935
+ return c.toLowerCase() === itemCategory;
5936
+ })) {
5937
+ return false;
5938
+ }
5939
+ }
5940
+
5941
+ // Provider filter
5942
+ if (filters.providers.length > 0) {
5943
+ var itemProviders = mode === "widget" ? [].concat(_toConsumableArray(item.providers || []), _toConsumableArray(item.packageProviders || [])) : item.providers || [];
5944
+ var hasMatchingProvider = itemProviders.some(function (p) {
5945
+ return filters.providers.includes(p.type);
5946
+ });
5947
+ if (!hasMatchingProvider) {
5948
+ return false;
5949
+ }
5950
+ }
5951
+ return true;
5952
+ });
5953
+ }
5954
+
6108
5955
  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; }
6109
5956
  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; }
6110
- var TOTAL_STEPS = 6; // Steps 0-5
5957
+ var TOTAL_STEPS = 3; // Steps 0-2: Discover, Layout, Customize
6111
5958
 
6112
5959
  var initialState = {
6113
5960
  step: 0,
6114
- intent: [],
6115
- providers: [],
5961
+ filters: {
5962
+ categories: [],
5963
+ providers: [],
5964
+ query: ""
5965
+ },
6116
5966
  selectedWidgets: [],
6117
5967
  selectedDashboard: null,
6118
5968
  layout: {
@@ -6132,32 +5982,38 @@ function wizardReducer(state, action) {
6132
5982
  return _objectSpread$B(_objectSpread$B({}, state), {}, {
6133
5983
  step: action.payload
6134
5984
  });
6135
- case "SET_INTENT":
5985
+ case "SET_FILTERS":
6136
5986
  return _objectSpread$B(_objectSpread$B({}, state), {}, {
6137
- intent: action.payload
5987
+ filters: _objectSpread$B(_objectSpread$B({}, state.filters), action.payload)
6138
5988
  });
6139
- case "TOGGLE_INTENT":
5989
+ case "TOGGLE_FILTER_CATEGORY":
6140
5990
  {
6141
- var intent = state.intent.includes(action.payload) ? state.intent.filter(function (i) {
6142
- return i !== action.payload;
6143
- }) : [].concat(_toConsumableArray(state.intent), [action.payload]);
5991
+ var categories = state.filters.categories.includes(action.payload) ? state.filters.categories.filter(function (c) {
5992
+ return c !== action.payload;
5993
+ }) : [].concat(_toConsumableArray(state.filters.categories), [action.payload]);
6144
5994
  return _objectSpread$B(_objectSpread$B({}, state), {}, {
6145
- intent: intent
5995
+ filters: _objectSpread$B(_objectSpread$B({}, state.filters), {}, {
5996
+ categories: categories
5997
+ })
6146
5998
  });
6147
5999
  }
6148
- case "SET_PROVIDERS":
6149
- return _objectSpread$B(_objectSpread$B({}, state), {}, {
6150
- providers: action.payload
6151
- });
6152
- case "TOGGLE_PROVIDER":
6000
+ case "TOGGLE_FILTER_PROVIDER":
6153
6001
  {
6154
- var providers = state.providers.includes(action.payload) ? state.providers.filter(function (p) {
6002
+ var providers = state.filters.providers.includes(action.payload) ? state.filters.providers.filter(function (p) {
6155
6003
  return p !== action.payload;
6156
- }) : [].concat(_toConsumableArray(state.providers), [action.payload]);
6004
+ }) : [].concat(_toConsumableArray(state.filters.providers), [action.payload]);
6157
6005
  return _objectSpread$B(_objectSpread$B({}, state), {}, {
6158
- providers: providers
6006
+ filters: _objectSpread$B(_objectSpread$B({}, state.filters), {}, {
6007
+ providers: providers
6008
+ })
6159
6009
  });
6160
6010
  }
6011
+ case "SET_SEARCH_QUERY":
6012
+ return _objectSpread$B(_objectSpread$B({}, state), {}, {
6013
+ filters: _objectSpread$B(_objectSpread$B({}, state.filters), {}, {
6014
+ query: action.payload
6015
+ })
6016
+ });
6161
6017
  case "SET_SELECTED_WIDGETS":
6162
6018
  return _objectSpread$B(_objectSpread$B({}, state), {}, {
6163
6019
  selectedWidgets: action.payload
@@ -6213,17 +6069,11 @@ function widgetCountToTemplate(count) {
6213
6069
  function getCanProceed(state) {
6214
6070
  switch (state.step) {
6215
6071
  case 0:
6216
- return state.intent.length > 0;
6072
+ return state.selectedDashboard !== null || state.selectedWidgets.length > 0;
6217
6073
  case 1:
6218
- return state.providers.length > 0;
6219
- case 2:
6220
- return state.path === "prebuilt" ? state.selectedDashboard !== null : state.selectedWidgets.length > 0;
6221
- case 3:
6222
6074
  return state.layout.templateKey !== null;
6223
- case 4:
6075
+ case 2:
6224
6076
  return state.customization.name.trim().length > 0;
6225
- case 5:
6226
- return true;
6227
6077
  default:
6228
6078
  return false;
6229
6079
  }
@@ -6862,7 +6712,7 @@ var WizardCustomizeStep = function WizardCustomizeStep(_ref) {
6862
6712
  }
6863
6713
 
6864
6714
  // --- Provider setup summary ---
6865
- var selectedProviders = (state.providers || []).map(function (provKey) {
6715
+ var selectedProviders = (state.filters && state.filters.providers || []).map(function (provKey) {
6866
6716
  var prov = (providersMap === null || providersMap === void 0 ? void 0 : providersMap[provKey]) || {};
6867
6717
  return {
6868
6718
  key: provKey,
@@ -7154,14 +7004,8 @@ var WizardCustomizeStep = function WizardCustomizeStep(_ref) {
7154
7004
  };
7155
7005
 
7156
7006
  var STEP_LABELS = [{
7157
- label: "Intent",
7158
- description: "Choose categories"
7159
- }, {
7160
- label: "Providers",
7161
- description: "Select data sources"
7162
- }, {
7163
- label: "Browse",
7164
- description: "Pick widgets or dashboards"
7007
+ label: "Discover",
7008
+ description: "Search & select"
7165
7009
  }, {
7166
7010
  label: "Layout",
7167
7011
  description: "Arrange your widgets"
@@ -7223,23 +7067,23 @@ var DashboardWizardModal = function DashboardWizardModal(_ref) {
7223
7067
  // Skip layout step for prebuilt path
7224
7068
  var handleNext = React.useCallback(function () {
7225
7069
  if (!canProceed) return;
7226
- if (state.step === 2 && isPrebuiltPath) {
7227
- // Skip layout step (3), go straight to customize (4)
7228
- goToStep(4);
7070
+ if (state.step === 0 && isPrebuiltPath) {
7071
+ // Skip layout step (1), go straight to customize (2)
7072
+ goToStep(2);
7229
7073
  } else {
7230
7074
  nextStep();
7231
7075
  }
7232
7076
  }, [canProceed, state.step, isPrebuiltPath, goToStep, nextStep]);
7233
7077
  var handleBack = React.useCallback(function () {
7234
- if (state.step === 4 && isPrebuiltPath) {
7235
- // Skip back over layout step (3), go to browse (2)
7236
- goToStep(2);
7078
+ if (state.step === 2 && isPrebuiltPath) {
7079
+ // Skip back over layout step (1), go to discover (0)
7080
+ goToStep(0);
7237
7081
  } else {
7238
7082
  prevStep();
7239
7083
  }
7240
7084
  }, [state.step, isPrebuiltPath, goToStep, prevStep]);
7241
- var isLastStep = state.step === 4;
7242
- state.step === 4 && state._created;
7085
+ var isLastStep = state.step === 2;
7086
+ state.step === 2 && state._created;
7243
7087
  return /*#__PURE__*/jsxRuntime.jsx(DashReact.Modal, {
7244
7088
  isOpen: open,
7245
7089
  setIsOpen: setIsOpen,
@@ -7281,7 +7125,7 @@ var DashboardWizardModal = function DashboardWizardModal(_ref) {
7281
7125
  description: STEP_LABELS[0].description,
7282
7126
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
7283
7127
  className: "flex-1 min-h-0 overflow-y-auto",
7284
- children: /*#__PURE__*/jsxRuntime.jsx(WizardIntentStep, {
7128
+ children: /*#__PURE__*/jsxRuntime.jsx(WizardDiscoverStep, {
7285
7129
  state: state,
7286
7130
  dispatch: dispatch
7287
7131
  })
@@ -7291,7 +7135,7 @@ var DashboardWizardModal = function DashboardWizardModal(_ref) {
7291
7135
  description: STEP_LABELS[1].description,
7292
7136
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
7293
7137
  className: "flex-1 min-h-0 overflow-y-auto",
7294
- children: /*#__PURE__*/jsxRuntime.jsx(WizardProvidersStep, {
7138
+ children: /*#__PURE__*/jsxRuntime.jsx(WizardLayoutPreviewStep, {
7295
7139
  state: state,
7296
7140
  dispatch: dispatch
7297
7141
  })
@@ -7299,26 +7143,6 @@ var DashboardWizardModal = function DashboardWizardModal(_ref) {
7299
7143
  }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Stepper.Step, {
7300
7144
  label: STEP_LABELS[2].label,
7301
7145
  description: STEP_LABELS[2].description,
7302
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
7303
- className: "flex-1 min-h-0 overflow-y-auto",
7304
- children: /*#__PURE__*/jsxRuntime.jsx(WizardResultsStep, {
7305
- state: state,
7306
- dispatch: dispatch
7307
- })
7308
- })
7309
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Stepper.Step, {
7310
- label: STEP_LABELS[3].label,
7311
- description: STEP_LABELS[3].description,
7312
- children: /*#__PURE__*/jsxRuntime.jsx("div", {
7313
- className: "flex-1 min-h-0 overflow-y-auto",
7314
- children: /*#__PURE__*/jsxRuntime.jsx(WizardLayoutPreviewStep, {
7315
- state: state,
7316
- dispatch: dispatch
7317
- })
7318
- })
7319
- }), /*#__PURE__*/jsxRuntime.jsx(DashReact.Stepper.Step, {
7320
- label: STEP_LABELS[4].label,
7321
- description: STEP_LABELS[4].description,
7322
7146
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
7323
7147
  className: "flex-1 min-h-0 overflow-y-auto",
7324
7148
  children: /*#__PURE__*/jsxRuntime.jsx(WizardCustomizeStep, {
@@ -50235,10 +50059,8 @@ exports.WidgetPopoutStage = WidgetPopoutStage;
50235
50059
  exports.WidgetProviderWrapper = WidgetProviderWrapper;
50236
50060
  exports.WidgetSidebar = WidgetSidebar;
50237
50061
  exports.WizardCustomizeStep = WizardCustomizeStep;
50238
- exports.WizardIntentStep = WizardIntentStep;
50062
+ exports.WizardDiscoverStep = WizardDiscoverStep;
50239
50063
  exports.WizardLayoutPreviewStep = WizardLayoutPreviewStep;
50240
- exports.WizardProvidersStep = WizardProvidersStep;
50241
- exports.WizardResultsStep = WizardResultsStep;
50242
50064
  exports.Workspace = Workspace;
50243
50065
  exports.WorkspaceContext = WorkspaceContext;
50244
50066
  exports.WorkspaceFooter = WorkspaceFooter;