@trops/dash-core 0.1.102 → 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 +48 -15
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +48 -15
- 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 () {
|
|
@@ -30707,9 +30721,7 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
30707
30721
|
if (userProfile) {
|
|
30708
30722
|
setProfile(userProfile);
|
|
30709
30723
|
setAuthStatus("authenticated");
|
|
30710
|
-
|
|
30711
|
-
setAuthorName(userProfile.displayName);
|
|
30712
|
-
}
|
|
30724
|
+
setAuthorName(userProfile.displayName || userProfile.username || "");
|
|
30713
30725
|
} else {
|
|
30714
30726
|
// Token expired or invalid — treat as unauthenticated
|
|
30715
30727
|
setAuthStatus("unauthenticated");
|
|
@@ -30749,6 +30761,7 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
30749
30761
|
setDescription("");
|
|
30750
30762
|
setSelectedTags([]);
|
|
30751
30763
|
setIcon("grip");
|
|
30764
|
+
setPreview(null);
|
|
30752
30765
|
setIsPublishing(false);
|
|
30753
30766
|
setResult(null);
|
|
30754
30767
|
}
|
|
@@ -31055,11 +31068,23 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
31055
31068
|
children: [/*#__PURE__*/jsx("p", {
|
|
31056
31069
|
className: "text-sm opacity-70",
|
|
31057
31070
|
children: "Provide details about your dashboard for the registry listing."
|
|
31058
|
-
}), /*#__PURE__*/
|
|
31059
|
-
|
|
31060
|
-
|
|
31061
|
-
|
|
31062
|
-
|
|
31071
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
31072
|
+
children: [/*#__PURE__*/jsx("label", {
|
|
31073
|
+
className: "block text-sm font-medium opacity-70 mb-1",
|
|
31074
|
+
children: "Author Name"
|
|
31075
|
+
}), /*#__PURE__*/jsx("div", {
|
|
31076
|
+
className: "px-3 py-2 rounded-lg bg-white/5 border border-white/10 text-sm opacity-80",
|
|
31077
|
+
children: authorName || "—"
|
|
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
|
+
})]
|
|
31063
31088
|
}), /*#__PURE__*/jsx(TextArea, {
|
|
31064
31089
|
label: "Description",
|
|
31065
31090
|
value: description,
|
|
@@ -31145,6 +31170,14 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
31145
31170
|
className: "opacity-70",
|
|
31146
31171
|
children: icon || "grip"
|
|
31147
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
|
+
})]
|
|
31148
31181
|
})]
|
|
31149
31182
|
})]
|
|
31150
31183
|
}) : result.success ? /*#__PURE__*/jsxs("div", {
|