naksha-components-react 4.6.1-beta.8 → 5.0.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naksha-components-react",
3
- "version": "4.6.1-beta.8",
3
+ "version": "5.0.0",
4
4
  "author": "harshzalavadiya",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -23,9 +23,9 @@
23
23
  "@biodiv-platform/eslint-preset": "4.4.9",
24
24
  "@biodiv-platform/naksha-gmaps-draw": "4.5.3",
25
25
  "@biodiv-platform/naksha-gmaps-view": "4.4.9",
26
- "@biodiv-platform/naksha-mapbox-draw": "4.4.9",
27
- "@biodiv-platform/naksha-mapbox-list": "4.5.3-beta.7",
28
- "@biodiv-platform/naksha-mapbox-view": "4.4.9",
26
+ "@biodiv-platform/naksha-maplibre-draw": "5.0.10",
27
+ "@biodiv-platform/naksha-maplibre-layers": "5.0.3",
28
+ "@biodiv-platform/naksha-maplibre-view": "5.0.3",
29
29
  "@biodiv-platform/tsconfig": "4.4.9"
30
30
  },
31
31
  "devDependencies": {
package/dist/esm/index.js DELETED
@@ -1 +0,0 @@
1
- import{createContext as c,useContext as u}from"react";import{jsx as l}from"react/jsx-runtime";import{useEffect as g,useState as f}from"react";var y=["formatted_address","geometry","name"],b={DEFAULT:["drawing","places"],AUTOCOMPLETE:["drawing","places"]},v={"CC-BY":"//creativecommons.org/licenses/by/4.0","BY-SA":"//creativecommons.org/licenses/by-sa/4.0","BY-ND":"//creativecommons.org/licenses/by-nd/4.0","BY-NC":"//creativecommons.org/licenses/by-nc/4.0","BY-NC-SA":"//creativecommons.org/licenses/by-nc-sa/4.0","BY-NC-ND":"//creativecommons.org/licenses/by-nc-nd/4.0"},i=(e=>(e.MAP_STREETS="0",e.MAP_SATELLITE="1",e.MAP_DARK="2",e.MAP_OSM="3",e))(i||{}),m={latitude:22.5,longitude:79,zoom:3,bearing:0,pitch:0},p=[{text:"Streets",key:"0",style:"mapbox://styles/biodiv/cku4aoj5k1g9h17o5r3tjsntn"},{text:"Satellite",key:"1",style:"mapbox://styles/biodiv/cku49ca8q1esz18o7gxfjmh5r"},{text:"Dark",key:"2",style:"mapbox://styles/biodiv/cku4a35961fgo17mykoq76se1"},{text:"OSM",key:"3",style:"https://unpkg.com/maplibre-gl-styles@0.0.1/styles/osm-mapnik/v8/india.json"}],x=["admin-0-boundary","admin-1-boundary","admin-0-boundary-disputed","admin-1-boundary-bg","admin-0-boundary-bg"],d=(e,t)=>(t.split(".").forEach(function(r){!e||(e=e[r])}),e),s=c({}),T=({localeStrings:e,lang:t="en",children:r})=>{let o=n=>{let a=d(e[t],n);return a||console.warn(`Translation '${n}' for locale '${t}' not found.`),a};return l(s.Provider,{value:{t:o},children:r})};function A(){return u(s)}function k(e,t){let[r,o]=f(e);return g(()=>{let n=setTimeout(()=>{o(e)},t);return()=>{clearTimeout(n)}},[e,t]),r}var P=(e=m,t=1)=>({center:{lat:e.latitude,lng:e.longitude},zoom:e.zoom+t}),D=e=>{let t=e.getFullYear().toString(),r=(e.getMonth()+101).toString().substring(1),o=(e.getDate()+100).toString().substring(1);return`${t}-${r}-${o}`};export*from"@biodiv-platform/naksha-gmaps-draw";export*from"@biodiv-platform/naksha-gmaps-view";export*from"@biodiv-platform/naksha-mapbox-draw";export*from"@biodiv-platform/naksha-mapbox-list";export*from"@biodiv-platform/naksha-mapbox-view";export{y as GMAPS_AUTOCOMPLETE_FIELDS,b as GMAPS_LIBRARIES,v as LICENSES,i as MapStyles,T as TranslationProvider,x as adminBoundries,p as defaultMapStyles,m as defaultViewState,D as formatDate,d as getByPath,P as mapboxToGmapsViewState,k as useDebounce,A as useT};
package/dist/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- export * from '@biodiv-platform/naksha-commons';
2
- export * from '@biodiv-platform/naksha-gmaps-draw';
3
- export * from '@biodiv-platform/naksha-gmaps-view';
4
- export * from '@biodiv-platform/naksha-mapbox-draw';
5
- export * from '@biodiv-platform/naksha-mapbox-list';
6
- export * from '@biodiv-platform/naksha-mapbox-view';
package/dist/index.js DELETED
@@ -1 +0,0 @@
1
- "use strict";var u=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var S=(r,o)=>{for(var n in o)u(r,n,{get:o[n],enumerable:!0})},c=(r,o,n,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of p(o))!x.call(r,a)&&a!==n&&u(r,a,{get:()=>o[a],enumerable:!(s=v(o,a))||s.enumerable});return r},t=(r,o,n)=>(c(r,o,"default"),n&&c(n,o,"default"));var E=r=>c(u({},"__esModule",{value:!0}),r);var e={};S(e,{GMAPS_AUTOCOMPLETE_FIELDS:()=>T,GMAPS_LIBRARIES:()=>A,LICENSES:()=>C,MapStyles:()=>l,TranslationProvider:()=>D,adminBoundries:()=>P,defaultMapStyles:()=>k,defaultViewState:()=>g,formatDate:()=>L,getByPath:()=>f,mapboxToGmapsViewState:()=>M,useDebounce:()=>B,useT:()=>h});module.exports=E(e);var i=require("react"),y=require("react/jsx-runtime"),m=require("react"),T=["formatted_address","geometry","name"],A={DEFAULT:["drawing","places"],AUTOCOMPLETE:["drawing","places"]},C={"CC-BY":"//creativecommons.org/licenses/by/4.0","BY-SA":"//creativecommons.org/licenses/by-sa/4.0","BY-ND":"//creativecommons.org/licenses/by-nd/4.0","BY-NC":"//creativecommons.org/licenses/by-nc/4.0","BY-NC-SA":"//creativecommons.org/licenses/by-nc-sa/4.0","BY-NC-ND":"//creativecommons.org/licenses/by-nc-nd/4.0"},l=(r=>(r.MAP_STREETS="0",r.MAP_SATELLITE="1",r.MAP_DARK="2",r.MAP_OSM="3",r))(l||{}),g={latitude:22.5,longitude:79,zoom:3,bearing:0,pitch:0},k=[{text:"Streets",key:"0",style:"mapbox://styles/biodiv/cku4aoj5k1g9h17o5r3tjsntn"},{text:"Satellite",key:"1",style:"mapbox://styles/biodiv/cku49ca8q1esz18o7gxfjmh5r"},{text:"Dark",key:"2",style:"mapbox://styles/biodiv/cku4a35961fgo17mykoq76se1"},{text:"OSM",key:"3",style:"https://unpkg.com/maplibre-gl-styles@0.0.1/styles/osm-mapnik/v8/india.json"}],P=["admin-0-boundary","admin-1-boundary","admin-0-boundary-disputed","admin-1-boundary-bg","admin-0-boundary-bg"],f=(r,o)=>(o.split(".").forEach(function(n){!r||(r=r[n])}),r),b=(0,i.createContext)({}),D=({localeStrings:r,lang:o="en",children:n})=>{let s=a=>{let d=f(r[o],a);return d||console.warn(`Translation '${a}' for locale '${o}' not found.`),d};return(0,y.jsx)(b.Provider,{value:{t:s},children:n})};function h(){return(0,i.useContext)(b)}function B(r,o){let[n,s]=(0,m.useState)(r);return(0,m.useEffect)(()=>{let a=setTimeout(()=>{s(r)},o);return()=>{clearTimeout(a)}},[r,o]),n}var M=(r=g,o=1)=>({center:{lat:r.latitude,lng:r.longitude},zoom:r.zoom+o}),L=r=>{let o=r.getFullYear().toString(),n=(r.getMonth()+101).toString().substring(1),s=(r.getDate()+100).toString().substring(1);return`${o}-${n}-${s}`};t(e,require("@biodiv-platform/naksha-gmaps-draw"),module.exports);t(e,require("@biodiv-platform/naksha-gmaps-view"),module.exports);t(e,require("@biodiv-platform/naksha-mapbox-draw"),module.exports);t(e,require("@biodiv-platform/naksha-mapbox-list"),module.exports);t(e,require("@biodiv-platform/naksha-mapbox-view"),module.exports);0&&(module.exports={GMAPS_AUTOCOMPLETE_FIELDS,GMAPS_LIBRARIES,LICENSES,MapStyles,TranslationProvider,adminBoundries,defaultMapStyles,defaultViewState,formatDate,getByPath,mapboxToGmapsViewState,useDebounce,useT});