@mappedin/viewer 0.40.1-e05b927.0 → 0.41.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/CHANGELOG.md +22 -0
- package/dist/index.js +25012 -24783
- package/dist/types/src/lib/time/utils.d.ts +5 -0
- package/dist/types/src/lib/utils/data-utils.d.ts +2 -1
- package/dist/types/src/lib/utils/image-utils.d.ts +5 -0
- package/dist/types/src/lib/utils/link-utils.d.ts +1 -0
- package/dist/types/src/stores/feature-flag-store/index.d.ts +3 -1
- package/dist/types/src/stores/map-store/controllers/events.d.ts +1 -1
- package/dist/types/src/stores/map-store/controllers/geometries.d.ts +1 -0
- package/dist/types/src/stores/map-store/controllers/labels.d.ts +1 -0
- package/dist/types/src/stores/root-store/index.d.ts +1 -0
- package/dist/types/src/stores/ui-store/location-card-store.d.ts +1 -0
- package/dist/types/src/stores/ui-store/reactive-toasts/nothing-on-floor-toast.d.ts +15 -0
- package/dist/types/src/stores/ui-store/reactive-toasts/nothing-on-floor-toast.test.d.ts +1 -0
- package/dist/types/src/stores/ui-store/reactive-toasts/similar-places-toast.d.ts +1 -1
- package/dist/types/src/test-utils/test-mocks.d.ts +1 -0
- package/dist/types/src/test-utils/test-with-map.d.ts +1 -0
- package/package.json +2 -2
|
@@ -39,3 +39,8 @@ export declare const parseTimeString: (time: string) => {
|
|
|
39
39
|
hours: number;
|
|
40
40
|
minutes: number;
|
|
41
41
|
};
|
|
42
|
+
/**
|
|
43
|
+
* The difference between two times in number of days. Rounds up to the nearest whole day.
|
|
44
|
+
*/
|
|
45
|
+
export declare const diffDays: (start: Date, end: Date) => number;
|
|
46
|
+
export declare const timeRangeToDaysOfWeek: (start: Date, end: Date, tz: string) => number[];
|
|
@@ -64,4 +64,5 @@ export declare const isOnFloor: (place: Place, floor: Floor | string | undefined
|
|
|
64
64
|
* Convert the opening hours format from the SDK to a format the viewer wants to render.
|
|
65
65
|
*/
|
|
66
66
|
export declare const convertHours: (hours: LocationProfile["openingHours"], tz?: string) => OpeningHours;
|
|
67
|
-
export declare const isGeometry: (place:
|
|
67
|
+
export declare const isGeometry: (place: object) => place is Geometry;
|
|
68
|
+
export declare const isPlace: (place: object) => place is Place;
|
|
@@ -43,3 +43,8 @@ export type TImageFit = 'fill' | 'fit';
|
|
|
43
43
|
export declare const resizedImageSrc: (src: string, size: TImageSize, options?: Partial<{
|
|
44
44
|
fit: "fill" | "fit";
|
|
45
45
|
}>) => string;
|
|
46
|
+
export declare const appendSasToken: (url: string, sasToken?: string) => string;
|
|
47
|
+
/**
|
|
48
|
+
* Appends a SAS token to the URL if it's a MappedIn CDN URL.
|
|
49
|
+
*/
|
|
50
|
+
export declare const maybeWithSasToken: (url: string, getSasToken: () => Promise<string | undefined>) => Promise<string>;
|
|
@@ -2,3 +2,4 @@ export declare const openLink: (link: string) => Window | null | undefined;
|
|
|
2
2
|
export declare const isValidLink: (link: string) => boolean;
|
|
3
3
|
export declare const isValidSocialLink: (social: string, link: string) => boolean;
|
|
4
4
|
export declare const isMappedinCdnUrl: (url: string) => boolean;
|
|
5
|
+
export declare const ensureProtocol: (url: string) => string;
|
|
@@ -15,7 +15,8 @@ export declare enum E_FEATURE_FLAGS {
|
|
|
15
15
|
AUTH_URL = "auth-url",
|
|
16
16
|
MULTI_FLOOR_VIEW = "multi-floor-view",
|
|
17
17
|
SAFETY_MODE = "safety-mode",
|
|
18
|
-
SIMILAR_PLACES_TOAST = "similar-places-toast"
|
|
18
|
+
SIMILAR_PLACES_TOAST = "similar-places-toast",
|
|
19
|
+
NOTHING_ON_FLOOR_TOAST = "nothing-on-floor-toast"
|
|
19
20
|
}
|
|
20
21
|
type TFeatureFlagPayloads = {
|
|
21
22
|
[E_FEATURE_FLAGS.MAKER_POP_UP]: boolean;
|
|
@@ -26,6 +27,7 @@ type TFeatureFlagPayloads = {
|
|
|
26
27
|
[E_FEATURE_FLAGS.MULTI_FLOOR_VIEW]: boolean;
|
|
27
28
|
[E_FEATURE_FLAGS.SAFETY_MODE]: boolean;
|
|
28
29
|
[E_FEATURE_FLAGS.SIMILAR_PLACES_TOAST]: boolean;
|
|
30
|
+
[E_FEATURE_FLAGS.NOTHING_ON_FLOOR_TOAST]: boolean;
|
|
29
31
|
};
|
|
30
32
|
type TFeatureFlag<Key extends E_FEATURE_FLAGS> = {
|
|
31
33
|
/**
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type RootStore from '../../root-store';
|
|
2
|
+
declare class NothingOnFloorToast {
|
|
3
|
+
private rootStore;
|
|
4
|
+
private toastId;
|
|
5
|
+
private reactionDisposers;
|
|
6
|
+
constructor(rootStore: RootStore);
|
|
7
|
+
private get importantThingsByFloorId();
|
|
8
|
+
private get firstFloorWithThings();
|
|
9
|
+
private onClick;
|
|
10
|
+
private show;
|
|
11
|
+
private hide;
|
|
12
|
+
private update;
|
|
13
|
+
cleanup(): void;
|
|
14
|
+
}
|
|
15
|
+
export default NothingOnFloorToast;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,6 +5,7 @@ import { MapData } from '../lib/sdk';
|
|
|
5
5
|
import { TStartViewerOptions, TStartViewerWithLocalDataOptions } from '../lib/types/options';
|
|
6
6
|
import { TMapViewWithTestUtilities } from './test-mocks';
|
|
7
7
|
export declare const loadTestVenueData: (venueFileName?: string) => Promise<ParsedMVF>;
|
|
8
|
+
export declare const hydrateTestData: (mvf: ParsedMVF) => Promise<MapData>;
|
|
8
9
|
export type TTestWithMapOptions = {
|
|
9
10
|
startupOptions?: TStartViewerOptions | TStartViewerWithLocalDataOptions;
|
|
10
11
|
initialState?: string | ((data: MapData, mvf: ParsedMVF) => string);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mappedin/viewer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"browser": "./dist/index.js",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@ladle/react": "^2.17.2",
|
|
21
|
-
"@mappedin/mappedin-js": "6.0.1-canary-v6-
|
|
21
|
+
"@mappedin/mappedin-js": "6.0.1-canary-v6-250e6355.499",
|
|
22
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",
|