@digital-ai/dot-components 3.15.3 → 3.17.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 +479 -212
- 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-header/DashboardHeader.d.ts +1 -1
- package/src/lib/components/analytics/metadata-api/MetadataApiProvider.d.ts +1 -0
- package/src/lib/components/impact-dialog/ImpactDialog.d.ts +16 -0
- package/src/lib/components/impact-dialog/ImpactDialog.styles.d.ts +2 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/components/input-form-fields/InputFormFields.styles.d.ts +8 -1
- package/src/lib/components/input-form-fields/InputText.d.ts +5 -3
- package/src/lib/components/snackbar/Snackbar.d.ts +3 -1
- package/src/lib/components/snackbar/SnackbarProvider.d.ts +4 -2
package/index.esm.js
CHANGED
|
@@ -108,12 +108,12 @@ const DotTooltip = ({
|
|
|
108
108
|
}) : children;
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
const rootClassName$
|
|
111
|
+
const rootClassName$1k = 'dot-icon';
|
|
112
112
|
const StyledIcon = styled(Icon)`
|
|
113
113
|
${({
|
|
114
114
|
theme
|
|
115
115
|
}) => css`
|
|
116
|
-
&.${rootClassName$
|
|
116
|
+
&.${rootClassName$1k} {
|
|
117
117
|
color: ${theme.palette.figma.icon.black};
|
|
118
118
|
font-size: 20px;
|
|
119
119
|
|
|
@@ -150,7 +150,7 @@ const DotIcon = ({
|
|
|
150
150
|
iconId,
|
|
151
151
|
tooltip
|
|
152
152
|
}) => {
|
|
153
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
153
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1k, className);
|
|
154
154
|
return jsx(DotTooltip, {
|
|
155
155
|
title: tooltip,
|
|
156
156
|
children: jsx(StyledIcon, {
|
|
@@ -211,7 +211,7 @@ const DotTypography = ({
|
|
|
211
211
|
});
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
const rootClassName$
|
|
214
|
+
const rootClassName$1j = 'dot-accordion';
|
|
215
215
|
const summaryClassName = 'dot-accordion-summary';
|
|
216
216
|
const detailClassName = 'dot-accordion-details';
|
|
217
217
|
const StyledAccordion = styled(Accordion)`
|
|
@@ -222,7 +222,7 @@ const StyledAccordion = styled(Accordion)`
|
|
|
222
222
|
background: ${theme.palette.figma.background.level1.white};
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
&.${rootClassName$
|
|
225
|
+
&.${rootClassName$1j} .${summaryClassName} {
|
|
226
226
|
align-items: center;
|
|
227
227
|
background: ${theme.palette.figma.background.level1.white};
|
|
228
228
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -267,7 +267,7 @@ const DotAccordion = ({
|
|
|
267
267
|
ariaLabel,
|
|
268
268
|
children,
|
|
269
269
|
className,
|
|
270
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
270
|
+
'data-pendoid': dataPendoId = rootClassName$1j,
|
|
271
271
|
'data-testid': dataTestId = 'dot-accordion',
|
|
272
272
|
disabled = false,
|
|
273
273
|
expanded,
|
|
@@ -278,7 +278,7 @@ const DotAccordion = ({
|
|
|
278
278
|
summary,
|
|
279
279
|
noWrap = true
|
|
280
280
|
}) => {
|
|
281
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
281
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1j, className);
|
|
282
282
|
const [elevation, setElevation] = useState();
|
|
283
283
|
useEffect(() => {
|
|
284
284
|
if (onChange && expanded === undefined) {
|
|
@@ -394,7 +394,7 @@ const readOnlyStyles = theme => css`
|
|
|
394
394
|
}
|
|
395
395
|
`;
|
|
396
396
|
|
|
397
|
-
const rootClassName$
|
|
397
|
+
const rootClassName$1i = 'dot-text-field';
|
|
398
398
|
const rootSelectClassName = 'dot-select-field';
|
|
399
399
|
const labelClassName = 'dot-input-label';
|
|
400
400
|
const errorClassName = 'dot-error';
|
|
@@ -403,6 +403,8 @@ const successClassName = 'dot-success';
|
|
|
403
403
|
const adornmentIconClassName = 'dot-adornment-icon';
|
|
404
404
|
const fieldsetClassName = 'MuiOutlinedInput-notchedOutline';
|
|
405
405
|
const readOnlyClassName$1 = 'read-only';
|
|
406
|
+
const resizerClassName = 'with-resizer';
|
|
407
|
+
const ROW_HEIGHT = 37;
|
|
406
408
|
const StyledAdornment = styled(InputAdornment)`
|
|
407
409
|
.dot-icon {
|
|
408
410
|
${adornmentIconStyles()};
|
|
@@ -440,9 +442,11 @@ const StyledTextFieldContainer = styled.div`
|
|
|
440
442
|
const StyledTextField = styled(TextField)`
|
|
441
443
|
${({
|
|
442
444
|
theme,
|
|
443
|
-
InputProps
|
|
445
|
+
InputProps,
|
|
446
|
+
$maxRows,
|
|
447
|
+
$minRows
|
|
444
448
|
}) => css`
|
|
445
|
-
&.${rootClassName$
|
|
449
|
+
&.${rootClassName$1i} {
|
|
446
450
|
.MuiInputBase-root {
|
|
447
451
|
margin-bottom: 0;
|
|
448
452
|
}
|
|
@@ -461,9 +465,27 @@ const StyledTextField = styled(TextField)`
|
|
|
461
465
|
height: 19px;
|
|
462
466
|
}
|
|
463
467
|
}
|
|
464
|
-
|
|
465
|
-
|
|
468
|
+
|
|
469
|
+
.MuiInputBase-multiline {
|
|
470
|
+
.MuiInputBase-inputMultiline {
|
|
471
|
+
padding: 0;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
&.${resizerClassName} {
|
|
475
|
+
resize: both;
|
|
476
|
+
overflow: auto;
|
|
477
|
+
height: ${$minRows ? ROW_HEIGHT * $minRows : ROW_HEIGHT}px;
|
|
478
|
+
min-height: ${$minRows ? ROW_HEIGHT * $minRows : ROW_HEIGHT}px;
|
|
479
|
+
max-height: ${$maxRows ? `${ROW_HEIGHT * $maxRows}px` : 'unset'};
|
|
480
|
+
min-width: 170px;
|
|
481
|
+
|
|
482
|
+
#custom-text-input.MuiInputBase-inputMultiline {
|
|
483
|
+
height: 100% !important;
|
|
484
|
+
width: 100%;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
466
487
|
}
|
|
488
|
+
|
|
467
489
|
&.${readOnlyClassName$1} .MuiInputBase-root,
|
|
468
490
|
.MuiInputBase-root.Mui-disabled {
|
|
469
491
|
${readOnlyStyles(theme)};
|
|
@@ -486,7 +508,7 @@ const StyledTextField = styled(TextField)`
|
|
|
486
508
|
margin-right: ${theme.spacing(2)};
|
|
487
509
|
}
|
|
488
510
|
|
|
489
|
-
&.${rootSelectClassName}, &.${rootClassName$
|
|
511
|
+
&.${rootSelectClassName}, &.${rootClassName$1i} {
|
|
490
512
|
.${adornmentIconClassName} {
|
|
491
513
|
color: ${theme.palette.figma.icon.black};
|
|
492
514
|
p {
|
|
@@ -577,15 +599,15 @@ const StyledTextField = styled(TextField)`
|
|
|
577
599
|
`}
|
|
578
600
|
`;
|
|
579
601
|
|
|
580
|
-
const rootClassName$
|
|
602
|
+
const rootClassName$1h = 'dot-action-toolbar';
|
|
581
603
|
const StyledToolbar = styled(Toolbar)`
|
|
582
604
|
${({
|
|
583
605
|
theme
|
|
584
606
|
}) => css`
|
|
585
|
-
&.${rootClassName$
|
|
607
|
+
&.${rootClassName$1h} {
|
|
586
608
|
border-bottom: 1px solid ${theme.palette.figma.border.default};
|
|
587
609
|
|
|
588
|
-
.${rootClassName$
|
|
610
|
+
.${rootClassName$1i} .MuiInputBase-root {
|
|
589
611
|
margin-bottom: 0;
|
|
590
612
|
}
|
|
591
613
|
}
|
|
@@ -599,7 +621,7 @@ const DotActionToolbar = ({
|
|
|
599
621
|
'data-testid': dataTestId,
|
|
600
622
|
variant = 'dense'
|
|
601
623
|
}) => {
|
|
602
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
624
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1h, className);
|
|
603
625
|
return jsx(StyledToolbar, {
|
|
604
626
|
"aria-label": ariaLabel,
|
|
605
627
|
className: rootClasses,
|
|
@@ -1669,12 +1691,12 @@ const renderNodeOrTypography = (content, typographyVariant = 'body1') => {
|
|
|
1669
1691
|
const checkIfArrowUpPressed = event => event.key === 'ArrowUp';
|
|
1670
1692
|
const checkIfArrowDownPressed = event => event.key === 'ArrowDown';
|
|
1671
1693
|
|
|
1672
|
-
const rootClassName$
|
|
1694
|
+
const rootClassName$1g = 'dot-alert-banner';
|
|
1673
1695
|
const StyledAlertBanner = styled(Alert)`
|
|
1674
1696
|
${({
|
|
1675
1697
|
theme
|
|
1676
1698
|
}) => css`
|
|
1677
|
-
&.${rootClassName$
|
|
1699
|
+
&.${rootClassName$1g} {
|
|
1678
1700
|
align-items: center;
|
|
1679
1701
|
box-sizing: border-box;
|
|
1680
1702
|
min-height: 48px;
|
|
@@ -1709,7 +1731,7 @@ const DotAlertBanner = ({
|
|
|
1709
1731
|
ariaLabel,
|
|
1710
1732
|
children,
|
|
1711
1733
|
className,
|
|
1712
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
1734
|
+
'data-pendoid': dataPendoId = rootClassName$1g,
|
|
1713
1735
|
'data-testid': dataTestId,
|
|
1714
1736
|
onClose,
|
|
1715
1737
|
roundedCorners = true,
|
|
@@ -1717,7 +1739,7 @@ const DotAlertBanner = ({
|
|
|
1717
1739
|
textVariant = 'body1',
|
|
1718
1740
|
width
|
|
1719
1741
|
}) => {
|
|
1720
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
1742
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1g, severity, className);
|
|
1721
1743
|
/* For simple string use default component, for everything else use 'div' */
|
|
1722
1744
|
const typographyComponent = isString$2(children) ? undefined : 'div';
|
|
1723
1745
|
return jsx(StyledAlertBanner, {
|
|
@@ -2395,7 +2417,7 @@ const useDotCoreApiContext = () => {
|
|
|
2395
2417
|
return useContext(DotCoreApiContext);
|
|
2396
2418
|
};
|
|
2397
2419
|
|
|
2398
|
-
const rootClassName$
|
|
2420
|
+
const rootClassName$1f = 'dot-avatar';
|
|
2399
2421
|
const avatarSpacing = {
|
|
2400
2422
|
small: 3,
|
|
2401
2423
|
medium: 5,
|
|
@@ -2405,7 +2427,7 @@ const StyledAvatar = styled(Avatar)`
|
|
|
2405
2427
|
${({
|
|
2406
2428
|
theme
|
|
2407
2429
|
}) => css`
|
|
2408
|
-
&.${rootClassName$
|
|
2430
|
+
&.${rootClassName$1f} {
|
|
2409
2431
|
display: inline-flex;
|
|
2410
2432
|
background-color: ${({
|
|
2411
2433
|
color
|
|
@@ -2517,7 +2539,7 @@ const DotAvatar = ({
|
|
|
2517
2539
|
variant = 'circular',
|
|
2518
2540
|
style
|
|
2519
2541
|
}) => {
|
|
2520
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2542
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1f, className);
|
|
2521
2543
|
const getAvatarColor = () => {
|
|
2522
2544
|
if ((style === null || style === void 0 ? void 0 : style.color) !== undefined) return 'inherit';
|
|
2523
2545
|
if (color) return color;
|
|
@@ -2556,12 +2578,12 @@ const DotAvatar = ({
|
|
|
2556
2578
|
});
|
|
2557
2579
|
};
|
|
2558
2580
|
|
|
2559
|
-
const rootClassName$
|
|
2581
|
+
const rootClassName$1e = 'dot-button';
|
|
2560
2582
|
const StyledButton = styled(Button)`
|
|
2561
2583
|
${({
|
|
2562
2584
|
theme
|
|
2563
2585
|
}) => css`
|
|
2564
|
-
&.${rootClassName$
|
|
2586
|
+
&.${rootClassName$1e} {
|
|
2565
2587
|
background-color: ${theme.palette.figma.primary.normal};
|
|
2566
2588
|
margin: ${theme.spacing(0.5)};
|
|
2567
2589
|
padding: ${theme.spacing(0.75, 2)};
|
|
@@ -2645,7 +2667,7 @@ const DotButton = forwardRef(({
|
|
|
2645
2667
|
autoFocus = false,
|
|
2646
2668
|
children,
|
|
2647
2669
|
className,
|
|
2648
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
2670
|
+
'data-pendoid': dataPendoId = rootClassName$1e,
|
|
2649
2671
|
'data-testid': dataTestId,
|
|
2650
2672
|
disabled = false,
|
|
2651
2673
|
disableRipple = false,
|
|
@@ -2661,7 +2683,7 @@ const DotButton = forwardRef(({
|
|
|
2661
2683
|
tooltipPlacement,
|
|
2662
2684
|
type = 'primary'
|
|
2663
2685
|
}, ref) => {
|
|
2664
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2686
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1e, className);
|
|
2665
2687
|
let color;
|
|
2666
2688
|
let variant;
|
|
2667
2689
|
switch (type) {
|
|
@@ -2685,7 +2707,7 @@ const DotButton = forwardRef(({
|
|
|
2685
2707
|
return jsx(DotTooltip, {
|
|
2686
2708
|
placement: tooltipPlacement,
|
|
2687
2709
|
title: tooltip,
|
|
2688
|
-
"data-testid": `${dataTestId || rootClassName$
|
|
2710
|
+
"data-testid": `${dataTestId || rootClassName$1e}-tooltip`,
|
|
2689
2711
|
children: jsx(StyledButton, {
|
|
2690
2712
|
"aria-label": ariaLabel,
|
|
2691
2713
|
autoFocus: autoFocus,
|
|
@@ -2694,7 +2716,7 @@ const DotButton = forwardRef(({
|
|
|
2694
2716
|
},
|
|
2695
2717
|
color: color,
|
|
2696
2718
|
"data-pendoid": dataPendoId,
|
|
2697
|
-
"data-testid": dataTestId || rootClassName$
|
|
2719
|
+
"data-testid": dataTestId || rootClassName$1e,
|
|
2698
2720
|
disableRipple: disableRipple,
|
|
2699
2721
|
disabled: disabled,
|
|
2700
2722
|
endIcon: endIcon,
|
|
@@ -2713,10 +2735,10 @@ const DotButton = forwardRef(({
|
|
|
2713
2735
|
});
|
|
2714
2736
|
});
|
|
2715
2737
|
|
|
2716
|
-
const rootClassName$
|
|
2738
|
+
const rootClassName$1d = 'dot-link';
|
|
2717
2739
|
const StyledLink = styled(Link)`
|
|
2718
2740
|
${() => css`
|
|
2719
|
-
&.${rootClassName$
|
|
2741
|
+
&.${rootClassName$1d} {
|
|
2720
2742
|
cursor: pointer;
|
|
2721
2743
|
|
|
2722
2744
|
&:hover.MuiLink-underlineHover {
|
|
@@ -2732,7 +2754,7 @@ const DotLink = ({
|
|
|
2732
2754
|
children,
|
|
2733
2755
|
className,
|
|
2734
2756
|
color = 'primary',
|
|
2735
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
2757
|
+
'data-pendoid': dataPendoId = rootClassName$1d,
|
|
2736
2758
|
'data-testid': dataTestId,
|
|
2737
2759
|
href,
|
|
2738
2760
|
onClick,
|
|
@@ -2745,7 +2767,7 @@ const DotLink = ({
|
|
|
2745
2767
|
underline = 'always',
|
|
2746
2768
|
variant = 'body1'
|
|
2747
2769
|
}) => {
|
|
2748
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2770
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1d, className);
|
|
2749
2771
|
useEffect(() => {
|
|
2750
2772
|
// Include a console warning if the link is not a string and no ariaLabel is provided
|
|
2751
2773
|
if (!isString$2(children) && !ariaLabel) {
|
|
@@ -2796,7 +2818,7 @@ const CreateUUID = () => {
|
|
|
2796
2818
|
});
|
|
2797
2819
|
};
|
|
2798
2820
|
|
|
2799
|
-
const rootClassName$
|
|
2821
|
+
const rootClassName$1c = 'dot-list';
|
|
2800
2822
|
const listItemRootClass = 'dot-list-item';
|
|
2801
2823
|
const nestedListClassName = 'dot-nested-list';
|
|
2802
2824
|
const nestedDrawerClassName = 'dot-nested-drawer';
|
|
@@ -2804,7 +2826,7 @@ const StyledList = styled(List)`
|
|
|
2804
2826
|
${({
|
|
2805
2827
|
theme
|
|
2806
2828
|
}) => css`
|
|
2807
|
-
&.${rootClassName$
|
|
2829
|
+
&.${rootClassName$1c} {
|
|
2808
2830
|
background: ${theme.palette.figma.background.level0.componentsBackground};
|
|
2809
2831
|
|
|
2810
2832
|
.dot-icon {
|
|
@@ -2897,12 +2919,12 @@ const DotListDivider = ({
|
|
|
2897
2919
|
});
|
|
2898
2920
|
};
|
|
2899
2921
|
|
|
2900
|
-
const rootClassName$
|
|
2922
|
+
const rootClassName$1b = 'dot-progress';
|
|
2901
2923
|
const StyledProgress = styled.div`
|
|
2902
2924
|
${({
|
|
2903
2925
|
theme
|
|
2904
2926
|
}) => css`
|
|
2905
|
-
&.${rootClassName$
|
|
2927
|
+
&.${rootClassName$1b} {
|
|
2906
2928
|
line-height: 0;
|
|
2907
2929
|
|
|
2908
2930
|
.dot-progress-with-label-wrapper {
|
|
@@ -2953,7 +2975,7 @@ const DotProgress = ({
|
|
|
2953
2975
|
value,
|
|
2954
2976
|
variant = 'indeterminate'
|
|
2955
2977
|
}) => {
|
|
2956
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
2978
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1b, className);
|
|
2957
2979
|
useEffect(() => {
|
|
2958
2980
|
if (!ariaLabel) {
|
|
2959
2981
|
console.warn('a11y: DotProgress must have an ariaLabel to describe the progress component');
|
|
@@ -3019,13 +3041,13 @@ var variables = /*#__PURE__*/Object.freeze({
|
|
|
3019
3041
|
levelTop: levelTop
|
|
3020
3042
|
});
|
|
3021
3043
|
|
|
3022
|
-
const rootClassName$
|
|
3044
|
+
const rootClassName$1a = 'dot-popper';
|
|
3023
3045
|
const arrowClassName = 'MuiPopper-arrow';
|
|
3024
3046
|
const StyledPopper$1 = styled(Popper)`
|
|
3025
3047
|
${({
|
|
3026
3048
|
theme
|
|
3027
3049
|
}) => css`
|
|
3028
|
-
&.${rootClassName$
|
|
3050
|
+
&.${rootClassName$1a} {
|
|
3029
3051
|
font-family: ${theme.typography.fontFamily};
|
|
3030
3052
|
font-size: ${theme.typography.body1.fontSize}px;
|
|
3031
3053
|
|
|
@@ -3084,7 +3106,7 @@ const StyledPopper$1 = styled(Popper)`
|
|
|
3084
3106
|
}
|
|
3085
3107
|
}
|
|
3086
3108
|
|
|
3087
|
-
&.${rootClassName$
|
|
3109
|
+
&.${rootClassName$1a}, &.${rootClassName$1a} > .dot-popper-paper {
|
|
3088
3110
|
background-color: ${theme.palette.figma.background.level1.white};
|
|
3089
3111
|
}
|
|
3090
3112
|
`}
|
|
@@ -3114,17 +3136,17 @@ const StyledArrow = styled('span')`
|
|
|
3114
3136
|
`;
|
|
3115
3137
|
|
|
3116
3138
|
const flyoutMenuClassName = 'dot-flyout-menu';
|
|
3117
|
-
const rootClassName$
|
|
3139
|
+
const rootClassName$19 = 'dot-menu';
|
|
3118
3140
|
const StyledPopper = styled(Popper)`
|
|
3119
3141
|
${({
|
|
3120
3142
|
theme
|
|
3121
3143
|
}) => css`
|
|
3122
|
-
&.${rootClassName$
|
|
3144
|
+
&.${rootClassName$1a} {
|
|
3123
3145
|
font-family: ${theme.typography.fontFamily};
|
|
3124
3146
|
font-size: ${theme.typography.body1.fontSize}px;
|
|
3125
3147
|
z-index: ${levelSecond};
|
|
3126
3148
|
}
|
|
3127
|
-
&.${rootClassName$
|
|
3149
|
+
&.${rootClassName$19}, &.${rootClassName$1a} {
|
|
3128
3150
|
.MuiPaper-root:not(:empty) {
|
|
3129
3151
|
border: 1px solid ${theme.palette.layer.n100};
|
|
3130
3152
|
}
|
|
@@ -3204,14 +3226,14 @@ const MENU_ITEM_HEIGHT_NORMAL = 48;
|
|
|
3204
3226
|
const MENU_ITEM_HEIGHT_DENSE = 36;
|
|
3205
3227
|
const DEFAULT_MAX_VISIBLE_ITEMS = 7;
|
|
3206
3228
|
|
|
3207
|
-
const rootClassName$
|
|
3229
|
+
const rootClassName$18 = 'dot-ul';
|
|
3208
3230
|
const listItemClassName$1 = 'dot-li';
|
|
3209
3231
|
const listItemWithSubmenuClassName = 'dot-li-with-submenu';
|
|
3210
3232
|
const StyledMenuList = styled(MenuList)`
|
|
3211
3233
|
${({
|
|
3212
3234
|
theme
|
|
3213
3235
|
}) => css`
|
|
3214
|
-
&.${rootClassName$
|
|
3236
|
+
&.${rootClassName$18} {
|
|
3215
3237
|
background: ${theme.palette.figma.background.level1.white};
|
|
3216
3238
|
|
|
3217
3239
|
.dot-li {
|
|
@@ -3307,7 +3329,7 @@ const DotMenuList = forwardRef(({
|
|
|
3307
3329
|
onSubMenuCreate,
|
|
3308
3330
|
selectedKey
|
|
3309
3331
|
}, ref) => {
|
|
3310
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3332
|
+
const rootClasses = useStylesWithRootClass(rootClassName$18, className);
|
|
3311
3333
|
const [activeSubmenu, setActiveSubmenu] = useState(null);
|
|
3312
3334
|
const [subItemAnchorEl, setSubItemAnchorEl] = useState(null);
|
|
3313
3335
|
const openSubmenu = (target, itemKey) => {
|
|
@@ -3418,7 +3440,7 @@ const DotMenu = ({
|
|
|
3418
3440
|
open = false,
|
|
3419
3441
|
selectedKey
|
|
3420
3442
|
}) => {
|
|
3421
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3443
|
+
const rootClasses = useStylesWithRootClass(rootClassName$19, className, loading ? 'loading' : '');
|
|
3422
3444
|
const isSubmenu = checkIfSubmenu(anchorEl);
|
|
3423
3445
|
const hasSubItems = checkForSubItems(menuItems);
|
|
3424
3446
|
// Timeout object is customizable when Menu component is either submenu
|
|
@@ -3506,12 +3528,12 @@ const DotMenu = ({
|
|
|
3506
3528
|
});
|
|
3507
3529
|
};
|
|
3508
3530
|
|
|
3509
|
-
const rootClassName$
|
|
3531
|
+
const rootClassName$17 = 'dot-drawer';
|
|
3510
3532
|
const StyledDrawer = styled(Drawer)`
|
|
3511
3533
|
${({
|
|
3512
3534
|
theme
|
|
3513
3535
|
}) => css`
|
|
3514
|
-
&.${rootClassName$
|
|
3536
|
+
&.${rootClassName$17} .MuiBackdrop-root {
|
|
3515
3537
|
background-color: ${theme.palette.figma.overlay.default};
|
|
3516
3538
|
}
|
|
3517
3539
|
|
|
@@ -3530,12 +3552,12 @@ const StyledDrawer = styled(Drawer)`
|
|
|
3530
3552
|
`}
|
|
3531
3553
|
`;
|
|
3532
3554
|
|
|
3533
|
-
const rootClassName$
|
|
3555
|
+
const rootClassName$16 = 'dot-drawer-header';
|
|
3534
3556
|
const StyleDrawerHeader = styled.div`
|
|
3535
3557
|
${({
|
|
3536
3558
|
theme
|
|
3537
3559
|
}) => css`
|
|
3538
|
-
&.${rootClassName$
|
|
3560
|
+
&.${rootClassName$16} {
|
|
3539
3561
|
padding: ${theme.spacing(0, 0, 2)};
|
|
3540
3562
|
display: flex;
|
|
3541
3563
|
align-items: center;
|
|
@@ -3546,13 +3568,13 @@ const StyleDrawerHeader = styled.div`
|
|
|
3546
3568
|
`}
|
|
3547
3569
|
`;
|
|
3548
3570
|
|
|
3549
|
-
const rootClassName$
|
|
3571
|
+
const rootClassName$15 = 'dot-icon-btn';
|
|
3550
3572
|
const StyledIconButton = styled(IconButton)`
|
|
3551
3573
|
${({
|
|
3552
3574
|
theme,
|
|
3553
3575
|
color
|
|
3554
3576
|
}) => css`
|
|
3555
|
-
&.${rootClassName$
|
|
3577
|
+
&.${rootClassName$15} {
|
|
3556
3578
|
${color === 'inherit' ? css`
|
|
3557
3579
|
color: inherit;
|
|
3558
3580
|
` : ''}
|
|
@@ -3611,7 +3633,7 @@ const DotIconButton = ({
|
|
|
3611
3633
|
ariaRole = 'button',
|
|
3612
3634
|
className,
|
|
3613
3635
|
color = 'inherit',
|
|
3614
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
3636
|
+
'data-pendoid': dataPendoId = rootClassName$15,
|
|
3615
3637
|
'data-testid': dataTestId,
|
|
3616
3638
|
disableRipple = false,
|
|
3617
3639
|
disabled = false,
|
|
@@ -3624,7 +3646,7 @@ const DotIconButton = ({
|
|
|
3624
3646
|
tooltipPlacement
|
|
3625
3647
|
}) => {
|
|
3626
3648
|
const rippleClassName = disableRipple ? 'ripple-disabled' : '';
|
|
3627
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3649
|
+
const rootClasses = useStylesWithRootClass(rootClassName$15, rippleClassName, `shape-${shape}`, className);
|
|
3628
3650
|
return jsx(DotTooltip, {
|
|
3629
3651
|
"data-testid": "icon-button-tooltip",
|
|
3630
3652
|
placement: tooltipPlacement,
|
|
@@ -3659,7 +3681,7 @@ const DotDrawerHeader = ({
|
|
|
3659
3681
|
onClose,
|
|
3660
3682
|
variant
|
|
3661
3683
|
}) => {
|
|
3662
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3684
|
+
const rootClasses = useStylesWithRootClass(rootClassName$16, className);
|
|
3663
3685
|
return jsxs(StyleDrawerHeader, {
|
|
3664
3686
|
"aria-label": ariaLabel,
|
|
3665
3687
|
"aria-level": 2,
|
|
@@ -3676,10 +3698,10 @@ const DotDrawerHeader = ({
|
|
|
3676
3698
|
});
|
|
3677
3699
|
};
|
|
3678
3700
|
|
|
3679
|
-
const rootClassName$
|
|
3701
|
+
const rootClassName$14 = 'dot-drawer-body';
|
|
3680
3702
|
const StyleDrawerBody = styled.div`
|
|
3681
3703
|
${() => css`
|
|
3682
|
-
&.${rootClassName$
|
|
3704
|
+
&.${rootClassName$14} {
|
|
3683
3705
|
display: flex;
|
|
3684
3706
|
.dot-drawer-close-button {
|
|
3685
3707
|
align-self: self-start;
|
|
@@ -3700,7 +3722,7 @@ const DotDrawerBody = ({
|
|
|
3700
3722
|
onClose,
|
|
3701
3723
|
variant
|
|
3702
3724
|
}) => {
|
|
3703
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3725
|
+
const rootClasses = useStylesWithRootClass(rootClassName$14, className);
|
|
3704
3726
|
return jsxs(StyleDrawerBody, {
|
|
3705
3727
|
"aria-label": ariaLabel,
|
|
3706
3728
|
className: rootClasses,
|
|
@@ -3715,12 +3737,12 @@ const DotDrawerBody = ({
|
|
|
3715
3737
|
});
|
|
3716
3738
|
};
|
|
3717
3739
|
|
|
3718
|
-
const rootClassName$
|
|
3740
|
+
const rootClassName$13 = 'dot-drawer-footer';
|
|
3719
3741
|
const StyleDrawerFooter = styled.div`
|
|
3720
3742
|
${({
|
|
3721
3743
|
theme
|
|
3722
3744
|
}) => css`
|
|
3723
|
-
&.${rootClassName$
|
|
3745
|
+
&.${rootClassName$13} {
|
|
3724
3746
|
padding: ${theme.spacing(2, 0, 0)};
|
|
3725
3747
|
}
|
|
3726
3748
|
`}
|
|
@@ -3733,7 +3755,7 @@ const DotDrawerFooter = ({
|
|
|
3733
3755
|
className,
|
|
3734
3756
|
'data-testid': dataTestId
|
|
3735
3757
|
}) => {
|
|
3736
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3758
|
+
const rootClasses = useStylesWithRootClass(rootClassName$13, className);
|
|
3737
3759
|
return jsx(StyleDrawerFooter, {
|
|
3738
3760
|
"aria-label": ariaLabel,
|
|
3739
3761
|
className: rootClasses,
|
|
@@ -3749,7 +3771,7 @@ const DotDrawer = ({
|
|
|
3749
3771
|
ariaRole = 'dialog',
|
|
3750
3772
|
className,
|
|
3751
3773
|
children,
|
|
3752
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
3774
|
+
'data-pendoid': dataPendoId = rootClassName$17,
|
|
3753
3775
|
'data-testid': dataTestId,
|
|
3754
3776
|
drawerBodyProps,
|
|
3755
3777
|
drawerFooterProps,
|
|
@@ -3772,7 +3794,7 @@ const DotDrawer = ({
|
|
|
3772
3794
|
onClose(event);
|
|
3773
3795
|
}
|
|
3774
3796
|
};
|
|
3775
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3797
|
+
const rootClasses = useStylesWithRootClass(rootClassName$17, className);
|
|
3776
3798
|
const backdropEnabled = variant === 'temporary' && !(ModalProps === null || ModalProps === void 0 ? void 0 : ModalProps.hideBackdrop);
|
|
3777
3799
|
const headerExists = !!drawerHeaderProps;
|
|
3778
3800
|
const bodyPendoId = drawerBodyProps ? drawerBodyProps['data-pendoid'] : 'drawer-body';
|
|
@@ -4172,7 +4194,7 @@ const DotList = ({
|
|
|
4172
4194
|
nestedListType = 'expandable',
|
|
4173
4195
|
width = 240
|
|
4174
4196
|
}) => {
|
|
4175
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
4197
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1c, className);
|
|
4176
4198
|
const listWidth = typeof width === 'number' ? `${width}px` : width;
|
|
4177
4199
|
const listRef = useRef();
|
|
4178
4200
|
const disableCloseOnClickAway = !nestedListCloseOnClickAway && nestedListType === 'expandable';
|
|
@@ -4268,12 +4290,12 @@ const DotList = ({
|
|
|
4268
4290
|
});
|
|
4269
4291
|
};
|
|
4270
4292
|
|
|
4271
|
-
const rootClassName$
|
|
4293
|
+
const rootClassName$12 = 'dot-copy-button';
|
|
4272
4294
|
const StyledCopyButton = styled.span`
|
|
4273
4295
|
${({
|
|
4274
4296
|
theme
|
|
4275
4297
|
}) => css`
|
|
4276
|
-
&.${rootClassName$
|
|
4298
|
+
&.${rootClassName$12} .copied-to-clipboard {
|
|
4277
4299
|
color: ${theme.palette.figma.success.normal};
|
|
4278
4300
|
|
|
4279
4301
|
&.MuiIcon-fontSizeSmall.button-size-small {
|
|
@@ -4299,7 +4321,7 @@ const DotCopyButton = ({
|
|
|
4299
4321
|
color = 'inherit',
|
|
4300
4322
|
copiedTooltip = 'Copied!',
|
|
4301
4323
|
copyTooltip = 'Copy to clipboard',
|
|
4302
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
4324
|
+
'data-pendoid': dataPendoId = rootClassName$12,
|
|
4303
4325
|
'data-testid': dataTestId = 'dot-copy-button',
|
|
4304
4326
|
disabled = false,
|
|
4305
4327
|
disableRipple = false,
|
|
@@ -4347,7 +4369,7 @@ const DotCopyButton = ({
|
|
|
4347
4369
|
return false;
|
|
4348
4370
|
}, [value, showCopiedIcon, disabled, onClick]);
|
|
4349
4371
|
return jsxs(StyledCopyButton, {
|
|
4350
|
-
className: rootClassName$
|
|
4372
|
+
className: rootClassName$12,
|
|
4351
4373
|
"data-testid": dataTestId,
|
|
4352
4374
|
children: [!timedShowCopiedIcon && jsx(DotIconButton, {
|
|
4353
4375
|
ariaLabel: ariaLabel,
|
|
@@ -4436,13 +4458,14 @@ const DotInputText = ({
|
|
|
4436
4458
|
autoFocus,
|
|
4437
4459
|
className,
|
|
4438
4460
|
defaultValue,
|
|
4439
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
4461
|
+
'data-pendoid': dataPendoId = rootClassName$1i,
|
|
4440
4462
|
'data-testid': dataTestId,
|
|
4441
4463
|
disabled = false,
|
|
4442
4464
|
error = false,
|
|
4443
4465
|
endAdornmentTooltip,
|
|
4444
4466
|
fullWidth = true,
|
|
4445
4467
|
hasDebounce,
|
|
4468
|
+
hasResizer = false,
|
|
4446
4469
|
helperText,
|
|
4447
4470
|
endIcon,
|
|
4448
4471
|
endText,
|
|
@@ -4482,7 +4505,7 @@ const DotInputText = ({
|
|
|
4482
4505
|
const internalInputRef = useRef(null);
|
|
4483
4506
|
const textFieldInputRef = inputRef || internalInputRef;
|
|
4484
4507
|
const [inputTextState, setInputTextState] = useState(getInitialState(value));
|
|
4485
|
-
const rootStyles = useStylesWithRootClass(rootClassName$
|
|
4508
|
+
const rootStyles = useStylesWithRootClass(rootClassName$1i, hasError, hasWarning, hasSuccess, readOnly && readOnlyClassName$1);
|
|
4486
4509
|
useEffect(() => {
|
|
4487
4510
|
if (value !== inputTextState.inputValue) {
|
|
4488
4511
|
setInputTextState(getInitialState(value, defaultValue));
|
|
@@ -4556,6 +4579,8 @@ const DotInputText = ({
|
|
|
4556
4579
|
}
|
|
4557
4580
|
return null;
|
|
4558
4581
|
};
|
|
4582
|
+
const getMinRows = () => multiline && !hasResizer ? minRows : null;
|
|
4583
|
+
const getMaxRows = () => multiline && !hasResizer ? maxRows : null;
|
|
4559
4584
|
const wrapperClassName = useStylesWithRootClass(fullWidth !== false ? 'dot-input-text--fullwidth' : '', className);
|
|
4560
4585
|
const inputClassName = useStylesWithRootClass('dot-input', readOnly && readOnlyClassName$1);
|
|
4561
4586
|
return jsxs(StyledTextFieldContainer, {
|
|
@@ -4567,7 +4592,10 @@ const DotInputText = ({
|
|
|
4567
4592
|
label,
|
|
4568
4593
|
required
|
|
4569
4594
|
}), jsx(StyledTextField, {
|
|
4595
|
+
"$maxRows": maxRows,
|
|
4596
|
+
"$minRows": minRows,
|
|
4570
4597
|
InputProps: {
|
|
4598
|
+
className: multiline && hasResizer && resizerClassName || undefined,
|
|
4571
4599
|
startAdornment: startAdornmentIcon(),
|
|
4572
4600
|
endAdornment: getEndAdornment()
|
|
4573
4601
|
},
|
|
@@ -4598,8 +4626,8 @@ const DotInputText = ({
|
|
|
4598
4626
|
},
|
|
4599
4627
|
inputRef: textFieldInputRef,
|
|
4600
4628
|
label: persistentLabel ? null : label,
|
|
4601
|
-
maxRows:
|
|
4602
|
-
minRows:
|
|
4629
|
+
maxRows: getMaxRows(),
|
|
4630
|
+
minRows: getMinRows(),
|
|
4603
4631
|
multiline: multiline,
|
|
4604
4632
|
name: name,
|
|
4605
4633
|
onBlur: onBlur,
|
|
@@ -4618,10 +4646,10 @@ const DotInputText = ({
|
|
|
4618
4646
|
});
|
|
4619
4647
|
};
|
|
4620
4648
|
|
|
4621
|
-
const rootClassName$
|
|
4649
|
+
const rootClassName$11 = 'dot-search-input';
|
|
4622
4650
|
const StyledSearchInput = styled.span`
|
|
4623
4651
|
${() => css`
|
|
4624
|
-
&.${rootClassName$
|
|
4652
|
+
&.${rootClassName$11} {
|
|
4625
4653
|
}
|
|
4626
4654
|
`}
|
|
4627
4655
|
`;
|
|
@@ -4638,7 +4666,7 @@ function SearchInput({
|
|
|
4638
4666
|
tooltip = null,
|
|
4639
4667
|
value
|
|
4640
4668
|
}) {
|
|
4641
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
4669
|
+
const rootClasses = useStylesWithRootClass(rootClassName$11, className);
|
|
4642
4670
|
const [searchText, setSearchText] = useState(value);
|
|
4643
4671
|
let previousSearchText = '';
|
|
4644
4672
|
const handleChange = useCallback(event => {
|
|
@@ -4894,12 +4922,12 @@ const recentAppInstancesSetter = (latestInstance, maxRecentItems
|
|
|
4894
4922
|
};
|
|
4895
4923
|
};
|
|
4896
4924
|
|
|
4897
|
-
const rootClassName
|
|
4925
|
+
const rootClassName$10 = 'dot-app-switcher';
|
|
4898
4926
|
const StyledAppSwitcher = styled(DotDrawer)`
|
|
4899
4927
|
${({
|
|
4900
4928
|
theme
|
|
4901
4929
|
}) => css`
|
|
4902
|
-
&.${rootClassName
|
|
4930
|
+
&.${rootClassName$10} {
|
|
4903
4931
|
.dot-drawer-paper {
|
|
4904
4932
|
padding: 0;
|
|
4905
4933
|
width: 382px;
|
|
@@ -5009,7 +5037,7 @@ const DotAppSwitcherView = ({
|
|
|
5009
5037
|
if (dotCoreApiContext !== null) {
|
|
5010
5038
|
setSelectedAppType = dotCoreApiContext.setSelectedAppSwitcherAppType;
|
|
5011
5039
|
}
|
|
5012
|
-
const rootClasses = useStylesWithRootClass(rootClassName
|
|
5040
|
+
const rootClasses = useStylesWithRootClass(rootClassName$10, className);
|
|
5013
5041
|
const [appTypeMap, setAppTypeMap] = useState();
|
|
5014
5042
|
const [appTypeLabels, setAppTypeLabels] = useState();
|
|
5015
5043
|
const [appTypeMenuItems, setAppTypeMenuItems] = useState();
|
|
@@ -5387,12 +5415,12 @@ var SvgLogoDigitalAiWhite = function SvgLogoDigitalAiWhite(_ref, ref) {
|
|
|
5387
5415
|
};
|
|
5388
5416
|
var ForwardRef = /*#__PURE__*/forwardRef(SvgLogoDigitalAiWhite);
|
|
5389
5417
|
|
|
5390
|
-
const rootClassName
|
|
5418
|
+
const rootClassName$$ = 'dot-sidebar';
|
|
5391
5419
|
const StyledSidebar = styled.aside`
|
|
5392
5420
|
${({
|
|
5393
5421
|
theme
|
|
5394
5422
|
}) => css`
|
|
5395
|
-
&.${rootClassName
|
|
5423
|
+
&.${rootClassName$$} {
|
|
5396
5424
|
align-items: stretch;
|
|
5397
5425
|
background: ${theme.palette.figma.background.level1.white};
|
|
5398
5426
|
border-width: 0 1px;
|
|
@@ -5686,10 +5714,10 @@ const StyledSidebar = styled.aside`
|
|
|
5686
5714
|
`}
|
|
5687
5715
|
`;
|
|
5688
5716
|
|
|
5689
|
-
const rootClassName$
|
|
5717
|
+
const rootClassName$_ = 'dot-truncate-with-tooltip';
|
|
5690
5718
|
const StyledTruncateWithTooltip = styled(Tooltip)`
|
|
5691
5719
|
${() => css`
|
|
5692
|
-
&.${rootClassName$
|
|
5720
|
+
&.${rootClassName$_} {
|
|
5693
5721
|
display: block;
|
|
5694
5722
|
overflow: hidden;
|
|
5695
5723
|
white-space: nowrap;
|
|
@@ -5720,7 +5748,7 @@ const DotTruncateWithTooltip = ({
|
|
|
5720
5748
|
label,
|
|
5721
5749
|
width
|
|
5722
5750
|
}) => {
|
|
5723
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
5751
|
+
const rootClasses = useStylesWithRootClass(rootClassName$_, className, charactersLimit ? 'dot-characters-limit' : '');
|
|
5724
5752
|
return jsx(StyledTruncateWithTooltip, {
|
|
5725
5753
|
"aria-label": ariaLabel,
|
|
5726
5754
|
arrow: arrow,
|
|
@@ -5844,7 +5872,7 @@ const DotSidebar = ({
|
|
|
5844
5872
|
};
|
|
5845
5873
|
}, [isOpen, collapsable]);
|
|
5846
5874
|
const sidebarClasses = useStylesWithRootClass('side-nav', openClass);
|
|
5847
|
-
const rootClasses = useStylesWithRootClass(rootClassName
|
|
5875
|
+
const rootClasses = useStylesWithRootClass(rootClassName$$, openClass, className);
|
|
5848
5876
|
return jsxs(StyledSidebar, {
|
|
5849
5877
|
"aria-label": ariaLabel,
|
|
5850
5878
|
className: rootClasses,
|
|
@@ -5912,12 +5940,12 @@ const DotSidebar = ({
|
|
|
5912
5940
|
});
|
|
5913
5941
|
};
|
|
5914
5942
|
|
|
5915
|
-
const rootClassName$
|
|
5943
|
+
const rootClassName$Z = 'dot-badge';
|
|
5916
5944
|
const StyledBadge = styled(Badge)`
|
|
5917
5945
|
${({
|
|
5918
5946
|
theme
|
|
5919
5947
|
}) => css`
|
|
5920
|
-
&.${rootClassName$
|
|
5948
|
+
&.${rootClassName$Z} {
|
|
5921
5949
|
color: ${theme.palette.figma.typography.black};
|
|
5922
5950
|
word-break: normal;
|
|
5923
5951
|
|
|
@@ -5952,7 +5980,7 @@ const DotBadge = ({
|
|
|
5952
5980
|
overlap,
|
|
5953
5981
|
variant = 'dot'
|
|
5954
5982
|
}) => {
|
|
5955
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
5983
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Z, className);
|
|
5956
5984
|
return jsx(StyledBadge, {
|
|
5957
5985
|
"$badgeColor": badgeColor,
|
|
5958
5986
|
anchorOrigin: {
|
|
@@ -5974,7 +6002,7 @@ const DotBadge = ({
|
|
|
5974
6002
|
});
|
|
5975
6003
|
};
|
|
5976
6004
|
|
|
5977
|
-
const rootClassName$
|
|
6005
|
+
const rootClassName$Y = 'dot-app-toolbar';
|
|
5978
6006
|
const denseClassName = 'dense';
|
|
5979
6007
|
const StyledMainMenu = styled(DotDrawer)`
|
|
5980
6008
|
${({
|
|
@@ -6014,7 +6042,7 @@ const StyledAppToolbar = styled.header`
|
|
|
6014
6042
|
${({
|
|
6015
6043
|
theme
|
|
6016
6044
|
}) => css`
|
|
6017
|
-
&.${rootClassName$
|
|
6045
|
+
&.${rootClassName$Y} {
|
|
6018
6046
|
align-items: center;
|
|
6019
6047
|
background: ${theme.palette.figma.appToolbar.background};
|
|
6020
6048
|
border-bottom: 4px solid ${theme.palette.figma.border.default};
|
|
@@ -6136,7 +6164,7 @@ const DotAppToolbar = ({
|
|
|
6136
6164
|
const displayAppLogo = appLogo || appLogoSmall;
|
|
6137
6165
|
const mainMenuRef = useRef(null);
|
|
6138
6166
|
const denseClass = dense ? denseClassName : '';
|
|
6139
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6167
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Y, className, denseClass, showMainMenu ? '' : 'without-menu-icon');
|
|
6140
6168
|
const mainMenuClasses = useStylesWithRootClass('dot-main-menu', denseClass, menuOpen ? 'open' : '');
|
|
6141
6169
|
const targetBreakpoint = useMediaQuery(theme => theme.breakpoints.up('lg'));
|
|
6142
6170
|
useEffect(() => {
|
|
@@ -6266,14 +6294,14 @@ const DotAppToolbar = ({
|
|
|
6266
6294
|
}) : appToolbar;
|
|
6267
6295
|
};
|
|
6268
6296
|
|
|
6269
|
-
const rootClassName$
|
|
6297
|
+
const rootClassName$X = 'dot-autocomplete';
|
|
6270
6298
|
const inputRootClassName = 'dot-input-root';
|
|
6271
6299
|
const inputMediumClassName = 'dot-input-medium';
|
|
6272
6300
|
const StyledAutocomplete = styled(Autocomplete)`
|
|
6273
6301
|
${({
|
|
6274
6302
|
theme
|
|
6275
6303
|
}) => css`
|
|
6276
|
-
&.${rootClassName$
|
|
6304
|
+
&.${rootClassName$X} {
|
|
6277
6305
|
&.${inputMediumClassName} .dot-text-field .${inputRootClassName} {
|
|
6278
6306
|
height: 56px;
|
|
6279
6307
|
padding-left: ${theme.spacing(2)};
|
|
@@ -6310,12 +6338,12 @@ const StyledAutocomplete = styled(Autocomplete)`
|
|
|
6310
6338
|
`}
|
|
6311
6339
|
`;
|
|
6312
6340
|
|
|
6313
|
-
const rootClassName$
|
|
6341
|
+
const rootClassName$W = 'dot-chip';
|
|
6314
6342
|
const StyledChip = styled(Chip)`
|
|
6315
6343
|
${({
|
|
6316
6344
|
theme
|
|
6317
6345
|
}) => css`
|
|
6318
|
-
&.${rootClassName$
|
|
6346
|
+
&.${rootClassName$W} {
|
|
6319
6347
|
background: ${theme.palette.figma.neutral.normal};
|
|
6320
6348
|
border-color: ${theme.palette.figma.border.darker};
|
|
6321
6349
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -6421,7 +6449,7 @@ const DotChip = ({
|
|
|
6421
6449
|
charactersLimit = DEFAULT_CHARACTERS_LIMIT,
|
|
6422
6450
|
children,
|
|
6423
6451
|
className,
|
|
6424
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
6452
|
+
'data-pendoid': dataPendoId = rootClassName$W,
|
|
6425
6453
|
'data-testid': dataTestId,
|
|
6426
6454
|
disabled = false,
|
|
6427
6455
|
error = false,
|
|
@@ -6434,7 +6462,7 @@ const DotChip = ({
|
|
|
6434
6462
|
tabIndex
|
|
6435
6463
|
}) => {
|
|
6436
6464
|
const errorClass = error ? 'Mui-error' : '';
|
|
6437
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6465
|
+
const rootClasses = useStylesWithRootClass(rootClassName$W, className, errorClass);
|
|
6438
6466
|
const getChipLabel = () => {
|
|
6439
6467
|
if (charactersLimit <= 0 || children.length < charactersLimit) return children;
|
|
6440
6468
|
const label = `${children.substring(0, charactersLimit)}...`;
|
|
@@ -6534,7 +6562,7 @@ const DotAutoComplete = ({
|
|
|
6534
6562
|
autoFocus,
|
|
6535
6563
|
autoHighlight,
|
|
6536
6564
|
className,
|
|
6537
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
6565
|
+
'data-pendoid': dataPendoId = rootClassName$X,
|
|
6538
6566
|
'data-testid': dataTestId,
|
|
6539
6567
|
defaultValue,
|
|
6540
6568
|
dense = true,
|
|
@@ -6587,10 +6615,10 @@ const DotAutoComplete = ({
|
|
|
6587
6615
|
const popperOpen = !readOnly && (open || isOpened);
|
|
6588
6616
|
const preventDuplicateInsertion = actionItem === null || actionItem === void 0 ? void 0 : actionItem.preventDuplicateInsertion;
|
|
6589
6617
|
const textFieldWarningClassName = !error && warning && warningClassName;
|
|
6590
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6591
|
-
const textFieldRootClasses = useStylesWithRootClass(rootClassName$
|
|
6618
|
+
const rootClasses = useStylesWithRootClass(rootClassName$X, size === 'medium' && inputMediumClassName, className);
|
|
6619
|
+
const textFieldRootClasses = useStylesWithRootClass(rootClassName$1i, readOnly && readOnlyClassName$1, textFieldWarningClassName);
|
|
6592
6620
|
const inputRootClasses = useStylesWithRootClass(inputRootClassName, !dense && inputMediumClassName);
|
|
6593
|
-
const popperClasses = useStylesWithRootClass(rootClassName$
|
|
6621
|
+
const popperClasses = useStylesWithRootClass(rootClassName$1a, popperClassName);
|
|
6594
6622
|
let highlightedOption = null;
|
|
6595
6623
|
let textFieldInput;
|
|
6596
6624
|
const textFieldRef = element => {
|
|
@@ -6869,10 +6897,10 @@ const DotAutoComplete = ({
|
|
|
6869
6897
|
});
|
|
6870
6898
|
};
|
|
6871
6899
|
|
|
6872
|
-
const rootClassName$
|
|
6900
|
+
const rootClassName$V = 'dot-avatar-group';
|
|
6873
6901
|
const StyledAvatarGroup = styled(AvatarGroup)`
|
|
6874
6902
|
${() => css`
|
|
6875
|
-
&.${rootClassName$
|
|
6903
|
+
&.${rootClassName$V} {
|
|
6876
6904
|
justify-content: flex-end;
|
|
6877
6905
|
|
|
6878
6906
|
.MuiAvatar-root {
|
|
@@ -6891,7 +6919,7 @@ const DotAvatarGroup = ({
|
|
|
6891
6919
|
max = 3,
|
|
6892
6920
|
spacing = 'medium'
|
|
6893
6921
|
}) => {
|
|
6894
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
6922
|
+
const rootClasses = useStylesWithRootClass(rootClassName$V, className);
|
|
6895
6923
|
return jsx(StyledAvatarGroup, {
|
|
6896
6924
|
"aria-label": ariaLabel,
|
|
6897
6925
|
classes: {
|
|
@@ -6906,13 +6934,13 @@ const DotAvatarGroup = ({
|
|
|
6906
6934
|
});
|
|
6907
6935
|
};
|
|
6908
6936
|
|
|
6909
|
-
const rootClassName$
|
|
6937
|
+
const rootClassName$U = 'dot-breadcrumbs';
|
|
6910
6938
|
const breadcrumbsWrapperClass = 'dot-breadcrumbs-wrapper';
|
|
6911
6939
|
const StyledBreadcrumbsWrapper = styled.div`
|
|
6912
6940
|
${({
|
|
6913
6941
|
theme
|
|
6914
6942
|
}) => css`
|
|
6915
|
-
&.${rootClassName$
|
|
6943
|
+
&.${rootClassName$U} {
|
|
6916
6944
|
overflow: hidden;
|
|
6917
6945
|
|
|
6918
6946
|
.dot-breadcrumbs-menu {
|
|
@@ -6932,7 +6960,7 @@ const StyledBreadcrumbs = styled(Breadcrumbs)`
|
|
|
6932
6960
|
${({
|
|
6933
6961
|
theme
|
|
6934
6962
|
}) => css`
|
|
6935
|
-
&.${rootClassName$
|
|
6963
|
+
&.${rootClassName$U} {
|
|
6936
6964
|
margin-bottom: 0;
|
|
6937
6965
|
|
|
6938
6966
|
.MuiBreadcrumbs-ol {
|
|
@@ -7260,7 +7288,7 @@ const DotBreadcrumbs = ({
|
|
|
7260
7288
|
children: [jsx(StyledBreadcrumbs, {
|
|
7261
7289
|
"aria-label": "breadcrumb",
|
|
7262
7290
|
classes: {
|
|
7263
|
-
root: rootClassName$
|
|
7291
|
+
root: rootClassName$U,
|
|
7264
7292
|
ol: 'dot-ol',
|
|
7265
7293
|
li: 'dot-li'
|
|
7266
7294
|
},
|
|
@@ -7291,14 +7319,14 @@ const DotBreadcrumbs = ({
|
|
|
7291
7319
|
});
|
|
7292
7320
|
};
|
|
7293
7321
|
|
|
7294
|
-
const rootClassName$
|
|
7322
|
+
const rootClassName$T = 'dot-button-toggle';
|
|
7295
7323
|
// TODO: need to update ripple color
|
|
7296
7324
|
// https://github.com/mui/material-ui/issues/28543
|
|
7297
7325
|
const StyledToggleButtonGroup = styled(ToggleButtonGroup)`
|
|
7298
7326
|
${({
|
|
7299
7327
|
theme
|
|
7300
7328
|
}) => css`
|
|
7301
|
-
&.${rootClassName$
|
|
7329
|
+
&.${rootClassName$T} {
|
|
7302
7330
|
button:not(.MuiToggleButton-sizeLarge):not(.MuiToggleButton-sizeSmall) {
|
|
7303
7331
|
/* Override height for medium size */
|
|
7304
7332
|
height: ${theme.spacing(5)};
|
|
@@ -7414,7 +7442,7 @@ const DotButtonToggle = ({
|
|
|
7414
7442
|
buttonOptions,
|
|
7415
7443
|
className,
|
|
7416
7444
|
color,
|
|
7417
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
7445
|
+
'data-pendoid': dataPendoId = rootClassName$T,
|
|
7418
7446
|
'data-testid': dataTestId = 'dot-toggle',
|
|
7419
7447
|
disableFocusRipple = false,
|
|
7420
7448
|
disableRipple = false,
|
|
@@ -7424,7 +7452,7 @@ const DotButtonToggle = ({
|
|
|
7424
7452
|
size = 'medium',
|
|
7425
7453
|
value
|
|
7426
7454
|
}) => {
|
|
7427
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7455
|
+
const rootClasses = useStylesWithRootClass(rootClassName$T, className);
|
|
7428
7456
|
const renderToggleButton = ({
|
|
7429
7457
|
ariaLabel: optionAriaLabel,
|
|
7430
7458
|
badgeContent: optionBadgeContent,
|
|
@@ -7507,12 +7535,12 @@ const TooltipToggleButton = forwardRef((_a, ref) => {
|
|
|
7507
7535
|
}));
|
|
7508
7536
|
});
|
|
7509
7537
|
|
|
7510
|
-
const rootClassName$
|
|
7538
|
+
const rootClassName$S = 'dot-card';
|
|
7511
7539
|
const StyledCard = styled(Card)`
|
|
7512
7540
|
${({
|
|
7513
7541
|
theme
|
|
7514
7542
|
}) => css`
|
|
7515
|
-
&.${rootClassName$
|
|
7543
|
+
&.${rootClassName$S} {
|
|
7516
7544
|
background-color: ${theme.palette.figma.background.level1.white};
|
|
7517
7545
|
}
|
|
7518
7546
|
`}
|
|
@@ -7524,7 +7552,7 @@ const DotCard = ({
|
|
|
7524
7552
|
className,
|
|
7525
7553
|
'data-testid': dataTestId
|
|
7526
7554
|
}) => {
|
|
7527
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7555
|
+
const rootClasses = useStylesWithRootClass(rootClassName$S, className);
|
|
7528
7556
|
return jsx(StyledCard, {
|
|
7529
7557
|
"aria-label": ariaLabel,
|
|
7530
7558
|
classes: {
|
|
@@ -7553,12 +7581,12 @@ const DotCardContent = ({
|
|
|
7553
7581
|
});
|
|
7554
7582
|
};
|
|
7555
7583
|
|
|
7556
|
-
const rootClassName$
|
|
7584
|
+
const rootClassName$R = 'dot-card-footer';
|
|
7557
7585
|
const StyledDiv = styled.div`
|
|
7558
7586
|
${({
|
|
7559
7587
|
theme
|
|
7560
7588
|
}) => css`
|
|
7561
|
-
&.${rootClassName$
|
|
7589
|
+
&.${rootClassName$R} {
|
|
7562
7590
|
padding: ${theme.spacing(2)};
|
|
7563
7591
|
}
|
|
7564
7592
|
`}
|
|
@@ -7570,7 +7598,7 @@ const DotCardFooter = ({
|
|
|
7570
7598
|
className,
|
|
7571
7599
|
'data-testid': dataTestId
|
|
7572
7600
|
}) => {
|
|
7573
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7601
|
+
const rootClasses = useStylesWithRootClass(rootClassName$R, className);
|
|
7574
7602
|
return jsx(StyledDiv, {
|
|
7575
7603
|
"aria-label": ariaLabel,
|
|
7576
7604
|
className: rootClasses,
|
|
@@ -7579,12 +7607,12 @@ const DotCardFooter = ({
|
|
|
7579
7607
|
});
|
|
7580
7608
|
};
|
|
7581
7609
|
|
|
7582
|
-
const rootClassName$
|
|
7610
|
+
const rootClassName$Q = 'dot-card-header';
|
|
7583
7611
|
const StyledCardHeader = styled(CardHeader)`
|
|
7584
7612
|
${({
|
|
7585
7613
|
theme
|
|
7586
7614
|
}) => css`
|
|
7587
|
-
&.${rootClassName$
|
|
7615
|
+
&.${rootClassName$Q} {
|
|
7588
7616
|
.MuiCardHeader-content {
|
|
7589
7617
|
overflow-x: hidden;
|
|
7590
7618
|
|
|
@@ -7607,7 +7635,7 @@ const DotCardHeader = ({
|
|
|
7607
7635
|
title,
|
|
7608
7636
|
titleSize = 'large'
|
|
7609
7637
|
}) => {
|
|
7610
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7638
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Q, className);
|
|
7611
7639
|
const nonSmallTitleSize = titleSize === 'medium' ? 'h3' : 'h2';
|
|
7612
7640
|
const titleVariant = titleSize === 'small' ? 'h4' : nonSmallTitleSize;
|
|
7613
7641
|
const subheaderVariant = subheaderSize === 'small' ? 'body2' : 'body1';
|
|
@@ -7642,9 +7670,9 @@ const DotCardHeader = ({
|
|
|
7642
7670
|
});
|
|
7643
7671
|
};
|
|
7644
7672
|
|
|
7645
|
-
const rootClassName$
|
|
7673
|
+
const rootClassName$P = 'dot-form-control-label';
|
|
7646
7674
|
const StyledFormControlLabel = styled(FormControlLabel)`
|
|
7647
|
-
&.${rootClassName$
|
|
7675
|
+
&.${rootClassName$P} {
|
|
7648
7676
|
.MuiFormControlLabel-label {
|
|
7649
7677
|
margin-bottom: 0;
|
|
7650
7678
|
padding: 0 0 0 4px;
|
|
@@ -7667,12 +7695,12 @@ const StyledFormControlLabel = styled(FormControlLabel)`
|
|
|
7667
7695
|
}
|
|
7668
7696
|
`;
|
|
7669
7697
|
|
|
7670
|
-
const rootClassName$
|
|
7698
|
+
const rootClassName$O = 'dot-checkbox';
|
|
7671
7699
|
const StyledCheckbox = styled(Checkbox)`
|
|
7672
7700
|
${({
|
|
7673
7701
|
theme
|
|
7674
7702
|
}) => css`
|
|
7675
|
-
&.${rootClassName$
|
|
7703
|
+
&.${rootClassName$O} {
|
|
7676
7704
|
padding: ${theme.spacing(1)};
|
|
7677
7705
|
|
|
7678
7706
|
&.MuiCheckbox-indeterminate {
|
|
@@ -7691,7 +7719,7 @@ function DotCheckbox({
|
|
|
7691
7719
|
ariaLabelledby,
|
|
7692
7720
|
checked,
|
|
7693
7721
|
className,
|
|
7694
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
7722
|
+
'data-pendoid': dataPendoId = rootClassName$P,
|
|
7695
7723
|
'data-testid': dataTestId,
|
|
7696
7724
|
disabled,
|
|
7697
7725
|
disableRipple,
|
|
@@ -7706,14 +7734,14 @@ function DotCheckbox({
|
|
|
7706
7734
|
size = 'medium',
|
|
7707
7735
|
value
|
|
7708
7736
|
}) {
|
|
7709
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7737
|
+
const rootClasses = useStylesWithRootClass(rootClassName$P, className);
|
|
7710
7738
|
const handleChange = event => {
|
|
7711
7739
|
onChange && onChange(event, event.target.value);
|
|
7712
7740
|
};
|
|
7713
7741
|
const checkboxControl = jsx(StyledCheckbox, {
|
|
7714
7742
|
checked: checked,
|
|
7715
7743
|
classes: {
|
|
7716
|
-
root: rootClassName$
|
|
7744
|
+
root: rootClassName$O
|
|
7717
7745
|
},
|
|
7718
7746
|
color: "primary",
|
|
7719
7747
|
"data-pendoid": dataPendoId,
|
|
@@ -7742,13 +7770,13 @@ function DotCheckbox({
|
|
|
7742
7770
|
});
|
|
7743
7771
|
}
|
|
7744
7772
|
|
|
7745
|
-
const rootClassName$
|
|
7773
|
+
const rootClassName$N = 'dot-form-group';
|
|
7746
7774
|
const groupLabelClassName = 'dot-form-group-label';
|
|
7747
7775
|
const startAdornmentClassName = 'dot-start-adornment';
|
|
7748
7776
|
const endAdornmentClassName = 'dot-end-adornment';
|
|
7749
7777
|
const placementClassName = 'dot-';
|
|
7750
7778
|
const StyledFormControl = styled(FormControl)`
|
|
7751
|
-
&.${rootClassName$
|
|
7779
|
+
&.${rootClassName$N} {
|
|
7752
7780
|
.MuiFormLabel-root {
|
|
7753
7781
|
width: 100%;
|
|
7754
7782
|
line-height: 24px;
|
|
@@ -7779,7 +7807,7 @@ const StyledFormControl = styled(FormControl)`
|
|
|
7779
7807
|
}
|
|
7780
7808
|
`;
|
|
7781
7809
|
|
|
7782
|
-
const rootClassName$
|
|
7810
|
+
const rootClassName$M = 'dot-checkbox-group';
|
|
7783
7811
|
const wrapperClassName$1 = 'dot-checkbox-group-wrapper';
|
|
7784
7812
|
const checkboxListClassName = 'dot-checkbox-list';
|
|
7785
7813
|
const checkboxListItemClassName = 'dot-checkbox-list-item';
|
|
@@ -7788,7 +7816,7 @@ const StyledCheckboxGroup = styled.div`
|
|
|
7788
7816
|
theme
|
|
7789
7817
|
}) => css`{
|
|
7790
7818
|
&.${wrapperClassName$1} {
|
|
7791
|
-
.${rootClassName$
|
|
7819
|
+
.${rootClassName$M} {
|
|
7792
7820
|
width: 100%;
|
|
7793
7821
|
}
|
|
7794
7822
|
|
|
@@ -7815,7 +7843,7 @@ const StyledCheckboxGroup = styled.div`
|
|
|
7815
7843
|
margin-top: 0;
|
|
7816
7844
|
padding-left: ${theme.spacing(2.5)};
|
|
7817
7845
|
|
|
7818
|
-
.${rootClassName$
|
|
7846
|
+
.${rootClassName$P} {
|
|
7819
7847
|
margin: 0;
|
|
7820
7848
|
}
|
|
7821
7849
|
}
|
|
@@ -7823,13 +7851,13 @@ const StyledCheckboxGroup = styled.div`
|
|
|
7823
7851
|
`}
|
|
7824
7852
|
`;
|
|
7825
7853
|
|
|
7826
|
-
const rootClassName$
|
|
7854
|
+
const rootClassName$L = 'dot-form-group';
|
|
7827
7855
|
const StyledFormGroup = styled(FormGroup)`
|
|
7828
7856
|
${({
|
|
7829
7857
|
theme,
|
|
7830
7858
|
row
|
|
7831
7859
|
}) => css`
|
|
7832
|
-
&.${rootClassName$
|
|
7860
|
+
&.${rootClassName$L} > * {
|
|
7833
7861
|
margin: ${row ? `${theme.spacing(0.5)}` : 0};
|
|
7834
7862
|
}
|
|
7835
7863
|
`}
|
|
@@ -7842,7 +7870,7 @@ function DotFormGroup({
|
|
|
7842
7870
|
'data-testid': dataTestId,
|
|
7843
7871
|
row
|
|
7844
7872
|
}) {
|
|
7845
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7873
|
+
const rootClasses = useStylesWithRootClass(rootClassName$N, className);
|
|
7846
7874
|
return jsx(StyledFormGroup, {
|
|
7847
7875
|
"aria-label": ariaLabel,
|
|
7848
7876
|
classes: {
|
|
@@ -7881,7 +7909,7 @@ function DotCheckboxGroup({
|
|
|
7881
7909
|
size = 'medium'
|
|
7882
7910
|
}) {
|
|
7883
7911
|
const placement = `${placementClassName}${labelPlacement}`;
|
|
7884
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
7912
|
+
const rootClasses = useStylesWithRootClass(rootClassName$N, rootClassName$M, className, placement);
|
|
7885
7913
|
const [selectedOptions, setSelectedOptions] = useState(defaultValues);
|
|
7886
7914
|
const [allChecked, setAllChecked] = useState(false);
|
|
7887
7915
|
/* This will ensure that state can be updated from the outside */
|
|
@@ -7966,12 +7994,12 @@ function DotCheckboxGroup({
|
|
|
7966
7994
|
});
|
|
7967
7995
|
}
|
|
7968
7996
|
|
|
7969
|
-
const rootClassName$
|
|
7997
|
+
const rootClassName$K = 'chip-list';
|
|
7970
7998
|
const StyledChipList = styled.div`
|
|
7971
7999
|
${({
|
|
7972
8000
|
theme
|
|
7973
8001
|
}) => css`
|
|
7974
|
-
&.${rootClassName$
|
|
8002
|
+
&.${rootClassName$K} {
|
|
7975
8003
|
display: flex;
|
|
7976
8004
|
gap: ${theme.spacing(1)};
|
|
7977
8005
|
}
|
|
@@ -8046,19 +8074,19 @@ function DotChipList({
|
|
|
8046
8074
|
setChips(itemElements);
|
|
8047
8075
|
}, [items, maxChars]);
|
|
8048
8076
|
return jsx(StyledChipList, {
|
|
8049
|
-
className: rootClassName$
|
|
8077
|
+
className: rootClassName$K,
|
|
8050
8078
|
"data-testid": dataTestId,
|
|
8051
8079
|
style: style,
|
|
8052
8080
|
children: chips
|
|
8053
8081
|
});
|
|
8054
8082
|
}
|
|
8055
8083
|
|
|
8056
|
-
const rootClassName$
|
|
8084
|
+
const rootClassName$J = 'dot-dialog';
|
|
8057
8085
|
const StyledDialog = styled(Dialog)`
|
|
8058
8086
|
${({
|
|
8059
8087
|
theme
|
|
8060
8088
|
}) => css`
|
|
8061
|
-
&.${rootClassName$
|
|
8089
|
+
&.${rootClassName$J} {
|
|
8062
8090
|
.MuiDialog-paper {
|
|
8063
8091
|
background: ${theme.palette.figma.background.level1.white};
|
|
8064
8092
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -8104,7 +8132,7 @@ const DotDialog = ({
|
|
|
8104
8132
|
cancelButtonProps,
|
|
8105
8133
|
cancelButtonVisible = true,
|
|
8106
8134
|
className,
|
|
8107
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
8135
|
+
'data-pendoid': dataPendoId = rootClassName$J,
|
|
8108
8136
|
'data-testid': dataTestId,
|
|
8109
8137
|
children,
|
|
8110
8138
|
closeIconVisible,
|
|
@@ -8117,7 +8145,7 @@ const DotDialog = ({
|
|
|
8117
8145
|
submitButtonProps,
|
|
8118
8146
|
title
|
|
8119
8147
|
}) => {
|
|
8120
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8148
|
+
const rootClasses = useStylesWithRootClass(rootClassName$J, className);
|
|
8121
8149
|
const cancelClasses = useStylesWithRootClass(cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.className, 'cancel-button');
|
|
8122
8150
|
const [isOpen, setIsOpen] = useState(open);
|
|
8123
8151
|
useEffect(() => {
|
|
@@ -8235,7 +8263,7 @@ const DotConfirmationDialog = ({
|
|
|
8235
8263
|
});
|
|
8236
8264
|
};
|
|
8237
8265
|
|
|
8238
|
-
const rootClassName$
|
|
8266
|
+
const rootClassName$I = 'dot-grid';
|
|
8239
8267
|
const frGetter = value => typeof value === 'number' ? `repeat(${value}, 1fr)` : value;
|
|
8240
8268
|
const breakpointsGetter$1 = (theme, columnsBreakpoints, columnGap, rowGap) => `${theme.breakpoints.up('xs')} {
|
|
8241
8269
|
column-gap: ${`${columnGap.xs}px`};
|
|
@@ -8287,7 +8315,7 @@ const Grid = ({
|
|
|
8287
8315
|
className,
|
|
8288
8316
|
children
|
|
8289
8317
|
}) => {
|
|
8290
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8318
|
+
const rootClasses = useStylesWithRootClass(rootClassName$I, className);
|
|
8291
8319
|
return jsx("div", {
|
|
8292
8320
|
className: rootClasses,
|
|
8293
8321
|
children: children
|
|
@@ -8306,7 +8334,7 @@ const StyledGrid = styled(Grid)`
|
|
|
8306
8334
|
theme,
|
|
8307
8335
|
width
|
|
8308
8336
|
}) => css`
|
|
8309
|
-
&.${rootClassName$
|
|
8337
|
+
&.${rootClassName$I} {
|
|
8310
8338
|
display: grid;
|
|
8311
8339
|
grid-template-rows: ${frGetter(rows)};
|
|
8312
8340
|
${columns ? `${columns && `grid-template-columns: ${frGetter(columns)}`};` : breakpointsGetter$1(theme, columnsBreakpoints, columnGap, rowGap)}
|
|
@@ -8512,12 +8540,12 @@ const CssGridDebug = ({
|
|
|
8512
8540
|
});
|
|
8513
8541
|
};
|
|
8514
8542
|
|
|
8515
|
-
const rootClassName$
|
|
8543
|
+
const rootClassName$H = 'dot-pill';
|
|
8516
8544
|
const StyledPill = styled(Chip)`
|
|
8517
8545
|
${({
|
|
8518
8546
|
theme
|
|
8519
8547
|
}) => css`
|
|
8520
|
-
&.${rootClassName$
|
|
8548
|
+
&.${rootClassName$H} {
|
|
8521
8549
|
background-color: ${({
|
|
8522
8550
|
backgroundcolor,
|
|
8523
8551
|
variant
|
|
@@ -8641,7 +8669,7 @@ const DotPill = ({
|
|
|
8641
8669
|
status = 'default',
|
|
8642
8670
|
variant = 'filled'
|
|
8643
8671
|
}) => {
|
|
8644
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
8672
|
+
const rootClasses = useStylesWithRootClass(rootClassName$H, className, status);
|
|
8645
8673
|
return jsx(StyledPill, {
|
|
8646
8674
|
"aria-label": ariaLabel,
|
|
8647
8675
|
bordercolor: bordercolor,
|
|
@@ -9683,6 +9711,17 @@ const DotMetadataApiProvider = ({
|
|
|
9683
9711
|
}
|
|
9684
9712
|
});
|
|
9685
9713
|
},
|
|
9714
|
+
deleteDashboard: dashboardId => {
|
|
9715
|
+
setAccountIdHeader(accountId);
|
|
9716
|
+
return cancelablePromise(DashboardsService.deleteDashboardsService(dashboardId)).then(() => {
|
|
9717
|
+
setDashboardsError(null);
|
|
9718
|
+
setDashboards(dashboards.filter(dashboard => dashboard.id !== dashboardId));
|
|
9719
|
+
return true;
|
|
9720
|
+
}).catch(error => {
|
|
9721
|
+
setDashboardsError(error);
|
|
9722
|
+
return false;
|
|
9723
|
+
});
|
|
9724
|
+
},
|
|
9686
9725
|
duplicateDashboard: (dashboardId, dashboard) => {
|
|
9687
9726
|
setAccountIdHeader(accountId);
|
|
9688
9727
|
return cancelablePromise(DashboardsService.postDashboardsService1(dashboardId, dashboard)).then(response => {
|
|
@@ -9835,18 +9874,18 @@ function addAutoHideDuration(severity) {
|
|
|
9835
9874
|
return severity === 'error' ? null : 10000;
|
|
9836
9875
|
}
|
|
9837
9876
|
|
|
9838
|
-
const rootClassName$
|
|
9877
|
+
const rootClassName$G = 'dot-snackbar';
|
|
9839
9878
|
const StyledSnackbar = styled(Snackbar)`
|
|
9840
9879
|
${({
|
|
9841
9880
|
theme,
|
|
9842
9881
|
width,
|
|
9843
9882
|
$anchorOriginTop
|
|
9844
9883
|
}) => css`
|
|
9845
|
-
&.${rootClassName$
|
|
9884
|
+
&.${rootClassName$G} {
|
|
9846
9885
|
.MuiAlert-message {
|
|
9847
9886
|
word-break: break-word;
|
|
9848
9887
|
}
|
|
9849
|
-
.${rootClassName$
|
|
9888
|
+
.${rootClassName$1g} {
|
|
9850
9889
|
align-items: flex-start;
|
|
9851
9890
|
}
|
|
9852
9891
|
&.MuiSnackbar-anchorOriginTopLeft,
|
|
@@ -9884,6 +9923,7 @@ const DotSnackbar = ({
|
|
|
9884
9923
|
anchorOrigin = DEFAULT_ANCHOR_ORIGIN,
|
|
9885
9924
|
anchorOriginTop = 108,
|
|
9886
9925
|
ariaLabel,
|
|
9926
|
+
autoCloseOnAction = false,
|
|
9887
9927
|
autoHideDuration,
|
|
9888
9928
|
children,
|
|
9889
9929
|
className,
|
|
@@ -9898,12 +9938,23 @@ const DotSnackbar = ({
|
|
|
9898
9938
|
}) => {
|
|
9899
9939
|
const hasActions = !!(primaryAction || secondaryAction);
|
|
9900
9940
|
const calculatedAutoHideDuration = autoHideDuration === null || autoHideDuration > 0 ? autoHideDuration : addAutoHideDuration(severity);
|
|
9901
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
9941
|
+
const rootClasses = useStylesWithRootClass(rootClassName$G, className);
|
|
9902
9942
|
const handleSnackbarClose = reason => {
|
|
9903
9943
|
if (!reason || hideOnClickAway || !hideOnClickAway && reason !== 'clickaway') {
|
|
9904
9944
|
onClose();
|
|
9905
9945
|
}
|
|
9906
9946
|
};
|
|
9947
|
+
const handlePrimaryActionClick = () => {
|
|
9948
|
+
primaryAction === null || primaryAction === void 0 ? void 0 : primaryAction.onClick();
|
|
9949
|
+
if (autoCloseOnAction) {
|
|
9950
|
+
onClose();
|
|
9951
|
+
}
|
|
9952
|
+
};
|
|
9953
|
+
const handleSecondaryActionClick = () => {
|
|
9954
|
+
if (autoCloseOnAction) {
|
|
9955
|
+
onClose();
|
|
9956
|
+
}
|
|
9957
|
+
};
|
|
9907
9958
|
return jsx(StyledSnackbar, {
|
|
9908
9959
|
anchorOrigin: anchorOrigin,
|
|
9909
9960
|
"$anchorOriginTop": anchorOriginTop,
|
|
@@ -9939,14 +9990,15 @@ const DotSnackbar = ({
|
|
|
9939
9990
|
children: [primaryAction && jsx(DotButton, {
|
|
9940
9991
|
className: "primary-action-btn",
|
|
9941
9992
|
"data-testid": "primary-action-btn",
|
|
9942
|
-
onClick:
|
|
9993
|
+
onClick: handlePrimaryActionClick,
|
|
9943
9994
|
size: "small",
|
|
9944
9995
|
type: "outlined",
|
|
9945
9996
|
children: primaryAction.label
|
|
9946
9997
|
}), secondaryAction && jsx(DotLink, {
|
|
9998
|
+
color: "inherit",
|
|
9947
9999
|
"data-testid": "secondary-action-link",
|
|
9948
10000
|
href: secondaryAction.href,
|
|
9949
|
-
|
|
10001
|
+
onClick: handleSecondaryActionClick,
|
|
9950
10002
|
children: secondaryAction.label
|
|
9951
10003
|
})]
|
|
9952
10004
|
})]
|
|
@@ -9956,10 +10008,10 @@ const DotSnackbar = ({
|
|
|
9956
10008
|
});
|
|
9957
10009
|
};
|
|
9958
10010
|
|
|
9959
|
-
const rootClassName$
|
|
10011
|
+
const rootClassName$F = 'dot-snackbar-container';
|
|
9960
10012
|
const StyledSnackbarContainer = styled.div`
|
|
9961
10013
|
${() => css`
|
|
9962
|
-
&.${rootClassName$
|
|
10014
|
+
&.${rootClassName$F} {
|
|
9963
10015
|
position: absolute;
|
|
9964
10016
|
top: 0;
|
|
9965
10017
|
width: 250px;
|
|
@@ -9978,6 +10030,7 @@ const DotSnackbarContext = createContext({
|
|
|
9978
10030
|
removeMessage: _id => null
|
|
9979
10031
|
});
|
|
9980
10032
|
const DotSnackbarContainer = ({
|
|
10033
|
+
autoCloseOnAction,
|
|
9981
10034
|
hideOnClickAway
|
|
9982
10035
|
}) => {
|
|
9983
10036
|
const {
|
|
@@ -9990,12 +10043,13 @@ const DotSnackbarContainer = ({
|
|
|
9990
10043
|
};
|
|
9991
10044
|
}
|
|
9992
10045
|
return jsx(StyledSnackbarContainer, {
|
|
9993
|
-
className: rootClassName$
|
|
10046
|
+
className: rootClassName$F,
|
|
9994
10047
|
children: jsx("div", {
|
|
9995
|
-
className: rootClassName$
|
|
9996
|
-
"data-testid": rootClassName$
|
|
10048
|
+
className: rootClassName$F,
|
|
10049
|
+
"data-testid": rootClassName$F,
|
|
9997
10050
|
children: alerts.slice().reverse().map(alert => {
|
|
9998
10051
|
return jsx(DotSnackbar, {
|
|
10052
|
+
autoCloseOnAction: autoCloseOnAction,
|
|
9999
10053
|
autoHideDuration: alert.autoHideDuration,
|
|
10000
10054
|
hideOnClickAway: hideOnClickAway,
|
|
10001
10055
|
onClose: handleClose(alert.id),
|
|
@@ -10010,6 +10064,7 @@ const DotSnackbarContainer = ({
|
|
|
10010
10064
|
});
|
|
10011
10065
|
};
|
|
10012
10066
|
const DotSnackbarProvider = ({
|
|
10067
|
+
autoCloseOnAction = false,
|
|
10013
10068
|
children,
|
|
10014
10069
|
hideOnClickAway = true
|
|
10015
10070
|
}) => {
|
|
@@ -10048,6 +10103,7 @@ const DotSnackbarProvider = ({
|
|
|
10048
10103
|
return jsxs(DotSnackbarContext.Provider, {
|
|
10049
10104
|
value: memoizedValues,
|
|
10050
10105
|
children: [jsx(DotSnackbarContainer, {
|
|
10106
|
+
autoCloseOnAction: autoCloseOnAction,
|
|
10051
10107
|
hideOnClickAway: hideOnClickAway
|
|
10052
10108
|
}), children]
|
|
10053
10109
|
});
|
|
@@ -10064,12 +10120,12 @@ const useEnqueueErrorMessage = error => {
|
|
|
10064
10120
|
}, [error]);
|
|
10065
10121
|
};
|
|
10066
10122
|
|
|
10067
|
-
const rootClassName$
|
|
10123
|
+
const rootClassName$E = 'dot-dashboard-details';
|
|
10068
10124
|
const StyledDashboardDetails = styled(DotDrawer)`
|
|
10069
10125
|
${({
|
|
10070
10126
|
theme
|
|
10071
10127
|
}) => css`
|
|
10072
|
-
&.${rootClassName$
|
|
10128
|
+
&.${rootClassName$E} {
|
|
10073
10129
|
.dot-drawer-paper {
|
|
10074
10130
|
padding: 0;
|
|
10075
10131
|
width: 382px;
|
|
@@ -10192,7 +10248,7 @@ const DotDashboardDetailsView = ({
|
|
|
10192
10248
|
zIndex = 990
|
|
10193
10249
|
}) => {
|
|
10194
10250
|
var _a, _b;
|
|
10195
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
10251
|
+
const rootClasses = useStylesWithRootClass(rootClassName$E, className);
|
|
10196
10252
|
const closeHandler = useCallback(event => {
|
|
10197
10253
|
onClose && onClose(event);
|
|
10198
10254
|
}, [onClose]);
|
|
@@ -10804,6 +10860,151 @@ function DotDashboardDialog({
|
|
|
10804
10860
|
});
|
|
10805
10861
|
}
|
|
10806
10862
|
|
|
10863
|
+
const rootClassName$D = 'dot-impact-dialog';
|
|
10864
|
+
const StyledImpactDialog = styled(DotDialog)`
|
|
10865
|
+
${({
|
|
10866
|
+
theme
|
|
10867
|
+
}) => css`
|
|
10868
|
+
&.${rootClassName$D} {
|
|
10869
|
+
.high-impact-default-content {
|
|
10870
|
+
margin-top: ${theme.spacing(2)};
|
|
10871
|
+
margin-bottom: ${theme.spacing(3)};
|
|
10872
|
+
}
|
|
10873
|
+
.item-name {
|
|
10874
|
+
font-weight: bold;
|
|
10875
|
+
white-space: pre;
|
|
10876
|
+
}
|
|
10877
|
+
}
|
|
10878
|
+
`}
|
|
10879
|
+
`;
|
|
10880
|
+
|
|
10881
|
+
function capitalize(word) {
|
|
10882
|
+
return word[0].toUpperCase() + word.slice(1);
|
|
10883
|
+
}
|
|
10884
|
+
function HighImpact({
|
|
10885
|
+
message,
|
|
10886
|
+
record,
|
|
10887
|
+
action,
|
|
10888
|
+
objectType,
|
|
10889
|
+
inputValue,
|
|
10890
|
+
handleUpdate
|
|
10891
|
+
}) {
|
|
10892
|
+
const defaultMessage = useMemo(() => jsxs(DotTypography, {
|
|
10893
|
+
className: "high-impact-default-content",
|
|
10894
|
+
variant: "body1",
|
|
10895
|
+
children: ["This action cannot be undone. This will permanently", ' ', action.toUpperCase(), objectType && ' the ', jsx("span", {
|
|
10896
|
+
className: "item-name",
|
|
10897
|
+
children: record
|
|
10898
|
+
}), objectType && ` ${objectType}`, ". Some data may be lost."]
|
|
10899
|
+
}), [action, objectType, record]);
|
|
10900
|
+
return jsxs(Fragment, {
|
|
10901
|
+
children: [message ? message : defaultMessage, jsxs(DotTypography, {
|
|
10902
|
+
variant: "body1",
|
|
10903
|
+
children: ["Please type ", jsx("span", {
|
|
10904
|
+
className: "item-name",
|
|
10905
|
+
children: record
|
|
10906
|
+
}), " to confirm."]
|
|
10907
|
+
}), jsx(DotInputText, {
|
|
10908
|
+
autoFocus: true,
|
|
10909
|
+
onChange: handleUpdate,
|
|
10910
|
+
value: inputValue,
|
|
10911
|
+
type: "text",
|
|
10912
|
+
name: "record-name",
|
|
10913
|
+
id: "record-name"
|
|
10914
|
+
})]
|
|
10915
|
+
});
|
|
10916
|
+
}
|
|
10917
|
+
function MediumImpact({
|
|
10918
|
+
message,
|
|
10919
|
+
record,
|
|
10920
|
+
action
|
|
10921
|
+
}) {
|
|
10922
|
+
const defaultMessage = useMemo(() => jsxs(DotTypography, {
|
|
10923
|
+
children: ["You are about to ", action.toUpperCase(), jsxs("strong", {
|
|
10924
|
+
children: [" ", record]
|
|
10925
|
+
}), ". This action cannot be undone."]
|
|
10926
|
+
}), [action, record]);
|
|
10927
|
+
if (message) {
|
|
10928
|
+
return jsx(DotTypography, {
|
|
10929
|
+
children: message
|
|
10930
|
+
});
|
|
10931
|
+
}
|
|
10932
|
+
return defaultMessage;
|
|
10933
|
+
}
|
|
10934
|
+
const DotImpactDialog = ({
|
|
10935
|
+
'data-testid': dataTestId,
|
|
10936
|
+
className,
|
|
10937
|
+
record = '',
|
|
10938
|
+
action = 'delete',
|
|
10939
|
+
actionIcon = 'delete',
|
|
10940
|
+
objectType,
|
|
10941
|
+
impact = 'medium',
|
|
10942
|
+
message = null,
|
|
10943
|
+
open,
|
|
10944
|
+
onSubmit,
|
|
10945
|
+
onCancel
|
|
10946
|
+
}) => {
|
|
10947
|
+
const [inputValue, setInputField] = useState('');
|
|
10948
|
+
const [buttonDisabled, setButtonDisabled] = useState(true);
|
|
10949
|
+
const handleUpdate = useCallback(e => {
|
|
10950
|
+
setInputField(e.target.value);
|
|
10951
|
+
}, []);
|
|
10952
|
+
useEffect(() => {
|
|
10953
|
+
if (impact === 'high' && !objectType) {
|
|
10954
|
+
console.warn("The 'objectType' property should be passed to DotImpactDialog when 'impact' property value is 'high'.");
|
|
10955
|
+
}
|
|
10956
|
+
}, [impact, objectType]);
|
|
10957
|
+
useEffect(() => {
|
|
10958
|
+
if (impact === 'medium') return setButtonDisabled(false);
|
|
10959
|
+
if (record && record === inputValue) {
|
|
10960
|
+
return setButtonDisabled(false);
|
|
10961
|
+
} else if (record !== inputValue) {
|
|
10962
|
+
return setButtonDisabled(true);
|
|
10963
|
+
}
|
|
10964
|
+
}, [impact, inputValue, record]);
|
|
10965
|
+
const submitButtonLabel = useMemo(() => {
|
|
10966
|
+
switch (impact) {
|
|
10967
|
+
case 'high':
|
|
10968
|
+
return `I understand the risks, ${capitalize(action)} ${record}.`;
|
|
10969
|
+
case 'medium':
|
|
10970
|
+
return `${capitalize(action)}`;
|
|
10971
|
+
}
|
|
10972
|
+
return '';
|
|
10973
|
+
}, [action, capitalize, impact, record]);
|
|
10974
|
+
const rootClasses = useStylesWithRootClass(rootClassName$D, className);
|
|
10975
|
+
return jsx(StyledImpactDialog, {
|
|
10976
|
+
"data-testid": dataTestId,
|
|
10977
|
+
className: rootClasses,
|
|
10978
|
+
open: open,
|
|
10979
|
+
title: "Are you sure?",
|
|
10980
|
+
ariaLabel: `${impact}-impact-dialog`,
|
|
10981
|
+
closeIconVisible: false,
|
|
10982
|
+
onSubmit: onSubmit,
|
|
10983
|
+
onCancel: onCancel,
|
|
10984
|
+
submitButtonProps: {
|
|
10985
|
+
disabled: buttonDisabled,
|
|
10986
|
+
type: 'destructive',
|
|
10987
|
+
label: submitButtonLabel,
|
|
10988
|
+
'data-testid': `${impact}-impact-button`,
|
|
10989
|
+
startIcon: jsx(DotIcon, {
|
|
10990
|
+
iconId: actionIcon
|
|
10991
|
+
})
|
|
10992
|
+
},
|
|
10993
|
+
children: impact === 'high' ? jsx(HighImpact, {
|
|
10994
|
+
inputValue: inputValue,
|
|
10995
|
+
action: action,
|
|
10996
|
+
handleUpdate: handleUpdate,
|
|
10997
|
+
record: record,
|
|
10998
|
+
objectType: objectType,
|
|
10999
|
+
message: message
|
|
11000
|
+
}) : jsx(MediumImpact, {
|
|
11001
|
+
record: record,
|
|
11002
|
+
action: action,
|
|
11003
|
+
message: message
|
|
11004
|
+
})
|
|
11005
|
+
});
|
|
11006
|
+
};
|
|
11007
|
+
|
|
10807
11008
|
const InlineMessage = styled(DotTypography)`
|
|
10808
11009
|
${({
|
|
10809
11010
|
theme
|
|
@@ -11229,8 +11430,26 @@ const StyledDotMenu = styled(DotMenu)`
|
|
|
11229
11430
|
}) => css`
|
|
11230
11431
|
z-index: 9999;
|
|
11231
11432
|
|
|
11232
|
-
|
|
11233
|
-
|
|
11433
|
+
&.dot-menu {
|
|
11434
|
+
width: 200px;
|
|
11435
|
+
|
|
11436
|
+
.dot-ul .dot-li {
|
|
11437
|
+
padding: 0;
|
|
11438
|
+
|
|
11439
|
+
.dot-link {
|
|
11440
|
+
padding: ${theme.spacing(0.5, 2)};
|
|
11441
|
+
|
|
11442
|
+
.dot-icon {
|
|
11443
|
+
margin-right: ${theme.spacing(2)};
|
|
11444
|
+
}
|
|
11445
|
+
}
|
|
11446
|
+
.dashboard-details-border {
|
|
11447
|
+
border-top: 1px solid #999;
|
|
11448
|
+
width: 100%;
|
|
11449
|
+
margin-bottom: ${theme.spacing(1)};
|
|
11450
|
+
margin-top: ${theme.spacing(1)};
|
|
11451
|
+
}
|
|
11452
|
+
}
|
|
11234
11453
|
}
|
|
11235
11454
|
`}
|
|
11236
11455
|
`;
|
|
@@ -11238,6 +11457,7 @@ const StyledDotMenu = styled(DotMenu)`
|
|
|
11238
11457
|
function DotDashboardOptionsMenu({
|
|
11239
11458
|
dashboard,
|
|
11240
11459
|
isEdit = false,
|
|
11460
|
+
onStartDelete,
|
|
11241
11461
|
onStartDuplicate,
|
|
11242
11462
|
onStartStatusChange,
|
|
11243
11463
|
onViewMode,
|
|
@@ -11315,7 +11535,33 @@ function DotDashboardOptionsMenu({
|
|
|
11315
11535
|
onclick: handleDuplicateClick
|
|
11316
11536
|
});
|
|
11317
11537
|
}
|
|
11538
|
+
if (onStartDelete && !dashboard.is_ootb_dashboard) {
|
|
11539
|
+
const handleDeleteClick = () => {
|
|
11540
|
+
handleMenuClose();
|
|
11541
|
+
onStartDelete(dashboard);
|
|
11542
|
+
};
|
|
11543
|
+
menuItems.push({
|
|
11544
|
+
children: jsxs(DotLink, {
|
|
11545
|
+
ariaLabel: "Delete dashboard",
|
|
11546
|
+
color: "inherit",
|
|
11547
|
+
onClick: handleDeleteClick,
|
|
11548
|
+
underline: "none",
|
|
11549
|
+
children: [jsx(DotIcon, {
|
|
11550
|
+
iconId: "delete"
|
|
11551
|
+
}), " Delete"]
|
|
11552
|
+
}),
|
|
11553
|
+
key: 'delete',
|
|
11554
|
+
onclick: handleDeleteClick
|
|
11555
|
+
});
|
|
11556
|
+
}
|
|
11318
11557
|
if (onDetails) {
|
|
11558
|
+
menuItems.push({
|
|
11559
|
+
children: jsx("div", {
|
|
11560
|
+
className: "dashboard-details-border"
|
|
11561
|
+
}),
|
|
11562
|
+
disabled: true,
|
|
11563
|
+
key: 'dashboard-details-border'
|
|
11564
|
+
});
|
|
11319
11565
|
menuItems.push({
|
|
11320
11566
|
children: jsxs(DotLink, {
|
|
11321
11567
|
ariaLabel: "Dashboard details",
|
|
@@ -11326,6 +11572,7 @@ function DotDashboardOptionsMenu({
|
|
|
11326
11572
|
iconId: "file-lines"
|
|
11327
11573
|
}), " Details"]
|
|
11328
11574
|
}),
|
|
11575
|
+
classes: 'dashboard-details',
|
|
11329
11576
|
key: 'dashboard-details',
|
|
11330
11577
|
onClick: () => onDetails(dashboard)
|
|
11331
11578
|
});
|
|
@@ -11342,6 +11589,7 @@ function DotDashboardOptionsMenu({
|
|
|
11342
11589
|
className: "card-header-action-menu",
|
|
11343
11590
|
disablePortal: true,
|
|
11344
11591
|
id: "card-header-action-menu",
|
|
11592
|
+
menuItemHeight: "auto",
|
|
11345
11593
|
menuItems: menuItems,
|
|
11346
11594
|
open: open,
|
|
11347
11595
|
onLeave: handleMenuClose
|
|
@@ -11434,6 +11682,7 @@ function DotDashboardActions({
|
|
|
11434
11682
|
onClose,
|
|
11435
11683
|
onFavorite,
|
|
11436
11684
|
onStatusChanged,
|
|
11685
|
+
onDeleted,
|
|
11437
11686
|
onDuplicated,
|
|
11438
11687
|
onViewMode
|
|
11439
11688
|
}) {
|
|
@@ -11441,14 +11690,19 @@ function DotDashboardActions({
|
|
|
11441
11690
|
// they are evaluated before any context imports. If they are evaluated
|
|
11442
11691
|
// after they can cause React state issues when rendering.
|
|
11443
11692
|
const [dashboardToCopy, setDashboardToCopy] = useState(null);
|
|
11693
|
+
const [dashboardToDelete, setDashboardToDelete] = useState(null);
|
|
11444
11694
|
const [dashboardToPublish, setDashboardToPublish] = useState(null);
|
|
11445
11695
|
const [dashboardToUnpublish, setDashboardToUnpublish] = useState(null);
|
|
11446
11696
|
const [appCategories, setAppCategories] = useState(null);
|
|
11447
11697
|
const {
|
|
11698
|
+
deleteDashboard,
|
|
11448
11699
|
duplicateDashboard,
|
|
11449
11700
|
getCategories,
|
|
11450
11701
|
setOpenedDashboardDetails
|
|
11451
11702
|
} = useDotMetadataApiContext();
|
|
11703
|
+
const {
|
|
11704
|
+
cancelablePromise
|
|
11705
|
+
} = useCancelablePromise();
|
|
11452
11706
|
useEffect(() => {
|
|
11453
11707
|
var _a;
|
|
11454
11708
|
if (dashboard && ((_a = dashboard.target_apps) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
@@ -11470,6 +11724,16 @@ function DotDashboardActions({
|
|
|
11470
11724
|
setDashboardToUnpublish(null);
|
|
11471
11725
|
setDashboardToPublish(dashboard);
|
|
11472
11726
|
}, [dashboard]);
|
|
11727
|
+
const handleDeleteClose = useCallback(() => {
|
|
11728
|
+
setDashboardToDelete(null);
|
|
11729
|
+
}, []);
|
|
11730
|
+
const handleDeleteSubmit = useCallback(() => __awaiter(this, void 0, void 0, function* () {
|
|
11731
|
+
const dashboardId = dashboardToDelete.id;
|
|
11732
|
+
return cancelablePromise(deleteDashboard(dashboardId)).then(deleted => {
|
|
11733
|
+
setDashboardToDelete(null);
|
|
11734
|
+
onDeleted(dashboardId, deleted);
|
|
11735
|
+
});
|
|
11736
|
+
}), [dashboardToDelete, onDeleted]);
|
|
11473
11737
|
const handleDuplicateClose = useCallback(() => {
|
|
11474
11738
|
setDashboardToCopy(null);
|
|
11475
11739
|
}, []);
|
|
@@ -11482,15 +11746,19 @@ function DotDashboardActions({
|
|
|
11482
11746
|
};
|
|
11483
11747
|
return duplicateDashboard(dashboard.id, copyData).then(result => {
|
|
11484
11748
|
if (result && 'id' in result) {
|
|
11485
|
-
onDuplicated(result, isDone);
|
|
11749
|
+
onDuplicated && onDuplicated(result, isDone);
|
|
11486
11750
|
}
|
|
11487
11751
|
});
|
|
11488
|
-
}, [dashboard]);
|
|
11752
|
+
}, [dashboard, onDuplicated]);
|
|
11753
|
+
const handleStartDelete = useCallback(dashboardToDel => {
|
|
11754
|
+
setDashboardToDelete(dashboardToDel);
|
|
11755
|
+
}, []);
|
|
11489
11756
|
const handleStartDuplicate = useCallback(dashboardToDupe => {
|
|
11490
11757
|
setDashboardToCopy(dashboardToDupe);
|
|
11491
11758
|
}, []);
|
|
11492
11759
|
const handleStartDuplicateIfConfig = onDuplicated ? handleStartDuplicate : undefined;
|
|
11493
11760
|
const handleStartStatusChangeIfConfig = onStatusChanged ? handleStartStatusChange : undefined;
|
|
11761
|
+
const handleStartDeleteIfConfig = onDeleted ? handleStartDelete : undefined;
|
|
11494
11762
|
return jsxs(StyledDashboardActions, {
|
|
11495
11763
|
"data-testid": "dot-dashboard-actions",
|
|
11496
11764
|
children: [jsx(DotDashboardPublishConfirm, {
|
|
@@ -11506,6 +11774,11 @@ function DotDashboardActions({
|
|
|
11506
11774
|
open: true,
|
|
11507
11775
|
onClose: handleDuplicateClose,
|
|
11508
11776
|
onSubmit: handleDuplicateSubmit
|
|
11777
|
+
}), dashboardToDelete && jsx(DotImpactDialog, {
|
|
11778
|
+
onCancel: handleDeleteClose,
|
|
11779
|
+
onSubmit: handleDeleteSubmit,
|
|
11780
|
+
record: dashboardToDelete === null || dashboardToDelete === void 0 ? void 0 : dashboardToDelete.name,
|
|
11781
|
+
open: true
|
|
11509
11782
|
}), jsx(HelpButton, {
|
|
11510
11783
|
dashboard: dashboard
|
|
11511
11784
|
}), onFavorite && jsx(FavoriteButton, {
|
|
@@ -11517,8 +11790,9 @@ function DotDashboardActions({
|
|
|
11517
11790
|
onViewMode: onViewMode,
|
|
11518
11791
|
onStartStatusChange: handleStartStatusChangeIfConfig,
|
|
11519
11792
|
onStartDuplicate: handleStartDuplicateIfConfig,
|
|
11793
|
+
onStartDelete: handleStartDeleteIfConfig,
|
|
11520
11794
|
onDetails: () => setOpenedDashboardDetails(dashboard)
|
|
11521
|
-
}), jsx(CloseButton, {
|
|
11795
|
+
}), onClose && jsx(CloseButton, {
|
|
11522
11796
|
dashboard: dashboard,
|
|
11523
11797
|
onClose: onClose
|
|
11524
11798
|
})]
|
|
@@ -11544,6 +11818,7 @@ function DotDashboardHeader({
|
|
|
11544
11818
|
onClose,
|
|
11545
11819
|
onFavorite,
|
|
11546
11820
|
onStatusChanged,
|
|
11821
|
+
onDeleted,
|
|
11547
11822
|
onDuplicated,
|
|
11548
11823
|
onViewMode
|
|
11549
11824
|
}) {
|
|
@@ -11569,12 +11844,13 @@ function DotDashboardHeader({
|
|
|
11569
11844
|
children: dashboard === null || dashboard === void 0 ? void 0 : dashboard.name
|
|
11570
11845
|
}), jsx(DotDashboardActions, {
|
|
11571
11846
|
applications: applications,
|
|
11847
|
+
canEdit: canEdit,
|
|
11572
11848
|
dashboard: dashboard,
|
|
11573
11849
|
isEdit: isEdit,
|
|
11574
|
-
canEdit: canEdit,
|
|
11575
11850
|
onClose: onClose,
|
|
11576
11851
|
onFavorite: onFavorite,
|
|
11577
11852
|
onStatusChanged: onStatusChanged,
|
|
11853
|
+
onDeleted: onDeleted,
|
|
11578
11854
|
onDuplicated: onDuplicated,
|
|
11579
11855
|
onViewMode: onViewMode
|
|
11580
11856
|
})]
|
|
@@ -11750,7 +12026,7 @@ const StyledRadioGroup = styled(RadioGroup)`
|
|
|
11750
12026
|
&.${groupClassName} {
|
|
11751
12027
|
padding-left: ${theme.spacing(2.5)};
|
|
11752
12028
|
|
|
11753
|
-
.${rootClassName$
|
|
12029
|
+
.${rootClassName$P} {
|
|
11754
12030
|
margin: 0;
|
|
11755
12031
|
}
|
|
11756
12032
|
}
|
|
@@ -11910,9 +12186,9 @@ const StyledFormContainer = styled.div`
|
|
|
11910
12186
|
&.${rootClassName$y} {
|
|
11911
12187
|
margin: ${theme.spacing(3, 0)};
|
|
11912
12188
|
|
|
11913
|
-
.${rootClassName$
|
|
11914
|
-
.${rootClassName$
|
|
11915
|
-
.${rootClassName$
|
|
12189
|
+
.${rootClassName$N},
|
|
12190
|
+
.${rootClassName$P},
|
|
12191
|
+
.${rootClassName$1i},
|
|
11916
12192
|
.${rootSelectClassName},
|
|
11917
12193
|
.${rootClassName$A},
|
|
11918
12194
|
.${rootClassName$z} {
|
|
@@ -11920,7 +12196,7 @@ const StyledFormContainer = styled.div`
|
|
|
11920
12196
|
}
|
|
11921
12197
|
|
|
11922
12198
|
label
|
|
11923
|
-
+ .${rootClassName$
|
|
12199
|
+
+ .${rootClassName$1i},
|
|
11924
12200
|
label
|
|
11925
12201
|
+ .${rootSelectClassName},
|
|
11926
12202
|
label
|
|
@@ -11930,8 +12206,8 @@ const StyledFormContainer = styled.div`
|
|
|
11930
12206
|
margin: ${theme.spacing(0, 0, 1, 0)};
|
|
11931
12207
|
}
|
|
11932
12208
|
|
|
11933
|
-
.${rootClassName$
|
|
11934
|
-
.${rootClassName$
|
|
12209
|
+
.${rootClassName$M}, .${groupClassName} {
|
|
12210
|
+
.${rootClassName$P} {
|
|
11935
12211
|
margin: 0;
|
|
11936
12212
|
}
|
|
11937
12213
|
}
|
|
@@ -12237,7 +12513,7 @@ function DotRadioButton({
|
|
|
12237
12513
|
ariaLabel,
|
|
12238
12514
|
checked,
|
|
12239
12515
|
className,
|
|
12240
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
12516
|
+
'data-pendoid': dataPendoId = rootClassName$P,
|
|
12241
12517
|
'data-testid': dataTestId,
|
|
12242
12518
|
disabled,
|
|
12243
12519
|
id,
|
|
@@ -12250,7 +12526,7 @@ function DotRadioButton({
|
|
|
12250
12526
|
size = 'medium',
|
|
12251
12527
|
value
|
|
12252
12528
|
}) {
|
|
12253
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12529
|
+
const rootClasses = useStylesWithRootClass(rootClassName$P, className);
|
|
12254
12530
|
const handleChange = event => {
|
|
12255
12531
|
onChange && onChange(event, event.target.value);
|
|
12256
12532
|
};
|
|
@@ -12304,7 +12580,7 @@ const DotRadioGroup = ({
|
|
|
12304
12580
|
size = 'medium'
|
|
12305
12581
|
}) => {
|
|
12306
12582
|
const placement = `${placementClassName}${labelPlacement}`;
|
|
12307
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12583
|
+
const rootClasses = useStylesWithRootClass(rootClassName$N, className, placement);
|
|
12308
12584
|
const radioValue = value || defaultValue;
|
|
12309
12585
|
const [selectedValue, setSelectedValue] = useState(radioValue);
|
|
12310
12586
|
/* This will ensure that value can be updated from the outside */
|
|
@@ -12438,7 +12714,7 @@ const DotSwitch = ({
|
|
|
12438
12714
|
tabIndex: 0
|
|
12439
12715
|
});
|
|
12440
12716
|
return jsx(StyledFormControlLabel, {
|
|
12441
|
-
className: rootClassName$
|
|
12717
|
+
className: rootClassName$P,
|
|
12442
12718
|
control: switchControl,
|
|
12443
12719
|
label: label,
|
|
12444
12720
|
labelPlacement: labelPlacement
|
|
@@ -13189,34 +13465,25 @@ const getWarningAdornment = () => {
|
|
|
13189
13465
|
};
|
|
13190
13466
|
const applyBindings = (bindings, inlineEditText) => {
|
|
13191
13467
|
if (!bindings || !bindings.length || !inlineEditText) return;
|
|
13192
|
-
let
|
|
13193
|
-
|
|
13194
|
-
|
|
13195
|
-
|
|
13196
|
-
|
|
13197
|
-
|
|
13198
|
-
|
|
13199
|
-
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
bindingStringIndex = text.indexOf(stringBinding);
|
|
13210
|
-
// Add nodes to array
|
|
13211
|
-
boundNode = [boundNode, previousText, className ? jsx("span", {
|
|
13212
|
-
className: className,
|
|
13213
|
-
children: value
|
|
13214
|
-
}, `${index}-${key}`) : value];
|
|
13215
|
-
}
|
|
13468
|
+
let result = [inlineEditText];
|
|
13469
|
+
const getBoundSpan = (value, className, key) => className ? jsx("span", {
|
|
13470
|
+
className: className,
|
|
13471
|
+
children: value
|
|
13472
|
+
}, key) : value;
|
|
13473
|
+
bindings.forEach(({
|
|
13474
|
+
binding,
|
|
13475
|
+
className,
|
|
13476
|
+
value
|
|
13477
|
+
}, index) => {
|
|
13478
|
+
result = result.flatMap((part, i) => {
|
|
13479
|
+
if (typeof part === 'string') {
|
|
13480
|
+
// Split the text by the binding and interleave with the replacement value
|
|
13481
|
+
return part.split(binding).flatMap((textPart, j, arr) => [textPart, j < arr.length - 1 ? getBoundSpan(value, className, `${index}-${i}-${j}`) : null]);
|
|
13482
|
+
}
|
|
13483
|
+
return part;
|
|
13484
|
+
});
|
|
13216
13485
|
});
|
|
13217
|
-
|
|
13218
|
-
boundNode = [boundNode, text];
|
|
13219
|
-
return boundNode;
|
|
13486
|
+
return result;
|
|
13220
13487
|
};
|
|
13221
13488
|
const checkIfEmptyValue = inputValue => inputValue.trim() === '';
|
|
13222
13489
|
|
|
@@ -16499,7 +16766,7 @@ const DotPopper = ({
|
|
|
16499
16766
|
placement
|
|
16500
16767
|
}) => {
|
|
16501
16768
|
const [arrowRef, setArrowRef] = useState(null);
|
|
16502
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
16769
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1a, className);
|
|
16503
16770
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16504
16771
|
const handleClickAway = event => {
|
|
16505
16772
|
if (onClickAway && (!anchorEl || !anchorEl.contains(event.currentTarget))) {
|
|
@@ -18140,4 +18407,4 @@ const BoardColumnSummary = ({
|
|
|
18140
18407
|
});
|
|
18141
18408
|
};
|
|
18142
18409
|
|
|
18143
|
-
export { ApiError$1 as ApiError, BoardStatusProvider, Cell, ColumnStatusProvider, CreateUUID, CssCell, CssGrid, CssGridDebug, DashboardAppTypeOptions, DashboardView, DatePickerKeydownContext, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, 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 };
|
|
18410
|
+
export { ApiError$1 as ApiError, BoardStatusProvider, Cell, ColumnStatusProvider, CreateUUID, CssCell, CssGrid, CssGridDebug, DashboardAppTypeOptions, DashboardView, DatePickerKeydownContext, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotBadge, Board as DotBoard, BoardColumn as DotBoardColumn, BoardColumnActionBar as DotBoardColumnActionBar, BoardColumnCollapse as DotBoardColumnCollapse, BoardColumnExpand as DotBoardColumnExpand, BoardColumnHeader as DotBoardColumnHeader, BoardColumnItems as DotBoardColumnItems, BoardColumnSummary as DotBoardColumnSummary, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCarousel, DotCheckbox, DotCheckboxGroup, DotChip, DotChipList, DotClickAwayListener, DotConfirmationDialog, DotCopyButton, DotCoreApiProvider, DotDashboardActions, DotDashboardDetails, DotDashboardDialog, DotDashboardHeader, DotDashboardOptionsMenu, DotDashboardPublishConfirm, DotDashboardStatusPill, DotDatePicker, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyFilterState, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotIllustration, DotImpactDialog, DotInlineEdit, 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 };
|