@digital-ai/dot-components 4.3.3 → 4.4.0
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
|
@@ -9603,6 +9603,7 @@ class HelpContentService {
|
|
|
9603
9603
|
|
|
9604
9604
|
function DotDashboardStatusPill({
|
|
9605
9605
|
dashboard,
|
|
9606
|
+
canEdit,
|
|
9606
9607
|
currentUser,
|
|
9607
9608
|
modifiedAuthorUser
|
|
9608
9609
|
}) {
|
|
@@ -9618,7 +9619,7 @@ function DotDashboardStatusPill({
|
|
|
9618
9619
|
})
|
|
9619
9620
|
});
|
|
9620
9621
|
} else if (dashboard.lifecycle_state === DashboardView.lifecycle_state.PUBLISHED && dashboard.is_being_modified && currentUser) {
|
|
9621
|
-
if (dashboard.modified_author_id === currentUser.id) {
|
|
9622
|
+
if (dashboard.modified_author_id === currentUser.id && canEdit) {
|
|
9622
9623
|
return jsx(DotTooltip, {
|
|
9623
9624
|
title: "You are currently editing this dashboard and the latest changes have not yet been published. Other users cannot edit this dashboard while you are editing it.",
|
|
9624
9625
|
placement: "top",
|
|
@@ -9641,8 +9642,9 @@ function DotDashboardStatusPill({
|
|
|
9641
9642
|
});
|
|
9642
9643
|
if (modifiedAuthorUser) {
|
|
9643
9644
|
const modifiedAuthorUserFullName = `${modifiedAuthorUser.given_name} ${modifiedAuthorUser.family_name}`;
|
|
9645
|
+
const tooltip = dashboard.modified_author_id === currentUser.id ? 'You are viewing the published version of this dashboard which you are currently editing.' : `${modifiedAuthorUserFullName} is currently editing this dashboard and it is locked for editing by other users.`;
|
|
9644
9646
|
return jsx(DotTooltip, {
|
|
9645
|
-
title:
|
|
9647
|
+
title: tooltip,
|
|
9646
9648
|
placement: "top",
|
|
9647
9649
|
children: lockedPublished
|
|
9648
9650
|
});
|
|
@@ -10595,6 +10597,7 @@ const DashboardDetailsSectionHeading = ({
|
|
|
10595
10597
|
});
|
|
10596
10598
|
};
|
|
10597
10599
|
const DotDashboardDetailsView = ({
|
|
10600
|
+
canEdit,
|
|
10598
10601
|
className,
|
|
10599
10602
|
dashboard,
|
|
10600
10603
|
onClose,
|
|
@@ -10690,6 +10693,7 @@ const DotDashboardDetailsView = ({
|
|
|
10690
10693
|
children: jsx(DotDashboardStatusPill, {
|
|
10691
10694
|
dashboard: dashboard,
|
|
10692
10695
|
currentUser: currentUser ? currentUser : null,
|
|
10696
|
+
canEdit: canEdit,
|
|
10693
10697
|
modifiedAuthorUser: modifiedAuthorUser ? modifiedAuthorUser : null
|
|
10694
10698
|
})
|
|
10695
10699
|
}), jsx(DashboardDetailsField, {
|
|
@@ -12026,39 +12030,43 @@ function DotDashboardOptionsMenu({
|
|
|
12026
12030
|
// If this is a published dashboard, with in-progress changes, and the user is the author of the changes,
|
|
12027
12031
|
// show the republish, revert, and view original options.
|
|
12028
12032
|
if (isPublished && currentUser && dashboard.is_being_modified && dashboard.modified_author_id === currentUser.id) {
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
-
|
|
12033
|
+
if (onStartStatusChange) {
|
|
12034
|
+
menuItems.push({
|
|
12035
|
+
children: jsx(DotButton, {
|
|
12036
|
+
ariaLabel: "Publish changes",
|
|
12037
|
+
type: "text",
|
|
12038
|
+
startIcon: jsx(DotIcon, {
|
|
12039
|
+
iconId: "send-airplane"
|
|
12040
|
+
}),
|
|
12041
|
+
children: "Publish changes"
|
|
12035
12042
|
}),
|
|
12036
|
-
|
|
12037
|
-
})
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12041
|
-
|
|
12042
|
-
|
|
12043
|
-
|
|
12044
|
-
|
|
12045
|
-
|
|
12043
|
+
key: 'republish'
|
|
12044
|
+
});
|
|
12045
|
+
}
|
|
12046
|
+
if (onStartRevert) {
|
|
12047
|
+
menuItems.push({
|
|
12048
|
+
children: jsx(DotButton, {
|
|
12049
|
+
ariaLabel: "Revert to original",
|
|
12050
|
+
type: "text",
|
|
12051
|
+
startIcon: jsx(DotIcon, {
|
|
12052
|
+
iconId: "undo"
|
|
12053
|
+
}),
|
|
12054
|
+
children: "Revert to original"
|
|
12046
12055
|
}),
|
|
12047
|
-
|
|
12048
|
-
})
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12056
|
+
key: 'revert'
|
|
12057
|
+
});
|
|
12058
|
+
menuItems.push({
|
|
12059
|
+
children: jsx(DotButton, {
|
|
12060
|
+
ariaLabel: "Open published dashboard",
|
|
12061
|
+
type: "text",
|
|
12062
|
+
startIcon: jsx(DotIcon, {
|
|
12063
|
+
iconId: "visibility-on"
|
|
12064
|
+
}),
|
|
12065
|
+
children: "Open published dashboard"
|
|
12057
12066
|
}),
|
|
12058
|
-
|
|
12059
|
-
})
|
|
12060
|
-
|
|
12061
|
-
});
|
|
12067
|
+
key: 'original'
|
|
12068
|
+
});
|
|
12069
|
+
}
|
|
12062
12070
|
}
|
|
12063
12071
|
if (onDetails) {
|
|
12064
12072
|
if (menuItems.length > 0) {
|
|
@@ -12607,6 +12615,7 @@ function DotDashboardHeader({
|
|
|
12607
12615
|
variant: "h2",
|
|
12608
12616
|
children: [backButton, dashboard === null || dashboard === void 0 ? void 0 : dashboard.name]
|
|
12609
12617
|
}), showStatus && dashboard && jsx(DotDashboardStatusPill, {
|
|
12618
|
+
canEdit: canEdit,
|
|
12610
12619
|
dashboard: dashboard,
|
|
12611
12620
|
currentUser: currentUser ? currentUser : null,
|
|
12612
12621
|
modifiedAuthorUser: modifiedAuthorUser ? modifiedAuthorUser : null
|
|
@@ -18429,6 +18438,7 @@ const StyledCarousel = styled.div`
|
|
|
18429
18438
|
position: -webkit-sticky;
|
|
18430
18439
|
top: calc(50% - ${theme.spacing(4)});
|
|
18431
18440
|
margin: ${theme.spacing(0, 2)};
|
|
18441
|
+
z-index: 1;
|
|
18432
18442
|
|
|
18433
18443
|
&.top {
|
|
18434
18444
|
top: ${theme.spacing(2)};
|
|
@@ -19192,4 +19202,4 @@ const BoardColumnSummary = ({
|
|
|
19192
19202
|
});
|
|
19193
19203
|
};
|
|
19194
19204
|
|
|
19195
|
-
export { ApiError$1 as ApiError, BoardStatusProvider, Cell, ColumnStatusProvider, CreateUUID, CssCell, CssGrid, CssGridDebug, DashboardAppTypeOptions, DashboardView, DatePickerKeydownContext, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotAvatarWithDetails, DotBadge, Board as DotBoard, BoardColumn as DotBoardColumn, BoardColumnActionBar as DotBoardColumnActionBar, BoardColumnCollapse as DotBoardColumnCollapse, BoardColumnExpand as DotBoardColumnExpand, BoardColumnHeader as DotBoardColumnHeader, BoardColumnItems as DotBoardColumnItems, BoardColumnSummary as DotBoardColumnSummary, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCarousel, DotCheckbox, DotCheckboxGroup, DotChip, DotChipList, DotClickAwayListener, DotConfirmationDialog, DotCopyButton, DotCoreApiProvider, DotDashboardActions, DotDashboardDetails, DotDashboardDialog, DotDashboardHeader, DotDashboardOptionsMenu, DotDashboardPublishConfirm, DotDashboardStatusPill, DotDatePicker, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyFilterState, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotIllustration, DotImpactDialog, DotInlineEdit, DotInputLabel, DotInputSelect, DotInputText, DotLinearProgress, DotLink, DotList, DotMenu, DotMetadataApiProvider, DotNavigationRail, DotPill, DotPopper, DotProgress, DotProgressButton, DotRadioButton, DotRadioGroup, DotSidebar, DotSkeleton, DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, DotSplitButton, DotStepper, DotStickyWithBorder, DotSwitch, DotTable, DotTableAction, DotTableActions, DotTablePagination, DotTabs, DotThemeProvider, DotTimePicker, DotTooltip, DotTruncateWithTooltip, DotTypography, avatarColors, breakpointOptions, checkIfValidDate, darkFigmaColors, lightThemeColors as lightColors, lightFigmaColors, mockScrollIntoView, parseAutoCompleteValue, variables as themeVariables, typographyOptions, useBoardStatus, useColumnStatus, useDotCoreApiContext, useDotMetadataApiContext, useDotSnackbarContext, useEnqueueErrorMessage };
|
|
19205
|
+
export { ApiError$1 as ApiError, BoardStatusProvider, Cell, ColumnStatusProvider, CreateUUID, CssCell, CssGrid, CssGridDebug, DashboardAppTypeOptions, DashboardView, DatePickerKeydownContext, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotAvatarWithDetails, DotBadge, Board as DotBoard, BoardColumn as DotBoardColumn, BoardColumnActionBar as DotBoardColumnActionBar, BoardColumnCollapse as DotBoardColumnCollapse, BoardColumnExpand as DotBoardColumnExpand, BoardColumnHeader as DotBoardColumnHeader, BoardColumnItems as DotBoardColumnItems, BoardColumnSummary as DotBoardColumnSummary, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCarousel, DotCheckbox, DotCheckboxGroup, DotChip, DotChipList, DotClickAwayListener, DotConfirmationDialog, DotCopyButton, DotCoreApiProvider, DotDashboardActions, DotDashboardDetails, DotDashboardDialog, DotDashboardHeader, DotDashboardOptionsMenu, DotDashboardPublishConfirm, DotDashboardStatusPill, DotDatePicker, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyFilterState, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotIllustration, DotImpactDialog, DotInlineEdit, DotInputLabel, DotInputSelect, DotInputText, DotLinearProgress, DotLink, DotList, DotMenu, DotMetadataApiProvider, DotNavigationRail, DotPill, DotPopper, DotProgress, DotProgressButton, DotRadioButton, DotRadioGroup, DotSidebar, DotSkeleton, DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, DotSplitButton, DotStepper, DotStickyWithBorder, DotSwitch, DotTable, DotTableAction, DotTableActions, DotTablePagination, DotTabs, DotThemeProvider, DotTimePicker, DotTooltip, DotTruncateWithTooltip, DotTypography, avatarColors, breakpointOptions, checkIfValidDate, darkFigmaColors, lightThemeColors as lightColors, lightFigmaColors, mockScrollIntoView, parseAutoCompleteValue, variables as themeVariables, typographyOptions, useBoardStatus, useColumnStatus, useDotCoreApiContext, useDotMetadataApiContext, useDotSnackbarContext, useEnqueueErrorMessage, useKeyPress };
|
package/package.json
CHANGED
|
@@ -3,22 +3,21 @@ import { CommonProps } from '../../CommonProps';
|
|
|
3
3
|
import { DashboardView } from '../metadata-api/openapi';
|
|
4
4
|
import { UserModel } from '../../core-api/openapi';
|
|
5
5
|
interface CommonDashboardDetailsProps extends CommonProps {
|
|
6
|
+
canEdit: boolean;
|
|
7
|
+
currentUser?: UserModel;
|
|
8
|
+
modifiedAuthorUser?: UserModel;
|
|
6
9
|
onClose?: (event: MouseEvent | KeyboardEvent) => void;
|
|
7
10
|
onFavorite?: (dashboardId: string, favoriteValue: boolean) => void;
|
|
8
11
|
yOffset?: number;
|
|
9
12
|
zIndex?: number;
|
|
10
13
|
}
|
|
11
14
|
interface DashboardDetailsViewProps extends CommonDashboardDetailsProps {
|
|
12
|
-
currentUser?: UserModel;
|
|
13
15
|
dashboard: DashboardView;
|
|
14
|
-
modifiedAuthorUser?: UserModel;
|
|
15
16
|
open: boolean;
|
|
16
17
|
}
|
|
17
|
-
export declare const DotDashboardDetailsView: ({ className, dashboard, onClose, onFavorite, open, yOffset, zIndex, currentUser, modifiedAuthorUser, }: DashboardDetailsViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const DotDashboardDetailsView: ({ canEdit, className, dashboard, onClose, onFavorite, open, yOffset, zIndex, currentUser, modifiedAuthorUser, }: DashboardDetailsViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
19
|
export interface DashboardDetailsProps extends CommonDashboardDetailsProps {
|
|
19
|
-
currentUser?: UserModel;
|
|
20
20
|
dashboard?: DashboardView;
|
|
21
|
-
modifiedAuthorUser?: UserModel;
|
|
22
21
|
}
|
|
23
22
|
export declare const DotDashboardDetails: ({ dashboard, onClose, onFavorite, currentUser, modifiedAuthorUser, ...commonProps }: DashboardDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
23
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { DashboardView } from '../metadata-api/openapi';
|
|
2
2
|
import { UserModel } from '../../core-api/openapi';
|
|
3
3
|
interface DashboardStatusPillProps {
|
|
4
|
+
canEdit: boolean;
|
|
4
5
|
currentUser?: UserModel;
|
|
5
6
|
dashboard: DashboardView;
|
|
6
7
|
modifiedAuthorUser?: UserModel;
|
|
7
8
|
}
|
|
8
|
-
declare function DotDashboardStatusPill({ dashboard, currentUser, modifiedAuthorUser, }: Readonly<DashboardStatusPillProps>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function DotDashboardStatusPill({ dashboard, canEdit, currentUser, modifiedAuthorUser, }: Readonly<DashboardStatusPillProps>): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export { DashboardStatusPillProps, DotDashboardStatusPill };
|
|
@@ -128,3 +128,4 @@ export { DotCarousel } from './carousel/Carousel';
|
|
|
128
128
|
export { DotStickyWithBorder } from './sticky-with-border';
|
|
129
129
|
export { CreateUUID } from './createUUID';
|
|
130
130
|
export { BoardStatusProvider, ColumnStatusProvider, DotBoard, DotBoardColumn, DotBoardColumnActionBar, DotBoardColumnCollapse, DotBoardColumnExpand, DotBoardColumnHeader, DotBoardColumnItems, DotBoardColumnSummary, useBoardStatus, useColumnStatus, } from './board';
|
|
131
|
+
export { useKeyPress } from '../hooks/useKeyPress';
|