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