@mapvx/website-component 0.10.0 → 0.11.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.
- package/README.md +21 -13
- package/dist/browser/main.js +2 -2
- package/dist/browser/styles.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -344,12 +344,20 @@ You can react to user actions to change the browser URL without a full page relo
|
|
|
344
344
|
break
|
|
345
345
|
}
|
|
346
346
|
case 'show-place': {
|
|
347
|
-
const { placeId } = action.data
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
347
|
+
const { placeId, alias } = action.data
|
|
348
|
+
if (alias) {
|
|
349
|
+
history.pushState(
|
|
350
|
+
{ page: 'profile', id: alias },
|
|
351
|
+
'',
|
|
352
|
+
`${location.pathname}?tenant=${alias}`,
|
|
353
|
+
)
|
|
354
|
+
} else {
|
|
355
|
+
history.pushState(
|
|
356
|
+
{ page: 'profile', id: placeId },
|
|
357
|
+
'',
|
|
358
|
+
`${location.pathname}?tenant=${placeId}`,
|
|
359
|
+
)
|
|
360
|
+
}
|
|
353
361
|
break
|
|
354
362
|
}
|
|
355
363
|
case 'search': {
|
|
@@ -513,13 +521,13 @@ The `userAction` event provides detailed information about user interactions wit
|
|
|
513
521
|
|
|
514
522
|
#### UserAction Types
|
|
515
523
|
|
|
516
|
-
| Type | Description | Data Structure
|
|
517
|
-
| -------------------- | ------------------------------------------ |
|
|
518
|
-
| `select-filter` | Emitted when a filter is selected | `{ filter: string }`
|
|
519
|
-
| `show-place` | Emitted when a place is displayed | `{ placeId: string }`
|
|
520
|
-
| `select-destination` | Emitted when a destination is selected | `{ destinationId: string }` |
|
|
521
|
-
| `search` | Emitted when a search is performed | `{ searchTerm: string }`
|
|
522
|
-
| `return-to-home` | Emitted when user returns to the home view | `{ filter: string }`
|
|
524
|
+
| Type | Description | Data Structure |
|
|
525
|
+
| -------------------- | ------------------------------------------ | --------------------------------------- | ------------ |
|
|
526
|
+
| `select-filter` | Emitted when a filter is selected | `{ filter: string }` |
|
|
527
|
+
| `show-place` | Emitted when a place is displayed | `{ placeId: string, alias: string | undefined }` |
|
|
528
|
+
| `select-destination` | Emitted when a destination is selected | `{ destinationId: string, alias: string | undefined }` |
|
|
529
|
+
| `search` | Emitted when a search is performed | `{ searchTerm: string }` |
|
|
530
|
+
| `return-to-home` | Emitted when user returns to the home view | `{ filter: string }` |
|
|
523
531
|
|
|
524
532
|
#### UserAction Usage Examples
|
|
525
533
|
|