@digigov/form 0.10.0 → 0.10.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 -1
- package/Field/utils.js +11 -2
- package/es/Field/utils.js +4 -2
- package/esm/Field/utils.js +4 -2
- package/esm/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Change Log - @digigov/form
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 19 Oct 2022 14:25:05 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.10.1
|
|
6
|
+
Wed, 19 Oct 2022 14:25:05 GMT
|
|
7
|
+
|
|
8
|
+
### Patches
|
|
9
|
+
|
|
10
|
+
- lazy import AutoComplete field that crashed apps that did not have react-extensions as dependency
|
|
4
11
|
|
|
5
12
|
## 0.10.0
|
|
6
13
|
Fri, 14 Oct 2022 14:14:00 GMT
|
package/Field/utils.js
CHANGED
|
@@ -9,6 +9,8 @@ exports.calculateField = calculateField;
|
|
|
9
9
|
exports.evaluateFieldWithConditions = evaluateFieldWithConditions;
|
|
10
10
|
exports.useField = void 0;
|
|
11
11
|
|
|
12
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
+
|
|
12
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
15
|
|
|
14
16
|
var _react = require("react");
|
|
@@ -27,8 +29,15 @@ var _DateInput = _interopRequireDefault(require("@digigov/form/inputs/DateInput"
|
|
|
27
29
|
|
|
28
30
|
var _FormContext = require("@digigov/form/FormContext");
|
|
29
31
|
|
|
30
|
-
var
|
|
32
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
|
+
|
|
34
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || (0, _typeof2["default"])(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
35
|
|
|
36
|
+
var AutoComplete = /*#__PURE__*/(0, _react.lazy)(function () {
|
|
37
|
+
return Promise.resolve().then(function () {
|
|
38
|
+
return _interopRequireWildcard(require('@digigov/form/inputs/AutoComplete'));
|
|
39
|
+
});
|
|
40
|
+
});
|
|
32
41
|
var FIELD_COMPONENTS = {
|
|
33
42
|
text: {
|
|
34
43
|
component: _Input["default"]
|
|
@@ -62,7 +71,7 @@ var ALTERNATIVE_COMPONENTS = {
|
|
|
62
71
|
controlled: false
|
|
63
72
|
},
|
|
64
73
|
AutoComplete: {
|
|
65
|
-
component:
|
|
74
|
+
component: AutoComplete,
|
|
66
75
|
controlled: true
|
|
67
76
|
}
|
|
68
77
|
};
|
package/es/Field/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import { useContext, useMemo } from 'react';
|
|
2
|
+
import { lazy, useContext, useMemo } from 'react';
|
|
3
3
|
import Input from '@digigov/form/inputs/Input';
|
|
4
4
|
import Checkboxes from '@digigov/form/inputs/Checkboxes';
|
|
5
5
|
import Radio from '@digigov/form/inputs/Radio';
|
|
@@ -7,7 +7,9 @@ import Select from '@digigov/form/inputs/Select';
|
|
|
7
7
|
import FileInput from '@digigov/form/inputs/FileInput';
|
|
8
8
|
import DateInput from '@digigov/form/inputs/DateInput';
|
|
9
9
|
import { FormContext } from '@digigov/form/FormContext';
|
|
10
|
-
|
|
10
|
+
var AutoComplete = /*#__PURE__*/lazy(function () {
|
|
11
|
+
return import('@digigov/form/inputs/AutoComplete');
|
|
12
|
+
});
|
|
11
13
|
var FIELD_COMPONENTS = {
|
|
12
14
|
text: {
|
|
13
15
|
component: Input
|
package/esm/Field/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import { useContext, useMemo } from 'react';
|
|
2
|
+
import { lazy, useContext, useMemo } from 'react';
|
|
3
3
|
import Input from '@digigov/form/inputs/Input';
|
|
4
4
|
import Checkboxes from '@digigov/form/inputs/Checkboxes';
|
|
5
5
|
import Radio from '@digigov/form/inputs/Radio';
|
|
@@ -7,7 +7,9 @@ import Select from '@digigov/form/inputs/Select';
|
|
|
7
7
|
import FileInput from '@digigov/form/inputs/FileInput';
|
|
8
8
|
import DateInput from '@digigov/form/inputs/DateInput';
|
|
9
9
|
import { FormContext } from '@digigov/form/FormContext';
|
|
10
|
-
|
|
10
|
+
var AutoComplete = /*#__PURE__*/lazy(function () {
|
|
11
|
+
return import('@digigov/form/inputs/AutoComplete');
|
|
12
|
+
});
|
|
11
13
|
var FIELD_COMPONENTS = {
|
|
12
14
|
text: {
|
|
13
15
|
component: Input
|
package/esm/index.js
CHANGED