waygo-maps 1.1.22 → 1.1.23

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 (2) hide show
  1. package/dist/bundle.js +1 -1
  2. package/package.json +1 -1
package/dist/bundle.js CHANGED
@@ -603,7 +603,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
603
603
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
604
604
 
605
605
  "use strict";
606
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _components_SliderBar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/SliderBar */ \"./src/components/SliderBar.js\");\n/* harmony import */ var _core_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/Control */ \"./src/core/Control.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(t, e) { if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e; if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\"); return _assertThisInitialized(t); }\nfunction _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _superPropGet(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }\nfunction _get() { return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }\nfunction _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }\nfunction _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }\nfunction _inherits(t, e) { if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e); }\nfunction _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }\n\n\nvar FloorSelectorControl = /*#__PURE__*/function (_Control) {\n function FloorSelectorControl() {\n var _this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, FloorSelectorControl);\n _this = _callSuper(this, FloorSelectorControl, [options]);\n _this.floorSelectorContainerName = 'floor-selector';\n _this.floorSelector = new _components_SliderBar__WEBPACK_IMPORTED_MODULE_0__[\"default\"]([], {\n container: 'floor-selector',\n allowsToggle: false\n });\n _this.map = null;\n return _this;\n }\n _inherits(FloorSelectorControl, _Control);\n return _createClass(FloorSelectorControl, [{\n key: \"onAdd\",\n value: function onAdd(map) {\n this.map = map;\n this.container = document.createElement('div');\n this.container.className = 'floor-selector-control-container';\n var element = this.floorSelector.getElement();\n this.container.appendChild(element);\n this.initializeEventListeners();\n this._attachResizeListener();\n this._initialize();\n\n // this.show();\n\n return this.container;\n }\n }, {\n key: \"onRemove\",\n value: function onRemove() {\n _superPropGet(FloorSelectorControl, \"onRemove\", this, 3)([]);\n }\n }, {\n key: \"initializeEventListeners\",\n value: function initializeEventListeners() {\n this.floorSelector.on(\"\".concat(this.floorSelectorContainerName, \":selectNew\"), this._handleFloorSelectorSelect.bind(this));\n this.map.on('state:default', this._handleDefaultState.bind(this));\n this.map.on('state:search', this._handleSearchState.bind(this));\n this.map.on('state:selectedContent', this._handleSelectedContentState.bind(this));\n this.map.on('state:directions', this._handleDirectionsState.bind(this));\n this.map.on('load', this._handleMapLoad.bind(this));\n this.map.on('floorChanged', this._handleFloorChange.bind(this));\n }\n }, {\n key: \"_handleMapLoad\",\n value: function _handleMapLoad(data) {\n var mapData = data.mapData;\n var floors = mapData.floors;\n var floorIndicators = [];\n floors.forEach(function (floor) {\n floorIndicators.push(floor.indicator);\n });\n if (floorIndicators.length < 2) {\n return;\n }\n this.floorSelector.updateItems(floorIndicators);\n this.floorSelector.selectButtonAtIndex(this.map.options.floor);\n\n // const mockFloorIndicators = ['P2', 'P1', 'L', '1', '2', '3', '4'];\n // const mockFloorIndicators = ['L1', 'L2'];\n // this.floorSelector.updateItems(mockFloorIndicators);\n }\n }, {\n key: \"_handleFloorChange\",\n value: function _handleFloorChange(data) {\n var floorIndex = data.floorIndex;\n if (this.floorSelector.getIndexOfSelectedButton() !== floorIndex) {\n this.floorSelector.selectButtonAtIndex(floorIndex);\n }\n }\n }, {\n key: \"_renderDesktopView\",\n value: function _renderDesktopView() {\n // TO RENDER DESKTOP VIEW\n var element = this.floorSelector.getElement();\n this.container.appendChild(element);\n this.container.classList.remove('mobile-view');\n this.container.classList.add('desktop-view');\n var newWidth = this.map.mapContainer.offsetWidth;\n this.floorSelector.setViewForDesktop();\n }\n }, {\n key: \"_renderMobileView\",\n value: function _renderMobileView() {\n var element = this.floorSelector.getElement();\n this.container.appendChild(element);\n var newWidth = this.map.mapContainer.offsetWidth;\n this.container.classList.remove('desktop-view');\n this.container.classList.add('mobile-view');\n this.floorSelector.setViewForMobile();\n }\n }, {\n key: \"_handleDefaultState\",\n value: function _handleDefaultState() {\n this.show();\n // this.floorSelector.deselectAll();\n }\n }, {\n key: \"_handleSelectedContentState\",\n value: function _handleSelectedContentState(_) {\n if (this.currentViewType === 'mobile') {\n this.hide();\n } else {\n this.show();\n }\n }\n }, {\n key: \"_handleDirectionsState\",\n value: function _handleDirectionsState(_) {\n this.hide();\n return;\n }\n\n // Have to update it for selecting floor and also for ____\n }, {\n key: \"_handleFloorSelectorSelect\",\n value: function _handleFloorSelectorSelect(data) {\n var query = data.query,\n index = data.index;\n var currentFloor = this.map.getCurrentFloor();\n if (index !== currentFloor) {\n this.map.updateFloor(index);\n } else {\n console.log('found index = floor, wouldve set the map again');\n }\n }\n }, {\n key: \"_handleSearchState\",\n value: function _handleSearchState(data) {\n var query = data.query,\n results = data.results;\n this.show();\n // this.floorSelector.deselectAllNotMatchingQuery(this.floorSelector.selectedValue);\n }\n }]);\n}(_core_Control__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FloorSelectorControl);\n\n// db.attachments_collection.updateOne({ _id: ObjectId(\"6748819a8db2dc30f9669793\") }, { $set: { \"criteria.0\": { host_key: \"name\", child_key: \"Room Number\", operator: \"==\", value: null } }});\n\n//# sourceURL=webpack://waygomaps/./src/Controls/FloorSelectorControl.js?");
606
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _components_SliderBar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/SliderBar */ \"./src/components/SliderBar.js\");\n/* harmony import */ var _core_Control__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/Control */ \"./src/core/Control.js\");\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(t, e) { if (e && (\"object\" == _typeof(e) || \"function\" == typeof e)) return e; if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\"); return _assertThisInitialized(t); }\nfunction _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); return e; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _superPropGet(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }\nfunction _get() { return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }\nfunction _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }\nfunction _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }\nfunction _inherits(t, e) { if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, \"prototype\", { writable: !1 }), e && _setPrototypeOf(t, e); }\nfunction _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }\n\n\nvar FloorSelectorControl = /*#__PURE__*/function (_Control) {\n function FloorSelectorControl() {\n var _this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, FloorSelectorControl);\n _this = _callSuper(this, FloorSelectorControl, [options]);\n _this.floorSelectorContainerName = 'floor-selector';\n _this.floorSelector = new _components_SliderBar__WEBPACK_IMPORTED_MODULE_0__[\"default\"]([], {\n container: 'floor-selector',\n allowsToggle: false\n });\n _this.map = null;\n return _this;\n }\n _inherits(FloorSelectorControl, _Control);\n return _createClass(FloorSelectorControl, [{\n key: \"onAdd\",\n value: function onAdd(map) {\n this.map = map;\n this.container = document.createElement('div');\n this.container.className = 'floor-selector-control-container';\n var element = this.floorSelector.getElement();\n this.container.appendChild(element);\n this.initializeEventListeners();\n this._attachResizeListener();\n this._initialize();\n\n // this.show();\n\n return this.container;\n }\n }, {\n key: \"onRemove\",\n value: function onRemove() {\n _superPropGet(FloorSelectorControl, \"onRemove\", this, 3)([]);\n }\n }, {\n key: \"initializeEventListeners\",\n value: function initializeEventListeners() {\n this.floorSelector.on(\"\".concat(this.floorSelectorContainerName, \":selectNew\"), this._handleFloorSelectorSelect.bind(this));\n this.map.on('state:default', this._handleDefaultState.bind(this));\n this.map.on('state:search', this._handleSearchState.bind(this));\n this.map.on('state:selectedContent', this._handleSelectedContentState.bind(this));\n this.map.on('state:directions', this._handleDirectionsState.bind(this));\n this.map.on('load', this._handleMapLoad.bind(this));\n this.map.on('floorChanged', this._handleFloorChange.bind(this));\n }\n }, {\n key: \"_handleMapLoad\",\n value: function _handleMapLoad(data) {\n var mapData = data.mapData;\n var floors = mapData.floors;\n var floorIndicators = [];\n floors.forEach(function (floor) {\n floorIndicators.push(floor.indicator);\n });\n if (floorIndicators.length < 2) {\n return;\n }\n this.floorSelector.updateItems(floorIndicators);\n this.floorSelector.selectButtonAtIndex(this.map.options.floor);\n\n // const mockFloorIndicators = ['P2', 'P1', 'L', '1', '2', '3', '4'];\n // const mockFloorIndicators = ['L1', 'L2'];\n // this.floorSelector.updateItems(mockFloorIndicators);\n }\n }, {\n key: \"_handleFloorChange\",\n value: function _handleFloorChange(data) {\n var floorIndex = data.floorIndex;\n console.log(\"FLOOR INDEX HEREEEE\", floorIndex);\n if (this.floorSelector.getIndexOfSelectedButton() !== floorIndex) {\n this.floorSelector.selectButtonAtIndex(floorIndex);\n }\n }\n }, {\n key: \"_renderDesktopView\",\n value: function _renderDesktopView() {\n // TO RENDER DESKTOP VIEW\n var element = this.floorSelector.getElement();\n this.container.appendChild(element);\n this.container.classList.remove('mobile-view');\n this.container.classList.add('desktop-view');\n var newWidth = this.map.mapContainer.offsetWidth;\n this.floorSelector.setViewForDesktop();\n }\n }, {\n key: \"_renderMobileView\",\n value: function _renderMobileView() {\n var element = this.floorSelector.getElement();\n this.container.appendChild(element);\n var newWidth = this.map.mapContainer.offsetWidth;\n this.container.classList.remove('desktop-view');\n this.container.classList.add('mobile-view');\n this.floorSelector.setViewForMobile();\n }\n }, {\n key: \"_handleDefaultState\",\n value: function _handleDefaultState() {\n this.show();\n // this.floorSelector.deselectAll();\n }\n }, {\n key: \"_handleSelectedContentState\",\n value: function _handleSelectedContentState(_) {\n if (this.currentViewType === 'mobile') {\n this.hide();\n } else {\n this.show();\n }\n }\n }, {\n key: \"_handleDirectionsState\",\n value: function _handleDirectionsState(_) {\n this.hide();\n return;\n }\n\n // Have to update it for selecting floor and also for ____\n }, {\n key: \"_handleFloorSelectorSelect\",\n value: function _handleFloorSelectorSelect(data) {\n var query = data.query,\n index = data.index;\n var currentFloor = this.map.getCurrentFloor();\n if (index !== currentFloor) {\n this.map.updateFloor(index);\n } else {\n console.log('found index = floor, wouldve set the map again');\n }\n }\n }, {\n key: \"_handleSearchState\",\n value: function _handleSearchState(data) {\n var query = data.query,\n results = data.results;\n this.show();\n // this.floorSelector.deselectAllNotMatchingQuery(this.floorSelector.selectedValue);\n }\n }]);\n}(_core_Control__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FloorSelectorControl);\n\n// db.attachments_collection.updateOne({ _id: ObjectId(\"6748819a8db2dc30f9669793\") }, { $set: { \"criteria.0\": { host_key: \"name\", child_key: \"Room Number\", operator: \"==\", value: null } }});\n\n//# sourceURL=webpack://waygomaps/./src/Controls/FloorSelectorControl.js?");
607
607
 
608
608
  /***/ }),
609
609
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waygo-maps",
3
- "version": "1.1.22",
3
+ "version": "1.1.23",
4
4
  "main": "dist/bundle.js",
5
5
  "files": [
6
6
  "dist/bundle.js",