@trops/dash-core 0.1.461 → 0.1.462
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 +288 -279
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +288 -279
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7146,262 +7146,263 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
|
|
|
7146
7146
|
};
|
|
7147
7147
|
var sectionLabelClass = "text-xs font-semibold text-gray-400 uppercase tracking-wide px-3 mb-1";
|
|
7148
7148
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7149
|
-
className: "flex flex-
|
|
7150
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("
|
|
7151
|
-
className: "flex-
|
|
7152
|
-
children: [
|
|
7153
|
-
|
|
7149
|
+
className: "flex flex-col gap-4",
|
|
7150
|
+
children: [!isAuthenticated && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7151
|
+
className: "flex items-center gap-3 px-4 py-2 rounded-lg bg-gray-800 text-gray-300",
|
|
7152
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
7153
|
+
icon: "circle-info",
|
|
7154
|
+
className: "text-blue-400 text-sm flex-shrink-0"
|
|
7155
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7156
|
+
className: "flex-1 min-w-0 flex flex-col",
|
|
7154
7157
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7155
|
-
className: "text-
|
|
7158
|
+
className: "text-sm text-gray-200",
|
|
7156
7159
|
children: "Sign in to registry"
|
|
7157
7160
|
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7158
7161
|
className: "text-xs text-gray-400",
|
|
7159
7162
|
children: "See dashboards and widgets you have access to"
|
|
7160
|
-
}), !isAuthenticating ? /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
7161
|
-
type: "button",
|
|
7162
|
-
onClick: handleSignIn,
|
|
7163
|
-
className: "mt-1 text-xs py-1.5 px-3 rounded bg-blue-600 text-white hover:bg-blue-500 transition-colors",
|
|
7164
|
-
children: "Sign in"
|
|
7165
|
-
}) : /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7166
|
-
className: "mt-1 flex flex-col gap-1",
|
|
7167
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7168
|
-
className: "text-xs text-gray-400",
|
|
7169
|
-
children: "Waiting for browser\u2026"
|
|
7170
|
-
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
7171
|
-
type: "button",
|
|
7172
|
-
onClick: cancelAuth,
|
|
7173
|
-
className: "text-xs text-gray-400 hover:text-gray-200 underline self-start",
|
|
7174
|
-
children: "Cancel"
|
|
7175
|
-
})]
|
|
7176
|
-
}), authError && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7177
|
-
className: "text-xs text-red-400",
|
|
7178
|
-
children: authError
|
|
7179
|
-
})]
|
|
7180
|
-
}), isAuthenticated && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7181
|
-
className: "flex items-center gap-2 px-3 text-xs text-gray-500",
|
|
7182
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
7183
|
-
icon: "circle-check",
|
|
7184
|
-
className: "text-green-400 text-xs"
|
|
7185
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7186
|
-
children: "Signed in"
|
|
7187
|
-
})]
|
|
7188
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7189
|
-
className: "flex flex-col",
|
|
7190
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7191
|
-
className: sectionLabelClass,
|
|
7192
|
-
children: "TYPE"
|
|
7193
|
-
}), TYPE_OPTIONS.map(function (opt) {
|
|
7194
|
-
var active = typeFilter === opt.key;
|
|
7195
|
-
var showBadge = opt.key === "widgets" && state.selectedWidgets.length > 0;
|
|
7196
|
-
return /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
7197
|
-
type: "button",
|
|
7198
|
-
onClick: function onClick() {
|
|
7199
|
-
return setTypeFilter(opt.key);
|
|
7200
|
-
},
|
|
7201
|
-
className: rowClass(active),
|
|
7202
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7203
|
-
children: opt.label
|
|
7204
|
-
}), showBadge && /*#__PURE__*/jsxRuntime.jsx(DashReact.Tag3, {
|
|
7205
|
-
text: "".concat(state.selectedWidgets.length, " selected")
|
|
7206
|
-
})]
|
|
7207
|
-
}, opt.key);
|
|
7208
|
-
})]
|
|
7209
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7210
|
-
className: "flex flex-col",
|
|
7211
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7212
|
-
className: sectionLabelClass,
|
|
7213
|
-
children: "CATEGORIES"
|
|
7214
|
-
}), DASHBOARD_TAGS$1.map(function (tag) {
|
|
7215
|
-
var active = filters.categories.includes(tag);
|
|
7216
|
-
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
7217
|
-
type: "button",
|
|
7218
|
-
onClick: function onClick() {
|
|
7219
|
-
return handleToggleCategory(tag);
|
|
7220
|
-
},
|
|
7221
|
-
className: "".concat(rowClass(active), " capitalize"),
|
|
7222
|
-
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7223
|
-
children: tag
|
|
7224
|
-
})
|
|
7225
|
-
}, tag);
|
|
7226
7163
|
})]
|
|
7227
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
7228
|
-
|
|
7164
|
+
}), !isAuthenticating ? /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
7165
|
+
type: "button",
|
|
7166
|
+
onClick: handleSignIn,
|
|
7167
|
+
className: "flex-shrink-0 text-xs py-1.5 px-3 rounded bg-blue-600 text-white hover:bg-blue-500 transition-colors",
|
|
7168
|
+
children: "Sign in"
|
|
7169
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7170
|
+
className: "flex items-center gap-2 flex-shrink-0",
|
|
7229
7171
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7230
|
-
className:
|
|
7231
|
-
children: "
|
|
7232
|
-
}),
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
return handleToggleProvider(prov.key);
|
|
7238
|
-
},
|
|
7239
|
-
className: rowClass(active),
|
|
7240
|
-
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7241
|
-
children: prov.name
|
|
7242
|
-
})
|
|
7243
|
-
}, prov.key);
|
|
7172
|
+
className: "text-xs text-gray-400",
|
|
7173
|
+
children: "Waiting for browser\u2026"
|
|
7174
|
+
}), /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
7175
|
+
type: "button",
|
|
7176
|
+
onClick: cancelAuth,
|
|
7177
|
+
className: "text-xs text-gray-400 hover:text-gray-200 underline",
|
|
7178
|
+
children: "Cancel"
|
|
7244
7179
|
})]
|
|
7180
|
+
}), authError && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7181
|
+
className: "flex-shrink-0 text-xs text-red-400",
|
|
7182
|
+
children: authError
|
|
7245
7183
|
})]
|
|
7246
7184
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7247
|
-
className: "flex
|
|
7248
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("
|
|
7249
|
-
className: "flex
|
|
7250
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
7251
|
-
className: "flex-
|
|
7252
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
children: showDashboards ? "".concat(visibleDashboards.length, " dashboard").concat(visibleDashboards.length === 1 ? "" : "s") : "".concat(visibleWidgets.length, " widget").concat(visibleWidgets.length === 1 ? "" : "s")
|
|
7271
|
-
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7272
|
-
className: "flex flex-col gap-6",
|
|
7273
|
-
children: isLoading ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7274
|
-
className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-400",
|
|
7275
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
7276
|
-
icon: "spinner",
|
|
7277
|
-
spin: true,
|
|
7278
|
-
fixedWidth: true
|
|
7279
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7280
|
-
children: "Searching registry..."
|
|
7185
|
+
className: "flex flex-row gap-4",
|
|
7186
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("aside", {
|
|
7187
|
+
className: "flex-shrink-0 w-56 flex flex-col gap-4 sticky top-0 self-start",
|
|
7188
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7189
|
+
className: "flex flex-col",
|
|
7190
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7191
|
+
className: sectionLabelClass,
|
|
7192
|
+
children: "TYPE"
|
|
7193
|
+
}), TYPE_OPTIONS.map(function (opt) {
|
|
7194
|
+
var active = typeFilter === opt.key;
|
|
7195
|
+
var showBadge = opt.key === "widgets" && state.selectedWidgets.length > 0;
|
|
7196
|
+
return /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
7197
|
+
type: "button",
|
|
7198
|
+
onClick: function onClick() {
|
|
7199
|
+
return setTypeFilter(opt.key);
|
|
7200
|
+
},
|
|
7201
|
+
className: rowClass(active),
|
|
7202
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7203
|
+
children: opt.label
|
|
7204
|
+
}), showBadge && /*#__PURE__*/jsxRuntime.jsx(DashReact.Tag3, {
|
|
7205
|
+
text: "".concat(state.selectedWidgets.length, " selected")
|
|
7206
|
+
})]
|
|
7207
|
+
}, opt.key);
|
|
7281
7208
|
})]
|
|
7282
|
-
})
|
|
7283
|
-
className: "flex
|
|
7284
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
}),
|
|
7288
|
-
|
|
7209
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7210
|
+
className: "flex flex-col",
|
|
7211
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7212
|
+
className: sectionLabelClass,
|
|
7213
|
+
children: "CATEGORIES"
|
|
7214
|
+
}), DASHBOARD_TAGS$1.map(function (tag) {
|
|
7215
|
+
var active = filters.categories.includes(tag);
|
|
7216
|
+
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
7217
|
+
type: "button",
|
|
7218
|
+
onClick: function onClick() {
|
|
7219
|
+
return handleToggleCategory(tag);
|
|
7220
|
+
},
|
|
7221
|
+
className: "".concat(rowClass(active), " capitalize"),
|
|
7222
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7223
|
+
children: tag
|
|
7224
|
+
})
|
|
7225
|
+
}, tag);
|
|
7289
7226
|
})]
|
|
7290
|
-
})
|
|
7291
|
-
className: "flex flex-col
|
|
7292
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
}),
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7227
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7228
|
+
className: "flex flex-col",
|
|
7229
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7230
|
+
className: sectionLabelClass,
|
|
7231
|
+
children: "PROVIDERS"
|
|
7232
|
+
}), KNOWN_PROVIDERS.map(function (prov) {
|
|
7233
|
+
var active = filters.providers.includes(prov.key);
|
|
7234
|
+
return /*#__PURE__*/jsxRuntime.jsx("button", {
|
|
7235
|
+
type: "button",
|
|
7236
|
+
onClick: function onClick() {
|
|
7237
|
+
return handleToggleProvider(prov.key);
|
|
7238
|
+
},
|
|
7239
|
+
className: rowClass(active),
|
|
7240
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7241
|
+
children: prov.name
|
|
7242
|
+
})
|
|
7243
|
+
}, prov.key);
|
|
7300
7244
|
})]
|
|
7301
|
-
})
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7245
|
+
})]
|
|
7246
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7247
|
+
className: "flex-1 min-w-0 flex flex-col gap-4",
|
|
7248
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7249
|
+
className: "flex items-center gap-3",
|
|
7250
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7251
|
+
className: "flex-1",
|
|
7252
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DashReact.InputText, {
|
|
7253
|
+
value: searchQuery,
|
|
7254
|
+
onChange: handleSearchChange,
|
|
7255
|
+
placeholder: "Search registry..."
|
|
7256
|
+
})
|
|
7257
|
+
}), hasSelection && /*#__PURE__*/jsxRuntime.jsx(DashReact.Button, {
|
|
7258
|
+
onClick: handleClearSelection,
|
|
7259
|
+
title: "Clear Selection",
|
|
7260
|
+
textSize: "text-xs",
|
|
7261
|
+
padding: "py-1 px-3",
|
|
7262
|
+
backgroundColor: "bg-gray-700",
|
|
7263
|
+
textColor: "text-gray-400",
|
|
7264
|
+
hoverTextColor: "hover:text-white",
|
|
7265
|
+
hoverBackgroundColor: "hover:bg-gray-600",
|
|
7266
|
+
icon: "xmark"
|
|
7267
|
+
})]
|
|
7268
|
+
}), !isLoading && !error && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7269
|
+
className: "text-xs text-gray-500 px-1",
|
|
7270
|
+
children: showDashboards ? "".concat(visibleDashboards.length, " dashboard").concat(visibleDashboards.length === 1 ? "" : "s") : "".concat(visibleWidgets.length, " widget").concat(visibleWidgets.length === 1 ? "" : "s")
|
|
7271
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7272
|
+
className: "flex flex-col gap-6",
|
|
7273
|
+
children: isLoading ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7274
|
+
className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-400",
|
|
7275
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
7276
|
+
icon: "spinner",
|
|
7277
|
+
spin: true,
|
|
7278
|
+
fixedWidth: true
|
|
7279
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7280
|
+
children: "Searching registry..."
|
|
7281
|
+
})]
|
|
7282
|
+
}) : error ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7283
|
+
className: "flex items-center gap-2 text-red-400 py-4",
|
|
7284
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
7285
|
+
icon: "circle-exclamation",
|
|
7286
|
+
fixedWidth: true
|
|
7287
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7288
|
+
children: error
|
|
7289
|
+
})]
|
|
7290
|
+
}) : !hasResults ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7291
|
+
className: "flex flex-col items-center justify-center gap-2 py-12 text-gray-500",
|
|
7292
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
7293
|
+
icon: "magnifying-glass",
|
|
7294
|
+
fixedWidth: true
|
|
7295
|
+
}), /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
7296
|
+
children: "No results match your search."
|
|
7297
|
+
}), hasActiveFilters && /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
7298
|
+
className: "text-xs text-gray-600",
|
|
7299
|
+
children: "Try removing some filters to see more results."
|
|
7300
|
+
})]
|
|
7301
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
7302
|
+
children: [showDashboards && visibleDashboards.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7303
|
+
className: "flex flex-col gap-3",
|
|
7304
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7305
|
+
className: "grid grid-cols-3 gap-3",
|
|
7306
|
+
children: visibleDashboards.map(function (dash) {
|
|
7307
|
+
var isSelected = state.selectedDashboard && state.selectedDashboard.name === dash.name;
|
|
7308
|
+
var widgetCount = (dash.widgets || []).length;
|
|
7309
|
+
var providerTags = (dash.providers || []).map(function (p) {
|
|
7310
|
+
return p.name || p.type;
|
|
7311
|
+
}).filter(Boolean);
|
|
7312
|
+
return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
|
|
7313
|
+
hover: true,
|
|
7314
|
+
selected: isSelected,
|
|
7315
|
+
padding: "p-5",
|
|
7316
|
+
rounded: "rounded-lg",
|
|
7317
|
+
className: "hover:shadow-lg",
|
|
7318
|
+
onClick: function onClick() {
|
|
7319
|
+
return handleSelectDashboard(dash);
|
|
7320
|
+
},
|
|
7323
7321
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7324
|
-
className: "
|
|
7325
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
7326
|
-
className: "
|
|
7327
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7322
|
+
className: "flex flex-col items-center text-center gap-2",
|
|
7323
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7324
|
+
className: "relative",
|
|
7325
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7326
|
+
className: "text-2xl",
|
|
7327
|
+
children: /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
7328
|
+
icon: resolveIcon(dash.icon || "grid-2"),
|
|
7329
|
+
fixedWidth: true,
|
|
7330
|
+
className: "text-gray-400"
|
|
7331
|
+
})
|
|
7332
|
+
}), isSelected && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
7333
|
+
icon: "circle-check",
|
|
7334
|
+
className: "absolute -top-1 -right-3 text-blue-400 text-xs"
|
|
7335
|
+
})]
|
|
7336
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7337
|
+
className: "text-sm font-semibold text-gray-200",
|
|
7338
|
+
children: dash.displayName || dash.name
|
|
7339
|
+
})]
|
|
7340
|
+
}), dash.description && /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
7341
|
+
className: "text-xs text-gray-400 mt-2 line-clamp-2 text-center",
|
|
7342
|
+
children: dash.description
|
|
7343
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7344
|
+
className: "flex items-center justify-between mt-3 pt-2 border-t border-gray-700/50",
|
|
7345
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
7346
|
+
className: "text-xs text-gray-500",
|
|
7347
|
+
children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
|
|
7348
|
+
}), providerTags.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7349
|
+
className: "flex flex-wrap gap-1 justify-end",
|
|
7350
|
+
children: providerTags.slice(0, 3).map(function (tag) {
|
|
7351
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7352
|
+
className: "text-xs px-1.5 py-0.5 rounded bg-gray-800 text-gray-400",
|
|
7353
|
+
children: tag
|
|
7354
|
+
}, tag);
|
|
7331
7355
|
})
|
|
7332
|
-
}), isSelected && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
7333
|
-
icon: "circle-check",
|
|
7334
|
-
className: "absolute -top-1 -right-3 text-blue-400 text-xs"
|
|
7335
7356
|
})]
|
|
7336
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7337
|
-
className: "text-sm font-semibold text-gray-200",
|
|
7338
|
-
children: dash.displayName || dash.name
|
|
7339
7357
|
})]
|
|
7340
|
-
}
|
|
7341
|
-
|
|
7342
|
-
children: dash.description
|
|
7343
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7344
|
-
className: "flex items-center justify-between mt-3 pt-2 border-t border-gray-700/50",
|
|
7345
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
7346
|
-
className: "text-xs text-gray-500",
|
|
7347
|
-
children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
|
|
7348
|
-
}), providerTags.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7349
|
-
className: "flex flex-wrap gap-1 justify-end",
|
|
7350
|
-
children: providerTags.slice(0, 3).map(function (tag) {
|
|
7351
|
-
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7352
|
-
className: "text-xs px-1.5 py-0.5 rounded bg-gray-800 text-gray-400",
|
|
7353
|
-
children: tag
|
|
7354
|
-
}, tag);
|
|
7355
|
-
})
|
|
7356
|
-
})]
|
|
7357
|
-
})]
|
|
7358
|
-
}, dash.name);
|
|
7358
|
+
}, dash.name);
|
|
7359
|
+
})
|
|
7359
7360
|
})
|
|
7360
|
-
})
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7375
|
-
},
|
|
7376
|
-
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7377
|
-
className: "flex items-start justify-between gap-2",
|
|
7361
|
+
}), showWidgets && visibleWidgets.length > 0 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7362
|
+
className: "flex flex-col gap-3",
|
|
7363
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
7364
|
+
className: "grid grid-cols-3 gap-3",
|
|
7365
|
+
children: visibleWidgets.map(function (widget) {
|
|
7366
|
+
var checked = isWidgetSelected(widget);
|
|
7367
|
+
return /*#__PURE__*/jsxRuntime.jsxs(DashReact.Card2, {
|
|
7368
|
+
hover: true,
|
|
7369
|
+
selected: checked,
|
|
7370
|
+
padding: "p-4",
|
|
7371
|
+
rounded: "rounded-lg",
|
|
7372
|
+
className: "hover:shadow-lg flex flex-col",
|
|
7373
|
+
onClick: function onClick() {
|
|
7374
|
+
return handleToggleWidget(widget);
|
|
7375
|
+
},
|
|
7378
7376
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7379
|
-
className: "flex items-
|
|
7380
|
-
children: [
|
|
7381
|
-
|
|
7377
|
+
className: "flex items-start justify-between gap-2",
|
|
7378
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
7379
|
+
className: "flex items-center gap-1.5",
|
|
7380
|
+
children: [widget.icon && /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
7381
|
+
icon: resolveIcon(widget.icon),
|
|
7382
|
+
fixedWidth: true,
|
|
7383
|
+
className: "text-gray-400 text-sm"
|
|
7384
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7385
|
+
className: "text-sm font-medium text-gray-200 truncate",
|
|
7386
|
+
children: widget.name
|
|
7387
|
+
})]
|
|
7388
|
+
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
7389
|
+
icon: checked ? "square-check" : "square",
|
|
7382
7390
|
fixedWidth: true,
|
|
7383
|
-
className: "text-
|
|
7384
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7385
|
-
className: "text-sm font-medium text-gray-200 truncate",
|
|
7386
|
-
children: widget.name
|
|
7391
|
+
className: checked ? "text-blue-400 flex-shrink-0" : "text-gray-500 flex-shrink-0"
|
|
7387
7392
|
})]
|
|
7388
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7393
|
+
}), widget.description && /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
7394
|
+
className: "text-xs text-gray-400 line-clamp-2 mt-1.5 flex-1",
|
|
7395
|
+
children: widget.description
|
|
7396
|
+
}), widget.packageDisplayName && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7397
|
+
className: "text-xs text-gray-500 mt-2 pt-1.5 border-t border-gray-700/50 truncate",
|
|
7398
|
+
children: widget.packageDisplayName
|
|
7392
7399
|
})]
|
|
7393
|
-
}
|
|
7394
|
-
|
|
7395
|
-
children: widget.description
|
|
7396
|
-
}), widget.packageDisplayName && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
7397
|
-
className: "text-xs text-gray-500 mt-2 pt-1.5 border-t border-gray-700/50 truncate",
|
|
7398
|
-
children: widget.packageDisplayName
|
|
7399
|
-
})]
|
|
7400
|
-
}, widget.key);
|
|
7400
|
+
}, widget.key);
|
|
7401
|
+
})
|
|
7401
7402
|
})
|
|
7402
|
-
})
|
|
7403
|
-
})
|
|
7404
|
-
})
|
|
7403
|
+
})]
|
|
7404
|
+
})
|
|
7405
|
+
})]
|
|
7405
7406
|
})]
|
|
7406
7407
|
})]
|
|
7407
7408
|
});
|
|
@@ -8007,6 +8008,54 @@ var WizardCustomizeStep = function WizardCustomizeStep(_ref) {
|
|
|
8007
8008
|
children: [/*#__PURE__*/jsxRuntime.jsx("h3", {
|
|
8008
8009
|
className: "text-lg font-semibold text-gray-200",
|
|
8009
8010
|
children: "Customize your dashboard"
|
|
8011
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8012
|
+
className: "rounded-lg border border-gray-700/50 bg-gray-800/50 p-4 flex flex-col gap-2",
|
|
8013
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8014
|
+
className: "text-sm font-semibold text-gray-300",
|
|
8015
|
+
children: "Summary"
|
|
8016
|
+
}), state.customization.name.trim() && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8017
|
+
className: "flex items-center gap-2 text-sm text-gray-300",
|
|
8018
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
8019
|
+
icon: "clone",
|
|
8020
|
+
className: "text-blue-400"
|
|
8021
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8022
|
+
children: state.customization.name.trim()
|
|
8023
|
+
})]
|
|
8024
|
+
}), selectedFolder && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8025
|
+
className: "flex items-center gap-2 text-sm text-gray-300",
|
|
8026
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
8027
|
+
icon: selectedFolder.icon || selectedFolder.folder || "folder",
|
|
8028
|
+
className: "text-blue-400"
|
|
8029
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8030
|
+
children: selectedFolder.name
|
|
8031
|
+
})]
|
|
8032
|
+
}), selectedTheme && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8033
|
+
className: "flex items-center gap-2 text-sm text-gray-300",
|
|
8034
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
8035
|
+
icon: "palette",
|
|
8036
|
+
className: "text-blue-400"
|
|
8037
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8038
|
+
children: selectedTheme.name || state.customization.theme
|
|
8039
|
+
}), state.customization.theme === appThemeKey && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8040
|
+
className: "text-xs text-gray-500",
|
|
8041
|
+
children: "(default)"
|
|
8042
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8043
|
+
className: "flex flex-row space-x-1 ml-2",
|
|
8044
|
+
children: [selectedTheme.primary && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8045
|
+
className: "w-3 h-3 rounded bg-".concat(selectedTheme.primary, "-500")
|
|
8046
|
+
}), selectedTheme.secondary && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8047
|
+
className: "w-3 h-3 rounded bg-".concat(selectedTheme.secondary, "-500")
|
|
8048
|
+
})]
|
|
8049
|
+
})]
|
|
8050
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8051
|
+
className: "flex items-center gap-2 text-sm text-gray-300",
|
|
8052
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
8053
|
+
icon: isPrebuilt ? "box" : "grid-2",
|
|
8054
|
+
className: "text-blue-400"
|
|
8055
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8056
|
+
children: isPrebuilt ? ((_state$selectedDashbo = state.selectedDashboard) === null || _state$selectedDashbo === void 0 ? void 0 : _state$selectedDashbo.displayName) || ((_state$selectedDashbo2 = state.selectedDashboard) === null || _state$selectedDashbo2 === void 0 ? void 0 : _state$selectedDashbo2.name) || "Pre-built dashboard" : "".concat(state.selectedWidgets.length, " widget").concat(state.selectedWidgets.length !== 1 ? "s" : "")
|
|
8057
|
+
})]
|
|
8058
|
+
})]
|
|
8010
8059
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8011
8060
|
className: "flex items-center gap-2 mb-2",
|
|
8012
8061
|
children: SUB_STEPS.map(function (s, i) {
|
|
@@ -8257,51 +8306,6 @@ var WizardCustomizeStep = function WizardCustomizeStep(_ref) {
|
|
|
8257
8306
|
})]
|
|
8258
8307
|
})]
|
|
8259
8308
|
})]
|
|
8260
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8261
|
-
className: "rounded-lg border border-gray-700/50 bg-gray-800/50 p-4 flex flex-col gap-2",
|
|
8262
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8263
|
-
className: "text-sm font-semibold text-gray-300",
|
|
8264
|
-
children: "Summary"
|
|
8265
|
-
}), state.customization.name.trim() && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8266
|
-
className: "flex items-center gap-2 text-sm text-gray-300",
|
|
8267
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
8268
|
-
icon: "clone",
|
|
8269
|
-
className: "text-blue-400"
|
|
8270
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8271
|
-
children: state.customization.name.trim()
|
|
8272
|
-
})]
|
|
8273
|
-
}), selectedFolder && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8274
|
-
className: "flex items-center gap-2 text-sm text-gray-300",
|
|
8275
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
8276
|
-
icon: selectedFolder.icon || selectedFolder.folder || "folder",
|
|
8277
|
-
className: "text-blue-400"
|
|
8278
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8279
|
-
children: selectedFolder.name
|
|
8280
|
-
})]
|
|
8281
|
-
}), selectedTheme && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8282
|
-
className: "flex items-center gap-2 text-sm text-gray-300",
|
|
8283
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
8284
|
-
icon: "palette",
|
|
8285
|
-
className: "text-blue-400"
|
|
8286
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8287
|
-
children: selectedTheme.name || state.customization.theme
|
|
8288
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8289
|
-
className: "flex flex-row space-x-1 ml-2",
|
|
8290
|
-
children: [selectedTheme.primary && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8291
|
-
className: "w-3 h-3 rounded bg-".concat(selectedTheme.primary, "-500")
|
|
8292
|
-
}), selectedTheme.secondary && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
8293
|
-
className: "w-3 h-3 rounded bg-".concat(selectedTheme.secondary, "-500")
|
|
8294
|
-
})]
|
|
8295
|
-
})]
|
|
8296
|
-
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8297
|
-
className: "flex items-center gap-2 text-sm text-gray-300",
|
|
8298
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(DashReact.FontAwesomeIcon, {
|
|
8299
|
-
icon: isPrebuilt ? "box" : "grid-2",
|
|
8300
|
-
className: "text-blue-400"
|
|
8301
|
-
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
8302
|
-
children: isPrebuilt ? ((_state$selectedDashbo = state.selectedDashboard) === null || _state$selectedDashbo === void 0 ? void 0 : _state$selectedDashbo.displayName) || ((_state$selectedDashbo2 = state.selectedDashboard) === null || _state$selectedDashbo2 === void 0 ? void 0 : _state$selectedDashbo2.name) || "Pre-built dashboard" : "".concat(state.selectedWidgets.length, " widget").concat(state.selectedWidgets.length !== 1 ? "s" : "")
|
|
8303
|
-
})]
|
|
8304
|
-
})]
|
|
8305
8309
|
}), authNeeded && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
8306
8310
|
className: "flex flex-col gap-3",
|
|
8307
8311
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
@@ -8500,7 +8504,12 @@ function getCanProceed(state) {
|
|
|
8500
8504
|
case 0:
|
|
8501
8505
|
return state.selectedDashboard !== null || state.selectedWidgets.length > 0;
|
|
8502
8506
|
case 1:
|
|
8503
|
-
|
|
8507
|
+
// Create can fire only when the user has both a name and a theme.
|
|
8508
|
+
// The wizard auto-defaults theme to the user's active app theme,
|
|
8509
|
+
// so this gate is mostly belt-and-suspenders — but it locks the
|
|
8510
|
+
// contract so a future refactor that drops the auto-default
|
|
8511
|
+
// can't quietly let the Create button enable on name alone.
|
|
8512
|
+
return state.customization.name.trim().length > 0 && !!state.customization.theme;
|
|
8504
8513
|
default:
|
|
8505
8514
|
return false;
|
|
8506
8515
|
}
|