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