@luomus/laji-form 15.1.92 → 15.1.93
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/LajiForm.d.ts +256 -3
- package/lib/components/LajiForm.js +3 -128
- package/lib/components/fields/index.d.ts +76 -0
- package/lib/components/fields/index.js +160 -0
- package/lib/components/templates/index.d.ts +8 -0
- package/lib/components/templates/index.js +22 -0
- package/lib/components/widgets/index.d.ts +20 -0
- package/lib/components/widgets/index.js +46 -0
- package/package.json +1 -1
|
@@ -19,6 +19,9 @@ import RootInstanceService from "../services/root-instance-service";
|
|
|
19
19
|
import SingletonMapService from "../services/singleton-map-service";
|
|
20
20
|
import { FieldProps, HasMaybeChildren, Lang } from "../types";
|
|
21
21
|
import MultiActiveArrayService from "../services/multi-active-array-service";
|
|
22
|
+
import * as fields from "./fields";
|
|
23
|
+
import * as widgets from "./widgets";
|
|
24
|
+
import * as templates from "./templates";
|
|
22
25
|
export interface LajiFormProps extends HasMaybeChildren {
|
|
23
26
|
apiClient?: ApiClientImplementation;
|
|
24
27
|
lang?: Lang;
|
|
@@ -191,17 +194,267 @@ export default class LajiForm extends React.Component<LajiFormProps, LajiFormSta
|
|
|
191
194
|
getFields: (_fields?: {
|
|
192
195
|
[name: string]: Field;
|
|
193
196
|
}) => {
|
|
194
|
-
|
|
197
|
+
SchemaField: typeof fields.SchemaField;
|
|
198
|
+
ArrayField: typeof fields.ArrayField;
|
|
199
|
+
ObjectField: (props: any) => JSX.Element;
|
|
200
|
+
NestField: typeof fields.NestField;
|
|
201
|
+
ArrayBulkField: typeof fields.ArrayBulkField;
|
|
202
|
+
ArrayPropertySumField: typeof fields.ArrayPropertySumField;
|
|
203
|
+
ScopeField: typeof fields.ScopeField;
|
|
204
|
+
SelectTreeField: typeof fields.SelectTreeField;
|
|
205
|
+
GridLayoutField: {
|
|
206
|
+
(props: any): JSX.Element;
|
|
207
|
+
propTypes: {
|
|
208
|
+
uiSchema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
209
|
+
"ui:grid": PropTypes.Requireable<PropTypes.InferProps<{
|
|
210
|
+
lg: PropTypes.Requireable<NonNullable<number | object | null | undefined>>;
|
|
211
|
+
md: PropTypes.Requireable<NonNullable<number | object | null | undefined>>;
|
|
212
|
+
sm: PropTypes.Requireable<NonNullable<number | object | null | undefined>>;
|
|
213
|
+
xs: PropTypes.Requireable<NonNullable<number | object | null | undefined>>;
|
|
214
|
+
}>>;
|
|
215
|
+
}>>;
|
|
216
|
+
schema: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
217
|
+
type: PropTypes.Requireable<string>;
|
|
218
|
+
}>>>;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
TableField: typeof fields.TableField;
|
|
222
|
+
InjectField: typeof fields.InjectField;
|
|
223
|
+
InjectDefaultValueField: typeof fields.InjectDefaultValueField;
|
|
224
|
+
ArrayCombinerField: typeof fields.ArrayCombinerField;
|
|
225
|
+
DependentBooleanField: typeof fields.DependentBooleanField;
|
|
226
|
+
DependentDisableField: typeof fields.DependentDisableField;
|
|
227
|
+
MapArrayField: typeof fields.MapArrayField;
|
|
228
|
+
AutoArrayField: typeof fields.AutoArrayField;
|
|
229
|
+
AutosuggestField: typeof fields.AutosuggestField;
|
|
230
|
+
HiddenField: {
|
|
231
|
+
(): JSX.Element;
|
|
232
|
+
propTypes: {
|
|
233
|
+
schema: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
234
|
+
type: PropTypes.Requireable<string>;
|
|
235
|
+
}>>>;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
HiddenWithTextField: {
|
|
239
|
+
(props: FieldProps<import("../types").JSONSchemaArray<import("../types").JSONSchemaString>>): JSX.Element;
|
|
240
|
+
propTypes: {
|
|
241
|
+
uiSchema: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
242
|
+
"ui:options": PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
243
|
+
altText: PropTypes.Validator<string>;
|
|
244
|
+
}>>>;
|
|
245
|
+
uiSchema: PropTypes.Requireable<object>;
|
|
246
|
+
}>>>;
|
|
247
|
+
schema: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
248
|
+
type: PropTypes.Requireable<string>;
|
|
249
|
+
}>>>;
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
InitiallyHiddenField: typeof fields.InitiallyHiddenField;
|
|
253
|
+
ContextInjectionField: typeof fields.ContextInjectionField;
|
|
254
|
+
ImageArrayField: typeof fields.ImageArrayField;
|
|
255
|
+
SplitField: typeof fields.SplitField;
|
|
256
|
+
FlatField: typeof fields.FlatField;
|
|
257
|
+
SingleActiveArrayField: typeof fields.SingleActiveArrayField;
|
|
258
|
+
SingleItemArrayField: typeof fields.SingleItemArrayField;
|
|
259
|
+
UnitShorthandField: typeof fields.UnitShorthandField;
|
|
260
|
+
CombinedValueDisplayField: typeof fields.CombinedValueDisplayField;
|
|
261
|
+
UiFieldMapperArrayField: typeof fields.UiFieldMapperArrayField;
|
|
262
|
+
ExtraLabelRowField: typeof fields.ExtraLabelRowField;
|
|
263
|
+
SumField: typeof fields.SumField;
|
|
264
|
+
NamedPlaceChooserField: typeof fields.NamedPlaceChooserField;
|
|
265
|
+
NamedPlaceSaverField: typeof fields.NamedPlaceSaverField;
|
|
266
|
+
MapField: typeof fields.MapField;
|
|
267
|
+
GeocoderField: typeof fields.GeocoderField;
|
|
268
|
+
TagArrayField: typeof fields.TagArrayField;
|
|
269
|
+
StringToArrayField: typeof fields.StringToArrayField;
|
|
270
|
+
ConditionalOnChangeField: typeof fields.ConditionalOnChangeField;
|
|
271
|
+
ConditionalUiSchemaField: typeof fields.ConditionalUiSchemaField;
|
|
272
|
+
AnnotationField: typeof fields.AnnotationField;
|
|
273
|
+
PrefillingArrayField: typeof fields.PrefillingArrayField;
|
|
274
|
+
AnyToBooleanField: {
|
|
275
|
+
(props: any): JSX.Element;
|
|
276
|
+
propTypes: {
|
|
277
|
+
uiSchema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
278
|
+
"ui:options": PropTypes.Requireable<PropTypes.InferProps<{
|
|
279
|
+
trueValue: PropTypes.Validator<object>;
|
|
280
|
+
falseValue: PropTypes.Requireable<object>;
|
|
281
|
+
allowUndefined: PropTypes.Requireable<boolean>;
|
|
282
|
+
}>>;
|
|
283
|
+
}>>;
|
|
284
|
+
schema: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
285
|
+
type: PropTypes.Requireable<string>;
|
|
286
|
+
}>>>;
|
|
287
|
+
formData: PropTypes.Requireable<object>;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
EnumRangeArrayField: typeof fields.EnumRangeArrayField;
|
|
291
|
+
UnitListShorthandArrayField: typeof fields.UnitListShorthandArrayField;
|
|
292
|
+
LocationChooserField: typeof fields.LocationChooserField;
|
|
293
|
+
DataLeakerField: typeof fields.DataLeakerField;
|
|
294
|
+
LocalityField: typeof fields.LocalityField;
|
|
295
|
+
ImageDisplayField: typeof fields.ImageDisplayField;
|
|
296
|
+
FakePropertyField: typeof fields.FakePropertyField;
|
|
297
|
+
SectionArrayField: typeof fields.SectionArrayField;
|
|
298
|
+
MultiArrayField: typeof fields.MultiArrayField;
|
|
299
|
+
AudioArrayField: typeof fields.AudioArrayField;
|
|
300
|
+
FilterArrayField: typeof fields.FilterArrayField;
|
|
301
|
+
MultiAnyToBooleanField: typeof fields.MultiAnyToBooleanField;
|
|
302
|
+
UnitCountShorthandField: typeof fields.UnitCountShorthandField;
|
|
303
|
+
ToggleAdditionalArrayFieldsField: typeof fields.ToggleAdditionalArrayFieldsField;
|
|
304
|
+
DefaultValueArrayField: typeof fields.DefaultValueArrayField;
|
|
305
|
+
UiFieldApplierField: typeof fields.UiFieldApplierField;
|
|
306
|
+
MultiLanguageField: typeof fields.MultiLanguageField;
|
|
307
|
+
SortArrayField: typeof fields.SortArrayField;
|
|
308
|
+
InputWithDefaultValueButtonField: typeof fields.InputWithDefaultValueButtonField;
|
|
309
|
+
MultiTagArrayField: typeof fields.MultiTagArrayField;
|
|
310
|
+
PdfArrayField: typeof fields.PdfArrayField;
|
|
311
|
+
AsArrayField: typeof fields.AsArrayField;
|
|
312
|
+
CondensedObjectField: typeof fields.CondensedObjectField;
|
|
313
|
+
MultiActiveArrayField: typeof fields.MultiActiveArrayField;
|
|
314
|
+
PrefixArrayField: typeof fields.PrefixArrayField;
|
|
315
|
+
FillDateRangeField: typeof fields.FillDateRangeField;
|
|
316
|
+
TaxonSetPopulatorField: typeof fields.TaxonSetPopulatorField;
|
|
317
|
+
ScientificNameTaxonAutosuggestField: typeof fields.ScientificNameTaxonAutosuggestField;
|
|
318
|
+
ArraySchemaField: typeof fields.SchemaField;
|
|
319
|
+
InputTransformerField: typeof fields.ConditionalOnChangeField;
|
|
320
|
+
ConditionalField: typeof fields.ConditionalUiSchemaField;
|
|
321
|
+
UnitRapidField: typeof fields.UnitShorthandField;
|
|
322
|
+
AccordionArrayField: typeof fields.SingleActiveArrayField;
|
|
195
323
|
};
|
|
196
324
|
getWidgets: (_widgets?: {
|
|
197
325
|
[name: string]: Widget;
|
|
198
326
|
}) => {
|
|
199
|
-
|
|
327
|
+
CheckboxWidget: typeof widgets.CheckboxWidget;
|
|
328
|
+
SelectWidget: <T extends string | number>(props: (Omit<import("../types").WidgetProps<import("../types").JSONSchemaEnum>, "value" | "onChange"> & {
|
|
329
|
+
value?: T | undefined;
|
|
330
|
+
onChange: (value?: T | undefined) => void;
|
|
331
|
+
} & {
|
|
332
|
+
includeEmpty?: boolean;
|
|
333
|
+
getEnumOptionsAsync?: (() => Promise<(Omit<import("@rjsf/utils").EnumOptionsType, "value"> & {
|
|
334
|
+
value: T;
|
|
335
|
+
})[]>) | undefined;
|
|
336
|
+
}) | (Omit<import("../types").WidgetProps<import("../types").JSONSchemaArray<import("../types").JSONSchemaEnumOneOf>>, "value" | "onChange"> & {
|
|
337
|
+
value?: T[] | undefined;
|
|
338
|
+
onChange: (value?: T[] | undefined) => void;
|
|
339
|
+
} & {
|
|
340
|
+
includeEmpty?: boolean;
|
|
341
|
+
getEnumOptionsAsync?: (() => Promise<(Omit<import("@rjsf/utils").EnumOptionsType, "value"> & {
|
|
342
|
+
value: T;
|
|
343
|
+
})[]>) | undefined;
|
|
344
|
+
})) => JSX.Element;
|
|
345
|
+
TextareaWidget: typeof widgets.TextareaWidget;
|
|
346
|
+
DateTimeWidget: typeof widgets.DateTimeWidget;
|
|
347
|
+
DateWidget: {
|
|
348
|
+
(props: any): JSX.Element;
|
|
349
|
+
propTypes: {
|
|
350
|
+
uiSchema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
351
|
+
"ui:options": PropTypes.Requireable<PropTypes.InferProps<{
|
|
352
|
+
showButtons: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
|
|
353
|
+
today: PropTypes.Requireable<boolean>;
|
|
354
|
+
yesterday: PropTypes.Requireable<boolean>;
|
|
355
|
+
same: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
|
|
356
|
+
path: PropTypes.Requireable<string>;
|
|
357
|
+
}> | null | undefined>>;
|
|
358
|
+
plusSixMonths: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
|
|
359
|
+
path: PropTypes.Requireable<string>;
|
|
360
|
+
}> | null | undefined>>;
|
|
361
|
+
plusSixYear: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
|
|
362
|
+
path: PropTypes.Requireable<string>;
|
|
363
|
+
}> | null | undefined>>;
|
|
364
|
+
}> | null | undefined>>;
|
|
365
|
+
allowOnlyYear: PropTypes.Requireable<boolean>;
|
|
366
|
+
}>>;
|
|
367
|
+
}>>;
|
|
368
|
+
schema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
369
|
+
type: PropTypes.Requireable<string>;
|
|
370
|
+
}>>;
|
|
371
|
+
value: PropTypes.Requireable<string>;
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
TimeWidget: {
|
|
375
|
+
(props: any): JSX.Element;
|
|
376
|
+
propTypes: {
|
|
377
|
+
schema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
378
|
+
type: PropTypes.Requireable<string>;
|
|
379
|
+
}>>;
|
|
380
|
+
value: PropTypes.Requireable<string>;
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
SeparatedDateTimeWidget: typeof widgets.SeparatedDateTimeWidget;
|
|
384
|
+
AutosuggestWidget: typeof widgets.AutosuggestWidget;
|
|
385
|
+
HiddenWidget: typeof widgets.HiddenWidget;
|
|
386
|
+
PlainTextWidget: typeof widgets.PlainTextWidget;
|
|
387
|
+
TextSelectWidget: typeof widgets.TextSelectWidget;
|
|
388
|
+
ImageSelectWidget: typeof widgets.ImageSelectWidget;
|
|
389
|
+
AnyToBooleanWidget: {
|
|
390
|
+
(props: any): JSX.Element;
|
|
391
|
+
propTypes: {
|
|
392
|
+
uiSchema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
393
|
+
"ui:options": PropTypes.Requireable<PropTypes.InferProps<{
|
|
394
|
+
trueValue: PropTypes.Validator<NonNullable<NonNullable<string | number | boolean | null | undefined>>>;
|
|
395
|
+
falseValue: PropTypes.Requireable<NonNullable<string | number | boolean | null | undefined>>;
|
|
396
|
+
allowUndefined: PropTypes.Requireable<boolean>;
|
|
397
|
+
}>>;
|
|
398
|
+
}>>;
|
|
399
|
+
schema: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
|
|
400
|
+
type: PropTypes.Requireable<string>;
|
|
401
|
+
}>>>;
|
|
402
|
+
formData: PropTypes.Requireable<NonNullable<string | number | boolean | null | undefined>>;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
URLWidget: {
|
|
406
|
+
({ value, options }: {
|
|
407
|
+
value: any;
|
|
408
|
+
options?: {} | undefined;
|
|
409
|
+
}): JSX.Element;
|
|
410
|
+
propTypes: {
|
|
411
|
+
schema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
412
|
+
type: PropTypes.Requireable<string>;
|
|
413
|
+
}>>;
|
|
414
|
+
value: PropTypes.Requireable<string>;
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
InformalTaxonGroupChooserWidget: typeof widgets.InformalTaxonGroupChooserWidget;
|
|
418
|
+
TaxonImageWidget: typeof widgets.TaxonImageWidget;
|
|
419
|
+
UpperCaseWidget: typeof widgets.UpperCaseWidget;
|
|
420
|
+
NumberWidget: typeof widgets.NumberWidget;
|
|
421
|
+
InputGroupWidget: typeof widgets.InputGroupWidget;
|
|
422
|
+
InputWithDefaultValueButtonWidget: typeof widgets.InputWithDefaultValueButtonWidget;
|
|
200
423
|
};
|
|
201
424
|
getTemplates: (_templates?: {
|
|
202
425
|
[name: string]: TemplatesType;
|
|
203
426
|
}) => {
|
|
204
|
-
|
|
427
|
+
BaseInputTemplate: typeof templates.BaseInputTemplate;
|
|
428
|
+
DescriptionField: typeof templates.DescriptionField;
|
|
429
|
+
FieldTemplate: typeof templates.FieldTemplate;
|
|
430
|
+
ArrayFieldTemplate: {
|
|
431
|
+
new (): {
|
|
432
|
+
[x: string]: any;
|
|
433
|
+
componentDidMount(): void;
|
|
434
|
+
componentDidUpdate(prevProps: any, prevState: any): void;
|
|
435
|
+
componentWillUnmount(): void;
|
|
436
|
+
addKeyHandlers(): void;
|
|
437
|
+
arrayKeyFunctions: any;
|
|
438
|
+
removeKeyHandlers(props: any): void;
|
|
439
|
+
getKeyHandlers(props: any): any[];
|
|
440
|
+
addChildKeyHandlers(props: any): void;
|
|
441
|
+
childKeyHandlers: any;
|
|
442
|
+
removeChildKeyHandlers(): void;
|
|
443
|
+
getChildKeyHandlers(props: any): any;
|
|
444
|
+
onFocus: (target: any) => void;
|
|
445
|
+
onCopy: (options?: {}) => void;
|
|
446
|
+
getCustomEventListeners(): (string | ((target: any) => void))[][];
|
|
447
|
+
addCustomEventListeners(props: any): void;
|
|
448
|
+
customEventListeners: any;
|
|
449
|
+
removeCustomEventListeners(props: any): void;
|
|
450
|
+
};
|
|
451
|
+
[x: string]: any;
|
|
452
|
+
displayName: string;
|
|
453
|
+
};
|
|
454
|
+
ErrorListTemplate: typeof templates.ErrorListTemplate;
|
|
455
|
+
ObjectFieldTemplate: typeof templates.ObjectFieldTemplate;
|
|
456
|
+
TitleFieldTemplate: (props: any) => JSX.Element | null;
|
|
457
|
+
DescriptionFieldTemplate: typeof templates.DescriptionField;
|
|
205
458
|
};
|
|
206
459
|
getContext: (props: LajiFormProps, context: ContextProps) => ContextProps;
|
|
207
460
|
render(): JSX.Element | null;
|
|
@@ -74,134 +74,9 @@ const id_service_1 = __importDefault(require("../services/id-service"));
|
|
|
74
74
|
const root_instance_service_1 = __importDefault(require("../services/root-instance-service"));
|
|
75
75
|
const singleton_map_service_1 = __importDefault(require("../services/singleton-map-service"));
|
|
76
76
|
const multi_active_array_service_1 = __importDefault(require("../services/multi-active-array-service"));
|
|
77
|
-
const fields =
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"ArrayField",
|
|
81
|
-
"ObjectField",
|
|
82
|
-
"NestField",
|
|
83
|
-
"ArrayBulkField",
|
|
84
|
-
"ArrayBulkField",
|
|
85
|
-
"ArrayPropertySumField",
|
|
86
|
-
"ScopeField",
|
|
87
|
-
"SelectTreeField",
|
|
88
|
-
"GridLayoutField",
|
|
89
|
-
"TableField",
|
|
90
|
-
"InjectField",
|
|
91
|
-
"InjectDefaultValueField",
|
|
92
|
-
"ArrayCombinerField",
|
|
93
|
-
"DependentBooleanField",
|
|
94
|
-
"DependentDisableField",
|
|
95
|
-
"MapArrayField",
|
|
96
|
-
"AutoArrayField",
|
|
97
|
-
"AutosuggestField",
|
|
98
|
-
"HiddenField",
|
|
99
|
-
"HiddenWithTextField",
|
|
100
|
-
"InitiallyHiddenField",
|
|
101
|
-
"ContextInjectionField",
|
|
102
|
-
"ImageArrayField",
|
|
103
|
-
"SplitField",
|
|
104
|
-
"FlatField",
|
|
105
|
-
"SingleActiveArrayField",
|
|
106
|
-
"SingleItemArrayField",
|
|
107
|
-
"UnitShorthandField",
|
|
108
|
-
"CombinedValueDisplayField",
|
|
109
|
-
"UiFieldMapperArrayField",
|
|
110
|
-
"ExtraLabelRowField",
|
|
111
|
-
"SumField",
|
|
112
|
-
"NamedPlaceChooserField",
|
|
113
|
-
"NamedPlaceSaverField",
|
|
114
|
-
"MapField",
|
|
115
|
-
"GeocoderField",
|
|
116
|
-
"TagArrayField",
|
|
117
|
-
"StringToArrayField",
|
|
118
|
-
"ConditionalOnChangeField",
|
|
119
|
-
"ConditionalUiSchemaField",
|
|
120
|
-
"AnnotationField",
|
|
121
|
-
"PrefillingArrayField",
|
|
122
|
-
"AnyToBooleanField",
|
|
123
|
-
"EnumRangeArrayField",
|
|
124
|
-
"UnitListShorthandArrayField",
|
|
125
|
-
"LocationChooserField",
|
|
126
|
-
"DataLeakerField",
|
|
127
|
-
"LocalityField",
|
|
128
|
-
"ImageDisplayField",
|
|
129
|
-
"FakePropertyField",
|
|
130
|
-
"SectionArrayField",
|
|
131
|
-
"MultiArrayField",
|
|
132
|
-
"AudioArrayField",
|
|
133
|
-
"FilterArrayField",
|
|
134
|
-
"MultiAnyToBooleanField",
|
|
135
|
-
"UnitCountShorthandField",
|
|
136
|
-
"ToggleAdditionalArrayFieldsField",
|
|
137
|
-
"DefaultValueArrayField",
|
|
138
|
-
"UiFieldApplierField",
|
|
139
|
-
"MultiLanguageField",
|
|
140
|
-
"SortArrayField",
|
|
141
|
-
"InputWithDefaultValueButtonField",
|
|
142
|
-
"MultiTagArrayField",
|
|
143
|
-
"PdfArrayField",
|
|
144
|
-
"AsArrayField",
|
|
145
|
-
"CondensedObjectField",
|
|
146
|
-
"MultiActiveArrayField",
|
|
147
|
-
"PrefixArrayField",
|
|
148
|
-
"FillDateRangeField",
|
|
149
|
-
"TaxonSetPopulatorField",
|
|
150
|
-
"ScientificNameTaxonAutosuggestField",
|
|
151
|
-
{ "InputTransformerField": "ConditionalOnChangeField" }, // Alias for backward compatibility.
|
|
152
|
-
{ "ConditionalField": "ConditionalUiSchemaField" }, // Alias for backward compatibility.
|
|
153
|
-
{ "UnitRapidField": "UnitShorthandField" }, // Alias for backward compatibility.
|
|
154
|
-
{ "AccordionArrayField": "SingleActiveArrayField" } // Alias for backward compatibility.
|
|
155
|
-
]);
|
|
156
|
-
const widgets = importLocalComponents("widgets", [
|
|
157
|
-
"CheckboxWidget",
|
|
158
|
-
"SelectWidget",
|
|
159
|
-
"TextareaWidget",
|
|
160
|
-
"DateTimeWidget",
|
|
161
|
-
"DateWidget",
|
|
162
|
-
"TimeWidget",
|
|
163
|
-
"SeparatedDateTimeWidget",
|
|
164
|
-
"AutosuggestWidget",
|
|
165
|
-
"HiddenWidget",
|
|
166
|
-
"PlainTextWidget",
|
|
167
|
-
"TextSelectWidget",
|
|
168
|
-
"ImageSelectWidget",
|
|
169
|
-
"AnyToBooleanWidget",
|
|
170
|
-
"URLWidget",
|
|
171
|
-
"InformalTaxonGroupChooserWidget",
|
|
172
|
-
"TaxonImageWidget",
|
|
173
|
-
"UpperCaseWidget",
|
|
174
|
-
"NumberWidget",
|
|
175
|
-
"InputGroupWidget",
|
|
176
|
-
"InputWithDefaultValueButtonWidget"
|
|
177
|
-
]);
|
|
178
|
-
const templates = importLocalComponents("templates", [
|
|
179
|
-
"BaseInputTemplate",
|
|
180
|
-
"DescriptionField",
|
|
181
|
-
{ "TitleFieldTemplate": "TitleField" },
|
|
182
|
-
{ "DescriptionFieldTemplate": "DescriptionField" },
|
|
183
|
-
"FieldTemplate",
|
|
184
|
-
"ArrayFieldTemplate",
|
|
185
|
-
"ErrorListTemplate",
|
|
186
|
-
"ObjectFieldTemplate"
|
|
187
|
-
]);
|
|
188
|
-
function importLocalComponents(dir, fieldNames) {
|
|
189
|
-
return fieldNames.reduce((fields, field) => {
|
|
190
|
-
if (typeof field === "string") {
|
|
191
|
-
fields[field] = require(`./${dir}/${field}`).default;
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
const fieldName = Object.keys(field)[0];
|
|
195
|
-
if (typeof field[fieldName] === "string") {
|
|
196
|
-
fields[fieldName] = require(`./${dir}/${field[fieldName]}`).default;
|
|
197
|
-
}
|
|
198
|
-
else {
|
|
199
|
-
fields[fieldName] = field[fieldName];
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
return fields;
|
|
203
|
-
}, {});
|
|
204
|
-
}
|
|
77
|
+
const fields = __importStar(require("./fields"));
|
|
78
|
+
const widgets = __importStar(require("./widgets"));
|
|
79
|
+
const templates = __importStar(require("./templates"));
|
|
205
80
|
// Each form should have a unique id to keep Context private.
|
|
206
81
|
let id = 0;
|
|
207
82
|
function getNewId() {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export { default as SchemaField } from "./SchemaField";
|
|
2
|
+
export { default as ArrayField } from "./ArrayField";
|
|
3
|
+
export { default as ObjectField } from "./ObjectField";
|
|
4
|
+
export { default as NestField } from "./NestField";
|
|
5
|
+
export { default as ArrayBulkField } from "./ArrayBulkField";
|
|
6
|
+
export { default as ArrayPropertySumField } from "./ArrayPropertySumField";
|
|
7
|
+
export { default as ScopeField } from "./ScopeField";
|
|
8
|
+
export { default as SelectTreeField } from "./SelectTreeField";
|
|
9
|
+
export { default as GridLayoutField } from "./GridLayoutField";
|
|
10
|
+
export { default as TableField } from "./TableField";
|
|
11
|
+
export { default as InjectField } from "./InjectField";
|
|
12
|
+
export { default as InjectDefaultValueField } from "./InjectDefaultValueField";
|
|
13
|
+
export { default as ArrayCombinerField } from "./ArrayCombinerField";
|
|
14
|
+
export { default as DependentBooleanField } from "./DependentBooleanField";
|
|
15
|
+
export { default as DependentDisableField } from "./DependentDisableField";
|
|
16
|
+
export { default as MapArrayField } from "./MapArrayField";
|
|
17
|
+
export { default as AutoArrayField } from "./AutoArrayField";
|
|
18
|
+
export { default as AutosuggestField } from "./AutosuggestField";
|
|
19
|
+
export { default as HiddenField } from "./HiddenField";
|
|
20
|
+
export { default as HiddenWithTextField } from "./HiddenWithTextField";
|
|
21
|
+
export { default as InitiallyHiddenField } from "./InitiallyHiddenField";
|
|
22
|
+
export { default as ContextInjectionField } from "./ContextInjectionField";
|
|
23
|
+
export { default as ImageArrayField } from "./ImageArrayField";
|
|
24
|
+
export { default as SplitField } from "./SplitField";
|
|
25
|
+
export { default as FlatField } from "./FlatField";
|
|
26
|
+
export { default as SingleActiveArrayField } from "./SingleActiveArrayField";
|
|
27
|
+
export { default as SingleItemArrayField } from "./SingleItemArrayField";
|
|
28
|
+
export { default as UnitShorthandField } from "./UnitShorthandField";
|
|
29
|
+
export { default as CombinedValueDisplayField } from "./CombinedValueDisplayField";
|
|
30
|
+
export { default as UiFieldMapperArrayField } from "./UiFieldMapperArrayField";
|
|
31
|
+
export { default as ExtraLabelRowField } from "./ExtraLabelRowField";
|
|
32
|
+
export { default as SumField } from "./SumField";
|
|
33
|
+
export { default as NamedPlaceChooserField } from "./NamedPlaceChooserField";
|
|
34
|
+
export { default as NamedPlaceSaverField } from "./NamedPlaceSaverField";
|
|
35
|
+
export { default as MapField } from "./MapField";
|
|
36
|
+
export { default as GeocoderField } from "./GeocoderField";
|
|
37
|
+
export { default as TagArrayField } from "./TagArrayField";
|
|
38
|
+
export { default as StringToArrayField } from "./StringToArrayField";
|
|
39
|
+
export { default as ConditionalOnChangeField } from "./ConditionalOnChangeField";
|
|
40
|
+
export { default as ConditionalUiSchemaField } from "./ConditionalUiSchemaField";
|
|
41
|
+
export { default as AnnotationField } from "./AnnotationField";
|
|
42
|
+
export { default as PrefillingArrayField } from "./PrefillingArrayField";
|
|
43
|
+
export { default as AnyToBooleanField } from "./AnyToBooleanField";
|
|
44
|
+
export { default as EnumRangeArrayField } from "./EnumRangeArrayField";
|
|
45
|
+
export { default as UnitListShorthandArrayField } from "./UnitListShorthandArrayField";
|
|
46
|
+
export { default as LocationChooserField } from "./LocationChooserField";
|
|
47
|
+
export { default as DataLeakerField } from "./DataLeakerField";
|
|
48
|
+
export { default as LocalityField } from "./LocalityField";
|
|
49
|
+
export { default as ImageDisplayField } from "./ImageDisplayField";
|
|
50
|
+
export { default as FakePropertyField } from "./FakePropertyField";
|
|
51
|
+
export { default as SectionArrayField } from "./SectionArrayField";
|
|
52
|
+
export { default as MultiArrayField } from "./MultiArrayField";
|
|
53
|
+
export { default as AudioArrayField } from "./AudioArrayField";
|
|
54
|
+
export { default as FilterArrayField } from "./FilterArrayField";
|
|
55
|
+
export { default as MultiAnyToBooleanField } from "./MultiAnyToBooleanField";
|
|
56
|
+
export { default as UnitCountShorthandField } from "./UnitCountShorthandField";
|
|
57
|
+
export { default as ToggleAdditionalArrayFieldsField } from "./ToggleAdditionalArrayFieldsField";
|
|
58
|
+
export { default as DefaultValueArrayField } from "./DefaultValueArrayField";
|
|
59
|
+
export { default as UiFieldApplierField } from "./UiFieldApplierField";
|
|
60
|
+
export { default as MultiLanguageField } from "./MultiLanguageField";
|
|
61
|
+
export { default as SortArrayField } from "./SortArrayField";
|
|
62
|
+
export { default as InputWithDefaultValueButtonField } from "./InputWithDefaultValueButtonField";
|
|
63
|
+
export { default as MultiTagArrayField } from "./MultiTagArrayField";
|
|
64
|
+
export { default as PdfArrayField } from "./PdfArrayField";
|
|
65
|
+
export { default as AsArrayField } from "./AsArrayField";
|
|
66
|
+
export { default as CondensedObjectField } from "./CondensedObjectField";
|
|
67
|
+
export { default as MultiActiveArrayField } from "./MultiActiveArrayField";
|
|
68
|
+
export { default as PrefixArrayField } from "./PrefixArrayField";
|
|
69
|
+
export { default as FillDateRangeField } from "./FillDateRangeField";
|
|
70
|
+
export { default as TaxonSetPopulatorField } from "./TaxonSetPopulatorField";
|
|
71
|
+
export { default as ScientificNameTaxonAutosuggestField } from "./ScientificNameTaxonAutosuggestField";
|
|
72
|
+
export { default as ArraySchemaField } from "./SchemaField";
|
|
73
|
+
export { default as InputTransformerField } from "./ConditionalOnChangeField";
|
|
74
|
+
export { default as ConditionalField } from "./ConditionalUiSchemaField";
|
|
75
|
+
export { default as UnitRapidField } from "./UnitShorthandField";
|
|
76
|
+
export { default as AccordionArrayField } from "./SingleActiveArrayField";
|