datastake-daf 0.6.284 β†’ 0.6.285

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.
@@ -21408,6 +21408,201 @@ const IsolatedGlobe = _ref => {
21408
21408
  });
21409
21409
  };
21410
21410
 
21411
+ const NoConflictGlobe = _ref => {
21412
+ let {
21413
+ projects = [],
21414
+ mapConfig = {},
21415
+ onProjectClick = () => {},
21416
+ type = "default",
21417
+ color = "#00809E"
21418
+ } = _ref;
21419
+ const mapContainer = React.useRef(null);
21420
+ const map = React.useRef(null);
21421
+ const boundsRef = React.useRef(null);
21422
+ React.useEffect(() => {
21423
+ if (map.current) return;
21424
+ console.log('πŸ—ΊοΈ [NO CONFLICT GLOBE] Creating map with aggressive isolation...');
21425
+
21426
+ // Set Mapbox access token
21427
+ mapboxgl.accessToken = 'pk.eyJ1IjoicmVkaXM5OTkiLCJhIjoiY2x4YWV5MzA5MmtuZzJpcXM5Y201Z2E2YiJ9.m5bwPg-Tj4Akesl1yQUa3w';
21428
+
21429
+ // Create map
21430
+ map.current = new mapboxgl.Map({
21431
+ container: mapContainer.current,
21432
+ style: 'mapbox://styles/mapbox/satellite-v9',
21433
+ center: [0, 0],
21434
+ zoom: mapConfig.maxZoom || 3,
21435
+ projection: 'globe',
21436
+ attributionControl: false
21437
+ });
21438
+
21439
+ // Add markers when map loads
21440
+ map.current.on('load', () => {
21441
+ console.log('πŸ—ΊοΈ [NO CONFLICT GLOBE] Map loaded, adding markers...');
21442
+
21443
+ // Inject aggressive CSS isolation
21444
+ const styleId = 'no-conflict-globe-styles';
21445
+ let existingStyle = document.getElementById(styleId);
21446
+ if (!existingStyle) {
21447
+ const style = document.createElement('style');
21448
+ style.id = styleId;
21449
+ style.textContent = "\n /* NO CONFLICT GLOBE - Aggressive CSS Isolation */\n .no-conflict-globe-container {\n position: relative !important;\n width: 100% !important;\n height: 100% !important;\n overflow: hidden !important;\n font: 12px/20px Helvetica Neue, Arial, Helvetica, sans-serif !important;\n -webkit-tap-highlight-color: rgb(0 0 0/0) !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-canvas-container {\n position: relative !important;\n left: 0 !important;\n top: 0 !important;\n transform: none !important;\n width: 100% !important;\n height: 100% !important;\n overflow: hidden !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-canvas-container canvas {\n position: absolute !important;\n left: 0 !important;\n top: 0 !important;\n transform: none !important;\n width: 100% !important;\n height: 100% !important;\n isolation: isolate !important;\n }\n \n /* Override ALL possible Leaflet CSS interference */\n .no-conflict-globe-container .mapboxgl-marker {\n position: absolute !important;\n left: auto !important;\n top: auto !important;\n transform: none !important;\n pointer-events: auto !important;\n z-index: 1000 !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-marker .no-conflict-marker {\n position: relative !important;\n left: auto !important;\n top: auto !important;\n transform: none !important;\n pointer-events: auto !important;\n cursor: pointer !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n isolation: isolate !important;\n }\n \n /* Override Leaflet pane positioning */\n .no-conflict-globe-container .mapboxgl-marker-pane {\n position: absolute !important;\n left: 0 !important;\n top: 0 !important;\n transform: none !important;\n z-index: 600 !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-tile-container {\n position: absolute !important;\n left: 0 !important;\n top: 0 !important;\n transform: none !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-zoom-animated {\n transform-origin: 0 0 !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-marker.leaflet-interactive {\n cursor: pointer !important;\n }\n \n /* Popup styles with isolation */\n .no-conflict-globe-container .mapboxgl-popup {\n position: absolute !important;\n left: auto !important;\n top: auto !important;\n transform: none !important;\n z-index: 700 !important;\n text-align: center !important;\n margin-bottom: 20px !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-popup-content-wrapper {\n padding: 1px !important;\n text-align: left !important;\n border-radius: 12px !important;\n background: white !important;\n color: #333 !important;\n box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4) !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-popup-content {\n margin: 13px 24px 13px 20px !important;\n line-height: 1.3 !important;\n font-size: 13px !important;\n min-height: 1px !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-popup-content p {\n margin: 17px 0 !important;\n }\n \n .no-conflict-globe-container .mapboxgl-popup-tip-container {\n width: 40px !important;\n height: 20px !important;\n position: absolute !important;\n left: 50% !important;\n margin-top: -1px !important;\n margin-left: -20px !important;\n overflow: hidden !important;\n pointer-events: none !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-popup-tip {\n width: 17px !important;\n height: 17px !important;\n padding: 1px !important;\n margin: -10px auto 0 !important;\n pointer-events: auto !important;\n transform: rotate(45deg) !important;\n background: white !important;\n box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4) !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-popup-close-button {\n position: absolute !important;\n top: 0 !important;\n right: 0 !important;\n border: none !important;\n text-align: center !important;\n width: 24px !important;\n height: 24px !important;\n font: 16px/24px Tahoma, Verdana, sans-serif !important;\n color: #757575 !important;\n text-decoration: none !important;\n background: transparent !important;\n cursor: pointer !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-popup-close-button:hover {\n color: #585858 !important;\n }\n \n /* Hide Mapbox attribution completely */\n .no-conflict-globe-container .mapboxgl-ctrl-attribution {\n display: none !important;\n }\n \n .no-conflict-globe-container .mapboxgl-ctrl-logo {\n display: none !important;\n }\n \n /* Override any Leaflet pane positioning */\n .no-conflict-globe-container .mapboxgl-overlay-pane {\n position: absolute !important;\n left: 0 !important;\n top: 0 !important;\n transform: none !important;\n z-index: 400 !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-shadow-pane {\n position: absolute !important;\n left: 0 !important;\n top: 0 !important;\n transform: none !important;\n z-index: 500 !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-tooltip-pane {\n position: absolute !important;\n left: 0 !important;\n top: 0 !important;\n transform: none !important;\n z-index: 650 !important;\n isolation: isolate !important;\n }\n \n .no-conflict-globe-container .mapboxgl-popup-pane {\n position: absolute !important;\n left: 0 !important;\n top: 0 !important;\n transform: none !important;\n z-index: 700 !important;\n isolation: isolate !important;\n }\n \n /* Override any Leaflet div icon styles */\n .no-conflict-globe-container .mapboxgl-marker .leaflet-div-icon {\n background: none !important;\n border: none !important;\n position: relative !important;\n left: auto !important;\n top: auto !important;\n transform: none !important;\n }\n \n /* Override any Leaflet marker icon styles */\n .no-conflict-globe-container .mapboxgl-marker .leaflet-marker-icon {\n position: relative !important;\n left: auto !important;\n top: auto !important;\n transform: none !important;\n }\n \n /* Override any Leaflet marker shadow styles */\n .no-conflict-globe-container .mapboxgl-marker .leaflet-marker-shadow {\n display: none !important;\n }\n \n /* Override any Leaflet interactive styles */\n .no-conflict-globe-container .mapboxgl-marker.leaflet-interactive {\n cursor: pointer !important;\n pointer-events: auto !important;\n }\n \n /* Override any Leaflet zoom animations */\n .no-conflict-globe-container .mapboxgl-zoom-animated {\n transform-origin: 0 0 !important;\n }\n \n /* Override any Leaflet tile styles */\n .no-conflict-globe-container .mapboxgl-tile {\n position: absolute !important;\n left: 0 !important;\n top: 0 !important;\n transform: none !important;\n }\n \n /* Override any Leaflet image layer styles */\n .no-conflict-globe-container .mapboxgl-image-layer {\n position: absolute !important;\n left: 0 !important;\n top: 0 !important;\n transform: none !important;\n }\n ";
21450
+ document.head.appendChild(style);
21451
+ }
21452
+
21453
+ // Calculate bounds to fit all markers
21454
+ const bounds = new mapboxgl.LngLatBounds();
21455
+ let hasValidCoordinates = false;
21456
+ projects.forEach((project, index) => {
21457
+ console.log("\uD83D\uDCCD [NO CONFLICT GLOBE] Adding marker ".concat(index, ":"), project);
21458
+
21459
+ // Create marker element with unique class
21460
+ const el = document.createElement('div');
21461
+ el.className = 'no-conflict-marker';
21462
+ el.style.cursor = 'pointer';
21463
+ el.style.boxShadow = '0px 3.45px 3.45px 0px #00000029';
21464
+ el.style.display = 'flex';
21465
+ el.style.alignItems = 'center';
21466
+ el.style.justifyContent = 'center';
21467
+ el.style.position = 'relative';
21468
+ el.style.left = 'auto';
21469
+ el.style.top = 'auto';
21470
+ el.style.transform = 'none';
21471
+ el.style.zIndex = '1000';
21472
+ el.style.isolation = 'isolate';
21473
+ if (type === "location") {
21474
+ // Location marker - SVG map pin style
21475
+ el.style.width = '28px';
21476
+ el.style.height = '33px';
21477
+ el.innerHTML = "\n <svg\n width=\"28\"\n height=\"33\"\n viewBox=\"0 0 28 33\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.14346 4.87419C10.0688 -0.15896 18.0528 -0.162058 22.9757 4.86861C27.6563 9.65161 27.8841 17.2616 23.6622 22.3255H23.6608C23.427 22.6141 23.1808 22.894 22.9211 23.1623L14.0671 32.2101L5.44057 23.3948L5.13868 23.096C0.215857 18.0655 0.218422 9.90737 5.14346 4.87419Z\"\n fill=\"".concat(color, "\"\n stroke=\"white\"\n />\n </svg>\n ");
21478
+ } else {
21479
+ // Default circular marker style
21480
+ el.style.width = '30px';
21481
+ el.style.height = '30px';
21482
+ el.style.backgroundColor = color;
21483
+ el.style.borderRadius = '50%';
21484
+ el.style.border = '2px solid white';
21485
+ el.style.color = 'white';
21486
+ el.style.fontWeight = 'bold';
21487
+ el.style.fontSize = '14px';
21488
+ el.style.textAlign = 'center';
21489
+ el.style.lineHeight = '1';
21490
+ el.innerHTML = "<span style=\"display: block; line-height: 1;\">".concat(project.percentageCompletion || 0, "</span>");
21491
+ }
21492
+
21493
+ // Create popup content
21494
+ const popupContent = "\n <div style=\"padding: 12px; min-width: 200px;\">\n <h3 style=\"margin: 0 0 8px 0; font-size: 16px; color: #333;\">".concat(project.name, "</h3>\n <p style=\"margin: 0 0 4px 0; font-size: 12px; color: #666;\">\n <strong>Country:</strong> ").concat(project.country || 'N/A', "\n </p>\n <p style=\"margin: 0 0 4px 0; font-size: 12px; color: #666;\">\n <strong>Sector:</strong> ").concat(project.sectoralScope || 'Project', "\n </p>\n <p style=\"margin: 0 0 4px 0; font-size: 12px; color: #666;\">\n <strong>Completion:</strong> ").concat(project.percentageCompletion || 0, "%\n </p>\n <p style=\"margin: 4px 0 0 0; font-size: 12px; color: #666;\">\n <strong>Coordinates:</strong> ").concat(Number(project.latitude).toFixed(4), ", ").concat(Number(project.longitude).toFixed(4), "\n </p>\n </div>\n ");
21495
+
21496
+ // Create popup
21497
+ const popup = new mapboxgl.Popup({
21498
+ offset: 25,
21499
+ closeButton: true,
21500
+ closeOnClick: false
21501
+ }).setHTML(popupContent);
21502
+
21503
+ // Ensure coordinates are valid numbers
21504
+ const lng = Number(project.longitude);
21505
+ const lat = Number(project.latitude);
21506
+ console.log("\uD83D\uDCCD [NO CONFLICT GLOBE] Marker ".concat(index, " coordinates:"), {
21507
+ original: {
21508
+ longitude: project.longitude,
21509
+ latitude: project.latitude
21510
+ },
21511
+ processed: {
21512
+ lng,
21513
+ lat
21514
+ },
21515
+ project: project.name
21516
+ });
21517
+
21518
+ // Validate coordinates
21519
+ if (isNaN(lng) || isNaN(lat) || lng < -180 || lng > 180 || lat < -90 || lat > 90) {
21520
+ console.error("\u274C [NO CONFLICT GLOBE] Invalid coordinates for project ".concat(index, ":"), {
21521
+ lng,
21522
+ lat,
21523
+ original: {
21524
+ longitude: project.longitude,
21525
+ latitude: project.latitude
21526
+ },
21527
+ project: project.name
21528
+ });
21529
+ return;
21530
+ }
21531
+
21532
+ // Add coordinates to bounds
21533
+ bounds.extend([lng, lat]);
21534
+ hasValidCoordinates = true;
21535
+
21536
+ // Create marker with explicit positioning
21537
+ const marker = new mapboxgl.Marker({
21538
+ element: el,
21539
+ anchor: 'center'
21540
+ }).setLngLat([lng, lat]).setPopup(popup).addTo(map.current);
21541
+
21542
+ // Add click handler
21543
+ el.addEventListener('click', () => {
21544
+ console.log('πŸ“ [NO CONFLICT GLOBE] Marker clicked:', project);
21545
+ onProjectClick(project);
21546
+ });
21547
+
21548
+ // Verify marker position after a short delay
21549
+ setTimeout(() => {
21550
+ const markerLngLat = marker.getLngLat();
21551
+ console.log("\uD83D\uDD0D [NO CONFLICT GLOBE] Marker ".concat(index, " position verification:"), {
21552
+ expected: [lng, lat],
21553
+ actual: [markerLngLat.lng, markerLngLat.lat],
21554
+ project: project.name,
21555
+ match: Math.abs(markerLngLat.lng - lng) < 0.0001 && Math.abs(markerLngLat.lat - lat) < 0.0001
21556
+ });
21557
+ }, 100);
21558
+ console.log("\u2705 [NO CONFLICT GLOBE] Marker ".concat(index, " added at:"), [lng, lat]);
21559
+ });
21560
+
21561
+ // Fit map to show all markers if we have valid coordinates
21562
+ if (hasValidCoordinates && !bounds.isEmpty()) {
21563
+ console.log('πŸ—ΊοΈ [NO CONFLICT GLOBE] Fitting map to bounds:', bounds);
21564
+ map.current.fitBounds(bounds, {
21565
+ padding: {
21566
+ top: 20,
21567
+ bottom: 20,
21568
+ left: 20,
21569
+ right: 20
21570
+ },
21571
+ maxZoom: 6,
21572
+ duration: 1000
21573
+ });
21574
+ boundsRef.current = bounds;
21575
+ } else {
21576
+ boundsRef.current = null;
21577
+ }
21578
+ });
21579
+ return () => {
21580
+ if (map.current) {
21581
+ map.current.remove();
21582
+ map.current = null;
21583
+ }
21584
+ };
21585
+ }, [projects, onProjectClick, mapConfig]);
21586
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
21587
+ className: "no-conflict-globe-container",
21588
+ style: {
21589
+ width: '100%',
21590
+ height: '100%',
21591
+ position: 'relative',
21592
+ isolation: 'isolate'
21593
+ },
21594
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
21595
+ ref: mapContainer,
21596
+ style: {
21597
+ width: '100%',
21598
+ height: '100%',
21599
+ position: 'relative',
21600
+ isolation: 'isolate'
21601
+ }
21602
+ })
21603
+ });
21604
+ };
21605
+
21411
21606
  function WidgetPlaceholder(_ref) {
21412
21607
  let {
21413
21608
  icon = "",
@@ -62203,6 +62398,7 @@ exports.MoreTags = MoreTags;
62203
62398
  exports.MultiBarProgress = MultiBarProgress;
62204
62399
  exports.MultiColorProgressBar = MultiColorProgressBar;
62205
62400
  exports.Multiselect = Multiselect;
62401
+ exports.NoConflictGlobe = NoConflictGlobe;
62206
62402
  exports.NotFound = NotFound;
62207
62403
  exports.Pagination = Pagination;
62208
62404
  exports.PdfForm = PdfForm;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.284",
3
+ "version": "0.6.285",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -0,0 +1,488 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+ import mapboxgl from 'mapbox-gl';
3
+
4
+ /**
5
+ * NoConflictGlobe - Mapbox component with aggressive CSS isolation
6
+ * Uses unique CSS classes and inline styles to prevent any conflicts
7
+ */
8
+ const NoConflictGlobe = ({
9
+ projects = [],
10
+ mapConfig = {},
11
+ onProjectClick = () => {},
12
+ type = "default",
13
+ color = "#00809E"
14
+ }) => {
15
+ const mapContainer = useRef(null);
16
+ const map = useRef(null);
17
+ const boundsRef = useRef(null);
18
+
19
+ useEffect(() => {
20
+ if (map.current) return;
21
+
22
+ console.log('πŸ—ΊοΈ [NO CONFLICT GLOBE] Creating map with aggressive isolation...');
23
+
24
+ // Set Mapbox access token
25
+ mapboxgl.accessToken = 'pk.eyJ1IjoicmVkaXM5OTkiLCJhIjoiY2x4YWV5MzA5MmtuZzJpcXM5Y201Z2E2YiJ9.m5bwPg-Tj4Akesl1yQUa3w';
26
+
27
+ // Create map
28
+ map.current = new mapboxgl.Map({
29
+ container: mapContainer.current,
30
+ style: 'mapbox://styles/mapbox/satellite-v9',
31
+ center: [0, 0],
32
+ zoom: mapConfig.maxZoom || 3,
33
+ projection: 'globe',
34
+ attributionControl: false
35
+ });
36
+
37
+ // Add markers when map loads
38
+ map.current.on('load', () => {
39
+ console.log('πŸ—ΊοΈ [NO CONFLICT GLOBE] Map loaded, adding markers...');
40
+
41
+ // Inject aggressive CSS isolation
42
+ const styleId = 'no-conflict-globe-styles';
43
+ let existingStyle = document.getElementById(styleId);
44
+ if (!existingStyle) {
45
+ const style = document.createElement('style');
46
+ style.id = styleId;
47
+ style.textContent = `
48
+ /* NO CONFLICT GLOBE - Aggressive CSS Isolation */
49
+ .no-conflict-globe-container {
50
+ position: relative !important;
51
+ width: 100% !important;
52
+ height: 100% !important;
53
+ overflow: hidden !important;
54
+ font: 12px/20px Helvetica Neue, Arial, Helvetica, sans-serif !important;
55
+ -webkit-tap-highlight-color: rgb(0 0 0/0) !important;
56
+ isolation: isolate !important;
57
+ }
58
+
59
+ .no-conflict-globe-container .mapboxgl-canvas-container {
60
+ position: relative !important;
61
+ left: 0 !important;
62
+ top: 0 !important;
63
+ transform: none !important;
64
+ width: 100% !important;
65
+ height: 100% !important;
66
+ overflow: hidden !important;
67
+ isolation: isolate !important;
68
+ }
69
+
70
+ .no-conflict-globe-container .mapboxgl-canvas-container canvas {
71
+ position: absolute !important;
72
+ left: 0 !important;
73
+ top: 0 !important;
74
+ transform: none !important;
75
+ width: 100% !important;
76
+ height: 100% !important;
77
+ isolation: isolate !important;
78
+ }
79
+
80
+ /* Override ALL possible Leaflet CSS interference */
81
+ .no-conflict-globe-container .mapboxgl-marker {
82
+ position: absolute !important;
83
+ left: auto !important;
84
+ top: auto !important;
85
+ transform: none !important;
86
+ pointer-events: auto !important;
87
+ z-index: 1000 !important;
88
+ isolation: isolate !important;
89
+ }
90
+
91
+ .no-conflict-globe-container .mapboxgl-marker .no-conflict-marker {
92
+ position: relative !important;
93
+ left: auto !important;
94
+ top: auto !important;
95
+ transform: none !important;
96
+ pointer-events: auto !important;
97
+ cursor: pointer !important;
98
+ display: flex !important;
99
+ align-items: center !important;
100
+ justify-content: center !important;
101
+ isolation: isolate !important;
102
+ }
103
+
104
+ /* Override Leaflet pane positioning */
105
+ .no-conflict-globe-container .mapboxgl-marker-pane {
106
+ position: absolute !important;
107
+ left: 0 !important;
108
+ top: 0 !important;
109
+ transform: none !important;
110
+ z-index: 600 !important;
111
+ isolation: isolate !important;
112
+ }
113
+
114
+ .no-conflict-globe-container .mapboxgl-tile-container {
115
+ position: absolute !important;
116
+ left: 0 !important;
117
+ top: 0 !important;
118
+ transform: none !important;
119
+ isolation: isolate !important;
120
+ }
121
+
122
+ .no-conflict-globe-container .mapboxgl-zoom-animated {
123
+ transform-origin: 0 0 !important;
124
+ isolation: isolate !important;
125
+ }
126
+
127
+ .no-conflict-globe-container .mapboxgl-marker.leaflet-interactive {
128
+ cursor: pointer !important;
129
+ }
130
+
131
+ /* Popup styles with isolation */
132
+ .no-conflict-globe-container .mapboxgl-popup {
133
+ position: absolute !important;
134
+ left: auto !important;
135
+ top: auto !important;
136
+ transform: none !important;
137
+ z-index: 700 !important;
138
+ text-align: center !important;
139
+ margin-bottom: 20px !important;
140
+ isolation: isolate !important;
141
+ }
142
+
143
+ .no-conflict-globe-container .mapboxgl-popup-content-wrapper {
144
+ padding: 1px !important;
145
+ text-align: left !important;
146
+ border-radius: 12px !important;
147
+ background: white !important;
148
+ color: #333 !important;
149
+ box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4) !important;
150
+ isolation: isolate !important;
151
+ }
152
+
153
+ .no-conflict-globe-container .mapboxgl-popup-content {
154
+ margin: 13px 24px 13px 20px !important;
155
+ line-height: 1.3 !important;
156
+ font-size: 13px !important;
157
+ min-height: 1px !important;
158
+ isolation: isolate !important;
159
+ }
160
+
161
+ .no-conflict-globe-container .mapboxgl-popup-content p {
162
+ margin: 17px 0 !important;
163
+ }
164
+
165
+ .no-conflict-globe-container .mapboxgl-popup-tip-container {
166
+ width: 40px !important;
167
+ height: 20px !important;
168
+ position: absolute !important;
169
+ left: 50% !important;
170
+ margin-top: -1px !important;
171
+ margin-left: -20px !important;
172
+ overflow: hidden !important;
173
+ pointer-events: none !important;
174
+ isolation: isolate !important;
175
+ }
176
+
177
+ .no-conflict-globe-container .mapboxgl-popup-tip {
178
+ width: 17px !important;
179
+ height: 17px !important;
180
+ padding: 1px !important;
181
+ margin: -10px auto 0 !important;
182
+ pointer-events: auto !important;
183
+ transform: rotate(45deg) !important;
184
+ background: white !important;
185
+ box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4) !important;
186
+ isolation: isolate !important;
187
+ }
188
+
189
+ .no-conflict-globe-container .mapboxgl-popup-close-button {
190
+ position: absolute !important;
191
+ top: 0 !important;
192
+ right: 0 !important;
193
+ border: none !important;
194
+ text-align: center !important;
195
+ width: 24px !important;
196
+ height: 24px !important;
197
+ font: 16px/24px Tahoma, Verdana, sans-serif !important;
198
+ color: #757575 !important;
199
+ text-decoration: none !important;
200
+ background: transparent !important;
201
+ cursor: pointer !important;
202
+ isolation: isolate !important;
203
+ }
204
+
205
+ .no-conflict-globe-container .mapboxgl-popup-close-button:hover {
206
+ color: #585858 !important;
207
+ }
208
+
209
+ /* Hide Mapbox attribution completely */
210
+ .no-conflict-globe-container .mapboxgl-ctrl-attribution {
211
+ display: none !important;
212
+ }
213
+
214
+ .no-conflict-globe-container .mapboxgl-ctrl-logo {
215
+ display: none !important;
216
+ }
217
+
218
+ /* Override any Leaflet pane positioning */
219
+ .no-conflict-globe-container .mapboxgl-overlay-pane {
220
+ position: absolute !important;
221
+ left: 0 !important;
222
+ top: 0 !important;
223
+ transform: none !important;
224
+ z-index: 400 !important;
225
+ isolation: isolate !important;
226
+ }
227
+
228
+ .no-conflict-globe-container .mapboxgl-shadow-pane {
229
+ position: absolute !important;
230
+ left: 0 !important;
231
+ top: 0 !important;
232
+ transform: none !important;
233
+ z-index: 500 !important;
234
+ isolation: isolate !important;
235
+ }
236
+
237
+ .no-conflict-globe-container .mapboxgl-tooltip-pane {
238
+ position: absolute !important;
239
+ left: 0 !important;
240
+ top: 0 !important;
241
+ transform: none !important;
242
+ z-index: 650 !important;
243
+ isolation: isolate !important;
244
+ }
245
+
246
+ .no-conflict-globe-container .mapboxgl-popup-pane {
247
+ position: absolute !important;
248
+ left: 0 !important;
249
+ top: 0 !important;
250
+ transform: none !important;
251
+ z-index: 700 !important;
252
+ isolation: isolate !important;
253
+ }
254
+
255
+ /* Override any Leaflet div icon styles */
256
+ .no-conflict-globe-container .mapboxgl-marker .leaflet-div-icon {
257
+ background: none !important;
258
+ border: none !important;
259
+ position: relative !important;
260
+ left: auto !important;
261
+ top: auto !important;
262
+ transform: none !important;
263
+ }
264
+
265
+ /* Override any Leaflet marker icon styles */
266
+ .no-conflict-globe-container .mapboxgl-marker .leaflet-marker-icon {
267
+ position: relative !important;
268
+ left: auto !important;
269
+ top: auto !important;
270
+ transform: none !important;
271
+ }
272
+
273
+ /* Override any Leaflet marker shadow styles */
274
+ .no-conflict-globe-container .mapboxgl-marker .leaflet-marker-shadow {
275
+ display: none !important;
276
+ }
277
+
278
+ /* Override any Leaflet interactive styles */
279
+ .no-conflict-globe-container .mapboxgl-marker.leaflet-interactive {
280
+ cursor: pointer !important;
281
+ pointer-events: auto !important;
282
+ }
283
+
284
+ /* Override any Leaflet zoom animations */
285
+ .no-conflict-globe-container .mapboxgl-zoom-animated {
286
+ transform-origin: 0 0 !important;
287
+ }
288
+
289
+ /* Override any Leaflet tile styles */
290
+ .no-conflict-globe-container .mapboxgl-tile {
291
+ position: absolute !important;
292
+ left: 0 !important;
293
+ top: 0 !important;
294
+ transform: none !important;
295
+ }
296
+
297
+ /* Override any Leaflet image layer styles */
298
+ .no-conflict-globe-container .mapboxgl-image-layer {
299
+ position: absolute !important;
300
+ left: 0 !important;
301
+ top: 0 !important;
302
+ transform: none !important;
303
+ }
304
+ `;
305
+ document.head.appendChild(style);
306
+ }
307
+
308
+ // Calculate bounds to fit all markers
309
+ const bounds = new mapboxgl.LngLatBounds();
310
+ let hasValidCoordinates = false;
311
+
312
+ projects.forEach((project, index) => {
313
+ console.log(`πŸ“ [NO CONFLICT GLOBE] Adding marker ${index}:`, project);
314
+
315
+ // Create marker element with unique class
316
+ const el = document.createElement('div');
317
+ el.className = 'no-conflict-marker';
318
+ el.style.cursor = 'pointer';
319
+ el.style.boxShadow = '0px 3.45px 3.45px 0px #00000029';
320
+ el.style.display = 'flex';
321
+ el.style.alignItems = 'center';
322
+ el.style.justifyContent = 'center';
323
+ el.style.position = 'relative';
324
+ el.style.left = 'auto';
325
+ el.style.top = 'auto';
326
+ el.style.transform = 'none';
327
+ el.style.zIndex = '1000';
328
+ el.style.isolation = 'isolate';
329
+
330
+ if (type === "location") {
331
+ // Location marker - SVG map pin style
332
+ el.style.width = '28px';
333
+ el.style.height = '33px';
334
+ el.innerHTML = `
335
+ <svg
336
+ width="28"
337
+ height="33"
338
+ viewBox="0 0 28 33"
339
+ fill="none"
340
+ xmlns="http://www.w3.org/2000/svg"
341
+ >
342
+ <path
343
+ d="M5.14346 4.87419C10.0688 -0.15896 18.0528 -0.162058 22.9757 4.86861C27.6563 9.65161 27.8841 17.2616 23.6622 22.3255H23.6608C23.427 22.6141 23.1808 22.894 22.9211 23.1623L14.0671 32.2101L5.44057 23.3948L5.13868 23.096C0.215857 18.0655 0.218422 9.90737 5.14346 4.87419Z"
344
+ fill="${color}"
345
+ stroke="white"
346
+ />
347
+ </svg>
348
+ `;
349
+ } else {
350
+ // Default circular marker style
351
+ el.style.width = '30px';
352
+ el.style.height = '30px';
353
+ el.style.backgroundColor = color;
354
+ el.style.borderRadius = '50%';
355
+ el.style.border = '2px solid white';
356
+ el.style.color = 'white';
357
+ el.style.fontWeight = 'bold';
358
+ el.style.fontSize = '14px';
359
+ el.style.textAlign = 'center';
360
+ el.style.lineHeight = '1';
361
+ el.innerHTML = `<span style="display: block; line-height: 1;">${project.percentageCompletion || 0}</span>`;
362
+ }
363
+
364
+ // Create popup content
365
+ const popupContent = `
366
+ <div style="padding: 12px; min-width: 200px;">
367
+ <h3 style="margin: 0 0 8px 0; font-size: 16px; color: #333;">${project.name}</h3>
368
+ <p style="margin: 0 0 4px 0; font-size: 12px; color: #666;">
369
+ <strong>Country:</strong> ${project.country || 'N/A'}
370
+ </p>
371
+ <p style="margin: 0 0 4px 0; font-size: 12px; color: #666;">
372
+ <strong>Sector:</strong> ${project.sectoralScope || 'Project'}
373
+ </p>
374
+ <p style="margin: 0 0 4px 0; font-size: 12px; color: #666;">
375
+ <strong>Completion:</strong> ${project.percentageCompletion || 0}%
376
+ </p>
377
+ <p style="margin: 4px 0 0 0; font-size: 12px; color: #666;">
378
+ <strong>Coordinates:</strong> ${Number(project.latitude).toFixed(4)}, ${Number(project.longitude).toFixed(4)}
379
+ </p>
380
+ </div>
381
+ `;
382
+
383
+ // Create popup
384
+ const popup = new mapboxgl.Popup({
385
+ offset: 25,
386
+ closeButton: true,
387
+ closeOnClick: false
388
+ }).setHTML(popupContent);
389
+
390
+ // Ensure coordinates are valid numbers
391
+ const lng = Number(project.longitude);
392
+ const lat = Number(project.latitude);
393
+
394
+ console.log(`πŸ“ [NO CONFLICT GLOBE] Marker ${index} coordinates:`, {
395
+ original: { longitude: project.longitude, latitude: project.latitude },
396
+ processed: { lng, lat },
397
+ project: project.name
398
+ });
399
+
400
+ // Validate coordinates
401
+ if (isNaN(lng) || isNaN(lat) || lng < -180 || lng > 180 || lat < -90 || lat > 90) {
402
+ console.error(`❌ [NO CONFLICT GLOBE] Invalid coordinates for project ${index}:`, {
403
+ lng, lat,
404
+ original: { longitude: project.longitude, latitude: project.latitude },
405
+ project: project.name
406
+ });
407
+ return;
408
+ }
409
+
410
+ // Add coordinates to bounds
411
+ bounds.extend([lng, lat]);
412
+ hasValidCoordinates = true;
413
+
414
+ // Create marker with explicit positioning
415
+ const marker = new mapboxgl.Marker({
416
+ element: el,
417
+ anchor: 'center'
418
+ })
419
+ .setLngLat([lng, lat])
420
+ .setPopup(popup)
421
+ .addTo(map.current);
422
+
423
+ // Add click handler
424
+ el.addEventListener('click', () => {
425
+ console.log('πŸ“ [NO CONFLICT GLOBE] Marker clicked:', project);
426
+ onProjectClick(project);
427
+ });
428
+
429
+ // Verify marker position after a short delay
430
+ setTimeout(() => {
431
+ const markerLngLat = marker.getLngLat();
432
+ console.log(`πŸ” [NO CONFLICT GLOBE] Marker ${index} position verification:`, {
433
+ expected: [lng, lat],
434
+ actual: [markerLngLat.lng, markerLngLat.lat],
435
+ project: project.name,
436
+ match: Math.abs(markerLngLat.lng - lng) < 0.0001 && Math.abs(markerLngLat.lat - lat) < 0.0001
437
+ });
438
+ }, 100);
439
+
440
+ console.log(`βœ… [NO CONFLICT GLOBE] Marker ${index} added at:`, [lng, lat]);
441
+ });
442
+
443
+ // Fit map to show all markers if we have valid coordinates
444
+ if (hasValidCoordinates && !bounds.isEmpty()) {
445
+ console.log('πŸ—ΊοΈ [NO CONFLICT GLOBE] Fitting map to bounds:', bounds);
446
+ map.current.fitBounds(bounds, {
447
+ padding: { top: 20, bottom: 20, left: 20, right: 20 },
448
+ maxZoom: 6,
449
+ duration: 1000
450
+ });
451
+ boundsRef.current = bounds;
452
+ } else {
453
+ boundsRef.current = null;
454
+ }
455
+ });
456
+
457
+ return () => {
458
+ if (map.current) {
459
+ map.current.remove();
460
+ map.current = null;
461
+ }
462
+ };
463
+ }, [projects, onProjectClick, mapConfig]);
464
+
465
+ return (
466
+ <div
467
+ className="no-conflict-globe-container"
468
+ style={{
469
+ width: '100%',
470
+ height: '100%',
471
+ position: 'relative',
472
+ isolation: 'isolate'
473
+ }}
474
+ >
475
+ <div
476
+ ref={mapContainer}
477
+ style={{
478
+ width: '100%',
479
+ height: '100%',
480
+ position: 'relative',
481
+ isolation: 'isolate'
482
+ }}
483
+ />
484
+ </div>
485
+ );
486
+ };
487
+
488
+ export default NoConflictGlobe;
@@ -1,6 +1,6 @@
1
1
  import SimpleGlobe from "./SimpleGlobe";
2
2
  import SimpleGlobeDebug from "./SimpleGlobeDebug";
3
- import IsolatedGlobe from "./IsolatedGlobe";
3
+ import NoConflictGlobe from "./NoConflictGlobe";
4
4
  import CSSInJSGlobe from "./CSSInJSGlobe";
5
5
  import ThemeLayout from "../../ThemeLayout";
6
6
  import Widget from "../Widget";
@@ -285,14 +285,14 @@ export const DebugVersion = {
285
285
  )
286
286
  };
287
287
 
288
- export const IsolatedVersion = {
289
- name: "Isolated Version (Shadow DOM)",
288
+ export const NoConflictVersion = {
289
+ name: "No Conflict Version (Aggressive CSS Isolation)",
290
290
  render: () => (
291
291
  <div style={{ margin: "3em" }}>
292
292
  <ThemeLayout>
293
- <Widget title="Isolated Globe (Shadow DOM)" className="no-px no-pb-body">
293
+ <Widget title="No Conflict Globe (Aggressive CSS Isolation)" className="no-px no-pb-body">
294
294
  <div style={{ width: '100%', height: '600px' }}>
295
- <IsolatedGlobe projects={SAMPLE_PROJECTS} type="location" color="#4ECDC4" />
295
+ <NoConflictGlobe projects={SAMPLE_PROJECTS} type="location" color="#4ECDC4" />
296
296
  </div>
297
297
  </Widget>
298
298
  </ThemeLayout>
package/src/index.js CHANGED
@@ -64,6 +64,7 @@ export { default as InExpandableWidgetMap } from "./@daf/core/components/Dashboa
64
64
  export { default as Globe } from "./@daf/core/components/Dashboard/Globe/index.jsx";
65
65
  export { default as SimpleGlobe } from "./@daf/core/components/Dashboard/Globe/SimpleGlobe.jsx";
66
66
  export { default as IsolatedGlobe } from "./@daf/core/components/Dashboard/Globe/IsolatedGlobe.jsx";
67
+ export { default as NoConflictGlobe } from "./@daf/core/components/Dashboard/Globe/NoConflictGlobe.jsx";
67
68
  export { default as WidgetPlaceholder } from "./@daf/core/components/Dashboard/Widget/WidgetPlaceholder/index.jsx";
68
69
  export { default as Steps } from "./@daf/core/components/Dashboard/Steps/index.jsx";
69
70
  export { default as DashboardLayout } from "./@daf/core/components/Dashboard/DashboardLayout/index.jsx";