@woosmap/ui 4.203.0 → 4.206.0
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/package.json
CHANGED
|
@@ -143,15 +143,13 @@ export default class AutocompleteAddressDemo extends Component {
|
|
|
143
143
|
},
|
|
144
144
|
})
|
|
145
145
|
.then((response) => {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
);
|
|
154
|
-
}
|
|
146
|
+
this.setState(
|
|
147
|
+
{
|
|
148
|
+
error: null,
|
|
149
|
+
selectedLocality: response.data.result,
|
|
150
|
+
},
|
|
151
|
+
() => this.displayOnMap(),
|
|
152
|
+
);
|
|
155
153
|
})
|
|
156
154
|
.catch((error) => {
|
|
157
155
|
const errorResult = (error && error.response && error.response.data) || 'Unhandled error';
|
|
@@ -403,15 +401,19 @@ export default class AutocompleteAddressDemo extends Component {
|
|
|
403
401
|
<div className="showcase-header">{this.renderHeaderFilters()}</div>
|
|
404
402
|
<div className="showcase-result">
|
|
405
403
|
<Tab>
|
|
406
|
-
<div title={tr('Result')}>
|
|
404
|
+
<div title={tr('Result')} id={selectedLocality && 'click-result'}>
|
|
407
405
|
<div className="showcase-result-wrapper showcase-result-wrapper-2cols">
|
|
408
406
|
{this.renderAddress()}
|
|
409
407
|
</div>
|
|
410
408
|
</div>
|
|
411
409
|
{this.requestUrl ? (
|
|
412
|
-
<div
|
|
410
|
+
<div
|
|
411
|
+
title={tr('Request / Response')}
|
|
412
|
+
id={selectedLocality && 'click-request-response'}
|
|
413
|
+
disabled={!selectedLocality}
|
|
414
|
+
>
|
|
413
415
|
<div className="showcase-result-wrapper nopad">
|
|
414
|
-
<div className="showcase-
|
|
416
|
+
<div className="showcase-request-response">
|
|
415
417
|
<h4>{tr('Request')}</h4>
|
|
416
418
|
<CodeSnippet language="bash" codeString={this.renderCurlCode()} />
|
|
417
419
|
</div>
|
|
@@ -429,7 +431,11 @@ export default class AutocompleteAddressDemo extends Component {
|
|
|
429
431
|
) : null}
|
|
430
432
|
|
|
431
433
|
{withMap ? (
|
|
432
|
-
<div
|
|
434
|
+
<div
|
|
435
|
+
title={tr('Map')}
|
|
436
|
+
id={selectedLocality && 'click-map'}
|
|
437
|
+
disabled={!selectedLocality}
|
|
438
|
+
>
|
|
433
439
|
<div style={{ height: '100%', width: '100%' }} className={MAP_CLASSNAME} />
|
|
434
440
|
</div>
|
|
435
441
|
) : null}
|
|
@@ -41,7 +41,7 @@ export default class Tab extends Component {
|
|
|
41
41
|
|
|
42
42
|
renderHeader(childrenOfTab) {
|
|
43
43
|
return Children.toArray(childrenOfTab).map((childTab, index) => {
|
|
44
|
-
const { title, icon, iconSize, className, disabled } = childTab.props;
|
|
44
|
+
const { id, title, icon, iconSize, className, disabled } = childTab.props;
|
|
45
45
|
const { type, testId } = this.props;
|
|
46
46
|
const btnType = !type || undefined ? 'tab' : `tab--${type}`;
|
|
47
47
|
return (
|
|
@@ -54,6 +54,7 @@ export default class Tab extends Component {
|
|
|
54
54
|
label={title}
|
|
55
55
|
icon={icon}
|
|
56
56
|
iconSize={iconSize}
|
|
57
|
+
id={id}
|
|
57
58
|
testId={`${testId}-header-button`}
|
|
58
59
|
disabled={disabled}
|
|
59
60
|
/>
|