juxscript 1.1.222 → 1.1.224
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.
|
@@ -171,6 +171,10 @@ export declare class DataFrameComponent extends BaseComponent<DataFrameState> {
|
|
|
171
171
|
private _renderMultiSheet;
|
|
172
172
|
private _updateStatus;
|
|
173
173
|
private _setDataFrame;
|
|
174
|
+
/**
|
|
175
|
+
* Append settings button to status bar
|
|
176
|
+
*/
|
|
177
|
+
private _appendSettingsButton;
|
|
174
178
|
/**
|
|
175
179
|
* Update the collapsible summary text
|
|
176
180
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataframe.d.ts","sourceRoot":"","sources":["dataframe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AASnC,MAAM,WAAW,gBAAgB;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM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AAC,0BAA0B;YA2DpB,sBAAsB;IA4IpC,OAAO,CAAC,oBAAoB;IA6K5B,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,IAAI;IAExC,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI;CAyIrE;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,kBAAkB,CAExF"}
|
|
@@ -253,8 +253,18 @@ export class DataFrameComponent extends BaseComponent {
|
|
|
253
253
|
if (existingTabs)
|
|
254
254
|
existingTabs.remove();
|
|
255
255
|
}
|
|
256
|
-
//
|
|
257
|
-
this.
|
|
256
|
+
// ✅ Hide details element when cleared
|
|
257
|
+
if (this._collapsible && this._detailsElement) {
|
|
258
|
+
this._detailsElement.style.display = 'none';
|
|
259
|
+
}
|
|
260
|
+
// ✅ Hide status when cleared (for inline upload mode)
|
|
261
|
+
const statusEl = document.getElementById(`${this._id}-status`);
|
|
262
|
+
if (statusEl && this._inlineUpload) {
|
|
263
|
+
statusEl.style.display = 'none';
|
|
264
|
+
}
|
|
265
|
+
else if (statusEl) {
|
|
266
|
+
this._updateStatus('No data loaded.', 'empty');
|
|
267
|
+
}
|
|
258
268
|
return this;
|
|
259
269
|
}
|
|
260
270
|
/* ═══════════════════════════════════════════════════
|
|
@@ -533,11 +543,7 @@ export class DataFrameComponent extends BaseComponent {
|
|
|
533
543
|
const el = document.getElementById(`${this._id}-status`);
|
|
534
544
|
if (!el)
|
|
535
545
|
return;
|
|
536
|
-
//
|
|
537
|
-
if (this._collapsible) {
|
|
538
|
-
el.style.display = 'none';
|
|
539
|
-
return;
|
|
540
|
-
}
|
|
546
|
+
// Always show status (inline with upload button)
|
|
541
547
|
el.style.display = '';
|
|
542
548
|
el.className = 'jux-dataframe-status';
|
|
543
549
|
if (type)
|
|
@@ -583,41 +589,41 @@ export class DataFrameComponent extends BaseComponent {
|
|
|
583
589
|
const columnDefs = this._df.columns.map(col => ({ key: col, label: col }));
|
|
584
590
|
this._table.columns(columnDefs).rows(this._df.toRows());
|
|
585
591
|
}
|
|
586
|
-
// ✅
|
|
587
|
-
this.
|
|
592
|
+
// ✅ Show the details element now that data is loaded
|
|
593
|
+
if (this._collapsible && this._detailsElement) {
|
|
594
|
+
this._detailsElement.style.display = '';
|
|
595
|
+
this._updateSummary();
|
|
596
|
+
}
|
|
588
597
|
const isMalformed = this._detectMalformedData(this._df);
|
|
598
|
+
// ✅ Update status with settings button
|
|
589
599
|
if (isMalformed && this._rawFileData) {
|
|
590
|
-
this._updateStatus(`${sourceName} — ${this._df.height} rows × ${this._df.width} cols
|
|
591
|
-
|
|
592
|
-
const statusEl = document.getElementById(`${this._id}-status`);
|
|
593
|
-
if (statusEl) {
|
|
594
|
-
const settingsBtn = document.createElement('button');
|
|
595
|
-
settingsBtn.textContent = 'Fix Import Settings';
|
|
596
|
-
settingsBtn.className = 'jux-button jux-button-sm jux-button-warning';
|
|
597
|
-
settingsBtn.style.marginLeft = '0.5rem';
|
|
598
|
-
settingsBtn.addEventListener('click', () => this._showReshapeModal());
|
|
599
|
-
statusEl.appendChild(settingsBtn);
|
|
600
|
-
}
|
|
601
|
-
});
|
|
600
|
+
this._updateStatus(`${sourceName} — ${this._df.height} rows × ${this._df.width} cols`, 'warning');
|
|
601
|
+
this._appendSettingsButton('Fix Import Settings', 'warning');
|
|
602
602
|
}
|
|
603
603
|
else {
|
|
604
604
|
this._updateStatus(`${sourceName} — ${this._df.height} rows × ${this._df.width} cols`, 'success');
|
|
605
605
|
if (this._rawFileData) {
|
|
606
|
-
|
|
607
|
-
const statusEl = document.getElementById(`${this._id}-status`);
|
|
608
|
-
if (statusEl) {
|
|
609
|
-
const settingsBtn = document.createElement('button');
|
|
610
|
-
settingsBtn.textContent = 'Import Settings';
|
|
611
|
-
settingsBtn.className = 'jux-button jux-button-sm jux-button-ghost';
|
|
612
|
-
settingsBtn.style.marginLeft = '0.5rem';
|
|
613
|
-
settingsBtn.addEventListener('click', () => this._showReshapeModal());
|
|
614
|
-
statusEl.appendChild(settingsBtn);
|
|
615
|
-
}
|
|
616
|
-
});
|
|
606
|
+
this._appendSettingsButton('Import Settings', 'ghost');
|
|
617
607
|
}
|
|
618
608
|
}
|
|
619
609
|
this._triggerCallback('load', this._df, null, this);
|
|
620
610
|
}
|
|
611
|
+
/**
|
|
612
|
+
* Append settings button to status bar
|
|
613
|
+
*/
|
|
614
|
+
_appendSettingsButton(label, variant) {
|
|
615
|
+
requestAnimationFrame(() => {
|
|
616
|
+
const statusEl = document.getElementById(`${this._id}-status`);
|
|
617
|
+
if (statusEl) {
|
|
618
|
+
const settingsBtn = document.createElement('button');
|
|
619
|
+
settingsBtn.textContent = label;
|
|
620
|
+
settingsBtn.className = `jux-button jux-button-sm jux-button-${variant}`;
|
|
621
|
+
settingsBtn.style.marginLeft = '0.5rem';
|
|
622
|
+
settingsBtn.addEventListener('click', () => this._showReshapeModal());
|
|
623
|
+
statusEl.appendChild(settingsBtn);
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
}
|
|
621
627
|
/**
|
|
622
628
|
* Update the collapsible summary text
|
|
623
629
|
*/
|
|
@@ -628,7 +634,7 @@ export class DataFrameComponent extends BaseComponent {
|
|
|
628
634
|
if (!summaryTextEl)
|
|
629
635
|
return;
|
|
630
636
|
if (!this._df) {
|
|
631
|
-
|
|
637
|
+
// Don't show anything if no data
|
|
632
638
|
return;
|
|
633
639
|
}
|
|
634
640
|
if (this._summaryTemplate) {
|
|
@@ -636,7 +642,7 @@ export class DataFrameComponent extends BaseComponent {
|
|
|
636
642
|
}
|
|
637
643
|
else {
|
|
638
644
|
const isMalformed = this._detectMalformedData(this._df);
|
|
639
|
-
const suffix = isMalformed ? '
|
|
645
|
+
const suffix = isMalformed ? ' ⚠️' : '';
|
|
640
646
|
summaryTextEl.textContent = `${this.state.sourceName || 'Data'} — ${this._df.height} rows × ${this._df.width} cols${suffix}`;
|
|
641
647
|
}
|
|
642
648
|
}
|
|
@@ -1069,7 +1075,14 @@ export class DataFrameComponent extends BaseComponent {
|
|
|
1069
1075
|
uploadContainer.className = 'jux-dataframe-upload';
|
|
1070
1076
|
uploadContainer.id = `${this._id}-upload-container`;
|
|
1071
1077
|
uploadArea.appendChild(uploadContainer);
|
|
1072
|
-
// ✅
|
|
1078
|
+
// ✅ Status bar INLINE with upload (inside upload area)
|
|
1079
|
+
if (this._showStatus) {
|
|
1080
|
+
const statusBar = document.createElement('div');
|
|
1081
|
+
statusBar.className = 'jux-dataframe-status jux-dataframe-status-empty';
|
|
1082
|
+
statusBar.id = `${this._id}-status`;
|
|
1083
|
+
statusBar.style.display = 'none'; // Hidden until needed
|
|
1084
|
+
uploadArea.appendChild(statusBar);
|
|
1085
|
+
}
|
|
1073
1086
|
if (this._uploadDescription) {
|
|
1074
1087
|
const descEl = document.createElement('div');
|
|
1075
1088
|
descEl.className = 'jux-dataframe-upload-description';
|
|
@@ -1082,30 +1095,22 @@ export class DataFrameComponent extends BaseComponent {
|
|
|
1082
1095
|
}
|
|
1083
1096
|
else {
|
|
1084
1097
|
container.appendChild(wrapper);
|
|
1098
|
+
// ✅ Status bar for non-upload mode
|
|
1099
|
+
if (this._showStatus) {
|
|
1100
|
+
const statusBar = document.createElement('div');
|
|
1101
|
+
statusBar.className = 'jux-dataframe-status jux-dataframe-status-empty';
|
|
1102
|
+
statusBar.id = `${this._id}-status`;
|
|
1103
|
+
statusBar.textContent = 'No data loaded.';
|
|
1104
|
+
wrapper.appendChild(statusBar);
|
|
1105
|
+
}
|
|
1085
1106
|
}
|
|
1086
|
-
// ✅
|
|
1087
|
-
if (this._showStatus && !this._collapsible) {
|
|
1088
|
-
const statusBar = document.createElement('div');
|
|
1089
|
-
statusBar.className = 'jux-dataframe-status jux-dataframe-status-empty';
|
|
1090
|
-
statusBar.id = `${this._id}-status`;
|
|
1091
|
-
statusBar.textContent = 'No data loaded.';
|
|
1092
|
-
wrapper.appendChild(statusBar);
|
|
1093
|
-
}
|
|
1094
|
-
else if (this._showStatus && this._collapsible) {
|
|
1095
|
-
// ✅ Hidden status bar still exists so _updateStatus() calls don't throw,
|
|
1096
|
-
// but it's invisible — summary handles display instead.
|
|
1097
|
-
const statusBar = document.createElement('div');
|
|
1098
|
-
statusBar.className = 'jux-dataframe-status jux-dataframe-status-empty';
|
|
1099
|
-
statusBar.id = `${this._id}-status`;
|
|
1100
|
-
statusBar.style.display = 'none';
|
|
1101
|
-
wrapper.appendChild(statusBar);
|
|
1102
|
-
}
|
|
1103
|
-
// ✅ Collapsible details wrapper
|
|
1107
|
+
// ✅ Collapsible details wrapper - HIDDEN until data loads
|
|
1104
1108
|
let tableContainer;
|
|
1105
1109
|
if (this._collapsible) {
|
|
1106
1110
|
const details = document.createElement('details');
|
|
1107
1111
|
details.className = 'jux-dataframe-details';
|
|
1108
1112
|
details.open = !this._collapsed;
|
|
1113
|
+
details.style.display = 'none'; // ✅ Hidden until data loads
|
|
1109
1114
|
this._detailsElement = details;
|
|
1110
1115
|
const summary = document.createElement('summary');
|
|
1111
1116
|
summary.className = 'jux-dataframe-summary';
|
|
@@ -1115,7 +1120,7 @@ export class DataFrameComponent extends BaseComponent {
|
|
|
1115
1120
|
summary.appendChild(chevron);
|
|
1116
1121
|
const textSpan = document.createElement('span');
|
|
1117
1122
|
textSpan.className = 'jux-dataframe-summary-text';
|
|
1118
|
-
|
|
1123
|
+
// Don't set text - will be set when data loads
|
|
1119
1124
|
summary.appendChild(textSpan);
|
|
1120
1125
|
details.appendChild(summary);
|
|
1121
1126
|
const content = document.createElement('div');
|
|
@@ -1123,7 +1128,6 @@ export class DataFrameComponent extends BaseComponent {
|
|
|
1123
1128
|
details.appendChild(content);
|
|
1124
1129
|
wrapper.appendChild(details);
|
|
1125
1130
|
tableContainer = content;
|
|
1126
|
-
// Track toggle state
|
|
1127
1131
|
details.addEventListener('toggle', () => {
|
|
1128
1132
|
this._collapsed = !details.open;
|
|
1129
1133
|
});
|
|
@@ -310,8 +310,18 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
|
|
|
310
310
|
if (existingTabs) existingTabs.remove();
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
//
|
|
314
|
-
this.
|
|
313
|
+
// ✅ Hide details element when cleared
|
|
314
|
+
if (this._collapsible && this._detailsElement) {
|
|
315
|
+
this._detailsElement.style.display = 'none';
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// ✅ Hide status when cleared (for inline upload mode)
|
|
319
|
+
const statusEl = document.getElementById(`${this._id}-status`);
|
|
320
|
+
if (statusEl && this._inlineUpload) {
|
|
321
|
+
statusEl.style.display = 'none';
|
|
322
|
+
} else if (statusEl) {
|
|
323
|
+
this._updateStatus('No data loaded.', 'empty');
|
|
324
|
+
}
|
|
315
325
|
|
|
316
326
|
return this;
|
|
317
327
|
}
|
|
@@ -648,12 +658,7 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
|
|
|
648
658
|
const el = document.getElementById(`${this._id}-status`);
|
|
649
659
|
if (!el) return;
|
|
650
660
|
|
|
651
|
-
//
|
|
652
|
-
if (this._collapsible) {
|
|
653
|
-
el.style.display = 'none';
|
|
654
|
-
return;
|
|
655
|
-
}
|
|
656
|
-
|
|
661
|
+
// Always show status (inline with upload button)
|
|
657
662
|
el.style.display = '';
|
|
658
663
|
el.className = 'jux-dataframe-status';
|
|
659
664
|
if (type) el.classList.add(`jux-dataframe-status-${type}`);
|
|
@@ -705,50 +710,51 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
|
|
|
705
710
|
this._table.columns(columnDefs).rows(this._df.toRows());
|
|
706
711
|
}
|
|
707
712
|
|
|
708
|
-
// ✅
|
|
709
|
-
this.
|
|
713
|
+
// ✅ Show the details element now that data is loaded
|
|
714
|
+
if (this._collapsible && this._detailsElement) {
|
|
715
|
+
this._detailsElement.style.display = '';
|
|
716
|
+
this._updateSummary();
|
|
717
|
+
}
|
|
710
718
|
|
|
711
719
|
const isMalformed = this._detectMalformedData(this._df!);
|
|
712
720
|
|
|
721
|
+
// ✅ Update status with settings button
|
|
713
722
|
if (isMalformed && this._rawFileData) {
|
|
714
723
|
this._updateStatus(
|
|
715
|
-
`${sourceName} — ${this._df!.height} rows × ${this._df!.width} cols
|
|
724
|
+
`${sourceName} — ${this._df!.height} rows × ${this._df!.width} cols`,
|
|
716
725
|
'warning'
|
|
717
726
|
);
|
|
718
|
-
|
|
719
|
-
const statusEl = document.getElementById(`${this._id}-status`);
|
|
720
|
-
if (statusEl) {
|
|
721
|
-
const settingsBtn = document.createElement('button');
|
|
722
|
-
settingsBtn.textContent = 'Fix Import Settings';
|
|
723
|
-
settingsBtn.className = 'jux-button jux-button-sm jux-button-warning';
|
|
724
|
-
settingsBtn.style.marginLeft = '0.5rem';
|
|
725
|
-
settingsBtn.addEventListener('click', () => this._showReshapeModal());
|
|
726
|
-
statusEl.appendChild(settingsBtn);
|
|
727
|
-
}
|
|
728
|
-
});
|
|
727
|
+
this._appendSettingsButton('Fix Import Settings', 'warning');
|
|
729
728
|
} else {
|
|
730
729
|
this._updateStatus(
|
|
731
730
|
`${sourceName} — ${this._df!.height} rows × ${this._df!.width} cols`,
|
|
732
731
|
'success'
|
|
733
732
|
);
|
|
734
733
|
if (this._rawFileData) {
|
|
735
|
-
|
|
736
|
-
const statusEl = document.getElementById(`${this._id}-status`);
|
|
737
|
-
if (statusEl) {
|
|
738
|
-
const settingsBtn = document.createElement('button');
|
|
739
|
-
settingsBtn.textContent = 'Import Settings';
|
|
740
|
-
settingsBtn.className = 'jux-button jux-button-sm jux-button-ghost';
|
|
741
|
-
settingsBtn.style.marginLeft = '0.5rem';
|
|
742
|
-
settingsBtn.addEventListener('click', () => this._showReshapeModal());
|
|
743
|
-
statusEl.appendChild(settingsBtn);
|
|
744
|
-
}
|
|
745
|
-
});
|
|
734
|
+
this._appendSettingsButton('Import Settings', 'ghost');
|
|
746
735
|
}
|
|
747
736
|
}
|
|
748
737
|
|
|
749
738
|
this._triggerCallback('load', this._df, null, this);
|
|
750
739
|
}
|
|
751
740
|
|
|
741
|
+
/**
|
|
742
|
+
* Append settings button to status bar
|
|
743
|
+
*/
|
|
744
|
+
private _appendSettingsButton(label: string, variant: 'warning' | 'ghost'): void {
|
|
745
|
+
requestAnimationFrame(() => {
|
|
746
|
+
const statusEl = document.getElementById(`${this._id}-status`);
|
|
747
|
+
if (statusEl) {
|
|
748
|
+
const settingsBtn = document.createElement('button');
|
|
749
|
+
settingsBtn.textContent = label;
|
|
750
|
+
settingsBtn.className = `jux-button jux-button-sm jux-button-${variant}`;
|
|
751
|
+
settingsBtn.style.marginLeft = '0.5rem';
|
|
752
|
+
settingsBtn.addEventListener('click', () => this._showReshapeModal());
|
|
753
|
+
statusEl.appendChild(settingsBtn);
|
|
754
|
+
}
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
|
|
752
758
|
/**
|
|
753
759
|
* Update the collapsible summary text
|
|
754
760
|
*/
|
|
@@ -759,7 +765,7 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
|
|
|
759
765
|
if (!summaryTextEl) return;
|
|
760
766
|
|
|
761
767
|
if (!this._df) {
|
|
762
|
-
|
|
768
|
+
// Don't show anything if no data
|
|
763
769
|
return;
|
|
764
770
|
}
|
|
765
771
|
|
|
@@ -767,7 +773,7 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
|
|
|
767
773
|
summaryTextEl.textContent = this._summaryTemplate(this._df);
|
|
768
774
|
} else {
|
|
769
775
|
const isMalformed = this._detectMalformedData(this._df);
|
|
770
|
-
const suffix = isMalformed ? '
|
|
776
|
+
const suffix = isMalformed ? ' ⚠️' : '';
|
|
771
777
|
summaryTextEl.textContent = `${this.state.sourceName || 'Data'} — ${this._df.height} rows × ${this._df.width} cols${suffix}`;
|
|
772
778
|
}
|
|
773
779
|
}
|
|
@@ -1258,7 +1264,15 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
|
|
|
1258
1264
|
uploadContainer.id = `${this._id}-upload-container`;
|
|
1259
1265
|
uploadArea.appendChild(uploadContainer);
|
|
1260
1266
|
|
|
1261
|
-
// ✅
|
|
1267
|
+
// ✅ Status bar INLINE with upload (inside upload area)
|
|
1268
|
+
if (this._showStatus) {
|
|
1269
|
+
const statusBar = document.createElement('div');
|
|
1270
|
+
statusBar.className = 'jux-dataframe-status jux-dataframe-status-empty';
|
|
1271
|
+
statusBar.id = `${this._id}-status`;
|
|
1272
|
+
statusBar.style.display = 'none'; // Hidden until needed
|
|
1273
|
+
uploadArea.appendChild(statusBar);
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1262
1276
|
if (this._uploadDescription) {
|
|
1263
1277
|
const descEl = document.createElement('div');
|
|
1264
1278
|
descEl.className = 'jux-dataframe-upload-description';
|
|
@@ -1271,32 +1285,25 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
|
|
|
1271
1285
|
upload.render(uploadContainer);
|
|
1272
1286
|
} else {
|
|
1273
1287
|
container.appendChild(wrapper);
|
|
1274
|
-
}
|
|
1275
1288
|
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
// ✅ Hidden status bar still exists so _updateStatus() calls don't throw,
|
|
1285
|
-
// but it's invisible — summary handles display instead.
|
|
1286
|
-
const statusBar = document.createElement('div');
|
|
1287
|
-
statusBar.className = 'jux-dataframe-status jux-dataframe-status-empty';
|
|
1288
|
-
statusBar.id = `${this._id}-status`;
|
|
1289
|
-
statusBar.style.display = 'none';
|
|
1290
|
-
wrapper.appendChild(statusBar);
|
|
1289
|
+
// ✅ Status bar for non-upload mode
|
|
1290
|
+
if (this._showStatus) {
|
|
1291
|
+
const statusBar = document.createElement('div');
|
|
1292
|
+
statusBar.className = 'jux-dataframe-status jux-dataframe-status-empty';
|
|
1293
|
+
statusBar.id = `${this._id}-status`;
|
|
1294
|
+
statusBar.textContent = 'No data loaded.';
|
|
1295
|
+
wrapper.appendChild(statusBar);
|
|
1296
|
+
}
|
|
1291
1297
|
}
|
|
1292
1298
|
|
|
1293
|
-
// ✅ Collapsible details wrapper
|
|
1299
|
+
// ✅ Collapsible details wrapper - HIDDEN until data loads
|
|
1294
1300
|
let tableContainer: HTMLElement;
|
|
1295
1301
|
|
|
1296
1302
|
if (this._collapsible) {
|
|
1297
1303
|
const details = document.createElement('details');
|
|
1298
1304
|
details.className = 'jux-dataframe-details';
|
|
1299
1305
|
details.open = !this._collapsed;
|
|
1306
|
+
details.style.display = 'none'; // ✅ Hidden until data loads
|
|
1300
1307
|
this._detailsElement = details;
|
|
1301
1308
|
|
|
1302
1309
|
const summary = document.createElement('summary');
|
|
@@ -1309,7 +1316,7 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
|
|
|
1309
1316
|
|
|
1310
1317
|
const textSpan = document.createElement('span');
|
|
1311
1318
|
textSpan.className = 'jux-dataframe-summary-text';
|
|
1312
|
-
|
|
1319
|
+
// Don't set text - will be set when data loads
|
|
1313
1320
|
summary.appendChild(textSpan);
|
|
1314
1321
|
|
|
1315
1322
|
details.appendChild(summary);
|
|
@@ -1321,7 +1328,6 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
|
|
|
1321
1328
|
wrapper.appendChild(details);
|
|
1322
1329
|
tableContainer = content;
|
|
1323
1330
|
|
|
1324
|
-
// Track toggle state
|
|
1325
1331
|
details.addEventListener('toggle', () => {
|
|
1326
1332
|
this._collapsed = !details.open;
|
|
1327
1333
|
});
|
package/lib/styles/shadcn.css
CHANGED
|
@@ -158,9 +158,15 @@ p { line-height: 1.75; color: hsl(var(--foreground)); }
|
|
|
158
158
|
flex-direction: column;
|
|
159
159
|
gap: 1rem;
|
|
160
160
|
width: 100%;
|
|
161
|
-
min-width: 0;
|
|
162
|
-
max-width: 100%;
|
|
163
|
-
overflow: hidden;
|
|
161
|
+
min-width: 0;
|
|
162
|
+
max-width: 100%;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
/* ✅ Card-like container to visually partition each dataframe */
|
|
165
|
+
padding: 1rem;
|
|
166
|
+
border: 1px solid hsl(var(--border));
|
|
167
|
+
border-radius: var(--radius);
|
|
168
|
+
background: hsl(var(--background));
|
|
169
|
+
box-shadow: 0 1px 3px hsl(0 0% 0% / 0.04);
|
|
164
170
|
}
|
|
165
171
|
|
|
166
172
|
/* ✅ Ensure table respects dataframe container */
|