@mapvx/web-components-ssr 1.7.0-dev.1 → 1.7.0-dev.2
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 +17 -13
- package/dist/browser/{chunk-Cg9Nd_Mm.js → chunk-BcTPI0Ei.js} +78 -78
- package/dist/browser/chunk-BxefRtM9.js +3 -0
- package/dist/browser/{chunk-qJiyNNGo.js → chunk-C64ZrtDH.js} +9 -9
- package/dist/browser/{chunk-BK2bFfek.js → chunk-C7x5ioh5.js} +28 -28
- package/dist/browser/chunk-CHv413eO.js +13 -0
- package/dist/browser/chunk-CRCKWzfw.js +3 -0
- package/dist/browser/chunk-CYtO4qrL.js +3 -0
- package/dist/browser/chunk-CgRco1rJ.js +2 -0
- package/dist/browser/chunk-CwafJShv.js +3 -0
- package/dist/browser/chunk-D6zG2upO.js +1180 -0
- package/dist/browser/chunk-DIEcQ4a-.js +1318 -0
- package/dist/browser/chunk-DtPiRK4g.js +3 -0
- package/dist/browser/chunk-FjUzkN6v.js +2 -0
- package/dist/browser/chunk-KW-jIWmp.js +3 -0
- package/dist/browser/chunk-sqKVpUVP.js +4116 -0
- package/dist/browser/main.js +71 -71
- package/dist/browser/styles.css +1 -1
- package/dist/types/public-api.d.ts +90 -24
- package/package.json +29 -29
- package/dist/browser/chunk-7vIcv6rM.js +0 -1180
- package/dist/browser/chunk-Bjk3HkK2.js +0 -3
- package/dist/browser/chunk-CCaUxYwr.js +0 -3
- package/dist/browser/chunk-CTFjnL_B.js +0 -2
- package/dist/browser/chunk-ClYPPgpq.js +0 -3
- package/dist/browser/chunk-ConEJto8.js +0 -1318
- package/dist/browser/chunk-CuTcljJ2.js +0 -2
- package/dist/browser/chunk-CzASft0S.js +0 -13
- package/dist/browser/chunk-DAjekpI-.js +0 -3
- package/dist/browser/chunk-DHX-WiFW.js +0 -3
- package/dist/browser/chunk-DsKCGfdq.js +0 -3
- package/dist/browser/chunk-LltjhLJU.js +0 -4116
|
@@ -135,6 +135,35 @@ declare class MVXRoute {
|
|
|
135
135
|
* @param data API response data containing route information
|
|
136
136
|
*/
|
|
137
137
|
constructor(data: RouteResponse);
|
|
138
|
+
/**
|
|
139
|
+
* Rebuilds the class prototypes of a route read back from localStorage.
|
|
140
|
+
*
|
|
141
|
+
* `JSON.parse` returns plain objects, and every derived value of a route —
|
|
142
|
+
* `steps`, `duration`, `length`, a step's `coordinates` — is a getter on the
|
|
143
|
+
* prototype, so a persisted route came back without them and broke whatever
|
|
144
|
+
* drew it. Values that already are instances pass through unchanged.
|
|
145
|
+
*
|
|
146
|
+
* @hidden
|
|
147
|
+
* @param value A route, or its JSON round-trip.
|
|
148
|
+
* @returns The same data with `MVXRoute`, leg, step and polyline prototypes.
|
|
149
|
+
*/
|
|
150
|
+
static fromCache(value: unknown): MVXRoute;
|
|
151
|
+
/**
|
|
152
|
+
* Returns `route` under a new {@link id}, with its own `legs` and `steps` arrays.
|
|
153
|
+
*
|
|
154
|
+
* A cached route is handed to every caller that asks for it, and the map keys
|
|
155
|
+
* its layers by route id: drawing the same cached object twice would collide.
|
|
156
|
+
* Static so that `MVXRoute` literals (test doubles) still type-check.
|
|
157
|
+
*
|
|
158
|
+
* The arrays are copied because the route this is built from stays in the
|
|
159
|
+
* cache for the next caller: trimming the returned route — dropping a leg, or
|
|
160
|
+
* a step already walked — would otherwise shorten the cached one too. The
|
|
161
|
+
* steps themselves are shared, being read-only data whose polylines would
|
|
162
|
+
* have to be decoded again to copy.
|
|
163
|
+
*
|
|
164
|
+
* @hidden
|
|
165
|
+
*/
|
|
166
|
+
static withNewId(route: MVXRoute): MVXRoute;
|
|
138
167
|
/**
|
|
139
168
|
* Gets all steps of the route by combining steps from all legs
|
|
140
169
|
* @returns Array with all route steps
|
|
@@ -361,6 +390,21 @@ interface InnerFloor {
|
|
|
361
390
|
reachableFromGPS?: boolean;
|
|
362
391
|
}
|
|
363
392
|
|
|
393
|
+
interface InstitutionCityFilterOption {
|
|
394
|
+
institutionId: string;
|
|
395
|
+
filterId: string;
|
|
396
|
+
name: string;
|
|
397
|
+
type: "institution";
|
|
398
|
+
}
|
|
399
|
+
interface ParentPlaceCityFilterOption {
|
|
400
|
+
parentPlaceId: string;
|
|
401
|
+
filterId: string;
|
|
402
|
+
name: string;
|
|
403
|
+
type: "parent-place";
|
|
404
|
+
institutionId: string;
|
|
405
|
+
}
|
|
406
|
+
type CityFilterOption = InstitutionCityFilterOption | ParentPlaceCityFilterOption;
|
|
407
|
+
|
|
364
408
|
interface Metadata {
|
|
365
409
|
category?: string[];
|
|
366
410
|
image?: string;
|
|
@@ -802,21 +846,6 @@ declare class MVXPlace {
|
|
|
802
846
|
toString(): string;
|
|
803
847
|
}
|
|
804
848
|
|
|
805
|
-
interface InstitutionCityFilterOption {
|
|
806
|
-
institutionId: string;
|
|
807
|
-
filterId: string;
|
|
808
|
-
name: string;
|
|
809
|
-
type: "institution";
|
|
810
|
-
}
|
|
811
|
-
interface ParentPlaceCityFilterOption {
|
|
812
|
-
parentPlaceId: string;
|
|
813
|
-
filterId: string;
|
|
814
|
-
name: string;
|
|
815
|
-
type: "parent-place";
|
|
816
|
-
institutionId: string;
|
|
817
|
-
}
|
|
818
|
-
type CityFilterOption = InstitutionCityFilterOption | ParentPlaceCityFilterOption;
|
|
819
|
-
|
|
820
849
|
interface InstitutionResponse {
|
|
821
850
|
id: string;
|
|
822
851
|
title: string;
|
|
@@ -1097,10 +1126,39 @@ interface CurrentLocation {
|
|
|
1097
1126
|
title: 'Current location';
|
|
1098
1127
|
position: LatLng;
|
|
1099
1128
|
}
|
|
1129
|
+
/**
|
|
1130
|
+
* A point the visitor picked by tapping the map, instead of one of the known places.
|
|
1131
|
+
*
|
|
1132
|
+
* It carries a coordinate and nothing else: there is no place behind it to look up, which
|
|
1133
|
+
* is exactly why it needs its own type rather than a stand-in {@link MVXPlace}.
|
|
1134
|
+
*/
|
|
1135
|
+
interface DroppedPin {
|
|
1136
|
+
type: 'dropped-pin';
|
|
1137
|
+
title: 'Dropped pin';
|
|
1138
|
+
position: LatLng;
|
|
1139
|
+
}
|
|
1100
1140
|
declare function toCurrentLocation(position: GeolocationPosition): CurrentLocation;
|
|
1141
|
+
declare function toDroppedPin(position: LatLng): DroppedPin;
|
|
1101
1142
|
declare function isCurrentLocation(point: RoutePoint | null): point is CurrentLocation;
|
|
1143
|
+
declare function isDroppedPin(point: RoutePoint | null): point is DroppedPin;
|
|
1102
1144
|
declare function isPlace(point: RoutePoint | null): point is MVXPlace;
|
|
1103
|
-
|
|
1145
|
+
/**
|
|
1146
|
+
* Points the router has to locate by coordinate rather than by id.
|
|
1147
|
+
*
|
|
1148
|
+
* A place is sent as `{ id }` and the API resolves where it is; the visitor's own location
|
|
1149
|
+
* and a pin they dropped have no id to send, only a position. This is deliberately separate
|
|
1150
|
+
* from {@link isCurrentLocation}, which answers *which* kind of point it is — what the
|
|
1151
|
+
* analytics and the destination rules ask about.
|
|
1152
|
+
*/
|
|
1153
|
+
declare function hasOwnPosition(point: RoutePoint | null): point is CurrentLocation | DroppedPin;
|
|
1154
|
+
/**
|
|
1155
|
+
* The id to report for a point in logs and analytics.
|
|
1156
|
+
*
|
|
1157
|
+
* The points without a place behind them report what they are, so a funnel can still tell
|
|
1158
|
+
* a route from the visitor's location apart from one from a pin they dropped.
|
|
1159
|
+
*/
|
|
1160
|
+
declare function routePointId(point: RoutePoint | null): string;
|
|
1161
|
+
type RoutePoint = MVXPlace | CurrentLocation | DroppedPin;
|
|
1104
1162
|
|
|
1105
1163
|
interface FormattedSchedule {
|
|
1106
1164
|
day: string;
|
|
@@ -1113,11 +1171,21 @@ interface SearchData {
|
|
|
1113
1171
|
}
|
|
1114
1172
|
declare const EMPTY_SEARCH_DATA: SearchData;
|
|
1115
1173
|
|
|
1174
|
+
/**
|
|
1175
|
+
* What the visitor has the category filter set to.
|
|
1176
|
+
*
|
|
1177
|
+
* `filters` is the whole selection, which can hold several categories or none at all.
|
|
1178
|
+
* `filter` is the first of them — or `'All'` when none are on — and is kept because hosts
|
|
1179
|
+
* have been reading it since the filter allowed a single category, and many write it
|
|
1180
|
+
* straight into `?tab=`. Prefer `filters` in new code.
|
|
1181
|
+
*/
|
|
1182
|
+
interface FilterSelection {
|
|
1183
|
+
filter: string;
|
|
1184
|
+
filters: string[];
|
|
1185
|
+
}
|
|
1116
1186
|
interface SelectFilterAction {
|
|
1117
1187
|
type: 'select-filter';
|
|
1118
|
-
data:
|
|
1119
|
-
filter: string;
|
|
1120
|
-
};
|
|
1188
|
+
data: FilterSelection;
|
|
1121
1189
|
}
|
|
1122
1190
|
interface ShowPlaceAction {
|
|
1123
1191
|
type: 'show-place';
|
|
@@ -1141,9 +1209,7 @@ interface SearchAction {
|
|
|
1141
1209
|
}
|
|
1142
1210
|
interface ReturnToHomeAction {
|
|
1143
1211
|
type: 'return-to-home';
|
|
1144
|
-
data:
|
|
1145
|
-
filter: string;
|
|
1146
|
-
};
|
|
1212
|
+
data: FilterSelection;
|
|
1147
1213
|
}
|
|
1148
1214
|
type UserAction = SelectFilterAction | ShowPlaceAction | SelectDestinationAction | SearchAction | ReturnToHomeAction;
|
|
1149
1215
|
|
|
@@ -1161,5 +1227,5 @@ declare const MEASUREMENT_ID = "G-9KB6BB1J7M";
|
|
|
1161
1227
|
declare function getSchedule(openingHours: OpeningHours): string;
|
|
1162
1228
|
declare function prepareAllSchedules(openingHours: OpeningHours): FormattedSchedule[];
|
|
1163
1229
|
|
|
1164
|
-
export { AnimationState, Banner, EMPTY_SEARCH_DATA, FALLBACK_IMAGE_URL, Institution, MEASUREMENT_ID, MVXPlace, MVXRoute, MVXRouteLeg, MVXRouteStep, MVXTransport, extractBannerColor, getSchedule, isCurrentLocation, isDealOrEventBanner, isPlace, prepareAllSchedules, toCurrentLocation };
|
|
1165
|
-
export type { CategoryFiltersData, CityFilterOption, CurrentLocation, DaysOfTheWeek, FormattedSchedule, InitialData, InnerFloor, InstitutionResponse, LatLng, MVXLocation, OpeningHours, OpeningTime, PlaceResponse, Property, ReturnToHomeAction, RoutePoint, SearchAction, SearchData, SelectDestinationAction, SelectFilterAction, ShowPlaceAction, UserAction };
|
|
1230
|
+
export { AnimationState, Banner, EMPTY_SEARCH_DATA, FALLBACK_IMAGE_URL, Institution, MEASUREMENT_ID, MVXPlace, MVXRoute, MVXRouteLeg, MVXRouteStep, MVXTransport, extractBannerColor, getSchedule, hasOwnPosition, isCurrentLocation, isDealOrEventBanner, isDroppedPin, isPlace, prepareAllSchedules, routePointId, toCurrentLocation, toDroppedPin };
|
|
1231
|
+
export type { CategoryFiltersData, CityFilterOption, CurrentLocation, DaysOfTheWeek, DroppedPin, FilterSelection, FormattedSchedule, InitialData, InnerFloor, InstitutionResponse, LatLng, MVXLocation, OpeningHours, OpeningTime, PlaceResponse, Property, ReturnToHomeAction, RoutePoint, SearchAction, SearchData, SelectDestinationAction, SelectFilterAction, ShowPlaceAction, UserAction };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapvx/web-components-ssr",
|
|
3
|
-
"version": "1.7.0-dev.
|
|
3
|
+
"version": "1.7.0-dev.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"release": "semantic-release",
|
|
37
37
|
"upload-sourcemaps": "bash scripts/upload-sourcemaps-to-sentry.sh",
|
|
38
38
|
"docs:dev": "npm --prefix docs run dev",
|
|
39
|
-
"docs:build": "
|
|
39
|
+
"docs:build": "node scripts/build-docs.mjs"
|
|
40
40
|
},
|
|
41
41
|
"lint-staged": {
|
|
42
42
|
"*.{css,scss}": "stylelint --fix --allow-empty-input",
|
|
@@ -46,56 +46,56 @@
|
|
|
46
46
|
]
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@angular/common": "^22.
|
|
50
|
-
"@angular/compiler": "^22.
|
|
51
|
-
"@angular/core": "^22.
|
|
52
|
-
"@angular/elements": "^22.
|
|
53
|
-
"@angular/forms": "^22.
|
|
54
|
-
"@angular/platform-browser": "^22.
|
|
55
|
-
"@angular/router": "^22.
|
|
49
|
+
"@angular/common": "^22.2.3",
|
|
50
|
+
"@angular/compiler": "^22.2.3",
|
|
51
|
+
"@angular/core": "^22.2.3",
|
|
52
|
+
"@angular/elements": "^22.2.3",
|
|
53
|
+
"@angular/forms": "^22.2.3",
|
|
54
|
+
"@angular/platform-browser": "^22.2.3",
|
|
55
|
+
"@angular/router": "^22.2.3",
|
|
56
56
|
"@fortawesome/angular-fontawesome": "^5.1.0",
|
|
57
57
|
"@fortawesome/fontawesome-svg-core": "^7.3.1",
|
|
58
|
-
"@sentry/browser": "^10.
|
|
58
|
+
"@sentry/browser": "^10.76.2",
|
|
59
59
|
"ngx-google-analytics": "^14.0.1",
|
|
60
60
|
"rxjs": "~7.8.2",
|
|
61
61
|
"tslib": "^2.8.1"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@angular/build": "^22.
|
|
65
|
-
"@angular/cli": "^22.
|
|
66
|
-
"@angular/compiler-cli": "^22.
|
|
64
|
+
"@angular/build": "^22.2.3",
|
|
65
|
+
"@angular/cli": "^22.2.3",
|
|
66
|
+
"@angular/compiler-cli": "^22.2.3",
|
|
67
67
|
"@awesome.me/kit-099daaf0b1": "^1.0.75",
|
|
68
|
-
"@commitlint/cli": "^21.2.
|
|
68
|
+
"@commitlint/cli": "^21.2.4",
|
|
69
69
|
"@eslint/js": "^10.0.1",
|
|
70
|
-
"@mapvx/web-js": "^4.0
|
|
71
|
-
"@playwright/test": "^1.
|
|
70
|
+
"@mapvx/web-js": "^4.4.0",
|
|
71
|
+
"@playwright/test": "^1.64.1",
|
|
72
72
|
"@semantic-release/changelog": "^6.0.3",
|
|
73
73
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
74
74
|
"@semantic-release/git": "^10.0.1",
|
|
75
|
-
"@semantic-release/github": "^12.0.
|
|
76
|
-
"@semantic-release/npm": "^13.
|
|
75
|
+
"@semantic-release/github": "^12.0.10",
|
|
76
|
+
"@semantic-release/npm": "^13.2.0",
|
|
77
77
|
"@semantic-release/release-notes-generator": "^14.1.1",
|
|
78
|
-
"@sentry/cli": "^3.8.
|
|
79
|
-
"@vitest/coverage-v8": "^4.1.
|
|
80
|
-
"angular-eslint": "^22.
|
|
78
|
+
"@sentry/cli": "^3.8.2",
|
|
79
|
+
"@vitest/coverage-v8": "^4.1.12",
|
|
80
|
+
"angular-eslint": "^22.6.0",
|
|
81
81
|
"commitlint-config-gitmoji": "^2.3.1",
|
|
82
82
|
"conventional-changelog-conventionalcommits": "~9.3.1",
|
|
83
|
-
"eslint": "^10.
|
|
83
|
+
"eslint": "^10.13.0",
|
|
84
84
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
85
85
|
"eslint-plugin-import-x": "^4.17.1",
|
|
86
86
|
"http-server": "^14.1.1",
|
|
87
87
|
"husky": "^9.1.7",
|
|
88
88
|
"istanbul-lib-instrument": "^6.0.3",
|
|
89
|
-
"jsdom": "^30.
|
|
90
|
-
"lint-staged": "^17.
|
|
89
|
+
"jsdom": "^30.1.3",
|
|
90
|
+
"lint-staged": "^17.6.0",
|
|
91
91
|
"prettier": "3.9.7",
|
|
92
|
-
"rollup": "^4.
|
|
92
|
+
"rollup": "^4.65.0",
|
|
93
93
|
"rollup-plugin-dts": "^6.5.1",
|
|
94
|
-
"semantic-release": "^25.0.
|
|
95
|
-
"stylelint": "^17.
|
|
94
|
+
"semantic-release": "^25.0.9",
|
|
95
|
+
"stylelint": "^17.16.0",
|
|
96
96
|
"stylelint-config-standard-scss": "^17.0.0",
|
|
97
97
|
"typescript": "~6.0.3",
|
|
98
|
-
"typescript-eslint": "^8.
|
|
99
|
-
"vitest": "^4.1.
|
|
98
|
+
"typescript-eslint": "^8.72.0",
|
|
99
|
+
"vitest": "^4.1.12"
|
|
100
100
|
}
|
|
101
101
|
}
|