@natoora-libs/core 0.2.12-dev-doug-1 → 0.2.12-dev-doug-3

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.
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { MouseEvent, ReactNode, FC, ReactElement, ComponentType, ChangeEvent, ComponentProps, SVGProps } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as HeaderFilterObject, T as TableDesktopProps, O as Order, R as RowId } from '../TableDesktop-Z0KE59L4.cjs';
5
- export { B as BulkChanges, j as BulkChangesDialogProps, E as EditableCellType, k as ExportCsvDialogProps, i as TableColumnConfigurationMenuProps, d as TableDesktop, e as TableDesktopFooter, f as TableDesktopFooterProps, g as TableDesktopToolbar, h as TableDesktopToolbarProps, U as UpdateEditableCellParams } from '../TableDesktop-Z0KE59L4.cjs';
4
+ import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as HeaderFilterObject, T as TableDesktopProps, O as Order, R as RowId } from '../TableDesktop-BrpwT-lM.cjs';
5
+ export { B as BulkChanges, j as BulkChangesDialogProps, E as EditableCellType, k as ExportCsvDialogProps, i as TableColumnConfigurationMenuProps, d as TableDesktop, e as TableDesktopFooter, f as TableDesktopFooterProps, g as TableDesktopToolbar, h as TableDesktopToolbarProps, U as UpdateEditableCellParams } from '../TableDesktop-BrpwT-lM.cjs';
6
6
  import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
7
7
  import { UseMutateAsyncFunction } from 'react-query';
8
8
  import { SxProps, Theme, SelectProps, MenuProps, Typography } from '@mui/material';
@@ -831,7 +831,7 @@ interface SearchWithFiltersForTableProps {
831
831
  }
832
832
  declare const _default$5: React.MemoExoticComponent<(props: SearchWithFiltersForTableProps) => react_jsx_runtime.JSX.Element>;
833
833
 
834
- interface ISectionName {
834
+ interface SectionNameProps {
835
835
  name: string;
836
836
  tooltipDescription?: string;
837
837
  sectionId?: string;
@@ -841,7 +841,7 @@ interface ISectionName {
841
841
  buttonDisabled?: boolean;
842
842
  openHistoryLog?: () => void;
843
843
  }
844
- declare const SectionName: ({ name, tooltipDescription, sectionId, handleButtonClick, buttonText, buttonType, buttonDisabled, openHistoryLog, }: ISectionName) => react_jsx_runtime.JSX.Element;
844
+ declare const SectionName: ({ name, tooltipDescription, sectionId, handleButtonClick, buttonText, buttonType, buttonDisabled, openHistoryLog, }: SectionNameProps) => react_jsx_runtime.JSX.Element;
845
845
 
846
846
  type Option = {
847
847
  value?: string | number;
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { MouseEvent, ReactNode, FC, ReactElement, ComponentType, ChangeEvent, ComponentProps, SVGProps } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as HeaderFilterObject, T as TableDesktopProps, O as Order, R as RowId } from '../TableDesktop-Z0KE59L4.js';
5
- export { B as BulkChanges, j as BulkChangesDialogProps, E as EditableCellType, k as ExportCsvDialogProps, i as TableColumnConfigurationMenuProps, d as TableDesktop, e as TableDesktopFooter, f as TableDesktopFooterProps, g as TableDesktopToolbar, h as TableDesktopToolbarProps, U as UpdateEditableCellParams } from '../TableDesktop-Z0KE59L4.js';
4
+ import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as HeaderFilterObject, T as TableDesktopProps, O as Order, R as RowId } from '../TableDesktop-BrpwT-lM.js';
5
+ export { B as BulkChanges, j as BulkChangesDialogProps, E as EditableCellType, k as ExportCsvDialogProps, i as TableColumnConfigurationMenuProps, d as TableDesktop, e as TableDesktopFooter, f as TableDesktopFooterProps, g as TableDesktopToolbar, h as TableDesktopToolbarProps, U as UpdateEditableCellParams } from '../TableDesktop-BrpwT-lM.js';
6
6
  import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
7
7
  import { UseMutateAsyncFunction } from 'react-query';
8
8
  import { SxProps, Theme, SelectProps, MenuProps, Typography } from '@mui/material';
@@ -831,7 +831,7 @@ interface SearchWithFiltersForTableProps {
831
831
  }
832
832
  declare const _default$5: React.MemoExoticComponent<(props: SearchWithFiltersForTableProps) => react_jsx_runtime.JSX.Element>;
833
833
 
834
- interface ISectionName {
834
+ interface SectionNameProps {
835
835
  name: string;
836
836
  tooltipDescription?: string;
837
837
  sectionId?: string;
@@ -841,7 +841,7 @@ interface ISectionName {
841
841
  buttonDisabled?: boolean;
842
842
  openHistoryLog?: () => void;
843
843
  }
844
- declare const SectionName: ({ name, tooltipDescription, sectionId, handleButtonClick, buttonText, buttonType, buttonDisabled, openHistoryLog, }: ISectionName) => react_jsx_runtime.JSX.Element;
844
+ declare const SectionName: ({ name, tooltipDescription, sectionId, handleButtonClick, buttonText, buttonType, buttonDisabled, openHistoryLog, }: SectionNameProps) => react_jsx_runtime.JSX.Element;
845
845
 
846
846
  type Option = {
847
847
  value?: string | number;
@@ -7014,7 +7014,8 @@ var SearchHeader = memo18(
7014
7014
  );
7015
7015
 
7016
7016
  // src/components/SectionName/SectionName.tsx
7017
- import { History as History2, Info as InfoIcon } from "@mui/icons-material";
7017
+ import HistoryIcon from "@mui/icons-material/History";
7018
+ import InfoIcon from "@mui/icons-material/Info";
7018
7019
  import { Box as Box34, Divider as Divider10, IconButton as IconButton4, Tooltip as Tooltip8, Typography as Typography27 } from "@mui/material";
7019
7020
  import { makeStyles as makeStyles42 } from "tss-react/mui";
7020
7021
  import { jsx as jsx113, jsxs as jsxs77 } from "react/jsx-runtime";
@@ -7060,14 +7061,26 @@ var SectionName = ({
7060
7061
  openHistoryLog
7061
7062
  }) => {
7062
7063
  const { classes } = useStyles42();
7064
+ const handleScroll = (e) => {
7065
+ e.preventDefault();
7066
+ if (sectionId) {
7067
+ const targetId = sectionId.startsWith("#") ? sectionId.slice(1) : sectionId;
7068
+ const element = document.getElementById(targetId);
7069
+ if (element) {
7070
+ element.scrollIntoView({
7071
+ behavior: "smooth",
7072
+ block: "start"
7073
+ });
7074
+ }
7075
+ }
7076
+ };
7063
7077
  return /* @__PURE__ */ jsxs77(Box34, { className: classes.container, children: [
7064
7078
  /* @__PURE__ */ jsxs77(Box34, { className: classes.titleContainer, children: [
7065
7079
  /* @__PURE__ */ jsx113(
7066
7080
  Typography27,
7067
7081
  {
7068
7082
  variant: "h5",
7069
- component: "a",
7070
- href: sectionId,
7083
+ onClick: handleScroll,
7071
7084
  className: classes.typography,
7072
7085
  children: name
7073
7086
  }
@@ -7096,7 +7109,7 @@ var SectionName = ({
7096
7109
  }
7097
7110
  ) : null,
7098
7111
  openHistoryLog && buttonText && /* @__PURE__ */ jsx113(Divider10, { orientation: "vertical", sx: { height: "24px" } }),
7099
- openHistoryLog && /* @__PURE__ */ jsx113(IconButton4, { size: "small", onClick: () => openHistoryLog(), children: /* @__PURE__ */ jsx113(History2, {}) })
7112
+ openHistoryLog && /* @__PURE__ */ jsx113(IconButton4, { size: "small", onClick: () => openHistoryLog(), children: /* @__PURE__ */ jsx113(HistoryIcon, {}) })
7100
7113
  ] })
7101
7114
  ] });
7102
7115
  };
@@ -8286,12 +8299,12 @@ var TableDesktop = ({
8286
8299
  setIsBulkChangesMode(checked);
8287
8300
  if (!checked) {
8288
8301
  resetSelectedRows();
8302
+ refetchData?.();
8289
8303
  }
8290
8304
  };
8291
8305
  useEffect11(() => {
8292
8306
  if (isRowsFromAllPagesSelected) {
8293
8307
  selectAllRowsInPage();
8294
- selectAllRowsInPage();
8295
8308
  }
8296
8309
  }, [isRowsFromAllPagesSelected, data]);
8297
8310
  const renderBody = () => {
@@ -9031,6 +9044,7 @@ var TableDesktopToolbar = ({
9031
9044
  disableBulkChangesMode = false,
9032
9045
  isBulkChangesMode,
9033
9046
  onChangeBulkChangesMode,
9047
+ onActivateBulkChangesMode,
9034
9048
  refetchData,
9035
9049
  renderExportCsvDialog,
9036
9050
  renderBulkChangesDialog,
@@ -9055,8 +9069,8 @@ var TableDesktopToolbar = ({
9055
9069
  const handleChangeBulkChangesMode = (_, checked) => {
9056
9070
  setBulkChanges([]);
9057
9071
  onChangeBulkChangesMode(checked);
9058
- if (!checked) {
9059
- refetchData?.();
9072
+ if (checked) {
9073
+ onActivateBulkChangesMode?.();
9060
9074
  }
9061
9075
  };
9062
9076
  const handleUpdateEditableCell = ({