@trops/dash-core 0.1.103 → 0.1.104
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/electron/index.js +75 -3
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +39 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +39 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -30656,15 +30656,29 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
30656
30656
|
icon = _useState18[0],
|
|
30657
30657
|
setIcon = _useState18[1];
|
|
30658
30658
|
|
|
30659
|
-
//
|
|
30660
|
-
var _useState19 = useState(
|
|
30659
|
+
// Publish preview (widget names)
|
|
30660
|
+
var _useState19 = useState(null),
|
|
30661
30661
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
30662
|
-
|
|
30663
|
-
|
|
30664
|
-
|
|
30662
|
+
preview = _useState20[0],
|
|
30663
|
+
setPreview = _useState20[1];
|
|
30664
|
+
|
|
30665
|
+
// Step 4: Publish
|
|
30666
|
+
var _useState21 = useState(false),
|
|
30665
30667
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
30666
|
-
|
|
30667
|
-
|
|
30668
|
+
isPublishing = _useState22[0],
|
|
30669
|
+
setIsPublishing = _useState22[1];
|
|
30670
|
+
var _useState23 = useState(null),
|
|
30671
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
30672
|
+
result = _useState24[0],
|
|
30673
|
+
setResult = _useState24[1];
|
|
30674
|
+
|
|
30675
|
+
// Fetch publish preview (widget names) on open
|
|
30676
|
+
useEffect(function () {
|
|
30677
|
+
if (!isOpen || !appId || !workspaceId) return;
|
|
30678
|
+
window.mainApi.dashboardConfig.getPublishPreview(appId, workspaceId).then(function (res) {
|
|
30679
|
+
if (res.success) setPreview(res);
|
|
30680
|
+
})["catch"](console.error);
|
|
30681
|
+
}, [isOpen, appId, workspaceId]);
|
|
30668
30682
|
|
|
30669
30683
|
// Check auth status on mount
|
|
30670
30684
|
useEffect(function () {
|
|
@@ -30747,6 +30761,7 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
30747
30761
|
setDescription("");
|
|
30748
30762
|
setSelectedTags([]);
|
|
30749
30763
|
setIcon("grip");
|
|
30764
|
+
setPreview(null);
|
|
30750
30765
|
setIsPublishing(false);
|
|
30751
30766
|
setResult(null);
|
|
30752
30767
|
}
|
|
@@ -31061,6 +31076,15 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
31061
31076
|
className: "px-3 py-2 rounded-lg bg-white/5 border border-white/10 text-sm opacity-80",
|
|
31062
31077
|
children: authorName || "—"
|
|
31063
31078
|
})]
|
|
31079
|
+
}), preview && preview.componentNames && preview.componentNames.length > 0 && /*#__PURE__*/jsxs("div", {
|
|
31080
|
+
className: "bg-white/5 border border-white/10 rounded-lg p-3 text-sm",
|
|
31081
|
+
children: [/*#__PURE__*/jsxs("span", {
|
|
31082
|
+
className: "opacity-50",
|
|
31083
|
+
children: ["This dashboard contains ", preview.componentNames.length, " ", "widget", preview.componentNames.length !== 1 ? "s" : "", ":", " "]
|
|
31084
|
+
}), /*#__PURE__*/jsx("span", {
|
|
31085
|
+
className: "opacity-80",
|
|
31086
|
+
children: preview.componentNames.join(", ")
|
|
31087
|
+
})]
|
|
31064
31088
|
}), /*#__PURE__*/jsx(TextArea, {
|
|
31065
31089
|
label: "Description",
|
|
31066
31090
|
value: description,
|
|
@@ -31146,6 +31170,14 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
31146
31170
|
className: "opacity-70",
|
|
31147
31171
|
children: icon || "grip"
|
|
31148
31172
|
})]
|
|
31173
|
+
}), preview && preview.componentNames && preview.componentNames.length > 0 && /*#__PURE__*/jsxs("div", {
|
|
31174
|
+
className: "flex gap-2",
|
|
31175
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
31176
|
+
className: "opacity-50 w-20 flex-shrink-0",
|
|
31177
|
+
children: "Widgets"
|
|
31178
|
+
}), /*#__PURE__*/jsx("span", {
|
|
31179
|
+
children: preview.componentNames.join(", ")
|
|
31180
|
+
})]
|
|
31149
31181
|
})]
|
|
31150
31182
|
})]
|
|
31151
31183
|
}) : result.success ? /*#__PURE__*/jsxs("div", {
|