@dartech/arsenal-ui 1.4.85 → 1.4.86
Sign up to get free protection for your applications and to get access to all the features.
- package/index.d.ts +5 -5
- package/index.esm.d.ts +1 -0
- package/index.esm.js +1 -0
- package/package.json +4 -10
- package/src/consts/index.d.ts +14 -14
- package/src/interfaces/common.d.ts +24 -24
- package/src/interfaces/definition.d.ts +142 -142
- package/src/interfaces/index.d.ts +3 -3
- package/src/interfaces/ui.d.ts +73 -73
- package/src/lib/Alert/Alert.d.ts +55 -55
- package/src/lib/Alert/index.d.ts +1 -1
- package/src/lib/Breadcrumbs/Breadcrumbs.d.ts +8 -9
- package/src/lib/Breadcrumbs/Breadcrumbs.styled.d.ts +2 -2
- package/src/lib/Breadcrumbs/index.d.ts +1 -1
- package/src/lib/ContentLayout/ContentLayout.d.ts +10 -10
- package/src/lib/ContentLayout/index.d.ts +1 -1
- package/src/lib/Definition/CreateDefinition/CreateDefinition.d.ts +26 -26
- package/src/lib/Definition/CreateDefinition/index.d.ts +1 -1
- package/src/lib/Definition/DefinitionFiller/DefinitionFiller.d.ts +21 -21
- package/src/lib/Definition/DefinitionFiller/index.d.ts +1 -1
- package/src/lib/Definition/DefinitionValueView/DefinitionValueView.d.ts +7 -8
- package/src/lib/Definition/DefinitionValueView/FileDefinitionValueView.d.ts +7 -8
- package/src/lib/Definition/DefinitionValueView/PropertyDataView.d.ts +8 -9
- package/src/lib/Definition/DefinitionValueView/index.d.ts +1 -1
- package/src/lib/Definition/index.d.ts +3 -3
- package/src/lib/Forms/BackButton.d.ts +6 -7
- package/src/lib/Forms/ControlAceEditor.d.ts +23 -23
- package/src/lib/Forms/ControlArrayInput.d.ts +14 -14
- package/src/lib/Forms/ControlAutocomplete/ControlAutocomplete.d.ts +74 -74
- package/src/lib/Forms/ControlAutocomplete/ControlQueryAutocomplete.d.ts +20 -20
- package/src/lib/Forms/ControlAutocomplete/index.d.ts +2 -2
- package/src/lib/Forms/ControlAutocomplete/useAutocomplete.d.ts +9 -10
- package/src/lib/Forms/ControlCheckbox.d.ts +51 -51
- package/src/lib/Forms/ControlDate.d.ts +26 -26
- package/src/lib/Forms/ControlDateTime.d.ts +26 -26
- package/src/lib/Forms/ControlDebouncedInput.d.ts +3 -4
- package/src/lib/Forms/ControlInput.d.ts +63 -63
- package/src/lib/Forms/ControlNumberInput.d.ts +72 -72
- package/src/lib/Forms/ControlPeriodInput.d.ts +11 -11
- package/src/lib/Forms/ControlPhoneInput.d.ts +17 -17
- package/src/lib/Forms/ControlRadio.d.ts +70 -70
- package/src/lib/Forms/ControlSelect.d.ts +72 -72
- package/src/lib/Forms/ControlSwitch.d.ts +19 -19
- package/src/lib/Forms/ControlTime.d.ts +24 -24
- package/src/lib/Forms/CopyButton.d.ts +19 -20
- package/src/lib/Forms/index.d.ts +17 -17
- package/src/lib/InfoItem/InfoItem.d.ts +7 -8
- package/src/lib/InfoItem/index.d.ts +1 -1
- package/src/lib/JsonPathPicker/JsonPathPicker.d.ts +9 -10
- package/src/lib/JsonPathPicker/PropertyStep.d.ts +10 -11
- package/src/lib/JsonPathPicker/index.d.ts +1 -1
- package/src/lib/JsonView/JsonView.d.ts +9 -9
- package/src/lib/JsonView/index.d.ts +1 -1
- package/src/lib/Loader/Loader.d.ts +21 -22
- package/src/lib/Loader/index.d.ts +1 -1
- package/src/lib/Modals/JsonModalView.d.ts +12 -12
- package/src/lib/Modals/index.d.ts +1 -1
- package/src/lib/OverflowTooltip/OverflowTooltip.d.ts +3 -4
- package/src/lib/OverflowTooltip/index.d.ts +1 -1
- package/src/lib/Property/PropertyFiller/ControlFiller/ControlMultiplePropertyFiller.d.ts +26 -26
- package/src/lib/Property/PropertyFiller/ControlFiller/ControlMultiplePropertyWidget.d.ts +24 -24
- package/src/lib/Property/PropertyFiller/ControlFiller/ControlPropertyFiller.d.ts +26 -26
- package/src/lib/Property/PropertyFiller/ControlFiller/index.d.ts +3 -3
- package/src/lib/Property/PropertyFiller/JsonEditor.d.ts +9 -9
- package/src/lib/Property/PropertyFiller/MultiplePropertyFiller.d.ts +24 -24
- package/src/lib/Property/PropertyFiller/MultiplePropertyWidget.d.ts +22 -22
- package/src/lib/Property/PropertyFiller/PropertyFiller.d.ts +24 -24
- package/src/lib/Property/PropertyFiller/index.d.ts +2 -2
- package/src/lib/Property/PropertyFiller/styled.d.ts +18 -18
- package/src/lib/Property/PropertyFiller/usePropertyFiller.d.ts +26 -26
- package/src/lib/Property/PropertyValidator/NodeValidator.d.ts +5 -6
- package/src/lib/Property/PropertyValidator/NodesList.d.ts +5 -6
- package/src/lib/Property/PropertyValidator/NumericTypeValidator.d.ts +7 -8
- package/src/lib/Property/PropertyValidator/PropertyValidator.d.ts +5 -6
- package/src/lib/Property/PropertyValidator/PropertyValidatorContext.d.ts +3 -3
- package/src/lib/Property/PropertyValidator/StringTypeValidator.d.ts +7 -8
- package/src/lib/Property/PropertyValidator/ValidationNodeSelector.d.ts +6 -7
- package/src/lib/Property/PropertyValidator/index.d.ts +1 -1
- package/src/lib/Property/PropertyWidget/PropertyWidget.d.ts +23 -23
- package/src/lib/Property/PropertyWidget/index.d.ts +1 -1
- package/src/lib/Property/UpsertProperty/CreatePropertiesList/CreatePropertiesList.d.ts +36 -36
- package/src/lib/Property/UpsertProperty/CreatePropertiesList/ListItem.d.ts +29 -29
- package/src/lib/Property/UpsertProperty/CreatePropertiesList/index.d.ts +2 -2
- package/src/lib/Property/UpsertProperty/CreatePropertiesListContext.d.ts +30 -30
- package/src/lib/Property/UpsertProperty/CreatePropertyFormFields.d.ts +24 -24
- package/src/lib/Property/UpsertProperty/CustomPropertyField.d.ts +6 -7
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/BigDecimalPropertyFields.d.ts +7 -8
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/DateAdditionalFields.d.ts +8 -9
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityAdditionalFields.d.ts +22 -22
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/EntityReferencePropertyFields.d.ts +11 -12
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/PropertyAdditionalFields.d.ts +23 -23
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/StringPropertyFields.d.ts +7 -8
- package/src/lib/Property/UpsertProperty/PropertyAdditionalFields/index.d.ts +1 -1
- package/src/lib/Property/UpsertProperty/PropertyValueField/BooleanValueField.d.ts +8 -9
- package/src/lib/Property/UpsertProperty/PropertyValueField/DateTimeValueField.d.ts +8 -9
- package/src/lib/Property/UpsertProperty/PropertyValueField/DateValueField.d.ts +8 -9
- package/src/lib/Property/UpsertProperty/PropertyValueField/FileValueWidget.d.ts +5 -6
- package/src/lib/Property/UpsertProperty/PropertyValueField/JsonValueField.d.ts +7 -8
- package/src/lib/Property/UpsertProperty/PropertyValueField/PropertyValueField.d.ts +23 -23
- package/src/lib/Property/UpsertProperty/PropertyValueField/StringValueField.d.ts +13 -14
- package/src/lib/Property/UpsertProperty/PropertyValueField/TimeValueField.d.ts +8 -9
- package/src/lib/Property/UpsertProperty/PropertyValueField/index.d.ts +1 -1
- package/src/lib/Property/UpsertProperty/index.d.ts +4 -4
- package/src/lib/Property/UpsertProperty/useCustomFields.d.ts +6 -6
- package/src/lib/Property/ViewPropertiesList/ViewPropertiesList.d.ts +7 -8
- package/src/lib/Property/ViewPropertiesList/index.d.ts +1 -1
- package/src/lib/Property/ViewProperty/EntityPropertiesShortView.d.ts +6 -7
- package/src/lib/Property/ViewProperty/EntityPropertiesView.d.ts +8 -8
- package/src/lib/Property/ViewProperty/PropertyDataTable.d.ts +6 -7
- package/src/lib/Property/ViewProperty/PropertyItem.d.ts +8 -9
- package/src/lib/Property/ViewProperty/ViewProperty.d.ts +8 -9
- package/src/lib/Property/ViewProperty/index.d.ts +1 -1
- package/src/lib/Property/index.d.ts +4 -4
- package/src/lib/Sidebar/Sidebar.d.ts +14 -14
- package/src/lib/Sidebar/Sidebar.styled.d.ts +118 -118
- package/src/lib/Sidebar/SidebarContext.d.ts +12 -12
- package/src/lib/Sidebar/SidebarDrawer.d.ts +13 -13
- package/src/lib/Sidebar/SidebarLink/MenuIcon.d.ts +6 -7
- package/src/lib/Sidebar/SidebarLink/SidebarLink.d.ts +7 -8
- package/src/lib/Sidebar/SidebarLink/SidebarLinkItem.d.ts +8 -9
- package/src/lib/Sidebar/SidebarLink/SidebarNestedItem.d.ts +10 -11
- package/src/lib/Sidebar/SidebarLink/SidebarRootItem.d.ts +10 -11
- package/src/lib/Sidebar/SidebarLink/index.d.ts +2 -2
- package/src/lib/Sidebar/index.d.ts +2 -2
- package/src/lib/Status/Status.d.ts +7 -8
- package/src/lib/Status/index.d.ts +1 -1
- package/src/lib/StepperView/StepperView.d.ts +11 -11
- package/src/lib/StepperView/index.d.ts +1 -1
- package/src/lib/Table/DataGrid/DataGrid.styled.d.ts +4 -4
- package/src/lib/Table/DataGrid/JsonTypeCell.d.ts +6 -7
- package/src/lib/Table/DataGrid/Table.d.ts +47 -47
- package/src/lib/Table/DataGrid/TableAction.d.ts +13 -13
- package/src/lib/Table/DataGrid/TableColumnMenu.d.ts +2 -3
- package/src/lib/Table/DataGrid/TablePagination.d.ts +2 -3
- package/src/lib/Table/DataGrid/index.d.ts +2 -2
- package/src/lib/Table/DataGrid/usePagination.d.ts +5 -5
- package/src/lib/Table/DataGrid/useTableQueryPagination.d.ts +11 -11
- package/src/lib/Table/DataGrid/useTableQuerySorting.d.ts +6 -6
- package/src/lib/Table/SimpleTable/SimpleTable.d.ts +19 -19
- package/src/lib/Table/SimpleTable/Table.styled.d.ts +30 -30
- package/src/lib/Table/SimpleTable/TableActionCell.d.ts +10 -10
- package/src/lib/Table/SimpleTable/index.d.ts +2 -2
- package/src/lib/Table/SimpleTable/useTablePagination.d.ts +7 -7
- package/src/lib/Table/SimpleTable/useTableSorting.d.ts +6 -6
- package/src/lib/Table/index.d.ts +2 -2
- package/src/lib/Tabs/RouteTabs.d.ts +11 -11
- package/src/lib/Tabs/TabPanel.d.ts +25 -25
- package/src/lib/Tabs/index.d.ts +2 -2
- package/src/lib/index.d.ts +17 -17
- package/src/theme/baseTheme.d.ts +2 -2
- package/src/theme/index.d.ts +1 -1
- package/src/theme/inputThemeOptions.d.ts +200 -201
- package/src/theme/stepperThemeOptions.d.ts +16 -16
- package/src/theme/tableThemeOptions.d.ts +159 -159
- package/src/theme/typographyThemeOptions.d.ts +29 -29
- package/src/utils/common.d.ts +7 -7
- package/src/utils/dem.d.ts +27 -27
- package/src/utils/hooks.d.ts +7 -7
- package/src/utils/index.d.ts +5 -5
- package/src/utils/test-mocks.d.ts +166 -166
- package/src/utils/ui-utils.d.ts +17 -17
- package/src/utils/validators.d.ts +6 -6
- package/index.js +0 -8486
@@ -1 +1 @@
|
|
1
|
-
export * from './CreateDefinition';
|
1
|
+
export * from './CreateDefinition';
|
@@ -1,21 +1,21 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { EntityReferenceProperty, PropertiesArrayType } from '../../../interfaces';
|
3
|
-
type Props = {
|
4
|
-
properties: PropertiesArrayType;
|
5
|
-
dataFieldName: string;
|
6
|
-
useExpression?: boolean;
|
7
|
-
title?: string;
|
8
|
-
entityReferenceDefinitionSources?: {
|
9
|
-
label: string;
|
10
|
-
value: string;
|
11
|
-
}[];
|
12
|
-
entityReferenceValueComponent?: React.ElementType<{
|
13
|
-
name: string;
|
14
|
-
property: EntityReferenceProperty;
|
15
|
-
}>;
|
16
|
-
fileReferenceValueComponent?: React.ElementType<{
|
17
|
-
name: string;
|
18
|
-
}>;
|
19
|
-
};
|
20
|
-
export declare const DefinitionFiller: ({ properties, dataFieldName, useExpression, title, entityReferenceDefinitionSources, entityReferenceValueComponent, fileReferenceValueComponent, }: Props) => JSX.Element;
|
21
|
-
export default DefinitionFiller;
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { EntityReferenceProperty, PropertiesArrayType } from '../../../interfaces';
|
3
|
+
type Props = {
|
4
|
+
properties: PropertiesArrayType;
|
5
|
+
dataFieldName: string;
|
6
|
+
useExpression?: boolean;
|
7
|
+
title?: string;
|
8
|
+
entityReferenceDefinitionSources?: {
|
9
|
+
label: string;
|
10
|
+
value: string;
|
11
|
+
}[];
|
12
|
+
entityReferenceValueComponent?: React.ElementType<{
|
13
|
+
name: string;
|
14
|
+
property: EntityReferenceProperty;
|
15
|
+
}>;
|
16
|
+
fileReferenceValueComponent?: React.ElementType<{
|
17
|
+
name: string;
|
18
|
+
}>;
|
19
|
+
};
|
20
|
+
export declare const DefinitionFiller: ({ properties, dataFieldName, useExpression, title, entityReferenceDefinitionSources, entityReferenceValueComponent, fileReferenceValueComponent, }: Props) => import("react/jsx-runtime").JSX.Element;
|
21
|
+
export default DefinitionFiller;
|
@@ -1 +1 @@
|
|
1
|
-
export * from './DefinitionFiller';
|
1
|
+
export * from './DefinitionFiller';
|
@@ -1,8 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
export
|
8
|
-
export default DefinitionValueView;
|
1
|
+
import { PropertiesArrayType } from '../../../interfaces';
|
2
|
+
type Props = {
|
3
|
+
properties: PropertiesArrayType<unknown>;
|
4
|
+
data: unknown;
|
5
|
+
};
|
6
|
+
export declare const DefinitionValueView: ({ properties, data }: Props) => import("react/jsx-runtime").JSX.Element;
|
7
|
+
export default DefinitionValueView;
|
@@ -1,8 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
7
|
-
|
8
|
-
export default FileDefinitionValueView;
|
1
|
+
import { FileProperty } from '../../../interfaces';
|
2
|
+
type Props = {
|
3
|
+
property: FileProperty;
|
4
|
+
data: string;
|
5
|
+
};
|
6
|
+
declare const FileDefinitionValueView: ({ property, data }: Props) => import("react/jsx-runtime").JSX.Element;
|
7
|
+
export default FileDefinitionValueView;
|
@@ -1,9 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
};
|
8
|
-
export
|
9
|
-
export default PropertyDataView;
|
1
|
+
import { PropertyUnion } from '../../../interfaces';
|
2
|
+
type Props = {
|
3
|
+
property: PropertyUnion;
|
4
|
+
data: unknown;
|
5
|
+
hasBackground?: boolean;
|
6
|
+
};
|
7
|
+
export declare const PropertyDataView: ({ property, data, hasBackground, }: Props) => import("react/jsx-runtime").JSX.Element;
|
8
|
+
export default PropertyDataView;
|
@@ -1 +1 @@
|
|
1
|
-
export * from './DefinitionValueView';
|
1
|
+
export * from './DefinitionValueView';
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from './CreateDefinition';
|
2
|
-
export * from './DefinitionFiller';
|
3
|
-
export * from './DefinitionValueView';
|
1
|
+
export * from './CreateDefinition';
|
2
|
+
export * from './DefinitionFiller';
|
3
|
+
export * from './DefinitionValueView';
|
@@ -1,7 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
};
|
6
|
-
export
|
7
|
-
export default BackButton;
|
1
|
+
type Props = {
|
2
|
+
text?: string;
|
3
|
+
buttonProps?: Record<string, unknown>;
|
4
|
+
};
|
5
|
+
export declare const BackButton: ({ text, buttonProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
6
|
+
export default BackButton;
|
@@ -1,23 +1,23 @@
|
|
1
|
-
import { ReactCodeMirrorRef } from '@uiw/react-codemirror';
|
2
|
-
import { Control } from 'react-hook-form';
|
3
|
-
import { ReactNode } from 'react';
|
4
|
-
export interface ControlAceEditorProps {
|
5
|
-
name: string;
|
6
|
-
control: Control<any>;
|
7
|
-
mode?: 'json' | 'javascript' | 'python' | 'text';
|
8
|
-
label?: ReactNode;
|
9
|
-
width?: string;
|
10
|
-
height?: string;
|
11
|
-
readOnly?: boolean;
|
12
|
-
required?: boolean;
|
13
|
-
validateJson?: boolean;
|
14
|
-
fontSize?: number;
|
15
|
-
validate?: boolean;
|
16
|
-
hideErrorMessage?: boolean;
|
17
|
-
parseValue?: boolean;
|
18
|
-
requiredErrorText?: string;
|
19
|
-
[key: string]: unknown;
|
20
|
-
useCleanValue?: boolean;
|
21
|
-
}
|
22
|
-
export declare const ControlAceEditor: import("react").ForwardRefExoticComponent<Omit<ControlAceEditorProps, "ref"> & import("react").RefAttributes<ReactCodeMirrorRef>>;
|
23
|
-
export default ControlAceEditor;
|
1
|
+
import { ReactCodeMirrorRef } from '@uiw/react-codemirror';
|
2
|
+
import { Control } from 'react-hook-form';
|
3
|
+
import { ReactNode } from 'react';
|
4
|
+
export interface ControlAceEditorProps {
|
5
|
+
name: string;
|
6
|
+
control: Control<any>;
|
7
|
+
mode?: 'json' | 'javascript' | 'python' | 'text';
|
8
|
+
label?: ReactNode;
|
9
|
+
width?: string;
|
10
|
+
height?: string;
|
11
|
+
readOnly?: boolean;
|
12
|
+
required?: boolean;
|
13
|
+
validateJson?: boolean;
|
14
|
+
fontSize?: number;
|
15
|
+
validate?: boolean;
|
16
|
+
hideErrorMessage?: boolean;
|
17
|
+
parseValue?: boolean;
|
18
|
+
requiredErrorText?: string;
|
19
|
+
[key: string]: unknown;
|
20
|
+
useCleanValue?: boolean;
|
21
|
+
}
|
22
|
+
export declare const ControlAceEditor: import("react").ForwardRefExoticComponent<Omit<ControlAceEditorProps, "ref"> & import("react").RefAttributes<ReactCodeMirrorRef>>;
|
23
|
+
export default ControlAceEditor;
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import { ReactNode } from 'react';
|
2
|
-
import { Control } from 'react-hook-form';
|
3
|
-
import { TextFieldProps } from '@mui/material/TextField';
|
4
|
-
type Props = TextFieldProps & {
|
5
|
-
name: string;
|
6
|
-
control: Control<any>;
|
7
|
-
label: ReactNode;
|
8
|
-
required?: boolean;
|
9
|
-
defaultValue?: [] | null;
|
10
|
-
onChange?: any;
|
11
|
-
textFieldLabel?: string;
|
12
|
-
};
|
13
|
-
export declare const ControlArrayInput: ({ name, control, label, required, defaultValue, onChange: customOnChange, textFieldLabel, ...textFieldProps }: Props) => JSX.Element;
|
14
|
-
export {};
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { Control } from 'react-hook-form';
|
3
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
4
|
+
type Props = TextFieldProps & {
|
5
|
+
name: string;
|
6
|
+
control: Control<any>;
|
7
|
+
label: ReactNode;
|
8
|
+
required?: boolean;
|
9
|
+
defaultValue?: [] | null;
|
10
|
+
onChange?: any;
|
11
|
+
textFieldLabel?: string;
|
12
|
+
};
|
13
|
+
export declare const ControlArrayInput: ({ name, control, label, required, defaultValue, onChange: customOnChange, textFieldLabel, ...textFieldProps }: Props) => import("react/jsx-runtime").JSX.Element;
|
14
|
+
export {};
|
@@ -1,74 +1,74 @@
|
|
1
|
-
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
2
|
-
import { TextFieldProps } from '@mui/material/TextField';
|
3
|
-
import { InputProps } from '@mui/material/Input';
|
4
|
-
import { Control } from 'react-hook-form';
|
5
|
-
import { ReactNode } from 'react';
|
6
|
-
import { ValidateFunc } from '../../../interfaces';
|
7
|
-
/**
|
8
|
-
* This interface is referencing the [[ControlAutocomplete]] component props.
|
9
|
-
* @category Forms
|
10
|
-
*/
|
11
|
-
export type ControlAutocompleteProps = Omit<AutocompleteProps<unknown, boolean, boolean, boolean, React.ElementType<any>>, 'renderInput'> & {
|
12
|
-
/**
|
13
|
-
* React Hook Form control `name` propery
|
14
|
-
*/
|
15
|
-
name: string;
|
16
|
-
/**
|
17
|
-
* Label for MUI TextField select component
|
18
|
-
*/
|
19
|
-
label?: ReactNode;
|
20
|
-
/**
|
21
|
-
* React Hook Form `control`
|
22
|
-
*/
|
23
|
-
control: Control<any>;
|
24
|
-
/**
|
25
|
-
* Is input required flag
|
26
|
-
*/
|
27
|
-
required?: boolean;
|
28
|
-
/**
|
29
|
-
* React Hook Form `defaultValue`
|
30
|
-
*/
|
31
|
-
defaultValue?: unknown;
|
32
|
-
/**
|
33
|
-
* Is disabled input flag
|
34
|
-
*/
|
35
|
-
disabled?: boolean;
|
36
|
-
/**
|
37
|
-
* React Hook Form validate function
|
38
|
-
* ```typescript
|
39
|
-
* type ValidateFunc = (value: string) => boolean | string;
|
40
|
-
* ```
|
41
|
-
*/
|
42
|
-
validate?: ValidateFunc | Record<string, ValidateFunc>;
|
43
|
-
/**
|
44
|
-
* Hide error message flag
|
45
|
-
*/
|
46
|
-
hideErrorMessage?: boolean;
|
47
|
-
/**
|
48
|
-
* Custom onChange functionƒ
|
49
|
-
*/
|
50
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: unknown) => void;
|
51
|
-
/**
|
52
|
-
* Key for option label
|
53
|
-
*/
|
54
|
-
labelKey?: string;
|
55
|
-
/**
|
56
|
-
* Key for option value
|
57
|
-
*/
|
58
|
-
valueKey?: string;
|
59
|
-
/**
|
60
|
-
* Select options
|
61
|
-
*/
|
62
|
-
options: string[] | unknown[];
|
63
|
-
textFieldProps?: TextFieldProps;
|
64
|
-
useStringValue?: boolean;
|
65
|
-
requiredErrorText?: string;
|
66
|
-
startAdornment?: InputProps['startAdornment'];
|
67
|
-
endAdornment?: InputProps['endAdornment'];
|
68
|
-
};
|
69
|
-
/**
|
70
|
-
* Material UI `Autocomplete` controlled component. Used with react-hook-form
|
71
|
-
* @category Forms
|
72
|
-
*/
|
73
|
-
export declare const ControlAutocomplete: ({ control, validate, name, label, required, defaultValue, disabled, hideErrorMessage, onChange: customOnChange, labelKey, valueKey, options, multiple, textFieldProps, disableCloseOnSelect, useStringValue, requiredErrorText, startAdornment, endAdornment, ...autocompleteProps }: ControlAutocompleteProps) => JSX.Element;
|
74
|
-
export default ControlAutocomplete;
|
1
|
+
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
2
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
3
|
+
import { InputProps } from '@mui/material/Input';
|
4
|
+
import { Control } from 'react-hook-form';
|
5
|
+
import { ReactNode } from 'react';
|
6
|
+
import { ValidateFunc } from '../../../interfaces';
|
7
|
+
/**
|
8
|
+
* This interface is referencing the [[ControlAutocomplete]] component props.
|
9
|
+
* @category Forms
|
10
|
+
*/
|
11
|
+
export type ControlAutocompleteProps = Omit<AutocompleteProps<unknown, boolean, boolean, boolean, React.ElementType<any>>, 'renderInput'> & {
|
12
|
+
/**
|
13
|
+
* React Hook Form control `name` propery
|
14
|
+
*/
|
15
|
+
name: string;
|
16
|
+
/**
|
17
|
+
* Label for MUI TextField select component
|
18
|
+
*/
|
19
|
+
label?: ReactNode;
|
20
|
+
/**
|
21
|
+
* React Hook Form `control`
|
22
|
+
*/
|
23
|
+
control: Control<any>;
|
24
|
+
/**
|
25
|
+
* Is input required flag
|
26
|
+
*/
|
27
|
+
required?: boolean;
|
28
|
+
/**
|
29
|
+
* React Hook Form `defaultValue`
|
30
|
+
*/
|
31
|
+
defaultValue?: unknown;
|
32
|
+
/**
|
33
|
+
* Is disabled input flag
|
34
|
+
*/
|
35
|
+
disabled?: boolean;
|
36
|
+
/**
|
37
|
+
* React Hook Form validate function
|
38
|
+
* ```typescript
|
39
|
+
* type ValidateFunc = (value: string) => boolean | string;
|
40
|
+
* ```
|
41
|
+
*/
|
42
|
+
validate?: ValidateFunc | Record<string, ValidateFunc>;
|
43
|
+
/**
|
44
|
+
* Hide error message flag
|
45
|
+
*/
|
46
|
+
hideErrorMessage?: boolean;
|
47
|
+
/**
|
48
|
+
* Custom onChange functionƒ
|
49
|
+
*/
|
50
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>, value: unknown) => void;
|
51
|
+
/**
|
52
|
+
* Key for option label
|
53
|
+
*/
|
54
|
+
labelKey?: string;
|
55
|
+
/**
|
56
|
+
* Key for option value
|
57
|
+
*/
|
58
|
+
valueKey?: string;
|
59
|
+
/**
|
60
|
+
* Select options
|
61
|
+
*/
|
62
|
+
options: string[] | unknown[];
|
63
|
+
textFieldProps?: TextFieldProps;
|
64
|
+
useStringValue?: boolean;
|
65
|
+
requiredErrorText?: string;
|
66
|
+
startAdornment?: InputProps['startAdornment'];
|
67
|
+
endAdornment?: InputProps['endAdornment'];
|
68
|
+
};
|
69
|
+
/**
|
70
|
+
* Material UI `Autocomplete` controlled component. Used with react-hook-form
|
71
|
+
* @category Forms
|
72
|
+
*/
|
73
|
+
export declare const ControlAutocomplete: ({ control, validate, name, label, required, defaultValue, disabled, hideErrorMessage, onChange: customOnChange, labelKey, valueKey, options, multiple, textFieldProps, disableCloseOnSelect, useStringValue, requiredErrorText, startAdornment, endAdornment, ...autocompleteProps }: ControlAutocompleteProps) => import("react/jsx-runtime").JSX.Element;
|
74
|
+
export default ControlAutocomplete;
|
@@ -1,20 +1,20 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
3
|
-
import { ControlAutocompleteProps } from './ControlAutocomplete';
|
4
|
-
import { PaginateData } from '../../../interfaces';
|
5
|
-
type PaginateParams = {
|
6
|
-
page: string;
|
7
|
-
size: string;
|
8
|
-
[key: string]: string;
|
9
|
-
};
|
10
|
-
type ControlQueryAutocompleteProps<T> = Omit<ControlAutocompleteProps, 'options'> & {
|
11
|
-
searchBy: string;
|
12
|
-
mongoQueryJson?: any;
|
13
|
-
sortBy?: string;
|
14
|
-
queryFunction: (params: PaginateParams) => Promise<PaginateData<T>>;
|
15
|
-
itemQueryFunction?: (valueKey: string) => Promise<T>;
|
16
|
-
requiredErrorText?: string;
|
17
|
-
renderInput?: AutocompleteProps<unknown, boolean, boolean, boolean, React.ElementType<any>>['renderInput'];
|
18
|
-
};
|
19
|
-
export declare function ControlQueryAutocomplete<T>({ name, label, control, required, searchBy, labelKey, multiple, mongoQueryJson, disabled, valueKey, sortBy, hideErrorMessage, disableCloseOnSelect, textFieldProps, onChange, queryFunction, validate, itemQueryFunction, requiredErrorText, startAdornment, endAdornment, ...autocompleteProps }: ControlQueryAutocompleteProps<T>): JSX.Element;
|
20
|
-
export default ControlQueryAutocomplete;
|
1
|
+
import React from 'react';
|
2
|
+
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
3
|
+
import { ControlAutocompleteProps } from './ControlAutocomplete';
|
4
|
+
import { PaginateData } from '../../../interfaces';
|
5
|
+
type PaginateParams = {
|
6
|
+
page: string;
|
7
|
+
size: string;
|
8
|
+
[key: string]: string;
|
9
|
+
};
|
10
|
+
type ControlQueryAutocompleteProps<T> = Omit<ControlAutocompleteProps, 'options'> & {
|
11
|
+
searchBy: string;
|
12
|
+
mongoQueryJson?: any;
|
13
|
+
sortBy?: string;
|
14
|
+
queryFunction: (params: PaginateParams) => Promise<PaginateData<T>>;
|
15
|
+
itemQueryFunction?: (valueKey: string) => Promise<T>;
|
16
|
+
requiredErrorText?: string;
|
17
|
+
renderInput?: AutocompleteProps<unknown, boolean, boolean, boolean, React.ElementType<any>>['renderInput'];
|
18
|
+
};
|
19
|
+
export declare function ControlQueryAutocomplete<T>({ name, label, control, required, searchBy, labelKey, multiple, mongoQueryJson, disabled, valueKey, sortBy, hideErrorMessage, disableCloseOnSelect, textFieldProps, onChange, queryFunction, validate, itemQueryFunction, requiredErrorText, startAdornment, endAdornment, ...autocompleteProps }: ControlQueryAutocompleteProps<T>): import("react/jsx-runtime").JSX.Element;
|
20
|
+
export default ControlQueryAutocomplete;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './ControlAutocomplete';
|
2
|
-
export * from './ControlQueryAutocomplete';
|
1
|
+
export * from './ControlAutocomplete';
|
2
|
+
export * from './ControlQueryAutocomplete';
|
@@ -1,10 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
export default useAutocomplete;
|
1
|
+
declare const useAutocomplete: ({ valueKey, labelKey }: {
|
2
|
+
valueKey: any;
|
3
|
+
labelKey: any;
|
4
|
+
}) => {
|
5
|
+
isOptionEqualToValue: (option: any, value: any) => boolean;
|
6
|
+
getOptionLabel: (option: any) => string;
|
7
|
+
renderOption: (props: any, option: any) => import("react/jsx-runtime").JSX.Element;
|
8
|
+
};
|
9
|
+
export default useAutocomplete;
|
@@ -1,51 +1,51 @@
|
|
1
|
-
import { CheckboxProps } from '@mui/material/Checkbox';
|
2
|
-
import { ReactNode } from 'react';
|
3
|
-
import { Control } from 'react-hook-form';
|
4
|
-
import { ValidateFunc } from '../../interfaces';
|
5
|
-
/**
|
6
|
-
* This interface is referencing the [[ControlCheckbox]] component props.
|
7
|
-
* @category Forms
|
8
|
-
*/
|
9
|
-
export type ControlCheckboxProps = CheckboxProps & {
|
10
|
-
/**
|
11
|
-
* React Hook Form control `name` propery
|
12
|
-
*/
|
13
|
-
name: string;
|
14
|
-
/**
|
15
|
-
* Label for MUI TextField component
|
16
|
-
*/
|
17
|
-
label?: ReactNode;
|
18
|
-
/**
|
19
|
-
* React Hook Form `control`
|
20
|
-
*/
|
21
|
-
control: Control<any>;
|
22
|
-
/**
|
23
|
-
* React Hook Form `defaultValue`
|
24
|
-
*/
|
25
|
-
defaultValue?: boolean;
|
26
|
-
/**
|
27
|
-
* Is disabled input flag
|
28
|
-
*/
|
29
|
-
disabled?: boolean;
|
30
|
-
/**
|
31
|
-
* React Hook Form validate function
|
32
|
-
* ```typescript
|
33
|
-
* type ValidateFunc = (value: string) => boolean | string;
|
34
|
-
* ```
|
35
|
-
*/
|
36
|
-
validate?: ValidateFunc | Record<string, ValidateFunc>;
|
37
|
-
/**
|
38
|
-
* Hide error message flag
|
39
|
-
*/
|
40
|
-
hideErrorMessage?: boolean;
|
41
|
-
/**
|
42
|
-
* Custom onChange functionƒ
|
43
|
-
*/
|
44
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
45
|
-
};
|
46
|
-
/**
|
47
|
-
* Material UI `Checkbox` controlled component. Used with react-hook-form
|
48
|
-
* @category Forms
|
49
|
-
*/
|
50
|
-
export declare const ControlCheckbox: ({ control, validate, name, label, required, defaultValue, disabled, hideErrorMessage, onChange: customOnChange, ...checkboxProps }: ControlCheckboxProps) => JSX.Element;
|
51
|
-
export default ControlCheckbox;
|
1
|
+
import { CheckboxProps } from '@mui/material/Checkbox';
|
2
|
+
import { ReactNode } from 'react';
|
3
|
+
import { Control } from 'react-hook-form';
|
4
|
+
import { ValidateFunc } from '../../interfaces';
|
5
|
+
/**
|
6
|
+
* This interface is referencing the [[ControlCheckbox]] component props.
|
7
|
+
* @category Forms
|
8
|
+
*/
|
9
|
+
export type ControlCheckboxProps = CheckboxProps & {
|
10
|
+
/**
|
11
|
+
* React Hook Form control `name` propery
|
12
|
+
*/
|
13
|
+
name: string;
|
14
|
+
/**
|
15
|
+
* Label for MUI TextField component
|
16
|
+
*/
|
17
|
+
label?: ReactNode;
|
18
|
+
/**
|
19
|
+
* React Hook Form `control`
|
20
|
+
*/
|
21
|
+
control: Control<any>;
|
22
|
+
/**
|
23
|
+
* React Hook Form `defaultValue`
|
24
|
+
*/
|
25
|
+
defaultValue?: boolean;
|
26
|
+
/**
|
27
|
+
* Is disabled input flag
|
28
|
+
*/
|
29
|
+
disabled?: boolean;
|
30
|
+
/**
|
31
|
+
* React Hook Form validate function
|
32
|
+
* ```typescript
|
33
|
+
* type ValidateFunc = (value: string) => boolean | string;
|
34
|
+
* ```
|
35
|
+
*/
|
36
|
+
validate?: ValidateFunc | Record<string, ValidateFunc>;
|
37
|
+
/**
|
38
|
+
* Hide error message flag
|
39
|
+
*/
|
40
|
+
hideErrorMessage?: boolean;
|
41
|
+
/**
|
42
|
+
* Custom onChange functionƒ
|
43
|
+
*/
|
44
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
45
|
+
};
|
46
|
+
/**
|
47
|
+
* Material UI `Checkbox` controlled component. Used with react-hook-form
|
48
|
+
* @category Forms
|
49
|
+
*/
|
50
|
+
export declare const ControlCheckbox: ({ control, validate, name, label, required, defaultValue, disabled, hideErrorMessage, onChange: customOnChange, ...checkboxProps }: ControlCheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
51
|
+
export default ControlCheckbox;
|
@@ -1,26 +1,26 @@
|
|
1
|
-
import { ReactNode } from 'react';
|
2
|
-
import { TextFieldProps } from '@mui/material/TextField';
|
3
|
-
import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
|
4
|
-
import { Control, Validate } from 'react-hook-form';
|
5
|
-
type ControlDateProps = Partial<DatePickerProps<unknown, unknown>> & {
|
6
|
-
/**
|
7
|
-
* React Hook Form `control`
|
8
|
-
*/
|
9
|
-
control: Control<any>;
|
10
|
-
/**
|
11
|
-
* Is input required flag
|
12
|
-
*/
|
13
|
-
required?: boolean;
|
14
|
-
name: string;
|
15
|
-
label?: ReactNode;
|
16
|
-
format?: string;
|
17
|
-
placeholder?: string;
|
18
|
-
hideErrorMessage?: boolean;
|
19
|
-
textFieldProps?: TextFieldProps;
|
20
|
-
requiredErrorText?: string;
|
21
|
-
validate?: Validate<any, any>;
|
22
|
-
validateErrorText?: string;
|
23
|
-
defaultValue?: string;
|
24
|
-
};
|
25
|
-
export declare const ControlDate: ({ control, name, required, label, placeholder, defaultValue, format, hideErrorMessage, textFieldProps, requiredErrorText, validate, validateErrorText, ...datePickerProps }: ControlDateProps) => JSX.Element;
|
26
|
-
export default ControlDate;
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
3
|
+
import { DatePickerProps } from '@mui/x-date-pickers/DatePicker';
|
4
|
+
import { Control, Validate } from 'react-hook-form';
|
5
|
+
type ControlDateProps = Partial<DatePickerProps<unknown, unknown>> & {
|
6
|
+
/**
|
7
|
+
* React Hook Form `control`
|
8
|
+
*/
|
9
|
+
control: Control<any>;
|
10
|
+
/**
|
11
|
+
* Is input required flag
|
12
|
+
*/
|
13
|
+
required?: boolean;
|
14
|
+
name: string;
|
15
|
+
label?: ReactNode;
|
16
|
+
format?: string;
|
17
|
+
placeholder?: string;
|
18
|
+
hideErrorMessage?: boolean;
|
19
|
+
textFieldProps?: TextFieldProps;
|
20
|
+
requiredErrorText?: string;
|
21
|
+
validate?: Validate<any, any>;
|
22
|
+
validateErrorText?: string;
|
23
|
+
defaultValue?: string;
|
24
|
+
};
|
25
|
+
export declare const ControlDate: ({ control, name, required, label, placeholder, defaultValue, format, hideErrorMessage, textFieldProps, requiredErrorText, validate, validateErrorText, ...datePickerProps }: ControlDateProps) => import("react/jsx-runtime").JSX.Element;
|
26
|
+
export default ControlDate;
|
@@ -1,26 +1,26 @@
|
|
1
|
-
import { ReactNode } from 'react';
|
2
|
-
import { TextFieldProps } from '@mui/material/TextField';
|
3
|
-
import { DateTimePickerProps } from '@mui/x-date-pickers/DateTimePicker';
|
4
|
-
import { Control, Validate } from 'react-hook-form';
|
5
|
-
type dateTimePickerProps = Partial<DateTimePickerProps<unknown, unknown>> & {
|
6
|
-
/**
|
7
|
-
* React Hook Form `control`
|
8
|
-
*/
|
9
|
-
control: Control<any>;
|
10
|
-
/**
|
11
|
-
* Is input required flag
|
12
|
-
*/
|
13
|
-
required?: boolean;
|
14
|
-
name: string;
|
15
|
-
label?: ReactNode;
|
16
|
-
placeholder?: string;
|
17
|
-
format?: string;
|
18
|
-
hideErrorMessage?: boolean;
|
19
|
-
textFieldProps?: TextFieldProps;
|
20
|
-
requiredErrorText?: string;
|
21
|
-
validate?: Validate<any, any>;
|
22
|
-
validateErrorText?: string;
|
23
|
-
defaultValue?: string;
|
24
|
-
};
|
25
|
-
export declare const ControlDateTime: ({ control, name, required, label, placeholder, defaultValue, format, hideErrorMessage, textFieldProps, requiredErrorText, validate, validateErrorText, ...dateTimePickerProps }: dateTimePickerProps) => JSX.Element;
|
26
|
-
export default ControlDateTime;
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
3
|
+
import { DateTimePickerProps } from '@mui/x-date-pickers/DateTimePicker';
|
4
|
+
import { Control, Validate } from 'react-hook-form';
|
5
|
+
type dateTimePickerProps = Partial<DateTimePickerProps<unknown, unknown>> & {
|
6
|
+
/**
|
7
|
+
* React Hook Form `control`
|
8
|
+
*/
|
9
|
+
control: Control<any>;
|
10
|
+
/**
|
11
|
+
* Is input required flag
|
12
|
+
*/
|
13
|
+
required?: boolean;
|
14
|
+
name: string;
|
15
|
+
label?: ReactNode;
|
16
|
+
placeholder?: string;
|
17
|
+
format?: string;
|
18
|
+
hideErrorMessage?: boolean;
|
19
|
+
textFieldProps?: TextFieldProps;
|
20
|
+
requiredErrorText?: string;
|
21
|
+
validate?: Validate<any, any>;
|
22
|
+
validateErrorText?: string;
|
23
|
+
defaultValue?: string;
|
24
|
+
};
|
25
|
+
export declare const ControlDateTime: ({ control, name, required, label, placeholder, defaultValue, format, hideErrorMessage, textFieldProps, requiredErrorText, validate, validateErrorText, ...dateTimePickerProps }: dateTimePickerProps) => import("react/jsx-runtime").JSX.Element;
|
26
|
+
export default ControlDateTime;
|