aefis-core-ui 4.0.0-rc66 → 4.0.0-rc67

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.
@@ -15172,19 +15172,6 @@ function useValueChange(value, onChange) {
15172
15172
  }
15173
15173
  }
15174
15174
 
15175
- const useZoomLevel = () => {
15176
- const [zoomLevel, setZoomLevel] = useState(window.devicePixelRatio);
15177
- useEffect(() => {
15178
- const handleZoom = () => {
15179
- const zoom = window.devicePixelRatio;
15180
- setZoomLevel(zoom);
15181
- };
15182
- window.addEventListener("resize", handleZoom);
15183
- return () => window.removeEventListener("resize", handleZoom);
15184
- }, []);
15185
- return zoomLevel;
15186
- };
15187
-
15188
15175
  const _excluded$p = ["status", "data", "isFetching", "fetchNextPage", "hasNextPage", "refetch"];
15189
15176
  const useDidMount$1 = () => {
15190
15177
  const didMountRef = useRef(false);
@@ -15287,17 +15274,6 @@ const RichDataTable$1 = /*#__PURE__*/forwardRef(function RichDatatable(props, re
15287
15274
  return initialFilterState$1;
15288
15275
  });
15289
15276
  const [isFilterPanelStateChanged, setIsFilterPanelStateChanged] = useState(false);
15290
- const zoomLevel = useZoomLevel();
15291
- const dynamicHeight = useMemo(() => {
15292
- if (isNaN(props.minZoomThreshold)) {
15293
- console.error("The minZoomThreshold should be a number. divide browser zoom level to 100");
15294
- return props.height;
15295
- }
15296
- if (zoomLevel < props.minZoomThreshold) {
15297
- return props.height;
15298
- }
15299
- return props.zoomResponsiveHeight;
15300
- }, [zoomLevel, props.zoomResponsiveHeight, props.height, props.minZoomThreshold]);
15301
15277
  useValueChange(filterPanelState, prevState => {
15302
15278
  setIsFilterPanelStateChanged(true);
15303
15279
  });
@@ -15675,11 +15651,12 @@ const RichDataTable$1 = /*#__PURE__*/forwardRef(function RichDatatable(props, re
15675
15651
  };
15676
15652
  return /*#__PURE__*/jsxs(Box$3, {
15677
15653
  "aria-live": "polite",
15678
- sx: {
15679
- height: dynamicHeight || "75vh",
15654
+ sx: _extends({
15655
+ height: props.height || "75vh",
15680
15656
  display: "flex",
15681
- flexDirection: "column"
15682
- },
15657
+ flexDirection: "column",
15658
+ minHeight: 500
15659
+ }, props.containerSx),
15683
15660
  children: [/*#__PURE__*/jsxs(Box$3, {
15684
15661
  sx: {
15685
15662
  pt: 1,
@@ -15906,8 +15883,7 @@ RichDataTable$1.defaultProps = {
15906
15883
  enableInfiniteScrolling: true,
15907
15884
  showTextSearch: false,
15908
15885
  disableColumnResize: true,
15909
- zoomResponsiveHeight: 500,
15910
- minZoomThreshold: 1.75
15886
+ containerSx: {}
15911
15887
  };
15912
15888
  RichDataTable$1.propTypes = _extends({
15913
15889
  /** The title of the table */
@@ -16031,10 +16007,7 @@ RichDataTable$1.propTypes = _extends({
16031
16007
  }, DataTable$1.propTypes, {
16032
16008
  /** disable column resize */
16033
16009
  disableColumnResize: PropTypes.bool,
16034
- /** Minimum zoom level threshold for table behavior changes */
16035
- minZoomThreshold: PropTypes.number,
16036
- /** Height to use when browser zoom level is above minZoomThreshold */
16037
- zoomResponsiveHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
16010
+ containerSx: PropTypes.object
16038
16011
  });
16039
16012
 
16040
16013
  const createEvent = () => {
@@ -27835,6 +27808,19 @@ FilterPanelWithTextSearch.propTypes = {
27835
27808
  filterChipRowProps: PropTypes.object
27836
27809
  };
27837
27810
 
27811
+ const useZoomLevel = () => {
27812
+ const [zoomLevel, setZoomLevel] = useState(window.devicePixelRatio);
27813
+ useEffect(() => {
27814
+ const handleZoom = () => {
27815
+ const zoom = window.devicePixelRatio;
27816
+ setZoomLevel(zoom);
27817
+ };
27818
+ window.addEventListener("resize", handleZoom);
27819
+ return () => window.removeEventListener("resize", handleZoom);
27820
+ }, []);
27821
+ return zoomLevel;
27822
+ };
27823
+
27838
27824
  const moreThan = ruleValue => ({
27839
27825
  fieldValue
27840
27826
  }) => {