@etsoo/materialui 1.2.29 → 1.2.30

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.
Files changed (76) hide show
  1. package/lib/AddresSelector.d.ts +1 -1
  2. package/lib/AuditDisplay.d.ts +1 -1
  3. package/lib/BackButton.d.ts +2 -2
  4. package/lib/BridgeCloseButton.d.ts +2 -2
  5. package/lib/ButtonLink.d.ts +2 -2
  6. package/lib/ComboBox.d.ts +2 -2
  7. package/lib/ComboBoxMultiple.d.ts +2 -2
  8. package/lib/ComboBoxMultiple.js +14 -18
  9. package/lib/ComboBoxPro.d.ts +2 -2
  10. package/lib/CountryList.d.ts +2 -2
  11. package/lib/DataGridEx.d.ts +1 -1
  12. package/lib/DataSteps.d.ts +2 -2
  13. package/lib/DataTable.d.ts +1 -1
  14. package/lib/DialogButton.d.ts +1 -1
  15. package/lib/DnDList.d.ts +1 -1
  16. package/lib/DraggablePaperComponent.d.ts +2 -2
  17. package/lib/EmailInput.d.ts +2 -2
  18. package/lib/FabBox.d.ts +2 -2
  19. package/lib/FlexBox.d.ts +3 -3
  20. package/lib/HiSelector.d.ts +1 -1
  21. package/lib/HiSelectorTL.d.ts +1 -1
  22. package/lib/IconButtonLink.d.ts +2 -2
  23. package/lib/InputTipField.d.ts +1 -1
  24. package/lib/ItemList.d.ts +1 -1
  25. package/lib/ListChooser.d.ts +1 -1
  26. package/lib/ListMoreDisplay.d.ts +1 -1
  27. package/lib/LoadingButton.d.ts +2 -2
  28. package/lib/MaskInput.d.ts +2 -2
  29. package/lib/MenuButton.d.ts +1 -1
  30. package/lib/MobileListItemRenderer.d.ts +1 -1
  31. package/lib/MoreFab.d.ts +1 -1
  32. package/lib/NotifierMU.d.ts +2 -2
  33. package/lib/OptionBool.d.ts +2 -2
  34. package/lib/OptionGroup.d.ts +1 -1
  35. package/lib/PList.d.ts +2 -2
  36. package/lib/PercentCircularProgress.d.ts +2 -2
  37. package/lib/PercentLinearProgress.d.ts +2 -2
  38. package/lib/ProgressCount.d.ts +2 -2
  39. package/lib/PullToRefreshUI.d.ts +2 -2
  40. package/lib/QuickList.d.ts +1 -1
  41. package/lib/ResponsibleContainer.d.ts +1 -1
  42. package/lib/ScrollTopFab.d.ts +2 -2
  43. package/lib/ScrollerListEx.d.ts +1 -1
  44. package/lib/SearchBar.d.ts +1 -1
  45. package/lib/SearchField.d.ts +2 -2
  46. package/lib/SearchOptionGroup.d.ts +2 -2
  47. package/lib/SelectBool.d.ts +2 -2
  48. package/lib/SelectEx.d.ts +1 -1
  49. package/lib/Switch.d.ts +2 -2
  50. package/lib/SwitchAnt.d.ts +2 -2
  51. package/lib/SwitchField.d.ts +1 -1
  52. package/lib/TabBox.d.ts +1 -1
  53. package/lib/TableEx.d.ts +1 -1
  54. package/lib/TagList.d.ts +2 -2
  55. package/lib/TagListPro.d.ts +2 -2
  56. package/lib/Tiplist.d.ts +2 -2
  57. package/lib/TiplistPro.d.ts +2 -2
  58. package/lib/TooltipClick.d.ts +1 -1
  59. package/lib/TwoFieldInput.d.ts +2 -2
  60. package/lib/UserAvatar.d.ts +2 -2
  61. package/lib/UserAvatarEditor.d.ts +2 -2
  62. package/lib/pages/CommonPage.d.ts +2 -2
  63. package/lib/pages/DataGridPage.d.ts +2 -2
  64. package/lib/pages/EditPage.d.ts +1 -1
  65. package/lib/pages/FixedListPage.d.ts +2 -2
  66. package/lib/pages/LeftDrawer.d.ts +1 -1
  67. package/lib/pages/ListPage.d.ts +2 -2
  68. package/lib/pages/ResponsivePage.d.ts +2 -2
  69. package/lib/pages/TablePage.d.ts +2 -2
  70. package/lib/pages/UserMenu.d.ts +1 -1
  71. package/lib/pages/ViewPage.d.ts +1 -1
  72. package/lib/texts/DateText.d.ts +2 -2
  73. package/lib/texts/MoneyText.d.ts +2 -2
  74. package/lib/texts/NumberText.d.ts +2 -2
  75. package/package.json +7 -7
  76. package/src/ComboBoxMultiple.tsx +20 -23
@@ -96,5 +96,5 @@ export type AddressSelectorProps = {
96
96
  * Address selector
97
97
  * @param props Props
98
98
  */
99
- export declare function AddressSelector(props: AddressSelectorProps): JSX.Element;
99
+ export declare function AddressSelector(props: AddressSelectorProps): React.JSX.Element;
100
100
  export {};
@@ -28,4 +28,4 @@ export interface AuditDisplayProps extends Omit<ListMoreDisplayProps<AuditLineDt
28
28
  * @param props Props
29
29
  * @returns Component
30
30
  */
31
- export declare function AuditDisplay(props: AuditDisplayProps): JSX.Element;
31
+ export declare function AuditDisplay(props: AuditDisplayProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { IconButtonProps } from '@mui/material';
2
+ import React from 'react';
3
3
  /**
4
4
  * BackButton props
5
5
  */
@@ -10,4 +10,4 @@ export interface BackButtonProps extends IconButtonProps {
10
10
  * @param props Props
11
11
  * @returns Component
12
12
  */
13
- export declare function BackButton(props: BackButtonProps): JSX.Element;
13
+ export declare function BackButton(props: BackButtonProps): React.JSX.Element;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { IBridgeHost } from "@etsoo/appscript";
3
2
  import { BoxProps, IconButtonProps } from "@mui/material";
3
+ import React from "react";
4
4
  /**
5
5
  * Bridge close button props
6
6
  */
@@ -20,4 +20,4 @@ export interface BridgeCloseButtonProps extends IconButtonProps {
20
20
  * @param props Props
21
21
  * @returns Component
22
22
  */
23
- export declare function BridgeCloseButton(props: BridgeCloseButtonProps): JSX.Element;
23
+ export declare function BridgeCloseButton(props: BridgeCloseButtonProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from "@mui/material";
2
+ import React from "react";
3
3
  /**
4
4
  * ButtonLink props
5
5
  */
@@ -18,4 +18,4 @@ export type ButtonLinkProps = Omit<ButtonProps, "href" | "onClick"> & {
18
18
  * @param props Props
19
19
  * @returns Component
20
20
  */
21
- export declare function ButtonLink(props: ButtonLinkProps): JSX.Element;
21
+ export declare function ButtonLink(props: ButtonLinkProps): React.JSX.Element;
package/lib/ComboBox.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { DataTypes, IdDefaultType, LabelDefaultType, ListType } from "@etsoo/shared";
2
+ import React from "react";
3
3
  import { AutocompleteExtendedProps } from "./AutocompleteExtendedProps";
4
4
  /**
5
5
  * ComboBox props
@@ -35,4 +35,4 @@ export type ComboBoxProps<T extends object = ListType, D extends DataTypes.Keys<
35
35
  * @param props Props
36
36
  * @returns Component
37
37
  */
38
- export declare function ComboBox<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: ComboBoxProps<T, D, L>): JSX.Element;
38
+ export declare function ComboBox<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: ComboBoxProps<T, D, L>): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { DataTypes, IdDefaultType, LabelDefaultType, ListType } from "@etsoo/shared";
2
+ import React from "react";
3
3
  import { AutocompleteExtendedProps } from "./AutocompleteExtendedProps";
4
4
  /**
5
5
  * ComboBox multiple props
@@ -39,4 +39,4 @@ export type ComboBoxMultipleProps<T extends object = ListType, D extends DataTyp
39
39
  * @param props Props
40
40
  * @returns Component
41
41
  */
42
- export declare function ComboBoxMultiple<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: ComboBoxMultipleProps<T, D, L>): JSX.Element;
42
+ export declare function ComboBoxMultiple<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: ComboBoxMultipleProps<T, D, L>): React.JSX.Element;
@@ -28,6 +28,18 @@ export function ComboBoxMultiple(props) {
28
28
  // Options state
29
29
  const [localOptions, setOptions] = React.useState(options !== null && options !== void 0 ? options : []);
30
30
  const isMounted = React.useRef(true);
31
+ // Local default value
32
+ const localValue = idValue != null
33
+ ? localOptions.filter((o) => o[idField] === idValue)
34
+ : idValues != null
35
+ ? localOptions.filter((o) => idValues === null || idValues === void 0 ? void 0 : idValues.includes(o[idField]))
36
+ : defaultValue !== null && defaultValue !== void 0 ? defaultValue : value;
37
+ // State
38
+ // null for controlled
39
+ const [stateValue, setStateValue] = React.useState(null);
40
+ React.useEffect(() => {
41
+ setStateValue(localValue !== null && localValue !== void 0 ? localValue : []);
42
+ }, [localValue]);
31
43
  // When options change
32
44
  // [options] will cause infinite loop
33
45
  const propertyWay = loadData == null;
@@ -45,20 +57,6 @@ export function ComboBoxMultiple(props) {
45
57
  }
46
58
  }
47
59
  }, [options, propertyWay]);
48
- // Local default value
49
- const localValue = idValue != null
50
- ? localOptions.filter((o) => o[idField] === idValue)
51
- : idValues != null
52
- ? localOptions.filter((o) => idValues === null || idValues === void 0 ? void 0 : idValues.includes(o[idField]))
53
- : defaultValue !== null && defaultValue !== void 0 ? defaultValue : value;
54
- // State
55
- // null for controlled
56
- const [stateValue, setStateValue] = React.useState(null);
57
- React.useEffect(() => {
58
- if (localValue != null && localValue != stateValue) {
59
- setStateValue(localValue);
60
- }
61
- }, [localValue]);
62
60
  // Add readOnly
63
61
  const addReadOnly = (params) => {
64
62
  if (readOnly != null) {
@@ -82,9 +80,7 @@ export function ComboBoxMultiple(props) {
82
80
  const getValue = (value) => {
83
81
  if (value == null)
84
82
  return "";
85
- if (Array.isArray(value))
86
- return value.map((item) => item[idField]).join(",");
87
- return `${value[idField]}`;
83
+ return value.map((item) => item[idField]).join(",");
88
84
  };
89
85
  const setInputValue = (value) => {
90
86
  // Set state
@@ -126,7 +122,7 @@ export function ComboBoxMultiple(props) {
126
122
  ? []
127
123
  : Array.isArray(stateValue)
128
124
  ? stateValue
129
- : [stateValue], disableCloseOnSelect: disableCloseOnSelect, getOptionLabel: getOptionLabel, isOptionEqualToValue: (option, value) => option[idField] === value[idField], onChange: (event, value, reason, details) => {
125
+ : [stateValue], disableCloseOnSelect: disableCloseOnSelect, getOptionLabel: getOptionLabel, multiple: true, isOptionEqualToValue: (option, value) => option[idField] === value[idField], onChange: (event, value, reason, details) => {
130
126
  // Set value
131
127
  setInputValue(value);
132
128
  // Custom
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { AutocompleteProps } from "@mui/material";
2
+ import React from "react";
3
3
  import { InputFieldProps } from "./InputField";
4
4
  import { ListType2 } from "@etsoo/shared";
5
5
  export type ComboBoxProProps<D extends ListType2 = ListType2> = Omit<AutocompleteProps<D, false, false, true>, "open" | "multiple" | "options" | "renderInput"> & {
@@ -29,4 +29,4 @@ export type ComboBoxProProps<D extends ListType2 = ListType2> = Omit<Autocomplet
29
29
  */
30
30
  onValueChange?: (value: D | null) => void;
31
31
  };
32
- export declare function ComboBoxPro<D extends ListType2 = ListType2>(props: ComboBoxProProps<D>): JSX.Element;
32
+ export declare function ComboBoxPro<D extends ListType2 = ListType2>(props: ComboBoxProProps<D>): React.JSX.Element;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { AddressRegionDb, RegionsRQ } from '@etsoo/appscript';
3
2
  import { DataTypes } from '@etsoo/shared';
3
+ import React from 'react';
4
4
  import { TiplistProps } from './Tiplist';
5
5
  /**
6
6
  * Country list props
@@ -27,4 +27,4 @@ export type CountryListProps = Omit<DataTypes.Optional<TiplistProps<AddressRegio
27
27
  * @param props Props
28
28
  * @returns Component
29
29
  */
30
- export declare function CountryList(props: CountryListProps): JSX.Element;
30
+ export declare function CountryList(props: CountryListProps): React.JSX.Element;
@@ -91,4 +91,4 @@ export declare function DataGridExCalColumns<T>(columns: GridColumn<T>[]): {
91
91
  * @param props Props
92
92
  * @returns Component
93
93
  */
94
- export declare function DataGridEx<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: DataGridExProps<T, D>): JSX.Element;
94
+ export declare function DataGridEx<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: DataGridExProps<T, D>): React.JSX.Element;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { TextFieldProps } from "@mui/material";
3
2
  import { InputDialogProps } from "@etsoo/react";
3
+ import React from "react";
4
4
  /**
5
5
  * Data step
6
6
  */
@@ -36,4 +36,4 @@ export type DataStepsProps<T extends object> = Omit<TextFieldProps, "InputProps"
36
36
  * @param props Props
37
37
  * @returns Component
38
38
  */
39
- export declare function DataSteps<T extends object>(props: DataStepsProps<T>): JSX.Element;
39
+ export declare function DataSteps<T extends object>(props: DataStepsProps<T>): React.JSX.Element;
@@ -30,4 +30,4 @@ export type DataTableProps<R extends GridValidRowModel = any> = Omit<DataGridPro
30
30
  * @param props Props
31
31
  * @returns Component
32
32
  */
33
- export declare function DataTable<R extends GridValidRowModel = any>(props: DataTableProps<R>): JSX.Element;
33
+ export declare function DataTable<R extends GridValidRowModel = any>(props: DataTableProps<R>): React.JSX.Element;
@@ -51,4 +51,4 @@ export interface DialogButtonProps extends ButtonProps {
51
51
  * @param props Props
52
52
  * @returns Component
53
53
  */
54
- export declare function DialogButton(props: DialogButtonProps): JSX.Element;
54
+ export declare function DialogButton(props: DialogButtonProps): React.JSX.Element;
package/lib/DnDList.d.ts CHANGED
@@ -92,4 +92,4 @@ export interface DnDListPros<D extends object, K extends DataTypes.Keys<D>> {
92
92
  */
93
93
  export declare function DnDList<D extends {
94
94
  id: UniqueIdentifier;
95
- }, K extends DataTypes.Keys<D, UniqueIdentifier> = DataTypes.Keys<D, UniqueIdentifier>>(props: DnDListPros<D, K>): JSX.Element;
95
+ }, K extends DataTypes.Keys<D, UniqueIdentifier> = DataTypes.Keys<D, UniqueIdentifier>>(props: DnDListPros<D, K>): React.JSX.Element;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
1
  import { PaperProps } from "@mui/material";
2
+ import React from "react";
3
3
  /**
4
4
  * Draggable paper component
5
5
  * @param props Props
6
6
  * @returns Component
7
7
  */
8
- export declare function DraggablePaperComponent(props: PaperProps): JSX.Element;
8
+ export declare function DraggablePaperComponent(props: PaperProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { TextFieldProps } from '@mui/material';
2
+ import React from 'react';
3
3
  /**
4
4
  * Email input props
5
5
  */
@@ -8,4 +8,4 @@ export type EmailInputProps = Omit<TextFieldProps, 'type'> & {};
8
8
  * Email input
9
9
  * @param props Props
10
10
  */
11
- export declare function EmailInput(props: EmailInputProps): JSX.Element;
11
+ export declare function EmailInput(props: EmailInputProps): React.JSX.Element;
package/lib/FabBox.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { BoxProps, PaperProps } from "@mui/material";
2
+ import React from "react";
3
3
  type SharedProps = keyof BoxProps & keyof PaperProps;
4
4
  /**
5
5
  * Fabs container box props
@@ -23,5 +23,5 @@ export type FabBoxProps = Pick<BoxProps, SharedProps> & Pick<PaperProps, SharedP
23
23
  * @param props Props
24
24
  * @returns Component
25
25
  */
26
- export declare function FabBox(props: FabBoxProps): JSX.Element;
26
+ export declare function FabBox(props: FabBoxProps): React.JSX.Element;
27
27
  export {};
package/lib/FlexBox.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- /// <reference types="react" />
2
1
  import { StackProps } from '@mui/material';
2
+ import React from 'react';
3
3
  /**
4
4
  * Horizonal box
5
5
  * @param props Props
6
6
  * @returns Component
7
7
  */
8
- export declare function HBox(props: Omit<StackProps, 'ref'>): JSX.Element;
8
+ export declare function HBox(props: Omit<StackProps, 'ref'>): React.JSX.Element;
9
9
  /**
10
10
  * Vertial box
11
11
  * @param props Props
12
12
  * @returns Component
13
13
  */
14
- export declare function VBox(props: Omit<StackProps, 'ref'>): JSX.Element;
14
+ export declare function VBox(props: Omit<StackProps, 'ref'>): React.JSX.Element;
@@ -67,4 +67,4 @@ export type HiSelectorProps<T extends object, D extends DataTypes.Keys<T> = IdDe
67
67
  * @param props Prop
68
68
  * @returns Component
69
69
  */
70
- export declare function HiSelector<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: HiSelectorProps<T, D, L>): JSX.Element;
70
+ export declare function HiSelector<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: HiSelectorProps<T, D, L>): React.JSX.Element;
@@ -59,4 +59,4 @@ export type HiSelectorTLProps<T extends object, D extends DataTypes.Keys<T> = Id
59
59
  * @param props Prop
60
60
  * @returns Component
61
61
  */
62
- export declare function HiSelectorTL<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: HiSelectorTLProps<T, D>): JSX.Element;
62
+ export declare function HiSelectorTL<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: HiSelectorTLProps<T, D>): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { IconButtonProps } from "@mui/material";
2
+ import React from "react";
3
3
  /**
4
4
  * IconButtonLink props
5
5
  */
@@ -18,4 +18,4 @@ export type IconButtonLinkProps = Omit<IconButtonProps, "href" | "onClick"> & {
18
18
  * @param props Props
19
19
  * @returns Component
20
20
  */
21
- export declare function IconButtonLink(props: IconButtonLinkProps): JSX.Element;
21
+ export declare function IconButtonLink(props: IconButtonLinkProps): React.JSX.Element;
@@ -34,5 +34,5 @@ export type InputTipFieldProps<T extends ItemType = ItemType> = InputFieldProps
34
34
  * @param props Props
35
35
  * @returns Component
36
36
  */
37
- export declare function InputTipField<T extends ItemType = ItemType>(props: InputTipFieldProps<T>): JSX.Element;
37
+ export declare function InputTipField<T extends ItemType = ItemType>(props: InputTipFieldProps<T>): React.JSX.Element;
38
38
  export {};
package/lib/ItemList.d.ts CHANGED
@@ -65,4 +65,4 @@ export interface ItemListProps<T extends object, D extends DataTypes.Keys<T>, L
65
65
  * Item list component
66
66
  * @param props Properties
67
67
  */
68
- export declare function ItemList<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: ItemListProps<T, D, L>): JSX.Element;
68
+ export declare function ItemList<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: ItemListProps<T, D, L>): React.JSX.Element;
@@ -52,5 +52,5 @@ export type ListChooserProps<T extends object, D extends DataTypes.Keys<T>, Q ex
52
52
  * @param props Props
53
53
  * @returns Component
54
54
  */
55
- export declare function ListChooser<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>, Q extends object = QueryData>(props: ListChooserProps<T, D, Q>): JSX.Element;
55
+ export declare function ListChooser<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>, Q extends object = QueryData>(props: ListChooserProps<T, D, Q>): React.JSX.Element;
56
56
  export {};
@@ -36,4 +36,4 @@ export interface ListMoreDisplayProps<T extends object, F extends DataTypes.Basi
36
36
  * @param props Props
37
37
  * @returns Component
38
38
  */
39
- export declare function ListMoreDisplay<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate>(props: ListMoreDisplayProps<T, F>): JSX.Element;
39
+ export declare function ListMoreDisplay<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate>(props: ListMoreDisplayProps<T, F>): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps, CircularProgressProps } from '@mui/material';
2
+ import React from 'react';
3
3
  /**
4
4
  * Loading button props
5
5
  */
@@ -13,4 +13,4 @@ export type LoadingButtonProps = ButtonProps & {
13
13
  * Loading button
14
14
  * @param props Props
15
15
  */
16
- export declare function LoadingButton(props: LoadingButtonProps): JSX.Element;
16
+ export declare function LoadingButton(props: LoadingButtonProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { TextFieldProps } from '@mui/material';
2
+ import React from 'react';
3
3
  /**
4
4
  * Mask input props
5
5
  */
@@ -31,4 +31,4 @@ export type MaskInputProps<T extends IMask.AnyMaskedOptions> = TextFieldProps &
31
31
  * @param props Props
32
32
  * @returns Component
33
33
  */
34
- export declare function MaskInput<T extends IMask.AnyMaskedOptions = IMask.AnyMaskedOptions>(props: MaskInputProps<T>): JSX.Element;
34
+ export declare function MaskInput<T extends IMask.AnyMaskedOptions = IMask.AnyMaskedOptions>(props: MaskInputProps<T>): React.JSX.Element;
@@ -6,4 +6,4 @@ export type MenuButtonProps<T extends DataTypes.IdItem> = Omit<MenuProps, "open"
6
6
  labelField: DataTypes.Keys<T, string>;
7
7
  button: ((clickHandler: React.MouseEventHandler<HTMLButtonElement>) => React.ReactNode) | ButtonProps;
8
8
  };
9
- export declare function MenuButton<T extends DataTypes.IdItem>(props: MenuButtonProps<T>): JSX.Element;
9
+ export declare function MenuButton<T extends DataTypes.IdItem>(props: MenuButtonProps<T>): React.JSX.Element;
@@ -14,4 +14,4 @@ export declare function MobileListItemRenderer<T>({ data, itemHeight, margins }:
14
14
  React.ReactNode | (ListItemReact | boolean)[],
15
15
  React.ReactNode,
16
16
  React.ReactNode?
17
- ]): JSX.Element;
17
+ ]): React.JSX.Element;
package/lib/MoreFab.d.ts CHANGED
@@ -42,4 +42,4 @@ export interface MoreFabProps extends CustomFabProps {
42
42
  * More fab
43
43
  * @returns Component
44
44
  */
45
- export declare function MoreFab(props: MoreFabProps): JSX.Element;
45
+ export declare function MoreFab(props: MoreFabProps): React.JSX.Element;
@@ -17,7 +17,7 @@ export declare class NotificationMU extends NotificationReact {
17
17
  * @param className Style class name
18
18
  * @param classes Style classes
19
19
  */
20
- render(props: NotificationRenderProps, className?: string): JSX.Element;
20
+ render(props: NotificationRenderProps, className?: string): React.JSX.Element;
21
21
  }
22
22
  /**
23
23
  * Antd notifier
@@ -36,7 +36,7 @@ export declare class NotifierMU extends NotifierReact {
36
36
  * @param children Children
37
37
  * @param options Other options
38
38
  */
39
- protected createContainer: (align: NotificationAlign, children: React.ReactNode[]) => JSX.Element;
39
+ protected createContainer: (align: NotificationAlign, children: React.ReactNode[]) => React.JSX.Element;
40
40
  /**
41
41
  * Add raw definition
42
42
  * @param data Notification data definition
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { ListType1 } from "@etsoo/shared";
2
+ import React from "react";
3
3
  import { OptionGroupProps } from "./OptionGroup";
4
4
  /**
5
5
  * OptionBool props
@@ -10,4 +10,4 @@ export type OptionBoolProps = Omit<OptionGroupProps<ListType1, "id", "label">, "
10
10
  * @param props Props
11
11
  * @returns Component
12
12
  */
13
- export declare function OptionBool(props: OptionBoolProps): JSX.Element;
13
+ export declare function OptionBool(props: OptionBoolProps): React.JSX.Element;
@@ -81,4 +81,4 @@ export type OptionGroupProps<T extends object, D extends DataTypes.Keys<T>, L ex
81
81
  * @param props Props
82
82
  * @returns Component
83
83
  */
84
- export declare function OptionGroup<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: OptionGroupProps<T, D, L>): JSX.Element;
84
+ export declare function OptionGroup<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: OptionGroupProps<T, D, L>): React.JSX.Element;
package/lib/PList.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  /**
3
3
  * Paragraph items list props
4
4
  */
@@ -12,4 +12,4 @@ export interface PListProps {
12
12
  * Paragraph items list
13
13
  * @param items Items
14
14
  */
15
- export declare function PList(props: PListProps): JSX.Element;
15
+ export declare function PList(props: PListProps): React.JSX.Element;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
1
  import { CircularProgressProps, TypographyProps } from "@mui/material";
2
+ import React from "react";
3
3
  export type PercentCircularProgressProps = CircularProgressProps & {
4
4
  value: number;
5
5
  valueUnit?: string;
6
6
  textProps?: TypographyProps<"div">;
7
7
  };
8
- export declare function PercentCircularProgress(props: PercentCircularProgressProps): JSX.Element;
8
+ export declare function PercentCircularProgress(props: PercentCircularProgressProps): React.JSX.Element;
@@ -1,8 +1,8 @@
1
- /// <reference types="react" />
2
1
  import { LinearProgressProps, TypographyProps } from "@mui/material";
2
+ import React from "react";
3
3
  export type PercentLinearProgressProps = LinearProgressProps & {
4
4
  value: number;
5
5
  valueUnit?: string;
6
6
  textProps?: TypographyProps;
7
7
  };
8
- export declare function PercentLinearProgress(props: PercentLinearProgressProps): JSX.Element;
8
+ export declare function PercentLinearProgress(props: PercentLinearProgressProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  /**
3
3
  * Process count props
4
4
  */
@@ -41,4 +41,4 @@ export interface ProgressCountProps {
41
41
  * @param props Props
42
42
  * @returns Component
43
43
  */
44
- export declare function ProgressCount(props: ProgressCountProps): JSX.Element;
44
+ export declare function ProgressCount(props: ProgressCountProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { Options } from 'pulltorefreshjs';
3
3
  /**
4
4
  * PullToRefresh UI
@@ -6,4 +6,4 @@ import { Options } from 'pulltorefreshjs';
6
6
  * @param props Props
7
7
  * @returns Component
8
8
  */
9
- export declare function PullToRefreshUI(props: Options): JSX.Element;
9
+ export declare function PullToRefreshUI(props: Options): React.JSX.Element;
@@ -53,4 +53,4 @@ export type QuickListProps<T extends ListType2 = ListType2> = StackProps & {
53
53
  * @param props Props
54
54
  * @returns Component
55
55
  */
56
- export declare function QuickList<T extends ListType2 = ListType2>(props: QuickListProps<T>): JSX.Element;
56
+ export declare function QuickList<T extends ListType2 = ListType2>(props: QuickListProps<T>): React.JSX.Element;
@@ -96,4 +96,4 @@ export type ResponsibleContainerProps<T extends object, F extends DataTypes.Basi
96
96
  * @param props Props
97
97
  * @returns Layout
98
98
  */
99
- export declare function ResponsibleContainer<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: ResponsibleContainerProps<T, F, D>): JSX.Element;
99
+ export declare function ResponsibleContainer<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: ResponsibleContainerProps<T, F, D>): React.JSX.Element;
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { CustomFabProps } from "./CustomFabProps";
3
3
  /**
4
4
  * Scroll to top fab
5
5
  * @returns Component
6
6
  */
7
- export declare function ScrollTopFab(props: CustomFabProps): JSX.Element;
7
+ export declare function ScrollTopFab(props: CustomFabProps): React.JSX.Element;
@@ -73,4 +73,4 @@ export type ScrollerListExProps<T extends object, D extends DataTypes.Keys<T>> =
73
73
  * @param props Props
74
74
  * @returns Component
75
75
  */
76
- export declare function ScrollerListEx<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: ScrollerListExProps<T, D>): JSX.Element;
76
+ export declare function ScrollerListEx<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: ScrollerListExProps<T, D>): React.JSX.Element;
@@ -25,4 +25,4 @@ export interface SearchBarProps {
25
25
  * @param props Props
26
26
  * @returns Component
27
27
  */
28
- export declare function SearchBar(props: SearchBarProps): JSX.Element;
28
+ export declare function SearchBar(props: SearchBarProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { TextFieldProps } from '@mui/material';
2
+ import React from 'react';
3
3
  /**
4
4
  * Search field props
5
5
  */
@@ -18,4 +18,4 @@ export type SearchFieldProps = TextFieldProps & {
18
18
  * @param props Props
19
19
  * @returns Component
20
20
  */
21
- export declare function SearchField(props: SearchFieldProps): JSX.Element;
21
+ export declare function SearchField(props: SearchFieldProps): React.JSX.Element;
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { DataTypes, IdDefaultType, LabelDefaultType, ListType } from '@etsoo/shared';
2
+ import React from 'react';
3
3
  import { OptionGroupProps } from './OptionGroup';
4
4
  /**
5
5
  * Search OptionGroup
6
6
  * @param props Props
7
7
  * @returns Component
8
8
  */
9
- export declare function SearchOptionGroup<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: OptionGroupProps<T, D, L>): JSX.Element;
9
+ export declare function SearchOptionGroup<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: OptionGroupProps<T, D, L>): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { ListType1 } from "@etsoo/shared";
2
+ import React from "react";
3
3
  import { SelectExProps } from "./SelectEx";
4
4
  /**
5
5
  * SelectBool props
@@ -10,4 +10,4 @@ export type SelectBoolProps = Omit<SelectExProps<ListType1>, "options" | "loadDa
10
10
  * @param props Props
11
11
  * @returns Component
12
12
  */
13
- export declare function SelectBool(props: SelectBoolProps): JSX.Element;
13
+ export declare function SelectBool(props: SelectBoolProps): React.JSX.Element;
package/lib/SelectEx.d.ts CHANGED
@@ -67,4 +67,4 @@ export type SelectExProps<T extends object, D extends DataTypes.Keys<T> = IdDefa
67
67
  * @param props Props
68
68
  * @returns Component
69
69
  */
70
- export declare function SelectEx<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: SelectExProps<T, D, L>): JSX.Element;
70
+ export declare function SelectEx<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>, L extends DataTypes.Keys<T, string> = LabelDefaultType<T>>(props: SelectExProps<T, D, L>): React.JSX.Element;
package/lib/Switch.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { FormControlLabelProps } from '@mui/material';
3
3
  /**
4
4
  * Switch props
@@ -26,4 +26,4 @@ export interface SwitchProps extends Omit<FormControlLabelProps, 'control'> {
26
26
  * @param props Props
27
27
  * @returns Component
28
28
  */
29
- export declare function Switch(props: SwitchProps): JSX.Element;
29
+ export declare function Switch(props: SwitchProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { SwitchProps } from "@mui/material/Switch";
2
+ import React from "react";
3
3
  /**
4
4
  * Ant style switch props
5
5
  */
@@ -22,4 +22,4 @@ export interface SwitchAntProps extends SwitchProps {
22
22
  * @param props Props
23
23
  * @returns Component
24
24
  */
25
- export declare function SwitchAnt(props: SwitchAntProps): JSX.Element;
25
+ export declare function SwitchAnt(props: SwitchAntProps): React.JSX.Element;
@@ -42,4 +42,4 @@ export type SwitchFieldProps = Omit<FormControlProps<"fieldset">, "defaultValue"
42
42
  * @param props Props
43
43
  * @returns Component
44
44
  */
45
- export declare function SwitchField(props: SwitchFieldProps): JSX.Element;
45
+ export declare function SwitchField(props: SwitchFieldProps): React.JSX.Element;
package/lib/TabBox.d.ts CHANGED
@@ -51,4 +51,4 @@ export interface TabBoxPros extends BoxProps {
51
51
  * @param props Props
52
52
  * @returns Component
53
53
  */
54
- export declare function TabBox(props: TabBoxPros): JSX.Element;
54
+ export declare function TabBox(props: TabBoxPros): React.JSX.Element;
package/lib/TableEx.d.ts CHANGED
@@ -62,4 +62,4 @@ export type TableExProps<T extends object, D extends DataTypes.Keys<T>> = TableP
62
62
  * @param props Props
63
63
  * @returns Component
64
64
  */
65
- export declare function TableEx<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: TableExProps<T, D>): JSX.Element;
65
+ export declare function TableEx<T extends object, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: TableExProps<T, D>): React.JSX.Element;
package/lib/TagList.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { AutocompleteProps } from "@mui/material";
2
+ import React from "react";
3
3
  import { InputFieldProps } from "./InputField";
4
4
  export type TagListProps = Omit<AutocompleteProps<string, true, false, true>, "open" | "multiple" | "freeSolo" | "options" | "renderInput"> & {
5
5
  /**
@@ -19,4 +19,4 @@ export type TagListProps = Omit<AutocompleteProps<string, true, false, true>, "o
19
19
  */
20
20
  maxItems?: number;
21
21
  };
22
- export declare function TagList(props: TagListProps): JSX.Element;
22
+ export declare function TagList(props: TagListProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { AutocompleteProps } from "@mui/material";
2
+ import React from "react";
3
3
  import { InputFieldProps } from "./InputField";
4
4
  import { ListType2 } from "@etsoo/shared";
5
5
  export type TagListProProps<D extends ListType2 = ListType2> = Omit<AutocompleteProps<D, true, false, false>, "open" | "multiple" | "options" | "renderInput"> & {
@@ -20,4 +20,4 @@ export type TagListProProps<D extends ListType2 = ListType2> = Omit<Autocomplete
20
20
  */
21
21
  maxItems?: number;
22
22
  };
23
- export declare function TagListPro<D extends ListType2 = ListType2>(props: TagListProProps<D>): JSX.Element;
23
+ export declare function TagListPro<D extends ListType2 = ListType2>(props: TagListProProps<D>): React.JSX.Element;
package/lib/Tiplist.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { DataTypes, IdDefaultType, ListType } from "@etsoo/shared";
2
+ import React from "react";
3
3
  import { AutocompleteExtendedProps } from "./AutocompleteExtendedProps";
4
4
  /**
5
5
  * Tiplist props
@@ -23,4 +23,4 @@ export type TiplistProps<T extends object, D extends DataTypes.Keys<T>> = Omit<A
23
23
  * @param props Props
24
24
  * @returns Component
25
25
  */
26
- export declare function Tiplist<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: TiplistProps<T, D>): JSX.Element;
26
+ export declare function Tiplist<T extends object = ListType, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: TiplistProps<T, D>): React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { ListType2 } from "@etsoo/shared";
2
2
  import { AutocompleteProps } from "@mui/material";
3
- import { ChangeEventHandler } from "react";
3
+ import React, { ChangeEventHandler } from "react";
4
4
  import { InputFieldProps } from "./InputField";
5
5
  /**
6
6
  * TiplistPro props
@@ -49,4 +49,4 @@ export type TiplistProProps<T extends ListType2 = ListType2> = Omit<Autocomplete
49
49
  * @param props Props
50
50
  * @returns Component
51
51
  */
52
- export declare function TiplistPro<T extends ListType2 = ListType2>(props: TiplistProProps<T>): JSX.Element;
52
+ export declare function TiplistPro<T extends ListType2 = ListType2>(props: TiplistProProps<T>): React.JSX.Element;
@@ -12,4 +12,4 @@ export interface TooltipClickProps extends Omit<TooltipProps, 'children' | 'open
12
12
  * @param props Props
13
13
  * @returns Component
14
14
  */
15
- export declare function TooltipClick(props: TooltipClickProps): JSX.Element;
15
+ export declare function TooltipClick(props: TooltipClickProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { InputFieldProps } from './InputField';
3
3
  type ValueType = string | number | Date | null | undefined;
4
4
  /**
@@ -19,5 +19,5 @@ export type TwoFieldInputProps = Omit<InputFieldProps, 'InputProps' | 'value'> &
19
19
  * @param props Props
20
20
  * @returns Component
21
21
  */
22
- export declare function TwoFieldInput(props: TwoFieldInputProps): JSX.Element;
22
+ export declare function TwoFieldInput(props: TwoFieldInputProps): React.JSX.Element;
23
23
  export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  /**
3
3
  * User avatar props
4
4
  */
@@ -21,4 +21,4 @@ export interface UserAvatarProps {
21
21
  * @param props Props
22
22
  * @returns Component
23
23
  */
24
- export declare function UserAvatar(props: UserAvatarProps): JSX.Element;
24
+ export declare function UserAvatar(props: UserAvatarProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  /**
3
3
  * User avatar editor to Blob helper
4
4
  */
@@ -50,4 +50,4 @@ export interface UserAvatarEditorProps {
50
50
  * @param props Props
51
51
  * @returns Component
52
52
  */
53
- export declare function UserAvatarEditor(props: UserAvatarEditorProps): JSX.Element;
53
+ export declare function UserAvatarEditor(props: UserAvatarEditorProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { CommonPageProps } from "./CommonPageProps";
3
3
  /**
4
4
  * Default scroll container
@@ -8,4 +8,4 @@ export declare const CommonPageScrollContainer: typeof globalThis;
8
8
  * Common page
9
9
  * @param props Props
10
10
  */
11
- export declare function CommonPage(props: CommonPageProps): JSX.Element;
11
+ export declare function CommonPage(props: CommonPageProps): React.JSX.Element;
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { DataTypes, IdDefaultType } from "@etsoo/shared";
2
+ import React from "react";
3
3
  import { DataGridPageProps } from "./DataGridPageProps";
4
4
  /**
5
5
  * DataGrid page
6
6
  * @param props Props
7
7
  * @returns Component
8
8
  */
9
- export declare function DataGridPage<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: DataGridPageProps<T, F, D>): JSX.Element;
9
+ export declare function DataGridPage<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: DataGridPageProps<T, F, D>): React.JSX.Element;
@@ -34,4 +34,4 @@ export interface EditPageProps extends Omit<CommonPageProps, "onSubmit"> {
34
34
  * Add / Edit page
35
35
  * @param props Props
36
36
  */
37
- export declare function EditPage(props: EditPageProps): JSX.Element;
37
+ export declare function EditPage(props: EditPageProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { DataTypes, IdDefaultType } from "@etsoo/shared";
2
+ import React from "react";
3
3
  import { ListPageProps } from "./ListPageProps";
4
4
  /**
5
5
  * Fixed height list page
@@ -13,4 +13,4 @@ export declare function FixedListPage<T extends object, F extends DataTypes.Basi
13
13
  * @param rect Current rect data
14
14
  */
15
15
  adjustHeight?: (height: number, rect: DOMRect) => number;
16
- }): JSX.Element;
16
+ }): React.JSX.Element;
@@ -28,4 +28,4 @@ export type LeftDrawerProps = React.PropsWithRef<{
28
28
  */
29
29
  onMinimize?: () => void;
30
30
  }>;
31
- export declare function LeftDrawer(props: React.PropsWithChildren<LeftDrawerProps>): JSX.Element;
31
+ export declare function LeftDrawer(props: React.PropsWithChildren<LeftDrawerProps>): React.JSX.Element;
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { DataTypes, IdDefaultType } from '@etsoo/shared';
2
+ import React from 'react';
3
3
  import { ListPageProps } from './ListPageProps';
4
4
  /**
5
5
  * List page
6
6
  * @param props Props
7
7
  * @returns Component
8
8
  */
9
- export declare function ListPage<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: ListPageProps<T, F, D>): JSX.Element;
9
+ export declare function ListPage<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: ListPageProps<T, F, D>): React.JSX.Element;
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { DataTypes, IdDefaultType } from "@etsoo/shared";
2
+ import React from "react";
3
3
  import { ResponsePageProps } from "./ResponsivePageProps";
4
4
  /**
5
5
  * Fixed height list page
6
6
  * @param props Props
7
7
  * @returns Component
8
8
  */
9
- export declare function ResponsivePage<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: ResponsePageProps<T, F, D>): JSX.Element;
9
+ export declare function ResponsivePage<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: ResponsePageProps<T, F, D>): React.JSX.Element;
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { DataTypes, IdDefaultType } from '@etsoo/shared';
2
+ import React from 'react';
3
3
  import { TablePageProps } from './TablePageProps';
4
4
  /**
5
5
  * Table page
6
6
  * @param props Props
7
7
  * @returns Component
8
8
  */
9
- export declare function TablePage<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: TablePageProps<T, F, D>): JSX.Element;
9
+ export declare function TablePage<T extends object, F extends DataTypes.BasicTemplate = DataTypes.BasicTemplate, D extends DataTypes.Keys<T> = IdDefaultType<T>>(props: TablePageProps<T, F, D>): React.JSX.Element;
@@ -37,4 +37,4 @@ export declare const eventWatcher: EventWatcher;
37
37
  * @param props Props
38
38
  * @returns Component
39
39
  */
40
- export declare function UserMenu(props: UserMenuProps): JSX.Element;
40
+ export declare function UserMenu(props: UserMenuProps): React.JSX.Element;
@@ -78,5 +78,5 @@ export interface ViewPageProps<T extends DataTypes.StringRecord> extends Omit<Co
78
78
  * View page
79
79
  * @param props Props
80
80
  */
81
- export declare function ViewPage<T extends DataTypes.StringRecord>(props: ViewPageProps<T>): JSX.Element;
81
+ export declare function ViewPage<T extends DataTypes.StringRecord>(props: ViewPageProps<T>): React.JSX.Element;
82
82
  export {};
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { DateUtils } from '@etsoo/shared';
3
2
  import { TypographyProps } from '@mui/material';
3
+ import React from 'react';
4
4
  /**
5
5
  * Date text props
6
6
  */
@@ -31,4 +31,4 @@ export interface DateTextProps extends TypographyProps {
31
31
  * @param props Props
32
32
  * @returns Component
33
33
  */
34
- export declare function DateText(props: DateTextProps): JSX.Element;
34
+ export declare function DateText(props: DateTextProps): React.JSX.Element;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { NumberTextProps } from './NumberText';
3
3
  /**
4
4
  * Money text props
@@ -18,4 +18,4 @@ export interface MoneyTextProps extends NumberTextProps {
18
18
  * @param props Props
19
19
  * @returns Component
20
20
  */
21
- export declare function MoneyText(props: MoneyTextProps): JSX.Element;
21
+ export declare function MoneyText(props: MoneyTextProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { TypographyProps } from '@mui/material';
2
+ import React from 'react';
3
3
  /**
4
4
  * Number text props
5
5
  */
@@ -22,4 +22,4 @@ export interface NumberTextProps extends TypographyProps {
22
22
  * @param props Props
23
23
  * @returns Component
24
24
  */
25
- export declare function NumberText(props: NumberTextProps): JSX.Element;
25
+ export declare function NumberText(props: NumberTextProps): React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.2.29",
3
+ "version": "1.2.30",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -47,21 +47,21 @@
47
47
  "dependencies": {
48
48
  "@dnd-kit/core": "^6.0.8",
49
49
  "@dnd-kit/sortable": "^7.0.2",
50
- "@emotion/css": "^11.10.8",
51
- "@emotion/react": "^11.10.8",
52
- "@emotion/styled": "^11.10.8",
50
+ "@emotion/css": "^11.11.0",
51
+ "@emotion/react": "^11.11.0",
52
+ "@emotion/styled": "^11.11.0",
53
53
  "@etsoo/appscript": "^1.3.99",
54
54
  "@etsoo/notificationbase": "^1.1.24",
55
- "@etsoo/react": "^1.6.73",
55
+ "@etsoo/react": "^1.6.74",
56
56
  "@etsoo/shared": "^1.2.1",
57
57
  "@mui/icons-material": "^5.11.16",
58
58
  "@mui/material": "^5.12.3",
59
59
  "@mui/x-data-grid": "^6.3.1",
60
60
  "@types/pica": "^9.0.1",
61
61
  "@types/pulltorefreshjs": "^0.1.5",
62
- "@types/react": "^18.2.5",
62
+ "@types/react": "^18.2.6",
63
63
  "@types/react-avatar-editor": "^13.0.0",
64
- "@types/react-dom": "^18.2.3",
64
+ "@types/react-dom": "^18.2.4",
65
65
  "@types/react-input-mask": "^3.0.2",
66
66
  "@types/react-window": "^1.8.5",
67
67
  "pica": "^9.0.1",
@@ -135,6 +135,22 @@ export function ComboBoxMultiple<
135
135
  const [localOptions, setOptions] = React.useState(options ?? []);
136
136
  const isMounted = React.useRef(true);
137
137
 
138
+ // Local default value
139
+ const localValue: T[] | null | undefined =
140
+ idValue != null
141
+ ? localOptions.filter((o) => o[idField] === idValue)
142
+ : idValues != null
143
+ ? localOptions.filter((o) => idValues?.includes(o[idField]))
144
+ : defaultValue ?? value;
145
+
146
+ // State
147
+ // null for controlled
148
+ const [stateValue, setStateValue] = React.useState<T[] | null>(null);
149
+
150
+ React.useEffect(() => {
151
+ setStateValue(localValue ?? []);
152
+ }, [localValue]);
153
+
138
154
  // When options change
139
155
  // [options] will cause infinite loop
140
156
  const propertyWay = loadData == null;
@@ -157,24 +173,6 @@ export function ComboBoxMultiple<
157
173
  }
158
174
  }, [options, propertyWay]);
159
175
 
160
- // Local default value
161
- const localValue: T | T[] | null | undefined =
162
- idValue != null
163
- ? localOptions.filter((o) => o[idField] === idValue)
164
- : idValues != null
165
- ? localOptions.filter((o) => idValues?.includes(o[idField]))
166
- : defaultValue ?? value;
167
-
168
- // State
169
- // null for controlled
170
- const [stateValue, setStateValue] = React.useState<T | T[] | null>(null);
171
-
172
- React.useEffect(() => {
173
- if (localValue != null && localValue != stateValue) {
174
- setStateValue(localValue);
175
- }
176
- }, [localValue]);
177
-
178
176
  // Add readOnly
179
177
  const addReadOnly = (params: AutocompleteRenderInputParams) => {
180
178
  if (readOnly != null) {
@@ -200,14 +198,12 @@ export function ComboBoxMultiple<
200
198
  return params;
201
199
  };
202
200
 
203
- const getValue = (value: T | T[] | null): string => {
201
+ const getValue = (value: T[] | null): string => {
204
202
  if (value == null) return "";
205
- if (Array.isArray(value))
206
- return value.map((item) => item[idField]).join(",");
207
- return `${value[idField]}`;
203
+ return value.map((item) => item[idField]).join(",");
208
204
  };
209
205
 
210
- const setInputValue = (value: T | T[] | null) => {
206
+ const setInputValue = (value: T[] | null) => {
211
207
  // Set state
212
208
  setStateValue(value);
213
209
 
@@ -266,6 +262,7 @@ export function ComboBoxMultiple<
266
262
  }
267
263
  disableCloseOnSelect={disableCloseOnSelect}
268
264
  getOptionLabel={getOptionLabel}
265
+ multiple
269
266
  isOptionEqualToValue={(option: T, value: T) =>
270
267
  option[idField] === value[idField]
271
268
  }