diff --git a/docs/core-data-PlaceMarker-stories.42451253.iframe.bundle.js b/docs/core-data-PlaceMarker-stories.42451253.iframe.bundle.js new file mode 100644 index 00000000..770184d2 --- /dev/null +++ b/docs/core-data-PlaceMarker-stories.42451253.iframe.bundle.js @@ -0,0 +1 @@ +(self.webpackChunk_performant_software_storybook=self.webpackChunk_performant_software_storybook||[]).push([[2285],{"./src/core-data/PlaceMarker.stories.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,__namedExportsOrder:()=>__namedExportsOrder,default:()=>PlaceMarker_stories});var peripleo_maplibre_es=__webpack_require__("../../node_modules/@peripleo/maplibre/dist/peripleo-maplibre.es.js"),peripleo_es=__webpack_require__("../../node_modules/@peripleo/peripleo/dist/peripleo.es.js"),react=__webpack_require__("../../node_modules/react/index.js"),MapStyles=__webpack_require__("./src/data/MapStyles.json"),build=__webpack_require__("../geospatial/build/index.js"),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js");function _typeof(o){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)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i \n \n \n \n \n \n \n ",...Default.parameters?.docs?.source}}};const __namedExportsOrder=["Default"]},"../geospatial/build/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{function _typeof(o){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)}!function(){"use strict";var e={743:function _(e,t,r){r.d(t,{Z:function Z(){return l}});var n=r(705),o=r.n(n),a=r(497),i=r(372),l=(0,a.forwardRef)((function(e,t){var r=(0,i.useControl)((function(){return new(o())(e)}),(function(t){var r=t.map;r.on("draw.create",e.onCreate),r.on("draw.update",e.onUpdate),r.on("draw.delete",e.onDelete)}),(function(t){var r=t.map;r.off("draw.create",e.onCreate),r.off("draw.update",e.onUpdate),r.off("draw.delete",e.onDelete)}),{position:e.position});return(0,a.useImperativeHandle)(t,(function(){return r}),[r]),null}))},334:function _(e,t,r){r.d(t,{Z:function Z(){return m}});var n=r(497),o=r.n(n),a=r(372),i=r(681),l=r.n(i);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);rt&&e.names[t]}),[e.names]),w=(0,n.useCallback)((function(e){return u().includes(m,e)}),[m]),O=(0,n.useMemo)((function(){return n.Children.toArray(e.children)}),[e.children]),j=(0,n.useMemo)((function(){return u().filter(O,(function(e,t){return w(t)}))}),[O,w]),E=(0,n.useCallback)((function(e){var t,r;t=w(e)?u().without(m,e):[].concat(function(e){if(Array.isArray(e))return p(e)}(r=m)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||s(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e]),d(t)}),[w,m]);return(0,n.useEffect)((function(){d(u().times(O.length,(function(e){return e})))}),[]),(0,n.useEffect)((function(){var e=g.current;if(e&&e._canvas){var t=g.current._canvas.offsetHeight;l(void 0===t?0:t)}}),[g.current]),u().isEmpty(O)?null:o().createElement(o().Fragment,null,o().createElement(c.Z,{mapRef:g,position:e.position},o().createElement("button",{className:"mapbox-gl-draw_ctrl-draw-btn layer-button",onClick:function onClick(){return h((function(e){return!e}))},type:"button"},o().createElement(a.BsStack,{size:"1.25em"})),v&&o().createElement("div",{className:"layer-menu",style:{maxHeight:"calc(".concat(r,"px - ").concat(30,"px)")}},o().createElement("div",{className:"menu"},u().map(O,(function(e,t){return o().createElement("div",{"aria-selected":w(t),className:"option",role:"option",onClick:function onClick(){return E(t)},onKeyDown:function onKeyDown(){return E(t)},tabIndex:t},o().createElement("div",{className:"checkmark-container"},w(t)&&o().createElement(i.IoCheckmarkOutline,{size:"1em"})),S(t))}))))),j)};y.defaultProps={position:"top-left"};var m=y},698:function _(e,t,r){r.d(t,{Z:function Z(){return u}});var n=r(523),o=r(497),a=r.n(o),i=r(231),l=function l(e){return(0,o.useEffect)((function(){if(e.map&&e.data){var t=i.Z.getBoundingBox(e.data,e.buffer);e.map.fitBounds(t)}}),[e.buffer,e.data,e.map]),a().createElement(a().Fragment,null,a().createElement(n.PulsingMarkerLayer,{id:"current",data:e.data}),a().createElement(n.MixedGeoJSONLayer,{id:"current",data:e.data,fillStyle:e.fillStyle,strokeStyle:e.strokeStyle,pointStyle:e.pointStyle}))};l.defaultProps={buffer:2,fillStyle:{type:"fill",paint:{"fill-color":"#ff623b","fill-opacity":.2}},pointStyle:{type:"circle",paint:{"circle-radius":["interpolate",["linear"],["number",["get","point_count"],1],0,4,10,14],"circle-stroke-width":1,"circle-color":["case",["boolean",["feature-state","hover"],!1],"#3b62ff","#ff623b"],"circle-stroke-color":"#8d260c"}},strokeStyle:{type:"line",paint:{"line-color":"#ff623b","line-opacity":.6}}};var u=l},325:function _(e,t,r){r.d(t,{Z:function Z(){return y}}),r(203);var n=r(497),o=__webpack_require__("../../node_modules/react-dom/index.js"),a=r(372),i=r(681),l=r.n(i);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:null,o=(0,n.bbox)(e),a=(0,n.bboxPolygon)(o);return t=r?(0,n.buffer)(a,r,{units:"miles"}):a,(0,n.bbox)(t)}}},705:function _(e){e.exports=__webpack_require__("../../node_modules/@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.js")},523:function _(e){e.exports=__webpack_require__("../../node_modules/@peripleo/maplibre/dist/peripleo-maplibre.cjs.js")},799:function _(e){e.exports=__webpack_require__("../../node_modules/@turf/turf/dist/js/index.js")},203:function _(e){e.exports=__webpack_require__("../../node_modules/maplibre-gl/dist/maplibre-gl.js")},372:function _(e){e.exports=__webpack_require__("../../node_modules/react-map-gl/dist/esm/index.js")},681:function _(e){e.exports=__webpack_require__("../../node_modules/underscore/modules/index-all.js")},497:function _(e){e.exports=__webpack_require__("../../node_modules/react/index.js")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(function(){r.r(n),r.d(n,{DrawControl:function DrawControl(){return e.Z},GeoJsonLayer:function GeoJsonLayer(){return t.Z},LayerMenu:function LayerMenu(){return o.Z},LocationMarker:function LocationMarker(){return a.Z},Map:function Map(){return c.Z},MapControl:function MapControl(){return i.Z},MapDraw:function MapDraw(){return l.Z},RasterLayer:function RasterLayer(){return u.Z}});var e=r(743),t=r(334),o=r(181),a=r(698),i=r(325),l=r(944),u=r(990),c=r(231),f=r(523),s={},_loop=function _loop(_e){["default","DrawControl","GeoJsonLayer","LayerMenu","LocationMarker","MapControl","MapDraw","RasterLayer","Map"].indexOf(_e)<0&&(s[_e]=function(){return f[_e]})};for(var _e in f)_loop(_e);r.d(n,s)})(),module.exports=n}()},"./src/data/MapStyles.json":module=>{"use strict";module.exports=JSON.parse('{"version":8,"sources":{"osm":{"type":"raster","tiles":["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"],"tileSize":256,"attribution":"© OpenStreetMap Contributors","maxzoom":19}},"layers":[{"id":"osm","type":"raster","source":"osm"}]}')}}]); \ No newline at end of file diff --git a/docs/core-data-PlaceMarker-stories.997a5c9c.iframe.bundle.js b/docs/core-data-PlaceMarker-stories.997a5c9c.iframe.bundle.js deleted file mode 100644 index 3e5c84db..00000000 --- a/docs/core-data-PlaceMarker-stories.997a5c9c.iframe.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_performant_software_storybook=self.webpackChunk_performant_software_storybook||[]).push([[2285],{"./src/core-data/PlaceMarker.stories.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,__namedExportsOrder:()=>__namedExportsOrder,default:()=>PlaceMarker_stories});var peripleo_maplibre_es=__webpack_require__("../../node_modules/@peripleo/maplibre/dist/peripleo-maplibre.es.js"),peripleo_es=__webpack_require__("../../node_modules/@peripleo/peripleo/dist/peripleo.es.js"),react=__webpack_require__("../../node_modules/react/index.js"),MapStyles=__webpack_require__("./src/data/MapStyles.json"),build=__webpack_require__("../geospatial/build/index.js"),jsx_runtime=__webpack_require__("../../node_modules/react/jsx-runtime.js");function _typeof(o){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)}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;rarr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i \n \n \n \n \n \n \n ",...Default.parameters?.docs?.source}}};const __namedExportsOrder=["Default"]},"../geospatial/build/index.js":(module,__unused_webpack_exports,__webpack_require__)=>{function _typeof(o){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)}!function(){"use strict";var e={n:function n(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function d(t,r){for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function r(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{DrawControl:function DrawControl(){return u},GeoJsonLayer:function GeoJsonLayer(){return v},LayerMenu:function LayerMenu(){return L},LocationMarker:function LocationMarker(){return q},Map:function Map(){return D},MapControl:function MapControl(){return _},MapDraw:function MapDraw(){return G},RasterLayer:function RasterLayer(){return J}});var r=__webpack_require__("../../node_modules/@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.js"),n=e.n(r),o=__webpack_require__("../../node_modules/react/index.js"),a=e.n(o),i=__webpack_require__("../../node_modules/react-map-gl/dist/esm/index.js"),l=e.n(i),u=(0,o.forwardRef)((function(e,t){var r=(0,i.useControl)((function(){return new(n())(e)}),(function(t){var r=t.map;r.on("draw.create",e.onCreate),r.on("draw.update",e.onUpdate),r.on("draw.delete",e.onDelete)}),(function(t){var r=t.map;r.off("draw.create",e.onCreate),r.off("draw.update",e.onUpdate),r.off("draw.delete",e.onDelete)}),{position:e.position});return(0,o.useImperativeHandle)(t,(function(){return r}),[r]),null})),c=__webpack_require__("../../node_modules/underscore/modules/index-all.js"),f=e.n(c);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);rt&&e.names[t]}),[e.names]),b=(0,o.useCallback)((function(e){return f().includes(l,e)}),[l]),d=(0,o.useMemo)((function(){return o.Children.toArray(e.children)}),[e.children]),v=(0,o.useMemo)((function(){return f().filter(d,(function(e,t){return b(t)}))}),[d,b]),S=(0,o.useCallback)((function(e){var t,r;t=b(e)?f().without(l,e):[].concat(function(e){if(Array.isArray(e))return M(e)}(r=l)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||x(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e]),u(t)}),[b,l]);return(0,o.useEffect)((function(){u(f().times(d.length,(function(e){return e})))}),[]),(0,o.useEffect)((function(){var e=m.current;if(e&&e._canvas){var t=m.current._canvas.offsetHeight;n(void 0===t?0:t)}}),[m.current]),f().isEmpty(d)?null:a().createElement(a().Fragment,null,a().createElement(_,{mapRef:m,position:e.position},a().createElement("button",{className:"mapbox-gl-draw_ctrl-draw-btn layer-button",onClick:function onClick(){return y((function(e){return!e}))},type:"button"},a().createElement(h.BsStack,{size:"1.25em"})),s&&a().createElement("div",{className:"layer-menu",style:{maxHeight:"calc(".concat(r,"px - ").concat(30,"px)")}},a().createElement("div",{className:"menu"},f().map(d,(function(e,t){return a().createElement("div",{"aria-selected":b(t),className:"option",role:"option",onClick:function onClick(){return S(t)},onKeyDown:function onKeyDown(){return S(t)},tabIndex:t},a().createElement("div",{className:"checkmark-container"},b(t)&&a().createElement(g.IoCheckmarkOutline,{size:"1em"})),p(t))}))))),v)};I.defaultProps={position:"top-left"};var L=I,R=__webpack_require__("../../node_modules/@peripleo/maplibre/dist/peripleo-maplibre.cjs.js"),z=__webpack_require__("../../node_modules/@turf/turf/dist/js/index.js"),D={getBoundingBox:function getBoundingBox(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=(0,z.bbox)(e),o=(0,z.bboxPolygon)(n);return t=r?(0,z.buffer)(o,r,{units:"miles"}):o,(0,z.bbox)(t)}},T=function T(e){return(0,o.useEffect)((function(){if(e.map&&e.data){var t=D.getBoundingBox(e.data,e.buffer);e.map.fitBounds(t)}}),[e.buffer,e.data,e.map]),a().createElement(a().Fragment,null,a().createElement(R.PulsingMarkerLayer,{id:"current",data:e.data}),a().createElement(R.MixedGeoJSONLayer,{id:"current",data:e.data,fillStyle:e.fillStyle,strokeStyle:e.strokeStyle,pointStyle:e.pointStyle}))};T.defaultProps={buffer:2,fillStyle:{type:"fill",paint:{"fill-color":"#ff623b","fill-opacity":.2}},pointStyle:{type:"circle",paint:{"circle-radius":["interpolate",["linear"],["number",["get","point_count"],1],0,4,10,14],"circle-stroke-width":1,"circle-color":["case",["boolean",["feature-state","hover"],!1],"#3b62ff","#ff623b"],"circle-stroke-color":"#8d260c"}},strokeStyle:{type:"line",paint:{"line-color":"#ff623b","line-opacity":.6}}};var q=T;function B(e){return B="function"==typeof Symbol&&"symbol"==_typeof(Symbol.iterator)?function(e){return _typeof(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof(e)},B(e)}function N(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,l=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$(e,t):void 0}}(e,t)||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 $(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";module.exports=JSON.parse('{"version":8,"sources":{"osm":{"type":"raster","tiles":["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"],"tileSize":256,"attribution":"© OpenStreetMap Contributors","maxzoom":19}},"layers":[{"id":"osm","type":"raster","source":"osm"}]}')}}]); \ No newline at end of file diff --git a/docs/iframe.html b/docs/iframe.html index 3fa85758..f2c4d3ab 100644 --- a/docs/iframe.html +++ b/docs/iframe.html @@ -348,7 +348,7 @@ window['DOCS_OPTIONS'] = {"defaultName":"Docs","autodocs":true};