@trops/dash-core 0.1.103 → 0.1.105
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 +80 -3
- package/dist/electron/index.js.map +1 -1
- package/dist/index.esm.js +62 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +103 -44
- 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,18 @@ 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
|
+
children: [/*#__PURE__*/jsx("label", {
|
|
31081
|
+
className: "block text-sm font-medium opacity-70 mb-2",
|
|
31082
|
+
children: "Widgets Included"
|
|
31083
|
+
}), /*#__PURE__*/jsx("div", {
|
|
31084
|
+
className: "flex flex-wrap gap-1.5",
|
|
31085
|
+
children: preview.componentNames.map(function (name) {
|
|
31086
|
+
return /*#__PURE__*/jsx(Tag3, {
|
|
31087
|
+
text: name
|
|
31088
|
+
}, name);
|
|
31089
|
+
})
|
|
31090
|
+
})]
|
|
31064
31091
|
}), /*#__PURE__*/jsx(TextArea, {
|
|
31065
31092
|
label: "Description",
|
|
31066
31093
|
value: description,
|
|
@@ -31146,6 +31173,19 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
31146
31173
|
className: "opacity-70",
|
|
31147
31174
|
children: icon || "grip"
|
|
31148
31175
|
})]
|
|
31176
|
+
}), preview && preview.componentNames && preview.componentNames.length > 0 && /*#__PURE__*/jsxs("div", {
|
|
31177
|
+
className: "flex gap-2",
|
|
31178
|
+
children: [/*#__PURE__*/jsx("span", {
|
|
31179
|
+
className: "opacity-50 w-20 flex-shrink-0",
|
|
31180
|
+
children: "Widgets"
|
|
31181
|
+
}), /*#__PURE__*/jsx("div", {
|
|
31182
|
+
className: "flex flex-wrap gap-1",
|
|
31183
|
+
children: preview.componentNames.map(function (name) {
|
|
31184
|
+
return /*#__PURE__*/jsx(Tag3, {
|
|
31185
|
+
text: name
|
|
31186
|
+
}, name);
|
|
31187
|
+
})
|
|
31188
|
+
})]
|
|
31149
31189
|
})]
|
|
31150
31190
|
})]
|
|
31151
31191
|
}) : result.success ? /*#__PURE__*/jsxs("div", {
|
|
@@ -31216,12 +31256,22 @@ var PublishDashboardModal = function PublishDashboardModal(_ref) {
|
|
|
31216
31256
|
className: "text-xs text-amber-300/90",
|
|
31217
31257
|
children: "The following widgets are not currently on the registry. This may be intentional if they are private. Dashboards referencing these widgets can only be installed by users who already have them."
|
|
31218
31258
|
})]
|
|
31219
|
-
}), /*#__PURE__*/jsx("
|
|
31220
|
-
className: "
|
|
31259
|
+
}), /*#__PURE__*/jsx("div", {
|
|
31260
|
+
className: "space-y-2 mt-1",
|
|
31221
31261
|
children: result.warnings.map(function (w) {
|
|
31222
|
-
return /*#__PURE__*/
|
|
31223
|
-
children:
|
|
31224
|
-
|
|
31262
|
+
return /*#__PURE__*/jsxs("div", {
|
|
31263
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
31264
|
+
className: "text-xs font-semibold opacity-60",
|
|
31265
|
+
children: w["package"]
|
|
31266
|
+
}), /*#__PURE__*/jsx("div", {
|
|
31267
|
+
className: "flex flex-wrap gap-1 mt-1",
|
|
31268
|
+
children: w.widgets.map(function (name) {
|
|
31269
|
+
return /*#__PURE__*/jsx(Tag3, {
|
|
31270
|
+
text: name
|
|
31271
|
+
}, name);
|
|
31272
|
+
})
|
|
31273
|
+
})]
|
|
31274
|
+
}, w["package"]);
|
|
31225
31275
|
})
|
|
31226
31276
|
})]
|
|
31227
31277
|
}), result.registryCheckFailed && /*#__PURE__*/jsx("div", {
|