@trops/dash-core 0.1.215 → 0.1.217
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 +54 -44
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +95 -76
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5961,13 +5961,13 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
|
|
|
5961
5961
|
className: "text-sm font-semibold text-gray-300 flex items-center gap-2",
|
|
5962
5962
|
children: ["Dashboards (", filteredDashboards.length, " result", filteredDashboards.length !== 1 ? "s" : "", ")"]
|
|
5963
5963
|
}), /*#__PURE__*/jsx("div", {
|
|
5964
|
-
className: "grid grid-cols-
|
|
5964
|
+
className: "grid grid-cols-3 gap-3",
|
|
5965
5965
|
children: filteredDashboards.map(function (dash) {
|
|
5966
5966
|
var isSelected = state.selectedDashboard && state.selectedDashboard.name === dash.name;
|
|
5967
5967
|
var widgetCount = (dash.widgets || []).length;
|
|
5968
|
-
var
|
|
5968
|
+
var providerTags = (dash.providers || []).map(function (p) {
|
|
5969
5969
|
return p.name || p.type;
|
|
5970
|
-
}).
|
|
5970
|
+
}).filter(Boolean);
|
|
5971
5971
|
return /*#__PURE__*/jsxs(Card2, {
|
|
5972
5972
|
hover: true,
|
|
5973
5973
|
selected: isSelected,
|
|
@@ -5978,27 +5978,40 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
|
|
|
5978
5978
|
return handleSelectDashboard(dash);
|
|
5979
5979
|
},
|
|
5980
5980
|
children: [/*#__PURE__*/jsxs("div", {
|
|
5981
|
-
className: "flex items-center gap-2",
|
|
5982
|
-
children: [/*#__PURE__*/
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5981
|
+
className: "flex flex-col items-center text-center gap-2",
|
|
5982
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
5983
|
+
className: "relative",
|
|
5984
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
5985
|
+
className: "text-2xl",
|
|
5986
|
+
children: /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
5987
|
+
icon: resolveIcon(dash.icon || "grid-2"),
|
|
5988
|
+
fixedWidth: true,
|
|
5989
|
+
className: "text-gray-400"
|
|
5990
|
+
})
|
|
5991
|
+
}), isSelected && /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
5992
|
+
icon: "circle-check",
|
|
5993
|
+
className: "absolute -top-1 -right-3 text-blue-400 text-xs"
|
|
5994
|
+
})]
|
|
5986
5995
|
}), /*#__PURE__*/jsx("span", {
|
|
5987
|
-
className: "text-sm font-
|
|
5996
|
+
className: "text-sm font-semibold text-gray-200",
|
|
5988
5997
|
children: dash.displayName || dash.name
|
|
5989
|
-
}), isSelected && /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
5990
|
-
icon: "circle-check",
|
|
5991
|
-
className: "ml-auto text-blue-400"
|
|
5992
5998
|
})]
|
|
5993
5999
|
}), dash.description && /*#__PURE__*/jsx("p", {
|
|
5994
|
-
className: "text-xs text-gray-400 mt-
|
|
6000
|
+
className: "text-xs text-gray-400 mt-2 line-clamp-2 text-center",
|
|
5995
6001
|
children: dash.description
|
|
5996
6002
|
}), /*#__PURE__*/jsxs("div", {
|
|
5997
|
-
className: "flex items-center
|
|
6003
|
+
className: "flex items-center justify-between mt-3 pt-2 border-t border-gray-700/50",
|
|
5998
6004
|
children: [/*#__PURE__*/jsxs("span", {
|
|
6005
|
+
className: "text-xs text-gray-500",
|
|
5999
6006
|
children: [widgetCount, " widget", widgetCount !== 1 ? "s" : ""]
|
|
6000
|
-
}),
|
|
6001
|
-
|
|
6007
|
+
}), providerTags.length > 0 && /*#__PURE__*/jsx("div", {
|
|
6008
|
+
className: "flex flex-wrap gap-1 justify-end",
|
|
6009
|
+
children: providerTags.slice(0, 3).map(function (tag) {
|
|
6010
|
+
return /*#__PURE__*/jsx("span", {
|
|
6011
|
+
className: "text-xs px-1.5 py-0.5 rounded bg-gray-800 text-gray-400",
|
|
6012
|
+
children: tag
|
|
6013
|
+
}, tag);
|
|
6014
|
+
})
|
|
6002
6015
|
})]
|
|
6003
6016
|
})]
|
|
6004
6017
|
}, dash.name);
|
|
@@ -6012,45 +6025,42 @@ var WizardDiscoverStep = function WizardDiscoverStep(_ref) {
|
|
|
6012
6025
|
text: "".concat(state.selectedWidgets.length, " selected")
|
|
6013
6026
|
})]
|
|
6014
6027
|
}), /*#__PURE__*/jsx("div", {
|
|
6015
|
-
className: "grid grid-cols-
|
|
6028
|
+
className: "grid grid-cols-3 gap-3",
|
|
6016
6029
|
children: filteredWidgets.map(function (widget) {
|
|
6017
6030
|
var checked = isWidgetSelected(widget);
|
|
6018
|
-
return /*#__PURE__*/
|
|
6031
|
+
return /*#__PURE__*/jsxs(Card2, {
|
|
6019
6032
|
hover: true,
|
|
6020
6033
|
selected: checked,
|
|
6021
|
-
padding: "p-
|
|
6034
|
+
padding: "p-4",
|
|
6022
6035
|
rounded: "rounded-lg",
|
|
6023
|
-
className: "hover:shadow-lg",
|
|
6036
|
+
className: "hover:shadow-lg flex flex-col",
|
|
6024
6037
|
onClick: function onClick() {
|
|
6025
6038
|
return handleToggleWidget(widget);
|
|
6026
6039
|
},
|
|
6027
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
6028
|
-
className: "flex items-start gap-2",
|
|
6029
|
-
children: [/*#__PURE__*/
|
|
6040
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
6041
|
+
className: "flex items-start justify-between gap-2",
|
|
6042
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
6043
|
+
className: "flex items-center gap-1.5",
|
|
6044
|
+
children: [widget.icon && /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6045
|
+
icon: resolveIcon(widget.icon),
|
|
6046
|
+
fixedWidth: true,
|
|
6047
|
+
className: "text-gray-400 text-sm"
|
|
6048
|
+
}), /*#__PURE__*/jsx("span", {
|
|
6049
|
+
className: "text-sm font-medium text-gray-200 truncate",
|
|
6050
|
+
children: widget.name
|
|
6051
|
+
})]
|
|
6052
|
+
}), /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6030
6053
|
icon: checked ? "square-check" : "square",
|
|
6031
6054
|
fixedWidth: true,
|
|
6032
|
-
className: checked ? "text-blue-400
|
|
6033
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
6034
|
-
className: "flex flex-col gap-0.5 min-w-0",
|
|
6035
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
6036
|
-
className: "flex items-center gap-1.5",
|
|
6037
|
-
children: [widget.icon && /*#__PURE__*/jsx(FontAwesomeIcon, {
|
|
6038
|
-
icon: resolveIcon(widget.icon),
|
|
6039
|
-
fixedWidth: true,
|
|
6040
|
-
className: "text-gray-400 text-xs"
|
|
6041
|
-
}), /*#__PURE__*/jsx("span", {
|
|
6042
|
-
className: "text-sm font-medium text-gray-200 truncate",
|
|
6043
|
-
children: widget.name
|
|
6044
|
-
})]
|
|
6045
|
-
}), widget.description && /*#__PURE__*/jsx("p", {
|
|
6046
|
-
className: "text-xs text-gray-400 line-clamp-2",
|
|
6047
|
-
children: widget.description
|
|
6048
|
-
}), widget.packageDisplayName && /*#__PURE__*/jsx("span", {
|
|
6049
|
-
className: "text-xs text-gray-500",
|
|
6050
|
-
children: widget.packageDisplayName
|
|
6051
|
-
})]
|
|
6055
|
+
className: checked ? "text-blue-400 flex-shrink-0" : "text-gray-500 flex-shrink-0"
|
|
6052
6056
|
})]
|
|
6053
|
-
})
|
|
6057
|
+
}), widget.description && /*#__PURE__*/jsx("p", {
|
|
6058
|
+
className: "text-xs text-gray-400 line-clamp-2 mt-1.5 flex-1",
|
|
6059
|
+
children: widget.description
|
|
6060
|
+
}), widget.packageDisplayName && /*#__PURE__*/jsx("span", {
|
|
6061
|
+
className: "text-xs text-gray-500 mt-2 pt-1.5 border-t border-gray-700/50 truncate",
|
|
6062
|
+
children: widget.packageDisplayName
|
|
6063
|
+
})]
|
|
6054
6064
|
}, widget.key);
|
|
6055
6065
|
})
|
|
6056
6066
|
})]
|