juxscript 1.1.169 → 1.1.171

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.
@@ -40,16 +40,8 @@ export declare class DataFrameComponent extends BaseComponent<DataFrameState> {
40
40
  fromStorage(key: string): this;
41
41
  fromUpload(upload: FileUpload): this;
42
42
  fromData(data: Record<string, any>[] | Record<string, any[]>): this;
43
- /**
44
- * Add an inline file upload control.
45
- * @param label - Button label (default: 'Upload File')
46
- * @param accept - File types (default: '.csv,.tsv,.txt,.xlsx,.xls')
47
- * @param icon - Upload icon name (default: 'upload'). Pass '' to hide icon.
48
- */
49
43
  withUpload(label?: string, accept?: string, icon?: string): this;
50
- /** Show/hide the status bar */
51
44
  showStatus(v: boolean): this;
52
- /** Set a custom icon for the status bar */
53
45
  statusIcon(v: string): this;
54
46
  apply(fn: (df: DataFrame) => DataFrame): this;
55
47
  filter(predicate: (row: Record<string, any>, index: number) => boolean): this;
@@ -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;AAMnC,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;IAC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I,aAAa,CAAyB;IACpD,IAAI,KAAK,IAAI,KAAK,GAAG,IAAI,CAAwB;IACjD,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI;IACtC,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM;IACjC,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE;IAC/B,IAAI,KAAK,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAsC;IACnE,IAAI,OAAO,IAAI,MAAM,EAAE,CAAoC;IAErD,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAUhD,OAAO,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;IACzB,SAAS,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;IAC3B,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;IAC1B,UAAU,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;IAC5B,SAAS,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI;IAC3B,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAM5B,OAAO,CAAC,aAAa;IAuBrB,OAAO,CAAC,aAAa;IA0BrB,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,gBAAgB;IA+CxB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAMtC,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,IAAI;CA+ErE;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,kBAAkB,CAExF"}
@@ -34,7 +34,7 @@ export class DataFrameComponent extends BaseComponent {
34
34
  striped: options.striped ?? true,
35
35
  hoverable: options.hoverable ?? true,
36
36
  sortable: options.sortable ?? true,
37
- filterable: options.filterable ?? false, // defer until data loaded
37
+ filterable: options.filterable ?? false,
38
38
  paginated: options.paginated ?? true,
39
39
  rowsPerPage: options.rowsPerPage ?? 25
40
40
  };
@@ -118,12 +118,6 @@ export class DataFrameComponent extends BaseComponent {
118
118
  }
119
119
  return this;
120
120
  }
121
- /**
122
- * Add an inline file upload control.
123
- * @param label - Button label (default: 'Upload File')
124
- * @param accept - File types (default: '.csv,.tsv,.txt,.xlsx,.xls')
125
- * @param icon - Upload icon name (default: 'upload'). Pass '' to hide icon.
126
- */
127
121
  withUpload(label = 'Upload File', accept = '.csv,.tsv,.txt,.xlsx,.xls', icon = 'upload') {
128
122
  this._inlineUpload = { label, accept, icon };
129
123
  return this;
@@ -131,9 +125,7 @@ export class DataFrameComponent extends BaseComponent {
131
125
  /* ═══════════════════════════════════════════════════
132
126
  * UI TOGGLES
133
127
  * ═══════════════════════════════════════════════════ */
134
- /** Show/hide the status bar */
135
128
  showStatus(v) { this._showStatus = v; return this; }
136
- /** Set a custom icon for the status bar */
137
129
  statusIcon(v) { this._icon = v; return this; }
138
130
  /* ═══════════════════════════════════════════════════
139
131
  * TRANSFORM API
@@ -203,7 +195,6 @@ export class DataFrameComponent extends BaseComponent {
203
195
  el.className = 'jux-dataframe-status';
204
196
  if (type)
205
197
  el.classList.add(`jux-dataframe-status-${type}`);
206
- // Clear and rebuild
207
198
  el.innerHTML = '';
208
199
  if (this._icon && type === 'success') {
209
200
  const iconEl = renderIcon(this._icon);
@@ -230,7 +221,6 @@ export class DataFrameComponent extends BaseComponent {
230
221
  }
231
222
  this._updateTable();
232
223
  this._updateStatus(`${sourceName} — ${this._df.height} rows × ${this._df.width} cols`, 'success');
233
- // Enable filter now that data exists
234
224
  if (this._tableOptions.filterable) {
235
225
  this._showFilterInput();
236
226
  }
@@ -245,7 +235,6 @@ export class DataFrameComponent extends BaseComponent {
245
235
  const wrapper = document.getElementById(this._id);
246
236
  if (!wrapper)
247
237
  return;
248
- // Only add once
249
238
  if (wrapper.querySelector('.jux-dataframe-filter'))
250
239
  return;
251
240
  const filterContainer = document.createElement('div');
@@ -262,14 +251,11 @@ export class DataFrameComponent extends BaseComponent {
262
251
  iconWrap.appendChild(iconEl);
263
252
  filterContainer.appendChild(iconWrap);
264
253
  filterContainer.appendChild(input);
265
- // FIX: Find the table wrapper that's a direct child of wrapper
266
- const tableWrapper = wrapper.querySelector('.jux-table-wrapper');
267
- if (tableWrapper && tableWrapper.parentElement === wrapper) {
268
- // ✅ Insert before table wrapper (safe because we verified it's a child)
269
- wrapper.insertBefore(filterContainer, tableWrapper);
254
+ const tableElement = wrapper.querySelector('.jux-table-wrapper table');
255
+ if (tableElement && tableElement.parentElement) {
256
+ tableElement.parentElement.insertBefore(filterContainer, tableElement);
270
257
  }
271
258
  else {
272
- // ✅ Fallback: just append to wrapper
273
259
  wrapper.appendChild(filterContainer);
274
260
  }
275
261
  input.addEventListener('input', () => {
@@ -300,7 +286,6 @@ export class DataFrameComponent extends BaseComponent {
300
286
  wrapper.className += ` ${className}`;
301
287
  if (style)
302
288
  wrapper.setAttribute('style', style);
303
- // Inline upload
304
289
  if (this._inlineUpload) {
305
290
  const uploadOpts = {
306
291
  label: this._inlineUpload.label,
@@ -340,7 +325,6 @@ export class DataFrameComponent extends BaseComponent {
340
325
  else {
341
326
  container.appendChild(wrapper);
342
327
  }
343
- // Status bar (conditional)
344
328
  if (this._showStatus) {
345
329
  const statusBar = document.createElement('div');
346
330
  statusBar.className = 'jux-dataframe-status jux-dataframe-status-empty';
@@ -348,18 +332,16 @@ export class DataFrameComponent extends BaseComponent {
348
332
  statusBar.textContent = 'No data loaded.';
349
333
  wrapper.appendChild(statusBar);
350
334
  }
351
- // Table — filterable is false initially; we enable it after data loads
352
335
  const tbl = new Table(`${this._id}-table`, {
353
336
  striped: this._tableOptions.striped,
354
337
  hoverable: this._tableOptions.hoverable,
355
338
  sortable: this._tableOptions.sortable,
356
- filterable: false, // we handle filtering ourselves
339
+ filterable: false,
357
340
  paginated: this._tableOptions.paginated,
358
341
  rowsPerPage: this._tableOptions.rowsPerPage
359
342
  });
360
343
  tbl.render(wrapper);
361
344
  this._table = tbl;
362
- // Execute pending data source
363
345
  if (this._pendingSource) {
364
346
  const fn = this._pendingSource;
365
347
  this._pendingSource = null;
@@ -74,7 +74,7 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
74
74
  striped: options.striped ?? true,
75
75
  hoverable: options.hoverable ?? true,
76
76
  sortable: options.sortable ?? true,
77
- filterable: options.filterable ?? false, // defer until data loaded
77
+ filterable: options.filterable ?? false,
78
78
  paginated: options.paginated ?? true,
79
79
  rowsPerPage: options.rowsPerPage ?? 25
80
80
  };
@@ -150,17 +150,7 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
150
150
  return this;
151
151
  }
152
152
 
153
- /**
154
- * Add an inline file upload control.
155
- * @param label - Button label (default: 'Upload File')
156
- * @param accept - File types (default: '.csv,.tsv,.txt,.xlsx,.xls')
157
- * @param icon - Upload icon name (default: 'upload'). Pass '' to hide icon.
158
- */
159
- withUpload(
160
- label: string = 'Upload File',
161
- accept: string = '.csv,.tsv,.txt,.xlsx,.xls',
162
- icon: string = 'upload'
163
- ): this {
153
+ withUpload(label: string = 'Upload File', accept: string = '.csv,.tsv,.txt,.xlsx,.xls', icon: string = 'upload'): this {
164
154
  this._inlineUpload = { label, accept, icon };
165
155
  return this;
166
156
  }
@@ -169,10 +159,7 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
169
159
  * UI TOGGLES
170
160
  * ═══════════════════════════════════════════════════ */
171
161
 
172
- /** Show/hide the status bar */
173
162
  showStatus(v: boolean): this { this._showStatus = v; return this; }
174
-
175
- /** Set a custom icon for the status bar */
176
163
  statusIcon(v: string): this { this._icon = v; return this; }
177
164
 
178
165
  /* ═══════════════════════════════════════════════════
@@ -256,7 +243,6 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
256
243
  el.className = 'jux-dataframe-status';
257
244
  if (type) el.classList.add(`jux-dataframe-status-${type}`);
258
245
 
259
- // Clear and rebuild
260
246
  el.innerHTML = '';
261
247
 
262
248
  if (this._icon && type === 'success') {
@@ -292,7 +278,6 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
292
278
  'success'
293
279
  );
294
280
 
295
- // Enable filter now that data exists
296
281
  if (this._tableOptions.filterable) {
297
282
  this._showFilterInput();
298
283
  }
@@ -308,8 +293,6 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
308
293
  private _showFilterInput(): void {
309
294
  const wrapper = document.getElementById(this._id);
310
295
  if (!wrapper) return;
311
-
312
- // Only add once
313
296
  if (wrapper.querySelector('.jux-dataframe-filter')) return;
314
297
 
315
298
  const filterContainer = document.createElement('div');
@@ -331,14 +314,10 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
331
314
  filterContainer.appendChild(iconWrap);
332
315
  filterContainer.appendChild(input);
333
316
 
334
- // FIX: Find the table wrapper that's a direct child of wrapper
335
- const tableWrapper = wrapper.querySelector('.jux-table-wrapper');
336
-
337
- if (tableWrapper && tableWrapper.parentElement === wrapper) {
338
- // ✅ Insert before table wrapper (safe because we verified it's a child)
339
- wrapper.insertBefore(filterContainer, tableWrapper);
317
+ const tableElement = wrapper.querySelector('.jux-table-wrapper table');
318
+ if (tableElement && tableElement.parentElement) {
319
+ tableElement.parentElement.insertBefore(filterContainer, tableElement);
340
320
  } else {
341
- // ✅ Fallback: just append to wrapper
342
321
  wrapper.appendChild(filterContainer);
343
322
  }
344
323
 
@@ -374,7 +353,6 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
374
353
  if (className) wrapper.className += ` ${className}`;
375
354
  if (style) wrapper.setAttribute('style', style);
376
355
 
377
- // Inline upload
378
356
  if (this._inlineUpload) {
379
357
  const uploadOpts: any = {
380
358
  label: this._inlineUpload.label,
@@ -415,7 +393,6 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
415
393
  container.appendChild(wrapper);
416
394
  }
417
395
 
418
- // Status bar (conditional)
419
396
  if (this._showStatus) {
420
397
  const statusBar = document.createElement('div');
421
398
  statusBar.className = 'jux-dataframe-status jux-dataframe-status-empty';
@@ -424,19 +401,17 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
424
401
  wrapper.appendChild(statusBar);
425
402
  }
426
403
 
427
- // Table — filterable is false initially; we enable it after data loads
428
404
  const tbl = new Table(`${this._id}-table`, {
429
405
  striped: this._tableOptions.striped,
430
406
  hoverable: this._tableOptions.hoverable,
431
407
  sortable: this._tableOptions.sortable,
432
- filterable: false, // we handle filtering ourselves
408
+ filterable: false,
433
409
  paginated: this._tableOptions.paginated,
434
410
  rowsPerPage: this._tableOptions.rowsPerPage
435
411
  });
436
412
  tbl.render(wrapper);
437
413
  this._table = tbl;
438
414
 
439
- // Execute pending data source
440
415
  if (this._pendingSource) {
441
416
  const fn = this._pendingSource;
442
417
  this._pendingSource = null;
@@ -444,6 +419,7 @@ export class DataFrameComponent extends BaseComponent<DataFrameState> {
444
419
  }
445
420
 
446
421
  this._wireStandardEvents(wrapper);
422
+
447
423
  return this;
448
424
  }
449
425
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "juxscript",
3
- "version": "1.1.169",
3
+ "version": "1.1.171",
4
4
  "type": "module",
5
5
  "description": "A JavaScript UX authorship platform",
6
6
  "main": "index.js",