@3dwayfinder/wayfinder-vue-components 1.13.3 → 1.13.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.
@@ -27,21 +27,13 @@ const urls$1 = {
27
27
  snapshot: "../../../"
28
28
  }
29
29
  };
30
-
31
- /* global WF_MAP_TYPE WayfinderAPI wayfinder*/
32
-
33
30
  var script$z = {
34
- props: {
35
- maxInActivity: {
36
- type: Number,
37
- default: 30
38
- }
39
- },
40
31
  data() {
41
32
  return {
42
33
  lastClick: false,
43
34
  landscape: false,
44
- screensaver: false
35
+ screensaver: false,
36
+ maxInActivity: 30
45
37
  };
46
38
  },
47
39
  mounted() {
@@ -49,6 +41,10 @@ var script$z = {
49
41
  window.onresize = () => {
50
42
  this.resize();
51
43
  };
44
+ this.$wayfinder.events.on("data-loaded", () => {
45
+ this.maxInActivity = this.$wayfinder.settings.getInt("kiosk.max-inactivity", 30);
46
+ console.log('maxInActivity', this.maxInActivity);
47
+ });
52
48
  this.lastClick = setTimeout(() => {
53
49
  // Start screensaver
54
50
  this.$emit("screensaving");
@@ -1,4 +1,4 @@
1
- var WayfinderVueComponents=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=e(t);function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function a(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function o(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function s(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?o(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,a,o,s,r=[],c=!0,u=!1;try{if(o=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;c=!1}else for(;!(c=(n=o.call(i)).done)&&(r.push(n.value),r.length!==e);c=!0);}catch(t){u=!0,a=t}finally{try{if(!c&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(u)throw a}}return r}}(t,e)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}var u={api:{live:"//wayfinder-cdn.com/api",enterprise:"//example.com/api",dev:"//api.3dwayfinder.com",snapshot:"../../../api/"},assets:{live:"https://wayfinder-cdn.com/shared/",dev:"//static.3dwayfinder.com/shared/",enterprise:"//example.com/shared/",snapshot:"../../../shared/"},js:{live:"https://wayfinder-cdn.com/",dev:"//static.3dwayfinder.com",enterprise:"//example.com/js/",snapshot:"../../../"}};function l(t,e,i,n,a,o,s,r,c,u){"boolean"!=typeof s&&(c=r,r=s,s=!1);const l="function"==typeof i?i.options:i;let d;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,a&&(l.functional=!0)),n&&(l._scopeId=n),o?(d=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=d):e&&(d=s?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,r(t))}),d)if(l.functional){const t=l.render;l.render=function(e,i){return d.call(i),t(e,i)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,d):[d]}return i}var d=l({render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{directives:[{name:"touch",rawName:"v-touch:start",value:t.onTouch,expression:"onTouch",arg:"start"}],staticClass:"wf-app",class:{"wf-screensaving":t.screensaver}},[t._t("default")],2)},staticRenderFns:[]},undefined,{props:{maxInActivity:{type:Number,default:30}},data:function(){return{lastClick:!1,landscape:!1,screensaver:!1}},mounted:function(){var t=this;this.resize(),window.onresize=function(){t.resize()},this.lastClick=setTimeout((function(){t.$emit("screensaving"),t.screensaver=!0}),1e3*this.maxInActivity)},methods:{onTouch:function(t){var e=this;return clearTimeout(this.lastClick),this.$emit("touched",t),this.screensaver=!1,this.lastClick=setTimeout((function(){e.$emit("screensaving"),e.screensaver=!0,e.$wayfinder.restoreDefaultState(),e.$wayfinder.pause()}),1e3*this.maxInActivity),!1},resize:function(){var t=window.matchMedia("(orientation: landscape)"),e=window.matchMedia("(max-height: 1024px) and (orientation: portrait)"),i=window.matchMedia("(max-width: 1024px) and (orientation: landscape)");this.landscape=!!t&&t.matches;var n=!!e&&e.matches||!!i&&i.matches;this.$store.dispatch("wf/SET_LANDSCAPE",this.landscape),this.$store.dispatch("wf/SET_PORTRAIT",!this.landscape),this.$store.dispatch("wf/SET_MOBILE",n)},getURL:function(t,e){return u[e][t]},loadScript:function(t,e){var i=document.createElement("script");i.type="text/javascript",i.async=!0,document.getElementsByTagName("head")[0].appendChild(i),"function"==typeof e&&(i.onload=e,i.src=t)}}},undefined,false,undefined,!1,void 0,void 0,void 0);var h=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function f(t,e){Object.keys(t).forEach((function(i){return e(t[i],i)}))}function p(t){return null!==t&&"object"==typeof t}var g=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var i=t.state;this.state=("function"==typeof i?i():i)||{}},m={namespaced:{configurable:!0}};m.namespaced.get=function(){return!!this._rawModule.namespaced},g.prototype.addChild=function(t,e){this._children[t]=e},g.prototype.removeChild=function(t){delete this._children[t]},g.prototype.getChild=function(t){return this._children[t]},g.prototype.hasChild=function(t){return t in this._children},g.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},g.prototype.forEachChild=function(t){f(this._children,t)},g.prototype.forEachGetter=function(t){this._rawModule.getters&&f(this._rawModule.getters,t)},g.prototype.forEachAction=function(t){this._rawModule.actions&&f(this._rawModule.actions,t)},g.prototype.forEachMutation=function(t){this._rawModule.mutations&&f(this._rawModule.mutations,t)},Object.defineProperties(g.prototype,m);var v,w=function(t){this.register([],t,!1)};function y(t,e,i){if(e.update(i),i.modules)for(var n in i.modules){if(!e.getChild(n))return;y(t.concat(n),e.getChild(n),i.modules[n])}}w.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},w.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,i){return t+((e=e.getChild(i)).namespaced?i+"/":"")}),"")},w.prototype.update=function(t){y([],this.root,t)},w.prototype.register=function(t,e,i){var n=this;void 0===i&&(i=!0);var a=new g(e,i);0===t.length?this.root=a:this.get(t.slice(0,-1)).addChild(t[t.length-1],a);e.modules&&f(e.modules,(function(e,a){n.register(t.concat(a),e,i)}))},w.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),i=t[t.length-1],n=e.getChild(i);n&&n.runtime&&e.removeChild(i)},w.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),i=t[t.length-1];return!!e&&e.hasChild(i)};var b=function(t){var e=this;void 0===t&&(t={}),!v&&"undefined"!=typeof window&&window.Vue&&function(t){if(v&&t===v)return;!
1
+ var WayfinderVueComponents=function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i=e(t);function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function a(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function o(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function s(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?o(Object(i),!0).forEach((function(e){a(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,a,o,s,r=[],c=!0,u=!1;try{if(o=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;c=!1}else for(;!(c=(n=o.call(i)).done)&&(r.push(n.value),r.length!==e);c=!0);}catch(t){u=!0,a=t}finally{try{if(!c&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(u)throw a}}return r}}(t,e)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}var u={api:{live:"//wayfinder-cdn.com/api",enterprise:"//example.com/api",dev:"//api.3dwayfinder.com",snapshot:"../../../api/"},assets:{live:"https://wayfinder-cdn.com/shared/",dev:"//static.3dwayfinder.com/shared/",enterprise:"//example.com/shared/",snapshot:"../../../shared/"},js:{live:"https://wayfinder-cdn.com/",dev:"//static.3dwayfinder.com",enterprise:"//example.com/js/",snapshot:"../../../"}};function l(t,e,i,n,a,o,s,r,c,u){"boolean"!=typeof s&&(c=r,r=s,s=!1);const l="function"==typeof i?i.options:i;let d;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,a&&(l.functional=!0)),n&&(l._scopeId=n),o?(d=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=d):e&&(d=s?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,r(t))}),d)if(l.functional){const t=l.render;l.render=function(e,i){return d.call(i),t(e,i)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,d):[d]}return i}var d=l({render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{directives:[{name:"touch",rawName:"v-touch:start",value:t.onTouch,expression:"onTouch",arg:"start"}],staticClass:"wf-app",class:{"wf-screensaving":t.screensaver}},[t._t("default")],2)},staticRenderFns:[]},undefined,{data:function(){return{lastClick:!1,landscape:!1,screensaver:!1,maxInActivity:30}},mounted:function(){var t=this;this.resize(),window.onresize=function(){t.resize()},this.$wayfinder.events.on("data-loaded",(function(){t.maxInActivity=t.$wayfinder.settings.getInt("kiosk.max-inactivity",30),console.log("maxInActivity",t.maxInActivity)})),this.lastClick=setTimeout((function(){t.$emit("screensaving"),t.screensaver=!0}),1e3*this.maxInActivity)},methods:{onTouch:function(t){var e=this;return clearTimeout(this.lastClick),this.$emit("touched",t),this.screensaver=!1,this.lastClick=setTimeout((function(){e.$emit("screensaving"),e.screensaver=!0,e.$wayfinder.restoreDefaultState(),e.$wayfinder.pause()}),1e3*this.maxInActivity),!1},resize:function(){var t=window.matchMedia("(orientation: landscape)"),e=window.matchMedia("(max-height: 1024px) and (orientation: portrait)"),i=window.matchMedia("(max-width: 1024px) and (orientation: landscape)");this.landscape=!!t&&t.matches;var n=!!e&&e.matches||!!i&&i.matches;this.$store.dispatch("wf/SET_LANDSCAPE",this.landscape),this.$store.dispatch("wf/SET_PORTRAIT",!this.landscape),this.$store.dispatch("wf/SET_MOBILE",n)},getURL:function(t,e){return u[e][t]},loadScript:function(t,e){var i=document.createElement("script");i.type="text/javascript",i.async=!0,document.getElementsByTagName("head")[0].appendChild(i),"function"==typeof e&&(i.onload=e,i.src=t)}}},undefined,false,undefined,!1,void 0,void 0,void 0);var h=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function f(t,e){Object.keys(t).forEach((function(i){return e(t[i],i)}))}function p(t){return null!==t&&"object"==typeof t}var g=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var i=t.state;this.state=("function"==typeof i?i():i)||{}},m={namespaced:{configurable:!0}};m.namespaced.get=function(){return!!this._rawModule.namespaced},g.prototype.addChild=function(t,e){this._children[t]=e},g.prototype.removeChild=function(t){delete this._children[t]},g.prototype.getChild=function(t){return this._children[t]},g.prototype.hasChild=function(t){return t in this._children},g.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},g.prototype.forEachChild=function(t){f(this._children,t)},g.prototype.forEachGetter=function(t){this._rawModule.getters&&f(this._rawModule.getters,t)},g.prototype.forEachAction=function(t){this._rawModule.actions&&f(this._rawModule.actions,t)},g.prototype.forEachMutation=function(t){this._rawModule.mutations&&f(this._rawModule.mutations,t)},Object.defineProperties(g.prototype,m);var v,w=function(t){this.register([],t,!1)};function y(t,e,i){if(e.update(i),i.modules)for(var n in i.modules){if(!e.getChild(n))return;y(t.concat(n),e.getChild(n),i.modules[n])}}w.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},w.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,i){return t+((e=e.getChild(i)).namespaced?i+"/":"")}),"")},w.prototype.update=function(t){y([],this.root,t)},w.prototype.register=function(t,e,i){var n=this;void 0===i&&(i=!0);var a=new g(e,i);0===t.length?this.root=a:this.get(t.slice(0,-1)).addChild(t[t.length-1],a);e.modules&&f(e.modules,(function(e,a){n.register(t.concat(a),e,i)}))},w.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),i=t[t.length-1],n=e.getChild(i);n&&n.runtime&&e.removeChild(i)},w.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),i=t[t.length-1];return!!e&&e.hasChild(i)};var b=function(t){var e=this;void 0===t&&(t={}),!v&&"undefined"!=typeof window&&window.Vue&&function(t){if(v&&t===v)return;!
2
2
  /*!
3
3
  * vuex v3.6.2
4
4
  * (c) 2021 Evan You
@@ -124,21 +124,13 @@ var urls$1 = {
124
124
  snapshot: "../../../"
125
125
  }
126
126
  };
127
-
128
- /* global WF_MAP_TYPE WayfinderAPI wayfinder*/
129
-
130
127
  var script$z = {
131
- props: {
132
- maxInActivity: {
133
- type: Number,
134
- default: 30
135
- }
136
- },
137
128
  data: function data() {
138
129
  return {
139
130
  lastClick: false,
140
131
  landscape: false,
141
- screensaver: false
132
+ screensaver: false,
133
+ maxInActivity: 30
142
134
  };
143
135
  },
144
136
  mounted: function mounted() {
@@ -147,6 +139,10 @@ var script$z = {
147
139
  window.onresize = function () {
148
140
  _this.resize();
149
141
  };
142
+ this.$wayfinder.events.on("data-loaded", function () {
143
+ _this.maxInActivity = _this.$wayfinder.settings.getInt("kiosk.max-inactivity", 30);
144
+ console.log('maxInActivity', _this.maxInActivity);
145
+ });
150
146
  this.lastClick = setTimeout(function () {
151
147
  // Start screensaver
152
148
  _this.$emit("screensaving");
@@ -295,7 +291,7 @@ var __vue_inject_styles__$z = undefined;
295
291
  /* scoped */
296
292
  var __vue_scope_id__$z = undefined;
297
293
  /* module identifier */
298
- var __vue_module_identifier__$z = "data-v-df872144";
294
+ var __vue_module_identifier__$z = "data-v-3676a053";
299
295
  /* functional template */
300
296
  var __vue_is_functional_template__$z = false;
301
297
  /* style inject */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3dwayfinder/wayfinder-vue-components",
3
- "version": "1.13.3",
3
+ "version": "1.13.4",
4
4
  "description": "VueJS UI components for 3D Wayfinder floor plans",
5
5
  "main": "dist/wayfinder-vue-components.ssr.js",
6
6
  "browser": "dist/wayfinder-vue-components.esm.js",
@@ -26,18 +26,13 @@ const urls = {
26
26
  }
27
27
  }
28
28
 
29
- /* global WF_MAP_TYPE WayfinderAPI wayfinder*/
30
-
31
-
32
29
  export default {
33
- props: {
34
- maxInActivity: { type: Number, default: 30 }
35
- },
36
30
  data () {
37
31
  return {
38
32
  lastClick: false,
39
33
  landscape: false,
40
34
  screensaver: false,
35
+ maxInActivity: 30
41
36
  }
42
37
  },
43
38
  mounted () {
@@ -47,6 +42,11 @@ export default {
47
42
  this.resize();
48
43
  }
49
44
 
45
+ this.$wayfinder.events.on("data-loaded", () => {
46
+ this.maxInActivity = this.$wayfinder.settings.getInt("kiosk.max-inactivity", 30);
47
+ console.log('maxInActivity', this.maxInActivity)
48
+ })
49
+
50
50
  this.lastClick = setTimeout(() => { // Start screensaver
51
51
  this.$emit("screensaving");
52
52
  this.screensaver = true;