@luomus/laji-form 15.0.0 → 15.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.
Files changed (297) hide show
  1. package/CHANGELOG.md +0 -4
  2. package/dist/laji-form.js +1 -1
  3. package/dist/styles.css +81 -90
  4. package/jsonconfig.json +26 -0
  5. package/migrate.sh +0 -1
  6. package/package.json +8 -8
  7. package/test-export/array-spec.js +204 -0
  8. package/test-export/bird-point-count-spec.d.ts +1 -0
  9. package/test-export/bird-point-count-spec.js +62 -0
  10. package/test-export/collection-contest-form-spec.d.ts +1 -0
  11. package/test-export/collection-contest-form-spec.js +38 -0
  12. package/test-export/dataset-form-spec.d.ts +1 -0
  13. package/test-export/dataset-form-spec.js +50 -0
  14. package/test-export/date-time-widget-spec.d.ts +1 -0
  15. package/test-export/date-time-widget-spec.js +188 -0
  16. package/test-export/geocoder-spec.d.ts +1 -0
  17. package/test-export/geocoder-spec.js +135 -0
  18. package/test-export/image-array-spec.d.ts +1 -0
  19. package/test-export/image-array-spec.js +94 -0
  20. package/test-export/inject-field-spec.d.ts +1 -0
  21. package/test-export/inject-field-spec.js +148 -0
  22. package/test-export/internal-uuids-spec.d.ts +1 -0
  23. package/test-export/internal-uuids-spec.js +157 -0
  24. package/test-export/invasive-species-eradication-np-spec.d.ts +1 -0
  25. package/test-export/invasive-species-eradication-np-spec.js +18 -0
  26. package/test-export/invasive-species-eradication-spec.d.ts +1 -0
  27. package/test-export/invasive-species-eradication-spec.js +25 -0
  28. package/test-export/line-transect-spec.d.ts +1 -0
  29. package/test-export/line-transect-spec.js +121 -0
  30. package/test-export/mobile-form-spec.d.ts +1 -0
  31. package/test-export/mobile-form-spec.js +84 -0
  32. package/test-export/nafi-spec.d.ts +1 -0
  33. package/test-export/nafi-spec.js +85 -0
  34. package/test-export/select-widget-spec.d.ts +1 -0
  35. package/test-export/select-widget-spec.js +68 -0
  36. package/test-export/single-item-array-field-spec.d.ts +1 -0
  37. package/test-export/single-item-array-field-spec.js +92 -0
  38. package/test-export/syke-butterfly-spec.d.ts +1 -0
  39. package/test-export/syke-butterfly-spec.js +163 -0
  40. package/test-export/test-utils.d.ts +150 -176
  41. package/test-export/test-utils.js +218 -210
  42. package/test-export/transaction-form-spec.d.ts +1 -0
  43. package/test-export/transaction-form-spec.js +63 -0
  44. package/test-export/trip-report-autosuggest-spec.d.ts +1 -0
  45. package/test-export/trip-report-autosuggest-spec.js +272 -0
  46. package/test-export/trip-report-spec.d.ts +1 -0
  47. package/test-export/trip-report-spec.js +456 -0
  48. package/test-export/unit-list-shorthand-array-field-spec.d.ts +1 -0
  49. package/test-export/unit-list-shorthand-array-field-spec.js +71 -0
  50. package/test-export/validation-spec.d.ts +1 -0
  51. package/test-export/validation-spec.js +336 -0
  52. package/test-export/water-bird-spec.d.ts +1 -0
  53. package/test-export/water-bird-spec.js +30 -0
  54. package/test-export/wbc-spec.d.ts +1 -0
  55. package/test-export/wbc-spec.js +82 -0
  56. package/tsconfig.test.json +1 -1
  57. package/xsel -b +9 -0
  58. package/cypress/fixtures/example.json +0 -5
  59. package/cypress/screenshots/nafi.cy.ts/NAFI (MHL.6) -- selecting species name with keyboard navigation -- and closes suggestion list (failed).png +0 -0
  60. package/cypress/screenshots/nafi.cy.ts/NAFI (MHL.6) -- selecting species name with keyboard navigation -- and is marked as suggested (failed).png +0 -0
  61. package/lib/ApiClient.d.ts +0 -46
  62. package/lib/ApiClient.js +0 -93
  63. package/lib/Context.d.ts +0 -8
  64. package/lib/Context.js +0 -18
  65. package/lib/ReactContext.d.ts +0 -7
  66. package/lib/ReactContext.js +0 -5
  67. package/lib/components/BaseComponent.d.ts +0 -9
  68. package/lib/components/BaseComponent.js +0 -29
  69. package/lib/components/LajiForm.d.ts +0 -221
  70. package/lib/components/LajiForm.js +0 -615
  71. package/lib/components/VirtualSchemaField.d.ts +0 -42
  72. package/lib/components/VirtualSchemaField.js +0 -74
  73. package/lib/components/components.d.ts +0 -119
  74. package/lib/components/components.js +0 -606
  75. package/lib/components/fields/AnnotationField.d.ts +0 -34
  76. package/lib/components/fields/AnnotationField.js +0 -242
  77. package/lib/components/fields/AnyToBooleanField.d.ts +0 -18
  78. package/lib/components/fields/AnyToBooleanField.js +0 -20
  79. package/lib/components/fields/ArrayBulkField.d.ts +0 -23
  80. package/lib/components/fields/ArrayBulkField.js +0 -82
  81. package/lib/components/fields/ArrayCombinerField.d.ts +0 -36
  82. package/lib/components/fields/ArrayCombinerField.js +0 -138
  83. package/lib/components/fields/ArrayField.d.ts +0 -39
  84. package/lib/components/fields/ArrayField.js +0 -148
  85. package/lib/components/fields/AudioArrayField.d.ts +0 -22
  86. package/lib/components/fields/AudioArrayField.js +0 -100
  87. package/lib/components/fields/AutoArrayField.d.ts +0 -24
  88. package/lib/components/fields/AutoArrayField.js +0 -56
  89. package/lib/components/fields/AutosuggestField.d.ts +0 -69
  90. package/lib/components/fields/AutosuggestField.js +0 -299
  91. package/lib/components/fields/CombinedValueDisplayField.d.ts +0 -41
  92. package/lib/components/fields/CombinedValueDisplayField.js +0 -100
  93. package/lib/components/fields/ConditionalOnChangeField.d.ts +0 -42
  94. package/lib/components/fields/ConditionalOnChangeField.js +0 -107
  95. package/lib/components/fields/ConditionalUiSchemaField.d.ts +0 -123
  96. package/lib/components/fields/ConditionalUiSchemaField.js +0 -143
  97. package/lib/components/fields/ContextInjectionField.d.ts +0 -24
  98. package/lib/components/fields/ContextInjectionField.js +0 -68
  99. package/lib/components/fields/DataLeakerField.d.ts +0 -40
  100. package/lib/components/fields/DataLeakerField.js +0 -68
  101. package/lib/components/fields/DefaultValueArrayField.d.ts +0 -34
  102. package/lib/components/fields/DefaultValueArrayField.js +0 -59
  103. package/lib/components/fields/DependentBooleanField.d.ts +0 -38
  104. package/lib/components/fields/DependentBooleanField.js +0 -87
  105. package/lib/components/fields/DependentDisableField.d.ts +0 -35
  106. package/lib/components/fields/DependentDisableField.js +0 -71
  107. package/lib/components/fields/EnumRangeArrayField.d.ts +0 -27
  108. package/lib/components/fields/EnumRangeArrayField.js +0 -115
  109. package/lib/components/fields/ExtraLabelRowField.d.ts +0 -38
  110. package/lib/components/fields/ExtraLabelRowField.js +0 -100
  111. package/lib/components/fields/FakePropertyField.d.ts +0 -18
  112. package/lib/components/fields/FakePropertyField.js +0 -48
  113. package/lib/components/fields/FilterArrayField.d.ts +0 -73
  114. package/lib/components/fields/FilterArrayField.js +0 -121
  115. package/lib/components/fields/FlatField.d.ts +0 -29
  116. package/lib/components/fields/FlatField.js +0 -171
  117. package/lib/components/fields/GeocoderField.d.ts +0 -47
  118. package/lib/components/fields/GeocoderField.js +0 -372
  119. package/lib/components/fields/GridLayoutField.d.ts +0 -18
  120. package/lib/components/fields/GridLayoutField.js +0 -32
  121. package/lib/components/fields/HiddenField.d.ts +0 -10
  122. package/lib/components/fields/HiddenField.js +0 -11
  123. package/lib/components/fields/ImageArrayField.d.ts +0 -172
  124. package/lib/components/fields/ImageArrayField.js +0 -697
  125. package/lib/components/fields/ImageDisplayField.d.ts +0 -18
  126. package/lib/components/fields/ImageDisplayField.js +0 -44
  127. package/lib/components/fields/InitiallyHiddenField.d.ts +0 -21
  128. package/lib/components/fields/InitiallyHiddenField.js +0 -58
  129. package/lib/components/fields/InjectDefaultValueField.d.ts +0 -37
  130. package/lib/components/fields/InjectDefaultValueField.js +0 -68
  131. package/lib/components/fields/InjectField.d.ts +0 -46
  132. package/lib/components/fields/InjectField.js +0 -88
  133. package/lib/components/fields/InputWithDefaultValueButtonField.d.ts +0 -25
  134. package/lib/components/fields/InputWithDefaultValueButtonField.js +0 -61
  135. package/lib/components/fields/LocalityField.d.ts +0 -22
  136. package/lib/components/fields/LocalityField.js +0 -94
  137. package/lib/components/fields/LocationChooserField.d.ts +0 -27
  138. package/lib/components/fields/LocationChooserField.js +0 -440
  139. package/lib/components/fields/MapArrayField.d.ts +0 -78
  140. package/lib/components/fields/MapArrayField.js +0 -1783
  141. package/lib/components/fields/MapField.d.ts +0 -48
  142. package/lib/components/fields/MapField.js +0 -434
  143. package/lib/components/fields/MultiAnyToBooleanField.d.ts +0 -25
  144. package/lib/components/fields/MultiAnyToBooleanField.js +0 -100
  145. package/lib/components/fields/MultiArrayField.d.ts +0 -53
  146. package/lib/components/fields/MultiArrayField.js +0 -224
  147. package/lib/components/fields/MultiLanguageField.d.ts +0 -13
  148. package/lib/components/fields/MultiLanguageField.js +0 -52
  149. package/lib/components/fields/MultiTagArrayField.d.ts +0 -36
  150. package/lib/components/fields/MultiTagArrayField.js +0 -142
  151. package/lib/components/fields/NamedPlaceChooserField.d.ts +0 -29
  152. package/lib/components/fields/NamedPlaceChooserField.js +0 -380
  153. package/lib/components/fields/NamedPlaceSaverField.d.ts +0 -29
  154. package/lib/components/fields/NamedPlaceSaverField.js +0 -237
  155. package/lib/components/fields/NestField.d.ts +0 -148
  156. package/lib/components/fields/NestField.js +0 -289
  157. package/lib/components/fields/ObjectField.d.ts +0 -2
  158. package/lib/components/fields/ObjectField.js +0 -119
  159. package/lib/components/fields/PdfArrayField.d.ts +0 -21
  160. package/lib/components/fields/PdfArrayField.js +0 -40
  161. package/lib/components/fields/PrefillingArrayField.d.ts +0 -22
  162. package/lib/components/fields/PrefillingArrayField.js +0 -65
  163. package/lib/components/fields/SchemaField.d.ts +0 -7
  164. package/lib/components/fields/SchemaField.js +0 -109
  165. package/lib/components/fields/ScopeField.d.ts +0 -85
  166. package/lib/components/fields/ScopeField.js +0 -521
  167. package/lib/components/fields/SectionArrayField.d.ts +0 -38
  168. package/lib/components/fields/SectionArrayField.js +0 -618
  169. package/lib/components/fields/SelectTreeField.d.ts +0 -39
  170. package/lib/components/fields/SelectTreeField.js +0 -143
  171. package/lib/components/fields/SingleActiveArrayField.d.ts +0 -49
  172. package/lib/components/fields/SingleActiveArrayField.js +0 -974
  173. package/lib/components/fields/SingleItemArrayField.d.ts +0 -15
  174. package/lib/components/fields/SingleItemArrayField.js +0 -60
  175. package/lib/components/fields/SortArrayField.d.ts +0 -73
  176. package/lib/components/fields/SortArrayField.js +0 -351
  177. package/lib/components/fields/SplitField.d.ts +0 -28
  178. package/lib/components/fields/SplitField.js +0 -65
  179. package/lib/components/fields/StringToArrayField.d.ts +0 -24
  180. package/lib/components/fields/StringToArrayField.js +0 -48
  181. package/lib/components/fields/SumField.d.ts +0 -35
  182. package/lib/components/fields/SumField.js +0 -83
  183. package/lib/components/fields/TableField.d.ts +0 -18
  184. package/lib/components/fields/TableField.js +0 -136
  185. package/lib/components/fields/TagArrayField.d.ts +0 -38
  186. package/lib/components/fields/TagArrayField.js +0 -128
  187. package/lib/components/fields/ToggleAdditionalArrayFieldsField.d.ts +0 -26
  188. package/lib/components/fields/ToggleAdditionalArrayFieldsField.js +0 -81
  189. package/lib/components/fields/UiFieldApplierField.d.ts +0 -30
  190. package/lib/components/fields/UiFieldApplierField.js +0 -106
  191. package/lib/components/fields/UiFieldMapperArrayField.d.ts +0 -42
  192. package/lib/components/fields/UiFieldMapperArrayField.js +0 -121
  193. package/lib/components/fields/UnitCountShorthandField.d.ts +0 -22
  194. package/lib/components/fields/UnitCountShorthandField.js +0 -149
  195. package/lib/components/fields/UnitListShorthandArrayField.d.ts +0 -26
  196. package/lib/components/fields/UnitListShorthandArrayField.js +0 -108
  197. package/lib/components/fields/UnitShorthandField.d.ts +0 -32
  198. package/lib/components/fields/UnitShorthandField.js +0 -220
  199. package/lib/components/templates/ArrayFieldTemplate.d.ts +0 -85
  200. package/lib/components/templates/ArrayFieldTemplate.js +0 -417
  201. package/lib/components/templates/BaseInputTemplate.d.ts +0 -11
  202. package/lib/components/templates/BaseInputTemplate.js +0 -80
  203. package/lib/components/templates/DescriptionField.d.ts +0 -1
  204. package/lib/components/templates/DescriptionField.js +0 -37
  205. package/lib/components/templates/ErrorListTemplate.d.ts +0 -9
  206. package/lib/components/templates/ErrorListTemplate.js +0 -95
  207. package/lib/components/templates/FieldTemplate.d.ts +0 -6
  208. package/lib/components/templates/FieldTemplate.js +0 -112
  209. package/lib/components/templates/ObjectFieldTemplate.d.ts +0 -7
  210. package/lib/components/templates/ObjectFieldTemplate.js +0 -66
  211. package/lib/components/templates/TitleField.d.ts +0 -9
  212. package/lib/components/templates/TitleField.js +0 -51
  213. package/lib/components/widgets/AnyToBooleanWidget.d.ts +0 -20
  214. package/lib/components/widgets/AnyToBooleanWidget.js +0 -49
  215. package/lib/components/widgets/AutosuggestWidget.d.ts +0 -66
  216. package/lib/components/widgets/AutosuggestWidget.js +0 -1127
  217. package/lib/components/widgets/CheckboxWidget.d.ts +0 -37
  218. package/lib/components/widgets/CheckboxWidget.js +0 -139
  219. package/lib/components/widgets/DateTimeWidget.d.ts +0 -62
  220. package/lib/components/widgets/DateTimeWidget.js +0 -251
  221. package/lib/components/widgets/DateWidget.d.ts +0 -23
  222. package/lib/components/widgets/DateWidget.js +0 -41
  223. package/lib/components/widgets/HiddenWidget.d.ts +0 -15
  224. package/lib/components/widgets/HiddenWidget.js +0 -19
  225. package/lib/components/widgets/ImageSelectWidget.d.ts +0 -14
  226. package/lib/components/widgets/ImageSelectWidget.js +0 -57
  227. package/lib/components/widgets/InformalTaxonGroupChooserWidget.d.ts +0 -43
  228. package/lib/components/widgets/InformalTaxonGroupChooserWidget.js +0 -237
  229. package/lib/components/widgets/InputGroupWidget.d.ts +0 -21
  230. package/lib/components/widgets/InputGroupWidget.js +0 -36
  231. package/lib/components/widgets/InputWithDefaultValueButtonWidget.d.ts +0 -21
  232. package/lib/components/widgets/InputWithDefaultValueButtonWidget.js +0 -47
  233. package/lib/components/widgets/NumberWidget.d.ts +0 -13
  234. package/lib/components/widgets/NumberWidget.js +0 -21
  235. package/lib/components/widgets/PlainTextWidget.d.ts +0 -12
  236. package/lib/components/widgets/PlainTextWidget.js +0 -24
  237. package/lib/components/widgets/SelectWidget.d.ts +0 -52
  238. package/lib/components/widgets/SelectWidget.js +0 -158
  239. package/lib/components/widgets/SeparatedDateTimeWidget.d.ts +0 -19
  240. package/lib/components/widgets/SeparatedDateTimeWidget.js +0 -59
  241. package/lib/components/widgets/TaxonImageWidget.d.ts +0 -13
  242. package/lib/components/widgets/TaxonImageWidget.js +0 -30
  243. package/lib/components/widgets/TextSelectWidget.d.ts +0 -25
  244. package/lib/components/widgets/TextSelectWidget.js +0 -94
  245. package/lib/components/widgets/TextareaWidget.d.ts +0 -32
  246. package/lib/components/widgets/TextareaWidget.js +0 -87
  247. package/lib/components/widgets/TimeWidget.d.ts +0 -11
  248. package/lib/components/widgets/TimeWidget.js +0 -19
  249. package/lib/components/widgets/URLWidget.d.ts +0 -14
  250. package/lib/components/widgets/URLWidget.js +0 -12
  251. package/lib/components/widgets/UpperCaseWidget.d.ts +0 -13
  252. package/lib/components/widgets/UpperCaseWidget.js +0 -21
  253. package/lib/index.d.ts +0 -20
  254. package/lib/index.js +0 -50
  255. package/lib/services/blocker-service.d.ts +0 -11
  256. package/lib/services/blocker-service.js +0 -55
  257. package/lib/services/custom-event-service.d.ts +0 -17
  258. package/lib/services/custom-event-service.js +0 -35
  259. package/lib/services/dom-id-service.d.ts +0 -8
  260. package/lib/services/dom-id-service.js +0 -30
  261. package/lib/services/focus-service.d.ts +0 -13
  262. package/lib/services/focus-service.js +0 -60
  263. package/lib/services/id-service.d.ts +0 -22
  264. package/lib/services/id-service.js +0 -130
  265. package/lib/services/key-handler-service.d.ts +0 -56
  266. package/lib/services/key-handler-service.js +0 -184
  267. package/lib/services/root-instance-service.d.ts +0 -25
  268. package/lib/services/root-instance-service.js +0 -49
  269. package/lib/services/settings-service.d.ts +0 -34
  270. package/lib/services/settings-service.js +0 -154
  271. package/lib/services/singleton-map-service.d.ts +0 -23
  272. package/lib/services/singleton-map-service.js +0 -44
  273. package/lib/services/submit-hook-service.d.ts +0 -24
  274. package/lib/services/submit-hook-service.js +0 -73
  275. package/lib/styles.js +0 -4
  276. package/lib/themes/bs3.d.ts +0 -3
  277. package/lib/themes/bs3.js +0 -133
  278. package/lib/themes/bs5.d.ts +0 -3
  279. package/lib/themes/bs5.js +0 -111
  280. package/lib/themes/glyphicon-fa-mapping.d.ts +0 -3
  281. package/lib/themes/glyphicon-fa-mapping.js +0 -271
  282. package/lib/themes/stub.d.ts +0 -3
  283. package/lib/themes/stub.js +0 -82
  284. package/lib/themes/theme.d.ts +0 -233
  285. package/lib/themes/theme.js +0 -2
  286. package/lib/translations.json +0 -847
  287. package/lib/utils.d.ts +0 -171
  288. package/lib/utils.js +0 -1191
  289. package/lib/validation.d.ts +0 -7
  290. package/lib/validation.js +0 -141
  291. package/llol +0 -10
  292. package/llol.pdf +0 -10
  293. package/playwright-report/index.html +0 -62
  294. package/q +0 -196
  295. package/rename.sh +0 -24
  296. package/trip-report.spec.ts +0 -594
  297. /package/{lib/styles.d.ts → test-export/array-spec.d.ts} +0 -0
@@ -1,521 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const React = require("react");
4
- const PropTypes = require("prop-types");
5
- const merge = require("deepmerge");
6
- const equals = require("deep-equal");
7
- const Spinner = require("react-spinner");
8
- const components_1 = require("../components");
9
- const utils_1 = require("../../utils");
10
- const Context_1 = require("../../Context");
11
- const ReactContext_1 = require("../../ReactContext");
12
- const ConditionalUiSchemaField_1 = require("./ConditionalUiSchemaField");
13
- const utils_2 = require("@rjsf/utils");
14
- const scopeFieldSettings = {
15
- taxonGroups: {
16
- translate: (props, taxonGroup) => {
17
- return props.formContext.apiClient.fetchCached("/informal-taxon-groups/" + taxonGroup).then((response) => {
18
- return response.name;
19
- }).catch(() => {
20
- return "";
21
- });
22
- },
23
- }
24
- };
25
- /**
26
- * Field with fields, which are shown according to recursive scope.
27
- * uiSchema = {"ui:options": {
28
- * additionalsGroupingPath: path to the field scope that defines groups
29
- * additionalsGroupsTranslator: one of scopeFieldsSettings translator
30
- * additionalsPersistenceKey: instances with same persistence id use the same additional fields
31
- * additionalsPersistenceField: form data property value for more fine grained persistence behaviour
32
- * uiSchema: <uiSchema> (ui schema for inner schema)
33
- * fields: [<string>] (fields that are always shown)
34
- * fieldScopes: {
35
- * fieldName: {
36
- * fieldValue: {
37
- * fields: [<string>] (fields that are shown if fieldName[fieldValue} == true)
38
- * additionalFields: [<string>] (if grouping is enabled, additional fields are shown only if selected from the list)
39
- * excludeFields: [<string>] (exclude fields from showing)
40
- * excludeFields: [<string>] (fields that are shown by default)
41
- * refs: [<string>] (root definitions that are merged recursively to this fieldScope)
42
- * uiSchema: <uiSchema> (merged recursively to inner uiSchema)
43
- * uiSchemaMergeType: See documentation for ConditionalUiSchemaField
44
- * fieldScopes: {fieldName: <fieldScope>, fieldName2 ...}
45
- * },
46
- * fieldValue2, ...
47
- * }
48
- * },
49
- * definitions: {
50
- * defName: <fieldScope>,
51
- * defname2: ...
52
- * }
53
- * }
54
- *
55
- * Field scope values accept asterisk (*) and plus (+) as field scope selector.
56
- */
57
- class ScopeField extends React.Component {
58
- constructor(props) {
59
- super(props);
60
- this.getAdditionalPersistenceValue = (props, includeUndefined = true) => {
61
- const { additionalsPersistenceField, additionalPersistenceContextKey } = utils_1.getUiOptions(props.uiSchema);
62
- let formDataItem = props.formData[additionalsPersistenceField];
63
- if (additionalPersistenceContextKey && (formDataItem === undefined || Array.isArray(formDataItem) && formDataItem.length === 0)) {
64
- formDataItem = Context_1.default(this.props.formContext.contextId)[additionalPersistenceContextKey];
65
- }
66
- let items = (Array.isArray(formDataItem) ? formDataItem : [formDataItem]);
67
- if (includeUndefined)
68
- items = ["undefined", ...items];
69
- return items;
70
- };
71
- this.getSchemasAndAdditionals = (props, state) => {
72
- let { schema, uiSchema, formData } = props;
73
- let additionalFields = (state && state.additionalFields) ? Object.assign({}, state.additionalFields) : {};
74
- Object.keys(additionalFields).forEach(key => {
75
- if (!props.schema.properties[key]) {
76
- delete additionalFields[key];
77
- }
78
- });
79
- let defaultFields = (state && state.defaultFields) ? Object.assign({}, state.defaultFields) : {};
80
- const options = utils_1.getUiOptions(uiSchema);
81
- let { fields, definitions, glyphFields = [], geometryField = "unitGathering_geometry", taxonField } = options;
82
- let generatedUiSchema = utils_1.getInnerUiSchema(uiSchema);
83
- let fieldsToShow = {};
84
- (fields || []).forEach(field => {
85
- fieldsToShow[field] = schema.properties[field];
86
- });
87
- let hasSetLocation = false;
88
- glyphFields.reduce((additionalFields, { show, open, fn }) => {
89
- if (fn === "setLocation") {
90
- hasSetLocation = true;
91
- }
92
- if (!(show in additionalFields) && show && open) {
93
- additionalFields[show] = open;
94
- }
95
- return additionalFields;
96
- }, additionalFields);
97
- function addFieldSelectorsValues(scopes, fieldSelector, fieldSelectorValue) {
98
- let fieldScope = scopes[fieldSelector][fieldSelectorValue];
99
- if (!fieldScope)
100
- return;
101
- while (fieldScope.refs) {
102
- let refs = fieldScope.refs;
103
- fieldScope = Object.assign(Object.assign({}, fieldScope), { refs: undefined });
104
- refs.forEach(ref => {
105
- fieldScope = merge(fieldScope, definitions[ref]);
106
- });
107
- }
108
- const { excludeFields = [], fields: _fields = [], defaultFields: _defaultFields = [] } = fieldScope;
109
- excludeFields.forEach(fieldName => {
110
- delete fieldsToShow[fieldName];
111
- });
112
- _defaultFields.forEach(fieldName => {
113
- if (additionalFields[fieldName] !== false)
114
- fieldsToShow[fieldName] = schema.properties[fieldName];
115
- });
116
- _fields.forEach((fieldName) => {
117
- fieldsToShow[fieldName] = schema.properties[fieldName];
118
- if (additionalFields[fieldName]) {
119
- delete additionalFields[fieldName];
120
- }
121
- });
122
- if (fieldScope.uiSchema) {
123
- const { uiSchemaMergeType = "merge" } = fieldScope;
124
- generatedUiSchema = ConditionalUiSchemaField_1.computeUiSchema(generatedUiSchema, { type: uiSchemaMergeType, uiSchema: fieldScope.uiSchema });
125
- }
126
- if (fieldScope.fieldScopes) {
127
- addFieldScopeFieldsToFieldsToShow(fieldScope);
128
- }
129
- }
130
- const that = this;
131
- function addFieldScopeFieldsToFieldsToShow(fieldScope) {
132
- if (!fieldScope)
133
- return;
134
- let scopes = fieldScope.fieldScopes;
135
- if (scopes)
136
- Object.keys(scopes).forEach(fieldSelector => {
137
- let fieldSelectorValues = formData[fieldSelector];
138
- if (!fieldSelectorValues || Array.isArray(fieldSelectorValues) && !fieldSelectorValues.length) {
139
- fieldSelectorValues = that.getAdditionalPersistenceValue(props);
140
- }
141
- if (!Array.isArray(fieldSelectorValues))
142
- fieldSelectorValues = [fieldSelectorValues];
143
- if (scopes[fieldSelector]["+"] && fieldSelectorValues.length > 0 && fieldSelectorValues.some(_fieldSelectorValue => _fieldSelectorValue !== "undefined" && utils_1.hasData(_fieldSelectorValue) && !utils_1.isDefaultData(_fieldSelectorValue, schema.properties[fieldSelector]))) {
144
- addFieldSelectorsValues(scopes, fieldSelector, "+");
145
- }
146
- if (scopes[fieldSelector]["*"]) {
147
- addFieldSelectorsValues(scopes, fieldSelector, "*");
148
- }
149
- fieldSelectorValues.forEach(fieldSelectorValue => {
150
- if (utils_1.hasData(fieldSelectorValue) && !utils_1.isDefaultData(fieldSelectorValue, schema.properties[fieldSelector].type === "array" ? schema.properties[fieldSelector].items : schema.properties[fieldSelector])) {
151
- addFieldSelectorsValues(scopes, fieldSelector, fieldSelectorValue);
152
- }
153
- });
154
- });
155
- }
156
- function findScopedFields(fieldScope = {}, _fields = {}) {
157
- const { fields = [], additionalFields = [], fieldScopes = {} } = fieldScope;
158
- [...fields, ...additionalFields].forEach(f => {
159
- _fields[f] = true;
160
- });
161
- Object.keys(fieldScopes).forEach(f => Object.keys(fieldScopes[f]).forEach(_f => findScopedFields(fieldScopes[f][_f], _fields)));
162
- return _fields;
163
- }
164
- // If no root fields defined, show all fields that aren't in any scopes' fields or additional fields.
165
- if (!fields) {
166
- const scopedFields = findScopedFields(options);
167
- glyphFields.forEach(({ show, open }) => {
168
- if (open === false) {
169
- scopedFields[show] = true;
170
- }
171
- });
172
- fieldsToShow = Object.keys(props.schema.properties).reduce((_fields, f) => {
173
- if (!scopedFields[f]) {
174
- _fields[f] = props.schema.properties[f];
175
- }
176
- return _fields;
177
- }, {});
178
- }
179
- addFieldScopeFieldsToFieldsToShow(options);
180
- if (additionalFields) {
181
- Object.keys(additionalFields).filter(field => additionalFields[field]).forEach((property) => {
182
- if (additionalFields[property]) {
183
- fieldsToShow[property] = props.schema.properties[property];
184
- }
185
- });
186
- }
187
- if (formData) {
188
- Object.keys(formData).forEach((property) => {
189
- if (!schema.properties[property])
190
- return;
191
- const isDefault = utils_1.isDefaultData(formData[property], schema.properties[property]);
192
- if (!isDefault) {
193
- fieldsToShow[property] = props.schema.properties[property];
194
- }
195
- });
196
- }
197
- Object.keys(schema.properties).forEach(prop => {
198
- if (!fieldsToShow[prop]) {
199
- generatedUiSchema[prop] = { "ui:field": "HiddenField" };
200
- }
201
- });
202
- if (hasSetLocation) {
203
- console.warn("ScopeField's glyphField fn 'setLocation' is deprecated and will be removed in the future. The functionality is separated to a new component function 'LocationChooserField', use it instead.");
204
- const locationFn = {
205
- "ui:field": "LocationChooserField",
206
- "ui:options": {
207
- geometryField,
208
- taxonField
209
- }
210
- };
211
- const uiFunctions = generatedUiSchema["ui:functions"]
212
- ? utils_1.isObject(generatedUiSchema["ui:functions"])
213
- ? [generatedUiSchema["ui:functions"], locationFn]
214
- : [...generatedUiSchema["ui:functions"], locationFn]
215
- : [locationFn];
216
- generatedUiSchema = Object.assign(Object.assign({}, generatedUiSchema), { "ui:functions": uiFunctions });
217
- }
218
- return {
219
- schema: schema,
220
- uiSchema: generatedUiSchema,
221
- additionalFields,
222
- defaultFields,
223
- fieldsToShow
224
- };
225
- };
226
- this.onToggleAdditionals = () => {
227
- this.setState({ additionalsOpen: !this.state.additionalsOpen });
228
- };
229
- this.renderAdditionalsButtons = () => {
230
- const glyphButtons = this.renderGlyphFields();
231
- if (!this.state.includeAdditionalFieldsChooserButton || Object.keys(this.props.formData || {}).length === 0) {
232
- if (glyphButtons) {
233
- return glyphButtons;
234
- }
235
- return [];
236
- }
237
- const { additionalsGroupingPath } = utils_1.getUiOptions(this.props.uiSchema);
238
- let additionalProperties = {};
239
- Object.keys(this.props.schema.properties).forEach(property => {
240
- if (!this.state.fieldsToShow[property] ||
241
- (this.state.fieldsToShow[property] && this.state.additionalFields[property]))
242
- additionalProperties[property] = this.props.schema.properties[property];
243
- });
244
- return [
245
- additionalsGroupingPath
246
- ? this.renderFieldsModal(additionalProperties)
247
- : this.renderFieldsDropdown(additionalProperties),
248
- ...(glyphButtons ? glyphButtons : [])
249
- ];
250
- };
251
- this.onSelect = () => {
252
- this.preventCloseDropdown = true;
253
- };
254
- this.onToggle = (isOpen) => {
255
- if (!this.preventCloseDropdown)
256
- this.onToggleAdditionals(isOpen);
257
- this.preventCloseDropdown = false;
258
- };
259
- this.renderFieldsModal = (additionalProperties) => {
260
- const { translations } = this.props.formContext;
261
- let list = [];
262
- const options = utils_1.getUiOptions(this.props.uiSchema);
263
- const { additionalsGroupingPath } = options;
264
- let groupTranslations = this.state.additionalsGroupsTranslations;
265
- const groups = additionalsGroupingPath ? utils_1.parseJSONPointer(options, additionalsGroupingPath) : {};
266
- const additionalsPersistenceValue = this.getAdditionalPersistenceValue(this.props);
267
- let groupNames = Object.keys(groups);
268
- if (additionalsPersistenceValue)
269
- groupNames = groupNames.sort((a, b) => additionalsPersistenceValue.indexOf(b) - additionalsPersistenceValue.indexOf(a));
270
- groupNames.forEach(groupName => {
271
- list.push(React.createElement(_ListGroup, { key: groupName, group: groups[groupName], groupName: groupName, groupTranslations: groupTranslations, additionalProperties: additionalProperties, additionalPropertiesToList: this.additionalPropertiesToList, propertyIsIncluded: this.propertyIsIncluded, schema: this.props.schema, toggleAdditionalProperty: this.toggleAdditionalProperty }));
272
- });
273
- const { Modal } = this.context.theme;
274
- if (this.state.additionalsOpen)
275
- this.modal = (React.createElement(Modal, { key: "fields-modal", show: true, onHide: this.onToggleAdditionals, dialogClassName: "laji-form scope-field-modal" },
276
- React.createElement(Modal.Header, { closeButton: true },
277
- React.createElement(Modal.Title, null, translations.SelectMoreFields)),
278
- React.createElement(Modal.Body, null, list)));
279
- return this.renderFieldsButton();
280
- };
281
- this.renderFieldsButton = (bsRole) => {
282
- const { OverlayTrigger, Tooltip } = this.context.theme;
283
- const tooltip = (React.createElement(Tooltip, { id: `${this.props.idSchema.$id}-additionals-tooltip` }, this.props.formContext.translations.SelectMoreFields));
284
- return (React.createElement(OverlayTrigger, { key: `${this.props.idSchema.$id}-scope`, overlay: tooltip, placement: "left", bsRole: bsRole },
285
- React.createElement(components_1.GlyphButton, { glyph: "cog", onClick: this.onToggleAdditionals, id: `${this.props.idSchema.$id}-additionals`, variant: "primary" })));
286
- };
287
- this.renderGlyphFields = () => {
288
- const { glyphFields } = utils_1.getUiOptions(this.props.uiSchema);
289
- return glyphFields ?
290
- glyphFields.filter(settings => !settings.fn || settings.fn !== "setLocation").map((settings, i) => React.createElement(GlyphField, { key: i, settings: settings, idSchema: this.props.idSchema, formData: this.props.formData, schema: this.props.schema, registry: this.props.registry, isIncluded: this.propertyIsIncluded(settings.show), toggleAdditionalProperty: this.toggleAdditionalProperty })) : null;
291
- };
292
- this.propertyIsIncluded = (property) => {
293
- const { additionalFields } = this.state;
294
- const isIncluded = additionalFields[property] === true || this.state.fieldsToShow[property];
295
- return !!isIncluded;
296
- };
297
- this.toggleAdditionalProperty = (fields) => {
298
- const { additionalsPersistenceField, additionalsPersistenceKey } = utils_1.getUiOptions(this.props.uiSchema);
299
- if (!Array.isArray(fields))
300
- fields = [fields];
301
- const additionalFields = fields.reduce((additionalFields, field) => {
302
- return Object.assign(Object.assign({}, additionalFields), { [field]: !this.propertyIsIncluded(field) });
303
- }, this.state.additionalFields);
304
- if (this._globals) {
305
- const additionalsPersistenceVal = this.getAdditionalPersistenceValue(this.props, !"don't include undefined");
306
- let globalsEntry = this._globals || {};
307
- if (additionalsPersistenceField) {
308
- let additionalsKeys = this.props.schema.properties[additionalsPersistenceField].type === "array"
309
- ? additionalsPersistenceVal
310
- : [additionalsPersistenceVal];
311
- if (additionalsKeys.length === 0)
312
- additionalsKeys = ["undefined"];
313
- additionalsKeys.forEach(persistenceKey => {
314
- globalsEntry[persistenceKey] = additionalFields;
315
- });
316
- this.props.formContext.globals[`scopeField_${additionalsPersistenceKey}`] = globalsEntry;
317
- }
318
- else if (additionalsPersistenceKey) {
319
- this.props.formContext.globals[`scopeField_${additionalsPersistenceKey}`] = additionalFields;
320
- }
321
- }
322
- this.setState(Object.assign({ additionalFields }, this.getSchemasAndAdditionals(this.props, Object.assign(Object.assign({}, this.state), { additionalFields }))));
323
- };
324
- this.additionalPropertiesToList = (properties, ElemType) => {
325
- const titles = utils_1.getUiOptions(this.props.uiSchema).titles || {};
326
- return utils_2.orderProperties(Object.keys(properties), this.props.uiSchema["ui:order"])
327
- .map(property => {
328
- const isIncluded = this.propertyIsIncluded(property);
329
- const hasData = utils_1.propertyHasData(property, this.props.formData) && (!this.props.formData || !utils_1.isDefaultData(this.props.formData[property], this.props.schema.properties[property]));
330
- if (!this.propertyTogglers) {
331
- this.propertyTogglers = {};
332
- }
333
- if (!this.propertyTogglers[property]) {
334
- this.propertyTogglers[property] = () => this.toggleAdditionalProperty(property);
335
- }
336
- return (React.createElement(ElemType, { key: property, disabled: hasData, active: isIncluded, onClick: this.propertyTogglers[property] }, titles[property] || properties[property].title || property));
337
- });
338
- };
339
- this.translateAdditionalsGroups = (props) => {
340
- let options = utils_1.getUiOptions(props.uiSchema);
341
- const { additionalsGroupingPath, additionalsGroupsTranslator } = options;
342
- if (!additionalsGroupingPath)
343
- return;
344
- const groups = utils_1.parseJSONPointer(options, additionalsGroupingPath);
345
- const groupNames = Object.keys(groups).filter(groupName => !utils_1.isNullOrUndefined(groups[groupName]));
346
- let translations = {};
347
- let translationsToKeys = {};
348
- let translationCount = 0;
349
- groupNames.forEach(groupName => {
350
- const title = groups[groupName].title;
351
- const promise = (!utils_1.isNullOrUndefined(title)) ?
352
- new Promise(resolve => resolve(title)) :
353
- scopeFieldSettings[additionalsGroupsTranslator].translate(props, groupName);
354
- promise.then(translation => {
355
- translations[groupName] = translation;
356
- translationsToKeys[translation] = groupName;
357
- translationCount++;
358
- if (this.mounted && translationCount == groupNames.length) {
359
- this.setState({
360
- additionalsGroupsTranslations: translations,
361
- additionalsGroupsTranslationsToKeys: translationsToKeys
362
- });
363
- }
364
- });
365
- });
366
- };
367
- this.props.formContext.services.settings.bind(this, props);
368
- this.state = this.getStateFromProps(props);
369
- }
370
- UNSAFE_componentWillReceiveProps(props) {
371
- const state = this.getStateFromProps(props);
372
- if (state)
373
- this.setState(state);
374
- }
375
- componentDidMount() {
376
- this.mounted = true;
377
- }
378
- componentWillUnmount() {
379
- this.mounted = false;
380
- }
381
- render() {
382
- const SchemaField = this.props.registry.fields.SchemaField;
383
- const { additionalsGroupingPath } = utils_1.getUiOptions(this.props.uiSchema);
384
- let uiSchema = Object.assign(Object.assign({}, this.state.uiSchema), { "ui:buttons": [
385
- ...(this.props.uiSchema["ui:buttons"] || []),
386
- ...this.renderAdditionalsButtons()
387
- ] });
388
- const addButton = button => {
389
- uiSchema = Object.assign(Object.assign({}, uiSchema), { "ui:buttons": [
390
- ...uiSchema["ui:buttons"],
391
- button
392
- ] });
393
- };
394
- if (this.state.additionalsOpen && additionalsGroupingPath) {
395
- addButton(this.modal);
396
- }
397
- return React.createElement(SchemaField, Object.assign({}, this.props, this.state, { uiSchema: uiSchema }));
398
- }
399
- componentDidUpdate(prevProps, prevState) {
400
- if (this.state.additionalsOpen
401
- && (!this.state.additionalsGroupsTranslations || prevProps.formContext.lang !== this.props.formContext.lang ||
402
- utils_1.getUiOptions(prevProps.uiSchema).additionalsGroupsTranslator !== utils_1.getUiOptions(this.props.uiSchema).additionalsGroupsTranslator)) {
403
- this.translateAdditionalsGroups(this.props);
404
- }
405
- if (!equals(prevState.fieldsToShow, this.state.fieldsToShow)) {
406
- this.props.formContext.utils.syncScroll();
407
- }
408
- }
409
- getStateFromProps(props) {
410
- const options = utils_1.getUiOptions(props.uiSchema);
411
- const includeAdditionalFieldsChooserButton = !!options.includeAdditionalFieldsChooserButton;
412
- let state = {
413
- includeAdditionalFieldsChooserButton
414
- };
415
- const { additionalsPersistenceField, additionalsPersistenceKey } = utils_1.getUiOptions(props.uiSchema);
416
- let additionalFields = additionalsPersistenceField
417
- ? {}
418
- : (this.state ? this.state.additionalFields : {});
419
- if (additionalsPersistenceKey) {
420
- if (!props.formContext.globals[`scopeField_${additionalsPersistenceKey}`]) {
421
- props.formContext.globals[`scopeField_${additionalsPersistenceKey}`] = {};
422
- }
423
- this._globals = props.formContext.globals[`scopeField_${additionalsPersistenceKey}`];
424
- let additionalsToAdd = {};
425
- if (additionalsPersistenceField) {
426
- const additionalPersistenceValue = this.getAdditionalPersistenceValue(props);
427
- additionalPersistenceValue.forEach(item => {
428
- if (this._globals && this._globals[item])
429
- additionalsToAdd = Object.assign(Object.assign({}, additionalsToAdd), this._globals[item]);
430
- });
431
- }
432
- else {
433
- if (this._globals)
434
- additionalsToAdd = this._globals;
435
- }
436
- additionalFields = Object.assign(Object.assign({}, additionalFields), additionalsToAdd);
437
- }
438
- state.additionalFields = additionalFields;
439
- state = Object.assign(Object.assign({}, state), this.getSchemasAndAdditionals(props, state));
440
- return state;
441
- }
442
- renderFieldsDropdown(additionalProperties) {
443
- const { MenuItem, Glyphicon, Dropdown } = this.context.theme;
444
- return (React.createElement("div", { key: "scope-additionals-dropdown" },
445
- React.createElement(Dropdown, { pullRight: true, id: this.props.idSchema.$id + "-additionals", open: this.state.additionalsOpen, onToggle: this.onToggle },
446
- React.createElement(Dropdown.Toggle, { noCaret: true, variant: "primary" },
447
- React.createElement(Glyphicon, { glyph: "cog" })),
448
- React.createElement(Dropdown.Menu, { onSelect: this.onSelect }, this.additionalPropertiesToList(additionalProperties, MenuItem)))));
449
- }
450
- }
451
- exports.default = ScopeField;
452
- ScopeField.contextType = ReactContext_1.default;
453
- ScopeField.propTypes = {
454
- uiSchema: PropTypes.shape({
455
- "ui:options": PropTypes.shape({
456
- includeAdditionalFieldsChooserButton: PropTypes.boolean,
457
- additionalsGroupingPath: PropTypes.string,
458
- additionalsGroupsTranslator: PropTypes.oneOf(Object.keys(scopeFieldSettings)),
459
- additionalsPersistenceKey: PropTypes.string,
460
- additionalsPersistenceField: PropTypes.string,
461
- fieldScopes: PropTypes.object,
462
- fields: PropTypes.arrayOf(PropTypes.string),
463
- definitions: PropTypes.object,
464
- uiSchema: PropTypes.object
465
- }).isRequired
466
- }).isRequired,
467
- schema: PropTypes.shape({
468
- type: PropTypes.oneOf(["object"])
469
- }).isRequired,
470
- formData: PropTypes.object.isRequired
471
- };
472
- const getGroupFields = (group, additionalProperties, schema) => {
473
- const { fields = [], additionalFields = [] } = group;
474
- const additionalFieldsDict = utils_1.dictionarify(additionalFields);
475
- let combinedFields = Object.keys(Object.assign(Object.assign({}, utils_1.dictionarify(fields)), additionalFieldsDict));
476
- let groupFields = {};
477
- combinedFields.forEach(field => {
478
- if (additionalProperties[field]) {
479
- groupFields[field] = additionalProperties[field];
480
- }
481
- else if (additionalFieldsDict[field]) {
482
- groupFields[field] = schema.properties[field];
483
- }
484
- });
485
- return groupFields;
486
- };
487
- const _ListGroup = React.memo(function _ListGroup({ group = {}, groupTranslations = {}, additionalProperties, groupName, additionalPropertiesToList, propertyIsIncluded, schema, toggleAdditionalProperty }) {
488
- const groupFields = React.useMemo(() => getGroupFields(group, additionalProperties, schema), [group, additionalProperties, schema]);
489
- const { ListGroupItem, ListGroup } = React.useContext(ReactContext_1.default).theme;
490
- let groupsList = additionalPropertiesToList(groupFields, ListGroupItem);
491
- const someActive = Object.keys(groupFields).some(propertyIsIncluded);
492
- const onListGroupClick = React.useCallback(() => {
493
- toggleAdditionalProperty(Object.keys(groupFields)
494
- .filter(field => { return propertyIsIncluded(field) === someActive; }));
495
- }, [toggleAdditionalProperty, groupFields, propertyIsIncluded, someActive]);
496
- if (!groupsList.length) {
497
- return null;
498
- }
499
- const listGroup = [
500
- React.createElement(ListGroupItem, { key: groupName + "-list", active: someActive, onClick: onListGroupClick }, groupTranslations[groupName] !== undefined
501
- ? React.createElement("strong", null, groupTranslations[groupName])
502
- : React.createElement(Spinner, { key: groupName + "-list" })),
503
- ...groupsList
504
- ];
505
- return (React.createElement("div", { key: groupName, className: "scope-field-modal-item" },
506
- React.createElement(ListGroup, null, listGroup)));
507
- });
508
- function GlyphField({ settings, idSchema, formData, schema, isIncluded, toggleAdditionalProperty }) {
509
- const { glyph, label, show } = settings;
510
- const property = show;
511
- const onButtonClick = React.useCallback(() => toggleAdditionalProperty(property), [property, toggleAdditionalProperty]);
512
- const { Tooltip, OverlayTrigger } = React.useContext(ReactContext_1.default).theme;
513
- if (!show) {
514
- return null;
515
- }
516
- const hasData = utils_1.propertyHasData(property, formData) && (!formData || !utils_1.isDefaultData(formData[property], schema.properties[property]));
517
- const tooltip = React.createElement(Tooltip, { id: `${idSchema.$id}-${property}-tooltip-${glyph}` }, label);
518
- return (React.createElement(OverlayTrigger, { key: property, overlay: tooltip, placement: "left" },
519
- React.createElement(components_1.GlyphButton, { glyph: glyph, disabled: hasData, active: isIncluded, onClick: onButtonClick })));
520
- }
521
- Context_1.default("SCHEMA_FIELD_WRAPPERS").ScopeField = true;
@@ -1,38 +0,0 @@
1
- export default class SectionArrayField extends React.Component<any, any, any> {
2
- static propTypes: {
3
- uiSchema: PropTypes.Requireable<PropTypes.InferProps<{
4
- "ui:options": PropTypes.Requireable<PropTypes.InferProps<{}>>;
5
- }>>;
6
- schema: PropTypes.Validator<PropTypes.InferProps<{
7
- type: PropTypes.Requireable<string>;
8
- }>>;
9
- formData: PropTypes.Requireable<any[]>;
10
- };
11
- static getName(): string;
12
- constructor(props: any);
13
- arrayKeyFunctions: {
14
- insert: (e: any, props: any) => void;
15
- navigateSection: (e: any, { getProps, left, right, up, goOverRow }: {
16
- getProps: any;
17
- left: any;
18
- right: any;
19
- up: any;
20
- goOverRow: any;
21
- }) => boolean | undefined;
22
- navigateArray: (e: any, { reverse, getProps, navigateCallforward, getCurrentIdx, focusByIdx, getIdToScrollAfterNavigate }: {
23
- reverse: any;
24
- getProps: any;
25
- navigateCallforward: any;
26
- getCurrentIdx: any;
27
- focusByIdx: any;
28
- getIdToScrollAfterNavigate: any;
29
- }) => boolean;
30
- };
31
- getStateFromProps(props: any): {
32
- uiSchema: any;
33
- formContext: any;
34
- registry: any;
35
- };
36
- }
37
- import * as React from "react";
38
- import * as PropTypes from "prop-types";