@luomus/laji-form 15.1.21 → 15.1.23
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/dist/laji-form.js +1 -1
- package/lib/components/fields/AutoArrayField.d.ts +1 -1
- package/lib/components/fields/AutoArrayField.js +1 -1
- package/lib/components/fields/AutosuggestField.d.ts +1 -1
- package/lib/components/fields/AutosuggestField.js +1 -1
- package/lib/components/fields/ConditionalUiSchemaField.d.ts +1 -1
- package/lib/components/fields/ConditionalUiSchemaField.js +1 -1
- package/lib/components/fields/ExtraLabelRowField.d.ts +1 -1
- package/lib/components/fields/ExtraLabelRowField.js +1 -1
- package/lib/components/fields/FilterArrayField.d.ts +1 -1
- package/lib/components/fields/FilterArrayField.js +1 -1
- package/lib/components/fields/InputWithDefaultValueButtonField.js +6 -4
- package/lib/components/fields/LocationChooserField.js +1 -1
- package/lib/components/fields/MapField.d.ts +1 -1
- package/lib/components/fields/MapField.js +1 -1
- package/lib/components/fields/MultiArrayField.d.ts +1 -1
- package/lib/components/fields/MultiArrayField.js +1 -1
- package/lib/components/fields/ScopeField.d.ts +1 -1
- package/lib/components/fields/ScopeField.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ export default class AutoArrayField extends React.Component<any, any, any> {
|
|
|
2
2
|
static propTypes: {
|
|
3
3
|
uiSchema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
4
4
|
"ui:options": PropTypes.Requireable<PropTypes.InferProps<{
|
|
5
|
-
autofocus:
|
|
5
|
+
autofocus: PropTypes.Requireable<boolean>;
|
|
6
6
|
}>>;
|
|
7
7
|
}>>;
|
|
8
8
|
schema: PropTypes.Validator<PropTypes.InferProps<{
|
|
@@ -42,7 +42,7 @@ let AutoArrayField = class AutoArrayField extends React.Component {
|
|
|
42
42
|
AutoArrayField.propTypes = {
|
|
43
43
|
uiSchema: PropTypes.shape({
|
|
44
44
|
"ui:options": PropTypes.shape({
|
|
45
|
-
autofocus: PropTypes.
|
|
45
|
+
autofocus: PropTypes.bool
|
|
46
46
|
})
|
|
47
47
|
}),
|
|
48
48
|
schema: PropTypes.shape({
|
|
@@ -20,7 +20,7 @@ export default class AutosuggestField extends React.Component<any, any, any> {
|
|
|
20
20
|
"ui:options": PropTypes.Validator<PropTypes.InferProps<{
|
|
21
21
|
autosuggestField: PropTypes.Validator<string>;
|
|
22
22
|
suggestionInputField: PropTypes.Validator<string>;
|
|
23
|
-
allowNonsuggestedValue:
|
|
23
|
+
allowNonsuggestedValue: PropTypes.Requireable<boolean>;
|
|
24
24
|
suggestionReceivers: PropTypes.Validator<object>;
|
|
25
25
|
inputTransformer: PropTypes.Requireable<PropTypes.InferProps<{
|
|
26
26
|
regexp: PropTypes.Validator<string>;
|
|
@@ -281,7 +281,7 @@ AutosuggestField.propTypes = {
|
|
|
281
281
|
"ui:options": PropTypes.shape({
|
|
282
282
|
autosuggestField: PropTypes.string.isRequired,
|
|
283
283
|
suggestionInputField: PropTypes.string.isRequired,
|
|
284
|
-
allowNonsuggestedValue: PropTypes.
|
|
284
|
+
allowNonsuggestedValue: PropTypes.bool,
|
|
285
285
|
suggestionReceivers: PropTypes.object.isRequired,
|
|
286
286
|
inputTransformer: PropTypes.shape({
|
|
287
287
|
regexp: PropTypes.string.isRequired,
|
|
@@ -103,7 +103,7 @@ export default class ConditionalUiSchemaField extends React.Component<any, any,
|
|
|
103
103
|
uiSchema: PropTypes.Validator<object>;
|
|
104
104
|
}> | null | undefined)[]>;
|
|
105
105
|
}> | null | undefined)[]>;
|
|
106
|
-
cache:
|
|
106
|
+
cache: PropTypes.Requireable<boolean>;
|
|
107
107
|
}>>;
|
|
108
108
|
}>>;
|
|
109
109
|
schema: PropTypes.Validator<PropTypes.InferProps<{
|
|
@@ -8,7 +8,7 @@ export default class ExtraLabelRowField extends React.Component<any, any, any> {
|
|
|
8
8
|
md: PropTypes.Requireable<number | object>;
|
|
9
9
|
sm: PropTypes.Requireable<number | object>;
|
|
10
10
|
xs: PropTypes.Requireable<number | object>;
|
|
11
|
-
hiddenXs:
|
|
11
|
+
hiddenXs: PropTypes.Requireable<boolean>;
|
|
12
12
|
}>>;
|
|
13
13
|
}>>;
|
|
14
14
|
schema: PropTypes.Validator<PropTypes.InferProps<{
|
|
@@ -86,7 +86,7 @@ ExtraLabelRowField.propTypes = {
|
|
|
86
86
|
md: PropTypes.oneOfType([PropTypes.number, PropTypes.object]),
|
|
87
87
|
sm: PropTypes.oneOfType([PropTypes.number, PropTypes.object]),
|
|
88
88
|
xs: PropTypes.oneOfType([PropTypes.number, PropTypes.object]),
|
|
89
|
-
hiddenXs: PropTypes.
|
|
89
|
+
hiddenXs: PropTypes.bool
|
|
90
90
|
})
|
|
91
91
|
}).isRequired,
|
|
92
92
|
schema: PropTypes.shape({
|
|
@@ -48,7 +48,7 @@ export default class FilterArrayField extends React.Component<any, any, any> {
|
|
|
48
48
|
isLast: PropTypes.Requireable<number>;
|
|
49
49
|
complement: PropTypes.Requireable<boolean>;
|
|
50
50
|
}> | null | undefined)[]>;
|
|
51
|
-
cache:
|
|
51
|
+
cache: PropTypes.Requireable<boolean>;
|
|
52
52
|
}>>;
|
|
53
53
|
}>>;
|
|
54
54
|
schema: PropTypes.Validator<PropTypes.InferProps<{
|
|
@@ -10,6 +10,7 @@ const React = require("react");
|
|
|
10
10
|
const PropTypes = require("prop-types");
|
|
11
11
|
const VirtualSchemaField_1 = require("../VirtualSchemaField");
|
|
12
12
|
const utils_1 = require("../../utils");
|
|
13
|
+
const merge = require("deepmerge");
|
|
13
14
|
let InputWithDefaultValueButtonField = class InputWithDefaultValueButtonField extends React.Component {
|
|
14
15
|
constructor() {
|
|
15
16
|
super(...arguments);
|
|
@@ -28,14 +29,15 @@ let InputWithDefaultValueButtonField = class InputWithDefaultValueButtonField ex
|
|
|
28
29
|
let { schema, uiSchema } = props;
|
|
29
30
|
const { buttonField, buttonLabel } = utils_1.getUiOptions(uiSchema);
|
|
30
31
|
const innerUiSchema = utils_1.getInnerUiSchema(uiSchema);
|
|
31
|
-
const
|
|
32
|
-
|
|
32
|
+
const buttonFieldJSONPointer = utils_1.uiSchemaJSONPointer(schema, buttonField);
|
|
33
|
+
const buttonFieldUiSchema = merge(utils_1.parseJSONPointer(innerUiSchema, buttonFieldJSONPointer) || {}, {
|
|
33
34
|
"ui:widget": "InputWithDefaultValueButtonWidget",
|
|
34
35
|
"ui:options": {
|
|
35
36
|
buttonLabel,
|
|
36
37
|
onClick: this.onClick
|
|
37
|
-
}
|
|
38
|
-
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
uiSchema = utils_1.updateSafelyWithJSONPointer(innerUiSchema, buttonFieldUiSchema, buttonFieldJSONPointer);
|
|
39
41
|
return Object.assign(Object.assign({}, props), { uiSchema });
|
|
40
42
|
}
|
|
41
43
|
};
|
|
@@ -246,7 +246,7 @@ class LocationButton extends React.Component {
|
|
|
246
246
|
if (!geometryRef || !geometryRef.type) {
|
|
247
247
|
break;
|
|
248
248
|
}
|
|
249
|
-
that.props.onChange(utils_1.updateFormDataWithJSONPointer(that.props,
|
|
249
|
+
that.props.onChange(utils_1.updateFormDataWithJSONPointer(that.props, undefined, geometryField));
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
case "edit": {
|
|
@@ -13,7 +13,7 @@ export default class MapField extends React.Component<any, any, any> {
|
|
|
13
13
|
mapOptions: PropTypes.Requireable<object>;
|
|
14
14
|
height: PropTypes.Requireable<number>;
|
|
15
15
|
emptyHelp: PropTypes.Requireable<string>;
|
|
16
|
-
geometryCollection:
|
|
16
|
+
geometryCollection: PropTypes.Requireable<boolean>;
|
|
17
17
|
}>>;
|
|
18
18
|
}>>;
|
|
19
19
|
schema: PropTypes.Validator<PropTypes.InferProps<{
|
|
@@ -32,7 +32,7 @@ export default class MultiArrayField extends React.Component<any, any, any> {
|
|
|
32
32
|
type: PropTypes.Requireable<string>;
|
|
33
33
|
uiSchema: PropTypes.Validator<object>;
|
|
34
34
|
}> | null | undefined)[]>;
|
|
35
|
-
cache:
|
|
35
|
+
cache: PropTypes.Requireable<boolean>;
|
|
36
36
|
}>>;
|
|
37
37
|
}>>;
|
|
38
38
|
schema: PropTypes.Validator<PropTypes.InferProps<{
|
|
@@ -187,7 +187,7 @@ MultiArrayField.propTypes = {
|
|
|
187
187
|
ConditionalUiSchemaField_1.operationPropType,
|
|
188
188
|
PropTypes.arrayOf(ConditionalUiSchemaField_1.operationPropType)
|
|
189
189
|
]),
|
|
190
|
-
cache: PropTypes.
|
|
190
|
+
cache: PropTypes.bool
|
|
191
191
|
})
|
|
192
192
|
}),
|
|
193
193
|
schema: PropTypes.shape({
|
|
@@ -35,7 +35,7 @@ export default class ScopeField extends React.Component<any, any, any> {
|
|
|
35
35
|
static propTypes: {
|
|
36
36
|
uiSchema: PropTypes.Validator<PropTypes.InferProps<{
|
|
37
37
|
"ui:options": PropTypes.Validator<PropTypes.InferProps<{
|
|
38
|
-
includeAdditionalFieldsChooserButton:
|
|
38
|
+
includeAdditionalFieldsChooserButton: PropTypes.Requireable<boolean>;
|
|
39
39
|
additionalsGroupingPath: PropTypes.Requireable<string>;
|
|
40
40
|
additionalsGroupsTranslator: PropTypes.Requireable<string>;
|
|
41
41
|
additionalsPersistenceKey: PropTypes.Requireable<string>;
|
|
@@ -453,7 +453,7 @@ ScopeField.contextType = ReactContext_1.default;
|
|
|
453
453
|
ScopeField.propTypes = {
|
|
454
454
|
uiSchema: PropTypes.shape({
|
|
455
455
|
"ui:options": PropTypes.shape({
|
|
456
|
-
includeAdditionalFieldsChooserButton: PropTypes.
|
|
456
|
+
includeAdditionalFieldsChooserButton: PropTypes.bool,
|
|
457
457
|
additionalsGroupingPath: PropTypes.string,
|
|
458
458
|
additionalsGroupsTranslator: PropTypes.oneOf(Object.keys(scopeFieldSettings)),
|
|
459
459
|
additionalsPersistenceKey: PropTypes.string,
|