@smartnet360/svelte-components 0.0.103 → 0.0.104
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/site-check/SiteCheck.svelte +11 -77
- package/dist/apps/site-check/SiteCheckControls.svelte +0 -7
- package/dist/apps/site-check/helper.js +0 -33
- package/dist/apps/site-check/transforms.js +15 -65
- package/dist/core/CellTable/CellTable.svelte +456 -0
- package/dist/core/CellTable/CellTable.svelte.d.ts +27 -0
- package/dist/core/CellTable/CellTablePanel.svelte +211 -0
- package/dist/core/CellTable/CellTablePanel.svelte.d.ts +49 -0
- package/dist/core/CellTable/CellTableToolbar.svelte +218 -0
- package/dist/core/CellTable/CellTableToolbar.svelte.d.ts +32 -0
- package/dist/core/CellTable/column-config.d.ts +63 -0
- package/dist/core/CellTable/column-config.js +465 -0
- package/dist/core/CellTable/index.d.ts +10 -0
- package/dist/core/CellTable/index.js +11 -0
- package/dist/core/CellTable/types.d.ts +166 -0
- package/dist/core/CellTable/types.js +6 -0
- package/dist/core/Charts/ChartCard.svelte +0 -23
- package/dist/core/Charts/ChartComponent.svelte +0 -25
- package/dist/core/Charts/data-processor.js +1 -19
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +2 -0
- package/package.json +3 -2
- package/dist/apps/site-check/transforms-old.d.ts +0 -56
- package/dist/apps/site-check/transforms-old.js +0 -273
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CellTable - Column Configuration
|
|
3
|
+
*
|
|
4
|
+
* Defines column definitions, presets, and formatters for the cell table
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Default technology colors (Bootstrap-aligned)
|
|
8
|
+
*/
|
|
9
|
+
export const DEFAULT_TECH_COLORS = {
|
|
10
|
+
'2G': '#6c757d', // secondary gray
|
|
11
|
+
'3G': '#0d6efd', // primary blue
|
|
12
|
+
'4G': '#198754', // success green
|
|
13
|
+
'5G': '#6f42c1', // purple
|
|
14
|
+
'LTE': '#198754', // success green
|
|
15
|
+
'NR': '#6f42c1', // purple
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Default status colors (Bootstrap-aligned)
|
|
19
|
+
*/
|
|
20
|
+
export const DEFAULT_STATUS_COLORS = {
|
|
21
|
+
'On_Air': '#198754', // success green
|
|
22
|
+
'On_Air_UNDER_CONSTRUCTION': '#ffc107', // warning yellow
|
|
23
|
+
'On_Air_Locked': '#0dcaf0', // info cyan
|
|
24
|
+
'RF_Plan_Ready': '#0d6efd', // primary blue
|
|
25
|
+
'Re-Planned_RF_Plan_Ready': '#6f42c1', // purple
|
|
26
|
+
'Tavlati_RF_Plan_Ready': '#fd7e14', // orange
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Frequency band colors
|
|
30
|
+
*/
|
|
31
|
+
export const FBAND_COLORS = {
|
|
32
|
+
'GSM900': '#6c757d',
|
|
33
|
+
'GSM1800': '#495057',
|
|
34
|
+
'LTE700': '#dc3545',
|
|
35
|
+
'LTE800': '#e35d6a',
|
|
36
|
+
'LTE900': '#fd7e14',
|
|
37
|
+
'LTE1800': '#198754',
|
|
38
|
+
'LTE2100': '#20c997',
|
|
39
|
+
'LTE2600': '#0dcaf0',
|
|
40
|
+
'5G-700': '#6f42c1',
|
|
41
|
+
'5G-3500': '#d63384',
|
|
42
|
+
'NR3500': '#d63384',
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Column groups for different presets
|
|
46
|
+
*/
|
|
47
|
+
export const COLUMN_GROUPS = {
|
|
48
|
+
core: ['id', 'cellName', 'siteId', 'tech', 'fband', 'status'],
|
|
49
|
+
physical: ['antenna', 'azimuth', 'height', 'electricalTilt', 'beamwidth'],
|
|
50
|
+
network: ['dlEarfn', 'bcch', 'pci1', 'cellId3', 'nwtP1', 'nwtP2', 'nwtRS', 'nwtBW'],
|
|
51
|
+
planning: ['planner', 'comment', 'onAirDate', 'type'],
|
|
52
|
+
atoll: ['atollETP', 'atollPW', 'atollRS', 'atollBW'],
|
|
53
|
+
position: ['latitude', 'longitude', 'siteLatitude', 'siteLongitude', 'dx', 'dy'],
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Create a technology badge formatter
|
|
57
|
+
*/
|
|
58
|
+
export function createTechFormatter(colors = DEFAULT_TECH_COLORS) {
|
|
59
|
+
return (cell) => {
|
|
60
|
+
const value = cell.getValue();
|
|
61
|
+
const color = colors[value] || '#6c757d';
|
|
62
|
+
return `<span class="badge" style="background-color: ${color}; color: white;">${value}</span>`;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Create a status badge formatter
|
|
67
|
+
*/
|
|
68
|
+
export function createStatusFormatter(colors = DEFAULT_STATUS_COLORS) {
|
|
69
|
+
return (cell) => {
|
|
70
|
+
const value = cell.getValue();
|
|
71
|
+
const color = colors[value] || '#6c757d';
|
|
72
|
+
const displayValue = value.replace(/_/g, ' ');
|
|
73
|
+
return `<span class="badge" style="background-color: ${color}; color: white; font-size: 0.7rem;">${displayValue}</span>`;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Create an fband badge formatter
|
|
78
|
+
*/
|
|
79
|
+
export function createFbandFormatter() {
|
|
80
|
+
return (cell) => {
|
|
81
|
+
const value = cell.getValue();
|
|
82
|
+
const color = FBAND_COLORS[value] || '#6c757d';
|
|
83
|
+
return `<span class="badge" style="background-color: ${color}; color: white;">${value}</span>`;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Number formatter with fixed decimals
|
|
88
|
+
*/
|
|
89
|
+
export function numberFormatter(decimals = 2) {
|
|
90
|
+
return (cell) => {
|
|
91
|
+
const value = cell.getValue();
|
|
92
|
+
if (value === null || value === undefined || value === '')
|
|
93
|
+
return '';
|
|
94
|
+
const num = Number(value);
|
|
95
|
+
return isNaN(num) ? String(value) : num.toFixed(decimals);
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Coordinate formatter (lat/lng)
|
|
100
|
+
*/
|
|
101
|
+
export function coordinateFormatter(cell) {
|
|
102
|
+
const value = cell.getValue();
|
|
103
|
+
if (value === null || value === undefined || value === '')
|
|
104
|
+
return '';
|
|
105
|
+
const num = Number(value);
|
|
106
|
+
return isNaN(num) ? String(value) : num.toFixed(6);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Azimuth formatter with degree symbol
|
|
110
|
+
*/
|
|
111
|
+
export function azimuthFormatter(cell) {
|
|
112
|
+
const value = cell.getValue();
|
|
113
|
+
if (value === null || value === undefined || value === '')
|
|
114
|
+
return '';
|
|
115
|
+
return `${value}°`;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Height formatter with meter unit
|
|
119
|
+
*/
|
|
120
|
+
export function heightFormatter(cell) {
|
|
121
|
+
const value = cell.getValue();
|
|
122
|
+
if (value === null || value === undefined || value === '')
|
|
123
|
+
return '';
|
|
124
|
+
return `${value}m`;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Get all column definitions
|
|
128
|
+
*/
|
|
129
|
+
export function getAllColumns(techColors = DEFAULT_TECH_COLORS, statusColors = DEFAULT_STATUS_COLORS, headerFilters = true) {
|
|
130
|
+
const headerFilterParams = headerFilters ? { headerFilter: 'input' } : {};
|
|
131
|
+
const selectHeaderFilter = headerFilters ? { headerFilter: 'list', headerFilterParams: { valuesLookup: true } } : {};
|
|
132
|
+
return [
|
|
133
|
+
// Core columns
|
|
134
|
+
{
|
|
135
|
+
title: 'ID',
|
|
136
|
+
field: 'id',
|
|
137
|
+
width: 120,
|
|
138
|
+
frozen: true,
|
|
139
|
+
...headerFilterParams,
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
title: 'Cell Name',
|
|
143
|
+
field: 'cellName',
|
|
144
|
+
width: 150,
|
|
145
|
+
...headerFilterParams,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
title: 'Site ID',
|
|
149
|
+
field: 'siteId',
|
|
150
|
+
width: 120,
|
|
151
|
+
...headerFilterParams,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
title: 'Tech',
|
|
155
|
+
field: 'tech',
|
|
156
|
+
width: 80,
|
|
157
|
+
hozAlign: 'center',
|
|
158
|
+
formatter: createTechFormatter(techColors),
|
|
159
|
+
...selectHeaderFilter,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
title: 'Band',
|
|
163
|
+
field: 'fband',
|
|
164
|
+
width: 100,
|
|
165
|
+
hozAlign: 'center',
|
|
166
|
+
formatter: createFbandFormatter(),
|
|
167
|
+
...selectHeaderFilter,
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
title: 'Freq',
|
|
171
|
+
field: 'frq',
|
|
172
|
+
width: 80,
|
|
173
|
+
hozAlign: 'center',
|
|
174
|
+
...selectHeaderFilter,
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
title: 'Status',
|
|
178
|
+
field: 'status',
|
|
179
|
+
width: 180,
|
|
180
|
+
formatter: createStatusFormatter(statusColors),
|
|
181
|
+
...selectHeaderFilter,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
title: 'Type',
|
|
185
|
+
field: 'type',
|
|
186
|
+
width: 100,
|
|
187
|
+
...selectHeaderFilter,
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
title: 'On Air Date',
|
|
191
|
+
field: 'onAirDate',
|
|
192
|
+
width: 120,
|
|
193
|
+
...headerFilterParams,
|
|
194
|
+
},
|
|
195
|
+
// Physical columns
|
|
196
|
+
{
|
|
197
|
+
title: 'Antenna',
|
|
198
|
+
field: 'antenna',
|
|
199
|
+
width: 150,
|
|
200
|
+
...headerFilterParams,
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
title: 'Azimuth',
|
|
204
|
+
field: 'azimuth',
|
|
205
|
+
width: 90,
|
|
206
|
+
hozAlign: 'right',
|
|
207
|
+
formatter: azimuthFormatter,
|
|
208
|
+
...headerFilterParams,
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
title: 'Height',
|
|
212
|
+
field: 'height',
|
|
213
|
+
width: 80,
|
|
214
|
+
hozAlign: 'right',
|
|
215
|
+
formatter: heightFormatter,
|
|
216
|
+
...headerFilterParams,
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
title: 'E-Tilt',
|
|
220
|
+
field: 'electricalTilt',
|
|
221
|
+
width: 80,
|
|
222
|
+
hozAlign: 'right',
|
|
223
|
+
...headerFilterParams,
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
title: 'Beamwidth',
|
|
227
|
+
field: 'beamwidth',
|
|
228
|
+
width: 100,
|
|
229
|
+
hozAlign: 'right',
|
|
230
|
+
formatter: azimuthFormatter,
|
|
231
|
+
...headerFilterParams,
|
|
232
|
+
},
|
|
233
|
+
// Network columns
|
|
234
|
+
{
|
|
235
|
+
title: 'DL EARFCN',
|
|
236
|
+
field: 'dlEarfn',
|
|
237
|
+
width: 100,
|
|
238
|
+
hozAlign: 'right',
|
|
239
|
+
...headerFilterParams,
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
title: 'BCCH',
|
|
243
|
+
field: 'bcch',
|
|
244
|
+
width: 80,
|
|
245
|
+
hozAlign: 'right',
|
|
246
|
+
...headerFilterParams,
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
title: 'PCI',
|
|
250
|
+
field: 'pci1',
|
|
251
|
+
width: 80,
|
|
252
|
+
hozAlign: 'right',
|
|
253
|
+
...headerFilterParams,
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
title: 'Cell ID 3',
|
|
257
|
+
field: 'cellId3',
|
|
258
|
+
width: 100,
|
|
259
|
+
...headerFilterParams,
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
title: 'Cell ID',
|
|
263
|
+
field: 'cellID',
|
|
264
|
+
width: 100,
|
|
265
|
+
...headerFilterParams,
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
title: 'Cell ID 2G',
|
|
269
|
+
field: 'cellID2G',
|
|
270
|
+
width: 100,
|
|
271
|
+
...headerFilterParams,
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
title: 'TX ID',
|
|
275
|
+
field: 'txId',
|
|
276
|
+
width: 100,
|
|
277
|
+
...headerFilterParams,
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
title: 'Ctrl ID',
|
|
281
|
+
field: 'ctrlid',
|
|
282
|
+
width: 100,
|
|
283
|
+
...headerFilterParams,
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
title: 'NWT P1',
|
|
287
|
+
field: 'nwtP1',
|
|
288
|
+
width: 80,
|
|
289
|
+
hozAlign: 'right',
|
|
290
|
+
...headerFilterParams,
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
title: 'NWT P2',
|
|
294
|
+
field: 'nwtP2',
|
|
295
|
+
width: 80,
|
|
296
|
+
hozAlign: 'right',
|
|
297
|
+
...headerFilterParams,
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
title: 'NWT RS',
|
|
301
|
+
field: 'nwtRS',
|
|
302
|
+
width: 80,
|
|
303
|
+
hozAlign: 'right',
|
|
304
|
+
...headerFilterParams,
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
title: 'NWT BW',
|
|
308
|
+
field: 'nwtBW',
|
|
309
|
+
width: 80,
|
|
310
|
+
hozAlign: 'right',
|
|
311
|
+
...headerFilterParams,
|
|
312
|
+
},
|
|
313
|
+
// Atoll columns
|
|
314
|
+
{
|
|
315
|
+
title: 'Atoll ETP',
|
|
316
|
+
field: 'atollETP',
|
|
317
|
+
width: 90,
|
|
318
|
+
hozAlign: 'right',
|
|
319
|
+
formatter: numberFormatter(1),
|
|
320
|
+
...headerFilterParams,
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
title: 'Atoll PW',
|
|
324
|
+
field: 'atollPW',
|
|
325
|
+
width: 90,
|
|
326
|
+
hozAlign: 'right',
|
|
327
|
+
formatter: numberFormatter(1),
|
|
328
|
+
...headerFilterParams,
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
title: 'Atoll RS',
|
|
332
|
+
field: 'atollRS',
|
|
333
|
+
width: 90,
|
|
334
|
+
hozAlign: 'right',
|
|
335
|
+
formatter: numberFormatter(1),
|
|
336
|
+
...headerFilterParams,
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
title: 'Atoll BW',
|
|
340
|
+
field: 'atollBW',
|
|
341
|
+
width: 90,
|
|
342
|
+
hozAlign: 'right',
|
|
343
|
+
formatter: numberFormatter(1),
|
|
344
|
+
...headerFilterParams,
|
|
345
|
+
},
|
|
346
|
+
// Position columns
|
|
347
|
+
{
|
|
348
|
+
title: 'Latitude',
|
|
349
|
+
field: 'latitude',
|
|
350
|
+
width: 120,
|
|
351
|
+
hozAlign: 'right',
|
|
352
|
+
formatter: coordinateFormatter,
|
|
353
|
+
...headerFilterParams,
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
title: 'Longitude',
|
|
357
|
+
field: 'longitude',
|
|
358
|
+
width: 120,
|
|
359
|
+
hozAlign: 'right',
|
|
360
|
+
formatter: coordinateFormatter,
|
|
361
|
+
...headerFilterParams,
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
title: 'Site Lat',
|
|
365
|
+
field: 'siteLatitude',
|
|
366
|
+
width: 120,
|
|
367
|
+
hozAlign: 'right',
|
|
368
|
+
formatter: coordinateFormatter,
|
|
369
|
+
...headerFilterParams,
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
title: 'Site Lng',
|
|
373
|
+
field: 'siteLongitude',
|
|
374
|
+
width: 120,
|
|
375
|
+
hozAlign: 'right',
|
|
376
|
+
formatter: coordinateFormatter,
|
|
377
|
+
...headerFilterParams,
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
title: 'DX',
|
|
381
|
+
field: 'dx',
|
|
382
|
+
width: 80,
|
|
383
|
+
hozAlign: 'right',
|
|
384
|
+
formatter: numberFormatter(2),
|
|
385
|
+
...headerFilterParams,
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
title: 'DY',
|
|
389
|
+
field: 'dy',
|
|
390
|
+
width: 80,
|
|
391
|
+
hozAlign: 'right',
|
|
392
|
+
formatter: numberFormatter(2),
|
|
393
|
+
...headerFilterParams,
|
|
394
|
+
},
|
|
395
|
+
// Planning columns
|
|
396
|
+
{
|
|
397
|
+
title: 'Planner',
|
|
398
|
+
field: 'planner',
|
|
399
|
+
width: 120,
|
|
400
|
+
...headerFilterParams,
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
title: 'Comment',
|
|
404
|
+
field: 'comment',
|
|
405
|
+
width: 200,
|
|
406
|
+
...headerFilterParams,
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
title: 'Subgroup',
|
|
410
|
+
field: 'customSubgroup',
|
|
411
|
+
width: 120,
|
|
412
|
+
...headerFilterParams,
|
|
413
|
+
},
|
|
414
|
+
];
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Get columns for a specific preset
|
|
418
|
+
*/
|
|
419
|
+
export function getColumnsForPreset(preset, techColors = DEFAULT_TECH_COLORS, statusColors = DEFAULT_STATUS_COLORS, headerFilters = true) {
|
|
420
|
+
const allColumns = getAllColumns(techColors, statusColors, headerFilters);
|
|
421
|
+
let visibleFields;
|
|
422
|
+
switch (preset) {
|
|
423
|
+
case 'compact':
|
|
424
|
+
visibleFields = ['cellName', 'siteId', 'tech', 'fband', 'status'];
|
|
425
|
+
break;
|
|
426
|
+
case 'full':
|
|
427
|
+
return allColumns;
|
|
428
|
+
case 'physical':
|
|
429
|
+
visibleFields = [...COLUMN_GROUPS.core, ...COLUMN_GROUPS.physical];
|
|
430
|
+
break;
|
|
431
|
+
case 'network':
|
|
432
|
+
visibleFields = [...COLUMN_GROUPS.core, ...COLUMN_GROUPS.network];
|
|
433
|
+
break;
|
|
434
|
+
case 'planning':
|
|
435
|
+
visibleFields = [...COLUMN_GROUPS.core, ...COLUMN_GROUPS.planning];
|
|
436
|
+
break;
|
|
437
|
+
case 'default':
|
|
438
|
+
default:
|
|
439
|
+
visibleFields = [
|
|
440
|
+
'id', 'cellName', 'siteId', 'tech', 'fband', 'frq', 'status',
|
|
441
|
+
'azimuth', 'height', 'antenna'
|
|
442
|
+
];
|
|
443
|
+
}
|
|
444
|
+
return allColumns.filter(col => visibleFields.includes(col.field));
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Get group header formatter for a specific field
|
|
448
|
+
*/
|
|
449
|
+
export function getGroupHeaderFormatter(groupField) {
|
|
450
|
+
return (value, count) => {
|
|
451
|
+
const displayValue = String(value).replace(/_/g, ' ');
|
|
452
|
+
let color = '#6c757d';
|
|
453
|
+
if (groupField === 'tech') {
|
|
454
|
+
color = DEFAULT_TECH_COLORS[String(value)] || color;
|
|
455
|
+
}
|
|
456
|
+
else if (groupField === 'fband') {
|
|
457
|
+
color = FBAND_COLORS[String(value)] || color;
|
|
458
|
+
}
|
|
459
|
+
else if (groupField === 'status') {
|
|
460
|
+
color = DEFAULT_STATUS_COLORS[String(value)] || color;
|
|
461
|
+
}
|
|
462
|
+
return `<span class="badge me-2" style="background-color: ${color}; color: white;">${displayValue}</span>
|
|
463
|
+
<span class="text-muted">(${count} cell${count !== 1 ? 's' : ''})</span>`;
|
|
464
|
+
};
|
|
465
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CellTable Component - Exports
|
|
3
|
+
*
|
|
4
|
+
* A Bootstrap-themed Tabulator wrapper for displaying cell data
|
|
5
|
+
*/
|
|
6
|
+
export { default as CellTable } from './CellTable.svelte';
|
|
7
|
+
export { default as CellTableToolbar } from './CellTableToolbar.svelte';
|
|
8
|
+
export { default as CellTablePanel } from './CellTablePanel.svelte';
|
|
9
|
+
export type { CellData, CellTableGroupField, ColumnPreset, ColumnVisibility, TechColorMap, StatusColorMap, CellTableProps, RowSelectionEvent, RowClickEvent, RowDblClickEvent, DataChangeEvent, CellTableColumn, ColumnGroups } from './types';
|
|
10
|
+
export { DEFAULT_TECH_COLORS, DEFAULT_STATUS_COLORS, FBAND_COLORS, COLUMN_GROUPS, getAllColumns, getColumnsForPreset, getGroupHeaderFormatter, createTechFormatter, createStatusFormatter, createFbandFormatter, numberFormatter, coordinateFormatter, azimuthFormatter, heightFormatter } from './column-config';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CellTable Component - Exports
|
|
3
|
+
*
|
|
4
|
+
* A Bootstrap-themed Tabulator wrapper for displaying cell data
|
|
5
|
+
*/
|
|
6
|
+
// Components
|
|
7
|
+
export { default as CellTable } from './CellTable.svelte';
|
|
8
|
+
export { default as CellTableToolbar } from './CellTableToolbar.svelte';
|
|
9
|
+
export { default as CellTablePanel } from './CellTablePanel.svelte';
|
|
10
|
+
// Configuration utilities
|
|
11
|
+
export { DEFAULT_TECH_COLORS, DEFAULT_STATUS_COLORS, FBAND_COLORS, COLUMN_GROUPS, getAllColumns, getColumnsForPreset, getGroupHeaderFormatter, createTechFormatter, createStatusFormatter, createFbandFormatter, numberFormatter, coordinateFormatter, azimuthFormatter, heightFormatter } from './column-config';
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CellTable Component - Type Definitions
|
|
3
|
+
*
|
|
4
|
+
* Types for the Tabulator-based cell data table component
|
|
5
|
+
*/
|
|
6
|
+
import type { ColumnDefinition, Options } from 'tabulator-tables';
|
|
7
|
+
/**
|
|
8
|
+
* Cell data model - represents a radio cell/sector
|
|
9
|
+
* Imported from map-v3 cells feature for consistency
|
|
10
|
+
*/
|
|
11
|
+
export interface CellData {
|
|
12
|
+
id: string;
|
|
13
|
+
txId: string;
|
|
14
|
+
cellID: string;
|
|
15
|
+
cellID2G: string;
|
|
16
|
+
cellName: string;
|
|
17
|
+
siteId: string;
|
|
18
|
+
tech: string;
|
|
19
|
+
fband: string;
|
|
20
|
+
frq: string;
|
|
21
|
+
type: string;
|
|
22
|
+
status: string;
|
|
23
|
+
onAirDate: string;
|
|
24
|
+
bcch: number;
|
|
25
|
+
ctrlid: string;
|
|
26
|
+
dlEarfn: number;
|
|
27
|
+
antenna: string;
|
|
28
|
+
azimuth: number;
|
|
29
|
+
height: number;
|
|
30
|
+
electricalTilt: string;
|
|
31
|
+
beamwidth: number;
|
|
32
|
+
latitude: number;
|
|
33
|
+
longitude: number;
|
|
34
|
+
dx: number;
|
|
35
|
+
dy: number;
|
|
36
|
+
siteLatitude: number;
|
|
37
|
+
siteLongitude: number;
|
|
38
|
+
comment: string;
|
|
39
|
+
planner: string;
|
|
40
|
+
atollETP: number;
|
|
41
|
+
atollPW: number;
|
|
42
|
+
atollRS: number;
|
|
43
|
+
atollBW: number;
|
|
44
|
+
cellId3: string;
|
|
45
|
+
nwtP1: number;
|
|
46
|
+
nwtP2: number;
|
|
47
|
+
pci1: number;
|
|
48
|
+
nwtRS: number;
|
|
49
|
+
nwtBW: number;
|
|
50
|
+
other?: Record<string, unknown>;
|
|
51
|
+
customSubgroup: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Available grouping fields for the table
|
|
55
|
+
*/
|
|
56
|
+
export type CellTableGroupField = 'tech' | 'fband' | 'frq' | 'status' | 'siteId' | 'none';
|
|
57
|
+
/**
|
|
58
|
+
* Column preset configurations
|
|
59
|
+
*/
|
|
60
|
+
export type ColumnPreset = 'default' | 'compact' | 'full' | 'physical' | 'network' | 'planning';
|
|
61
|
+
/**
|
|
62
|
+
* Column visibility configuration
|
|
63
|
+
*/
|
|
64
|
+
export interface ColumnVisibility {
|
|
65
|
+
[key: string]: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Technology color mapping
|
|
69
|
+
*/
|
|
70
|
+
export interface TechColorMap {
|
|
71
|
+
[tech: string]: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Status color mapping
|
|
75
|
+
*/
|
|
76
|
+
export interface StatusColorMap {
|
|
77
|
+
[status: string]: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* CellTable component props
|
|
81
|
+
*/
|
|
82
|
+
export interface CellTableProps {
|
|
83
|
+
/** Cell data array to display */
|
|
84
|
+
cells: CellData[];
|
|
85
|
+
/** Field to group rows by */
|
|
86
|
+
groupBy?: CellTableGroupField;
|
|
87
|
+
/** Initial column preset */
|
|
88
|
+
columnPreset?: ColumnPreset;
|
|
89
|
+
/** Custom column visibility overrides */
|
|
90
|
+
columnVisibility?: ColumnVisibility;
|
|
91
|
+
/** Enable row selection */
|
|
92
|
+
selectable?: boolean;
|
|
93
|
+
/** Enable multi-row selection */
|
|
94
|
+
multiSelect?: boolean;
|
|
95
|
+
/** Table height (CSS value) */
|
|
96
|
+
height?: string;
|
|
97
|
+
/** Enable virtual DOM for large datasets */
|
|
98
|
+
virtualDom?: boolean;
|
|
99
|
+
/** Custom Tabulator options override */
|
|
100
|
+
tabulatorOptions?: Partial<Options>;
|
|
101
|
+
/** Technology color mapping */
|
|
102
|
+
techColors?: TechColorMap;
|
|
103
|
+
/** Status color mapping */
|
|
104
|
+
statusColors?: StatusColorMap;
|
|
105
|
+
/** Enable header filters */
|
|
106
|
+
headerFilters?: boolean;
|
|
107
|
+
/** Enable column resizing */
|
|
108
|
+
resizableColumns?: boolean;
|
|
109
|
+
/** Enable movable columns */
|
|
110
|
+
movableColumns?: boolean;
|
|
111
|
+
/** Persist column layout to localStorage */
|
|
112
|
+
persistLayout?: boolean;
|
|
113
|
+
/** Storage key for persisted layout */
|
|
114
|
+
storageKey?: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Row selection event data
|
|
118
|
+
*/
|
|
119
|
+
export interface RowSelectionEvent {
|
|
120
|
+
rows: CellData[];
|
|
121
|
+
ids: string[];
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Row click event data
|
|
125
|
+
*/
|
|
126
|
+
export interface RowClickEvent {
|
|
127
|
+
row: CellData;
|
|
128
|
+
event: MouseEvent;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Row double-click event data
|
|
132
|
+
*/
|
|
133
|
+
export interface RowDblClickEvent {
|
|
134
|
+
row: CellData;
|
|
135
|
+
event: MouseEvent;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Data change event data
|
|
139
|
+
*/
|
|
140
|
+
export interface DataChangeEvent {
|
|
141
|
+
type: 'load' | 'update' | 'filter' | 'sort' | 'group';
|
|
142
|
+
rowCount: number;
|
|
143
|
+
filteredCount: number;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Column definition with Bootstrap styling helpers
|
|
147
|
+
*/
|
|
148
|
+
export interface CellTableColumn extends ColumnDefinition {
|
|
149
|
+
/** Bootstrap badge variant for cell rendering */
|
|
150
|
+
badgeVariant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark';
|
|
151
|
+
/** Use technology-based coloring */
|
|
152
|
+
techColored?: boolean;
|
|
153
|
+
/** Use status-based coloring */
|
|
154
|
+
statusColored?: boolean;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Predefined column groups for presets
|
|
158
|
+
*/
|
|
159
|
+
export interface ColumnGroups {
|
|
160
|
+
core: string[];
|
|
161
|
+
physical: string[];
|
|
162
|
+
network: string[];
|
|
163
|
+
planning: string[];
|
|
164
|
+
atoll: string[];
|
|
165
|
+
position: string[];
|
|
166
|
+
}
|