@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.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 () {
|
|
@@ -30766,6 +30780,7 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
30766
30780
|
setDescription("");
|
|
30767
30781
|
setSelectedTags([]);
|
|
30768
30782
|
setIcon("grip");
|
|
30783
|
+
setPreview(null);
|
|
30769
30784
|
setIsPublishing(false);
|
|
30770
30785
|
setResult(null);
|
|
30771
30786
|
}
|
|
@@ -31080,6 +31095,15 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
31080
31095
|
className: "px-3 py-2 rounded-lg bg-white/5 border border-white/10 text-sm opacity-80",
|
|
31081
31096
|
children: authorName || "—"
|
|
31082
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
|
+
})]
|
|
31083
31107
|
}), /*#__PURE__*/jsxRuntime.jsx(DashReact.TextArea, {
|
|
31084
31108
|
label: "Description",
|
|
31085
31109
|
value: description,
|
|
@@ -31165,6 +31189,14 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
31165
31189
|
className: "opacity-70",
|
|
31166
31190
|
children: icon || "grip"
|
|
31167
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
|
+
})]
|
|
31168
31200
|
})]
|
|
31169
31201
|
})]
|
|
31170
31202
|
}) : result.success ? /*#__PURE__*/jsxRuntime.jsxs("div", {
|