@smartnet360/svelte-components 0.0.24 → 0.0.25

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.
@@ -194,11 +194,8 @@
194
194
  <!-- Clear Data Section -->
195
195
  <div class="card border-danger">
196
196
  <div class="card-body">
197
- <h6 class="card-title text-danger">
198
- <i class="bi bi-exclamation-triangle me-2"></i>Danger Zone
199
- </h6>
200
197
  <p class="text-muted mb-3">
201
- Permanently delete all antenna data from the database. This action cannot be undone.
198
+ Permanently delete all antenna data from the database.
202
199
  </p>
203
200
 
204
201
  {#if !showClearConfirm}
@@ -11,6 +11,7 @@ export interface PlotlyRadarData {
11
11
  };
12
12
  fill?: 'tonext' | 'toself' | 'none';
13
13
  fillcolor?: string;
14
+ hovertemplate?: string;
14
15
  }
15
16
  export interface AntennaPattern {
16
17
  horizontal: number[];
@@ -149,7 +149,8 @@ export function convertAntennaToPlotlyData(antenna, mechanicalTilt, patternType,
149
149
  line: {
150
150
  color,
151
151
  width: 2
152
- }
152
+ },
153
+ hovertemplate: 'Gain: %{r:.1f} dB<br>Angle: %{theta}°<extra></extra>'
153
154
  };
154
155
  if (fillColor) {
155
156
  plotlyData.fill = 'toself';
@@ -12,6 +12,7 @@ export interface PolarAreaTraceData {
12
12
  };
13
13
  fillcolor: string;
14
14
  opacity: number;
15
+ hovertemplate?: string;
15
16
  }
16
17
  /**
17
18
  * Convert antenna pattern to Plotly polar area trace data
@@ -45,7 +45,8 @@ export function convertAntennaPatternToArea(pattern, name, baseColor, opacity =
45
45
  width: 2
46
46
  },
47
47
  fillcolor: fillColor,
48
- opacity: 1 // Set to 1 since we control opacity via fillcolor
48
+ opacity: 1, // Set to 1 since we control opacity via fillcolor
49
+ hovertemplate: '%{theta} <br>%{r:.2f} dB<extra></extra>'
49
50
  };
50
51
  }
51
52
  /**
@@ -12,6 +12,7 @@ export interface PolarBarTraceData {
12
12
  width: number;
13
13
  };
14
14
  };
15
+ hovertemplate?: string;
15
16
  }
16
17
  /**
17
18
  * Convert antenna pattern to Plotly polar bar trace data
@@ -41,7 +41,8 @@ export function convertAntennaPatternToBar(pattern, name, color, opacity = 0.7,
41
41
  color: color,
42
42
  width: 1
43
43
  }
44
- }
44
+ },
45
+ hovertemplate: '%{theta} <br>%{r:.2f} dB<extra></extra>'
45
46
  };
46
47
  }
47
48
  /**
@@ -10,6 +10,7 @@ export interface PolarLineTraceData {
10
10
  width: number;
11
11
  dash: string;
12
12
  };
13
+ hovertemplate?: string;
13
14
  }
14
15
  /**
15
16
  * Convert antenna pattern to Plotly polar line trace data
@@ -30,7 +30,8 @@ export function convertAntennaPatternToLine(pattern, name, color, width = 2, mec
30
30
  color,
31
31
  width,
32
32
  dash: 'solid' // Always solid lines
33
- }
33
+ },
34
+ hovertemplate: '%{theta} <br>%{r:.2f} dB<extra></extra>'
34
35
  };
35
36
  }
36
37
  /**
@@ -12,7 +12,7 @@ export async function parseMSIFile(file) {
12
12
  vertical_pattern: Array(360).fill(0)
13
13
  };
14
14
  // Parse filename for metadata
15
- const filename = file.name;
15
+ const filename = file.name.replace(/\.(msi|pnt)$/i, '');
16
16
  const filenameParts = filename.split('_');
17
17
  // Initialize filename metadata
18
18
  const filenameMetadata = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartnet360/svelte-components",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",