@luomus/laji-form 15.1.4 → 15.1.6
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/lib/ApiClient.d.ts +46 -0
- package/lib/ApiClient.js +93 -0
- package/lib/Context.d.ts +8 -0
- package/lib/Context.js +18 -0
- package/lib/ReactContext.d.ts +7 -0
- package/lib/ReactContext.js +5 -0
- package/lib/components/BaseComponent.d.ts +9 -0
- package/lib/components/BaseComponent.js +29 -0
- package/lib/components/LajiForm.d.ts +221 -0
- package/lib/components/LajiForm.js +616 -0
- package/lib/components/VirtualSchemaField.d.ts +42 -0
- package/lib/components/VirtualSchemaField.js +74 -0
- package/lib/components/components.d.ts +119 -0
- package/lib/components/components.js +606 -0
- package/lib/components/fields/AnnotationField.d.ts +34 -0
- package/lib/components/fields/AnnotationField.js +242 -0
- package/lib/components/fields/AnyToBooleanField.d.ts +18 -0
- package/lib/components/fields/AnyToBooleanField.js +20 -0
- package/lib/components/fields/ArrayBulkField.d.ts +23 -0
- package/lib/components/fields/ArrayBulkField.js +82 -0
- package/lib/components/fields/ArrayCombinerField.d.ts +36 -0
- package/lib/components/fields/ArrayCombinerField.js +138 -0
- package/lib/components/fields/ArrayField.d.ts +39 -0
- package/lib/components/fields/ArrayField.js +148 -0
- package/lib/components/fields/AsArrayField.d.ts +292 -0
- package/lib/components/fields/AsArrayField.js +38 -0
- package/lib/components/fields/AudioArrayField.d.ts +22 -0
- package/lib/components/fields/AudioArrayField.js +100 -0
- package/lib/components/fields/AutoArrayField.d.ts +24 -0
- package/lib/components/fields/AutoArrayField.js +56 -0
- package/lib/components/fields/AutosuggestField.d.ts +69 -0
- package/lib/components/fields/AutosuggestField.js +299 -0
- package/lib/components/fields/CombinedValueDisplayField.d.ts +41 -0
- package/lib/components/fields/CombinedValueDisplayField.js +100 -0
- package/lib/components/fields/ConditionalOnChangeField.d.ts +42 -0
- package/lib/components/fields/ConditionalOnChangeField.js +107 -0
- package/lib/components/fields/ConditionalUiSchemaField.d.ts +123 -0
- package/lib/components/fields/ConditionalUiSchemaField.js +143 -0
- package/lib/components/fields/ContextInjectionField.d.ts +24 -0
- package/lib/components/fields/ContextInjectionField.js +68 -0
- package/lib/components/fields/DataLeakerField.d.ts +40 -0
- package/lib/components/fields/DataLeakerField.js +68 -0
- package/lib/components/fields/DefaultValueArrayField.d.ts +34 -0
- package/lib/components/fields/DefaultValueArrayField.js +59 -0
- package/lib/components/fields/DependentBooleanField.d.ts +38 -0
- package/lib/components/fields/DependentBooleanField.js +87 -0
- package/lib/components/fields/DependentDisableField.d.ts +35 -0
- package/lib/components/fields/DependentDisableField.js +71 -0
- package/lib/components/fields/EnumRangeArrayField.d.ts +27 -0
- package/lib/components/fields/EnumRangeArrayField.js +115 -0
- package/lib/components/fields/ExtraLabelRowField.d.ts +38 -0
- package/lib/components/fields/ExtraLabelRowField.js +100 -0
- package/lib/components/fields/FakePropertyField.d.ts +18 -0
- package/lib/components/fields/FakePropertyField.js +48 -0
- package/lib/components/fields/FilterArrayField.d.ts +73 -0
- package/lib/components/fields/FilterArrayField.js +121 -0
- package/lib/components/fields/FlatField.d.ts +29 -0
- package/lib/components/fields/FlatField.js +171 -0
- package/lib/components/fields/GeocoderField.d.ts +47 -0
- package/lib/components/fields/GeocoderField.js +372 -0
- package/lib/components/fields/GridLayoutField.d.ts +18 -0
- package/lib/components/fields/GridLayoutField.js +32 -0
- package/lib/components/fields/HiddenField.d.ts +10 -0
- package/lib/components/fields/HiddenField.js +11 -0
- package/lib/components/fields/ImageArrayField.d.ts +172 -0
- package/lib/components/fields/ImageArrayField.js +699 -0
- package/lib/components/fields/ImageDisplayField.d.ts +18 -0
- package/lib/components/fields/ImageDisplayField.js +44 -0
- package/lib/components/fields/InitiallyHiddenField.d.ts +21 -0
- package/lib/components/fields/InitiallyHiddenField.js +58 -0
- package/lib/components/fields/InjectDefaultValueField.d.ts +37 -0
- package/lib/components/fields/InjectDefaultValueField.js +68 -0
- package/lib/components/fields/InjectField.d.ts +46 -0
- package/lib/components/fields/InjectField.js +88 -0
- package/lib/components/fields/InputWithDefaultValueButtonField.d.ts +25 -0
- package/lib/components/fields/InputWithDefaultValueButtonField.js +61 -0
- package/lib/components/fields/LocalityField.d.ts +22 -0
- package/lib/components/fields/LocalityField.js +94 -0
- package/lib/components/fields/LocationChooserField.d.ts +27 -0
- package/lib/components/fields/LocationChooserField.js +440 -0
- package/lib/components/fields/MapArrayField.d.ts +78 -0
- package/lib/components/fields/MapArrayField.js +1783 -0
- package/lib/components/fields/MapField.d.ts +48 -0
- package/lib/components/fields/MapField.js +434 -0
- package/lib/components/fields/MultiAnyToBooleanField.d.ts +25 -0
- package/lib/components/fields/MultiAnyToBooleanField.js +100 -0
- package/lib/components/fields/MultiArrayField.d.ts +53 -0
- package/lib/components/fields/MultiArrayField.js +224 -0
- package/lib/components/fields/MultiLanguageField.d.ts +13 -0
- package/lib/components/fields/MultiLanguageField.js +52 -0
- package/lib/components/fields/MultiTagArrayField.d.ts +36 -0
- package/lib/components/fields/MultiTagArrayField.js +142 -0
- package/lib/components/fields/NamedPlaceChooserField.d.ts +29 -0
- package/lib/components/fields/NamedPlaceChooserField.js +380 -0
- package/lib/components/fields/NamedPlaceSaverField.d.ts +29 -0
- package/lib/components/fields/NamedPlaceSaverField.js +237 -0
- package/lib/components/fields/NestField.d.ts +148 -0
- package/lib/components/fields/NestField.js +289 -0
- package/lib/components/fields/ObjectField.d.ts +2 -0
- package/lib/components/fields/ObjectField.js +119 -0
- package/lib/components/fields/PdfArrayField.d.ts +21 -0
- package/lib/components/fields/PdfArrayField.js +40 -0
- package/lib/components/fields/PrefillingArrayField.d.ts +22 -0
- package/lib/components/fields/PrefillingArrayField.js +65 -0
- package/lib/components/fields/SchemaField.d.ts +7 -0
- package/lib/components/fields/SchemaField.js +109 -0
- package/lib/components/fields/ScopeField.d.ts +85 -0
- package/lib/components/fields/ScopeField.js +521 -0
- package/lib/components/fields/SectionArrayField.d.ts +38 -0
- package/lib/components/fields/SectionArrayField.js +618 -0
- package/lib/components/fields/SelectTreeField.d.ts +39 -0
- package/lib/components/fields/SelectTreeField.js +143 -0
- package/lib/components/fields/SingleActiveArrayField.d.ts +49 -0
- package/lib/components/fields/SingleActiveArrayField.js +974 -0
- package/lib/components/fields/SingleItemArrayField.d.ts +15 -0
- package/lib/components/fields/SingleItemArrayField.js +60 -0
- package/lib/components/fields/SortArrayField.d.ts +73 -0
- package/lib/components/fields/SortArrayField.js +351 -0
- package/lib/components/fields/SplitField.d.ts +28 -0
- package/lib/components/fields/SplitField.js +65 -0
- package/lib/components/fields/StringToArrayField.d.ts +24 -0
- package/lib/components/fields/StringToArrayField.js +48 -0
- package/lib/components/fields/SumField.d.ts +35 -0
- package/lib/components/fields/SumField.js +83 -0
- package/lib/components/fields/TableField.d.ts +18 -0
- package/lib/components/fields/TableField.js +136 -0
- package/lib/components/fields/TagArrayField.d.ts +38 -0
- package/lib/components/fields/TagArrayField.js +128 -0
- package/lib/components/fields/ToggleAdditionalArrayFieldsField.d.ts +26 -0
- package/lib/components/fields/ToggleAdditionalArrayFieldsField.js +81 -0
- package/lib/components/fields/UiFieldApplierField.d.ts +30 -0
- package/lib/components/fields/UiFieldApplierField.js +106 -0
- package/lib/components/fields/UiFieldMapperArrayField.d.ts +42 -0
- package/lib/components/fields/UiFieldMapperArrayField.js +121 -0
- package/lib/components/fields/UnitCountShorthandField.d.ts +22 -0
- package/lib/components/fields/UnitCountShorthandField.js +149 -0
- package/lib/components/fields/UnitListShorthandArrayField.d.ts +26 -0
- package/lib/components/fields/UnitListShorthandArrayField.js +108 -0
- package/lib/components/fields/UnitShorthandField.d.ts +32 -0
- package/lib/components/fields/UnitShorthandField.js +220 -0
- package/lib/components/templates/ArrayFieldTemplate.d.ts +85 -0
- package/lib/components/templates/ArrayFieldTemplate.js +416 -0
- package/lib/components/templates/BaseInputTemplate.d.ts +11 -0
- package/lib/components/templates/BaseInputTemplate.js +80 -0
- package/lib/components/templates/DescriptionField.d.ts +1 -0
- package/lib/components/templates/DescriptionField.js +37 -0
- package/lib/components/templates/ErrorListTemplate.d.ts +9 -0
- package/lib/components/templates/ErrorListTemplate.js +95 -0
- package/lib/components/templates/FieldTemplate.d.ts +6 -0
- package/lib/components/templates/FieldTemplate.js +112 -0
- package/lib/components/templates/ObjectFieldTemplate.d.ts +7 -0
- package/lib/components/templates/ObjectFieldTemplate.js +66 -0
- package/lib/components/templates/TitleField.d.ts +9 -0
- package/lib/components/templates/TitleField.js +51 -0
- package/lib/components/widgets/AnyToBooleanWidget.d.ts +20 -0
- package/lib/components/widgets/AnyToBooleanWidget.js +49 -0
- package/lib/components/widgets/AutosuggestWidget.d.ts +66 -0
- package/lib/components/widgets/AutosuggestWidget.js +1127 -0
- package/lib/components/widgets/CheckboxWidget.d.ts +37 -0
- package/lib/components/widgets/CheckboxWidget.js +139 -0
- package/lib/components/widgets/DateTimeWidget.d.ts +62 -0
- package/lib/components/widgets/DateTimeWidget.js +251 -0
- package/lib/components/widgets/DateWidget.d.ts +23 -0
- package/lib/components/widgets/DateWidget.js +41 -0
- package/lib/components/widgets/HiddenWidget.d.ts +15 -0
- package/lib/components/widgets/HiddenWidget.js +19 -0
- package/lib/components/widgets/ImageSelectWidget.d.ts +14 -0
- package/lib/components/widgets/ImageSelectWidget.js +57 -0
- package/lib/components/widgets/InformalTaxonGroupChooserWidget.d.ts +43 -0
- package/lib/components/widgets/InformalTaxonGroupChooserWidget.js +237 -0
- package/lib/components/widgets/InputGroupWidget.d.ts +21 -0
- package/lib/components/widgets/InputGroupWidget.js +36 -0
- package/lib/components/widgets/InputWithDefaultValueButtonWidget.d.ts +21 -0
- package/lib/components/widgets/InputWithDefaultValueButtonWidget.js +47 -0
- package/lib/components/widgets/NumberWidget.d.ts +13 -0
- package/lib/components/widgets/NumberWidget.js +21 -0
- package/lib/components/widgets/PlainTextWidget.d.ts +12 -0
- package/lib/components/widgets/PlainTextWidget.js +24 -0
- package/lib/components/widgets/SelectWidget.d.ts +52 -0
- package/lib/components/widgets/SelectWidget.js +158 -0
- package/lib/components/widgets/SeparatedDateTimeWidget.d.ts +19 -0
- package/lib/components/widgets/SeparatedDateTimeWidget.js +59 -0
- package/lib/components/widgets/TaxonImageWidget.d.ts +13 -0
- package/lib/components/widgets/TaxonImageWidget.js +30 -0
- package/lib/components/widgets/TextSelectWidget.d.ts +25 -0
- package/lib/components/widgets/TextSelectWidget.js +94 -0
- package/lib/components/widgets/TextareaWidget.d.ts +32 -0
- package/lib/components/widgets/TextareaWidget.js +87 -0
- package/lib/components/widgets/TimeWidget.d.ts +11 -0
- package/lib/components/widgets/TimeWidget.js +19 -0
- package/lib/components/widgets/URLWidget.d.ts +14 -0
- package/lib/components/widgets/URLWidget.js +12 -0
- package/lib/components/widgets/UpperCaseWidget.d.ts +13 -0
- package/lib/components/widgets/UpperCaseWidget.js +21 -0
- package/lib/index.d.ts +20 -0
- package/lib/index.js +50 -0
- package/lib/services/blocker-service.d.ts +11 -0
- package/lib/services/blocker-service.js +55 -0
- package/lib/services/custom-event-service.d.ts +17 -0
- package/lib/services/custom-event-service.js +35 -0
- package/lib/services/dom-id-service.d.ts +8 -0
- package/lib/services/dom-id-service.js +30 -0
- package/lib/services/focus-service.d.ts +13 -0
- package/lib/services/focus-service.js +60 -0
- package/lib/services/id-service.d.ts +22 -0
- package/lib/services/id-service.js +130 -0
- package/lib/services/key-handler-service.d.ts +56 -0
- package/lib/services/key-handler-service.js +184 -0
- package/lib/services/root-instance-service.d.ts +25 -0
- package/lib/services/root-instance-service.js +49 -0
- package/lib/services/settings-service.d.ts +34 -0
- package/lib/services/settings-service.js +154 -0
- package/lib/services/singleton-map-service.d.ts +23 -0
- package/lib/services/singleton-map-service.js +44 -0
- package/lib/services/submit-hook-service.d.ts +24 -0
- package/lib/services/submit-hook-service.js +73 -0
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +4 -0
- package/lib/themes/bs3.d.ts +3 -0
- package/lib/themes/bs3.js +133 -0
- package/lib/themes/bs5.d.ts +3 -0
- package/lib/themes/bs5.js +111 -0
- package/lib/themes/glyphicon-fa-mapping.d.ts +3 -0
- package/lib/themes/glyphicon-fa-mapping.js +271 -0
- package/lib/themes/stub.d.ts +3 -0
- package/lib/themes/stub.js +82 -0
- package/lib/themes/theme.d.ts +233 -0
- package/lib/themes/theme.js +2 -0
- package/lib/translations.json +847 -0
- package/lib/utils.d.ts +167 -0
- package/lib/utils.js +1185 -0
- package/lib/validation.d.ts +7 -0
- package/lib/validation.js +141 -0
- package/package.json +2 -2
- package/patches/protractor++webdriver-manager+12.1.8.patch +0 -20395
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export function getInformalGroups(apiClient: any): any;
|
|
2
|
+
export default class InformalTaxonGroupChooserWidget extends React.Component<any, any, any> {
|
|
3
|
+
static contextType: React.Context<import("../../ReactContext").ContextProps>;
|
|
4
|
+
static propTypes: {
|
|
5
|
+
schema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
+
type: PropTypes.Requireable<string>;
|
|
7
|
+
}>>;
|
|
8
|
+
value: PropTypes.Requireable<string>;
|
|
9
|
+
};
|
|
10
|
+
constructor(props: any);
|
|
11
|
+
mounted: boolean | undefined;
|
|
12
|
+
getDefaultOptions: (props: any) => {
|
|
13
|
+
button: any;
|
|
14
|
+
rootOnly: any;
|
|
15
|
+
grid: any;
|
|
16
|
+
};
|
|
17
|
+
onSelected: (id: any) => void;
|
|
18
|
+
show: () => void;
|
|
19
|
+
hide: () => void;
|
|
20
|
+
onClear: (e: any) => void;
|
|
21
|
+
}
|
|
22
|
+
export class InformalTaxonGroupChooser extends React.Component<any, any, any> {
|
|
23
|
+
static contextType: React.Context<import("../../ReactContext").ContextProps>;
|
|
24
|
+
static propTypes: {
|
|
25
|
+
onSelected: PropTypes.Validator<(...args: any[]) => any>;
|
|
26
|
+
formContext: PropTypes.Validator<object>;
|
|
27
|
+
};
|
|
28
|
+
constructor(props: any);
|
|
29
|
+
mounted: boolean | undefined;
|
|
30
|
+
onSelected: (id: any) => () => void;
|
|
31
|
+
onSubgroupSelected: (id: any) => () => void;
|
|
32
|
+
Container: ({ children }: {
|
|
33
|
+
children: any;
|
|
34
|
+
}) => JSX.Element;
|
|
35
|
+
getButtonGroup: (id: any) => JSX.Element;
|
|
36
|
+
getLabel: (id: any) => JSX.Element;
|
|
37
|
+
GroupsContainer: ({ children }: {
|
|
38
|
+
children: any;
|
|
39
|
+
}) => JSX.Element;
|
|
40
|
+
Item: (id: any) => JSX.Element;
|
|
41
|
+
}
|
|
42
|
+
import * as React from "react";
|
|
43
|
+
import * as PropTypes from "prop-types";
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.InformalTaxonGroupChooser = exports.getInformalGroups = void 0;
|
|
10
|
+
const React = require("react");
|
|
11
|
+
const PropTypes = require("prop-types");
|
|
12
|
+
const components_1 = require("../components");
|
|
13
|
+
const Context_1 = require("../../Context");
|
|
14
|
+
const ReactContext_1 = require("../../ReactContext");
|
|
15
|
+
const Spinner = require("react-spinner");
|
|
16
|
+
const BaseComponent_1 = require("../BaseComponent");
|
|
17
|
+
const utils_1 = require("../../utils");
|
|
18
|
+
let InformalTaxonGroupChooserWidget = class InformalTaxonGroupChooserWidget extends React.Component {
|
|
19
|
+
constructor(props) {
|
|
20
|
+
super(props);
|
|
21
|
+
this.getDefaultOptions = (props) => {
|
|
22
|
+
const { button = true, rootOnly = false, grid = { lg: 1, md: 2, sm: 3, xs: 12 } } = utils_1.getUiOptions(props);
|
|
23
|
+
return { button, rootOnly, grid };
|
|
24
|
+
};
|
|
25
|
+
this.onSelected = (id) => {
|
|
26
|
+
this.props.onChange(id);
|
|
27
|
+
const { button } = this.getDefaultOptions(this.props);
|
|
28
|
+
if (button)
|
|
29
|
+
this.hide();
|
|
30
|
+
if (this.state.informalTaxonGroupsById && id)
|
|
31
|
+
this.setState({ informalTaxonGroup: this.state.informalTaxonGroupsById[id] });
|
|
32
|
+
};
|
|
33
|
+
this.show = () => {
|
|
34
|
+
this.setState({ show: true });
|
|
35
|
+
};
|
|
36
|
+
this.hide = () => {
|
|
37
|
+
this.setState({ show: false });
|
|
38
|
+
};
|
|
39
|
+
this.onClear = (e) => {
|
|
40
|
+
e.stopPropagation();
|
|
41
|
+
this.onSelected(undefined);
|
|
42
|
+
};
|
|
43
|
+
this.state = {};
|
|
44
|
+
}
|
|
45
|
+
componentDidMount() {
|
|
46
|
+
this.mounted = true;
|
|
47
|
+
getInformalGroups(this.props.formContext.apiClient).then(state => {
|
|
48
|
+
if (!this.mounted)
|
|
49
|
+
return;
|
|
50
|
+
this.setState(state);
|
|
51
|
+
});
|
|
52
|
+
this.UNSAFE_componentWillReceiveProps(this.props);
|
|
53
|
+
}
|
|
54
|
+
UNSAFE_componentWillReceiveProps(props) {
|
|
55
|
+
if (props.value !== this.state.informalTaxonGroup) {
|
|
56
|
+
if (!props.value)
|
|
57
|
+
this.setState({ name: undefined });
|
|
58
|
+
getInformalGroups(props.formContext.apiClient).then(({ informalTaxonGroupsById }) => {
|
|
59
|
+
if (!this.mounted)
|
|
60
|
+
return;
|
|
61
|
+
this.setState({ informalTaxonGroup: informalTaxonGroupsById[this.props.value] });
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
componentWillUnmount() {
|
|
66
|
+
this.mounted = false;
|
|
67
|
+
}
|
|
68
|
+
render() {
|
|
69
|
+
let imageID = this.props.value;
|
|
70
|
+
const { disabled, readonly } = this.props;
|
|
71
|
+
const { button, rootOnly, grid } = this.getDefaultOptions(this.props);
|
|
72
|
+
const { informalTaxonGroupsById = {} } = this.state;
|
|
73
|
+
if (informalTaxonGroupsById[this.props.value] && informalTaxonGroupsById[this.props.value].parent) {
|
|
74
|
+
imageID = informalTaxonGroupsById[this.props.value].parent.id;
|
|
75
|
+
}
|
|
76
|
+
const InformalTaxonGroupChooserComponent = (React.createElement(InformalTaxonGroupChooser, { modal: button, onHide: this.hide, activeId: this.props.value, onSelected: this.onSelected, formContext: this.props.formContext, lang: this.props.formContext.lang, rootOnly: rootOnly, grid: grid }));
|
|
77
|
+
const { Button } = this.context.theme;
|
|
78
|
+
if (button) {
|
|
79
|
+
const title = !this.props.value
|
|
80
|
+
? React.createElement("div", { className: "informal-group-chooser-button-content" },
|
|
81
|
+
React.createElement("span", null, this.props.formContext.translations.PickInformalTaxonGroup))
|
|
82
|
+
: (React.createElement("div", { className: "informal-group-chooser-button-content" },
|
|
83
|
+
React.createElement("div", { className: `informal-group-image ${imageID}` }),
|
|
84
|
+
this.state.informalTaxonGroup ? React.createElement("span", null, this.state.informalTaxonGroup.name) : React.createElement(Spinner, null),
|
|
85
|
+
React.createElement("div", { className: "close", onClick: this.onClear }, "\u00D7")));
|
|
86
|
+
return (React.createElement(components_1.TooltipComponent, { tooltip: this.state.informalTaxonGroup && this.state.informalTaxonGroup.name },
|
|
87
|
+
React.createElement("div", { className: "informal-taxon-groups-list" },
|
|
88
|
+
React.createElement(Button, { onClick: this.show, disabled: disabled || readonly }, title),
|
|
89
|
+
this.state.show && InformalTaxonGroupChooserComponent)));
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
return InformalTaxonGroupChooserComponent;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
InformalTaxonGroupChooserWidget.contextType = ReactContext_1.default;
|
|
97
|
+
InformalTaxonGroupChooserWidget.propTypes = {
|
|
98
|
+
schema: PropTypes.shape({
|
|
99
|
+
type: PropTypes.oneOf(["string"])
|
|
100
|
+
}),
|
|
101
|
+
value: PropTypes.string
|
|
102
|
+
};
|
|
103
|
+
InformalTaxonGroupChooserWidget = __decorate([
|
|
104
|
+
BaseComponent_1.default
|
|
105
|
+
], InformalTaxonGroupChooserWidget);
|
|
106
|
+
exports.default = InformalTaxonGroupChooserWidget;
|
|
107
|
+
function walk(allGroups, _group, parent) {
|
|
108
|
+
_group.forEach(group => {
|
|
109
|
+
allGroups[group.id] = group;
|
|
110
|
+
if (parent)
|
|
111
|
+
group.parent = parent;
|
|
112
|
+
if (group.hasSubGroup) {
|
|
113
|
+
allGroups = walk(allGroups, group.hasSubGroup, parent || group);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
return allGroups;
|
|
117
|
+
}
|
|
118
|
+
const mapGroupsById = _groups => _groups.reduce((groups, group) => {
|
|
119
|
+
groups[group.id] = group;
|
|
120
|
+
return groups;
|
|
121
|
+
}, {});
|
|
122
|
+
let informalTaxonGroups, informalTaxonGroupsById;
|
|
123
|
+
function getInformalGroups(apiClient) {
|
|
124
|
+
if (informalTaxonGroups) {
|
|
125
|
+
return Promise.resolve({ informalTaxonGroups, informalTaxonGroupsById });
|
|
126
|
+
}
|
|
127
|
+
return apiClient.fetchCached("/informal-taxon-groups/tree").then(response => {
|
|
128
|
+
// Contains the current taxon group.
|
|
129
|
+
const informalTaxonGroups = mapGroupsById(response.results);
|
|
130
|
+
// Contains all groups in flat object.
|
|
131
|
+
const informalTaxonGroupsById = walk({}, response.results);
|
|
132
|
+
Context_1.default().informalTaxonGroupsById = informalTaxonGroupsById;
|
|
133
|
+
return Promise.resolve({ informalTaxonGroups, informalTaxonGroupsById });
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
exports.getInformalGroups = getInformalGroups;
|
|
137
|
+
class InformalTaxonGroupChooser extends React.Component {
|
|
138
|
+
constructor(props) {
|
|
139
|
+
super(props);
|
|
140
|
+
this.onSelected = (id) => () => {
|
|
141
|
+
this.props.onSelected(id);
|
|
142
|
+
};
|
|
143
|
+
this.onSubgroupSelected = (id) => () => {
|
|
144
|
+
let path;
|
|
145
|
+
const existingIdx = this.state.path.indexOf(id);
|
|
146
|
+
path = (existingIdx >= 0)
|
|
147
|
+
? this.state.path.slice(0, existingIdx + 1)
|
|
148
|
+
: [...this.state.path, id];
|
|
149
|
+
this.setState({
|
|
150
|
+
informalTaxonGroups: id
|
|
151
|
+
? mapGroupsById(this.state.informalTaxonGroupsById[id].hasSubGroup)
|
|
152
|
+
: this.state.root,
|
|
153
|
+
path
|
|
154
|
+
});
|
|
155
|
+
};
|
|
156
|
+
this.Container = ({ children }) => {
|
|
157
|
+
const { modal, onHide } = this.props;
|
|
158
|
+
const { translations } = this.props.formContext;
|
|
159
|
+
const { Modal } = this.context.theme;
|
|
160
|
+
return modal ? (React.createElement(Modal, { show: true, onHide: onHide, dialogClassName: "laji-form informal-taxon-group-chooser" },
|
|
161
|
+
React.createElement(Modal.Header, { closeButton: true },
|
|
162
|
+
React.createElement(Modal.Title, null, translations.PickInformalTaxonGroup)),
|
|
163
|
+
React.createElement(Modal.Body, null, children))) : (React.createElement("div", { className: "informal-taxon-group-chooser" }, children));
|
|
164
|
+
};
|
|
165
|
+
this.getButtonGroup = (id) => {
|
|
166
|
+
const { translations } = this.props.formContext;
|
|
167
|
+
const { informalTaxonGroupsById } = this.state;
|
|
168
|
+
const { Button, ButtonGroup } = this.context.theme;
|
|
169
|
+
return (React.createElement(ButtonGroup, null,
|
|
170
|
+
informalTaxonGroupsById[id].hasSubGroup && React.createElement(Button, { key: "subgroups", onClick: this.onSubgroupSelected(id) }, translations.ShowSubgroups),
|
|
171
|
+
React.createElement(Button, { key: "select", onClick: this.onSelected(id) }, translations.Select)));
|
|
172
|
+
};
|
|
173
|
+
this.getLabel = (id) => {
|
|
174
|
+
const { path, informalTaxonGroupsById } = this.state;
|
|
175
|
+
const name = informalTaxonGroupsById[id].name;
|
|
176
|
+
return path.length <= 1 ? React.createElement("h5", null, name) : React.createElement("span", null, name);
|
|
177
|
+
};
|
|
178
|
+
this.GroupsContainer = ({ children }) => {
|
|
179
|
+
const { rootOnly } = this.props;
|
|
180
|
+
const { Row } = this.context.theme;
|
|
181
|
+
const { ListGroup } = this.context.theme;
|
|
182
|
+
return rootOnly ? React.createElement(Row, null, children) : React.createElement(ListGroup, null, children);
|
|
183
|
+
};
|
|
184
|
+
this.Item = (id) => {
|
|
185
|
+
const { path } = this.state;
|
|
186
|
+
const { rootOnly, grid, activeId } = this.props;
|
|
187
|
+
const { Panel, Col, ListGroupItem } = this.context.theme;
|
|
188
|
+
return !rootOnly ? (React.createElement(ListGroupItem, { key: id, className: path.length > 1 ? "not-root" : "" },
|
|
189
|
+
path.length === 1 ? React.createElement("div", { className: `informal-group-image ${id}` }) : null,
|
|
190
|
+
this.getLabel(id),
|
|
191
|
+
this.getButtonGroup(id))) : (React.createElement(Col, Object.assign({ key: id }, grid),
|
|
192
|
+
React.createElement(Panel, { onClick: this.onSelected(id), variant: id === activeId ? "primary" : undefined },
|
|
193
|
+
React.createElement(Panel.Heading, null, this.getLabel(id)),
|
|
194
|
+
React.createElement(Panel.Body, null,
|
|
195
|
+
React.createElement("div", { className: `informal-group-image ${id}` })))));
|
|
196
|
+
};
|
|
197
|
+
this.state = { path: [undefined] };
|
|
198
|
+
}
|
|
199
|
+
componentDidMount() {
|
|
200
|
+
this.mounted = true;
|
|
201
|
+
getInformalGroups(this.props.formContext.apiClient).then(state => {
|
|
202
|
+
if (!this.mounted)
|
|
203
|
+
return;
|
|
204
|
+
this.setState(Object.assign(Object.assign({}, state), { root: state.informalTaxonGroups }));
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
UNSAFE_componentWillReceiveProps(props) {
|
|
208
|
+
if (this.props.lang === props.lang)
|
|
209
|
+
return;
|
|
210
|
+
getInformalGroups(this.props.formContext.apiClient).then(state => {
|
|
211
|
+
if (!this.mounted)
|
|
212
|
+
return;
|
|
213
|
+
this.setState(Object.assign(Object.assign({}, state), { root: state.informalTaxonGroups }));
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
componentWillUnmount() {
|
|
217
|
+
this.mounted = false;
|
|
218
|
+
}
|
|
219
|
+
render() {
|
|
220
|
+
const { path, informalTaxonGroupsById, informalTaxonGroups } = this.state;
|
|
221
|
+
const { rootOnly } = this.props;
|
|
222
|
+
const { translations } = this.props.formContext;
|
|
223
|
+
const { Container, GroupsContainer, Item } = this;
|
|
224
|
+
const { Breadcrumb } = this.context.theme;
|
|
225
|
+
return (React.createElement(Container, null,
|
|
226
|
+
!rootOnly && (React.createElement(Breadcrumb, null, path.map(id => React.createElement(Breadcrumb.Item, { key: id === undefined ? "root" : id, onClick: this.onSubgroupSelected(id) }, id === undefined ? translations.All : informalTaxonGroupsById[id].name)))),
|
|
227
|
+
informalTaxonGroups
|
|
228
|
+
? React.createElement(GroupsContainer, null, Object.keys(informalTaxonGroups).map(Item))
|
|
229
|
+
: React.createElement(Spinner, null)));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
exports.InformalTaxonGroupChooser = InformalTaxonGroupChooser;
|
|
233
|
+
InformalTaxonGroupChooser.contextType = ReactContext_1.default;
|
|
234
|
+
InformalTaxonGroupChooser.propTypes = {
|
|
235
|
+
onSelected: PropTypes.func.isRequired,
|
|
236
|
+
formContext: PropTypes.object.isRequired
|
|
237
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default class InputGroupWidget extends React.Component<any, any, any> {
|
|
2
|
+
static contextType: React.Context<import("../../ReactContext").ContextProps>;
|
|
3
|
+
static propTypes: {
|
|
4
|
+
uiSchema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
5
|
+
"ui:options": PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
+
inputGroupText: PropTypes.Requireable<string>;
|
|
7
|
+
inputType: PropTypes.Requireable<string>;
|
|
8
|
+
className: PropTypes.Requireable<string>;
|
|
9
|
+
}>>;
|
|
10
|
+
}>>;
|
|
11
|
+
schema: PropTypes.Validator<PropTypes.InferProps<{
|
|
12
|
+
type: PropTypes.Requireable<string>;
|
|
13
|
+
}>>;
|
|
14
|
+
value: PropTypes.Requireable<string>;
|
|
15
|
+
required: PropTypes.Requireable<boolean>;
|
|
16
|
+
};
|
|
17
|
+
constructor(props: any);
|
|
18
|
+
constructor(props: any, context: any);
|
|
19
|
+
}
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import * as PropTypes from "prop-types";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const PropTypes = require("prop-types");
|
|
5
|
+
const BaseInputTemplate_1 = require("../templates/BaseInputTemplate");
|
|
6
|
+
const ReactContext_1 = require("../../ReactContext");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
8
|
+
const TextareaWidget_1 = require("./TextareaWidget");
|
|
9
|
+
class InputGroupWidget extends React.Component {
|
|
10
|
+
render() {
|
|
11
|
+
const { InputGroup } = this.context.theme;
|
|
12
|
+
const { inputGroupText = "", inputType = "basic", className = "" } = utils_1.getUiOptions(this.props);
|
|
13
|
+
const input = inputType === "textarea" ? React.createElement(TextareaWidget_1.default, Object.assign({}, this.props)) : React.createElement(BaseInputTemplate_1.default, Object.assign({}, this.props));
|
|
14
|
+
return (React.createElement(InputGroup, { key: inputGroupText, className: utils_1.classNames("input-group-widget", `input-group-${inputType}`, className) },
|
|
15
|
+
React.createElement(InputGroup.Addon, { className: "input-group-text" },
|
|
16
|
+
inputGroupText,
|
|
17
|
+
this.props.required && React.createElement("span", { className: "text-danger" }, "*")),
|
|
18
|
+
input));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = InputGroupWidget;
|
|
22
|
+
InputGroupWidget.contextType = ReactContext_1.default;
|
|
23
|
+
InputGroupWidget.propTypes = {
|
|
24
|
+
uiSchema: PropTypes.shape({
|
|
25
|
+
"ui:options": PropTypes.shape({
|
|
26
|
+
inputGroupText: PropTypes.string,
|
|
27
|
+
inputType: PropTypes.oneOf(["basic", "textarea"]),
|
|
28
|
+
className: PropTypes.string
|
|
29
|
+
})
|
|
30
|
+
}),
|
|
31
|
+
schema: PropTypes.shape({
|
|
32
|
+
type: PropTypes.oneOf(["string", "number", "integer"]),
|
|
33
|
+
}).isRequired,
|
|
34
|
+
value: PropTypes.string,
|
|
35
|
+
required: PropTypes.bool
|
|
36
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default class InputWithDefaultValueButtonWidget extends React.Component<any, any, any> {
|
|
2
|
+
static contextType: React.Context<import("../../ReactContext").ContextProps>;
|
|
3
|
+
static propTypes: {
|
|
4
|
+
uiSchema: PropTypes.Validator<PropTypes.InferProps<{
|
|
5
|
+
"ui:options": PropTypes.Validator<PropTypes.InferProps<{
|
|
6
|
+
buttonLabel: PropTypes.Validator<string>;
|
|
7
|
+
contextFieldForDefaultValue: PropTypes.Requireable<string>;
|
|
8
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
|
+
}>>;
|
|
10
|
+
}>>;
|
|
11
|
+
schema: PropTypes.Validator<PropTypes.InferProps<{
|
|
12
|
+
type: PropTypes.Requireable<string>;
|
|
13
|
+
}>>;
|
|
14
|
+
value: PropTypes.Requireable<string>;
|
|
15
|
+
};
|
|
16
|
+
constructor(props: any);
|
|
17
|
+
constructor(props: any, context: any);
|
|
18
|
+
onClick: () => void;
|
|
19
|
+
}
|
|
20
|
+
import * as React from "react";
|
|
21
|
+
import * as PropTypes from "prop-types";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const PropTypes = require("prop-types");
|
|
5
|
+
const BaseInputTemplate_1 = require("../templates/BaseInputTemplate");
|
|
6
|
+
const ReactContext_1 = require("../../ReactContext");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
8
|
+
class InputWithDefaultValueButtonWidget extends React.Component {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.onClick = () => {
|
|
12
|
+
const { contextFieldForDefaultValue, onClick } = utils_1.getUiOptions(this.props);
|
|
13
|
+
if (contextFieldForDefaultValue) {
|
|
14
|
+
const uiSchemaContext = this.props.formContext.uiSchemaContext || {};
|
|
15
|
+
const defaultValue = uiSchemaContext[contextFieldForDefaultValue];
|
|
16
|
+
this.props.onChange(defaultValue);
|
|
17
|
+
}
|
|
18
|
+
if (onClick) {
|
|
19
|
+
onClick();
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
const { InputGroup, Button } = this.context.theme;
|
|
25
|
+
const { buttonLabel } = utils_1.getUiOptions(this.props);
|
|
26
|
+
const { disabled, readonly } = this.props;
|
|
27
|
+
return (React.createElement(InputGroup, null,
|
|
28
|
+
React.createElement(BaseInputTemplate_1.default, Object.assign({}, this.props)),
|
|
29
|
+
React.createElement(InputGroup.Button, { className: "input-group-button" },
|
|
30
|
+
React.createElement(Button, { onClick: this.onClick, disabled: disabled || readonly }, buttonLabel))));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.default = InputWithDefaultValueButtonWidget;
|
|
34
|
+
InputWithDefaultValueButtonWidget.contextType = ReactContext_1.default;
|
|
35
|
+
InputWithDefaultValueButtonWidget.propTypes = {
|
|
36
|
+
uiSchema: PropTypes.shape({
|
|
37
|
+
"ui:options": PropTypes.shape({
|
|
38
|
+
buttonLabel: PropTypes.string.isRequired,
|
|
39
|
+
contextFieldForDefaultValue: PropTypes.string,
|
|
40
|
+
onClick: PropTypes.func
|
|
41
|
+
}).isRequired
|
|
42
|
+
}).isRequired,
|
|
43
|
+
schema: PropTypes.shape({
|
|
44
|
+
type: PropTypes.oneOf(["string", "number", "integer"]),
|
|
45
|
+
}).isRequired,
|
|
46
|
+
value: PropTypes.string
|
|
47
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default class NumberWidget extends React.Component<any, any, any> {
|
|
2
|
+
static propTypes: {
|
|
3
|
+
schema: PropTypes.Validator<PropTypes.InferProps<{
|
|
4
|
+
type: PropTypes.Requireable<string>;
|
|
5
|
+
}>>;
|
|
6
|
+
value: PropTypes.Requireable<string>;
|
|
7
|
+
};
|
|
8
|
+
constructor(props: any);
|
|
9
|
+
constructor(props: any, context: any);
|
|
10
|
+
formatValue: (value: any) => any;
|
|
11
|
+
}
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
import * as PropTypes from "prop-types";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const PropTypes = require("prop-types");
|
|
5
|
+
const BaseInputTemplate_1 = require("../templates/BaseInputTemplate");
|
|
6
|
+
class NumberWidget extends React.Component {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.formatValue = (value) => !isNaN(value) ? value : null;
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return React.createElement(BaseInputTemplate_1.default, Object.assign({}, this.props, { formatValue: this.formatValue }));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.default = NumberWidget;
|
|
16
|
+
NumberWidget.propTypes = {
|
|
17
|
+
schema: PropTypes.shape({
|
|
18
|
+
type: PropTypes.oneOf(["string"])
|
|
19
|
+
}).isRequired,
|
|
20
|
+
value: PropTypes.string
|
|
21
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default PlainTextWidget;
|
|
2
|
+
declare function PlainTextWidget(props: any): JSX.Element;
|
|
3
|
+
declare namespace PlainTextWidget {
|
|
4
|
+
namespace propTypes {
|
|
5
|
+
const id: PropTypes.Validator<string>;
|
|
6
|
+
const value: PropTypes.Requireable<string | number>;
|
|
7
|
+
const schema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
8
|
+
type: PropTypes.Requireable<string>;
|
|
9
|
+
}>>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
import * as PropTypes from "prop-types";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const PropTypes = require("prop-types");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
function PlainTextWidget(props) {
|
|
7
|
+
const { id, value } = props;
|
|
8
|
+
const { strong, "ui:widget": formatterWidget, "ui:options": formatterOptions, centered, tag } = utils_1.getUiOptions(props);
|
|
9
|
+
const formattedValue = utils_1.formatValue(Object.assign(Object.assign({}, props), { uiSchema: formatterWidget ? { "ui:widget": formatterWidget, options: formatterOptions } : props.uiSchema, schema: props.schema, formData: props.value }));
|
|
10
|
+
const Tag = tag || "span";
|
|
11
|
+
return (React.createElement(Tag, { className: `plainText${centered ? " horizontally-centered row-height" : ""}` },
|
|
12
|
+
strong ? React.createElement("strong", null, formattedValue) : formattedValue,
|
|
13
|
+
React.createElement("input", { type: "hidden", id: id, value: typeof value === "undefined" ? "" : value })));
|
|
14
|
+
}
|
|
15
|
+
if (process.env.NODE_ENV !== "production") {
|
|
16
|
+
PlainTextWidget.propTypes = {
|
|
17
|
+
id: PropTypes.string.isRequired,
|
|
18
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
19
|
+
schema: PropTypes.shape({
|
|
20
|
+
type: PropTypes.oneOf(["string", "number", "integer"])
|
|
21
|
+
})
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
exports.default = PlainTextWidget;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export default SelectWidget;
|
|
2
|
+
declare class SelectWidget extends React.Component<any, any, any> {
|
|
3
|
+
static contextType: React.Context<import("../../ReactContext").ContextProps>;
|
|
4
|
+
constructor(props: any);
|
|
5
|
+
_context: Record<string, unknown>;
|
|
6
|
+
mounted: boolean | undefined;
|
|
7
|
+
getEnumOptions(props: any): any;
|
|
8
|
+
getStateFromProps(props: any): {
|
|
9
|
+
valsToItems: any;
|
|
10
|
+
enumOptions: any;
|
|
11
|
+
value: any;
|
|
12
|
+
};
|
|
13
|
+
multiSelectOnChange: (values: any) => void;
|
|
14
|
+
selectOnChange: (item: any) => void;
|
|
15
|
+
onClick: () => void;
|
|
16
|
+
onFocus: () => void;
|
|
17
|
+
onBlur: () => void;
|
|
18
|
+
onSelect: (item: any) => void;
|
|
19
|
+
onToggle: () => void;
|
|
20
|
+
onKeyDown: (e: any) => void;
|
|
21
|
+
setRef: (elem: any) => void;
|
|
22
|
+
elemRef: any;
|
|
23
|
+
getEnum: (val: any) => any;
|
|
24
|
+
}
|
|
25
|
+
declare namespace SelectWidget {
|
|
26
|
+
namespace defaultProps {
|
|
27
|
+
const autofocus: boolean;
|
|
28
|
+
}
|
|
29
|
+
namespace propTypes {
|
|
30
|
+
export const schema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
31
|
+
type: PropTypes.Requireable<string>;
|
|
32
|
+
}>>;
|
|
33
|
+
export const id: PropTypes.Validator<string>;
|
|
34
|
+
export const uiSchema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
35
|
+
"ui:options": PropTypes.Requireable<PropTypes.InferProps<{
|
|
36
|
+
enumOptions: PropTypes.Requireable<any[]>;
|
|
37
|
+
order: PropTypes.Requireable<any[]>;
|
|
38
|
+
filter: PropTypes.Requireable<any[]>;
|
|
39
|
+
filterType: PropTypes.Requireable<string>;
|
|
40
|
+
labels: PropTypes.Requireable<object>;
|
|
41
|
+
}>>;
|
|
42
|
+
}>>;
|
|
43
|
+
export const value: PropTypes.Requireable<string | any[]>;
|
|
44
|
+
export const required: PropTypes.Requireable<boolean>;
|
|
45
|
+
export const multiple: PropTypes.Requireable<boolean>;
|
|
46
|
+
const autofocus_1: PropTypes.Requireable<boolean>;
|
|
47
|
+
export { autofocus_1 as autofocus };
|
|
48
|
+
export const onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
import * as React from "react";
|
|
52
|
+
import * as PropTypes from "prop-types";
|