@smartnet360/svelte-components 0.0.85 → 0.0.86
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/apps/antenna-pattern/components/AntennaControls.svelte +1 -106
- package/dist/apps/antenna-pattern/components/AntennaDiagrams.svelte +0 -36
- package/dist/apps/antenna-pattern/components/AntennaSettingsModal.svelte +0 -2
- package/dist/apps/antenna-pattern/components/PlotlyRadarChart.svelte +0 -22
- package/dist/apps/antenna-pattern/components/chart-engines/PolarAreaChart.svelte +0 -2
- package/dist/apps/antenna-pattern/components/chart-engines/PolarBarChart.svelte +0 -2
- package/dist/apps/antenna-pattern/components/chart-engines/PolarLineChart.svelte +0 -2
- package/dist/apps/site-check/data-loader.js +0 -8
- package/dist/core/Charts/GlobalControls.svelte +0 -4
- package/dist/core/Desktop/Grid/ResizeHandle.svelte +0 -7
- package/dist/core/Desktop/Grid/resizeStore.js +0 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/map-v2/demo/DemoMap.svelte +0 -2
- package/dist/map-v2/demo/demo-cells.js +0 -1
- package/dist/map-v2/features/cells/layers/CellsLayer.svelte +7 -26
- package/dist/map-v2/features/cells/utils/cellTree.js +0 -29
- package/dist/map-v2/features/repeaters/layers/RepeaterLabelsLayer.svelte +3 -27
- package/dist/map-v2/features/repeaters/layers/RepeatersLayer.svelte +8 -25
- package/dist/map-v2/features/repeaters/utils/repeaterTree.js +0 -6
- package/dist/map-v2/features/sites/controls/SiteFilterControl.svelte +0 -8
- package/dist/map-v2/features/sites/utils/siteTreeUtils.js +0 -6
- package/dist/map-v3/core/components/Map.svelte +89 -0
- package/dist/map-v3/core/components/Map.svelte.d.ts +13 -0
- package/dist/map-v3/core/controls/FeatureSettingsControl.svelte +103 -0
- package/dist/map-v3/core/controls/FeatureSettingsControl.svelte.d.ts +15 -0
- package/dist/map-v3/core/controls/MapStyleControl.svelte +271 -0
- package/dist/map-v3/core/controls/MapStyleControl.svelte.d.ts +28 -0
- package/dist/map-v3/core/index.d.ts +3 -0
- package/dist/map-v3/core/index.js +3 -0
- package/dist/map-v3/core/stores/map.store.svelte.d.ts +8 -0
- package/dist/map-v3/core/stores/map.store.svelte.js +29 -0
- package/dist/map-v3/core/stores/viewport.store.svelte.d.ts +38 -0
- package/dist/map-v3/core/stores/viewport.store.svelte.js +107 -0
- package/dist/map-v3/demo/DemoMap.svelte +104 -0
- package/dist/map-v3/demo/DemoMap.svelte.d.ts +6 -0
- package/dist/map-v3/demo/demo-cells.d.ts +13 -0
- package/dist/map-v3/demo/demo-cells.js +130 -0
- package/dist/map-v3/demo/demo-data.d.ts +8 -0
- package/dist/map-v3/demo/demo-data.js +104 -0
- package/dist/map-v3/demo/demo-repeaters.d.ts +13 -0
- package/dist/map-v3/demo/demo-repeaters.js +73 -0
- package/dist/map-v3/features/cells/components/CellFilterControl.svelte +208 -0
- package/dist/map-v3/features/cells/components/CellFilterControl.svelte.d.ts +12 -0
- package/dist/map-v3/features/cells/components/CellSettingsPanel.svelte +229 -0
- package/dist/map-v3/features/cells/components/CellSettingsPanel.svelte.d.ts +7 -0
- package/dist/map-v3/features/cells/constants.d.ts +18 -0
- package/dist/map-v3/features/cells/constants.js +37 -0
- package/dist/map-v3/features/cells/layers/CellLabelsLayer.svelte +230 -0
- package/dist/map-v3/features/cells/layers/CellLabelsLayer.svelte.d.ts +11 -0
- package/dist/map-v3/features/cells/layers/CellsLayer.svelte +194 -0
- package/dist/map-v3/features/cells/layers/CellsLayer.svelte.d.ts +11 -0
- package/dist/map-v3/features/cells/layers/index.d.ts +2 -0
- package/dist/map-v3/features/cells/layers/index.js +2 -0
- package/dist/map-v3/features/cells/logic/geometry.d.ts +12 -0
- package/dist/map-v3/features/cells/logic/geometry.js +35 -0
- package/dist/map-v3/features/cells/logic/grouping.d.ts +18 -0
- package/dist/map-v3/features/cells/logic/grouping.js +30 -0
- package/dist/map-v3/features/cells/logic/tree-adapter.d.ts +11 -0
- package/dist/map-v3/features/cells/logic/tree-adapter.js +53 -0
- package/dist/map-v3/features/cells/stores/cell.data.svelte.d.ts +9 -0
- package/dist/map-v3/features/cells/stores/cell.data.svelte.js +16 -0
- package/dist/map-v3/features/cells/stores/cell.display.svelte.d.ts +25 -0
- package/dist/map-v3/features/cells/stores/cell.display.svelte.js +67 -0
- package/dist/map-v3/features/cells/stores/cell.registry.svelte.d.ts +23 -0
- package/dist/map-v3/features/cells/stores/cell.registry.svelte.js +68 -0
- package/dist/map-v3/features/cells/types.d.ts +62 -0
- package/dist/map-v3/features/cells/types.js +6 -0
- package/dist/map-v3/features/repeaters/components/RepeaterFilterControl.svelte +148 -0
- package/dist/map-v3/features/repeaters/components/RepeaterFilterControl.svelte.d.ts +12 -0
- package/dist/map-v3/features/repeaters/components/RepeaterSettingsPanel.svelte +209 -0
- package/dist/map-v3/features/repeaters/components/RepeaterSettingsPanel.svelte.d.ts +7 -0
- package/dist/map-v3/features/repeaters/layers/RepeaterLabelsLayer.svelte +177 -0
- package/dist/map-v3/features/repeaters/layers/RepeaterLabelsLayer.svelte.d.ts +11 -0
- package/dist/map-v3/features/repeaters/layers/RepeatersLayer.svelte +163 -0
- package/dist/map-v3/features/repeaters/layers/RepeatersLayer.svelte.d.ts +11 -0
- package/dist/map-v3/features/repeaters/logic/geometry.d.ts +3 -0
- package/dist/map-v3/features/repeaters/logic/geometry.js +23 -0
- package/dist/map-v3/features/repeaters/logic/grouping.d.ts +8 -0
- package/dist/map-v3/features/repeaters/logic/grouping.js +20 -0
- package/dist/map-v3/features/repeaters/logic/tree-adapter.d.ts +8 -0
- package/dist/map-v3/features/repeaters/logic/tree-adapter.js +43 -0
- package/dist/map-v3/features/repeaters/stores/repeater.data.svelte.d.ts +8 -0
- package/dist/map-v3/features/repeaters/stores/repeater.data.svelte.js +13 -0
- package/dist/map-v3/features/repeaters/stores/repeater.display.svelte.d.ts +21 -0
- package/dist/map-v3/features/repeaters/stores/repeater.display.svelte.js +64 -0
- package/dist/map-v3/features/repeaters/stores/repeater.registry.svelte.d.ts +23 -0
- package/dist/map-v3/features/repeaters/stores/repeater.registry.svelte.js +68 -0
- package/dist/map-v3/features/repeaters/types.d.ts +18 -0
- package/dist/map-v3/features/repeaters/types.js +1 -0
- package/dist/map-v3/features/sites/components/SiteFilterControl.svelte +119 -0
- package/dist/map-v3/features/sites/components/SiteFilterControl.svelte.d.ts +12 -0
- package/dist/map-v3/features/sites/components/SiteSettingsPanel.svelte +241 -0
- package/dist/map-v3/features/sites/components/SiteSettingsPanel.svelte.d.ts +7 -0
- package/dist/map-v3/features/sites/layers/SiteLabelsLayer.svelte +152 -0
- package/dist/map-v3/features/sites/layers/SiteLabelsLayer.svelte.d.ts +11 -0
- package/dist/map-v3/features/sites/layers/SitesLayer.svelte +132 -0
- package/dist/map-v3/features/sites/layers/SitesLayer.svelte.d.ts +11 -0
- package/dist/map-v3/features/sites/logic/tree-adapter.d.ts +9 -0
- package/dist/map-v3/features/sites/logic/tree-adapter.js +75 -0
- package/dist/map-v3/features/sites/stores/site.data.svelte.d.ts +8 -0
- package/dist/map-v3/features/sites/stores/site.data.svelte.js +40 -0
- package/dist/map-v3/features/sites/stores/site.display.svelte.d.ts +20 -0
- package/dist/map-v3/features/sites/stores/site.display.svelte.js +63 -0
- package/dist/map-v3/features/sites/stores/site.registry.svelte.d.ts +13 -0
- package/dist/map-v3/features/sites/stores/site.registry.svelte.js +83 -0
- package/dist/map-v3/features/sites/types.d.ts +12 -0
- package/dist/map-v3/features/sites/types.js +1 -0
- package/dist/map-v3/index.d.ts +26 -0
- package/dist/map-v3/index.js +31 -0
- package/dist/map-v3/shared/controls/MapControl.svelte +242 -0
- package/dist/map-v3/shared/controls/MapControl.svelte.d.ts +27 -0
- package/dist/map-v3/shared/index.d.ts +1 -0
- package/dist/map-v3/shared/index.js +1 -0
- package/package.json +1 -1
|
@@ -56,29 +56,15 @@
|
|
|
56
56
|
// Get available electrical tilts from antennas with the selected name and frequency
|
|
57
57
|
let availableElectricalTilts = $state<string[]>(['0']);
|
|
58
58
|
$effect(() => {
|
|
59
|
-
console.log('🔄 [TILTS] Effect triggered - updating available tilts:', {
|
|
60
|
-
antenna: internalSelectedAntenna?.name,
|
|
61
|
-
frequency: selectedFrequency,
|
|
62
|
-
currentTilts: availableElectricalTilts,
|
|
63
|
-
timestamp: new Date().toISOString()
|
|
64
|
-
});
|
|
65
|
-
|
|
66
59
|
let newTilts: string[] = ['0'];
|
|
67
60
|
|
|
68
61
|
if (internalSelectedAntenna) {
|
|
69
62
|
// Find ALL antennas with the same name and frequency to collect all electrical tilts
|
|
70
63
|
let sameName = antennas.filter(a => a.name === internalSelectedAntenna!.name);
|
|
71
|
-
console.log('🔍 [TILTS] Found antennas with same name:', sameName.length);
|
|
72
64
|
|
|
73
65
|
// If frequency is selected, filter by it
|
|
74
66
|
if (selectedFrequency) {
|
|
75
|
-
const beforeFilter = sameName.length;
|
|
76
67
|
sameName = sameName.filter(a => a.frequency === selectedFrequency);
|
|
77
|
-
console.log('🔍 [TILTS] After frequency filter:', {
|
|
78
|
-
before: beforeFilter,
|
|
79
|
-
after: sameName.length,
|
|
80
|
-
frequency: selectedFrequency
|
|
81
|
-
});
|
|
82
68
|
}
|
|
83
69
|
|
|
84
70
|
const allTilts = new Set<string>();
|
|
@@ -96,14 +82,6 @@
|
|
|
96
82
|
|
|
97
83
|
// Convert to sorted array
|
|
98
84
|
newTilts = Array.from(allTilts).sort((a, b) => parseFloat(a) - parseFloat(b));
|
|
99
|
-
|
|
100
|
-
console.log('✅ [TILTS] Available tilts calculated:', {
|
|
101
|
-
from: availableElectricalTilts,
|
|
102
|
-
to: newTilts,
|
|
103
|
-
changed: JSON.stringify(availableElectricalTilts) !== JSON.stringify(newTilts)
|
|
104
|
-
});
|
|
105
|
-
} else {
|
|
106
|
-
console.log('ℹ️ [TILTS] No antenna selected, using default tilts');
|
|
107
85
|
}
|
|
108
86
|
|
|
109
87
|
// Only update if actually changed to prevent infinite loops
|
|
@@ -141,34 +119,12 @@
|
|
|
141
119
|
|
|
142
120
|
// Handle frequency selection
|
|
143
121
|
function handleFrequencyChange(frequency: number) {
|
|
144
|
-
console.log('🔄 [FREQ] handleFrequencyChange called:', {
|
|
145
|
-
requestedFrequency: frequency,
|
|
146
|
-
currentSelectedFrequency: selectedFrequency,
|
|
147
|
-
currentAntenna: internalSelectedAntenna?.name,
|
|
148
|
-
currentTiltIndex: internalElectricalTiltIndex,
|
|
149
|
-
availableTilts: availableElectricalTilts,
|
|
150
|
-
timestamp: new Date().toISOString()
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
const previousFrequency = selectedFrequency;
|
|
154
122
|
selectedFrequency = frequency;
|
|
155
123
|
|
|
156
|
-
console.log('📝 [FREQ] Frequency state updated:', {
|
|
157
|
-
from: previousFrequency,
|
|
158
|
-
to: selectedFrequency,
|
|
159
|
-
changed: previousFrequency !== selectedFrequency
|
|
160
|
-
});
|
|
161
|
-
|
|
162
124
|
if (internalSelectedAntenna) {
|
|
163
125
|
// STEP 1: Calculate available tilts for the new frequency
|
|
164
126
|
let sameName = antennas.filter(a => a.name === internalSelectedAntenna!.name && a.frequency === frequency);
|
|
165
127
|
|
|
166
|
-
console.log('🔍 [FREQ] Found antennas with same name and new frequency:', {
|
|
167
|
-
antennaName: internalSelectedAntenna.name,
|
|
168
|
-
frequency: frequency,
|
|
169
|
-
count: sameName.length
|
|
170
|
-
});
|
|
171
|
-
|
|
172
128
|
const allTilts = new Set<string>();
|
|
173
129
|
sameName.forEach(antenna => {
|
|
174
130
|
if (antenna.tilt) {
|
|
@@ -183,11 +139,6 @@
|
|
|
183
139
|
|
|
184
140
|
const newAvailableTilts = Array.from(allTilts).sort((a, b) => parseFloat(a) - parseFloat(b));
|
|
185
141
|
|
|
186
|
-
console.log('🔧 [FREQ] Calculated tilts for new frequency:', {
|
|
187
|
-
availableTilts: newAvailableTilts,
|
|
188
|
-
hasZeroTilt: newAvailableTilts.includes('0')
|
|
189
|
-
});
|
|
190
|
-
|
|
191
142
|
// STEP 2: Determine the best tilt index to use
|
|
192
143
|
let bestTiltIndex = 0;
|
|
193
144
|
let bestTiltValue = '0';
|
|
@@ -203,12 +154,6 @@
|
|
|
203
154
|
}
|
|
204
155
|
}
|
|
205
156
|
|
|
206
|
-
console.log('🎯 [FREQ] Selected best tilt:', {
|
|
207
|
-
index: bestTiltIndex,
|
|
208
|
-
value: bestTiltValue,
|
|
209
|
-
reason: newAvailableTilts.includes('0') ? 'preferred 0 tilt' : 'first available tilt'
|
|
210
|
-
});
|
|
211
|
-
|
|
212
157
|
// STEP 3: Find antenna with the new frequency and best tilt
|
|
213
158
|
const antennaWithNewFreq = antennas.find(antenna => {
|
|
214
159
|
if (antenna.name !== internalSelectedAntenna!.name) return false;
|
|
@@ -224,60 +169,19 @@
|
|
|
224
169
|
}
|
|
225
170
|
return bestTiltValue === '0';
|
|
226
171
|
});
|
|
227
|
-
|
|
228
|
-
console.log('🎯 [FREQ] Antenna search result:', {
|
|
229
|
-
found: !!antennaWithNewFreq,
|
|
230
|
-
searchCriteria: {
|
|
231
|
-
name: internalSelectedAntenna.name,
|
|
232
|
-
frequency: frequency,
|
|
233
|
-
tiltValue: bestTiltValue
|
|
234
|
-
},
|
|
235
|
-
antenna: antennaWithNewFreq ? {
|
|
236
|
-
name: antennaWithNewFreq.name,
|
|
237
|
-
frequency: antennaWithNewFreq.frequency,
|
|
238
|
-
tilt: antennaWithNewFreq.tilt
|
|
239
|
-
} : null
|
|
240
|
-
});
|
|
241
172
|
|
|
242
173
|
if (antennaWithNewFreq) {
|
|
243
|
-
const previousAntenna = internalSelectedAntenna;
|
|
244
|
-
const previousTiltIndex = internalElectricalTiltIndex;
|
|
245
|
-
|
|
246
174
|
internalSelectedAntenna = antennaWithNewFreq;
|
|
247
175
|
internalElectricalTiltIndex = bestTiltIndex;
|
|
248
176
|
|
|
249
|
-
console.log('✅ [FREQ] Antenna and tilt updated:', {
|
|
250
|
-
antenna: {
|
|
251
|
-
from: {
|
|
252
|
-
name: previousAntenna.name,
|
|
253
|
-
frequency: previousAntenna.frequency,
|
|
254
|
-
tilt: previousAntenna.tilt
|
|
255
|
-
},
|
|
256
|
-
to: {
|
|
257
|
-
name: antennaWithNewFreq.name,
|
|
258
|
-
frequency: antennaWithNewFreq.frequency,
|
|
259
|
-
tilt: antennaWithNewFreq.tilt
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
|
-
tiltIndex: {
|
|
263
|
-
from: previousTiltIndex,
|
|
264
|
-
to: bestTiltIndex
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
console.log('📞 [FREQ] Calling onAntennaChange callback');
|
|
269
177
|
onAntennaChange?.(antennaWithNewFreq);
|
|
270
|
-
|
|
271
|
-
console.log('📞 [FREQ] Calling onElectricalTiltChange callback with index', bestTiltIndex);
|
|
272
178
|
onElectricalTiltChange?.(bestTiltIndex);
|
|
273
179
|
} else {
|
|
274
|
-
console.warn('⚠️ [FREQ] No antenna found for frequency, keeping current antenna');
|
|
275
180
|
// Reset tilt to 0 as fallback
|
|
276
181
|
internalElectricalTiltIndex = 0;
|
|
277
182
|
onElectricalTiltChange?.(0);
|
|
278
183
|
}
|
|
279
184
|
} else {
|
|
280
|
-
console.log('ℹ️ [FREQ] No current antenna selected');
|
|
281
185
|
internalElectricalTiltIndex = 0;
|
|
282
186
|
onElectricalTiltChange?.(0);
|
|
283
187
|
}
|
|
@@ -498,16 +402,7 @@
|
|
|
498
402
|
<button
|
|
499
403
|
type="button"
|
|
500
404
|
class="btn btn-sm {selectedFrequency === freq ? 'btn-primary' : 'btn-outline-secondary'}"
|
|
501
|
-
onclick={(
|
|
502
|
-
console.log('🖱️ [FREQ] Button clicked:', {
|
|
503
|
-
frequency: freq,
|
|
504
|
-
currentSelectedFrequency: selectedFrequency,
|
|
505
|
-
isAlreadySelected: selectedFrequency === freq,
|
|
506
|
-
clickEvent: e.type,
|
|
507
|
-
timestamp: new Date().toISOString()
|
|
508
|
-
});
|
|
509
|
-
handleFrequencyChange(freq);
|
|
510
|
-
}}
|
|
405
|
+
onclick={() => handleFrequencyChange(freq)}
|
|
511
406
|
>
|
|
512
407
|
{freq} MHz
|
|
513
408
|
</button>
|
|
@@ -39,34 +39,12 @@
|
|
|
39
39
|
|
|
40
40
|
// Handle antenna selection from controls
|
|
41
41
|
function handleAntenna1Change(antenna: Antenna | null) {
|
|
42
|
-
console.log('📥 [PARENT] handleAntenna1Change called:', {
|
|
43
|
-
antenna: antenna ? {
|
|
44
|
-
name: antenna.name,
|
|
45
|
-
frequency: antenna.frequency,
|
|
46
|
-
tilt: antenna.tilt
|
|
47
|
-
} : null,
|
|
48
|
-
previousAntenna: selectedAntenna ? {
|
|
49
|
-
name: selectedAntenna.name,
|
|
50
|
-
frequency: selectedAntenna.frequency,
|
|
51
|
-
tilt: selectedAntenna.tilt
|
|
52
|
-
} : null,
|
|
53
|
-
timestamp: new Date().toISOString()
|
|
54
|
-
});
|
|
55
|
-
|
|
56
42
|
selectedAntenna = antenna;
|
|
57
43
|
if (antenna) {
|
|
58
44
|
// Update available electrical tilts based on selected antenna
|
|
59
|
-
const previousTilts = [...availableElectricalTilts];
|
|
60
45
|
availableElectricalTilts = antenna.tilt ?
|
|
61
46
|
antenna.tilt.split(',').map(t => t.trim()) :
|
|
62
47
|
['0', '2', '4', '6', '8'];
|
|
63
|
-
|
|
64
|
-
console.log('🔧 [PARENT] Updated available tilts and reset positions:', {
|
|
65
|
-
from: previousTilts,
|
|
66
|
-
to: availableElectricalTilts,
|
|
67
|
-
electricalTiltReset: ant1ElectricalTilt,
|
|
68
|
-
mechanicalTiltReset: ant1MechanicalTilt
|
|
69
|
-
});
|
|
70
48
|
|
|
71
49
|
ant1ElectricalTilt = 0;
|
|
72
50
|
ant1MechanicalTilt = 0;
|
|
@@ -83,22 +61,10 @@
|
|
|
83
61
|
|
|
84
62
|
// Handle electrical tilt changes from controls
|
|
85
63
|
function handleTilt1Change(tilt: number) {
|
|
86
|
-
console.log('📥 [PARENT] handleTilt1Change called:', {
|
|
87
|
-
tilt,
|
|
88
|
-
previousTilt: ant1ElectricalTilt,
|
|
89
|
-
changed: tilt !== ant1ElectricalTilt,
|
|
90
|
-
timestamp: new Date().toISOString()
|
|
91
|
-
});
|
|
92
64
|
ant1ElectricalTilt = tilt;
|
|
93
65
|
}
|
|
94
66
|
|
|
95
67
|
function handleTilt2Change(tilt: number) {
|
|
96
|
-
console.log('📥 [PARENT] handleTilt2Change called:', {
|
|
97
|
-
tilt,
|
|
98
|
-
previousTilt: ant2ElectricalTilt,
|
|
99
|
-
changed: tilt !== ant2ElectricalTilt,
|
|
100
|
-
timestamp: new Date().toISOString()
|
|
101
|
-
});
|
|
102
68
|
ant2ElectricalTilt = tilt;
|
|
103
69
|
}
|
|
104
70
|
|
|
@@ -140,8 +106,6 @@
|
|
|
140
106
|
ant2ElectricalTilt = 0;
|
|
141
107
|
ant2MechanicalTilt = 0;
|
|
142
108
|
}
|
|
143
|
-
|
|
144
|
-
console.log('Data refreshed from settings modal');
|
|
145
109
|
} catch (error) {
|
|
146
110
|
console.error('Failed to refresh data:', error);
|
|
147
111
|
}
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
async function handleExport() {
|
|
30
30
|
try {
|
|
31
31
|
await exportAntennas();
|
|
32
|
-
console.log('Data exported successfully');
|
|
33
32
|
} catch (error) {
|
|
34
33
|
console.error('Export failed:', error);
|
|
35
34
|
}
|
|
@@ -46,7 +45,6 @@
|
|
|
46
45
|
await clearAllAntennas();
|
|
47
46
|
showClearConfirm = false;
|
|
48
47
|
handleDataRefresh();
|
|
49
|
-
console.log('All data cleared successfully');
|
|
50
48
|
} catch (error) {
|
|
51
49
|
console.error('Clear data failed:', error);
|
|
52
50
|
}
|
|
@@ -63,21 +63,9 @@
|
|
|
63
63
|
|
|
64
64
|
async function initializeChart() {
|
|
65
65
|
if (!Plotly || !chartDiv || !data.length) {
|
|
66
|
-
console.log('PlotlyRadarChart - Cannot initialize:', {
|
|
67
|
-
hasPlotly: !!Plotly,
|
|
68
|
-
hasChartDiv: !!chartDiv,
|
|
69
|
-
dataLength: data.length
|
|
70
|
-
});
|
|
71
66
|
return;
|
|
72
67
|
}
|
|
73
68
|
|
|
74
|
-
console.log('PlotlyRadarChart - Initializing with data:', {
|
|
75
|
-
dataCount: data.length,
|
|
76
|
-
sampleData: data[0],
|
|
77
|
-
title,
|
|
78
|
-
showSliders
|
|
79
|
-
});
|
|
80
|
-
|
|
81
69
|
const { data: plotData, layout, config } = createPlotlyRadarConfig(
|
|
82
70
|
data,
|
|
83
71
|
title,
|
|
@@ -89,7 +77,6 @@
|
|
|
89
77
|
const sliders = createSliders();
|
|
90
78
|
if (sliders.length > 0) {
|
|
91
79
|
layout.sliders = sliders;
|
|
92
|
-
console.log('Added sliders:', sliders.length);
|
|
93
80
|
}
|
|
94
81
|
|
|
95
82
|
// Add pattern toggle if requested
|
|
@@ -97,13 +84,9 @@
|
|
|
97
84
|
layout.updatemenus = [createPatternToggleMenu()];
|
|
98
85
|
}
|
|
99
86
|
|
|
100
|
-
console.log('PlotlyRadarChart - Final layout:', layout);
|
|
101
|
-
console.log('PlotlyRadarChart - Plot data:', plotData);
|
|
102
|
-
|
|
103
87
|
try {
|
|
104
88
|
await Plotly.newPlot(chartDiv, plotData, layout, config);
|
|
105
89
|
chartInitialized = true;
|
|
106
|
-
console.log('PlotlyRadarChart - Successfully initialized');
|
|
107
90
|
|
|
108
91
|
// Set up event listeners using Plotly's event system
|
|
109
92
|
if (chartDiv) {
|
|
@@ -172,16 +155,12 @@
|
|
|
172
155
|
}
|
|
173
156
|
|
|
174
157
|
function handleSliderChange(eventData: any) {
|
|
175
|
-
console.log('Slider change event:', eventData);
|
|
176
|
-
|
|
177
158
|
// Handle slider changes and notify parent
|
|
178
159
|
if (onTiltChange && eventData && eventData.detail) {
|
|
179
160
|
const step = eventData.detail.step;
|
|
180
161
|
const sliderIndex = eventData.detail.slider.active;
|
|
181
162
|
const slider = eventData.detail.slider;
|
|
182
163
|
|
|
183
|
-
console.log('Slider details:', { step, sliderIndex, slider });
|
|
184
|
-
|
|
185
164
|
// Determine which antenna slider was changed based on position or other identifier
|
|
186
165
|
const antennaIndex = slider.x < 0.3 ? 1 : 2;
|
|
187
166
|
onTiltChange(antennaIndex, sliderIndex);
|
|
@@ -190,7 +169,6 @@
|
|
|
190
169
|
|
|
191
170
|
function handleButtonClick(eventData: any) {
|
|
192
171
|
// Handle button clicks (pattern toggle)
|
|
193
|
-
console.log('Button clicked:', eventData);
|
|
194
172
|
}
|
|
195
173
|
|
|
196
174
|
// Export methods for parent components
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
if (browser) {
|
|
46
46
|
try {
|
|
47
47
|
Plotly = await import('plotly.js-dist-min');
|
|
48
|
-
console.log('Plotly loaded for polar area chart');
|
|
49
48
|
await initializeChart();
|
|
50
49
|
} catch (error) {
|
|
51
50
|
console.error('Failed to load Plotly:', error);
|
|
@@ -91,7 +90,6 @@
|
|
|
91
90
|
try {
|
|
92
91
|
await Plotly.newPlot(chartDiv, data, layout, config);
|
|
93
92
|
chartInitialized = true;
|
|
94
|
-
console.log('Polar area chart initialized');
|
|
95
93
|
} catch (error) {
|
|
96
94
|
console.error('Failed to create polar area chart:', error);
|
|
97
95
|
}
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
if (browser) {
|
|
46
46
|
try {
|
|
47
47
|
Plotly = await import('plotly.js-dist-min');
|
|
48
|
-
console.log('Plotly loaded for polar bar chart');
|
|
49
48
|
await initializeChart();
|
|
50
49
|
} catch (error) {
|
|
51
50
|
console.error('Failed to load Plotly:', error);
|
|
@@ -90,7 +89,6 @@
|
|
|
90
89
|
try {
|
|
91
90
|
await Plotly.newPlot(chartDiv, data, layout, config);
|
|
92
91
|
chartInitialized = true;
|
|
93
|
-
console.log('Polar bar chart initialized');
|
|
94
92
|
} catch (error) {
|
|
95
93
|
console.error('Failed to create polar bar chart:', error);
|
|
96
94
|
}
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
if (browser) {
|
|
46
46
|
try {
|
|
47
47
|
Plotly = await import('plotly.js-dist-min');
|
|
48
|
-
console.log('Plotly loaded for polar line chart');
|
|
49
48
|
await initializeChart();
|
|
50
49
|
} catch (error) {
|
|
51
50
|
console.error('Failed to load Plotly:', error);
|
|
@@ -91,7 +90,6 @@
|
|
|
91
90
|
try {
|
|
92
91
|
await Plotly.newPlot(chartDiv, data, layout, config);
|
|
93
92
|
chartInitialized = true;
|
|
94
|
-
console.log('Polar line chart initialized');
|
|
95
93
|
} catch (error) {
|
|
96
94
|
console.error('Failed to create polar line chart:', error);
|
|
97
95
|
}
|
|
@@ -19,14 +19,6 @@ export async function loadCellTrafficData() {
|
|
|
19
19
|
}
|
|
20
20
|
const text = await response.text();
|
|
21
21
|
const records = parseCsvData(text);
|
|
22
|
-
// Log sample of converted dates for debugging
|
|
23
|
-
if (records.length > 0) {
|
|
24
|
-
console.log('📅 Sample date conversions:', {
|
|
25
|
-
first: records[0].date,
|
|
26
|
-
last: records[records.length - 1].date,
|
|
27
|
-
totalRecords: records.length
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
22
|
return records;
|
|
31
23
|
}
|
|
32
24
|
/**
|
|
@@ -35,14 +35,10 @@
|
|
|
35
35
|
function saveSettings(updatedControls: GlobalChartControls) {
|
|
36
36
|
if (persistSettings && typeof window !== 'undefined') {
|
|
37
37
|
try {
|
|
38
|
-
console.log('💾 Saving chart controls to localStorage:', updatedControls);
|
|
39
38
|
localStorage.setItem(STORAGE_KEY, JSON.stringify(updatedControls));
|
|
40
|
-
console.log('✅ Saved successfully');
|
|
41
39
|
} catch (error) {
|
|
42
40
|
console.warn('Failed to save chart controls to localStorage:', error);
|
|
43
41
|
}
|
|
44
|
-
} else {
|
|
45
|
-
console.log('⚠️ Not saving: persistSettings =', persistSettings);
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
44
|
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
startHorizontalSize = horizontalSize;
|
|
20
20
|
startVerticalSize = verticalSize;
|
|
21
21
|
|
|
22
|
-
console.log('MouseDown:', { startX, startY, startHorizontalSize, startVerticalSize });
|
|
23
|
-
|
|
24
22
|
document.addEventListener('mousemove', handleMouseMove);
|
|
25
23
|
document.addEventListener('mouseup', handleMouseUp);
|
|
26
24
|
|
|
@@ -33,14 +31,10 @@
|
|
|
33
31
|
const deltaX = event.clientX - startX;
|
|
34
32
|
const deltaY = event.clientY - startY;
|
|
35
33
|
|
|
36
|
-
console.log('MouseMove:', { deltaX, deltaY });
|
|
37
|
-
|
|
38
34
|
// Always calculate both dimensions - let the layout decide what to do
|
|
39
35
|
const newHorizontalSize = Math.max(10, Math.min(90, startHorizontalSize + (deltaX / 4)));
|
|
40
36
|
const newVerticalSize = Math.max(10, Math.min(90, startVerticalSize + (deltaY / 4)));
|
|
41
37
|
|
|
42
|
-
console.log('Resize:', { newHorizontalSize, newVerticalSize });
|
|
43
|
-
|
|
44
38
|
dispatch('resize', {
|
|
45
39
|
horizontalSize: newHorizontalSize,
|
|
46
40
|
verticalSize: newVerticalSize
|
|
@@ -48,7 +42,6 @@
|
|
|
48
42
|
}
|
|
49
43
|
|
|
50
44
|
function handleMouseUp() {
|
|
51
|
-
console.log('MouseUp - stopping drag');
|
|
52
45
|
isDragging = false;
|
|
53
46
|
document.removeEventListener('mousemove', handleMouseMove);
|
|
54
47
|
document.removeEventListener('mouseup', handleMouseUp);
|
|
@@ -31,7 +31,6 @@ function createResizeStore() {
|
|
|
31
31
|
topHeight: Math.max(10, Math.min(90, verticalSize)),
|
|
32
32
|
bottomHeight: 100 - Math.max(10, Math.min(90, verticalSize))
|
|
33
33
|
};
|
|
34
|
-
console.log('Store update2D:', { horizontalSize, verticalSize, newState });
|
|
35
34
|
return newState;
|
|
36
35
|
})
|
|
37
36
|
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -4,5 +4,7 @@
|
|
|
4
4
|
export * from './core/index.js';
|
|
5
5
|
// Map components (Mapbox cellular visualization - v2)
|
|
6
6
|
export * from './map-v2/index.js';
|
|
7
|
+
// Map components (Mapbox cellular visualization - v3)
|
|
8
|
+
export * as MapV3 from './map-v3/index.js';
|
|
7
9
|
// Complete applications
|
|
8
10
|
export * from './apps/index.js';
|
|
@@ -81,7 +81,6 @@
|
|
|
81
81
|
|
|
82
82
|
// Handler for site selection action button
|
|
83
83
|
function handleAnalyzeSites(siteIds: string[]) {
|
|
84
|
-
console.log('Analyze sites:', siteIds);
|
|
85
84
|
// Example: Navigate to SiteCheck page with selected sites
|
|
86
85
|
// window.location.href = `/site-check?sites=${siteIds.join(',')}`;
|
|
87
86
|
// Or use SvelteKit navigate, or open modal, etc.
|
|
@@ -90,7 +89,6 @@
|
|
|
90
89
|
|
|
91
90
|
// Handler for generic feature selection action button
|
|
92
91
|
function handleProcessFeatures(featureIds: string[]) {
|
|
93
|
-
console.log('Process features:', featureIds);
|
|
94
92
|
alert(`Selected ${featureIds.length} features:\n${featureIds.join(', ')}`);
|
|
95
93
|
}
|
|
96
94
|
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import { useMapbox } from '../../../core/hooks/useMapbox';
|
|
16
16
|
import { cellsToGeoJSON } from '../utils/cellGeoJSON';
|
|
17
17
|
import { CELL_FILL_Z_INDEX, CELL_LINE_Z_INDEX, Z_INDEX_BY_BAND } from '../constants/zIndex';
|
|
18
|
+
import { log } from '../../../../core/logger';
|
|
18
19
|
|
|
19
20
|
interface Props {
|
|
20
21
|
/** Cell store context */
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
viewportUpdateTimer = setTimeout(() => {
|
|
57
58
|
if (!map) return;
|
|
58
59
|
const newZoom = map.getZoom();
|
|
59
|
-
|
|
60
|
+
log('CellsLayer: Viewport changed (zoom/pan), updating to zoom:', newZoom);
|
|
60
61
|
// Update zoom if changed
|
|
61
62
|
store.setCurrentZoom(newZoom);
|
|
62
63
|
// Force $effect to re-run by incrementing version (triggers on pan without zoom change)
|
|
@@ -71,8 +72,6 @@
|
|
|
71
72
|
function initializeLayer() {
|
|
72
73
|
if (!map) return;
|
|
73
74
|
|
|
74
|
-
console.log('CellsLayer: initializeLayer called');
|
|
75
|
-
|
|
76
75
|
// Set initial zoom
|
|
77
76
|
store.setCurrentZoom(map.getZoom());
|
|
78
77
|
|
|
@@ -91,12 +90,9 @@
|
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
onMount(() => {
|
|
94
|
-
console.log('CellsLayer: onMount, waiting for map...');
|
|
95
|
-
|
|
96
93
|
// Subscribe to map store
|
|
97
94
|
const unsubscribe = mapStore.subscribe((mapInstance) => {
|
|
98
95
|
if (mapInstance && !map) {
|
|
99
|
-
console.log('CellsLayer: Map available, initializing...');
|
|
100
96
|
map = mapInstance;
|
|
101
97
|
|
|
102
98
|
// Initial layer setup
|
|
@@ -142,14 +138,12 @@
|
|
|
142
138
|
// Track viewportVersion to force re-run on pan (even without zoom change)
|
|
143
139
|
viewportVersion;
|
|
144
140
|
|
|
145
|
-
|
|
141
|
+
log('CellsLayer update:', {
|
|
146
142
|
mounted,
|
|
147
143
|
hasMap: !!map,
|
|
148
144
|
showCells: store.showCells,
|
|
149
145
|
filteredCellsCount: store.filteredCells.length,
|
|
150
|
-
currentZoom: store.currentZoom
|
|
151
|
-
baseRadius: store.baseRadius,
|
|
152
|
-
viewportVersion
|
|
146
|
+
currentZoom: store.currentZoom
|
|
153
147
|
});
|
|
154
148
|
|
|
155
149
|
if (!mounted || !map) {
|
|
@@ -180,15 +174,9 @@
|
|
|
180
174
|
bounds.contains([cell.longitude, cell.latitude])
|
|
181
175
|
);
|
|
182
176
|
|
|
183
|
-
|
|
177
|
+
log('CellsLayer viewport filter:', {
|
|
184
178
|
totalFiltered: store.filteredCells.length,
|
|
185
|
-
visibleInViewport: visibleCells.length
|
|
186
|
-
bounds: {
|
|
187
|
-
north: bounds.getNorth(),
|
|
188
|
-
south: bounds.getSouth(),
|
|
189
|
-
east: bounds.getEast(),
|
|
190
|
-
west: bounds.getWest()
|
|
191
|
-
}
|
|
179
|
+
visibleInViewport: visibleCells.length
|
|
192
180
|
});
|
|
193
181
|
|
|
194
182
|
// Generate GeoJSON from visible cells only
|
|
@@ -200,18 +188,13 @@
|
|
|
200
188
|
store.cellGroupMap // Pass lookup map for O(1) color lookup
|
|
201
189
|
);
|
|
202
190
|
|
|
203
|
-
|
|
204
|
-
featureCount: geoJSON.features.length,
|
|
205
|
-
firstFeature: geoJSON.features[0]
|
|
206
|
-
});
|
|
191
|
+
log('CellsLayer GeoJSON generated:', geoJSON.features.length, 'features');
|
|
207
192
|
|
|
208
193
|
// Update or create source
|
|
209
194
|
const source = map.getSource(SOURCE_ID);
|
|
210
195
|
if (source && source.type === 'geojson') {
|
|
211
|
-
console.log('CellsLayer: Updating existing source');
|
|
212
196
|
source.setData(geoJSON);
|
|
213
197
|
} else {
|
|
214
|
-
console.log('CellsLayer: Creating new source');
|
|
215
198
|
map.addSource(SOURCE_ID, {
|
|
216
199
|
type: 'geojson',
|
|
217
200
|
data: geoJSON
|
|
@@ -235,7 +218,6 @@
|
|
|
235
218
|
|
|
236
219
|
// Add fill layer if not exists
|
|
237
220
|
if (!map.getLayer(fillLayerId)) {
|
|
238
|
-
console.log(`CellsLayer: Creating fill layer for z-index ${zIndex}`);
|
|
239
221
|
map.addLayer({
|
|
240
222
|
id: fillLayerId,
|
|
241
223
|
type: 'fill',
|
|
@@ -261,7 +243,6 @@
|
|
|
261
243
|
|
|
262
244
|
// Add line layer if not exists
|
|
263
245
|
if (!map.getLayer(lineLayerId)) {
|
|
264
|
-
console.log(`CellsLayer: Creating line layer for z-index ${zIndex}`);
|
|
265
246
|
map.addLayer({
|
|
266
247
|
id: lineLayerId,
|
|
267
248
|
type: 'line',
|
|
@@ -211,30 +211,16 @@ function buildNestedTree(cells, level1, level2, colorMap, labelMap) {
|
|
|
211
211
|
* @returns Filtered array of cells
|
|
212
212
|
*/
|
|
213
213
|
export function getFilteredCells(checkedPaths, allCells) {
|
|
214
|
-
console.log('=== getFilteredCells START ===');
|
|
215
|
-
console.log('Checked paths:', Array.from(checkedPaths));
|
|
216
|
-
console.log('Total cells:', allCells.length);
|
|
217
214
|
// If root is checked (or no specific filters), return all cells
|
|
218
215
|
if (checkedPaths.has('root') && checkedPaths.size === 1) {
|
|
219
|
-
console.log('Root only checked, returning all cells');
|
|
220
216
|
return allCells;
|
|
221
217
|
}
|
|
222
|
-
// Sample first 3 cells for detailed logging
|
|
223
|
-
const sampleSize = 3;
|
|
224
|
-
let processedCount = 0;
|
|
225
218
|
// Filter cells that match any of the checked paths
|
|
226
219
|
const filtered = allCells.filter((cell) => {
|
|
227
|
-
const shouldLog = processedCount < sampleSize;
|
|
228
|
-
if (shouldLog) {
|
|
229
|
-
console.log(`\n--- Sample Cell ${processedCount + 1}: ${cell.id} ---`);
|
|
230
|
-
console.log(` Properties: tech="${cell.tech}", frq="${cell.frq}", status="${cell.status}"`);
|
|
231
|
-
}
|
|
232
220
|
// Check if this cell belongs to any checked path
|
|
233
221
|
const matched = Array.from(checkedPaths).some((path) => {
|
|
234
222
|
// Match cell properties against path segments
|
|
235
223
|
if (path === 'root') {
|
|
236
|
-
if (shouldLog)
|
|
237
|
-
console.log(` Path "root": MATCH`);
|
|
238
224
|
return true;
|
|
239
225
|
}
|
|
240
226
|
// Parse path and filter out "root" prefix and deduplicate consecutive segments
|
|
@@ -248,9 +234,6 @@ export function getFilteredCells(checkedPaths, allCells) {
|
|
|
248
234
|
prevSegment = segment;
|
|
249
235
|
}
|
|
250
236
|
}
|
|
251
|
-
if (shouldLog) {
|
|
252
|
-
console.log(` Checking path "${path}" (raw: [${allSegments.join(', ')}], filtered: [${segments.join(', ')}])`);
|
|
253
|
-
}
|
|
254
237
|
// Match filtered segments against cell properties
|
|
255
238
|
const segmentMatches = segments.every((segment) => {
|
|
256
239
|
const matches = (cell.tech === segment ||
|
|
@@ -260,23 +243,11 @@ export function getFilteredCells(checkedPaths, allCells) {
|
|
|
260
243
|
cell.customSubgroup === segment ||
|
|
261
244
|
cell.type === segment ||
|
|
262
245
|
cell.planner === segment);
|
|
263
|
-
if (shouldLog) {
|
|
264
|
-
console.log(` Segment "${segment}": ${matches ? '✓ MATCH' : '✗ NO MATCH'}`);
|
|
265
|
-
}
|
|
266
246
|
return matches;
|
|
267
247
|
});
|
|
268
|
-
if (shouldLog) {
|
|
269
|
-
console.log(` Path "${path}": ${segmentMatches ? '✓ MATCHED' : '✗ NOT MATCHED'}`);
|
|
270
|
-
}
|
|
271
248
|
return segmentMatches;
|
|
272
249
|
});
|
|
273
|
-
if (shouldLog) {
|
|
274
|
-
console.log(` Final result: ${matched ? '✓ INCLUDE' : '✗ EXCLUDE'}`);
|
|
275
|
-
}
|
|
276
|
-
processedCount++;
|
|
277
250
|
return matched;
|
|
278
251
|
});
|
|
279
|
-
console.log(`\nFiltered result: ${filtered.length} of ${allCells.length} cells`);
|
|
280
|
-
console.log('=== getFilteredCells END ===\n');
|
|
281
252
|
return filtered;
|
|
282
253
|
}
|