@natoora-libs/core 0.2.11-dev-doug-2 → 0.2.12-dev-doug-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.
@@ -480,7 +480,9 @@ var AlertDialog = ({
480
480
  rejectCopy,
481
481
  acceptCopy,
482
482
  content,
483
- disabledContentPadding
483
+ disabledContentPadding,
484
+ disableEnforceFocus,
485
+ disableRestoreFocus
484
486
  }) => {
485
487
  const { classes } = useStyles();
486
488
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
@@ -491,6 +493,8 @@ var AlertDialog = ({
491
493
  maxWidth,
492
494
  fullScreen,
493
495
  fullWidth,
496
+ disableEnforceFocus,
497
+ disableRestoreFocus,
494
498
  children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_material2.Box, { children: [
495
499
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_material2.Box, { className: classes.topSection, children: [
496
500
  alertTitle ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material2.Typography, { variant: "h5", className: classes.title, children: alertTitle }) : null,
@@ -6504,7 +6508,7 @@ var RenderAvatar_default = RenderAvatar;
6504
6508
 
6505
6509
  // src/components/RenderContentList/RenderContentList.tsx
6506
6510
  var import_react29 = require("react");
6507
- var import_icons_material8 = require("@mui/icons-material");
6511
+ var import_WarningAmber = __toESM(require("@mui/icons-material/WarningAmber"), 1);
6508
6512
  var import_material53 = require("@mui/material");
6509
6513
  var import_mui41 = require("tss-react/mui");
6510
6514
 
@@ -6536,8 +6540,32 @@ var RenderContentList = ({
6536
6540
  const { classes } = useStyles36();
6537
6541
  const [active, setActive] = (0, import_react29.useState)(activeSection);
6538
6542
  const observer = (0, import_react29.useRef)(null);
6543
+ const isScrolling = (0, import_react29.useRef)(false);
6544
+ const timeoutScrolling = (0, import_react29.useRef)(null);
6539
6545
  (0, import_react29.useEffect)(() => {
6540
- setActive(activeSection);
6546
+ if (!activeSection) {
6547
+ return void 0;
6548
+ }
6549
+ isScrolling.current = true;
6550
+ const targetId = transformNameToID(activeSection);
6551
+ setActive(targetId);
6552
+ const element = document.getElementById(targetId);
6553
+ if (element) {
6554
+ element.scrollIntoView({
6555
+ behavior: "smooth",
6556
+ block: "start"
6557
+ });
6558
+ }
6559
+ if (timeoutScrolling.current) {
6560
+ clearTimeout(timeoutScrolling.current);
6561
+ }
6562
+ ;
6563
+ timeoutScrolling.current = setTimeout(() => {
6564
+ isScrolling.current = false;
6565
+ }, 1e3);
6566
+ return () => {
6567
+ if (timeoutScrolling.current) clearTimeout(timeoutScrolling.current);
6568
+ };
6541
6569
  }, [activeSection]);
6542
6570
  (0, import_react29.useEffect)(() => {
6543
6571
  const sections = items.map((item) => ({
@@ -6547,9 +6575,14 @@ var RenderContentList = ({
6547
6575
  if (observer.current) {
6548
6576
  observer.current.disconnect();
6549
6577
  }
6550
- if (sections.length === 0) return;
6578
+ if (sections.length === 0) {
6579
+ return void 0;
6580
+ }
6551
6581
  observer.current = new IntersectionObserver(
6552
6582
  (entries) => {
6583
+ if (isScrolling.current) {
6584
+ return;
6585
+ }
6553
6586
  const visibleSection = entries.find((entry) => entry.isIntersecting);
6554
6587
  if (visibleSection) {
6555
6588
  setActive(visibleSection.target.id);
@@ -6568,6 +6601,21 @@ var RenderContentList = ({
6568
6601
  observer.current?.disconnect();
6569
6602
  };
6570
6603
  }, [items]);
6604
+ const handleMenuClick = (id) => {
6605
+ isScrolling.current = true;
6606
+ setActive(id);
6607
+ const element = document.getElementById(id);
6608
+ if (element) {
6609
+ element.scrollIntoView({
6610
+ behavior: "smooth",
6611
+ block: "start"
6612
+ });
6613
+ }
6614
+ if (timeoutScrolling.current) clearTimeout(timeoutScrolling.current);
6615
+ timeoutScrolling.current = setTimeout(() => {
6616
+ isScrolling.current = false;
6617
+ }, 1e3);
6618
+ };
6571
6619
  return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
6572
6620
  import_material53.List,
6573
6621
  {
@@ -6581,19 +6629,10 @@ var RenderContentList = ({
6581
6629
  {
6582
6630
  selected: active === id,
6583
6631
  classes: { root: classes.root, selected: classes.selected },
6584
- onClick: () => {
6585
- setActive(id);
6586
- const element = document.getElementById(id);
6587
- if (element) {
6588
- element.scrollIntoView({
6589
- behavior: "smooth",
6590
- block: "start"
6591
- });
6592
- }
6593
- },
6632
+ onClick: () => handleMenuClick(id),
6594
6633
  children: [
6595
6634
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_material53.ListItemText, { primary: item }),
6596
- (warningItems?.includes(item) || warningItems?.includes(id)) && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_material53.Tooltip, { title: warningMessage, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_icons_material8.WarningAmber, { color: "warning" }) })
6635
+ (warningItems?.includes(item) || warningItems?.includes(id)) && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_material53.Tooltip, { title: warningMessage, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_WarningAmber.default, { color: "warning" }) })
6597
6636
  ]
6598
6637
  },
6599
6638
  id
@@ -6841,7 +6880,7 @@ var import_mui45 = require("tss-react/mui");
6841
6880
  // src/components/SearchWithFilters/SearchWithFilters.tsx
6842
6881
  var import_react31 = require("react");
6843
6882
  var React6 = __toESM(require("react"), 1);
6844
- var import_icons_material9 = require("@mui/icons-material");
6883
+ var import_icons_material8 = require("@mui/icons-material");
6845
6884
  var import_material56 = require("@mui/material");
6846
6885
  var import_mui44 = require("tss-react/mui");
6847
6886
  var import_jsx_runtime109 = require("react/jsx-runtime");
@@ -6905,7 +6944,7 @@ var SearchWithFilters = ({
6905
6944
  setSearchText(searchValue);
6906
6945
  }, [searchValue]);
6907
6946
  return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(import_material56.Paper, { className: classes.searchContainer, children: [
6908
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons_material9.Search, { className: classes.icon, fontSize: "small" }),
6947
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons_material8.Search, { className: classes.icon, fontSize: "small" }),
6909
6948
  /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
6910
6949
  import_material56.InputBase,
6911
6950
  {
@@ -6927,7 +6966,7 @@ var SearchWithFilters = ({
6927
6966
  disabled,
6928
6967
  children: [
6929
6968
  "Filters",
6930
- showFilters ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons_material9.ArrowDropUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons_material9.ArrowDropDown, {})
6969
+ showFilters ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons_material8.ArrowDropUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons_material8.ArrowDropDown, {})
6931
6970
  ]
6932
6971
  }
6933
6972
  )
@@ -7002,7 +7041,7 @@ var import_mui47 = require("tss-react/mui");
7002
7041
 
7003
7042
  // src/components/SearchWithFilters/SearchWithFiltersForTable.tsx
7004
7043
  var import_react32 = require("react");
7005
- var import_icons_material10 = require("@mui/icons-material");
7044
+ var import_icons_material9 = require("@mui/icons-material");
7006
7045
  var import_material58 = require("@mui/material");
7007
7046
  var import_mui46 = require("tss-react/mui");
7008
7047
  var import_jsx_runtime111 = require("react/jsx-runtime");
@@ -7079,9 +7118,9 @@ var SearchWithFiltersForTable = (props) => {
7079
7118
  enterPressedInSearch();
7080
7119
  }
7081
7120
  };
7082
- const ArrowIcon = isOpen ? import_icons_material10.ArrowDropUp : import_icons_material10.ArrowDropDown;
7121
+ const ArrowIcon = isOpen ? import_icons_material9.ArrowDropUp : import_icons_material9.ArrowDropDown;
7083
7122
  return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_material58.Paper, { className: classes.c_search, children: [
7084
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material58.Box, { className: classes.c_search__icon, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_icons_material10.Search, { className: classes.icon, fontSize: "small" }) }),
7123
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_material58.Box, { className: classes.c_search__icon, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_icons_material9.Search, { className: classes.icon, fontSize: "small" }) }),
7085
7124
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
7086
7125
  import_material58.InputBase,
7087
7126
  {
@@ -7215,7 +7254,7 @@ var SearchHeader = (0, import_react33.memo)(
7215
7254
  );
7216
7255
 
7217
7256
  // src/components/SectionName/SectionName.tsx
7218
- var import_icons_material11 = require("@mui/icons-material");
7257
+ var import_icons_material10 = require("@mui/icons-material");
7219
7258
  var import_material61 = require("@mui/material");
7220
7259
  var import_mui48 = require("tss-react/mui");
7221
7260
  var import_jsx_runtime114 = require("react/jsx-runtime");
@@ -7274,7 +7313,7 @@ var SectionName = ({
7274
7313
  }
7275
7314
  ),
7276
7315
  tooltipDescription ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material61.Tooltip, { title: tooltipDescription, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
7277
- import_icons_material11.Info,
7316
+ import_icons_material10.Info,
7278
7317
  {
7279
7318
  fontSize: "small",
7280
7319
  "data-testid": "InfoIcon",
@@ -7297,7 +7336,7 @@ var SectionName = ({
7297
7336
  }
7298
7337
  ) : null,
7299
7338
  openHistoryLog && buttonText && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material61.Divider, { orientation: "vertical", sx: { height: "24px" } }),
7300
- openHistoryLog && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material61.IconButton, { size: "small", onClick: () => openHistoryLog(), children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_icons_material11.History, {}) })
7339
+ openHistoryLog && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material61.IconButton, { size: "small", onClick: () => openHistoryLog(), children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_icons_material10.History, {}) })
7301
7340
  ] })
7302
7341
  ] });
7303
7342
  };
@@ -9401,7 +9440,7 @@ var TableDesktopToolbar = ({
9401
9440
 
9402
9441
  // src/components/TableHeader/TableHeader.tsx
9403
9442
  var import_react48 = require("react");
9404
- var import_icons_material12 = require("@mui/icons-material");
9443
+ var import_icons_material11 = require("@mui/icons-material");
9405
9444
  var import_material80 = require("@mui/material");
9406
9445
  var import_mui53 = require("tss-react/mui");
9407
9446
  var import_jsx_runtime137 = require("react/jsx-runtime");
@@ -9454,7 +9493,7 @@ var TableHeader = ({ cells, onSort = null }) => {
9454
9493
  {
9455
9494
  className: classes.sortLabel,
9456
9495
  direction: cell?.direction || "asc",
9457
- IconComponent: import_icons_material12.ImportExport,
9496
+ IconComponent: import_icons_material11.ImportExport,
9458
9497
  onClick: () => handleSortClick(cell),
9459
9498
  children: cell.label
9460
9499
  }