@digital-ai/dot-components 2.22.1 → 2.24.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 +302 -180
- package/package.json +2 -1
- package/src/lib/components/CommonProps.d.ts +4 -2
- package/src/lib/components/accordion/Accordion.d.ts +1 -1
- package/src/lib/components/alert-banner/AlertBanner.d.ts +1 -1
- package/src/lib/components/app-switcher/AppSwitcher.styles.d.ts +1 -1
- package/src/lib/components/app-toolbar/AppToolbar.styles.d.ts +1 -1
- package/src/lib/components/auto-complete/AutoComplete.d.ts +1 -1
- package/src/lib/components/button/CopyButton.d.ts +1 -1
- package/src/lib/components/button/IconButton.d.ts +1 -1
- package/src/lib/components/button-toggle/ButtonToggle.d.ts +1 -1
- package/src/lib/components/checkbox/Checkbox.d.ts +1 -1
- package/src/lib/components/chip/Chip.d.ts +1 -1
- package/src/lib/components/confirmation-dialog/ConfirmationDialog.d.ts +1 -1
- package/src/lib/components/date-picker/DatePicker.d.ts +1 -1
- package/src/lib/components/dialog/Dialog.d.ts +1 -1
- package/src/lib/components/draggable-list/DraggableList.d.ts +1 -1
- package/src/lib/components/drawer/Drawer.d.ts +1 -1
- package/src/lib/components/file-upload/FileUpload.d.ts +1 -1
- package/src/lib/components/inline-edit/InlineEdit.d.ts +1 -1
- package/src/lib/components/input-form-fields/InputSelect.d.ts +1 -1
- package/src/lib/components/input-form-fields/InputText.d.ts +6 -1
- package/src/lib/components/link/Link.d.ts +1 -1
- package/src/lib/components/list/ListItem.d.ts +1 -1
- package/src/lib/components/list/NestedList.styles.d.ts +1 -1
- package/src/lib/components/menu/Menu.d.ts +2 -0
- package/src/lib/components/progress-button/ProgressButton.d.ts +1 -1
- package/src/lib/components/radio/RadioButton.d.ts +1 -1
- package/src/lib/components/snackbar/Snackbar.d.ts +5 -3
- package/src/lib/components/snackbar/SnackbarProvider.d.ts +9 -5
- package/src/lib/components/split-button/SplitButton.d.ts +1 -1
- package/src/lib/components/switch/Switch.d.ts +1 -1
- package/src/lib/components/table/TableCell.d.ts +1 -1
- package/src/lib/components/table/index.d.ts +1 -1
- package/src/lib/components/table/utils/helpers.d.ts +8 -0
- package/src/lib/components/tabs/Tabs.d.ts +1 -1
- package/src/lib/components/time-picker/TimePicker.d.ts +1 -1
package/index.esm.js
CHANGED
|
@@ -8,8 +8,11 @@ import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';
|
|
|
8
8
|
import jwt_decode from 'jwt-decode';
|
|
9
9
|
import { useDropzone } from 'react-dropzone';
|
|
10
10
|
import GridLayout, { WidthProvider } from 'react-grid-layout';
|
|
11
|
+
import dayjs from 'dayjs';
|
|
12
|
+
import updateLocale from 'dayjs/plugin/updateLocale';
|
|
11
13
|
import { DatePicker, PickersDay, LocalizationProvider, TimePicker } from '@mui/x-date-pickers';
|
|
12
14
|
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
|
|
15
|
+
import utc from 'dayjs/plugin/utc';
|
|
13
16
|
|
|
14
17
|
class ApiError extends Error {
|
|
15
18
|
constructor(response, message) {
|
|
@@ -152,6 +155,7 @@ const DotAccordion = ({
|
|
|
152
155
|
ariaLabel,
|
|
153
156
|
children,
|
|
154
157
|
className,
|
|
158
|
+
'data-pendoid': dataPendoId = rootClassName$16,
|
|
155
159
|
'data-testid': dataTestId = 'dot-accordion',
|
|
156
160
|
disabled: _disabled = false,
|
|
157
161
|
expanded,
|
|
@@ -175,6 +179,7 @@ const DotAccordion = ({
|
|
|
175
179
|
return jsxs(StyledAccordion, {
|
|
176
180
|
"aria-label": ariaLabel,
|
|
177
181
|
className: rootClasses,
|
|
182
|
+
"data-pendoid": dataPendoId,
|
|
178
183
|
"data-testid": dataTestId,
|
|
179
184
|
disabled: _disabled,
|
|
180
185
|
elevation: elevation,
|
|
@@ -249,7 +254,7 @@ const StyledTextField = styled(TextField).withConfig({
|
|
|
249
254
|
})(["", ""], ({
|
|
250
255
|
theme,
|
|
251
256
|
InputProps
|
|
252
|
-
}) => css(["&.", "{.MuiInputBase-root{margin-bottom:0;}.MuiInputBase-input{box-sizing:content-box;}.MuiOutlinedInput-input{padding:", ";}.MuiInputBase-inputSizeSmall{padding-top:10.5px;padding-bottom:10.5px;&:not(textarea){height:19px;}}.MuiInputBase-inputMultiline{padding:0;}&.", " .MuiInputBase-root,.MuiInputBase-root.Mui-disabled{", ";}}.dot-select,.dot-input{&.", ",&.Mui-disabled{", ";}}&.", " .", "{margin-right:", ";}&.", ",&.", "{.", "{color:", ";p{font-size:", "px;margin:0;}.dot-icon i{margin-top:-2px;}}.MuiInputLabel-root.Mui-error{color:", ";}.MuiInputBase-root{background:", ";margin-bottom:0;}.MuiInputBase-inputSizeSmall:not(textarea){height:19px;padding-top:10.5px;padding-bottom:10.5px;}select.dot-select{padding-left:", ";}.MuiSelect-select:focus:not(.", "){background-color:transparent;}.MuiSelect-icon{right:", ";}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.", " .dot-icon{color:", ";}}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.", " .dot-icon{color:", ";}}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.", " .dot-icon{color:", ";}}.MuiOutlinedInput-adornedStart{padding-left:12px;&.", " .", "{border-color:", ";}}.MuiInputBase-inputAdornedStart{padding-left:12px;}.MuiInputBase-inputAdornedEnd{padding-right:12px;}.MuiFormHelperText-root{", ";}}"], rootClassName$15, InputProps.startAdornment ? `18px 12px 18px 0px` : `18px 12px`, readOnlyClassName$1, readOnlyStyles(theme), readOnlyClassName$1, readOnlyStyles(theme), rootSelectClassName, adornmentIconClassName, theme.spacing(2), rootSelectClassName, rootClassName$15, adornmentIconClassName, theme.palette.figma.icon.black, theme.typography.body2.fontSize, theme.palette.figma.typography.black, theme.palette.figma.neutral.normal, theme.spacing(1.5), readOnlyClassName$1, InputProps.endAdornment ? `44px` : `12px`, successClassName, theme.palette.figma.success.normal, adornmentIconClassName, theme.palette.figma.success.normal, errorClassName, theme.palette.figma.destructive.normal, adornmentIconClassName, theme.palette.figma.destructive.normal, warningClassName, theme.palette.figma.warning.normal, adornmentIconClassName, theme.palette.figma.warning.normal, warningClassName, fieldsetClassName, theme.palette.figma.warning.normal, formHelperTextRootStyles(theme)));
|
|
257
|
+
}) => css(["&.", "{.MuiInputBase-root{margin-bottom:0;}.MuiInputBase-input{box-sizing:content-box;}.MuiOutlinedInput-input{padding:", ";}.MuiInputBase-inputSizeSmall{padding-top:10.5px;padding-bottom:10.5px;&:not(textarea){height:19px;}}.MuiInputBase-inputMultiline{padding:0;}&.", " .MuiInputBase-root,.MuiInputBase-root.Mui-disabled{", ";}.MuiInputBase-adornedEnd .clear-icon-button.hidden{visibility:hidden;}}.dot-select,.dot-input{&.", ",&.Mui-disabled{", ";}}&.", " .", "{margin-right:", ";}&.", ",&.", "{.", "{color:", ";p{font-size:", "px;margin:0;}.dot-icon i{margin-top:-2px;}}.MuiInputLabel-root.Mui-error{color:", ";}.MuiInputBase-root{background:", ";margin-bottom:0;}.MuiInputBase-inputSizeSmall:not(textarea){height:19px;padding-top:10.5px;padding-bottom:10.5px;}select.dot-select{padding-left:", ";}.MuiSelect-select:focus:not(.", "){background-color:transparent;}.MuiSelect-icon{right:", ";}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.", " .dot-icon{color:", ";}}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.", " .dot-icon{color:", ";}}&.", "{.MuiOutlinedInput-notchedOutline{border-color:", ";}.", " .dot-icon{color:", ";}}.MuiOutlinedInput-adornedStart{padding-left:12px;&.", " .", "{border-color:", ";}}.MuiInputBase-inputAdornedStart{padding-left:12px;}.MuiInputBase-inputAdornedEnd{padding-right:12px;}.MuiFormHelperText-root{", ";}}"], rootClassName$15, InputProps.startAdornment ? `18px 12px 18px 0px` : `18px 12px`, readOnlyClassName$1, readOnlyStyles(theme), readOnlyClassName$1, readOnlyStyles(theme), rootSelectClassName, adornmentIconClassName, theme.spacing(2), rootSelectClassName, rootClassName$15, adornmentIconClassName, theme.palette.figma.icon.black, theme.typography.body2.fontSize, theme.palette.figma.typography.black, theme.palette.figma.neutral.normal, theme.spacing(1.5), readOnlyClassName$1, InputProps.endAdornment ? `44px` : `12px`, successClassName, theme.palette.figma.success.normal, adornmentIconClassName, theme.palette.figma.success.normal, errorClassName, theme.palette.figma.destructive.normal, adornmentIconClassName, theme.palette.figma.destructive.normal, warningClassName, theme.palette.figma.warning.normal, adornmentIconClassName, theme.palette.figma.warning.normal, warningClassName, fieldsetClassName, theme.palette.figma.warning.normal, formHelperTextRootStyles(theme)));
|
|
253
258
|
|
|
254
259
|
const rootClassName$14 = 'dot-action-toolbar';
|
|
255
260
|
const StyledToolbar = styled(Toolbar).withConfig({
|
|
@@ -1346,6 +1351,7 @@ const DotAlertBanner = ({
|
|
|
1346
1351
|
ariaLabel,
|
|
1347
1352
|
children,
|
|
1348
1353
|
className,
|
|
1354
|
+
'data-pendoid': dataPendoId = rootClassName$13,
|
|
1349
1355
|
'data-testid': dataTestId,
|
|
1350
1356
|
onClose,
|
|
1351
1357
|
roundedCorners: _roundedCorners = true,
|
|
@@ -1372,6 +1378,7 @@ const DotAlertBanner = ({
|
|
|
1372
1378
|
classes: {
|
|
1373
1379
|
root: rootClasses
|
|
1374
1380
|
},
|
|
1381
|
+
"data-pendoid": dataPendoId,
|
|
1375
1382
|
"data-testid": dataTestId,
|
|
1376
1383
|
iconMapping: AlertBannerIconMapping,
|
|
1377
1384
|
onClose: onClose,
|
|
@@ -2151,6 +2158,7 @@ const DotButton = /*#__PURE__*/forwardRef(({
|
|
|
2151
2158
|
autoFocus: _autoFocus = false,
|
|
2152
2159
|
children,
|
|
2153
2160
|
className,
|
|
2161
|
+
'data-pendoid': dataPendoId = rootClassName$11,
|
|
2154
2162
|
'data-testid': dataTestId,
|
|
2155
2163
|
disabled: _disabled = false,
|
|
2156
2164
|
disableRipple: _disableRipple = false,
|
|
@@ -2195,6 +2203,7 @@ const DotButton = /*#__PURE__*/forwardRef(({
|
|
|
2195
2203
|
root: rootClasses
|
|
2196
2204
|
},
|
|
2197
2205
|
color: color,
|
|
2206
|
+
"data-pendoid": dataPendoId,
|
|
2198
2207
|
"data-testid": dataTestId,
|
|
2199
2208
|
disableRipple: _disableRipple,
|
|
2200
2209
|
disabled: _disabled,
|
|
@@ -2226,6 +2235,7 @@ const DotLink = ({
|
|
|
2226
2235
|
children,
|
|
2227
2236
|
className,
|
|
2228
2237
|
color: _color = 'primary',
|
|
2238
|
+
'data-pendoid': dataPendoId = rootClassName$10,
|
|
2229
2239
|
'data-testid': dataTestId,
|
|
2230
2240
|
href,
|
|
2231
2241
|
onClick,
|
|
@@ -2262,6 +2272,7 @@ const DotLink = ({
|
|
|
2262
2272
|
root: rootClasses
|
|
2263
2273
|
},
|
|
2264
2274
|
color: _color === 'initial' ? 'inherit' : _color,
|
|
2275
|
+
"data-pendoid": dataPendoId,
|
|
2265
2276
|
"data-testid": dataTestId,
|
|
2266
2277
|
href: href,
|
|
2267
2278
|
onClick: onClick,
|
|
@@ -2544,6 +2555,7 @@ const DotMenuList = /*#__PURE__*/forwardRef(({
|
|
|
2544
2555
|
ariaLabel: itemAriaLabel,
|
|
2545
2556
|
children,
|
|
2546
2557
|
classes,
|
|
2558
|
+
'data-pendoid': dataPendoId = 'dot-menu-list-item',
|
|
2547
2559
|
disabled,
|
|
2548
2560
|
divider,
|
|
2549
2561
|
height,
|
|
@@ -2571,6 +2583,7 @@ const DotMenuList = /*#__PURE__*/forwardRef(({
|
|
|
2571
2583
|
autoFocus: hasAutoFocus,
|
|
2572
2584
|
"aria-label": itemAriaLabel,
|
|
2573
2585
|
className: menuItemClasses,
|
|
2586
|
+
"data-pendoid": dataPendoId,
|
|
2574
2587
|
disabled: disabled,
|
|
2575
2588
|
disableRipple: hasSubmenu,
|
|
2576
2589
|
divider: divider,
|
|
@@ -2737,6 +2750,7 @@ const DotIconButton = ({
|
|
|
2737
2750
|
ariaRole: _ariaRole = 'button',
|
|
2738
2751
|
className,
|
|
2739
2752
|
color: _color = 'inherit',
|
|
2753
|
+
'data-pendoid': dataPendoId = rootClassName$U,
|
|
2740
2754
|
'data-testid': dataTestId,
|
|
2741
2755
|
disabled: _disabled = false,
|
|
2742
2756
|
disableRipple: _disableRipple = false,
|
|
@@ -2758,6 +2772,7 @@ const DotIconButton = ({
|
|
|
2758
2772
|
root: rootClasses
|
|
2759
2773
|
},
|
|
2760
2774
|
color: _color,
|
|
2775
|
+
"data-pendoid": dataPendoId,
|
|
2761
2776
|
"data-testid": dataTestId,
|
|
2762
2777
|
disableRipple: _disableRipple,
|
|
2763
2778
|
disabled: _disabled,
|
|
@@ -2860,6 +2875,7 @@ const DotDrawer = ({
|
|
|
2860
2875
|
ariaRole: _ariaRole = 'dialog',
|
|
2861
2876
|
className,
|
|
2862
2877
|
children,
|
|
2878
|
+
'data-pendoid': dataPendoId = rootClassName$W,
|
|
2863
2879
|
'data-testid': dataTestId,
|
|
2864
2880
|
drawerBodyProps,
|
|
2865
2881
|
drawerFooterProps,
|
|
@@ -2885,6 +2901,7 @@ const DotDrawer = ({
|
|
|
2885
2901
|
const rootClasses = useStylesWithRootClass(rootClassName$W, className);
|
|
2886
2902
|
const backdropEnabled = _variant === 'temporary' && !(ModalProps === null || ModalProps === void 0 ? void 0 : ModalProps.hideBackdrop);
|
|
2887
2903
|
const headerExists = !!drawerHeaderProps;
|
|
2904
|
+
const bodyPendoId = drawerBodyProps ? drawerBodyProps['data-pendoid'] : 'drawer-body';
|
|
2888
2905
|
const bodyTestId = drawerBodyProps ? drawerBodyProps[`data-testid`] : 'drawer-body';
|
|
2889
2906
|
return jsxs(StyledDrawer, {
|
|
2890
2907
|
ModalProps: ModalProps,
|
|
@@ -2899,6 +2916,7 @@ const DotDrawer = ({
|
|
|
2899
2916
|
root: rootClasses,
|
|
2900
2917
|
paper: 'dot-drawer-paper'
|
|
2901
2918
|
},
|
|
2919
|
+
"data-pendoid": dataPendoId,
|
|
2902
2920
|
"data-testid": dataTestId,
|
|
2903
2921
|
height: height,
|
|
2904
2922
|
onClose: handleClose,
|
|
@@ -2908,12 +2926,14 @@ const DotDrawer = ({
|
|
|
2908
2926
|
width: _width,
|
|
2909
2927
|
children: [drawerHeaderProps && jsx(DotDrawerHeader, {
|
|
2910
2928
|
className: drawerHeaderProps.className,
|
|
2929
|
+
"data-pendoid": drawerHeaderProps['data-pendoid'],
|
|
2911
2930
|
"data-testid": drawerHeaderProps[`data-testid`],
|
|
2912
2931
|
onClose: handleClose,
|
|
2913
2932
|
variant: _variant,
|
|
2914
2933
|
children: drawerHeaderProps.children
|
|
2915
2934
|
}), drawerBodyProps && jsx(DotDrawerBody, {
|
|
2916
2935
|
className: drawerBodyProps === null || drawerBodyProps === void 0 ? void 0 : drawerBodyProps.className,
|
|
2936
|
+
"data-pendoid": bodyPendoId,
|
|
2917
2937
|
"data-testid": bodyTestId,
|
|
2918
2938
|
headerExists: headerExists,
|
|
2919
2939
|
onClose: handleClose,
|
|
@@ -2921,6 +2941,7 @@ const DotDrawer = ({
|
|
|
2921
2941
|
children: drawerBodyProps.children
|
|
2922
2942
|
}), !drawerBodyProps && children, drawerFooterProps && jsx(DotDrawerFooter, {
|
|
2923
2943
|
className: drawerFooterProps.className,
|
|
2944
|
+
"data-pendoid": drawerFooterProps['data-pendoid'],
|
|
2924
2945
|
"data-testid": drawerFooterProps[`data-testid`],
|
|
2925
2946
|
children: drawerFooterProps.children
|
|
2926
2947
|
})]
|
|
@@ -3056,6 +3077,7 @@ const DotListItem = ({
|
|
|
3056
3077
|
ariaRole: _ariaRole = 'listitem',
|
|
3057
3078
|
className,
|
|
3058
3079
|
component: _component = 'li',
|
|
3080
|
+
'data-pendoid': dataPendoId = listItemRootClass,
|
|
3059
3081
|
'data-testid': dataTestId,
|
|
3060
3082
|
divider: _divider = false,
|
|
3061
3083
|
endIcon,
|
|
@@ -3134,6 +3156,7 @@ const DotListItem = ({
|
|
|
3134
3156
|
root: rootClasses
|
|
3135
3157
|
},
|
|
3136
3158
|
component: _component,
|
|
3159
|
+
"data-pendoid": dataPendoId,
|
|
3137
3160
|
"data-testid": dataTestId,
|
|
3138
3161
|
divider: _divider,
|
|
3139
3162
|
href: onClick ? null : href,
|
|
@@ -3281,6 +3304,96 @@ const DotList = ({
|
|
|
3281
3304
|
});
|
|
3282
3305
|
};
|
|
3283
3306
|
|
|
3307
|
+
const rootClassName$R = 'dot-copy-button';
|
|
3308
|
+
const StyledCopyButton = styled.span.withConfig({
|
|
3309
|
+
displayName: "CopyButtonstyles__StyledCopyButton",
|
|
3310
|
+
componentId: "sc-18ff0u-0"
|
|
3311
|
+
})(["", ""], ({
|
|
3312
|
+
theme
|
|
3313
|
+
}) => css(["&.", " .copied-to-clipboard{color:", ";&.MuiIcon-fontSizeSmall.button-size-small{padding:4px;}&.MuiIcon-fontSizeMedium.button-size-small{padding:3px;}&.MuiIcon-fontSizeSmall.button-size-medium{padding:11px;}&.MuiIcon-fontSizeMedium.button-size-medium{padding:10px;}}"], rootClassName$R, theme.palette.figma.success.normal));
|
|
3314
|
+
|
|
3315
|
+
const DotCopyButton = ({
|
|
3316
|
+
ariaLabel: _ariaLabel = 'Copy to clipboard',
|
|
3317
|
+
ariaRole: _ariaRole = 'button',
|
|
3318
|
+
className,
|
|
3319
|
+
color: _color = 'inherit',
|
|
3320
|
+
copiedTooltip: _copiedTooltip = 'Copied!',
|
|
3321
|
+
copyTooltip: _copyTooltip = 'Copy to clipboard',
|
|
3322
|
+
'data-pendoid': dataPendoId = rootClassName$R,
|
|
3323
|
+
'data-testid': dataTestId = 'dot-copy-button',
|
|
3324
|
+
disabled: _disabled = false,
|
|
3325
|
+
disableRipple: _disableRipple = false,
|
|
3326
|
+
iconId: _iconId = 'duplicate',
|
|
3327
|
+
iconSize: _iconSize = 'small',
|
|
3328
|
+
onClick: _onClick = null,
|
|
3329
|
+
shape: _shape = 'circle',
|
|
3330
|
+
showCopiedIcon: _showCopiedIcon = true,
|
|
3331
|
+
size: _size = 'small',
|
|
3332
|
+
tooltip,
|
|
3333
|
+
value
|
|
3334
|
+
}) => {
|
|
3335
|
+
const [timedShowCopiedIcon, setTimedShowCopiedIcon] = useState(false);
|
|
3336
|
+
const [timedDisabled, setTimedDisabled] = useState(false);
|
|
3337
|
+
// To keep backward compatibility if tooltip is not set, use copyTooltip
|
|
3338
|
+
if (!tooltip) {
|
|
3339
|
+
tooltip = _copyTooltip;
|
|
3340
|
+
}
|
|
3341
|
+
const copyToClipboard = useCallback(() => {
|
|
3342
|
+
// The check for navigator.clipboard.writeText is because this function is
|
|
3343
|
+
// only supported in secure contexts (https). This will always be the case in
|
|
3344
|
+
// production but not when running locally.
|
|
3345
|
+
if (!navigator.clipboard || !navigator.clipboard.writeText) {
|
|
3346
|
+
console.warn('Copy to clipboard is only supported in secure context (https)', value);
|
|
3347
|
+
} else {
|
|
3348
|
+
navigator.clipboard.writeText(value);
|
|
3349
|
+
}
|
|
3350
|
+
}, [value]);
|
|
3351
|
+
const copy = useCallback(event => {
|
|
3352
|
+
copyToClipboard();
|
|
3353
|
+
if (_showCopiedIcon) {
|
|
3354
|
+
setTimedShowCopiedIcon(true);
|
|
3355
|
+
setTimeout(function () {
|
|
3356
|
+
setTimedShowCopiedIcon(false);
|
|
3357
|
+
}, 3000);
|
|
3358
|
+
} else if (!_disabled) {
|
|
3359
|
+
setTimedDisabled(true);
|
|
3360
|
+
setTimeout(function () {
|
|
3361
|
+
setTimedDisabled(false);
|
|
3362
|
+
}, 3000);
|
|
3363
|
+
}
|
|
3364
|
+
if (_onClick) {
|
|
3365
|
+
return _onClick(event);
|
|
3366
|
+
}
|
|
3367
|
+
return false;
|
|
3368
|
+
}, [value, _showCopiedIcon, _disabled, _onClick]);
|
|
3369
|
+
return jsxs(StyledCopyButton, {
|
|
3370
|
+
className: rootClassName$R,
|
|
3371
|
+
"data-testid": dataTestId,
|
|
3372
|
+
children: [!timedShowCopiedIcon && jsx(DotIconButton, {
|
|
3373
|
+
ariaLabel: _ariaLabel,
|
|
3374
|
+
ariaRole: _ariaRole,
|
|
3375
|
+
className: className,
|
|
3376
|
+
color: _color,
|
|
3377
|
+
"data-pendoid": dataPendoId,
|
|
3378
|
+
"data-testid": `${dataTestId}-button`,
|
|
3379
|
+
disabled: _disabled || timedDisabled,
|
|
3380
|
+
disableRipple: _disableRipple,
|
|
3381
|
+
iconId: _iconId,
|
|
3382
|
+
iconSize: _iconSize,
|
|
3383
|
+
onClick: copy,
|
|
3384
|
+
shape: _shape,
|
|
3385
|
+
size: _size,
|
|
3386
|
+
tooltip: tooltip
|
|
3387
|
+
}), timedShowCopiedIcon && jsx(DotIcon, {
|
|
3388
|
+
className: `copied-to-clipboard button-size-${_size}`,
|
|
3389
|
+
"data-testid": `${dataTestId}-icon`,
|
|
3390
|
+
fontSize: _iconSize,
|
|
3391
|
+
iconId: "check-solid",
|
|
3392
|
+
tooltip: _copiedTooltip
|
|
3393
|
+
})]
|
|
3394
|
+
});
|
|
3395
|
+
};
|
|
3396
|
+
|
|
3284
3397
|
const DotInputLabel = ({
|
|
3285
3398
|
'data-testid': dataTestId,
|
|
3286
3399
|
disabled: _disabled = false,
|
|
@@ -3335,14 +3448,15 @@ const EndAdornment = ({
|
|
|
3335
3448
|
children: styledAdornment
|
|
3336
3449
|
}) : styledAdornment;
|
|
3337
3450
|
};
|
|
3338
|
-
const getInitialState = value => ({
|
|
3339
|
-
inputValue: value || ''
|
|
3451
|
+
const getInitialState = (value, defaultValue) => ({
|
|
3452
|
+
inputValue: value || defaultValue || ''
|
|
3340
3453
|
});
|
|
3341
3454
|
const DotInputText = ({
|
|
3342
3455
|
autoComplete: _autoComplete = 'off',
|
|
3343
3456
|
autoFocus,
|
|
3344
3457
|
className,
|
|
3345
3458
|
defaultValue,
|
|
3459
|
+
'data-pendoid': dataPendoId = rootClassName$15,
|
|
3346
3460
|
'data-testid': dataTestId,
|
|
3347
3461
|
disabled: _disabled = false,
|
|
3348
3462
|
error: _error = false,
|
|
@@ -3365,6 +3479,7 @@ const DotInputText = ({
|
|
|
3365
3479
|
name,
|
|
3366
3480
|
onBlur,
|
|
3367
3481
|
onChange,
|
|
3482
|
+
onClear,
|
|
3368
3483
|
onFocus,
|
|
3369
3484
|
onKeyDown,
|
|
3370
3485
|
onMouseUp,
|
|
@@ -3384,14 +3499,13 @@ const DotInputText = ({
|
|
|
3384
3499
|
const hasWarning = !_error && _warning && warningClassName;
|
|
3385
3500
|
const hasSuccess = !_error && !_warning && success && successClassName;
|
|
3386
3501
|
const hasEndAdornmentIcon = endIcon || _error || hasWarning || hasSuccess;
|
|
3387
|
-
|
|
3388
|
-
const
|
|
3502
|
+
const internalInputRef = useRef(null);
|
|
3503
|
+
const textFieldInputRef = inputRef || internalInputRef;
|
|
3504
|
+
const [inputTextState, setInputTextState] = useState(getInitialState(value));
|
|
3389
3505
|
const rootStyles = useStylesWithRootClass(rootClassName$15, hasError, hasWarning, hasSuccess, _readOnly && readOnlyClassName$1);
|
|
3390
|
-
// Used to control text value from the consumer component
|
|
3391
|
-
// when debounce feature is enabled
|
|
3392
3506
|
useEffect(() => {
|
|
3393
|
-
if (
|
|
3394
|
-
setInputTextState(getInitialState(value));
|
|
3507
|
+
if (value !== inputTextState.inputValue) {
|
|
3508
|
+
setInputTextState(getInitialState(value, defaultValue));
|
|
3395
3509
|
}
|
|
3396
3510
|
}, [value]);
|
|
3397
3511
|
// Improve performance by avoiding callback execution
|
|
@@ -3406,17 +3520,21 @@ const DotInputText = ({
|
|
|
3406
3520
|
return () => clearTimeout(handler);
|
|
3407
3521
|
}, [inputTextState]);
|
|
3408
3522
|
const handleChange = e => {
|
|
3409
|
-
|
|
3410
|
-
// so that we can set initial state via 'value' prop (if needed)
|
|
3411
|
-
hasDebounce ? setInputTextState({
|
|
3523
|
+
setInputTextState({
|
|
3412
3524
|
changeEvent: e,
|
|
3413
3525
|
inputValue: e.target.value
|
|
3414
|
-
})
|
|
3526
|
+
});
|
|
3527
|
+
!hasDebounce && (onChange === null || onChange === void 0 ? void 0 : onChange(e));
|
|
3528
|
+
};
|
|
3529
|
+
const handleClearButtonClick = () => {
|
|
3530
|
+
setInputTextState({
|
|
3531
|
+
inputValue: ''
|
|
3532
|
+
});
|
|
3533
|
+
if ('current' in textFieldInputRef) {
|
|
3534
|
+
textFieldInputRef.current.focus();
|
|
3535
|
+
}
|
|
3536
|
+
onClear();
|
|
3415
3537
|
};
|
|
3416
|
-
const inputTextValue = hasDebounce ? inputTextState.inputValue : value;
|
|
3417
|
-
// Don't use default value when debounce feature is enabled because
|
|
3418
|
-
// in that case component is controlled
|
|
3419
|
-
const defaultInputValue = hasDebounce ? undefined : defaultValue;
|
|
3420
3538
|
const startAdornmentIcon = () => {
|
|
3421
3539
|
if (!startIcon) return null;
|
|
3422
3540
|
return jsx(StyledAdornment, {
|
|
@@ -3437,6 +3555,27 @@ const DotInputText = ({
|
|
|
3437
3555
|
warning: _warning
|
|
3438
3556
|
});
|
|
3439
3557
|
};
|
|
3558
|
+
const getClearIconButton = () => {
|
|
3559
|
+
if (!onClear) return null;
|
|
3560
|
+
const clearIconButtonClasses = useStylesWithRootClass('clear-icon-button', inputTextState.inputValue === '' ? 'hidden' : '');
|
|
3561
|
+
return jsx(DotIconButton, {
|
|
3562
|
+
className: clearIconButtonClasses,
|
|
3563
|
+
"data-testid": dataTestId && `${dataTestId}-clear-btn`,
|
|
3564
|
+
iconId: "close",
|
|
3565
|
+
size: "small",
|
|
3566
|
+
onClick: handleClearButtonClick
|
|
3567
|
+
});
|
|
3568
|
+
};
|
|
3569
|
+
const getEndAdornment = () => {
|
|
3570
|
+
const iconOrText = endAdornmentIconOrText();
|
|
3571
|
+
const clearIconButton = getClearIconButton();
|
|
3572
|
+
if (iconOrText || clearIconButton) {
|
|
3573
|
+
return jsxs(Fragment, {
|
|
3574
|
+
children: [iconOrText, clearIconButton]
|
|
3575
|
+
});
|
|
3576
|
+
}
|
|
3577
|
+
return null;
|
|
3578
|
+
};
|
|
3440
3579
|
const wrapperClassName = useStylesWithRootClass(_fullWidth !== false ? 'dot-input-text--fullwidth' : '', className);
|
|
3441
3580
|
const inputClassName = useStylesWithRootClass('dot-input', _readOnly && readOnlyClassName$1);
|
|
3442
3581
|
return jsxs(StyledTextFieldContainer, {
|
|
@@ -3450,7 +3589,7 @@ const DotInputText = ({
|
|
|
3450
3589
|
}), jsx(StyledTextField, {
|
|
3451
3590
|
InputProps: {
|
|
3452
3591
|
startAdornment: startAdornmentIcon(),
|
|
3453
|
-
endAdornment:
|
|
3592
|
+
endAdornment: getEndAdornment()
|
|
3454
3593
|
},
|
|
3455
3594
|
"aria-label": name || label,
|
|
3456
3595
|
autoComplete: _autoComplete,
|
|
@@ -3458,7 +3597,6 @@ const DotInputText = ({
|
|
|
3458
3597
|
classes: {
|
|
3459
3598
|
root: rootStyles
|
|
3460
3599
|
},
|
|
3461
|
-
defaultValue: defaultInputValue,
|
|
3462
3600
|
disabled: _disabled,
|
|
3463
3601
|
error: _error,
|
|
3464
3602
|
fullWidth: _fullWidth,
|
|
@@ -3469,6 +3607,7 @@ const DotInputText = ({
|
|
|
3469
3607
|
},
|
|
3470
3608
|
inputProps: {
|
|
3471
3609
|
className: inputClassName,
|
|
3610
|
+
'data-pendoid': dataPendoId,
|
|
3472
3611
|
'data-testid': dataTestId,
|
|
3473
3612
|
max,
|
|
3474
3613
|
maxLength: maxLength,
|
|
@@ -3477,14 +3616,14 @@ const DotInputText = ({
|
|
|
3477
3616
|
readOnly: _readOnly,
|
|
3478
3617
|
tabIndex: 0
|
|
3479
3618
|
},
|
|
3480
|
-
inputRef:
|
|
3619
|
+
inputRef: textFieldInputRef,
|
|
3481
3620
|
label: persistentLabel ? null : label,
|
|
3482
3621
|
maxRows: _multiline ? maxRows : null,
|
|
3483
3622
|
minRows: _multiline ? minRows : null,
|
|
3484
3623
|
multiline: _multiline,
|
|
3485
3624
|
name: name,
|
|
3486
3625
|
onBlur: onBlur,
|
|
3487
|
-
onChange:
|
|
3626
|
+
onChange: handleChange,
|
|
3488
3627
|
onFocus: onFocus,
|
|
3489
3628
|
onKeyDown: onKeyDown,
|
|
3490
3629
|
onMouseUp: onMouseUp,
|
|
@@ -3493,17 +3632,17 @@ const DotInputText = ({
|
|
|
3493
3632
|
role: "textbox",
|
|
3494
3633
|
size: _size,
|
|
3495
3634
|
type: _type,
|
|
3496
|
-
value:
|
|
3635
|
+
value: inputTextState.inputValue,
|
|
3497
3636
|
variant: "outlined"
|
|
3498
3637
|
})]
|
|
3499
3638
|
});
|
|
3500
3639
|
};
|
|
3501
3640
|
|
|
3502
|
-
const rootClassName$
|
|
3641
|
+
const rootClassName$Q = 'dot-search-input';
|
|
3503
3642
|
const StyledSearchInput = styled.span.withConfig({
|
|
3504
3643
|
displayName: "SearchInputstyles__StyledSearchInput",
|
|
3505
3644
|
componentId: "qlwzku-0"
|
|
3506
|
-
})(["", ""], () => css(["&.", "{}"], rootClassName$
|
|
3645
|
+
})(["", ""], () => css(["&.", "{}"], rootClassName$Q));
|
|
3507
3646
|
|
|
3508
3647
|
function SearchInput({
|
|
3509
3648
|
'data-testid': dataTestId,
|
|
@@ -3517,7 +3656,7 @@ function SearchInput({
|
|
|
3517
3656
|
tooltip = null,
|
|
3518
3657
|
value
|
|
3519
3658
|
}) {
|
|
3520
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
3659
|
+
const rootClasses = useStylesWithRootClass(rootClassName$Q, className);
|
|
3521
3660
|
const [searchText, setSearchText] = useState(value);
|
|
3522
3661
|
let previousSearchText = '';
|
|
3523
3662
|
const handleChange = useCallback(event => {
|
|
@@ -3568,94 +3707,6 @@ function SearchInput({
|
|
|
3568
3707
|
});
|
|
3569
3708
|
}
|
|
3570
3709
|
|
|
3571
|
-
const rootClassName$Q = 'dot-copy-button';
|
|
3572
|
-
const StyledCopyButton = styled.span.withConfig({
|
|
3573
|
-
displayName: "CopyButtonstyles__StyledCopyButton",
|
|
3574
|
-
componentId: "sc-18ff0u-0"
|
|
3575
|
-
})(["", ""], ({
|
|
3576
|
-
theme
|
|
3577
|
-
}) => css(["&.", " .copied-to-clipboard{color:", ";&.MuiIcon-fontSizeSmall.button-size-small{padding:4px;}&.MuiIcon-fontSizeMedium.button-size-small{padding:3px;}&.MuiIcon-fontSizeSmall.button-size-medium{padding:11px;}&.MuiIcon-fontSizeMedium.button-size-medium{padding:10px;}}"], rootClassName$Q, theme.palette.figma.success.normal));
|
|
3578
|
-
|
|
3579
|
-
const DotCopyButton = ({
|
|
3580
|
-
ariaLabel: _ariaLabel = 'Copy to clipboard',
|
|
3581
|
-
ariaRole: _ariaRole = 'button',
|
|
3582
|
-
className,
|
|
3583
|
-
color: _color = 'inherit',
|
|
3584
|
-
copiedTooltip: _copiedTooltip = 'Copied!',
|
|
3585
|
-
copyTooltip: _copyTooltip = 'Copy to clipboard',
|
|
3586
|
-
'data-testid': dataTestId = 'dot-copy-button',
|
|
3587
|
-
disabled: _disabled = false,
|
|
3588
|
-
disableRipple: _disableRipple = false,
|
|
3589
|
-
iconId: _iconId = 'duplicate',
|
|
3590
|
-
iconSize: _iconSize = 'small',
|
|
3591
|
-
onClick: _onClick = null,
|
|
3592
|
-
shape: _shape = 'circle',
|
|
3593
|
-
showCopiedIcon: _showCopiedIcon = true,
|
|
3594
|
-
size: _size = 'small',
|
|
3595
|
-
tooltip,
|
|
3596
|
-
value
|
|
3597
|
-
}) => {
|
|
3598
|
-
const [timedShowCopiedIcon, setTimedShowCopiedIcon] = useState(false);
|
|
3599
|
-
const [timedDisabled, setTimedDisabled] = useState(false);
|
|
3600
|
-
// To keep backward compatibility if tooltip is not set, use copyTooltip
|
|
3601
|
-
if (!tooltip) {
|
|
3602
|
-
tooltip = _copyTooltip;
|
|
3603
|
-
}
|
|
3604
|
-
const copyToClipboard = useCallback(() => {
|
|
3605
|
-
// The check for navigator.clipboard.writeText is because this function is
|
|
3606
|
-
// only supported in secure contexts (https). This will always be the case in
|
|
3607
|
-
// production but not when running locally.
|
|
3608
|
-
if (!navigator.clipboard || !navigator.clipboard.writeText) {
|
|
3609
|
-
console.warn('Copy to clipboard is only supported in secure context (https)', value);
|
|
3610
|
-
} else {
|
|
3611
|
-
navigator.clipboard.writeText(value);
|
|
3612
|
-
}
|
|
3613
|
-
}, [value]);
|
|
3614
|
-
const copy = useCallback(event => {
|
|
3615
|
-
copyToClipboard();
|
|
3616
|
-
if (_showCopiedIcon) {
|
|
3617
|
-
setTimedShowCopiedIcon(true);
|
|
3618
|
-
setTimeout(function () {
|
|
3619
|
-
setTimedShowCopiedIcon(false);
|
|
3620
|
-
}, 3000);
|
|
3621
|
-
} else if (!_disabled) {
|
|
3622
|
-
setTimedDisabled(true);
|
|
3623
|
-
setTimeout(function () {
|
|
3624
|
-
setTimedDisabled(false);
|
|
3625
|
-
}, 3000);
|
|
3626
|
-
}
|
|
3627
|
-
if (_onClick) {
|
|
3628
|
-
return _onClick(event);
|
|
3629
|
-
}
|
|
3630
|
-
return false;
|
|
3631
|
-
}, [value, _showCopiedIcon, _disabled, _onClick]);
|
|
3632
|
-
return jsxs(StyledCopyButton, {
|
|
3633
|
-
className: rootClassName$Q,
|
|
3634
|
-
"data-testid": dataTestId,
|
|
3635
|
-
children: [!timedShowCopiedIcon && jsx(DotIconButton, {
|
|
3636
|
-
ariaLabel: _ariaLabel,
|
|
3637
|
-
ariaRole: _ariaRole,
|
|
3638
|
-
className: className,
|
|
3639
|
-
color: _color,
|
|
3640
|
-
"data-testid": `${dataTestId}-button`,
|
|
3641
|
-
disabled: _disabled || timedDisabled,
|
|
3642
|
-
disableRipple: _disableRipple,
|
|
3643
|
-
iconId: _iconId,
|
|
3644
|
-
iconSize: _iconSize,
|
|
3645
|
-
onClick: copy,
|
|
3646
|
-
shape: _shape,
|
|
3647
|
-
size: _size,
|
|
3648
|
-
tooltip: tooltip
|
|
3649
|
-
}), timedShowCopiedIcon && jsx(DotIcon, {
|
|
3650
|
-
className: `copied-to-clipboard button-size-${_size}`,
|
|
3651
|
-
"data-testid": `${dataTestId}-icon`,
|
|
3652
|
-
fontSize: _iconSize,
|
|
3653
|
-
iconId: "check-solid",
|
|
3654
|
-
tooltip: _copiedTooltip
|
|
3655
|
-
})]
|
|
3656
|
-
});
|
|
3657
|
-
};
|
|
3658
|
-
|
|
3659
3710
|
var img$6 = "data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z' fill='%23279FEA'/%3e%3cpath d='M12.4332 16.3533V14.8333H11.5665V16.3533L10.7432 15.8933L9.85651 16.4033L11.9998 17.6366L14.1932 16.3733L13.3332 15.8766L12.4332 16.3533Z' fill='white'/%3e%3cpath d='M7.99328 10.1866L9.24661 10.9132L9.67995 10.1399L8.36995 9.4299L9.09328 9.01657V8.03323L7.11328 9.18323L7.11661 11.5532L7.99328 11.0566V10.1866Z' fill='white'/%3e%3cpath d='M14.6934 10.9133L15.9934 10.1733L15.99 11.0566L16.8867 11.5599V9.1766L14.81 7.98993L14.7767 8.9566L15.6167 9.45326L14.29 10.0799L14.6934 10.9133Z' fill='white'/%3e%3cpath d='M16.8801 12.5435L16.0001 12.0402V12.0935V13.7068L12.4167 11.6868V7.61015L13.9667 8.49015V7.51682L12.0001 6.35349L9.95006 7.52348V8.52348L11.4967 7.63015V11.6868L8.00006 13.8168V12.0202L7.12006 12.5235V14.8202L8.96672 15.8502L9.86672 15.3335L8.40006 14.5268L12.0001 12.4368L15.5567 14.5035L14.1301 15.3268L15.0567 15.8701L16.8701 14.8268L16.8801 12.5435Z' fill='white'/%3e%3c/svg%3e";
|
|
3660
3711
|
|
|
3661
3712
|
var img$5 = "data:image/svg+xml,%3csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z' fill='%23279FEA'/%3e%3cpath d='M14.1867 11.2667L12.1634 10.0833L10.1367 11.2667V13.62L12.1634 14.7867L14.1867 13.62V11.2667Z' fill='white'/%3e%3cpath d='M8.43666 12.0001L7.47333 11.1501V15.1667L10.41 16.8367V15.7034L8.43666 14.5401V12.0001Z' fill='white'/%3e%3cpath d='M15.8965 12V14.5833L13.9632 15.7033V16.9367L16.8532 15.1533V11.0967L15.8965 12Z' fill='white'/%3e%3cpath d='M12.1565 8.13333L14.7165 9.61333L15.4165 8.89L12.1565 7L8.87988 8.90667L9.57988 9.63333L12.1565 8.13333Z' fill='white'/%3e%3c/svg%3e";
|
|
@@ -4717,6 +4768,7 @@ const DotChip = ({
|
|
|
4717
4768
|
charactersLimit: _charactersLimit = DEFAULT_CHARACTERS_LIMIT,
|
|
4718
4769
|
children,
|
|
4719
4770
|
className,
|
|
4771
|
+
'data-pendoid': dataPendoId = rootClassName$J,
|
|
4720
4772
|
'data-testid': dataTestId,
|
|
4721
4773
|
disabled: _disabled = false,
|
|
4722
4774
|
error: _error = false,
|
|
@@ -4747,6 +4799,7 @@ const DotChip = ({
|
|
|
4747
4799
|
},
|
|
4748
4800
|
clickable: _isClickable,
|
|
4749
4801
|
color: "default",
|
|
4802
|
+
"data-pendoid": dataPendoId,
|
|
4750
4803
|
"data-testid": dataTestId,
|
|
4751
4804
|
disabled: _disabled,
|
|
4752
4805
|
icon: avatar ? null : startIcon,
|
|
@@ -4825,6 +4878,7 @@ const DotAutoComplete = ({
|
|
|
4825
4878
|
ariaLabel,
|
|
4826
4879
|
autoFocus,
|
|
4827
4880
|
className,
|
|
4881
|
+
'data-pendoid': dataPendoId = rootClassName$K,
|
|
4828
4882
|
'data-testid': dataTestId,
|
|
4829
4883
|
defaultValue,
|
|
4830
4884
|
dense: _dense = true,
|
|
@@ -5046,6 +5100,7 @@ const DotAutoComplete = ({
|
|
|
5046
5100
|
root: rootClasses,
|
|
5047
5101
|
inputRoot: inputRootClasses
|
|
5048
5102
|
},
|
|
5103
|
+
"data-pendoid": dataPendoId,
|
|
5049
5104
|
"data-testid": dataTestId,
|
|
5050
5105
|
defaultValue: _multiple && isString$1(defaultValue) ? [defaultValue] : defaultValue,
|
|
5051
5106
|
disabled: _disabled,
|
|
@@ -5521,6 +5576,7 @@ const DotButtonToggle = ({
|
|
|
5521
5576
|
buttonOptions,
|
|
5522
5577
|
className,
|
|
5523
5578
|
color,
|
|
5579
|
+
'data-pendoid': dataPendoId = rootClassName$G,
|
|
5524
5580
|
'data-testid': dataTestId = 'dot-toggle',
|
|
5525
5581
|
disableFocusRipple: _disableFocusRipple = false,
|
|
5526
5582
|
disableRipple: _disableRipple = false,
|
|
@@ -5574,6 +5630,7 @@ const DotButtonToggle = ({
|
|
|
5574
5630
|
root: rootClasses
|
|
5575
5631
|
},
|
|
5576
5632
|
color: color,
|
|
5633
|
+
"data-pendoid": dataPendoId,
|
|
5577
5634
|
"data-testid": dataTestId,
|
|
5578
5635
|
exclusive: _exclusive,
|
|
5579
5636
|
onChange: onChange,
|
|
@@ -5720,6 +5777,7 @@ function DotCheckbox({
|
|
|
5720
5777
|
ariaLabelledby,
|
|
5721
5778
|
checked,
|
|
5722
5779
|
className,
|
|
5780
|
+
'data-pendoid': dataPendoId = rootClassName$D,
|
|
5723
5781
|
'data-testid': dataTestId,
|
|
5724
5782
|
disabled,
|
|
5725
5783
|
disableRipple,
|
|
@@ -5744,6 +5802,7 @@ function DotCheckbox({
|
|
|
5744
5802
|
root: rootClassName$C
|
|
5745
5803
|
},
|
|
5746
5804
|
color: "primary",
|
|
5805
|
+
"data-pendoid": dataPendoId,
|
|
5747
5806
|
"data-testid": dataTestId,
|
|
5748
5807
|
disableRipple: disableRipple,
|
|
5749
5808
|
disabled: disabled,
|
|
@@ -5943,6 +6002,7 @@ const DotDialog = ({
|
|
|
5943
6002
|
cancelButtonProps,
|
|
5944
6003
|
cancelButtonVisible: _cancelButtonVisible = true,
|
|
5945
6004
|
className,
|
|
6005
|
+
'data-pendoid': dataPendoId = rootClassName$y,
|
|
5946
6006
|
'data-testid': dataTestId,
|
|
5947
6007
|
children,
|
|
5948
6008
|
closeIconVisible,
|
|
@@ -5987,6 +6047,7 @@ const DotDialog = ({
|
|
|
5987
6047
|
classes: {
|
|
5988
6048
|
root: rootClasses
|
|
5989
6049
|
},
|
|
6050
|
+
"data-pendoid": dataPendoId,
|
|
5990
6051
|
"data-testid": dataTestId,
|
|
5991
6052
|
onClose: handleClickAway,
|
|
5992
6053
|
open: isOpen,
|
|
@@ -6012,6 +6073,7 @@ const DotDialog = ({
|
|
|
6012
6073
|
children: [_cancelButtonVisible && jsx(DotButton, {
|
|
6013
6074
|
autoFocus: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.autoFocus,
|
|
6014
6075
|
className: cancelClasses,
|
|
6076
|
+
"data-pendoid": cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps['data-pendoid'],
|
|
6015
6077
|
"data-testid": cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps['data-testid'],
|
|
6016
6078
|
disableRipple: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.disableRipple,
|
|
6017
6079
|
disabled: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.disabled,
|
|
@@ -6024,6 +6086,7 @@ const DotDialog = ({
|
|
|
6024
6086
|
}), _hasPrimaryAction && jsx(DotButton, {
|
|
6025
6087
|
autoFocus: submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps.autoFocus,
|
|
6026
6088
|
className: submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps.className,
|
|
6089
|
+
"data-pendoid": submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps['data-pendoid'],
|
|
6027
6090
|
"data-testid": submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps['data-testid'],
|
|
6028
6091
|
disableRipple: submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps.disableRipple,
|
|
6029
6092
|
disabled: submitButtonProps === null || submitButtonProps === void 0 ? void 0 : submitButtonProps.disabled,
|
|
@@ -6042,6 +6105,7 @@ const DotConfirmationDialog = ({
|
|
|
6042
6105
|
ariaLabel,
|
|
6043
6106
|
cancelButtonProps,
|
|
6044
6107
|
className,
|
|
6108
|
+
'data-pendoid': dataPendoId = 'dot-confirmation-dialog',
|
|
6045
6109
|
'data-testid': dataTestId,
|
|
6046
6110
|
message: _message = '',
|
|
6047
6111
|
onCancel,
|
|
@@ -6058,6 +6122,7 @@ const DotConfirmationDialog = ({
|
|
|
6058
6122
|
ariaLabel: ariaLabel,
|
|
6059
6123
|
cancelButtonProps: cancelButtonProps,
|
|
6060
6124
|
className: rootClasses,
|
|
6125
|
+
"data-pendoid": dataPendoId,
|
|
6061
6126
|
"data-testid": dataTestId,
|
|
6062
6127
|
onCancel: onCancel,
|
|
6063
6128
|
onSubmit: onSubmit,
|
|
@@ -6556,6 +6621,7 @@ const DotInputSelect = ({
|
|
|
6556
6621
|
ariaLabel,
|
|
6557
6622
|
autoFocus,
|
|
6558
6623
|
className,
|
|
6624
|
+
'data-pendoid': dataPendoId = rootSelectClassName,
|
|
6559
6625
|
'data-testid': dataTestId,
|
|
6560
6626
|
defaultValue,
|
|
6561
6627
|
disabled: _disabled = false,
|
|
@@ -6634,6 +6700,7 @@ const DotInputSelect = ({
|
|
|
6634
6700
|
},
|
|
6635
6701
|
inputProps: {
|
|
6636
6702
|
'aria-label': ariaLabel,
|
|
6703
|
+
'data-pendoid': dataPendoId,
|
|
6637
6704
|
'data-testid': dataTestId,
|
|
6638
6705
|
className: inputStyles,
|
|
6639
6706
|
readOnly: _readOnly
|
|
@@ -6675,6 +6742,7 @@ const DotProgressButton = ({
|
|
|
6675
6742
|
ariaLabel,
|
|
6676
6743
|
children,
|
|
6677
6744
|
className,
|
|
6745
|
+
'data-pendoid': dataPendoId = rootClassName$t,
|
|
6678
6746
|
'data-testid': dataTestId,
|
|
6679
6747
|
disabled: _disabled = false,
|
|
6680
6748
|
disableRipple: _disableRipple = false,
|
|
@@ -6694,6 +6762,7 @@ const DotProgressButton = ({
|
|
|
6694
6762
|
return jsxs(StyledProgressButton, {
|
|
6695
6763
|
ariaLabel: ariaLabel || tooltip,
|
|
6696
6764
|
className: rootClasses,
|
|
6765
|
+
"data-pendoid": dataPendoId,
|
|
6697
6766
|
"data-testid": dataTestId,
|
|
6698
6767
|
disableRipple: _disableRipple,
|
|
6699
6768
|
disabled: isButtonDisabled,
|
|
@@ -6726,6 +6795,7 @@ function DotRadioButton({
|
|
|
6726
6795
|
ariaLabel,
|
|
6727
6796
|
checked,
|
|
6728
6797
|
className,
|
|
6798
|
+
'data-pendoid': dataPendoId = rootClassName$D,
|
|
6729
6799
|
'data-testid': dataTestId,
|
|
6730
6800
|
disabled,
|
|
6731
6801
|
id,
|
|
@@ -6749,6 +6819,7 @@ function DotRadioButton({
|
|
|
6749
6819
|
root: rootClassName$s
|
|
6750
6820
|
},
|
|
6751
6821
|
color: "primary",
|
|
6822
|
+
"data-pendoid": dataPendoId,
|
|
6752
6823
|
"data-testid": dataTestId,
|
|
6753
6824
|
disabled: disabled,
|
|
6754
6825
|
id: id,
|
|
@@ -6869,6 +6940,7 @@ const DotSwitch = ({
|
|
|
6869
6940
|
checked,
|
|
6870
6941
|
className,
|
|
6871
6942
|
color,
|
|
6943
|
+
'data-pendoid': dataPendoId = rootClassName$r,
|
|
6872
6944
|
'data-testid': dataTestId,
|
|
6873
6945
|
disabled: _disabled = false,
|
|
6874
6946
|
id,
|
|
@@ -6895,6 +6967,7 @@ const DotSwitch = ({
|
|
|
6895
6967
|
root: rootClasses
|
|
6896
6968
|
},
|
|
6897
6969
|
color: "primary",
|
|
6970
|
+
"data-pendoid": dataPendoId,
|
|
6898
6971
|
"data-testid": dataTestId,
|
|
6899
6972
|
disabled: _disabled,
|
|
6900
6973
|
id: id,
|
|
@@ -7574,6 +7647,7 @@ const DotInlineEdit = ({
|
|
|
7574
7647
|
bindings,
|
|
7575
7648
|
charactersLimit,
|
|
7576
7649
|
className,
|
|
7650
|
+
'data-pendoid': dataPendoId = rootClassName$q,
|
|
7577
7651
|
'data-testid': dataTestId,
|
|
7578
7652
|
fullWidth: _fullWidth = true,
|
|
7579
7653
|
hideActionButtons,
|
|
@@ -7723,6 +7797,7 @@ const DotInlineEdit = ({
|
|
|
7723
7797
|
error: false,
|
|
7724
7798
|
fullWidth: _fullWidth,
|
|
7725
7799
|
inputProps: {
|
|
7800
|
+
'data-pendoid': `${dataPendoId}-input`,
|
|
7726
7801
|
'data-testid': `${dataTestId}-input`,
|
|
7727
7802
|
className: 'dot-input',
|
|
7728
7803
|
maxLength: charactersLimit === null || charactersLimit === void 0 ? void 0 : charactersLimit.maxLength
|
|
@@ -7739,6 +7814,7 @@ const DotInlineEdit = ({
|
|
|
7739
7814
|
}), !hideActionButtons && jsxs("div", {
|
|
7740
7815
|
className: editActionsClassName,
|
|
7741
7816
|
children: [jsx(DotButton, {
|
|
7817
|
+
"data-pendoid": dataPendoId && `${dataPendoId}-cancel`,
|
|
7742
7818
|
"data-testid": dataTestId && `${dataTestId}-cancel`,
|
|
7743
7819
|
onClick: handleCancel,
|
|
7744
7820
|
size: "small",
|
|
@@ -7748,6 +7824,7 @@ const DotInlineEdit = ({
|
|
|
7748
7824
|
iconId: "close"
|
|
7749
7825
|
})
|
|
7750
7826
|
}), jsx(DotButton, {
|
|
7827
|
+
"data-pendoid": dataPendoId && `${dataPendoId}-save`,
|
|
7751
7828
|
"data-testid": dataTestId && `${dataTestId}-save`,
|
|
7752
7829
|
disabled: isSaveDisabled,
|
|
7753
7830
|
onClick: handleSave,
|
|
@@ -7765,6 +7842,7 @@ const DotInlineEdit = ({
|
|
|
7765
7842
|
"aria-expanded": editing ? true : false,
|
|
7766
7843
|
"aria-label": ariaLabel,
|
|
7767
7844
|
className: rootClasses,
|
|
7845
|
+
"data-pendoid": dataPendoId,
|
|
7768
7846
|
"data-testid": dataTestId,
|
|
7769
7847
|
fullWidth: _fullWidth,
|
|
7770
7848
|
onBlur: !readOnly ? handleBlur : undefined,
|
|
@@ -7969,6 +8047,7 @@ const DotSnackbar = ({
|
|
|
7969
8047
|
children,
|
|
7970
8048
|
className,
|
|
7971
8049
|
'data-testid': dataTestId,
|
|
8050
|
+
hideOnClickAway: _hideOnClickAway = true,
|
|
7972
8051
|
onClose,
|
|
7973
8052
|
open,
|
|
7974
8053
|
severity,
|
|
@@ -7980,6 +8059,11 @@ const DotSnackbar = ({
|
|
|
7980
8059
|
action
|
|
7981
8060
|
});
|
|
7982
8061
|
const rootClasses = useStylesWithRootClass(rootClassName$m, className);
|
|
8062
|
+
const handleSnackbarClose = reason => {
|
|
8063
|
+
if (_hideOnClickAway || !_hideOnClickAway && reason !== 'clickaway') {
|
|
8064
|
+
onClose();
|
|
8065
|
+
}
|
|
8066
|
+
};
|
|
7983
8067
|
return jsx(StyledSnackbar, {
|
|
7984
8068
|
anchorOrigin: _anchorOrigin,
|
|
7985
8069
|
"aria-label": ariaLabel,
|
|
@@ -7988,7 +8072,7 @@ const DotSnackbar = ({
|
|
|
7988
8072
|
root: rootClasses
|
|
7989
8073
|
},
|
|
7990
8074
|
"data-testid": dataTestId,
|
|
7991
|
-
onClose:
|
|
8075
|
+
onClose: (_e, r) => handleSnackbarClose(r),
|
|
7992
8076
|
open: open,
|
|
7993
8077
|
severity: severity,
|
|
7994
8078
|
children: jsx(Alert, {
|
|
@@ -8017,7 +8101,9 @@ const DotSnackbarContext = /*#__PURE__*/createContext({
|
|
|
8017
8101
|
enqueueMessage: (_message, _severity) => null,
|
|
8018
8102
|
removeMessage: _id => null
|
|
8019
8103
|
});
|
|
8020
|
-
const DotSnackbarContainer = (
|
|
8104
|
+
const DotSnackbarContainer = ({
|
|
8105
|
+
hideOnClickAway
|
|
8106
|
+
}) => {
|
|
8021
8107
|
const {
|
|
8022
8108
|
alerts,
|
|
8023
8109
|
removeMessage
|
|
@@ -8034,6 +8120,7 @@ const DotSnackbarContainer = () => {
|
|
|
8034
8120
|
"data-testid": rootClassName$l,
|
|
8035
8121
|
children: alerts.slice().reverse().map(alert => {
|
|
8036
8122
|
return jsx(DotSnackbar, {
|
|
8123
|
+
hideOnClickAway: hideOnClickAway,
|
|
8037
8124
|
onClose: handleClose(alert.id),
|
|
8038
8125
|
open: alert.open,
|
|
8039
8126
|
severity: alert.severity,
|
|
@@ -8044,7 +8131,8 @@ const DotSnackbarContainer = () => {
|
|
|
8044
8131
|
});
|
|
8045
8132
|
};
|
|
8046
8133
|
const DotSnackbarProvider = ({
|
|
8047
|
-
children
|
|
8134
|
+
children,
|
|
8135
|
+
hideOnClickAway: _hideOnClickAway = true
|
|
8048
8136
|
}) => {
|
|
8049
8137
|
const [alerts, setAlerts] = useState([]);
|
|
8050
8138
|
function enqueueMessage(message, severity) {
|
|
@@ -8058,6 +8146,7 @@ const DotSnackbarProvider = ({
|
|
|
8058
8146
|
setAlerts(prevState => {
|
|
8059
8147
|
return [...prevState, Object.assign({}, queue)];
|
|
8060
8148
|
});
|
|
8149
|
+
return id;
|
|
8061
8150
|
}
|
|
8062
8151
|
const removeMessage = id => {
|
|
8063
8152
|
setAlerts(prev => {
|
|
@@ -8076,7 +8165,9 @@ const DotSnackbarProvider = ({
|
|
|
8076
8165
|
const memoizedValues = useMemo(() => DotSnackbarValues, [alerts]);
|
|
8077
8166
|
return jsxs(DotSnackbarContext.Provider, {
|
|
8078
8167
|
value: memoizedValues,
|
|
8079
|
-
children: [jsx(DotSnackbarContainer, {
|
|
8168
|
+
children: [jsx(DotSnackbarContainer, {
|
|
8169
|
+
hideOnClickAway: _hideOnClickAway
|
|
8170
|
+
}), children]
|
|
8080
8171
|
});
|
|
8081
8172
|
};
|
|
8082
8173
|
const useDotSnackbarContext = () => {
|
|
@@ -8105,6 +8196,7 @@ const DotSplitButton = ({
|
|
|
8105
8196
|
autoFocus: _autoFocus = false,
|
|
8106
8197
|
ariaLabel,
|
|
8107
8198
|
className,
|
|
8199
|
+
'data-pendoid': dataPendoId = rootClassName$k,
|
|
8108
8200
|
'data-testid': dataTestId,
|
|
8109
8201
|
defaultMainOptionKey,
|
|
8110
8202
|
disabled: _disabled = false,
|
|
@@ -8145,6 +8237,7 @@ const DotSplitButton = ({
|
|
|
8145
8237
|
children: [jsx(DotButton, {
|
|
8146
8238
|
autoFocus: _autoFocus,
|
|
8147
8239
|
className: "label-button",
|
|
8240
|
+
"data-pendoid": dataPendoId,
|
|
8148
8241
|
"data-testid": dataTestId,
|
|
8149
8242
|
disableRipple: _disableRipple,
|
|
8150
8243
|
disabled: isMainOptionDisabled,
|
|
@@ -8156,6 +8249,7 @@ const DotSplitButton = ({
|
|
|
8156
8249
|
children: mainOptionChildren
|
|
8157
8250
|
}), jsx(DotButton, {
|
|
8158
8251
|
className: "expand-button",
|
|
8252
|
+
"data-pendoid": dataPendoId && `${dataPendoId}-expand`,
|
|
8159
8253
|
"data-testid": dataTestId && `${dataTestId}-expand`,
|
|
8160
8254
|
disableRipple: _disableRipple,
|
|
8161
8255
|
disabled: isMenuButtonDisabled,
|
|
@@ -8555,6 +8649,65 @@ value, typographyVariant) => {
|
|
|
8555
8649
|
}
|
|
8556
8650
|
return value;
|
|
8557
8651
|
};
|
|
8652
|
+
const renderAvatarWithTextCell = avatarWithText => {
|
|
8653
|
+
const {
|
|
8654
|
+
avatarIcon,
|
|
8655
|
+
avatarImageSrc,
|
|
8656
|
+
mainText,
|
|
8657
|
+
secondaryText
|
|
8658
|
+
} = avatarWithText;
|
|
8659
|
+
return jsxs("div", {
|
|
8660
|
+
className: "cell-avatar-with-text",
|
|
8661
|
+
children: [(avatarImageSrc || avatarIcon) && jsx(DotAvatar, {
|
|
8662
|
+
alt: mainText,
|
|
8663
|
+
className: "cell-avatar",
|
|
8664
|
+
"data-testid": "cell-avatar",
|
|
8665
|
+
iconId: avatarIcon,
|
|
8666
|
+
imageSrc: avatarImageSrc,
|
|
8667
|
+
size: "small",
|
|
8668
|
+
type: avatarImageSrc ? 'image' : 'icon'
|
|
8669
|
+
}), jsxs("div", {
|
|
8670
|
+
className: "cell-text",
|
|
8671
|
+
children: [jsx(DotTypography, {
|
|
8672
|
+
variant: "body1",
|
|
8673
|
+
children: mainText
|
|
8674
|
+
}), secondaryText && jsx(DotTypography, {
|
|
8675
|
+
"data-testid": "cell-secondary-text",
|
|
8676
|
+
variant: "body2",
|
|
8677
|
+
children: secondaryText
|
|
8678
|
+
})]
|
|
8679
|
+
})]
|
|
8680
|
+
});
|
|
8681
|
+
};
|
|
8682
|
+
const renderInlineEditCell = inlineEdit => {
|
|
8683
|
+
return jsx(DotInlineEdit, Object.assign({}, inlineEdit, {
|
|
8684
|
+
ariaLabel: "inline edit cell",
|
|
8685
|
+
className: `inline-edit-cell ${inlineEdit.className ? inlineEdit.className : ''}`
|
|
8686
|
+
}));
|
|
8687
|
+
};
|
|
8688
|
+
const getValuesForSort = (a, b, orderBy) => {
|
|
8689
|
+
var _a, _b, _c, _d;
|
|
8690
|
+
let valueA;
|
|
8691
|
+
let valueB;
|
|
8692
|
+
if (((_a = a.rowData[orderBy]) === null || _a === void 0 ? void 0 : _a.mainText) && ((_b = b.rowData[orderBy]) === null || _b === void 0 ? void 0 : _b.mainText)) {
|
|
8693
|
+
// use mainText value for sort in case when data for the table cell is passed with AvatarWithTextCell
|
|
8694
|
+
valueA = a.rowData[orderBy].mainText;
|
|
8695
|
+
valueB = b.rowData[orderBy].mainText;
|
|
8696
|
+
} else if (((_c = a.rowData[orderBy]) === null || _c === void 0 ? void 0 : _c.name) && ((_d = b.rowData[orderBy]) === null || _d === void 0 ? void 0 : _d.name)) {
|
|
8697
|
+
// name is the only required prop from InlineEditProps, so if it is there, the cell is considered as inline edit cell
|
|
8698
|
+
// use value from inline edit for sort in case when data for the table cell is passed with InlineEditProps
|
|
8699
|
+
// if value is not defined, then treat it as empty string
|
|
8700
|
+
valueA = a.rowData[orderBy].value || '';
|
|
8701
|
+
valueB = b.rowData[orderBy].value || '';
|
|
8702
|
+
} else {
|
|
8703
|
+
valueA = a.rowData[orderBy];
|
|
8704
|
+
valueB = b.rowData[orderBy];
|
|
8705
|
+
}
|
|
8706
|
+
return {
|
|
8707
|
+
valueA,
|
|
8708
|
+
valueB
|
|
8709
|
+
};
|
|
8710
|
+
};
|
|
8558
8711
|
// If maxHeight is provided, make this the max height for the
|
|
8559
8712
|
// table container. If it is not provided but stickyHeader is true,
|
|
8560
8713
|
// calculate a max height based on screen size.
|
|
@@ -8627,7 +8780,7 @@ const StyledTableCell = styled(TableCell).withConfig({
|
|
|
8627
8780
|
componentId: "e84k25-0"
|
|
8628
8781
|
})(["", ""], ({
|
|
8629
8782
|
theme
|
|
8630
|
-
}) => css(["&.", "{padding-top:0;padding-bottom:0;&.actionItems,&.noWrap p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}&.actionItems{max-width:0;text-align:right;text-overflow:clip;}&.noWrap p{max-width:calc(100% - 1px);}.action-cell-wrapper{width:100%;}.cell-avatar-with-text{display:flex;align-items:center;.cell-avatar{margin-right:", ";}.cell-text{width:100%;}}}"], rootClassName$f, theme.spacing(1)));
|
|
8783
|
+
}) => css(["&.", "{padding-top:0;padding-bottom:0;&.actionItems,&.noWrap p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}&.actionItems{max-width:0;text-align:right;text-overflow:clip;}&.noWrap p{max-width:calc(100% - 1px);}.action-cell-wrapper{width:100%;}.cell-avatar-with-text{display:flex;align-items:center;.cell-avatar{margin-right:", ";}.cell-text{width:100%;}}.inline-edit-cell{input{background-color:", ";}.dot-view-mode:not(.dot-read-only):hover{background-color:", ";}}}"], rootClassName$f, theme.spacing(1), theme.palette.figma.background.level0.bckgWhiteBlack, theme.palette.figma.neutral.active));
|
|
8631
8784
|
|
|
8632
8785
|
/**
|
|
8633
8786
|
* A wrapper component around the TableCell component from @material-ui.
|
|
@@ -8702,34 +8855,10 @@ const DotBodyCell = ({
|
|
|
8702
8855
|
});
|
|
8703
8856
|
}
|
|
8704
8857
|
if (value === null || value === void 0 ? void 0 : value.mainText) {
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
secondaryText
|
|
8710
|
-
} = value;
|
|
8711
|
-
return jsxs("div", {
|
|
8712
|
-
className: "cell-avatar-with-text",
|
|
8713
|
-
children: [(avatarImageSrc || avatarIcon) && jsx(DotAvatar, {
|
|
8714
|
-
alt: mainText,
|
|
8715
|
-
className: "cell-avatar",
|
|
8716
|
-
"data-testid": "cell-avatar",
|
|
8717
|
-
iconId: avatarIcon,
|
|
8718
|
-
imageSrc: avatarImageSrc,
|
|
8719
|
-
size: "small",
|
|
8720
|
-
type: avatarImageSrc ? 'image' : 'icon'
|
|
8721
|
-
}), jsxs("div", {
|
|
8722
|
-
className: "cell-text",
|
|
8723
|
-
children: [jsx(DotTypography, {
|
|
8724
|
-
variant: "body1",
|
|
8725
|
-
children: mainText
|
|
8726
|
-
}), secondaryText && jsx(DotTypography, {
|
|
8727
|
-
"data-testid": "cell-secondary-text",
|
|
8728
|
-
variant: "body2",
|
|
8729
|
-
children: secondaryText
|
|
8730
|
-
})]
|
|
8731
|
-
})]
|
|
8732
|
-
});
|
|
8858
|
+
return renderAvatarWithTextCell(value);
|
|
8859
|
+
}
|
|
8860
|
+
if (value === null || value === void 0 ? void 0 : value.name) {
|
|
8861
|
+
return renderInlineEditCell(value);
|
|
8733
8862
|
}
|
|
8734
8863
|
return getFormattedTableCellValue(value, typography);
|
|
8735
8864
|
};
|
|
@@ -9355,14 +9484,10 @@ const DotTableSelectionToolbar = ({
|
|
|
9355
9484
|
};
|
|
9356
9485
|
|
|
9357
9486
|
const sortComparator = (a, b, orderBy) => {
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
// use mainText value for sort in case when data for the table cell is of type CustomCellDataWrapper
|
|
9363
|
-
valueA = a.rowData[orderBy].mainText;
|
|
9364
|
-
valueB = b.rowData[orderBy].mainText;
|
|
9365
|
-
}
|
|
9487
|
+
const {
|
|
9488
|
+
valueA,
|
|
9489
|
+
valueB
|
|
9490
|
+
} = getValuesForSort(a, b, orderBy);
|
|
9366
9491
|
if (valueB < valueA) {
|
|
9367
9492
|
return -1;
|
|
9368
9493
|
}
|
|
@@ -9733,6 +9858,7 @@ const DotTabs = ({
|
|
|
9733
9858
|
centered: _centered = false,
|
|
9734
9859
|
className,
|
|
9735
9860
|
color,
|
|
9861
|
+
'data-pendoid': dataPendoId = rootClassName$8,
|
|
9736
9862
|
'data-testid': dataTestId,
|
|
9737
9863
|
initialValue: _initialValue = 0,
|
|
9738
9864
|
onChange,
|
|
@@ -9768,6 +9894,7 @@ const DotTabs = ({
|
|
|
9768
9894
|
});
|
|
9769
9895
|
const tabElement = jsx(Tab, {
|
|
9770
9896
|
"aria-label": tab.ariaLabel,
|
|
9897
|
+
"data-pendoid": tab['data-pendoid'],
|
|
9771
9898
|
"data-testid": tab['data-testid'],
|
|
9772
9899
|
disableRipple: true,
|
|
9773
9900
|
disabled: tab.disabled,
|
|
@@ -9782,6 +9909,7 @@ const DotTabs = ({
|
|
|
9782
9909
|
classes: {
|
|
9783
9910
|
root: rootClasses
|
|
9784
9911
|
},
|
|
9912
|
+
"data-pendoid": dataPendoId,
|
|
9785
9913
|
"data-testid": dataTestId,
|
|
9786
9914
|
indicatorColor: "primary",
|
|
9787
9915
|
onChange: handleChange,
|
|
@@ -9980,6 +10108,7 @@ const DotFileUpload = ({
|
|
|
9980
10108
|
},
|
|
9981
10109
|
buttonOnly: _buttonOnly = false,
|
|
9982
10110
|
className,
|
|
10111
|
+
'data-pendoid': dataPendoId = rootClassName$7,
|
|
9983
10112
|
'data-testid': dataTestId,
|
|
9984
10113
|
disabled,
|
|
9985
10114
|
hideFilesList,
|
|
@@ -10046,6 +10175,7 @@ const DotFileUpload = ({
|
|
|
10046
10175
|
children: [jsxs(StyledFileUpload, Object.assign({}, getRootProps(), {
|
|
10047
10176
|
"aria-label": ariaLabel,
|
|
10048
10177
|
className: rootClasses,
|
|
10178
|
+
"data-pendoid": dataPendoId,
|
|
10049
10179
|
"data-testid": dataTestId,
|
|
10050
10180
|
children: [jsx("input", Object.assign({}, getInputProps())), renderDropzoneContent({
|
|
10051
10181
|
buttonProps: _buttonProps,
|
|
@@ -10177,6 +10307,7 @@ const ListGridLayout = WidthProvider(GridLayout);
|
|
|
10177
10307
|
const DotDraggableList = ({
|
|
10178
10308
|
ariaLabel,
|
|
10179
10309
|
className,
|
|
10310
|
+
'data-pendoid': dataPendoId = rootClassName$4,
|
|
10180
10311
|
'data-testid': dataTestId,
|
|
10181
10312
|
disableDrag,
|
|
10182
10313
|
draggableHandle,
|
|
@@ -10202,6 +10333,7 @@ const DotDraggableList = ({
|
|
|
10202
10333
|
return jsx(StyledDraggableList, {
|
|
10203
10334
|
"aria-label": ariaLabel,
|
|
10204
10335
|
className: rootClasses,
|
|
10336
|
+
"data-pendoid": dataPendoId,
|
|
10205
10337
|
"data-testid": dataTestId,
|
|
10206
10338
|
draggableHandle: draggableHandle,
|
|
10207
10339
|
width: listWidth,
|
|
@@ -10222,6 +10354,7 @@ const DotDraggableList = ({
|
|
|
10222
10354
|
children
|
|
10223
10355
|
}) => {
|
|
10224
10356
|
return jsx(ListItem, {
|
|
10357
|
+
"data-pendoid": dataPendoId && `${dataPendoId}-item`,
|
|
10225
10358
|
"data-testid": dataTestId && `${dataTestId}-item`,
|
|
10226
10359
|
button: true,
|
|
10227
10360
|
children: renderNodeOrTypography(children),
|
|
@@ -10279,16 +10412,6 @@ var DatePickerKeydownContext;
|
|
|
10279
10412
|
DatePickerKeydownContext[DatePickerKeydownContext["Popper"] = 2] = "Popper";
|
|
10280
10413
|
})(DatePickerKeydownContext || (DatePickerKeydownContext = {}));
|
|
10281
10414
|
|
|
10282
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
10283
|
-
|
|
10284
|
-
var dayjs_min = {exports: {}};
|
|
10285
|
-
|
|
10286
|
-
(function (module, exports) {
|
|
10287
|
-
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
10288
|
-
}(dayjs_min));
|
|
10289
|
-
|
|
10290
|
-
var dayjs = dayjs_min.exports;
|
|
10291
|
-
|
|
10292
10415
|
/** This returns a `boolean` indicating whether the Day.js object contains a valid date or not. */
|
|
10293
10416
|
const checkIfValidDate = (date, format) => dayjs(date, format, true).isValid();
|
|
10294
10417
|
const getContextEnumBasedOnTarget = (event, inputElement, contextEnum) => {
|
|
@@ -10302,14 +10425,6 @@ const getContextEnumBasedOnTarget = (event, inputElement, contextEnum) => {
|
|
|
10302
10425
|
return currentContextEnum;
|
|
10303
10426
|
};
|
|
10304
10427
|
|
|
10305
|
-
var updateLocale$1 = {exports: {}};
|
|
10306
|
-
|
|
10307
|
-
(function (module, exports) {
|
|
10308
|
-
!function(e,n){module.exports=n();}(commonjsGlobal,(function(){return function(e,n,t){t.updateLocale=function(e,n){var o=t.Ls[e];if(o)return (n?Object.keys(n):[]).forEach((function(e){o[e]=n[e];})),o};}}));
|
|
10309
|
-
}(updateLocale$1));
|
|
10310
|
-
|
|
10311
|
-
var updateLocale = updateLocale$1.exports;
|
|
10312
|
-
|
|
10313
10428
|
const rootClassName$2 = 'dot-date-picker';
|
|
10314
10429
|
const popperClassName = 'dot-date-picker-popper';
|
|
10315
10430
|
const containerClassName$1 = 'dot-date-picker-container';
|
|
@@ -10343,6 +10458,7 @@ const DotDatePicker = ({
|
|
|
10343
10458
|
autoFocus: _autoFocus = false,
|
|
10344
10459
|
className,
|
|
10345
10460
|
closeOnSelect: _closeOnSelect = true,
|
|
10461
|
+
'data-pendoid': dataPendoId = rootClassName$2,
|
|
10346
10462
|
'data-testid': dataTestId,
|
|
10347
10463
|
defaultValue,
|
|
10348
10464
|
disableOpenPicker,
|
|
@@ -10439,10 +10555,12 @@ const DotDatePicker = ({
|
|
|
10439
10555
|
};
|
|
10440
10556
|
return jsx(StyledDatePickerContainer, {
|
|
10441
10557
|
className: containerClasses,
|
|
10558
|
+
"data-pendoid": dataPendoId,
|
|
10442
10559
|
"data-testid": dataTestId,
|
|
10443
10560
|
children: jsxs(LocalizationProvider, {
|
|
10444
10561
|
dateAdapter: AdapterDayjs,
|
|
10445
10562
|
children: [persistentLabel && jsx(DotInputLabel, {
|
|
10563
|
+
'data-pendoid': 'date-picker-persistent-label',
|
|
10446
10564
|
'data-testid': 'date-picker-persistent-label',
|
|
10447
10565
|
disabled,
|
|
10448
10566
|
error,
|
|
@@ -10479,6 +10597,7 @@ const DotDatePicker = ({
|
|
|
10479
10597
|
iconId: "error-solid"
|
|
10480
10598
|
}), jsx(DotIconButton, {
|
|
10481
10599
|
ariaLabel: "Open date picker",
|
|
10600
|
+
"data-pendoid": "date-picker-open-btn",
|
|
10482
10601
|
"data-testid": "date-picker-open-btn",
|
|
10483
10602
|
iconId: "calendar",
|
|
10484
10603
|
onClick: pickerButtonProps.onClick,
|
|
@@ -10496,6 +10615,7 @@ const DotDatePicker = ({
|
|
|
10496
10615
|
focused: isInputReadOnly ? false : undefined,
|
|
10497
10616
|
inputProps: {
|
|
10498
10617
|
className: 'dot-input',
|
|
10618
|
+
'data-pendoid': 'dot-date-picker-input',
|
|
10499
10619
|
'data-testid': 'dot-date-picker-input',
|
|
10500
10620
|
onBlur
|
|
10501
10621
|
},
|
|
@@ -10532,14 +10652,6 @@ const mockScrollIntoView = scrollIntoViewMock => {
|
|
|
10532
10652
|
window.HTMLElement.prototype.scrollIntoView = scrollIntoViewMock;
|
|
10533
10653
|
};
|
|
10534
10654
|
|
|
10535
|
-
var utc$1 = {exports: {}};
|
|
10536
|
-
|
|
10537
|
-
(function (module, exports) {
|
|
10538
|
-
!function(t,i){module.exports=i();}(commonjsGlobal,(function(){var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,e=/([+-]|\d\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t);};var r=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds();}else r.call(this);};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(i);if(!s)return null;var f=(""+s[0]).match(e)||["-",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:"+"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(f)return o.$offset=u,o.$u=0===s,o;if(0!==s){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+r,t)).$offset=u,o.$x.$localOffset=r;}else o=this.utc();return o};var h=u.format;u.format=function(t){var i=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return !!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return "s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)};}}));
|
|
10539
|
-
}(utc$1));
|
|
10540
|
-
|
|
10541
|
-
var utc = utc$1.exports;
|
|
10542
|
-
|
|
10543
10655
|
const getDayjsUtcDate = (value, timeFormat) => dayjs.utc(value, timeFormat);
|
|
10544
10656
|
const createNumbersArray = (length, offset) => Array.from({
|
|
10545
10657
|
length
|
|
@@ -10624,6 +10736,7 @@ const DotTimePicker = ({
|
|
|
10624
10736
|
ariaLabel,
|
|
10625
10737
|
autoFocus: _autoFocus = false,
|
|
10626
10738
|
className,
|
|
10739
|
+
'data-pendoid': dataPendoId = rootClassName$1,
|
|
10627
10740
|
'data-testid': dataTestId,
|
|
10628
10741
|
defaultValue,
|
|
10629
10742
|
disableOpenPicker: _disableOpenPicker = false,
|
|
@@ -10794,6 +10907,7 @@ const DotTimePicker = ({
|
|
|
10794
10907
|
const isSelected = pickerTime ? selectedPickerHour === hour : false;
|
|
10795
10908
|
return jsx(DotButton, {
|
|
10796
10909
|
className: "dot-picker-button",
|
|
10910
|
+
"data-pendoid": dataPendoId && `${dataPendoId}-hour-button-${hour}`,
|
|
10797
10911
|
"data-testid": dataTestId && `${dataTestId}-hour-button-${hour}`,
|
|
10798
10912
|
onClick: () => handleHourClick(hour),
|
|
10799
10913
|
onKeyDown: handleTimeKeydown(hoursRef, index),
|
|
@@ -10806,6 +10920,7 @@ const DotTimePicker = ({
|
|
|
10806
10920
|
const isSelected = pickerTime ? pickerTime.minute() === minute : false;
|
|
10807
10921
|
return jsx(DotButton, {
|
|
10808
10922
|
className: "dot-picker-button",
|
|
10923
|
+
"data-pendoid": dataPendoId && `${dataPendoId}-minute-button-${minute}`,
|
|
10809
10924
|
"data-testid": dataTestId && `${dataTestId}-minute-button-${minute}`,
|
|
10810
10925
|
type: isSelected ? 'primary' : 'text',
|
|
10811
10926
|
onClick: () => handleMinuteClick(minute),
|
|
@@ -10817,12 +10932,14 @@ const DotTimePicker = ({
|
|
|
10817
10932
|
const renderTimePickerActionButtons = () => jsxs("div", {
|
|
10818
10933
|
className: "dot-time-picker-action-buttons",
|
|
10819
10934
|
children: [jsx(DotButton, {
|
|
10935
|
+
"data-pendoid": dataPendoId && `${dataPendoId}-cancel`,
|
|
10820
10936
|
"data-testid": dataTestId && `${dataTestId}-cancel`,
|
|
10821
10937
|
onClick: handleCancel,
|
|
10822
10938
|
size: "small",
|
|
10823
10939
|
type: "text",
|
|
10824
10940
|
children: "Cancel"
|
|
10825
10941
|
}), jsx(DotButton, {
|
|
10942
|
+
"data-pendoid": dataPendoId && `${dataPendoId}-set`,
|
|
10826
10943
|
"data-testid": dataTestId && `${dataTestId}-set`,
|
|
10827
10944
|
onClick: handleSet,
|
|
10828
10945
|
size: "small",
|
|
@@ -10835,6 +10952,7 @@ const DotTimePicker = ({
|
|
|
10835
10952
|
ref: daytimeRef,
|
|
10836
10953
|
children: [jsx(DotButton, {
|
|
10837
10954
|
className: "dot-picker-button",
|
|
10955
|
+
"data-pendoid": dataPendoId && `${dataPendoId}-am-button`,
|
|
10838
10956
|
"data-testid": dataTestId && `${dataTestId}-am-button`,
|
|
10839
10957
|
onClick: () => handleDaytimeSelection(Daytime.AM),
|
|
10840
10958
|
onKeyDown: handleTimeKeydown(daytimeRef, 0),
|
|
@@ -10843,6 +10961,7 @@ const DotTimePicker = ({
|
|
|
10843
10961
|
children: Daytime.AM
|
|
10844
10962
|
}, Daytime.AM), jsx(DotButton, {
|
|
10845
10963
|
className: "dot-picker-button",
|
|
10964
|
+
"data-pendoid": dataPendoId && `${dataPendoId}-pm-button`,
|
|
10846
10965
|
"data-testid": dataTestId && `${dataTestId}-pm-button`,
|
|
10847
10966
|
onClick: () => handleDaytimeSelection(Daytime.PM),
|
|
10848
10967
|
onKeyDown: handleTimeKeydown(daytimeRef, 1),
|
|
@@ -10869,6 +10988,7 @@ const DotTimePicker = ({
|
|
|
10869
10988
|
});
|
|
10870
10989
|
return jsxs(StyledTimePickerContainer, {
|
|
10871
10990
|
className: containerClasses,
|
|
10991
|
+
"data-pendoid": dataPendoId,
|
|
10872
10992
|
"data-testid": dataTestId,
|
|
10873
10993
|
onKeyDown: handleTimePickerKeyDown,
|
|
10874
10994
|
children: [jsxs(LocalizationProvider, {
|
|
@@ -10903,6 +11023,7 @@ const DotTimePicker = ({
|
|
|
10903
11023
|
iconId: "error-solid"
|
|
10904
11024
|
}), !_disableOpenPicker && !isComponentReadOnly && !disabled && jsx(DotIconButton, {
|
|
10905
11025
|
ariaLabel: "Open time picker",
|
|
11026
|
+
"data-pendoid": dataPendoId && `${dataPendoId}-open-btn`,
|
|
10906
11027
|
"data-testid": dataTestId && `${dataTestId}-open-btn`,
|
|
10907
11028
|
iconId: "pending-clock",
|
|
10908
11029
|
onClick: _event => handleTimePickerButtonClick(),
|
|
@@ -10912,6 +11033,7 @@ const DotTimePicker = ({
|
|
|
10912
11033
|
},
|
|
10913
11034
|
inputProps: {
|
|
10914
11035
|
className: 'dot-input',
|
|
11036
|
+
'data-pendoid': dataPendoId && `${dataPendoId}-input`,
|
|
10915
11037
|
'data-testid': dataTestId && `${dataTestId}-input`,
|
|
10916
11038
|
onBlur
|
|
10917
11039
|
},
|