@ctlyst.id/internal-ui 4.1.15 → 4.2.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/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +17 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -252,6 +252,7 @@ interface DataTableProps<T> {
|
|
252
252
|
sortDescFirst?: boolean;
|
253
253
|
headerSticky?: boolean;
|
254
254
|
columnPinning?: ColumnPinningState;
|
255
|
+
cellLineClamp?: number;
|
255
256
|
onRowClick?: (data: T) => void;
|
256
257
|
isRowDisabled?: (row: T) => boolean;
|
257
258
|
}
|
@@ -675,7 +676,7 @@ interface SidebarMenuProps {
|
|
675
676
|
menu: MenuItem[];
|
676
677
|
isCollapse: boolean;
|
677
678
|
active: string | undefined;
|
678
|
-
setActive: (active: string) => void;
|
679
|
+
setActive: (active: string, fromParent?: boolean) => void;
|
679
680
|
itemStyles?: NavItemProps;
|
680
681
|
mappingIcon?: Map<string, JSX.Element>;
|
681
682
|
}
|
package/dist/index.d.ts
CHANGED
@@ -252,6 +252,7 @@ interface DataTableProps<T> {
|
|
252
252
|
sortDescFirst?: boolean;
|
253
253
|
headerSticky?: boolean;
|
254
254
|
columnPinning?: ColumnPinningState;
|
255
|
+
cellLineClamp?: number;
|
255
256
|
onRowClick?: (data: T) => void;
|
256
257
|
isRowDisabled?: (row: T) => boolean;
|
257
258
|
}
|
@@ -675,7 +676,7 @@ interface SidebarMenuProps {
|
|
675
676
|
menu: MenuItem[];
|
676
677
|
isCollapse: boolean;
|
677
678
|
active: string | undefined;
|
678
|
-
setActive: (active: string) => void;
|
679
|
+
setActive: (active: string, fromParent?: boolean) => void;
|
679
680
|
itemStyles?: NavItemProps;
|
680
681
|
mappingIcon?: Map<string, JSX.Element>;
|
681
682
|
}
|
package/dist/index.js
CHANGED
@@ -1432,7 +1432,16 @@ var useDataTable = ({
|
|
1432
1432
|
};
|
1433
1433
|
var DataTable = React5.forwardRef((props, ref) => {
|
1434
1434
|
var _a, _b, _c, _d, _e, _f, _g;
|
1435
|
-
const {
|
1435
|
+
const {
|
1436
|
+
isLoading,
|
1437
|
+
styles,
|
1438
|
+
headerSticky,
|
1439
|
+
onRowClick,
|
1440
|
+
container,
|
1441
|
+
columnPinning,
|
1442
|
+
isRowDisabled,
|
1443
|
+
cellLineClamp = 2
|
1444
|
+
} = props;
|
1436
1445
|
const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
|
1437
1446
|
const refTable = React5.useRef(null);
|
1438
1447
|
React5.useImperativeHandle(ref, () => ({
|
@@ -1618,10 +1627,12 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1618
1627
|
onClick: (e) => {
|
1619
1628
|
e.stopPropagation();
|
1620
1629
|
},
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1630
|
+
...cellLineClamp > 0 ? {
|
1631
|
+
noOfLines: cellLineClamp,
|
1632
|
+
sx: {
|
1633
|
+
display: "-webkit-inline-box"
|
1634
|
+
}
|
1635
|
+
} : {},
|
1625
1636
|
children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext())
|
1626
1637
|
}
|
1627
1638
|
)
|
@@ -5159,7 +5170,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
5159
5170
|
isActive,
|
5160
5171
|
bg: activeParent,
|
5161
5172
|
"data-test-id": `CTA_nav-item-${item.title}`,
|
5162
|
-
onClick: () => setActive(item.children.length > 0 ? item.children[0].navLink : item.navLink),
|
5173
|
+
onClick: () => setActive(item.children.length > 0 ? item.children[0].navLink : item.navLink, true),
|
5163
5174
|
position: "relative",
|
5164
5175
|
...itemStyles,
|
5165
5176
|
children: [
|