jupyterlab_tabular_data_viewer_extension 1.2.24 → 1.2.29

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/lib/widget.js CHANGED
@@ -41,16 +41,17 @@ export class TabularDataViewer extends Widget {
41
41
  // With table-layout: fixed, this automatically applies to all cells in the column
42
42
  const columnIndex = this._columns.findIndex(col => col.name === this._resizing.columnName);
43
43
  if (columnIndex !== -1) {
44
- const headerCell = this._headerRow.children[columnIndex];
45
- const filterCell = this._filterRow.children[columnIndex];
44
+ // Add 1 to account for row number column being first cell
45
+ const headerCell = this._headerRow.children[columnIndex + 1];
46
+ const filterCell = this._filterRow.children[columnIndex + 1];
46
47
  if (headerCell) {
47
48
  headerCell.style.width = `${newWidth}px`;
48
49
  }
49
50
  if (filterCell) {
50
51
  filterCell.style.width = `${newWidth}px`;
51
52
  }
52
- // Update table width to sum of all column widths
53
- const totalWidth = Array.from(this._columnWidths.values()).reduce((sum, w) => sum + w, 0);
53
+ // Update table width to sum of all column widths plus row number column (60px)
54
+ const totalWidth = Array.from(this._columnWidths.values()).reduce((sum, w) => sum + w, 0) + 60;
54
55
  this._table.style.width = `${totalWidth}px`;
55
56
  }
56
57
  };
@@ -325,9 +326,8 @@ export class TabularDataViewer extends Widget {
325
326
  nameSpan.className = 'jp-TabularDataViewer-columnName';
326
327
  nameSpan.textContent = col.name;
327
328
  // Add info icon for column statistics
328
- const infoIcon = document.createElement('span');
329
- infoIcon.className = 'jp-TabularDataViewer-infoIcon';
330
- infoIcon.textContent = '🛈';
329
+ const infoIcon = document.createElement('i');
330
+ infoIcon.className = 'jp-TabularDataViewer-infoIcon fas fa-info-circle';
331
331
  infoIcon.title = 'Show column statistics';
332
332
  infoIcon.addEventListener('click', async (e) => {
333
333
  e.preventDefault();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyterlab_tabular_data_viewer_extension",
3
- "version": "1.2.24",
3
+ "version": "1.2.29",
4
4
  "description": "Jupyterlab extension to browse tabular data files (Parquet, Excel, CSV, TSV) with filtering and sorting capabilities",
5
5
  "keywords": [
6
6
  "jupyter",
package/src/widget.ts CHANGED
@@ -366,9 +366,8 @@ export class TabularDataViewer extends Widget {
366
366
  nameSpan.textContent = col.name;
367
367
 
368
368
  // Add info icon for column statistics
369
- const infoIcon = document.createElement('span');
370
- infoIcon.className = 'jp-TabularDataViewer-infoIcon';
371
- infoIcon.textContent = '🛈';
369
+ const infoIcon = document.createElement('i');
370
+ infoIcon.className = 'jp-TabularDataViewer-infoIcon fas fa-info-circle';
372
371
  infoIcon.title = 'Show column statistics';
373
372
  infoIcon.addEventListener('click', async (e: MouseEvent) => {
374
373
  e.preventDefault();
@@ -517,8 +516,9 @@ export class TabularDataViewer extends Widget {
517
516
  // With table-layout: fixed, this automatically applies to all cells in the column
518
517
  const columnIndex = this._columns.findIndex(col => col.name === this._resizing!.columnName);
519
518
  if (columnIndex !== -1) {
520
- const headerCell = this._headerRow.children[columnIndex] as HTMLElement;
521
- const filterCell = this._filterRow.children[columnIndex] as HTMLElement;
519
+ // Add 1 to account for row number column being first cell
520
+ const headerCell = this._headerRow.children[columnIndex + 1] as HTMLElement;
521
+ const filterCell = this._filterRow.children[columnIndex + 1] as HTMLElement;
522
522
 
523
523
  if (headerCell) {
524
524
  headerCell.style.width = `${newWidth}px`;
@@ -527,8 +527,8 @@ export class TabularDataViewer extends Widget {
527
527
  filterCell.style.width = `${newWidth}px`;
528
528
  }
529
529
 
530
- // Update table width to sum of all column widths
531
- const totalWidth = Array.from(this._columnWidths.values()).reduce((sum, w) => sum + w, 0);
530
+ // Update table width to sum of all column widths plus row number column (60px)
531
+ const totalWidth = Array.from(this._columnWidths.values()).reduce((sum, w) => sum + w, 0) + 60;
532
532
  this._table.style.width = `${totalWidth}px`;
533
533
  }
534
534
  };
package/style/base.css CHANGED
@@ -293,19 +293,22 @@
293
293
  /* Column Info Icon */
294
294
  .jp-TabularDataViewer-infoIcon {
295
295
  margin-left: 6px;
296
- font-size: 16px;
296
+ font-size: 14px;
297
297
  color: transparent;
298
298
  cursor: pointer;
299
299
  transition: color 0.2s ease;
300
300
  user-select: none;
301
+ opacity: 0;
301
302
  }
302
303
 
303
304
  .jp-TabularDataViewer-headerCell:hover .jp-TabularDataViewer-infoIcon {
304
305
  color: var(--jp-brand-color1) !important;
306
+ opacity: 1;
305
307
  }
306
308
 
307
309
  .jp-TabularDataViewer-infoIcon:hover {
308
310
  color: var(--jp-brand-color1) !important;
311
+ opacity: 1;
309
312
  }
310
313
 
311
314
  /* Column Statistics Modal */
package/style/index.css CHANGED
@@ -1 +1,2 @@
1
+ @import url('~@fortawesome/fontawesome-free/css/all.min.css');
1
2
  @import url('base.css');