naksha-components-react 3.13.1 → 4.0.3

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.
@@ -0,0 +1,6 @@
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';
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ var M=Object.create;var c=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var f=e=>c(e,"__esModule",{value:!0});var w=(e,o)=>()=>(e&&(o=e(e=0)),o);var D=(e,o)=>()=>(o||e((o={exports:{}}).exports,o),o.exports);var t=(e,o,a,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of T(o))!A.call(e,n)&&(a||n!=="default")&&c(e,n,{get:()=>o[n],enumerable:!(s=x(o,n))||s.enumerable});return e},L=(e,o)=>t(f(c(e!=null?M(O(e)):{},"default",!o&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),C=(e=>(o,a)=>e&&e.get(o)||(a=t(f({}),o,1),e&&e.set(o,a),a))(typeof WeakMap!="undefined"?new WeakMap:0);var i=w(()=>{});var E=D((Z,P)=>{i();var B=Object.create,u=Object.defineProperty,I=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,R=Object.getPrototypeOf,N=Object.prototype.hasOwnProperty,d=e=>u(e,"__esModule",{value:!0}),U=(e,o)=>{for(var a in o)u(e,a,{get:o[a],enumerable:!0})},_=(e,o,a,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of h(o))!N.call(e,n)&&(a||n!=="default")&&u(e,n,{get:()=>o[n],enumerable:!(s=I(o,n))||s.enumerable});return e},j=(e,o)=>_(d(u(e!=null?B(R(e)):{},"default",!o&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),G=(e=>(o,a)=>e&&e.get(o)||(a=_(d({}),o,1),e&&e.set(o,a),a))(typeof WeakMap<"u"?new WeakMap:0),S={};U(S,{GMAPS_AUTOCOMPLETE_FIELDS:()=>V,GMAPS_LIBRARIES:()=>Y,LICENSES:()=>F,MapStyles:()=>y,TranslationProvider:()=>z,adminBoundries:()=>q,defaultMapStyles:()=>$,defaultViewState:()=>b,formatDate:()=>H,getByPath:()=>g,mapboxToGmapsViewState:()=>K,useDebounce:()=>J,useT:()=>W});var V=["formatted_address","geometry","name"],Y={DEFAULT:["drawing","places"],AUTOCOMPLETE:["drawing","places"]},F={"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"},y=(e=>(e.MAP_STREETS="0",e.MAP_SATELLITE="1",e.MAP_DARK="2",e.MAP_OSM="3",e))(y||{}),b={latitude:22.5,longitude:79,zoom:3,bearing:0,pitch:0},$=[{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"}],q=["admin-0-boundary","admin-1-boundary","admin-0-boundary-disputed","admin-1-boundary-bg","admin-0-boundary-bg"],m=j(require("react")),g=(e,o)=>(o.split(".").forEach(function(a){!e||(e=e[a])}),e),v=(0,m.createContext)({}),z=({localeStrings:e,lang:o="en",children:a})=>{let s=n=>{let l=g(e[o],n);return l||console.warn(`Translation '${n}' for locale '${o}' not found.`),l};return m.default.createElement(v.Provider,{value:{t:s}},a)};function W(){return(0,m.useContext)(v)}var p=require("react");function J(e,o){let[a,s]=(0,p.useState)(e);return(0,p.useEffect)(()=>{let n=setTimeout(()=>{s(e)},o);return()=>{clearTimeout(n)}},[e,o]),a}var K=(e=b,o=1)=>({center:{lat:e.latitude,lng:e.longitude},zoom:e.zoom+o}),H=e=>{let o=e.getFullYear().toString(),a=(e.getMonth()+101).toString().substring(1),s=(e.getDate()+100).toString().substring(1);return`${o}-${a}-${s}`};P.exports=G(S)});var r={};i();t(r,L(E()));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=C(r);
package/package.json CHANGED
@@ -1,55 +1,42 @@
1
1
  {
2
2
  "name": "naksha-components-react",
3
+ "version": "4.0.3",
3
4
  "author": "harshzalavadiya",
4
- "version": "3.13.1",
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
- "prebuild": "rimraf dist",
25
- "build": "concurrently yarn:build:*",
26
- "build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx -d dist/esm --source-maps",
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
- "publishConfig": {
35
- "access": "public"
22
+ "dependencies": {
23
+ "@ibp/eslint-preset": "4.0.1",
24
+ "@ibp/naksha-gmaps-draw": "4.0.3",
25
+ "@ibp/naksha-gmaps-view": "4.0.3",
26
+ "@ibp/naksha-mapbox-draw": "4.0.1",
27
+ "@ibp/naksha-mapbox-list": "4.0.3",
28
+ "@ibp/naksha-mapbox-view": "4.0.1",
29
+ "@ibp/tsconfig": "4.0.1"
36
30
  },
37
31
  "devDependencies": {
38
- "@types/react": "^17.0.35",
32
+ "@types/react": "^17.0.39",
39
33
  "@types/react-dom": "^17.0.11",
40
- "react": "^17.0.2",
41
- "react-dom": "^17.0.2",
42
- "tslib": "^2.3.1",
43
- "typescript": "^4.4.4"
34
+ "react": ">=17.0.0",
35
+ "tsup": "^5.11.13",
36
+ "typescript": "^4.5.5"
44
37
  },
45
- "dependencies": {
46
- "@ibp/naksha-commons": "3.12.2",
47
- "@ibp/naksha-gmaps-draw": "3.13.1",
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": "d831d7190186dac3f4e7ec455823bf056435878c"
41
+ "gitHead": "4d02a3451798ad0a9ce14eff317d5e18e374fe81"
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
@@ -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"}
@@ -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"}
@@ -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";