@m4l/components 9.2.52 → 9.2.53
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.
- package/components/Chip/Chip.js +3 -1
- package/components/Chip/ChipStyles.js +1 -1
- package/components/Chip/types.d.ts +4 -0
- package/components/DataGrid/constants.d.ts +21 -0
- package/components/DataGrid/constants.js +24 -1
- package/components/DataGrid/contexts/DataGridContext/index.js +1 -1
- package/components/DataGrid/contexts/FilterContext/index.js +1 -1
- package/components/DataGrid/dictionary.js +0 -3
- package/components/DataGrid/index.d.ts +1 -0
- package/components/DataGrid/slots/DataGridEnum.js +2 -2
- package/components/DataGrid/slots/DataGridSlot.js +1 -1
- package/components/DataGrid/subcomponents/Table/hooks/useSortColumnsRows.js +2 -0
- package/components/DataGrid/subcomponents/Table/subcomponents/ActionsColumn.js +2 -2
- package/components/DataGrid/subcomponents/Table/subcomponents/CheckboxFormatter.js +1 -1
- package/components/DataGrid/subcomponents/Table/subcomponents/CustomIcons.js +2 -2
- package/components/DragResizeWindowRND/DragResizeWindowRND.js +0 -1
- package/components/DynamicFilter/dictionary.js +0 -12
- package/components/DynamicFilter/store/DynamicFilterContext.js +1 -1
- package/components/DynamicFilter/subcomponents/DynamicFilterBase/DynamicFilterBase.js +1 -1
- package/components/DynamicFilter/subcomponents/FieldTypes/DateTimeFilter/helpers.js +3 -2
- package/components/DynamicFilter/subcomponents/PopoverFilter/usePopoverFilter.d.ts +3 -3
- package/components/DynamicFilter/types.d.ts +2 -2
- package/components/DynamicSort/dictionary.js +0 -5
- package/components/DynamicSort/slots/DynamicSortSlots.js +1 -1
- package/components/DynamicSort/store/DynamicSortContext.js +1 -1
- package/components/DynamicSort/subcomponents/DynamicSortBase/DynamicSortBase.js +1 -1
- package/components/DynamicSort/subcomponents/PopoverSort/usePopoverSort.d.ts +3 -3
- package/components/GridLayout/GridLayout.js +1 -1
- package/components/GridLayout/styles.js +1 -1
- package/components/GridLayout/subcomponents/GridItem/index.js +1 -1
- package/components/GridLayout/subcomponents/Responsive/helper.js +1 -1
- package/components/GridLayout/subcomponents/Responsive/index.js +1 -1
- package/components/GridLayout/subcomponents/Responsive/responsiveUtils.js +3 -3
- package/components/GridLayout/subcomponents/withSizeProvider/index.js +1 -1
- package/components/Icon/Icon.js +1 -1
- package/components/Icon/constants.js +2 -2
- package/components/Icon/slots/IconSlots.js +1 -1
- package/components/Image/Image.js +1 -1
- package/components/Image/constant.js +2 -2
- package/components/Image/slots/ImageSlots.js +1 -1
- package/components/Image/subcomponents/IntersectComponent/index.js +1 -1
- package/components/LanguagePopover/LanguagePopover.js +1 -1
- package/components/LoadingError/LoadingError.js +1 -1
- package/components/LoadingError/slots/LoadingErrorSlots.js +1 -1
- package/components/MFIsolationApp/subcomponents/MFAuthApp/MFAuthApp.js +1 -1
- package/components/NoItemSelected/NoItemSelected.js +1 -1
- package/components/NumberInput/hooks/useNumberInput/NumberInputReducer.js +1 -1
- package/components/NumberInput/hooks/useNumberInput/useNumberInput.js +2 -0
- package/components/ObjectLogs/dictionary.js +0 -3
- package/components/ObjectLogs/subcomponents/ObjectLogsByM4L/ObjectLogsByM4L.js +1 -1
- package/components/ObjectLogs/subcomponents/ObjectLogsByOthers/ObjectLogsByOthers.js +2 -2
- package/components/Pager/Pager.styles.js +0 -8
- package/components/Pager/dicctionary.js +0 -5
- package/components/PrintingSystem/subcomponents/ChartNode/index.js +1 -1
- package/components/PropertyValue/PropertyValue.js +2 -2
- package/components/ScrollBar/ScrollBar.js +1 -1
- package/components/SideBar/slots/SideBarEnum.js +4 -4
- package/components/SideBar/slots/SideBarSlots.js +1 -1
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ContainerMenuItemsMain/styles.js +1 -1
- package/components/ToastContainer/ToastContainer.js +1 -1
- package/components/WindowBase/slots/WindowBaseSlots.js +1 -1
- package/components/animate/variants/bounce.js +1 -1
- package/components/animate/variants/fade.js +1 -1
- package/components/animate/variants/transition.js +2 -2
- package/components/areas/components/AreasAdmin/AreasAdmin.js +1 -1
- package/components/areas/components/AreasViewer/AreasViewer.js +1 -1
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/AreaGridLayout/AreaGridLayout.js +1 -1
- package/components/areas/contexts/AreasContext/helpers/helper.js +14 -14
- package/components/areas/contexts/AreasContext/store.js +5 -5
- package/components/areas/icons.js +0 -8
- package/components/commercial/HamburgerMenu/classes/index.js +1 -1
- package/components/formatters/BooleanFormatter/BooleanFormatter.js +1 -1
- package/components/formatters/BooleanFormatter/slots/BooleanFormatterSlots.js +3 -3
- package/components/formatters/PeriodFormatter/PeriodFormatter.js +1 -1
- package/components/formatters/PeriodFormatter/slots/PeriodFormatterSlots.js +2 -2
- package/components/hook-form/RHFAutocomplete/RHFAutocomplete.js +30 -19
- package/components/hook-form/RHFAutocomplete/tests/common.d.ts +37 -0
- package/components/hook-form/RHFAutocomplete/types.d.ts +3 -8
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.d.ts +32 -5
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.js +49 -84
- package/components/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsyncStyles.d.ts +2 -2
- package/components/hook-form/RHFAutocompleteAsync/hooks/useFetchOptions.d.ts +5 -0
- package/components/hook-form/RHFAutocompleteAsync/hooks/useFetchOptions.js +64 -0
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.d.ts +14 -0
- package/components/hook-form/RHFAutocompleteAsync/reducer/RHFAutocompleteReducer.js +79 -0
- package/components/hook-form/RHFAutocompleteAsync/slots/RHFAutocompleteSlotsAsync.d.ts +1 -1
- package/components/hook-form/RHFAutocompleteAsync/tests/OnChangFilterParmsDefined.test.d.ts +1 -0
- package/components/hook-form/RHFAutocompleteAsync/tests/OnChangFilterParmsUndefined.test.d.ts +1 -0
- package/components/hook-form/RHFAutocompleteAsync/tests/RHFAutocompleteReducer.test.d.ts +1 -0
- package/components/hook-form/RHFAutocompleteAsync/tests/common.d.ts +41 -0
- package/components/hook-form/RHFAutocompleteAsync/types.d.ts +120 -4
- package/components/hook-form/RHFAutocompleteAsync/types.js +38 -0
- package/components/hook-form/RHFCheckbox/slots/RHFCheckBoxSlots.js +1 -1
- package/components/hook-form/RHFPeriod/RHFPeriod.js +1 -1
- package/components/hook-form/RHFTextField/RHFTextField.js +3 -2
- package/components/hook-form/RHFTextField/RHFTextField.styles.js +1 -3
- package/components/hook-form/RHFTextFieldPassword/slots/RHFTextFieldPasswordSlots.js +1 -1
- package/components/hook-form/RHFUpload/RHFUploadSingleFile/RHFUploadSingleFile.js +1 -1
- package/components/hook-form/RHFormContext/classes/index.js +1 -1
- package/components/hook-form/RHFormContext/index.js +1 -1
- package/components/mui_extended/Accordion/Accordion.js +1 -1
- package/components/mui_extended/Accordion/slots/AccordionSlots.js +2 -2
- package/components/mui_extended/Autocomplete/Autocomplete.d.ts +7 -0
- package/components/mui_extended/Autocomplete/Autocomplete.js +59 -196
- package/components/mui_extended/Autocomplete/Autocomplete.styles.js +27 -16
- package/components/mui_extended/Autocomplete/hooks/useEndAdornments.d.ts +14 -0
- package/components/mui_extended/Autocomplete/hooks/useEndAdornments.js +47 -0
- package/components/mui_extended/Autocomplete/hooks/useStartAdornments.d.ts +21 -0
- package/components/mui_extended/Autocomplete/hooks/useStartAdornments.js +31 -0
- package/components/mui_extended/Autocomplete/hooks/useValuesAndHandlers.d.ts +23 -0
- package/components/mui_extended/Autocomplete/hooks/useValuesAndHandlers.js +135 -0
- package/components/mui_extended/Autocomplete/icons.d.ts +4 -0
- package/components/mui_extended/Autocomplete/icons.js +7 -0
- package/components/mui_extended/Autocomplete/renderOptions/index.d.ts +7 -2
- package/components/mui_extended/Autocomplete/renderOptions/index.js +7 -6
- package/components/mui_extended/Autocomplete/slots/AutocompleteSlots.js +10 -11
- package/components/mui_extended/Autocomplete/types.d.ts +2 -0
- package/components/mui_extended/CheckBox/CheckBox.js +1 -1
- package/components/mui_extended/CheckBox/slots/CheckBoxSlots.js +2 -2
- package/components/mui_extended/DateTimePicker/slots/DateTimePickerSlots.js +1 -1
- package/components/mui_extended/IconButton/slots/IconButtonSlots.js +1 -1
- package/components/mui_extended/ImageButton/utils/Clases/index.js +1 -1
- package/components/mui_extended/MenuItem/slots/MenuItemSlots.js +1 -1
- package/components/mui_extended/NavLink/NavLink.js +1 -1
- package/components/mui_extended/NavLink/constants.js +2 -2
- package/components/mui_extended/NavLink/slots/NavLinkSlots.js +1 -1
- package/components/mui_extended/Popover/Popover.js +1 -1
- package/components/mui_extended/Popover/Popover.styles.js +1 -5
- package/components/mui_extended/Popover/constants.js +2 -2
- package/components/mui_extended/Select/Select.js +1 -1
- package/components/mui_extended/Select/Select.styles.js +1 -1
- package/components/mui_extended/Select/constants.js +1 -1
- package/components/mui_extended/Select/slots/SelectSlots.js +1 -1
- package/components/mui_extended/Tab/Tab.js +1 -1
- package/components/mui_extended/TextField/constants.js +1 -1
- package/components/mui_extended/Tooltip/Tooltip.js +2 -2
- package/components/mui_extended/Tooltip/slots/TooltipSlots.js +2 -2
- package/components/mui_extended/Typography/Typography.js +1 -1
- package/components/mui_extended/Typography/constants.js +3 -3
- package/components/mui_extended/Typography/slots/typographySlots.js +1 -1
- package/components/popups/components/PopupsViewer/icons.js +0 -1
- package/hooks/useDataGridPersistence/constants.js +2 -2
- package/hooks/useDataGridPersistence/useDataGridPersistence.js +1 -1
- package/hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js +13 -10
- package/hooks/useSvgColor/constants.js +2 -2
- package/hooks/useSvgColor/helpers.js +1 -1
- package/hooks/useSvgColor/useSvgColor.js +1 -1
- package/index.js +14 -12
- package/mockServiceWorker.js +1 -1
- package/package.json +1 -1
- package/storybook/components/extended/mui/Autocomplete/AutoComple.stories.d.ts +1 -0
- package/storybook/hook-form/RHFAutocomplete/RHFAutocomplete.stories.d.ts +8 -6
- package/storybook/hook-form/RHFAutocomplete/constants.d.ts +23 -0
- package/storybook/hook-form/RHFAutocompleteAsync/RHFAutocompleteAsync.stories.d.ts +11 -4
- package/storybook/hook-form/RHFAutocompleteAsync/constants.d.ts +10 -1
- package/storybook/hook-form/RHFAutocompleteAsync/handlers.d.ts +1 -0
- package/components/hook-form/RHFAutocomplete/oldTypes.d.ts +0 -43
- /package/components/hook-form/RHFAutocomplete/{RHFAutocomplete.test.d.ts → tests/RHFAutocomplete.test.d.ts} +0 -0
package/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { A as A2 } from "./components/animate/AnimatedScroll/animatedScroll.js";
|
|
|
9
9
|
import { v } from "./components/animate/variants/fade.js";
|
|
10
10
|
import { v as v2 } from "./components/animate/variants/bounce.js";
|
|
11
11
|
import { v as v3 } from "./components/animate/variants/container.js";
|
|
12
|
-
import { v as v4,
|
|
12
|
+
import { a, v as v4, b } from "./components/animate/variants/transition.js";
|
|
13
13
|
import { A as A3 } from "./components/AppBar/AppBar.js";
|
|
14
14
|
import { g as g2 } from "./components/AppBar/dictionary.js";
|
|
15
15
|
import { A as A4 } from "./components/areas/components/AreasAdmin/AreasAdmin.js";
|
|
@@ -34,6 +34,7 @@ import { D as D2 } from "./components/DataGrid/DataGrid.js";
|
|
|
34
34
|
import { g as g5 } from "./components/DataGrid/dictionary.js";
|
|
35
35
|
import { N, T as T2 } from "./components/DataGrid/subcomponents/editors/TextEditor/index.js";
|
|
36
36
|
import { g as g6 } from "./components/DataGrid/utils/getDataGridRowsFromSet.js";
|
|
37
|
+
import { b as b3 } from "./components/DataGrid/constants.js";
|
|
37
38
|
import { C as C2 } from "./components/DataGrid/formatters/ColumnBooleanFormatter/formatter.js";
|
|
38
39
|
import { u as u3 } from "./components/DataGrid/formatters/ColumnBooleanFormatter/useColumnBoolean.js";
|
|
39
40
|
import { C as C3 } from "./components/DataGrid/formatters/ColumnConcatenatedValuesFormatter/formatter.js";
|
|
@@ -120,7 +121,7 @@ import { D as D8 } from "./components/formatters/DistanceToNowFormatter/Distance
|
|
|
120
121
|
import { g as g18 } from "./components/formatters/dictionary.js";
|
|
121
122
|
import { G } from "./components/GridLayout/GridLayout.js";
|
|
122
123
|
import { R as R3 } from "./components/GridLayout/subcomponents/Responsive/index.js";
|
|
123
|
-
import { c as c2, d as d3
|
|
124
|
+
import { c as c2, e, d as d3 } from "./components/GridLayout/subcomponents/Responsive/responsiveUtils.js";
|
|
124
125
|
import { i, k } from "./components/GridLayout/utils.js";
|
|
125
126
|
import { w } from "./components/GridLayout/subcomponents/withSizeProvider/index.js";
|
|
126
127
|
import { H as H2 } from "./components/HelmetPage/index.js";
|
|
@@ -198,7 +199,7 @@ import { u as u23 } from "./hooks/useInterval/index.js";
|
|
|
198
199
|
import { u as u24 } from "./hooks/useComponentSize/useComponentSize.js";
|
|
199
200
|
import { u as u25 } from "./hooks/useFormReadyForUpdate/index.js";
|
|
200
201
|
import { u as u26 } from "./hooks/useStateRef/index.js";
|
|
201
|
-
import {
|
|
202
|
+
import { S as S9 } from "./hooks/useSvgColor/constants.js";
|
|
202
203
|
import { u as u27 } from "./hooks/useSvgColor/useSvgColor.js";
|
|
203
204
|
import { u as u28 } from "./hooks/useDynamicFilterAndSort/useDynamicFilterAndSort.js";
|
|
204
205
|
import { u as u29 } from "./hooks/useDataGridPersistence/useDataGridPersistence.js";
|
|
@@ -209,9 +210,9 @@ import { g as g30 } from "./utils/getComponentUtilityClass.js";
|
|
|
209
210
|
import { g as g31 } from "./utils/getPaletteColor.js";
|
|
210
211
|
import { g as g32 } from "./utils/getTypographyStyles.js";
|
|
211
212
|
import { g as g33 } from "./utils/getIconColor.js";
|
|
212
|
-
import { a as
|
|
213
|
+
import { a as a14 } from "./utils/getSizeStyles/getSizeStyles.js";
|
|
213
214
|
import { O as O2 } from "./utils/ObjectQueue.js";
|
|
214
|
-
import { g as g34, a as
|
|
215
|
+
import { g as g34, a as a15 } from "./utils/getComponentSlotRoot.js";
|
|
215
216
|
import { f } from "./utils/formatDistanceToNow/formatDistanteToNow.js";
|
|
216
217
|
import { g as g35 } from "./utils/getValidDate.js";
|
|
217
218
|
import { g as g36 } from "./utils/getNullGuard.js";
|
|
@@ -256,6 +257,7 @@ export {
|
|
|
256
257
|
C10 as ColumnSetCheckFormatter,
|
|
257
258
|
C11 as ColumnUncertaintyFormatter,
|
|
258
259
|
C15 as ConcatenatedFormatter,
|
|
260
|
+
b3 as DATAGRID_SEMANTIC_WIDTHS,
|
|
259
261
|
D as DICTIONARY,
|
|
260
262
|
D2 as DataGrid,
|
|
261
263
|
D7 as DateFormatter,
|
|
@@ -339,7 +341,7 @@ export {
|
|
|
339
341
|
R as Resizable,
|
|
340
342
|
R2 as ResizableBox,
|
|
341
343
|
R3 as Responsive,
|
|
342
|
-
|
|
344
|
+
S9 as SKELETON_SVG_ICON,
|
|
343
345
|
S7 as ScrollBar,
|
|
344
346
|
S as SectionCommercial,
|
|
345
347
|
S6 as SelectStyled,
|
|
@@ -375,9 +377,9 @@ export {
|
|
|
375
377
|
W2 as WindowToolsMFContext,
|
|
376
378
|
a10 as WindowToolsMFProvider,
|
|
377
379
|
c2 as addLayoutItemToBreakPointIfNoExists,
|
|
378
|
-
|
|
380
|
+
e as addLayoutItemToBreakPoints,
|
|
379
381
|
c4 as capitalizeFirstLetter,
|
|
380
|
-
|
|
382
|
+
d3 as cloneLayouts,
|
|
381
383
|
c3 as createDynamicMFStore,
|
|
382
384
|
c as createToaster,
|
|
383
385
|
d as defaultCommonActionsDictionary,
|
|
@@ -389,7 +391,7 @@ export {
|
|
|
389
391
|
g3 as getAreasDictionary,
|
|
390
392
|
g4 as getCommonActionsDictionary,
|
|
391
393
|
g34 as getComponentClasses,
|
|
392
|
-
|
|
394
|
+
a15 as getComponentSlotRoot,
|
|
393
395
|
g30 as getComponentUtilityClass,
|
|
394
396
|
g5 as getDataGridComponentsDictionary,
|
|
395
397
|
g6 as getDataGridRowsFromSet,
|
|
@@ -403,7 +405,7 @@ export {
|
|
|
403
405
|
g14 as getFormatPoints,
|
|
404
406
|
g16 as getFormatPrice,
|
|
405
407
|
g18 as getFormattersComponentsDictionary,
|
|
406
|
-
|
|
408
|
+
a14 as getHeightSizeStyles,
|
|
407
409
|
g33 as getIconColor,
|
|
408
410
|
g8 as getIsIfInDynamicFilter,
|
|
409
411
|
g22 as getLoadingErrorComponentsDictionary,
|
|
@@ -465,8 +467,8 @@ export {
|
|
|
465
467
|
v2 as varBounce,
|
|
466
468
|
v3 as varContainer,
|
|
467
469
|
v as varFade,
|
|
468
|
-
|
|
469
|
-
|
|
470
|
+
a as varTranEnter,
|
|
471
|
+
v4 as varTranExit,
|
|
470
472
|
b as varTranHover,
|
|
471
473
|
w as withSizeProvider
|
|
472
474
|
};
|
package/mockServiceWorker.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Please do NOT serve this file on production.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
const PACKAGE_VERSION = '2.
|
|
11
|
+
const PACKAGE_VERSION = '2.8.2'
|
|
12
12
|
const INTEGRITY_CHECKSUM = '00729d72e3b82faf54ca8b9621dbb96f'
|
|
13
13
|
const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')
|
|
14
14
|
const activeClientIds = new Set()
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
import { RHFAutocompleteProps } from '../../../src/components/hook-form/RHFAutocomplete/types';
|
|
3
|
-
|
|
4
|
-
id: number;
|
|
5
|
-
label: string;
|
|
6
|
-
imageUrl?: string;
|
|
7
|
-
};
|
|
3
|
+
import { OptionType } from './constants';
|
|
8
4
|
declare const meta: Meta<RHFAutocompleteProps<OptionType>>;
|
|
9
5
|
export default meta;
|
|
10
6
|
type Story = StoryObj<RHFAutocompleteProps<OptionType>>;
|
|
11
7
|
export declare const Default: Story;
|
|
12
|
-
export declare const
|
|
8
|
+
export declare const InitialNull: Story;
|
|
9
|
+
/**
|
|
10
|
+
* Preselected Option With not Options
|
|
11
|
+
*/
|
|
12
|
+
export declare const PreselectedOptionNotOptions: Story;
|
|
13
|
+
export declare const Multiple: Story;
|
|
14
|
+
export declare const MultiplePreselected: Story;
|
|
13
15
|
export declare const WithImages: Story;
|
|
14
16
|
export declare const LoadingState: Story;
|
|
15
17
|
export declare const Disabled: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const FIELD_NAME_INITIAL_NULL = "rhf-autocomplete-initial-null";
|
|
2
|
+
export declare const FIELD_NAME_REQUIRED = "rhf-autocomplete";
|
|
3
|
+
export declare const FIELD_NAME_PRESELECTED = "rhf-autocomplete-preselected";
|
|
4
|
+
export declare const FIELD_NAME_PRESELECTED_NOT_IN_OPTIONS = "rhf-autocomplete-preselected-not-in-options";
|
|
5
|
+
export declare const FIELD_NAME_PRESELECTED_MULTIPLE = "rhf-autocomplete-preselected-multiple";
|
|
6
|
+
export declare const FIELD_NAME_PRESELECTED_MULTIPLE_NOT_IN_OPTIONS = "rhf-autocomplete-preselected-multiple-not-in-options";
|
|
7
|
+
export type OptionType = {
|
|
8
|
+
id: number;
|
|
9
|
+
label: string;
|
|
10
|
+
imageUrl?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const RHFAUTOCOMPLETE_OPTIONS_MOCK: OptionType[];
|
|
13
|
+
export declare const RHFAUTOCOMPLETE_OPTIONS_WITH_IMAGES_MOCK: OptionType[];
|
|
14
|
+
export declare const VALIDATION_SCHEMA: import('yup/lib/object').OptionalObjectSchema<{
|
|
15
|
+
"rhf-autocomplete": import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
16
|
+
}, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<{
|
|
17
|
+
"rhf-autocomplete": import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
18
|
+
}>>;
|
|
19
|
+
export declare const INITIAL_VALUES: {
|
|
20
|
+
"rhf-autocomplete-initial-null": null;
|
|
21
|
+
"rhf-autocomplete-preselected": OptionType;
|
|
22
|
+
"rhf-autocomplete-preselected-multiple": OptionType[];
|
|
23
|
+
};
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import {
|
|
2
|
+
import { RHFAutocompleteAsyncProps } from '../../../src/components/hook-form/RHFAutocompleteAsync/types';
|
|
3
3
|
type OptionType = {
|
|
4
4
|
id: number;
|
|
5
5
|
name: string;
|
|
6
6
|
};
|
|
7
|
-
declare const meta: Meta<
|
|
7
|
+
declare const meta: Meta<RHFAutocompleteAsyncProps<OptionType>>;
|
|
8
8
|
export default meta;
|
|
9
|
-
type Story = StoryObj<
|
|
9
|
+
type Story = StoryObj<RHFAutocompleteAsyncProps<OptionType>>;
|
|
10
10
|
export declare const Default: Story;
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const PreselectedOption: Story;
|
|
12
|
+
/**
|
|
13
|
+
* Preselected Option Not Loaded In Options when combo open
|
|
14
|
+
*/
|
|
15
|
+
export declare const PreselectedOptionNotLoadedInOptions: Story;
|
|
16
|
+
export declare const Multiple: Story;
|
|
17
|
+
export declare const MultiplePreselected: Story;
|
|
18
|
+
export declare const MultiplePreselectedNotLoadedInOptions: Story;
|
|
12
19
|
export declare const WithCustomFiltering: Story;
|
|
13
20
|
export declare const LoadingState: Story;
|
|
14
21
|
export declare const Disabled: Story;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
export declare const FIELD_NAME_REQUIRED = "rhf-autocomplete-async";
|
|
2
|
+
export declare const FIELD_NAME_PRESELECTED = "rhf-autocomplete-async-preselected";
|
|
3
|
+
export declare const FIELD_NAME_PRESELECTED_NOT_IN_OPTIONS = "rhf-autocomplete-async-preselected-not-in-options";
|
|
4
|
+
export declare const FIELD_NAME_PRESELECTED_MULTIPLE = "rhf-autocomplete-async-preselected-multiple";
|
|
5
|
+
export declare const FIELD_NAME_PRESELECTED_MULTIPLE_NOT_IN_OPTIONS = "rhf-autocomplete-async-preselected-multiple-not-in-options";
|
|
1
6
|
export declare const RHFAUTOCOMPLETEASYNC_MSW_MOCK: {
|
|
2
7
|
id: number;
|
|
3
8
|
name: string;
|
|
4
9
|
}[];
|
|
5
|
-
export declare const
|
|
10
|
+
export declare const VALIDATION_SCHEMA: import('yup/lib/object').OptionalObjectSchema<{
|
|
11
|
+
"rhf-autocomplete-async": import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
12
|
+
}, import('yup/lib/object').AnyObject, import('yup/lib/object').TypeOfShape<{
|
|
13
|
+
"rhf-autocomplete-async": import('yup/lib/string').RequiredStringSchema<string | undefined, import('yup/lib/types').AnyObject>;
|
|
14
|
+
}>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MSW_HANDLERS: import('msw').HttpHandler[];
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { AutocompleteCloseReason, AutocompleteInputChangeReason, TextFieldProps } from '@mui/material';
|
|
2
|
-
import { LabelProps } from '../../Label/types';
|
|
3
|
-
export type GetOptionString<T> = (option: T | null) => string;
|
|
4
|
-
export type RHFAutocompleteVariants = 'info' | 'success' | 'warning';
|
|
5
|
-
export type ImageProps<T> = (RHFAutocompleteTypeImageProps<T> & {
|
|
6
|
-
imageScale?: boolean;
|
|
7
|
-
imageRepeat?: never;
|
|
8
|
-
}) | (RHFAutocompleteTypeImageProps<T> & {
|
|
9
|
-
imageRepeat: boolean;
|
|
10
|
-
imageScale?: never;
|
|
11
|
-
});
|
|
12
|
-
export interface RHFAutocompleteBaseProps<T> extends Omit<TextFieldProps, 'label' | 'variant' | 'helperText'>, Omit<LabelProps, 'label'> {
|
|
13
|
-
name: string;
|
|
14
|
-
options: Array<T>;
|
|
15
|
-
getOptionLabel: (option: T) => string;
|
|
16
|
-
isOptionEqualToValue: (option: T, value: T) => boolean;
|
|
17
|
-
skeletonWidth?: string | number;
|
|
18
|
-
skeletonHeight?: string | number;
|
|
19
|
-
loading?: boolean;
|
|
20
|
-
refresh?: () => void;
|
|
21
|
-
label?: string;
|
|
22
|
-
variant?: RHFAutocompleteVariants;
|
|
23
|
-
helperMessage?: string;
|
|
24
|
-
onOpen?: (event: React.SyntheticEvent) => void;
|
|
25
|
-
onClose?: (event: React.SyntheticEvent, reason: AutocompleteCloseReason) => void;
|
|
26
|
-
onChangeFilterParmsLocal?: (newValue: string, reason: AutocompleteInputChangeReason) => void;
|
|
27
|
-
multiple?: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface RHFAutocompleteTypeTextProps {
|
|
30
|
-
type: 'text';
|
|
31
|
-
}
|
|
32
|
-
export interface RHFAutocompleteTypeImageProps<T> {
|
|
33
|
-
type: 'image';
|
|
34
|
-
getOptionUrlImage: (option: T) => string;
|
|
35
|
-
}
|
|
36
|
-
export type RHFAutocompleteProps<T> = (RHFAutocompleteBaseProps<T> & ImageProps<T>) | (RHFAutocompleteBaseProps<T> & RHFAutocompleteTypeTextProps);
|
|
37
|
-
export interface OwnerState extends Pick<RHFAutocompleteProps<any>, 'size' | 'disabled'>, Pick<ImageProps<any>, 'imageScale' | 'imageRepeat'> {
|
|
38
|
-
isFocus: boolean;
|
|
39
|
-
isTabSelected: boolean;
|
|
40
|
-
semantics: RHFAutocompleteVariants | 'error' | null;
|
|
41
|
-
variant?: 'withImage';
|
|
42
|
-
multiple: boolean;
|
|
43
|
-
}
|
|
File without changes
|