@oliasoft-open-source/react-ui-library 3.9.0 → 3.9.2-beta-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/dist/index.js +33 -30
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27509,6 +27509,9 @@ const Select = (props) => {
|
|
|
27509
27509
|
closeOnOptionActionClick,
|
|
27510
27510
|
testId
|
|
27511
27511
|
} = props;
|
|
27512
|
+
console.group("PROPS");
|
|
27513
|
+
console.log(props);
|
|
27514
|
+
console.groupEnd();
|
|
27512
27515
|
const enableAutoScroll = !native && autoScroll2 === true;
|
|
27513
27516
|
const {
|
|
27514
27517
|
multi,
|
|
@@ -27550,20 +27553,30 @@ const Select = (props) => {
|
|
|
27550
27553
|
]
|
|
27551
27554
|
}) : error2;
|
|
27552
27555
|
const onChangeSelectedValue = (evt, selectedOptions2) => {
|
|
27556
|
+
console.group("ON CHANGE");
|
|
27557
|
+
console.group("ON CHANGE PROPS");
|
|
27558
|
+
console.log(evt);
|
|
27559
|
+
console.log(selectedOptions2);
|
|
27560
|
+
console.groupEnd();
|
|
27553
27561
|
if (deprecatedEventHandler) {
|
|
27562
|
+
console.log("DEPRECATED");
|
|
27554
27563
|
const newSelectedOptions = multi ? selectedOptions2.map((o) => simpleInputs ? o.value : o) : simpleInputs ? selectedOptions2.value : selectedOptions2;
|
|
27555
27564
|
onChange(newSelectedOptions);
|
|
27556
27565
|
} else {
|
|
27566
|
+
console.log("DEPRECATED ELSE");
|
|
27557
27567
|
const isSyntheticEvent = !(evt instanceof Event);
|
|
27558
27568
|
const value = multi ? selectedOptions2 : selectedOptions2.value;
|
|
27559
27569
|
if (isSyntheticEvent) {
|
|
27570
|
+
console.log("SYNTHETIC");
|
|
27560
27571
|
evt.target.name = name2;
|
|
27561
27572
|
evt.target.value = value;
|
|
27562
27573
|
if (!multi) {
|
|
27574
|
+
console.log("NO MULTI");
|
|
27563
27575
|
evt.target.label = selectedOptions2.label;
|
|
27564
27576
|
}
|
|
27565
27577
|
onChange(evt);
|
|
27566
27578
|
} else {
|
|
27579
|
+
console.log("SYNTHETIC ELSE");
|
|
27567
27580
|
onChange({
|
|
27568
27581
|
...evt,
|
|
27569
27582
|
target: {
|
|
@@ -27575,6 +27588,7 @@ const Select = (props) => {
|
|
|
27575
27588
|
});
|
|
27576
27589
|
}
|
|
27577
27590
|
}
|
|
27591
|
+
console.groupEnd();
|
|
27578
27592
|
};
|
|
27579
27593
|
return useNative ? /* @__PURE__ */ jsx(NativeSelect, {
|
|
27580
27594
|
...props,
|
|
@@ -58161,11 +58175,11 @@ const Cell = (props) => {
|
|
|
58161
58175
|
isHeader,
|
|
58162
58176
|
columnHeaderAlignment,
|
|
58163
58177
|
columnAlignment,
|
|
58164
|
-
width,
|
|
58178
|
+
width: widthProp,
|
|
58165
58179
|
snapshot,
|
|
58166
58180
|
testId
|
|
58167
58181
|
} = props;
|
|
58168
|
-
const { style:
|
|
58182
|
+
const { style: styleProp, colSpan, rowSpan } = cell2;
|
|
58169
58183
|
const ref2 = useRef(null);
|
|
58170
58184
|
const alignment = {
|
|
58171
58185
|
bodyAlignment: columnAlignment,
|
|
@@ -58187,30 +58201,13 @@ const Cell = (props) => {
|
|
|
58187
58201
|
cell2.breakWord ? styles$7.breakWord : ""
|
|
58188
58202
|
);
|
|
58189
58203
|
const isWidthCustomSelect = cell2.type === "Select" && cell2.native !== true && cell2.width !== void 0;
|
|
58190
|
-
|
|
58191
|
-
|
|
58192
|
-
|
|
58193
|
-
|
|
58194
|
-
...isWidthCustomSelect ? { width: "1%" } : {},
|
|
58195
|
-
...width && !colSpan ? { minWidth: width } : {}
|
|
58196
|
-
},
|
|
58197
|
-
colSpan,
|
|
58198
|
-
rowSpan,
|
|
58199
|
-
children: /* @__PURE__ */ jsx(CellWrapper, {
|
|
58200
|
-
cell: cell2,
|
|
58201
|
-
columnAlignment: cellAlignmentText,
|
|
58202
|
-
isHeader,
|
|
58203
|
-
testId
|
|
58204
|
-
})
|
|
58205
|
-
}) : /* @__PURE__ */ jsx("td", {
|
|
58204
|
+
const width = isWidthCustomSelect ? "1%" : widthProp && !(colSpan && colSpan > 1) ? widthProp : (snapshot == null ? void 0 : snapshot.isDragging) && ref2.current ? ref2.current.offsetWidth : void 0;
|
|
58205
|
+
const style2 = { ...styleProp, width };
|
|
58206
|
+
const Element2 = isHeader ? "th" : "td";
|
|
58207
|
+
return /* @__PURE__ */ jsx(Element2, {
|
|
58206
58208
|
ref: ref2,
|
|
58207
58209
|
className,
|
|
58208
|
-
style:
|
|
58209
|
-
...style2,
|
|
58210
|
-
...isWidthCustomSelect ? { width: "1%" } : {},
|
|
58211
|
-
...width && !colSpan ? { minWidth: width } : {},
|
|
58212
|
-
...(snapshot == null ? void 0 : snapshot.isDragging) ? { width: ref2.current ? ref2.current.offsetWidth : 0 } : {}
|
|
58213
|
-
},
|
|
58210
|
+
style: style2,
|
|
58214
58211
|
colSpan,
|
|
58215
58212
|
rowSpan,
|
|
58216
58213
|
children: /* @__PURE__ */ jsx(CellWrapper, {
|
|
@@ -58694,7 +58691,13 @@ const hasRowActions = (rows, headers) => {
|
|
|
58694
58691
|
return hasActions(headers) > 0 || hasActions(rows) > 0;
|
|
58695
58692
|
};
|
|
58696
58693
|
const TableScrollWrapper = ({ table: table2, children }) => {
|
|
58697
|
-
const {
|
|
58694
|
+
const {
|
|
58695
|
+
fixedWidth: width,
|
|
58696
|
+
maxHeight: maxHeight2,
|
|
58697
|
+
rows,
|
|
58698
|
+
infiniteScroll,
|
|
58699
|
+
bordered: bordered2 = true
|
|
58700
|
+
} = table2;
|
|
58698
58701
|
const pageSize = Math.ceil(window.innerHeight / 38);
|
|
58699
58702
|
const [visibleRows, setVisibleRows] = infiniteScroll ? useState(pageSize) : [rows.length, null];
|
|
58700
58703
|
const [hasMore, setHasMore] = infiniteScroll ? useState(visibleRows < rows.length) : [false, null];
|
|
@@ -58712,7 +58715,11 @@ const TableScrollWrapper = ({ table: table2, children }) => {
|
|
|
58712
58715
|
bordered2 ? styles$a.bordered : "",
|
|
58713
58716
|
maxHeight2 ? styles$a.maxHeight : ""
|
|
58714
58717
|
),
|
|
58715
|
-
style: {
|
|
58718
|
+
style: {
|
|
58719
|
+
maxHeight: maxHeight2,
|
|
58720
|
+
width,
|
|
58721
|
+
display: width === "auto" ? "inline-block" : null
|
|
58722
|
+
},
|
|
58716
58723
|
children: infiniteScroll ? /* @__PURE__ */ jsx(InfiniteScroll, {
|
|
58717
58724
|
dataLength: Math.min(rows.length, visibleRows + pageSize),
|
|
58718
58725
|
next: loadMoreItems,
|
|
@@ -58809,9 +58816,6 @@ const Table = (props) => {
|
|
|
58809
58816
|
table: table2,
|
|
58810
58817
|
children: ({ visibleRows }) => /* @__PURE__ */ jsxs("table", {
|
|
58811
58818
|
className: cx$2(styles$a.table, striped2 ? styles$a.striped : ""),
|
|
58812
|
-
style: {
|
|
58813
|
-
minWidth: fixedWidth || ""
|
|
58814
|
-
},
|
|
58815
58819
|
"data-testid": testId,
|
|
58816
58820
|
ref: provided.innerRef,
|
|
58817
58821
|
children: [
|
|
@@ -58881,7 +58885,6 @@ const Table = (props) => {
|
|
|
58881
58885
|
table: table2,
|
|
58882
58886
|
children: ({ visibleRows }) => /* @__PURE__ */ jsxs("table", {
|
|
58883
58887
|
className: cx$2(styles$a.table, striped2 ? styles$a.striped : ""),
|
|
58884
|
-
style: { minWidth: fixedWidth || "" },
|
|
58885
58888
|
"data-testid": testId,
|
|
58886
58889
|
children: [
|
|
58887
58890
|
/* @__PURE__ */ jsxs("thead", {
|