waygo-maps 1.0.87 → 1.0.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -724,7 +724,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
724
724
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
725
725
 
726
726
  "use strict";
727
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ContentDetails: () => (/* binding */ ContentDetails),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _core_Component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Component */ \"./src/core/Component.js\");\n/* harmony import */ var _ContentPlacementHeader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ContentPlacementHeader */ \"./src/components/ContentPlacementView/ContentPlacementHeader.js\");\n/* harmony import */ var _ContextualLocationView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ContextualLocationView */ \"./src/components/ContentPlacementView/ContextualLocationView.js\");\n/* harmony import */ var _DetailsView__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DetailsView */ \"./src/components/ContentPlacementView/DetailsView.js\");\n/* harmony import */ var _ContentChildrenView__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ContentChildrenView */ \"./src/components/ContentPlacementView/ContentChildrenView.js\");\n/* harmony import */ var _assets_location_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../assets/location.svg */ \"./src/assets/location.svg\");\n/* harmony import */ var _assets_website_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../assets/website.svg */ \"./src/assets/website.svg\");\n/* harmony import */ var _assets_copyIcon_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../assets/copyIcon.svg */ \"./src/assets/copyIcon.svg\");\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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\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 _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\n\n\n\n\n\n\nvar ContentDetails = /*#__PURE__*/function (_Component) {\n function ContentDetails() {\n var _this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, ContentDetails);\n _this = _callSuper(this, ContentDetails, [options]);\n _this.contentPlacement = null;\n _this.element = document.createElement('div');\n _this.element.className = 'content-details';\n _this.header = document.createElement('div');\n _this.header.className = 'content-details-header';\n _this.contentPlacementHeader = null;\n _this.actionsView = document.createElement('div');\n _this.actionsView.className = 'content-details-section';\n _this.actionButtons = document.createElement('div');\n _this.actionButtons.className = 'content-details-action-buttons';\n _this.directionsButton = document.createElement('button');\n _this.directionsButton.className = 'content-details-directions-button';\n _this.directionsButton.textContent = 'Directions';\n _this.shareButton = document.createElement('button');\n _this.shareButton.className = 'content-details-share-button';\n _this.shareButton.textContent = 'Share';\n var copyIconElement = document.createElement('img');\n copyIconElement.src = _assets_copyIcon_svg__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n copyIconElement.className = 'copy-icon'; // Add a class for styling\n\n _this.shareButton.appendChild(copyIconElement);\n _this.locationButton = null;\n _this.websiteButton = null;\n _this.detailsView = null;\n _this.childrenComponents = [];\n return _this;\n }\n _inherits(ContentDetails, _Component);\n return _createClass(ContentDetails, [{\n key: \"_setupEventListeners\",\n value: function _setupEventListeners() {\n var _this2 = this;\n this.childrenComponents.forEach(function (childrenComponent) {\n childrenComponent.on('selectChildContentPlacement', _this2._handleSelectChildContentPlacement.bind(_this2));\n });\n this.directionsButton.addEventListener('click', this._handleDirectionsButtonSelect.bind(this));\n this.shareButton.addEventListener('click', this._handleShareButtonSelect.bind(this));\n }\n }, {\n key: \"_render\",\n value: function _render() {\n var _this3 = this;\n this.element.innerHTML = '';\n this.header.innerHTML = '';\n this.actionsView.innerHTML = '';\n\n // Header elements\n if (this.contentPlacementHeader) {\n this.header.appendChild(this.contentPlacementHeader.getElement());\n }\n this.actionButtons.appendChild(this.directionsButton);\n this.actionButtons.appendChild(this.shareButton);\n this.header.appendChild(this.actionButtons);\n if (this.locationButton) {\n this.actionsView.appendChild(this.locationButton.getElement());\n }\n if (this.websiteButton) {\n this.actionsView.appendChild(this.websiteButton.getElement());\n }\n this.header.appendChild(this.actionsView);\n this.element.appendChild(this.header);\n\n // Details view element\n if (this.detailsView) {\n this.detailsView.innerHTML = '';\n this.element.appendChild(this.detailsView.getElement());\n }\n\n // Children view elements\n this.childrenComponents.forEach(function (childrenComponent) {\n _this3.element.appendChild(childrenComponent.getElement());\n });\n }\n }, {\n key: \"_handleShareButtonSelect\",\n value: function _handleShareButtonSelect() {\n this.fire('selectShareButton', {\n placementId: this.contentPlacement.placement_id\n });\n }\n }, {\n key: \"showCopyPopup\",\n value: function showCopyPopup() {\n // Create popup element\n var popup = document.createElement('div');\n popup.className = 'copy-popup';\n popup.textContent = 'Copied to clipboard';\n\n // Position the popup below the share button\n var buttonRect = this.shareButton.getBoundingClientRect();\n var popupWidth = 120;\n popup.style.position = 'absolute';\n popup.style.left = \"\".concat(buttonRect.left + buttonRect.width / 2 - popupWidth / 2, \"px\"); // `${buttonRect.left}px`;\n popup.style.top = \"\".concat(buttonRect.bottom + window.scrollY, \"px\"); // Adjust for scroll position\n popup.style.zIndex = '9999'; // Ensure it appears on top of other components\n\n document.body.appendChild(popup);\n\n // Fade out and remove popup after 2 seconds\n setTimeout(function () {\n popup.style.opacity = '0';\n popup.style.transition = 'opacity 0.5s';\n setTimeout(function () {\n popup.remove();\n }, 500);\n }, 1500);\n }\n }, {\n key: \"_handleDirectionsButtonSelect\",\n value: function _handleDirectionsButtonSelect() {\n this.fire('selectDirectionsButton', {\n placementId: this.contentPlacement.placement_id\n });\n }\n }, {\n key: \"_handleBackArrowClick\",\n value: function _handleBackArrowClick() {\n this.fire('selectBackButton');\n }\n }, {\n key: \"_handleSelectChildContentPlacement\",\n value: function _handleSelectChildContentPlacement(data) {\n var placementId = data.placementId;\n this.fire('selectChildContentPlacement', {\n placementId: placementId\n });\n }\n }, {\n key: \"findViableAdditionalData\",\n value: function findViableAdditionalData(contentPlacement) {\n var data = contentPlacement.content.data;\n var keys = Object.keys(data);\n var titleKey = contentPlacement.content.title_key;\n var notAllowedKeys = [titleKey, 'Type', 'Feature', 'Features', 'Feature ID', 'feature_id', 'Website', 'Website URL', 'URL', 'LinkedIn', 'Files & media'];\n var viableData = {};\n keys.forEach(function (key) {\n var value = data[key];\n if (!notAllowedKeys.includes(key) && value !== null && value !== undefined && value !== \"\") {\n viableData[key] = value;\n }\n });\n return viableData;\n }\n }, {\n key: \"updateView\",\n value: function updateView(contentPlacement) {\n this.contentPlacement = contentPlacement;\n\n // Update the header\n this.contentPlacementHeader = new _ContentPlacementHeader__WEBPACK_IMPORTED_MODULE_1__[\"default\"](contentPlacement);\n\n // Update location and website buttons\n this.locationButton = new _ContextualLocationView__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_assets_location_svg__WEBPACK_IMPORTED_MODULE_5__[\"default\"], contentPlacement.contextual_location);\n var websiteUrl = contentPlacement.content.data['URL'] || contentPlacement.content.data['Website'] || contentPlacement.content.data['LinkedIn'] || contentPlacement.content.data['Website URL'];\n this.websiteButton = websiteUrl ? new _ContextualLocationView__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_assets_website_svg__WEBPACK_IMPORTED_MODULE_6__[\"default\"], websiteUrl, websiteUrl) : null;\n\n // Update details view with new viable data\n var viableAdditionalData = this.findViableAdditionalData(contentPlacement);\n var viableDataKeys = Object.keys(viableAdditionalData);\n this.detailsView = viableDataKeys.length > 0 ? new _DetailsView__WEBPACK_IMPORTED_MODULE_3__[\"default\"](viableAdditionalData) : null;\n\n // Update children components\n this.childrenComponents = [];\n for (var _i = 0, _Object$entries = Object.entries(contentPlacement.children); _i < _Object$entries.length; _i++) {\n var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),\n title = _Object$entries$_i[0],\n children = _Object$entries$_i[1];\n var childrenComponent = new _ContentChildrenView__WEBPACK_IMPORTED_MODULE_4__[\"default\"](title, children);\n this.childrenComponents.push(childrenComponent);\n }\n\n // Reset event listeners\n this._setupEventListeners();\n\n // Re-render the component with the new data\n this._render();\n }\n }, {\n key: \"getElement\",\n value: function getElement() {\n return this.element;\n }\n }]);\n}(_core_Component__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ContentDetails);\n\n//# sourceURL=webpack://waygomaps/./src/components/ContentPlacementView/ContentDetails.js?");
727
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ContentDetails: () => (/* binding */ ContentDetails),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _core_Component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../core/Component */ \"./src/core/Component.js\");\n/* harmony import */ var _ContentPlacementHeader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ContentPlacementHeader */ \"./src/components/ContentPlacementView/ContentPlacementHeader.js\");\n/* harmony import */ var _ContextualLocationView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ContextualLocationView */ \"./src/components/ContentPlacementView/ContextualLocationView.js\");\n/* harmony import */ var _DetailsView__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./DetailsView */ \"./src/components/ContentPlacementView/DetailsView.js\");\n/* harmony import */ var _ContentChildrenView__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ContentChildrenView */ \"./src/components/ContentPlacementView/ContentChildrenView.js\");\n/* harmony import */ var _assets_location_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../assets/location.svg */ \"./src/assets/location.svg\");\n/* harmony import */ var _assets_website_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../assets/website.svg */ \"./src/assets/website.svg\");\n/* harmony import */ var _assets_copyIcon_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../assets/copyIcon.svg */ \"./src/assets/copyIcon.svg\");\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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\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 _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\n\n\n\n\n\n\nvar ContentDetails = /*#__PURE__*/function (_Component) {\n function ContentDetails() {\n var _this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, ContentDetails);\n _this = _callSuper(this, ContentDetails, [options]);\n _this.contentPlacement = null;\n _this.element = document.createElement('div');\n _this.element.className = 'content-details';\n _this.header = document.createElement('div');\n _this.header.className = 'content-details-header';\n _this.contentPlacementHeader = null;\n _this.actionsView = document.createElement('div');\n _this.actionsView.className = 'content-details-section';\n _this.actionButtons = document.createElement('div');\n _this.actionButtons.className = 'content-details-action-buttons';\n _this.directionsButton = document.createElement('button');\n _this.directionsButton.className = 'content-details-directions-button';\n _this.directionsButton.textContent = 'Directions';\n _this.shareButton = document.createElement('button');\n _this.shareButton.className = 'content-details-share-button';\n _this.shareButton.textContent = 'Share';\n var copyIconElement = document.createElement('img');\n copyIconElement.src = _assets_copyIcon_svg__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n copyIconElement.className = 'copy-icon'; // Add a class for styling\n\n _this.shareButton.appendChild(copyIconElement);\n _this.locationButton = null;\n // this.websiteButton = null;\n _this.websiteButtons = [];\n _this.detailsView = null;\n _this.childrenComponents = [];\n return _this;\n }\n _inherits(ContentDetails, _Component);\n return _createClass(ContentDetails, [{\n key: \"_setupEventListeners\",\n value: function _setupEventListeners() {\n var _this2 = this;\n this.childrenComponents.forEach(function (childrenComponent) {\n childrenComponent.on('selectChildContentPlacement', _this2._handleSelectChildContentPlacement.bind(_this2));\n });\n this.directionsButton.addEventListener('click', this._handleDirectionsButtonSelect.bind(this));\n this.shareButton.addEventListener('click', this._handleShareButtonSelect.bind(this));\n }\n }, {\n key: \"_render\",\n value: function _render() {\n var _this3 = this;\n this.element.innerHTML = '';\n this.header.innerHTML = '';\n this.actionsView.innerHTML = '';\n\n // Header elements\n if (this.contentPlacementHeader) {\n this.header.appendChild(this.contentPlacementHeader.getElement());\n }\n this.actionButtons.appendChild(this.directionsButton);\n this.actionButtons.appendChild(this.shareButton);\n this.header.appendChild(this.actionButtons);\n if (this.locationButton) {\n this.actionsView.appendChild(this.locationButton.getElement());\n }\n\n // if (this.websiteButton) {\n // this.actionsView.appendChild(this.websiteButton.getElement());\n // }\n\n this.websiteButtons.forEach(function (websiteButton) {\n _this3.actionsView.appendChild(websiteButton.getElement());\n });\n this.header.appendChild(this.actionsView);\n this.element.appendChild(this.header);\n\n // Details view element\n if (this.detailsView) {\n this.detailsView.innerHTML = '';\n this.element.appendChild(this.detailsView.getElement());\n }\n\n // Children view elements\n this.childrenComponents.forEach(function (childrenComponent) {\n _this3.element.appendChild(childrenComponent.getElement());\n });\n }\n }, {\n key: \"_handleShareButtonSelect\",\n value: function _handleShareButtonSelect() {\n this.fire('selectShareButton', {\n placementId: this.contentPlacement.placement_id\n });\n }\n }, {\n key: \"showCopyPopup\",\n value: function showCopyPopup() {\n // Create popup element\n var popup = document.createElement('div');\n popup.className = 'copy-popup';\n popup.textContent = 'Copied to clipboard';\n\n // Position the popup below the share button\n var buttonRect = this.shareButton.getBoundingClientRect();\n var popupWidth = 120;\n popup.style.position = 'absolute';\n popup.style.left = \"\".concat(buttonRect.left + buttonRect.width / 2 - popupWidth / 2, \"px\"); // `${buttonRect.left}px`;\n popup.style.top = \"\".concat(buttonRect.bottom + window.scrollY, \"px\"); // Adjust for scroll position\n popup.style.zIndex = '9999'; // Ensure it appears on top of other components\n\n document.body.appendChild(popup);\n\n // Fade out and remove popup after 2 seconds\n setTimeout(function () {\n popup.style.opacity = '0';\n popup.style.transition = 'opacity 0.5s';\n setTimeout(function () {\n popup.remove();\n }, 500);\n }, 1500);\n }\n }, {\n key: \"_handleDirectionsButtonSelect\",\n value: function _handleDirectionsButtonSelect() {\n this.fire('selectDirectionsButton', {\n placementId: this.contentPlacement.placement_id\n });\n }\n }, {\n key: \"_handleBackArrowClick\",\n value: function _handleBackArrowClick() {\n this.fire('selectBackButton');\n }\n }, {\n key: \"_handleSelectChildContentPlacement\",\n value: function _handleSelectChildContentPlacement(data) {\n var placementId = data.placementId;\n this.fire('selectChildContentPlacement', {\n placementId: placementId\n });\n }\n }, {\n key: \"findViableAdditionalData\",\n value: function findViableAdditionalData(contentPlacement) {\n var data = contentPlacement.content.data;\n var keys = Object.keys(data);\n var titleKey = contentPlacement.content.title_key;\n var notAllowedKeys = [titleKey, 'Type', 'Feature', 'Features', 'Feature ID', 'feature_id', 'Website', 'SNS', 'Website URL', 'Networking Link', 'URL', 'LinkedIn', 'Files & media'];\n var viableData = {};\n keys.forEach(function (key) {\n var value = data[key];\n var trimValue = value.trim();\n var cleanValue = trimValue.replace(/[\\s\\r\\n]+/g, '');\n if (!notAllowedKeys.includes(key) && cleanValue !== null && cleanValue !== undefined && cleanValue !== \"\") {\n viableData[key] = cleanValue;\n }\n });\n return viableData;\n }\n }, {\n key: \"updateView\",\n value: function updateView(contentPlacement) {\n var _this4 = this;\n this.contentPlacement = contentPlacement;\n\n // Update the header\n this.contentPlacementHeader = new _ContentPlacementHeader__WEBPACK_IMPORTED_MODULE_1__[\"default\"](contentPlacement);\n\n // Update location and website buttons\n this.locationButton = new _ContextualLocationView__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_assets_location_svg__WEBPACK_IMPORTED_MODULE_5__[\"default\"], contentPlacement.contextual_location);\n // const websiteUrl = contentPlacement.content.data['URL'] || contentPlacement.content.data['Website'] || contentPlacement.content.data['LinkedIn'] || contentPlacement.content.data['Website URL'] || contentPlacement.content.data['SNS'];\n var urlFields = ['URL', 'Website', 'LinkedIn', 'Website URL', 'SNS', 'Networking Link'];\n urlFields.forEach(function (field) {\n var url = contentPlacement.content.data[field];\n if (url && url.trim() !== '') {\n var cleanUrl = url.replace(/[\\s\\r\\n]+/g, '');\n _this4.websiteButtons.push(new _ContextualLocationView__WEBPACK_IMPORTED_MODULE_2__[\"default\"](_assets_website_svg__WEBPACK_IMPORTED_MODULE_6__[\"default\"], cleanUrl, cleanUrl));\n }\n });\n // this.websiteButton = websiteUrl ? new ContextualLocationView(websiteIcon, websiteUrl, websiteUrl) : null;\n\n // Update details view with new viable data\n var viableAdditionalData = this.findViableAdditionalData(contentPlacement);\n var viableDataKeys = Object.keys(viableAdditionalData);\n this.detailsView = viableDataKeys.length > 0 ? new _DetailsView__WEBPACK_IMPORTED_MODULE_3__[\"default\"](viableAdditionalData) : null;\n\n // Update children components\n this.childrenComponents = [];\n for (var _i = 0, _Object$entries = Object.entries(contentPlacement.children); _i < _Object$entries.length; _i++) {\n var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),\n title = _Object$entries$_i[0],\n children = _Object$entries$_i[1];\n var childrenComponent = new _ContentChildrenView__WEBPACK_IMPORTED_MODULE_4__[\"default\"](title, children);\n this.childrenComponents.push(childrenComponent);\n }\n\n // Reset event listeners\n this._setupEventListeners();\n\n // Re-render the component with the new data\n this._render();\n }\n }, {\n key: \"getElement\",\n value: function getElement() {\n return this.element;\n }\n }]);\n}(_core_Component__WEBPACK_IMPORTED_MODULE_0__[\"default\"]);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ContentDetails);\n\n//# sourceURL=webpack://waygomaps/./src/components/ContentPlacementView/ContentDetails.js?");
728
728
 
729
729
  /***/ }),
730
730
 
package/dist/style.css CHANGED
@@ -183,7 +183,7 @@ body {
183
183
  flex: 0 0 auto;
184
184
  /* background-color: orange; */
185
185
  padding: 14px 14px 0px 14px;
186
- /* z-index: 7; */
186
+ z-index: 200;
187
187
  }
188
188
 
189
189
  .search-box-control-container.desktop-view {
@@ -446,7 +446,7 @@ body {
446
446
  /* background-color: orange; */
447
447
  overflow-y: auto;
448
448
  overflow-x: hidden;
449
- z-index: 100;
449
+ z-index: 2;
450
450
  }
451
451
 
452
452
  .content-details-control-container.desktop-view {
@@ -458,8 +458,8 @@ body {
458
458
  width: 400px;
459
459
  box-sizing: border-box;
460
460
 
461
- margin-top: 4px;
462
- padding: 8px 11px 0 11px;
461
+ margin-top: -12px;
462
+ padding: 19px 11px 0 11px;
463
463
  overflow-y: auto;
464
464
  }
465
465
 
@@ -597,7 +597,7 @@ body {
597
597
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15);
598
598
  padding: 0 14px 0 14px;
599
599
  /* background-color: orange; */
600
-
600
+ z-index: 201;
601
601
  }
602
602
 
603
603
  .search-bar-container.mobile-view {
@@ -644,6 +644,7 @@ body {
644
644
  box-sizing: border-box;
645
645
  /* background-color: orange; */
646
646
  /* z-index: 1; */
647
+ z-index: 202;
647
648
  }
648
649
 
649
650
  .search-bar.mobile-view {
@@ -699,7 +700,7 @@ body {
699
700
 
700
701
  .search-bar-suggestions-view {
701
702
  position: absolute;
702
- z-index: 100;
703
+ z-index: 203;
703
704
  border: none;
704
705
  outline: none;
705
706
  background-color: white;
@@ -731,6 +732,7 @@ body {
731
732
  font-weight: 500;
732
733
  color: #1e1e1e;
733
734
  cursor: pointer;
735
+ z-index: 204;
734
736
  /* background-color: orange; */
735
737
  }
736
738
 
@@ -1424,6 +1426,7 @@ body {
1424
1426
  font-weight: 400;
1425
1427
  font-size: 12px;
1426
1428
  color: #a19e9e;
1429
+ overflow: hidden;
1427
1430
  padding-bottom: 2px;
1428
1431
  height: fit-content;
1429
1432
  font-family: "Inter", "sans-serif";
@@ -1434,6 +1437,7 @@ body {
1434
1437
  font-size: 13px;
1435
1438
  font-weight: 400;
1436
1439
  font-family: "Inter", "sans-serif";
1440
+ overflow: hidden;
1437
1441
  height: fit-content;
1438
1442
  color: #1e1e1e;
1439
1443
  /* margin: 0 0 5px 0; */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waygo-maps",
3
- "version": "1.0.87",
3
+ "version": "1.0.88",
4
4
  "main": "dist/bundle.js",
5
5
  "files": [
6
6
  "dist/bundle.js",