@mtes-mct/monitor-ui 2.1.0 → 2.1.1
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/CHANGELOG.md +8 -0
- package/index.js +8 -68
- package/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# [2.1.0](https://github.com/MTES-MCT/monitor-ui/compare/v2.0.0...v2.1.0) (2022-12-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **elements:** add isLight & hasBorder props to Fieldset ([#134](https://github.com/MTES-MCT/monitor-ui/issues/134)) ([761ea73](https://github.com/MTES-MCT/monitor-ui/commit/761ea733f1441c32986b64f2ad6be4541073a485))
|
|
7
|
+
* **fields:** add MultiZoneEditor ([#135](https://github.com/MTES-MCT/monitor-ui/issues/135)) ([8a3d653](https://github.com/MTES-MCT/monitor-ui/commit/8a3d6537484f8a0b85289f6903e5567cdef0673b))
|
|
8
|
+
|
|
1
9
|
# [2.0.0](https://github.com/MTES-MCT/monitor-ui/compare/v1.14.0...v2.0.0) (2022-12-14)
|
|
2
10
|
|
|
3
11
|
|
package/index.js
CHANGED
|
@@ -4851,36 +4851,20 @@ function FormikAutoComplete({ name, ...originalProps }) {
|
|
|
4851
4851
|
const [field, , helpers] = useField(name);
|
|
4852
4852
|
// eslint-disable-next-line react-hooks/exhaustive-deps, @typescript-eslint/naming-convention
|
|
4853
4853
|
const defaultValue = useMemo(() => field.value, []);
|
|
4854
|
-
|
|
4855
|
-
helpers.setValue(nextValue);
|
|
4856
|
-
},
|
|
4857
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4858
|
-
[]);
|
|
4859
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4860
|
-
useEffect(() => () => helpers.setValue(undefined), []);
|
|
4861
|
-
return jsx(AutoComplete, { defaultValue: defaultValue, name: name, onChange: handleChange, ...originalProps });
|
|
4854
|
+
return jsx(AutoComplete, { defaultValue: defaultValue, name: name, onChange: helpers.setValue, ...originalProps });
|
|
4862
4855
|
}
|
|
4863
4856
|
|
|
4864
4857
|
function FormikCheckbox({ name, ...originalProps }) {
|
|
4865
4858
|
const [field, , helpers] = useField(name);
|
|
4866
4859
|
// eslint-disable-next-line react-hooks/exhaustive-deps, @typescript-eslint/naming-convention
|
|
4867
4860
|
const defaultChecked = useMemo(() => Boolean(field.value), []);
|
|
4868
|
-
|
|
4869
|
-
helpers.setValue(isChecked);
|
|
4870
|
-
},
|
|
4871
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4872
|
-
[]);
|
|
4873
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4874
|
-
useEffect(() => () => helpers.setValue(undefined), []);
|
|
4875
|
-
return jsx(Checkbox, { defaultChecked: defaultChecked, name: name, onChange: handleChange, ...originalProps });
|
|
4861
|
+
return jsx(Checkbox, { defaultChecked: defaultChecked, name: name, onChange: helpers.setValue, ...originalProps });
|
|
4876
4862
|
}
|
|
4877
4863
|
|
|
4878
4864
|
function FormikDatePicker({ name, ...originalProps }) {
|
|
4879
4865
|
const [field, , helpers] = useField(name);
|
|
4880
4866
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4881
4867
|
const defaultValue = useMemo(() => field.value, []);
|
|
4882
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4883
|
-
useEffect(() => () => helpers.setValue(undefined), []);
|
|
4884
4868
|
return jsx(DatePicker, { defaultValue: defaultValue, onChange: helpers.setValue, ...originalProps });
|
|
4885
4869
|
}
|
|
4886
4870
|
|
|
@@ -4888,8 +4872,6 @@ function FormikDateRangePicker({ name, ...originalProps }) {
|
|
|
4888
4872
|
const [field, , helpers] = useField(name);
|
|
4889
4873
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4890
4874
|
const defaultValue = useMemo(() => field.value, []);
|
|
4891
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4892
|
-
useEffect(() => () => helpers.setValue(undefined), []);
|
|
4893
4875
|
return jsx(DateRangePicker, { defaultValue: defaultValue, onChange: helpers.setValue, ...originalProps });
|
|
4894
4876
|
}
|
|
4895
4877
|
|
|
@@ -4905,84 +4887,42 @@ function FormikMultiCheckbox({ name, ...originalProps }) {
|
|
|
4905
4887
|
const [field, , helpers] = useField(name);
|
|
4906
4888
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4907
4889
|
const defaultValue = useMemo(() => field.value, []);
|
|
4908
|
-
|
|
4909
|
-
helpers.setValue(nextValue);
|
|
4910
|
-
},
|
|
4911
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4912
|
-
[]);
|
|
4913
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4914
|
-
useEffect(() => () => helpers.setValue(undefined), []);
|
|
4915
|
-
return jsx(MultiCheckbox, { defaultValue: defaultValue, name: name, onChange: handleChange, ...originalProps });
|
|
4890
|
+
return jsx(MultiCheckbox, { defaultValue: defaultValue, name: name, onChange: helpers.setValue, ...originalProps });
|
|
4916
4891
|
}
|
|
4917
4892
|
|
|
4918
4893
|
function FormikMultiSelect({ name, ...originalProps }) {
|
|
4919
4894
|
const [field, , helpers] = useField(name);
|
|
4920
4895
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4921
4896
|
const defaultValue = useMemo(() => field.value, []);
|
|
4922
|
-
|
|
4923
|
-
helpers.setValue(nextValue);
|
|
4924
|
-
},
|
|
4925
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4926
|
-
[]);
|
|
4927
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4928
|
-
useEffect(() => () => helpers.setValue(undefined), []);
|
|
4929
|
-
return jsx(MultiSelect, { defaultValue: defaultValue, name: name, onChange: handleChange, ...originalProps });
|
|
4897
|
+
return jsx(MultiSelect, { defaultValue: defaultValue, name: name, onChange: helpers.setValue, ...originalProps });
|
|
4930
4898
|
}
|
|
4931
4899
|
|
|
4932
4900
|
function FormikMultiRadio({ name, ...originalProps }) {
|
|
4933
4901
|
const [field, , helpers] = useField(name);
|
|
4934
4902
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4935
4903
|
const defaultValue = useMemo(() => field.value, []);
|
|
4936
|
-
|
|
4937
|
-
helpers.setValue(nextValue);
|
|
4938
|
-
},
|
|
4939
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4940
|
-
[]);
|
|
4941
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4942
|
-
useEffect(() => () => helpers.setValue(undefined), []);
|
|
4943
|
-
return jsx(MultiRadio, { defaultValue: defaultValue, name: name, onChange: handleChange, ...originalProps });
|
|
4904
|
+
return jsx(MultiRadio, { defaultValue: defaultValue, name: name, onChange: helpers.setValue, ...originalProps });
|
|
4944
4905
|
}
|
|
4945
4906
|
|
|
4946
4907
|
function FormikSelect({ name, ...originalProps }) {
|
|
4947
4908
|
const [field, , helpers] = useField(name);
|
|
4948
4909
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4949
4910
|
const defaultValue = useMemo(() => field.value, []);
|
|
4950
|
-
|
|
4951
|
-
helpers.setValue(nextValue);
|
|
4952
|
-
},
|
|
4953
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4954
|
-
[]);
|
|
4955
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4956
|
-
useEffect(() => () => helpers.setValue(undefined), []);
|
|
4957
|
-
return jsx(Select, { defaultValue: defaultValue, name: name, onChange: handleChange, ...originalProps });
|
|
4911
|
+
return jsx(Select, { defaultValue: defaultValue, name: name, onChange: helpers.setValue, ...originalProps });
|
|
4958
4912
|
}
|
|
4959
4913
|
|
|
4960
4914
|
function FormikTextarea({ name, ...originalProps }) {
|
|
4961
4915
|
const [field, , helpers] = useField(name);
|
|
4962
4916
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4963
4917
|
const defaultValue = useMemo(() => field.value, []);
|
|
4964
|
-
|
|
4965
|
-
helpers.setValue(nextValue);
|
|
4966
|
-
},
|
|
4967
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4968
|
-
[]);
|
|
4969
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4970
|
-
useEffect(() => () => helpers.setValue(undefined), []);
|
|
4971
|
-
return jsx(Textarea, { defaultValue: defaultValue, name: name, onChange: handleChange, ...originalProps });
|
|
4918
|
+
return jsx(Textarea, { defaultValue: defaultValue, name: name, onChange: helpers.setValue, ...originalProps });
|
|
4972
4919
|
}
|
|
4973
4920
|
|
|
4974
4921
|
function FormikTextInput({ name, ...originalProps }) {
|
|
4975
4922
|
const [field, , helpers] = useField(name);
|
|
4976
4923
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4977
4924
|
const defaultValue = useMemo(() => field.value, []);
|
|
4978
|
-
|
|
4979
|
-
helpers.setValue(nextValue);
|
|
4980
|
-
},
|
|
4981
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4982
|
-
[]);
|
|
4983
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4984
|
-
useEffect(() => () => helpers.setValue(undefined), []);
|
|
4985
|
-
return jsx(TextInput, { defaultValue: defaultValue, name: name, onChange: handleChange, ...originalProps });
|
|
4925
|
+
return jsx(TextInput, { defaultValue: defaultValue, name: name, onChange: helpers.setValue, ...originalProps });
|
|
4986
4926
|
}
|
|
4987
4927
|
|
|
4988
4928
|
export { Accent, AutoComplete, Button, Checkbox, DatePicker, DateRangePicker, Dropdown, Field$2 as Field, Fieldset, FormikAutoComplete, FormikCheckbox, FormikDatePicker, FormikDateRangePicker, FormikEffect, FormikMultiCheckbox, FormikMultiRadio, FormikMultiSelect, FormikSelect, FormikTextInput, FormikTextarea, GlobalStyle, index as Icon, IconButton, Label, Legend, MultiCheckbox, MultiRadio, MultiSelect, MultiZoneEditor, Select, Size, THEME, Tag$1 as Tag, TextInput, Textarea, ThemeProvider };
|