@micromag/core 0.4.16 → 0.4.17
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/es/components.js +4 -2
- package/lib/components.js +3 -1
- package/package.json +2 -2
package/es/components.js
CHANGED
|
@@ -16,7 +16,7 @@ import throttle from 'lodash/throttle';
|
|
|
16
16
|
import { useForm, useDocumentEvent, useIntersectionObserver, useDimensionObserver, useDevicePixelRatio } from '@micromag/core/hooks';
|
|
17
17
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
18
18
|
import get from 'lodash/get';
|
|
19
|
-
import { useFieldsManager, useFieldComponent, FieldContextProvider, withModals, useModals, withPanels, usePanels, ScreenSizeProvider, useScreenComponent, ScreenProvider, useScreenRenderContext, useScreenSize } from '@micromag/core/contexts';
|
|
19
|
+
import { useFieldsManager, useFieldComponent, FieldContextProvider, useFieldContext, withModals, useModals, withPanels, usePanels, ScreenSizeProvider, useScreenComponent, ScreenProvider, useScreenRenderContext, useScreenSize } from '@micromag/core/contexts';
|
|
20
20
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
21
21
|
import isObject from 'lodash/isObject';
|
|
22
22
|
import isArray from 'lodash/isArray';
|
|
@@ -443,6 +443,7 @@ function Form(_ref) {
|
|
|
443
443
|
}
|
|
444
444
|
}, [response, onResponse, onMessage]);
|
|
445
445
|
var canSave = validateFields(fields, value);
|
|
446
|
+
var fieldContext = useFieldContext();
|
|
446
447
|
var _useState3 = useState([]),
|
|
447
448
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
448
449
|
fieldPaths = _useState4[0],
|
|
@@ -494,7 +495,8 @@ function Form(_ref) {
|
|
|
494
495
|
value: value,
|
|
495
496
|
onChange: setValue,
|
|
496
497
|
gotoFieldForm: gotoFieldForm,
|
|
497
|
-
closeFieldForm: closeFieldForm
|
|
498
|
+
closeFieldForm: closeFieldForm,
|
|
499
|
+
fieldContext: fieldContext
|
|
498
500
|
})) : null, FieldsComponent && fields !== null && fields.length > 0 && fieldParams === null ? /*#__PURE__*/React.createElement(FieldsComponent, {
|
|
499
501
|
fields: fields,
|
|
500
502
|
value: value,
|
package/lib/components.js
CHANGED
|
@@ -445,6 +445,7 @@ function Form(_ref) {
|
|
|
445
445
|
}
|
|
446
446
|
}, [response, onResponse, onMessage]);
|
|
447
447
|
var canSave = utils.validateFields(fields, value);
|
|
448
|
+
var fieldContext = contexts.useFieldContext();
|
|
448
449
|
var _useState3 = React.useState([]),
|
|
449
450
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
450
451
|
fieldPaths = _useState4[0],
|
|
@@ -496,7 +497,8 @@ function Form(_ref) {
|
|
|
496
497
|
value: value,
|
|
497
498
|
onChange: setValue,
|
|
498
499
|
gotoFieldForm: gotoFieldForm,
|
|
499
|
-
closeFieldForm: closeFieldForm
|
|
500
|
+
closeFieldForm: closeFieldForm,
|
|
501
|
+
fieldContext: fieldContext
|
|
500
502
|
})) : null, FieldsComponent && fields !== null && fields.length > 0 && fieldParams === null ? /*#__PURE__*/React.createElement(FieldsComponent, {
|
|
501
503
|
fields: fields,
|
|
502
504
|
value: value,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.17",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -161,6 +161,6 @@
|
|
|
161
161
|
"access": "public",
|
|
162
162
|
"registry": "https://registry.npmjs.org/"
|
|
163
163
|
},
|
|
164
|
-
"gitHead": "
|
|
164
|
+
"gitHead": "d9c4b170763e7510eb07100538af44524ca9292c",
|
|
165
165
|
"types": "es/index.d.ts"
|
|
166
166
|
}
|