@oliasoft-open-source/react-ui-library 3.1.10 → 3.1.12
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/dist/index.js +32 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9892,7 +9892,8 @@ const Layer$2 = ({
|
|
|
9892
9892
|
tree: tree2,
|
|
9893
9893
|
path,
|
|
9894
9894
|
maxHeight: maxHeight2,
|
|
9895
|
-
showAllButton
|
|
9895
|
+
showAllButton,
|
|
9896
|
+
testId
|
|
9896
9897
|
}) => {
|
|
9897
9898
|
var _a, _b;
|
|
9898
9899
|
if (isValidElement(sections)) {
|
|
@@ -9932,6 +9933,7 @@ const Layer$2 = ({
|
|
|
9932
9933
|
maxHeight: maxHeight2 || "auto",
|
|
9933
9934
|
overflowY: maxHeight2 ? "auto" : "default"
|
|
9934
9935
|
},
|
|
9936
|
+
"data-testid": testId,
|
|
9935
9937
|
children: /* @__PURE__ */ jsx("ul", {
|
|
9936
9938
|
children: localSections.map((section, i) => /* @__PURE__ */ jsx("li", {
|
|
9937
9939
|
children: /* @__PURE__ */ jsx(Section$1, {
|
|
@@ -10405,7 +10407,8 @@ const useContextMenu = (sections, width, placement, possiblePlacements, closeOnO
|
|
|
10405
10407
|
tree: tree2,
|
|
10406
10408
|
path,
|
|
10407
10409
|
groupOrder,
|
|
10408
|
-
maxHeight: maxHeight2
|
|
10410
|
+
maxHeight: maxHeight2,
|
|
10411
|
+
testId: testId && `${testId}-layer`
|
|
10409
10412
|
})
|
|
10410
10413
|
}));
|
|
10411
10414
|
return [layer2, handleMouseEvent];
|
|
@@ -10553,7 +10556,8 @@ const DropDownMenu = ({
|
|
|
10553
10556
|
path,
|
|
10554
10557
|
groupOrder,
|
|
10555
10558
|
maxHeight: maxHeight2,
|
|
10556
|
-
showAllButton
|
|
10559
|
+
showAllButton,
|
|
10560
|
+
testId: testId && `${testId}-layer`
|
|
10557
10561
|
})
|
|
10558
10562
|
}))]
|
|
10559
10563
|
});
|
|
@@ -14880,7 +14884,6 @@ const ResizeHandle = React__default.forwardRef((props, ref2) => {
|
|
|
14880
14884
|
const DrawerResizeWrapper = ({
|
|
14881
14885
|
children,
|
|
14882
14886
|
width,
|
|
14883
|
-
minWidth,
|
|
14884
14887
|
right: right2,
|
|
14885
14888
|
onResize,
|
|
14886
14889
|
open
|
|
@@ -14893,14 +14896,15 @@ const DrawerResizeWrapper = ({
|
|
|
14893
14896
|
size: size2,
|
|
14894
14897
|
handle
|
|
14895
14898
|
}) => {
|
|
14896
|
-
if (open
|
|
14899
|
+
if (open) {
|
|
14897
14900
|
onResize(size2.width);
|
|
14898
14901
|
}
|
|
14899
14902
|
};
|
|
14900
14903
|
return onResize ? /* @__PURE__ */ jsx(Resizable, {
|
|
14901
14904
|
width,
|
|
14902
14905
|
height: 100,
|
|
14903
|
-
minConstraints: [
|
|
14906
|
+
minConstraints: [MINIMUM_OPEN_WIDTH, null],
|
|
14907
|
+
maxConstraints: [MAXIMUM_OPEN_WIDTH, null],
|
|
14904
14908
|
onResize: handleResize,
|
|
14905
14909
|
handle: open ? /* @__PURE__ */ jsx(ResizeHandle, {}) : null,
|
|
14906
14910
|
resizeHandles: right2 ? ["w"] : ["e"],
|
|
@@ -14916,14 +14920,12 @@ const DrawerResizeWrapper = ({
|
|
|
14916
14920
|
DrawerResizeWrapper.defaultProps = {
|
|
14917
14921
|
right: false,
|
|
14918
14922
|
width: 400,
|
|
14919
|
-
minWidth: null,
|
|
14920
14923
|
children: null,
|
|
14921
14924
|
onResize: null
|
|
14922
14925
|
};
|
|
14923
14926
|
DrawerResizeWrapper.propTypes = {
|
|
14924
14927
|
right: propTypes$1.exports.bool,
|
|
14925
14928
|
width: propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.number]),
|
|
14926
|
-
minWidth: propTypes$1.exports.oneOfType([propTypes$1.exports.string, propTypes$1.exports.number]),
|
|
14927
14929
|
children: propTypes$1.exports.node,
|
|
14928
14930
|
onResize: propTypes$1.exports.func
|
|
14929
14931
|
};
|
|
@@ -14968,7 +14970,6 @@ const Drawer = ({
|
|
|
14968
14970
|
};
|
|
14969
14971
|
return /* @__PURE__ */ jsx(DrawerResizeWrapper, {
|
|
14970
14972
|
width: currentWidth,
|
|
14971
|
-
minWidth: tabs2 ? TABS_WIDTH : closedWidth,
|
|
14972
14973
|
onResize,
|
|
14973
14974
|
open,
|
|
14974
14975
|
right: right2,
|
|
@@ -26807,7 +26808,8 @@ const Layer = ({
|
|
|
26807
26808
|
focusedOptionIndex,
|
|
26808
26809
|
width,
|
|
26809
26810
|
firstSelectedOptionIndex,
|
|
26810
|
-
closeLayer
|
|
26811
|
+
closeLayer,
|
|
26812
|
+
testId
|
|
26811
26813
|
}) => {
|
|
26812
26814
|
useEffect(() => {
|
|
26813
26815
|
if (firstSelectedOptionIndex !== null && listRef.current !== null) {
|
|
@@ -26816,6 +26818,7 @@ const Layer = ({
|
|
|
26816
26818
|
}, []);
|
|
26817
26819
|
const optionHeight = 38;
|
|
26818
26820
|
return /* @__PURE__ */ jsx("div", {
|
|
26821
|
+
"data-testid": testId,
|
|
26819
26822
|
className: cx(styles$k.layer),
|
|
26820
26823
|
children: !sections.length ? /* @__PURE__ */ jsx("ul", {
|
|
26821
26824
|
children: /* @__PURE__ */ jsx("li", {
|
|
@@ -26845,7 +26848,8 @@ const Layer = ({
|
|
|
26845
26848
|
focused: focusedOptionIndex === index2,
|
|
26846
26849
|
onSelectOption: (evt) => {
|
|
26847
26850
|
onSelectOption(evt, sections[index2]);
|
|
26848
|
-
}
|
|
26851
|
+
},
|
|
26852
|
+
testId: testId && (sections[index2].description ? `${testId}-${sections[index2].description}` : `${testId}-${sections[index2].label}`)
|
|
26849
26853
|
})
|
|
26850
26854
|
})
|
|
26851
26855
|
})
|
|
@@ -27514,7 +27518,8 @@ const CustomSelect = ({
|
|
|
27514
27518
|
triggerRect: triggerBounds,
|
|
27515
27519
|
width: `max(${layerWidth}, ${triggerBounds.width}px)`,
|
|
27516
27520
|
focusedOptionIndex: state.layerFocus.current,
|
|
27517
|
-
firstSelectedOptionIndex
|
|
27521
|
+
firstSelectedOptionIndex,
|
|
27522
|
+
testId: testId && `${testId}-layer`
|
|
27518
27523
|
})
|
|
27519
27524
|
}))]
|
|
27520
27525
|
});
|
|
@@ -35619,7 +35624,8 @@ const Row = (props) => {
|
|
|
35619
35624
|
provided,
|
|
35620
35625
|
snapshot,
|
|
35621
35626
|
draggableTable,
|
|
35622
|
-
width
|
|
35627
|
+
width,
|
|
35628
|
+
testId
|
|
35623
35629
|
} = props;
|
|
35624
35630
|
const targetRef = useRef();
|
|
35625
35631
|
const columnHeaderAlignment = getHeaderAlignment(columnHeaderAlignments, isHeader, rowIndex);
|
|
@@ -35655,7 +35661,7 @@ const Row = (props) => {
|
|
|
35655
35661
|
columnHeaderAlignment: columnHeaderAlignment[i],
|
|
35656
35662
|
width: columnWidths ? columnWidths[i] : void 0,
|
|
35657
35663
|
snapshot,
|
|
35658
|
-
testId: c.testId
|
|
35664
|
+
testId: testId ? `${testId}-${i}` : c.testId
|
|
35659
35665
|
}, key);
|
|
35660
35666
|
});
|
|
35661
35667
|
const rowActions = hasRowActions2 && /* @__PURE__ */ jsx(Cell, {
|
|
@@ -35758,7 +35764,8 @@ Row.defaultProps = {
|
|
|
35758
35764
|
columnHeaderAlignments: [],
|
|
35759
35765
|
draggableTable: false,
|
|
35760
35766
|
snapshot: null,
|
|
35761
|
-
provided: null
|
|
35767
|
+
provided: null,
|
|
35768
|
+
testId: void 0
|
|
35762
35769
|
};
|
|
35763
35770
|
Row.propTypes = {
|
|
35764
35771
|
row: rowShape.isRequired,
|
|
@@ -35771,7 +35778,8 @@ Row.propTypes = {
|
|
|
35771
35778
|
hasRowActions: propTypes$1.exports.bool.isRequired,
|
|
35772
35779
|
draggableTable: propTypes$1.exports.bool,
|
|
35773
35780
|
snapshot: propTypes$1.exports.object,
|
|
35774
|
-
provided: propTypes$1.exports.object
|
|
35781
|
+
provided: propTypes$1.exports.object,
|
|
35782
|
+
testId: propTypes$1.exports.string
|
|
35775
35783
|
};
|
|
35776
35784
|
const getMaxCellCount = (rows) => {
|
|
35777
35785
|
const count2 = Math.max(
|
|
@@ -35919,7 +35927,8 @@ const Table = (props) => {
|
|
|
35919
35927
|
columnHeaderAlignments,
|
|
35920
35928
|
rowsMetaData: stickyHeaders ? rowsMetaData : void 0,
|
|
35921
35929
|
setRowsMetaData: stickyHeaders ? setRowsMetaData : void 0,
|
|
35922
|
-
draggableTable: draggable2
|
|
35930
|
+
draggableTable: draggable2,
|
|
35931
|
+
testId: testId && `${testId}-${rowIndex}`
|
|
35923
35932
|
}, `0_${rowIndex}`);
|
|
35924
35933
|
})]
|
|
35925
35934
|
}), /* @__PURE__ */ jsxs("tbody", {
|
|
@@ -35938,7 +35947,8 @@ const Table = (props) => {
|
|
|
35938
35947
|
provided: provided2,
|
|
35939
35948
|
snapshot,
|
|
35940
35949
|
draggableTable: draggable2,
|
|
35941
|
-
width: dimensions.width
|
|
35950
|
+
width: dimensions.width,
|
|
35951
|
+
testId: testId && `${testId}-${rowIndex + 1}`
|
|
35942
35952
|
}, `1_${rowIndex}`)
|
|
35943
35953
|
}, `index_${rowIndex}`)), provided.placeholder]
|
|
35944
35954
|
}), footer2 && /* @__PURE__ */ jsx(Footer, {
|
|
@@ -35981,7 +35991,8 @@ const Table = (props) => {
|
|
|
35981
35991
|
columnAlignment,
|
|
35982
35992
|
columnHeaderAlignments,
|
|
35983
35993
|
rowsMetaData: stickyHeaders ? rowsMetaData : void 0,
|
|
35984
|
-
setRowsMetaData: stickyHeaders ? setRowsMetaData : void 0
|
|
35994
|
+
setRowsMetaData: stickyHeaders ? setRowsMetaData : void 0,
|
|
35995
|
+
testId: testId && `${testId}-${rowIndex}`
|
|
35985
35996
|
}, `0_${rowIndex}`);
|
|
35986
35997
|
})]
|
|
35987
35998
|
}), /* @__PURE__ */ jsx("tbody", {
|
|
@@ -35992,7 +36003,8 @@ const Table = (props) => {
|
|
|
35992
36003
|
columnWidths,
|
|
35993
36004
|
colSpan,
|
|
35994
36005
|
hasRowActions: rowActions,
|
|
35995
|
-
columnAlignment
|
|
36006
|
+
columnAlignment,
|
|
36007
|
+
testId: testId && `${testId}-${rowIndex + 1}`
|
|
35996
36008
|
}, `1_${rowIndex}`))
|
|
35997
36009
|
}), footer2 && /* @__PURE__ */ jsx(Footer, {
|
|
35998
36010
|
colSpan,
|