@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.js
CHANGED
|
@@ -30675,15 +30675,29 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
30675
30675
|
icon = _useState18[0],
|
|
30676
30676
|
setIcon = _useState18[1];
|
|
30677
30677
|
|
|
30678
|
-
//
|
|
30679
|
-
var _useState19 = React.useState(
|
|
30678
|
+
// Publish preview (widget names)
|
|
30679
|
+
var _useState19 = React.useState(null),
|
|
30680
30680
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
30681
|
-
|
|
30682
|
-
|
|
30683
|
-
|
|
30681
|
+
preview = _useState20[0],
|
|
30682
|
+
setPreview = _useState20[1];
|
|
30683
|
+
|
|
30684
|
+
// Step 4: Publish
|
|
30685
|
+
var _useState21 = React.useState(false),
|
|
30684
30686
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
30685
|
-
|
|
30686
|
-
|
|
30687
|
+
isPublishing = _useState22[0],
|
|
30688
|
+
setIsPublishing = _useState22[1];
|
|
30689
|
+
var _useState23 = React.useState(null),
|
|
30690
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
|
30691
|
+
result = _useState24[0],
|
|
30692
|
+
setResult = _useState24[1];
|
|
30693
|
+
|
|
30694
|
+
// Fetch publish preview (widget names) on open
|
|
30695
|
+
React.useEffect(function () {
|
|
30696
|
+
if (!isOpen || !appId || !workspaceId) return;
|
|
30697
|
+
window.mainApi.dashboardConfig.getPublishPreview(appId, workspaceId).then(function (res) {
|
|
30698
|
+
if (res.success) setPreview(res);
|
|
30699
|
+
})["catch"](console.error);
|
|
30700
|
+
}, [isOpen, appId, workspaceId]);
|
|
30687
30701
|
|
|
30688
30702
|
// Check auth status on mount
|
|
30689
30703
|
React.useEffect(function () {
|
|
@@ -30726,9 +30740,7 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
30726
30740
|
if (userProfile) {
|
|
30727
30741
|
setProfile(userProfile);
|
|
30728
30742
|
setAuthStatus("authenticated");
|
|
30729
|
-
|
|
30730
|
-
setAuthorName(userProfile.displayName);
|
|
30731
|
-
}
|
|
30743
|
+
setAuthorName(userProfile.displayName || userProfile.username || "");
|
|
30732
30744
|
} else {
|
|
30733
30745
|
// Token expired or invalid — treat as unauthenticated
|
|
30734
30746
|
setAuthStatus("unauthenticated");
|
|
@@ -30768,6 +30780,7 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
30768
30780
|
setDescription("");
|
|
30769
30781
|
setSelectedTags([]);
|
|
30770
30782
|
setIcon("grip");
|
|
30783
|
+
setPreview(null);
|
|
30771
30784
|
setIsPublishing(false);
|
|
30772
30785
|
setResult(null);
|
|
30773
30786
|
}
|
|
@@ -31074,11 +31087,23 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
31074
31087
|
children: [/*#__PURE__*/jsxRuntime.jsx("p", {
|
|
31075
31088
|
className: "text-sm opacity-70",
|
|
31076
31089
|
children: "Provide details about your dashboard for the registry listing."
|
|
31077
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
31078
|
-
|
|
31079
|
-
|
|
31080
|
-
|
|
31081
|
-
|
|
31090
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
31091
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("label", {
|
|
31092
|
+
className: "block text-sm font-medium opacity-70 mb-1",
|
|
31093
|
+
children: "Author Name"
|
|
31094
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
31095
|
+
className: "px-3 py-2 rounded-lg bg-white/5 border border-white/10 text-sm opacity-80",
|
|
31096
|
+
children: authorName || "—"
|
|
31097
|
+
})]
|
|
31098
|
+
}), preview && preview.componentNames && preview.componentNames.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
31099
|
+
className: "bg-white/5 border border-white/10 rounded-lg p-3 text-sm",
|
|
31100
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
31101
|
+
className: "opacity-50",
|
|
31102
|
+
children: ["This dashboard contains ", preview.componentNames.length, " ", "widget", preview.componentNames.length !== 1 ? "s" : "", ":", " "]
|
|
31103
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
31104
|
+
className: "opacity-80",
|
|
31105
|
+
children: preview.componentNames.join(", ")
|
|
31106
|
+
})]
|
|
31082
31107
|
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.TextArea, {
|
|
31083
31108
|
label: "Description",
|
|
31084
31109
|
value: description,
|
|
@@ -31164,6 +31189,14 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
31164
31189
|
className: "opacity-70",
|
|
31165
31190
|
children: icon || "grip"
|
|
31166
31191
|
})]
|
|
31192
|
+
}), preview && preview.componentNames && preview.componentNames.length > 0 && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
31193
|
+
className: "flex gap-2",
|
|
31194
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
31195
|
+
className: "opacity-50 w-20 flex-shrink-0",
|
|
31196
|
+
children: "Widgets"
|
|
31197
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
31198
|
+
children: preview.componentNames.join(", ")
|
|
31199
|
+
})]
|
|
31167
31200
|
})]
|
|
31168
31201
|
})]
|
|
31169
31202
|
}) : result.success ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|