@natoora-libs/core 0.2.29 → 0.2.31-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.
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import React__default, { MouseEvent, CSSProperties, ReactNode, FC, ReactElement, ComponentType, ChangeEvent, ComponentProps, SVGProps } from 'react';
2
+ import React__default, { MouseEvent, CSSProperties, ReactNode, FC, ReactElement, ComponentType, KeyboardEvent, ChangeEvent, ComponentProps, SVGProps } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { UseFormReturn, Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, FieldValues, Path } from 'react-hook-form';
5
5
  import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as HeaderFilterObject, T as TableDesktopProps, O as Order, R as RowId } from '../TableDesktop-BQk0gStR.cjs';
@@ -79,6 +79,7 @@ type BaseAddressFormFields = {
79
79
  };
80
80
  type AddressFormFieldsProps = {
81
81
  form: UseFormReturn<BaseAddressFormFields>;
82
+ hidePrimaryPhoneNumberField?: boolean;
82
83
  countriesSelectProps: {
83
84
  countries: AddressCountry[];
84
85
  isCountriesFetching: boolean;
@@ -90,7 +91,7 @@ type AddressFormFieldsProps = {
90
91
  };
91
92
  googlePlacesAutocompleteProps?: GooglePlacesAddressAutocompleteProps;
92
93
  };
93
- declare const AddressFormFields: ({ form, countriesSelectProps: { countries, isCountriesFetching, refetchCountries }, statesSelectProps: { addressStates, isAddressStatesFetching }, googlePlacesAutocompleteProps, }: AddressFormFieldsProps) => react_jsx_runtime.JSX.Element;
94
+ declare const AddressFormFields: ({ form, hidePrimaryPhoneNumberField, countriesSelectProps: { countries, isCountriesFetching, refetchCountries }, statesSelectProps: { addressStates, isAddressStatesFetching }, googlePlacesAutocompleteProps, }: AddressFormFieldsProps) => react_jsx_runtime.JSX.Element;
94
95
 
95
96
  interface AlertDialogProps {
96
97
  open: boolean;
@@ -957,6 +958,7 @@ interface SmartSelectProps {
957
958
  refetch?: () => void;
958
959
  isFetching?: boolean;
959
960
  onChange: (selectedOption: Option) => void;
961
+ onKeyDownCapture?: (event: KeyboardEvent<HTMLDivElement>) => void;
960
962
  inputLabel?: string;
961
963
  variant?: SelectProps['variant'];
962
964
  size?: SelectProps['size'];
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import React__default, { MouseEvent, CSSProperties, ReactNode, FC, ReactElement, ComponentType, ChangeEvent, ComponentProps, SVGProps } from 'react';
2
+ import React__default, { MouseEvent, CSSProperties, ReactNode, FC, ReactElement, ComponentType, KeyboardEvent, ChangeEvent, ComponentProps, SVGProps } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { UseFormReturn, Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, FieldValues, Path } from 'react-hook-form';
5
5
  import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as HeaderFilterObject, T as TableDesktopProps, O as Order, R as RowId } from '../TableDesktop-BQk0gStR.js';
@@ -79,6 +79,7 @@ type BaseAddressFormFields = {
79
79
  };
80
80
  type AddressFormFieldsProps = {
81
81
  form: UseFormReturn<BaseAddressFormFields>;
82
+ hidePrimaryPhoneNumberField?: boolean;
82
83
  countriesSelectProps: {
83
84
  countries: AddressCountry[];
84
85
  isCountriesFetching: boolean;
@@ -90,7 +91,7 @@ type AddressFormFieldsProps = {
90
91
  };
91
92
  googlePlacesAutocompleteProps?: GooglePlacesAddressAutocompleteProps;
92
93
  };
93
- declare const AddressFormFields: ({ form, countriesSelectProps: { countries, isCountriesFetching, refetchCountries }, statesSelectProps: { addressStates, isAddressStatesFetching }, googlePlacesAutocompleteProps, }: AddressFormFieldsProps) => react_jsx_runtime.JSX.Element;
94
+ declare const AddressFormFields: ({ form, hidePrimaryPhoneNumberField, countriesSelectProps: { countries, isCountriesFetching, refetchCountries }, statesSelectProps: { addressStates, isAddressStatesFetching }, googlePlacesAutocompleteProps, }: AddressFormFieldsProps) => react_jsx_runtime.JSX.Element;
94
95
 
95
96
  interface AlertDialogProps {
96
97
  open: boolean;
@@ -957,6 +958,7 @@ interface SmartSelectProps {
957
958
  refetch?: () => void;
958
959
  isFetching?: boolean;
959
960
  onChange: (selectedOption: Option) => void;
961
+ onKeyDownCapture?: (event: KeyboardEvent<HTMLDivElement>) => void;
960
962
  inputLabel?: string;
961
963
  variant?: SelectProps['variant'];
962
964
  size?: SelectProps['size'];
@@ -302,7 +302,7 @@ var require_debounce = __commonJS({
302
302
 
303
303
  // src/components/ActiveFiltersIconButton/ActiveFiltersIconButton.tsx
304
304
  import { memo } from "react";
305
- import { FilterList } from "@mui/icons-material";
305
+ import FilterList from "@mui/icons-material/FilterList";
306
306
  import { Typography, Chip, IconButton } from "@mui/material";
307
307
  import { jsx, jsxs } from "react/jsx-runtime";
308
308
  var ActiveFiltersIconButton = memo(
@@ -701,6 +701,7 @@ var SmartSelect = forwardRef(
701
701
  refetch,
702
702
  isFetching = false,
703
703
  onChange,
704
+ onKeyDownCapture,
704
705
  inputLabel,
705
706
  variant = "standard",
706
707
  size,
@@ -723,7 +724,7 @@ var SmartSelect = forwardRef(
723
724
  }
724
725
  return baseOptions;
725
726
  }, [options, value, defaultOption]);
726
- const handleOpen = () => {
727
+ const handleFetchData = () => {
727
728
  if (!options?.length) {
728
729
  refetch?.();
729
730
  }
@@ -751,6 +752,9 @@ var SmartSelect = forwardRef(
751
752
  onChange(nextOption);
752
753
  }
753
754
  };
755
+ const handleKeyDownCapture = (event) => {
756
+ onKeyDownCapture?.(event);
757
+ };
754
758
  const renderMenuContent = () => {
755
759
  if (isFetching) {
756
760
  return [
@@ -822,8 +826,10 @@ var SmartSelect = forwardRef(
822
826
  "data-testid": `${dataTestId}-select`,
823
827
  value: value ?? "",
824
828
  onChange: handleChange,
825
- onOpen: handleOpen,
829
+ onOpen: handleFetchData,
830
+ onFocus: handleFetchData,
826
831
  onKeyDown: handleKeyDown,
832
+ onKeyDownCapture: handleKeyDownCapture,
827
833
  label: inputLabel,
828
834
  MenuProps: menuProps,
829
835
  children: renderMenuContent()
@@ -849,6 +855,7 @@ var ADDRESS_FORM_FIELDS = [
849
855
  ];
850
856
  var AddressFormFields = ({
851
857
  form,
858
+ hidePrimaryPhoneNumberField = false,
852
859
  countriesSelectProps: { countries, isCountriesFetching, refetchCountries },
853
860
  statesSelectProps: { addressStates, isAddressStatesFetching },
854
861
  googlePlacesAutocompleteProps
@@ -913,7 +920,7 @@ var AddressFormFields = ({
913
920
  helperText: "Name this address for easier reference (e.g. Office, Home, etc.)."
914
921
  }
915
922
  ),
916
- /* @__PURE__ */ jsx6(
923
+ !hidePrimaryPhoneNumberField && /* @__PURE__ */ jsx6(
917
924
  Controller2,
918
925
  {
919
926
  control,
@@ -2332,7 +2339,8 @@ var ImageButton = (props) => {
2332
2339
  var ImageButton_default = memo6(ImageButton);
2333
2340
 
2334
2341
  // src/components/Buttons/SquareButton/SquareButton.tsx
2335
- import { Add as Add2, ChevronRight } from "@mui/icons-material";
2342
+ import Add2 from "@mui/icons-material/Add";
2343
+ import ChevronRight from "@mui/icons-material/ChevronRight";
2336
2344
  import { Typography as Typography9, Button as Button10 } from "@mui/material";
2337
2345
  import { makeStyles as makeStyles10 } from "tss-react/mui";
2338
2346
  import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
@@ -5364,7 +5372,7 @@ var DeliveryInstructionsFormFields = ({
5364
5372
  };
5365
5373
 
5366
5374
  // src/components/FileCard/FileCard.tsx
5367
- import { Description as DescriptionIcon } from "@mui/icons-material";
5375
+ import DescriptionIcon from "@mui/icons-material/Description";
5368
5376
  import { Typography as Typography16, Box as Box25 } from "@mui/material";
5369
5377
  import { jsx as jsx92, jsxs as jsxs57 } from "react/jsx-runtime";
5370
5378
  var getFileMetadata = (file) => {
@@ -10099,7 +10107,7 @@ var TableDesktopToolbar = ({
10099
10107
 
10100
10108
  // src/components/TableHeader/TableHeader.tsx
10101
10109
  import { memo as memo21, useEffect as useEffect16, useState as useState26 } from "react";
10102
- import { ImportExport as ImportExportIcon } from "@mui/icons-material";
10110
+ import ImportExportIcon from "@mui/icons-material/ImportExport";
10103
10111
  import { TableCell as TableCell7, TableHead as TableHead3, TableRow as TableRow6, TableSortLabel as TableSortLabel3 } from "@mui/material";
10104
10112
  import { makeStyles as makeStyles46 } from "tss-react/mui";
10105
10113
  import { jsx as jsx140 } from "react/jsx-runtime";