@digital-ai/dot-components 4.1.0 → 4.1.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.
Files changed (2) hide show
  1. package/index.esm.js +15 -19
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -9543,7 +9543,7 @@ function DotDashboardStatusPill({
9543
9543
  label: "Edit in progress",
9544
9544
  size: "small",
9545
9545
  variant: "outlined",
9546
- status: "success"
9546
+ status: "warning"
9547
9547
  })
9548
9548
  });
9549
9549
  } else {
@@ -12294,24 +12294,20 @@ function DotDashboardBanner({
12294
12294
  });
12295
12295
  }
12296
12296
  function getDashboardBanner(dashboard, isEdit, onExitEditMode, onPublishChanges, currentUser, modifiedAuthorUser) {
12297
- if (isEdit) {
12298
- if (dashboard.is_being_modified) {
12299
- if (dashboard.modified_author_id === currentUser.id) {
12300
- // We're in Edit mode for a published dashboard, and the dashboard is being modified by the current user.
12301
- return jsx(DotDashboardBanner, {
12302
- bannerSeverity: "warning",
12303
- bannerText: jsx(DotTypography, {
12304
- children: "The Dashboard is currently in edit mode and only you can make changes. Publish the changes for other users to see the updated dashboard."
12305
- }),
12306
- buttonText: "Publish changes",
12307
- buttonAction: () => {
12308
- onPublishChanges(dashboard);
12309
- }
12310
- });
12311
- }
12312
- }
12313
- } else {
12314
- if (currentUser && dashboard.is_being_modified && dashboard.modified_author_id !== currentUser.id && modifiedAuthorUser) {
12297
+ if (dashboard.is_being_modified && currentUser) {
12298
+ if (dashboard.modified_author_id === currentUser.id) {
12299
+ // We're in Edit mode for a published dashboard, and the dashboard is being modified by the current user.
12300
+ return jsx(DotDashboardBanner, {
12301
+ bannerSeverity: "warning",
12302
+ bannerText: jsx(DotTypography, {
12303
+ children: "The Dashboard is currently locked and only you can make changes. Publish the changes for other users to see the updated dashboard."
12304
+ }),
12305
+ buttonText: "Publish changes",
12306
+ buttonAction: () => {
12307
+ onPublishChanges(dashboard);
12308
+ }
12309
+ });
12310
+ } else if (dashboard.modified_author_id !== currentUser.id && modifiedAuthorUser) {
12315
12311
  // We're in View mode for a published dashboard that is being edited by someone else.
12316
12312
  const bannerText = jsx(DotTypography, {
12317
12313
  children: jsxs("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [