naksha-components-react 3.13.0 → 4.0.2
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/README.md +1 -1
- package/dist/esm/chunk-Y5JLKQX5.js +1 -0
- package/dist/esm/index.js +1 -8
- package/dist/esm/mapbox-gl-3PNS6OSM.js +960 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -0
- package/package.json +25 -38
- package/dist/cjs/index.js +0 -60
- package/dist/cjs/index.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/types/index.d.ts +0 -7
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var P=Object.create;var u=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var d=e=>u(e,"__esModule",{value:!0});var k=(e,a)=>()=>(e&&(a=e(e=0)),a);var L=(e,a)=>()=>(a||e((a={exports:{}}).exports,a),a.exports);var t=(e,a,o,s)=>{if(a&&typeof a=="object"||typeof a=="function")for(let n of A(a))!_.call(e,n)&&(o||n!=="default")&&u(e,n,{get:()=>a[n],enumerable:!(s=T(a,n))||s.enumerable});return e},D=(e,a)=>t(d(u(e!=null?P(O(e)):{},"default",!a&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),h=(e=>(a,o)=>e&&e.get(a)||(o=t(d({}),a,1),e&&e.set(a,o),o))(typeof WeakMap!="undefined"?new WeakMap:0);var i=k(()=>{});var x=L((Z,E)=>{i();var B=Object.create,l=Object.defineProperty,C=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,I=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty,f=e=>l(e,"__esModule",{value:!0}),U=(e,a)=>{for(var o in a)l(e,o,{get:a[o],enumerable:!0})},y=(e,a,o,s)=>{if(a&&typeof a=="object"||typeof a=="function")for(let n of j(a))!R.call(e,n)&&(o||n!=="default")&&l(e,n,{get:()=>a[n],enumerable:!(s=C(a,n))||s.enumerable});return e},N=(e,a)=>y(f(l(e!=null?B(I(e)):{},"default",!a&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),Y=(e=>(a,o)=>e&&e.get(a)||(o=y(f({}),a,1),e&&e.set(a,o),o))(typeof WeakMap<"u"?new WeakMap:0),b={};U(b,{GMAPS_AUTOCOMPLETE_FIELDS:()=>G,GMAPS_LIBRARIES:()=>$,LICENSES:()=>q,MapStyles:()=>g,TranslationProvider:()=>V,adminBoundries:()=>F,defaultMapStyles:()=>z,defaultViewState:()=>S,formatDate:()=>J,getByPath:()=>v,mapboxToGmapsViewState:()=>H,useDebounce:()=>K,useT:()=>W});var G=["formatted_address","geometry","name"],$={DEFAULT:["drawing","places"],AUTOCOMPLETE:["drawing","places"]},q={"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"},g=(e=>(e.MAP_STREETS="0",e.MAP_SATELLITE="1",e.MAP_DARK="2",e.MAP_OSM="3",e))(g||{}),S={latitude:22.5,longitude:79,zoom:3,bearing:0,pitch:0},z=[{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"}],F=["admin-0-boundary","admin-1-boundary","admin-0-boundary-disputed","admin-1-boundary-bg","admin-0-boundary-bg"],c=N(require("react")),v=(e,a)=>(a.split(".").forEach(function(o){!e||(e=e[o])}),e),M=(0,c.createContext)({}),V=({localeStrings:e,lang:a="en",children:o})=>{let s=n=>{let m=v(e[a],n);return m||console.warn(`Translation '${n}' for locale '${a}' not found.`),m};return c.default.createElement(M.Provider,{value:{t:s}},o)};function W(){return(0,c.useContext)(M)}var p=require("react");function K(e,a){let[o,s]=(0,p.useState)(e);return(0,p.useEffect)(()=>{let n=setTimeout(()=>{s(e)},a);return()=>{clearTimeout(n)}},[e,a]),o}var H=(e=S,a=1)=>({center:{lat:e.latitude,lng:e.longitude},zoom:e.zoom+a}),J=e=>{let a=e.getFullYear().toString(),o=(e.getMonth()+101).toString().substring(1),s=(e.getDate()+100).toString().substring(1);return`${a}-${o}-${s}`};E.exports=Y(b)});var r={};i();t(r,D(x()));t(r,require("@ibp/naksha-gmaps-draw"));t(r,require("@ibp/naksha-gmaps-view"));t(r,require("@ibp/naksha-mapbox-draw"));t(r,require("@ibp/naksha-mapbox-list"));t(r,require("@ibp/naksha-mapbox-view"));module.exports=h(r);
|
package/package.json
CHANGED
|
@@ -1,55 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "naksha-components-react",
|
|
3
|
+
"version": "4.0.2",
|
|
3
4
|
"author": "harshzalavadiya",
|
|
4
|
-
"
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"sideEffects": false,
|
|
5
9
|
"license": "Apache-2.0",
|
|
6
|
-
"main": "dist/cjs/index.js",
|
|
7
|
-
"module": "dist/esm/index.js",
|
|
8
|
-
"types": "dist/types/index.d.ts",
|
|
9
|
-
"typings": "dist/types/index.d.ts",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"require": "./dist/cjs/index.js",
|
|
13
|
-
"default": "./dist/esm/index.js"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
10
|
"repository": "strandls/naksha-components-react",
|
|
17
11
|
"files": [
|
|
18
|
-
"dist"
|
|
12
|
+
"dist/**"
|
|
19
13
|
],
|
|
20
|
-
"engines": {
|
|
21
|
-
"node": ">=14"
|
|
22
|
-
},
|
|
23
14
|
"scripts": {
|
|
24
|
-
"
|
|
25
|
-
"build": "
|
|
26
|
-
"
|
|
27
|
-
"build:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx -d dist/cjs --source-maps",
|
|
28
|
-
"build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
|
|
29
|
-
"lint": "eslint src --ext .ts,.tsx --config ../../.eslintrc.json"
|
|
15
|
+
"clean": "rm -rf node_modules dist .turbo",
|
|
16
|
+
"build": "tsup src/index.tsx --legacy-output --minify --format esm,cjs --dts --external react",
|
|
17
|
+
"dev": "tsup src/index.tsx --legacy-output --format esm,cjs --watch --dts --external react"
|
|
30
18
|
},
|
|
31
19
|
"peerDependencies": {
|
|
32
|
-
"react": ">=17"
|
|
20
|
+
"react": ">=17.0.0"
|
|
33
21
|
},
|
|
34
|
-
"
|
|
35
|
-
"
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@ibp/eslint-preset": "4.0.1",
|
|
24
|
+
"@ibp/naksha-gmaps-draw": "4.0.2",
|
|
25
|
+
"@ibp/naksha-gmaps-view": "4.0.1",
|
|
26
|
+
"@ibp/naksha-mapbox-draw": "4.0.1",
|
|
27
|
+
"@ibp/naksha-mapbox-list": "4.0.1",
|
|
28
|
+
"@ibp/naksha-mapbox-view": "4.0.1",
|
|
29
|
+
"@ibp/tsconfig": "4.0.1"
|
|
36
30
|
},
|
|
37
31
|
"devDependencies": {
|
|
38
|
-
"@types/react": "^17.0.
|
|
32
|
+
"@types/react": "^17.0.39",
|
|
39
33
|
"@types/react-dom": "^17.0.11",
|
|
40
|
-
"react": "
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"typescript": "^4.4.4"
|
|
34
|
+
"react": ">=17.0.0",
|
|
35
|
+
"tsup": "^5.11.13",
|
|
36
|
+
"typescript": "^4.5.5"
|
|
44
37
|
},
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"@ibp/naksha-gmaps-draw": "3.13.0",
|
|
48
|
-
"@ibp/naksha-gmaps-view": "3.12.11",
|
|
49
|
-
"@ibp/naksha-mapbox-draw": "3.12.3",
|
|
50
|
-
"@ibp/naksha-mapbox-list": "3.12.7",
|
|
51
|
-
"@ibp/naksha-mapbox-view": "3.12.3",
|
|
52
|
-
"@ibp/naksha-upload": "3.12.3"
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
53
40
|
},
|
|
54
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "1bd39fa6a200326ccdf21bca7ec41b849c6579e2"
|
|
55
42
|
}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
|
|
5
|
-
var _nakshaCommons = require("@ibp/naksha-commons");
|
|
6
|
-
|
|
7
|
-
Object.keys(_nakshaCommons).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _nakshaCommons[key]) return;
|
|
10
|
-
exports[key] = _nakshaCommons[key];
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
var _nakshaGmapsDraw = require("@ibp/naksha-gmaps-draw");
|
|
14
|
-
|
|
15
|
-
Object.keys(_nakshaGmapsDraw).forEach(function (key) {
|
|
16
|
-
if (key === "default" || key === "__esModule") return;
|
|
17
|
-
if (key in exports && exports[key] === _nakshaGmapsDraw[key]) return;
|
|
18
|
-
exports[key] = _nakshaGmapsDraw[key];
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
var _nakshaGmapsView = require("@ibp/naksha-gmaps-view");
|
|
22
|
-
|
|
23
|
-
Object.keys(_nakshaGmapsView).forEach(function (key) {
|
|
24
|
-
if (key === "default" || key === "__esModule") return;
|
|
25
|
-
if (key in exports && exports[key] === _nakshaGmapsView[key]) return;
|
|
26
|
-
exports[key] = _nakshaGmapsView[key];
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
var _nakshaMapboxDraw = require("@ibp/naksha-mapbox-draw");
|
|
30
|
-
|
|
31
|
-
Object.keys(_nakshaMapboxDraw).forEach(function (key) {
|
|
32
|
-
if (key === "default" || key === "__esModule") return;
|
|
33
|
-
if (key in exports && exports[key] === _nakshaMapboxDraw[key]) return;
|
|
34
|
-
exports[key] = _nakshaMapboxDraw[key];
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
var _nakshaMapboxList = require("@ibp/naksha-mapbox-list");
|
|
38
|
-
|
|
39
|
-
Object.keys(_nakshaMapboxList).forEach(function (key) {
|
|
40
|
-
if (key === "default" || key === "__esModule") return;
|
|
41
|
-
if (key in exports && exports[key] === _nakshaMapboxList[key]) return;
|
|
42
|
-
exports[key] = _nakshaMapboxList[key];
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
var _nakshaMapboxView = require("@ibp/naksha-mapbox-view");
|
|
46
|
-
|
|
47
|
-
Object.keys(_nakshaMapboxView).forEach(function (key) {
|
|
48
|
-
if (key === "default" || key === "__esModule") return;
|
|
49
|
-
if (key in exports && exports[key] === _nakshaMapboxView[key]) return;
|
|
50
|
-
exports[key] = _nakshaMapboxView[key];
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
var _nakshaUpload = require("@ibp/naksha-upload");
|
|
54
|
-
|
|
55
|
-
Object.keys(_nakshaUpload).forEach(function (key) {
|
|
56
|
-
if (key === "default" || key === "__esModule") return;
|
|
57
|
-
if (key in exports && exports[key] === _nakshaUpload[key]) return;
|
|
58
|
-
exports[key] = _nakshaUpload[key];
|
|
59
|
-
});
|
|
60
|
-
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.tsx"],"names":[],"mappings":";;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"@ibp/naksha-commons\";\nexport * from \"@ibp/naksha-gmaps-draw\";\nexport * from \"@ibp/naksha-gmaps-view\";\nexport * from \"@ibp/naksha-mapbox-draw\";\nexport * from \"@ibp/naksha-mapbox-list\";\nexport * from \"@ibp/naksha-mapbox-view\";\nexport * from \"@ibp/naksha-upload\";\n"],"file":"index.js"}
|
package/dist/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAd;AACA,cAAc,wBAAd;AACA,cAAc,wBAAd;AACA,cAAc,yBAAd;AACA,cAAc,yBAAd;AACA,cAAc,yBAAd;AACA,cAAc,oBAAd","sourcesContent":["export * from \"@ibp/naksha-commons\";\nexport * from \"@ibp/naksha-gmaps-draw\";\nexport * from \"@ibp/naksha-gmaps-view\";\nexport * from \"@ibp/naksha-mapbox-draw\";\nexport * from \"@ibp/naksha-mapbox-list\";\nexport * from \"@ibp/naksha-mapbox-view\";\nexport * from \"@ibp/naksha-upload\";\n"],"file":"index.js"}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from "@ibp/naksha-commons";
|
|
2
|
-
export * from "@ibp/naksha-gmaps-draw";
|
|
3
|
-
export * from "@ibp/naksha-gmaps-view";
|
|
4
|
-
export * from "@ibp/naksha-mapbox-draw";
|
|
5
|
-
export * from "@ibp/naksha-mapbox-list";
|
|
6
|
-
export * from "@ibp/naksha-mapbox-view";
|
|
7
|
-
export * from "@ibp/naksha-upload";
|