@digital-ai/dot-components 3.24.0 → 3.24.1
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/index.esm.js
CHANGED
|
@@ -11795,7 +11795,7 @@ function DotDashboardOptionsMenu({
|
|
|
11795
11795
|
}
|
|
11796
11796
|
// If this is a published dashboard, with in-progress changes, and the user is the author of the changes,
|
|
11797
11797
|
// show the republish, revert, and view original options.
|
|
11798
|
-
if (
|
|
11798
|
+
if (isPublished && currentUser && dashboard.is_being_modified && dashboard.modified_author_id === currentUser.id) {
|
|
11799
11799
|
const handlePublishChangesClick = () => {
|
|
11800
11800
|
handleMenuClose();
|
|
11801
11801
|
onStartStatusChange && onStartStatusChange(dashboard, DashboardView.lifecycle_state.PUBLISHED);
|
|
@@ -12053,7 +12053,7 @@ function DotDashboardActions({
|
|
|
12053
12053
|
onStatusChanged && onStatusChanged(publishedDashboard);
|
|
12054
12054
|
// Move to View Mode after publishing
|
|
12055
12055
|
onViewMode && onViewMode(publishedDashboard, 'view');
|
|
12056
|
-
}, [onStatusChanged]);
|
|
12056
|
+
}, [onStatusChanged, onViewMode]);
|
|
12057
12057
|
const handlePublishConfirmClose = useCallback(() => {
|
|
12058
12058
|
setDashboardToPublish(null);
|
|
12059
12059
|
setDashboardToUnpublish(null);
|
|
@@ -12334,7 +12334,7 @@ function DotDashboardHeader({
|
|
|
12334
12334
|
onStatusChanged && onStatusChanged(publishedDashboard);
|
|
12335
12335
|
// Navigate to View Mode after publishing changes
|
|
12336
12336
|
onViewMode && onViewMode(publishedDashboard, 'view');
|
|
12337
|
-
}, [onStatusChanged]);
|
|
12337
|
+
}, [onStatusChanged, onViewMode]);
|
|
12338
12338
|
useEnqueueErrorMessage(!applicationsLoading && applicationsError);
|
|
12339
12339
|
useEnqueueErrorMessage(!metadataLoading && dashboardsError);
|
|
12340
12340
|
useEffect(() => {
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import { UserModel } from '../../core-api/openapi';
|
|
|
4
4
|
interface DashboardOptionsMenuProps {
|
|
5
5
|
currentUser?: UserModel;
|
|
6
6
|
dashboard: DashboardView;
|
|
7
|
+
/** True if the embedded dashboard is in Edit mode. **/
|
|
7
8
|
isEdit?: boolean;
|
|
8
9
|
menuPlacement?: PopperPlacement;
|
|
9
10
|
onDetails?: (dashboard: DashboardView) => void;
|