react-native-map4d-map-dtqg 0.1.4 → 0.1.6
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 +58 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/build.gradle +23 -2
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapModule.java +39 -27
- package/ios/Map4dMap.h +12 -3
- package/ios/Map4dMap.m +108 -3
- package/ios/Map4dMapTurbo.mm +16 -0
- package/ios/RMFCircleManager.m +40 -68
- package/ios/RMFDirectionsRendererManager.m +26 -24
- package/ios/RMFMapViewManager.m +64 -149
- package/ios/RMFMarkerManager.m +36 -64
- package/ios/RMFPOIManager.m +40 -74
- package/ios/RMFPolygonManager.m +38 -60
- package/ios/RMFPolylineManager.m +36 -58
- package/ios/building/RMFBuildingManager.m +36 -64
- package/lib/commonjs/components/MFBanDoSo/constants.js +30 -0
- package/lib/commonjs/components/MFBanDoSo/constants.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo/helpers.js +200 -0
- package/lib/commonjs/components/MFBanDoSo/helpers.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo/propTypes.js +18 -0
- package/lib/commonjs/components/MFBanDoSo/propTypes.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo/styles.js +334 -0
- package/lib/commonjs/components/MFBanDoSo/styles.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo/ui.js +231 -0
- package/lib/commonjs/components/MFBanDoSo/ui.js.map +1 -0
- package/lib/commonjs/components/MFBanDoSo.js +201 -73
- package/lib/commonjs/components/MFBanDoSo.js.map +1 -1
- package/lib/commonjs/components/MFBuilding.js +15 -90
- package/lib/commonjs/components/MFBuilding.js.map +1 -1
- package/lib/commonjs/components/MFCircle.js +20 -88
- package/lib/commonjs/components/MFCircle.js.map +1 -1
- package/lib/commonjs/components/MFDirectionsRenderer.js +15 -93
- package/lib/commonjs/components/MFDirectionsRenderer.js.map +1 -1
- package/lib/commonjs/components/MFMapView.js +50 -147
- package/lib/commonjs/components/MFMapView.js.map +1 -1
- package/lib/commonjs/components/MFMarker.js +15 -101
- package/lib/commonjs/components/MFMarker.js.map +1 -1
- package/lib/commonjs/components/MFPOI.js +17 -92
- package/lib/commonjs/components/MFPOI.js.map +1 -1
- package/lib/commonjs/components/MFPolygon.js +15 -87
- package/lib/commonjs/components/MFPolygon.js.map +1 -1
- package/lib/commonjs/components/MFPolyline.js +17 -87
- package/lib/commonjs/components/MFPolyline.js.map +1 -1
- package/lib/commonjs/components/MFTileOverlay.js +7 -15
- package/lib/commonjs/components/MFTileOverlay.js.map +1 -1
- package/lib/commonjs/components/Map4dMapView.js +1 -4
- package/lib/commonjs/components/Map4dMapView.js.map +1 -1
- package/lib/commonjs/components/extends/AreaFocusManager.js +4 -38
- package/lib/commonjs/components/extends/AreaFocusManager.js.map +1 -1
- package/lib/commonjs/components/extends/AreaFocuser.js +1 -17
- package/lib/commonjs/components/extends/AreaFocuser.js.map +1 -1
- package/lib/commonjs/components/extends/BoundHelper.js +0 -6
- package/lib/commonjs/components/extends/BoundHelper.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusAreas.js +0 -37
- package/lib/commonjs/components/extends/area/AreaFocusAreas.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js +1 -35
- package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusSession.js +0 -18
- package/lib/commonjs/components/extends/area/AreaFocusSession.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusTypes.js +2 -3
- package/lib/commonjs/components/extends/area/AreaFocusTypes.js.map +1 -1
- package/lib/commonjs/components/internal/DefaultRoadmapStyle.js +1 -2
- package/lib/commonjs/components/internal/DefaultRoadmapStyle.js.map +1 -1
- package/lib/commonjs/components/internal/GeojsonStyleUtils.js +20 -31
- package/lib/commonjs/components/internal/GeojsonStyleUtils.js.map +1 -1
- package/lib/commonjs/index.js +0 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/native/Map4dMapNativeModule.js +10 -0
- package/lib/commonjs/native/Map4dMapNativeModule.js.map +1 -0
- package/lib/commonjs/native/NativeModuleResolver.js +35 -0
- package/lib/commonjs/native/NativeModuleResolver.js.map +1 -0
- package/lib/commonjs/native/ViewManagerCommand.js +67 -0
- package/lib/commonjs/native/ViewManagerCommand.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/specs/NativeMap4dMap.js +9 -0
- package/lib/commonjs/specs/NativeMap4dMap.js.map +1 -0
- package/lib/module/components/MFBanDoSo/constants.js +25 -0
- package/lib/module/components/MFBanDoSo/constants.js.map +1 -0
- package/lib/module/components/MFBanDoSo/helpers.js +188 -0
- package/lib/module/components/MFBanDoSo/helpers.js.map +1 -0
- package/lib/module/components/MFBanDoSo/propTypes.js +14 -0
- package/lib/module/components/MFBanDoSo/propTypes.js.map +1 -0
- package/lib/module/components/MFBanDoSo/styles.js +332 -0
- package/lib/module/components/MFBanDoSo/styles.js.map +1 -0
- package/lib/module/components/MFBanDoSo/ui.js +224 -0
- package/lib/module/components/MFBanDoSo/ui.js.map +1 -0
- package/lib/module/components/MFBanDoSo.js +203 -63
- package/lib/module/components/MFBanDoSo.js.map +1 -1
- package/lib/module/components/MFBuilding.js +17 -82
- package/lib/module/components/MFBuilding.js.map +1 -1
- package/lib/module/components/MFCircle.js +22 -80
- package/lib/module/components/MFCircle.js.map +1 -1
- package/lib/module/components/MFDirectionsRenderer.js +16 -85
- package/lib/module/components/MFDirectionsRenderer.js.map +1 -1
- package/lib/module/components/MFMapView.js +51 -136
- package/lib/module/components/MFMapView.js.map +1 -1
- package/lib/module/components/MFMarker.js +17 -92
- package/lib/module/components/MFMarker.js.map +1 -1
- package/lib/module/components/MFPOI.js +19 -84
- package/lib/module/components/MFPOI.js.map +1 -1
- package/lib/module/components/MFPolygon.js +17 -79
- package/lib/module/components/MFPolygon.js.map +1 -1
- package/lib/module/components/MFPolyline.js +19 -79
- package/lib/module/components/MFPolyline.js.map +1 -1
- package/lib/module/components/MFTileOverlay.js +10 -9
- package/lib/module/components/MFTileOverlay.js.map +1 -1
- package/lib/module/components/Map4dMapView.js +2 -0
- package/lib/module/components/Map4dMapView.js.map +1 -1
- package/lib/module/components/extends/AreaFocusManager.js +6 -32
- package/lib/module/components/extends/AreaFocusManager.js.map +1 -1
- package/lib/module/components/extends/AreaFocuser.js +3 -15
- package/lib/module/components/extends/AreaFocuser.js.map +1 -1
- package/lib/module/components/extends/BoundHelper.js +2 -5
- package/lib/module/components/extends/BoundHelper.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusAreas.js +2 -33
- package/lib/module/components/extends/area/AreaFocusAreas.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusGeometryUtils.js +2 -32
- package/lib/module/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusSession.js +2 -17
- package/lib/module/components/extends/area/AreaFocusSession.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusTypes.js +3 -0
- package/lib/module/components/extends/area/AreaFocusTypes.js.map +1 -1
- package/lib/module/components/internal/DefaultRoadmapStyle.js +2 -0
- package/lib/module/components/internal/DefaultRoadmapStyle.js.map +1 -1
- package/lib/module/components/internal/GeojsonStyleUtils.js +21 -28
- package/lib/module/components/internal/GeojsonStyleUtils.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/native/Map4dMapNativeModule.js +5 -0
- package/lib/module/native/Map4dMapNativeModule.js.map +1 -0
- package/lib/module/native/NativeModuleResolver.js +29 -0
- package/lib/module/native/NativeModuleResolver.js.map +1 -0
- package/lib/module/native/ViewManagerCommand.js +61 -0
- package/lib/module/native/ViewManagerCommand.js.map +1 -0
- package/lib/module/specs/NativeMap4dMap.js +5 -0
- package/lib/module/specs/NativeMap4dMap.js.map +1 -0
- package/lib/typescript/components/MFBanDoSo/constants.d.ts +11 -0
- package/lib/typescript/components/MFBanDoSo/constants.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo/helpers.d.ts +14 -0
- package/lib/typescript/components/MFBanDoSo/helpers.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo/propTypes.d.ts +2 -0
- package/lib/typescript/components/MFBanDoSo/propTypes.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo/styles.d.ts +336 -0
- package/lib/typescript/components/MFBanDoSo/styles.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo/ui.d.ts +32 -0
- package/lib/typescript/components/MFBanDoSo/ui.d.ts.map +1 -0
- package/lib/typescript/components/MFBanDoSo.d.ts +38 -0
- package/lib/typescript/components/MFBanDoSo.d.ts.map +1 -0
- package/lib/typescript/components/MFBuilding.d.ts +24 -0
- package/lib/typescript/components/MFBuilding.d.ts.map +1 -0
- package/lib/typescript/components/MFCircle.d.ts +24 -0
- package/lib/typescript/components/MFCircle.d.ts.map +1 -0
- package/lib/typescript/components/MFDirectionsRenderer.d.ts +19 -0
- package/lib/typescript/components/MFDirectionsRenderer.d.ts.map +1 -0
- package/lib/typescript/components/MFMapView.d.ts +66 -0
- package/lib/typescript/components/MFMapView.d.ts.map +1 -0
- package/lib/typescript/components/MFMarker.d.ts +26 -0
- package/lib/typescript/components/MFMarker.d.ts.map +1 -0
- package/lib/typescript/components/MFPOI.d.ts +24 -0
- package/lib/typescript/components/MFPOI.d.ts.map +1 -0
- package/lib/typescript/components/MFPolygon.d.ts +24 -0
- package/lib/typescript/components/MFPolygon.d.ts.map +1 -0
- package/lib/typescript/components/MFPolyline.d.ts +24 -0
- package/lib/typescript/components/MFPolyline.d.ts.map +1 -0
- package/lib/typescript/components/MFTileOverlay.d.ts +12 -0
- package/lib/typescript/components/MFTileOverlay.d.ts.map +1 -0
- package/lib/typescript/components/Map4dMapView.d.ts +8 -7
- package/lib/typescript/components/Map4dMapView.d.ts.map +1 -0
- package/lib/typescript/components/extends/AreaFocusManager.d.ts +34 -0
- package/lib/typescript/components/extends/AreaFocusManager.d.ts.map +1 -0
- package/lib/typescript/components/extends/AreaFocuser.d.ts +15 -0
- package/lib/typescript/components/extends/AreaFocuser.d.ts.map +1 -0
- package/lib/typescript/components/extends/BoundHelper.d.ts +11 -0
- package/lib/typescript/components/extends/BoundHelper.d.ts.map +1 -0
- package/lib/typescript/components/extends/area/AreaFocusAreas.d.ts +58 -0
- package/lib/typescript/components/extends/area/AreaFocusAreas.d.ts.map +1 -0
- package/lib/typescript/components/extends/area/AreaFocusGeometryUtils.d.ts +19 -0
- package/lib/typescript/components/extends/area/AreaFocusGeometryUtils.d.ts.map +1 -0
- package/lib/typescript/components/extends/area/AreaFocusSession.d.ts +14 -0
- package/lib/typescript/components/extends/area/AreaFocusSession.d.ts.map +1 -0
- package/lib/typescript/components/extends/area/AreaFocusTypes.d.ts +40 -0
- package/lib/typescript/components/extends/area/AreaFocusTypes.d.ts.map +1 -0
- package/lib/typescript/components/internal/DefaultRoadmapStyle.d.ts +820 -0
- package/lib/typescript/components/internal/DefaultRoadmapStyle.d.ts.map +1 -0
- package/lib/typescript/components/internal/GeojsonStyleUtils.d.ts +3 -0
- package/lib/typescript/components/internal/GeojsonStyleUtils.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +13 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/native/Map4dMapNativeModule.d.ts +2 -0
- package/lib/typescript/native/Map4dMapNativeModule.d.ts.map +1 -0
- package/lib/typescript/native/NativeModuleResolver.d.ts +3 -0
- package/lib/typescript/native/NativeModuleResolver.d.ts.map +1 -0
- package/lib/typescript/native/ViewManagerCommand.d.ts +11 -0
- package/lib/typescript/native/ViewManagerCommand.d.ts.map +1 -0
- package/package.json +27 -11
- package/src/components/MFBanDoSo/constants.js +38 -0
- package/src/components/MFBanDoSo/helpers.js +273 -0
- package/src/components/MFBanDoSo/propTypes.js +14 -0
- package/src/components/MFBanDoSo/styles.js +323 -0
- package/src/components/MFBanDoSo/ui.js +261 -0
- package/src/components/MFBanDoSo.js +280 -78
- package/src/components/MFBuilding.js +8 -48
- package/src/components/MFCircle.js +8 -48
- package/src/components/MFDirectionsRenderer.js +8 -47
- package/src/components/MFMapView.js +31 -53
- package/src/components/MFMarker.js +9 -50
- package/src/components/MFPOI.js +8 -48
- package/src/components/MFPolygon.js +8 -48
- package/src/components/MFPolyline.js +8 -48
- package/src/components/internal/GeojsonStyleUtils.js +3 -0
- package/src/native/Map4dMapNativeModule.js +3 -0
- package/src/native/NativeModuleResolver.js +33 -0
- package/src/native/ViewManagerCommand.js +82 -0
- package/src/specs/NativeMap4dMap.js +12 -0
- package/ios/Map4dMapViewManager.m +0 -34
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultRoadmapStyle.d.ts","sourceRoot":"","sources":["../../../../src/components/internal/DefaultRoadmapStyle.js"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkyGC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeojsonStyleUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/internal/GeojsonStyleUtils.js"],"names":[],"mappings":"AAuGA,qFAwCC;AAtDD,iEAYC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MFMapView } from './components/MFMapView';
|
|
2
|
+
import { MFBanDoSo } from './components/MFBanDoSo';
|
|
3
|
+
import { MFMarker } from './components/MFMarker';
|
|
4
|
+
import { MFCircle } from './components/MFCircle';
|
|
5
|
+
import { MFPolyline } from './components/MFPolyline';
|
|
6
|
+
import { MFPolygon } from './components/MFPolygon';
|
|
7
|
+
import { MFPOI } from './components/MFPOI';
|
|
8
|
+
import { MFDirectionsRenderer } from './components/MFDirectionsRenderer';
|
|
9
|
+
import { MFTileOverlay } from './components/MFTileOverlay';
|
|
10
|
+
import { MFBuilding } from './components/MFBuilding';
|
|
11
|
+
import { AreaFocuser } from './components/extends/AreaFocuser';
|
|
12
|
+
export { MFMapView, MFBanDoSo, MFMarker, MFCircle, MFPolyline, MFPolygon, MFPOI, MFDirectionsRenderer, MFTileOverlay, MFBuilding, AreaFocuser };
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"0BAAwB,wBAAwB;0BACtB,wBAAwB;yBAC3B,uBAAuB;yBACvB,uBAAuB;2BACrB,yBAAyB;0BAC1B,wBAAwB;sBAC5B,oBAAoB;qCACL,mCAAmC;8BAC1C,4BAA4B;2BAC/B,yBAAyB;4BACxB,kCAAkC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Map4dMapNativeModule.d.ts","sourceRoot":"","sources":["../../../src/native/Map4dMapNativeModule.js"],"names":[],"mappings":"AAEO,+CAAiE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeModuleResolver.d.ts","sourceRoot":"","sources":["../../../src/native/NativeModuleResolver.js"],"names":[],"mappings":"AAEO,sDAiBN;AAEM,oCAWN"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function getViewManagerCommandId(componentName: any, commandName: any): any;
|
|
2
|
+
export function runViewManagerCommand({ componentName, moduleName, commandName, args, reactTag, platform, rejectOnError, }: {
|
|
3
|
+
componentName: any;
|
|
4
|
+
moduleName: any;
|
|
5
|
+
commandName: any;
|
|
6
|
+
args?: never[] | undefined;
|
|
7
|
+
reactTag: any;
|
|
8
|
+
platform?: "ios" | "android" | "macos" | "windows" | "web" | undefined;
|
|
9
|
+
rejectOnError?: boolean | undefined;
|
|
10
|
+
}): any;
|
|
11
|
+
//# sourceMappingURL=ViewManagerCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewManagerCommand.d.ts","sourceRoot":"","sources":["../../../src/native/ViewManagerCommand.js"],"names":[],"mappings":"AAWO,mFAkBN;AAEM;;;;;;;;QAkDN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-map4d-map-dtqg",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Map4dMap SDK for React Native",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -28,8 +28,12 @@
|
|
|
28
28
|
"prepare": "bob build",
|
|
29
29
|
"release": "release-it",
|
|
30
30
|
"example": "yarn --cwd example",
|
|
31
|
+
"example:new": "yarn --cwd example-new-arch",
|
|
32
|
+
"example:new:start": "yarn --cwd example-new-arch start",
|
|
31
33
|
"pods": "cd example && pod-install --quiet",
|
|
32
|
-
"
|
|
34
|
+
"pods:new": "cd example-new-arch && pod-install --quiet",
|
|
35
|
+
"bootstrap": "yarn example && yarn && yarn pods",
|
|
36
|
+
"bootstrap:new": "yarn example:new && yarn pods:new"
|
|
33
37
|
},
|
|
34
38
|
"keywords": [
|
|
35
39
|
"react",
|
|
@@ -51,35 +55,39 @@
|
|
|
51
55
|
"registry": "https://registry.npmjs.org/"
|
|
52
56
|
},
|
|
53
57
|
"devDependencies": {
|
|
58
|
+
"@babel/core": "^7.25.2",
|
|
54
59
|
"@commitlint/config-conventional": "^11.0.0",
|
|
55
60
|
"@react-native-community/eslint-config": "^2.0.0",
|
|
56
61
|
"@release-it/conventional-changelog": "^2.0.0",
|
|
57
|
-
"@
|
|
58
|
-
"@
|
|
59
|
-
"@types/
|
|
62
|
+
"@react-native/babel-preset": "0.86.0",
|
|
63
|
+
"@react-native/jest-preset": "0.86.0",
|
|
64
|
+
"@types/jest": "^29.5.14",
|
|
65
|
+
"@types/react": "^19.1.8",
|
|
60
66
|
"commitlint": "^11.0.0",
|
|
61
67
|
"deprecated-react-native-prop-types": "^2.3.0",
|
|
62
68
|
"eslint": "^7.2.0",
|
|
63
69
|
"eslint-config-prettier": "^7.0.0",
|
|
64
70
|
"eslint-plugin-prettier": "^3.1.3",
|
|
65
71
|
"husky": "^6.0.0",
|
|
66
|
-
"jest": "^
|
|
72
|
+
"jest": "^29.7.0",
|
|
67
73
|
"pod-install": "^0.1.0",
|
|
68
74
|
"prettier": "^2.0.5",
|
|
69
|
-
"react": "
|
|
70
|
-
"react-native": "0.
|
|
71
|
-
"react-native-builder-bob": "^0.
|
|
75
|
+
"react": "19.2.3",
|
|
76
|
+
"react-native": "0.86.0",
|
|
77
|
+
"react-native-builder-bob": "^0.40.12",
|
|
72
78
|
"release-it": "^14.2.2",
|
|
73
|
-
"typescript": "^
|
|
79
|
+
"typescript": "^5.6.3"
|
|
74
80
|
},
|
|
75
81
|
"peerDependencies": {
|
|
76
82
|
"react": "*",
|
|
77
83
|
"react-native": "*"
|
|
78
84
|
},
|
|
79
85
|
"jest": {
|
|
80
|
-
"preset": "react-native",
|
|
86
|
+
"preset": "@react-native/jest-preset",
|
|
81
87
|
"modulePathIgnorePatterns": [
|
|
88
|
+
"<rootDir>/example/",
|
|
82
89
|
"<rootDir>/example/node_modules",
|
|
90
|
+
"<rootDir>/example-new-arch/",
|
|
83
91
|
"<rootDir>/lib/"
|
|
84
92
|
]
|
|
85
93
|
},
|
|
@@ -148,5 +156,13 @@
|
|
|
148
156
|
}
|
|
149
157
|
]
|
|
150
158
|
]
|
|
159
|
+
},
|
|
160
|
+
"codegenConfig": {
|
|
161
|
+
"name": "Map4dMapSpec",
|
|
162
|
+
"type": "modules",
|
|
163
|
+
"jsSrcsDir": "src/specs",
|
|
164
|
+
"android": {
|
|
165
|
+
"javaPackageName": "com.reactnativemap4dmap"
|
|
166
|
+
}
|
|
151
167
|
}
|
|
152
168
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const SELECTOR_DRAWER_TRANSLATE_X = -320;
|
|
2
|
+
const SELECTOR_OPEN_DURATION_MS = 240;
|
|
3
|
+
const SELECTOR_CLOSE_DURATION_MS = 210;
|
|
4
|
+
const SELECTOR_SWIPE_ACTIVATION_DISTANCE = 10;
|
|
5
|
+
const SELECTOR_SWIPE_CLOSE_DISTANCE = 80;
|
|
6
|
+
const SELECTOR_SWIPE_CLOSE_VELOCITY = 0.5;
|
|
7
|
+
const SELECTOR_TITLE = 'Chọn lớp dữ liệu trên bản đồ';
|
|
8
|
+
const LEGEND_TITLE = 'Chú giải';
|
|
9
|
+
|
|
10
|
+
const API_HOST = 'https://cmcdtqg-gateway.dieuhanhso.vn';
|
|
11
|
+
const SOURCE_URL_PATH = 'bds/api/tile/vector/{z}/{x}/{y}.pbf?p=1';
|
|
12
|
+
const CATEGORY_CONFIG_URL_PATH = 'bds/api/BanDo/dau-tu/category-config';
|
|
13
|
+
|
|
14
|
+
function buildApiUrl(path, isStaging) {
|
|
15
|
+
const stagingSegment = isStaging ? '/staging' : '';
|
|
16
|
+
return `${API_HOST}${stagingSegment}/${path}`;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function getSourceUrl(isStaging) {
|
|
20
|
+
return buildApiUrl(SOURCE_URL_PATH, isStaging);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function getCategoryConfigUrl(isStaging) {
|
|
24
|
+
return buildApiUrl(CATEGORY_CONFIG_URL_PATH, isStaging);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
SELECTOR_DRAWER_TRANSLATE_X,
|
|
29
|
+
SELECTOR_OPEN_DURATION_MS,
|
|
30
|
+
SELECTOR_CLOSE_DURATION_MS,
|
|
31
|
+
SELECTOR_SWIPE_ACTIVATION_DISTANCE,
|
|
32
|
+
SELECTOR_SWIPE_CLOSE_DISTANCE,
|
|
33
|
+
SELECTOR_SWIPE_CLOSE_VELOCITY,
|
|
34
|
+
SELECTOR_TITLE,
|
|
35
|
+
LEGEND_TITLE,
|
|
36
|
+
getSourceUrl,
|
|
37
|
+
getCategoryConfigUrl,
|
|
38
|
+
};
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { createCategoryItemsSignature } from '../internal/GeojsonStyleUtils';
|
|
2
|
+
|
|
3
|
+
function normalizeColorValue(color) {
|
|
4
|
+
if (typeof color === 'string' && color.trim().length > 0) {
|
|
5
|
+
return color.trim();
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
if (Array.isArray(color) && typeof color[0] === 'string' && color[0].trim().length > 0) {
|
|
9
|
+
return color[0].trim();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function resolveItemsFromCategoryResponse(json) {
|
|
16
|
+
const data = json?.data ?? json;
|
|
17
|
+
|
|
18
|
+
if (Array.isArray(data)) {
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (Array.isArray(data?.items)) {
|
|
23
|
+
return data.items;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (Array.isArray(json?.items)) {
|
|
27
|
+
return json.items;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function resolveCategoryGroupMetadataFromResponse(json) {
|
|
34
|
+
const data = json?.data ?? json;
|
|
35
|
+
const groups = Array.isArray(data?.groups)
|
|
36
|
+
? data.groups
|
|
37
|
+
: Array.isArray(json?.groups)
|
|
38
|
+
? json.groups
|
|
39
|
+
: [];
|
|
40
|
+
|
|
41
|
+
const titleByKey = {};
|
|
42
|
+
const orderKeys = [];
|
|
43
|
+
|
|
44
|
+
groups.forEach((group, index) => {
|
|
45
|
+
if (!group || typeof group !== 'object') {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const rawKeyValue = [group.key, group.code, group.group, group.id]
|
|
50
|
+
.find((value) => value != null && `${value}`.trim().length > 0);
|
|
51
|
+
|
|
52
|
+
if (rawKeyValue == null) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const key = `${rawKeyValue}`.trim();
|
|
57
|
+
const rawTitleValue = [
|
|
58
|
+
group.title,
|
|
59
|
+
group.name,
|
|
60
|
+
group.label,
|
|
61
|
+
group.display_name,
|
|
62
|
+
group.displayName,
|
|
63
|
+
].find((value) => typeof value === 'string' && value.trim().length > 0);
|
|
64
|
+
|
|
65
|
+
const title = rawTitleValue ? rawTitleValue.trim() : key;
|
|
66
|
+
|
|
67
|
+
titleByKey[key] = title;
|
|
68
|
+
|
|
69
|
+
const preferredOrder = Number.isFinite(group.order) ? group.order : index;
|
|
70
|
+
orderKeys.push({
|
|
71
|
+
key,
|
|
72
|
+
order: preferredOrder,
|
|
73
|
+
index,
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
orderKeys.sort((a, b) => {
|
|
78
|
+
if (a.order === b.order) {
|
|
79
|
+
return a.index - b.index;
|
|
80
|
+
}
|
|
81
|
+
return a.order - b.order;
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
titleByKey,
|
|
86
|
+
orderedKeys: orderKeys.map((entry) => entry.key),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function normalizeCategoryItems(items) {
|
|
91
|
+
if (!Array.isArray(items)) {
|
|
92
|
+
return [];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return items.map((item) => ({
|
|
96
|
+
...item,
|
|
97
|
+
checked: item?.checked !== false,
|
|
98
|
+
}));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function getSelectedCategoryItems(items) {
|
|
102
|
+
return (Array.isArray(items) ? items : []).filter(
|
|
103
|
+
(item) => item?.checked !== false
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function resolveCategoryGroupKey(item) {
|
|
108
|
+
const rawGroup = typeof item?.group === 'string' ? item.group.trim() : '';
|
|
109
|
+
return rawGroup.length > 0 ? rawGroup : '__ungrouped__';
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function createCategoryGroupSections(items, titleByKey = {}, orderedKeys = []) {
|
|
113
|
+
const list = Array.isArray(items) ? items : [];
|
|
114
|
+
const groupedMap = new Map();
|
|
115
|
+
|
|
116
|
+
list.forEach((item, index) => {
|
|
117
|
+
const groupKey = resolveCategoryGroupKey(item);
|
|
118
|
+
const mappedTitle =
|
|
119
|
+
typeof titleByKey[groupKey] === 'string' && titleByKey[groupKey].trim().length > 0
|
|
120
|
+
? titleByKey[groupKey].trim()
|
|
121
|
+
: null;
|
|
122
|
+
const groupTitle = mappedTitle || (groupKey === '__ungrouped__' ? 'Khac' : groupKey);
|
|
123
|
+
|
|
124
|
+
if (!groupedMap.has(groupKey)) {
|
|
125
|
+
groupedMap.set(groupKey, {
|
|
126
|
+
key: groupKey,
|
|
127
|
+
title: groupTitle,
|
|
128
|
+
items: [],
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
groupedMap.get(groupKey).items.push({
|
|
133
|
+
item,
|
|
134
|
+
index,
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
const sections = Array.from(groupedMap.values());
|
|
139
|
+
if (!Array.isArray(orderedKeys) || orderedKeys.length === 0) {
|
|
140
|
+
return sections;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const orderMap = orderedKeys.reduce((acc, key, index) => {
|
|
144
|
+
if (typeof key === 'string' && key.length > 0) {
|
|
145
|
+
acc[key] = index;
|
|
146
|
+
}
|
|
147
|
+
return acc;
|
|
148
|
+
}, {});
|
|
149
|
+
|
|
150
|
+
return sections.sort((a, b) => {
|
|
151
|
+
const aOrder = Object.prototype.hasOwnProperty.call(orderMap, a.key)
|
|
152
|
+
? orderMap[a.key]
|
|
153
|
+
: Number.MAX_SAFE_INTEGER;
|
|
154
|
+
const bOrder = Object.prototype.hasOwnProperty.call(orderMap, b.key)
|
|
155
|
+
? orderMap[b.key]
|
|
156
|
+
: Number.MAX_SAFE_INTEGER;
|
|
157
|
+
|
|
158
|
+
if (aOrder === bOrder) {
|
|
159
|
+
return a.title.localeCompare(b.title);
|
|
160
|
+
}
|
|
161
|
+
return aOrder - bOrder;
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
function reconcileExpandedGroupKeys(groupSections, previousExpandedGroupKeys) {
|
|
166
|
+
const prev =
|
|
167
|
+
previousExpandedGroupKeys && typeof previousExpandedGroupKeys === 'object'
|
|
168
|
+
? previousExpandedGroupKeys
|
|
169
|
+
: {};
|
|
170
|
+
|
|
171
|
+
return (Array.isArray(groupSections) ? groupSections : []).reduce(
|
|
172
|
+
(acc, group) => {
|
|
173
|
+
const key = group?.key;
|
|
174
|
+
if (typeof key !== 'string' || key.length === 0) {
|
|
175
|
+
return acc;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
acc[key] = typeof prev[key] === 'boolean' ? prev[key] : true;
|
|
179
|
+
return acc;
|
|
180
|
+
},
|
|
181
|
+
{}
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function createSelectedCategoryItemsSignature(items) {
|
|
186
|
+
return createCategoryItemsSignature(getSelectedCategoryItems(items));
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function toggleCategoryItemChecked(items, targetKey, targetIndex) {
|
|
190
|
+
return (Array.isArray(items) ? items : []).map((item, index) => {
|
|
191
|
+
const currentKey = item?.key ?? `index-${index}`;
|
|
192
|
+
const isTarget = currentKey === targetKey && index === targetIndex;
|
|
193
|
+
|
|
194
|
+
if (!isTarget) {
|
|
195
|
+
return item;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return {
|
|
199
|
+
...item,
|
|
200
|
+
checked: !(item?.checked !== false),
|
|
201
|
+
};
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function toggleCategoryGroupChecked(items, targetGroupKey, checkedValue) {
|
|
206
|
+
if (typeof targetGroupKey !== 'string' || targetGroupKey.length === 0) {
|
|
207
|
+
return Array.isArray(items) ? items : [];
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const nextChecked = checkedValue !== false;
|
|
211
|
+
|
|
212
|
+
return (Array.isArray(items) ? items : []).map((item) => {
|
|
213
|
+
const groupKey = resolveCategoryGroupKey(item);
|
|
214
|
+
if (groupKey !== targetGroupKey) {
|
|
215
|
+
return item;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return {
|
|
219
|
+
...item,
|
|
220
|
+
checked: nextChecked,
|
|
221
|
+
};
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function extractColorFromItemStyle(item) {
|
|
226
|
+
if (!item || typeof item !== 'object') {
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const lineColor = normalizeColorValue(item?.style?.line?.[0]?.draw?.color);
|
|
231
|
+
if (lineColor) {
|
|
232
|
+
return lineColor;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const fillColor = normalizeColorValue(item?.style?.fill?.[0]?.draw?.color);
|
|
236
|
+
if (fillColor) {
|
|
237
|
+
return fillColor;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const symbolColor = normalizeColorValue(item?.style?.symbol?.[0]?.draw?.icon_color);
|
|
241
|
+
if (symbolColor) {
|
|
242
|
+
return symbolColor;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function resolveCategoryItemColor(item) {
|
|
249
|
+
const customColor = normalizeColorValue(item?.color);
|
|
250
|
+
if (customColor) {
|
|
251
|
+
return customColor;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
const styleColor = extractColorFromItemStyle(item);
|
|
255
|
+
if (styleColor) {
|
|
256
|
+
return styleColor;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return null;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export {
|
|
263
|
+
createCategoryGroupSections,
|
|
264
|
+
createSelectedCategoryItemsSignature,
|
|
265
|
+
getSelectedCategoryItems,
|
|
266
|
+
normalizeCategoryItems,
|
|
267
|
+
reconcileExpandedGroupKeys,
|
|
268
|
+
resolveCategoryGroupMetadataFromResponse,
|
|
269
|
+
resolveCategoryItemColor,
|
|
270
|
+
resolveItemsFromCategoryResponse,
|
|
271
|
+
toggleCategoryGroupChecked,
|
|
272
|
+
toggleCategoryItemChecked,
|
|
273
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { MFMapView } from '../MFMapView';
|
|
3
|
+
|
|
4
|
+
const banDoSoPropTypes = {
|
|
5
|
+
...MFMapView.propTypes,
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* If `true` (default), fetch category config and vector tiles from the staging API.
|
|
9
|
+
* If `false`, use the production API (no `/staging` path segment).
|
|
10
|
+
*/
|
|
11
|
+
isStaging: PropTypes.bool,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { banDoSoPropTypes };
|