@mapsindoors/map-template 1.95.8 → 1.95.10

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 (59) hide show
  1. package/dist/{GoogleMapsMap-mNXwkS5r.mjs → GoogleMapsMap-CwUKio6U.mjs} +2 -2
  2. package/dist/{MapboxMap-JSpSXMbZ.mjs → MapboxMap-C5oy5rc4.mjs} +2 -2
  3. package/dist/favicon.png +0 -0
  4. package/dist/logo-192.png +0 -0
  5. package/dist/manifest.json +21 -0
  6. package/dist/mapsindoors-react.es.js +1 -1
  7. package/dist/mapsindoors-react.umd.js +236 -198
  8. package/dist/mapsindoors-webcomponent.es.js +51235 -42443
  9. package/dist/reactcomponent-Dyc_LGHg.mjs +37841 -0
  10. package/dist/robots.txt +3 -0
  11. package/package.json +5 -7
  12. package/dist/_commonjsHelpers-B85MJLTf.js +0 -5
  13. package/dist/app-globals-DQuL1Twl.js +0 -3
  14. package/dist/combo-box-item.entry.js +0 -13
  15. package/dist/icon-DT_sDkmK.js +0 -11
  16. package/dist/index-BZQHyS7V.js +0 -1701
  17. package/dist/index.js +0 -1
  18. package/dist/loader.js +0 -11
  19. package/dist/mi-card_2.entry.js +0 -33
  20. package/dist/mi-chip.entry.js +0 -31
  21. package/dist/mi-column.entry.js +0 -52
  22. package/dist/mi-combo-box.entry.js +0 -449
  23. package/dist/mi-components.js +0 -21
  24. package/dist/mi-data-table.entry.js +0 -324
  25. package/dist/mi-distance_2.entry.js +0 -69
  26. package/dist/mi-dropdown-item.entry.js +0 -13
  27. package/dist/mi-dropdown.entry.js +0 -656
  28. package/dist/mi-floor-selector.entry.js +0 -209
  29. package/dist/mi-keyboard.entry.js +0 -261
  30. package/dist/mi-list-item-category.entry.js +0 -51
  31. package/dist/mi-list-item-location.entry.js +0 -177
  32. package/dist/mi-list.entry.js +0 -68
  33. package/dist/mi-location-booking.entry.js +0 -5218
  34. package/dist/mi-location-info.entry.js +0 -71
  35. package/dist/mi-map-googlemaps.entry.js +0 -795
  36. package/dist/mi-map-mapbox.entry.js +0 -530
  37. package/dist/mi-metric-card.entry.js +0 -61
  38. package/dist/mi-my-position.entry.js +0 -2457
  39. package/dist/mi-notification.entry.js +0 -137
  40. package/dist/mi-route-instructions-heading.entry.js +0 -78
  41. package/dist/mi-route-instructions-maneuver-legacy.entry.js +0 -86
  42. package/dist/mi-route-instructions-maneuver.entry.js +0 -86
  43. package/dist/mi-route-instructions-step-legacy.entry.js +0 -322
  44. package/dist/mi-route-instructions-step.entry.js +0 -342
  45. package/dist/mi-route-instructions.entry.js +0 -176
  46. package/dist/mi-scroll-buttons.entry.js +0 -120
  47. package/dist/mi-search.entry.js +0 -429
  48. package/dist/mi-share-sms.entry.js +0 -94
  49. package/dist/mi-step-switcher.entry.js +0 -40
  50. package/dist/mi-tab-panel.entry.js +0 -25
  51. package/dist/mi-tab.entry.js +0 -10
  52. package/dist/mi-tabs.entry.js +0 -49
  53. package/dist/mi-time.entry.js +0 -57
  54. package/dist/mi-variables-CDNvnTkH.js +0 -5
  55. package/dist/reactcomponent-BrPGG2Eb.mjs +0 -29048
  56. package/dist/route-travel-mode.enum-BvqP1fpw.js +0 -9
  57. package/dist/sort-order.enum-jsLAbYWg.js +0 -566
  58. package/dist/unit-system.enum-BwPgAWqL.js +0 -7
  59. package/dist/utils-DNHzysQ6.js +0 -61
@@ -1,176 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-BZQHyS7V.js';
2
- import { R as RouteTravelMode } from './route-travel-mode.enum-BvqP1fpw.js';
3
- import { U as UnitSystem } from './unit-system.enum-BwPgAWqL.js';
4
- import { c as isInternetExplorer } from './utils-DNHzysQ6.js';
5
-
6
- const routeInstructionsCss = () => `:host{display:block;background-color:#fcfcfc;font-family:Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"}:host mi-route-instructions-step:hover{cursor:pointer;background-color:#f9fafb;transition:300ms ease}:host mi-route-instructions-step.active{background-color:#f3f4f6;transition:none;cursor:default}:host .instructions-destination{display:flex}:host .instructions-destination-icon{width:40px;display:flex;justify-content:center;align-items:center}:host .instructions-destination-icon mi-icon{width:24px;height:24px;background-color:#1c1917}:host .instructions-destination-details{flex:1;padding:12px}:host .instructions-destination-details mi-location-info{font-size:0.875rem}`;
7
-
8
- const RouteInstructions = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- this.clicked = createEvent(this, "clicked", 7);
12
- /**
13
- * Set active step to populate it with an "active" class. Defaults to legIndex 0 and stepIndex 0.
14
- * @type {{ legIndex: number, stepIndex: number }}
15
- */
16
- this.activeStep = {
17
- legIndex: 0,
18
- stepIndex: 0
19
- };
20
- /**
21
- * Set imperial or metric as default unit system.
22
- * @type {UnitSystem} 'imperial' or 'metric'
23
- */
24
- this.unit = UnitSystem.Metric;
25
- /**
26
- * If indoor substeps/maneuvers should be hidden.
27
- *
28
- * @type {boolean}
29
- */
30
- this.hideIndoorSubsteps = false;
31
- /**
32
- * Set preferred travel mode. Defaults to "walking".
33
- *
34
- * @type {RouteTravelMode} 'walking', 'bicycling', 'transit', 'driving'.
35
- */
36
- this.travelMode = RouteTravelMode.Walking;
37
- /**
38
- * Translations object for translatable labels.
39
- *
40
- */
41
- this.translations = {
42
- walk: 'Walk',
43
- bike: 'Bike',
44
- transit: 'Transit',
45
- drive: 'Drive',
46
- leave: 'Leave',
47
- from: 'From',
48
- park: 'Park',
49
- at: 'at',
50
- building: 'Building',
51
- venue: 'Venue',
52
- takeStaircaseToLevel: 'Take staircase to level',
53
- takeLadderToLevel: 'Take the ladder to level',
54
- takeElevatorToLevel: 'Take elevator to level',
55
- takeEscalatorToLevel: 'Take escalator to level',
56
- takeWheelchairLiftToLevel: 'Take wheelchair lift to level',
57
- takeWheelchairRampToLevel: 'Take wheelchair ramp to level',
58
- exit: 'Exit',
59
- enter: 'Enter',
60
- stops: 'stops',
61
- andContinue: 'and continue',
62
- continueStraightAhead: 'Continue straight ahead',
63
- goLeft: 'Go left',
64
- goSharpLeft: 'Go sharp left',
65
- goSlightLeft: 'Go slight left',
66
- goRight: 'Go right',
67
- goSharpRight: 'Go sharp right',
68
- goSlightRight: 'Go slight right',
69
- turnAround: 'Turn around',
70
- days: 'd',
71
- hours: 'h',
72
- minutes: 'min',
73
- rideTheBus: 'Ride the bus'
74
- };
75
- this.miStepElements = [];
76
- this.lastStepRouteContext = null;
77
- this.lastStepTravelMode = null;
78
- this.lastStepTransitStop = null;
79
- }
80
- componentDidRender() {
81
- if (!this.hideIndoorSubsteps && this.hideIndoorSubsteps !== false)
82
- return;
83
- this.miStepElements.forEach((element) => {
84
- element.hideIndoorSubsteps = this.hideIndoorSubsteps;
85
- });
86
- }
87
- /**
88
- * Transform the step in legs to a flat array of steps.
89
- *
90
- * @returns {Step[]}
91
- */
92
- getRouteSteps() {
93
- if (!this.route) {
94
- return [];
95
- }
96
- return this.route.legs.reduce((accummulator, leg, legIndex) => {
97
- for (const stepIndex in leg.steps) {
98
- const step = leg.steps[stepIndex];
99
- step.originalLegIndex = legIndex;
100
- step.originalStepIndex = parseInt(stepIndex);
101
- accummulator.push(step);
102
- }
103
- return accummulator;
104
- }, []);
105
- }
106
- /**
107
- * Updates the activeStep attribute and emits an object with leg, step and maneuver index information.
108
- *
109
- * @param {CustomEvent<any>} event Step object.
110
- * @param {number} stepIndex step index.
111
- */
112
- stepClickedHandler(event, stepIndex) {
113
- const originalStep = this.getRouteSteps()[stepIndex];
114
- // Update activeStep attribute
115
- this.activeStep = {
116
- legIndex: originalStep.originalLegIndex,
117
- stepIndex: originalStep.originalStepIndex
118
- };
119
- this.clicked.emit({
120
- legIndex: originalStep.originalLegIndex,
121
- stepIndex: originalStep.originalStepIndex,
122
- maneuverIndex: event.detail.maneuverIndex
123
- });
124
- }
125
- /**
126
- * Check if the step is active.
127
- *
128
- * @param {Step} step
129
- * @returns {boolean}
130
- */
131
- isActiveStep(step) {
132
- // Check that activeStep attribute is set
133
- if (!this.activeStep)
134
- return false;
135
- // Check that the indexes matches those set at the activeStep attribute
136
- const isActiveStep = this.activeStep.legIndex === step.originalLegIndex &&
137
- this.activeStep.stepIndex === step.originalStepIndex;
138
- return isActiveStep;
139
- }
140
- render() {
141
- return this.route ? this.renderInstructions() : null;
142
- }
143
- /**
144
- * Render instructions.
145
- *
146
- * @returns {JSX.Element}
147
- */
148
- renderInstructions() {
149
- return (h(Host, null, this.getRouteSteps().map((currentStep, stepIndex) => {
150
- var _a, _b, _c, _d, _e;
151
- const originName = ((_b = (_a = this.originLocation) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.name) ? this.originLocation.properties.name : this.originName || '';
152
- const isFirstRouteStep = currentStep.originalLegIndex === 0 && currentStep.originalStepIndex === 0;
153
- const lastStepRouteContext = isFirstRouteStep ? originName : this.lastStepRouteContext;
154
- const lastTravelMode = this.lastStepTravelMode;
155
- const lastTransitStop = this.lastStepTransitStop;
156
- this.lastStepRouteContext = currentStep.route_context;
157
- this.lastStepTravelMode = currentStep.travel_mode;
158
- this.lastStepTransitStop = ((_d = (_c = currentStep.transit_information) === null || _c === void 0 ? void 0 : _c.arrival_stop) === null || _d === void 0 ? void 0 : _d.name) ? (_e = currentStep.transit_information) === null || _e === void 0 ? void 0 : _e.arrival_stop.name : null;
159
- return h("mi-route-instructions-step-legacy", { ref: (el) => this.miStepElements.push(el), "from-travel-mode": lastTravelMode, "from-route-context": lastStepRouteContext, "from-transit-stop": lastTransitStop, step: JSON.stringify(currentStep), translations: JSON.stringify(this.translations), unit: this.unit, onStepClicked: (event) => this.stepClickedHandler(event, stepIndex), class: this.isActiveStep(currentStep) ? 'active' : '', part: this.isActiveStep(currentStep) ? 'step active' : 'step',
160
- // @ts-ignore
161
- exportparts: "\n step-toggle,\n step-heading,\n step-description,\n step-info,\n step-travel-mode,\n step-travel-mode-icon,\n maneuver-icon,\n maneuver-description,\n maneuver-description-distance,\n maneuver-description-distance-border" });
162
- }), this.destinationLocation || this.destinationName ? this.renderDestination() : null));
163
- }
164
- /**
165
- * Render destination.
166
- *
167
- * @returns {JSX.Element}
168
- */
169
- renderDestination() {
170
- return (h("div", { class: "instructions-destination" }, h("div", { class: "instructions-destination-icon" }, isInternetExplorer() ? null :
171
- h("mi-icon", { "icon-name": "marker" })), h("div", { part: "instructions-destination", class: "instructions-destination-details" }, this.destinationLocation ? this.destinationLocation.properties.name : this.destinationName, this.destinationLocation ? h("mi-location-info", { part: "instructions-destination-info", location: this.destinationLocation }) : null)));
172
- }
173
- };
174
- RouteInstructions.style = routeInstructionsCss();
175
-
176
- export { RouteInstructions as mi_route_instructions };
@@ -1,120 +0,0 @@
1
- import { r as registerInstance, h } from './index-BZQHyS7V.js';
2
-
3
- const scrollButtonsCss = () => `a.mi-button{cursor:default}.mi-button{border-radius:4px;border-width:1px;border-style:solid;font-family:Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:500;padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;display:inline-flex;align-items:center}.mi-button:disabled{opacity:0.48;cursor:not-allowed}.mi-button object{filter:invert(9%) sepia(13%) saturate(692%) hue-rotate(185deg) brightness(98%) contrast(91%);width:16px;height:16px}.mi-button--small{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;font-size:0.875rem;height:32px}.mi-button--small object{width:16px;height:16px}.mi-button--large{padding-left:16px;padding-right:16px;font-size:1.25rem}.mi-button--large object{width:20px;height:20px}.mi-button--full-width{width:100%;justify-content:center}.mi-button--icon-left{padding-left:12px}.mi-button--icon-left object{margin-right:8px}.mi-button--icon-right{padding-right:12px}.mi-button--icon-right object{margin-left:8px}.mi-button--icon-both{padding-top:12px;padding-bottom:12px}.mi-button--icon-both object:first-of-type{margin-right:8px}.mi-button--icon-both object:last-of-type{margin-left:8px}.mi-button--base{background:linear-gradient(#f5f7fa, #ebeff5);color:#1e2025;border-color:#c8d0e0}.mi-button--base:not(:disabled):hover{background:linear-gradient(#ebeff5, #dee3ed);border-color:#aeb9cb}.mi-button--base:not(:disabled):active{background:linear-gradient(#dee3ed, #ebeff5)}.mi-button--primary{color:#ffffff;border-color:#20693e;background:linear-gradient(#3ba064, #2a844e)}.mi-button--primary object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--primary:not(:disabled):hover{background:linear-gradient(#2a844e, #20693e)}.mi-button--primary:not(:disabled):active{background:linear-gradient(#20693e, #2a844e)}.mi-button--delete{background:linear-gradient(#f55151, #de1b1b);color:#ffffff;border-color:#ba0d0d}.mi-button--delete object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--delete:not(:disabled):hover{background:linear-gradient(#de1b1b, #ba0d0d)}.mi-button--delete:not(:disabled):active{background:linear-gradient(#ba0d0d, #de1b1b)}.mi-button--outline{color:#3071d9;border-color:#3071d9;background-color:transparent}.mi-button--outline object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--outline:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--outline:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}.mi-button--link{color:#3071d9;border-style:none;background-color:transparent;cursor:pointer}.mi-button--link object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--link:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--link:disabled:hover{cursor:not-allowed}.mi-button--link:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}.scroll-buttons{height:100%;width:64px;display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:16px}.scroll-buttons .btn{margin:0;padding:0;background:none;width:64px;height:64px;background-color:#ffffff;border:none;border-radius:8px;display:flex;align-items:center;justify-content:center}.scroll-buttons .btn mi-icon{width:32px}.scroll-buttons .btn:hover{background:none;background-color:#ffffff;cursor:pointer}.scroll-buttons .btn:disabled{opacity:1}.scroll-buttons .btn:disabled mi-icon{background-color:#a5a9af}`;
4
-
5
- const ScrollButtons = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- /**
9
- * Determines how far to scroll when clicking one of the buttons. Default value is 100.
10
- *
11
- * @type {number}
12
- */
13
- this.scrollLength = 100;
14
- }
15
- /**
16
- * Update scroll buttons enabled/disabled states.
17
- */
18
- async updateScrollButtons() {
19
- this.updateScrollButtonsState();
20
- }
21
- /**
22
- * Watch for container scroll events.
23
- */
24
- addScrollEventListener() {
25
- var _a, _b;
26
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
27
- (_b = this.scrollContainerElementRef) === null || _b === void 0 ? void 0 : _b.addEventListener('scroll', () => {
28
- this.updateScrollButtonsState();
29
- });
30
- if (this.scrollContainerElementRef) {
31
- // Setup a ResizeObserver to update scroll buttons state whenever the dimensions of the scroll container changes.
32
- this.resizeObserver = new ResizeObserver(() => {
33
- this.updateScrollButtonsState();
34
- });
35
- this.resizeObserver.observe(this.scrollContainerElementRef);
36
- }
37
- }
38
- /**
39
- * Adds scroll event listener to the container element when this component is first attached to the DOM.
40
- */
41
- connectedCallback() {
42
- this.addScrollEventListener();
43
- }
44
- /**
45
- * Disconnects ResizeObserver.
46
- */
47
- disconnectedCallback() {
48
- var _a;
49
- (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
50
- }
51
- /**
52
- * Updates enable/disable state for scroll up and down buttons.
53
- *
54
- * @returns {Promise<void>}
55
- */
56
- async updateScrollButtonsState() {
57
- if (!this.scrollContainerElementRef || !this.upButtonElement)
58
- return;
59
- // Disable or enable the scroll up button
60
- if (this.scrollContainerElementRef.scrollTop === 0) {
61
- this.upButtonElement.disabled = true;
62
- }
63
- else if (this.upButtonElement.disabled) {
64
- this.upButtonElement.disabled = false;
65
- }
66
- // Disable or enable the scroll down button
67
- if (this.scrollContainerElementRef.scrollHeight - this.scrollContainerElementRef.scrollTop === this.scrollContainerElementRef.clientHeight
68
- && this.upButtonElement.disabled === true) {
69
- this.downButtonElement.disabled = true;
70
- }
71
- else if (this.scrollContainerElementRef.scrollHeight - this.scrollContainerElementRef.scrollTop > this.scrollContainerElementRef.clientHeight) {
72
- this.downButtonElement.disabled = false;
73
- }
74
- else {
75
- this.downButtonElement.disabled = true;
76
- }
77
- }
78
- /**
79
- * Update scroll position.
80
- *
81
- * @param {number} value - Value to scroll.
82
- */
83
- updateScrollPosition(value) {
84
- if (!('scrollBehavior' in document.documentElement.style)) { // Internet Explorer feature check
85
- this.scrollContainerElementRef.scrollTop = value;
86
- }
87
- else {
88
- this.scrollContainerElementRef.scroll({
89
- top: this.scrollContainerElementRef.scrollTop + value,
90
- behavior: 'smooth'
91
- });
92
- }
93
- }
94
- /**
95
- * Render scroll buttons.
96
- *
97
- * @returns {JSX.Element}
98
- */
99
- render() {
100
- return (h("div", { key: '35e32a60ec5721855c552d6f7771ff53301d5981', part: "container", class: "scroll-buttons" }, h("button", { key: 'e5b1d5811d4b693c18c3e68a82c9607b7f06be36', part: "button button-up", class: "mi-button mi-button--base btn btn-up", type: "button", disabled: true, "aria-label": "Scroll Up", ref: (el) => {
101
- this.upButtonElement = el;
102
- }, onClick: (event) => {
103
- event.stopPropagation();
104
- this.updateScrollPosition(-this.scrollLength);
105
- } }, h("mi-icon", { key: '061c50e3809963dfcc558bd9bf6ce71904aa5a30', "icon-name": "chevron-up" })), h("button", { key: '6706f4cf2ba101a9453018fab8c532c90d4c27ee', part: "button button-down", class: "mi-button mi-button--base btn btn-down", type: "button", "aria-label": "Scroll Down", ref: (el) => {
106
- this.downButtonElement = el;
107
- }, onClick: (event) => {
108
- event.stopPropagation();
109
- this.updateScrollPosition(this.scrollLength);
110
- } }, h("mi-icon", { key: '1cc8e05eebf066dac04ff12bac6767d8d7d59c29', "icon-name": "chevron-down" }))));
111
- }
112
- static get watchers() { return {
113
- "scrollContainerElementRef": [{
114
- "addScrollEventListener": 0
115
- }]
116
- }; }
117
- };
118
- ScrollButtons.style = scrollButtonsCss();
119
-
120
- export { ScrollButtons as mi_scroll_buttons };