@natoora-libs/core 0.2.12-dev-doug-2 → 0.2.13

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.
@@ -55,7 +55,6 @@ type TableDesktopToolbarProps = {
55
55
  disableBulkChangesMode?: boolean;
56
56
  isBulkChangesMode: boolean;
57
57
  onChangeBulkChangesMode: (checked: boolean) => void;
58
- onActivateBulkChangesMode?: () => void;
59
58
  renderExportCsvDialog?: (props: ExportCsvDialogProps) => ReactNode;
60
59
  renderBulkChangesDialog?: (props: BulkChangesDialogProps) => ReactNode;
61
60
  renderTableColumnConfigurationMenu?: (props: TableColumnConfigurationMenuProps) => ReactNode;
@@ -55,7 +55,6 @@ type TableDesktopToolbarProps = {
55
55
  disableBulkChangesMode?: boolean;
56
56
  isBulkChangesMode: boolean;
57
57
  onChangeBulkChangesMode: (checked: boolean) => void;
58
- onActivateBulkChangesMode?: () => void;
59
58
  renderExportCsvDialog?: (props: ExportCsvDialogProps) => ReactNode;
60
59
  renderBulkChangesDialog?: (props: BulkChangesDialogProps) => ReactNode;
61
60
  renderTableColumnConfigurationMenu?: (props: TableColumnConfigurationMenuProps) => ReactNode;
@@ -480,9 +480,7 @@ var AlertDialog = ({
480
480
  rejectCopy,
481
481
  acceptCopy,
482
482
  content,
483
- disabledContentPadding,
484
- disableEnforceFocus,
485
- disableRestoreFocus
483
+ disabledContentPadding
486
484
  }) => {
487
485
  const { classes } = useStyles();
488
486
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
@@ -493,8 +491,6 @@ var AlertDialog = ({
493
491
  maxWidth,
494
492
  fullScreen,
495
493
  fullWidth,
496
- disableEnforceFocus,
497
- disableRestoreFocus,
498
494
  children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_material2.Box, { children: [
499
495
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_material2.Box, { className: classes.topSection, children: [
500
496
  alertTitle ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material2.Typography, { variant: "h5", className: classes.title, children: alertTitle }) : null,
@@ -6508,7 +6504,7 @@ var RenderAvatar_default = RenderAvatar;
6508
6504
 
6509
6505
  // src/components/RenderContentList/RenderContentList.tsx
6510
6506
  var import_react29 = require("react");
6511
- var import_WarningAmber = __toESM(require("@mui/icons-material/WarningAmber"), 1);
6507
+ var import_icons_material8 = require("@mui/icons-material");
6512
6508
  var import_material53 = require("@mui/material");
6513
6509
  var import_mui41 = require("tss-react/mui");
6514
6510
 
@@ -6540,32 +6536,8 @@ var RenderContentList = ({
6540
6536
  const { classes } = useStyles36();
6541
6537
  const [active, setActive] = (0, import_react29.useState)(activeSection);
6542
6538
  const observer = (0, import_react29.useRef)(null);
6543
- const isScrolling = (0, import_react29.useRef)(false);
6544
- const timeoutScrolling = (0, import_react29.useRef)(null);
6545
6539
  (0, import_react29.useEffect)(() => {
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
- };
6540
+ setActive(activeSection);
6569
6541
  }, [activeSection]);
6570
6542
  (0, import_react29.useEffect)(() => {
6571
6543
  const sections = items.map((item) => ({
@@ -6575,14 +6547,9 @@ var RenderContentList = ({
6575
6547
  if (observer.current) {
6576
6548
  observer.current.disconnect();
6577
6549
  }
6578
- if (sections.length === 0) {
6579
- return void 0;
6580
- }
6550
+ if (sections.length === 0) return;
6581
6551
  observer.current = new IntersectionObserver(
6582
6552
  (entries) => {
6583
- if (isScrolling.current) {
6584
- return;
6585
- }
6586
6553
  const visibleSection = entries.find((entry) => entry.isIntersecting);
6587
6554
  if (visibleSection) {
6588
6555
  setActive(visibleSection.target.id);
@@ -6601,21 +6568,6 @@ var RenderContentList = ({
6601
6568
  observer.current?.disconnect();
6602
6569
  };
6603
6570
  }, [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
- };
6619
6571
  return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
6620
6572
  import_material53.List,
6621
6573
  {
@@ -6629,10 +6581,19 @@ var RenderContentList = ({
6629
6581
  {
6630
6582
  selected: active === id,
6631
6583
  classes: { root: classes.root, selected: classes.selected },
6632
- onClick: () => handleMenuClick(id),
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
+ },
6633
6594
  children: [
6634
6595
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_material53.ListItemText, { primary: item }),
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" }) })
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" }) })
6636
6597
  ]
6637
6598
  },
6638
6599
  id
@@ -6880,7 +6841,7 @@ var import_mui45 = require("tss-react/mui");
6880
6841
  // src/components/SearchWithFilters/SearchWithFilters.tsx
6881
6842
  var import_react31 = require("react");
6882
6843
  var React6 = __toESM(require("react"), 1);
6883
- var import_icons_material8 = require("@mui/icons-material");
6844
+ var import_icons_material9 = require("@mui/icons-material");
6884
6845
  var import_material56 = require("@mui/material");
6885
6846
  var import_mui44 = require("tss-react/mui");
6886
6847
  var import_jsx_runtime109 = require("react/jsx-runtime");
@@ -6944,7 +6905,7 @@ var SearchWithFilters = ({
6944
6905
  setSearchText(searchValue);
6945
6906
  }, [searchValue]);
6946
6907
  return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(import_material56.Paper, { className: classes.searchContainer, children: [
6947
- /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons_material8.Search, { className: classes.icon, fontSize: "small" }),
6908
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons_material9.Search, { className: classes.icon, fontSize: "small" }),
6948
6909
  /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
6949
6910
  import_material56.InputBase,
6950
6911
  {
@@ -6966,7 +6927,7 @@ var SearchWithFilters = ({
6966
6927
  disabled,
6967
6928
  children: [
6968
6929
  "Filters",
6969
- showFilters ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons_material8.ArrowDropUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons_material8.ArrowDropDown, {})
6930
+ showFilters ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons_material9.ArrowDropUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons_material9.ArrowDropDown, {})
6970
6931
  ]
6971
6932
  }
6972
6933
  )
@@ -7041,7 +7002,7 @@ var import_mui47 = require("tss-react/mui");
7041
7002
 
7042
7003
  // src/components/SearchWithFilters/SearchWithFiltersForTable.tsx
7043
7004
  var import_react32 = require("react");
7044
- var import_icons_material9 = require("@mui/icons-material");
7005
+ var import_icons_material10 = require("@mui/icons-material");
7045
7006
  var import_material58 = require("@mui/material");
7046
7007
  var import_mui46 = require("tss-react/mui");
7047
7008
  var import_jsx_runtime111 = require("react/jsx-runtime");
@@ -7118,9 +7079,9 @@ var SearchWithFiltersForTable = (props) => {
7118
7079
  enterPressedInSearch();
7119
7080
  }
7120
7081
  };
7121
- const ArrowIcon = isOpen ? import_icons_material9.ArrowDropUp : import_icons_material9.ArrowDropDown;
7082
+ const ArrowIcon = isOpen ? import_icons_material10.ArrowDropUp : import_icons_material10.ArrowDropDown;
7122
7083
  return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_material58.Paper, { className: classes.c_search, children: [
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" }) }),
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" }) }),
7124
7085
  /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
7125
7086
  import_material58.InputBase,
7126
7087
  {
@@ -7254,7 +7215,7 @@ var SearchHeader = (0, import_react33.memo)(
7254
7215
  );
7255
7216
 
7256
7217
  // src/components/SectionName/SectionName.tsx
7257
- var import_icons_material10 = require("@mui/icons-material");
7218
+ var import_icons_material11 = require("@mui/icons-material");
7258
7219
  var import_material61 = require("@mui/material");
7259
7220
  var import_mui48 = require("tss-react/mui");
7260
7221
  var import_jsx_runtime114 = require("react/jsx-runtime");
@@ -7313,7 +7274,7 @@ var SectionName = ({
7313
7274
  }
7314
7275
  ),
7315
7276
  tooltipDescription ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material61.Tooltip, { title: tooltipDescription, placement: "right", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
7316
- import_icons_material10.Info,
7277
+ import_icons_material11.Info,
7317
7278
  {
7318
7279
  fontSize: "small",
7319
7280
  "data-testid": "InfoIcon",
@@ -7336,7 +7297,7 @@ var SectionName = ({
7336
7297
  }
7337
7298
  ) : null,
7338
7299
  openHistoryLog && buttonText && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_material61.Divider, { orientation: "vertical", sx: { height: "24px" } }),
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, {}) })
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, {}) })
7340
7301
  ] })
7341
7302
  ] });
7342
7303
  };
@@ -8484,12 +8445,12 @@ var TableDesktop = ({
8484
8445
  setIsBulkChangesMode(checked);
8485
8446
  if (!checked) {
8486
8447
  resetSelectedRows();
8487
- refetchData?.();
8488
8448
  }
8489
8449
  };
8490
8450
  (0, import_react41.useEffect)(() => {
8491
8451
  if (isRowsFromAllPagesSelected) {
8492
8452
  selectAllRowsInPage();
8453
+ selectAllRowsInPage();
8493
8454
  }
8494
8455
  }, [isRowsFromAllPagesSelected, data]);
8495
8456
  const renderBody = () => {
@@ -9208,7 +9169,6 @@ var TableDesktopToolbar = ({
9208
9169
  disableBulkChangesMode = false,
9209
9170
  isBulkChangesMode,
9210
9171
  onChangeBulkChangesMode,
9211
- onActivateBulkChangesMode,
9212
9172
  refetchData,
9213
9173
  renderExportCsvDialog,
9214
9174
  renderBulkChangesDialog,
@@ -9233,8 +9193,8 @@ var TableDesktopToolbar = ({
9233
9193
  const handleChangeBulkChangesMode = (_, checked) => {
9234
9194
  setBulkChanges([]);
9235
9195
  onChangeBulkChangesMode(checked);
9236
- if (checked) {
9237
- onActivateBulkChangesMode?.();
9196
+ if (!checked) {
9197
+ refetchData?.();
9238
9198
  }
9239
9199
  };
9240
9200
  const handleUpdateEditableCell = ({
@@ -9441,7 +9401,7 @@ var TableDesktopToolbar = ({
9441
9401
 
9442
9402
  // src/components/TableHeader/TableHeader.tsx
9443
9403
  var import_react48 = require("react");
9444
- var import_icons_material11 = require("@mui/icons-material");
9404
+ var import_icons_material12 = require("@mui/icons-material");
9445
9405
  var import_material80 = require("@mui/material");
9446
9406
  var import_mui53 = require("tss-react/mui");
9447
9407
  var import_jsx_runtime137 = require("react/jsx-runtime");
@@ -9494,7 +9454,7 @@ var TableHeader = ({ cells, onSort = null }) => {
9494
9454
  {
9495
9455
  className: classes.sortLabel,
9496
9456
  direction: cell?.direction || "asc",
9497
- IconComponent: import_icons_material11.ImportExport,
9457
+ IconComponent: import_icons_material12.ImportExport,
9498
9458
  onClick: () => handleSortClick(cell),
9499
9459
  children: cell.label
9500
9460
  }