@dartech/arsenal-ui 1.3.31 → 1.3.33
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
CHANGED
@@ -518,12 +518,12 @@ const ControlCheckbox = _a => {
|
|
518
518
|
name = '',
|
519
519
|
label = '',
|
520
520
|
required = false,
|
521
|
-
defaultValue =
|
521
|
+
// defaultValue = false,
|
522
522
|
disabled = false,
|
523
523
|
hideErrorMessage = false,
|
524
524
|
onChange: customOnChange
|
525
525
|
} = _a,
|
526
|
-
checkboxProps = __rest(_a, ["control", "validate", "name", "label", "required", "
|
526
|
+
checkboxProps = __rest(_a, ["control", "validate", "name", "label", "required", "disabled", "hideErrorMessage", "onChange"]);
|
527
527
|
const {
|
528
528
|
field: {
|
529
529
|
ref,
|
@@ -535,7 +535,7 @@ const ControlCheckbox = _a => {
|
|
535
535
|
} = useController({
|
536
536
|
name,
|
537
537
|
control,
|
538
|
-
defaultValue
|
538
|
+
defaultValue: false
|
539
539
|
});
|
540
540
|
const value = useWatch({
|
541
541
|
control,
|
@@ -1208,7 +1208,8 @@ const deepParseJson = value => {
|
|
1208
1208
|
|
1209
1209
|
const JsonView = ({
|
1210
1210
|
value,
|
1211
|
-
height: _height = '200px'
|
1211
|
+
height: _height = '200px',
|
1212
|
+
fontSize: _fontSize = 16
|
1212
1213
|
}) => {
|
1213
1214
|
const stringValue = useMemo(() => {
|
1214
1215
|
if (typeof value === 'string') {
|
@@ -1233,7 +1234,7 @@ const JsonView = ({
|
|
1233
1234
|
},
|
1234
1235
|
extensions: [langs.json()],
|
1235
1236
|
style: {
|
1236
|
-
fontSize:
|
1237
|
+
fontSize: _fontSize
|
1237
1238
|
}
|
1238
1239
|
});
|
1239
1240
|
};
|
@@ -1241,7 +1242,8 @@ const JsonView = ({
|
|
1241
1242
|
const JsonModalView = ({
|
1242
1243
|
open,
|
1243
1244
|
onClose,
|
1244
|
-
value
|
1245
|
+
value,
|
1246
|
+
jsonViewProps
|
1245
1247
|
}) => {
|
1246
1248
|
return jsxs(Dialog, Object.assign({
|
1247
1249
|
disableEscapeKeyDown: true,
|
@@ -1255,9 +1257,9 @@ const JsonModalView = ({
|
|
1255
1257
|
}
|
1256
1258
|
}, {
|
1257
1259
|
children: [jsx(DialogContent, {
|
1258
|
-
children: jsx(JsonView, {
|
1260
|
+
children: jsx(JsonView, Object.assign({
|
1259
1261
|
value: value
|
1260
|
-
})
|
1262
|
+
}, jsonViewProps))
|
1261
1263
|
}), jsxs(DialogActions, {
|
1262
1264
|
children: [jsx(CopyButton, {
|
1263
1265
|
copyText: value
|
@@ -4784,7 +4786,8 @@ const CreatePropertyFormFields = ({
|
|
4784
4786
|
children: customCheckboxes.map((field, index) => jsx(ControlCheckbox, {
|
4785
4787
|
control: control,
|
4786
4788
|
name: `${propertyFieldName}.${field.name}`,
|
4787
|
-
label: field.label
|
4789
|
+
label: field.label,
|
4790
|
+
checked: field.checked
|
4788
4791
|
}, index))
|
4789
4792
|
}) : null]
|
4790
4793
|
}), propertyType && jsxs(Fragment, {
|
package/package.json
CHANGED
package/src/interfaces/ui.d.ts
CHANGED
@@ -42,6 +42,7 @@ export type CustomPropertyFieldProps = {
|
|
42
42
|
label: string;
|
43
43
|
}[];
|
44
44
|
required?: boolean;
|
45
|
+
checked?: boolean;
|
45
46
|
};
|
46
47
|
export type PropertyFillType = 'expression' | 'widget' | 'null' | 'string' | 'json_valid' | 'json_notvalid' | 'dem_builder';
|
47
48
|
export type StatusVariant = 'default' | 'success' | 'error' | 'warning';
|
@@ -22,7 +22,6 @@ export type ControlCheckboxProps = CheckboxProps & {
|
|
22
22
|
/**
|
23
23
|
* React Hook Form `defaultValue`
|
24
24
|
*/
|
25
|
-
defaultValue?: unknown;
|
26
25
|
/**
|
27
26
|
* Is disabled input flag
|
28
27
|
*/
|
@@ -47,5 +46,5 @@ export type ControlCheckboxProps = CheckboxProps & {
|
|
47
46
|
* Material UI `Checkbox` controlled component. Used with react-hook-form
|
48
47
|
* @category Forms
|
49
48
|
*/
|
50
|
-
export declare const ControlCheckbox: ({ control, validate, name, label, required,
|
49
|
+
export declare const ControlCheckbox: ({ control, validate, name, label, required, disabled, hideErrorMessage, onChange: customOnChange, ...checkboxProps }: ControlCheckboxProps) => JSX.Element;
|
51
50
|
export default ControlCheckbox;
|