@digital-ai/dot-components 3.10.1 → 3.11.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 +1203 -782
- package/package.json +1 -1
- package/src/lib/components/analytics/dashboard-actions/DashboardActions.d.ts +2 -1
- package/src/lib/components/analytics/dashboard-actions/DashboardOptionsMenu.d.ts +2 -1
- package/src/lib/components/analytics/dashboard-details/DashboardDetails.d.ts +19 -0
- package/src/lib/components/analytics/dashboard-details/DashboardDetails.styles.d.ts +2 -0
- package/src/lib/components/analytics/dashboard-details/DashboardStatusPill.d.ts +5 -0
- package/src/lib/components/analytics/metadata-api/MetadataApiProvider.d.ts +2 -1
- package/src/lib/components/analytics/metadata-api/openapi/models/DashboardView.d.ts +12 -0
- package/src/lib/components/chip/ChipList.d.ts +17 -0
- package/src/lib/components/chip/ChipList.styles.d.ts +2 -0
- package/src/lib/components/index.d.ts +4 -1
package/index.esm.js
CHANGED
|
@@ -104,12 +104,12 @@ const DotTooltip = ({
|
|
|
104
104
|
}) : children;
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
const rootClassName$
|
|
107
|
+
const rootClassName$1i = 'dot-icon';
|
|
108
108
|
const StyledIcon = styled(Icon)`
|
|
109
109
|
${({
|
|
110
110
|
theme
|
|
111
111
|
}) => css`
|
|
112
|
-
&.${rootClassName$
|
|
112
|
+
&.${rootClassName$1i} {
|
|
113
113
|
color: ${theme.palette.figma.icon.black};
|
|
114
114
|
font-size: 20px;
|
|
115
115
|
|
|
@@ -146,7 +146,7 @@ const DotIcon = ({
|
|
|
146
146
|
iconId,
|
|
147
147
|
tooltip
|
|
148
148
|
}) => {
|
|
149
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
149
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1i, className);
|
|
150
150
|
return jsx(DotTooltip, {
|
|
151
151
|
title: tooltip,
|
|
152
152
|
children: jsx(StyledIcon, {
|
|
@@ -207,7 +207,7 @@ const DotTypography = ({
|
|
|
207
207
|
});
|
|
208
208
|
};
|
|
209
209
|
|
|
210
|
-
const rootClassName$
|
|
210
|
+
const rootClassName$1h = 'dot-accordion';
|
|
211
211
|
const summaryClassName = 'dot-accordion-summary';
|
|
212
212
|
const detailClassName = 'dot-accordion-details';
|
|
213
213
|
const StyledAccordion = styled(Accordion)`
|
|
@@ -218,7 +218,7 @@ const StyledAccordion = styled(Accordion)`
|
|
|
218
218
|
background: ${theme.palette.figma.background.level1.white};
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
&.${rootClassName$
|
|
221
|
+
&.${rootClassName$1h} .${summaryClassName} {
|
|
222
222
|
align-items: center;
|
|
223
223
|
background: ${theme.palette.figma.background.level1.white};
|
|
224
224
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -263,7 +263,7 @@ const DotAccordion = ({
|
|
|
263
263
|
ariaLabel,
|
|
264
264
|
children,
|
|
265
265
|
className,
|
|
266
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
266
|
+
'data-pendoid': dataPendoId = rootClassName$1h,
|
|
267
267
|
'data-testid': dataTestId = 'dot-accordion',
|
|
268
268
|
disabled = false,
|
|
269
269
|
expanded,
|
|
@@ -274,7 +274,7 @@ const DotAccordion = ({
|
|
|
274
274
|
summary,
|
|
275
275
|
noWrap = true
|
|
276
276
|
}) => {
|
|
277
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
277
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1h, className);
|
|
278
278
|
const [elevation, setElevation] = useState();
|
|
279
279
|
useEffect(() => {
|
|
280
280
|
if (onChange && expanded === undefined) {
|
|
@@ -390,7 +390,7 @@ const readOnlyStyles = theme => css`
|
|
|
390
390
|
}
|
|
391
391
|
`;
|
|
392
392
|
|
|
393
|
-
const rootClassName$
|
|
393
|
+
const rootClassName$1g = 'dot-text-field';
|
|
394
394
|
const rootSelectClassName = 'dot-select-field';
|
|
395
395
|
const labelClassName = 'dot-input-label';
|
|
396
396
|
const errorClassName = 'dot-error';
|
|
@@ -438,7 +438,7 @@ const StyledTextField = styled(TextField)`
|
|
|
438
438
|
theme,
|
|
439
439
|
InputProps
|
|
440
440
|
}) => css`
|
|
441
|
-
&.${rootClassName$
|
|
441
|
+
&.${rootClassName$1g} {
|
|
442
442
|
.MuiInputBase-root {
|
|
443
443
|
margin-bottom: 0;
|
|
444
444
|
}
|
|
@@ -482,7 +482,7 @@ const StyledTextField = styled(TextField)`
|
|
|
482
482
|
margin-right: ${theme.spacing(2)};
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
-
&.${rootSelectClassName}, &.${rootClassName$
|
|
485
|
+
&.${rootSelectClassName}, &.${rootClassName$1g} {
|
|
486
486
|
.${adornmentIconClassName} {
|
|
487
487
|
color: ${theme.palette.figma.icon.black};
|
|
488
488
|
p {
|
|
@@ -573,15 +573,15 @@ const StyledTextField = styled(TextField)`
|
|
|
573
573
|
`}
|
|
574
574
|
`;
|
|
575
575
|
|
|
576
|
-
const rootClassName$
|
|
576
|
+
const rootClassName$1f = 'dot-action-toolbar';
|
|
577
577
|
const StyledToolbar = styled(Toolbar)`
|
|
578
578
|
${({
|
|
579
579
|
theme
|
|
580
580
|
}) => css`
|
|
581
|
-
&.${rootClassName$
|
|
581
|
+
&.${rootClassName$1f} {
|
|
582
582
|
border-bottom: 1px solid ${theme.palette.figma.border.default};
|
|
583
583
|
|
|
584
|
-
.${rootClassName$
|
|
584
|
+
.${rootClassName$1g} .MuiInputBase-root {
|
|
585
585
|
margin-bottom: 0;
|
|
586
586
|
}
|
|
587
587
|
}
|
|
@@ -595,7 +595,7 @@ const DotActionToolbar = ({
|
|
|
595
595
|
'data-testid': dataTestId,
|
|
596
596
|
variant = 'dense'
|
|
597
597
|
}) => {
|
|
598
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
598
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1f, className);
|
|
599
599
|
return jsx(StyledToolbar, {
|
|
600
600
|
"aria-label": ariaLabel,
|
|
601
601
|
className: rootClasses,
|
|
@@ -1665,12 +1665,12 @@ const renderNodeOrTypography = (content, typographyVariant = 'body1') => {
|
|
|
1665
1665
|
const checkIfArrowUpPressed = event => event.key === 'ArrowUp';
|
|
1666
1666
|
const checkIfArrowDownPressed = event => event.key === 'ArrowDown';
|
|
1667
1667
|
|
|
1668
|
-
const rootClassName$
|
|
1668
|
+
const rootClassName$1e = 'dot-alert-banner';
|
|
1669
1669
|
const StyledAlertBanner = styled(Alert)`
|
|
1670
1670
|
${({
|
|
1671
1671
|
theme
|
|
1672
1672
|
}) => css`
|
|
1673
|
-
&.${rootClassName$
|
|
1673
|
+
&.${rootClassName$1e} {
|
|
1674
1674
|
align-items: center;
|
|
1675
1675
|
box-sizing: border-box;
|
|
1676
1676
|
min-height: 48px;
|
|
@@ -1705,7 +1705,7 @@ const DotAlertBanner = ({
|
|
|
1705
1705
|
ariaLabel,
|
|
1706
1706
|
children,
|
|
1707
1707
|
className,
|
|
1708
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
1708
|
+
'data-pendoid': dataPendoId = rootClassName$1e,
|
|
1709
1709
|
'data-testid': dataTestId,
|
|
1710
1710
|
onClose,
|
|
1711
1711
|
roundedCorners = true,
|
|
@@ -1713,7 +1713,7 @@ const DotAlertBanner = ({
|
|
|
1713
1713
|
textVariant = 'body1',
|
|
1714
1714
|
width
|
|
1715
1715
|
}) => {
|
|
1716
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
1716
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1e, severity, className);
|
|
1717
1717
|
/* For simple string use default component, for everything else use 'div' */
|
|
1718
1718
|
const typographyComponent = isString$2(children) ? undefined : 'div';
|
|
1719
1719
|
return jsx(StyledAlertBanner, {
|
|
@@ -2391,7 +2391,7 @@ const useDotCoreApiContext = () => {
|
|
|
2391
2391
|
return useContext(DotCoreApiContext);
|
|
2392
2392
|
};
|
|
2393
2393
|
|
|
2394
|
-
const rootClassName$
|
|
2394
|
+
const rootClassName$1d = 'dot-avatar';
|
|
2395
2395
|
const avatarSpacing = {
|
|
2396
2396
|
small: 3,
|
|
2397
2397
|
medium: 5,
|
|
@@ -2401,7 +2401,7 @@ const StyledAvatar = styled(Avatar)`
|
|
|
2401
2401
|
${({
|
|
2402
2402
|
theme
|
|
2403
2403
|
}) => css`
|
|
2404
|
-
&.${rootClassName$
|
|
2404
|
+
&.${rootClassName$1d} {
|
|
2405
2405
|
display: inline-flex;
|
|
2406
2406
|
background-color: ${({
|
|
2407
2407
|
color
|
|
@@ -2513,7 +2513,7 @@ const DotAvatar = ({
|
|
|
2513
2513
|
variant = 'circular',
|
|
2514
2514
|
style
|
|
2515
2515
|
}) => {
|
|
2516
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2516
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1d, className);
|
|
2517
2517
|
const getAvatarColor = () => {
|
|
2518
2518
|
if ((style === null || style === void 0 ? void 0 : style.color) !== undefined) return 'inherit';
|
|
2519
2519
|
if (color) return color;
|
|
@@ -2552,12 +2552,12 @@ const DotAvatar = ({
|
|
|
2552
2552
|
});
|
|
2553
2553
|
};
|
|
2554
2554
|
|
|
2555
|
-
const rootClassName$
|
|
2555
|
+
const rootClassName$1c = 'dot-button';
|
|
2556
2556
|
const StyledButton = styled(Button)`
|
|
2557
2557
|
${({
|
|
2558
2558
|
theme
|
|
2559
2559
|
}) => css`
|
|
2560
|
-
&.${rootClassName$
|
|
2560
|
+
&.${rootClassName$1c} {
|
|
2561
2561
|
background-color: ${theme.palette.figma.primary.normal};
|
|
2562
2562
|
margin: ${theme.spacing(0.5)};
|
|
2563
2563
|
padding: ${theme.spacing(0.75, 2)};
|
|
@@ -2641,7 +2641,7 @@ const DotButton = forwardRef(({
|
|
|
2641
2641
|
autoFocus = false,
|
|
2642
2642
|
children,
|
|
2643
2643
|
className,
|
|
2644
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
2644
|
+
'data-pendoid': dataPendoId = rootClassName$1c,
|
|
2645
2645
|
'data-testid': dataTestId,
|
|
2646
2646
|
disabled = false,
|
|
2647
2647
|
disableRipple = false,
|
|
@@ -2657,7 +2657,7 @@ const DotButton = forwardRef(({
|
|
|
2657
2657
|
tooltipPlacement,
|
|
2658
2658
|
type = 'primary'
|
|
2659
2659
|
}, ref) => {
|
|
2660
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2660
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1c, className);
|
|
2661
2661
|
let color;
|
|
2662
2662
|
let variant;
|
|
2663
2663
|
switch (type) {
|
|
@@ -2681,7 +2681,7 @@ const DotButton = forwardRef(({
|
|
|
2681
2681
|
return jsx(DotTooltip, {
|
|
2682
2682
|
placement: tooltipPlacement,
|
|
2683
2683
|
title: tooltip,
|
|
2684
|
-
"data-testid": `${dataTestId || rootClassName$
|
|
2684
|
+
"data-testid": `${dataTestId || rootClassName$1c}-tooltip`,
|
|
2685
2685
|
children: jsx(StyledButton, {
|
|
2686
2686
|
"aria-label": ariaLabel,
|
|
2687
2687
|
autoFocus: autoFocus,
|
|
@@ -2690,7 +2690,7 @@ const DotButton = forwardRef(({
|
|
|
2690
2690
|
},
|
|
2691
2691
|
color: color,
|
|
2692
2692
|
"data-pendoid": dataPendoId,
|
|
2693
|
-
"data-testid": dataTestId || rootClassName$
|
|
2693
|
+
"data-testid": dataTestId || rootClassName$1c,
|
|
2694
2694
|
disableRipple: disableRipple,
|
|
2695
2695
|
disabled: disabled,
|
|
2696
2696
|
endIcon: endIcon,
|
|
@@ -2709,10 +2709,10 @@ const DotButton = forwardRef(({
|
|
|
2709
2709
|
});
|
|
2710
2710
|
});
|
|
2711
2711
|
|
|
2712
|
-
const rootClassName$
|
|
2712
|
+
const rootClassName$1b = 'dot-link';
|
|
2713
2713
|
const StyledLink = styled(Link)`
|
|
2714
2714
|
${() => css`
|
|
2715
|
-
&.${rootClassName$
|
|
2715
|
+
&.${rootClassName$1b} {
|
|
2716
2716
|
cursor: pointer;
|
|
2717
2717
|
|
|
2718
2718
|
&:hover.MuiLink-underlineHover {
|
|
@@ -2728,7 +2728,7 @@ const DotLink = ({
|
|
|
2728
2728
|
children,
|
|
2729
2729
|
className,
|
|
2730
2730
|
color = 'primary',
|
|
2731
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
2731
|
+
'data-pendoid': dataPendoId = rootClassName$1b,
|
|
2732
2732
|
'data-testid': dataTestId,
|
|
2733
2733
|
href,
|
|
2734
2734
|
onClick,
|
|
@@ -2740,7 +2740,7 @@ const DotLink = ({
|
|
|
2740
2740
|
tooltip,
|
|
2741
2741
|
underline = 'always'
|
|
2742
2742
|
}) => {
|
|
2743
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2743
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1b, className);
|
|
2744
2744
|
useEffect(() => {
|
|
2745
2745
|
// Include a console warning if the link is not a string and no ariaLabel is provided
|
|
2746
2746
|
if (!isString$2(children) && !ariaLabel) {
|
|
@@ -2790,7 +2790,7 @@ const CreateUUID = () => {
|
|
|
2790
2790
|
});
|
|
2791
2791
|
};
|
|
2792
2792
|
|
|
2793
|
-
const rootClassName$
|
|
2793
|
+
const rootClassName$1a = 'dot-list';
|
|
2794
2794
|
const listItemRootClass = 'dot-list-item';
|
|
2795
2795
|
const nestedListClassName = 'dot-nested-list';
|
|
2796
2796
|
const nestedDrawerClassName = 'dot-nested-drawer';
|
|
@@ -2798,7 +2798,7 @@ const StyledList = styled(List)`
|
|
|
2798
2798
|
${({
|
|
2799
2799
|
theme
|
|
2800
2800
|
}) => css`
|
|
2801
|
-
&.${rootClassName$
|
|
2801
|
+
&.${rootClassName$1a} {
|
|
2802
2802
|
background: ${theme.palette.figma.background.level0.componentsBackground};
|
|
2803
2803
|
|
|
2804
2804
|
.dot-icon {
|
|
@@ -2881,12 +2881,12 @@ const DotListDivider = ({
|
|
|
2881
2881
|
});
|
|
2882
2882
|
};
|
|
2883
2883
|
|
|
2884
|
-
const rootClassName$
|
|
2884
|
+
const rootClassName$19 = 'dot-progress';
|
|
2885
2885
|
const StyledProgress = styled.div`
|
|
2886
2886
|
${({
|
|
2887
2887
|
theme
|
|
2888
2888
|
}) => css`
|
|
2889
|
-
&.${rootClassName$
|
|
2889
|
+
&.${rootClassName$19} {
|
|
2890
2890
|
line-height: 0;
|
|
2891
2891
|
|
|
2892
2892
|
.dot-progress-with-label-wrapper {
|
|
@@ -2937,7 +2937,7 @@ const DotProgress = ({
|
|
|
2937
2937
|
value,
|
|
2938
2938
|
variant = 'indeterminate'
|
|
2939
2939
|
}) => {
|
|
2940
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2940
|
+
const rootClasses = useStylesWithRootClass(rootClassName$19, className);
|
|
2941
2941
|
useEffect(() => {
|
|
2942
2942
|
if (!ariaLabel) {
|
|
2943
2943
|
console.warn('a11y: DotProgress must have an ariaLabel to describe the progress component');
|
|
@@ -3003,34 +3003,34 @@ var variables = /*#__PURE__*/Object.freeze({
|
|
|
3003
3003
|
levelTop: levelTop
|
|
3004
3004
|
});
|
|
3005
3005
|
|
|
3006
|
-
const rootClassName$
|
|
3006
|
+
const rootClassName$18 = 'dot-popper';
|
|
3007
3007
|
const StyledPopper$1 = styled(Popper)`
|
|
3008
3008
|
${({
|
|
3009
3009
|
theme
|
|
3010
3010
|
}) => css`
|
|
3011
|
-
&.${rootClassName$
|
|
3011
|
+
&.${rootClassName$18} {
|
|
3012
3012
|
font-family: ${theme.typography.fontFamily};
|
|
3013
3013
|
font-size: ${theme.typography.body1.fontSize}px;
|
|
3014
3014
|
}
|
|
3015
3015
|
|
|
3016
|
-
&.${rootClassName$
|
|
3016
|
+
&.${rootClassName$18}, &.${rootClassName$18} > .dot-popper-paper {
|
|
3017
3017
|
background-color: ${theme.palette.figma.background.level1.white};
|
|
3018
3018
|
}
|
|
3019
3019
|
`}
|
|
3020
3020
|
`;
|
|
3021
3021
|
|
|
3022
3022
|
const flyoutMenuClassName = 'dot-flyout-menu';
|
|
3023
|
-
const rootClassName$
|
|
3023
|
+
const rootClassName$17 = 'dot-menu';
|
|
3024
3024
|
const StyledPopper = styled(Popper)`
|
|
3025
3025
|
${({
|
|
3026
3026
|
theme
|
|
3027
3027
|
}) => css`
|
|
3028
|
-
&.${rootClassName$
|
|
3028
|
+
&.${rootClassName$18} {
|
|
3029
3029
|
font-family: ${theme.typography.fontFamily};
|
|
3030
3030
|
font-size: ${theme.typography.body1.fontSize}px;
|
|
3031
3031
|
z-index: ${levelSecond};
|
|
3032
3032
|
}
|
|
3033
|
-
&.${rootClassName$
|
|
3033
|
+
&.${rootClassName$17}, &.${rootClassName$18} {
|
|
3034
3034
|
.MuiPaper-root {
|
|
3035
3035
|
border: 1px solid ${theme.palette.layer.n100};
|
|
3036
3036
|
}
|
|
@@ -3110,14 +3110,14 @@ const MENU_ITEM_HEIGHT_NORMAL = 48;
|
|
|
3110
3110
|
const MENU_ITEM_HEIGHT_DENSE = 36;
|
|
3111
3111
|
const DEFAULT_MAX_VISIBLE_ITEMS = 7;
|
|
3112
3112
|
|
|
3113
|
-
const rootClassName$
|
|
3113
|
+
const rootClassName$16 = 'dot-ul';
|
|
3114
3114
|
const listItemClassName$1 = 'dot-li';
|
|
3115
3115
|
const listItemWithSubmenuClassName = 'dot-li-with-submenu';
|
|
3116
3116
|
const StyledMenuList = styled(MenuList)`
|
|
3117
3117
|
${({
|
|
3118
3118
|
theme
|
|
3119
3119
|
}) => css`
|
|
3120
|
-
&.${rootClassName$
|
|
3120
|
+
&.${rootClassName$16} {
|
|
3121
3121
|
background: ${theme.palette.figma.background.level1.white};
|
|
3122
3122
|
|
|
3123
3123
|
.dot-li {
|
|
@@ -3213,7 +3213,7 @@ const DotMenuList = forwardRef(({
|
|
|
3213
3213
|
onSubMenuCreate,
|
|
3214
3214
|
selectedKey
|
|
3215
3215
|
}, ref) => {
|
|
3216
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3216
|
+
const rootClasses = useStylesWithRootClass(rootClassName$16, className);
|
|
3217
3217
|
const [activeSubmenu, setActiveSubmenu] = useState(null);
|
|
3218
3218
|
const [subItemAnchorEl, setSubItemAnchorEl] = useState(null);
|
|
3219
3219
|
const openSubmenu = (target, itemKey) => {
|
|
@@ -3324,7 +3324,7 @@ const DotMenu = ({
|
|
|
3324
3324
|
open = false,
|
|
3325
3325
|
selectedKey
|
|
3326
3326
|
}) => {
|
|
3327
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3327
|
+
const rootClasses = useStylesWithRootClass(rootClassName$17, className, loading ? 'loading' : '');
|
|
3328
3328
|
const isSubmenu = checkIfSubmenu(anchorEl);
|
|
3329
3329
|
const hasSubItems = checkForSubItems(menuItems);
|
|
3330
3330
|
// Timeout object is customizable when Menu component is either submenu
|
|
@@ -3412,12 +3412,12 @@ const DotMenu = ({
|
|
|
3412
3412
|
});
|
|
3413
3413
|
};
|
|
3414
3414
|
|
|
3415
|
-
const rootClassName$
|
|
3415
|
+
const rootClassName$15 = 'dot-drawer';
|
|
3416
3416
|
const StyledDrawer = styled(Drawer)`
|
|
3417
3417
|
${({
|
|
3418
3418
|
theme
|
|
3419
3419
|
}) => css`
|
|
3420
|
-
&.${rootClassName$
|
|
3420
|
+
&.${rootClassName$15} .MuiBackdrop-root {
|
|
3421
3421
|
background-color: ${theme.palette.figma.overlay.default};
|
|
3422
3422
|
}
|
|
3423
3423
|
|
|
@@ -3436,12 +3436,12 @@ const StyledDrawer = styled(Drawer)`
|
|
|
3436
3436
|
`}
|
|
3437
3437
|
`;
|
|
3438
3438
|
|
|
3439
|
-
const rootClassName$
|
|
3439
|
+
const rootClassName$14 = 'dot-drawer-header';
|
|
3440
3440
|
const StyleDrawerHeader = styled.div`
|
|
3441
3441
|
${({
|
|
3442
3442
|
theme
|
|
3443
3443
|
}) => css`
|
|
3444
|
-
&.${rootClassName$
|
|
3444
|
+
&.${rootClassName$14} {
|
|
3445
3445
|
padding: ${theme.spacing(0, 0, 2)};
|
|
3446
3446
|
display: flex;
|
|
3447
3447
|
align-items: center;
|
|
@@ -3452,13 +3452,13 @@ const StyleDrawerHeader = styled.div`
|
|
|
3452
3452
|
`}
|
|
3453
3453
|
`;
|
|
3454
3454
|
|
|
3455
|
-
const rootClassName$
|
|
3455
|
+
const rootClassName$13 = 'dot-icon-btn';
|
|
3456
3456
|
const StyledIconButton = styled(IconButton)`
|
|
3457
3457
|
${({
|
|
3458
3458
|
theme,
|
|
3459
3459
|
color
|
|
3460
3460
|
}) => css`
|
|
3461
|
-
&.${rootClassName$
|
|
3461
|
+
&.${rootClassName$13} {
|
|
3462
3462
|
${color === 'inherit' ? css`
|
|
3463
3463
|
color: inherit;
|
|
3464
3464
|
` : ''}
|
|
@@ -3517,7 +3517,7 @@ const DotIconButton = ({
|
|
|
3517
3517
|
ariaRole = 'button',
|
|
3518
3518
|
className,
|
|
3519
3519
|
color = 'inherit',
|
|
3520
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
3520
|
+
'data-pendoid': dataPendoId = rootClassName$13,
|
|
3521
3521
|
'data-testid': dataTestId,
|
|
3522
3522
|
disableRipple = false,
|
|
3523
3523
|
disabled = false,
|
|
@@ -3530,7 +3530,7 @@ const DotIconButton = ({
|
|
|
3530
3530
|
tooltipPlacement
|
|
3531
3531
|
}) => {
|
|
3532
3532
|
const rippleClassName = disableRipple ? 'ripple-disabled' : '';
|
|
3533
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3533
|
+
const rootClasses = useStylesWithRootClass(rootClassName$13, rippleClassName, `shape-${shape}`, className);
|
|
3534
3534
|
return jsx(DotTooltip, {
|
|
3535
3535
|
"data-testid": "icon-button-tooltip",
|
|
3536
3536
|
placement: tooltipPlacement,
|
|
@@ -3565,7 +3565,7 @@ const DotDrawerHeader = ({
|
|
|
3565
3565
|
onClose,
|
|
3566
3566
|
variant
|
|
3567
3567
|
}) => {
|
|
3568
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3568
|
+
const rootClasses = useStylesWithRootClass(rootClassName$14, className);
|
|
3569
3569
|
return jsxs(StyleDrawerHeader, {
|
|
3570
3570
|
"aria-label": ariaLabel,
|
|
3571
3571
|
"aria-level": 2,
|
|
@@ -3582,10 +3582,10 @@ const DotDrawerHeader = ({
|
|
|
3582
3582
|
});
|
|
3583
3583
|
};
|
|
3584
3584
|
|
|
3585
|
-
const rootClassName$
|
|
3585
|
+
const rootClassName$12 = 'dot-drawer-body';
|
|
3586
3586
|
const StyleDrawerBody = styled.div`
|
|
3587
3587
|
${() => css`
|
|
3588
|
-
&.${rootClassName$
|
|
3588
|
+
&.${rootClassName$12} {
|
|
3589
3589
|
display: flex;
|
|
3590
3590
|
.dot-drawer-close-button {
|
|
3591
3591
|
align-self: self-start;
|
|
@@ -3606,7 +3606,7 @@ const DotDrawerBody = ({
|
|
|
3606
3606
|
onClose,
|
|
3607
3607
|
variant
|
|
3608
3608
|
}) => {
|
|
3609
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3609
|
+
const rootClasses = useStylesWithRootClass(rootClassName$12, className);
|
|
3610
3610
|
return jsxs(StyleDrawerBody, {
|
|
3611
3611
|
"aria-label": ariaLabel,
|
|
3612
3612
|
className: rootClasses,
|
|
@@ -3621,12 +3621,12 @@ const DotDrawerBody = ({
|
|
|
3621
3621
|
});
|
|
3622
3622
|
};
|
|
3623
3623
|
|
|
3624
|
-
const rootClassName
|
|
3624
|
+
const rootClassName$11 = 'dot-drawer-footer';
|
|
3625
3625
|
const StyleDrawerFooter = styled.div`
|
|
3626
3626
|
${({
|
|
3627
3627
|
theme
|
|
3628
3628
|
}) => css`
|
|
3629
|
-
&.${rootClassName
|
|
3629
|
+
&.${rootClassName$11} {
|
|
3630
3630
|
padding: ${theme.spacing(2, 0, 0)};
|
|
3631
3631
|
}
|
|
3632
3632
|
`}
|
|
@@ -3639,7 +3639,7 @@ const DotDrawerFooter = ({
|
|
|
3639
3639
|
className,
|
|
3640
3640
|
'data-testid': dataTestId
|
|
3641
3641
|
}) => {
|
|
3642
|
-
const rootClasses = useStylesWithRootClass(rootClassName
|
|
3642
|
+
const rootClasses = useStylesWithRootClass(rootClassName$11, className);
|
|
3643
3643
|
return jsx(StyleDrawerFooter, {
|
|
3644
3644
|
"aria-label": ariaLabel,
|
|
3645
3645
|
className: rootClasses,
|
|
@@ -3655,7 +3655,7 @@ const DotDrawer = ({
|
|
|
3655
3655
|
ariaRole = 'dialog',
|
|
3656
3656
|
className,
|
|
3657
3657
|
children,
|
|
3658
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
3658
|
+
'data-pendoid': dataPendoId = rootClassName$15,
|
|
3659
3659
|
'data-testid': dataTestId,
|
|
3660
3660
|
drawerBodyProps,
|
|
3661
3661
|
drawerFooterProps,
|
|
@@ -3678,7 +3678,7 @@ const DotDrawer = ({
|
|
|
3678
3678
|
onClose(event);
|
|
3679
3679
|
}
|
|
3680
3680
|
};
|
|
3681
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3681
|
+
const rootClasses = useStylesWithRootClass(rootClassName$15, className);
|
|
3682
3682
|
const backdropEnabled = variant === 'temporary' && !(ModalProps === null || ModalProps === void 0 ? void 0 : ModalProps.hideBackdrop);
|
|
3683
3683
|
const headerExists = !!drawerHeaderProps;
|
|
3684
3684
|
const bodyPendoId = drawerBodyProps ? drawerBodyProps['data-pendoid'] : 'drawer-body';
|
|
@@ -4076,7 +4076,7 @@ const DotList = ({
|
|
|
4076
4076
|
nestedListType = 'expandable',
|
|
4077
4077
|
width = 240
|
|
4078
4078
|
}) => {
|
|
4079
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
4079
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1a, className);
|
|
4080
4080
|
const listWidth = typeof width === 'number' ? `${width}px` : width;
|
|
4081
4081
|
const listRef = useRef();
|
|
4082
4082
|
const [listItemIndex, setListItemIndex] = useState(null);
|
|
@@ -4170,12 +4170,12 @@ const DotList = ({
|
|
|
4170
4170
|
});
|
|
4171
4171
|
};
|
|
4172
4172
|
|
|
4173
|
-
const rootClassName$
|
|
4173
|
+
const rootClassName$10 = 'dot-copy-button';
|
|
4174
4174
|
const StyledCopyButton = styled.span`
|
|
4175
4175
|
${({
|
|
4176
4176
|
theme
|
|
4177
4177
|
}) => css`
|
|
4178
|
-
&.${rootClassName$
|
|
4178
|
+
&.${rootClassName$10} .copied-to-clipboard {
|
|
4179
4179
|
color: ${theme.palette.figma.success.normal};
|
|
4180
4180
|
|
|
4181
4181
|
&.MuiIcon-fontSizeSmall.button-size-small {
|
|
@@ -4201,7 +4201,7 @@ const DotCopyButton = ({
|
|
|
4201
4201
|
color = 'inherit',
|
|
4202
4202
|
copiedTooltip = 'Copied!',
|
|
4203
4203
|
copyTooltip = 'Copy to clipboard',
|
|
4204
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
4204
|
+
'data-pendoid': dataPendoId = rootClassName$10,
|
|
4205
4205
|
'data-testid': dataTestId = 'dot-copy-button',
|
|
4206
4206
|
disabled = false,
|
|
4207
4207
|
disableRipple = false,
|
|
@@ -4249,7 +4249,7 @@ const DotCopyButton = ({
|
|
|
4249
4249
|
return false;
|
|
4250
4250
|
}, [value, showCopiedIcon, disabled, onClick]);
|
|
4251
4251
|
return jsxs(StyledCopyButton, {
|
|
4252
|
-
className: rootClassName$
|
|
4252
|
+
className: rootClassName$10,
|
|
4253
4253
|
"data-testid": dataTestId,
|
|
4254
4254
|
children: [!timedShowCopiedIcon && jsx(DotIconButton, {
|
|
4255
4255
|
ariaLabel: ariaLabel,
|
|
@@ -4338,7 +4338,7 @@ const DotInputText = ({
|
|
|
4338
4338
|
autoFocus,
|
|
4339
4339
|
className,
|
|
4340
4340
|
defaultValue,
|
|
4341
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
4341
|
+
'data-pendoid': dataPendoId = rootClassName$1g,
|
|
4342
4342
|
'data-testid': dataTestId,
|
|
4343
4343
|
disabled = false,
|
|
4344
4344
|
error = false,
|
|
@@ -4384,7 +4384,7 @@ const DotInputText = ({
|
|
|
4384
4384
|
const internalInputRef = useRef(null);
|
|
4385
4385
|
const textFieldInputRef = inputRef || internalInputRef;
|
|
4386
4386
|
const [inputTextState, setInputTextState] = useState(getInitialState(value));
|
|
4387
|
-
const rootStyles = useStylesWithRootClass(rootClassName$
|
|
4387
|
+
const rootStyles = useStylesWithRootClass(rootClassName$1g, hasError, hasWarning, hasSuccess, readOnly && readOnlyClassName$1);
|
|
4388
4388
|
useEffect(() => {
|
|
4389
4389
|
if (value !== inputTextState.inputValue) {
|
|
4390
4390
|
setInputTextState(getInitialState(value, defaultValue));
|
|
@@ -4520,10 +4520,10 @@ const DotInputText = ({
|
|
|
4520
4520
|
});
|
|
4521
4521
|
};
|
|
4522
4522
|
|
|
4523
|
-
const rootClassName
|
|
4523
|
+
const rootClassName$$ = 'dot-search-input';
|
|
4524
4524
|
const StyledSearchInput = styled.span`
|
|
4525
4525
|
${() => css`
|
|
4526
|
-
&.${rootClassName
|
|
4526
|
+
&.${rootClassName$$} {
|
|
4527
4527
|
}
|
|
4528
4528
|
`}
|
|
4529
4529
|
`;
|
|
@@ -4540,7 +4540,7 @@ function SearchInput({
|
|
|
4540
4540
|
tooltip = null,
|
|
4541
4541
|
value
|
|
4542
4542
|
}) {
|
|
4543
|
-
const rootClasses = useStylesWithRootClass(rootClassName
|
|
4543
|
+
const rootClasses = useStylesWithRootClass(rootClassName$$, className);
|
|
4544
4544
|
const [searchText, setSearchText] = useState(value);
|
|
4545
4545
|
let previousSearchText = '';
|
|
4546
4546
|
const handleChange = useCallback(event => {
|
|
@@ -4796,12 +4796,12 @@ const recentAppInstancesSetter = (latestInstance, maxRecentItems
|
|
|
4796
4796
|
};
|
|
4797
4797
|
};
|
|
4798
4798
|
|
|
4799
|
-
const rootClassName$
|
|
4799
|
+
const rootClassName$_ = 'dot-app-switcher';
|
|
4800
4800
|
const StyledAppSwitcher = styled(DotDrawer)`
|
|
4801
4801
|
${({
|
|
4802
4802
|
theme
|
|
4803
4803
|
}) => css`
|
|
4804
|
-
&.${rootClassName$
|
|
4804
|
+
&.${rootClassName$_} {
|
|
4805
4805
|
.dot-drawer-paper {
|
|
4806
4806
|
padding: 0;
|
|
4807
4807
|
width: 382px;
|
|
@@ -4911,7 +4911,7 @@ const DotAppSwitcherView = ({
|
|
|
4911
4911
|
if (dotCoreApiContext !== null) {
|
|
4912
4912
|
setSelectedAppType = dotCoreApiContext.setSelectedAppSwitcherAppType;
|
|
4913
4913
|
}
|
|
4914
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
4914
|
+
const rootClasses = useStylesWithRootClass(rootClassName$_, className);
|
|
4915
4915
|
const [appTypeMap, setAppTypeMap] = useState();
|
|
4916
4916
|
const [appTypeLabels, setAppTypeLabels] = useState();
|
|
4917
4917
|
const [appTypeMenuItems, setAppTypeMenuItems] = useState();
|
|
@@ -5289,12 +5289,12 @@ var SvgLogoDigitalAiWhite = function SvgLogoDigitalAiWhite(_ref, ref) {
|
|
|
5289
5289
|
};
|
|
5290
5290
|
var ForwardRef = /*#__PURE__*/forwardRef(SvgLogoDigitalAiWhite);
|
|
5291
5291
|
|
|
5292
|
-
const rootClassName$
|
|
5292
|
+
const rootClassName$Z = 'dot-sidebar';
|
|
5293
5293
|
const StyledSidebar = styled.aside`
|
|
5294
5294
|
${({
|
|
5295
5295
|
theme
|
|
5296
5296
|
}) => css`
|
|
5297
|
-
&.${rootClassName$
|
|
5297
|
+
&.${rootClassName$Z} {
|
|
5298
5298
|
align-items: stretch;
|
|
5299
5299
|
background: ${theme.palette.figma.background.level1.white};
|
|
5300
5300
|
border-width: 0 1px;
|
|
@@ -5588,10 +5588,10 @@ const StyledSidebar = styled.aside`
|
|
|
5588
5588
|
`}
|
|
5589
5589
|
`;
|
|
5590
5590
|
|
|
5591
|
-
const rootClassName$
|
|
5591
|
+
const rootClassName$Y = 'dot-truncate-with-tooltip';
|
|
5592
5592
|
const StyledTruncateWithTooltip = styled(Tooltip)`
|
|
5593
5593
|
${() => css`
|
|
5594
|
-
&.${rootClassName$
|
|
5594
|
+
&.${rootClassName$Y} {
|
|
5595
5595
|
display: block;
|
|
5596
5596
|
overflow: hidden;
|
|
5597
5597
|
white-space: nowrap;
|
|
@@ -5622,7 +5622,7 @@ const DotTruncateWithTooltip = ({
|
|
|
5622
5622
|
label,
|
|
5623
5623
|
width
|
|
5624
5624
|
}) => {
|
|
5625
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
5625
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Y, className, charactersLimit ? 'dot-characters-limit' : '');
|
|
5626
5626
|
return jsx(StyledTruncateWithTooltip, {
|
|
5627
5627
|
"aria-label": ariaLabel,
|
|
5628
5628
|
arrow: arrow,
|
|
@@ -5746,7 +5746,7 @@ const DotSidebar = ({
|
|
|
5746
5746
|
};
|
|
5747
5747
|
}, [isOpen, collapsable]);
|
|
5748
5748
|
const sidebarClasses = useStylesWithRootClass('side-nav', openClass);
|
|
5749
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
5749
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Z, openClass, className);
|
|
5750
5750
|
return jsxs(StyledSidebar, {
|
|
5751
5751
|
"aria-label": ariaLabel,
|
|
5752
5752
|
className: rootClasses,
|
|
@@ -5814,12 +5814,12 @@ const DotSidebar = ({
|
|
|
5814
5814
|
});
|
|
5815
5815
|
};
|
|
5816
5816
|
|
|
5817
|
-
const rootClassName$
|
|
5817
|
+
const rootClassName$X = 'dot-badge';
|
|
5818
5818
|
const StyledBadge = styled(Badge)`
|
|
5819
5819
|
${({
|
|
5820
5820
|
theme
|
|
5821
5821
|
}) => css`
|
|
5822
|
-
&.${rootClassName$
|
|
5822
|
+
&.${rootClassName$X} {
|
|
5823
5823
|
color: ${theme.palette.figma.typography.black};
|
|
5824
5824
|
word-break: normal;
|
|
5825
5825
|
|
|
@@ -5854,7 +5854,7 @@ const DotBadge = ({
|
|
|
5854
5854
|
overlap,
|
|
5855
5855
|
variant = 'dot'
|
|
5856
5856
|
}) => {
|
|
5857
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
5857
|
+
const rootClasses = useStylesWithRootClass(rootClassName$X, className);
|
|
5858
5858
|
return jsx(StyledBadge, {
|
|
5859
5859
|
"$badgeColor": badgeColor,
|
|
5860
5860
|
anchorOrigin: {
|
|
@@ -5876,7 +5876,7 @@ const DotBadge = ({
|
|
|
5876
5876
|
});
|
|
5877
5877
|
};
|
|
5878
5878
|
|
|
5879
|
-
const rootClassName$
|
|
5879
|
+
const rootClassName$W = 'dot-app-toolbar';
|
|
5880
5880
|
const denseClassName = 'dense';
|
|
5881
5881
|
const StyledMainMenu = styled(DotDrawer)`
|
|
5882
5882
|
${({
|
|
@@ -5916,7 +5916,7 @@ const StyledAppToolbar = styled.header`
|
|
|
5916
5916
|
${({
|
|
5917
5917
|
theme
|
|
5918
5918
|
}) => css`
|
|
5919
|
-
&.${rootClassName$
|
|
5919
|
+
&.${rootClassName$W} {
|
|
5920
5920
|
align-items: center;
|
|
5921
5921
|
background: ${theme.palette.figma.appToolbar.background};
|
|
5922
5922
|
border-bottom: 4px solid ${theme.palette.figma.border.default};
|
|
@@ -6038,7 +6038,7 @@ const DotAppToolbar = ({
|
|
|
6038
6038
|
const displayAppLogo = appLogo || appLogoSmall;
|
|
6039
6039
|
const mainMenuRef = useRef(null);
|
|
6040
6040
|
const denseClass = dense ? denseClassName : '';
|
|
6041
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6041
|
+
const rootClasses = useStylesWithRootClass(rootClassName$W, className, denseClass, showMainMenu ? '' : 'without-menu-icon');
|
|
6042
6042
|
const mainMenuClasses = useStylesWithRootClass('dot-main-menu', denseClass, menuOpen ? 'open' : '');
|
|
6043
6043
|
const targetBreakpoint = useMediaQuery(theme => theme.breakpoints.up('lg'));
|
|
6044
6044
|
useEffect(() => {
|
|
@@ -6168,14 +6168,14 @@ const DotAppToolbar = ({
|
|
|
6168
6168
|
}) : appToolbar;
|
|
6169
6169
|
};
|
|
6170
6170
|
|
|
6171
|
-
const rootClassName$
|
|
6171
|
+
const rootClassName$V = 'dot-autocomplete';
|
|
6172
6172
|
const inputRootClassName = 'dot-input-root';
|
|
6173
6173
|
const inputMediumClassName = 'dot-input-medium';
|
|
6174
6174
|
const StyledAutocomplete = styled(Autocomplete)`
|
|
6175
6175
|
${({
|
|
6176
6176
|
theme
|
|
6177
6177
|
}) => css`
|
|
6178
|
-
&.${rootClassName$
|
|
6178
|
+
&.${rootClassName$V} {
|
|
6179
6179
|
&.${inputMediumClassName} .dot-text-field .${inputRootClassName} {
|
|
6180
6180
|
height: 56px;
|
|
6181
6181
|
padding-left: ${theme.spacing(2)};
|
|
@@ -6212,12 +6212,12 @@ const StyledAutocomplete = styled(Autocomplete)`
|
|
|
6212
6212
|
`}
|
|
6213
6213
|
`;
|
|
6214
6214
|
|
|
6215
|
-
const rootClassName$
|
|
6215
|
+
const rootClassName$U = 'dot-chip';
|
|
6216
6216
|
const StyledChip = styled(Chip)`
|
|
6217
6217
|
${({
|
|
6218
6218
|
theme
|
|
6219
6219
|
}) => css`
|
|
6220
|
-
&.${rootClassName$
|
|
6220
|
+
&.${rootClassName$U} {
|
|
6221
6221
|
background: ${theme.palette.figma.neutral.normal};
|
|
6222
6222
|
border-color: ${theme.palette.figma.border.darker};
|
|
6223
6223
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -6323,7 +6323,7 @@ const DotChip = ({
|
|
|
6323
6323
|
charactersLimit = DEFAULT_CHARACTERS_LIMIT,
|
|
6324
6324
|
children,
|
|
6325
6325
|
className,
|
|
6326
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
6326
|
+
'data-pendoid': dataPendoId = rootClassName$U,
|
|
6327
6327
|
'data-testid': dataTestId,
|
|
6328
6328
|
disabled = false,
|
|
6329
6329
|
error = false,
|
|
@@ -6336,7 +6336,7 @@ const DotChip = ({
|
|
|
6336
6336
|
tabIndex
|
|
6337
6337
|
}) => {
|
|
6338
6338
|
const errorClass = error ? 'Mui-error' : '';
|
|
6339
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6339
|
+
const rootClasses = useStylesWithRootClass(rootClassName$U, className, errorClass);
|
|
6340
6340
|
const getChipLabel = () => {
|
|
6341
6341
|
if (charactersLimit <= 0 || children.length < charactersLimit) return children;
|
|
6342
6342
|
const label = `${children.substring(0, charactersLimit)}...`;
|
|
@@ -6436,7 +6436,7 @@ const DotAutoComplete = ({
|
|
|
6436
6436
|
autoFocus,
|
|
6437
6437
|
autoHighlight,
|
|
6438
6438
|
className,
|
|
6439
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
6439
|
+
'data-pendoid': dataPendoId = rootClassName$V,
|
|
6440
6440
|
'data-testid': dataTestId,
|
|
6441
6441
|
defaultValue,
|
|
6442
6442
|
dense = true,
|
|
@@ -6488,10 +6488,10 @@ const DotAutoComplete = ({
|
|
|
6488
6488
|
const popperOpen = !readOnly && (open || isOpened);
|
|
6489
6489
|
const preventDuplicateInsertion = actionItem === null || actionItem === void 0 ? void 0 : actionItem.preventDuplicateInsertion;
|
|
6490
6490
|
const textFieldWarningClassName = !error && warning && warningClassName;
|
|
6491
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6492
|
-
const textFieldRootClasses = useStylesWithRootClass(rootClassName$
|
|
6491
|
+
const rootClasses = useStylesWithRootClass(rootClassName$V, size === 'medium' && inputMediumClassName, className);
|
|
6492
|
+
const textFieldRootClasses = useStylesWithRootClass(rootClassName$1g, readOnly && readOnlyClassName$1, textFieldWarningClassName);
|
|
6493
6493
|
const inputRootClasses = useStylesWithRootClass(inputRootClassName, !dense && inputMediumClassName);
|
|
6494
|
-
const popperClasses = useStylesWithRootClass(rootClassName$
|
|
6494
|
+
const popperClasses = useStylesWithRootClass(rootClassName$18, popperClassName);
|
|
6495
6495
|
let highlightedOption = null;
|
|
6496
6496
|
let textFieldInput;
|
|
6497
6497
|
const textFieldRef = element => {
|
|
@@ -6768,10 +6768,10 @@ const DotAutoComplete = ({
|
|
|
6768
6768
|
});
|
|
6769
6769
|
};
|
|
6770
6770
|
|
|
6771
|
-
const rootClassName$
|
|
6771
|
+
const rootClassName$T = 'dot-avatar-group';
|
|
6772
6772
|
const StyledAvatarGroup = styled(AvatarGroup)`
|
|
6773
6773
|
${() => css`
|
|
6774
|
-
&.${rootClassName$
|
|
6774
|
+
&.${rootClassName$T} {
|
|
6775
6775
|
justify-content: flex-end;
|
|
6776
6776
|
|
|
6777
6777
|
.MuiAvatar-root {
|
|
@@ -6790,7 +6790,7 @@ const DotAvatarGroup = ({
|
|
|
6790
6790
|
max = 3,
|
|
6791
6791
|
spacing = 'medium'
|
|
6792
6792
|
}) => {
|
|
6793
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6793
|
+
const rootClasses = useStylesWithRootClass(rootClassName$T, className);
|
|
6794
6794
|
return jsx(StyledAvatarGroup, {
|
|
6795
6795
|
"aria-label": ariaLabel,
|
|
6796
6796
|
classes: {
|
|
@@ -6805,13 +6805,13 @@ const DotAvatarGroup = ({
|
|
|
6805
6805
|
});
|
|
6806
6806
|
};
|
|
6807
6807
|
|
|
6808
|
-
const rootClassName$
|
|
6808
|
+
const rootClassName$S = 'dot-breadcrumbs';
|
|
6809
6809
|
const breadcrumbsWrapperClass = 'dot-breadcrumbs-wrapper';
|
|
6810
6810
|
const StyledBreadcrumbsWrapper = styled.div`
|
|
6811
6811
|
${({
|
|
6812
6812
|
theme
|
|
6813
6813
|
}) => css`
|
|
6814
|
-
&.${rootClassName$
|
|
6814
|
+
&.${rootClassName$S} {
|
|
6815
6815
|
overflow: hidden;
|
|
6816
6816
|
|
|
6817
6817
|
.dot-breadcrumbs-menu {
|
|
@@ -6831,7 +6831,7 @@ const StyledBreadcrumbs = styled(Breadcrumbs)`
|
|
|
6831
6831
|
${({
|
|
6832
6832
|
theme
|
|
6833
6833
|
}) => css`
|
|
6834
|
-
&.${rootClassName$
|
|
6834
|
+
&.${rootClassName$S} {
|
|
6835
6835
|
margin-bottom: 0;
|
|
6836
6836
|
|
|
6837
6837
|
.MuiBreadcrumbs-ol {
|
|
@@ -7159,7 +7159,7 @@ const DotBreadcrumbs = ({
|
|
|
7159
7159
|
children: [jsx(StyledBreadcrumbs, {
|
|
7160
7160
|
"aria-label": "breadcrumb",
|
|
7161
7161
|
classes: {
|
|
7162
|
-
root: rootClassName$
|
|
7162
|
+
root: rootClassName$S,
|
|
7163
7163
|
ol: 'dot-ol',
|
|
7164
7164
|
li: 'dot-li'
|
|
7165
7165
|
},
|
|
@@ -7190,14 +7190,14 @@ const DotBreadcrumbs = ({
|
|
|
7190
7190
|
});
|
|
7191
7191
|
};
|
|
7192
7192
|
|
|
7193
|
-
const rootClassName$
|
|
7193
|
+
const rootClassName$R = 'dot-button-toggle';
|
|
7194
7194
|
// TODO: need to update ripple color
|
|
7195
7195
|
// https://github.com/mui/material-ui/issues/28543
|
|
7196
7196
|
const StyledToggleButtonGroup = styled(ToggleButtonGroup)`
|
|
7197
7197
|
${({
|
|
7198
7198
|
theme
|
|
7199
7199
|
}) => css`
|
|
7200
|
-
&.${rootClassName$
|
|
7200
|
+
&.${rootClassName$R} {
|
|
7201
7201
|
button:not(.MuiToggleButton-sizeLarge):not(.MuiToggleButton-sizeSmall) {
|
|
7202
7202
|
/* Override height for medium size */
|
|
7203
7203
|
height: ${theme.spacing(5)};
|
|
@@ -7313,7 +7313,7 @@ const DotButtonToggle = ({
|
|
|
7313
7313
|
buttonOptions,
|
|
7314
7314
|
className,
|
|
7315
7315
|
color,
|
|
7316
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
7316
|
+
'data-pendoid': dataPendoId = rootClassName$R,
|
|
7317
7317
|
'data-testid': dataTestId = 'dot-toggle',
|
|
7318
7318
|
disableFocusRipple = false,
|
|
7319
7319
|
disableRipple = false,
|
|
@@ -7323,7 +7323,7 @@ const DotButtonToggle = ({
|
|
|
7323
7323
|
size = 'medium',
|
|
7324
7324
|
value
|
|
7325
7325
|
}) => {
|
|
7326
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7326
|
+
const rootClasses = useStylesWithRootClass(rootClassName$R, className);
|
|
7327
7327
|
const renderToggleButton = ({
|
|
7328
7328
|
ariaLabel: optionAriaLabel,
|
|
7329
7329
|
badgeContent: optionBadgeContent,
|
|
@@ -7406,12 +7406,12 @@ const TooltipToggleButton = forwardRef((_a, ref) => {
|
|
|
7406
7406
|
}));
|
|
7407
7407
|
});
|
|
7408
7408
|
|
|
7409
|
-
const rootClassName$
|
|
7409
|
+
const rootClassName$Q = 'dot-card';
|
|
7410
7410
|
const StyledCard = styled(Card)`
|
|
7411
7411
|
${({
|
|
7412
7412
|
theme
|
|
7413
7413
|
}) => css`
|
|
7414
|
-
&.${rootClassName$
|
|
7414
|
+
&.${rootClassName$Q} {
|
|
7415
7415
|
background-color: ${theme.palette.figma.background.level1.white};
|
|
7416
7416
|
}
|
|
7417
7417
|
`}
|
|
@@ -7423,7 +7423,7 @@ const DotCard = ({
|
|
|
7423
7423
|
className,
|
|
7424
7424
|
'data-testid': dataTestId
|
|
7425
7425
|
}) => {
|
|
7426
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7426
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Q, className);
|
|
7427
7427
|
return jsx(StyledCard, {
|
|
7428
7428
|
"aria-label": ariaLabel,
|
|
7429
7429
|
classes: {
|
|
@@ -7452,12 +7452,12 @@ const DotCardContent = ({
|
|
|
7452
7452
|
});
|
|
7453
7453
|
};
|
|
7454
7454
|
|
|
7455
|
-
const rootClassName$
|
|
7455
|
+
const rootClassName$P = 'dot-card-footer';
|
|
7456
7456
|
const StyledDiv = styled.div`
|
|
7457
7457
|
${({
|
|
7458
7458
|
theme
|
|
7459
7459
|
}) => css`
|
|
7460
|
-
&.${rootClassName$
|
|
7460
|
+
&.${rootClassName$P} {
|
|
7461
7461
|
padding: ${theme.spacing(2)};
|
|
7462
7462
|
}
|
|
7463
7463
|
`}
|
|
@@ -7469,7 +7469,7 @@ const DotCardFooter = ({
|
|
|
7469
7469
|
className,
|
|
7470
7470
|
'data-testid': dataTestId
|
|
7471
7471
|
}) => {
|
|
7472
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7472
|
+
const rootClasses = useStylesWithRootClass(rootClassName$P, className);
|
|
7473
7473
|
return jsx(StyledDiv, {
|
|
7474
7474
|
"aria-label": ariaLabel,
|
|
7475
7475
|
className: rootClasses,
|
|
@@ -7513,9 +7513,9 @@ const DotCardHeader = ({
|
|
|
7513
7513
|
});
|
|
7514
7514
|
};
|
|
7515
7515
|
|
|
7516
|
-
const rootClassName$
|
|
7516
|
+
const rootClassName$O = 'dot-form-control-label';
|
|
7517
7517
|
const StyledFormControlLabel = styled(FormControlLabel)`
|
|
7518
|
-
&.${rootClassName$
|
|
7518
|
+
&.${rootClassName$O} {
|
|
7519
7519
|
.MuiFormControlLabel-label {
|
|
7520
7520
|
margin-bottom: 0;
|
|
7521
7521
|
padding: 0 0 0 4px;
|
|
@@ -7538,12 +7538,12 @@ const StyledFormControlLabel = styled(FormControlLabel)`
|
|
|
7538
7538
|
}
|
|
7539
7539
|
`;
|
|
7540
7540
|
|
|
7541
|
-
const rootClassName$
|
|
7541
|
+
const rootClassName$N = 'dot-checkbox';
|
|
7542
7542
|
const StyledCheckbox = styled(Checkbox)`
|
|
7543
7543
|
${({
|
|
7544
7544
|
theme
|
|
7545
7545
|
}) => css`
|
|
7546
|
-
&.${rootClassName$
|
|
7546
|
+
&.${rootClassName$N} {
|
|
7547
7547
|
padding: ${theme.spacing(1)};
|
|
7548
7548
|
|
|
7549
7549
|
&.MuiCheckbox-indeterminate {
|
|
@@ -7562,7 +7562,7 @@ function DotCheckbox({
|
|
|
7562
7562
|
ariaLabelledby,
|
|
7563
7563
|
checked,
|
|
7564
7564
|
className,
|
|
7565
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
7565
|
+
'data-pendoid': dataPendoId = rootClassName$O,
|
|
7566
7566
|
'data-testid': dataTestId,
|
|
7567
7567
|
disabled,
|
|
7568
7568
|
disableRipple,
|
|
@@ -7577,14 +7577,14 @@ function DotCheckbox({
|
|
|
7577
7577
|
size = 'medium',
|
|
7578
7578
|
value
|
|
7579
7579
|
}) {
|
|
7580
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7580
|
+
const rootClasses = useStylesWithRootClass(rootClassName$O, className);
|
|
7581
7581
|
const handleChange = event => {
|
|
7582
7582
|
onChange && onChange(event, event.target.value);
|
|
7583
7583
|
};
|
|
7584
7584
|
const checkboxControl = jsx(StyledCheckbox, {
|
|
7585
7585
|
checked: checked,
|
|
7586
7586
|
classes: {
|
|
7587
|
-
root: rootClassName$
|
|
7587
|
+
root: rootClassName$N
|
|
7588
7588
|
},
|
|
7589
7589
|
color: "primary",
|
|
7590
7590
|
"data-pendoid": dataPendoId,
|
|
@@ -7613,13 +7613,13 @@ function DotCheckbox({
|
|
|
7613
7613
|
});
|
|
7614
7614
|
}
|
|
7615
7615
|
|
|
7616
|
-
const rootClassName$
|
|
7616
|
+
const rootClassName$M = 'dot-form-group';
|
|
7617
7617
|
const groupLabelClassName = 'dot-form-group-label';
|
|
7618
7618
|
const startAdornmentClassName = 'dot-start-adornment';
|
|
7619
7619
|
const endAdornmentClassName = 'dot-end-adornment';
|
|
7620
7620
|
const placementClassName = 'dot-';
|
|
7621
7621
|
const StyledFormControl = styled(FormControl)`
|
|
7622
|
-
&.${rootClassName$
|
|
7622
|
+
&.${rootClassName$M} {
|
|
7623
7623
|
.MuiFormLabel-root {
|
|
7624
7624
|
width: 100%;
|
|
7625
7625
|
line-height: 24px;
|
|
@@ -7650,7 +7650,7 @@ const StyledFormControl = styled(FormControl)`
|
|
|
7650
7650
|
}
|
|
7651
7651
|
`;
|
|
7652
7652
|
|
|
7653
|
-
const rootClassName$
|
|
7653
|
+
const rootClassName$L = 'dot-checkbox-group';
|
|
7654
7654
|
const wrapperClassName$1 = 'dot-checkbox-group-wrapper';
|
|
7655
7655
|
const checkboxListClassName = 'dot-checkbox-list';
|
|
7656
7656
|
const checkboxListItemClassName = 'dot-checkbox-list-item';
|
|
@@ -7659,7 +7659,7 @@ const StyledCheckboxGroup = styled.div`
|
|
|
7659
7659
|
theme
|
|
7660
7660
|
}) => css`{
|
|
7661
7661
|
&.${wrapperClassName$1} {
|
|
7662
|
-
.${rootClassName$
|
|
7662
|
+
.${rootClassName$L} {
|
|
7663
7663
|
width: 100%;
|
|
7664
7664
|
}
|
|
7665
7665
|
|
|
@@ -7686,7 +7686,7 @@ const StyledCheckboxGroup = styled.div`
|
|
|
7686
7686
|
margin-top: 0;
|
|
7687
7687
|
padding-left: ${theme.spacing(2.5)};
|
|
7688
7688
|
|
|
7689
|
-
.${rootClassName$
|
|
7689
|
+
.${rootClassName$O} {
|
|
7690
7690
|
margin: 0;
|
|
7691
7691
|
}
|
|
7692
7692
|
}
|
|
@@ -7694,13 +7694,13 @@ const StyledCheckboxGroup = styled.div`
|
|
|
7694
7694
|
`}
|
|
7695
7695
|
`;
|
|
7696
7696
|
|
|
7697
|
-
const rootClassName$
|
|
7697
|
+
const rootClassName$K = 'dot-form-group';
|
|
7698
7698
|
const StyledFormGroup = styled(FormGroup)`
|
|
7699
7699
|
${({
|
|
7700
7700
|
theme,
|
|
7701
7701
|
row
|
|
7702
7702
|
}) => css`
|
|
7703
|
-
&.${rootClassName$
|
|
7703
|
+
&.${rootClassName$K} > * {
|
|
7704
7704
|
margin: ${row ? `${theme.spacing(0.5)}` : 0};
|
|
7705
7705
|
}
|
|
7706
7706
|
`}
|
|
@@ -7713,7 +7713,7 @@ function DotFormGroup({
|
|
|
7713
7713
|
'data-testid': dataTestId,
|
|
7714
7714
|
row
|
|
7715
7715
|
}) {
|
|
7716
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7716
|
+
const rootClasses = useStylesWithRootClass(rootClassName$M, className);
|
|
7717
7717
|
return jsx(StyledFormGroup, {
|
|
7718
7718
|
"aria-label": ariaLabel,
|
|
7719
7719
|
classes: {
|
|
@@ -7752,7 +7752,7 @@ function DotCheckboxGroup({
|
|
|
7752
7752
|
size = 'medium'
|
|
7753
7753
|
}) {
|
|
7754
7754
|
const placement = `${placementClassName}${labelPlacement}`;
|
|
7755
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7755
|
+
const rootClasses = useStylesWithRootClass(rootClassName$M, rootClassName$L, className, placement);
|
|
7756
7756
|
const [selectedOptions, setSelectedOptions] = useState(defaultValues);
|
|
7757
7757
|
const [allChecked, setAllChecked] = useState(false);
|
|
7758
7758
|
/* This will ensure that state can be updated from the outside */
|
|
@@ -7837,12 +7837,99 @@ function DotCheckboxGroup({
|
|
|
7837
7837
|
});
|
|
7838
7838
|
}
|
|
7839
7839
|
|
|
7840
|
-
const rootClassName$
|
|
7840
|
+
const rootClassName$J = 'chip-list';
|
|
7841
|
+
const StyledChipList = styled.div`
|
|
7842
|
+
${({
|
|
7843
|
+
theme
|
|
7844
|
+
}) => css`
|
|
7845
|
+
&.${rootClassName$J} {
|
|
7846
|
+
display: flex;
|
|
7847
|
+
gap: ${theme.spacing(1)};
|
|
7848
|
+
}
|
|
7849
|
+
`}
|
|
7850
|
+
`;
|
|
7851
|
+
|
|
7852
|
+
const formatListForTooltip = words => {
|
|
7853
|
+
const elements = [];
|
|
7854
|
+
if (words.length > 1) {
|
|
7855
|
+
words.forEach(word => {
|
|
7856
|
+
elements.push(jsx("div", {
|
|
7857
|
+
children: word
|
|
7858
|
+
}));
|
|
7859
|
+
});
|
|
7860
|
+
return jsx("div", {
|
|
7861
|
+
children: elements
|
|
7862
|
+
});
|
|
7863
|
+
}
|
|
7864
|
+
return '';
|
|
7865
|
+
};
|
|
7866
|
+
function DotChipList({
|
|
7867
|
+
dataTestId,
|
|
7868
|
+
items,
|
|
7869
|
+
maxChars = -1,
|
|
7870
|
+
size = 'small',
|
|
7871
|
+
style = {}
|
|
7872
|
+
}) {
|
|
7873
|
+
const [chips, setChips] = useState([]);
|
|
7874
|
+
useEffect(() => {
|
|
7875
|
+
const extraItems = [];
|
|
7876
|
+
let itemElements = [];
|
|
7877
|
+
if (items && maxChars > 0) {
|
|
7878
|
+
let chars = 0;
|
|
7879
|
+
for (let i = 0; i < items.length; i++) {
|
|
7880
|
+
const item = items[i];
|
|
7881
|
+
const label = item.label;
|
|
7882
|
+
if (chars + label.length <= maxChars && extraItems.length === 0) {
|
|
7883
|
+
chars += label.length;
|
|
7884
|
+
itemElements.push(jsx(DotChip, {
|
|
7885
|
+
size: size,
|
|
7886
|
+
children: label
|
|
7887
|
+
}, item.key));
|
|
7888
|
+
} else if (i === 0) {
|
|
7889
|
+
// With first item, truncate if item is too long rather than pushing to extraItems.
|
|
7890
|
+
const truncatedItem = label.substring(0, maxChars - 3) + '...';
|
|
7891
|
+
chars = truncatedItem.length;
|
|
7892
|
+
itemElements.push(jsx(DotTooltip, {
|
|
7893
|
+
title: label,
|
|
7894
|
+
children: jsx(DotChip, {
|
|
7895
|
+
size: size,
|
|
7896
|
+
children: truncatedItem
|
|
7897
|
+
}, item.key)
|
|
7898
|
+
}, item.key));
|
|
7899
|
+
} else {
|
|
7900
|
+
extraItems.push(label);
|
|
7901
|
+
}
|
|
7902
|
+
}
|
|
7903
|
+
if (extraItems.length > 0) {
|
|
7904
|
+
itemElements.push(jsx(DotTooltip, {
|
|
7905
|
+
title: formatListForTooltip(items === null || items === void 0 ? void 0 : items.map(item => item.label)),
|
|
7906
|
+
children: jsxs(DotTypography, {
|
|
7907
|
+
children: ["+", extraItems.length]
|
|
7908
|
+
})
|
|
7909
|
+
}));
|
|
7910
|
+
}
|
|
7911
|
+
} else {
|
|
7912
|
+
itemElements = items === null || items === void 0 ? void 0 : items.map(item => jsx(DotChip, {
|
|
7913
|
+
size: size,
|
|
7914
|
+
children: item.label
|
|
7915
|
+
}, item.key));
|
|
7916
|
+
}
|
|
7917
|
+
setChips(itemElements);
|
|
7918
|
+
}, [items, maxChars]);
|
|
7919
|
+
return jsx(StyledChipList, {
|
|
7920
|
+
className: rootClassName$J,
|
|
7921
|
+
"data-testid": dataTestId,
|
|
7922
|
+
style: style,
|
|
7923
|
+
children: chips
|
|
7924
|
+
});
|
|
7925
|
+
}
|
|
7926
|
+
|
|
7927
|
+
const rootClassName$I = 'dot-dialog';
|
|
7841
7928
|
const StyledDialog = styled(Dialog)`
|
|
7842
7929
|
${({
|
|
7843
7930
|
theme
|
|
7844
7931
|
}) => css`
|
|
7845
|
-
&.${rootClassName$
|
|
7932
|
+
&.${rootClassName$I} {
|
|
7846
7933
|
.MuiDialog-paper {
|
|
7847
7934
|
background: ${theme.palette.figma.background.level1.white};
|
|
7848
7935
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -7888,7 +7975,7 @@ const DotDialog = ({
|
|
|
7888
7975
|
cancelButtonProps,
|
|
7889
7976
|
cancelButtonVisible = true,
|
|
7890
7977
|
className,
|
|
7891
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
7978
|
+
'data-pendoid': dataPendoId = rootClassName$I,
|
|
7892
7979
|
'data-testid': dataTestId,
|
|
7893
7980
|
children,
|
|
7894
7981
|
closeIconVisible,
|
|
@@ -7901,7 +7988,7 @@ const DotDialog = ({
|
|
|
7901
7988
|
submitButtonProps,
|
|
7902
7989
|
title
|
|
7903
7990
|
}) => {
|
|
7904
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7991
|
+
const rootClasses = useStylesWithRootClass(rootClassName$I, className);
|
|
7905
7992
|
const cancelClasses = useStylesWithRootClass(cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.className, 'cancel-button');
|
|
7906
7993
|
const [isOpen, setIsOpen] = useState(open);
|
|
7907
7994
|
useEffect(() => {
|
|
@@ -8019,7 +8106,7 @@ const DotConfirmationDialog = ({
|
|
|
8019
8106
|
});
|
|
8020
8107
|
};
|
|
8021
8108
|
|
|
8022
|
-
const rootClassName$
|
|
8109
|
+
const rootClassName$H = 'dot-grid';
|
|
8023
8110
|
const frGetter = value => typeof value === 'number' ? `repeat(${value}, 1fr)` : value;
|
|
8024
8111
|
const breakpointsGetter$1 = (theme, columnsBreakpoints, columnGap, rowGap) => `${theme.breakpoints.up('xs')} {
|
|
8025
8112
|
column-gap: ${`${columnGap.xs}px`};
|
|
@@ -8071,7 +8158,7 @@ const Grid = ({
|
|
|
8071
8158
|
className,
|
|
8072
8159
|
children
|
|
8073
8160
|
}) => {
|
|
8074
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8161
|
+
const rootClasses = useStylesWithRootClass(rootClassName$H, className);
|
|
8075
8162
|
return jsx("div", {
|
|
8076
8163
|
className: rootClasses,
|
|
8077
8164
|
children: children
|
|
@@ -8090,7 +8177,7 @@ const StyledGrid = styled(Grid)`
|
|
|
8090
8177
|
theme,
|
|
8091
8178
|
width
|
|
8092
8179
|
}) => css`
|
|
8093
|
-
&.${rootClassName$
|
|
8180
|
+
&.${rootClassName$H} {
|
|
8094
8181
|
display: grid;
|
|
8095
8182
|
grid-template-rows: ${frGetter(rows)};
|
|
8096
8183
|
${columns ? `${columns && `grid-template-columns: ${frGetter(columns)}`};` : breakpointsGetter$1(theme, columnsBreakpoints, columnGap, rowGap)}
|
|
@@ -8296,114 +8383,151 @@ const CssGridDebug = ({
|
|
|
8296
8383
|
});
|
|
8297
8384
|
};
|
|
8298
8385
|
|
|
8299
|
-
const
|
|
8386
|
+
const rootClassName$G = 'dot-pill';
|
|
8387
|
+
const StyledPill = styled(Chip)`
|
|
8388
|
+
${({
|
|
8389
|
+
theme
|
|
8390
|
+
}) => css`
|
|
8391
|
+
&.${rootClassName$G} {
|
|
8392
|
+
background-color: ${({
|
|
8393
|
+
backgroundcolor,
|
|
8394
|
+
variant
|
|
8395
|
+
}) => {
|
|
8396
|
+
const defaultBackground = variant === 'filled' ? theme.palette.grey[200] : theme.palette.grey[50];
|
|
8397
|
+
return backgroundcolor !== null && backgroundcolor !== void 0 ? backgroundcolor : defaultBackground;
|
|
8398
|
+
}};
|
|
8399
|
+
border-color: ${({
|
|
8400
|
+
bordercolor
|
|
8401
|
+
}) => {
|
|
8402
|
+
return bordercolor ? bordercolor : theme.palette.grey[200];
|
|
8403
|
+
}};
|
|
8404
|
+
color: ${({
|
|
8405
|
+
labelcolor
|
|
8406
|
+
}) => {
|
|
8407
|
+
return labelcolor ? labelcolor : theme.palette.layer.n700;
|
|
8408
|
+
}};
|
|
8409
|
+
.dot-icon {
|
|
8410
|
+
color: ${({
|
|
8411
|
+
labelcolor
|
|
8412
|
+
}) => {
|
|
8413
|
+
return labelcolor ? labelcolor : theme.palette.grey.main;
|
|
8414
|
+
}};
|
|
8415
|
+
margin: ${theme.spacing(0, -0.5, 0, 1)};
|
|
8416
|
+
}
|
|
8417
|
+
|
|
8418
|
+
&.MuiChip-sizeSmall .dot-icon {
|
|
8419
|
+
margin-left: 5px;
|
|
8420
|
+
}
|
|
8421
|
+
|
|
8422
|
+
&.MuiChip-outlined {
|
|
8423
|
+
&.error {
|
|
8424
|
+
background-color: ${theme.palette.error[50]};
|
|
8425
|
+
border-color: ${theme.palette.error.main};
|
|
8426
|
+
color: ${theme.palette.layer.n700};
|
|
8427
|
+
.dot-icon {
|
|
8428
|
+
color: ${theme.palette.error.main};
|
|
8429
|
+
}
|
|
8430
|
+
}
|
|
8431
|
+
|
|
8432
|
+
&.success {
|
|
8433
|
+
background-color: ${theme.palette.figma.success.light};
|
|
8434
|
+
border-color: ${theme.palette.figma.success.normal};
|
|
8435
|
+
color: ${theme.palette.layer.n700};
|
|
8436
|
+
.dot-icon {
|
|
8437
|
+
color: ${theme.palette.success.main};
|
|
8438
|
+
}
|
|
8439
|
+
}
|
|
8440
|
+
|
|
8441
|
+
&.warning {
|
|
8442
|
+
background-color: ${theme.palette.figma.warning.light};
|
|
8443
|
+
border-color: ${theme.palette.figma.warning.normal};
|
|
8444
|
+
color: ${theme.palette.layer.n700};
|
|
8445
|
+
.dot-icon {
|
|
8446
|
+
color: ${theme.palette.warning.main};
|
|
8447
|
+
}
|
|
8448
|
+
}
|
|
8449
|
+
|
|
8450
|
+
&.in-progress {
|
|
8451
|
+
background-color: ${theme.palette.figma.primary.light};
|
|
8452
|
+
border-color: ${theme.palette.figma.primary.normal};
|
|
8453
|
+
color: ${theme.palette.layer.n700};
|
|
8454
|
+
.dot-icon {
|
|
8455
|
+
color: ${theme.palette.primary.main};
|
|
8456
|
+
}
|
|
8457
|
+
}
|
|
8458
|
+
}
|
|
8459
|
+
|
|
8460
|
+
&.MuiChip-filled {
|
|
8461
|
+
&.error {
|
|
8462
|
+
background-color: ${theme.palette.error.main};
|
|
8463
|
+
border-color: ${theme.palette.error.main};
|
|
8464
|
+
color: ${theme.palette.layer.n0};
|
|
8465
|
+
.dot-icon {
|
|
8466
|
+
color: ${theme.palette.layer.n0};
|
|
8467
|
+
}
|
|
8468
|
+
}
|
|
8469
|
+
|
|
8470
|
+
&.success {
|
|
8471
|
+
background-color: ${theme.palette.success.main};
|
|
8472
|
+
border-color: ${theme.palette.success.main};
|
|
8473
|
+
color: ${theme.palette.layer.n0};
|
|
8474
|
+
.dot-icon {
|
|
8475
|
+
color: ${theme.palette.layer.n0};
|
|
8476
|
+
}
|
|
8477
|
+
}
|
|
8478
|
+
|
|
8479
|
+
&.warning {
|
|
8480
|
+
background-color: ${theme.palette.warning.main};
|
|
8481
|
+
border-color: ${theme.palette.warning.main};
|
|
8482
|
+
color: ${theme.palette.layer.n700};
|
|
8483
|
+
.dot-icon {
|
|
8484
|
+
color: ${theme.palette.layer.n700};
|
|
8485
|
+
}
|
|
8486
|
+
}
|
|
8487
|
+
|
|
8488
|
+
&.in-progress {
|
|
8489
|
+
background-color: ${theme.palette.primary.main};
|
|
8490
|
+
border-color: ${theme.palette.primary.main};
|
|
8491
|
+
color: ${theme.palette.layer.n0};
|
|
8492
|
+
.dot-icon {
|
|
8493
|
+
color: ${theme.palette.layer.n0};
|
|
8494
|
+
}
|
|
8495
|
+
}
|
|
8496
|
+
}
|
|
8497
|
+
}
|
|
8498
|
+
`}
|
|
8499
|
+
`;
|
|
8500
|
+
|
|
8501
|
+
const DotPill = ({
|
|
8300
8502
|
ariaLabel,
|
|
8301
|
-
|
|
8503
|
+
backgroundcolor,
|
|
8504
|
+
bordercolor,
|
|
8302
8505
|
className,
|
|
8303
|
-
'data-pendoid': dataPendoId = rootSelectClassName,
|
|
8304
8506
|
'data-testid': dataTestId,
|
|
8305
|
-
|
|
8306
|
-
disabled = false,
|
|
8307
|
-
endIcon,
|
|
8308
|
-
endText,
|
|
8309
|
-
error = false,
|
|
8310
|
-
fullWidth = true,
|
|
8311
|
-
helperText,
|
|
8312
|
-
id,
|
|
8313
|
-
inputRef,
|
|
8507
|
+
icon,
|
|
8314
8508
|
label,
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
options = [],
|
|
8321
|
-
persistentLabel,
|
|
8322
|
-
readOnly = false,
|
|
8323
|
-
required,
|
|
8324
|
-
shrink,
|
|
8325
|
-
size = 'small',
|
|
8326
|
-
startIcon,
|
|
8327
|
-
success,
|
|
8328
|
-
value,
|
|
8329
|
-
warning = false
|
|
8509
|
+
labelcolor,
|
|
8510
|
+
onClick,
|
|
8511
|
+
size = 'medium',
|
|
8512
|
+
status = 'default',
|
|
8513
|
+
variant = 'filled'
|
|
8330
8514
|
}) => {
|
|
8331
|
-
const
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
id,
|
|
8348
|
-
label,
|
|
8349
|
-
required
|
|
8350
|
-
}), jsx(StyledTextField, {
|
|
8351
|
-
InputProps: {
|
|
8352
|
-
startAdornment: startIcon && jsx(StyledAdornment, {
|
|
8353
|
-
className: `${adornmentIconClassName} start`,
|
|
8354
|
-
position: "start",
|
|
8355
|
-
children: startIcon
|
|
8356
|
-
}),
|
|
8357
|
-
endAdornment: endAdornment && jsx(StyledAdornment, {
|
|
8358
|
-
className: `${adornmentIconClassName} end`,
|
|
8359
|
-
position: "end",
|
|
8360
|
-
children: endAdornment
|
|
8361
|
-
})
|
|
8362
|
-
},
|
|
8363
|
-
SelectProps: {
|
|
8364
|
-
native: !readOnly,
|
|
8365
|
-
readOnly,
|
|
8366
|
-
open: readOnly ? false : undefined
|
|
8367
|
-
},
|
|
8368
|
-
"aria-label": ariaLabel || label,
|
|
8369
|
-
autoFocus: autoFocus,
|
|
8370
|
-
className: rootStyles,
|
|
8371
|
-
defaultValue: defaultValue,
|
|
8372
|
-
disabled: disabled,
|
|
8373
|
-
error: error,
|
|
8374
|
-
fullWidth: fullWidth,
|
|
8375
|
-
helperText: helperText,
|
|
8376
|
-
id: id,
|
|
8377
|
-
InputLabelProps: {
|
|
8378
|
-
shrink: shrink
|
|
8379
|
-
},
|
|
8380
|
-
inputProps: {
|
|
8381
|
-
'aria-label': ariaLabel,
|
|
8382
|
-
'data-pendoid': dataPendoId,
|
|
8383
|
-
'data-testid': dataTestId,
|
|
8384
|
-
className: inputStyles,
|
|
8385
|
-
readOnly
|
|
8386
|
-
},
|
|
8387
|
-
inputRef: inputRef,
|
|
8388
|
-
label: persistentLabel ? null : label,
|
|
8389
|
-
multiline: false,
|
|
8390
|
-
name: name,
|
|
8391
|
-
onBlur: onBlur,
|
|
8392
|
-
onChange: onChange,
|
|
8393
|
-
onFocus: onFocus,
|
|
8394
|
-
onKeyDown: onKeyDown,
|
|
8395
|
-
required: required,
|
|
8396
|
-
role: "textbox",
|
|
8397
|
-
select: true,
|
|
8398
|
-
size: size,
|
|
8399
|
-
value: value,
|
|
8400
|
-
variant: "outlined",
|
|
8401
|
-
children: options.map(option => jsx("option", {
|
|
8402
|
-
className: "dot-option",
|
|
8403
|
-
value: getValue(option),
|
|
8404
|
-
children: getOption(option)
|
|
8405
|
-
}, getValue(option)))
|
|
8406
|
-
})]
|
|
8515
|
+
const rootClasses = useStylesWithRootClass(rootClassName$G, className, status);
|
|
8516
|
+
return jsx(StyledPill, {
|
|
8517
|
+
"aria-label": ariaLabel,
|
|
8518
|
+
bordercolor: bordercolor,
|
|
8519
|
+
backgroundcolor: backgroundcolor,
|
|
8520
|
+
classes: {
|
|
8521
|
+
root: rootClasses
|
|
8522
|
+
},
|
|
8523
|
+
clickable: !!onClick,
|
|
8524
|
+
"data-testid": dataTestId,
|
|
8525
|
+
icon: icon,
|
|
8526
|
+
label: label,
|
|
8527
|
+
labelcolor: labelcolor,
|
|
8528
|
+
onClick: onClick,
|
|
8529
|
+
size: size,
|
|
8530
|
+
variant: variant
|
|
8407
8531
|
});
|
|
8408
8532
|
};
|
|
8409
8533
|
|
|
@@ -9121,6 +9245,26 @@ class HelpContentService {
|
|
|
9121
9245
|
}
|
|
9122
9246
|
}
|
|
9123
9247
|
|
|
9248
|
+
function DotDashboardStatusPill({
|
|
9249
|
+
status
|
|
9250
|
+
}) {
|
|
9251
|
+
if (status === DashboardView.lifecycle_state.DRAFT) {
|
|
9252
|
+
return jsx(DotPill, {
|
|
9253
|
+
label: "Draft",
|
|
9254
|
+
size: "small",
|
|
9255
|
+
variant: "outlined",
|
|
9256
|
+
status: "in-progress"
|
|
9257
|
+
});
|
|
9258
|
+
} else {
|
|
9259
|
+
return jsx(DotPill, {
|
|
9260
|
+
status: "success",
|
|
9261
|
+
label: "Published",
|
|
9262
|
+
size: "small",
|
|
9263
|
+
variant: "outlined"
|
|
9264
|
+
});
|
|
9265
|
+
}
|
|
9266
|
+
}
|
|
9267
|
+
|
|
9124
9268
|
const helpContent = {
|
|
9125
9269
|
id: 'test-help-content-1',
|
|
9126
9270
|
content: '<html><h1>Test</h1></html>'
|
|
@@ -9143,7 +9287,9 @@ const helpContent = {
|
|
|
9143
9287
|
bi_type: DashboardView.bi_type.SUPERSET,
|
|
9144
9288
|
is_ootb_dashboard: false,
|
|
9145
9289
|
thumbnail: '',
|
|
9146
|
-
external_object: {
|
|
9290
|
+
external_object: {
|
|
9291
|
+
page_count: 3
|
|
9292
|
+
},
|
|
9147
9293
|
embed_config: {},
|
|
9148
9294
|
help_content_id: helpContent.id,
|
|
9149
9295
|
filter_configuration: [],
|
|
@@ -9299,17 +9445,19 @@ const DotMetadataApiProvider = ({
|
|
|
9299
9445
|
const [dashboards, setDashboards] = useState();
|
|
9300
9446
|
const [dashboardsLoading, setDashboardsLoading] = useState(true);
|
|
9301
9447
|
const [helpContentLoading, setHelpContentLoading] = useState(true);
|
|
9448
|
+
const [openedDashboardDetails, setOpenedDashboardDetails] = useState(null);
|
|
9302
9449
|
const [dashboardsError, setDashboardsError] = useState(null);
|
|
9303
9450
|
const [platformConsoleUrl, setPlatformConsoleUrl] = useState(null);
|
|
9304
9451
|
const MOCK_API_URL = 'https://demo-mock-api';
|
|
9305
9452
|
const memoizedValues = useMemo(() => ({
|
|
9306
9453
|
categories,
|
|
9307
9454
|
categoriesLoading,
|
|
9308
|
-
dashboards,
|
|
9309
9455
|
dashboardsError,
|
|
9310
9456
|
dashboardsLoading,
|
|
9311
9457
|
helpContentLoading,
|
|
9458
|
+
openedDashboardDetails,
|
|
9312
9459
|
platformConsoleUrl,
|
|
9460
|
+
setOpenedDashboardDetails,
|
|
9313
9461
|
setOverrideAccountId: id => {
|
|
9314
9462
|
setAccountId(id);
|
|
9315
9463
|
},
|
|
@@ -9436,7 +9584,7 @@ const DotMetadataApiProvider = ({
|
|
|
9436
9584
|
});
|
|
9437
9585
|
}
|
|
9438
9586
|
})
|
|
9439
|
-
}), [categories, categoriesLoading,
|
|
9587
|
+
}), [categories, categoriesLoading, dashboardsError, dashboardsLoading, openedDashboardDetails, platformConsoleUrl]);
|
|
9440
9588
|
if (apiUrl && OpenAPI.BASE !== apiUrl) {
|
|
9441
9589
|
OpenAPI.BASE = apiUrl;
|
|
9442
9590
|
}
|
|
@@ -9456,74 +9604,729 @@ const useDotMetadataApiContext = () => {
|
|
|
9456
9604
|
return useContext(DotMetadataApiContext);
|
|
9457
9605
|
};
|
|
9458
9606
|
|
|
9459
|
-
const
|
|
9607
|
+
const getSnackbarTitleFromSeverity = severity => {
|
|
9608
|
+
switch (severity) {
|
|
9609
|
+
case 'success':
|
|
9610
|
+
return 'Success';
|
|
9611
|
+
case 'warning':
|
|
9612
|
+
return 'Warning';
|
|
9613
|
+
case 'error':
|
|
9614
|
+
return 'Error';
|
|
9615
|
+
case 'info':
|
|
9616
|
+
return 'Info';
|
|
9617
|
+
default:
|
|
9618
|
+
return 'Success';
|
|
9619
|
+
}
|
|
9620
|
+
};
|
|
9621
|
+
function getErrorText(error) {
|
|
9622
|
+
var _a, _b;
|
|
9623
|
+
if ('status' in error && error.status === 304) {
|
|
9624
|
+
return 'No changes made';
|
|
9625
|
+
} else if ('body' in error) {
|
|
9626
|
+
return ((_b = (_a = error.body) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) ? error.body.error.message : 'Unexpected API error';
|
|
9627
|
+
} else if ('message' in error) {
|
|
9628
|
+
return error.message;
|
|
9629
|
+
}
|
|
9630
|
+
return 'Unexpected API error';
|
|
9631
|
+
}
|
|
9632
|
+
|
|
9633
|
+
function addAutoHideDuration(severity) {
|
|
9634
|
+
return severity === 'error' ? null : 10000;
|
|
9635
|
+
}
|
|
9636
|
+
|
|
9637
|
+
const rootClassName$F = 'dot-snackbar';
|
|
9638
|
+
const StyledSnackbar = styled(Snackbar)`
|
|
9460
9639
|
${({
|
|
9461
|
-
theme
|
|
9640
|
+
theme,
|
|
9641
|
+
width,
|
|
9642
|
+
$anchorOriginTop
|
|
9462
9643
|
}) => css`
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9644
|
+
&.${rootClassName$F} {
|
|
9645
|
+
.MuiAlert-message {
|
|
9646
|
+
word-break: break-word;
|
|
9647
|
+
}
|
|
9648
|
+
.${rootClassName$1e} {
|
|
9649
|
+
align-items: flex-start;
|
|
9650
|
+
}
|
|
9651
|
+
&.MuiSnackbar-anchorOriginTopLeft,
|
|
9652
|
+
&.MuiSnackbar-anchorOriginTopCenter,
|
|
9653
|
+
&.MuiSnackbar-anchorOriginTopRight {
|
|
9654
|
+
top: ${$anchorOriginTop}px;
|
|
9655
|
+
z-index: ${levelFourth};
|
|
9656
|
+
}
|
|
9657
|
+
|
|
9658
|
+
.dot-snackbar-actions {
|
|
9659
|
+
display: flex;
|
|
9660
|
+
align-items: center;
|
|
9661
|
+
margin-top: ${theme.spacing(1)};
|
|
9662
|
+
gap: ${theme.spacing(2)};
|
|
9663
|
+
|
|
9664
|
+
.primary-action-btn {
|
|
9665
|
+
background-color: transparent;
|
|
9666
|
+
}
|
|
9667
|
+
}
|
|
9668
|
+
|
|
9669
|
+
.MuiAlert-root {
|
|
9670
|
+
max-width: ${width ? 'unset' : '500px'};
|
|
9671
|
+
min-width: ${width ? 'unset' : '344px'};
|
|
9672
|
+
z-index: ${levelFourth};
|
|
9673
|
+
}
|
|
9472
9674
|
}
|
|
9473
9675
|
`}
|
|
9474
9676
|
`;
|
|
9475
|
-
const StyledDialogActions = styled(DialogActions)`
|
|
9476
|
-
padding-right: 0;
|
|
9477
|
-
`;
|
|
9478
9677
|
|
|
9479
|
-
const
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
option: 'Agility',
|
|
9483
|
-
value: 'AGILITY'
|
|
9484
|
-
}, {
|
|
9485
|
-
option: 'Release',
|
|
9486
|
-
value: 'RELEASE'
|
|
9487
|
-
}, {
|
|
9488
|
-
option: 'Deploy',
|
|
9489
|
-
value: 'DEPLOY'
|
|
9490
|
-
}, {
|
|
9491
|
-
option: 'Continuous Testing',
|
|
9492
|
-
value: 'CONTINUOUSTEST'
|
|
9493
|
-
}, {
|
|
9494
|
-
option: 'TeamForge',
|
|
9495
|
-
value: 'TEAMFORGE'
|
|
9496
|
-
}];
|
|
9497
|
-
const initialFormState = {
|
|
9498
|
-
categories: [],
|
|
9499
|
-
description: '',
|
|
9500
|
-
name: ''
|
|
9678
|
+
const DEFAULT_ANCHOR_ORIGIN = {
|
|
9679
|
+
vertical: 'top',
|
|
9680
|
+
horizontal: 'right'
|
|
9501
9681
|
};
|
|
9502
|
-
const
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
|
|
9682
|
+
const DotSnackbar = ({
|
|
9683
|
+
anchorOrigin = DEFAULT_ANCHOR_ORIGIN,
|
|
9684
|
+
anchorOriginTop = 108,
|
|
9685
|
+
ariaLabel,
|
|
9686
|
+
autoHideDuration,
|
|
9687
|
+
children,
|
|
9688
|
+
className,
|
|
9689
|
+
'data-testid': dataTestId,
|
|
9690
|
+
hideOnClickAway = true,
|
|
9509
9691
|
onClose,
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
const
|
|
9517
|
-
const
|
|
9518
|
-
const
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9692
|
+
open,
|
|
9693
|
+
primaryAction,
|
|
9694
|
+
secondaryAction,
|
|
9695
|
+
severity,
|
|
9696
|
+
width
|
|
9697
|
+
}) => {
|
|
9698
|
+
const hasActions = !!(primaryAction || secondaryAction);
|
|
9699
|
+
const calculatedAutoHideDuration = autoHideDuration === null || autoHideDuration > 0 ? autoHideDuration : addAutoHideDuration(severity);
|
|
9700
|
+
const rootClasses = useStylesWithRootClass(rootClassName$F, className);
|
|
9701
|
+
const handleSnackbarClose = reason => {
|
|
9702
|
+
if (!reason || hideOnClickAway || !hideOnClickAway && reason !== 'clickaway') {
|
|
9703
|
+
onClose();
|
|
9704
|
+
}
|
|
9705
|
+
};
|
|
9706
|
+
return jsx(StyledSnackbar, {
|
|
9707
|
+
anchorOrigin: anchorOrigin,
|
|
9708
|
+
"$anchorOriginTop": anchorOriginTop,
|
|
9709
|
+
"aria-label": ariaLabel,
|
|
9710
|
+
autoHideDuration: calculatedAutoHideDuration,
|
|
9711
|
+
classes: {
|
|
9712
|
+
root: rootClasses
|
|
9713
|
+
},
|
|
9714
|
+
"data-testid": dataTestId,
|
|
9715
|
+
onClose: (_e, r) => handleSnackbarClose(r),
|
|
9716
|
+
open: open,
|
|
9717
|
+
severity: severity,
|
|
9718
|
+
width: width,
|
|
9719
|
+
children: jsx("div", {
|
|
9720
|
+
children: jsx(DotAlertBanner, {
|
|
9721
|
+
severity: severity,
|
|
9722
|
+
width: width,
|
|
9723
|
+
onClose: _e => handleSnackbarClose(),
|
|
9724
|
+
children: jsxs("div", {
|
|
9725
|
+
children: [jsx(DotTypography, {
|
|
9726
|
+
variant: "subtitle2",
|
|
9727
|
+
noMarginBottom: false,
|
|
9728
|
+
children: getSnackbarTitleFromSeverity(severity)
|
|
9729
|
+
}), isString$2(children) ? jsx(DotTypography, {
|
|
9730
|
+
ariaLabel: severity,
|
|
9731
|
+
variant: "body1",
|
|
9732
|
+
children: children
|
|
9733
|
+
}) : jsx("span", {
|
|
9734
|
+
"aria-label": severity,
|
|
9735
|
+
children: children
|
|
9736
|
+
}), hasActions && jsxs("div", {
|
|
9737
|
+
className: "dot-snackbar-actions",
|
|
9738
|
+
children: [primaryAction && jsx(DotButton, {
|
|
9739
|
+
className: "primary-action-btn",
|
|
9740
|
+
"data-testid": "primary-action-btn",
|
|
9741
|
+
onClick: primaryAction.onClick,
|
|
9742
|
+
size: "small",
|
|
9743
|
+
type: "outlined",
|
|
9744
|
+
children: primaryAction.label
|
|
9745
|
+
}), secondaryAction && jsx(DotLink, {
|
|
9746
|
+
"data-testid": "secondary-action-link",
|
|
9747
|
+
href: secondaryAction.href,
|
|
9748
|
+
color: "inherit",
|
|
9749
|
+
children: secondaryAction.label
|
|
9750
|
+
})]
|
|
9751
|
+
})]
|
|
9752
|
+
})
|
|
9753
|
+
})
|
|
9754
|
+
})
|
|
9755
|
+
});
|
|
9756
|
+
};
|
|
9757
|
+
|
|
9758
|
+
const rootClassName$E = 'dot-snackbar-container';
|
|
9759
|
+
const StyledSnackbarContainer = styled.div`
|
|
9760
|
+
${() => css`
|
|
9761
|
+
&.${rootClassName$E} {
|
|
9762
|
+
position: absolute;
|
|
9763
|
+
top: 0;
|
|
9764
|
+
width: 250px;
|
|
9765
|
+
height: auto;
|
|
9766
|
+
right: 0;
|
|
9767
|
+
& > div {
|
|
9768
|
+
position: relative;
|
|
9769
|
+
}
|
|
9770
|
+
}
|
|
9771
|
+
`}
|
|
9772
|
+
`;
|
|
9773
|
+
|
|
9774
|
+
const DotSnackbarContext = createContext({
|
|
9775
|
+
alerts: [],
|
|
9776
|
+
enqueueMessage: (_message, _severity, _autoHideDuration, _primaryAction, _secondaryAction) => null,
|
|
9777
|
+
removeMessage: _id => null
|
|
9778
|
+
});
|
|
9779
|
+
const DotSnackbarContainer = ({
|
|
9780
|
+
hideOnClickAway
|
|
9781
|
+
}) => {
|
|
9782
|
+
const {
|
|
9783
|
+
alerts,
|
|
9784
|
+
removeMessage
|
|
9785
|
+
} = useDotSnackbarContext();
|
|
9786
|
+
function handleClose(id) {
|
|
9787
|
+
return () => {
|
|
9788
|
+
removeMessage(id);
|
|
9789
|
+
};
|
|
9790
|
+
}
|
|
9791
|
+
return jsx(StyledSnackbarContainer, {
|
|
9792
|
+
className: rootClassName$E,
|
|
9793
|
+
children: jsx("div", {
|
|
9794
|
+
className: rootClassName$E,
|
|
9795
|
+
"data-testid": rootClassName$E,
|
|
9796
|
+
children: alerts.slice().reverse().map(alert => {
|
|
9797
|
+
return jsx(DotSnackbar, {
|
|
9798
|
+
autoHideDuration: alert.autoHideDuration,
|
|
9799
|
+
hideOnClickAway: hideOnClickAway,
|
|
9800
|
+
onClose: handleClose(alert.id),
|
|
9801
|
+
open: alert.open,
|
|
9802
|
+
severity: alert.severity,
|
|
9803
|
+
primaryAction: alert.primaryAction,
|
|
9804
|
+
secondaryAction: alert.secondaryAction,
|
|
9805
|
+
children: alert.message
|
|
9806
|
+
}, alert.id);
|
|
9807
|
+
})
|
|
9808
|
+
})
|
|
9809
|
+
});
|
|
9810
|
+
};
|
|
9811
|
+
const DotSnackbarProvider = ({
|
|
9812
|
+
children,
|
|
9813
|
+
hideOnClickAway = true
|
|
9814
|
+
}) => {
|
|
9815
|
+
const [alerts, setAlerts] = useState([]);
|
|
9816
|
+
function enqueueMessage(message, severity, autoHideDuration, primaryAction, secondaryAction) {
|
|
9817
|
+
const id = CreateUUID();
|
|
9818
|
+
const queue = {
|
|
9819
|
+
id,
|
|
9820
|
+
message,
|
|
9821
|
+
severity,
|
|
9822
|
+
open: true,
|
|
9823
|
+
autoHideDuration,
|
|
9824
|
+
primaryAction,
|
|
9825
|
+
secondaryAction
|
|
9826
|
+
};
|
|
9827
|
+
setAlerts(prevState => {
|
|
9828
|
+
return [...prevState, Object.assign({}, queue)];
|
|
9829
|
+
});
|
|
9830
|
+
return id;
|
|
9831
|
+
}
|
|
9832
|
+
const removeMessage = id => {
|
|
9833
|
+
setAlerts(prev => {
|
|
9834
|
+
return prev.map(a => {
|
|
9835
|
+
return a.id === id ? Object.assign(Object.assign({}, a), {
|
|
9836
|
+
open: false
|
|
9837
|
+
}) : a;
|
|
9838
|
+
});
|
|
9839
|
+
});
|
|
9840
|
+
};
|
|
9841
|
+
const DotSnackbarValues = {
|
|
9842
|
+
alerts,
|
|
9843
|
+
enqueueMessage,
|
|
9844
|
+
removeMessage
|
|
9845
|
+
};
|
|
9846
|
+
const memoizedValues = useMemo(() => DotSnackbarValues, [alerts]);
|
|
9847
|
+
return jsxs(DotSnackbarContext.Provider, {
|
|
9848
|
+
value: memoizedValues,
|
|
9849
|
+
children: [jsx(DotSnackbarContainer, {
|
|
9850
|
+
hideOnClickAway: hideOnClickAway
|
|
9851
|
+
}), children]
|
|
9852
|
+
});
|
|
9853
|
+
};
|
|
9854
|
+
const useDotSnackbarContext = () => {
|
|
9855
|
+
return useContext(DotSnackbarContext);
|
|
9856
|
+
};
|
|
9857
|
+
const useEnqueueErrorMessage = error => {
|
|
9858
|
+
const {
|
|
9859
|
+
enqueueMessage
|
|
9860
|
+
} = useDotSnackbarContext();
|
|
9861
|
+
useEffect(() => {
|
|
9862
|
+
error && enqueueMessage(getErrorText(error), 'error');
|
|
9863
|
+
}, [error]);
|
|
9864
|
+
};
|
|
9865
|
+
|
|
9866
|
+
const rootClassName$D = 'dot-dashboard-details';
|
|
9867
|
+
const StyledDashboardDetails = styled(DotDrawer)`
|
|
9868
|
+
${({
|
|
9869
|
+
theme
|
|
9870
|
+
}) => css`
|
|
9871
|
+
&.${rootClassName$D} {
|
|
9872
|
+
.dot-drawer-paper {
|
|
9873
|
+
padding: 0;
|
|
9874
|
+
width: 382px;
|
|
9875
|
+
}
|
|
9876
|
+
.dot-card {
|
|
9877
|
+
border: none;
|
|
9878
|
+
|
|
9879
|
+
.dot-card-header {
|
|
9880
|
+
padding: ${theme.spacing(2, 1, 0, 0)};
|
|
9881
|
+
}
|
|
9882
|
+
.dot-card-content {
|
|
9883
|
+
padding: ${theme.spacing(0, 2, 3, 2)};
|
|
9884
|
+
}
|
|
9885
|
+
}
|
|
9886
|
+
.content {
|
|
9887
|
+
padding: ${theme.spacing(0, 2, 1, 2)};
|
|
9888
|
+
overflow-y: auto;
|
|
9889
|
+
}
|
|
9890
|
+
.dot-avatar {
|
|
9891
|
+
flex-basis: 40px;
|
|
9892
|
+
}
|
|
9893
|
+
.section-title {
|
|
9894
|
+
display: flex;
|
|
9895
|
+
align-items: center;
|
|
9896
|
+
padding: ${theme.spacing(2, 0, 2, 2)};
|
|
9897
|
+
margin: ${theme.spacing(2, -2, 0)};
|
|
9898
|
+
border-bottom: 1px solid ${theme.palette.figma.border.default};
|
|
9899
|
+
font-weight: normal;
|
|
9900
|
+
}
|
|
9901
|
+
.dot-icon {
|
|
9902
|
+
flex-basis: content;
|
|
9903
|
+
}
|
|
9904
|
+
.field-value {
|
|
9905
|
+
margin-top: ${theme.spacing(2)};
|
|
9906
|
+
.dashboard-details-label {
|
|
9907
|
+
margin-bottom: ${theme.spacing(0.5)};
|
|
9908
|
+
}
|
|
9909
|
+
}
|
|
9910
|
+
.dashboard-details-header {
|
|
9911
|
+
align-items: end;
|
|
9912
|
+
border-bottom: 1px solid ${theme.palette.figma.border.default};
|
|
9913
|
+
display: flex;
|
|
9914
|
+
justify-content: space-between;
|
|
9915
|
+
padding: ${theme.spacing(0, 2, 1, 2)};
|
|
9916
|
+
|
|
9917
|
+
.dashboard-details-header-title {
|
|
9918
|
+
display: flex;
|
|
9919
|
+
align-items: center;
|
|
9920
|
+
gap: ${theme.spacing(2)};
|
|
9921
|
+
}
|
|
9922
|
+
}
|
|
9923
|
+
}
|
|
9924
|
+
`}
|
|
9925
|
+
`;
|
|
9926
|
+
|
|
9927
|
+
const DashboardDetailsField = ({
|
|
9928
|
+
children,
|
|
9929
|
+
className,
|
|
9930
|
+
label,
|
|
9931
|
+
value
|
|
9932
|
+
}) => {
|
|
9933
|
+
let c = 'field-value';
|
|
9934
|
+
if (className) {
|
|
9935
|
+
c += ` ${className}`;
|
|
9936
|
+
}
|
|
9937
|
+
return jsxs("div", {
|
|
9938
|
+
className: c,
|
|
9939
|
+
children: [jsx(DotTypography, {
|
|
9940
|
+
ariaRole: "heading",
|
|
9941
|
+
className: "dashboard-details-label",
|
|
9942
|
+
component: "h4",
|
|
9943
|
+
variant: "h4",
|
|
9944
|
+
children: label
|
|
9945
|
+
}), value && jsx(DotTypography, {
|
|
9946
|
+
className: "dashboard-details-value",
|
|
9947
|
+
children: value
|
|
9948
|
+
}), children]
|
|
9949
|
+
});
|
|
9950
|
+
};
|
|
9951
|
+
const DashboardDetailsSectionHeading = ({
|
|
9952
|
+
className,
|
|
9953
|
+
label
|
|
9954
|
+
}) => {
|
|
9955
|
+
let c = 'section-title';
|
|
9956
|
+
if (className) {
|
|
9957
|
+
c += ` ${className}`;
|
|
9958
|
+
}
|
|
9959
|
+
return jsx(DotTypography, {
|
|
9960
|
+
ariaRole: "heading",
|
|
9961
|
+
className: c,
|
|
9962
|
+
component: "div",
|
|
9963
|
+
variant: "subtitle1",
|
|
9964
|
+
children: label
|
|
9965
|
+
});
|
|
9966
|
+
};
|
|
9967
|
+
const DotDashboardDetailsView = ({
|
|
9968
|
+
className,
|
|
9969
|
+
dashboard,
|
|
9970
|
+
onClose,
|
|
9971
|
+
onFavorite,
|
|
9972
|
+
open,
|
|
9973
|
+
yOffset = 56,
|
|
9974
|
+
zIndex = 990
|
|
9975
|
+
}) => {
|
|
9976
|
+
var _a, _b;
|
|
9977
|
+
const rootClasses = useStylesWithRootClass(rootClassName$D, className);
|
|
9978
|
+
const closeHandler = useCallback(event => {
|
|
9979
|
+
onClose && onClose(event);
|
|
9980
|
+
}, [onClose]);
|
|
9981
|
+
const favoriteHandler = useCallback(() => {
|
|
9982
|
+
const favoriteValue = !dashboard.favorite;
|
|
9983
|
+
onFavorite && onFavorite(dashboard.id, favoriteValue);
|
|
9984
|
+
}, [dashboard]);
|
|
9985
|
+
const header = useMemo(() => ({
|
|
9986
|
+
className: 'dashboard-details-header',
|
|
9987
|
+
children: jsxs("div", {
|
|
9988
|
+
"aria-level": 1,
|
|
9989
|
+
className: "dashboard-details-header-title",
|
|
9990
|
+
role: "heading",
|
|
9991
|
+
style: {
|
|
9992
|
+
marginTop: yOffset + 'px',
|
|
9993
|
+
width: '80%'
|
|
9994
|
+
},
|
|
9995
|
+
children: [jsx(DotAvatar, {
|
|
9996
|
+
iconId: "file-lines",
|
|
9997
|
+
alt: "dashboard details image",
|
|
9998
|
+
type: "image",
|
|
9999
|
+
variant: "circular"
|
|
10000
|
+
}), jsx(DotTypography, {
|
|
10001
|
+
ariaRole: "heading",
|
|
10002
|
+
ariaLevel: 1,
|
|
10003
|
+
className: "dashboard-details-label",
|
|
10004
|
+
children: "Details"
|
|
10005
|
+
})]
|
|
10006
|
+
})
|
|
10007
|
+
}), [yOffset]);
|
|
10008
|
+
return jsx(StyledDashboardDetails, {
|
|
10009
|
+
ariaLabel: "Dashboard details",
|
|
10010
|
+
ariaRole: "dialog",
|
|
10011
|
+
"aria-modal": "true",
|
|
10012
|
+
className: rootClasses,
|
|
10013
|
+
drawerHeaderProps: header,
|
|
10014
|
+
ModalProps: {
|
|
10015
|
+
style: {
|
|
10016
|
+
zIndex
|
|
10017
|
+
}
|
|
10018
|
+
},
|
|
10019
|
+
open: open,
|
|
10020
|
+
onClose: closeHandler,
|
|
10021
|
+
width: "340px",
|
|
10022
|
+
variant: "temporary",
|
|
10023
|
+
children: jsx("div", {
|
|
10024
|
+
className: "content",
|
|
10025
|
+
role: "contentinfo",
|
|
10026
|
+
children: jsxs(DotCard, {
|
|
10027
|
+
"data-testid": "dashboard-details-card",
|
|
10028
|
+
children: [jsx(DotCardHeader, {
|
|
10029
|
+
action: jsx("div", {
|
|
10030
|
+
children: jsx(DotIconButton, {
|
|
10031
|
+
iconId: `star-favorites-${dashboard.favorite ? 'active' : 'default'}`,
|
|
10032
|
+
"data-testid": `dashboard-favorite-icon-${dashboard.id}`,
|
|
10033
|
+
tooltip: dashboard.favorite ? 'Remove from favorites' : 'Add to favorites',
|
|
10034
|
+
onClick: favoriteHandler
|
|
10035
|
+
})
|
|
10036
|
+
}),
|
|
10037
|
+
avatar: jsx(DotAvatar, {
|
|
10038
|
+
alt: "dashboard avatar",
|
|
10039
|
+
iconId: dashboard.is_ootb_dashboard ? 'lock' : 'dashboard',
|
|
10040
|
+
type: "icon"
|
|
10041
|
+
}),
|
|
10042
|
+
title: dashboard.name,
|
|
10043
|
+
subheader: `by ${dashboard.is_ootb_dashboard ? 'Digital.ai' : dashboard.author_fullname}`
|
|
10044
|
+
}), jsxs(DotCardContent, {
|
|
10045
|
+
children: [jsx(DashboardDetailsSectionHeading, {
|
|
10046
|
+
label: "GENERAL"
|
|
10047
|
+
}), jsx(DashboardDetailsField, {
|
|
10048
|
+
className: "dashboard-details-description",
|
|
10049
|
+
label: "Description",
|
|
10050
|
+
value: dashboard.description
|
|
10051
|
+
}), jsx(DashboardDetailsField, {
|
|
10052
|
+
className: "dashboard-details-author",
|
|
10053
|
+
label: "Created by",
|
|
10054
|
+
value: dashboard.author_fullname
|
|
10055
|
+
}), jsx(DashboardDetailsField, {
|
|
10056
|
+
className: "dashboard-details-status",
|
|
10057
|
+
label: "Status",
|
|
10058
|
+
children: jsx(DotDashboardStatusPill, {
|
|
10059
|
+
status: dashboard.lifecycle_state
|
|
10060
|
+
})
|
|
10061
|
+
}), jsx(DashboardDetailsField, {
|
|
10062
|
+
className: "dashboard-details-category",
|
|
10063
|
+
label: "Category",
|
|
10064
|
+
children: jsx(DotChipList, {
|
|
10065
|
+
items: (_a = dashboard.categories) === null || _a === void 0 ? void 0 : _a.map(c => ({
|
|
10066
|
+
key: c,
|
|
10067
|
+
label: c
|
|
10068
|
+
})),
|
|
10069
|
+
maxChars: 30
|
|
10070
|
+
})
|
|
10071
|
+
}), ((_b = dashboard.external_object) === null || _b === void 0 ? void 0 : _b.page_count) && jsxs(Fragment, {
|
|
10072
|
+
children: [jsx(DashboardDetailsSectionHeading, {
|
|
10073
|
+
label: "DASHBOARD PAGE SUMMARY"
|
|
10074
|
+
}), jsx(DashboardDetailsField, {
|
|
10075
|
+
className: "dashboard-details-pages",
|
|
10076
|
+
label: "Pages",
|
|
10077
|
+
value: dashboard.external_object.page_count
|
|
10078
|
+
})]
|
|
10079
|
+
}), jsx(DashboardDetailsSectionHeading, {
|
|
10080
|
+
label: "ADDITIONAL DETAILS"
|
|
10081
|
+
}), jsx(DashboardDetailsField, {
|
|
10082
|
+
className: "dashboard-details-created-dt",
|
|
10083
|
+
label: "Created on",
|
|
10084
|
+
value: dashboard.created_dt
|
|
10085
|
+
}), dashboard.updated_dt && jsx(DashboardDetailsField, {
|
|
10086
|
+
className: "dashboard-details-updated-dt",
|
|
10087
|
+
label: "Modified on",
|
|
10088
|
+
value: dashboard.updated_dt
|
|
10089
|
+
}), dashboard.updated_by_fullname && jsx(DashboardDetailsField, {
|
|
10090
|
+
className: "dashboard-details-updated-by",
|
|
10091
|
+
label: "Modified by",
|
|
10092
|
+
value: dashboard.updated_by_fullname
|
|
10093
|
+
})]
|
|
10094
|
+
})]
|
|
10095
|
+
})
|
|
10096
|
+
})
|
|
10097
|
+
});
|
|
10098
|
+
};
|
|
10099
|
+
const DotDashboardDetails = _a => {
|
|
10100
|
+
var {
|
|
10101
|
+
dashboard,
|
|
10102
|
+
onClose,
|
|
10103
|
+
onFavorite
|
|
10104
|
+
} = _a,
|
|
10105
|
+
commonProps = __rest(_a, ["dashboard", "onClose", "onFavorite"]);
|
|
10106
|
+
const [_openedDashboard, _setOpenedDashboard] = useState(dashboard);
|
|
10107
|
+
const metadataApiContext = useDotMetadataApiContext();
|
|
10108
|
+
const {
|
|
10109
|
+
openedDashboardDetails: openedDashboard,
|
|
10110
|
+
setOpenedDashboardDetails: setOpenedDashboard
|
|
10111
|
+
} = metadataApiContext ? metadataApiContext : {
|
|
10112
|
+
openedDashboardDetails: _openedDashboard,
|
|
10113
|
+
setOpenedDashboardDetails: _setOpenedDashboard
|
|
10114
|
+
};
|
|
10115
|
+
const {
|
|
10116
|
+
dashboardsError,
|
|
10117
|
+
favoriteDashboard,
|
|
10118
|
+
setOpenedDashboardDetails
|
|
10119
|
+
} = useDotMetadataApiContext();
|
|
10120
|
+
const {
|
|
10121
|
+
enqueueMessage
|
|
10122
|
+
} = useDotSnackbarContext();
|
|
10123
|
+
useEnqueueErrorMessage(dashboardsError);
|
|
10124
|
+
const closeHandler = useCallback(event => {
|
|
10125
|
+
setOpenedDashboard(null);
|
|
10126
|
+
onClose && onClose(event);
|
|
10127
|
+
}, [onClose]);
|
|
10128
|
+
const favoriteHandler = useCallback((dashboardId, favoriteValue) => {
|
|
10129
|
+
// being optimistic; if the api call fails, there will be an error message
|
|
10130
|
+
enqueueMessage(`Dashboard has been ${favoriteValue ? '' : 'un-'}favorited.`, 'success');
|
|
10131
|
+
onFavorite && onFavorite(dashboardId, favoriteValue);
|
|
10132
|
+
setOpenedDashboardDetails(Object.assign(Object.assign({}, openedDashboard), {
|
|
10133
|
+
favorite: favoriteValue
|
|
10134
|
+
}));
|
|
10135
|
+
favoriteDashboard(openedDashboard.id, favoriteValue).then(response => {
|
|
10136
|
+
setOpenedDashboardDetails(response);
|
|
10137
|
+
});
|
|
10138
|
+
}, [openedDashboard]);
|
|
10139
|
+
const viewProps = Object.assign({}, commonProps);
|
|
10140
|
+
if (openedDashboard) {
|
|
10141
|
+
return jsx(DotDashboardDetailsView, Object.assign({}, viewProps, {
|
|
10142
|
+
dashboard: openedDashboard,
|
|
10143
|
+
open: true,
|
|
10144
|
+
onFavorite: favoriteHandler,
|
|
10145
|
+
onClose: closeHandler
|
|
10146
|
+
}));
|
|
10147
|
+
}
|
|
10148
|
+
return null;
|
|
10149
|
+
};
|
|
10150
|
+
|
|
10151
|
+
const DotInputSelect = ({
|
|
10152
|
+
ariaLabel,
|
|
10153
|
+
autoFocus,
|
|
10154
|
+
className,
|
|
10155
|
+
'data-pendoid': dataPendoId = rootSelectClassName,
|
|
10156
|
+
'data-testid': dataTestId,
|
|
10157
|
+
defaultValue,
|
|
10158
|
+
disabled = false,
|
|
10159
|
+
endIcon,
|
|
10160
|
+
endText,
|
|
10161
|
+
error = false,
|
|
10162
|
+
fullWidth = true,
|
|
10163
|
+
helperText,
|
|
10164
|
+
id,
|
|
10165
|
+
inputRef,
|
|
10166
|
+
label,
|
|
10167
|
+
name,
|
|
10168
|
+
onBlur,
|
|
10169
|
+
onChange,
|
|
10170
|
+
onFocus,
|
|
10171
|
+
onKeyDown,
|
|
10172
|
+
options = [],
|
|
10173
|
+
persistentLabel,
|
|
10174
|
+
readOnly = false,
|
|
10175
|
+
required,
|
|
10176
|
+
shrink,
|
|
10177
|
+
size = 'small',
|
|
10178
|
+
startIcon,
|
|
10179
|
+
success,
|
|
10180
|
+
value,
|
|
10181
|
+
warning = false
|
|
10182
|
+
}) => {
|
|
10183
|
+
const hasWarning = !error && warning && warningClassName;
|
|
10184
|
+
const hasSuccess = !error && !warning && success && successClassName;
|
|
10185
|
+
const endAdornment = endIcon || endText;
|
|
10186
|
+
const inputStyles = useStylesWithRootClass('dot-select', readOnly && readOnlyClassName$1);
|
|
10187
|
+
const rootStyles = useStylesWithRootClass(rootSelectClassName, hasSuccess, hasWarning);
|
|
10188
|
+
const getOption = option => {
|
|
10189
|
+
return typeof option === 'string' ? option : option.option;
|
|
10190
|
+
};
|
|
10191
|
+
const getValue = option => {
|
|
10192
|
+
return typeof option === 'string' ? option : (option === null || option === void 0 ? void 0 : option.value) || option.option;
|
|
10193
|
+
};
|
|
10194
|
+
return jsxs("div", {
|
|
10195
|
+
className: className,
|
|
10196
|
+
children: [persistentLabel && jsx(DotInputLabel, {
|
|
10197
|
+
disabled,
|
|
10198
|
+
error,
|
|
10199
|
+
id,
|
|
10200
|
+
label,
|
|
10201
|
+
required
|
|
10202
|
+
}), jsx(StyledTextField, {
|
|
10203
|
+
InputProps: {
|
|
10204
|
+
startAdornment: startIcon && jsx(StyledAdornment, {
|
|
10205
|
+
className: `${adornmentIconClassName} start`,
|
|
10206
|
+
position: "start",
|
|
10207
|
+
children: startIcon
|
|
10208
|
+
}),
|
|
10209
|
+
endAdornment: endAdornment && jsx(StyledAdornment, {
|
|
10210
|
+
className: `${adornmentIconClassName} end`,
|
|
10211
|
+
position: "end",
|
|
10212
|
+
children: endAdornment
|
|
10213
|
+
})
|
|
10214
|
+
},
|
|
10215
|
+
SelectProps: {
|
|
10216
|
+
native: !readOnly,
|
|
10217
|
+
readOnly,
|
|
10218
|
+
open: readOnly ? false : undefined
|
|
10219
|
+
},
|
|
10220
|
+
"aria-label": ariaLabel || label,
|
|
10221
|
+
autoFocus: autoFocus,
|
|
10222
|
+
className: rootStyles,
|
|
10223
|
+
defaultValue: defaultValue,
|
|
10224
|
+
disabled: disabled,
|
|
10225
|
+
error: error,
|
|
10226
|
+
fullWidth: fullWidth,
|
|
10227
|
+
helperText: helperText,
|
|
10228
|
+
id: id,
|
|
10229
|
+
InputLabelProps: {
|
|
10230
|
+
shrink: shrink
|
|
10231
|
+
},
|
|
10232
|
+
inputProps: {
|
|
10233
|
+
'aria-label': ariaLabel,
|
|
10234
|
+
'data-pendoid': dataPendoId,
|
|
10235
|
+
'data-testid': dataTestId,
|
|
10236
|
+
className: inputStyles,
|
|
10237
|
+
readOnly
|
|
10238
|
+
},
|
|
10239
|
+
inputRef: inputRef,
|
|
10240
|
+
label: persistentLabel ? null : label,
|
|
10241
|
+
multiline: false,
|
|
10242
|
+
name: name,
|
|
10243
|
+
onBlur: onBlur,
|
|
10244
|
+
onChange: onChange,
|
|
10245
|
+
onFocus: onFocus,
|
|
10246
|
+
onKeyDown: onKeyDown,
|
|
10247
|
+
required: required,
|
|
10248
|
+
role: "textbox",
|
|
10249
|
+
select: true,
|
|
10250
|
+
size: size,
|
|
10251
|
+
value: value,
|
|
10252
|
+
variant: "outlined",
|
|
10253
|
+
children: options.map(option => jsx("option", {
|
|
10254
|
+
className: "dot-option",
|
|
10255
|
+
value: getValue(option),
|
|
10256
|
+
children: getOption(option)
|
|
10257
|
+
}, getValue(option)))
|
|
10258
|
+
})]
|
|
10259
|
+
});
|
|
10260
|
+
};
|
|
10261
|
+
|
|
10262
|
+
const StyledDashboardDialog = styled(DotDialog)`
|
|
10263
|
+
${({
|
|
10264
|
+
theme
|
|
10265
|
+
}) => css`
|
|
10266
|
+
.dot-text-field {
|
|
10267
|
+
margin-bottom: ${theme.spacing(2)};
|
|
10268
|
+
width: 40vw;
|
|
10269
|
+
}
|
|
10270
|
+
.dot-autocomplete {
|
|
10271
|
+
margin-top: ${theme.spacing(1.5)};
|
|
10272
|
+
}
|
|
10273
|
+
.dot-input-select {
|
|
10274
|
+
margin-bottom: ${theme.spacing(2)};
|
|
10275
|
+
}
|
|
10276
|
+
`}
|
|
10277
|
+
`;
|
|
10278
|
+
const StyledDialogActions = styled(DialogActions)`
|
|
10279
|
+
padding-right: 0;
|
|
10280
|
+
`;
|
|
10281
|
+
|
|
10282
|
+
const DashboardAppTypeOptions = [
|
|
10283
|
+
// Matches target_app values in Dashboard model
|
|
10284
|
+
{
|
|
10285
|
+
option: 'Agility',
|
|
10286
|
+
value: 'AGILITY'
|
|
10287
|
+
}, {
|
|
10288
|
+
option: 'Release',
|
|
10289
|
+
value: 'RELEASE'
|
|
10290
|
+
}, {
|
|
10291
|
+
option: 'Deploy',
|
|
10292
|
+
value: 'DEPLOY'
|
|
10293
|
+
}, {
|
|
10294
|
+
option: 'Continuous Testing',
|
|
10295
|
+
value: 'CONTINUOUSTEST'
|
|
10296
|
+
}, {
|
|
10297
|
+
option: 'TeamForge',
|
|
10298
|
+
value: 'TEAMFORGE'
|
|
10299
|
+
}];
|
|
10300
|
+
const initialFormState = {
|
|
10301
|
+
categories: [],
|
|
10302
|
+
description: '',
|
|
10303
|
+
name: ''
|
|
10304
|
+
};
|
|
10305
|
+
const DASHBOARD_NAME_MAX_LENGTH = 250;
|
|
10306
|
+
const DASHBOARD_DESCRIPTION_MAX_LENGTH = 250;
|
|
10307
|
+
function DotDashboardDialog({
|
|
10308
|
+
availableCategories,
|
|
10309
|
+
copyDashboard,
|
|
10310
|
+
editDashboard,
|
|
10311
|
+
open,
|
|
10312
|
+
onClose,
|
|
10313
|
+
onSubmit,
|
|
10314
|
+
onContinue,
|
|
10315
|
+
title
|
|
10316
|
+
}) {
|
|
10317
|
+
const [isDirty, setIsDirty] = useState(false);
|
|
10318
|
+
const [isLoadingSubmit, setIsLoadingSubmit] = useState(false);
|
|
10319
|
+
const [nameError, setNameError] = useState(null);
|
|
10320
|
+
const [formValues, setFormValues] = useState(initialFormState);
|
|
10321
|
+
const {
|
|
10322
|
+
categories,
|
|
10323
|
+
description,
|
|
10324
|
+
name
|
|
10325
|
+
} = formValues;
|
|
10326
|
+
const {
|
|
10327
|
+
searchDashboards
|
|
10328
|
+
} = useDotMetadataApiContext();
|
|
10329
|
+
const {
|
|
9527
10330
|
cancelablePromise
|
|
9528
10331
|
} = useCancelablePromise();
|
|
9529
10332
|
useEffect(() => {
|
|
@@ -9707,277 +10510,18 @@ function DotDashboardDialog({
|
|
|
9707
10510
|
disabled: isLoadingSubmit || !isDirty,
|
|
9708
10511
|
onClick: handleSubmitEditExit,
|
|
9709
10512
|
type: "outlined",
|
|
9710
|
-
children: "Save and exit"
|
|
9711
|
-
}), jsx(DotButton, {
|
|
9712
|
-
"data-testid": "save-edit-continue-dashboard-button",
|
|
9713
|
-
disabled: isLoadingSubmit,
|
|
9714
|
-
onClick: handleSubmitEditContinue,
|
|
9715
|
-
type: "primary",
|
|
9716
|
-
children: isDirty ? 'Save and continue' : 'Continue'
|
|
9717
|
-
})]
|
|
9718
|
-
})
|
|
9719
|
-
})]
|
|
9720
|
-
});
|
|
9721
|
-
}
|
|
9722
|
-
|
|
9723
|
-
const getSnackbarTitleFromSeverity = severity => {
|
|
9724
|
-
switch (severity) {
|
|
9725
|
-
case 'success':
|
|
9726
|
-
return 'Success';
|
|
9727
|
-
case 'warning':
|
|
9728
|
-
return 'Warning';
|
|
9729
|
-
case 'error':
|
|
9730
|
-
return 'Error';
|
|
9731
|
-
case 'info':
|
|
9732
|
-
return 'Info';
|
|
9733
|
-
default:
|
|
9734
|
-
return 'Success';
|
|
9735
|
-
}
|
|
9736
|
-
};
|
|
9737
|
-
function getErrorText(error) {
|
|
9738
|
-
var _a, _b;
|
|
9739
|
-
if ('status' in error && error.status === 304) {
|
|
9740
|
-
return 'No changes made';
|
|
9741
|
-
} else if ('body' in error) {
|
|
9742
|
-
return ((_b = (_a = error.body) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message) ? error.body.error.message : 'Unexpected API error';
|
|
9743
|
-
} else if ('message' in error) {
|
|
9744
|
-
return error.message;
|
|
9745
|
-
}
|
|
9746
|
-
return 'Unexpected API error';
|
|
9747
|
-
}
|
|
9748
|
-
|
|
9749
|
-
function addAutoHideDuration(severity) {
|
|
9750
|
-
return severity === 'error' ? null : 10000;
|
|
9751
|
-
}
|
|
9752
|
-
|
|
9753
|
-
const rootClassName$F = 'dot-snackbar';
|
|
9754
|
-
const StyledSnackbar = styled(Snackbar)`
|
|
9755
|
-
${({
|
|
9756
|
-
theme,
|
|
9757
|
-
width,
|
|
9758
|
-
$anchorOriginTop
|
|
9759
|
-
}) => css`
|
|
9760
|
-
&.${rootClassName$F} {
|
|
9761
|
-
.MuiAlert-message {
|
|
9762
|
-
word-break: break-word;
|
|
9763
|
-
}
|
|
9764
|
-
.${rootClassName$1c} {
|
|
9765
|
-
align-items: flex-start;
|
|
9766
|
-
}
|
|
9767
|
-
&.MuiSnackbar-anchorOriginTopLeft,
|
|
9768
|
-
&.MuiSnackbar-anchorOriginTopCenter,
|
|
9769
|
-
&.MuiSnackbar-anchorOriginTopRight {
|
|
9770
|
-
top: ${$anchorOriginTop}px;
|
|
9771
|
-
z-index: ${levelFourth};
|
|
9772
|
-
}
|
|
9773
|
-
|
|
9774
|
-
.dot-snackbar-actions {
|
|
9775
|
-
display: flex;
|
|
9776
|
-
align-items: center;
|
|
9777
|
-
margin-top: ${theme.spacing(1)};
|
|
9778
|
-
gap: ${theme.spacing(2)};
|
|
9779
|
-
|
|
9780
|
-
.primary-action-btn {
|
|
9781
|
-
background-color: transparent;
|
|
9782
|
-
}
|
|
9783
|
-
}
|
|
9784
|
-
|
|
9785
|
-
.MuiAlert-root {
|
|
9786
|
-
max-width: ${width ? 'unset' : '500px'};
|
|
9787
|
-
min-width: ${width ? 'unset' : '344px'};
|
|
9788
|
-
z-index: ${levelFourth};
|
|
9789
|
-
}
|
|
9790
|
-
}
|
|
9791
|
-
`}
|
|
9792
|
-
`;
|
|
9793
|
-
|
|
9794
|
-
const DEFAULT_ANCHOR_ORIGIN = {
|
|
9795
|
-
vertical: 'top',
|
|
9796
|
-
horizontal: 'right'
|
|
9797
|
-
};
|
|
9798
|
-
const DotSnackbar = ({
|
|
9799
|
-
anchorOrigin = DEFAULT_ANCHOR_ORIGIN,
|
|
9800
|
-
anchorOriginTop = 108,
|
|
9801
|
-
ariaLabel,
|
|
9802
|
-
autoHideDuration,
|
|
9803
|
-
children,
|
|
9804
|
-
className,
|
|
9805
|
-
'data-testid': dataTestId,
|
|
9806
|
-
hideOnClickAway = true,
|
|
9807
|
-
onClose,
|
|
9808
|
-
open,
|
|
9809
|
-
primaryAction,
|
|
9810
|
-
secondaryAction,
|
|
9811
|
-
severity,
|
|
9812
|
-
width
|
|
9813
|
-
}) => {
|
|
9814
|
-
const hasActions = !!(primaryAction || secondaryAction);
|
|
9815
|
-
const calculatedAutoHideDuration = autoHideDuration === null || autoHideDuration > 0 ? autoHideDuration : addAutoHideDuration(severity);
|
|
9816
|
-
const rootClasses = useStylesWithRootClass(rootClassName$F, className);
|
|
9817
|
-
const handleSnackbarClose = reason => {
|
|
9818
|
-
if (!reason || hideOnClickAway || !hideOnClickAway && reason !== 'clickaway') {
|
|
9819
|
-
onClose();
|
|
9820
|
-
}
|
|
9821
|
-
};
|
|
9822
|
-
return jsx(StyledSnackbar, {
|
|
9823
|
-
anchorOrigin: anchorOrigin,
|
|
9824
|
-
"$anchorOriginTop": anchorOriginTop,
|
|
9825
|
-
"aria-label": ariaLabel,
|
|
9826
|
-
autoHideDuration: calculatedAutoHideDuration,
|
|
9827
|
-
classes: {
|
|
9828
|
-
root: rootClasses
|
|
9829
|
-
},
|
|
9830
|
-
"data-testid": dataTestId,
|
|
9831
|
-
onClose: (_e, r) => handleSnackbarClose(r),
|
|
9832
|
-
open: open,
|
|
9833
|
-
severity: severity,
|
|
9834
|
-
width: width,
|
|
9835
|
-
children: jsx("div", {
|
|
9836
|
-
children: jsx(DotAlertBanner, {
|
|
9837
|
-
severity: severity,
|
|
9838
|
-
width: width,
|
|
9839
|
-
onClose: _e => handleSnackbarClose(),
|
|
9840
|
-
children: jsxs("div", {
|
|
9841
|
-
children: [jsx(DotTypography, {
|
|
9842
|
-
variant: "subtitle2",
|
|
9843
|
-
noMarginBottom: false,
|
|
9844
|
-
children: getSnackbarTitleFromSeverity(severity)
|
|
9845
|
-
}), isString$2(children) ? jsx(DotTypography, {
|
|
9846
|
-
ariaLabel: severity,
|
|
9847
|
-
variant: "body1",
|
|
9848
|
-
children: children
|
|
9849
|
-
}) : jsx("span", {
|
|
9850
|
-
"aria-label": severity,
|
|
9851
|
-
children: children
|
|
9852
|
-
}), hasActions && jsxs("div", {
|
|
9853
|
-
className: "dot-snackbar-actions",
|
|
9854
|
-
children: [primaryAction && jsx(DotButton, {
|
|
9855
|
-
className: "primary-action-btn",
|
|
9856
|
-
"data-testid": "primary-action-btn",
|
|
9857
|
-
onClick: primaryAction.onClick,
|
|
9858
|
-
size: "small",
|
|
9859
|
-
type: "outlined",
|
|
9860
|
-
children: primaryAction.label
|
|
9861
|
-
}), secondaryAction && jsx(DotLink, {
|
|
9862
|
-
"data-testid": "secondary-action-link",
|
|
9863
|
-
href: secondaryAction.href,
|
|
9864
|
-
color: "inherit",
|
|
9865
|
-
children: secondaryAction.label
|
|
9866
|
-
})]
|
|
9867
|
-
})]
|
|
9868
|
-
})
|
|
9869
|
-
})
|
|
9870
|
-
})
|
|
9871
|
-
});
|
|
9872
|
-
};
|
|
9873
|
-
|
|
9874
|
-
const rootClassName$E = 'dot-snackbar-container';
|
|
9875
|
-
const StyledSnackbarContainer = styled.div`
|
|
9876
|
-
${() => css`
|
|
9877
|
-
&.${rootClassName$E} {
|
|
9878
|
-
position: absolute;
|
|
9879
|
-
top: 0;
|
|
9880
|
-
width: 250px;
|
|
9881
|
-
height: auto;
|
|
9882
|
-
right: 0;
|
|
9883
|
-
& > div {
|
|
9884
|
-
position: relative;
|
|
9885
|
-
}
|
|
9886
|
-
}
|
|
9887
|
-
`}
|
|
9888
|
-
`;
|
|
9889
|
-
|
|
9890
|
-
const DotSnackbarContext = createContext({
|
|
9891
|
-
alerts: [],
|
|
9892
|
-
enqueueMessage: (_message, _severity, _autoHideDuration, _primaryAction, _secondaryAction) => null,
|
|
9893
|
-
removeMessage: _id => null
|
|
9894
|
-
});
|
|
9895
|
-
const DotSnackbarContainer = ({
|
|
9896
|
-
hideOnClickAway
|
|
9897
|
-
}) => {
|
|
9898
|
-
const {
|
|
9899
|
-
alerts,
|
|
9900
|
-
removeMessage
|
|
9901
|
-
} = useDotSnackbarContext();
|
|
9902
|
-
function handleClose(id) {
|
|
9903
|
-
return () => {
|
|
9904
|
-
removeMessage(id);
|
|
9905
|
-
};
|
|
9906
|
-
}
|
|
9907
|
-
return jsx(StyledSnackbarContainer, {
|
|
9908
|
-
className: rootClassName$E,
|
|
9909
|
-
children: jsx("div", {
|
|
9910
|
-
className: rootClassName$E,
|
|
9911
|
-
"data-testid": rootClassName$E,
|
|
9912
|
-
children: alerts.slice().reverse().map(alert => {
|
|
9913
|
-
return jsx(DotSnackbar, {
|
|
9914
|
-
autoHideDuration: alert.autoHideDuration,
|
|
9915
|
-
hideOnClickAway: hideOnClickAway,
|
|
9916
|
-
onClose: handleClose(alert.id),
|
|
9917
|
-
open: alert.open,
|
|
9918
|
-
severity: alert.severity,
|
|
9919
|
-
primaryAction: alert.primaryAction,
|
|
9920
|
-
secondaryAction: alert.secondaryAction,
|
|
9921
|
-
children: alert.message
|
|
9922
|
-
}, alert.id);
|
|
10513
|
+
children: "Save and exit"
|
|
10514
|
+
}), jsx(DotButton, {
|
|
10515
|
+
"data-testid": "save-edit-continue-dashboard-button",
|
|
10516
|
+
disabled: isLoadingSubmit,
|
|
10517
|
+
onClick: handleSubmitEditContinue,
|
|
10518
|
+
type: "primary",
|
|
10519
|
+
children: isDirty ? 'Save and continue' : 'Continue'
|
|
10520
|
+
})]
|
|
9923
10521
|
})
|
|
9924
|
-
})
|
|
9925
|
-
});
|
|
9926
|
-
};
|
|
9927
|
-
const DotSnackbarProvider = ({
|
|
9928
|
-
children,
|
|
9929
|
-
hideOnClickAway = true
|
|
9930
|
-
}) => {
|
|
9931
|
-
const [alerts, setAlerts] = useState([]);
|
|
9932
|
-
function enqueueMessage(message, severity, autoHideDuration, primaryAction, secondaryAction) {
|
|
9933
|
-
const id = CreateUUID();
|
|
9934
|
-
const queue = {
|
|
9935
|
-
id,
|
|
9936
|
-
message,
|
|
9937
|
-
severity,
|
|
9938
|
-
open: true,
|
|
9939
|
-
autoHideDuration,
|
|
9940
|
-
primaryAction,
|
|
9941
|
-
secondaryAction
|
|
9942
|
-
};
|
|
9943
|
-
setAlerts(prevState => {
|
|
9944
|
-
return [...prevState, Object.assign({}, queue)];
|
|
9945
|
-
});
|
|
9946
|
-
return id;
|
|
9947
|
-
}
|
|
9948
|
-
const removeMessage = id => {
|
|
9949
|
-
setAlerts(prev => {
|
|
9950
|
-
return prev.map(a => {
|
|
9951
|
-
return a.id === id ? Object.assign(Object.assign({}, a), {
|
|
9952
|
-
open: false
|
|
9953
|
-
}) : a;
|
|
9954
|
-
});
|
|
9955
|
-
});
|
|
9956
|
-
};
|
|
9957
|
-
const DotSnackbarValues = {
|
|
9958
|
-
alerts,
|
|
9959
|
-
enqueueMessage,
|
|
9960
|
-
removeMessage
|
|
9961
|
-
};
|
|
9962
|
-
const memoizedValues = useMemo(() => DotSnackbarValues, [alerts]);
|
|
9963
|
-
return jsxs(DotSnackbarContext.Provider, {
|
|
9964
|
-
value: memoizedValues,
|
|
9965
|
-
children: [jsx(DotSnackbarContainer, {
|
|
9966
|
-
hideOnClickAway: hideOnClickAway
|
|
9967
|
-
}), children]
|
|
10522
|
+
})]
|
|
9968
10523
|
});
|
|
9969
|
-
}
|
|
9970
|
-
const useDotSnackbarContext = () => {
|
|
9971
|
-
return useContext(DotSnackbarContext);
|
|
9972
|
-
};
|
|
9973
|
-
const useEnqueueErrorMessage = error => {
|
|
9974
|
-
const {
|
|
9975
|
-
enqueueMessage
|
|
9976
|
-
} = useDotSnackbarContext();
|
|
9977
|
-
useEffect(() => {
|
|
9978
|
-
error && enqueueMessage(getErrorText(error), 'error');
|
|
9979
|
-
}, [error]);
|
|
9980
|
-
};
|
|
10524
|
+
}
|
|
9981
10525
|
|
|
9982
10526
|
const InlineMessage = styled(DotTypography)`
|
|
9983
10527
|
${({
|
|
@@ -10374,8 +10918,14 @@ function DotDashboardPublishConfirm({
|
|
|
10374
10918
|
}
|
|
10375
10919
|
|
|
10376
10920
|
const StyledDotMenu = styled(DotMenu)`
|
|
10377
|
-
${(
|
|
10921
|
+
${({
|
|
10922
|
+
theme
|
|
10923
|
+
}) => css`
|
|
10378
10924
|
z-index: 9999;
|
|
10925
|
+
|
|
10926
|
+
.dot-link .dot-icon {
|
|
10927
|
+
margin-right: ${theme.spacing(1)};
|
|
10928
|
+
}
|
|
10379
10929
|
`}
|
|
10380
10930
|
`;
|
|
10381
10931
|
|
|
@@ -10384,7 +10934,8 @@ function DotDashboardOptionsMenu({
|
|
|
10384
10934
|
isEdit = false,
|
|
10385
10935
|
onStartDuplicate,
|
|
10386
10936
|
onStartStatusChange,
|
|
10387
|
-
onViewMode
|
|
10937
|
+
onViewMode,
|
|
10938
|
+
onDetails
|
|
10388
10939
|
}) {
|
|
10389
10940
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
10390
10941
|
const [open, setOpen] = useState(false);
|
|
@@ -10458,6 +11009,21 @@ function DotDashboardOptionsMenu({
|
|
|
10458
11009
|
onclick: handleDuplicateClick
|
|
10459
11010
|
});
|
|
10460
11011
|
}
|
|
11012
|
+
if (onDetails) {
|
|
11013
|
+
menuItems.push({
|
|
11014
|
+
children: jsxs(DotLink, {
|
|
11015
|
+
ariaLabel: "Dashboard details",
|
|
11016
|
+
color: "inherit",
|
|
11017
|
+
onClick: () => onDetails(dashboard),
|
|
11018
|
+
underline: "none",
|
|
11019
|
+
children: [jsx(DotIcon, {
|
|
11020
|
+
iconId: "file-lines"
|
|
11021
|
+
}), " Details"]
|
|
11022
|
+
}),
|
|
11023
|
+
key: 'dashboard-details',
|
|
11024
|
+
onClick: () => onDetails(dashboard)
|
|
11025
|
+
});
|
|
11026
|
+
}
|
|
10461
11027
|
return menuItems.length > 0 ? jsxs(Fragment, {
|
|
10462
11028
|
children: [jsx(DotIconButton, {
|
|
10463
11029
|
className: "expand-button",
|
|
@@ -10564,7 +11130,8 @@ function DotDashboardActions({
|
|
|
10564
11130
|
onFavorite,
|
|
10565
11131
|
onStatusChanged,
|
|
10566
11132
|
onDuplicated,
|
|
10567
|
-
onViewMode
|
|
11133
|
+
onViewMode,
|
|
11134
|
+
onDetails
|
|
10568
11135
|
}) {
|
|
10569
11136
|
// NOTE: useState functions need to stay at the top of the file so that
|
|
10570
11137
|
// they are evaluated before any context imports. If they are evaluated
|
|
@@ -10573,7 +11140,8 @@ function DotDashboardActions({
|
|
|
10573
11140
|
const [dashboardToPublish, setDashboardToPublish] = useState(null);
|
|
10574
11141
|
const [dashboardToUnpublish, setDashboardToUnpublish] = useState(null);
|
|
10575
11142
|
const {
|
|
10576
|
-
duplicateDashboard
|
|
11143
|
+
duplicateDashboard,
|
|
11144
|
+
setOpenedDashboardDetails
|
|
10577
11145
|
} = useDotMetadataApiContext();
|
|
10578
11146
|
const handlePublishConfirm = useCallback(publishedDashboard => {
|
|
10579
11147
|
setDashboardToPublish(null);
|
|
@@ -10635,7 +11203,8 @@ function DotDashboardActions({
|
|
|
10635
11203
|
isEdit: isEdit,
|
|
10636
11204
|
onViewMode: onViewMode,
|
|
10637
11205
|
onStartStatusChange: handleStartStatusChangeIfConfig,
|
|
10638
|
-
onStartDuplicate: handleStartDuplicateIfConfig
|
|
11206
|
+
onStartDuplicate: handleStartDuplicateIfConfig,
|
|
11207
|
+
onDetails: () => setOpenedDashboardDetails(dashboard)
|
|
10639
11208
|
}), jsx(CloseButton, {
|
|
10640
11209
|
dashboard: dashboard,
|
|
10641
11210
|
onClose: onClose
|
|
@@ -10703,7 +11272,7 @@ function DotDashboardHeader({
|
|
|
10703
11272
|
});
|
|
10704
11273
|
}
|
|
10705
11274
|
|
|
10706
|
-
const rootClassName$
|
|
11275
|
+
const rootClassName$C = 'dot-empty-state';
|
|
10707
11276
|
const StyledEmptyState = styled.div`
|
|
10708
11277
|
${({
|
|
10709
11278
|
theme
|
|
@@ -10738,9 +11307,9 @@ const StyledEmptyState = styled.div`
|
|
|
10738
11307
|
`}
|
|
10739
11308
|
`;
|
|
10740
11309
|
|
|
10741
|
-
const rootClassName$
|
|
11310
|
+
const rootClassName$B = 'dot-illustration';
|
|
10742
11311
|
const StyledIllustration = styled.span`
|
|
10743
|
-
&.${rootClassName$
|
|
11312
|
+
&.${rootClassName$B} {
|
|
10744
11313
|
display: inline-block;
|
|
10745
11314
|
}
|
|
10746
11315
|
`;
|
|
@@ -10757,16 +11326,16 @@ const DotIllustration = ({
|
|
|
10757
11326
|
tooltip,
|
|
10758
11327
|
tooltipPlacement = 'right-end'
|
|
10759
11328
|
}) => {
|
|
10760
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11329
|
+
const rootClasses = useStylesWithRootClass(rootClassName$B, className);
|
|
10761
11330
|
return jsx(DotTooltip, {
|
|
10762
11331
|
title: tooltip,
|
|
10763
11332
|
placement: tooltipPlacement,
|
|
10764
|
-
"data-testid": `${dataTestId || rootClassName$
|
|
11333
|
+
"data-testid": `${dataTestId || rootClassName$B}-tooltip`,
|
|
10765
11334
|
children: jsx(StyledIllustration, {
|
|
10766
11335
|
"aria-hidden": "false",
|
|
10767
11336
|
"aria-label": ariaLabel || title || 'Illustration',
|
|
10768
11337
|
className: rootClasses,
|
|
10769
|
-
"data-testid": dataTestId || rootClassName$
|
|
11338
|
+
"data-testid": dataTestId || rootClassName$B,
|
|
10770
11339
|
role: ariaRole,
|
|
10771
11340
|
children: jsx("img", {
|
|
10772
11341
|
alt: alt || 'Illustration',
|
|
@@ -10791,7 +11360,7 @@ const DotEmptyState = ({
|
|
|
10791
11360
|
subtitle,
|
|
10792
11361
|
title
|
|
10793
11362
|
}) => {
|
|
10794
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11363
|
+
const rootClasses = useStylesWithRootClass(rootClassName$C, className);
|
|
10795
11364
|
return jsxs(StyledEmptyState, {
|
|
10796
11365
|
"aria-label": ariaLabel,
|
|
10797
11366
|
className: rootClasses,
|
|
@@ -10872,20 +11441,20 @@ const StyledRadioGroup = styled(RadioGroup)`
|
|
|
10872
11441
|
&.${groupClassName} {
|
|
10873
11442
|
padding-left: ${theme.spacing(2.5)};
|
|
10874
11443
|
|
|
10875
|
-
.${rootClassName$
|
|
11444
|
+
.${rootClassName$O} {
|
|
10876
11445
|
margin: 0;
|
|
10877
11446
|
}
|
|
10878
11447
|
}
|
|
10879
11448
|
`}
|
|
10880
11449
|
`;
|
|
10881
11450
|
|
|
10882
|
-
const rootClassName$
|
|
11451
|
+
const rootClassName$A = 'dot-date-picker';
|
|
10883
11452
|
const popperClassName = 'dot-date-picker-popper';
|
|
10884
11453
|
const containerClassName$2 = 'dot-date-picker-container';
|
|
10885
11454
|
const rectanglePickersDayClassName = 'dot-rectangle-pickers-day';
|
|
10886
11455
|
const StyledDatePickerContainer = styled.div`
|
|
10887
11456
|
${() => css`
|
|
10888
|
-
&.${rootClassName$
|
|
11457
|
+
&.${rootClassName$A} .full-width {
|
|
10889
11458
|
width: 100%;
|
|
10890
11459
|
}
|
|
10891
11460
|
`}
|
|
@@ -10894,7 +11463,7 @@ const StyledDatePicker = styled(DatePicker)`
|
|
|
10894
11463
|
${({
|
|
10895
11464
|
theme
|
|
10896
11465
|
}) => css`
|
|
10897
|
-
&.${rootClassName$
|
|
11466
|
+
&.${rootClassName$A} {
|
|
10898
11467
|
${pickerInputStyles(theme)};
|
|
10899
11468
|
|
|
10900
11469
|
.Mui-disabled.MuiInputBase-root,
|
|
@@ -10934,7 +11503,7 @@ const StyledPickersDay = styled(PickersDay)`
|
|
|
10934
11503
|
`}
|
|
10935
11504
|
`;
|
|
10936
11505
|
|
|
10937
|
-
const rootClassName$
|
|
11506
|
+
const rootClassName$z = 'dot-time-picker';
|
|
10938
11507
|
const containerClassName$1 = 'dot-time-picker-container';
|
|
10939
11508
|
const TIME_SELECTION_HEIGHT_SPACING = 34.5;
|
|
10940
11509
|
const TIME_SELECTION_WIDTH_SPACING = 14.5;
|
|
@@ -11005,7 +11574,7 @@ const StyledTimePicker = styled(TimePicker)`
|
|
|
11005
11574
|
${({
|
|
11006
11575
|
theme
|
|
11007
11576
|
}) => css`
|
|
11008
|
-
&.${rootClassName$
|
|
11577
|
+
&.${rootClassName$z} {
|
|
11009
11578
|
${pickerInputStyles(theme)};
|
|
11010
11579
|
|
|
11011
11580
|
.Mui-disabled.MuiInputBase-root,
|
|
@@ -11024,36 +11593,36 @@ const StyledTimePicker = styled(TimePicker)`
|
|
|
11024
11593
|
`}
|
|
11025
11594
|
`;
|
|
11026
11595
|
|
|
11027
|
-
const rootClassName$
|
|
11596
|
+
const rootClassName$y = 'dot-form';
|
|
11028
11597
|
const StyledFormContainer = styled.div`
|
|
11029
11598
|
${({
|
|
11030
11599
|
theme
|
|
11031
11600
|
}) => css`
|
|
11032
|
-
&.${rootClassName$
|
|
11601
|
+
&.${rootClassName$y} {
|
|
11033
11602
|
margin: ${theme.spacing(3, 0)};
|
|
11034
11603
|
|
|
11035
|
-
.${rootClassName$
|
|
11036
|
-
.${rootClassName$
|
|
11037
|
-
.${rootClassName$
|
|
11604
|
+
.${rootClassName$M},
|
|
11605
|
+
.${rootClassName$O},
|
|
11606
|
+
.${rootClassName$1g},
|
|
11038
11607
|
.${rootSelectClassName},
|
|
11039
|
-
.${rootClassName$
|
|
11040
|
-
.${rootClassName$
|
|
11608
|
+
.${rootClassName$A},
|
|
11609
|
+
.${rootClassName$z} {
|
|
11041
11610
|
margin: ${theme.spacing(1, 0)};
|
|
11042
11611
|
}
|
|
11043
11612
|
|
|
11044
11613
|
label
|
|
11045
|
-
+ .${rootClassName$
|
|
11614
|
+
+ .${rootClassName$1g},
|
|
11046
11615
|
label
|
|
11047
11616
|
+ .${rootSelectClassName},
|
|
11048
11617
|
label
|
|
11049
|
-
+ .${rootClassName$
|
|
11618
|
+
+ .${rootClassName$A},
|
|
11050
11619
|
label
|
|
11051
|
-
+ .${rootClassName$
|
|
11620
|
+
+ .${rootClassName$z} {
|
|
11052
11621
|
margin: ${theme.spacing(0, 0, 1, 0)};
|
|
11053
11622
|
}
|
|
11054
11623
|
|
|
11055
|
-
.${rootClassName$
|
|
11056
|
-
.${rootClassName$
|
|
11624
|
+
.${rootClassName$L}, .${groupClassName} {
|
|
11625
|
+
.${rootClassName$O} {
|
|
11057
11626
|
margin: 0;
|
|
11058
11627
|
}
|
|
11059
11628
|
}
|
|
@@ -11068,7 +11637,7 @@ const DotForm = ({
|
|
|
11068
11637
|
'data-testid': dataTestId,
|
|
11069
11638
|
onSubmit
|
|
11070
11639
|
}) => {
|
|
11071
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11640
|
+
const rootClasses = useStylesWithRootClass(rootClassName$y, className);
|
|
11072
11641
|
return jsx("form", {
|
|
11073
11642
|
"aria-label": ariaLabel,
|
|
11074
11643
|
"data-testid": dataTestId,
|
|
@@ -11081,10 +11650,10 @@ const DotForm = ({
|
|
|
11081
11650
|
});
|
|
11082
11651
|
};
|
|
11083
11652
|
|
|
11084
|
-
const rootClassName$
|
|
11653
|
+
const rootClassName$x = 'dot-dynamic-form';
|
|
11085
11654
|
const StyledDynamicForm = styled(DotForm)`
|
|
11086
11655
|
${() => css`
|
|
11087
|
-
&.${rootClassName$
|
|
11656
|
+
&.${rootClassName$x} {
|
|
11088
11657
|
}
|
|
11089
11658
|
`}
|
|
11090
11659
|
`;
|
|
@@ -11264,12 +11833,12 @@ const checkIfFormDataValid = formState => {
|
|
|
11264
11833
|
return true;
|
|
11265
11834
|
};
|
|
11266
11835
|
|
|
11267
|
-
const rootClassName$
|
|
11836
|
+
const rootClassName$w = 'dot-progress-button';
|
|
11268
11837
|
const StyledProgressButton = styled(DotButton)`
|
|
11269
11838
|
${({
|
|
11270
11839
|
theme
|
|
11271
11840
|
}) => css`
|
|
11272
|
-
&.${rootClassName$
|
|
11841
|
+
&.${rootClassName$w} {
|
|
11273
11842
|
.hidden {
|
|
11274
11843
|
// hide children but preserve its space so that
|
|
11275
11844
|
// button's dimensions don't change
|
|
@@ -11294,7 +11863,7 @@ const DotProgressButton = ({
|
|
|
11294
11863
|
ariaLabel,
|
|
11295
11864
|
children,
|
|
11296
11865
|
className,
|
|
11297
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
11866
|
+
'data-pendoid': dataPendoId = rootClassName$w,
|
|
11298
11867
|
'data-testid': dataTestId,
|
|
11299
11868
|
disabled = false,
|
|
11300
11869
|
disableRipple = false,
|
|
@@ -11307,7 +11876,7 @@ const DotProgressButton = ({
|
|
|
11307
11876
|
tooltip,
|
|
11308
11877
|
type = 'primary'
|
|
11309
11878
|
}) => {
|
|
11310
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11879
|
+
const rootClasses = useStylesWithRootClass(rootClassName$w, className);
|
|
11311
11880
|
const isButtonDisabled = disabled || isLoading;
|
|
11312
11881
|
const titleClasses = useStylesWithRootClass(isLoading ? 'hidden' : '');
|
|
11313
11882
|
const progressCircleSize = size === 'large' ? SPINNER_LARGE_SIZE : SPINNER_DEFAULT_SIZE;
|
|
@@ -11336,12 +11905,12 @@ const DotProgressButton = ({
|
|
|
11336
11905
|
});
|
|
11337
11906
|
};
|
|
11338
11907
|
|
|
11339
|
-
const rootClassName$
|
|
11908
|
+
const rootClassName$v = 'dot-radio';
|
|
11340
11909
|
const StyledRadioButton = styled(Radio)`
|
|
11341
11910
|
${({
|
|
11342
11911
|
theme
|
|
11343
11912
|
}) => css`
|
|
11344
|
-
&.${rootClassName$
|
|
11913
|
+
&.${rootClassName$v} {
|
|
11345
11914
|
padding: 8px;
|
|
11346
11915
|
|
|
11347
11916
|
svg {
|
|
@@ -11359,7 +11928,7 @@ function DotRadioButton({
|
|
|
11359
11928
|
ariaLabel,
|
|
11360
11929
|
checked,
|
|
11361
11930
|
className,
|
|
11362
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
11931
|
+
'data-pendoid': dataPendoId = rootClassName$O,
|
|
11363
11932
|
'data-testid': dataTestId,
|
|
11364
11933
|
disabled,
|
|
11365
11934
|
id,
|
|
@@ -11372,7 +11941,7 @@ function DotRadioButton({
|
|
|
11372
11941
|
size = 'medium',
|
|
11373
11942
|
value
|
|
11374
11943
|
}) {
|
|
11375
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11944
|
+
const rootClasses = useStylesWithRootClass(rootClassName$O, className);
|
|
11376
11945
|
const handleChange = event => {
|
|
11377
11946
|
onChange && onChange(event, event.target.value);
|
|
11378
11947
|
};
|
|
@@ -11380,7 +11949,7 @@ function DotRadioButton({
|
|
|
11380
11949
|
const radioControl = jsx(StyledRadioButton, {
|
|
11381
11950
|
checked: checked,
|
|
11382
11951
|
classes: {
|
|
11383
|
-
root: rootClassName$
|
|
11952
|
+
root: rootClassName$v
|
|
11384
11953
|
},
|
|
11385
11954
|
color: "primary",
|
|
11386
11955
|
"data-pendoid": dataPendoId,
|
|
@@ -11426,7 +11995,7 @@ const DotRadioGroup = ({
|
|
|
11426
11995
|
size = 'medium'
|
|
11427
11996
|
}) => {
|
|
11428
11997
|
const placement = `${placementClassName}${labelPlacement}`;
|
|
11429
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
11998
|
+
const rootClasses = useStylesWithRootClass(rootClassName$M, className, placement);
|
|
11430
11999
|
const radioValue = value || defaultValue;
|
|
11431
12000
|
const [selectedValue, setSelectedValue] = useState(radioValue);
|
|
11432
12001
|
/* This will ensure that value can be updated from the outside */
|
|
@@ -11491,7 +12060,7 @@ const DotRadioGroup = ({
|
|
|
11491
12060
|
});
|
|
11492
12061
|
};
|
|
11493
12062
|
|
|
11494
|
-
const rootClassName$
|
|
12063
|
+
const rootClassName$u = 'dot-switch';
|
|
11495
12064
|
const StyledSwitch = styled(Switch)`
|
|
11496
12065
|
${({
|
|
11497
12066
|
theme
|
|
@@ -11520,7 +12089,7 @@ const DotSwitch = ({
|
|
|
11520
12089
|
checked,
|
|
11521
12090
|
className,
|
|
11522
12091
|
color,
|
|
11523
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
12092
|
+
'data-pendoid': dataPendoId = rootClassName$u,
|
|
11524
12093
|
'data-testid': dataTestId,
|
|
11525
12094
|
disabled = false,
|
|
11526
12095
|
id,
|
|
@@ -11530,7 +12099,7 @@ const DotSwitch = ({
|
|
|
11530
12099
|
onChange,
|
|
11531
12100
|
size = 'medium'
|
|
11532
12101
|
}) => {
|
|
11533
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12102
|
+
const rootClasses = useStylesWithRootClass(rootClassName$u, className);
|
|
11534
12103
|
const handleChange = event => {
|
|
11535
12104
|
onChange && onChange(event);
|
|
11536
12105
|
};
|
|
@@ -11560,7 +12129,7 @@ const DotSwitch = ({
|
|
|
11560
12129
|
tabIndex: 0
|
|
11561
12130
|
});
|
|
11562
12131
|
return jsx(StyledFormControlLabel, {
|
|
11563
|
-
className: rootClassName$
|
|
12132
|
+
className: rootClassName$O,
|
|
11564
12133
|
control: switchControl,
|
|
11565
12134
|
label: label,
|
|
11566
12135
|
labelPlacement: labelPlacement
|
|
@@ -11881,7 +12450,7 @@ const DotDynamicForm = ({
|
|
|
11881
12450
|
onChange,
|
|
11882
12451
|
onSubmit
|
|
11883
12452
|
}) => {
|
|
11884
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12453
|
+
const rootClasses = useStylesWithRootClass(rootClassName$x, className);
|
|
11885
12454
|
// Memoize this operation so that is doesn't get executed each time this
|
|
11886
12455
|
// component re-renders
|
|
11887
12456
|
const initialFormState = useMemo(() => getInitialFormState(config, liveValidation), [config, liveValidation, getInitialFormState]);
|
|
@@ -12127,7 +12696,7 @@ const DotDynamicForm = ({
|
|
|
12127
12696
|
});
|
|
12128
12697
|
};
|
|
12129
12698
|
|
|
12130
|
-
const rootClassName$
|
|
12699
|
+
const rootClassName$t = 'dot-inline-edit';
|
|
12131
12700
|
const editModeClassName = 'dot-edit-mode';
|
|
12132
12701
|
const viewModeClassName = 'dot-view-mode';
|
|
12133
12702
|
const placeholderClassName = 'dot-placeholder';
|
|
@@ -12139,7 +12708,7 @@ const StyledInlineEdit = styled.div`
|
|
|
12139
12708
|
theme,
|
|
12140
12709
|
fullWidth
|
|
12141
12710
|
}) => css`
|
|
12142
|
-
&.${rootClassName$
|
|
12711
|
+
&.${rootClassName$t} {
|
|
12143
12712
|
align-items: center;
|
|
12144
12713
|
color: ${theme.palette.figma.typography.black};
|
|
12145
12714
|
display: ${fullWidth ? 'flex' : 'inline-flex'};
|
|
@@ -12351,7 +12920,7 @@ const DotInlineEdit = ({
|
|
|
12351
12920
|
bindings,
|
|
12352
12921
|
charactersLimit,
|
|
12353
12922
|
className,
|
|
12354
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
12923
|
+
'data-pendoid': dataPendoId = rootClassName$t,
|
|
12355
12924
|
'data-testid': dataTestId,
|
|
12356
12925
|
fullWidth = true,
|
|
12357
12926
|
hideActionButtons,
|
|
@@ -12384,7 +12953,7 @@ const DotInlineEdit = ({
|
|
|
12384
12953
|
}
|
|
12385
12954
|
}, [value]);
|
|
12386
12955
|
const isSaveDisabled = checkIfEmptyValue(inputValue);
|
|
12387
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12956
|
+
const rootClasses = useStylesWithRootClass(rootClassName$t, className, editing ? editModeClassName : '');
|
|
12388
12957
|
const handleShowTooltip = visible => {
|
|
12389
12958
|
if (!editing) {
|
|
12390
12959
|
setShowTooltip(visible);
|
|
@@ -12563,13 +13132,13 @@ const DotInlineEdit = ({
|
|
|
12563
13132
|
});
|
|
12564
13133
|
};
|
|
12565
13134
|
|
|
12566
|
-
const rootClassName$
|
|
13135
|
+
const rootClassName$s = 'dot-navigation-rail';
|
|
12567
13136
|
const StyledNavigationRail = styled.div`
|
|
12568
13137
|
${({
|
|
12569
13138
|
theme,
|
|
12570
13139
|
railItemPosition
|
|
12571
13140
|
}) => css`
|
|
12572
|
-
&.${rootClassName$
|
|
13141
|
+
&.${rootClassName$s} {
|
|
12573
13142
|
background: ${theme.palette.figma.neutral.elevated};
|
|
12574
13143
|
border-left: 1px solid ${theme.palette.figma.border.default};
|
|
12575
13144
|
display: flex;
|
|
@@ -12616,7 +13185,7 @@ const DotNavigationRail = ({
|
|
|
12616
13185
|
railItems,
|
|
12617
13186
|
selectedIndex = 0
|
|
12618
13187
|
}) => {
|
|
12619
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
13188
|
+
const rootClasses = useStylesWithRootClass(rootClassName$s, className);
|
|
12620
13189
|
const [selectedItemIndex, setSelectedItemIndex] = useState(selectedIndex);
|
|
12621
13190
|
/* Used to change selected index programmatically from the consumer component */
|
|
12622
13191
|
useEffect(() => {
|
|
@@ -12667,154 +13236,6 @@ const DotNavigationRail = ({
|
|
|
12667
13236
|
});
|
|
12668
13237
|
};
|
|
12669
13238
|
|
|
12670
|
-
const rootClassName$s = 'dot-pill';
|
|
12671
|
-
const StyledPill = styled(Chip)`
|
|
12672
|
-
${({
|
|
12673
|
-
theme
|
|
12674
|
-
}) => css`
|
|
12675
|
-
&.${rootClassName$s} {
|
|
12676
|
-
background-color: ${({
|
|
12677
|
-
backgroundcolor,
|
|
12678
|
-
variant
|
|
12679
|
-
}) => {
|
|
12680
|
-
const defaultBackground = variant === 'filled' ? theme.palette.grey[200] : theme.palette.grey[50];
|
|
12681
|
-
return backgroundcolor !== null && backgroundcolor !== void 0 ? backgroundcolor : defaultBackground;
|
|
12682
|
-
}};
|
|
12683
|
-
border-color: ${({
|
|
12684
|
-
bordercolor
|
|
12685
|
-
}) => {
|
|
12686
|
-
return bordercolor ? bordercolor : theme.palette.grey[200];
|
|
12687
|
-
}};
|
|
12688
|
-
color: ${({
|
|
12689
|
-
labelcolor
|
|
12690
|
-
}) => {
|
|
12691
|
-
return labelcolor ? labelcolor : theme.palette.layer.n700;
|
|
12692
|
-
}};
|
|
12693
|
-
.dot-icon {
|
|
12694
|
-
color: ${({
|
|
12695
|
-
labelcolor
|
|
12696
|
-
}) => {
|
|
12697
|
-
return labelcolor ? labelcolor : theme.palette.grey.main;
|
|
12698
|
-
}};
|
|
12699
|
-
margin: ${theme.spacing(0, -0.5, 0, 1)};
|
|
12700
|
-
}
|
|
12701
|
-
|
|
12702
|
-
&.MuiChip-sizeSmall .dot-icon {
|
|
12703
|
-
margin-left: 5px;
|
|
12704
|
-
}
|
|
12705
|
-
|
|
12706
|
-
&.MuiChip-outlined {
|
|
12707
|
-
&.error {
|
|
12708
|
-
background-color: ${theme.palette.error[50]};
|
|
12709
|
-
border-color: ${theme.palette.error.main};
|
|
12710
|
-
color: ${theme.palette.layer.n700};
|
|
12711
|
-
.dot-icon {
|
|
12712
|
-
color: ${theme.palette.error.main};
|
|
12713
|
-
}
|
|
12714
|
-
}
|
|
12715
|
-
|
|
12716
|
-
&.success {
|
|
12717
|
-
background-color: ${theme.palette.figma.success.light};
|
|
12718
|
-
border-color: ${theme.palette.figma.success.normal};
|
|
12719
|
-
color: ${theme.palette.layer.n700};
|
|
12720
|
-
.dot-icon {
|
|
12721
|
-
color: ${theme.palette.success.main};
|
|
12722
|
-
}
|
|
12723
|
-
}
|
|
12724
|
-
|
|
12725
|
-
&.warning {
|
|
12726
|
-
background-color: ${theme.palette.figma.warning.light};
|
|
12727
|
-
border-color: ${theme.palette.figma.warning.normal};
|
|
12728
|
-
color: ${theme.palette.layer.n700};
|
|
12729
|
-
.dot-icon {
|
|
12730
|
-
color: ${theme.palette.warning.main};
|
|
12731
|
-
}
|
|
12732
|
-
}
|
|
12733
|
-
|
|
12734
|
-
&.in-progress {
|
|
12735
|
-
background-color: ${theme.palette.figma.primary.light};
|
|
12736
|
-
border-color: ${theme.palette.figma.primary.normal};
|
|
12737
|
-
color: ${theme.palette.layer.n700};
|
|
12738
|
-
.dot-icon {
|
|
12739
|
-
color: ${theme.palette.primary.main};
|
|
12740
|
-
}
|
|
12741
|
-
}
|
|
12742
|
-
}
|
|
12743
|
-
|
|
12744
|
-
&.MuiChip-filled {
|
|
12745
|
-
&.error {
|
|
12746
|
-
background-color: ${theme.palette.error.main};
|
|
12747
|
-
border-color: ${theme.palette.error.main};
|
|
12748
|
-
color: ${theme.palette.layer.n0};
|
|
12749
|
-
.dot-icon {
|
|
12750
|
-
color: ${theme.palette.layer.n0};
|
|
12751
|
-
}
|
|
12752
|
-
}
|
|
12753
|
-
|
|
12754
|
-
&.success {
|
|
12755
|
-
background-color: ${theme.palette.success.main};
|
|
12756
|
-
border-color: ${theme.palette.success.main};
|
|
12757
|
-
color: ${theme.palette.layer.n0};
|
|
12758
|
-
.dot-icon {
|
|
12759
|
-
color: ${theme.palette.layer.n0};
|
|
12760
|
-
}
|
|
12761
|
-
}
|
|
12762
|
-
|
|
12763
|
-
&.warning {
|
|
12764
|
-
background-color: ${theme.palette.warning.main};
|
|
12765
|
-
border-color: ${theme.palette.warning.main};
|
|
12766
|
-
color: ${theme.palette.layer.n700};
|
|
12767
|
-
.dot-icon {
|
|
12768
|
-
color: ${theme.palette.layer.n700};
|
|
12769
|
-
}
|
|
12770
|
-
}
|
|
12771
|
-
|
|
12772
|
-
&.in-progress {
|
|
12773
|
-
background-color: ${theme.palette.primary.main};
|
|
12774
|
-
border-color: ${theme.palette.primary.main};
|
|
12775
|
-
color: ${theme.palette.layer.n0};
|
|
12776
|
-
.dot-icon {
|
|
12777
|
-
color: ${theme.palette.layer.n0};
|
|
12778
|
-
}
|
|
12779
|
-
}
|
|
12780
|
-
}
|
|
12781
|
-
}
|
|
12782
|
-
`}
|
|
12783
|
-
`;
|
|
12784
|
-
|
|
12785
|
-
const DotPill = ({
|
|
12786
|
-
ariaLabel,
|
|
12787
|
-
backgroundcolor,
|
|
12788
|
-
bordercolor,
|
|
12789
|
-
className,
|
|
12790
|
-
'data-testid': dataTestId,
|
|
12791
|
-
icon,
|
|
12792
|
-
label,
|
|
12793
|
-
labelcolor,
|
|
12794
|
-
onClick,
|
|
12795
|
-
size = 'medium',
|
|
12796
|
-
status = 'default',
|
|
12797
|
-
variant = 'filled'
|
|
12798
|
-
}) => {
|
|
12799
|
-
const rootClasses = useStylesWithRootClass(rootClassName$s, className, status);
|
|
12800
|
-
return jsx(StyledPill, {
|
|
12801
|
-
"aria-label": ariaLabel,
|
|
12802
|
-
bordercolor: bordercolor,
|
|
12803
|
-
backgroundcolor: backgroundcolor,
|
|
12804
|
-
classes: {
|
|
12805
|
-
root: rootClasses
|
|
12806
|
-
},
|
|
12807
|
-
clickable: !!onClick,
|
|
12808
|
-
"data-testid": dataTestId,
|
|
12809
|
-
icon: icon,
|
|
12810
|
-
label: label,
|
|
12811
|
-
labelcolor: labelcolor,
|
|
12812
|
-
onClick: onClick,
|
|
12813
|
-
size: size,
|
|
12814
|
-
variant: variant
|
|
12815
|
-
});
|
|
12816
|
-
};
|
|
12817
|
-
|
|
12818
13239
|
const rootClassName$r = 'dot-skeleton';
|
|
12819
13240
|
const StyledSkeleton = styled(Skeleton)`
|
|
12820
13241
|
${({
|
|
@@ -15759,7 +16180,7 @@ const DotPopper = ({
|
|
|
15759
16180
|
open,
|
|
15760
16181
|
placement
|
|
15761
16182
|
}) => {
|
|
15762
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
16183
|
+
const rootClasses = useStylesWithRootClass(rootClassName$18, className);
|
|
15763
16184
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15764
16185
|
const handleClickAway = event => {
|
|
15765
16186
|
if (onClickAway && (!anchorEl || !anchorEl.contains(event.currentTarget))) {
|
|
@@ -15999,7 +16420,7 @@ const DotDatePicker = ({
|
|
|
15999
16420
|
autoFocus = false,
|
|
16000
16421
|
className,
|
|
16001
16422
|
closeOnSelect = true,
|
|
16002
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
16423
|
+
'data-pendoid': dataPendoId = rootClassName$A,
|
|
16003
16424
|
'data-testid': dataTestId,
|
|
16004
16425
|
defaultValue,
|
|
16005
16426
|
disableOpenPicker,
|
|
@@ -16039,7 +16460,7 @@ const DotDatePicker = ({
|
|
|
16039
16460
|
const hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
|
|
16040
16461
|
const isInputReadOnly = readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
|
|
16041
16462
|
const inputRef = useRef(null);
|
|
16042
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
16463
|
+
const rootClasses = useStylesWithRootClass(rootClassName$A, className, isInputReadOnly ? 'read-only' : '');
|
|
16043
16464
|
const containerClasses = useStylesWithRootClass(containerClassName$2, fullWidth ? 'full-width' : '', className);
|
|
16044
16465
|
const focusInput = ref => {
|
|
16045
16466
|
setTimeout(() => {
|
|
@@ -16258,7 +16679,7 @@ const DotTimePicker = ({
|
|
|
16258
16679
|
ariaLabel,
|
|
16259
16680
|
autoFocus = false,
|
|
16260
16681
|
className,
|
|
16261
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
16682
|
+
'data-pendoid': dataPendoId = rootClassName$z,
|
|
16262
16683
|
'data-testid': dataTestId,
|
|
16263
16684
|
defaultValue,
|
|
16264
16685
|
disableOpenPicker = false,
|
|
@@ -16290,7 +16711,7 @@ const DotTimePicker = ({
|
|
|
16290
16711
|
const hasValueWithoutChangeHandler = value !== undefined && onChange === undefined;
|
|
16291
16712
|
const hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
|
|
16292
16713
|
const isComponentReadOnly = readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
|
|
16293
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
16714
|
+
const rootClasses = useStylesWithRootClass(rootClassName$z, className, isComponentReadOnly ? 'read-only' : '');
|
|
16294
16715
|
const containerClasses = useStylesWithRootClass(containerClassName$1, fullWidth ? 'full-width' : '', className);
|
|
16295
16716
|
const inputRef = useRef(null);
|
|
16296
16717
|
const [isPickerOpened, setIsPickerOpened] = useState(false);
|
|
@@ -17389,4 +17810,4 @@ const BoardColumnSummary = ({
|
|
|
17389
17810
|
});
|
|
17390
17811
|
};
|
|
17391
17812
|
|
|
17392
|
-
export { ApiError$1 as ApiError, BoardStatusProvider, Cell, ColumnStatusProvider, CreateUUID, CssCell, CssGrid, CssGridDebug, DashboardAppTypeOptions, DatePickerKeydownContext, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, 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, DotClickAwayListener, DotConfirmationDialog, DotCopyButton, DotCoreApiProvider, DotDashboardActions, DotDashboardDialog, DotDashboardHeader, DotDashboardOptionsMenu, DotDashboardPublishConfirm, DotDatePicker, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyFilterState, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotIllustration, DotInlineEdit, 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 };
|
|
17813
|
+
export { ApiError$1 as ApiError, BoardStatusProvider, Cell, ColumnStatusProvider, CreateUUID, CssCell, CssGrid, CssGridDebug, DashboardAppTypeOptions, DatePickerKeydownContext, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, 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, DotInlineEdit, 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 };
|