@digital-ai/dot-components 4.8.0 → 4.9.1
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 +213 -93
- package/package.json +1 -1
- package/src/lib/components/annotation/Annotation.d.ts +10 -0
- package/src/lib/components/annotation/Annotation.styles.d.ts +2 -0
- package/src/lib/components/index.d.ts +2 -0
- package/src/lib/components/inline-edit/InlineEdit.d.ts +7 -1
- package/src/lib/components/inline-edit/InlineEdit.styles.d.ts +5 -0
- package/src/lib/components/table/TableHeaderCheckboxCell.d.ts +4 -4
- package/src/lib/components/table/TableHeaderCheckboxCell.styles.d.ts +2 -1
- package/src/lib/components/table/TableSelectionToolbar.d.ts +3 -1
- package/src/lib/components/table/utils/helpers.d.ts +2 -0
- package/src/lib/components/table/utils/interfaces.d.ts +1 -0
- package/src/lib/components/table/utils/models.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -175,7 +175,7 @@ const readOnlyStyles = theme => css`
|
|
|
175
175
|
}
|
|
176
176
|
`;
|
|
177
177
|
|
|
178
|
-
const rootClassName$
|
|
178
|
+
const rootClassName$1m = 'dot-text-field';
|
|
179
179
|
const rootSelectClassName = 'dot-select-field';
|
|
180
180
|
const wrapperClassName$2 = 'dot-label-wrapper';
|
|
181
181
|
const labelClassName = 'dot-input-label';
|
|
@@ -228,7 +228,7 @@ const StyledTextField = styled(TextField)`
|
|
|
228
228
|
$maxRows,
|
|
229
229
|
$minRows
|
|
230
230
|
}) => css`
|
|
231
|
-
&.${rootClassName$
|
|
231
|
+
&.${rootClassName$1m} {
|
|
232
232
|
.MuiInputBase-root {
|
|
233
233
|
margin-bottom: 0;
|
|
234
234
|
|
|
@@ -312,7 +312,7 @@ const StyledTextField = styled(TextField)`
|
|
|
312
312
|
margin-right: ${theme.spacing(2)};
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
&.${rootSelectClassName}, &.${rootClassName$
|
|
315
|
+
&.${rootSelectClassName}, &.${rootClassName$1m} {
|
|
316
316
|
.${adornmentIconClassName} {
|
|
317
317
|
color: ${theme.palette.figma.icon.black};
|
|
318
318
|
p {
|
|
@@ -402,12 +402,12 @@ const StyledTextField = styled(TextField)`
|
|
|
402
402
|
`}
|
|
403
403
|
`;
|
|
404
404
|
|
|
405
|
-
const rootClassName$
|
|
405
|
+
const rootClassName$1l = 'dot-icon';
|
|
406
406
|
const StyledIcon = styled(Icon)`
|
|
407
407
|
${({
|
|
408
408
|
theme
|
|
409
409
|
}) => css`
|
|
410
|
-
&.${rootClassName$
|
|
410
|
+
&.${rootClassName$1l} {
|
|
411
411
|
color: ${theme.palette.figma.icon.black};
|
|
412
412
|
font-size: 20px;
|
|
413
413
|
|
|
@@ -448,7 +448,7 @@ const DotIcon = ({
|
|
|
448
448
|
iconId,
|
|
449
449
|
tooltip
|
|
450
450
|
}) => {
|
|
451
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
451
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1l, className);
|
|
452
452
|
return jsx(DotTooltip, {
|
|
453
453
|
title: tooltip,
|
|
454
454
|
children: jsx(StyledIcon, {
|
|
@@ -509,7 +509,7 @@ const DotTypography = ({
|
|
|
509
509
|
});
|
|
510
510
|
};
|
|
511
511
|
|
|
512
|
-
const rootClassName$
|
|
512
|
+
const rootClassName$1k = 'dot-accordion';
|
|
513
513
|
const summaryClassName = 'dot-accordion-summary';
|
|
514
514
|
const detailClassName = 'dot-accordion-details';
|
|
515
515
|
const StyledAccordion = styled(Accordion)`
|
|
@@ -520,7 +520,7 @@ const StyledAccordion = styled(Accordion)`
|
|
|
520
520
|
background: ${theme.palette.figma.background.level1.white};
|
|
521
521
|
}
|
|
522
522
|
|
|
523
|
-
&.${rootClassName$
|
|
523
|
+
&.${rootClassName$1k} .${summaryClassName} {
|
|
524
524
|
align-items: center;
|
|
525
525
|
background: ${theme.palette.figma.background.level1.white};
|
|
526
526
|
color: ${theme.palette.figma.typography.black};
|
|
@@ -565,7 +565,7 @@ const DotAccordion = ({
|
|
|
565
565
|
ariaLabel,
|
|
566
566
|
children,
|
|
567
567
|
className,
|
|
568
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
568
|
+
'data-pendoid': dataPendoId = rootClassName$1k,
|
|
569
569
|
'data-testid': dataTestId = 'dot-accordion',
|
|
570
570
|
disabled = false,
|
|
571
571
|
expanded,
|
|
@@ -576,7 +576,7 @@ const DotAccordion = ({
|
|
|
576
576
|
summary,
|
|
577
577
|
noWrap = true
|
|
578
578
|
}) => {
|
|
579
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
579
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1k, className);
|
|
580
580
|
const [elevation, setElevation] = useState();
|
|
581
581
|
useEffect(() => {
|
|
582
582
|
if (onChange && expanded === undefined) {
|
|
@@ -627,15 +627,15 @@ const DotAccordion = ({
|
|
|
627
627
|
});
|
|
628
628
|
};
|
|
629
629
|
|
|
630
|
-
const rootClassName$
|
|
630
|
+
const rootClassName$1j = 'dot-action-toolbar';
|
|
631
631
|
const StyledToolbar = styled(Toolbar)`
|
|
632
632
|
${({
|
|
633
633
|
theme
|
|
634
634
|
}) => css`
|
|
635
|
-
&.${rootClassName$
|
|
635
|
+
&.${rootClassName$1j} {
|
|
636
636
|
border-bottom: 1px solid ${theme.palette.figma.border.default};
|
|
637
637
|
|
|
638
|
-
.${rootClassName$
|
|
638
|
+
.${rootClassName$1m} .MuiInputBase-root {
|
|
639
639
|
margin-bottom: 0;
|
|
640
640
|
}
|
|
641
641
|
}
|
|
@@ -649,7 +649,7 @@ const DotActionToolbar = ({
|
|
|
649
649
|
'data-testid': dataTestId,
|
|
650
650
|
variant = 'dense'
|
|
651
651
|
}) => {
|
|
652
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
652
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1j, className);
|
|
653
653
|
return jsx(StyledToolbar, {
|
|
654
654
|
"aria-label": ariaLabel,
|
|
655
655
|
className: rootClasses,
|
|
@@ -1719,12 +1719,12 @@ const renderNodeOrTypography = (content, typographyVariant = 'body1') => {
|
|
|
1719
1719
|
const checkIfArrowUpPressed = event => event.key === 'ArrowUp';
|
|
1720
1720
|
const checkIfArrowDownPressed = event => event.key === 'ArrowDown';
|
|
1721
1721
|
|
|
1722
|
-
const rootClassName$
|
|
1722
|
+
const rootClassName$1i = 'dot-alert-banner';
|
|
1723
1723
|
const StyledAlertBanner = styled(Alert)`
|
|
1724
1724
|
${({
|
|
1725
1725
|
theme
|
|
1726
1726
|
}) => css`
|
|
1727
|
-
&.${rootClassName$
|
|
1727
|
+
&.${rootClassName$1i} {
|
|
1728
1728
|
align-items: center;
|
|
1729
1729
|
box-sizing: border-box;
|
|
1730
1730
|
min-height: 48px;
|
|
@@ -1759,7 +1759,7 @@ const DotAlertBanner = ({
|
|
|
1759
1759
|
ariaLabel,
|
|
1760
1760
|
children,
|
|
1761
1761
|
className,
|
|
1762
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
1762
|
+
'data-pendoid': dataPendoId = rootClassName$1i,
|
|
1763
1763
|
'data-testid': dataTestId,
|
|
1764
1764
|
onClose,
|
|
1765
1765
|
roundedCorners = true,
|
|
@@ -1767,7 +1767,7 @@ const DotAlertBanner = ({
|
|
|
1767
1767
|
textVariant = 'body1',
|
|
1768
1768
|
width
|
|
1769
1769
|
}) => {
|
|
1770
|
-
const rootClasses = useStylesWithRootClass(rootClassName$
|
|
1770
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1i, severity, className);
|
|
1771
1771
|
/* For simple string use default component, for everything else use 'div' */
|
|
1772
1772
|
const typographyComponent = isString$2(children) ? undefined : 'div';
|
|
1773
1773
|
return jsx(StyledAlertBanner, {
|
|
@@ -1810,6 +1810,53 @@ const DotAppLogo = ({
|
|
|
1810
1810
|
});
|
|
1811
1811
|
};
|
|
1812
1812
|
|
|
1813
|
+
const rootClassName$1h = 'dot-annotation';
|
|
1814
|
+
const StyledAnnotation = styled.kbd`
|
|
1815
|
+
${({
|
|
1816
|
+
theme
|
|
1817
|
+
}) => css`
|
|
1818
|
+
&.${rootClassName$1h} {
|
|
1819
|
+
font-family: inherit;
|
|
1820
|
+
background-color: ${theme.palette.figma.background.level0.bckgGray};
|
|
1821
|
+
color: ${theme.palette.figma.typography.disabled};
|
|
1822
|
+
padding: ${theme.spacing(0.5)};
|
|
1823
|
+
margin: ${theme.spacing(0, 0.5)};
|
|
1824
|
+
display: inline-flex;
|
|
1825
|
+
justify-content: center;
|
|
1826
|
+
font-weight: bold;
|
|
1827
|
+
border-radius: ${theme.spacing(0.5)};
|
|
1828
|
+
min-width: 18px;
|
|
1829
|
+
|
|
1830
|
+
.dot-icon {
|
|
1831
|
+
color: inherit;
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
&.secondary {
|
|
1835
|
+
background-color: ${theme.palette.figma.typography.disabled};
|
|
1836
|
+
color: ${theme.palette.figma.typography.white};
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
`}
|
|
1840
|
+
`;
|
|
1841
|
+
|
|
1842
|
+
const DotAnnotation = ({
|
|
1843
|
+
ariaLabel,
|
|
1844
|
+
'data-pendoid': dataPendoId = rootClassName$1h,
|
|
1845
|
+
'data-testid': dataTestId,
|
|
1846
|
+
className,
|
|
1847
|
+
content,
|
|
1848
|
+
type = 'primary'
|
|
1849
|
+
}) => {
|
|
1850
|
+
const rootClasses = useStylesWithRootClass(rootClassName$1h, className, type === 'secondary' ? 'secondary' : '');
|
|
1851
|
+
return jsx(StyledAnnotation, {
|
|
1852
|
+
"aria-label": ariaLabel,
|
|
1853
|
+
className: rootClasses,
|
|
1854
|
+
"data-pendoid": dataPendoId,
|
|
1855
|
+
"data-testid": dataTestId,
|
|
1856
|
+
children: content
|
|
1857
|
+
});
|
|
1858
|
+
};
|
|
1859
|
+
|
|
1813
1860
|
/******************************************************************************
|
|
1814
1861
|
Copyright (c) Microsoft Corporation.
|
|
1815
1862
|
|
|
@@ -4571,7 +4618,7 @@ const DotInputText = ({
|
|
|
4571
4618
|
autoFocus,
|
|
4572
4619
|
className,
|
|
4573
4620
|
defaultValue,
|
|
4574
|
-
'data-pendoid': dataPendoId = rootClassName$
|
|
4621
|
+
'data-pendoid': dataPendoId = rootClassName$1m,
|
|
4575
4622
|
'data-testid': dataTestId,
|
|
4576
4623
|
disabled = false,
|
|
4577
4624
|
error = false,
|
|
@@ -4619,7 +4666,7 @@ const DotInputText = ({
|
|
|
4619
4666
|
const internalInputRef = useRef(null);
|
|
4620
4667
|
const textFieldInputRef = inputRef || internalInputRef;
|
|
4621
4668
|
const [inputTextState, setInputTextState] = useState(getInitialState(value));
|
|
4622
|
-
const rootStyles = useStylesWithRootClass(rootClassName$
|
|
4669
|
+
const rootStyles = useStylesWithRootClass(rootClassName$1m, hasError, hasWarning, hasSuccess, readOnly && readOnlyClassName$1);
|
|
4623
4670
|
useEffect(() => {
|
|
4624
4671
|
if (value !== inputTextState.inputValue) {
|
|
4625
4672
|
setInputTextState(getInitialState(value, defaultValue));
|
|
@@ -6671,7 +6718,7 @@ const isEmptyValue = value => {
|
|
|
6671
6718
|
}
|
|
6672
6719
|
};
|
|
6673
6720
|
const getRootClassNames = (className, size) => useStylesWithRootClass(rootClassName$X, size === 'medium' && inputMediumClassName, className);
|
|
6674
|
-
const getTextFieldRootClassNames = (textFieldWarningClassName, isReadOnly) => useStylesWithRootClass(rootClassName$
|
|
6721
|
+
const getTextFieldRootClassNames = (textFieldWarningClassName, isReadOnly) => useStylesWithRootClass(rootClassName$1m, isReadOnly && readOnlyClassName$1, textFieldWarningClassName);
|
|
6675
6722
|
const getInputRootClassNames = isDense => useStylesWithRootClass(inputRootClassName, !isDense && inputMediumClassName);
|
|
6676
6723
|
const getDefaultAutoCompleteValue = (hasMultiple, defaultValue) => hasMultiple && isString$2(defaultValue) ? [defaultValue] : defaultValue;
|
|
6677
6724
|
const getAutoCompleteGroupBy = group => group ? option => option.group : undefined;
|
|
@@ -8665,10 +8712,10 @@ const CssGrid = _a => {
|
|
|
8665
8712
|
};
|
|
8666
8713
|
}, [lastElement]);
|
|
8667
8714
|
// Adds the lastElement ref to the last Element of the grid
|
|
8668
|
-
const gridItemsWithLastElement = useMemo(() => [...gridItems.slice(0, -1), jsx("div", {
|
|
8715
|
+
const gridItemsWithLastElement = useMemo(() => loadMoreData ? [...gridItems.slice(0, -1), jsx("div", {
|
|
8669
8716
|
ref: setLastElement,
|
|
8670
8717
|
children: gridItems[gridItems.length - 1]
|
|
8671
|
-
}, "last-grid-item")], [gridItems]);
|
|
8718
|
+
}, "last-grid-item")] : gridItems, [gridItems]);
|
|
8672
8719
|
return jsx(StyledGrid, Object.assign({}, gridArgs, {
|
|
8673
8720
|
isLoading: isLoading,
|
|
8674
8721
|
children: gridItemsWithLastElement
|
|
@@ -10391,7 +10438,7 @@ const StyledSnackbar = styled(Snackbar)`
|
|
|
10391
10438
|
.MuiAlert-message {
|
|
10392
10439
|
word-break: break-word;
|
|
10393
10440
|
}
|
|
10394
|
-
.${rootClassName$
|
|
10441
|
+
.${rootClassName$1i} {
|
|
10395
10442
|
align-items: flex-start;
|
|
10396
10443
|
}
|
|
10397
10444
|
&.MuiSnackbar-anchorOriginTopLeft,
|
|
@@ -13158,7 +13205,7 @@ const StyledFormContainer = styled.div`
|
|
|
13158
13205
|
|
|
13159
13206
|
.${rootClassName$N},
|
|
13160
13207
|
.${rootClassName$P},
|
|
13161
|
-
.${rootClassName$
|
|
13208
|
+
.${rootClassName$1m},
|
|
13162
13209
|
.${rootSelectClassName},
|
|
13163
13210
|
.${rootClassName$A},
|
|
13164
13211
|
.${rootClassName$z} {
|
|
@@ -13166,7 +13213,7 @@ const StyledFormContainer = styled.div`
|
|
|
13166
13213
|
}
|
|
13167
13214
|
|
|
13168
13215
|
.${wrapperClassName$2} {
|
|
13169
|
-
+ .${rootClassName$
|
|
13216
|
+
+ .${rootClassName$1m},
|
|
13170
13217
|
.${wrapperClassName$2}
|
|
13171
13218
|
+ .${rootSelectClassName},
|
|
13172
13219
|
.${wrapperClassName$2}
|
|
@@ -14399,6 +14446,17 @@ const StyledInlineEdit = styled.div`
|
|
|
14399
14446
|
}
|
|
14400
14447
|
`}
|
|
14401
14448
|
`;
|
|
14449
|
+
const StyledInlineViewMode = styled.div`
|
|
14450
|
+
${({
|
|
14451
|
+
theme,
|
|
14452
|
+
maxRows,
|
|
14453
|
+
typography
|
|
14454
|
+
}) => css`
|
|
14455
|
+
white-space: pre-wrap;
|
|
14456
|
+
max-height: ${theme.typography[typography].lineHeight.substring(0, theme.typography[typography].lineHeight.length - 2) * (maxRows + 1)}px;
|
|
14457
|
+
overflow: auto;
|
|
14458
|
+
`}
|
|
14459
|
+
`;
|
|
14402
14460
|
|
|
14403
14461
|
const getCounterAdornment = (currentLength, maxLength, dataTestId) => {
|
|
14404
14462
|
if (currentLength === undefined || typeof currentLength !== 'number' || !maxLength || typeof maxLength !== 'number') return;
|
|
@@ -14473,6 +14531,9 @@ const DotInlineEdit = ({
|
|
|
14473
14531
|
name,
|
|
14474
14532
|
onChange,
|
|
14475
14533
|
onEditStateChange,
|
|
14534
|
+
maxRows = 4,
|
|
14535
|
+
minRows = 2,
|
|
14536
|
+
multiline = false,
|
|
14476
14537
|
placeholder,
|
|
14477
14538
|
readOnly,
|
|
14478
14539
|
selectTextOnEdit,
|
|
@@ -14547,7 +14608,11 @@ const DotInlineEdit = ({
|
|
|
14547
14608
|
handleInlineEditClick();
|
|
14548
14609
|
return;
|
|
14549
14610
|
}
|
|
14550
|
-
//
|
|
14611
|
+
// Allow new line when Ctrl is pressed in multiline mode
|
|
14612
|
+
if (multiline && event.shiftKey) {
|
|
14613
|
+
return;
|
|
14614
|
+
}
|
|
14615
|
+
// Save only when shift is pressed within input field
|
|
14551
14616
|
if (inputRef.current !== event.target) return;
|
|
14552
14617
|
yield handleSave();
|
|
14553
14618
|
break;
|
|
@@ -14577,7 +14642,9 @@ const DotInlineEdit = ({
|
|
|
14577
14642
|
const bindingsValue = bindings ? applyBindings(bindings, inputValue) : null;
|
|
14578
14643
|
const typographyClasses = useStylesWithRootClass('dot-view-mode-typography', !inputValue && placeholderClassName);
|
|
14579
14644
|
const viewModeClasses = useStylesWithRootClass(viewModeClassName, readOnly && readOnlyClassName);
|
|
14580
|
-
const viewModeChildren = jsxs(
|
|
14645
|
+
const viewModeChildren = jsxs(StyledInlineViewMode, {
|
|
14646
|
+
maxRows: maxRows,
|
|
14647
|
+
typography: typography,
|
|
14581
14648
|
children: [jsx(DotTypography, {
|
|
14582
14649
|
className: typographyClasses,
|
|
14583
14650
|
"data-testid": dataTestId && `${dataTestId}-view-mode-typography`,
|
|
@@ -14622,10 +14689,13 @@ const DotInlineEdit = ({
|
|
|
14622
14689
|
maxLength: charactersLimit === null || charactersLimit === void 0 ? void 0 : charactersLimit.maxLength
|
|
14623
14690
|
},
|
|
14624
14691
|
inputRef: inputRef,
|
|
14625
|
-
multiline:
|
|
14692
|
+
multiline: multiline,
|
|
14693
|
+
maxRows: multiline ? maxRows : undefined,
|
|
14694
|
+
minRows: multiline ? minRows : undefined,
|
|
14626
14695
|
name: name,
|
|
14627
14696
|
onChange: event => setInputValue(event.target.value),
|
|
14628
14697
|
onFocus: selectTextOnEdit ? event => event.target.select() : undefined,
|
|
14698
|
+
placeholder: placeholder,
|
|
14629
14699
|
size: "small",
|
|
14630
14700
|
type: "text",
|
|
14631
14701
|
value: inputValue,
|
|
@@ -15787,6 +15857,36 @@ const StyledPaper = styled(Paper)`
|
|
|
15787
15857
|
display: none;
|
|
15788
15858
|
}
|
|
15789
15859
|
}
|
|
15860
|
+
|
|
15861
|
+
&.with-multiselect-over-table-header {
|
|
15862
|
+
position: relative;
|
|
15863
|
+
|
|
15864
|
+
.dot-table-multiselect-header {
|
|
15865
|
+
position: absolute;
|
|
15866
|
+
width: 100%;
|
|
15867
|
+
|
|
15868
|
+
.dot-table-selection-toolbar {
|
|
15869
|
+
padding: ${theme.spacing(0, 1)};
|
|
15870
|
+
min-height: unset;
|
|
15871
|
+
height: 56px;
|
|
15872
|
+
}
|
|
15873
|
+
}
|
|
15874
|
+
|
|
15875
|
+
.dot-thead {
|
|
15876
|
+
// hide table header row when multiselect toolbar is shown over it
|
|
15877
|
+
visibility: hidden;
|
|
15878
|
+
}
|
|
15879
|
+
|
|
15880
|
+
&.hidden-multiselect {
|
|
15881
|
+
.dot-table-multiselect-header {
|
|
15882
|
+
display: none;
|
|
15883
|
+
}
|
|
15884
|
+
|
|
15885
|
+
.dot-thead {
|
|
15886
|
+
visibility: unset;
|
|
15887
|
+
}
|
|
15888
|
+
}
|
|
15889
|
+
}
|
|
15790
15890
|
}
|
|
15791
15891
|
`}
|
|
15792
15892
|
`;
|
|
@@ -15992,6 +16092,9 @@ const parseCellMaxWidth = width => {
|
|
|
15992
16092
|
// if contains 'px' or 'vw' then pass as is
|
|
15993
16093
|
return width;
|
|
15994
16094
|
};
|
|
16095
|
+
const checkIsMultiselectOverTableHeaderRow = (multiSelect, hasToolbar) => {
|
|
16096
|
+
return !hasToolbar && !!(multiSelect === null || multiSelect === void 0 ? void 0 : multiSelect.showOverTableHeaderRow);
|
|
16097
|
+
};
|
|
15995
16098
|
|
|
15996
16099
|
const rootClassName$k = 'dot-td';
|
|
15997
16100
|
const StyledTableCell = styled(TableCell)`
|
|
@@ -16193,46 +16296,75 @@ const TABLE_TYPOGRAPHY_VARIANT = 'body1';
|
|
|
16193
16296
|
const TABLE_DEFAULT_SKELETON_ROWS = 4;
|
|
16194
16297
|
|
|
16195
16298
|
const rootClassName$i = 'dot-th-checkbox';
|
|
16196
|
-
const
|
|
16197
|
-
|
|
16198
|
-
|
|
16199
|
-
|
|
16200
|
-
|
|
16201
|
-
|
|
16202
|
-
|
|
16203
|
-
|
|
16299
|
+
const styledTableHeaderCheckboxElement = (isCell = true) => {
|
|
16300
|
+
return styled(isCell ? TableCell : 'div')`
|
|
16301
|
+
${({
|
|
16302
|
+
theme
|
|
16303
|
+
}) => css`
|
|
16304
|
+
&.${rootClassName$i} {
|
|
16305
|
+
background: ${theme.palette.figma.background.level0.componentsBackground};
|
|
16306
|
+
padding: ${theme.spacing(0, 1)};
|
|
16307
|
+
width: ${theme.spacing(5)};
|
|
16204
16308
|
|
|
16205
|
-
|
|
16206
|
-
|
|
16309
|
+
&.table-selection-toolbar-checkbox {
|
|
16310
|
+
background: unset;
|
|
16311
|
+
padding: ${theme.spacing(0, 3, 0, 0)};
|
|
16312
|
+
width: ${theme.spacing(4.5)};
|
|
16313
|
+
}
|
|
16314
|
+
|
|
16315
|
+
.dot-form-control-label {
|
|
16316
|
+
margin: 0;
|
|
16317
|
+
}
|
|
16207
16318
|
}
|
|
16208
|
-
}
|
|
16209
|
-
|
|
16210
|
-
|
|
16319
|
+
`}
|
|
16320
|
+
`;
|
|
16321
|
+
};
|
|
16322
|
+
const StyledTableHeaderCheckboxCell = styledTableHeaderCheckboxElement();
|
|
16323
|
+
const StyledTableHeaderCheckbox = styledTableHeaderCheckboxElement(false);
|
|
16211
16324
|
|
|
16212
16325
|
const DotHeaderCheckboxCell = ({
|
|
16213
16326
|
ariaLabel,
|
|
16214
16327
|
className,
|
|
16215
16328
|
'data-testid': dataTestId,
|
|
16216
|
-
|
|
16217
|
-
|
|
16329
|
+
isFromTableSelectionToolbar,
|
|
16330
|
+
multiSelectHeader
|
|
16218
16331
|
}) => {
|
|
16219
|
-
const rootClasses = useStylesWithRootClass(rootClassName$i, className);
|
|
16220
|
-
const [
|
|
16332
|
+
const rootClasses = useStylesWithRootClass(rootClassName$i, className, isFromTableSelectionToolbar ? 'table-selection-toolbar-checkbox' : '');
|
|
16333
|
+
const [multiSelectState, setMultiSelectState] = useState('unchecked');
|
|
16334
|
+
const {
|
|
16335
|
+
onCheckAllChange,
|
|
16336
|
+
pageData,
|
|
16337
|
+
selectedTableRowIds
|
|
16338
|
+
} = multiSelectHeader || {};
|
|
16221
16339
|
useEffect(() => {
|
|
16222
|
-
|
|
16223
|
-
|
|
16340
|
+
if (!multiSelectHeader) return;
|
|
16341
|
+
if (selectedTableRowIds && selectedTableRowIds.length > 0 && pageData) {
|
|
16342
|
+
const itemsNumber = pageData.length;
|
|
16343
|
+
const checkedItemsNumber = pageData.filter(row => selectedTableRowIds.includes(row.id)).length;
|
|
16344
|
+
if (itemsNumber === checkedItemsNumber) {
|
|
16345
|
+
setMultiSelectState('checked');
|
|
16346
|
+
return;
|
|
16347
|
+
}
|
|
16348
|
+
if (checkedItemsNumber > 0) {
|
|
16349
|
+
setMultiSelectState('indeterminate');
|
|
16350
|
+
return;
|
|
16351
|
+
}
|
|
16352
|
+
}
|
|
16353
|
+
setMultiSelectState('unchecked');
|
|
16354
|
+
}, [multiSelectHeader]);
|
|
16224
16355
|
const getNextCheckboxState = currentCheckboxState => {
|
|
16225
|
-
if (currentCheckboxState === 'indeterminate' || currentCheckboxState === 'checked') return 'unchecked';
|
|
16356
|
+
if (currentCheckboxState === 'indeterminate' && !isFromTableSelectionToolbar || currentCheckboxState === 'checked') return 'unchecked';
|
|
16226
16357
|
return 'checked';
|
|
16227
16358
|
};
|
|
16228
|
-
const isIndeterminate =
|
|
16229
|
-
const isCheckboxChecked =
|
|
16359
|
+
const isIndeterminate = multiSelectState === 'indeterminate';
|
|
16360
|
+
const isCheckboxChecked = multiSelectState === 'checked';
|
|
16230
16361
|
const handleChange = () => {
|
|
16231
|
-
const nextState = getNextCheckboxState(
|
|
16232
|
-
|
|
16362
|
+
const nextState = getNextCheckboxState(multiSelectState);
|
|
16363
|
+
setMultiSelectState(nextState);
|
|
16233
16364
|
onCheckAllChange(nextState === 'checked', []);
|
|
16234
16365
|
};
|
|
16235
|
-
|
|
16366
|
+
const StyledTableHeaderCheckboxElement = isFromTableSelectionToolbar ? StyledTableHeaderCheckbox : StyledTableHeaderCheckboxCell;
|
|
16367
|
+
return jsx(StyledTableHeaderCheckboxElement, {
|
|
16236
16368
|
align: "left",
|
|
16237
16369
|
className: rootClasses,
|
|
16238
16370
|
"data-testid": dataTestId,
|
|
@@ -16337,33 +16469,10 @@ const DotHeaderRow = ({
|
|
|
16337
16469
|
const createSortHandler = property => _event => {
|
|
16338
16470
|
onRequestSort(property);
|
|
16339
16471
|
};
|
|
16340
|
-
const [multiSelectState, setMultiSelectState] = useState('unchecked');
|
|
16341
|
-
const {
|
|
16342
|
-
onCheckAllChange,
|
|
16343
|
-
pageData,
|
|
16344
|
-
selectedTableRowIds
|
|
16345
|
-
} = multiSelectHeader || {};
|
|
16346
|
-
useEffect(() => {
|
|
16347
|
-
if (!multiSelectHeader) return;
|
|
16348
|
-
if (selectedTableRowIds && selectedTableRowIds.length > 0 && pageData) {
|
|
16349
|
-
const itemsNumber = pageData.length;
|
|
16350
|
-
const checkedItemsNumber = pageData.filter(row => selectedTableRowIds.includes(row.id)).length;
|
|
16351
|
-
if (itemsNumber === checkedItemsNumber) {
|
|
16352
|
-
setMultiSelectState('checked');
|
|
16353
|
-
return;
|
|
16354
|
-
}
|
|
16355
|
-
if (checkedItemsNumber > 0) {
|
|
16356
|
-
setMultiSelectState('indeterminate');
|
|
16357
|
-
return;
|
|
16358
|
-
}
|
|
16359
|
-
}
|
|
16360
|
-
setMultiSelectState('unchecked');
|
|
16361
|
-
}, [multiSelectHeader]);
|
|
16362
16472
|
const renderMultiSelectCell = () => {
|
|
16363
16473
|
return jsx(DotHeaderCheckboxCell, {
|
|
16364
16474
|
ariaLabel: "Click to select all table page rows",
|
|
16365
|
-
|
|
16366
|
-
onCheckAllChange: onCheckAllChange
|
|
16475
|
+
multiSelectHeader: multiSelectHeader
|
|
16367
16476
|
});
|
|
16368
16477
|
};
|
|
16369
16478
|
return jsx(TableHead, {
|
|
@@ -16423,7 +16532,8 @@ const CollapsibleTableBody = ({
|
|
|
16423
16532
|
typography: nestedTableBodyTypography,
|
|
16424
16533
|
noWrap: column.truncate,
|
|
16425
16534
|
style: {
|
|
16426
|
-
maxWidth: parseCellMaxWidth(column.width)
|
|
16535
|
+
maxWidth: parseCellMaxWidth(column.width),
|
|
16536
|
+
minWidth: parseCellMaxWidth(column.minWidth)
|
|
16427
16537
|
},
|
|
16428
16538
|
value: row[colId]
|
|
16429
16539
|
}, colId);
|
|
@@ -16448,7 +16558,7 @@ const StyledCollapsibleTableWrapper = styled.div`
|
|
|
16448
16558
|
.dot-table-container {
|
|
16449
16559
|
th.MuiTableCell-root:first-child,
|
|
16450
16560
|
td.MuiTableCell-root:first-child {
|
|
16451
|
-
|
|
16561
|
+
max-width: 40px;
|
|
16452
16562
|
}
|
|
16453
16563
|
}
|
|
16454
16564
|
|
|
@@ -16717,7 +16827,8 @@ const DotTableRow = ({
|
|
|
16717
16827
|
noWrap: column.truncate,
|
|
16718
16828
|
onActionMenuTrigger: (menuRef, menuItem) => onActionMenuTrigger(menuRef, menuItem),
|
|
16719
16829
|
style: {
|
|
16720
|
-
maxWidth: parseCellMaxWidth(column.width)
|
|
16830
|
+
maxWidth: parseCellMaxWidth(column.width),
|
|
16831
|
+
minWidth: parseCellMaxWidth(column.minWidth)
|
|
16721
16832
|
},
|
|
16722
16833
|
value: rowData[column.id]
|
|
16723
16834
|
}, column.id);
|
|
@@ -16817,10 +16928,6 @@ const StyledTableSelectionToolbar = styled(DotActionToolbar)`
|
|
|
16817
16928
|
.dot-link {
|
|
16818
16929
|
color: ${theme.palette.figma.overlay.table.text};
|
|
16819
16930
|
padding: ${theme.spacing(0.25, 0.25, 0, 0.5)};
|
|
16820
|
-
|
|
16821
|
-
&:hover {
|
|
16822
|
-
color: ${theme.palette.figma.typography.white};
|
|
16823
|
-
}
|
|
16824
16931
|
}
|
|
16825
16932
|
}
|
|
16826
16933
|
|
|
@@ -16852,6 +16959,7 @@ const DotTableSelectionToolbar = ({
|
|
|
16852
16959
|
className,
|
|
16853
16960
|
'data-testid': dataTestId,
|
|
16854
16961
|
onClearAll,
|
|
16962
|
+
multiSelectHeader,
|
|
16855
16963
|
selectedRowsNumber
|
|
16856
16964
|
}) => {
|
|
16857
16965
|
const rootClasses = useStylesWithRootClass(rootClassName$f, className);
|
|
@@ -16862,7 +16970,11 @@ const DotTableSelectionToolbar = ({
|
|
|
16862
16970
|
variant: "regular",
|
|
16863
16971
|
children: [jsxs("div", {
|
|
16864
16972
|
className: "dot-selected-rows-container",
|
|
16865
|
-
children: [
|
|
16973
|
+
children: [multiSelectHeader && jsx(DotHeaderCheckboxCell, {
|
|
16974
|
+
ariaLabel: "Click to select all table page rows",
|
|
16975
|
+
isFromTableSelectionToolbar: true,
|
|
16976
|
+
multiSelectHeader: multiSelectHeader
|
|
16977
|
+
}), jsxs(DotTypography, {
|
|
16866
16978
|
className: "dot-selected-rows-heading",
|
|
16867
16979
|
variant: "h3",
|
|
16868
16980
|
children: [selectedRowsNumber, " selected"]
|
|
@@ -16944,11 +17056,13 @@ const DotTable = ({
|
|
|
16944
17056
|
const [tableRowsPerPage, setRowsPerPage] = useState(rowsPerPage);
|
|
16945
17057
|
const [selectedRowIds, setSelectedRowIds] = useState([]);
|
|
16946
17058
|
const [expandedRowIds, setExpandedRowIds] = useState([]);
|
|
17059
|
+
const selectedRowsNumber = selectedRowIds.length;
|
|
17060
|
+
const showMultiselectOverTableHeaderRow = checkIsMultiselectOverTableHeaderRow(multiSelect, !!toolbar);
|
|
16947
17061
|
const getSortedData = () => {
|
|
16948
17062
|
return onUpdateData ? data : stableSort(data, getComparator(order, orderBy));
|
|
16949
17063
|
};
|
|
16950
17064
|
const [pageData, setPageData] = useState(getSortedData().slice(0, rowsPerPage ? rowsPerPage : data.length));
|
|
16951
|
-
const rootClasses = useStylesWithRootClass(rootClassName$m, className, loading ? 'loading' : '');
|
|
17065
|
+
const rootClasses = useStylesWithRootClass(rootClassName$m, className, loading ? 'loading' : '', showMultiselectOverTableHeaderRow ? 'with-multiselect-over-table-header' : '', showMultiselectOverTableHeaderRow && !selectedRowsNumber ? 'hidden-multiselect' : '');
|
|
16952
17066
|
const updateData = (newOrder, newOrderBy, newPage, newRowsPerPage) => {
|
|
16953
17067
|
const newData = stableSort(data, getComparator(newOrder, newOrderBy));
|
|
16954
17068
|
setPageData(newRowsPerPage ? newData.slice(newPage * newRowsPerPage, newPage * newRowsPerPage + newRowsPerPage) : newData);
|
|
@@ -17042,7 +17156,6 @@ const DotTable = ({
|
|
|
17042
17156
|
pageData: onUpdateData ? data : pageData,
|
|
17043
17157
|
selectedTableRowIds: selectedRowIds
|
|
17044
17158
|
};
|
|
17045
|
-
const selectedRowsNumber = selectedRowIds.length;
|
|
17046
17159
|
const handleRowExpandCollapseTable = (isExpanded, rowId, setLoading) => {
|
|
17047
17160
|
setExpandedRowIds(prevRowIds => {
|
|
17048
17161
|
const newIds = getExpandedRowIds(prevRowIds, rowId, isExpanded);
|
|
@@ -17056,21 +17169,28 @@ const DotTable = ({
|
|
|
17056
17169
|
onRowExpandCollapseTable: handleRowExpandCollapseTable,
|
|
17057
17170
|
expandedTableRowIds: expandedRowIds
|
|
17058
17171
|
});
|
|
17059
|
-
const
|
|
17172
|
+
const renderTableSelectionToolbar = () => {
|
|
17060
17173
|
const {
|
|
17061
17174
|
bulkActions
|
|
17062
17175
|
} = multiSelect || {};
|
|
17063
|
-
return
|
|
17176
|
+
return jsx(DotTableSelectionToolbar, {
|
|
17064
17177
|
ariaLabel: "Selected table rows with bulk actions",
|
|
17065
17178
|
onClearAll: (multiSelect === null || multiSelect === void 0 ? void 0 : multiSelect.onClearAllChange) && handleClearAll,
|
|
17179
|
+
multiSelectHeader: showMultiselectOverTableHeaderRow ? multiSelectHeader : undefined,
|
|
17066
17180
|
selectedRowsNumber: selectedRowsNumber,
|
|
17067
17181
|
bulkActions: bulkActions
|
|
17068
|
-
})
|
|
17182
|
+
});
|
|
17183
|
+
};
|
|
17184
|
+
const renderToolbar = () => {
|
|
17185
|
+
return multiSelect && selectedRowsNumber ? renderTableSelectionToolbar() : toolbar;
|
|
17069
17186
|
};
|
|
17070
17187
|
return jsxs(StyledPaper, {
|
|
17071
17188
|
className: rootClasses,
|
|
17072
17189
|
elevation: 0,
|
|
17073
|
-
children: [
|
|
17190
|
+
children: [showMultiselectOverTableHeaderRow ? jsx("div", {
|
|
17191
|
+
className: "dot-table-multiselect-header",
|
|
17192
|
+
children: renderTableSelectionToolbar()
|
|
17193
|
+
}) : renderToolbar(), jsx(StyledTableContainer, {
|
|
17074
17194
|
className: "dot-table-container",
|
|
17075
17195
|
"data-testid": dataTestId,
|
|
17076
17196
|
style: {
|
|
@@ -19443,4 +19563,4 @@ const BoardColumnSummary = ({
|
|
|
19443
19563
|
});
|
|
19444
19564
|
};
|
|
19445
19565
|
|
|
19446
|
-
export { ApiError$1 as ApiError, BoardStatusProvider, Cell, ColumnStatusProvider, CreateUUID, CssCell, CssGrid, CssGridDebug, DashboardAppTypeOptions, DashboardView, DatePickerKeydownContext, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotAvatarWithDetails, DotBadge, Board as DotBoard, BoardColumn as DotBoardColumn, BoardColumnActionBar as DotBoardColumnActionBar, BoardColumnCollapse as DotBoardColumnCollapse, BoardColumnExpand as DotBoardColumnExpand, BoardColumnHeader as DotBoardColumnHeader, BoardColumnItems as DotBoardColumnItems, BoardColumnSummary as DotBoardColumnSummary, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCarousel, DotCheckbox, DotCheckboxGroup, DotChip, DotChipList, DotClickAwayListener, DotConfirmationDialog, DotCopyButton, DotCoreApiProvider, DotDashboardActions, DotDashboardDetails, DotDashboardDialog, DotDashboardHeader, DotDashboardOptionsMenu, DotDashboardPublishConfirm, DotDashboardStatusPill, DotDatePicker, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyFilterState, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotIllustration, DotImpactDialog, DotInlineEdit, DotInputLabel, DotInputSelect, DotInputText, DotLinearProgress, DotLink, DotList, DotMenu, DotMetadataApiProvider, DotNavigationRail, DotPill, DotPopper, DotProgress, DotProgressButton, DotRadioButton, DotRadioGroup, DotSidebar, DotSkeleton, DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, DotSplitButton, DotStepper, DotStickyWithBorder, DotSwitch, DotTable, DotTableAction, DotTableActions, DotTablePagination, DotTabs, DotThemeProvider, DotTimePicker, DotTooltip, DotTruncateWithTooltip, DotTypography, avatarColors, breakpointOptions, checkIfValidDate, darkFigmaColors, lightThemeColors as lightColors, lightFigmaColors, mockScrollIntoView, parseAutoCompleteValue, variables as themeVariables, typographyOptions, useBoardStatus, useColumnStatus, useDotCoreApiContext, useDotMetadataApiContext, useDotSnackbarContext, useEnqueueErrorMessage, useKeyPress };
|
|
19566
|
+
export { ApiError$1 as ApiError, BoardStatusProvider, Cell, ColumnStatusProvider, CreateUUID, CssCell, CssGrid, CssGridDebug, DashboardAppTypeOptions, DashboardView, DatePickerKeydownContext, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAnnotation, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotAvatarWithDetails, DotBadge, Board as DotBoard, BoardColumn as DotBoardColumn, BoardColumnActionBar as DotBoardColumnActionBar, BoardColumnCollapse as DotBoardColumnCollapse, BoardColumnExpand as DotBoardColumnExpand, BoardColumnHeader as DotBoardColumnHeader, BoardColumnItems as DotBoardColumnItems, BoardColumnSummary as DotBoardColumnSummary, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCarousel, DotCheckbox, DotCheckboxGroup, DotChip, DotChipList, DotClickAwayListener, DotConfirmationDialog, DotCopyButton, DotCoreApiProvider, DotDashboardActions, DotDashboardDetails, DotDashboardDialog, DotDashboardHeader, DotDashboardOptionsMenu, DotDashboardPublishConfirm, DotDashboardStatusPill, DotDatePicker, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyFilterState, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotIllustration, DotImpactDialog, DotInlineEdit, DotInputLabel, DotInputSelect, DotInputText, DotLinearProgress, DotLink, DotList, DotMenu, DotMetadataApiProvider, DotNavigationRail, DotPill, DotPopper, DotProgress, DotProgressButton, DotRadioButton, DotRadioGroup, DotSidebar, DotSkeleton, DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, DotSplitButton, DotStepper, DotStickyWithBorder, DotSwitch, DotTable, DotTableAction, DotTableActions, DotTablePagination, DotTabs, DotThemeProvider, DotTimePicker, DotTooltip, DotTruncateWithTooltip, DotTypography, avatarColors, breakpointOptions, checkIfValidDate, darkFigmaColors, lightThemeColors as lightColors, lightFigmaColors, mockScrollIntoView, parseAutoCompleteValue, variables as themeVariables, typographyOptions, useBoardStatus, useColumnStatus, useDotCoreApiContext, useDotMetadataApiContext, useDotSnackbarContext, useEnqueueErrorMessage, useKeyPress };
|
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { CommonProps } from '../CommonProps';
|
|
3
|
+
export type AnnotationType = 'primary' | 'secondary';
|
|
4
|
+
export interface AnnotationProps extends CommonProps {
|
|
5
|
+
/** The content shown in the annotation (e.g. text, icon). The annotation is meant to be used inside text, mainly to highlight the keyboard shortcuts. */
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
/** The type of the annotation. Can be `primary` (default) or `secondary` (styled for using in the tooltip). */
|
|
8
|
+
type?: AnnotationType;
|
|
9
|
+
}
|
|
10
|
+
export declare const DotAnnotation: ({ ariaLabel, "data-pendoid": dataPendoId, "data-testid": dataTestId, className, content, type, }: AnnotationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './CommonProps';
|
|
2
2
|
export { ApiError } from './core-api/openapi/core/ApiError';
|
|
3
|
+
export type { AnnotationProps, AnnotationType } from './annotation/Annotation';
|
|
3
4
|
export type { AppToolbarProps } from './app-toolbar/AppToolbar';
|
|
4
5
|
export type { AutoCompleteOption, AutoCompleteProps, AutoCompleteValue, AutocompleteRenderGroupParams, AutocompleteRenderOptionState, FilterOptionsState, } from './auto-complete';
|
|
5
6
|
export type { AvatarProps } from './avatar/Avatar';
|
|
@@ -50,6 +51,7 @@ export { DotAccordion } from './accordion/Accordion';
|
|
|
50
51
|
export { DotActionToolbar } from './action-toolbar/ActionToolbar';
|
|
51
52
|
export { DotAlertBanner } from './alert-banner/AlertBanner';
|
|
52
53
|
export { DotAppLogo } from './app-logo/AppLogo';
|
|
54
|
+
export { DotAnnotation } from './annotation/Annotation';
|
|
53
55
|
export { DotAppSwitcher } from './app-switcher/AppSwitcher';
|
|
54
56
|
export { DotAppToolbar } from './app-toolbar/AppToolbar';
|
|
55
57
|
export { DotAutoComplete, parseAutoCompleteValue } from './auto-complete';
|
|
@@ -10,6 +10,12 @@ export interface InlineEditProps extends CommonProps {
|
|
|
10
10
|
fullWidth?: boolean;
|
|
11
11
|
/** If true, `Cancel` and `Save` buttons will be hidden */
|
|
12
12
|
hideActionButtons?: boolean;
|
|
13
|
+
/** if multiline is true will default to 4 */
|
|
14
|
+
maxRows?: number;
|
|
15
|
+
/** if multiline is true will default to 2 */
|
|
16
|
+
minRows?: number;
|
|
17
|
+
/** If true, the input will be multiline */
|
|
18
|
+
multiline?: boolean;
|
|
13
19
|
/** The name of input element */
|
|
14
20
|
name: string;
|
|
15
21
|
/** An async function which should be executed when the value of the input changes */
|
|
@@ -36,4 +42,4 @@ export interface InlineEditProps extends CommonProps {
|
|
|
36
42
|
/**
|
|
37
43
|
* @experimental This component is still in development
|
|
38
44
|
*/
|
|
39
|
-
export declare const DotInlineEdit: ({ ariaLabel, ariaRole, bindings, charactersLimit, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, placeholder, readOnly, selectTextOnEdit, startEditable, tabIndex, tooltip, typography, value, }: InlineEditProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare const DotInlineEdit: ({ ariaLabel, ariaRole, bindings, charactersLimit, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, maxRows, minRows, multiline, placeholder, readOnly, selectTextOnEdit, startEditable, tabIndex, tooltip, typography, value, }: InlineEditProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,3 +11,8 @@ export interface StyledInlineEditProps {
|
|
|
11
11
|
typography?: TypographyVariant;
|
|
12
12
|
}
|
|
13
13
|
export declare const StyledInlineEdit: import("styled-components").StyledComponent<"div", any, StyledInlineEditProps, never>;
|
|
14
|
+
export interface StyledInlineViewModeProps {
|
|
15
|
+
maxRows: number;
|
|
16
|
+
typography: TypographyVariant;
|
|
17
|
+
}
|
|
18
|
+
export declare const StyledInlineViewMode: import("styled-components").StyledComponent<"div", any, StyledInlineViewModeProps, never>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
|
-
import {
|
|
3
|
+
import { MultiSelectHeader } from './utils/models';
|
|
4
4
|
export interface DotHeaderCheckboxCellProps extends CommonProps {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
isFromTableSelectionToolbar?: boolean;
|
|
6
|
+
multiSelectHeader: MultiSelectHeader;
|
|
7
7
|
}
|
|
8
|
-
export declare const DotHeaderCheckboxCell: ({ ariaLabel, className, "data-testid": dataTestId,
|
|
8
|
+
export declare const DotHeaderCheckboxCell: ({ ariaLabel, className, "data-testid": dataTestId, isFromTableSelectionToolbar, multiSelectHeader, }: DotHeaderCheckboxCellProps) => ReactElement;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { TableCell } from '@mui/material';
|
|
2
2
|
export declare const rootClassName = "dot-th-checkbox";
|
|
3
|
-
export declare const StyledTableHeaderCheckboxCell: import("styled-components").StyledComponent<typeof TableCell, any, {}, never>;
|
|
3
|
+
export declare const StyledTableHeaderCheckboxCell: import("styled-components").StyledComponent<"div" | typeof TableCell, any, {}, never>;
|
|
4
|
+
export declare const StyledTableHeaderCheckbox: import("styled-components").StyledComponent<"div" | typeof TableCell, any, {}, never>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
|
+
import { MultiSelectHeader } from './utils/models';
|
|
3
4
|
export interface TableSelectionToolbarProps extends CommonProps {
|
|
4
5
|
bulkActions?: ReactNode;
|
|
6
|
+
multiSelectHeader?: MultiSelectHeader;
|
|
5
7
|
onClearAll?: () => void;
|
|
6
8
|
selectedRowsNumber: number;
|
|
7
9
|
}
|
|
8
|
-
export declare const DotTableSelectionToolbar: ({ ariaLabel, bulkActions, className, "data-testid": dataTestId, onClearAll, selectedRowsNumber, }: TableSelectionToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const DotTableSelectionToolbar: ({ ariaLabel, bulkActions, className, "data-testid": dataTestId, onClearAll, multiSelectHeader, selectedRowsNumber, }: TableSelectionToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { TypographyVariant } from '../../typography/Typography';
|
|
3
3
|
import { TableRowProps } from './interfaces';
|
|
4
|
+
import { MultiSelect } from './models';
|
|
4
5
|
import { AvatarWithTextCell } from '../TableCell';
|
|
5
6
|
import { InlineEditProps } from '../../inline-edit';
|
|
6
7
|
export declare const getFormattedTableCellValue: (value: any, typographyVariant: TypographyVariant) => ReactNode;
|
|
@@ -15,3 +16,4 @@ export declare const getSelectedRowIds: (id: string, isChecked: boolean, selecte
|
|
|
15
16
|
export declare const getBulkSelectedRowIds: (isChecked: boolean, selectedIds: string[], pageData: TableRowProps[]) => string[];
|
|
16
17
|
export declare const getExpandedRowIds: (expandedIds: string[], id: string, isExpand: boolean) => string[];
|
|
17
18
|
export declare const parseCellMaxWidth: (width: string) => string;
|
|
19
|
+
export declare const checkIsMultiselectOverTableHeaderRow: (multiSelect: MultiSelect | undefined, hasToolbar: boolean) => boolean;
|
|
@@ -11,6 +11,7 @@ export interface MultiSelect {
|
|
|
11
11
|
onCheckAllChange?: TableRowSelectChangeHandler;
|
|
12
12
|
onCheckRowChange?: TableRowSelectChangeHandler;
|
|
13
13
|
onClearAllChange?: TableRowSelectChangeHandler;
|
|
14
|
+
showOverTableHeaderRow?: boolean;
|
|
14
15
|
}
|
|
15
16
|
interface MultiSelectTableBase {
|
|
16
17
|
selectedTableRowIds: string[];
|