@marimo-team/islands 0.23.14-dev15 → 0.23.14-dev17
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/{code-visibility-Ck05_GCr.js → code-visibility-Cb6UrZYv.js} +125 -112
- package/dist/main.js +986 -953
- package/dist/{reveal-component-BKnc63lN.js → reveal-component-BFhE2zHY.js} +12 -12
- package/package.json +1 -1
- package/src/components/data-table/__tests__/column-explorer.test.tsx +25 -0
- package/src/components/data-table/__tests__/column-visibility-dropdown.test.tsx +60 -3
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +33 -12
- package/src/components/data-table/column-visibility-dropdown.tsx +15 -0
|
@@ -35,7 +35,7 @@ import { n as formats } from "./vega-loader.browser-CZ-J8Py3.js";
|
|
|
35
35
|
import { a as getContainerWidth, n as vegaLoadData, r as createBatchedLoader, s as tooltipHandler, t as parseCsvData } from "./loader-Boph2xIS.js";
|
|
36
36
|
import { t as useIframeCapabilities } from "./useIframeCapabilities-DWIYvDh7.js";
|
|
37
37
|
import { t as useAsyncData } from "./useAsyncData-BMc8itk2.js";
|
|
38
|
-
let
|
|
38
|
+
let PANEL_TYPES, HtmlOutput, prettifyRowCount, INDEX_COLUMN_NAME, CompactChipRow, dateToLocalISODateTime, downloadSizeLimitAtom, ColumnChartSpecModel, ErrorState, getPageIndexForRow, EmptyState, usePrevious, ContextMenuItem, hasFunctionProperty, Command, TabsTrigger, DateRangePicker, Tabs, ContextMenuSeparator, isRecord, CommandItem, ChartLoadingState, CommandEmpty, ChartErrorState, ContextMenuTrigger, isNullishFilter, getUserColumnVisibilityCounts, TOO_MANY_ROWS, ContextMenu, toFieldTypes, LoadingState, loadTableAndRawData, ContextMenuContent, getMimeValues, ContextAwarePanelItem, Kbd, useInternalStateWithSync, Maps, Filenames, ColumnChartContext, ColumnPreviewContainer, useIntersectionObserver, Combobox, TabsContent, DatePicker, dateToLocalISOTime, ComboboxItem, TabsList, CommandSeparator, useOverflowDetection, CommandList, LazyVegaEmbed, smartMatch, RenderTextWithLinks, ADD_PRINTING_CLASS, TableRow, DEFAULT_SLIDE_TYPE, Funnel, slotsController, downloadHTMLAsImage, inferFieldTypes, Slide, Ellipsis, PanelGroup, RadioGroupItem, ChevronsUpDown, Provider$1, EmotionCacheProvider, contextAwarePanelOpen, JsonOutput, ChevronsRight, Table, InstallPackageButton, ArrowDownWideNarrow, TableHeader, DataTable, ChevronLeft, TableHead, DEFAULT_DECK_TRANSITION, GripHorizontal, SlotNames, getColumnCountForDisplay, SELECT_COLUMN_ID, prettifyRowColumnCount, loadTableData, Switch, Download, PanelResizeHandle, OutputRenderer, ChevronsDownUp, TableCell, marimoVersionAtom, $fae977aafc393c5c$export$6b862160d295c8e, contextAwarePanelType, SLIDE_TYPE_OPTIONS_BY_VALUE, EyeOff, Toggle, OutputArea, ChevronsLeft, TableBody, CommandInput, ChartInfoState, showCodeInRunModeAtom, TextWrap, isCellAwareAtom, SlideSidebar, Expand, Panel, useNotebookCodeAvailable, $fae977aafc393c5c$export$588937bcd60ade55, contextAwarePanelOwner, RadioGroup, Code, Fill, downloadBlob, NAMELESS_COLUMN_PREFIX, ColumnName, DelayMount, Progress, renderCellValue, downloadByURL, generateColumns, useSelectList, dateToLocalISODate;
|
|
39
39
|
let __tla = Promise.all([
|
|
40
40
|
(() => {
|
|
41
41
|
try {
|
|
@@ -32974,14 +32974,14 @@ Database schema: ${e2}`);
|
|
|
32974
32974
|
setColumnVisibility: n
|
|
32975
32975
|
};
|
|
32976
32976
|
}
|
|
32977
|
-
function
|
|
32977
|
+
getUserColumnVisibilityCounts = function(e) {
|
|
32978
32978
|
let t = e.getAllLeafColumns().filter((e2) => e2.getCanHide()), n = t.filter((e2) => e2.getIsVisible()).length;
|
|
32979
32979
|
return {
|
|
32980
32980
|
total: t.length,
|
|
32981
32981
|
visible: n,
|
|
32982
32982
|
hidden: t.length - n
|
|
32983
32983
|
};
|
|
32984
|
-
}
|
|
32984
|
+
};
|
|
32985
32985
|
getColumnCountForDisplay = function(e, t) {
|
|
32986
32986
|
let n = getUserColumnVisibilityCounts(e);
|
|
32987
32987
|
return {
|
|
@@ -33626,7 +33626,7 @@ Database schema: ${e2}`);
|
|
|
33626
33626
|
dataType: (_a2 = e2.columnDef.meta) == null ? void 0 : _a2.dataType
|
|
33627
33627
|
}
|
|
33628
33628
|
};
|
|
33629
|
-
}), i = t.filter((e2) => !e2.getIsVisible()).map((e2) => e2.id), s = (n2) => {
|
|
33629
|
+
}), i = t.filter((e2) => !e2.getIsVisible()).map((e2) => e2.id), s = t.filter((e2) => e2.getCanHide()).map((e2) => e2.id), c = s.filter((e2) => !i.includes(e2)).length, d = (n2) => {
|
|
33630
33630
|
let i2 = new Set(Array.isArray(n2) ? n2 : []);
|
|
33631
33631
|
e.setColumnVisibility((e2) => ({
|
|
33632
33632
|
...e2,
|
|
@@ -33635,17 +33635,17 @@ Database schema: ${e2}`);
|
|
|
33635
33635
|
!i2.has(e3.id)
|
|
33636
33636
|
]))
|
|
33637
33637
|
}));
|
|
33638
|
-
},
|
|
33638
|
+
}, f = useSelectList({
|
|
33639
33639
|
options: n,
|
|
33640
33640
|
value: i,
|
|
33641
|
-
onChange:
|
|
33641
|
+
onChange: d,
|
|
33642
33642
|
multiple: true,
|
|
33643
33643
|
filterFn: smartMatchFilter,
|
|
33644
33644
|
pinSelected: true
|
|
33645
|
-
}),
|
|
33645
|
+
}), _ = f.bulkActions.filter((e2) => e2.kind === "select-matching" || e2.kind === "deselect-matching");
|
|
33646
33646
|
return (0, import_jsx_runtime.jsxs)(Popover, {
|
|
33647
|
-
open:
|
|
33648
|
-
onOpenChange:
|
|
33647
|
+
open: f.open,
|
|
33648
|
+
onOpenChange: f.setOpen,
|
|
33649
33649
|
children: [
|
|
33650
33650
|
(0, import_jsx_runtime.jsx)(PopoverTrigger, {
|
|
33651
33651
|
asChild: true,
|
|
@@ -33654,7 +33654,7 @@ Database schema: ${e2}`);
|
|
|
33654
33654
|
size: "xs",
|
|
33655
33655
|
"data-testid": "column-visibility-trigger",
|
|
33656
33656
|
onMouseDown: Events.preventFocus,
|
|
33657
|
-
className: cn("print:hidden text-xs gap-1",
|
|
33657
|
+
className: cn("print:hidden text-xs gap-1", f.open ? "text-primary" : "text-muted-foreground"),
|
|
33658
33658
|
children: [
|
|
33659
33659
|
(0, import_jsx_runtime.jsx)(Columns3, {
|
|
33660
33660
|
className: "w-3.5 h-3.5"
|
|
@@ -33671,20 +33671,20 @@ Database schema: ${e2}`);
|
|
|
33671
33671
|
children: [
|
|
33672
33672
|
(0, import_jsx_runtime.jsx)(CommandInput, {
|
|
33673
33673
|
placeholder: "Search columns...",
|
|
33674
|
-
value:
|
|
33675
|
-
onValueChange:
|
|
33674
|
+
value: f.searchQuery,
|
|
33675
|
+
onValueChange: f.setSearchQuery
|
|
33676
33676
|
}),
|
|
33677
33677
|
(0, import_jsx_runtime.jsxs)(CommandList, {
|
|
33678
33678
|
children: [
|
|
33679
33679
|
(0, import_jsx_runtime.jsx)(CommandEmpty, {
|
|
33680
33680
|
children: "No results."
|
|
33681
33681
|
}),
|
|
33682
|
-
|
|
33682
|
+
f.searchQuery === "" ? (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
33683
33683
|
children: [
|
|
33684
33684
|
(0, import_jsx_runtime.jsxs)(CommandItem, {
|
|
33685
33685
|
value: "__show_all__",
|
|
33686
33686
|
disabled: i.length === 0,
|
|
33687
|
-
onSelect: () =>
|
|
33687
|
+
onSelect: () => d([]),
|
|
33688
33688
|
className: "cursor-pointer",
|
|
33689
33689
|
children: [
|
|
33690
33690
|
(0, import_jsx_runtime.jsx)(Eye, {
|
|
@@ -33693,11 +33693,23 @@ Database schema: ${e2}`);
|
|
|
33693
33693
|
"Show all"
|
|
33694
33694
|
]
|
|
33695
33695
|
}),
|
|
33696
|
+
(0, import_jsx_runtime.jsxs)(CommandItem, {
|
|
33697
|
+
value: "__hide_all__",
|
|
33698
|
+
disabled: c === 0,
|
|
33699
|
+
onSelect: () => d(s),
|
|
33700
|
+
className: "cursor-pointer",
|
|
33701
|
+
children: [
|
|
33702
|
+
(0, import_jsx_runtime.jsx)(EyeOff, {
|
|
33703
|
+
className: "w-3 h-3 mr-1.5"
|
|
33704
|
+
}),
|
|
33705
|
+
"Hide all"
|
|
33706
|
+
]
|
|
33707
|
+
}),
|
|
33696
33708
|
(0, import_jsx_runtime.jsx)(CommandSeparator, {})
|
|
33697
33709
|
]
|
|
33698
|
-
}) :
|
|
33710
|
+
}) : _.length > 0 && (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
33699
33711
|
children: [
|
|
33700
|
-
|
|
33712
|
+
_.map((e2) => (0, import_jsx_runtime.jsxs)(CommandItem, {
|
|
33701
33713
|
value: `__bulk_${e2.kind}`,
|
|
33702
33714
|
onSelect: e2.run,
|
|
33703
33715
|
className: "cursor-pointer",
|
|
@@ -33716,15 +33728,15 @@ Database schema: ${e2}`);
|
|
|
33716
33728
|
(0, import_jsx_runtime.jsx)(CommandSeparator, {})
|
|
33717
33729
|
]
|
|
33718
33730
|
}),
|
|
33719
|
-
|
|
33720
|
-
let n2 =
|
|
33731
|
+
f.visibleOptions.map((e2, t2) => {
|
|
33732
|
+
let n2 = f.isChecked(e2.value), { dataType: i2 } = e2.data, o = t2 === f.pinnedCount && f.pinnedCount > 0 && f.pinnedCount < f.visibleOptions.length;
|
|
33721
33733
|
return (0, import_jsx_runtime.jsxs)(import_react.Fragment, {
|
|
33722
33734
|
children: [
|
|
33723
33735
|
o && (0, import_jsx_runtime.jsx)(CommandSeparator, {}),
|
|
33724
33736
|
(0, import_jsx_runtime.jsxs)(CommandItem, {
|
|
33725
33737
|
value: e2.value,
|
|
33726
33738
|
disabled: e2.disabled,
|
|
33727
|
-
onSelect: () =>
|
|
33739
|
+
onSelect: () => f.toggle(e2.value),
|
|
33728
33740
|
className: "flex items-center gap-1.5 cursor-pointer",
|
|
33729
33741
|
children: [
|
|
33730
33742
|
i2 === void 0 ? (0, import_jsx_runtime.jsx)("span", {
|
|
@@ -36194,7 +36206,7 @@ ${d}`,
|
|
|
36194
36206
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
36195
36207
|
}
|
|
36196
36208
|
}
|
|
36197
|
-
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.14-
|
|
36209
|
+
marimoVersionAtom = atom(getVersionFromMountConfig() || "0.23.14-dev17");
|
|
36198
36210
|
showCodeInRunModeAtom = atom(true);
|
|
36199
36211
|
atom(null);
|
|
36200
36212
|
var import_compiler_runtime = require_compiler_runtime();
|
|
@@ -36222,128 +36234,129 @@ ${d}`,
|
|
|
36222
36234
|
}
|
|
36223
36235
|
});
|
|
36224
36236
|
export {
|
|
36225
|
-
|
|
36226
|
-
|
|
36237
|
+
PANEL_TYPES as $,
|
|
36238
|
+
HtmlOutput as $t,
|
|
36227
36239
|
prettifyRowCount as A,
|
|
36228
|
-
|
|
36229
|
-
|
|
36230
|
-
|
|
36240
|
+
INDEX_COLUMN_NAME as At,
|
|
36241
|
+
CompactChipRow as B,
|
|
36242
|
+
dateToLocalISODateTime as Bt,
|
|
36231
36243
|
downloadSizeLimitAtom as C,
|
|
36232
|
-
|
|
36244
|
+
ColumnChartSpecModel as Ct,
|
|
36233
36245
|
ErrorState as D,
|
|
36234
|
-
|
|
36246
|
+
getPageIndexForRow as Dt,
|
|
36235
36247
|
EmptyState as E,
|
|
36236
|
-
|
|
36237
|
-
|
|
36238
|
-
|
|
36239
|
-
|
|
36240
|
-
|
|
36241
|
-
|
|
36242
|
-
|
|
36243
|
-
|
|
36244
|
-
|
|
36245
|
-
|
|
36246
|
-
|
|
36247
|
-
|
|
36248
|
-
|
|
36249
|
-
|
|
36250
|
-
|
|
36251
|
-
|
|
36252
|
-
|
|
36253
|
-
|
|
36254
|
-
|
|
36248
|
+
usePrevious as Et,
|
|
36249
|
+
ContextMenuItem as F,
|
|
36250
|
+
hasFunctionProperty as Ft,
|
|
36251
|
+
Command as G,
|
|
36252
|
+
TabsTrigger as Gt,
|
|
36253
|
+
DateRangePicker as H,
|
|
36254
|
+
Tabs as Ht,
|
|
36255
|
+
ContextMenuSeparator as I,
|
|
36256
|
+
isRecord as It,
|
|
36257
|
+
CommandItem as J,
|
|
36258
|
+
ChartLoadingState as Jt,
|
|
36259
|
+
CommandEmpty as K,
|
|
36260
|
+
ChartErrorState as Kt,
|
|
36261
|
+
ContextMenuTrigger as L,
|
|
36262
|
+
isNullishFilter as Lt,
|
|
36263
|
+
getUserColumnVisibilityCounts as M,
|
|
36264
|
+
TOO_MANY_ROWS as Mt,
|
|
36265
|
+
ContextMenu as N,
|
|
36266
|
+
toFieldTypes as Nt,
|
|
36255
36267
|
LoadingState as O,
|
|
36256
|
-
|
|
36257
|
-
|
|
36258
|
-
|
|
36259
|
-
|
|
36260
|
-
|
|
36261
|
-
|
|
36262
|
-
|
|
36268
|
+
loadTableAndRawData as Ot,
|
|
36269
|
+
ContextMenuContent as P,
|
|
36270
|
+
getMimeValues as Pt,
|
|
36271
|
+
ContextAwarePanelItem as Q,
|
|
36272
|
+
Kbd as Qt,
|
|
36273
|
+
useInternalStateWithSync as R,
|
|
36274
|
+
Maps as Rt,
|
|
36263
36275
|
Filenames as S,
|
|
36264
|
-
|
|
36276
|
+
ColumnChartContext as St,
|
|
36265
36277
|
ColumnPreviewContainer as T,
|
|
36266
|
-
|
|
36267
|
-
|
|
36268
|
-
|
|
36269
|
-
|
|
36270
|
-
|
|
36271
|
-
|
|
36272
|
-
|
|
36273
|
-
|
|
36274
|
-
|
|
36275
|
-
|
|
36276
|
-
|
|
36277
|
-
|
|
36278
|
-
|
|
36278
|
+
useIntersectionObserver as Tt,
|
|
36279
|
+
Combobox as U,
|
|
36280
|
+
TabsContent as Ut,
|
|
36281
|
+
DatePicker as V,
|
|
36282
|
+
dateToLocalISOTime as Vt,
|
|
36283
|
+
ComboboxItem as W,
|
|
36284
|
+
TabsList as Wt,
|
|
36285
|
+
CommandSeparator as X,
|
|
36286
|
+
useOverflowDetection as Xt,
|
|
36287
|
+
CommandList as Y,
|
|
36288
|
+
LazyVegaEmbed as Yt,
|
|
36289
|
+
smartMatch as Z,
|
|
36290
|
+
RenderTextWithLinks as Zt,
|
|
36279
36291
|
ADD_PRINTING_CLASS as _,
|
|
36280
36292
|
__tla,
|
|
36281
|
-
|
|
36293
|
+
TableRow as _t,
|
|
36282
36294
|
DEFAULT_SLIDE_TYPE as a,
|
|
36283
|
-
|
|
36284
|
-
|
|
36295
|
+
Funnel as an,
|
|
36296
|
+
slotsController as at,
|
|
36285
36297
|
downloadHTMLAsImage as b,
|
|
36286
|
-
|
|
36298
|
+
inferFieldTypes as bt,
|
|
36287
36299
|
Slide as c,
|
|
36288
|
-
|
|
36289
|
-
|
|
36300
|
+
Ellipsis as cn,
|
|
36301
|
+
PanelGroup as ct,
|
|
36290
36302
|
RadioGroupItem as d,
|
|
36291
|
-
|
|
36292
|
-
|
|
36293
|
-
|
|
36294
|
-
|
|
36303
|
+
ChevronsUpDown as dn,
|
|
36304
|
+
Provider$1 as dt,
|
|
36305
|
+
EmotionCacheProvider as en,
|
|
36306
|
+
contextAwarePanelOpen as et,
|
|
36295
36307
|
JsonOutput as f,
|
|
36296
|
-
|
|
36297
|
-
|
|
36308
|
+
ChevronsRight as fn,
|
|
36309
|
+
Table as ft,
|
|
36298
36310
|
InstallPackageButton as g,
|
|
36299
|
-
|
|
36311
|
+
ArrowDownWideNarrow as gn,
|
|
36312
|
+
TableHeader as gt,
|
|
36300
36313
|
DataTable as h,
|
|
36301
|
-
|
|
36302
|
-
|
|
36314
|
+
ChevronLeft as hn,
|
|
36315
|
+
TableHead as ht,
|
|
36303
36316
|
DEFAULT_DECK_TRANSITION as i,
|
|
36304
|
-
|
|
36305
|
-
|
|
36317
|
+
GripHorizontal as in,
|
|
36318
|
+
SlotNames as it,
|
|
36306
36319
|
getColumnCountForDisplay as j,
|
|
36307
|
-
|
|
36320
|
+
SELECT_COLUMN_ID as jt,
|
|
36308
36321
|
prettifyRowColumnCount as k,
|
|
36309
|
-
|
|
36322
|
+
loadTableData as kt,
|
|
36310
36323
|
Switch as l,
|
|
36311
|
-
|
|
36312
|
-
|
|
36324
|
+
Download as ln,
|
|
36325
|
+
PanelResizeHandle as lt,
|
|
36313
36326
|
OutputRenderer as m,
|
|
36314
|
-
|
|
36315
|
-
|
|
36327
|
+
ChevronsDownUp as mn,
|
|
36328
|
+
TableCell as mt,
|
|
36316
36329
|
marimoVersionAtom as n,
|
|
36317
|
-
|
|
36318
|
-
|
|
36330
|
+
$fae977aafc393c5c$export$6b862160d295c8e as nn,
|
|
36331
|
+
contextAwarePanelType as nt,
|
|
36319
36332
|
SLIDE_TYPE_OPTIONS_BY_VALUE as o,
|
|
36320
|
-
|
|
36321
|
-
|
|
36333
|
+
EyeOff as on,
|
|
36334
|
+
Toggle as ot,
|
|
36322
36335
|
OutputArea as p,
|
|
36323
|
-
|
|
36324
|
-
|
|
36325
|
-
|
|
36326
|
-
|
|
36336
|
+
ChevronsLeft as pn,
|
|
36337
|
+
TableBody as pt,
|
|
36338
|
+
CommandInput as q,
|
|
36339
|
+
ChartInfoState as qt,
|
|
36327
36340
|
showCodeInRunModeAtom as r,
|
|
36328
|
-
|
|
36329
|
-
|
|
36341
|
+
TextWrap as rn,
|
|
36342
|
+
isCellAwareAtom as rt,
|
|
36330
36343
|
SlideSidebar as s,
|
|
36331
|
-
|
|
36332
|
-
|
|
36344
|
+
Expand as sn,
|
|
36345
|
+
Panel as st,
|
|
36333
36346
|
useNotebookCodeAvailable as t,
|
|
36334
|
-
$fae977aafc393c5c$export$
|
|
36335
|
-
|
|
36347
|
+
$fae977aafc393c5c$export$588937bcd60ade55 as tn,
|
|
36348
|
+
contextAwarePanelOwner as tt,
|
|
36336
36349
|
RadioGroup as u,
|
|
36337
|
-
|
|
36338
|
-
|
|
36350
|
+
Code as un,
|
|
36351
|
+
Fill as ut,
|
|
36339
36352
|
downloadBlob as v,
|
|
36340
|
-
|
|
36353
|
+
NAMELESS_COLUMN_PREFIX as vt,
|
|
36341
36354
|
ColumnName as w,
|
|
36342
|
-
|
|
36355
|
+
DelayMount as wt,
|
|
36343
36356
|
Progress as x,
|
|
36344
|
-
|
|
36357
|
+
renderCellValue as xt,
|
|
36345
36358
|
downloadByURL as y,
|
|
36346
|
-
|
|
36347
|
-
|
|
36348
|
-
|
|
36359
|
+
generateColumns as yt,
|
|
36360
|
+
useSelectList as z,
|
|
36361
|
+
dateToLocalISODate as zt
|
|
36349
36362
|
};
|