@innoways/hooks 8.0.2 → 8.0.4

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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # Change Log
2
2
 
3
+ ## 8.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - fixed null field issues 8.0.4
8
+ - Updated dependencies
9
+ - @innoways/utils@8.0.4
10
+
11
+ ## 8.0.3
12
+
13
+ ### Patch Changes
14
+
15
+ - fixed select field issues 8.0.3
16
+ - Updated dependencies
17
+ - @innoways/utils@8.0.3
18
+
3
19
  ## 8.0.2
4
20
 
5
21
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1281,4 +1281,23 @@ var useCountryStateCityOptions = function useCountryStateCityOptions(selectedOpt
1281
1281
  };
1282
1282
  };
1283
1283
 
1284
- export { RequiredModeContext, defaultGlobalOptions, defaultGlobalState, globalOptionsContext, globalStateContext, useArray, useClickOne, useContainer, useCountryStateCityOptions, useEventCallback, useField, useGetKey, useGlobalOptions, useGlobalState, useModal, usePrevious, useQuery, useRefProp, useRequiredModeContext, useSchema, useTitle, useValidate, validate };
1284
+ var useScreenSize = function useScreenSize() {
1285
+ var _useState = useState(window.innerWidth),
1286
+ _useState2 = _slicedToArray(_useState, 2),
1287
+ screenSize = _useState2[0],
1288
+ setScreenSize = _useState2[1];
1289
+
1290
+ useEffect(function () {
1291
+ var handleResize = function handleResize() {
1292
+ return setScreenSize(window.innerWidth);
1293
+ };
1294
+
1295
+ window.addEventListener('resize', handleResize);
1296
+ return function () {
1297
+ return window.removeEventListener('resize', handleResize);
1298
+ };
1299
+ }, []);
1300
+ return screenSize;
1301
+ };
1302
+
1303
+ export { RequiredModeContext, defaultGlobalOptions, defaultGlobalState, globalOptionsContext, globalStateContext, useArray, useClickOne, useContainer, useCountryStateCityOptions, useEventCallback, useField, useGetKey, useGlobalOptions, useGlobalState, useModal, usePrevious, useQuery, useRefProp, useRequiredModeContext, useSchema, useScreenSize, useTitle, useValidate, validate };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@innoways/hooks",
3
- "version": "8.0.2",
3
+ "version": "8.0.4",
4
4
  "description": "drip-form通用hooks",
5
5
  "keywords": [
6
6
  "hooks",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.10.2",
34
- "@innoways/utils": "^8.0.2",
34
+ "@innoways/utils": "^8.0.4",
35
35
  "ahooks": "^2.10.12",
36
36
  "ajv": "^8.6.2",
37
37
  "immer": "^9.0.5",