@smartnet360/svelte-components 0.0.133 → 0.0.135

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.
Files changed (40) hide show
  1. package/dist/core/CellHistory/CellHistoryPanel.svelte +178 -0
  2. package/dist/core/CellHistory/CellHistoryPanel.svelte.d.ts +4 -0
  3. package/dist/core/CellHistory/column-config.d.ts +26 -0
  4. package/dist/core/CellHistory/column-config.js +120 -0
  5. package/dist/core/CellHistory/index.d.ts +9 -0
  6. package/dist/core/CellHistory/index.js +10 -0
  7. package/dist/core/CellHistory/transformers.d.ts +16 -0
  8. package/dist/core/CellHistory/transformers.js +76 -0
  9. package/dist/core/CellHistory/types.d.ts +54 -0
  10. package/dist/core/CellHistory/types.js +6 -0
  11. package/dist/core/CellTable/CellHistoryDemo.svelte +1 -0
  12. package/dist/core/CellTable/CellTable.svelte +7 -5
  13. package/dist/core/CellTable/CellTablePanel.svelte +82 -14
  14. package/dist/core/CellTable/CellTablePanel.svelte.d.ts +2 -0
  15. package/dist/core/CellTable/column-config.js +46 -58
  16. package/dist/core/CellTableV2/CellTable.svelte +601 -0
  17. package/dist/core/CellTableV2/CellTable.svelte.d.ts +43 -0
  18. package/dist/core/CellTableV2/CellTablePanel.svelte +685 -0
  19. package/dist/core/CellTableV2/CellTablePanel.svelte.d.ts +98 -0
  20. package/dist/core/CellTableV2/CellTableToolbar.svelte +322 -0
  21. package/dist/core/CellTableV2/CellTableToolbar.svelte.d.ts +59 -0
  22. package/dist/core/CellTableV2/ColumnPicker.svelte +214 -0
  23. package/dist/core/CellTableV2/ColumnPicker.svelte.d.ts +26 -0
  24. package/dist/core/CellTableV2/column-config.d.ts +120 -0
  25. package/dist/core/CellTableV2/column-config.js +671 -0
  26. package/dist/core/CellTableV2/composables/index.d.ts +12 -0
  27. package/dist/core/CellTableV2/composables/index.js +9 -0
  28. package/dist/core/CellTableV2/composables/useColumnVisibility.svelte.d.ts +45 -0
  29. package/dist/core/CellTableV2/composables/useColumnVisibility.svelte.js +98 -0
  30. package/dist/core/CellTableV2/composables/usePersistence.svelte.d.ts +28 -0
  31. package/dist/core/CellTableV2/composables/usePersistence.svelte.js +101 -0
  32. package/dist/core/CellTableV2/composables/useScrollSpy.svelte.d.ts +44 -0
  33. package/dist/core/CellTableV2/composables/useScrollSpy.svelte.js +91 -0
  34. package/dist/core/CellTableV2/index.d.ts +12 -0
  35. package/dist/core/CellTableV2/index.js +14 -0
  36. package/dist/core/CellTableV2/types.d.ts +172 -0
  37. package/dist/core/CellTableV2/types.js +6 -0
  38. package/dist/core/index.d.ts +2 -0
  39. package/dist/core/index.js +5 -0
  40. package/package.json +1 -1
@@ -0,0 +1,26 @@
1
+ /**
2
+ * ColumnPicker - Column visibility customization dropdown
3
+ *
4
+ * Shows a dropdown panel with checkboxes to toggle individual column visibility.
5
+ * Works alongside presets - user can customize which columns are visible.
6
+ */
7
+ interface ColumnInfo {
8
+ field: string;
9
+ title: string;
10
+ group: string;
11
+ }
12
+ interface Props {
13
+ /** All available columns with their metadata */
14
+ columns: ColumnInfo[];
15
+ /** Currently visible column fields */
16
+ visibleColumns: string[];
17
+ /** Callback when column visibility changes */
18
+ onchange?: (field: string, visible: boolean) => void;
19
+ /** Callback to reset to preset defaults */
20
+ onreset?: () => void;
21
+ /** Current preset name for display */
22
+ presetName?: string;
23
+ }
24
+ declare const ColumnPicker: import("svelte").Component<Props, {}, "">;
25
+ type ColumnPicker = ReturnType<typeof ColumnPicker>;
26
+ export default ColumnPicker;
@@ -0,0 +1,120 @@
1
+ /**
2
+ * CellTable - Column Configuration
3
+ *
4
+ * Defines column definitions, presets, and formatters for the cell table
5
+ */
6
+ import type { ColumnDefinition, CellComponent } from 'tabulator-tables';
7
+ import type { CellTableColumn, ColumnPreset, TechColorMap, StatusColorMap, ColumnGroups } from './types';
8
+ /**
9
+ * Default technology colors (Bootstrap-aligned)
10
+ * 2G: Yellow, 4G: Purple, 5G: Green
11
+ */
12
+ export declare const DEFAULT_TECH_COLORS: TechColorMap;
13
+ /**
14
+ * Default status colors (Bootstrap-aligned)
15
+ */
16
+ export declare const DEFAULT_STATUS_COLORS: StatusColorMap;
17
+ /**
18
+ * Frequency band colors
19
+ * GSM: Yellow shades (darker = higher freq)
20
+ * LTE: Purple shades (darker = higher freq)
21
+ * 5G: Green shades (stronger = higher freq)
22
+ */
23
+ export declare const FBAND_COLORS: Record<string, string>;
24
+ /**
25
+ * Column groups for different presets
26
+ */
27
+ export declare const COLUMN_GROUPS: ColumnGroups;
28
+ /**
29
+ * Create a technology badge formatter
30
+ */
31
+ export declare function createTechFormatter(colors?: TechColorMap): (cell: CellComponent) => string;
32
+ /**
33
+ * Create a status badge formatter
34
+ */
35
+ export declare function createStatusFormatter(colors?: StatusColorMap): (cell: CellComponent) => string;
36
+ /**
37
+ * Create an fband badge formatter
38
+ */
39
+ export declare function createFbandFormatter(): (cell: CellComponent) => string;
40
+ /**
41
+ * Number formatter with fixed decimals
42
+ */
43
+ export declare function numberFormatter(decimals?: number): (cell: CellComponent) => string;
44
+ /**
45
+ * Coordinate formatter (lat/lng)
46
+ */
47
+ export declare function coordinateFormatter(cell: CellComponent): string;
48
+ /**
49
+ * Azimuth formatter with degree symbol
50
+ */
51
+ export declare function azimuthFormatter(cell: CellComponent): string;
52
+ /**
53
+ * Height formatter with meter unit
54
+ */
55
+ export declare function heightFormatter(cell: CellComponent): string;
56
+ /**
57
+ * Comparison formatter for Atoll vs Network values
58
+ * Shows both values side by side with color coding:
59
+ * - Green: values match exactly
60
+ * - Red: values don't match
61
+ * - Gray: one or both values missing
62
+ */
63
+ export declare function createCompareFormatter(atollField: string, nwtField: string): (cell: CellComponent) => string;
64
+ /**
65
+ * Custom sorter for fband - extracts numeric portion and sorts numerically
66
+ * Examples: LTE700 → 700, GSM900 → 900, LTE1800 → 1800, 5G-3500 → 3500
67
+ */
68
+ export declare function fbandSorter(a: string, b: string): number;
69
+ /**
70
+ * Custom sorter for cellName - sorts by the 5th character (sector digit)
71
+ * Example: 10001 → '1', 10002 → '2', 10003 → '3'
72
+ */
73
+ export declare function cellNameSectorSorter(a: string, b: string): number;
74
+ /**
75
+ * Combined multi-level sorter for cell data
76
+ * Sort order: tech (asc) → fband by numeric value (asc) → cellName by 5th digit (asc)
77
+ */
78
+ export declare function cellDataSorter<T extends {
79
+ tech?: string;
80
+ fband?: string;
81
+ cellName?: string;
82
+ }>(a: T, b: T): number;
83
+ /**
84
+ * Get all column definitions
85
+ */
86
+ export declare function getAllColumns(techColors?: TechColorMap, statusColors?: StatusColorMap, headerFilters?: boolean): CellTableColumn[];
87
+ /**
88
+ * Get columns for a specific preset
89
+ */
90
+ export declare function getColumnsForPreset(preset: ColumnPreset, techColors?: TechColorMap, statusColors?: StatusColorMap, headerFilters?: boolean): ColumnDefinition[];
91
+ /**
92
+ * Get group header formatter for a specific field
93
+ */
94
+ export declare function getGroupHeaderFormatter(groupField: string): (value: unknown, count: number) => string;
95
+ /**
96
+ * Column metadata for the column picker
97
+ */
98
+ export interface ColumnMeta {
99
+ field: string;
100
+ title: string;
101
+ group: string;
102
+ }
103
+ /**
104
+ * Options for filtering column metadata
105
+ */
106
+ export interface ColumnMetadataOptions {
107
+ /** Include only these groups (if specified, only these groups are included) */
108
+ include?: string[];
109
+ /** Exclude these groups (applied after include filter) */
110
+ exclude?: string[];
111
+ }
112
+ /**
113
+ * Get column metadata for the column picker UI
114
+ * @param options Filter options for including/excluding column groups
115
+ */
116
+ export declare function getColumnMetadata(options?: ColumnMetadataOptions): ColumnMeta[];
117
+ /**
118
+ * Get default visible columns for a preset
119
+ */
120
+ export declare function getPresetVisibleFields(preset: ColumnPreset): string[];