@3dwayfinder/wayfinder-vue-components 1.11.2 → 1.11.4

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.
@@ -1031,9 +1031,317 @@ function getModuleByNamespace (store, helper, namespace) {
1031
1031
  }
1032
1032
 
1033
1033
  //
1034
- var wayfinder;
1035
1034
  var script$w = {
1035
+ name: "POI",
1036
+ computed: {
1037
+ ...mapState('wf', ['language']),
1038
+ hasShowPathListener() {
1039
+ return !!(this.$listeners && this.$listeners.showPath);
1040
+ },
1041
+ hasShowAccessibilityPathListener() {
1042
+ return !!(this.$listeners && this.$listeners.showAccessibilityPath);
1043
+ }
1044
+ },
1045
+ props: {
1046
+ poi: {
1047
+ type: Object,
1048
+ default: null
1049
+ },
1050
+ showLogo: {
1051
+ type: Boolean,
1052
+ default: false
1053
+ },
1054
+ showName: {
1055
+ type: Boolean,
1056
+ default: true
1057
+ },
1058
+ showPathButton: {
1059
+ type: Boolean,
1060
+ default: false
1061
+ },
1062
+ showAccessibilityPathButton: {
1063
+ type: Boolean,
1064
+ default: false
1065
+ },
1066
+ showDescription: {
1067
+ type: Boolean,
1068
+ default: false
1069
+ },
1070
+ showRoomID: {
1071
+ type: Boolean,
1072
+ default: false
1073
+ },
1074
+ showFloor: {
1075
+ type: Boolean,
1076
+ default: false
1077
+ },
1078
+ showDistance: {
1079
+ type: Boolean,
1080
+ default: false
1081
+ },
1082
+ pathIcon: {
1083
+ type: String,
1084
+ default: "path"
1085
+ },
1086
+ showPathIcon: {
1087
+ type: Boolean,
1088
+ default: true
1089
+ },
1090
+ accessibilityPathIcon: {
1091
+ type: String,
1092
+ default: "accessibility-path"
1093
+ }
1094
+ },
1095
+ mounted() {
1096
+ if (this.$wayfinder) {
1097
+ this.show_path = this.$wayfinder.translator.get('show_path');
1098
+ this.show_accessibility_path = this.$wayfinder.translator.get('show_accessibility_path');
1099
+ }
1100
+ },
1101
+ watch: {
1102
+ language() {
1103
+ if (this.$wayfinder) {
1104
+ this.show_path = this.$wayfinder.translator.get('show_path');
1105
+ this.show_accessibility_path = this.$wayfinder.translator.get('show_accessibility_path');
1106
+ }
1107
+ },
1108
+ poi() {
1109
+ console.log('poi', this.poi);
1110
+ if (this.showDistance && this.$wayfinder) {
1111
+ let path = this.$wayfinder.findPath(this.$wayfinder.getKioskNode(), this.poi.getNode());
1112
+ this.path2Text = this.$wayfinder.pathToText(path);
1113
+ console.log('watch.path', this.path2Text);
1114
+ }
1115
+ }
1116
+ },
1117
+ methods: {
1118
+ showPath() {
1119
+ if (this.poi) {
1120
+ if (this.hasShowPathListener) {
1121
+ this.$emit('showPath', this.poi);
1122
+ } else {
1123
+ this.$wayfinder.showPath(this.poi.getNode(), this.poi);
1124
+ }
1125
+ }
1126
+ },
1127
+ showAccessibilityPath() {
1128
+ if (this.poi) {
1129
+ if (this.hasShowAccessibilityPathListener) {
1130
+ this.$emit('showAccessibilityPath', this.poi);
1131
+ } else {
1132
+ this.$wayfinder.showPath(this.poi.getNode(), this.poi, {
1133
+ "ignoreTypes": ["escalator", "stairs"]
1134
+ });
1135
+ }
1136
+ }
1137
+ },
1138
+ open(type) {
1139
+ if (type && this.poi[type]) {
1140
+ if (type === 'shop_email') {
1141
+ window.open('mailto:' + this.poi[type], '_system');
1142
+ } else if (type === 'shop_phone') {
1143
+ window.open('tel:' + this.poi[type], '_system');
1144
+ } else {
1145
+ window.open(this.poi[type], '_system');
1146
+ }
1147
+ }
1148
+ },
1149
+ getImage() {
1150
+ if (this.poi.getBackgroundUrl()) return this.poi.getBackgroundUrl();else if (this.poi.getIconUrl()) {
1151
+ return this.poi.getIconUrl();
1152
+ } else {
1153
+ return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
1154
+ }
1155
+ },
1156
+ isImage() {
1157
+ if (this.poi.getBackgroundUrl()) return "image-background";else if (this.poi.getIconUrl()) return "image-logo";else return "image-none";
1158
+ },
1159
+ truncate(str, len) {
1160
+ if (str && str.length > len) {
1161
+ return str.substring(0, len) + '...';
1162
+ } else {
1163
+ return str;
1164
+ }
1165
+ }
1166
+ },
1167
+ data: function () {
1168
+ return {
1169
+ show_path: 'Show Path',
1170
+ show_accessibility_path: "Show Accessibility Path",
1171
+ pathTime: '',
1172
+ unit: 'm',
1173
+ path2Text: null
1174
+ };
1175
+ }
1176
+ };
1177
+
1178
+ const isOldIE = typeof navigator !== 'undefined' &&
1179
+ /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
1180
+ function createInjector(context) {
1181
+ return (id, style) => addStyle(id, style);
1182
+ }
1183
+ let HEAD;
1184
+ const styles = {};
1185
+ function addStyle(id, css) {
1186
+ const group = isOldIE ? css.media || 'default' : id;
1187
+ const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
1188
+ if (!style.ids.has(id)) {
1189
+ style.ids.add(id);
1190
+ let code = css.source;
1191
+ if (css.map) {
1192
+ // https://developer.chrome.com/devtools/docs/javascript-debugging
1193
+ // this makes source maps inside style tags work properly in Chrome
1194
+ code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
1195
+ // http://stackoverflow.com/a/26603875
1196
+ code +=
1197
+ '\n/*# sourceMappingURL=data:application/json;base64,' +
1198
+ btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
1199
+ ' */';
1200
+ }
1201
+ if (!style.element) {
1202
+ style.element = document.createElement('style');
1203
+ style.element.type = 'text/css';
1204
+ if (css.media)
1205
+ style.element.setAttribute('media', css.media);
1206
+ if (HEAD === undefined) {
1207
+ HEAD = document.head || document.getElementsByTagName('head')[0];
1208
+ }
1209
+ HEAD.appendChild(style.element);
1210
+ }
1211
+ if ('styleSheet' in style.element) {
1212
+ style.styles.push(code);
1213
+ style.element.styleSheet.cssText = style.styles
1214
+ .filter(Boolean)
1215
+ .join('\n');
1216
+ }
1217
+ else {
1218
+ const index = style.ids.size - 1;
1219
+ const textNode = document.createTextNode(code);
1220
+ const nodes = style.element.childNodes;
1221
+ if (nodes[index])
1222
+ style.element.removeChild(nodes[index]);
1223
+ if (nodes.length)
1224
+ style.element.insertBefore(textNode, nodes[index]);
1225
+ else
1226
+ style.element.appendChild(textNode);
1227
+ }
1228
+ }
1229
+ }
1230
+
1231
+ /* script */
1232
+ const __vue_script__$w = script$w;
1233
+
1234
+ /* template */
1235
+ var __vue_render__$w = function () {
1236
+ var _vm = this;
1237
+ var _h = _vm.$createElement;
1238
+ var _c = _vm._self._c || _h;
1239
+ return _vm.poi ? _c('div', {
1240
+ staticClass: "wf-poi"
1241
+ }, [_vm.showLogo ? _c('img', {
1242
+ staticClass: "wf-poi-image",
1243
+ class: [_vm.isImage()],
1244
+ attrs: {
1245
+ "src": _vm.getImage()
1246
+ }
1247
+ }) : _vm._e(), _vm._v(" "), _vm.showName ? _c('div', {
1248
+ staticClass: "wf-poi-name",
1249
+ domProps: {
1250
+ "innerHTML": _vm._s(_vm.poi.getName(_vm.language) || 'POI')
1251
+ }
1252
+ }) : _vm._e(), _vm._v(" "), _vm.showPathButton ? _c('div', {
1253
+ directives: [{
1254
+ name: "touch",
1255
+ rawName: "v-touch:tap",
1256
+ value: _vm.showPath,
1257
+ expression: "showPath",
1258
+ arg: "tap"
1259
+ }],
1260
+ staticClass: "wf-show-path"
1261
+ }, [_c('button', [_c('WFTranslate', {
1262
+ attrs: {
1263
+ "k": "show_path"
1264
+ }
1265
+ }, [_vm._v(_vm._s(_vm.show_path))]), _vm._v(" "), _vm.showPathIcon ? _c('WFIcon', {
1266
+ attrs: {
1267
+ "name": _vm.pathIcon
1268
+ }
1269
+ }) : _vm._e()], 1)]) : _vm._e(), _vm._v(" "), _vm.showAccessibilityPathButton ? _c('div', {
1270
+ directives: [{
1271
+ name: "touch",
1272
+ rawName: "v-touch:tap",
1273
+ value: _vm.showAccessibilityPath,
1274
+ expression: "showAccessibilityPath",
1275
+ arg: "tap"
1276
+ }],
1277
+ staticClass: "wf-show-path wf-show-accessibility-path"
1278
+ }, [_c('button', [_c('WFTranslate', {
1279
+ attrs: {
1280
+ "k": "show_accessibility_path"
1281
+ }
1282
+ }, [_vm._v("Show Accessibility Path")]), _vm._v(" "), _vm.showPathIcon ? _c('WFIcon', {
1283
+ attrs: {
1284
+ "name": _vm.accessibilityPathIcon
1285
+ }
1286
+ }) : _vm._e()], 1)]) : _vm._e(), _vm._v(" "), _vm.showDescription ? _c('div', {
1287
+ staticClass: "wf-poi-description",
1288
+ domProps: {
1289
+ "innerHTML": _vm._s(_vm.poi.getDescription(_vm.language) || '')
1290
+ }
1291
+ }) : _vm._e(), _vm._v(" "), _vm.showRoomID ? _c('div', {
1292
+ staticClass: "wf-poi-room_id",
1293
+ domProps: {
1294
+ "innerHTML": _vm._s(_vm.poi.room_id || '')
1295
+ }
1296
+ }) : _vm._e(), _vm._v(" "), _vm.showFloor && _vm.poi.getFloor() ? _c('div', {
1297
+ staticClass: "wf-poi-floor",
1298
+ domProps: {
1299
+ "innerHTML": _vm._s(_vm.poi.getFloor().getName(_vm.language) || '')
1300
+ }
1301
+ }) : _vm._e(), _vm._v(" "), _vm.showDistance ? _c('div', {
1302
+ staticClass: "wf-poi-distance"
1303
+ }, [_c('span', {
1304
+ staticClass: "wf-path-time"
1305
+ }, [_vm._v(_vm._s(_vm.pathTime))]), _vm._v(" "), _c('span', {
1306
+ staticClass: "wf-path-steps"
1307
+ }, [_vm._v(_vm._s(_vm.pathSteps))]), _vm._v(" "), _c('span', {
1308
+ staticClass: "wf-path-length"
1309
+ }, [_vm._v(_vm._s(_vm.pathLength))])]) : _vm._e()]) : _vm._e();
1310
+ };
1311
+ var __vue_staticRenderFns__$w = [];
1312
+
1313
+ /* style */
1314
+ const __vue_inject_styles__$w = function (inject) {
1315
+ if (!inject) return;
1316
+ inject("data-v-8e45a566_0", {
1317
+ source: ".layout-view[data-v-8e45a566]{display:flex;flex-direction:column;justify-content:space-between;height:100%}.poi-info[data-v-8e45a566]{padding:1rem}.poi-info h2[data-v-8e45a566]{text-align:center;margin-top:1.5rem;margin-bottom:1.5rem}.poi-body[data-v-8e45a566]{box-shadow:0 -2px 1px 0 rgba(0,0,0,.05);padding:1rem;flex-grow:1}.poi-image[data-v-8e45a566]{height:14rem;width:100%;background-position:50% 50%;background-size:contain;background-repeat:no-repeat}.poi-image.image-background[data-v-8e45a566]{background-size:cover}.show-path[data-v-8e45a566]{bottom:1rem;right:1rem;text-transform:uppercase;z-index:10;line-height:2.8rem;margin-bottom:1.5rem}.show-path button[data-v-8e45a566]{height:3rem;font-size:1.2rem;line-height:2.8rem;padding-left:2.5rem;padding-right:2.5rem;margin:auto;border:0;display:block}.poi-description[data-v-8e45a566]{line-height:1.2}.poi-contact .address[data-v-8e45a566]{font-weight:600;margin-bottom:.5rem}.poi-contact .address span[data-v-8e45a566]{padding-top:4px;vertical-align:top;display:inline-block}.poi-contact .address a[data-v-8e45a566]{text-decoration:none;display:block;line-height:1.5}.poi-contact .address .icon[data-v-8e45a566]:before{mix-blend-mode:initial;color:#fff}",
1318
+ map: undefined,
1319
+ media: undefined
1320
+ });
1321
+ };
1322
+ /* scoped */
1323
+ const __vue_scope_id__$w = "data-v-8e45a566";
1324
+ /* module identifier */
1325
+ const __vue_module_identifier__$w = undefined;
1326
+ /* functional template */
1327
+ const __vue_is_functional_template__$w = false;
1328
+ /* style inject SSR */
1329
+
1330
+ /* style inject shadow dom */
1331
+
1332
+ const __vue_component__$W = /*#__PURE__*/normalizeComponent({
1333
+ render: __vue_render__$w,
1334
+ staticRenderFns: __vue_staticRenderFns__$w
1335
+ }, __vue_inject_styles__$w, __vue_script__$w, __vue_scope_id__$w, __vue_is_functional_template__$w, __vue_module_identifier__$w, false, createInjector, undefined, undefined);
1336
+ var POI = __vue_component__$W;
1337
+
1338
+ //
1339
+ var wayfinder;
1340
+ var script$v = {
1036
1341
  name: 'Map',
1342
+ components: {
1343
+ POI
1344
+ },
1037
1345
  props: {
1038
1346
  project: {
1039
1347
  type: String
@@ -1226,9 +1534,10 @@ var script$w = {
1226
1534
  let offset = (this.$wayfinder.settings.getFloat("poi.2d.icon-size", 24, poi) - 24) / 2;
1227
1535
  this.$refs.poiPopup.style.left = position[0] + "px";
1228
1536
  this.$nextTick(() => {
1537
+ //console.log('pos', position, offset, this.$refs.poiPopup.clientHeight, this.$refs.poiPopup.clientWidth)
1229
1538
  this.$refs.poiPopup.style.top = position[1] - offset + "px";
1230
- this.$refs.poiPopup.style.marginTop = "revert-layer";
1231
- this.$refs.poiPopup.style.marginLeft = "revert-layer";
1539
+ this.$refs.poiPopup.style.marginTop = -this.$refs.poiPopup.clientHeight + "px";
1540
+ this.$refs.poiPopup.style.marginLeft = -(this.$refs.poiPopup.clientWidth / 2) + "px";
1232
1541
  this.$refs.poiPopup.classList.remove("wf-pin-up");
1233
1542
  this.$refs.poiPopup.classList.remove("wf-pin-left");
1234
1543
  this.$refs.poiPopup.classList.remove("wf-pin-right");
@@ -1255,71 +1564,18 @@ var script$w = {
1255
1564
  return {
1256
1565
  loaded: false,
1257
1566
  pathTextVisible: false,
1258
- pathText: '',
1259
- poiPopupVisible: false,
1260
- popupPOI: null
1261
- };
1262
- }
1263
- };
1264
-
1265
- const isOldIE = typeof navigator !== 'undefined' &&
1266
- /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());
1267
- function createInjector(context) {
1268
- return (id, style) => addStyle(id, style);
1269
- }
1270
- let HEAD;
1271
- const styles = {};
1272
- function addStyle(id, css) {
1273
- const group = isOldIE ? css.media || 'default' : id;
1274
- const style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });
1275
- if (!style.ids.has(id)) {
1276
- style.ids.add(id);
1277
- let code = css.source;
1278
- if (css.map) {
1279
- // https://developer.chrome.com/devtools/docs/javascript-debugging
1280
- // this makes source maps inside style tags work properly in Chrome
1281
- code += '\n/*# sourceURL=' + css.map.sources[0] + ' */';
1282
- // http://stackoverflow.com/a/26603875
1283
- code +=
1284
- '\n/*# sourceMappingURL=data:application/json;base64,' +
1285
- btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
1286
- ' */';
1287
- }
1288
- if (!style.element) {
1289
- style.element = document.createElement('style');
1290
- style.element.type = 'text/css';
1291
- if (css.media)
1292
- style.element.setAttribute('media', css.media);
1293
- if (HEAD === undefined) {
1294
- HEAD = document.head || document.getElementsByTagName('head')[0];
1295
- }
1296
- HEAD.appendChild(style.element);
1297
- }
1298
- if ('styleSheet' in style.element) {
1299
- style.styles.push(code);
1300
- style.element.styleSheet.cssText = style.styles
1301
- .filter(Boolean)
1302
- .join('\n');
1303
- }
1304
- else {
1305
- const index = style.ids.size - 1;
1306
- const textNode = document.createTextNode(code);
1307
- const nodes = style.element.childNodes;
1308
- if (nodes[index])
1309
- style.element.removeChild(nodes[index]);
1310
- if (nodes.length)
1311
- style.element.insertBefore(textNode, nodes[index]);
1312
- else
1313
- style.element.appendChild(textNode);
1314
- }
1315
- }
1316
- }
1567
+ pathText: '',
1568
+ poiPopupVisible: false,
1569
+ popupPOI: null
1570
+ };
1571
+ }
1572
+ };
1317
1573
 
1318
1574
  /* script */
1319
- const __vue_script__$w = script$w;
1575
+ const __vue_script__$v = script$v;
1320
1576
 
1321
1577
  /* template */
1322
- var __vue_render__$w = function () {
1578
+ var __vue_render__$v = function () {
1323
1579
  var _vm = this;
1324
1580
  var _h = _vm.$createElement;
1325
1581
  var _c = _vm._self._c || _h;
@@ -1343,7 +1599,7 @@ var __vue_render__$w = function () {
1343
1599
  expression: "(showPathText && pathTextVisible)"
1344
1600
  }],
1345
1601
  staticClass: "wf-map-path-text"
1346
- }, [_vm._v(_vm._s(_vm.pathText))]), _vm._v(" "), _vm.popupPOI ? _c('div', {
1602
+ }, [_vm._v(_vm._s(_vm.pathText))]), _vm._v(" "), _c('div', {
1347
1603
  directives: [{
1348
1604
  name: "show",
1349
1605
  rawName: "v-show",
@@ -1355,10 +1611,10 @@ var __vue_render__$w = function () {
1355
1611
  attrs: {
1356
1612
  "id": "wf-poi-popup"
1357
1613
  }
1358
- }, [_c('div', {
1614
+ }, [_vm.popupPOI ? _c('div', {
1359
1615
  staticClass: "wf-poi-popup-content"
1360
1616
  }, [_vm._t("poi", function () {
1361
- return [_c('WFPOI', {
1617
+ return [_c('POI', {
1362
1618
  attrs: {
1363
1619
  "poi": _vm.popupPOI,
1364
1620
  "showLogo": _vm.showPOILogo,
@@ -1371,275 +1627,23 @@ var __vue_render__$w = function () {
1371
1627
  })];
1372
1628
  }, {
1373
1629
  "poi": _vm.popupPOI
1374
- })], 2), _vm._v(" "), _c('div', {
1630
+ })], 2) : _vm._e(), _vm._v(" "), _vm.popupPOI ? _c('div', {
1375
1631
  staticClass: "wf-pin-down"
1376
- })]) : _vm._e()]);
1377
- };
1378
- var __vue_staticRenderFns__$w = [];
1379
-
1380
- /* style */
1381
- const __vue_inject_styles__$w = function (inject) {
1382
- if (!inject) return;
1383
- inject("data-v-57432c9c_0", {
1384
- source: ".wf-map-container[data-v-57432c9c]{position:relative;width:100%;height:100%}.wf-map-container canvas[data-v-57432c9c]{width:100%;height:100%}.wf-map-container .wf-map-path-text[data-v-57432c9c]{width:30ch;text-align:center;background-color:#fff;position:absolute;bottom:25%;margin:auto;left:50%;margin-left:-15ch;padding:.5em}#wf-poi-popup[data-v-57432c9c]{position:absolute;top:0;left:0;z-index:10;width:15.5rem;height:auto;background-color:#fff;padding:.4rem;text-align:center;margin-top:-15.5rem;margin-left:-7.75rem;transform-origin:bottom;animation-duration:.5s;animation-iteration-count:2;cursor:pointer}.wf-poi-popup-content[data-v-57432c9c]{display:flex;flex-direction:column;justify-content:stretch;height:100%}.wf-poi-popup-content>label[data-v-57432c9c]{flex-grow:1;font-size:1.6rem;margin-top:.6rem;text-align:center;line-height:1.2;font-weight:600;margin-bottom:1.6rem}.wf-pin-down[data-v-57432c9c]{background-color:#fff;width:1rem;height:1rem;position:absolute;bottom:-.5rem;border-radius:1rem 0 0 0;transform:rotate(45deg);left:50%;margin-left:-.75rem}.wf-pin-up .wf-poi-popup-content[data-v-57432c9c]{margin-bottom:0}.wf-pin-up .wf-pin-down[data-v-57432c9c]{top:-.5rem;bottom:auto;transform:rotate(-45deg)}",
1385
- map: undefined,
1386
- media: undefined
1387
- });
1388
- };
1389
- /* scoped */
1390
- const __vue_scope_id__$w = "data-v-57432c9c";
1391
- /* module identifier */
1392
- const __vue_module_identifier__$w = undefined;
1393
- /* functional template */
1394
- const __vue_is_functional_template__$w = false;
1395
- /* style inject SSR */
1396
-
1397
- /* style inject shadow dom */
1398
-
1399
- const __vue_component__$V = /*#__PURE__*/normalizeComponent({
1400
- render: __vue_render__$w,
1401
- staticRenderFns: __vue_staticRenderFns__$w
1402
- }, __vue_inject_styles__$w, __vue_script__$w, __vue_scope_id__$w, __vue_is_functional_template__$w, __vue_module_identifier__$w, false, createInjector, undefined, undefined);
1403
- var __vue_component__$W = __vue_component__$V;
1404
-
1405
- //
1406
- var script$v = {
1407
- name: "POI",
1408
- computed: {
1409
- ...mapState('wf', ['language']),
1410
- hasShowPathListener() {
1411
- return !!(this.$listeners && this.$listeners.showPath);
1412
- },
1413
- hasShowAccessibilityPathListener() {
1414
- return !!(this.$listeners && this.$listeners.showAccessibilityPath);
1415
- }
1416
- },
1417
- props: {
1418
- poi: {
1419
- type: Object,
1420
- default: null
1421
- },
1422
- showLogo: {
1423
- type: Boolean,
1424
- default: false
1425
- },
1426
- showName: {
1427
- type: Boolean,
1428
- default: true
1429
- },
1430
- showPathButton: {
1431
- type: Boolean,
1432
- default: false
1433
- },
1434
- showAccessibilityPathButton: {
1435
- type: Boolean,
1436
- default: false
1437
- },
1438
- showDescription: {
1439
- type: Boolean,
1440
- default: false
1441
- },
1442
- showRoomID: {
1443
- type: Boolean,
1444
- default: false
1445
- },
1446
- showFloor: {
1447
- type: Boolean,
1448
- default: false
1449
- },
1450
- showDistance: {
1451
- type: Boolean,
1452
- default: false
1453
- },
1454
- pathIcon: {
1455
- type: String,
1456
- default: "path"
1457
- },
1458
- showPathIcon: {
1459
- type: Boolean,
1460
- default: true
1461
- },
1462
- accessibilityPathIcon: {
1463
- type: String,
1464
- default: "accessibility-path"
1465
- }
1466
- },
1467
- mounted() {
1468
- if (this.$wayfinder) {
1469
- this.show_path = this.$wayfinder.translator.get('show_path');
1470
- this.show_accessibility_path = this.$wayfinder.translator.get('show_accessibility_path');
1471
- }
1472
- },
1473
- watch: {
1474
- language() {
1475
- if (this.$wayfinder) {
1476
- this.show_path = this.$wayfinder.translator.get('show_path');
1477
- this.show_accessibility_path = this.$wayfinder.translator.get('show_accessibility_path');
1478
- }
1479
- },
1480
- poi() {
1481
- console.log('poi', this.poi);
1482
- if (this.showDistance && this.$wayfinder) {
1483
- let path = this.$wayfinder.findPath(this.$wayfinder.getKioskNode(), this.poi.getNode());
1484
- this.path2Text = this.$wayfinder.pathToText(path);
1485
- console.log('watch.path', this.path2Text);
1486
- }
1487
- }
1488
- },
1489
- methods: {
1490
- showPath() {
1491
- if (this.poi) {
1492
- if (this.hasShowPathListener) {
1493
- this.$emit('showPath', this.poi);
1494
- } else {
1495
- this.$wayfinder.showPath(this.poi.getNode(), this.poi);
1496
- }
1497
- }
1498
- },
1499
- showAccessibilityPath() {
1500
- if (this.poi) {
1501
- if (this.hasShowAccessibilityPathListener) {
1502
- this.$emit('showAccessibilityPath', this.poi);
1503
- } else {
1504
- this.$wayfinder.showPath(this.poi.getNode(), this.poi, {
1505
- "ignoreTypes": ["escalator", "stairs"]
1506
- });
1507
- }
1508
- }
1509
- },
1510
- open(type) {
1511
- if (type && this.poi[type]) {
1512
- if (type === 'shop_email') {
1513
- window.open('mailto:' + this.poi[type], '_system');
1514
- } else if (type === 'shop_phone') {
1515
- window.open('tel:' + this.poi[type], '_system');
1516
- } else {
1517
- window.open(this.poi[type], '_system');
1518
- }
1519
- }
1520
- },
1521
- getImage() {
1522
- if (this.poi.getBackgroundUrl()) return 'url("' + this.poi.getBackgroundUrl() + '")';else if (this.poi.getIconUrl()) {
1523
- return 'url("' + this.poi.getIconUrl() + '")';
1524
- } else {
1525
- return "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=";
1526
- }
1527
- },
1528
- isImage() {
1529
- if (this.poi.getBackgroundUrl()) return "image-background";else if (this.poi.getIconUrl()) return "image-logo";else return "image-none";
1530
- },
1531
- truncate(str, len) {
1532
- if (str && str.length > len) {
1533
- return str.substring(0, len) + '...';
1534
- } else {
1535
- return str;
1536
- }
1537
- }
1538
- },
1539
- data: function () {
1540
- return {
1541
- show_path: 'Show Path',
1542
- show_accessibility_path: "Show Accessibility Path",
1543
- pathTime: '',
1544
- unit: 'm',
1545
- path2Text: null
1546
- };
1547
- }
1548
- };
1549
-
1550
- /* script */
1551
- const __vue_script__$v = script$v;
1552
-
1553
- /* template */
1554
- var __vue_render__$v = function () {
1555
- var _vm = this;
1556
- var _h = _vm.$createElement;
1557
- var _c = _vm._self._c || _h;
1558
- return _vm.poi ? _c('div', {
1559
- staticClass: "wf-poi"
1560
- }, [_vm.showLogo ? _c('img', {
1561
- staticClass: "wf-poi-image",
1562
- class: [_vm.isImage()],
1563
- attrs: {
1564
- "src": _vm.getImage()
1565
- }
1566
- }) : _vm._e(), _vm._v(" "), _vm.showName ? _c('div', {
1567
- staticClass: "wf-poi-name",
1568
- domProps: {
1569
- "innerHTML": _vm._s(_vm.poi.getName(_vm.language) || 'POI')
1570
- }
1571
- }) : _vm._e(), _vm._v(" "), _vm.showPathButton ? _c('div', {
1572
- directives: [{
1573
- name: "touch",
1574
- rawName: "v-touch:tap",
1575
- value: _vm.showPath,
1576
- expression: "showPath",
1577
- arg: "tap"
1578
- }],
1579
- staticClass: "wf-show-path"
1580
- }, [_c('button', [_c('WFTranslate', {
1581
- attrs: {
1582
- "k": "show_path"
1583
- }
1584
- }, [_vm._v(_vm._s(_vm.show_path))]), _vm._v(" "), _vm.showPathIcon ? _c('WFIcon', {
1585
- attrs: {
1586
- "name": _vm.pathIcon
1587
- }
1588
- }) : _vm._e()], 1)]) : _vm._e(), _vm._v(" "), _vm.showAccessibilityPathButton ? _c('div', {
1589
- directives: [{
1590
- name: "touch",
1591
- rawName: "v-touch:tap",
1592
- value: _vm.showAccessibilityPath,
1593
- expression: "showAccessibilityPath",
1594
- arg: "tap"
1595
- }],
1596
- staticClass: "wf-show-path wf-show-accessibility-path"
1597
- }, [_c('button', [_c('WFTranslate', {
1598
- attrs: {
1599
- "k": "show_accessibility_path"
1600
- }
1601
- }, [_vm._v("Show Accessibility Path")]), _vm._v(" "), _vm.showPathIcon ? _c('WFIcon', {
1602
- attrs: {
1603
- "name": _vm.accessibilityPathIcon
1604
- }
1605
- }) : _vm._e()], 1)]) : _vm._e(), _vm._v(" "), _vm.showDescription ? _c('div', {
1606
- staticClass: "wf-poi-description",
1607
- domProps: {
1608
- "innerHTML": _vm._s(_vm.poi.getDescription(_vm.language) || '')
1609
- }
1610
- }) : _vm._e(), _vm._v(" "), _vm.showRoomID ? _c('div', {
1611
- staticClass: "wf-poi-room_id",
1612
- domProps: {
1613
- "innerHTML": _vm._s(_vm.poi.room_id || '')
1614
- }
1615
- }) : _vm._e(), _vm._v(" "), _vm.showFloor && _vm.poi.getFloor() ? _c('div', {
1616
- staticClass: "wf-poi-floor",
1617
- domProps: {
1618
- "innerHTML": _vm._s(_vm.poi.getFloor().getName(_vm.language) || '')
1619
- }
1620
- }) : _vm._e(), _vm._v(" "), _vm.showDistance ? _c('div', {
1621
- staticClass: "wf-poi-distance"
1622
- }, [_c('span', {
1623
- staticClass: "wf-path-time"
1624
- }, [_vm._v(_vm._s(_vm.pathTime))]), _vm._v(" "), _c('span', {
1625
- staticClass: "wf-path-steps"
1626
- }, [_vm._v(_vm._s(_vm.pathSteps))]), _vm._v(" "), _c('span', {
1627
- staticClass: "wf-path-length"
1628
- }, [_vm._v(_vm._s(_vm.pathLength))])]) : _vm._e()]) : _vm._e();
1632
+ }) : _vm._e()])]);
1629
1633
  };
1630
1634
  var __vue_staticRenderFns__$v = [];
1631
1635
 
1632
1636
  /* style */
1633
1637
  const __vue_inject_styles__$v = function (inject) {
1634
1638
  if (!inject) return;
1635
- inject("data-v-5cf5ab6e_0", {
1636
- source: ".layout-view[data-v-5cf5ab6e]{display:flex;flex-direction:column;justify-content:space-between;height:100%}.poi-info[data-v-5cf5ab6e]{padding:1rem}.poi-info h2[data-v-5cf5ab6e]{text-align:center;margin-top:1.5rem;margin-bottom:1.5rem}.poi-body[data-v-5cf5ab6e]{box-shadow:0 -2px 1px 0 rgba(0,0,0,.05);padding:1rem;flex-grow:1}.poi-image[data-v-5cf5ab6e]{height:14rem;width:100%;background-position:50% 50%;background-size:contain;background-repeat:no-repeat}.poi-image.image-background[data-v-5cf5ab6e]{background-size:cover}.show-path[data-v-5cf5ab6e]{bottom:1rem;right:1rem;text-transform:uppercase;z-index:10;line-height:2.8rem;margin-bottom:1.5rem}.show-path button[data-v-5cf5ab6e]{height:3rem;font-size:1.2rem;line-height:2.8rem;padding-left:2.5rem;padding-right:2.5rem;margin:auto;border:0;display:block}.poi-description[data-v-5cf5ab6e]{line-height:1.2}.poi-contact .address[data-v-5cf5ab6e]{font-weight:600;margin-bottom:.5rem}.poi-contact .address span[data-v-5cf5ab6e]{padding-top:4px;vertical-align:top;display:inline-block}.poi-contact .address a[data-v-5cf5ab6e]{text-decoration:none;display:block;line-height:1.5}.poi-contact .address .icon[data-v-5cf5ab6e]:before{mix-blend-mode:initial;color:#fff}",
1639
+ inject("data-v-6d8f8f62_0", {
1640
+ source: ".wf-map-container[data-v-6d8f8f62]{position:relative;width:100%;height:100%}.wf-map-container canvas[data-v-6d8f8f62]{width:100%;height:100%;position:relative}.wf-map-container .wf-map-path-text[data-v-6d8f8f62]{width:30ch;text-align:center;background-color:#fff;position:absolute;bottom:25%;margin:auto;left:50%;margin-left:-15ch;padding:.5em}#wf-poi-popup[data-v-6d8f8f62]{position:absolute;top:0;left:0;z-index:10;width:15.5rem;height:auto;background-color:#fff;text-align:center;transform-origin:bottom;animation-duration:.5s;animation-iteration-count:2;cursor:pointer}.wf-poi-popup-content[data-v-6d8f8f62]{display:flex;flex-direction:column;justify-content:stretch;height:100%}.wf-poi-popup-content>label[data-v-6d8f8f62]{flex-grow:1;font-size:1.6rem;margin-top:.6rem;text-align:center;line-height:1.2;font-weight:600;margin-bottom:1.6rem}.wf-pin-down[data-v-6d8f8f62]{background-color:#fff;width:1rem;height:1rem;position:absolute;bottom:-.5rem;border-radius:1rem 0 0 0;transform:rotate(45deg);left:50%;margin-left:-.75rem}.wf-pin-up .wf-poi-popup-content[data-v-6d8f8f62]{margin-bottom:0}.wf-pin-up .wf-pin-down[data-v-6d8f8f62]{top:-.5rem;bottom:auto;transform:rotate(-45deg)}",
1637
1641
  map: undefined,
1638
1642
  media: undefined
1639
1643
  });
1640
1644
  };
1641
1645
  /* scoped */
1642
- const __vue_scope_id__$v = "data-v-5cf5ab6e";
1646
+ const __vue_scope_id__$v = "data-v-6d8f8f62";
1643
1647
  /* module identifier */
1644
1648
  const __vue_module_identifier__$v = undefined;
1645
1649
  /* functional template */
@@ -1652,7 +1656,7 @@ const __vue_component__$U = /*#__PURE__*/normalizeComponent({
1652
1656
  render: __vue_render__$v,
1653
1657
  staticRenderFns: __vue_staticRenderFns__$v
1654
1658
  }, __vue_inject_styles__$v, __vue_script__$v, __vue_scope_id__$v, __vue_is_functional_template__$v, __vue_module_identifier__$v, false, createInjector, undefined, undefined);
1655
- var POI = __vue_component__$U;
1659
+ var __vue_component__$V = __vue_component__$U;
1656
1660
 
1657
1661
  //
1658
1662
  var script$u = {
@@ -3857,8 +3861,8 @@ var __vue_staticRenderFns__$h = [];
3857
3861
  /* style */
3858
3862
  const __vue_inject_styles__$h = function (inject) {
3859
3863
  if (!inject) return;
3860
- inject("data-v-19b0e950_0", {
3861
- source: ".wf-search .wf-close{position:absolute;top:0;right:.5rem;width:10rem;background-color:rgba(255,255,255,.7);background-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8' standalone='no'%3F%3E%3Csvg xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23' xmlns:svg='http://www.w3.org/2000/svg' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' enable-background='new 0 0 20 20' viewBox='0 0 20 20' y='0px' x='0px' id='Cross' version='1.1'%3E%3Cmetadata id='metadata9'%3E%3Crdf:RDF%3E%3Ccc:Work rdf:about=''%3E%3Cdc:format%3Eimage/svg+xml%3C/dc:format%3E%3Cdc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage' /%3E%3Cdc:title%3E%3C/dc:title%3E%3C/cc:Work%3E%3C/rdf:RDF%3E%3C/metadata%3E%3Cdefs id='defs7'%3E%3ClinearGradient spreadMethod='pad' gradientUnits='userSpaceOnUse' y2='29.3118' x2='11.0536' y1='16.0077' x1='24.5509' id='paint1_linear' gradientTransform='translate(-6.9097825,12.894087)'%3E%3Cstop id='stop16' stop-color='%23FF4C54' /%3E%3Cstop id='stop18' stop-color='%23BE3F45' offset='1' /%3E%3C/linearGradient%3E%3ClinearGradient gradientUnits='userSpaceOnUse' y2='34.9828' x2='34.294201' y1='14.605' x1='13.6189' id='paint0_linear'%3E%3Cstop id='stop11' stop-color='%23FF4C54' /%3E%3Cstop id='stop13' stop-color='%23BE3F45' offset='1' /%3E%3C/linearGradient%3E%3ClinearGradient gradientTransform='matrix(1.9229845,0,0,1.9229845,-9.2288833,-9.2308069)' gradientUnits='userSpaceOnUse' y2='14.322534' x2='6.3946652' y1='7.6276183' x1='12.290775' id='linearGradient4161' xlink:href='%23paint0_linear' /%3E%3C/defs%3E%3Cpath style='fill:url(%23linearGradient4161);fill-opacity:1' id='path3' d='m 18.362098,19.32359 c -0.90188,0.90188 -2.363348,0.90188 -3.263305,0 l -5.097832,-5.826643 -5.0978311,5.82472 c -0.9018797,0.90188 -2.3633479,0.90188 -3.2633047,0 -0.90187984,-0.90188 -0.90187984,-2.363347 0,-3.263304 L 6.9434164,10.000961 1.6379022,3.9397144 c -0.90187974,-0.9018798 -0.90187974,-2.361425 0,-3.26330476 0.9018798,-0.9018797 2.3614249,-0.9018797 3.2633048,0 l 5.099754,5.82856596 5.097832,-5.82856596 c 0.90188,-0.9018797 2.361425,-0.9018797 3.263305,0 0.901879,0.90187976 0.901879,2.36334796 0,3.26330476 l -5.30359,6.0612466 5.30359,6.057402 c 0.901879,0.90188 0.901879,2.363347 0,3.265227 z' /%3E%3C/svg%3E\")}.wf-search .results{overflow:hidden}.wf-search .wf-search-container{margin:auto;display:flex;flex-direction:column;justify-content:flex-end;height:100%;padding:1rem}.wf-search .wf-search-input-container input{margin:auto;display:block;padding:1rem;font-size:2rem;font-weight:600;width:100%;border:1px solid #000;outline:0;background-repeat:no-repeat;user-select:none}.wf-search .wf-keyboard{user-select:none;display:flex;flex-direction:column;flex-shrink:0}.wf-search .wf-keyboard .keyboard-row{margin:auto;display:flex}.wf-search .wf-keyboard .keyboard-key{text-align:center;width:4ch;height:4ch;line-height:1.5;overflow:hidden;user-select:none}.wf-search .wf-keyboard .keyboard-key:last-child{margin-right:0}.wf-search .wf-keyboard .keyboard-key:active{background-color:#00f}.wf-search .wf-keyboard .keyboard-key2x{width:8ch}.wf-search .wf-keyboard .keyboard-key3x{width:12ch}.wf-search .wf-keyboard .keyboard-key_spacebar{width:24ch}",
3864
+ inject("data-v-7d533c1e_0", {
3865
+ source: ".wf-search .wf-close{position:absolute;top:0;right:.5rem;width:10rem;background-color:rgba(255,255,255,.7);background-image:url(\"data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8' standalone='no'%3F%3E%3Csvg xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23' xmlns:svg='http://www.w3.org/2000/svg' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve' enable-background='new 0 0 20 20' viewBox='0 0 20 20' y='0px' x='0px' id='Cross' version='1.1'%3E%3Cmetadata id='metadata9'%3E%3Crdf:RDF%3E%3Ccc:Work rdf:about=''%3E%3Cdc:format%3Eimage/svg+xml%3C/dc:format%3E%3Cdc:type rdf:resource='http://purl.org/dc/dcmitype/StillImage' /%3E%3Cdc:title%3E%3C/dc:title%3E%3C/cc:Work%3E%3C/rdf:RDF%3E%3C/metadata%3E%3Cdefs id='defs7'%3E%3ClinearGradient spreadMethod='pad' gradientUnits='userSpaceOnUse' y2='29.3118' x2='11.0536' y1='16.0077' x1='24.5509' id='paint1_linear' gradientTransform='translate(-6.9097825,12.894087)'%3E%3Cstop id='stop16' stop-color='%23FF4C54' /%3E%3Cstop id='stop18' stop-color='%23BE3F45' offset='1' /%3E%3C/linearGradient%3E%3ClinearGradient gradientUnits='userSpaceOnUse' y2='34.9828' x2='34.294201' y1='14.605' x1='13.6189' id='paint0_linear'%3E%3Cstop id='stop11' stop-color='%23FF4C54' /%3E%3Cstop id='stop13' stop-color='%23BE3F45' offset='1' /%3E%3C/linearGradient%3E%3ClinearGradient gradientTransform='matrix(1.9229845,0,0,1.9229845,-9.2288833,-9.2308069)' gradientUnits='userSpaceOnUse' y2='14.322534' x2='6.3946652' y1='7.6276183' x1='12.290775' id='linearGradient4161' xlink:href='%23paint0_linear' /%3E%3C/defs%3E%3Cpath style='fill:url(%23linearGradient4161);fill-opacity:1' id='path3' d='m 18.362098,19.32359 c -0.90188,0.90188 -2.363348,0.90188 -3.263305,0 l -5.097832,-5.826643 -5.0978311,5.82472 c -0.9018797,0.90188 -2.3633479,0.90188 -3.2633047,0 -0.90187984,-0.90188 -0.90187984,-2.363347 0,-3.263304 L 6.9434164,10.000961 1.6379022,3.9397144 c -0.90187974,-0.9018798 -0.90187974,-2.361425 0,-3.26330476 0.9018798,-0.9018797 2.3614249,-0.9018797 3.2633048,0 l 5.099754,5.82856596 5.097832,-5.82856596 c 0.90188,-0.9018797 2.361425,-0.9018797 3.263305,0 0.901879,0.90187976 0.901879,2.36334796 0,3.26330476 l -5.30359,6.0612466 5.30359,6.057402 c 0.901879,0.90188 0.901879,2.363347 0,3.265227 z' /%3E%3C/svg%3E\")}.wf-search .results{overflow:hidden}.wf-search .wf-search-container{margin:auto;display:flex;flex-direction:column;justify-content:flex-end;height:100%}.wf-search .wf-search-input-container input{margin:auto;display:block;padding:1rem;font-size:2rem;font-weight:600;width:100%;border:1px solid #000;outline:0;background-repeat:no-repeat;user-select:none}.wf-search .wf-keyboard{user-select:none;display:flex;flex-direction:column;flex-shrink:0}.wf-search .wf-keyboard .keyboard-row{margin:auto;display:flex}.wf-search .wf-keyboard .keyboard-key{text-align:center;width:4ch;height:4ch;line-height:1.5;overflow:hidden;user-select:none}.wf-search .wf-keyboard .keyboard-key:last-child{margin-right:0}.wf-search .wf-keyboard .keyboard-key:active{background-color:#00f}.wf-search .wf-keyboard .keyboard-key2x{width:8ch}.wf-search .wf-keyboard .keyboard-key3x{width:12ch}.wf-search .wf-keyboard .keyboard-key_spacebar{width:24ch}",
3862
3866
  map: undefined,
3863
3867
  media: undefined
3864
3868
  });
@@ -5925,7 +5929,7 @@ var components = /*#__PURE__*/Object.freeze({
5925
5929
  __proto__: null,
5926
5930
  loadWayfinder: loadWayfinder,
5927
5931
  WFApp: __vue_component__$Y,
5928
- WFMap: __vue_component__$W,
5932
+ WFMap: __vue_component__$V,
5929
5933
  WFAZMenu: __vue_component__$T,
5930
5934
  WFFlagsMenu: __vue_component__$R,
5931
5935
  WFLanguagesMenu: __vue_component__$P,
@@ -6247,4 +6251,4 @@ const install = function installWayfinderVueComponents(Vue, store, mapType, proj
6247
6251
  });
6248
6252
  };
6249
6253
 
6250
- export { __vue_component__$T as WFAZMenu, __vue_component__$c as WFAlphabet, __vue_component__$Y as WFApp, __vue_component__$g as WFBanner, __vue_component__$1 as WFBrowser, __vue_component__$H as WFBuildingLogo, __vue_component__$s as WFClock, __vue_component__$q as WFDate, __vue_component__$y as WFFilteredMenu, __vue_component__$R as WFFlagsMenu, __vue_component__$A as WFFloorsMenu, Group as WFGroup, __vue_component__$J as WFGroupPOIsMenu, __vue_component__$L as WFGroupsMenu, __vue_component__$3 as WFIcon, __vue_component__$P as WFLanguagesMenu, __vue_component__$u as WFLoading, __vue_component__$W as WFMap, POI as WFPOI, __vue_component__$7 as WFPage, __vue_component__$e as WFPageMenu, __vue_component__$i as WFScrollableArea, __vue_component__$w as WFSearch, __vue_component__$E as WFShortcutsMenu, SubGroupMenu as WFSubGroupMenu, __vue_component__$m as WFTab, __vue_component__$k as WFTabButtons, __vue_component__$o as WFTabs, __vue_component__$5 as WFTranslate, YAH as WFYAH, __vue_component__$C as WFZoomMenu, install as default, loadWayfinder };
6254
+ export { __vue_component__$T as WFAZMenu, __vue_component__$c as WFAlphabet, __vue_component__$Y as WFApp, __vue_component__$g as WFBanner, __vue_component__$1 as WFBrowser, __vue_component__$H as WFBuildingLogo, __vue_component__$s as WFClock, __vue_component__$q as WFDate, __vue_component__$y as WFFilteredMenu, __vue_component__$R as WFFlagsMenu, __vue_component__$A as WFFloorsMenu, Group as WFGroup, __vue_component__$J as WFGroupPOIsMenu, __vue_component__$L as WFGroupsMenu, __vue_component__$3 as WFIcon, __vue_component__$P as WFLanguagesMenu, __vue_component__$u as WFLoading, __vue_component__$V as WFMap, POI as WFPOI, __vue_component__$7 as WFPage, __vue_component__$e as WFPageMenu, __vue_component__$i as WFScrollableArea, __vue_component__$w as WFSearch, __vue_component__$E as WFShortcutsMenu, SubGroupMenu as WFSubGroupMenu, __vue_component__$m as WFTab, __vue_component__$k as WFTabButtons, __vue_component__$o as WFTabs, __vue_component__$5 as WFTranslate, YAH as WFYAH, __vue_component__$C as WFZoomMenu, install as default, loadWayfinder };