@marimo-team/islands 0.21.2-dev5 → 0.21.2-dev53
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/{any-language-editor-DlsjUw_l.js → any-language-editor-BRpxklRq.js} +1 -1
- package/dist/{copy-DIK6DiIA.js → copy-BjkXCUxP.js} +12 -2
- package/dist/{esm-BLobyqMs.js → esm-No_6eSQS.js} +1 -1
- package/dist/{glide-data-editor-pZyd9UJ_.js → glide-data-editor-858wsVkd.js} +1 -1
- package/dist/main.js +579 -402
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/__mocks__/notebook.ts +9 -9
- package/src/__tests__/branded.ts +20 -0
- package/src/components/app-config/user-config-form.tsx +5 -4
- package/src/components/data-table/__tests__/utils.test.ts +138 -1
- package/src/components/data-table/charts/__tests__/storage.test.ts +7 -7
- package/src/components/data-table/context-menu.tsx +9 -5
- package/src/components/data-table/data-table.tsx +3 -0
- package/src/components/data-table/range-focus/__tests__/atoms.test.ts +8 -2
- package/src/components/data-table/range-focus/__tests__/test-utils.ts +2 -0
- package/src/components/data-table/range-focus/__tests__/utils.test.ts +82 -8
- package/src/components/data-table/range-focus/atoms.ts +2 -2
- package/src/components/data-table/range-focus/utils.ts +50 -12
- package/src/components/data-table/types.ts +7 -0
- package/src/components/data-table/utils.ts +87 -0
- package/src/components/editor/__tests__/data-attributes.test.tsx +8 -8
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +15 -15
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +2 -2
- package/src/components/editor/navigation/__tests__/selection.test.ts +7 -6
- package/src/components/editor/navigation/__tests__/state.test.ts +8 -7
- package/src/components/editor/output/MarimoErrorOutput.tsx +7 -7
- package/src/components/editor/output/__tests__/traceback.test.tsx +4 -4
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +4 -4
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +8 -1
- package/src/components/storage/storage-file-viewer.tsx +35 -1
- package/src/components/storage/storage-inspector.tsx +9 -4
- package/src/components/storage/storage-snippets.ts +3 -3
- package/src/components/tracing/tracing.tsx +3 -1
- package/src/components/ui/range-slider.tsx +108 -1
- package/src/core/ai/__tests__/staged-cells.test.ts +9 -8
- package/src/core/ai/context/providers/__tests__/cell-output.test.ts +31 -31
- package/src/core/ai/context/providers/__tests__/datasource.test.ts +3 -3
- package/src/core/ai/context/providers/__tests__/tables.test.ts +3 -2
- package/src/core/ai/context/providers/__tests__/variable.test.ts +84 -63
- package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +10 -9
- package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +6 -6
- package/src/core/ai/tools/edit-notebook-tool.ts +3 -3
- package/src/core/cells/__tests__/add-missing-import.test.ts +3 -3
- package/src/core/cells/__tests__/cells.test.ts +192 -135
- package/src/core/cells/__tests__/focus.test.ts +5 -4
- package/src/core/cells/__tests__/logs.test.ts +13 -12
- package/src/core/cells/__tests__/pending-delete-service.test.tsx +3 -3
- package/src/core/cells/__tests__/runs.test.ts +22 -21
- package/src/core/cells/__tests__/scrollCellIntoView.test.ts +8 -7
- package/src/core/cells/__tests__/session.test.ts +23 -22
- package/src/core/cells/cells.ts +1 -1
- package/src/core/cells/ids.ts +5 -5
- package/src/core/cells/logs.ts +2 -2
- package/src/core/cells/runs.ts +6 -8
- package/src/core/codemirror/__tests__/format.test.ts +34 -36
- package/src/core/codemirror/__tests__/setup.test.ts +2 -2
- package/src/core/codemirror/cells/__tests__/extensions.test.ts +114 -0
- package/src/core/codemirror/cells/__tests__/traceback-decorations.test.ts +33 -32
- package/src/core/codemirror/cells/extensions.ts +66 -23
- package/src/core/codemirror/completion/__tests__/keymap.test.ts +15 -35
- package/src/core/codemirror/completion/keymap.ts +14 -4
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +12 -13
- package/src/core/codemirror/language/__tests__/utils.test.ts +3 -3
- package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +7 -8
- package/src/core/codemirror/language/languages/python.ts +4 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +4 -3
- package/src/core/codemirror/lsp/notebook-lsp.ts +28 -2
- package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +7 -6
- package/src/core/codemirror/reactive-references/analyzer.ts +2 -2
- package/src/core/codemirror/rtc/loro/__tests__/sync.test.ts +52 -0
- package/src/core/codemirror/rtc/loro/sync.ts +1 -0
- package/src/core/datasets/__tests__/data-source.test.ts +5 -6
- package/src/core/datasets/state.ts +1 -1
- package/src/core/errors/__tests__/errors.test.ts +2 -1
- package/src/core/export/__tests__/hooks.test.ts +37 -36
- package/src/core/islands/main.ts +2 -7
- package/src/core/kernel/__tests__/handlers.test.ts +5 -4
- package/src/core/kernel/handlers.ts +7 -4
- package/src/core/network/DeferredRequestRegistry.ts +2 -2
- package/src/core/network/__tests__/CachingRequestRegistry.test.ts +9 -10
- package/src/core/network/__tests__/DeferredRequestRegistry.test.ts +4 -6
- package/src/core/static/__tests__/virtual-file-tracker.test.ts +8 -8
- package/src/core/static/virtual-file-tracker.ts +1 -1
- package/src/core/storage/__tests__/state.test.ts +31 -21
- package/src/core/storage/state.ts +1 -1
- package/src/core/variables/__tests__/state.test.ts +6 -6
- package/src/core/variables/types.ts +2 -2
- package/src/core/wasm/__tests__/state.test.ts +8 -8
- package/src/core/websocket/useMarimoKernelConnection.tsx +12 -15
- package/src/css/md-tooltip.css +4 -39
- package/src/css/md.css +7 -0
- package/src/plugins/core/RenderHTML.tsx +17 -0
- package/src/plugins/core/__test__/RenderHTML.test.ts +45 -0
- package/src/plugins/core/sanitize-html.ts +25 -18
- package/src/plugins/impl/DataTablePlugin.tsx +23 -2
- package/src/plugins/impl/SliderPlugin.tsx +1 -3
- package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +120 -0
- package/src/plugins/impl/anywidget/model.ts +1 -2
- package/src/stories/cell.stories.tsx +8 -8
- package/src/stories/layout/vertical/one-column.stories.tsx +9 -8
- package/src/stories/log-viewer.stories.tsx +8 -8
- package/src/stories/variables.stories.tsx +2 -2
- package/src/utils/__tests__/download.test.tsx +21 -20
- package/src/utils/copy.ts +18 -5
- package/src/utils/download.ts +4 -3
- package/src/utils/html-to-image.ts +6 -0
- package/src/utils/json/base64.ts +3 -3
- package/src/utils/traceback.ts +5 -3
package/dist/main.js
CHANGED
|
@@ -20,7 +20,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
20
20
|
import { a as __toCommonJS, n as __esmMin, o as __toDynamicImportESM, r as __export$1, s as __toESM, t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
21
21
|
import { t as require_react } from "./react-Bs6Z0kvn.js";
|
|
22
22
|
import { t as require_compiler_runtime } from "./compiler-runtime-B_OLMU9S.js";
|
|
23
|
-
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-
|
|
23
|
+
import { n as Copy, r as toast, t as copyToClipboard } from "./copy-BjkXCUxP.js";
|
|
24
24
|
import { _ as require_cjs$1, c as markdownLineEnding, d as SKIP, f as visitParents, g as s$2, h as h$1, l as longestStreak, m as webNamespaces, o as xn$1, p as convert$1, s as factorySpace, u as ok, __tla as __tla_0 } from "./chunk-5FQGJX7Z-BkzUmppO.js";
|
|
25
25
|
import { a as Content$3, c as useSize, i as Arrow, l as createLucideIcon, o as Root2$6, r as Anchor, s as createPopperScope, t as Root$5 } from "./dist-C0Rnbr-_.js";
|
|
26
26
|
import { A as useOnMount, B as Table$1, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, F as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, G as ChartColumn, H as ListFilter, I as $fb18d541ea1ad717$export$ad991b66133851cf, K as Calendar, L as $5a387cc49350e6db$export$722debc0e56fea39, M as Badge, N as createReducerAndAtoms, O as TIME_UNIT_DESCRIPTIONS, P as startCase_default, R as Type, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, U as Hash, V as SquareFunction, W as ChartPie, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS$1, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as useOnUnmount, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON, z as ToggleLeft } from "./spec-Bfvf9Hre.js";
|
|
@@ -34,7 +34,7 @@ import { $ as __awaiter, A as custom, B as record, C as ZodUnion$1, D as any, E
|
|
|
34
34
|
import { t as require_jsx_runtime } from "./jsx-runtime-CTBg5pdT.js";
|
|
35
35
|
import { t as require_react_dom } from "./react-dom-CqtLRVZP.js";
|
|
36
36
|
import { a as TooltipRoot, i as TooltipProvider, n as TooltipContent, o as TooltipTrigger, r as TooltipPortal, s as TooltipProvider$1, t as Tooltip } from "./tooltip-CKG75XQa.js";
|
|
37
|
-
import { a as _extends$5, c as setDiagnostics, d as insertTab, f as CopyClipboardIcon, i as minimalSetup, l as history, o as forEachDiagnostic, r as esm_default, s as linter, t as langs, u as historyField } from "./esm-
|
|
37
|
+
import { a as _extends$5, c as setDiagnostics, d as insertTab, f as CopyClipboardIcon, i as minimalSetup, l as history, o as forEachDiagnostic, r as esm_default, s as linter, t as langs, u as historyField } from "./esm-No_6eSQS.js";
|
|
38
38
|
import { i as toInteger_default, n as _baseSet_default } from "./_basePickBy-pTDW2_2A.js";
|
|
39
39
|
import { i as get_default } from "./hasIn-B9AbGLj3.js";
|
|
40
40
|
import { n as pick_default, t as range_default } from "./range-BKaWvVUE.js";
|
|
@@ -27014,6 +27014,7 @@ ${c.sqlString}
|
|
|
27014
27014
|
function indentOneTab(e) {
|
|
27015
27015
|
return e.split("\n").map((e2) => (e2 == null ? void 0 : e2.trim()) ? ` ${e2}` : e2).join("\n");
|
|
27016
27016
|
}
|
|
27017
|
+
const loroSyncAnnotation = Annotation.define();
|
|
27017
27018
|
function initialState$4() {
|
|
27018
27019
|
return {};
|
|
27019
27020
|
}
|
|
@@ -27609,9 +27610,23 @@ ${c.sqlString}
|
|
|
27609
27610
|
}
|
|
27610
27611
|
});
|
|
27611
27612
|
}
|
|
27613
|
+
var MARKDOWN_AUTORUN_USER_EVENTS = [
|
|
27614
|
+
"input",
|
|
27615
|
+
"delete",
|
|
27616
|
+
"undo",
|
|
27617
|
+
"redo"
|
|
27618
|
+
];
|
|
27619
|
+
function shouldAutorunMarkdownUpdate({ docChanged: e, transactions: r, predicate: c = () => true, hasFocus: d = false }) {
|
|
27620
|
+
return !e || !c() || r.some((e2) => e2.effects.some((e3) => e3.is(formattingChangeEffect))) ? false : r.some((e2) => e2.annotation(loroSyncAnnotation) === void 0 ? MARKDOWN_AUTORUN_USER_EVENTS.some((r2) => e2.isUserEvent(r2)) || d : false);
|
|
27621
|
+
}
|
|
27612
27622
|
function markdownAutoRunExtension({ predicate: e }) {
|
|
27613
27623
|
return EditorView.updateListener.of((r) => {
|
|
27614
|
-
|
|
27624
|
+
shouldAutorunMarkdownUpdate({
|
|
27625
|
+
docChanged: r.docChanged,
|
|
27626
|
+
transactions: r.transactions,
|
|
27627
|
+
predicate: e,
|
|
27628
|
+
hasFocus: r.view.hasFocus
|
|
27629
|
+
}) && r.view.state.facet(cellActionsState).onRun();
|
|
27615
27630
|
});
|
|
27616
27631
|
}
|
|
27617
27632
|
const pythonCompletionSource = async (e) => {
|
|
@@ -29325,6 +29340,8 @@ ${c.sqlString}
|
|
|
29325
29340
|
var NotebookLanguageServerClient = (_a = class {
|
|
29326
29341
|
constructor(e, r, c = defaultGetNotebookEditors) {
|
|
29327
29342
|
__publicField(this, "completionItemCache", new LRUCache(10));
|
|
29343
|
+
__publicField(this, "latestDiagnosticsVersion", null);
|
|
29344
|
+
__publicField(this, "forwardedDiagnosticsVersion", 0);
|
|
29328
29345
|
this.documentUri = getLSPDocument(), this.getNotebookEditors = c, this.initialSettings = r, this.client = e, this.patchProcessNotification(), this.initializePromise.then(() => {
|
|
29329
29346
|
invariant(isClientWithNotify(this.client), "notify is not a method on the client"), this.client.notify("workspace/didChangeConfiguration", {
|
|
29330
29347
|
settings: r
|
|
@@ -29372,7 +29389,7 @@ ${c.sqlString}
|
|
|
29372
29389
|
settings: this.initialSettings
|
|
29373
29390
|
});
|
|
29374
29391
|
let { lens: e, version: r } = this.snapshotter.snapshot();
|
|
29375
|
-
await this.client.textDocumentDidOpen({
|
|
29392
|
+
this.latestDiagnosticsVersion = null, this.forwardedDiagnosticsVersion = 0, await this.client.textDocumentDidOpen({
|
|
29376
29393
|
textDocument: {
|
|
29377
29394
|
languageId: "python",
|
|
29378
29395
|
text: e.mergedText,
|
|
@@ -29570,39 +29587,49 @@ ${c.sqlString}
|
|
|
29570
29587
|
invariant("processNotification" in this.client, "processNotification is not a method on the client");
|
|
29571
29588
|
let r = this.client.processNotification.bind(this.client), c = (c2) => {
|
|
29572
29589
|
if (c2.method === "textDocument/publishDiagnostics") {
|
|
29590
|
+
let d = c2.params.version;
|
|
29591
|
+
if (d != null) {
|
|
29592
|
+
let e = this.latestDiagnosticsVersion;
|
|
29593
|
+
if (e !== null && Number.isFinite(d) && d < e) {
|
|
29594
|
+
Logger.debug("[lsp] dropping stale diagnostics notification", c2);
|
|
29595
|
+
return;
|
|
29596
|
+
}
|
|
29597
|
+
this.latestDiagnosticsVersion = d;
|
|
29598
|
+
}
|
|
29573
29599
|
Logger.debug("[lsp] handling diagnostics", c2);
|
|
29574
|
-
let
|
|
29575
|
-
for (let e of
|
|
29576
|
-
|
|
29600
|
+
let f = this.snapshotter.getLatestSnapshot(), _ = c2.params.diagnostics, { lens: v } = f, y = ++this.forwardedDiagnosticsVersion, S = /* @__PURE__ */ new Map();
|
|
29601
|
+
for (let e of _) for (let r2 of v.cellIds) if (v.isInRange(e.range, r2)) {
|
|
29602
|
+
S.has(r2) || S.set(r2, []);
|
|
29577
29603
|
let c3 = {
|
|
29578
29604
|
...e,
|
|
29579
|
-
range:
|
|
29605
|
+
range: v.reverseRange(e.range, r2)
|
|
29580
29606
|
};
|
|
29581
|
-
|
|
29607
|
+
S.get(r2).push(c3);
|
|
29582
29608
|
break;
|
|
29583
29609
|
}
|
|
29584
|
-
let
|
|
29585
|
-
_a.pruneSeenCellUris(
|
|
29586
|
-
let
|
|
29587
|
-
for (let [e, d2] of
|
|
29610
|
+
let w = new Set(v.cellIds);
|
|
29611
|
+
_a.pruneSeenCellUris(w);
|
|
29612
|
+
let E = new Set(_a.SEEN_CELL_DOCUMENT_URIS);
|
|
29613
|
+
for (let [e, d2] of S.entries()) {
|
|
29588
29614
|
Logger.debug("[lsp] diagnostics for cell", e, d2);
|
|
29589
29615
|
let f2 = CellDocumentUri.of(e);
|
|
29590
|
-
|
|
29616
|
+
E.delete(f2), r({
|
|
29591
29617
|
...c2,
|
|
29592
29618
|
params: {
|
|
29593
29619
|
...c2.params,
|
|
29594
29620
|
uri: f2,
|
|
29595
|
-
version:
|
|
29621
|
+
version: y,
|
|
29596
29622
|
diagnostics: d2
|
|
29597
29623
|
}
|
|
29598
29624
|
});
|
|
29599
29625
|
}
|
|
29600
|
-
if (
|
|
29601
|
-
Logger.debug("[lsp] clearing diagnostics",
|
|
29602
|
-
for (let e of
|
|
29626
|
+
if (E.size > 0) {
|
|
29627
|
+
Logger.debug("[lsp] clearing diagnostics", E);
|
|
29628
|
+
for (let e of E) r({
|
|
29603
29629
|
method: "textDocument/publishDiagnostics",
|
|
29604
29630
|
params: {
|
|
29605
29631
|
uri: e,
|
|
29632
|
+
version: y,
|
|
29606
29633
|
diagnostics: []
|
|
29607
29634
|
}
|
|
29608
29635
|
});
|
|
@@ -29767,7 +29794,9 @@ ${c.sqlString}
|
|
|
29767
29794
|
"D103"
|
|
29768
29795
|
], _ = [
|
|
29769
29796
|
"W292",
|
|
29770
|
-
"E402"
|
|
29797
|
+
"E402",
|
|
29798
|
+
"E302",
|
|
29799
|
+
"E305"
|
|
29771
29800
|
], v = [
|
|
29772
29801
|
"B018",
|
|
29773
29802
|
"I001"
|
|
@@ -32264,12 +32293,14 @@ ${c.sqlString}
|
|
|
32264
32293
|
afterCursorCode: getEditorCodeAsPython(e, v)
|
|
32265
32294
|
};
|
|
32266
32295
|
}
|
|
32267
|
-
|
|
32268
|
-
|
|
32269
|
-
|
|
32270
|
-
|
|
32271
|
-
|
|
32272
|
-
|
|
32296
|
+
if (typeof document < "u") {
|
|
32297
|
+
let e = "data-temp-href-target";
|
|
32298
|
+
purify.addHook("beforeSanitizeAttributes", (r) => {
|
|
32299
|
+
r.tagName === "A" && (r.hasAttribute("target") || r.setAttribute("target", "_self"), r.hasAttribute("target") && r.setAttribute(e, r.getAttribute("target") || ""));
|
|
32300
|
+
}), purify.addHook("afterSanitizeAttributes", (r) => {
|
|
32301
|
+
r.tagName === "A" && r.hasAttribute(e) && (r.setAttribute("target", r.getAttribute(e) || ""), r.removeAttribute(e), r.getAttribute("target") === "_blank" && r.setAttribute("rel", "noopener noreferrer"));
|
|
32302
|
+
});
|
|
32303
|
+
}
|
|
32273
32304
|
function sanitizeHtml(e) {
|
|
32274
32305
|
let r = {
|
|
32275
32306
|
USE_PROFILES: {
|
|
@@ -37255,6 +37286,15 @@ ${c.sqlString}
|
|
|
37255
37286
|
children: e
|
|
37256
37287
|
});
|
|
37257
37288
|
}
|
|
37289
|
+
}, wrapTooltipTargets = (e, r) => {
|
|
37290
|
+
var _a3;
|
|
37291
|
+
if (r instanceof import_lib$1.Element && ((_a3 = r.attribs) == null ? void 0 : _a3["data-tooltip"])) {
|
|
37292
|
+
let c = r.attribs["data-tooltip"];
|
|
37293
|
+
return (0, import_jsx_runtime.jsx)(Tooltip, {
|
|
37294
|
+
content: c,
|
|
37295
|
+
children: e
|
|
37296
|
+
});
|
|
37297
|
+
}
|
|
37258
37298
|
}, CopyableCode = (e) => {
|
|
37259
37299
|
let r = (0, import_compiler_runtime$150.c)(3), { children: c } = e, d = (0, import_react.useRef)(null), f;
|
|
37260
37300
|
r[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = (0, import_jsx_runtime.jsx)("div", {
|
|
@@ -37305,6 +37345,7 @@ ${c.sqlString}
|
|
|
37305
37345
|
addCopyButtonToCodehilite,
|
|
37306
37346
|
preserveQueryParamsInAnchorLinks,
|
|
37307
37347
|
wrapDocHoverTargets,
|
|
37348
|
+
wrapTooltipTargets,
|
|
37308
37349
|
removeWrappingBodyTags,
|
|
37309
37350
|
removeWrappingHtmlTags
|
|
37310
37351
|
];
|
|
@@ -53723,6 +53764,40 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
53723
53764
|
]
|
|
53724
53765
|
}), r[5] = _, r[6] = v, r[7] = y) : y = r[7], y;
|
|
53725
53766
|
};
|
|
53767
|
+
var import_compiler_runtime$122 = require_compiler_runtime();
|
|
53768
|
+
const MimeCell = (e) => {
|
|
53769
|
+
let r = (0, import_compiler_runtime$122.c)(6), { value: c } = e, d;
|
|
53770
|
+
r[0] !== c.data || r[1] !== c.mimetype ? (d = {
|
|
53771
|
+
channel: "output",
|
|
53772
|
+
data: c.data,
|
|
53773
|
+
mimetype: c.mimetype,
|
|
53774
|
+
timestamp: 0
|
|
53775
|
+
}, r[0] = c.data, r[1] = c.mimetype, r[2] = d) : d = r[2];
|
|
53776
|
+
let f = d, _;
|
|
53777
|
+
r[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = cn("flex items-center space-x-2"), r[3] = _) : _ = r[3];
|
|
53778
|
+
let v;
|
|
53779
|
+
return r[4] === f ? v = r[5] : (v = (0, import_jsx_runtime.jsx)("div", {
|
|
53780
|
+
className: _,
|
|
53781
|
+
children: (0, import_jsx_runtime.jsx)(OutputRenderer, {
|
|
53782
|
+
message: f
|
|
53783
|
+
})
|
|
53784
|
+
}), r[4] = f, r[5] = v), v;
|
|
53785
|
+
};
|
|
53786
|
+
function isMimeValue(e) {
|
|
53787
|
+
return typeof e == "object" && !!e && "mimetype" in e && "data" in e;
|
|
53788
|
+
}
|
|
53789
|
+
function getMimeValues(e) {
|
|
53790
|
+
if (isMimeValue(e)) return [
|
|
53791
|
+
e
|
|
53792
|
+
];
|
|
53793
|
+
if (typeof e == "object" && e && ("_serialized_mime_bundle" in e || "serialized_mime_bundle" in e)) {
|
|
53794
|
+
let r = e, c = r._serialized_mime_bundle || r.serialized_mime_bundle;
|
|
53795
|
+
if (isMimeValue(c)) return [
|
|
53796
|
+
c
|
|
53797
|
+
];
|
|
53798
|
+
}
|
|
53799
|
+
if (Array.isArray(e) && e.every(isMimeValue)) return e.map((e2) => e2);
|
|
53800
|
+
}
|
|
53726
53801
|
function toFieldTypes(e) {
|
|
53727
53802
|
return Objects.collect(e, ([e2]) => e2, ([, [e2]]) => e2);
|
|
53728
53803
|
}
|
|
@@ -53738,6 +53813,15 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
53738
53813
|
handleBigIntAndNumberLike: true
|
|
53739
53814
|
}), e);
|
|
53740
53815
|
}
|
|
53816
|
+
async function loadTableAndRawData(e, r) {
|
|
53817
|
+
return r ? Promise.all([
|
|
53818
|
+
loadTableData(e),
|
|
53819
|
+
loadTableData(r)
|
|
53820
|
+
]) : [
|
|
53821
|
+
await loadTableData(e),
|
|
53822
|
+
void 0
|
|
53823
|
+
];
|
|
53824
|
+
}
|
|
53741
53825
|
function getStableRowId(e) {
|
|
53742
53826
|
if (e && typeof e == "object" && "_marimo_row_id" in e) return String(e[INDEX_COLUMN_NAME]);
|
|
53743
53827
|
}
|
|
@@ -53749,6 +53833,41 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
53749
53833
|
let { value: r, nullAsEmptyString: c = false } = e;
|
|
53750
53834
|
return typeof r == "object" && r ? JSON.stringify(r) : r === null && c ? "" : String(r);
|
|
53751
53835
|
}
|
|
53836
|
+
function stripHtml(e) {
|
|
53837
|
+
let r = document.createElement("div");
|
|
53838
|
+
return r.innerHTML = e, (r.textContent || r.innerText || "").trim() || e;
|
|
53839
|
+
}
|
|
53840
|
+
var HTML_MIMETYPES = /* @__PURE__ */ new Set([
|
|
53841
|
+
"text/html",
|
|
53842
|
+
"text/markdown"
|
|
53843
|
+
]);
|
|
53844
|
+
function isRecord(e) {
|
|
53845
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
53846
|
+
}
|
|
53847
|
+
function getClipboardContent(e, r) {
|
|
53848
|
+
let c = typeof r == "object" && r ? getMimeValues(r) : void 0, d;
|
|
53849
|
+
if (c) {
|
|
53850
|
+
let e2 = c.filter((e3) => HTML_MIMETYPES.has(e3.mimetype)).map((e3) => e3.data);
|
|
53851
|
+
d = e2.length > 0 ? e2.join("") : void 0;
|
|
53852
|
+
}
|
|
53853
|
+
let f;
|
|
53854
|
+
return f = e !== void 0 && e !== r ? stringifyUnknownValue({
|
|
53855
|
+
value: e
|
|
53856
|
+
}) : c ? c.map((e2) => HTML_MIMETYPES.has(e2.mimetype) ? stripHtml(e2.data) : e2.data).join(", ") : stringifyUnknownValue({
|
|
53857
|
+
value: r
|
|
53858
|
+
}), {
|
|
53859
|
+
text: f,
|
|
53860
|
+
html: d
|
|
53861
|
+
};
|
|
53862
|
+
}
|
|
53863
|
+
function getRawValue(e, r, c) {
|
|
53864
|
+
var _a3;
|
|
53865
|
+
let d = (_a3 = e.options.meta) == null ? void 0 : _a3.rawData;
|
|
53866
|
+
if (d) {
|
|
53867
|
+
let e2 = d[r];
|
|
53868
|
+
if (isRecord(e2)) return e2[c];
|
|
53869
|
+
}
|
|
53870
|
+
}
|
|
53752
53871
|
var TOP_K_ROWS = 30;
|
|
53753
53872
|
const DataTableColumnHeader = ({ column: e, header: r, justify: c, className: d, calculateTopKRows: f, table: _ }) => {
|
|
53754
53873
|
let [v, y] = (0, import_react.useState)(false), { locale: S } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
@@ -54231,9 +54350,9 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
54231
54350
|
let [r, c] = import_react.useState(e), [d, f] = import_react.useState(null);
|
|
54232
54351
|
return e !== r && (f(r), c(e)), d;
|
|
54233
54352
|
}
|
|
54234
|
-
var import_compiler_runtime$
|
|
54353
|
+
var import_compiler_runtime$121 = require_compiler_runtime();
|
|
54235
54354
|
const DelayMount = (e) => {
|
|
54236
|
-
let r = (0, import_compiler_runtime$
|
|
54355
|
+
let r = (0, import_compiler_runtime$121.c)(13), { milliseconds: c, children: d, fallback: f, visibility: _, threshold: v, rootMargin: y } = e, S = _ === void 0 ? false : _, w = v === void 0 ? 0 : v, E = y === void 0 ? "0px" : y, [O, M] = (0, import_react.useState)(false), [I, z] = (0, import_react.useState)(false), G;
|
|
54237
54356
|
r[0] !== E || r[1] !== w ? (G = {
|
|
54238
54357
|
threshold: w,
|
|
54239
54358
|
root: null,
|
|
@@ -54264,9 +54383,9 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
54264
54383
|
children: WY
|
|
54265
54384
|
}), r[10] = UY, r[11] = WY, r[12] = GY) : GY = r[12], GY;
|
|
54266
54385
|
};
|
|
54267
|
-
var import_compiler_runtime$
|
|
54386
|
+
var import_compiler_runtime$120 = require_compiler_runtime();
|
|
54268
54387
|
const DatePopover = (e) => {
|
|
54269
|
-
let r = (0, import_compiler_runtime$
|
|
54388
|
+
let r = (0, import_compiler_runtime$120.c)(15), { date: c, type: d, children: f } = e;
|
|
54270
54389
|
if (!c || Number.isNaN(new Date(c).getTime())) return f;
|
|
54271
54390
|
let _;
|
|
54272
54391
|
r[0] === c ? _ = r[1] : (_ = new Date(c), r[0] = c, r[1] = _);
|
|
@@ -54306,7 +54425,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
54306
54425
|
}), r[12] = E, r[13] = O, r[14] = M) : M = r[14], M;
|
|
54307
54426
|
};
|
|
54308
54427
|
var TimezoneDisplay = (e) => {
|
|
54309
|
-
let r = (0, import_compiler_runtime$
|
|
54428
|
+
let r = (0, import_compiler_runtime$120.c)(26), { date: c } = e, { locale: d } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), f;
|
|
54310
54429
|
r[0] === d ? f = r[1] : (f = Intl.DateTimeFormat(d).resolvedOptions(), r[0] = d, r[1] = f);
|
|
54311
54430
|
let _ = f.timeZone, v = c.getUTCMilliseconds() !== 0, y;
|
|
54312
54431
|
r[2] === v ? y = r[3] : (y = v ? {
|
|
@@ -54382,7 +54501,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
54382
54501
|
]
|
|
54383
54502
|
}), r[23] = IY, r[24] = I, r[25] = LY) : LY = r[25], LY;
|
|
54384
54503
|
}, DateDisplay = (e) => {
|
|
54385
|
-
let r = (0, import_compiler_runtime$
|
|
54504
|
+
let r = (0, import_compiler_runtime$120.c)(6), { date: c } = e, d;
|
|
54386
54505
|
r[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
54387
54506
|
timeZone: "UTC",
|
|
54388
54507
|
dateStyle: "long"
|
|
@@ -54394,7 +54513,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
54394
54513
|
children: _
|
|
54395
54514
|
}), r[4] = _, r[5] = v), v;
|
|
54396
54515
|
}, RelativeTime = (e) => {
|
|
54397
|
-
let r = (0, import_compiler_runtime$
|
|
54516
|
+
let r = (0, import_compiler_runtime$120.c)(6), { date: c } = e, { locale: d } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), f, _;
|
|
54398
54517
|
if (r[0] !== c || r[1] !== d) {
|
|
54399
54518
|
_ = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
54400
54519
|
bb0: {
|
|
@@ -54446,7 +54565,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
54446
54565
|
return r[4] === f ? v = r[5] : (v = (0, import_jsx_runtime.jsx)("span", {
|
|
54447
54566
|
children: f
|
|
54448
54567
|
}), r[4] = f, r[5] = v), v;
|
|
54449
|
-
}, import_compiler_runtime$
|
|
54568
|
+
}, import_compiler_runtime$119 = require_compiler_runtime(), hashString = (e) => {
|
|
54450
54569
|
let r = 0;
|
|
54451
54570
|
for (let c = 0; c < e.length; c++) {
|
|
54452
54571
|
let d = e.charCodeAt(c);
|
|
@@ -54463,7 +54582,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
54463
54582
|
return d;
|
|
54464
54583
|
};
|
|
54465
54584
|
const ChartSkeleton = (e) => {
|
|
54466
|
-
let r = (0, import_compiler_runtime$
|
|
54585
|
+
let r = (0, import_compiler_runtime$119.c)(11), { seed: c, width: d, height: f } = e, _ = d / 9, v = f - 15, y;
|
|
54467
54586
|
if (r[0] !== _ || r[1] !== f || r[2] !== c || r[3] !== v || r[4] !== d) {
|
|
54468
54587
|
let e2 = generateHeights({
|
|
54469
54588
|
numBars: 9,
|
|
@@ -55468,11 +55587,11 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
55468
55587
|
}
|
|
55469
55588
|
}, __publicField(_j, "EMPTY", new _j([], {}, {}, {}, {}, {
|
|
55470
55589
|
includeCharts: false
|
|
55471
|
-
})), _j), import_compiler_runtime$
|
|
55590
|
+
})), _j), import_compiler_runtime$118 = require_compiler_runtime();
|
|
55472
55591
|
const ColumnChartContext = import_react.createContext(ColumnChartSpecModel.EMPTY);
|
|
55473
55592
|
var batchedLoader = createBatchedLoader();
|
|
55474
55593
|
const TableColumnSummary = (e) => {
|
|
55475
|
-
let r = (0, import_compiler_runtime$
|
|
55594
|
+
let r = (0, import_compiler_runtime$118.c)(21), { columnId: c } = e, { locale: d } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), f = import_react.use(ColumnChartContext), { theme: _ } = useTheme(), v, y, S;
|
|
55476
55595
|
if (r[0] !== f || r[1] !== c || r[2] !== d || r[3] !== _) {
|
|
55477
55596
|
let { spec: e2, type: w2, stats: E } = f.getHeaderSummary(c), O = null;
|
|
55478
55597
|
if (e2) {
|
|
@@ -55673,40 +55792,6 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
55673
55792
|
};
|
|
55674
55793
|
}
|
|
55675
55794
|
};
|
|
55676
|
-
var import_compiler_runtime$118 = require_compiler_runtime();
|
|
55677
|
-
const MimeCell = (e) => {
|
|
55678
|
-
let r = (0, import_compiler_runtime$118.c)(6), { value: c } = e, d;
|
|
55679
|
-
r[0] !== c.data || r[1] !== c.mimetype ? (d = {
|
|
55680
|
-
channel: "output",
|
|
55681
|
-
data: c.data,
|
|
55682
|
-
mimetype: c.mimetype,
|
|
55683
|
-
timestamp: 0
|
|
55684
|
-
}, r[0] = c.data, r[1] = c.mimetype, r[2] = d) : d = r[2];
|
|
55685
|
-
let f = d, _;
|
|
55686
|
-
r[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = cn("flex items-center space-x-2"), r[3] = _) : _ = r[3];
|
|
55687
|
-
let v;
|
|
55688
|
-
return r[4] === f ? v = r[5] : (v = (0, import_jsx_runtime.jsx)("div", {
|
|
55689
|
-
className: _,
|
|
55690
|
-
children: (0, import_jsx_runtime.jsx)(OutputRenderer, {
|
|
55691
|
-
message: f
|
|
55692
|
-
})
|
|
55693
|
-
}), r[4] = f, r[5] = v), v;
|
|
55694
|
-
};
|
|
55695
|
-
function isMimeValue(e) {
|
|
55696
|
-
return typeof e == "object" && !!e && "mimetype" in e && "data" in e;
|
|
55697
|
-
}
|
|
55698
|
-
function getMimeValues(e) {
|
|
55699
|
-
if (isMimeValue(e)) return [
|
|
55700
|
-
e
|
|
55701
|
-
];
|
|
55702
|
-
if (typeof e == "object" && e && ("_serialized_mime_bundle" in e || "serialized_mime_bundle" in e)) {
|
|
55703
|
-
let r = e, c = r._serialized_mime_bundle || r.serialized_mime_bundle;
|
|
55704
|
-
if (isMimeValue(c)) return [
|
|
55705
|
-
c
|
|
55706
|
-
];
|
|
55707
|
-
}
|
|
55708
|
-
if (Array.isArray(e) && e.every(isMimeValue)) return e.map((e2) => e2);
|
|
55709
|
-
}
|
|
55710
55795
|
function uniformSample(e, r) {
|
|
55711
55796
|
if (e.length <= r) return e;
|
|
55712
55797
|
let c = [], d = e.length / r;
|
|
@@ -56411,7 +56496,7 @@ Database schema: ${c}`), (_a4 = r2.aiFix) == null ? void 0 : _a4.setAiCompletion
|
|
|
56411
56496
|
hasConsoleOutput: (v == null ? void 0 : v.consoleOutputs) != null
|
|
56412
56497
|
};
|
|
56413
56498
|
}
|
|
56414
|
-
const LazyAnyLanguageCodeMirror = (0, import_react.lazy)(() => import("./any-language-editor-
|
|
56499
|
+
const LazyAnyLanguageCodeMirror = (0, import_react.lazy)(() => import("./any-language-editor-BRpxklRq.js"));
|
|
56415
56500
|
var import_compiler_runtime$117 = require_compiler_runtime(), extensions = [
|
|
56416
56501
|
EditorView.lineWrapping
|
|
56417
56502
|
];
|
|
@@ -57305,22 +57390,30 @@ ${r}
|
|
|
57305
57390
|
];
|
|
57306
57391
|
}
|
|
57307
57392
|
function getCellValues(e, r) {
|
|
57308
|
-
let c = /* @__PURE__ */ new Map();
|
|
57309
|
-
for (let
|
|
57310
|
-
if (
|
|
57311
|
-
let { rowId: r2, columnId:
|
|
57312
|
-
if (!
|
|
57313
|
-
let
|
|
57314
|
-
|
|
57315
|
-
|
|
57316
|
-
|
|
57393
|
+
let c = /* @__PURE__ */ new Map(), d = false;
|
|
57394
|
+
for (let f2 of r) {
|
|
57395
|
+
if (f2.includes("__select__")) continue;
|
|
57396
|
+
let { rowId: r2, columnId: _2 } = getRowAndColumnId(f2), v2 = e.getRow(r2);
|
|
57397
|
+
if (!v2) continue;
|
|
57398
|
+
let { text: y, html: S } = getClipboardContent(getRawValue(e, v2.index, _2), v2.getValue(_2));
|
|
57399
|
+
S && (d = true);
|
|
57400
|
+
let w = c.get(r2) ?? [];
|
|
57401
|
+
w.push({
|
|
57402
|
+
text: y,
|
|
57403
|
+
html: S
|
|
57404
|
+
}), c.set(r2, w);
|
|
57317
57405
|
}
|
|
57318
|
-
|
|
57406
|
+
let f = [
|
|
57319
57407
|
...c.values()
|
|
57320
|
-
]);
|
|
57408
|
+
], _ = f.map((e2) => e2.map((e3) => e3.text).join(" ")).join("\n"), v;
|
|
57409
|
+
return d && (v = `<table>${f.map((e2) => `<tr>${e2.map((e3) => `<td>${e3.html ?? escapeHtml(e3.text)}</td>`).join("")}</tr>`).join("")}</table>`), {
|
|
57410
|
+
text: _,
|
|
57411
|
+
html: v
|
|
57412
|
+
};
|
|
57321
57413
|
}
|
|
57322
|
-
function
|
|
57323
|
-
|
|
57414
|
+
function escapeHtml(e) {
|
|
57415
|
+
let r = document.createElement("div");
|
|
57416
|
+
return r.textContent = e, r.innerHTML;
|
|
57324
57417
|
}
|
|
57325
57418
|
function countDataCellsInSelection(e) {
|
|
57326
57419
|
let r = 0;
|
|
@@ -57333,7 +57426,7 @@ ${r}
|
|
|
57333
57426
|
if (d.includes("__select__")) continue;
|
|
57334
57427
|
let { rowId: r2, columnId: f } = getRowAndColumnId(d), _ = e.getRow(r2);
|
|
57335
57428
|
if (!_) continue;
|
|
57336
|
-
let v = _.getValue(f), y;
|
|
57429
|
+
let v = getRawValue(e, _.index, f) ?? _.getValue(f), y;
|
|
57337
57430
|
if (typeof v == "number") y = v;
|
|
57338
57431
|
else if (typeof v == "string") {
|
|
57339
57432
|
if (v.trim() === "") continue;
|
|
@@ -57450,10 +57543,12 @@ ${r}
|
|
|
57450
57543
|
},
|
|
57451
57544
|
handleCopy: (e, { table: r, onCopyComplete: c }) => {
|
|
57452
57545
|
let d = window.getSelection();
|
|
57453
|
-
|
|
57546
|
+
if (d && d.toString().length > 0) return e;
|
|
57547
|
+
let { text: f, html: _ } = getCellValues(r, e.selectedCells);
|
|
57548
|
+
return copyToClipboard(f, _), c(), {
|
|
57454
57549
|
...e,
|
|
57455
57550
|
copiedCells: e.selectedCells
|
|
57456
|
-
}
|
|
57551
|
+
};
|
|
57457
57552
|
},
|
|
57458
57553
|
navigate: (e, { direction: r, isShiftKey: c, table: d }) => {
|
|
57459
57554
|
let f = e.focusedCell ?? e.selectedStartCell;
|
|
@@ -58403,18 +58498,17 @@ ${r}
|
|
|
58403
58498
|
Logger.error("No cell found in context menu");
|
|
58404
58499
|
return;
|
|
58405
58500
|
}
|
|
58406
|
-
let f = () => {
|
|
58501
|
+
let f = d.getContext().table, _ = d.getValue(), v = getRawValue(f, d.row.index, d.column.id) ?? _, y = () => {
|
|
58407
58502
|
try {
|
|
58408
|
-
|
|
58409
|
-
|
|
58410
|
-
}));
|
|
58503
|
+
let { text: e2, html: r2 } = getClipboardContent(v, _);
|
|
58504
|
+
copyToClipboard(e2, r2);
|
|
58411
58505
|
} catch (e2) {
|
|
58412
58506
|
Logger.error("Failed to copy context menu cell", e2);
|
|
58413
58507
|
}
|
|
58414
|
-
},
|
|
58415
|
-
|
|
58508
|
+
}, w = d.column, O = w.getCanFilter() && ((_a3 = w.columnDef.meta) == null ? void 0 : _a3.filterType), M = (e2) => {
|
|
58509
|
+
w.setFilterValue(Filter.select({
|
|
58416
58510
|
options: [
|
|
58417
|
-
|
|
58511
|
+
v
|
|
58418
58512
|
],
|
|
58419
58513
|
operator: e2
|
|
58420
58514
|
}));
|
|
@@ -58422,7 +58516,7 @@ ${r}
|
|
|
58422
58516
|
return (0, import_jsx_runtime.jsxs)(ContextMenuContent, {
|
|
58423
58517
|
children: [
|
|
58424
58518
|
(0, import_jsx_runtime.jsxs)(ContextMenuItem, {
|
|
58425
|
-
onClick:
|
|
58519
|
+
onClick: y,
|
|
58426
58520
|
children: [
|
|
58427
58521
|
(0, import_jsx_runtime.jsx)(Copy, {
|
|
58428
58522
|
className: "mo-dropdown-icon h-3 w-3"
|
|
@@ -58439,11 +58533,11 @@ ${r}
|
|
|
58439
58533
|
"Copy selected cells"
|
|
58440
58534
|
]
|
|
58441
58535
|
}),
|
|
58442
|
-
|
|
58536
|
+
O && (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
58443
58537
|
children: [
|
|
58444
58538
|
(0, import_jsx_runtime.jsx)(ContextMenuSeparator, {}),
|
|
58445
58539
|
(0, import_jsx_runtime.jsxs)(ContextMenuItem, {
|
|
58446
|
-
onClick: () =>
|
|
58540
|
+
onClick: () => M("in"),
|
|
58447
58541
|
children: [
|
|
58448
58542
|
(0, import_jsx_runtime.jsx)(Funnel, {
|
|
58449
58543
|
className: "mo-dropdown-icon h-3 w-3"
|
|
@@ -58452,7 +58546,7 @@ ${r}
|
|
|
58452
58546
|
]
|
|
58453
58547
|
}),
|
|
58454
58548
|
(0, import_jsx_runtime.jsxs)(ContextMenuItem, {
|
|
58455
|
-
onClick: () =>
|
|
58549
|
+
onClick: () => M("not_in"),
|
|
58456
58550
|
children: [
|
|
58457
58551
|
(0, import_jsx_runtime.jsx)(Funnel, {
|
|
58458
58552
|
className: "mo-dropdown-icon h-3 w-3"
|
|
@@ -58976,9 +59070,16 @@ ${r}
|
|
|
58976
59070
|
}
|
|
58977
59071
|
var isSlotElement = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", isSVGElement = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
|
|
58978
59072
|
async function cloneChildren(e, r, c) {
|
|
59073
|
+
var _a3;
|
|
58979
59074
|
if (isSVGElement(r)) return r;
|
|
58980
59075
|
let d = [];
|
|
58981
|
-
|
|
59076
|
+
if (isSlotElement(e) && e.assignedNodes) d = toArray(e.assignedNodes());
|
|
59077
|
+
else if (isInstanceOfElement(e, HTMLIFrameElement)) try {
|
|
59078
|
+
((_a3 = e.contentDocument) == null ? void 0 : _a3.body) && (d = toArray(e.contentDocument.body.childNodes));
|
|
59079
|
+
} catch {
|
|
59080
|
+
}
|
|
59081
|
+
else d = toArray((e.shadowRoot ?? e).childNodes);
|
|
59082
|
+
return d.length === 0 || isInstanceOfElement(e, HTMLVideoElement) || await d.reduce((e2, d2) => e2.then(() => cloneNode(d2, c)).then((e3) => {
|
|
58982
59083
|
e3 && r.appendChild(e3);
|
|
58983
59084
|
}), Promise.resolve()), r;
|
|
58984
59085
|
}
|
|
@@ -59190,12 +59291,13 @@ ${r}
|
|
|
59190
59291
|
return getWebFontRules(await getCSSRules(toArray(e.ownerDocument.styleSheets), r));
|
|
59191
59292
|
}
|
|
59192
59293
|
function normalizeFontFamily(e) {
|
|
59193
|
-
return e.trim().replace(/["']/g, "");
|
|
59294
|
+
return (e || "").trim().replace(/["']/g, "");
|
|
59194
59295
|
}
|
|
59195
59296
|
function getUsedFonts(e) {
|
|
59196
59297
|
let r = /* @__PURE__ */ new Set();
|
|
59197
59298
|
function c(e2) {
|
|
59198
|
-
|
|
59299
|
+
let d = e2.style.fontFamily || getComputedStyle(e2).fontFamily;
|
|
59300
|
+
d && d.split(",").forEach((e3) => {
|
|
59199
59301
|
r.add(normalizeFontFamily(e3));
|
|
59200
59302
|
}), Array.from(e2.children).forEach((e3) => {
|
|
59201
59303
|
e3 instanceof HTMLElement && c(e3);
|
|
@@ -59211,7 +59313,7 @@ ${r}
|
|
|
59211
59313
|
}))).join("\n");
|
|
59212
59314
|
}
|
|
59213
59315
|
async function embedWebFonts(e, r) {
|
|
59214
|
-
let c = r.fontEmbedCSS == null ? r.skipFonts ? null : await getWebFontCSS(e, r) : r.fontEmbedCSS, d = r.extraStyleContent == null ? c :
|
|
59316
|
+
let c = r.fontEmbedCSS == null ? r.skipFonts ? null : await getWebFontCSS(e, r) : r.fontEmbedCSS, d = r.extraStyleContent == null ? c : (c || "").concat(r.extraStyleContent);
|
|
59215
59317
|
if (d) {
|
|
59216
59318
|
let r2 = document.createElement("style"), c2 = document.createTextNode(d);
|
|
59217
59319
|
r2.appendChild(c2), e.firstChild ? e.insertBefore(r2, e.firstChild) : e.appendChild(r2);
|
|
@@ -59240,6 +59342,7 @@ ${r}
|
|
|
59240
59342
|
return Logger.error("Error filtering node:", e2), true;
|
|
59241
59343
|
}
|
|
59242
59344
|
},
|
|
59345
|
+
imagePlaceholder: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQI12NgAAIABQABNjN9GQAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAA0lEQVQI12P4z8BQDwAEgAF/QualIQAAAABJRU5ErkJggg==",
|
|
59243
59346
|
onImageErrorHandler: (e) => {
|
|
59244
59347
|
Logger.error("Error loading image:", e);
|
|
59245
59348
|
},
|
|
@@ -59423,10 +59526,10 @@ Defaulting to \`null\`.`;
|
|
|
59423
59526
|
d && (v = d(r));
|
|
59424
59527
|
try {
|
|
59425
59528
|
downloadByURL(await toPng(r), Filenames.toPNG(c));
|
|
59426
|
-
} catch {
|
|
59427
|
-
toast({
|
|
59428
|
-
title: "
|
|
59429
|
-
description:
|
|
59529
|
+
} catch (e2) {
|
|
59530
|
+
Logger.error("Error downloading as PNG", e2), toast({
|
|
59531
|
+
title: "Failed to download as PNG",
|
|
59532
|
+
description: prettyError(e2),
|
|
59430
59533
|
variant: "danger"
|
|
59431
59534
|
});
|
|
59432
59535
|
} finally {
|
|
@@ -60063,22 +60166,22 @@ Defaulting to \`null\`.`;
|
|
|
60063
60166
|
})
|
|
60064
60167
|
})
|
|
60065
60168
|
]
|
|
60066
|
-
}), DataTable = (0, import_react.memo)(({ wrapperClassName: e, className: r, maxHeight: c, columns: d, data: f,
|
|
60067
|
-
let [
|
|
60169
|
+
}), DataTable = (0, import_react.memo)(({ wrapperClassName: e, className: r, maxHeight: c, columns: d, data: f, rawData: _, selection: v, totalColumns: y, totalRows: S, manualSorting: w = false, sorting: E, setSorting: O, rowSelection: M, cellSelection: I, cellStyling: z, hoverTemplate: G, cellHoverTexts: q, paginationState: IY, setPaginationState: LY, downloadAs: RY, downloadFileName: zY, manualPagination: BY = false, pagination: VY = false, onRowSelectionChange: HY, onCellSelectionChange: UY, getRowIds: WY, enableSearch: GY = false, searchQuery: KY, onSearchQueryChange: qY, showFilters: JY = false, filters: YY, onFiltersChange: XY, reloading: ZY, freezeColumnsLeft: QY, freezeColumnsRight: $Y, toggleDisplayHeader: eX, showChartBuilder: tX, showPageSizeSelector: nX, showColumnExplorer: rX, showRowExplorer: iX, togglePanel: aX, isPanelOpen: oX, viewedRowIdx: sX, onViewedRowChange: cX }) => {
|
|
60170
|
+
let [lX, uX] = import_react.useState(false), [dX, fX] = import_react.useState(false), { locale: pX } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), { columnPinning: mX, setColumnPinning: hX } = useColumnPinning(QY, $Y);
|
|
60068
60171
|
import_react.useEffect(() => {
|
|
60069
60172
|
let e2;
|
|
60070
|
-
return
|
|
60071
|
-
|
|
60072
|
-
}, 300) :
|
|
60173
|
+
return ZY ? e2 = setTimeout(() => {
|
|
60174
|
+
fX(true);
|
|
60175
|
+
}, 300) : fX(false), () => {
|
|
60073
60176
|
e2 && clearTimeout(e2);
|
|
60074
60177
|
};
|
|
60075
60178
|
}, [
|
|
60076
|
-
|
|
60179
|
+
ZY
|
|
60077
60180
|
]);
|
|
60078
|
-
function
|
|
60079
|
-
return
|
|
60181
|
+
function gX(e2, r2) {
|
|
60182
|
+
return IY ? r2 + (BY ? IY.pageIndex * IY.pageSize : 0) : r2;
|
|
60080
60183
|
}
|
|
60081
|
-
let
|
|
60184
|
+
let _X = useReactTable({
|
|
60082
60185
|
_features: [
|
|
60083
60186
|
ColumnPinning,
|
|
60084
60187
|
ColumnWrappingFeature,
|
|
@@ -60092,61 +60195,64 @@ Defaulting to \`null\`.`;
|
|
|
60092
60195
|
],
|
|
60093
60196
|
data: f,
|
|
60094
60197
|
columns: d,
|
|
60198
|
+
meta: {
|
|
60199
|
+
rawData: _
|
|
60200
|
+
},
|
|
60095
60201
|
getCoreRowModel: getCoreRowModel(),
|
|
60096
|
-
rowCount:
|
|
60097
|
-
...
|
|
60098
|
-
onPaginationChange:
|
|
60202
|
+
rowCount: S === "too_many" ? void 0 : S,
|
|
60203
|
+
...LY ? {
|
|
60204
|
+
onPaginationChange: LY,
|
|
60099
60205
|
getRowId: (e2, r2) => {
|
|
60100
60206
|
let c2 = getStableRowId(e2);
|
|
60101
60207
|
if (c2) return c2;
|
|
60102
|
-
let d2 =
|
|
60208
|
+
let d2 = gX(e2, r2);
|
|
60103
60209
|
return String(d2);
|
|
60104
60210
|
}
|
|
60105
60211
|
} : {},
|
|
60106
|
-
locale:
|
|
60107
|
-
manualPagination:
|
|
60212
|
+
locale: pX,
|
|
60213
|
+
manualPagination: BY,
|
|
60108
60214
|
getPaginationRowModel: getPaginationRowModel(),
|
|
60109
|
-
...
|
|
60110
|
-
onSortingChange:
|
|
60215
|
+
...O ? {
|
|
60216
|
+
onSortingChange: O
|
|
60111
60217
|
} : {},
|
|
60112
|
-
manualSorting:
|
|
60218
|
+
manualSorting: w,
|
|
60113
60219
|
enableMultiSort: true,
|
|
60114
60220
|
getSortedRowModel: getSortedRowModel(),
|
|
60115
60221
|
manualFiltering: true,
|
|
60116
|
-
enableColumnFilters:
|
|
60222
|
+
enableColumnFilters: JY,
|
|
60117
60223
|
getFilteredRowModel: getFilteredRowModel(),
|
|
60118
|
-
onColumnFiltersChange:
|
|
60119
|
-
onRowSelectionChange:
|
|
60120
|
-
onCellSelectionChange:
|
|
60121
|
-
enableCellSelection:
|
|
60122
|
-
enableMultiCellSelection:
|
|
60123
|
-
onColumnPinningChange:
|
|
60224
|
+
onColumnFiltersChange: XY,
|
|
60225
|
+
onRowSelectionChange: HY,
|
|
60226
|
+
onCellSelectionChange: UY,
|
|
60227
|
+
enableCellSelection: v === "single-cell" || v === "multi-cell",
|
|
60228
|
+
enableMultiCellSelection: v === "multi-cell",
|
|
60229
|
+
onColumnPinningChange: hX,
|
|
60124
60230
|
enableFocusRow: true,
|
|
60125
|
-
onFocusRowChange:
|
|
60231
|
+
onFocusRowChange: cX,
|
|
60126
60232
|
state: {
|
|
60127
|
-
...
|
|
60128
|
-
sorting:
|
|
60233
|
+
...E ? {
|
|
60234
|
+
sorting: E
|
|
60129
60235
|
} : {},
|
|
60130
|
-
columnFilters:
|
|
60131
|
-
...
|
|
60132
|
-
pagination:
|
|
60133
|
-
} :
|
|
60236
|
+
columnFilters: YY,
|
|
60237
|
+
...IY ? {
|
|
60238
|
+
pagination: IY
|
|
60239
|
+
} : VY && !IY ? {} : {
|
|
60134
60240
|
pagination: {
|
|
60135
60241
|
pageIndex: 0,
|
|
60136
60242
|
pageSize: f.length
|
|
60137
60243
|
}
|
|
60138
60244
|
},
|
|
60139
|
-
rowSelection:
|
|
60140
|
-
cellSelection:
|
|
60141
|
-
cellStyling:
|
|
60142
|
-
columnPinning:
|
|
60143
|
-
cellHoverTemplate:
|
|
60144
|
-
cellHoverTexts:
|
|
60145
|
-
}
|
|
60146
|
-
}),
|
|
60245
|
+
rowSelection: M ?? {},
|
|
60246
|
+
cellSelection: I ?? [],
|
|
60247
|
+
cellStyling: z,
|
|
60248
|
+
columnPinning: mX,
|
|
60249
|
+
cellHoverTemplate: G,
|
|
60250
|
+
cellHoverTexts: q ?? {}
|
|
60251
|
+
}
|
|
60252
|
+
}), vX = (oX == null ? void 0 : oX("row-viewer")) ?? false, yX = import_react.useRef(null);
|
|
60147
60253
|
return import_react.useEffect(() => {
|
|
60148
|
-
if (!
|
|
60149
|
-
let e2 =
|
|
60254
|
+
if (!yX.current) return;
|
|
60255
|
+
let e2 = yX.current.parentElement;
|
|
60150
60256
|
e2 && (c ? (e2.style.maxHeight = `${c}px`, e2.style.overflow || (e2.style.overflow = "auto")) : e2.style.removeProperty("max-height"));
|
|
60151
60257
|
}, [
|
|
60152
60258
|
c
|
|
@@ -60154,67 +60260,67 @@ Defaulting to \`null\`.`;
|
|
|
60154
60260
|
className: cn(e, "flex flex-col space-y-1"),
|
|
60155
60261
|
children: [
|
|
60156
60262
|
(0, import_jsx_runtime.jsx)(FilterPills, {
|
|
60157
|
-
filters:
|
|
60158
|
-
table:
|
|
60263
|
+
filters: YY,
|
|
60264
|
+
table: _X
|
|
60159
60265
|
}),
|
|
60160
60266
|
(0, import_jsx_runtime.jsxs)(CellSelectionProvider, {
|
|
60161
60267
|
children: [
|
|
60162
60268
|
(0, import_jsx_runtime.jsxs)("div", {
|
|
60163
60269
|
className: cn(r || "rounded-md border overflow-hidden"),
|
|
60164
60270
|
children: [
|
|
60165
|
-
|
|
60166
|
-
value:
|
|
60167
|
-
onHide: () =>
|
|
60168
|
-
handleSearch:
|
|
60169
|
-
hidden: !
|
|
60170
|
-
reloading:
|
|
60271
|
+
qY && GY && (0, import_jsx_runtime.jsx)(SearchBar, {
|
|
60272
|
+
value: KY || "",
|
|
60273
|
+
onHide: () => uX(false),
|
|
60274
|
+
handleSearch: qY,
|
|
60275
|
+
hidden: !lX,
|
|
60276
|
+
reloading: ZY
|
|
60171
60277
|
}),
|
|
60172
60278
|
(0, import_jsx_runtime.jsxs)(Table, {
|
|
60173
60279
|
className: "relative",
|
|
60174
|
-
ref:
|
|
60280
|
+
ref: yX,
|
|
60175
60281
|
children: [
|
|
60176
|
-
|
|
60282
|
+
dX && (0, import_jsx_runtime.jsx)("thead", {
|
|
60177
60283
|
className: "absolute top-0 left-0 h-[3px] w-1/2 bg-primary animate-slide"
|
|
60178
60284
|
}),
|
|
60179
|
-
renderTableHeader(
|
|
60285
|
+
renderTableHeader(_X, !!c),
|
|
60180
60286
|
(0, import_jsx_runtime.jsx)(DataTableBody, {
|
|
60181
|
-
table:
|
|
60287
|
+
table: _X,
|
|
60182
60288
|
columns: d,
|
|
60183
|
-
rowViewerPanelOpen:
|
|
60184
|
-
getRowIndex:
|
|
60185
|
-
viewedRowIdx:
|
|
60289
|
+
rowViewerPanelOpen: vX,
|
|
60290
|
+
getRowIndex: gX,
|
|
60291
|
+
viewedRowIdx: sX
|
|
60186
60292
|
})
|
|
60187
60293
|
]
|
|
60188
60294
|
})
|
|
60189
60295
|
]
|
|
60190
60296
|
}),
|
|
60191
60297
|
(0, import_jsx_runtime.jsx)(CellSelectionStats, {
|
|
60192
|
-
table:
|
|
60298
|
+
table: _X,
|
|
60193
60299
|
className: "px-2 pt-1 ml-auto"
|
|
60194
60300
|
})
|
|
60195
60301
|
]
|
|
60196
60302
|
}),
|
|
60197
60303
|
(0, import_jsx_runtime.jsx)(TableActions, {
|
|
60198
|
-
enableSearch:
|
|
60199
|
-
totalColumns:
|
|
60200
|
-
onSearchQueryChange:
|
|
60201
|
-
isSearchEnabled:
|
|
60202
|
-
setIsSearchEnabled:
|
|
60203
|
-
pagination:
|
|
60204
|
-
selection:
|
|
60205
|
-
onRowSelectionChange:
|
|
60206
|
-
table:
|
|
60207
|
-
downloadAs:
|
|
60208
|
-
downloadFileName:
|
|
60209
|
-
getRowIds:
|
|
60210
|
-
toggleDisplayHeader:
|
|
60211
|
-
showChartBuilder:
|
|
60212
|
-
showPageSizeSelector:
|
|
60213
|
-
showColumnExplorer:
|
|
60214
|
-
showRowExplorer:
|
|
60215
|
-
togglePanel:
|
|
60216
|
-
isPanelOpen:
|
|
60217
|
-
tableLoading:
|
|
60304
|
+
enableSearch: GY,
|
|
60305
|
+
totalColumns: y,
|
|
60306
|
+
onSearchQueryChange: qY,
|
|
60307
|
+
isSearchEnabled: lX,
|
|
60308
|
+
setIsSearchEnabled: uX,
|
|
60309
|
+
pagination: VY,
|
|
60310
|
+
selection: v,
|
|
60311
|
+
onRowSelectionChange: HY,
|
|
60312
|
+
table: _X,
|
|
60313
|
+
downloadAs: RY,
|
|
60314
|
+
downloadFileName: zY,
|
|
60315
|
+
getRowIds: WY,
|
|
60316
|
+
toggleDisplayHeader: eX,
|
|
60317
|
+
showChartBuilder: tX,
|
|
60318
|
+
showPageSizeSelector: nX,
|
|
60319
|
+
showColumnExplorer: rX,
|
|
60320
|
+
showRowExplorer: iX,
|
|
60321
|
+
togglePanel: aX,
|
|
60322
|
+
isPanelOpen: oX,
|
|
60323
|
+
tableLoading: ZY
|
|
60218
60324
|
})
|
|
60219
60325
|
]
|
|
60220
60326
|
});
|
|
@@ -70777,7 +70883,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
|
|
|
70777
70883
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
70778
70884
|
}
|
|
70779
70885
|
}
|
|
70780
|
-
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.21.2-
|
|
70886
|
+
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.21.2-dev53"), showCodeInRunModeAtom = atom(true);
|
|
70781
70887
|
atom(null);
|
|
70782
70888
|
var import_compiler_runtime$89 = require_compiler_runtime();
|
|
70783
70889
|
function useKeydownOnElement(e, r) {
|
|
@@ -72336,7 +72442,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
|
|
|
72336
72442
|
"time",
|
|
72337
72443
|
"unknown"
|
|
72338
72444
|
];
|
|
72339
|
-
var import_compiler_runtime$82 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-
|
|
72445
|
+
var import_compiler_runtime$82 = require_compiler_runtime(), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-858wsVkd.js").then(async (m2) => {
|
|
72340
72446
|
await m2.__tla;
|
|
72341
72447
|
return m2;
|
|
72342
72448
|
}));
|
|
@@ -80984,6 +81090,10 @@ ${c}
|
|
|
80984
81090
|
string(),
|
|
80985
81091
|
array(object$1({}).passthrough())
|
|
80986
81092
|
]),
|
|
81093
|
+
rawData: union([
|
|
81094
|
+
string(),
|
|
81095
|
+
array(looseObject({}))
|
|
81096
|
+
]).nullish(),
|
|
80987
81097
|
totalRows: union([
|
|
80988
81098
|
number(),
|
|
80989
81099
|
literal(TOO_MANY_ROWS)
|
|
@@ -81067,7 +81177,11 @@ ${c}
|
|
|
81067
81177
|
literal(TOO_MANY_ROWS)
|
|
81068
81178
|
]),
|
|
81069
81179
|
cell_styles: record(string(), record(string(), object$1({}).passthrough())).nullable(),
|
|
81070
|
-
cell_hover_texts: cellHoverTextSchema.nullable()
|
|
81180
|
+
cell_hover_texts: cellHoverTextSchema.nullable(),
|
|
81181
|
+
raw_data: union([
|
|
81182
|
+
string(),
|
|
81183
|
+
array(looseObject({}))
|
|
81184
|
+
]).nullish()
|
|
81071
81185
|
})),
|
|
81072
81186
|
get_row_ids: rpc.input(object$1({}).passthrough()).output(object$1({
|
|
81073
81187
|
row_ids: array(number()),
|
|
@@ -81161,7 +81275,7 @@ ${c}
|
|
|
81161
81275
|
return d;
|
|
81162
81276
|
};
|
|
81163
81277
|
const LoadingDataTableComponent = (0, import_react.memo)((e) => {
|
|
81164
|
-
let r = (0, import_compiler_runtime$58.c)(
|
|
81278
|
+
let r = (0, import_compiler_runtime$58.c)(103), c;
|
|
81165
81279
|
r[0] === e.host ? c = r[1] : (c = findCellId(e.host), r[0] = e.host, r[1] = c);
|
|
81166
81280
|
let d = c, f = e.search, _ = e.setValue, v;
|
|
81167
81281
|
r[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = [], r[2] = v) : v = r[2];
|
|
@@ -81196,33 +81310,35 @@ ${c}
|
|
|
81196
81310
|
e.pageSize
|
|
81197
81311
|
], r[18] = e.pageSize, r[19] = VY, r[20] = HY), (0, import_react.useEffect)(VY, HY);
|
|
81198
81312
|
let UY;
|
|
81199
|
-
r[21] !== G || r[22] !== E.pageIndex || r[23] !== E.pageSize || r[24] !== e.cellHoverTexts || r[25] !== e.cellStyles || r[26] !== e.data || r[27] !== e.lazy || r[28] !== e.pageSize || r[29] !== e.
|
|
81313
|
+
r[21] !== G || r[22] !== E.pageIndex || r[23] !== E.pageSize || r[24] !== e.cellHoverTexts || r[25] !== e.cellStyles || r[26] !== e.data || r[27] !== e.lazy || r[28] !== e.pageSize || r[29] !== e.rawData || r[30] !== e.totalRows || r[31] !== f || r[32] !== M || r[33] !== y ? (UY = async () => {
|
|
81200
81314
|
if (e.totalRows === 0) return {
|
|
81201
81315
|
rows: Arrays.EMPTY,
|
|
81202
81316
|
totalRows: 0,
|
|
81203
81317
|
cellStyles: {}
|
|
81204
81318
|
};
|
|
81205
|
-
let r2 = e.data, c2 = e.
|
|
81319
|
+
let r2 = e.data, c2 = e.rawData, d2 = e.totalRows, _2 = e.cellStyles, v2 = e.cellHoverTexts, S2 = E.pageSize !== e.pageSize, w2 = M === "" && E.pageIndex === 0 && G.length === 0 && y.length === 0 && !e.lazy && !S2, O2 = f({
|
|
81206
81320
|
sort: y.length > 0 ? y.map(_temp$19) : void 0,
|
|
81207
81321
|
query: M,
|
|
81208
81322
|
page_number: E.pageIndex,
|
|
81209
81323
|
page_size: E.pageSize,
|
|
81210
81324
|
filters: G.flatMap(_temp2$15)
|
|
81211
81325
|
});
|
|
81212
|
-
if (
|
|
81326
|
+
if (w2) O2.catch(_temp3$10);
|
|
81213
81327
|
else {
|
|
81214
|
-
let e2 = await
|
|
81215
|
-
r2 = e2.data, c2 = e2.
|
|
81328
|
+
let e2 = await O2;
|
|
81329
|
+
r2 = e2.data, c2 = e2.raw_data, d2 = e2.total_rows, _2 = e2.cell_styles || {}, v2 = e2.cell_hover_texts || {};
|
|
81216
81330
|
}
|
|
81217
|
-
|
|
81331
|
+
let [I2, z2] = await loadTableAndRawData(r2, c2);
|
|
81332
|
+
return r2 = I2, {
|
|
81218
81333
|
rows: r2,
|
|
81219
|
-
|
|
81220
|
-
|
|
81221
|
-
|
|
81334
|
+
rawRows: z2,
|
|
81335
|
+
totalRows: d2,
|
|
81336
|
+
cellStyles: _2,
|
|
81337
|
+
cellHoverTexts: v2
|
|
81222
81338
|
};
|
|
81223
|
-
}, r[21] = G, r[22] = E.pageIndex, r[23] = E.pageSize, r[24] = e.cellHoverTexts, r[25] = e.cellStyles, r[26] = e.data, r[27] = e.lazy, r[28] = e.pageSize, r[29] = e.
|
|
81339
|
+
}, r[21] = G, r[22] = E.pageIndex, r[23] = E.pageSize, r[24] = e.cellHoverTexts, r[25] = e.cellStyles, r[26] = e.data, r[27] = e.lazy, r[28] = e.pageSize, r[29] = e.rawData, r[30] = e.totalRows, r[31] = f, r[32] = M, r[33] = y, r[34] = UY) : UY = r[34];
|
|
81224
81340
|
let WY = useDeepCompareMemoize(e.fieldTypes), GY;
|
|
81225
|
-
r[
|
|
81341
|
+
r[35] !== G || r[36] !== E.pageIndex || r[37] !== E.pageSize || r[38] !== e.cellHoverTexts || r[39] !== e.cellStyles || r[40] !== e.data || r[41] !== e.lazy || r[42] !== e.totalRows || r[43] !== f || r[44] !== M || r[45] !== y || r[46] !== WY ? (GY = [
|
|
81226
81342
|
y,
|
|
81227
81343
|
f,
|
|
81228
81344
|
G,
|
|
@@ -81235,9 +81351,9 @@ ${c}
|
|
|
81235
81351
|
e.cellStyles,
|
|
81236
81352
|
E.pageSize,
|
|
81237
81353
|
E.pageIndex
|
|
81238
|
-
], r[
|
|
81354
|
+
], r[35] = G, r[36] = E.pageIndex, r[37] = E.pageSize, r[38] = e.cellHoverTexts, r[39] = e.cellStyles, r[40] = e.data, r[41] = e.lazy, r[42] = e.totalRows, r[43] = f, r[44] = M, r[45] = y, r[46] = WY, r[47] = GY) : GY = r[47];
|
|
81239
81355
|
let { data: KY, error: qY, isPending: JY, isFetching: YY } = useAsyncData(UY, GY), XY;
|
|
81240
|
-
r[
|
|
81356
|
+
r[48] !== G || r[49] !== f || r[50] !== M || r[51] !== y ? (XY = async (e2) => ({
|
|
81241
81357
|
rows: await loadTableData((await f({
|
|
81242
81358
|
page_number: e2,
|
|
81243
81359
|
page_size: 1,
|
|
@@ -81246,51 +81362,51 @@ ${c}
|
|
|
81246
81362
|
filters: G.flatMap(_temp5$5),
|
|
81247
81363
|
max_columns: null
|
|
81248
81364
|
})).data)
|
|
81249
|
-
}), r[
|
|
81365
|
+
}), r[48] = G, r[49] = f, r[50] = M, r[51] = y, r[52] = XY) : XY = r[52];
|
|
81250
81366
|
let ZY = XY, QY;
|
|
81251
|
-
r[
|
|
81367
|
+
r[53] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (QY = () => {
|
|
81252
81368
|
O(_temp6$4);
|
|
81253
|
-
}, r[
|
|
81369
|
+
}, r[53] = QY) : QY = r[53];
|
|
81254
81370
|
let $Y = KY == null ? void 0 : KY.totalRows, eX;
|
|
81255
|
-
r[
|
|
81371
|
+
r[54] === $Y ? eX = r[55] : (eX = [
|
|
81256
81372
|
$Y
|
|
81257
|
-
], r[
|
|
81373
|
+
], r[54] = $Y, r[55] = eX), (0, import_react.useEffect)(QY, eX);
|
|
81258
81374
|
let tX;
|
|
81259
|
-
r[
|
|
81375
|
+
r[56] === e ? tX = r[57] : (tX = async () => e.totalRows === 0 || !e.showColumnSummaries ? {
|
|
81260
81376
|
data: null,
|
|
81261
81377
|
stats: {},
|
|
81262
81378
|
bin_values: {},
|
|
81263
81379
|
value_counts: {},
|
|
81264
81380
|
show_charts: false
|
|
81265
|
-
} : e.get_column_summaries({}), r[
|
|
81381
|
+
} : e.get_column_summaries({}), r[56] = e, r[57] = tX);
|
|
81266
81382
|
let nX;
|
|
81267
|
-
r[
|
|
81383
|
+
r[58] !== G || r[59] !== e.data || r[60] !== e.get_column_summaries || r[61] !== e.showColumnSummaries || r[62] !== e.totalRows || r[63] !== M ? (nX = [
|
|
81268
81384
|
e.get_column_summaries,
|
|
81269
81385
|
e.showColumnSummaries,
|
|
81270
81386
|
G,
|
|
81271
81387
|
M,
|
|
81272
81388
|
e.totalRows,
|
|
81273
81389
|
e.data
|
|
81274
|
-
], r[
|
|
81390
|
+
], r[58] = G, r[59] = e.data, r[60] = e.get_column_summaries, r[61] = e.showColumnSummaries, r[62] = e.totalRows, r[63] = M, r[64] = nX) : nX = r[64];
|
|
81275
81391
|
let { data: rX, error: iX } = useAsyncData(tX, nX), aX, oX;
|
|
81276
|
-
if (r[
|
|
81392
|
+
if (r[65] === iX ? (aX = r[66], oX = r[67]) : (aX = () => {
|
|
81277
81393
|
iX && Logger.error(iX);
|
|
81278
81394
|
}, oX = [
|
|
81279
81395
|
iX
|
|
81280
|
-
], r[
|
|
81396
|
+
], r[65] = iX, r[66] = aX, r[67] = oX), (0, import_react.useEffect)(aX, oX), JY) {
|
|
81281
81397
|
let c2 = e.totalRows !== "too_many" && e.totalRows > 0 ? e.totalRows : e.pageSize, d2;
|
|
81282
|
-
return r[
|
|
81398
|
+
return r[68] === c2 ? d2 = r[69] : (d2 = (0, import_jsx_runtime.jsx)(DelayMount, {
|
|
81283
81399
|
milliseconds: 200,
|
|
81284
81400
|
children: (0, import_jsx_runtime.jsx)(LoadingTable, {
|
|
81285
81401
|
pageSize: c2
|
|
81286
81402
|
})
|
|
81287
|
-
}), r[
|
|
81403
|
+
}), r[68] = c2, r[69] = d2), d2;
|
|
81288
81404
|
}
|
|
81289
81405
|
let sX = null;
|
|
81290
81406
|
if (qY) {
|
|
81291
81407
|
Logger.error(qY);
|
|
81292
81408
|
let e2;
|
|
81293
|
-
r[
|
|
81409
|
+
r[70] === qY ? e2 = r[71] : (e2 = !isStaticNotebook() && (0, import_jsx_runtime.jsxs)(Alert, {
|
|
81294
81410
|
variant: "destructive",
|
|
81295
81411
|
className: "mb-2",
|
|
81296
81412
|
children: [
|
|
@@ -81302,16 +81418,17 @@ ${c}
|
|
|
81302
81418
|
children: qY.message || "An unknown error occurred"
|
|
81303
81419
|
})
|
|
81304
81420
|
]
|
|
81305
|
-
}), r[
|
|
81421
|
+
}), r[70] = qY, r[71] = e2), sX = e2;
|
|
81306
81422
|
}
|
|
81307
81423
|
let cX;
|
|
81308
|
-
r[
|
|
81424
|
+
r[72] === LY ? cX = r[73] : (cX = () => {
|
|
81309
81425
|
RY(!LY);
|
|
81310
|
-
}, r[
|
|
81311
|
-
let lX = cX, uX = (KY == null ? void 0 : KY.rows) ?? Arrays.EMPTY, dX = YY && !JY,
|
|
81312
|
-
r[
|
|
81426
|
+
}, r[72] = LY, r[73] = cX);
|
|
81427
|
+
let lX = cX, uX = (KY == null ? void 0 : KY.rows) ?? Arrays.EMPTY, dX = KY == null ? void 0 : KY.rawRows, fX = YY && !JY, pX = (KY == null ? void 0 : KY.totalRows) ?? e.totalRows, mX = (KY == null ? void 0 : KY.cellStyles) ?? e.cellStyles, hX = (KY == null ? void 0 : KY.cellHoverTexts) ?? e.cellHoverTexts, gX;
|
|
81428
|
+
r[74] !== d || r[75] !== rX || r[76] !== G || r[77] !== ZY || r[78] !== E || r[79] !== e || r[80] !== M || r[81] !== y || r[82] !== uX || r[83] !== dX || r[84] !== fX || r[85] !== pX || r[86] !== mX || r[87] !== hX || r[88] !== lX ? (gX = (0, import_jsx_runtime.jsx)(DataTableComponent, {
|
|
81313
81429
|
...e,
|
|
81314
81430
|
data: uX,
|
|
81431
|
+
rawData: dX,
|
|
81315
81432
|
columnSummaries: rX,
|
|
81316
81433
|
sorting: y,
|
|
81317
81434
|
setSorting: S,
|
|
@@ -81319,190 +81436,191 @@ ${c}
|
|
|
81319
81436
|
setSearchQuery: I,
|
|
81320
81437
|
filters: G,
|
|
81321
81438
|
setFilters: q,
|
|
81322
|
-
reloading:
|
|
81323
|
-
totalRows:
|
|
81439
|
+
reloading: fX,
|
|
81440
|
+
totalRows: pX,
|
|
81324
81441
|
paginationState: E,
|
|
81325
81442
|
setPaginationState: O,
|
|
81326
|
-
cellStyles:
|
|
81327
|
-
cellHoverTexts:
|
|
81443
|
+
cellStyles: mX,
|
|
81444
|
+
cellHoverTexts: hX,
|
|
81328
81445
|
toggleDisplayHeader: lX,
|
|
81329
81446
|
getRow: ZY,
|
|
81330
81447
|
cellId: d,
|
|
81331
81448
|
maxHeight: e.maxHeight
|
|
81332
|
-
}), r[
|
|
81333
|
-
let
|
|
81334
|
-
r[
|
|
81449
|
+
}), r[74] = d, r[75] = rX, r[76] = G, r[77] = ZY, r[78] = E, r[79] = e, r[80] = M, r[81] = y, r[82] = uX, r[83] = dX, r[84] = fX, r[85] = pX, r[86] = mX, r[87] = hX, r[88] = lX, r[89] = gX) : gX = r[89];
|
|
81450
|
+
let _X = gX, vX;
|
|
81451
|
+
r[90] !== d || r[91] !== _X || r[92] !== (KY == null ? void 0 : KY.rows) || r[93] !== LY || r[94] !== e.fieldTypes || r[95] !== e.get_data_url || r[96] !== e.showChartBuilder || r[97] !== e.totalColumns || r[98] !== e.totalRows ? (vX = e.showChartBuilder ? (0, import_jsx_runtime.jsx)(TablePanel, {
|
|
81335
81452
|
displayHeader: LY,
|
|
81336
81453
|
data: (KY == null ? void 0 : KY.rows) || [],
|
|
81337
81454
|
columns: e.totalColumns,
|
|
81338
81455
|
totalRows: e.totalRows,
|
|
81339
|
-
dataTable:
|
|
81456
|
+
dataTable: _X,
|
|
81340
81457
|
getDataUrl: e.get_data_url,
|
|
81341
81458
|
fieldTypes: e.fieldTypes,
|
|
81342
81459
|
cellId: d
|
|
81343
|
-
}) :
|
|
81344
|
-
let
|
|
81345
|
-
return r[
|
|
81460
|
+
}) : _X, r[90] = d, r[91] = _X, r[92] = KY == null ? void 0 : KY.rows, r[93] = LY, r[94] = e.fieldTypes, r[95] = e.get_data_url, r[96] = e.showChartBuilder, r[97] = e.totalColumns, r[98] = e.totalRows, r[99] = vX) : vX = r[99];
|
|
81461
|
+
let yX;
|
|
81462
|
+
return r[100] !== sX || r[101] !== vX ? (yX = (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
81346
81463
|
children: [
|
|
81347
81464
|
sX,
|
|
81348
|
-
|
|
81465
|
+
vX
|
|
81349
81466
|
]
|
|
81350
|
-
}), r[
|
|
81467
|
+
}), r[100] = sX, r[101] = vX, r[102] = yX) : yX = r[102], yX;
|
|
81351
81468
|
});
|
|
81352
81469
|
LoadingDataTableComponent.displayName = "LoadingDataTableComponent";
|
|
81353
|
-
var DataTableComponent = ({ label: e, data: r,
|
|
81354
|
-
let
|
|
81355
|
-
if (!
|
|
81356
|
-
let e2 = toFieldTypes(
|
|
81357
|
-
return new ColumnChartSpecModel(
|
|
81358
|
-
includeCharts:
|
|
81470
|
+
var DataTableComponent = ({ label: e, data: r, rawData: c, totalRows: d, maxColumns: f, pagination: _, selection: v, value: y, showFilters: S, showDownload: w, showPageSizeSelector: E, showColumnExplorer: O, showRowExplorer: M, showChartBuilder: I, showDataTypes: z, rowHeaders: G, fieldTypes: q, paginationState: IY, setPaginationState: LY, download_as: RY, columnSummaries: zY, className: BY, setValue: VY, sorting: HY, setSorting: UY, enableSearch: WY, searchQuery: GY, setSearchQuery: KY, filters: qY, setFilters: JY, reloading: YY, freezeColumnsLeft: XY, freezeColumnsRight: ZY, textJustifyColumns: QY, wrappedColumns: $Y, headerTooltip: eX, totalColumns: tX, get_row_ids: nX, cellStyles: rX, hoverTemplate: iX, cellHoverTexts: aX, downloadFileName: oX, toggleDisplayHeader: sX, calculate_top_k_rows: cX, preview_column: lX, getRow: uX, cellId: dX, maxHeight: fX }) => {
|
|
81471
|
+
let pX = (0, import_react.useId)(), [mX, hX] = (0, import_react.useState)(0), { isPanelOpen: gX, togglePanel: _X } = usePanelOwnership(pX, dX), vX = (0, import_react.useMemo)(() => {
|
|
81472
|
+
if (!zY || !q || !zY.stats) return ColumnChartSpecModel.EMPTY;
|
|
81473
|
+
let e2 = toFieldTypes(q);
|
|
81474
|
+
return new ColumnChartSpecModel(zY.data || [], e2, zY.stats, zY.bin_values, zY.value_counts, {
|
|
81475
|
+
includeCharts: zY.show_charts
|
|
81359
81476
|
});
|
|
81360
81477
|
}, [
|
|
81361
|
-
|
|
81362
|
-
|
|
81363
|
-
]),
|
|
81364
|
-
|
|
81365
|
-
|
|
81366
|
-
]),
|
|
81367
|
-
|
|
81368
|
-
let
|
|
81369
|
-
rowHeaders:
|
|
81370
|
-
selection:
|
|
81371
|
-
chartSpecModel:
|
|
81372
|
-
fieldTypes:
|
|
81373
|
-
textJustifyColumns:
|
|
81374
|
-
wrappedColumns:
|
|
81375
|
-
headerTooltip:
|
|
81376
|
-
showDataTypes:
|
|
81377
|
-
calculateTopKRows:
|
|
81478
|
+
q,
|
|
81479
|
+
zY
|
|
81480
|
+
]), yX = useDeepCompareMemoize(q ?? inferFieldTypes(r)), bX = (0, import_react.useMemo)(() => f === "all" ? yX : yX.slice(0, f), [
|
|
81481
|
+
f,
|
|
81482
|
+
yX
|
|
81483
|
+
]), xX = useDeepCompareMemoize(G), SX = useDeepCompareMemoize(QY), CX = useDeepCompareMemoize($Y), wX = useDeepCompareMemoize(vX), TX = bX.length;
|
|
81484
|
+
q || (z = false);
|
|
81485
|
+
let EX = (0, import_react.useMemo)(() => generateColumns({
|
|
81486
|
+
rowHeaders: xX,
|
|
81487
|
+
selection: v,
|
|
81488
|
+
chartSpecModel: wX,
|
|
81489
|
+
fieldTypes: bX,
|
|
81490
|
+
textJustifyColumns: SX,
|
|
81491
|
+
wrappedColumns: CX,
|
|
81492
|
+
headerTooltip: eX,
|
|
81493
|
+
showDataTypes: z,
|
|
81494
|
+
calculateTopKRows: cX
|
|
81378
81495
|
}), [
|
|
81379
|
-
|
|
81380
|
-
|
|
81381
|
-
|
|
81382
|
-
bX,
|
|
81383
|
-
yX,
|
|
81496
|
+
v,
|
|
81497
|
+
z,
|
|
81498
|
+
wX,
|
|
81384
81499
|
xX,
|
|
81500
|
+
bX,
|
|
81385
81501
|
SX,
|
|
81386
|
-
|
|
81387
|
-
|
|
81388
|
-
|
|
81502
|
+
CX,
|
|
81503
|
+
eX,
|
|
81504
|
+
cX
|
|
81505
|
+
]), DX = (0, import_react.useMemo)(() => Object.fromEntries((y || []).map((e2) => [
|
|
81389
81506
|
e2,
|
|
81390
81507
|
true
|
|
81391
81508
|
])), [
|
|
81392
|
-
|
|
81393
|
-
]),
|
|
81394
|
-
if (
|
|
81509
|
+
y
|
|
81510
|
+
]), OX = useEvent_default((e2) => {
|
|
81511
|
+
if (v === "single") {
|
|
81395
81512
|
let r2 = Functions.asUpdater(e2)({});
|
|
81396
|
-
|
|
81513
|
+
VY(Object.keys(r2).slice(0, 1));
|
|
81397
81514
|
}
|
|
81398
|
-
if (
|
|
81399
|
-
let r2 = Functions.asUpdater(e2)(
|
|
81400
|
-
|
|
81515
|
+
if (v === "multi") {
|
|
81516
|
+
let r2 = Functions.asUpdater(e2)(DX);
|
|
81517
|
+
VY(Object.keys(r2));
|
|
81401
81518
|
}
|
|
81402
|
-
}),
|
|
81403
|
-
if (
|
|
81404
|
-
let r2 = getPageIndexForRow(e2,
|
|
81405
|
-
r2 !== null &&
|
|
81519
|
+
}), kX = useEvent_default((e2) => {
|
|
81520
|
+
if (hX(e2), e2 < 0 || typeof d == "number" && e2 >= d || d === "too_many") return;
|
|
81521
|
+
let r2 = getPageIndexForRow(e2, IY.pageIndex, IY.pageSize);
|
|
81522
|
+
r2 !== null && LY((e3) => ({
|
|
81406
81523
|
...e3,
|
|
81407
81524
|
pageIndex: r2
|
|
81408
81525
|
}));
|
|
81409
|
-
}),
|
|
81410
|
-
|
|
81411
|
-
}),
|
|
81526
|
+
}), AX = y.filter((e2) => e2 instanceof Object && e2.columnName !== void 0), jX = useEvent_default((e2) => {
|
|
81527
|
+
v === "single-cell" && VY(Functions.asUpdater(e2)(AX).slice(0, 1)), v === "multi-cell" && VY(Functions.asUpdater(e2)(AX));
|
|
81528
|
+
}), MX = v === "multi" || v === "single", NX = O && lX && gX("column-explorer"), PX = isInVscodeExtension();
|
|
81412
81529
|
return (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
81413
81530
|
children: [
|
|
81414
|
-
|
|
81531
|
+
d === "too_many" && IY.pageSize === r.length && (0, import_jsx_runtime.jsxs)(Banner, {
|
|
81415
81532
|
className: "mb-1 rounded",
|
|
81416
81533
|
children: [
|
|
81417
81534
|
"Previewing the first ",
|
|
81418
|
-
|
|
81535
|
+
IY.pageSize,
|
|
81419
81536
|
" rows."
|
|
81420
81537
|
]
|
|
81421
81538
|
}),
|
|
81422
|
-
|
|
81539
|
+
TX < tX && TX > 0 && (0, import_jsx_runtime.jsxs)(Banner, {
|
|
81423
81540
|
className: "mb-1 rounded",
|
|
81424
81541
|
children: [
|
|
81425
81542
|
"Result clipped. Showing ",
|
|
81426
|
-
|
|
81543
|
+
TX,
|
|
81427
81544
|
" of ",
|
|
81428
|
-
|
|
81545
|
+
tX,
|
|
81429
81546
|
" columns."
|
|
81430
81547
|
]
|
|
81431
81548
|
}),
|
|
81432
|
-
(
|
|
81549
|
+
(zY == null ? void 0 : zY.is_disabled) && (0, import_jsx_runtime.jsx)(Banner, {
|
|
81433
81550
|
className: "mb-1 rounded",
|
|
81434
81551
|
children: "Column summaries are unavailable. Filter your data to fewer than 1,000,000 rows."
|
|
81435
81552
|
}),
|
|
81436
|
-
|
|
81553
|
+
gX("row-viewer") && (0, import_jsx_runtime.jsx)(ContextAwarePanelItem, {
|
|
81437
81554
|
children: (0, import_jsx_runtime.jsx)(RowViewerPanel, {
|
|
81438
|
-
getRow:
|
|
81439
|
-
fieldTypes:
|
|
81440
|
-
totalRows:
|
|
81441
|
-
rowIdx:
|
|
81442
|
-
setRowIdx:
|
|
81443
|
-
isSelectable:
|
|
81444
|
-
isRowSelected:
|
|
81445
|
-
handleRowSelectionChange:
|
|
81555
|
+
getRow: uX,
|
|
81556
|
+
fieldTypes: yX,
|
|
81557
|
+
totalRows: d,
|
|
81558
|
+
rowIdx: mX,
|
|
81559
|
+
setRowIdx: kX,
|
|
81560
|
+
isSelectable: MX,
|
|
81561
|
+
isRowSelected: DX[mX],
|
|
81562
|
+
handleRowSelectionChange: OX
|
|
81446
81563
|
})
|
|
81447
81564
|
}),
|
|
81448
|
-
|
|
81565
|
+
NX && (0, import_jsx_runtime.jsx)(ContextAwarePanelItem, {
|
|
81449
81566
|
children: (0, import_jsx_runtime.jsx)(ColumnExplorerPanel, {
|
|
81450
|
-
previewColumn:
|
|
81451
|
-
fieldTypes:
|
|
81452
|
-
totalRows:
|
|
81453
|
-
totalColumns:
|
|
81454
|
-
tableId:
|
|
81567
|
+
previewColumn: lX,
|
|
81568
|
+
fieldTypes: yX,
|
|
81569
|
+
totalRows: d,
|
|
81570
|
+
totalColumns: tX,
|
|
81571
|
+
tableId: pX
|
|
81455
81572
|
})
|
|
81456
81573
|
}),
|
|
81457
81574
|
(0, import_jsx_runtime.jsx)(ColumnChartContext, {
|
|
81458
|
-
value:
|
|
81575
|
+
value: vX,
|
|
81459
81576
|
children: (0, import_jsx_runtime.jsx)(Labeled, {
|
|
81460
81577
|
label: e,
|
|
81461
81578
|
align: "top",
|
|
81462
81579
|
fullWidth: true,
|
|
81463
81580
|
children: (0, import_jsx_runtime.jsx)(DataTable, {
|
|
81464
81581
|
data: r,
|
|
81465
|
-
|
|
81466
|
-
|
|
81467
|
-
|
|
81468
|
-
|
|
81469
|
-
|
|
81470
|
-
|
|
81582
|
+
rawData: c,
|
|
81583
|
+
columns: EX,
|
|
81584
|
+
className: BY,
|
|
81585
|
+
maxHeight: fX,
|
|
81586
|
+
sorting: HY,
|
|
81587
|
+
totalRows: d,
|
|
81588
|
+
totalColumns: tX,
|
|
81471
81589
|
manualSorting: true,
|
|
81472
|
-
setSorting:
|
|
81473
|
-
pagination:
|
|
81590
|
+
setSorting: UY,
|
|
81591
|
+
pagination: _,
|
|
81474
81592
|
manualPagination: true,
|
|
81475
|
-
selection:
|
|
81476
|
-
paginationState:
|
|
81477
|
-
setPaginationState:
|
|
81478
|
-
rowSelection:
|
|
81479
|
-
cellSelection:
|
|
81480
|
-
cellStyling:
|
|
81481
|
-
hoverTemplate:
|
|
81482
|
-
cellHoverTexts:
|
|
81483
|
-
downloadAs:
|
|
81484
|
-
downloadFileName:
|
|
81485
|
-
enableSearch:
|
|
81486
|
-
searchQuery:
|
|
81487
|
-
onSearchQueryChange:
|
|
81488
|
-
showFilters:
|
|
81489
|
-
filters:
|
|
81490
|
-
onFiltersChange:
|
|
81491
|
-
reloading:
|
|
81492
|
-
onRowSelectionChange:
|
|
81493
|
-
freezeColumnsLeft:
|
|
81494
|
-
freezeColumnsRight:
|
|
81495
|
-
onCellSelectionChange:
|
|
81496
|
-
getRowIds:
|
|
81497
|
-
toggleDisplayHeader:
|
|
81498
|
-
showChartBuilder:
|
|
81499
|
-
showPageSizeSelector:
|
|
81500
|
-
showColumnExplorer:
|
|
81501
|
-
showRowExplorer:
|
|
81502
|
-
togglePanel:
|
|
81503
|
-
isPanelOpen:
|
|
81504
|
-
viewedRowIdx:
|
|
81505
|
-
onViewedRowChange: (e2) =>
|
|
81593
|
+
selection: v,
|
|
81594
|
+
paginationState: IY,
|
|
81595
|
+
setPaginationState: LY,
|
|
81596
|
+
rowSelection: DX,
|
|
81597
|
+
cellSelection: AX,
|
|
81598
|
+
cellStyling: rX,
|
|
81599
|
+
hoverTemplate: iX,
|
|
81600
|
+
cellHoverTexts: aX,
|
|
81601
|
+
downloadAs: w ? RY : void 0,
|
|
81602
|
+
downloadFileName: oX,
|
|
81603
|
+
enableSearch: WY,
|
|
81604
|
+
searchQuery: GY,
|
|
81605
|
+
onSearchQueryChange: KY,
|
|
81606
|
+
showFilters: S,
|
|
81607
|
+
filters: qY,
|
|
81608
|
+
onFiltersChange: JY,
|
|
81609
|
+
reloading: YY,
|
|
81610
|
+
onRowSelectionChange: OX,
|
|
81611
|
+
freezeColumnsLeft: XY,
|
|
81612
|
+
freezeColumnsRight: ZY,
|
|
81613
|
+
onCellSelectionChange: jX,
|
|
81614
|
+
getRowIds: nX,
|
|
81615
|
+
toggleDisplayHeader: sX,
|
|
81616
|
+
showChartBuilder: I,
|
|
81617
|
+
showPageSizeSelector: E,
|
|
81618
|
+
showColumnExplorer: O && !PX,
|
|
81619
|
+
showRowExplorer: M && !PX,
|
|
81620
|
+
togglePanel: _X,
|
|
81621
|
+
isPanelOpen: gX,
|
|
81622
|
+
viewedRowIdx: mX,
|
|
81623
|
+
onViewedRowChange: (e2) => hX(e2)
|
|
81506
81624
|
})
|
|
81507
81625
|
})
|
|
81508
81626
|
})
|
|
@@ -92685,21 +92803,75 @@ ${c}
|
|
|
92685
92803
|
}), r[13] = c, r[14] = e.label, r[15] = f, r[16] = O, r[17] = M) : M = r[17], M;
|
|
92686
92804
|
};
|
|
92687
92805
|
var import_compiler_runtime$28 = require_compiler_runtime(), RangeSlider = import_react.forwardRef((e, r) => {
|
|
92688
|
-
let c = (0, import_compiler_runtime$28.c)(
|
|
92689
|
-
c[0] ===
|
|
92690
|
-
let O;
|
|
92691
|
-
c[
|
|
92692
|
-
let M;
|
|
92693
|
-
c[
|
|
92806
|
+
let c = (0, import_compiler_runtime$28.c)(56), d, f, _;
|
|
92807
|
+
c[0] === e ? (d = c[1], f = c[2], _ = c[3]) : ({ className: d, valueMap: _, ...f } = e, c[0] = e, c[1] = d, c[2] = f, c[3] = _);
|
|
92808
|
+
let [v, y] = useBoolean(false), { locale: S } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), w = import_react.useRef(false), E = import_react.useRef(0), O = import_react.useRef(0), M;
|
|
92809
|
+
c[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = [], c[4] = M) : M = c[4];
|
|
92810
|
+
let I = import_react.useRef(M), z;
|
|
92811
|
+
c[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = [], c[5] = z) : z = c[5];
|
|
92812
|
+
let G = import_react.useRef(z), q = import_react.useRef(null), IY = import_react.useRef(null), LY = import_react.useRef(null), RY;
|
|
92813
|
+
c[6] === r ? RY = c[7] : (RY = (e2) => {
|
|
92814
|
+
q.current = e2, typeof r == "function" ? r(e2) : r && (r.current = e2);
|
|
92815
|
+
}, c[6] = r, c[7] = RY);
|
|
92816
|
+
let zY = RY, BY;
|
|
92817
|
+
c[8] !== f.disabled || c[9] !== f.value ? (BY = (e2) => {
|
|
92818
|
+
var _a3;
|
|
92819
|
+
!f.value || f.value.length !== 2 || f.disabled || (e2.preventDefault(), e2.stopPropagation(), w.current = true, E.current = e2.clientX, O.current = e2.clientY, I.current = [
|
|
92820
|
+
...f.value
|
|
92821
|
+
], G.current = [
|
|
92822
|
+
...f.value
|
|
92823
|
+
], LY.current = ((_a3 = IY.current) == null ? void 0 : _a3.getBoundingClientRect()) ?? null, e2.currentTarget.setPointerCapture(e2.pointerId));
|
|
92824
|
+
}, c[8] = f.disabled, c[9] = f.value, c[10] = BY) : BY = c[10];
|
|
92825
|
+
let VY = BY, HY;
|
|
92826
|
+
c[11] === f ? HY = c[12] : (HY = (e2) => {
|
|
92827
|
+
var _a3;
|
|
92828
|
+
if (!w.current) return;
|
|
92829
|
+
e2.stopPropagation();
|
|
92830
|
+
let r2 = LY.current;
|
|
92831
|
+
if (!r2) return;
|
|
92832
|
+
let c2 = f.orientation === "vertical", d2 = f.min ?? 0, _2 = f.max ?? 100, v2 = _2 - d2, y2;
|
|
92833
|
+
if (c2) {
|
|
92834
|
+
let c3 = r2.height;
|
|
92835
|
+
y2 = -((e2.clientY - O.current) / c3) * v2;
|
|
92836
|
+
} else {
|
|
92837
|
+
let c3 = r2.width;
|
|
92838
|
+
y2 = (e2.clientX - E.current) / c3 * v2;
|
|
92839
|
+
}
|
|
92840
|
+
let [S2, M2] = I.current, z2 = M2 - S2, q2 = f.steps, IY2 = q2 && q2.length > 1 ? Math.min(...q2.slice(1).map((e3, r3) => e3 - q2[r3])) : f.step ?? 1, RY2 = Math.round(y2 / IY2) * IY2, zY2 = S2 + Math.max(d2 - S2, Math.min(_2 - M2, RY2)), BY2 = zY2 + z2;
|
|
92841
|
+
G.current = [
|
|
92842
|
+
zY2,
|
|
92843
|
+
BY2
|
|
92844
|
+
], (_a3 = f.onValueChange) == null ? void 0 : _a3.call(f, [
|
|
92845
|
+
zY2,
|
|
92846
|
+
BY2
|
|
92847
|
+
]);
|
|
92848
|
+
}, c[11] = f, c[12] = HY);
|
|
92849
|
+
let UY = HY, WY;
|
|
92850
|
+
c[13] === f ? WY = c[14] : (WY = (e2) => {
|
|
92851
|
+
var _a3;
|
|
92852
|
+
w.current && (e2.currentTarget.releasePointerCapture(e2.pointerId), w.current = false, G.current.length === 2 && ((_a3 = f.onValueCommit) == null ? void 0 : _a3.call(f, G.current)));
|
|
92853
|
+
}, c[13] = f, c[14] = WY);
|
|
92854
|
+
let GY = WY, KY;
|
|
92855
|
+
c[15] === d ? KY = c[16] : (KY = cn("relative flex touch-none select-none hover:cursor-pointer", "data-[orientation=horizontal]:w-full data-[orientation=horizontal]:items-center", "data-[orientation=vertical]:h-full data-[orientation=vertical]:justify-center", "data-disabled:cursor-not-allowed", d), c[15] = d, c[16] = KY);
|
|
92856
|
+
let qY;
|
|
92857
|
+
c[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (qY = cn("relative grow overflow-hidden rounded-full bg-slate-200 dark:bg-accent/60", "data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full", "data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2"), c[17] = qY) : qY = c[17];
|
|
92858
|
+
let JY;
|
|
92859
|
+
c[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (JY = cn("absolute bg-blue-500 dark:bg-primary", "data-[orientation=horizontal]:h-full", "data-[orientation=vertical]:w-full", "data-disabled:opacity-50", "hover:cursor-grab active:cursor-grabbing"), c[18] = JY) : JY = c[18];
|
|
92860
|
+
let YY;
|
|
92861
|
+
c[19] !== VY || c[20] !== UY || c[21] !== GY ? (YY = (0, import_jsx_runtime.jsx)(Track, {
|
|
92862
|
+
ref: IY,
|
|
92694
92863
|
"data-testid": "track",
|
|
92695
|
-
className:
|
|
92864
|
+
className: qY,
|
|
92696
92865
|
children: (0, import_jsx_runtime.jsx)(Range, {
|
|
92697
92866
|
"data-testid": "range",
|
|
92698
|
-
className:
|
|
92867
|
+
className: JY,
|
|
92868
|
+
onPointerDown: VY,
|
|
92869
|
+
onPointerMove: UY,
|
|
92870
|
+
onPointerUp: GY
|
|
92699
92871
|
})
|
|
92700
|
-
}), c[
|
|
92701
|
-
let
|
|
92702
|
-
c[
|
|
92872
|
+
}), c[19] = VY, c[20] = UY, c[21] = GY, c[22] = YY) : YY = c[22];
|
|
92873
|
+
let XY;
|
|
92874
|
+
c[23] !== y.setFalse || c[24] !== y.setTrue ? (XY = (0, import_jsx_runtime.jsx)(TooltipTrigger, {
|
|
92703
92875
|
asChild: true,
|
|
92704
92876
|
children: (0, import_jsx_runtime.jsx)(Thumb, {
|
|
92705
92877
|
"data-testid": "thumb",
|
|
@@ -92709,28 +92881,30 @@ ${c}
|
|
|
92709
92881
|
onMouseEnter: y.setTrue,
|
|
92710
92882
|
onMouseLeave: y.setFalse
|
|
92711
92883
|
})
|
|
92712
|
-
}), c[
|
|
92713
|
-
let
|
|
92714
|
-
|
|
92884
|
+
}), c[23] = y.setFalse, c[24] = y.setTrue, c[25] = XY) : XY = c[25];
|
|
92885
|
+
let ZY;
|
|
92886
|
+
c[26] !== S || c[27] !== f.value || c[28] !== _ ? (ZY = f.value != null && f.value.length === 2 && (0, import_jsx_runtime.jsx)(TooltipContent, {
|
|
92887
|
+
children: prettyScientificNumber(_(f.value[0]), {
|
|
92715
92888
|
locale: S
|
|
92716
92889
|
})
|
|
92717
|
-
},
|
|
92718
|
-
|
|
92719
|
-
|
|
92720
|
-
|
|
92721
|
-
|
|
92722
|
-
|
|
92890
|
+
}, f.value[0]), c[26] = S, c[27] = f.value, c[28] = _, c[29] = ZY) : ZY = c[29];
|
|
92891
|
+
let QY;
|
|
92892
|
+
c[30] === ZY ? QY = c[31] : (QY = (0, import_jsx_runtime.jsx)(TooltipPortal, {
|
|
92893
|
+
children: ZY
|
|
92894
|
+
}), c[30] = ZY, c[31] = QY);
|
|
92895
|
+
let $Y;
|
|
92896
|
+
c[32] !== v || c[33] !== XY || c[34] !== QY ? ($Y = (0, import_jsx_runtime.jsx)(TooltipProvider, {
|
|
92723
92897
|
children: (0, import_jsx_runtime.jsxs)(TooltipRoot, {
|
|
92724
92898
|
delayDuration: 0,
|
|
92725
92899
|
open: v,
|
|
92726
92900
|
children: [
|
|
92727
|
-
|
|
92728
|
-
|
|
92901
|
+
XY,
|
|
92902
|
+
QY
|
|
92729
92903
|
]
|
|
92730
92904
|
})
|
|
92731
|
-
}), c[
|
|
92732
|
-
let
|
|
92733
|
-
c[
|
|
92905
|
+
}), c[32] = v, c[33] = XY, c[34] = QY, c[35] = $Y) : $Y = c[35];
|
|
92906
|
+
let eX;
|
|
92907
|
+
c[36] !== y.setFalse || c[37] !== y.setTrue ? (eX = (0, import_jsx_runtime.jsx)(TooltipTrigger, {
|
|
92734
92908
|
asChild: true,
|
|
92735
92909
|
children: (0, import_jsx_runtime.jsx)(Thumb, {
|
|
92736
92910
|
"data-testid": "thumb",
|
|
@@ -92740,39 +92914,39 @@ ${c}
|
|
|
92740
92914
|
onMouseEnter: y.setTrue,
|
|
92741
92915
|
onMouseLeave: y.setFalse
|
|
92742
92916
|
})
|
|
92743
|
-
}), c[
|
|
92744
|
-
let
|
|
92745
|
-
|
|
92917
|
+
}), c[36] = y.setFalse, c[37] = y.setTrue, c[38] = eX) : eX = c[38];
|
|
92918
|
+
let tX;
|
|
92919
|
+
c[39] !== S || c[40] !== f.value || c[41] !== _ ? (tX = f.value != null && f.value.length === 2 && (0, import_jsx_runtime.jsx)(TooltipContent, {
|
|
92920
|
+
children: prettyScientificNumber(_(f.value[1]), {
|
|
92746
92921
|
locale: S
|
|
92747
92922
|
})
|
|
92748
|
-
},
|
|
92749
|
-
|
|
92750
|
-
|
|
92751
|
-
|
|
92752
|
-
|
|
92753
|
-
|
|
92754
|
-
|
|
92755
|
-
|
|
92756
|
-
|
|
92757
|
-
|
|
92758
|
-
|
|
92759
|
-
|
|
92760
|
-
|
|
92761
|
-
|
|
92762
|
-
|
|
92763
|
-
|
|
92764
|
-
|
|
92765
|
-
|
|
92766
|
-
|
|
92767
|
-
|
|
92768
|
-
|
|
92769
|
-
..._,
|
|
92923
|
+
}, f.value[1]), c[39] = S, c[40] = f.value, c[41] = _, c[42] = tX) : tX = c[42];
|
|
92924
|
+
let nX;
|
|
92925
|
+
c[43] === tX ? nX = c[44] : (nX = (0, import_jsx_runtime.jsx)(TooltipPortal, {
|
|
92926
|
+
children: tX
|
|
92927
|
+
}), c[43] = tX, c[44] = nX);
|
|
92928
|
+
let rX;
|
|
92929
|
+
c[45] !== v || c[46] !== eX || c[47] !== nX ? (rX = (0, import_jsx_runtime.jsx)(TooltipProvider, {
|
|
92930
|
+
children: (0, import_jsx_runtime.jsxs)(TooltipRoot, {
|
|
92931
|
+
delayDuration: 0,
|
|
92932
|
+
open: v,
|
|
92933
|
+
children: [
|
|
92934
|
+
eX,
|
|
92935
|
+
nX
|
|
92936
|
+
]
|
|
92937
|
+
})
|
|
92938
|
+
}), c[45] = v, c[46] = eX, c[47] = nX, c[48] = rX) : rX = c[48];
|
|
92939
|
+
let iX;
|
|
92940
|
+
return c[49] !== zY || c[50] !== f || c[51] !== YY || c[52] !== $Y || c[53] !== rX || c[54] !== KY ? (iX = (0, import_jsx_runtime.jsxs)(Root$1, {
|
|
92941
|
+
ref: zY,
|
|
92942
|
+
className: KY,
|
|
92943
|
+
...f,
|
|
92770
92944
|
children: [
|
|
92771
|
-
|
|
92772
|
-
|
|
92773
|
-
|
|
92945
|
+
YY,
|
|
92946
|
+
$Y,
|
|
92947
|
+
rX
|
|
92774
92948
|
]
|
|
92775
|
-
}), c[
|
|
92949
|
+
}), c[49] = zY, c[50] = f, c[51] = YY, c[52] = $Y, c[53] = rX, c[54] = KY, c[55] = iX) : iX = c[55], iX;
|
|
92776
92950
|
});
|
|
92777
92951
|
RangeSlider.displayName = Root$1.displayName;
|
|
92778
92952
|
var import_compiler_runtime$27 = require_compiler_runtime(), RangeSliderPlugin = class {
|
|
@@ -93082,7 +93256,7 @@ ${c}
|
|
|
93082
93256
|
});
|
|
93083
93257
|
}
|
|
93084
93258
|
}, SliderComponent = (e) => {
|
|
93085
|
-
let r = (0, import_compiler_runtime$26.c)(
|
|
93259
|
+
let r = (0, import_compiler_runtime$26.c)(54), { label: c, setValue: d, value: f, start: _, stop: v, step: y, debounce: S, orientation: w, showValue: E, fullWidth: O, valueMap: M, includeInput: I, disabled: z } = e, G = (0, import_react.useId)(), { locale: q } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7(), [IY, LY] = (0, import_react.useState)(f), RY, zY;
|
|
93086
93260
|
r[0] === f ? (RY = r[1], zY = r[2]) : (RY = () => {
|
|
93087
93261
|
LY(f);
|
|
93088
93262
|
}, zY = [
|
|
@@ -93128,10 +93302,10 @@ ${c}
|
|
|
93128
93302
|
})
|
|
93129
93303
|
}), r[27] = IY, r[28] = q, r[29] = E, r[30] = M, r[31] = ZY) : ZY = r[31];
|
|
93130
93304
|
let QY;
|
|
93131
|
-
r[32] !==
|
|
93305
|
+
r[32] !== z || r[33] !== I || r[34] !== IY || r[35] !== c || r[36] !== d || r[37] !== _ || r[38] !== y || r[39] !== v || r[40] !== M ? (QY = I && (0, import_jsx_runtime.jsx)(NumberField, {
|
|
93132
93306
|
value: M(IY),
|
|
93133
93307
|
onChange: (e2) => {
|
|
93134
|
-
(e2 == null || Number.isNaN(e2)) && (e2 = Number(_)), LY(e2),
|
|
93308
|
+
(e2 == null || Number.isNaN(e2)) && (e2 = Number(_)), LY(e2), d(e2);
|
|
93135
93309
|
},
|
|
93136
93310
|
minValue: _,
|
|
93137
93311
|
maxValue: v,
|
|
@@ -93139,25 +93313,25 @@ ${c}
|
|
|
93139
93313
|
className: "w-24",
|
|
93140
93314
|
"aria-label": `${c || "Slider"} value input`,
|
|
93141
93315
|
isDisabled: z
|
|
93142
|
-
}), r[32] =
|
|
93316
|
+
}), r[32] = z, r[33] = I, r[34] = IY, r[35] = c, r[36] = d, r[37] = _, r[38] = y, r[39] = v, r[40] = M, r[41] = QY) : QY = r[41];
|
|
93143
93317
|
let $Y;
|
|
93144
|
-
r[
|
|
93318
|
+
r[42] !== XY || r[43] !== ZY || r[44] !== QY || r[45] !== WY ? ($Y = (0, import_jsx_runtime.jsxs)("div", {
|
|
93145
93319
|
className: WY,
|
|
93146
93320
|
children: [
|
|
93147
93321
|
XY,
|
|
93148
93322
|
ZY,
|
|
93149
93323
|
QY
|
|
93150
93324
|
]
|
|
93151
|
-
}), r[
|
|
93325
|
+
}), r[42] = XY, r[43] = ZY, r[44] = QY, r[45] = WY, r[46] = $Y) : $Y = r[46];
|
|
93152
93326
|
let eX;
|
|
93153
|
-
return r[
|
|
93327
|
+
return r[47] !== O || r[48] !== G || r[49] !== c || r[50] !== $Y || r[51] !== BY || r[52] !== HY ? (eX = (0, import_jsx_runtime.jsx)(Labeled, {
|
|
93154
93328
|
label: c,
|
|
93155
93329
|
id: G,
|
|
93156
93330
|
align: BY,
|
|
93157
93331
|
fullWidth: O,
|
|
93158
93332
|
className: HY,
|
|
93159
93333
|
children: $Y
|
|
93160
|
-
}), r[
|
|
93334
|
+
}), r[47] = O, r[48] = G, r[49] = c, r[50] = $Y, r[51] = BY, r[52] = HY, r[53] = eX) : eX = r[53], eX;
|
|
93161
93335
|
}, import_compiler_runtime$25 = require_compiler_runtime(), SwitchPlugin = class {
|
|
93162
93336
|
constructor() {
|
|
93163
93337
|
__publicField(this, "tagName", "marimo-switch");
|
|
@@ -101015,7 +101189,10 @@ ${c}
|
|
|
101015
101189
|
let IY = AppConfigSchema.safeParse(M);
|
|
101016
101190
|
if (IY.success ? v(IY.data) : Logger.error("Failed to parse app config", IY.error), y(I), z) return;
|
|
101017
101191
|
if (E) {
|
|
101018
|
-
for (let [e2, r2] of Objects.entries(O || {}))
|
|
101192
|
+
for (let [e2, r2] of Objects.entries(O || {})) {
|
|
101193
|
+
let c2 = e2;
|
|
101194
|
+
UI_ELEMENT_REGISTRY.set(c2, r2);
|
|
101195
|
+
}
|
|
101019
101196
|
return;
|
|
101020
101197
|
}
|
|
101021
101198
|
let { objectIds: LY, values: RY } = collectUIElementValues(), zY = G ? Object.fromEntries(c.map((e2) => [
|