@mappedin/viewer 0.36.1-c3a0ce0.0 → 0.36.1-e3d997b.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.
Files changed (35) hide show
  1. package/dist/index.js +44549 -39168
  2. package/dist/types/src/components/card-item/index.d.ts +1 -0
  3. package/dist/types/src/components/carousel/index.d.ts +1 -0
  4. package/dist/types/src/components/categories-view/categories-view.stories.d.ts +19 -0
  5. package/dist/types/src/components/categories-view/categories.d.ts +3 -0
  6. package/dist/types/src/components/categories-view/utils.d.ts +1 -0
  7. package/dist/types/src/components/category-icon/category-icon.stories.d.ts +1 -0
  8. package/dist/types/src/components/collapsible/index.d.ts +7 -2
  9. package/dist/types/src/components/legacy-metadata-card/utils.d.ts +2 -0
  10. package/dist/types/src/components/link-item/index.d.ts +5 -0
  11. package/dist/types/src/components/main/index.d.ts +1 -32
  12. package/dist/types/src/components/main/utils.d.ts +38 -0
  13. package/dist/types/src/components/metadata-card/utils.d.ts +14 -0
  14. package/dist/types/src/index.d.ts +1 -0
  15. package/dist/types/src/lib/hooks/use-cached-value.d.ts +5 -0
  16. package/dist/types/src/lib/hooks/use-cached-value.test.d.ts +1 -0
  17. package/dist/types/src/lib/hooks/use-focus.d.ts +1 -0
  18. package/dist/types/src/lib/sdk/types.d.ts +3 -3
  19. package/dist/types/src/lib/time/utils.d.ts +7 -0
  20. package/dist/types/src/lib/utils/data-utils.d.ts +27 -4
  21. package/dist/types/src/lib/utils/icon-utils.d.ts +3 -3
  22. package/dist/types/src/lib/utils/object-utils.d.ts +8 -0
  23. package/dist/types/src/lib/utils/process-places.d.ts +3 -1
  24. package/dist/types/src/lib/utils/search-utils.d.ts +5 -2
  25. package/dist/types/src/states/location-card.d.ts +4 -0
  26. package/dist/types/src/states/main-ui.d.ts +4 -0
  27. package/dist/types/src/stores/analytics-store/index.d.ts +3 -0
  28. package/dist/types/src/stores/root-store/index.d.ts +581 -1
  29. package/dist/types/src/stores/ui-store/index.d.ts +5 -10
  30. package/dist/types/src/stores/ui-store/location-card-store.d.ts +37 -0
  31. package/dist/types/src/stores/ui-store/location-card-store.test.d.ts +1 -0
  32. package/package.json +4 -3
  33. /package/dist/types/src/components/{categories → legacy-categories}/category.d.ts +0 -0
  34. /package/dist/types/src/components/{categories → legacy-categories}/index.d.ts +0 -0
  35. /package/dist/types/src/components/{categories/categories.stories.d.ts → legacy-categories/legacy-categories.stories.d.ts} +0 -0
@@ -7,12 +7,14 @@ import { TGetDisplayNameForPlaceOptions } from '../../lib/utils/data-utils';
7
7
  import { Coordinate, Place } from '../../lib/sdk';
8
8
  import { TContextMenuItemEntry } from '../../components/context-menu';
9
9
  import { TOnClickOrPressPayload } from '../../components/button';
10
+ import LocationCardStore from './location-card-store';
10
11
  declare class UIStore {
11
12
  private rootStore;
12
13
  private reactionDisposers;
13
14
  private makerPopUpDismissed;
14
15
  private searchBarFocusTimeout?;
15
16
  private themeBase;
17
+ locationCardStore: LocationCardStore;
16
18
  reactiveToasts: {
17
19
  cleanup: () => void;
18
20
  }[];
@@ -155,21 +157,13 @@ declare class UIStore {
155
157
  get timeoutModalEnabled(): boolean;
156
158
  get contextMenuItems(): TContextMenuItemEntry[];
157
159
  setTheme(theme: TThemeOverride): void;
158
- /**
159
- * The SDK has some issues handling connection metadata, so if a connection is selected, we must process its metadata
160
- * directly from the MVF.
161
- */
162
- get overrideDetails(): {
163
- name: string;
164
- description: string;
165
- images: string[];
166
- links: import("@mappedin/mvf").Hyperlink[];
167
- } | undefined;
168
160
  dismissMakerPopUp(): void;
169
161
  setSearchQuery(query: string): void;
170
162
  setDepartureSearchQuery(query: string): void;
171
163
  handleMainUIBlur(): void;
172
164
  handleSearchResultSelected(ids: string[], context: 'category' | 'search-result'): void;
165
+ handleCategorySelected(id: string): void;
166
+ handleCategoryBack(): void;
173
167
  handleDepartureSearchResultSelected(ids: string[]): void;
174
168
  handleLevelSelected(level: TLevelSelectorLevel): void;
175
169
  handleDirectionsButtonClick(e?: TOnClickOrPressPayload): void;
@@ -184,6 +178,7 @@ declare class UIStore {
184
178
  getDisplayName(place: Place[]): string;
185
179
  getDisplayName(place: Place, options?: TGetDisplayNameForPlaceOptions & {
186
180
  coordinate?: Coordinate;
181
+ preferLocationName?: boolean;
187
182
  }): string;
188
183
  handleShareClick(): boolean | void;
189
184
  handleAppTimeout(): void;
@@ -0,0 +1,37 @@
1
+ import type RootStore from '../root-store';
2
+ import UIStore from '.';
3
+ declare class LocationCardStore {
4
+ private rootStore;
5
+ private uiStore;
6
+ private reactionDisposers;
7
+ constructor({ rootStore, uiStore }: {
8
+ rootStore: RootStore;
9
+ uiStore: UIStore;
10
+ });
11
+ private get place();
12
+ /**
13
+ * The SDK has some issues handling connection metadata, so if a connection is selected, we must process its metadata
14
+ * directly from the MVF.
15
+ */
16
+ private get overrideDetails();
17
+ private get name();
18
+ private get description();
19
+ private get heroImages();
20
+ private get logoImage();
21
+ private get categories();
22
+ private get links();
23
+ private get socialUrls();
24
+ private get phoneNumber();
25
+ private get hours();
26
+ private get directionsButtonDisabled();
27
+ private handleCategoryClick;
28
+ private handleClose;
29
+ private handleDirectionsClick;
30
+ private handleFullScreenGalleryOpen;
31
+ private handleLinkClick;
32
+ private handleCopyLocationLink;
33
+ get visible(): boolean;
34
+ get props(): import("../../components/metadata-card/utils").TMetadataCardProps | undefined;
35
+ cleanup(): void;
36
+ }
37
+ export default LocationCardStore;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mappedin/viewer",
3
- "version": "0.36.1-c3a0ce0.0",
3
+ "version": "0.36.1-e3d997b.0",
4
4
  "type": "module",
5
5
  "browser": "./dist/index.js",
6
6
  "license": "UNLICENSED",
@@ -18,8 +18,8 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@ladle/react": "^2.17.2",
21
- "@mappedin/mappedin-js": "6.0.1-beta.31",
22
- "@mappedin/mvf": "2.0.1-da38ff6.0",
21
+ "@mappedin/mappedin-js": "6.0.1-canary-v6-location-profile.3.4808af4.445",
22
+ "@mappedin/mvf": "2.0.1-a6680b4.0",
23
23
  "@mappedin/self-serve-icons": "1.70.1-alpha.bl-SRV-2032.1739993160",
24
24
  "@testing-library/jest-dom": "^6.6.2",
25
25
  "@testing-library/react": "^14.2.2",
@@ -78,6 +78,7 @@
78
78
  "dev": "vite --host",
79
79
  "dev:yalc": "vite --host --force",
80
80
  "dev:test": "MOCK_DATA=true vite --host",
81
+ "dev:yalc:test": "MOCK_DATA=true vite --host --force",
81
82
  "dev:playwright": "PLAYWRIGHT=true vite --host",
82
83
  "build": "vite build && tsc --project tsconfig.build.json",
83
84
  "build:watch": "vite build --watch",