@smartnet360/svelte-components 0.0.140 → 0.0.142

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.
@@ -35,6 +35,11 @@ export async function parseMSIFile(file) {
35
35
  polarization: '',
36
36
  tilt_from_filename: ''
37
37
  };
38
+ // Extract tilt from filename: look for _##T or _##t pattern (underscore + 2 digits + T/t) anywhere
39
+ const tiltMatch = filename.match(/_(\d{2})[Tt]/);
40
+ if (tiltMatch) {
41
+ filenameMetadata.tilt_from_filename = tiltMatch[1];
42
+ }
38
43
  if (filenameParts.length >= 5) {
39
44
  filenameMetadata.name_from_filename = filenameParts[0];
40
45
  // Extract frequency from filename (e.g., "0699" -> 699)
@@ -53,10 +58,6 @@ export async function parseMSIFile(file) {
53
58
  if (filenameParts.length > 4 && filenameParts[4].startsWith('M')) {
54
59
  filenameMetadata.polarization = filenameParts[4].replace('M', '-');
55
60
  }
56
- // Extract tilt (e.g., "03T" -> "03")
57
- if (filenameParts.length > 5 && (filenameParts[5].endsWith('T') || filenameParts[5].endsWith('t'))) {
58
- filenameMetadata.tilt_from_filename = filenameParts[5].replace(/[Tt]$/, '');
59
- }
60
61
  }
61
62
  let currentSection = null;
62
63
  // Process each line
@@ -602,14 +602,29 @@
602
602
  <dt class="col-12 text-muted border-bottom pb-1 mb-2 mt-2">Other</dt>
603
603
  {#each otherFields as field}
604
604
  {@const value = clickedCell[field as keyof typeof clickedCell]}
605
- {@const displayValue = value === null || value === undefined ? '' :
606
- typeof value === 'number' ? (Number.isInteger(value) ? value : value.toFixed(4)) :
607
- typeof value === 'boolean' ? (value ? 'Yes' : 'No') :
608
- typeof value === 'object' ? JSON.stringify(value) :
609
- String(value)}
610
- {#if displayValue !== ''}
611
- <dt class="col-5 text-muted text-truncate" title={field}>{field}</dt>
612
- <dd class="col-7 text-truncate" title={String(displayValue)}>{displayValue}</dd>
605
+ {#if field === 'other' && value && typeof value === 'object' && !Array.isArray(value)}
606
+ <!-- Expand 'other' object properties -->
607
+ {#each Object.entries(value) as [subKey, subValue]}
608
+ {@const subDisplayValue = subValue === null || subValue === undefined ? '' :
609
+ typeof subValue === 'number' ? (Number.isInteger(subValue) ? subValue : subValue.toFixed(4)) :
610
+ typeof subValue === 'boolean' ? (subValue ? 'Yes' : 'No') :
611
+ typeof subValue === 'object' ? JSON.stringify(subValue) :
612
+ String(subValue)}
613
+ {#if subDisplayValue !== ''}
614
+ <dt class="col-5 text-muted text-truncate" title={subKey}>{subKey}</dt>
615
+ <dd class="col-7 text-truncate" title={String(subDisplayValue)}>{subDisplayValue}</dd>
616
+ {/if}
617
+ {/each}
618
+ {:else}
619
+ {@const displayValue = value === null || value === undefined ? '' :
620
+ typeof value === 'number' ? (Number.isInteger(value) ? value : value.toFixed(4)) :
621
+ typeof value === 'boolean' ? (value ? 'Yes' : 'No') :
622
+ typeof value === 'object' ? JSON.stringify(value) :
623
+ String(value)}
624
+ {#if displayValue !== ''}
625
+ <dt class="col-5 text-muted text-truncate" title={field}>{field}</dt>
626
+ <dd class="col-7 text-truncate" title={String(displayValue)}>{displayValue}</dd>
627
+ {/if}
613
628
  {/if}
614
629
  {/each}
615
630
  {/if}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartnet360/svelte-components",
3
- "version": "0.0.140",
3
+ "version": "0.0.142",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",