@digital-ai/dot-components 3.15.3 → 3.16.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 +442 -183
- 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/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,
|
|
@@ -9898,7 +9937,7 @@ const DotSnackbar = ({
|
|
|
9898
9937
|
}) => {
|
|
9899
9938
|
const hasActions = !!(primaryAction || secondaryAction);
|
|
9900
9939
|
const calculatedAutoHideDuration = autoHideDuration === null || autoHideDuration > 0 ? autoHideDuration : addAutoHideDuration(severity);
|
|
9901
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
9940
|
+
const rootClasses = useStylesWithRootClass(rootClassName$G, className);
|
|
9902
9941
|
const handleSnackbarClose = reason => {
|
|
9903
9942
|
if (!reason || hideOnClickAway || !hideOnClickAway && reason !== 'clickaway') {
|
|
9904
9943
|
onClose();
|
|
@@ -9956,10 +9995,10 @@ const DotSnackbar = ({
|
|
|
9956
9995
|
});
|
|
9957
9996
|
};
|
|
9958
9997
|
|
|
9959
|
-
const rootClassName$
|
|
9998
|
+
const rootClassName$F = 'dot-snackbar-container';
|
|
9960
9999
|
const StyledSnackbarContainer = styled.div`
|
|
9961
10000
|
${() => css`
|
|
9962
|
-
&.${rootClassName$
|
|
10001
|
+
&.${rootClassName$F} {
|
|
9963
10002
|
position: absolute;
|
|
9964
10003
|
top: 0;
|
|
9965
10004
|
width: 250px;
|
|
@@ -9990,10 +10029,10 @@ const DotSnackbarContainer = ({
|
|
|
9990
10029
|
};
|
|
9991
10030
|
}
|
|
9992
10031
|
return jsx(StyledSnackbarContainer, {
|
|
9993
|
-
className: rootClassName$
|
|
10032
|
+
className: rootClassName$F,
|
|
9994
10033
|
children: jsx("div", {
|
|
9995
|
-
className: rootClassName$
|
|
9996
|
-
"data-testid": rootClassName$
|
|
10034
|
+
className: rootClassName$F,
|
|
10035
|
+
"data-testid": rootClassName$F,
|
|
9997
10036
|
children: alerts.slice().reverse().map(alert => {
|
|
9998
10037
|
return jsx(DotSnackbar, {
|
|
9999
10038
|
autoHideDuration: alert.autoHideDuration,
|
|
@@ -10064,12 +10103,12 @@ const useEnqueueErrorMessage = error => {
|
|
|
10064
10103
|
}, [error]);
|
|
10065
10104
|
};
|
|
10066
10105
|
|
|
10067
|
-
const rootClassName$
|
|
10106
|
+
const rootClassName$E = 'dot-dashboard-details';
|
|
10068
10107
|
const StyledDashboardDetails = styled(DotDrawer)`
|
|
10069
10108
|
${({
|
|
10070
10109
|
theme
|
|
10071
10110
|
}) => css`
|
|
10072
|
-
&.${rootClassName$
|
|
10111
|
+
&.${rootClassName$E} {
|
|
10073
10112
|
.dot-drawer-paper {
|
|
10074
10113
|
padding: 0;
|
|
10075
10114
|
width: 382px;
|
|
@@ -10192,7 +10231,7 @@ const DotDashboardDetailsView = ({
|
|
|
10192
10231
|
zIndex = 990
|
|
10193
10232
|
}) => {
|
|
10194
10233
|
var _a, _b;
|
|
10195
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
10234
|
+
const rootClasses = useStylesWithRootClass(rootClassName$E, className);
|
|
10196
10235
|
const closeHandler = useCallback(event => {
|
|
10197
10236
|
onClose && onClose(event);
|
|
10198
10237
|
}, [onClose]);
|
|
@@ -10804,6 +10843,151 @@ function DotDashboardDialog({
|
|
|
10804
10843
|
});
|
|
10805
10844
|
}
|
|
10806
10845
|
|
|
10846
|
+
const rootClassName$D = 'dot-impact-dialog';
|
|
10847
|
+
const StyledImpactDialog = styled(DotDialog)`
|
|
10848
|
+
${({
|
|
10849
|
+
theme
|
|
10850
|
+
}) => css`
|
|
10851
|
+
&.${rootClassName$D} {
|
|
10852
|
+
.high-impact-default-content {
|
|
10853
|
+
margin-top: ${theme.spacing(2)};
|
|
10854
|
+
margin-bottom: ${theme.spacing(3)};
|
|
10855
|
+
}
|
|
10856
|
+
.item-name {
|
|
10857
|
+
font-weight: bold;
|
|
10858
|
+
white-space: pre;
|
|
10859
|
+
}
|
|
10860
|
+
}
|
|
10861
|
+
`}
|
|
10862
|
+
`;
|
|
10863
|
+
|
|
10864
|
+
function capitalize(word) {
|
|
10865
|
+
return word[0].toUpperCase() + word.slice(1);
|
|
10866
|
+
}
|
|
10867
|
+
function HighImpact({
|
|
10868
|
+
message,
|
|
10869
|
+
record,
|
|
10870
|
+
action,
|
|
10871
|
+
objectType,
|
|
10872
|
+
inputValue,
|
|
10873
|
+
handleUpdate
|
|
10874
|
+
}) {
|
|
10875
|
+
const defaultMessage = useMemo(() => jsxs(DotTypography, {
|
|
10876
|
+
className: "high-impact-default-content",
|
|
10877
|
+
variant: "body1",
|
|
10878
|
+
children: ["This action cannot be undone. This will permanently", ' ', action.toUpperCase(), objectType && ' the ', jsx("span", {
|
|
10879
|
+
className: "item-name",
|
|
10880
|
+
children: record
|
|
10881
|
+
}), objectType && ` ${objectType}`, ". Some data may be lost."]
|
|
10882
|
+
}), [action, objectType, record]);
|
|
10883
|
+
return jsxs(Fragment, {
|
|
10884
|
+
children: [message ? message : defaultMessage, jsxs(DotTypography, {
|
|
10885
|
+
variant: "body1",
|
|
10886
|
+
children: ["Please type ", jsx("span", {
|
|
10887
|
+
className: "item-name",
|
|
10888
|
+
children: record
|
|
10889
|
+
}), " to confirm."]
|
|
10890
|
+
}), jsx(DotInputText, {
|
|
10891
|
+
autoFocus: true,
|
|
10892
|
+
onChange: handleUpdate,
|
|
10893
|
+
value: inputValue,
|
|
10894
|
+
type: "text",
|
|
10895
|
+
name: "record-name",
|
|
10896
|
+
id: "record-name"
|
|
10897
|
+
})]
|
|
10898
|
+
});
|
|
10899
|
+
}
|
|
10900
|
+
function MediumImpact({
|
|
10901
|
+
message,
|
|
10902
|
+
record,
|
|
10903
|
+
action
|
|
10904
|
+
}) {
|
|
10905
|
+
const defaultMessage = useMemo(() => jsxs(DotTypography, {
|
|
10906
|
+
children: ["You are about to ", action.toUpperCase(), jsxs("strong", {
|
|
10907
|
+
children: [" ", record]
|
|
10908
|
+
}), ". This action cannot be undone."]
|
|
10909
|
+
}), [action, record]);
|
|
10910
|
+
if (message) {
|
|
10911
|
+
return jsx(DotTypography, {
|
|
10912
|
+
children: message
|
|
10913
|
+
});
|
|
10914
|
+
}
|
|
10915
|
+
return defaultMessage;
|
|
10916
|
+
}
|
|
10917
|
+
const DotImpactDialog = ({
|
|
10918
|
+
'data-testid': dataTestId,
|
|
10919
|
+
className,
|
|
10920
|
+
record = '',
|
|
10921
|
+
action = 'delete',
|
|
10922
|
+
actionIcon = 'delete',
|
|
10923
|
+
objectType,
|
|
10924
|
+
impact = 'medium',
|
|
10925
|
+
message = null,
|
|
10926
|
+
open,
|
|
10927
|
+
onSubmit,
|
|
10928
|
+
onCancel
|
|
10929
|
+
}) => {
|
|
10930
|
+
const [inputValue, setInputField] = useState('');
|
|
10931
|
+
const [buttonDisabled, setButtonDisabled] = useState(true);
|
|
10932
|
+
const handleUpdate = useCallback(e => {
|
|
10933
|
+
setInputField(e.target.value);
|
|
10934
|
+
}, []);
|
|
10935
|
+
useEffect(() => {
|
|
10936
|
+
if (impact === 'high' && !objectType) {
|
|
10937
|
+
console.warn("The 'objectType' property should be passed to DotImpactDialog when 'impact' property value is 'high'.");
|
|
10938
|
+
}
|
|
10939
|
+
}, [impact, objectType]);
|
|
10940
|
+
useEffect(() => {
|
|
10941
|
+
if (impact === 'medium') return setButtonDisabled(false);
|
|
10942
|
+
if (record && record === inputValue) {
|
|
10943
|
+
return setButtonDisabled(false);
|
|
10944
|
+
} else if (record !== inputValue) {
|
|
10945
|
+
return setButtonDisabled(true);
|
|
10946
|
+
}
|
|
10947
|
+
}, [impact, inputValue, record]);
|
|
10948
|
+
const submitButtonLabel = useMemo(() => {
|
|
10949
|
+
switch (impact) {
|
|
10950
|
+
case 'high':
|
|
10951
|
+
return `I understand the risks, ${capitalize(action)} ${record}.`;
|
|
10952
|
+
case 'medium':
|
|
10953
|
+
return `${capitalize(action)}`;
|
|
10954
|
+
}
|
|
10955
|
+
return '';
|
|
10956
|
+
}, [action, capitalize, impact, record]);
|
|
10957
|
+
const rootClasses = useStylesWithRootClass(rootClassName$D, className);
|
|
10958
|
+
return jsx(StyledImpactDialog, {
|
|
10959
|
+
"data-testid": dataTestId,
|
|
10960
|
+
className: rootClasses,
|
|
10961
|
+
open: open,
|
|
10962
|
+
title: "Are you sure?",
|
|
10963
|
+
ariaLabel: `${impact}-impact-dialog`,
|
|
10964
|
+
closeIconVisible: false,
|
|
10965
|
+
onSubmit: onSubmit,
|
|
10966
|
+
onCancel: onCancel,
|
|
10967
|
+
submitButtonProps: {
|
|
10968
|
+
disabled: buttonDisabled,
|
|
10969
|
+
type: 'destructive',
|
|
10970
|
+
label: submitButtonLabel,
|
|
10971
|
+
'data-testid': `${impact}-impact-button`,
|
|
10972
|
+
startIcon: jsx(DotIcon, {
|
|
10973
|
+
iconId: actionIcon
|
|
10974
|
+
})
|
|
10975
|
+
},
|
|
10976
|
+
children: impact === 'high' ? jsx(HighImpact, {
|
|
10977
|
+
inputValue: inputValue,
|
|
10978
|
+
action: action,
|
|
10979
|
+
handleUpdate: handleUpdate,
|
|
10980
|
+
record: record,
|
|
10981
|
+
objectType: objectType,
|
|
10982
|
+
message: message
|
|
10983
|
+
}) : jsx(MediumImpact, {
|
|
10984
|
+
record: record,
|
|
10985
|
+
action: action,
|
|
10986
|
+
message: message
|
|
10987
|
+
})
|
|
10988
|
+
});
|
|
10989
|
+
};
|
|
10990
|
+
|
|
10807
10991
|
const InlineMessage = styled(DotTypography)`
|
|
10808
10992
|
${({
|
|
10809
10993
|
theme
|
|
@@ -11229,8 +11413,26 @@ const StyledDotMenu = styled(DotMenu)`
|
|
|
11229
11413
|
}) => css`
|
|
11230
11414
|
z-index: 9999;
|
|
11231
11415
|
|
|
11232
|
-
|
|
11233
|
-
|
|
11416
|
+
&.dot-menu {
|
|
11417
|
+
width: 200px;
|
|
11418
|
+
|
|
11419
|
+
.dot-ul .dot-li {
|
|
11420
|
+
padding: 0;
|
|
11421
|
+
|
|
11422
|
+
.dot-link {
|
|
11423
|
+
padding: ${theme.spacing(0.5, 2)};
|
|
11424
|
+
|
|
11425
|
+
.dot-icon {
|
|
11426
|
+
margin-right: ${theme.spacing(2)};
|
|
11427
|
+
}
|
|
11428
|
+
}
|
|
11429
|
+
.dashboard-details-border {
|
|
11430
|
+
border-top: 1px solid #999;
|
|
11431
|
+
width: 100%;
|
|
11432
|
+
margin-bottom: ${theme.spacing(1)};
|
|
11433
|
+
margin-top: ${theme.spacing(1)};
|
|
11434
|
+
}
|
|
11435
|
+
}
|
|
11234
11436
|
}
|
|
11235
11437
|
`}
|
|
11236
11438
|
`;
|
|
@@ -11238,6 +11440,7 @@ const StyledDotMenu = styled(DotMenu)`
|
|
|
11238
11440
|
function DotDashboardOptionsMenu({
|
|
11239
11441
|
dashboard,
|
|
11240
11442
|
isEdit = false,
|
|
11443
|
+
onStartDelete,
|
|
11241
11444
|
onStartDuplicate,
|
|
11242
11445
|
onStartStatusChange,
|
|
11243
11446
|
onViewMode,
|
|
@@ -11315,7 +11518,33 @@ function DotDashboardOptionsMenu({
|
|
|
11315
11518
|
onclick: handleDuplicateClick
|
|
11316
11519
|
});
|
|
11317
11520
|
}
|
|
11521
|
+
if (onStartDelete && !dashboard.is_ootb_dashboard) {
|
|
11522
|
+
const handleDeleteClick = () => {
|
|
11523
|
+
handleMenuClose();
|
|
11524
|
+
onStartDelete(dashboard);
|
|
11525
|
+
};
|
|
11526
|
+
menuItems.push({
|
|
11527
|
+
children: jsxs(DotLink, {
|
|
11528
|
+
ariaLabel: "Delete dashboard",
|
|
11529
|
+
color: "inherit",
|
|
11530
|
+
onClick: handleDeleteClick,
|
|
11531
|
+
underline: "none",
|
|
11532
|
+
children: [jsx(DotIcon, {
|
|
11533
|
+
iconId: "delete"
|
|
11534
|
+
}), " Delete"]
|
|
11535
|
+
}),
|
|
11536
|
+
key: 'delete',
|
|
11537
|
+
onclick: handleDeleteClick
|
|
11538
|
+
});
|
|
11539
|
+
}
|
|
11318
11540
|
if (onDetails) {
|
|
11541
|
+
menuItems.push({
|
|
11542
|
+
children: jsx("div", {
|
|
11543
|
+
className: "dashboard-details-border"
|
|
11544
|
+
}),
|
|
11545
|
+
disabled: true,
|
|
11546
|
+
key: 'dashboard-details-border'
|
|
11547
|
+
});
|
|
11319
11548
|
menuItems.push({
|
|
11320
11549
|
children: jsxs(DotLink, {
|
|
11321
11550
|
ariaLabel: "Dashboard details",
|
|
@@ -11326,6 +11555,7 @@ function DotDashboardOptionsMenu({
|
|
|
11326
11555
|
iconId: "file-lines"
|
|
11327
11556
|
}), " Details"]
|
|
11328
11557
|
}),
|
|
11558
|
+
classes: 'dashboard-details',
|
|
11329
11559
|
key: 'dashboard-details',
|
|
11330
11560
|
onClick: () => onDetails(dashboard)
|
|
11331
11561
|
});
|
|
@@ -11342,6 +11572,7 @@ function DotDashboardOptionsMenu({
|
|
|
11342
11572
|
className: "card-header-action-menu",
|
|
11343
11573
|
disablePortal: true,
|
|
11344
11574
|
id: "card-header-action-menu",
|
|
11575
|
+
menuItemHeight: "auto",
|
|
11345
11576
|
menuItems: menuItems,
|
|
11346
11577
|
open: open,
|
|
11347
11578
|
onLeave: handleMenuClose
|
|
@@ -11434,6 +11665,7 @@ function DotDashboardActions({
|
|
|
11434
11665
|
onClose,
|
|
11435
11666
|
onFavorite,
|
|
11436
11667
|
onStatusChanged,
|
|
11668
|
+
onDeleted,
|
|
11437
11669
|
onDuplicated,
|
|
11438
11670
|
onViewMode
|
|
11439
11671
|
}) {
|
|
@@ -11441,14 +11673,19 @@ function DotDashboardActions({
|
|
|
11441
11673
|
// they are evaluated before any context imports. If they are evaluated
|
|
11442
11674
|
// after they can cause React state issues when rendering.
|
|
11443
11675
|
const [dashboardToCopy, setDashboardToCopy] = useState(null);
|
|
11676
|
+
const [dashboardToDelete, setDashboardToDelete] = useState(null);
|
|
11444
11677
|
const [dashboardToPublish, setDashboardToPublish] = useState(null);
|
|
11445
11678
|
const [dashboardToUnpublish, setDashboardToUnpublish] = useState(null);
|
|
11446
11679
|
const [appCategories, setAppCategories] = useState(null);
|
|
11447
11680
|
const {
|
|
11681
|
+
deleteDashboard,
|
|
11448
11682
|
duplicateDashboard,
|
|
11449
11683
|
getCategories,
|
|
11450
11684
|
setOpenedDashboardDetails
|
|
11451
11685
|
} = useDotMetadataApiContext();
|
|
11686
|
+
const {
|
|
11687
|
+
cancelablePromise
|
|
11688
|
+
} = useCancelablePromise();
|
|
11452
11689
|
useEffect(() => {
|
|
11453
11690
|
var _a;
|
|
11454
11691
|
if (dashboard && ((_a = dashboard.target_apps) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
@@ -11470,6 +11707,16 @@ function DotDashboardActions({
|
|
|
11470
11707
|
setDashboardToUnpublish(null);
|
|
11471
11708
|
setDashboardToPublish(dashboard);
|
|
11472
11709
|
}, [dashboard]);
|
|
11710
|
+
const handleDeleteClose = useCallback(() => {
|
|
11711
|
+
setDashboardToDelete(null);
|
|
11712
|
+
}, []);
|
|
11713
|
+
const handleDeleteSubmit = useCallback(() => __awaiter(this, void 0, void 0, function* () {
|
|
11714
|
+
const dashboardId = dashboardToDelete.id;
|
|
11715
|
+
return cancelablePromise(deleteDashboard(dashboardId)).then(deleted => {
|
|
11716
|
+
setDashboardToDelete(null);
|
|
11717
|
+
onDeleted(dashboardId, deleted);
|
|
11718
|
+
});
|
|
11719
|
+
}), [dashboardToDelete, onDeleted]);
|
|
11473
11720
|
const handleDuplicateClose = useCallback(() => {
|
|
11474
11721
|
setDashboardToCopy(null);
|
|
11475
11722
|
}, []);
|
|
@@ -11482,15 +11729,19 @@ function DotDashboardActions({
|
|
|
11482
11729
|
};
|
|
11483
11730
|
return duplicateDashboard(dashboard.id, copyData).then(result => {
|
|
11484
11731
|
if (result && 'id' in result) {
|
|
11485
|
-
onDuplicated(result, isDone);
|
|
11732
|
+
onDuplicated && onDuplicated(result, isDone);
|
|
11486
11733
|
}
|
|
11487
11734
|
});
|
|
11488
|
-
}, [dashboard]);
|
|
11735
|
+
}, [dashboard, onDuplicated]);
|
|
11736
|
+
const handleStartDelete = useCallback(dashboardToDel => {
|
|
11737
|
+
setDashboardToDelete(dashboardToDel);
|
|
11738
|
+
}, []);
|
|
11489
11739
|
const handleStartDuplicate = useCallback(dashboardToDupe => {
|
|
11490
11740
|
setDashboardToCopy(dashboardToDupe);
|
|
11491
11741
|
}, []);
|
|
11492
11742
|
const handleStartDuplicateIfConfig = onDuplicated ? handleStartDuplicate : undefined;
|
|
11493
11743
|
const handleStartStatusChangeIfConfig = onStatusChanged ? handleStartStatusChange : undefined;
|
|
11744
|
+
const handleStartDeleteIfConfig = onDeleted ? handleStartDelete : undefined;
|
|
11494
11745
|
return jsxs(StyledDashboardActions, {
|
|
11495
11746
|
"data-testid": "dot-dashboard-actions",
|
|
11496
11747
|
children: [jsx(DotDashboardPublishConfirm, {
|
|
@@ -11506,6 +11757,11 @@ function DotDashboardActions({
|
|
|
11506
11757
|
open: true,
|
|
11507
11758
|
onClose: handleDuplicateClose,
|
|
11508
11759
|
onSubmit: handleDuplicateSubmit
|
|
11760
|
+
}), dashboardToDelete && jsx(DotImpactDialog, {
|
|
11761
|
+
onCancel: handleDeleteClose,
|
|
11762
|
+
onSubmit: handleDeleteSubmit,
|
|
11763
|
+
record: dashboardToDelete === null || dashboardToDelete === void 0 ? void 0 : dashboardToDelete.name,
|
|
11764
|
+
open: true
|
|
11509
11765
|
}), jsx(HelpButton, {
|
|
11510
11766
|
dashboard: dashboard
|
|
11511
11767
|
}), onFavorite && jsx(FavoriteButton, {
|
|
@@ -11517,8 +11773,9 @@ function DotDashboardActions({
|
|
|
11517
11773
|
onViewMode: onViewMode,
|
|
11518
11774
|
onStartStatusChange: handleStartStatusChangeIfConfig,
|
|
11519
11775
|
onStartDuplicate: handleStartDuplicateIfConfig,
|
|
11776
|
+
onStartDelete: handleStartDeleteIfConfig,
|
|
11520
11777
|
onDetails: () => setOpenedDashboardDetails(dashboard)
|
|
11521
|
-
}), jsx(CloseButton, {
|
|
11778
|
+
}), onClose && jsx(CloseButton, {
|
|
11522
11779
|
dashboard: dashboard,
|
|
11523
11780
|
onClose: onClose
|
|
11524
11781
|
})]
|
|
@@ -11544,6 +11801,7 @@ function DotDashboardHeader({
|
|
|
11544
11801
|
onClose,
|
|
11545
11802
|
onFavorite,
|
|
11546
11803
|
onStatusChanged,
|
|
11804
|
+
onDeleted,
|
|
11547
11805
|
onDuplicated,
|
|
11548
11806
|
onViewMode
|
|
11549
11807
|
}) {
|
|
@@ -11569,12 +11827,13 @@ function DotDashboardHeader({
|
|
|
11569
11827
|
children: dashboard === null || dashboard === void 0 ? void 0 : dashboard.name
|
|
11570
11828
|
}), jsx(DotDashboardActions, {
|
|
11571
11829
|
applications: applications,
|
|
11830
|
+
canEdit: canEdit,
|
|
11572
11831
|
dashboard: dashboard,
|
|
11573
11832
|
isEdit: isEdit,
|
|
11574
|
-
canEdit: canEdit,
|
|
11575
11833
|
onClose: onClose,
|
|
11576
11834
|
onFavorite: onFavorite,
|
|
11577
11835
|
onStatusChanged: onStatusChanged,
|
|
11836
|
+
onDeleted: onDeleted,
|
|
11578
11837
|
onDuplicated: onDuplicated,
|
|
11579
11838
|
onViewMode: onViewMode
|
|
11580
11839
|
})]
|
|
@@ -11750,7 +12009,7 @@ const StyledRadioGroup = styled(RadioGroup)`
|
|
|
11750
12009
|
&.${groupClassName} {
|
|
11751
12010
|
padding-left: ${theme.spacing(2.5)};
|
|
11752
12011
|
|
|
11753
|
-
.${rootClassName$
|
|
12012
|
+
.${rootClassName$P} {
|
|
11754
12013
|
margin: 0;
|
|
11755
12014
|
}
|
|
11756
12015
|
}
|
|
@@ -11910,9 +12169,9 @@ const StyledFormContainer = styled.div`
|
|
|
11910
12169
|
&.${rootClassName$y} {
|
|
11911
12170
|
margin: ${theme.spacing(3, 0)};
|
|
11912
12171
|
|
|
11913
|
-
.${rootClassName$
|
|
11914
|
-
.${rootClassName$
|
|
11915
|
-
.${rootClassName$
|
|
12172
|
+
.${rootClassName$N},
|
|
12173
|
+
.${rootClassName$P},
|
|
12174
|
+
.${rootClassName$1i},
|
|
11916
12175
|
.${rootSelectClassName},
|
|
11917
12176
|
.${rootClassName$A},
|
|
11918
12177
|
.${rootClassName$z} {
|
|
@@ -11920,7 +12179,7 @@ const StyledFormContainer = styled.div`
|
|
|
11920
12179
|
}
|
|
11921
12180
|
|
|
11922
12181
|
label
|
|
11923
|
-
+ .${rootClassName$
|
|
12182
|
+
+ .${rootClassName$1i},
|
|
11924
12183
|
label
|
|
11925
12184
|
+ .${rootSelectClassName},
|
|
11926
12185
|
label
|
|
@@ -11930,8 +12189,8 @@ const StyledFormContainer = styled.div`
|
|
|
11930
12189
|
margin: ${theme.spacing(0, 0, 1, 0)};
|
|
11931
12190
|
}
|
|
11932
12191
|
|
|
11933
|
-
.${rootClassName$
|
|
11934
|
-
.${rootClassName$
|
|
12192
|
+
.${rootClassName$M}, .${groupClassName} {
|
|
12193
|
+
.${rootClassName$P} {
|
|
11935
12194
|
margin: 0;
|
|
11936
12195
|
}
|
|
11937
12196
|
}
|
|
@@ -12237,7 +12496,7 @@ function DotRadioButton({
|
|
|
12237
12496
|
ariaLabel,
|
|
12238
12497
|
checked,
|
|
12239
12498
|
className,
|
|
12240
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
12499
|
+
'data-pendoid': dataPendoId = rootClassName$P,
|
|
12241
12500
|
'data-testid': dataTestId,
|
|
12242
12501
|
disabled,
|
|
12243
12502
|
id,
|
|
@@ -12250,7 +12509,7 @@ function DotRadioButton({
|
|
|
12250
12509
|
size = 'medium',
|
|
12251
12510
|
value
|
|
12252
12511
|
}) {
|
|
12253
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12512
|
+
const rootClasses = useStylesWithRootClass(rootClassName$P, className);
|
|
12254
12513
|
const handleChange = event => {
|
|
12255
12514
|
onChange && onChange(event, event.target.value);
|
|
12256
12515
|
};
|
|
@@ -12304,7 +12563,7 @@ const DotRadioGroup = ({
|
|
|
12304
12563
|
size = 'medium'
|
|
12305
12564
|
}) => {
|
|
12306
12565
|
const placement = `${placementClassName}${labelPlacement}`;
|
|
12307
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
12566
|
+
const rootClasses = useStylesWithRootClass(rootClassName$N, className, placement);
|
|
12308
12567
|
const radioValue = value || defaultValue;
|
|
12309
12568
|
const [selectedValue, setSelectedValue] = useState(radioValue);
|
|
12310
12569
|
/* This will ensure that value can be updated from the outside */
|
|
@@ -12438,7 +12697,7 @@ const DotSwitch = ({
|
|
|
12438
12697
|
tabIndex: 0
|
|
12439
12698
|
});
|
|
12440
12699
|
return jsx(StyledFormControlLabel, {
|
|
12441
|
-
className: rootClassName$
|
|
12700
|
+
className: rootClassName$P,
|
|
12442
12701
|
control: switchControl,
|
|
12443
12702
|
label: label,
|
|
12444
12703
|
labelPlacement: labelPlacement
|
|
@@ -16499,7 +16758,7 @@ const DotPopper = ({
|
|
|
16499
16758
|
placement
|
|
16500
16759
|
}) => {
|
|
16501
16760
|
const [arrowRef, setArrowRef] = useState(null);
|
|
16502
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
16761
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1a, className);
|
|
16503
16762
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16504
16763
|
const handleClickAway = event => {
|
|
16505
16764
|
if (onClickAway && (!anchorEl || !anchorEl.contains(event.currentTarget))) {
|
|
@@ -18140,4 +18399,4 @@ const BoardColumnSummary = ({
|
|
|
18140
18399
|
});
|
|
18141
18400
|
};
|
|
18142
18401
|
|
|
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 };
|
|
18402
|
+
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 };
|