@dartech/arsenal-ui 1.3.88 → 1.3.90
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/index.js +11 -4
- package/package.json +1 -1
- package/src/lib/Forms/ControlAceEditor.d.ts +2 -2
- package/src/lib/Forms/ControlArrayInput.d.ts +2 -2
- package/src/lib/Forms/{ControlAutocomplete.d.ts → ControlAutocomplete/ControlAutocomplete.d.ts} +3 -3
- package/src/lib/Forms/{ControlQueryAutocomplete.d.ts → ControlAutocomplete/ControlQueryAutocomplete.d.ts} +1 -1
- package/src/lib/Forms/ControlAutocomplete/index.d.ts +2 -0
- package/src/lib/Forms/ControlCheckbox.d.ts +2 -2
- package/src/lib/Forms/ControlDate.d.ts +2 -2
- package/src/lib/Forms/ControlDateTime.d.ts +2 -2
- package/src/lib/Forms/ControlInput.d.ts +2 -2
- package/src/lib/Forms/ControlNumberInput.d.ts +2 -2
- package/src/lib/Forms/ControlPeriodInput.d.ts +2 -2
- package/src/lib/Forms/ControlRadio.d.ts +2 -2
- package/src/lib/Forms/ControlSelect.d.ts +2 -2
- package/src/lib/Forms/ControlSwitch.d.ts +2 -2
- package/src/lib/Forms/ControlTime.d.ts +2 -2
- package/src/lib/Forms/index.d.ts +0 -1
- /package/src/lib/Forms/{useAutocomplete.d.ts → ControlAutocomplete/useAutocomplete.d.ts} +0 -0
package/index.js
CHANGED
@@ -5156,7 +5156,10 @@ const CreatePropertiesList = ({
|
|
5156
5156
|
control,
|
5157
5157
|
name: fieldName,
|
5158
5158
|
rules: {
|
5159
|
-
|
5159
|
+
validate: val => {
|
5160
|
+
if (required && Array.isArray(val) && val.length === 0) return 'Please, fill the properties';
|
5161
|
+
return true;
|
5162
|
+
}
|
5160
5163
|
}
|
5161
5164
|
});
|
5162
5165
|
const properties = useWatch({
|
@@ -5242,17 +5245,21 @@ const CreatePropertiesList = ({
|
|
5242
5245
|
}))
|
5243
5246
|
})]
|
5244
5247
|
}))
|
5245
|
-
}), item.id)), !hideAddButton &&
|
5248
|
+
}), item.id)), !hideAddButton && jsxs(Grid, Object.assign({
|
5246
5249
|
xs: 12
|
5247
5250
|
}, {
|
5248
|
-
children: jsx(Button, Object.assign({
|
5251
|
+
children: [jsx(Button, Object.assign({
|
5249
5252
|
variant: "contained",
|
5250
5253
|
size: "small",
|
5251
5254
|
color: "primary",
|
5252
5255
|
onClick: handleAddParameter
|
5253
5256
|
}, {
|
5254
5257
|
children: "Add property"
|
5255
|
-
}))
|
5258
|
+
})), error && jsx(FormHelperText, Object.assign({
|
5259
|
+
error: true
|
5260
|
+
}, {
|
5261
|
+
children: error.root.message
|
5262
|
+
}))]
|
5256
5263
|
}))]
|
5257
5264
|
});
|
5258
5265
|
};
|
package/package.json
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ReactCodeMirrorRef } from '@uiw/react-codemirror';
|
3
2
|
import { Control } from 'react-hook-form';
|
3
|
+
import { ReactNode } from 'react';
|
4
4
|
export interface ControlAceEditorProps {
|
5
5
|
name: string;
|
6
6
|
control: Control<any>;
|
7
7
|
mode?: 'json' | 'javascript' | 'python';
|
8
|
-
label?:
|
8
|
+
label?: ReactNode;
|
9
9
|
width?: string;
|
10
10
|
height?: string;
|
11
11
|
readOnly?: boolean;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
1
|
+
import { ReactNode } from 'react';
|
2
2
|
import { Control } from 'react-hook-form';
|
3
3
|
type Props = {
|
4
4
|
name: string;
|
5
5
|
control: Control<any>;
|
6
|
-
label:
|
6
|
+
label: ReactNode;
|
7
7
|
required?: boolean;
|
8
8
|
};
|
9
9
|
export declare const ControlArrayInput: ({ name, control, label, required }: Props) => JSX.Element;
|
package/src/lib/Forms/{ControlAutocomplete.d.ts → ControlAutocomplete/ControlAutocomplete.d.ts}
RENAMED
@@ -1,8 +1,8 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
3
2
|
import { TextFieldProps } from '@mui/material/TextField';
|
4
3
|
import { Control } from 'react-hook-form';
|
5
|
-
import {
|
4
|
+
import { ReactNode } from 'react';
|
5
|
+
import { ValidateFunc } from '../../../interfaces';
|
6
6
|
/**
|
7
7
|
* This interface is referencing the [[ControlAutocomplete]] component props.
|
8
8
|
* @category Forms
|
@@ -15,7 +15,7 @@ export type ControlAutocompleteProps = Omit<AutocompleteProps<unknown, boolean,
|
|
15
15
|
/**
|
16
16
|
* Label for MUI TextField select component
|
17
17
|
*/
|
18
|
-
label?:
|
18
|
+
label?: ReactNode;
|
19
19
|
/**
|
20
20
|
* React Hook Form `control`
|
21
21
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { CheckboxProps } from '@mui/material/Checkbox';
|
2
|
+
import { ReactNode } from 'react';
|
3
3
|
import { Control } from 'react-hook-form';
|
4
4
|
import { ValidateFunc } from '../../interfaces';
|
5
5
|
/**
|
@@ -14,7 +14,7 @@ export type ControlCheckboxProps = CheckboxProps & {
|
|
14
14
|
/**
|
15
15
|
* Label for MUI TextField component
|
16
16
|
*/
|
17
|
-
label?:
|
17
|
+
label?: ReactNode;
|
18
18
|
/**
|
19
19
|
* React Hook Form `control`
|
20
20
|
*/
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import { ReactNode } from 'react';
|
2
2
|
import { Control } from 'react-hook-form';
|
3
3
|
type Props = {
|
4
4
|
/**
|
@@ -10,7 +10,7 @@ type Props = {
|
|
10
10
|
*/
|
11
11
|
required?: boolean;
|
12
12
|
name: string;
|
13
|
-
label?:
|
13
|
+
label?: ReactNode;
|
14
14
|
format?: string;
|
15
15
|
hideErrorMessage?: boolean;
|
16
16
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import { ReactNode } from 'react';
|
2
2
|
import { Control } from 'react-hook-form';
|
3
3
|
type Props = {
|
4
4
|
/**
|
@@ -10,7 +10,7 @@ type Props = {
|
|
10
10
|
*/
|
11
11
|
required?: boolean;
|
12
12
|
name: string;
|
13
|
-
label?:
|
13
|
+
label?: ReactNode;
|
14
14
|
format?: string;
|
15
15
|
hideErrorMessage?: boolean;
|
16
16
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import type { ReactNode } from 'react';
|
2
2
|
import { Control } from 'react-hook-form';
|
3
3
|
import { TextFieldProps } from '@mui/material/TextField';
|
4
4
|
import { ValidateFunc } from '../../interfaces';
|
@@ -14,7 +14,7 @@ export type ControlInputProps = TextFieldProps & {
|
|
14
14
|
/**
|
15
15
|
* Label for MUI TextField component
|
16
16
|
*/
|
17
|
-
label?:
|
17
|
+
label?: ReactNode;
|
18
18
|
/**
|
19
19
|
* React Hook Form `control`
|
20
20
|
*/
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import type { ReactNode } from 'react';
|
2
2
|
import { TextFieldProps } from '@mui/material/TextField';
|
3
3
|
import { Control } from 'react-hook-form';
|
4
4
|
import { ValidateFunc } from '../../interfaces';
|
@@ -10,7 +10,7 @@ type Props = TextFieldProps & {
|
|
10
10
|
/**
|
11
11
|
* Label for MUI TextField component
|
12
12
|
*/
|
13
|
-
label?:
|
13
|
+
label?: ReactNode;
|
14
14
|
/**
|
15
15
|
* React Hook Form `control`
|
16
16
|
*/
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
1
|
+
import { ReactNode } from 'react';
|
2
2
|
import { Control } from 'react-hook-form';
|
3
3
|
type Props = {
|
4
4
|
name?: string;
|
5
5
|
control: Control<any>;
|
6
|
-
label?:
|
6
|
+
label?: ReactNode;
|
7
7
|
required?: boolean;
|
8
8
|
};
|
9
9
|
export declare const ControlPeriodInput: ({ name, control, label, required }: Props) => JSX.Element;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { RadioProps } from '@mui/material/Radio';
|
3
2
|
import { Control } from 'react-hook-form';
|
4
3
|
import { ValidateFunc } from '../../interfaces';
|
4
|
+
import { ReactNode } from 'react';
|
5
5
|
/**
|
6
6
|
* This interface is referencing the [[ControlRadioBtn]] component props.
|
7
7
|
* @category Forms
|
@@ -18,7 +18,7 @@ export interface ControlRadioProps {
|
|
18
18
|
/**
|
19
19
|
* Label for component
|
20
20
|
*/
|
21
|
-
label?:
|
21
|
+
label?: ReactNode;
|
22
22
|
/**
|
23
23
|
* Radio group values
|
24
24
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { TextFieldProps } from '@mui/material/TextField';
|
2
|
+
import { ReactNode } from 'react';
|
3
3
|
import { Control } from 'react-hook-form';
|
4
4
|
import { ValidateFunc } from '../../interfaces';
|
5
5
|
/**
|
@@ -14,7 +14,7 @@ export type ControlSelectProps = TextFieldProps & {
|
|
14
14
|
/**
|
15
15
|
* Label for MUI TextField select component
|
16
16
|
*/
|
17
|
-
label?:
|
17
|
+
label?: ReactNode;
|
18
18
|
/**
|
19
19
|
* React Hook Form `control`
|
20
20
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { SwitchProps } from '@mui/material/Switch';
|
3
2
|
import { Control } from 'react-hook-form';
|
3
|
+
import { ReactNode } from 'react';
|
4
4
|
type Props = SwitchProps & {
|
5
5
|
/**
|
6
6
|
* React Hook Form `control`
|
@@ -13,7 +13,7 @@ type Props = SwitchProps & {
|
|
13
13
|
/**
|
14
14
|
* Material-UI FormControlLabel `label` prop
|
15
15
|
*/
|
16
|
-
label?:
|
16
|
+
label?: ReactNode;
|
17
17
|
};
|
18
18
|
export declare const ControlSwitch: ({ control, name, label, ...switchProps }: Props) => JSX.Element;
|
19
19
|
export default ControlSwitch;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import { ReactNode } from 'react';
|
2
2
|
import { Control } from 'react-hook-form';
|
3
3
|
type Props = {
|
4
4
|
/**
|
@@ -10,7 +10,7 @@ type Props = {
|
|
10
10
|
*/
|
11
11
|
required?: boolean;
|
12
12
|
name: string;
|
13
|
-
label?:
|
13
|
+
label?: ReactNode;
|
14
14
|
format?: string;
|
15
15
|
hideErrorMessage?: boolean;
|
16
16
|
};
|
package/src/lib/Forms/index.d.ts
CHANGED
@@ -4,7 +4,6 @@ export * from './ControlSelect';
|
|
4
4
|
export * from './ControlCheckbox';
|
5
5
|
export * from './ControlRadio';
|
6
6
|
export * from './ControlAutocomplete';
|
7
|
-
export * from './ControlQueryAutocomplete';
|
8
7
|
export * from './CopyButton';
|
9
8
|
export * from './BackButton';
|
10
9
|
export * from './ControlAceEditor';
|
File without changes
|