@abdellatifui/react 3.2.87 → 3.2.89

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/nextgen.d.ts CHANGED
@@ -922,7 +922,8 @@ declare interface PanelProps_2 {
922
922
  bodyClassName?: string;
923
923
  headerClassName?: string;
924
924
  defaultClose: string;
925
- maximizeButton: boolean;
925
+ maximizeButton?: boolean;
926
+ defaultMaximized?: boolean;
926
927
  ref: MutableRefObject<any>;
927
928
  }
928
929
 
@@ -1130,7 +1131,7 @@ export declare interface SubHeaderProps extends HeadlineProps {
1130
1131
  description?: string;
1131
1132
  }
1132
1133
 
1133
- export declare const SwapIconButton: default_2.ForwardRefExoticComponent<default_2.RefAttributes<unknown>>;
1134
+ export declare const SwapIconButton: (props: SwapIconButtonProps) => JSX.Element;
1134
1135
 
1135
1136
  export declare interface SwapIconButtonProps extends ButtonProps {
1136
1137
  icon1: default_2.ReactNode;
@@ -1284,6 +1285,7 @@ declare interface TableProps_2 {
1284
1285
  ready?: boolean;
1285
1286
  multiple?: boolean;
1286
1287
  autoHideSpinner?: boolean;
1288
+ enableSidebar?: boolean;
1287
1289
  aggridProps?: Partial<AgGridReactProps>;
1288
1290
  className?: string;
1289
1291
  topbar?: boolean;
package/dist/nextgen.js CHANGED
@@ -24406,13 +24406,20 @@ const PanelHeader = (props) => {
24406
24406
  iconsOrder,
24407
24407
  tooltipOrder,
24408
24408
  maximizeButton,
24409
+ defaultMaximized,
24409
24410
  ref
24410
24411
  } = props;
24412
+ const buttonRef = useRef();
24411
24413
  const { closeModel } = useContext(ModelContext);
24412
24414
  const [maxIconOrader, setMaxIconOrder] = useState([
24413
24415
  /* @__PURE__ */ jsxRuntimeExports.jsx(Maximize2, {}),
24414
24416
  /* @__PURE__ */ jsxRuntimeExports.jsx(Minimize2, {})
24415
24417
  ]);
24418
+ useEffect(() => {
24419
+ if (defaultMaximized) {
24420
+ buttonRef?.current?.click?.();
24421
+ }
24422
+ }, [defaultMaximized]);
24416
24423
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative flex space-x-2", children: [
24417
24424
  moreInfo && /* @__PURE__ */ jsxRuntimeExports.jsx(
24418
24425
  IconButton2,
@@ -24425,6 +24432,7 @@ const PanelHeader = (props) => {
24425
24432
  maximizeButton && /* @__PURE__ */ jsxRuntimeExports.jsx(
24426
24433
  SwapIconButton,
24427
24434
  {
24435
+ ref: buttonRef,
24428
24436
  icon1: maxIconOrader[0],
24429
24437
  icon2: maxIconOrader[1],
24430
24438
  tooltip1: "Maximize",
@@ -24475,6 +24483,7 @@ const Panel = (props) => {
24475
24483
  maximizeButton,
24476
24484
  description,
24477
24485
  style: style2,
24486
+ defaultMaximized,
24478
24487
  ref = useRef()
24479
24488
  } = props;
24480
24489
  const [iconsOrder, setIconOrder] = useState([
@@ -24527,7 +24536,8 @@ const Panel = (props) => {
24527
24536
  close: closeButton,
24528
24537
  iconsOrder,
24529
24538
  tooltipOrder,
24530
- maximizeButton
24539
+ maximizeButton,
24540
+ defaultMaximized
24531
24541
  }
24532
24542
  )
24533
24543
  ]
@@ -24543,7 +24553,7 @@ const Panel = (props) => {
24543
24553
  }
24544
24554
  );
24545
24555
  };
24546
- const SwapIconButton = forwardRef((props, ref) => {
24556
+ const SwapIconButton = (props) => {
24547
24557
  const [icon, setIcon] = useState([]);
24548
24558
  const [state, setState] = useState("");
24549
24559
  const [stateIndex, setStateIndex] = useState(1);
@@ -24553,19 +24563,21 @@ const SwapIconButton = forwardRef((props, ref) => {
24553
24563
  tooltip1,
24554
24564
  tooltip2,
24555
24565
  onClick,
24566
+ ref,
24556
24567
  ripple = true
24557
24568
  } = props;
24558
24569
  useEffect(() => {
24559
24570
  setIcon(icon1);
24560
24571
  setState(tooltip1);
24561
24572
  }, []);
24562
- return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
24573
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
24563
24574
  IconButton2,
24564
24575
  {
24565
24576
  ...props,
24566
24577
  icon,
24567
24578
  ripple,
24568
24579
  tooltip: state,
24580
+ ref,
24569
24581
  onClick: () => {
24570
24582
  setIcon((prev) => {
24571
24583
  return stateIndex == 1 ? icon2 : icon1;
@@ -24578,8 +24590,8 @@ const SwapIconButton = forwardRef((props, ref) => {
24578
24590
  }
24579
24591
  }
24580
24592
  }
24581
- ) });
24582
- });
24593
+ );
24594
+ };
24583
24595
  const AppContext = createContext({});
24584
24596
  const DialogPanel = (props) => {
24585
24597
  const {
@@ -27451,6 +27463,7 @@ const TableComponent = (props) => {
27451
27463
  aggridProps = {},
27452
27464
  enablePagination = true,
27453
27465
  cellGrid = false,
27466
+ enableSidebar = false,
27454
27467
  enableRowStream = false,
27455
27468
  showCellTextInTopBar = true,
27456
27469
  pageSize,
@@ -27937,7 +27950,7 @@ const TableComponent = (props) => {
27937
27950
  ...aggridProps
27938
27951
  }
27939
27952
  ) }),
27940
- /* @__PURE__ */ jsxRuntimeExports.jsx(TableSidebar, { ref: sideBarRef, gridRef, api: ref })
27953
+ enableSidebar && /* @__PURE__ */ jsxRuntimeExports.jsx(TableSidebar, { ref: sideBarRef, gridRef, api: ref })
27941
27954
  ] })
27942
27955
  ]
27943
27956
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@abdellatifui/react",
3
3
  "private": false,
4
- "version": "3.2.87",
4
+ "version": "3.2.89",
5
5
  "type": "module",
6
6
  "types": "dist/nextgen.d.ts",
7
7
  "files": [