@luomus/laji-form 15.1.30 → 15.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/laji-form.js +1 -1
- package/lib/components/fields/ConditionalUiSchemaField.d.ts +21 -0
- package/lib/components/fields/ConditionalUiSchemaField.js +4 -0
- package/lib/components/fields/FilterArrayField.d.ts +12 -0
- package/lib/components/fields/MultiArrayField.d.ts +6 -0
- package/lib/components/templates/ErrorListTemplate.js +1 -1
- package/lib/components/widgets/AutosuggestWidget.d.ts +1 -1
- package/lib/components/widgets/AutosuggestWidget.js +49 -48
- package/lib/translations.json +5 -0
- package/package.json +1 -1
- package/test-export/test-utils.d.ts +3 -0
- package/test-export/test-utils.js +1 -0
|
@@ -5,6 +5,9 @@ export const rulePropType: PropTypes.Requireable<string | PropTypes.InferProps<{
|
|
|
5
5
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
6
6
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
7
7
|
complement: PropTypes.Requireable<boolean>;
|
|
8
|
+
}> | PropTypes.InferProps<{
|
|
9
|
+
rule: PropTypes.Requireable<string>;
|
|
10
|
+
complement: PropTypes.Requireable<boolean>;
|
|
8
11
|
}>>;
|
|
9
12
|
export const operationPropType: PropTypes.Requireable<PropTypes.InferProps<{
|
|
10
13
|
type: PropTypes.Requireable<string>;
|
|
@@ -17,6 +20,9 @@ export const rulesPropType: PropTypes.Requireable<string | PropTypes.InferProps<
|
|
|
17
20
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
18
21
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
19
22
|
complement: PropTypes.Requireable<boolean>;
|
|
23
|
+
}> | PropTypes.InferProps<{
|
|
24
|
+
rule: PropTypes.Requireable<string>;
|
|
25
|
+
complement: PropTypes.Requireable<boolean>;
|
|
20
26
|
}> | (string | PropTypes.InferProps<{
|
|
21
27
|
container: PropTypes.Requireable<string>;
|
|
22
28
|
field: PropTypes.Validator<string>;
|
|
@@ -24,6 +30,9 @@ export const rulesPropType: PropTypes.Requireable<string | PropTypes.InferProps<
|
|
|
24
30
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
25
31
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
26
32
|
complement: PropTypes.Requireable<boolean>;
|
|
33
|
+
}> | PropTypes.InferProps<{
|
|
34
|
+
rule: PropTypes.Requireable<string>;
|
|
35
|
+
complement: PropTypes.Requireable<boolean>;
|
|
27
36
|
}> | null | undefined)[]>;
|
|
28
37
|
/**
|
|
29
38
|
* Transforms uiSchema according to conditional cases. Cases are not mutually exclusive.
|
|
@@ -64,6 +73,9 @@ export default class ConditionalUiSchemaField extends React.Component<any, any,
|
|
|
64
73
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
65
74
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
66
75
|
complement: PropTypes.Requireable<boolean>;
|
|
76
|
+
}> | PropTypes.InferProps<{
|
|
77
|
+
rule: PropTypes.Requireable<string>;
|
|
78
|
+
complement: PropTypes.Requireable<boolean>;
|
|
67
79
|
}> | (string | PropTypes.InferProps<{
|
|
68
80
|
container: PropTypes.Requireable<string>;
|
|
69
81
|
field: PropTypes.Validator<string>;
|
|
@@ -71,6 +83,9 @@ export default class ConditionalUiSchemaField extends React.Component<any, any,
|
|
|
71
83
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
72
84
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
73
85
|
complement: PropTypes.Requireable<boolean>;
|
|
86
|
+
}> | PropTypes.InferProps<{
|
|
87
|
+
rule: PropTypes.Requireable<string>;
|
|
88
|
+
complement: PropTypes.Requireable<boolean>;
|
|
74
89
|
}> | null | undefined)[]>;
|
|
75
90
|
operations: PropTypes.Requireable<PropTypes.InferProps<{
|
|
76
91
|
type: PropTypes.Requireable<string>;
|
|
@@ -87,6 +102,9 @@ export default class ConditionalUiSchemaField extends React.Component<any, any,
|
|
|
87
102
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
88
103
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
89
104
|
complement: PropTypes.Requireable<boolean>;
|
|
105
|
+
}> | PropTypes.InferProps<{
|
|
106
|
+
rule: PropTypes.Requireable<string>;
|
|
107
|
+
complement: PropTypes.Requireable<boolean>;
|
|
90
108
|
}> | (string | PropTypes.InferProps<{
|
|
91
109
|
container: PropTypes.Requireable<string>;
|
|
92
110
|
field: PropTypes.Validator<string>;
|
|
@@ -94,6 +112,9 @@ export default class ConditionalUiSchemaField extends React.Component<any, any,
|
|
|
94
112
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
95
113
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
96
114
|
complement: PropTypes.Requireable<boolean>;
|
|
115
|
+
}> | PropTypes.InferProps<{
|
|
116
|
+
rule: PropTypes.Requireable<string>;
|
|
117
|
+
complement: PropTypes.Requireable<boolean>;
|
|
97
118
|
}> | null | undefined)[]>;
|
|
98
119
|
operations: PropTypes.Requireable<PropTypes.InferProps<{
|
|
99
120
|
type: PropTypes.Requireable<string>;
|
|
@@ -21,6 +21,10 @@ exports.rulePropType = PropTypes.oneOfType([
|
|
|
21
21
|
valueLengthLessThan: PropTypes.number,
|
|
22
22
|
complement: PropTypes.bool
|
|
23
23
|
}),
|
|
24
|
+
PropTypes.shape({
|
|
25
|
+
rule: PropTypes.oneOf(["isAdmin", "isEdit"]),
|
|
26
|
+
complement: PropTypes.bool
|
|
27
|
+
}),
|
|
24
28
|
PropTypes.oneOf(["isAdmin", "isEdit"])
|
|
25
29
|
]);
|
|
26
30
|
exports.operationPropType = PropTypes.shape({
|
|
@@ -5,6 +5,9 @@ export const arrayRulesPropType: PropTypes.Requireable<string | PropTypes.InferP
|
|
|
5
5
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
6
6
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
7
7
|
complement: PropTypes.Requireable<boolean>;
|
|
8
|
+
}> | PropTypes.InferProps<{
|
|
9
|
+
rule: PropTypes.Requireable<string>;
|
|
10
|
+
complement: PropTypes.Requireable<boolean>;
|
|
8
11
|
}> | PropTypes.InferProps<{
|
|
9
12
|
idx: PropTypes.Requireable<number>;
|
|
10
13
|
isLast: PropTypes.Requireable<number>;
|
|
@@ -16,6 +19,9 @@ export const arrayRulesPropType: PropTypes.Requireable<string | PropTypes.InferP
|
|
|
16
19
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
17
20
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
18
21
|
complement: PropTypes.Requireable<boolean>;
|
|
22
|
+
}> | PropTypes.InferProps<{
|
|
23
|
+
rule: PropTypes.Requireable<string>;
|
|
24
|
+
complement: PropTypes.Requireable<boolean>;
|
|
19
25
|
}> | PropTypes.InferProps<{
|
|
20
26
|
idx: PropTypes.Requireable<number>;
|
|
21
27
|
isLast: PropTypes.Requireable<number>;
|
|
@@ -32,6 +38,9 @@ export default class FilterArrayField extends React.Component<any, any, any> {
|
|
|
32
38
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
33
39
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
34
40
|
complement: PropTypes.Requireable<boolean>;
|
|
41
|
+
}> | PropTypes.InferProps<{
|
|
42
|
+
rule: PropTypes.Requireable<string>;
|
|
43
|
+
complement: PropTypes.Requireable<boolean>;
|
|
35
44
|
}> | PropTypes.InferProps<{
|
|
36
45
|
idx: PropTypes.Requireable<number>;
|
|
37
46
|
isLast: PropTypes.Requireable<number>;
|
|
@@ -43,6 +52,9 @@ export default class FilterArrayField extends React.Component<any, any, any> {
|
|
|
43
52
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
44
53
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
45
54
|
complement: PropTypes.Requireable<boolean>;
|
|
55
|
+
}> | PropTypes.InferProps<{
|
|
56
|
+
rule: PropTypes.Requireable<string>;
|
|
57
|
+
complement: PropTypes.Requireable<boolean>;
|
|
46
58
|
}> | PropTypes.InferProps<{
|
|
47
59
|
idx: PropTypes.Requireable<number>;
|
|
48
60
|
isLast: PropTypes.Requireable<number>;
|
|
@@ -9,6 +9,9 @@ export default class MultiArrayField extends React.Component<any, any, any> {
|
|
|
9
9
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
10
10
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
11
11
|
complement: PropTypes.Requireable<boolean>;
|
|
12
|
+
}> | PropTypes.InferProps<{
|
|
13
|
+
rule: PropTypes.Requireable<string>;
|
|
14
|
+
complement: PropTypes.Requireable<boolean>;
|
|
12
15
|
}> | PropTypes.InferProps<{
|
|
13
16
|
idx: PropTypes.Requireable<number>;
|
|
14
17
|
isLast: PropTypes.Requireable<number>;
|
|
@@ -20,6 +23,9 @@ export default class MultiArrayField extends React.Component<any, any, any> {
|
|
|
20
23
|
valueIn: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
21
24
|
valueLengthLessThan: PropTypes.Requireable<number>;
|
|
22
25
|
complement: PropTypes.Requireable<boolean>;
|
|
26
|
+
}> | PropTypes.InferProps<{
|
|
27
|
+
rule: PropTypes.Requireable<string>;
|
|
28
|
+
complement: PropTypes.Requireable<boolean>;
|
|
23
29
|
}> | PropTypes.InferProps<{
|
|
24
30
|
idx: PropTypes.Requireable<number>;
|
|
25
31
|
isLast: PropTypes.Requireable<number>;
|
|
@@ -71,7 +71,7 @@ class ErrorListTemplate extends React.Component {
|
|
|
71
71
|
_path = `${_path}/items`;
|
|
72
72
|
else
|
|
73
73
|
_path = `${_path}/properties/${prop}`;
|
|
74
|
-
const _defaultTitle = uiSchema["ui:multiLanguage"] ? `${title} (${prop})` : prop;
|
|
74
|
+
const _defaultTitle = _schema.type === "array" || uiSchema["ui:multiLanguage"] ? `${title} (${prop})` : prop;
|
|
75
75
|
const childErrors = walkErrors(_path, `${id}_${prop}`, errorSchema[prop], uiSchema[prop] || {}, _defaultTitle);
|
|
76
76
|
errors = [...errors, ...childErrors.errors];
|
|
77
77
|
warnings = [...warnings, ...childErrors.warnings];
|
|
@@ -37,7 +37,7 @@ export class Autosuggest extends React.Component<any, any, any> {
|
|
|
37
37
|
getSuggestionValue: (suggestion: any) => any;
|
|
38
38
|
renderSuggestion: (suggestion: any) => JSX.Element;
|
|
39
39
|
selectSuggestion: (suggestion: any) => void;
|
|
40
|
-
selectUnsuggested: (
|
|
40
|
+
selectUnsuggested: (inputValue: any) => void;
|
|
41
41
|
onSuggestionSelected: (suggestion: any) => void;
|
|
42
42
|
onUnsuggestedSelected: (inputValue: any) => void;
|
|
43
43
|
findExactMatch: (suggestions: any, inputValue?: string) => any;
|
|
@@ -48,6 +48,8 @@ class _AutosuggestWidget extends React.Component {
|
|
|
48
48
|
return React.createElement(OrganizationAutosuggestWidget, Object.assign({}, this.props));
|
|
49
49
|
case "collection":
|
|
50
50
|
return React.createElement(CollectionAutosuggestWidget, Object.assign({}, this.props));
|
|
51
|
+
case "dataset":
|
|
52
|
+
return React.createElement(DatasetAutosuggestWidget, Object.assign({}, this.props));
|
|
51
53
|
default:
|
|
52
54
|
return React.createElement(RangeAutosuggestWidget, Object.assign({}, this.props));
|
|
53
55
|
}
|
|
@@ -74,6 +76,9 @@ class _AutosuggestWidget extends React.Component {
|
|
|
74
76
|
case "collection":
|
|
75
77
|
component = CollectionAutosuggestWidget;
|
|
76
78
|
break;
|
|
79
|
+
case "dataset":
|
|
80
|
+
component = DatasetAutosuggestWidget;
|
|
81
|
+
break;
|
|
77
82
|
default:
|
|
78
83
|
component = RangeAutosuggestWidget;
|
|
79
84
|
}
|
|
@@ -314,46 +319,24 @@ class FriendsAutosuggestWidget extends React.Component {
|
|
|
314
319
|
}
|
|
315
320
|
FriendsAutosuggestWidget.contextType = ReactContext_1.default;
|
|
316
321
|
class OrganizationAutosuggestWidget extends React.Component {
|
|
317
|
-
constructor(props) {
|
|
318
|
-
super(props);
|
|
319
|
-
this.findExactMatch = (suggestions, inputValue) => {
|
|
320
|
-
return suggestions.find(suggestion => (suggestion && suggestion.value.toLowerCase() === inputValue.trim().toLowerCase()));
|
|
321
|
-
};
|
|
322
|
-
this.getSuggestionFromValue = this.getSuggestionFromValue.bind(this);
|
|
323
|
-
this.isValueSuggested = this.isValueSuggested.bind(this);
|
|
324
|
-
}
|
|
325
|
-
getSuggestionFromValue(value) {
|
|
326
|
-
if (this.isValueSuggested(value)) {
|
|
327
|
-
return this.props.formContext.apiClient.fetchCached(`/organization/by-id/${value}`).then(({ fullName }) => {
|
|
328
|
-
if (fullName) {
|
|
329
|
-
return {
|
|
330
|
-
value: fullName,
|
|
331
|
-
key: value
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
else {
|
|
337
|
-
return Promise.reject();
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
isValueSuggested(value) {
|
|
341
|
-
return !utils_1.isEmptyString(value) && value.match(/MOS\.\d+/);
|
|
342
|
-
}
|
|
343
322
|
render() {
|
|
344
|
-
|
|
345
|
-
const options = {
|
|
346
|
-
query: Object.assign({ includeSelf: true }, propsOptions.queryOptions),
|
|
347
|
-
getSuggestionFromValue: this.getSuggestionFromValue,
|
|
348
|
-
isValueSuggested: this.isValueSuggested,
|
|
349
|
-
Wrapper: OrganizationWrapper,
|
|
350
|
-
findExactMatch: this.findExactMatch
|
|
351
|
-
};
|
|
352
|
-
return React.createElement(Autosuggest, Object.assign({}, options, propsWithoutOptions, propsOptions));
|
|
323
|
+
return (React.createElement(BasicAutosuggestWidget, Object.assign({}, this.props, this.props.options, { nameField: "fullName", validValueRegexp: "MOS.\\d+", Wrapper: OrganizationWrapper })));
|
|
353
324
|
}
|
|
354
325
|
}
|
|
355
326
|
OrganizationAutosuggestWidget.contextType = ReactContext_1.default;
|
|
356
327
|
class CollectionAutosuggestWidget extends React.Component {
|
|
328
|
+
render() {
|
|
329
|
+
return (React.createElement(BasicAutosuggestWidget, Object.assign({}, this.props, this.props.options, { nameField: "collectionName", validValueRegexp: "HR.\\d+", Wrapper: CollectionWrapper })));
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
CollectionAutosuggestWidget.contextType = ReactContext_1.default;
|
|
333
|
+
class DatasetAutosuggestWidget extends React.Component {
|
|
334
|
+
render() {
|
|
335
|
+
return (React.createElement(BasicAutosuggestWidget, Object.assign({}, this.props, this.props.options, { nameField: "datasetName", validValueRegexp: "GX.\\d+", Wrapper: DatasetWrapper })));
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
DatasetAutosuggestWidget.contextType = ReactContext_1.default;
|
|
339
|
+
class BasicAutosuggestWidget extends React.Component {
|
|
357
340
|
constructor(props) {
|
|
358
341
|
super(props);
|
|
359
342
|
this.findExactMatch = (suggestions, inputValue) => {
|
|
@@ -363,11 +346,12 @@ class CollectionAutosuggestWidget extends React.Component {
|
|
|
363
346
|
this.isValueSuggested = this.isValueSuggested.bind(this);
|
|
364
347
|
}
|
|
365
348
|
getSuggestionFromValue(value) {
|
|
349
|
+
const { autosuggestField, nameField } = this.props;
|
|
366
350
|
if (this.isValueSuggested(value)) {
|
|
367
|
-
return this.props.formContext.apiClient.fetchCached(
|
|
368
|
-
if (
|
|
351
|
+
return this.props.formContext.apiClient.fetchCached(`/${autosuggestField}/by-id/${value}`).then(result => {
|
|
352
|
+
if (result[nameField]) {
|
|
369
353
|
return {
|
|
370
|
-
value:
|
|
354
|
+
value: result[nameField],
|
|
371
355
|
key: value
|
|
372
356
|
};
|
|
373
357
|
}
|
|
@@ -378,21 +362,36 @@ class CollectionAutosuggestWidget extends React.Component {
|
|
|
378
362
|
}
|
|
379
363
|
}
|
|
380
364
|
isValueSuggested(value) {
|
|
381
|
-
|
|
365
|
+
const regexp = new RegExp(this.props.validValueRegexp);
|
|
366
|
+
return !utils_1.isEmptyString(value) && value.match(regexp);
|
|
382
367
|
}
|
|
383
368
|
render() {
|
|
384
|
-
const _a = this.props, { options: propsOptions } = _a, propsWithoutOptions = __rest(_a, ["options"]);
|
|
385
369
|
const options = {
|
|
386
|
-
query: Object.assign({ includeSelf: true },
|
|
370
|
+
query: Object.assign({ includeSelf: true }, this.props.queryOptions),
|
|
387
371
|
getSuggestionFromValue: this.getSuggestionFromValue,
|
|
388
372
|
isValueSuggested: this.isValueSuggested,
|
|
389
|
-
Wrapper:
|
|
373
|
+
Wrapper: this.props.Wrapper,
|
|
390
374
|
findExactMatch: this.findExactMatch
|
|
391
375
|
};
|
|
392
|
-
return React.createElement(Autosuggest, Object.assign({}, options,
|
|
376
|
+
return React.createElement(Autosuggest, Object.assign({}, options, this.props));
|
|
393
377
|
}
|
|
394
378
|
}
|
|
395
|
-
|
|
379
|
+
BasicAutosuggestWidget.contextType = ReactContext_1.default;
|
|
380
|
+
BasicAutosuggestWidget.propTypes = {
|
|
381
|
+
autosuggestField: PropTypes.string.isRequired,
|
|
382
|
+
allowNonsuggestedValue: PropTypes.bool,
|
|
383
|
+
onSuggestionSelected: PropTypes.func,
|
|
384
|
+
onUnsuggestedSelected: PropTypes.func,
|
|
385
|
+
onInputChange: PropTypes.func,
|
|
386
|
+
uiSchema: PropTypes.object,
|
|
387
|
+
nameField: PropTypes.string,
|
|
388
|
+
validValueRegexp: PropTypes.string,
|
|
389
|
+
Wrapper: PropTypes.object
|
|
390
|
+
};
|
|
391
|
+
BasicAutosuggestWidget.defaultProps = {
|
|
392
|
+
nameField: "name",
|
|
393
|
+
validValueRegexp: ""
|
|
394
|
+
};
|
|
396
395
|
class RangeAutosuggestWidget extends React.Component {
|
|
397
396
|
render() {
|
|
398
397
|
const _a = this.props, { options: propsOptions } = _a, propsWithoutOptions = __rest(_a, ["options"]);
|
|
@@ -470,16 +469,17 @@ class Autosuggest extends React.Component {
|
|
|
470
469
|
? this.setState(state, afterStateChange)
|
|
471
470
|
: afterStateChange();
|
|
472
471
|
};
|
|
473
|
-
this.selectUnsuggested = (
|
|
474
|
-
if (utils_1.isEmptyString(
|
|
472
|
+
this.selectUnsuggested = (inputValue) => {
|
|
473
|
+
if (utils_1.isEmptyString(inputValue) && utils_1.isEmptyString(this.props.value))
|
|
475
474
|
return;
|
|
475
|
+
const value = !utils_1.isEmptyString(inputValue) ? inputValue : undefined;
|
|
476
476
|
const { onUnsuggestedSelected, onChange } = this.props;
|
|
477
477
|
const afterStateChange = () => {
|
|
478
478
|
onUnsuggestedSelected ?
|
|
479
479
|
onUnsuggestedSelected(value) :
|
|
480
480
|
onChange(value);
|
|
481
481
|
};
|
|
482
|
-
const state = { inputValue
|
|
482
|
+
const state = { inputValue, suggestion: undefined, suggestionForValue: inputValue };
|
|
483
483
|
this.mounted
|
|
484
484
|
? this.setState(state, afterStateChange)
|
|
485
485
|
: afterStateChange();
|
|
@@ -608,7 +608,7 @@ class Autosuggest extends React.Component {
|
|
|
608
608
|
this.selectUnsuggested(parsedInputValue);
|
|
609
609
|
}
|
|
610
610
|
else if (!allowNonsuggestedValue) {
|
|
611
|
-
this.setState({ inputValue: "" }, () => this.props.onChange && this.props.onChange(
|
|
611
|
+
this.setState({ inputValue: "" }, () => this.props.onChange && this.props.onChange(undefined));
|
|
612
612
|
}
|
|
613
613
|
callback && callback();
|
|
614
614
|
};
|
|
@@ -1165,3 +1165,4 @@ const getWrapper = (unknownValueLabel) => React.forwardRef(({ formContext, child
|
|
|
1165
1165
|
const FriendsWrapper = getWrapper("UnknownName");
|
|
1166
1166
|
const OrganizationWrapper = getWrapper("UnknownOrganization");
|
|
1167
1167
|
const CollectionWrapper = getWrapper("UnknownCollection");
|
|
1168
|
+
const DatasetWrapper = getWrapper("UnknownTag");
|
package/lib/translations.json
CHANGED
package/package.json
CHANGED
|
@@ -148,6 +148,7 @@ export declare class Form {
|
|
|
148
148
|
$input: Locator;
|
|
149
149
|
$suggestionsContainer: Locator;
|
|
150
150
|
$suggestions: Locator;
|
|
151
|
+
$loadingSpinner: Locator;
|
|
151
152
|
};
|
|
152
153
|
getTaxonAutosuggestWidget: (lajiFormLocator: string) => {
|
|
153
154
|
$powerUserButton: Locator;
|
|
@@ -156,12 +157,14 @@ export declare class Form {
|
|
|
156
157
|
$input: Locator;
|
|
157
158
|
$suggestionsContainer: Locator;
|
|
158
159
|
$suggestions: Locator;
|
|
160
|
+
$loadingSpinner: Locator;
|
|
159
161
|
};
|
|
160
162
|
getPersonAutosuggestWidget: (lajiFormLocator: string) => {
|
|
161
163
|
$suggestedGlyph: Locator;
|
|
162
164
|
$input: Locator;
|
|
163
165
|
$suggestionsContainer: Locator;
|
|
164
166
|
$suggestions: Locator;
|
|
167
|
+
$loadingSpinner: Locator;
|
|
165
168
|
};
|
|
166
169
|
getScopeField: (lajiFormLocator: string) => {
|
|
167
170
|
$button: Locator;
|
|
@@ -88,6 +88,7 @@ class Form {
|
|
|
88
88
|
$input: this.$locate(lajiFormLocator).locator("input"),
|
|
89
89
|
$suggestionsContainer: this.$locate(lajiFormLocator).locator(".rw-list"),
|
|
90
90
|
$suggestions: this.$locate(lajiFormLocator).locator(".rw-list-option"),
|
|
91
|
+
$loadingSpinner: this.$locate(lajiFormLocator).locator(".react-spinner"),
|
|
91
92
|
};
|
|
92
93
|
};
|
|
93
94
|
this.getTaxonAutosuggestWidget = (lajiFormLocator) => {
|