@mechane-ai/elements 0.46.0 → 0.47.0
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/README.md +306 -33
- package/dist/ai.js +4 -4
- package/dist/catalog.json +2382 -33
- package/dist/categorical-values-DdfGIowV.js +107 -0
- package/dist/cells--Bd1fQFR.js +384 -0
- package/dist/chart-link-AE_xuxiP.js +35 -0
- package/dist/chart-tones-ei3BC2AL.js +27 -0
- package/dist/charts/cartesian.js +1 -2958
- package/dist/charts/cells.js +1 -0
- package/dist/charts/comparison.js +1 -0
- package/dist/charts/distribution.js +1 -781
- package/dist/charts/figure.js +3404 -0
- package/dist/charts/graph.js +1 -655
- package/dist/charts/hierarchy.js +1 -121
- package/dist/charts/image.js +1 -0
- package/dist/charts/matrix.js +3 -644
- package/dist/charts/plot.js +15 -0
- package/dist/charts/relationship.js +1 -0
- package/dist/charts/text.js +1 -0
- package/dist/charts/timeline.js +1 -266
- package/dist/charts/transforms.js +677 -0
- package/dist/charts/trend.js +1 -0
- package/dist/charts.js +8 -3
- package/dist/collections.js +1 -2195
- package/dist/color-legend-CIo7DhXB.js +62 -0
- package/dist/dates-Cww8UR_n.js +810 -0
- package/dist/dumbbell-plot-B2ZTgQaI.js +508 -0
- package/dist/embedding-map-CGM_k6lC.js +1929 -0
- package/dist/feedback.js +1 -1
- package/dist/figure-format-B8kRZMlo.js +36 -0
- package/dist/figure-frame-wRkIEAwe.js +270 -0
- package/dist/forms/dates.js +1 -810
- package/dist/heatmap-scale-Zte6Ya-g.js +20 -0
- package/dist/image-grid-CVA4SOy_.js +598 -0
- package/dist/kits/evaluation.js +431 -0
- package/dist/kits/explainers.js +452 -0
- package/dist/kits/interpretability.js +1033 -0
- package/dist/kits/operations.js +239 -0
- package/dist/kits/training.js +335 -0
- package/dist/label-place-Z0fryBZb.js +42 -0
- package/dist/locate-Bcg3QcP4.js +11 -0
- package/dist/packages/charts/src/cartesian/bar-chart.d.ts +40 -21
- package/dist/packages/charts/src/cartesian/bar-data.d.ts +15 -4
- package/dist/packages/charts/src/cartesian/bar-overlays.d.ts +7 -3
- package/dist/packages/charts/src/cartesian/breakdown-bar.d.ts +10 -8
- package/dist/packages/charts/src/cartesian/bridge-chart.d.ts +20 -16
- package/dist/packages/charts/src/cartesian/bridge-data.d.ts +5 -4
- package/dist/packages/charts/src/cartesian/composition-bars.d.ts +8 -4
- package/dist/packages/charts/src/cartesian/index.d.ts +5 -5
- package/dist/packages/charts/src/cartesian/reference-lines.d.ts +25 -18
- package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +30 -25
- package/dist/packages/charts/src/cartesian/sparkline.d.ts +14 -2
- package/dist/packages/charts/src/cartesian/time-series-bands.d.ts +3 -2
- package/dist/packages/charts/src/cartesian/time-series-data.d.ts +12 -2
- package/dist/packages/charts/src/cartesian/time-series-line.d.ts +2 -2
- package/dist/packages/charts/src/cartesian/time-series-overlays.d.ts +6 -4
- package/dist/packages/charts/src/cartesian/time-series.d.ts +60 -36
- package/dist/packages/charts/src/cartesian/value-labels.d.ts +22 -0
- package/dist/packages/charts/src/categorical-values.d.ts +1 -1
- package/dist/packages/charts/src/cells/bar-cell.d.ts +13 -0
- package/dist/packages/charts/src/cells/cell-layout.d.ts +81 -0
- package/dist/packages/charts/src/cells/change-cell.d.ts +17 -0
- package/dist/packages/charts/src/cells/heat-cell.d.ts +19 -0
- package/dist/packages/charts/src/cells/index.d.ts +11 -0
- package/dist/packages/charts/src/cells/interval-cell.d.ts +16 -0
- package/dist/packages/charts/src/cells/spark-cell.d.ts +22 -0
- package/dist/packages/charts/src/chart-frame.d.ts +14 -7
- package/dist/packages/charts/src/chart-grid.d.ts +19 -0
- package/dist/packages/charts/src/chart-input.d.ts +1 -9
- package/dist/packages/charts/src/chart-link.d.ts +56 -0
- package/dist/packages/charts/src/chart.d.ts +0 -8
- package/dist/packages/charts/src/comparison/bullet-bar.d.ts +34 -0
- package/dist/packages/charts/src/comparison/comparison-plot.d.ts +54 -0
- package/dist/packages/charts/src/comparison/dot-plot.d.ts +41 -0
- package/dist/packages/charts/src/comparison/dumbbell-plot.d.ts +33 -0
- package/dist/packages/charts/src/comparison/index.d.ts +6 -0
- package/dist/packages/charts/src/distribution/box-plot.d.ts +40 -0
- package/dist/packages/charts/src/distribution/distribution-input.d.ts +5 -3
- package/dist/packages/charts/src/distribution/distribution-plot.d.ts +28 -161
- package/dist/packages/charts/src/distribution/ecdf.d.ts +16 -15
- package/dist/packages/charts/src/distribution/group-plot-input.d.ts +35 -0
- package/dist/packages/charts/src/distribution/group-plot-layout.d.ts +79 -0
- package/dist/packages/charts/src/distribution/group-plot.d.ts +73 -0
- package/dist/packages/charts/src/distribution/histogram.d.ts +16 -16
- package/dist/packages/charts/src/distribution/index.d.ts +11 -0
- package/dist/packages/charts/src/distribution/interval-plot.d.ts +16 -13
- package/dist/packages/charts/src/distribution/ranked-bars.d.ts +17 -14
- package/dist/packages/charts/src/distribution/ridgeline.d.ts +34 -0
- package/dist/packages/charts/src/distribution/strip-plot.d.ts +37 -0
- package/dist/packages/charts/src/distribution/violin-plot.d.ts +34 -0
- package/dist/packages/charts/src/figure/figure-format.d.ts +34 -0
- package/dist/packages/charts/src/figure/figure-frame.d.ts +47 -0
- package/dist/packages/charts/src/figure/figure-props.d.ts +54 -0
- package/dist/packages/charts/src/figure/tone-scope.d.ts +32 -0
- package/dist/packages/charts/src/graph/attribution-graph.d.ts +62 -0
- package/dist/packages/charts/src/graph/attribution-layout.d.ts +88 -0
- package/dist/packages/charts/src/graph/flow-diagram.d.ts +14 -15
- package/dist/packages/charts/src/graph/flow-layout.d.ts +4 -2
- package/dist/packages/charts/src/graph/graph-canvas.d.ts +33 -0
- package/dist/packages/charts/src/graph/index.d.ts +6 -2
- package/dist/packages/charts/src/graph/relation-graph.d.ts +24 -13
- package/dist/packages/charts/src/graph/tree-diagram.d.ts +41 -0
- package/dist/packages/charts/src/graph/tree-layout.d.ts +71 -0
- package/dist/packages/charts/src/hierarchy/area-mark.d.ts +17 -0
- package/dist/packages/charts/src/hierarchy/icicle.d.ts +35 -0
- package/dist/packages/charts/src/hierarchy/index.d.ts +2 -0
- package/dist/packages/charts/src/hierarchy/partition-layout.d.ts +25 -0
- package/dist/packages/charts/src/hierarchy/treemap-layout.d.ts +26 -0
- package/dist/packages/charts/src/hierarchy/treemap.d.ts +11 -9
- package/dist/packages/charts/src/image/attribution-legend.d.ts +13 -0
- package/dist/packages/charts/src/image/attribution-overlay.d.ts +50 -0
- package/dist/packages/charts/src/image/attribution-ramp.d.ts +16 -0
- package/dist/packages/charts/src/image/image-atlas.d.ts +37 -0
- package/dist/packages/charts/src/image/image-fill.d.ts +9 -0
- package/dist/packages/charts/src/image/image-grid.d.ts +26 -0
- package/dist/packages/charts/src/image/image-input.d.ts +27 -0
- package/dist/packages/charts/src/image/image-tile.d.ts +27 -0
- package/dist/packages/charts/src/image/index.d.ts +7 -0
- package/dist/packages/charts/src/index.d.ts +15 -1
- package/dist/packages/charts/src/matrix/attention-matrix.d.ts +41 -0
- package/dist/packages/charts/src/matrix/calendar-heatmap.d.ts +37 -0
- package/dist/packages/charts/src/matrix/color-legend.d.ts +9 -2
- package/dist/packages/charts/src/matrix/confusion-matrix.d.ts +36 -0
- package/dist/packages/charts/src/matrix/correlation-matrix.d.ts +34 -0
- package/dist/packages/charts/src/matrix/heatmap-scale.d.ts +8 -2
- package/dist/packages/charts/src/matrix/index.d.ts +14 -3
- package/dist/packages/charts/src/matrix/matrix-cells.d.ts +27 -3
- package/dist/packages/charts/src/matrix/matrix-figure.d.ts +50 -0
- package/dist/packages/charts/src/matrix/matrix-mark.d.ts +34 -0
- package/dist/packages/charts/src/matrix/matrix-presets.d.ts +20 -0
- package/dist/packages/charts/src/matrix/matrix-range.d.ts +45 -0
- package/dist/packages/charts/src/matrix/matrix-strip.d.ts +13 -14
- package/dist/packages/charts/src/matrix/matrix-types.d.ts +40 -0
- package/dist/packages/charts/src/matrix/matrix.d.ts +13 -11
- package/dist/packages/charts/src/matrix/token-heatmap.d.ts +16 -10
- package/dist/packages/charts/src/plot/contours.d.ts +45 -0
- package/dist/packages/charts/src/plot/index.d.ts +49 -0
- package/dist/packages/charts/src/plot/label-place.d.ts +35 -0
- package/dist/packages/charts/src/plot/locate.d.ts +18 -0
- package/dist/packages/charts/src/plot/path.d.ts +39 -0
- package/dist/packages/charts/src/plot/plot-axes.d.ts +20 -0
- package/dist/packages/charts/src/plot/plot-layout.d.ts +221 -0
- package/dist/packages/charts/src/plot/plot-marks.d.ts +124 -0
- package/dist/packages/charts/src/plot/plot-surface.d.ts +32 -0
- package/dist/packages/charts/src/plot/render/density-layer.d.ts +17 -0
- package/dist/packages/charts/src/plot/render/hit-index.d.ts +37 -0
- package/dist/packages/charts/src/plot/render/plot-viewport.d.ts +39 -0
- package/dist/packages/charts/src/plot/render/point-layer.d.ts +41 -0
- package/dist/packages/charts/src/plot/render/theme-colors.d.ts +15 -0
- package/dist/packages/charts/src/plot/scale.d.ts +48 -0
- package/dist/packages/charts/src/plot/ticks.d.ts +34 -0
- package/dist/packages/charts/src/plot-width.d.ts +3 -2
- package/dist/packages/charts/src/relationship/contour-plot.d.ts +61 -0
- package/dist/packages/charts/src/relationship/density-map.d.ts +45 -0
- package/dist/packages/charts/src/relationship/embedding-map.d.ts +75 -0
- package/dist/packages/charts/src/relationship/index.d.ts +11 -0
- package/dist/packages/charts/src/relationship/level-legend.d.ts +11 -0
- package/dist/packages/charts/src/relationship/measures.d.ts +85 -0
- package/dist/packages/charts/src/relationship/parallel-coordinates.d.ts +30 -0
- package/dist/packages/charts/src/relationship/range-controls.d.ts +20 -0
- package/dist/packages/charts/src/relationship/scatter-matrix.d.ts +20 -0
- package/dist/packages/charts/src/spec/chart-guide.d.ts +21 -0
- package/dist/packages/charts/src/spec/figure-registry.d.ts +44 -0
- package/dist/packages/charts/src/spec/figure-spec.d.ts +147 -0
- package/dist/packages/charts/src/spec/figure-text.d.ts +8 -0
- package/dist/packages/charts/src/spec/figure.d.ts +12 -0
- package/dist/packages/charts/src/spec/guide-data.d.ts +85 -0
- package/dist/packages/charts/src/spec/index.d.ts +10 -0
- package/dist/packages/charts/src/spec/validate-figure.d.ts +15 -0
- package/dist/packages/charts/src/text/index.d.ts +11 -0
- package/dist/packages/charts/src/text/token-examples.d.ts +42 -0
- package/dist/packages/charts/src/text/token-grid.d.ts +47 -0
- package/dist/packages/charts/src/text/token-links.d.ts +49 -0
- package/dist/packages/charts/src/text/token-predictions.d.ts +38 -0
- package/dist/packages/charts/src/text/token-scale.d.ts +20 -0
- package/dist/packages/charts/src/text/token-text.d.ts +39 -0
- package/dist/packages/charts/src/timeline/event-strip.d.ts +70 -0
- package/dist/packages/charts/src/timeline/index.d.ts +3 -1
- package/dist/packages/charts/src/timeline/waterfall.d.ts +24 -13
- package/dist/packages/charts/src/transforms/bins.d.ts +91 -0
- package/dist/packages/charts/src/transforms/density.d.ts +53 -0
- package/dist/packages/charts/src/transforms/fits.d.ts +50 -0
- package/dist/packages/charts/src/transforms/index.d.ts +19 -0
- package/dist/packages/charts/src/transforms/matrices.d.ts +49 -0
- package/dist/packages/charts/src/transforms/quantiles.d.ts +96 -0
- package/dist/packages/charts/src/transforms/ranks.d.ts +44 -0
- package/dist/packages/charts/src/transforms/runs.d.ts +47 -0
- package/dist/packages/charts/src/transforms/sampling.d.ts +75 -0
- package/dist/packages/charts/src/transforms/smoothing.d.ts +41 -0
- package/dist/packages/charts/src/transforms/values.d.ts +70 -0
- package/dist/packages/charts/src/trend/bump-chart.d.ts +33 -0
- package/dist/packages/charts/src/trend/column-figure.d.ts +38 -0
- package/dist/packages/charts/src/trend/column-positions.d.ts +21 -0
- package/dist/packages/charts/src/trend/curve-chart.d.ts +69 -0
- package/dist/packages/charts/src/trend/end-labels.d.ts +40 -0
- package/dist/packages/charts/src/trend/horizon-chart.d.ts +37 -0
- package/dist/packages/charts/src/trend/index.d.ts +10 -0
- package/dist/packages/charts/src/trend/line-locate.d.ts +21 -0
- package/dist/packages/charts/src/trend/runs-chart.d.ts +50 -0
- package/dist/packages/charts/src/trend/slope-chart.d.ts +35 -0
- package/dist/packages/kits/src/evaluation/evaluation-data.d.ts +31 -0
- package/dist/packages/kits/src/evaluation/index.d.ts +8 -0
- package/dist/packages/kits/src/evaluation/leaderboard-cells.d.ts +62 -0
- package/dist/packages/kits/src/evaluation/leaderboard.d.ts +59 -0
- package/dist/packages/kits/src/evaluation/model-comparison.d.ts +59 -0
- package/dist/packages/kits/src/evaluation/score-breakdown.d.ts +33 -0
- package/dist/packages/kits/src/explainers/bound-value.d.ts +29 -0
- package/dist/packages/kits/src/explainers/figures.d.ts +31 -0
- package/dist/packages/kits/src/explainers/index.d.ts +8 -0
- package/dist/packages/kits/src/explainers/linked-target.d.ts +22 -0
- package/dist/packages/kits/src/explainers/story-steps.d.ts +46 -0
- package/dist/packages/kits/src/explainers/term.d.ts +29 -0
- package/dist/packages/kits/src/interpretability/attention-head-grid.d.ts +56 -0
- package/dist/packages/kits/src/interpretability/attribution-workbench.d.ts +29 -0
- package/dist/packages/kits/src/interpretability/embedding-atlas.d.ts +41 -0
- package/dist/packages/kits/src/interpretability/feature-card.d.ts +33 -0
- package/dist/packages/kits/src/interpretability/feature-list.d.ts +51 -0
- package/dist/packages/kits/src/interpretability/feature-logits.d.ts +23 -0
- package/dist/packages/kits/src/interpretability/features.d.ts +70 -0
- package/dist/packages/kits/src/interpretability/index.d.ts +16 -0
- package/dist/packages/kits/src/interpretability/kit-styles.d.ts +118 -0
- package/dist/packages/kits/src/interpretability/logit-lens.d.ts +50 -0
- package/dist/packages/kits/src/interpretability/node-panel.d.ts +32 -0
- package/dist/packages/kits/src/interpretability/shared-link.d.ts +8 -0
- package/dist/packages/kits/src/interpretability/steering-panel.d.ts +52 -0
- package/dist/packages/kits/src/operations/budget-board.d.ts +49 -0
- package/dist/packages/kits/src/operations/incident-timeline.d.ts +30 -0
- package/dist/packages/kits/src/operations/index.d.ts +6 -0
- package/dist/packages/kits/src/operations/service-health.d.ts +66 -0
- package/dist/packages/kits/src/training/index.d.ts +8 -0
- package/dist/packages/kits/src/training/run-dashboard.d.ts +49 -0
- package/dist/packages/kits/src/training/run-legend.d.ts +21 -0
- package/dist/packages/kits/src/training/run-marker.d.ts +5 -0
- package/dist/packages/kits/src/training/run-state.d.ts +7 -0
- package/dist/packages/kits/src/training/run-table.d.ts +63 -0
- package/dist/packages/kits/src/training/runs-overview.d.ts +20 -0
- package/dist/packages/kits/src/training/runs.d.ts +34 -0
- package/dist/path-BglsXpnO.js +59 -0
- package/dist/plot-axes-DJkLW4wk.js +100 -0
- package/dist/plot-layout-BEuoOHbs.js +911 -0
- package/dist/plot-marks-A64v7aTw.js +226 -0
- package/dist/plot-surface-CJTIqtck.js +51 -0
- package/dist/plot-width-DcqtSgzb.js +124 -0
- package/dist/point-layer-C-EYETAt.js +655 -0
- package/dist/reference-lines-CWA8VeUR.js +82 -0
- package/dist/scale-C2xgZyZN.js +63 -0
- package/dist/slope-chart-DT22h_ym.js +1279 -0
- package/dist/{src-DVHlknB6.js → src-CExIrXPC.js} +169 -193
- package/dist/src-D5NXRJZe.js +2195 -0
- package/dist/src-DIS0YOj0.js +44 -0
- package/dist/styles2.css +453 -62
- package/dist/time-series-IB3CB93O.js +2668 -0
- package/dist/token-heatmap-C00DnoNO.js +1354 -0
- package/dist/token-predictions-Cxx29iDr.js +1093 -0
- package/dist/tone-scope-DKiSw-JR.js +32 -0
- package/dist/tree-diagram-DsckNKaW.js +1629 -0
- package/dist/treemap-9_DpLCW9.js +472 -0
- package/dist/values-963L6n1m.js +65 -0
- package/dist/violin-plot-BhPHKXsN.js +1291 -0
- package/dist/waterfall-CGksuTy5.js +576 -0
- package/package.json +57 -4
- package/recipes/allocation-report.tsx +15 -7
- package/skills/extend-elements/SKILL.md +60 -0
- package/skills/review-elements/SKILL.md +43 -1
- package/skills/upgrade-elements/SKILL.md +3 -1
- package/skills/upgrade-elements/references/releases.md +184 -0
- package/skills/use-elements/SKILL.md +19 -13
- package/skills/use-elements/references/charts.md +362 -41
- package/skills/use-elements/references/figures.md +173 -0
- package/skills/use-elements/references/kits.md +198 -0
- package/dist/categorical-values-BXi-rJuv.js +0 -74
- package/dist/chart-data-CIJVWCYt.js +0 -21
- package/dist/chart-frame-BaxKn_MB.js +0 -236
- package/dist/chart-input-Bm82_9Rd.js +0 -22
- package/dist/chart-theme-4zprJ3rW.js +0 -404
- package/dist/plot-width-v2c_rA20.js +0 -63
|
@@ -0,0 +1,2195 @@
|
|
|
1
|
+
import { D as e, T as t, c as n, i as r, m as i, u as a, v as o } from "./src-CpdJlDhO.js";
|
|
2
|
+
import { r as s } from "./src-1EHkSFS-.js";
|
|
3
|
+
import { i as c, r as l, t as u } from "./src-na2DdkKI.js";
|
|
4
|
+
import { d } from "./src-CExIrXPC.js";
|
|
5
|
+
import { l as f, t as ee } from "./constants.stylex-CqhVl0uU.js";
|
|
6
|
+
import { t as te } from "./accessibility-P89UG9-r.js";
|
|
7
|
+
import { t as ne } from "./use-scroll-tab-index-Dxpdh4W7.js";
|
|
8
|
+
import { n as p } from "./forms-CEbwzlRR.js";
|
|
9
|
+
import * as m from "@stylexjs/stylex";
|
|
10
|
+
import { Button as h } from "@ui-sdk/react/button";
|
|
11
|
+
import { createParts as g, mergeProps as _, usePart as v, usePrimitive as y } from "@ui-sdk/react/primitive";
|
|
12
|
+
import { Children as b, Fragment as re, createContext as x, useContext as S, useEffect as C, useId as w, useLayoutEffect as T, useMemo as E, useRef as D, useState as O, useSyncExternalStore as ie } from "react";
|
|
13
|
+
import { byCell as k, createChange as A, createGridFocus as ae, createSelection as j, createVirtualizer as oe, definePrimitive as se, dispatch as M, selects as ce } from "@ui-sdk/core";
|
|
14
|
+
import { Fragment as le, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
15
|
+
import { ArrowDown as ue, ArrowUp as de, ArrowUpDown as fe, ChevronLeft as pe, ChevronRight as F, CircleDashed as me, ListFilter as I, Search as he, Settings2 as ge, X as L } from "lucide-react";
|
|
16
|
+
import { useShortcut as R } from "@ui-sdk/react/shortcuts";
|
|
17
|
+
import { Toolbar as _e, ToolbarButton as z, ToolbarGroup as ve, ToolbarInput as B } from "@ui-sdk/react/toolbar";
|
|
18
|
+
import { createColumnHelper as ye, tableFeatures as be, useTable as xe } from "@tanstack/react-table";
|
|
19
|
+
import { Timeline as Se, TimelineDescription as Ce, TimelineItem as we, TimelineMarker as Te, TimelineTime as V, TimelineTitle as Ee } from "@ui-sdk/react/timeline";
|
|
20
|
+
// packages/collections/src/control-toolbar.tsx
|
|
21
|
+
var H = x(!1);
|
|
22
|
+
function U(e) {
|
|
23
|
+
return S(H) ? /* @__PURE__ */ N(ve, { ...e }) : /* @__PURE__ */ N(H, {
|
|
24
|
+
value: !0,
|
|
25
|
+
children: /* @__PURE__ */ N(_e, { ...e })
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function De(e) {
|
|
29
|
+
return S(H) ? /* @__PURE__ */ N(z, { render: e }) : e;
|
|
30
|
+
}
|
|
31
|
+
// packages/collections/src/collection-controls.tsx
|
|
32
|
+
var W = {
|
|
33
|
+
toolbar: {
|
|
34
|
+
kOIVth: "x1hnptsi",
|
|
35
|
+
kMwMTN: "xbixft",
|
|
36
|
+
kMv6JI: "x1hz01jw",
|
|
37
|
+
kGuDYH: "xtqrqnz",
|
|
38
|
+
kLWn49: "x1778rvt",
|
|
39
|
+
kbsrmU: "xjl7jj",
|
|
40
|
+
$$css: !0
|
|
41
|
+
},
|
|
42
|
+
remove: {
|
|
43
|
+
kmuXW: "x2lah0s",
|
|
44
|
+
$$css: !0
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
function G({ label: e, children: t, actions: n }) {
|
|
48
|
+
let r = b.toArray(t).length > 0, i = b.toArray(n).length > 0;
|
|
49
|
+
return !r && !i ? null : /* @__PURE__ */ P(U, {
|
|
50
|
+
"aria-label": e,
|
|
51
|
+
...m.props(a.row, a.blockEnd, W.toolbar),
|
|
52
|
+
children: [t, i && /* @__PURE__ */ N("div", {
|
|
53
|
+
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
|
|
54
|
+
children: n
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function K({ filters: t, onRemove: n, label: r = "Applied filters" }) {
|
|
59
|
+
return t.length === 0 ? null : /* @__PURE__ */ N(U, {
|
|
60
|
+
"aria-label": r,
|
|
61
|
+
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli",
|
|
62
|
+
children: t.map((t) => /* @__PURE__ */ P("span", {
|
|
63
|
+
className: "x1n2onr6 x9f619 x3nfvp2 x6s0dn4 xunmzkg x1f9pz31 x992rv9 xyibt8p x1ok0vyi xeuugli x193iq5w xpvm0e4 xbixft x1hz01jw xtqrqnz x1778rvt x1s928wv x1j6awrg xarstr8 x5hscyn x86avzo x10z0kkz x1k48kgn x2q1x1w",
|
|
64
|
+
children: [/* @__PURE__ */ N("span", {
|
|
65
|
+
title: t.label,
|
|
66
|
+
className: "xeuugli xb3r6kr xlyipyv xuxw1ft",
|
|
67
|
+
children: t.label
|
|
68
|
+
}), /* @__PURE__ */ N(z, {
|
|
69
|
+
render: /* @__PURE__ */ N(e, {
|
|
70
|
+
"aria-label": `Remove ${t.label}`,
|
|
71
|
+
variant: "ghost",
|
|
72
|
+
xstyle: W.remove
|
|
73
|
+
}),
|
|
74
|
+
onClick: (e) => {
|
|
75
|
+
M({ options: () => ({ onRemove: n }) }, "onRemove", t.id, {
|
|
76
|
+
reason: "remove-press",
|
|
77
|
+
event: e.nativeEvent
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
children: /* @__PURE__ */ N(L, {
|
|
81
|
+
size: 14,
|
|
82
|
+
"aria-hidden": "true"
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
}, t.id))
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function Oe({ options: n, onChange: r, onReset: i, label: a = "Display options" }) {
|
|
89
|
+
let o = De(/* @__PURE__ */ N(e, {
|
|
90
|
+
"aria-label": a,
|
|
91
|
+
title: a
|
|
92
|
+
}));
|
|
93
|
+
return /* @__PURE__ */ P(l.Root, { children: [/* @__PURE__ */ N(l.Trigger, {
|
|
94
|
+
render: o,
|
|
95
|
+
children: /* @__PURE__ */ N(ge, {
|
|
96
|
+
size: 14,
|
|
97
|
+
"aria-hidden": "true"
|
|
98
|
+
})
|
|
99
|
+
}), /* @__PURE__ */ P(l.Popup, {
|
|
100
|
+
align: "end",
|
|
101
|
+
children: [/* @__PURE__ */ N(l.Title, { children: "Display" }), /* @__PURE__ */ P("div", {
|
|
102
|
+
className: "xrvj5dj x1n8ia3y xfb3i0g",
|
|
103
|
+
children: [n.map((e) => /* @__PURE__ */ P("label", {
|
|
104
|
+
className: "x78zum5 x6s0dn4 x1hnptsi xbixft xtqrqnz x1hz01jw x1778rvt xeuugli xj0a0fe",
|
|
105
|
+
children: [/* @__PURE__ */ N(s.Root, {
|
|
106
|
+
checked: e.isChecked,
|
|
107
|
+
onCheckedChange: (t) => r(e.id, t),
|
|
108
|
+
disabled: e.isRequired === !0,
|
|
109
|
+
children: /* @__PURE__ */ N(s.Indicator, {})
|
|
110
|
+
}), e.label]
|
|
111
|
+
}, e.id)), i !== void 0 && /* @__PURE__ */ N(t, {
|
|
112
|
+
type: "button",
|
|
113
|
+
variant: "ghost",
|
|
114
|
+
onClick: i,
|
|
115
|
+
children: "Reset defaults"
|
|
116
|
+
})]
|
|
117
|
+
})]
|
|
118
|
+
})] });
|
|
119
|
+
}
|
|
120
|
+
function ke({ label: e, description: r, previous: i, next: a }) {
|
|
121
|
+
return /* @__PURE__ */ P("nav", {
|
|
122
|
+
"aria-label": e === void 0 ? "Pagination" : `${e} pagination`,
|
|
123
|
+
className: "x78zum5 x6s0dn4 x1qughib x1a02dak xaml1ju xeuugli",
|
|
124
|
+
children: [/* @__PURE__ */ N(n, { children: r }), /* @__PURE__ */ P("div", {
|
|
125
|
+
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli xvc5jky",
|
|
126
|
+
children: [/* @__PURE__ */ P(t, {
|
|
127
|
+
variant: "outline",
|
|
128
|
+
"aria-label": e === void 0 ? void 0 : `Previous page of ${e}`,
|
|
129
|
+
disabled: i.disabled,
|
|
130
|
+
onClick: i.onClick,
|
|
131
|
+
children: [/* @__PURE__ */ N(pe, {
|
|
132
|
+
size: 16,
|
|
133
|
+
"aria-hidden": "true"
|
|
134
|
+
}), "Previous"]
|
|
135
|
+
}), /* @__PURE__ */ P(t, {
|
|
136
|
+
variant: "outline",
|
|
137
|
+
"aria-label": e === void 0 ? void 0 : `Next page of ${e}`,
|
|
138
|
+
disabled: a.disabled,
|
|
139
|
+
onClick: a.onClick,
|
|
140
|
+
children: ["Next", /* @__PURE__ */ N(F, {
|
|
141
|
+
size: 16,
|
|
142
|
+
"aria-hidden": "true"
|
|
143
|
+
})]
|
|
144
|
+
})]
|
|
145
|
+
})]
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
// packages/collections/src/data-table-styles.ts
|
|
149
|
+
var Ae = {
|
|
150
|
+
kmVPX3: "x1717udv",
|
|
151
|
+
kMzoRj: "xc342km",
|
|
152
|
+
$$css: !0
|
|
153
|
+
}, je = {
|
|
154
|
+
kVAEAm: "x10l6tqk",
|
|
155
|
+
k87sOh: "x13vifvy",
|
|
156
|
+
kLqNvP: "x1o0tod",
|
|
157
|
+
kzqmXN: "x1i1rx1s",
|
|
158
|
+
k33iCy: "xlshs6z",
|
|
159
|
+
kfzvcC: "x47corl",
|
|
160
|
+
$$css: !0
|
|
161
|
+
}, q = {
|
|
162
|
+
frame: {
|
|
163
|
+
k7Eaqz: "xeuugli",
|
|
164
|
+
kMv6JI: "x1hz01jw",
|
|
165
|
+
kGuDYH: "xtqrqnz",
|
|
166
|
+
kLWn49: "x1778rvt",
|
|
167
|
+
k63SB2: "xj57cvi",
|
|
168
|
+
kMwMTN: "xbixft",
|
|
169
|
+
khiITx: "xvmahel",
|
|
170
|
+
$$css: !0
|
|
171
|
+
},
|
|
172
|
+
content: { $$css: !0 },
|
|
173
|
+
placeholder: {
|
|
174
|
+
kfzvcC: "x47corl",
|
|
175
|
+
$$css: !0
|
|
176
|
+
},
|
|
177
|
+
fillFrame: {
|
|
178
|
+
k1xSpc: "x78zum5",
|
|
179
|
+
kXwgrk: "xdt5ytf",
|
|
180
|
+
kUk6DE: "x98rzlu",
|
|
181
|
+
kAzted: "x2lwn1j",
|
|
182
|
+
$$css: !0
|
|
183
|
+
},
|
|
184
|
+
viewport: {
|
|
185
|
+
kVAEAm: "x1n2onr6",
|
|
186
|
+
k7Eaqz: "xeuugli",
|
|
187
|
+
k9g6sI: "x12h1iku",
|
|
188
|
+
kVQacm: "xysyzu8",
|
|
189
|
+
kacamN: "xy5w88m",
|
|
190
|
+
k3XXqK: "x1t137rt",
|
|
191
|
+
kPJHz1: "x13qnu6",
|
|
192
|
+
k7shQP: "x9v5kkp",
|
|
193
|
+
kZs9gx: "x19rmrnh",
|
|
194
|
+
kiEn40: "x1bqaal",
|
|
195
|
+
$$css: !0
|
|
196
|
+
},
|
|
197
|
+
fillViewport: {
|
|
198
|
+
kUk6DE: "x98rzlu",
|
|
199
|
+
kAzted: "x2lwn1j",
|
|
200
|
+
$$css: !0
|
|
201
|
+
},
|
|
202
|
+
virtual: (e) => [{
|
|
203
|
+
kskxy: e == null ? e : "x1jols5v",
|
|
204
|
+
$$css: !0
|
|
205
|
+
}, { "--x-maxHeight": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }],
|
|
206
|
+
table: {
|
|
207
|
+
kzqmXN: "xh8yej3",
|
|
208
|
+
kLvRdT: "x1mwwwfo",
|
|
209
|
+
kcqcaj: "xss6m8b",
|
|
210
|
+
k9WMMc: "xdpxx8g",
|
|
211
|
+
kMwMTN: "xbixft",
|
|
212
|
+
kWkggS: "xpvm0e4",
|
|
213
|
+
$$css: !0
|
|
214
|
+
},
|
|
215
|
+
fixed: {
|
|
216
|
+
kPzzVL: "x140o2bo",
|
|
217
|
+
$$css: !0
|
|
218
|
+
},
|
|
219
|
+
minimumWidth: (e, t) => [{
|
|
220
|
+
k7Eaqz: (e == null ? e : "x7w7ha4 ") + (t == null ? t : "x18ie477"),
|
|
221
|
+
$$css: !0
|
|
222
|
+
}, {
|
|
223
|
+
"--x-1utbgw4": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
|
|
224
|
+
"--x-1wqfzdf": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
|
|
225
|
+
}],
|
|
226
|
+
caption: {
|
|
227
|
+
k9WMMc: "xdpxx8g",
|
|
228
|
+
kmVPX3: "xg7ukam",
|
|
229
|
+
kMwMTN: "x153jb6y",
|
|
230
|
+
kGuDYH: "xy8obcc",
|
|
231
|
+
kLWn49: "xas2l8k",
|
|
232
|
+
$$css: !0
|
|
233
|
+
},
|
|
234
|
+
header: {
|
|
235
|
+
kB7OPa: "x9f619",
|
|
236
|
+
kVAEAm: "x7wzq59",
|
|
237
|
+
k87sOh: "x13vifvy",
|
|
238
|
+
kY2c9j: "x11ru5tl",
|
|
239
|
+
kZKoxP: "x1krvmzm",
|
|
240
|
+
k8WAf4: "xt970qd",
|
|
241
|
+
kg3NbH: "x1dc62k6",
|
|
242
|
+
kt9PQ7: "xso031l",
|
|
243
|
+
kfdmCh: "x1q0q8m5",
|
|
244
|
+
kL6WhQ: "x1qndepd",
|
|
245
|
+
kMwMTN: "x153jb6y",
|
|
246
|
+
kWkggS: "xpvm0e4",
|
|
247
|
+
k63SB2: "xj57cvi",
|
|
248
|
+
kGuDYH: "xy8obcc",
|
|
249
|
+
kLWn49: "xas2l8k",
|
|
250
|
+
khDVqt: "xuxw1ft",
|
|
251
|
+
$$css: !0
|
|
252
|
+
},
|
|
253
|
+
headerLabel: {
|
|
254
|
+
k1xSpc: "x1lliihq",
|
|
255
|
+
k7Eaqz: "xeuugli",
|
|
256
|
+
kVQacm: "xb3r6kr",
|
|
257
|
+
kg5iWk: "xlyipyv",
|
|
258
|
+
khDVqt: "xuxw1ft",
|
|
259
|
+
$$css: !0
|
|
260
|
+
},
|
|
261
|
+
sort: {
|
|
262
|
+
k1xSpc: "x3nfvp2",
|
|
263
|
+
kGNEyG: "x6s0dn4",
|
|
264
|
+
kOIVth: "x1hnptsi",
|
|
265
|
+
ks0D6T: "x193iq5w",
|
|
266
|
+
k7Eaqz: "xeuugli",
|
|
267
|
+
kAzted: "x2zujid x17oiadl",
|
|
268
|
+
kmVPX3: "x1717udv",
|
|
269
|
+
kMzoRj: "xc342km",
|
|
270
|
+
kMwMTN: "x1heor9g",
|
|
271
|
+
kWkggS: "xjbqb8w",
|
|
272
|
+
kMv6JI: "xjb2p0i",
|
|
273
|
+
kGuDYH: "x1qlqyl8",
|
|
274
|
+
k63SB2: "x1pd3egz",
|
|
275
|
+
kLWn49: "x15bjb6t",
|
|
276
|
+
kkrTdU: "x1ypdohk",
|
|
277
|
+
kDPRdz: "xp9636p",
|
|
278
|
+
kSReZ0: "x1s9zmfe",
|
|
279
|
+
kPJHz1: "x13qnu6",
|
|
280
|
+
k7shQP: "x9v5kkp",
|
|
281
|
+
kZs9gx: "x19rmrnh",
|
|
282
|
+
kiEn40: "x7s97pk",
|
|
283
|
+
$$css: !0
|
|
284
|
+
},
|
|
285
|
+
sortIcon: {
|
|
286
|
+
kmuXW: "x2lah0s",
|
|
287
|
+
$$css: !0
|
|
288
|
+
},
|
|
289
|
+
row: {
|
|
290
|
+
kVAEAm: "x1n2onr6",
|
|
291
|
+
kHBbk8: "xc8icb0",
|
|
292
|
+
kZKoxP: "x1wtzb06",
|
|
293
|
+
kt9PQ7: "xso031l",
|
|
294
|
+
kfdmCh: "x1q0q8m5",
|
|
295
|
+
kL6WhQ: "x1qndepd",
|
|
296
|
+
ko0ZBZ: "x19k386i",
|
|
297
|
+
kx8K5S: "x1t1lzn6",
|
|
298
|
+
$$css: !0
|
|
299
|
+
},
|
|
300
|
+
selected: {
|
|
301
|
+
kWkggS: "x1r8u7ye",
|
|
302
|
+
$$css: !0
|
|
303
|
+
},
|
|
304
|
+
actionable: {
|
|
305
|
+
kkrTdU: "x1ypdohk",
|
|
306
|
+
kSReZ0: "x1ecmtor",
|
|
307
|
+
$$css: !0
|
|
308
|
+
},
|
|
309
|
+
trigger: {
|
|
310
|
+
kO7zv1: "x1rh3ycu",
|
|
311
|
+
kfSwDN: "x1hx0egp",
|
|
312
|
+
k1xSpc: "x78zum5",
|
|
313
|
+
kGNEyG: "x6s0dn4",
|
|
314
|
+
kzqmXN: "xh8yej3",
|
|
315
|
+
k7Eaqz: "xeuugli",
|
|
316
|
+
kAzted: "x17tes2r x17oiadl",
|
|
317
|
+
kmVPX3: "x1717udv",
|
|
318
|
+
kMzoRj: "xc342km",
|
|
319
|
+
kaIpWk: "x1ok0vyi",
|
|
320
|
+
kMwMTN: "x1heor9g",
|
|
321
|
+
kWkggS: "xjbqb8w",
|
|
322
|
+
kMv6JI: "xjb2p0i",
|
|
323
|
+
kGuDYH: "x1qlqyl8",
|
|
324
|
+
k63SB2: "x1pd3egz",
|
|
325
|
+
kLWn49: "x15bjb6t",
|
|
326
|
+
k9WMMc: "x16tdsg8",
|
|
327
|
+
kybGjl: "x1hl2dhg",
|
|
328
|
+
kkrTdU: "x1ypdohk",
|
|
329
|
+
k3XXqK: "x1t137rt",
|
|
330
|
+
k5JduY: "x1s928wv",
|
|
331
|
+
kwXMNM: "x1j6awrg",
|
|
332
|
+
kv0HGH: "xarstr8",
|
|
333
|
+
kIHVmn: "x11q50lq",
|
|
334
|
+
kEbOEz: "xa2q2qx",
|
|
335
|
+
kQSxdi: "x1x5eltu",
|
|
336
|
+
kUivIt: "x1jdy9wv",
|
|
337
|
+
kYPGJ8: "xtgyt42",
|
|
338
|
+
kWC4TW: "x19mxcj1",
|
|
339
|
+
$$css: !0
|
|
340
|
+
},
|
|
341
|
+
cell: {
|
|
342
|
+
kB7OPa: "x9f619",
|
|
343
|
+
k8WAf4: "xt970qd",
|
|
344
|
+
kg3NbH: "x1dc62k6",
|
|
345
|
+
kXLuUW: "xxymvpz",
|
|
346
|
+
kHjlTd: "xj0a0fe",
|
|
347
|
+
$$css: !0
|
|
348
|
+
},
|
|
349
|
+
start: {
|
|
350
|
+
k9WMMc: "x1yc453h",
|
|
351
|
+
$$css: !0
|
|
352
|
+
},
|
|
353
|
+
end: {
|
|
354
|
+
k9WMMc: "xp4054r",
|
|
355
|
+
$$css: !0
|
|
356
|
+
},
|
|
357
|
+
width: (e) => [{
|
|
358
|
+
kzqmXN: e == null ? e : "x5lhr3w",
|
|
359
|
+
k7Eaqz: e == null ? e : "xkj4a21",
|
|
360
|
+
$$css: !0
|
|
361
|
+
}, {
|
|
362
|
+
"--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
|
|
363
|
+
"--x-minWidth": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e)
|
|
364
|
+
}],
|
|
365
|
+
secondary: {
|
|
366
|
+
k1xSpc: "xqxxu6g",
|
|
367
|
+
$$css: !0
|
|
368
|
+
},
|
|
369
|
+
truncated: {
|
|
370
|
+
kVQacm: "xb3r6kr",
|
|
371
|
+
khDVqt: "xuxw1ft",
|
|
372
|
+
kg5iWk: "xlyipyv",
|
|
373
|
+
$$css: !0
|
|
374
|
+
},
|
|
375
|
+
cellContent: {
|
|
376
|
+
k1xSpc: "x1lliihq",
|
|
377
|
+
k7Eaqz: "xeuugli",
|
|
378
|
+
kzqmXN: "xh8yej3",
|
|
379
|
+
ks0D6T: "x193iq5w",
|
|
380
|
+
k8hWNX: "xkfz77",
|
|
381
|
+
kDUsi3: "x1ljc890",
|
|
382
|
+
$$css: !0
|
|
383
|
+
},
|
|
384
|
+
rowControl: {
|
|
385
|
+
kVAEAm: "x1n2onr6",
|
|
386
|
+
kY2c9j: "x1vjfegm",
|
|
387
|
+
$$css: !0
|
|
388
|
+
},
|
|
389
|
+
text: {
|
|
390
|
+
k1xSpc: "x1lliihq",
|
|
391
|
+
k7Eaqz: "xeuugli",
|
|
392
|
+
kzqmXN: "xh8yej3",
|
|
393
|
+
$$css: !0
|
|
394
|
+
},
|
|
395
|
+
textColumn: {
|
|
396
|
+
kUk6DE: "x98rzlu",
|
|
397
|
+
k7Eaqz: "xeuugli",
|
|
398
|
+
$$css: !0
|
|
399
|
+
},
|
|
400
|
+
textRow: {
|
|
401
|
+
k1xSpc: "x78zum5",
|
|
402
|
+
kGNEyG: "x6s0dn4",
|
|
403
|
+
kOIVth: "x1n8ia3y",
|
|
404
|
+
k7Eaqz: "xeuugli",
|
|
405
|
+
kzqmXN: "xh8yej3",
|
|
406
|
+
kMv6JI: "x1hz01jw",
|
|
407
|
+
kGuDYH: "xtqrqnz",
|
|
408
|
+
kLWn49: "x1778rvt",
|
|
409
|
+
k63SB2: "xj57cvi",
|
|
410
|
+
$$css: !0
|
|
411
|
+
},
|
|
412
|
+
primaryRow: {
|
|
413
|
+
k1xSpc: "x78zum5",
|
|
414
|
+
kGNEyG: "x6s0dn4",
|
|
415
|
+
kOIVth: "x1hnptsi",
|
|
416
|
+
k7Eaqz: "xeuugli",
|
|
417
|
+
$$css: !0
|
|
418
|
+
},
|
|
419
|
+
primaryText: {
|
|
420
|
+
kzqmXN: "x14atkfc",
|
|
421
|
+
kmuXW: "xs83m0k",
|
|
422
|
+
$$css: !0
|
|
423
|
+
},
|
|
424
|
+
adornment: {
|
|
425
|
+
k1xSpc: "x3nfvp2",
|
|
426
|
+
kGNEyG: "x6s0dn4",
|
|
427
|
+
kmuXW: "x2lah0s",
|
|
428
|
+
$$css: !0
|
|
429
|
+
},
|
|
430
|
+
secondaryText: {
|
|
431
|
+
kMwMTN: "x153jb6y",
|
|
432
|
+
kGuDYH: "xy8obcc",
|
|
433
|
+
kLWn49: "xas2l8k",
|
|
434
|
+
$$css: !0
|
|
435
|
+
},
|
|
436
|
+
cellViewport: {
|
|
437
|
+
k1xSpc: "x78zum5",
|
|
438
|
+
kGNEyG: "x6s0dn4",
|
|
439
|
+
k7Eaqz: "xeuugli",
|
|
440
|
+
kzqmXN: "xh8yej3",
|
|
441
|
+
kZKoxP: "xw3im37",
|
|
442
|
+
$$css: !0
|
|
443
|
+
},
|
|
444
|
+
fixedContent: {
|
|
445
|
+
kskxy: "x1l6neo7",
|
|
446
|
+
$$css: !0
|
|
447
|
+
},
|
|
448
|
+
readable: {
|
|
449
|
+
khDVqt: "xuxw1ft",
|
|
450
|
+
$$css: !0
|
|
451
|
+
},
|
|
452
|
+
contentCell: {
|
|
453
|
+
k8WAf4: "xn9t2bk",
|
|
454
|
+
$$css: !0
|
|
455
|
+
},
|
|
456
|
+
contentViewport: {
|
|
457
|
+
kZKoxP: "xt7dq6l",
|
|
458
|
+
$$css: !0
|
|
459
|
+
},
|
|
460
|
+
selection: {
|
|
461
|
+
kzqmXN: "x1d7z9mz",
|
|
462
|
+
k7Eaqz: "xeuugli",
|
|
463
|
+
kg3NbH: "x1dc62k6",
|
|
464
|
+
$$css: !0
|
|
465
|
+
},
|
|
466
|
+
spacer: (e) => [
|
|
467
|
+
Ae,
|
|
468
|
+
{
|
|
469
|
+
kZKoxP: e == null ? e : "x16ye13r",
|
|
470
|
+
$$css: !0
|
|
471
|
+
},
|
|
472
|
+
{ "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
473
|
+
],
|
|
474
|
+
sizer: (e) => [
|
|
475
|
+
je,
|
|
476
|
+
{
|
|
477
|
+
kZKoxP: e == null ? e : "x16ye13r",
|
|
478
|
+
$$css: !0
|
|
479
|
+
},
|
|
480
|
+
{ "--x-height": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e) }
|
|
481
|
+
],
|
|
482
|
+
emptyCell: {
|
|
483
|
+
kmVPX3: "x1717udv",
|
|
484
|
+
$$css: !0
|
|
485
|
+
},
|
|
486
|
+
empty: {
|
|
487
|
+
kB7OPa: "x9f619",
|
|
488
|
+
kVAEAm: "x7wzq59",
|
|
489
|
+
kLqNvP: "x1o0tod",
|
|
490
|
+
kzqmXN: "xzfn7dr",
|
|
491
|
+
ks0D6T: "x193iq5w",
|
|
492
|
+
kmVPX3: "x1ttojsm",
|
|
493
|
+
k9WMMc: "x2b8uid",
|
|
494
|
+
khDVqt: "xeaf4i8",
|
|
495
|
+
kHjlTd: "xj0a0fe",
|
|
496
|
+
kMwMTN: "x153jb6y",
|
|
497
|
+
$$css: !0
|
|
498
|
+
},
|
|
499
|
+
footer: {
|
|
500
|
+
kmVPX3: "xg7ukam",
|
|
501
|
+
kEafiO: "x178xt8z",
|
|
502
|
+
kPef9Z: "x13fuv20",
|
|
503
|
+
kLZC3w: "xhjagg4",
|
|
504
|
+
$$css: !0
|
|
505
|
+
},
|
|
506
|
+
endContent: {
|
|
507
|
+
kAzted: "xid9utz",
|
|
508
|
+
kmVPX3: "xg7ukam",
|
|
509
|
+
kMwMTN: "x153jb6y",
|
|
510
|
+
kGuDYH: "xy8obcc",
|
|
511
|
+
kLWn49: "xas2l8k",
|
|
512
|
+
kefpsp: "x15x95ik",
|
|
513
|
+
kyjxKa: "x1az1eml",
|
|
514
|
+
$$css: !0
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
// packages/collections/src/data-table-text.tsx
|
|
518
|
+
function Me({ children: e, leading: t, isDecorative: n = !1 }) {
|
|
519
|
+
let r = b.toArray(t).length > 0;
|
|
520
|
+
return /* @__PURE__ */ P("span", {
|
|
521
|
+
"aria-hidden": n || void 0,
|
|
522
|
+
inert: n || void 0,
|
|
523
|
+
...m.props(q.textRow),
|
|
524
|
+
children: [r && /* @__PURE__ */ N("span", {
|
|
525
|
+
"aria-hidden": !0,
|
|
526
|
+
...m.props(q.adornment),
|
|
527
|
+
children: t
|
|
528
|
+
}), /* @__PURE__ */ N("span", {
|
|
529
|
+
...m.props(q.textColumn),
|
|
530
|
+
children: e
|
|
531
|
+
})]
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
function Ne({ children: e, secondary: t, leading: n, trailing: r }) {
|
|
535
|
+
let i = b.toArray(r).length > 0;
|
|
536
|
+
return /* @__PURE__ */ P(Me, {
|
|
537
|
+
leading: n,
|
|
538
|
+
children: [/* @__PURE__ */ P("span", {
|
|
539
|
+
...m.props(q.primaryRow),
|
|
540
|
+
children: [/* @__PURE__ */ N("span", {
|
|
541
|
+
"data-record-text": !0,
|
|
542
|
+
title: e,
|
|
543
|
+
...m.props(q.text, q.primaryText, q.truncated),
|
|
544
|
+
children: e
|
|
545
|
+
}), i && /* @__PURE__ */ N("span", {
|
|
546
|
+
...m.props(q.adornment),
|
|
547
|
+
children: r
|
|
548
|
+
})]
|
|
549
|
+
}), t !== void 0 && /* @__PURE__ */ N("span", {
|
|
550
|
+
title: t,
|
|
551
|
+
...m.props(q.text, q.truncated, q.secondaryText),
|
|
552
|
+
children: t
|
|
553
|
+
})]
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
function Pe({ leading: e, isSecondary: t = !1 }) {
|
|
557
|
+
return /* @__PURE__ */ P(Me, {
|
|
558
|
+
leading: e,
|
|
559
|
+
isDecorative: !0,
|
|
560
|
+
children: [/* @__PURE__ */ N("span", {
|
|
561
|
+
...m.props(q.text),
|
|
562
|
+
children: /* @__PURE__ */ N(d, { width: "70%" })
|
|
563
|
+
}), t && /* @__PURE__ */ N("span", {
|
|
564
|
+
...m.props(q.text, q.secondaryText),
|
|
565
|
+
children: /* @__PURE__ */ N(d, { width: "45%" })
|
|
566
|
+
})]
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
// packages/collections/src/data-table-layout.tsx
|
|
570
|
+
var Fe = ee.compactTable.slice(7), Ie = /* @__PURE__ */ new Set(["string", "number"]), J = {
|
|
571
|
+
primary: {
|
|
572
|
+
minimumWidth: 240,
|
|
573
|
+
isFlexible: !0,
|
|
574
|
+
shouldTruncate: !0
|
|
575
|
+
},
|
|
576
|
+
text: {
|
|
577
|
+
minimumWidth: 160,
|
|
578
|
+
isFlexible: !1,
|
|
579
|
+
shouldTruncate: !0
|
|
580
|
+
},
|
|
581
|
+
status: {
|
|
582
|
+
minimumWidth: 160,
|
|
583
|
+
isFlexible: !1,
|
|
584
|
+
shouldTruncate: !1
|
|
585
|
+
},
|
|
586
|
+
number: {
|
|
587
|
+
minimumWidth: 112,
|
|
588
|
+
isFlexible: !1,
|
|
589
|
+
shouldTruncate: !1
|
|
590
|
+
},
|
|
591
|
+
timestamp: {
|
|
592
|
+
minimumWidth: 160,
|
|
593
|
+
isFlexible: !1,
|
|
594
|
+
shouldTruncate: !1
|
|
595
|
+
},
|
|
596
|
+
actions: {
|
|
597
|
+
minimumWidth: 112,
|
|
598
|
+
isFlexible: !1,
|
|
599
|
+
shouldTruncate: !1
|
|
600
|
+
}
|
|
601
|
+
}, Le = {
|
|
602
|
+
fixed: q.content,
|
|
603
|
+
content: q.contentCell
|
|
604
|
+
}, Re = {
|
|
605
|
+
primary: q.start,
|
|
606
|
+
text: q.start,
|
|
607
|
+
status: q.start,
|
|
608
|
+
number: q.end,
|
|
609
|
+
timestamp: q.end,
|
|
610
|
+
actions: q.end
|
|
611
|
+
}, ze = {
|
|
612
|
+
content: q.content,
|
|
613
|
+
fill: q.fillFrame
|
|
614
|
+
}, Be = {
|
|
615
|
+
content: q.content,
|
|
616
|
+
fill: q.fillViewport
|
|
617
|
+
};
|
|
618
|
+
function Ve(e) {
|
|
619
|
+
return e.map((e) => {
|
|
620
|
+
let t = J[e.role], n = e.width ?? (t.isFlexible ? void 0 : t.minimumWidth);
|
|
621
|
+
return {
|
|
622
|
+
...e,
|
|
623
|
+
...n === void 0 ? {} : { width: n }
|
|
624
|
+
};
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
function He(e, t = 0) {
|
|
628
|
+
return {
|
|
629
|
+
minimumWidth: e.reduce((e, t) => e + (t.width ?? J[t.role].minimumWidth), t),
|
|
630
|
+
compactWidth: e.filter((e) => e.isSecondary !== !0).reduce((e, t) => e + (t.width ?? J[t.role].minimumWidth), t)
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
function Ue(e) {
|
|
634
|
+
let t = globalThis.matchMedia(Fe);
|
|
635
|
+
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
636
|
+
}
|
|
637
|
+
function We() {
|
|
638
|
+
return globalThis.matchMedia(Fe).matches;
|
|
639
|
+
}
|
|
640
|
+
function Ge({ columns: e, canSelect: t = !1 }) {
|
|
641
|
+
return /* @__PURE__ */ P("colgroup", { children: [t && /* @__PURE__ */ N("col", { ...m.props(q.selection) }), e.map((e) => /* @__PURE__ */ N("col", { ...m.props(e.width !== void 0 && q.width(e.width), e.isSecondary === !0 && q.secondary) }, e.id))] });
|
|
642
|
+
}
|
|
643
|
+
function Ke({ role: e, isFixed: t, shouldTruncate: n, children: r }) {
|
|
644
|
+
let i = J[e], a = t && i.shouldTruncate, o = typeof r == "string" && (n ?? a);
|
|
645
|
+
return /* @__PURE__ */ N("span", {
|
|
646
|
+
...m.props(q.cellViewport, !t && q.contentViewport),
|
|
647
|
+
children: /* @__PURE__ */ N("span", {
|
|
648
|
+
"data-record-text": Ie.has(typeof r) || void 0,
|
|
649
|
+
title: typeof r == "string" ? r : void 0,
|
|
650
|
+
...m.props(q.cellContent, t && q.fixedContent, t && !i.shouldTruncate && q.readable, o && q.truncated),
|
|
651
|
+
children: r
|
|
652
|
+
})
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
// packages/collections/src/table-results.tsx
|
|
656
|
+
function qe({ status: e, sort: t, selected: n, pagination: r, isPlaceholder: i }) {
|
|
657
|
+
return {
|
|
658
|
+
status: e,
|
|
659
|
+
pending: e === "pending",
|
|
660
|
+
sort: t,
|
|
661
|
+
selected: n === null ? [] : [...n],
|
|
662
|
+
page: r?.description ?? null,
|
|
663
|
+
hasPreviousPage: r !== void 0 && !r.previous.disabled,
|
|
664
|
+
hasNextPage: r !== void 0 && !r.next.disabled,
|
|
665
|
+
isPlaceholder: i
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
var Y = "[hidden], [inert], [aria-hidden=\"true\"], [data-agent-hidden], [data-agent-secret]";
|
|
669
|
+
function Je(e) {
|
|
670
|
+
let t = e instanceof HTMLTableElement ? e.tBodies[0] : void 0;
|
|
671
|
+
if (t !== void 0 && t.closest(Y) === null) return new Map(Array.from(t.rows).flatMap((e) => {
|
|
672
|
+
let t = e.dataset.rowId, n = Array.from(e.cells).find((e) => e.dataset.recordLabel !== void 0);
|
|
673
|
+
if (t === void 0 || n === void 0) return [];
|
|
674
|
+
if (n.closest(Y) !== null || n.querySelector("[data-agent-secret], [data-agent-hidden]") !== null || !n.checkVisibility({ visibilityProperty: !0 })) return [[t, null]];
|
|
675
|
+
let r = n.querySelector("[data-row-action][aria-label]") ?? n.querySelector("[data-record-text]");
|
|
676
|
+
if (r !== null && r.closest(Y) !== null || r?.checkVisibility({ visibilityProperty: !0 }) === !1) return [[t, null]];
|
|
677
|
+
let i = r?.getAttribute("aria-label") ?? r?.textContent.trim();
|
|
678
|
+
return [[t, i === void 0 || i.length === 0 ? t : i]];
|
|
679
|
+
}));
|
|
680
|
+
}
|
|
681
|
+
var Ye = {
|
|
682
|
+
none: "ascending",
|
|
683
|
+
ascending: "descending",
|
|
684
|
+
descending: "none"
|
|
685
|
+
}, Xe = /* @__PURE__ */ new Set(["ascending", "descending"]), Ze = /* @__PURE__ */ new Set(["Home", "End"]), Qe = se({
|
|
686
|
+
name: "collection-results",
|
|
687
|
+
options: {
|
|
688
|
+
status: "string",
|
|
689
|
+
sort: "value",
|
|
690
|
+
onSortChange: "callback",
|
|
691
|
+
sortable: "list",
|
|
692
|
+
selected: "value",
|
|
693
|
+
onSelectedChange: "callback",
|
|
694
|
+
pagination: "value",
|
|
695
|
+
rowIds: "list",
|
|
696
|
+
rowLabel: "callback",
|
|
697
|
+
isActionable: "boolean",
|
|
698
|
+
reveal: "callback",
|
|
699
|
+
onOpen: "callback",
|
|
700
|
+
isPlaceholder: "boolean"
|
|
701
|
+
},
|
|
702
|
+
state: (e) => ({
|
|
703
|
+
...qe(e),
|
|
704
|
+
active: null
|
|
705
|
+
}),
|
|
706
|
+
sync: qe,
|
|
707
|
+
controlled: [
|
|
708
|
+
"status",
|
|
709
|
+
"sort",
|
|
710
|
+
"selected",
|
|
711
|
+
"page",
|
|
712
|
+
"hasPreviousPage",
|
|
713
|
+
"hasNextPage"
|
|
714
|
+
],
|
|
715
|
+
api: (e) => {
|
|
716
|
+
let t = A(e), n = ae(e, {
|
|
717
|
+
key: "active",
|
|
718
|
+
rows: () => e.options().rowIds.length,
|
|
719
|
+
cols: () => 1,
|
|
720
|
+
disabled: () => !e.options().isActionable,
|
|
721
|
+
reveal: (t) => e.options().reveal(t.row)
|
|
722
|
+
}), r = { rowIds: e.options().rowIds };
|
|
723
|
+
e.onOptions((t) => {
|
|
724
|
+
let i = n.active(), a = i === null ? void 0 : r.rowIds[i.row];
|
|
725
|
+
if (r.rowIds = t.rowIds, i === null || t.rowIds[i.row] === a) return;
|
|
726
|
+
let o = a === void 0 ? -1 : t.rowIds.indexOf(a);
|
|
727
|
+
e.store.set({ active: o === -1 ? null : {
|
|
728
|
+
row: o,
|
|
729
|
+
col: 0
|
|
730
|
+
} });
|
|
731
|
+
});
|
|
732
|
+
let i = j(e, {
|
|
733
|
+
key: "selected",
|
|
734
|
+
set: (e, n) => t("selected", e, n),
|
|
735
|
+
order: () => e.options().rowIds,
|
|
736
|
+
multiple: () => !0
|
|
737
|
+
});
|
|
738
|
+
function a() {
|
|
739
|
+
if (e.options().selected === null) throw Error("This table has no row selection.");
|
|
740
|
+
}
|
|
741
|
+
function o(t) {
|
|
742
|
+
let { sortable: n } = e.options(), r = n.find((e) => e.id === t || e.label === t);
|
|
743
|
+
if (r === void 0) {
|
|
744
|
+
let e = n.map((e) => e.label).join(", ");
|
|
745
|
+
throw Error(e.length === 0 ? "This table has no sortable column." : `Sort by one of: ${e}.`);
|
|
746
|
+
}
|
|
747
|
+
return r.id;
|
|
748
|
+
}
|
|
749
|
+
function s(t) {
|
|
750
|
+
let n = e.options().pagination?.[t];
|
|
751
|
+
if (n === void 0 || n.disabled) throw Error(`There is no ${t} page.`);
|
|
752
|
+
return n.onClick(), !0;
|
|
753
|
+
}
|
|
754
|
+
return {
|
|
755
|
+
grid: n,
|
|
756
|
+
rowKeydown(t) {
|
|
757
|
+
t.shiftKey || (t.metaKey || t.ctrlKey || !Ze.has(t.key) ? n.keydown(t) : (t.preventDefault(), n.focus({
|
|
758
|
+
row: t.key === "Home" ? 0 : e.options().rowIds.length - 1,
|
|
759
|
+
col: 0
|
|
760
|
+
}, {
|
|
761
|
+
reason: "list-navigation",
|
|
762
|
+
event: t
|
|
763
|
+
})));
|
|
764
|
+
},
|
|
765
|
+
focusRow: (e) => n.focus({
|
|
766
|
+
row: e,
|
|
767
|
+
col: 0
|
|
768
|
+
}),
|
|
769
|
+
toggleSort(n, r) {
|
|
770
|
+
let { sort: i } = e.options(), a = Ye[i?.columnId === n ? i.direction : "none"];
|
|
771
|
+
return t("sort", a === "none" ? null : {
|
|
772
|
+
columnId: n,
|
|
773
|
+
direction: a
|
|
774
|
+
}, {
|
|
775
|
+
reason: "trigger-press",
|
|
776
|
+
event: r
|
|
777
|
+
});
|
|
778
|
+
},
|
|
779
|
+
toggleRow(e, t) {
|
|
780
|
+
let n = t === void 0 ? { reason: "item-press" } : {
|
|
781
|
+
reason: "item-press",
|
|
782
|
+
event: t
|
|
783
|
+
};
|
|
784
|
+
t instanceof MouseEvent && t.shiftKey ? i.extend(e, n) : i.toggle(e, n);
|
|
785
|
+
},
|
|
786
|
+
toggleAll(e) {
|
|
787
|
+
i.toggleAll(e === void 0 ? { reason: "item-press" } : {
|
|
788
|
+
reason: "item-press",
|
|
789
|
+
event: e
|
|
790
|
+
});
|
|
791
|
+
},
|
|
792
|
+
sort(e, n = "ascending") {
|
|
793
|
+
if (n === "none") return t("sort", null, { reason: "imperative" });
|
|
794
|
+
if (!Xe.has(n)) throw Error("The direction is ascending, descending or none.");
|
|
795
|
+
return t("sort", {
|
|
796
|
+
columnId: o(e),
|
|
797
|
+
direction: n === "descending" ? "descending" : "ascending"
|
|
798
|
+
}, { reason: "imperative" });
|
|
799
|
+
},
|
|
800
|
+
select(n) {
|
|
801
|
+
a();
|
|
802
|
+
let { rowIds: r } = e.options(), i = (Array.isArray(n) ? n : [n]).map(String), o = i.find((e) => !r.includes(e));
|
|
803
|
+
if (o !== void 0) throw Error(`No row "${o}" is in this table.`);
|
|
804
|
+
return t("selected", i, { reason: "imperative" });
|
|
805
|
+
},
|
|
806
|
+
open(t) {
|
|
807
|
+
let n = e.options().rowIds.indexOf(String(t));
|
|
808
|
+
if (n === -1 || !e.options().isActionable) throw Error(n === -1 ? `No row "${String(t)}" is in this table.` : "The rows have no action now.");
|
|
809
|
+
return e.options().onOpen(n), !0;
|
|
810
|
+
},
|
|
811
|
+
previousPage: () => s("previous"),
|
|
812
|
+
nextPage: () => s("next"),
|
|
813
|
+
records() {
|
|
814
|
+
let t = Je(e.element("root")), { rowIds: n, rowLabel: r } = e.options();
|
|
815
|
+
if (t === void 0) return [];
|
|
816
|
+
let i = Array.from(t.values()).includes(null);
|
|
817
|
+
return n.flatMap((e, n) => {
|
|
818
|
+
let a = t.has(e) ? t.get(e) : r(n);
|
|
819
|
+
return !t.has(e) && i || a == null ? [] : [{
|
|
820
|
+
value: e,
|
|
821
|
+
label: a
|
|
822
|
+
}];
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
};
|
|
826
|
+
},
|
|
827
|
+
slots: (e) => ({
|
|
828
|
+
root: e({}),
|
|
829
|
+
trigger: e({
|
|
830
|
+
props: {
|
|
831
|
+
value: "string",
|
|
832
|
+
row: "number",
|
|
833
|
+
col: "number"
|
|
834
|
+
},
|
|
835
|
+
selects: ce({ active: k }),
|
|
836
|
+
attrs: (e, { props: t, api: n }) => ({ tabindex: n.grid.tabIndex(e, t) }),
|
|
837
|
+
on: {
|
|
838
|
+
keydown: (e, { api: t }) => t.rowKeydown(e),
|
|
839
|
+
focus: (e, { api: t, props: n }) => {
|
|
840
|
+
t.grid.focus(n, {
|
|
841
|
+
reason: "item-press",
|
|
842
|
+
event: e
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
bind: (e, { api: t, props: n }) => t.grid.bind(e, n)
|
|
847
|
+
})
|
|
848
|
+
}),
|
|
849
|
+
agent: {
|
|
850
|
+
actions: [
|
|
851
|
+
"sort",
|
|
852
|
+
"select",
|
|
853
|
+
"open",
|
|
854
|
+
"previousPage",
|
|
855
|
+
"nextPage"
|
|
856
|
+
],
|
|
857
|
+
items: (e) => e.records(),
|
|
858
|
+
shown: (e) => !e.isPlaceholder
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
function $e(e, t) {
|
|
862
|
+
let n = y(Qe, e), r = v(n, "root", {}, t(n.api), "table");
|
|
863
|
+
return {
|
|
864
|
+
api: n.api,
|
|
865
|
+
element: r
|
|
866
|
+
};
|
|
867
|
+
}
|
|
868
|
+
var et = g(Qe, {
|
|
869
|
+
root: "table",
|
|
870
|
+
trigger: "a"
|
|
871
|
+
}).Trigger, tt = g(Qe, {
|
|
872
|
+
root: "table",
|
|
873
|
+
trigger: "button"
|
|
874
|
+
}).Trigger;
|
|
875
|
+
// packages/collections/src/data-table-trigger.tsx
|
|
876
|
+
function nt(e) {
|
|
877
|
+
if (e.defaultPrevented || e.button !== 0) return !1;
|
|
878
|
+
let t = e.metaKey || e.ctrlKey, n = e.altKey || e.shiftKey;
|
|
879
|
+
return t || n ? !1 : e.detail === 0 || e.currentTarget.ownerDocument.getSelection()?.isCollapsed !== !1;
|
|
880
|
+
}
|
|
881
|
+
function rt({ index: e, recordId: t, row: n, action: r, isActive: i, children: a }) {
|
|
882
|
+
let o = r.label?.(n), s = r.href === void 0 ? /* @__PURE__ */ N(tt, {
|
|
883
|
+
value: t,
|
|
884
|
+
row: e,
|
|
885
|
+
col: 0,
|
|
886
|
+
type: "button",
|
|
887
|
+
disabled: r.disabled === !0,
|
|
888
|
+
"aria-label": o,
|
|
889
|
+
"aria-pressed": i,
|
|
890
|
+
"data-row-action": !0,
|
|
891
|
+
onClick: (e) => {
|
|
892
|
+
nt(e) && r.onActivate(n);
|
|
893
|
+
},
|
|
894
|
+
...m.props(q.trigger),
|
|
895
|
+
children: a
|
|
896
|
+
}) : /* @__PURE__ */ N(et, {
|
|
897
|
+
value: t,
|
|
898
|
+
row: e,
|
|
899
|
+
col: 0,
|
|
900
|
+
"aria-label": o,
|
|
901
|
+
href: r.href(n),
|
|
902
|
+
"data-row-action": !0,
|
|
903
|
+
onClick: (e) => {
|
|
904
|
+
r.onActivate !== void 0 && nt(e) && (e.preventDefault(), r.onActivate(n));
|
|
905
|
+
},
|
|
906
|
+
...m.props(q.trigger),
|
|
907
|
+
children: a
|
|
908
|
+
});
|
|
909
|
+
return o === void 0 ? s : /* @__PURE__ */ P(u.Root, { children: [/* @__PURE__ */ N(u.Trigger, { render: s }), /* @__PURE__ */ N(u.Popup, {
|
|
910
|
+
side: "top",
|
|
911
|
+
align: "start",
|
|
912
|
+
children: o
|
|
913
|
+
})] });
|
|
914
|
+
}
|
|
915
|
+
// packages/collections/src/use-end-reached.ts
|
|
916
|
+
function it({ end: e, viewport: t, onEndReached: n, content: r }) {
|
|
917
|
+
C(() => {
|
|
918
|
+
if (n === void 0 || e.current === null) return;
|
|
919
|
+
let r = new IntersectionObserver((e) => {
|
|
920
|
+
e.some((e) => e.isIntersecting) && n();
|
|
921
|
+
}, { root: t?.current ?? null });
|
|
922
|
+
return r.observe(e.current), () => r.disconnect();
|
|
923
|
+
}, [
|
|
924
|
+
e,
|
|
925
|
+
t,
|
|
926
|
+
n,
|
|
927
|
+
r
|
|
928
|
+
]);
|
|
929
|
+
}
|
|
930
|
+
// packages/collections/src/use-table-window.ts
|
|
931
|
+
var at = [];
|
|
932
|
+
function ot(e) {
|
|
933
|
+
let t = D(e), [{ rows: n, subscribe: r, readItems: i, scrollToIndex: a }] = O(() => {
|
|
934
|
+
let e = oe({
|
|
935
|
+
count: () => t.current.count,
|
|
936
|
+
estimate: () => t.current.estimate,
|
|
937
|
+
key: (e) => t.current.keyOf(e),
|
|
938
|
+
overscan: 6,
|
|
939
|
+
keep: () => t.current.keep(),
|
|
940
|
+
onEnd: () => t.current.onEnd?.(),
|
|
941
|
+
endThreshold: 0,
|
|
942
|
+
get scrollMargin() {
|
|
943
|
+
return t.current.margin;
|
|
944
|
+
}
|
|
945
|
+
});
|
|
946
|
+
return {
|
|
947
|
+
rows: e,
|
|
948
|
+
subscribe: (t) => e.subscribe(t),
|
|
949
|
+
readItems: () => e.items(),
|
|
950
|
+
scrollToIndex: (t) => e.scrollToIndex(t)
|
|
951
|
+
};
|
|
952
|
+
}), [o] = O(() => /* @__PURE__ */ new Map()), { isEnabled: s, viewport: c } = e;
|
|
953
|
+
return T(() => {
|
|
954
|
+
t.current = e, n.refresh();
|
|
955
|
+
}), T(() => {
|
|
956
|
+
let e = c.current;
|
|
957
|
+
if (s && e !== null) return n.connect(e);
|
|
958
|
+
}, [
|
|
959
|
+
s,
|
|
960
|
+
n,
|
|
961
|
+
c
|
|
962
|
+
]), {
|
|
963
|
+
items: ie(r, i, () => at),
|
|
964
|
+
size: n.size(),
|
|
965
|
+
scrollToIndex: a,
|
|
966
|
+
measure(e) {
|
|
967
|
+
let t = o.get(e);
|
|
968
|
+
if (t !== void 0) return t;
|
|
969
|
+
let r = (t) => n.measure(e, t);
|
|
970
|
+
return o.set(e, r), r;
|
|
971
|
+
}
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
// packages/collections/src/data-table-rows.tsx
|
|
975
|
+
var st = be({}), ct = {
|
|
976
|
+
ascending: de,
|
|
977
|
+
descending: ue,
|
|
978
|
+
none: fe
|
|
979
|
+
};
|
|
980
|
+
function lt(e, t) {
|
|
981
|
+
let n = D(void 0);
|
|
982
|
+
C(() => {
|
|
983
|
+
if (t === void 0) {
|
|
984
|
+
n.current = void 0;
|
|
985
|
+
return;
|
|
986
|
+
}
|
|
987
|
+
if (n.current !== void 0 && n.current.id === e) return;
|
|
988
|
+
let r = { isCurrent: !0 };
|
|
989
|
+
return queueMicrotask(() => {
|
|
990
|
+
r.isCurrent && (n.current = { id: e }, t(e));
|
|
991
|
+
}), () => {
|
|
992
|
+
r.isCurrent = !1;
|
|
993
|
+
};
|
|
994
|
+
}, [e, t]);
|
|
995
|
+
}
|
|
996
|
+
function X({ rows: e, columns: t, getRowId: n, caption: r, empty: i, sort: a, onSortChange: o, selectedIds: c, onSelectionChange: l, selectionLabel: u, rowAction: d, activeRowId: ee, focusRowId: p, onRowHighlightChange: g, hideCaption: _ = !1, hideHeaders: v = !1, rowSizing: y = "fixed", window: b, endContent: x, onEndReached: S, footer: w, pagination: k, resultStatus: A = "ready", isPlaceholder: ae = !1 }) {
|
|
997
|
+
let j = E(() => Ve(t), [t]), oe = ie(Ue, We, () => !1), se = E(() => {
|
|
998
|
+
let e = ye();
|
|
999
|
+
return e.columns(j.map((t) => e.display({
|
|
1000
|
+
id: t.id,
|
|
1001
|
+
header: t.label
|
|
1002
|
+
})));
|
|
1003
|
+
}, [j]), M = xe({
|
|
1004
|
+
features: st,
|
|
1005
|
+
columns: se,
|
|
1006
|
+
data: e,
|
|
1007
|
+
getRowId: n
|
|
1008
|
+
}), ce = ne(), ue = ce.viewport, de = D(null), fe = D(null), pe = D(null), [F, me] = O(0), [I, he] = O(), [ge, L] = O(), R = D(void 0), _e = D(void 0), z = E(() => e.map(n), [e, n]), ve = I === void 0 ? -1 : z.indexOf(I.id), B = I?.isWithin === !0 ? ve : -1, be = B === -1 ? void 0 : I?.id, Se = j.findIndex((e) => e.role === "primary" && e.isSecondary !== !0), Ce = Se === -1 ? j.findIndex((e) => e.isSecondary !== !0) : Se, we = typeof b?.height == "string" ? b.height : "content", Te = d !== void 0 && d.disabled !== !0;
|
|
1009
|
+
it({
|
|
1010
|
+
end: de,
|
|
1011
|
+
onEndReached: b === void 0 ? S : void 0,
|
|
1012
|
+
content: e.length
|
|
1013
|
+
}), C(() => {
|
|
1014
|
+
let e = fe.current, t = pe.current;
|
|
1015
|
+
if (b === void 0 || e === null || t === null) return;
|
|
1016
|
+
let n = new ResizeObserver(() => me(e.offsetHeight + t.offsetHeight));
|
|
1017
|
+
return n.observe(e), n.observe(t), () => n.disconnect();
|
|
1018
|
+
}, [
|
|
1019
|
+
b,
|
|
1020
|
+
_,
|
|
1021
|
+
v
|
|
1022
|
+
]);
|
|
1023
|
+
let V = ot({
|
|
1024
|
+
isEnabled: b !== void 0,
|
|
1025
|
+
viewport: ue,
|
|
1026
|
+
count: e.length,
|
|
1027
|
+
keyOf: (e) => z[e] ?? String(e),
|
|
1028
|
+
estimate: y === "fixed" ? f.rowHeight : b?.estimatedRowHeight ?? f.rowHeight,
|
|
1029
|
+
margin: F,
|
|
1030
|
+
keep: () => [
|
|
1031
|
+
Math.max(0, ve),
|
|
1032
|
+
B - 1,
|
|
1033
|
+
B,
|
|
1034
|
+
B + 1
|
|
1035
|
+
],
|
|
1036
|
+
onEnd: S
|
|
1037
|
+
});
|
|
1038
|
+
C(() => {
|
|
1039
|
+
b !== void 0 && e.length === 0 && S?.();
|
|
1040
|
+
}, [
|
|
1041
|
+
b,
|
|
1042
|
+
e.length,
|
|
1043
|
+
S
|
|
1044
|
+
]);
|
|
1045
|
+
function Ee(e) {
|
|
1046
|
+
return ue.current?.querySelector(`[data-row-id="${CSS.escape(e)}"] [data-row-action]`) ?? null;
|
|
1047
|
+
}
|
|
1048
|
+
let H = E(() => o === void 0 ? [] : j.filter((e) => e.canSort === !0).map(({ id: e, label: t }) => ({
|
|
1049
|
+
id: e,
|
|
1050
|
+
label: t
|
|
1051
|
+
})), [j, o]), U = E(() => c === void 0 ? null : Array.from(c), [c]), De = {
|
|
1052
|
+
status: A,
|
|
1053
|
+
sort: a ?? null,
|
|
1054
|
+
onSortChange: o === void 0 ? void 0 : (e, t) => o(e ?? void 0, t),
|
|
1055
|
+
sortable: H,
|
|
1056
|
+
selected: U,
|
|
1057
|
+
onSelectedChange: l === void 0 ? void 0 : (e, t) => l(new Set(e), t),
|
|
1058
|
+
pagination: k,
|
|
1059
|
+
rowIds: z,
|
|
1060
|
+
rowLabel: (t) => {
|
|
1061
|
+
let n = e[t];
|
|
1062
|
+
return n === void 0 ? void 0 : d?.label?.(n) ?? u?.(n);
|
|
1063
|
+
},
|
|
1064
|
+
isActionable: Te,
|
|
1065
|
+
reveal: (e) => {
|
|
1066
|
+
b !== void 0 && V.scrollToIndex(e);
|
|
1067
|
+
},
|
|
1068
|
+
onOpen: (e) => {
|
|
1069
|
+
let t = z[e], n = t === void 0 ? null : Ee(t);
|
|
1070
|
+
n === null ? (_e.current = t, V.scrollToIndex(e)) : n.click();
|
|
1071
|
+
},
|
|
1072
|
+
isPlaceholder: ae
|
|
1073
|
+
};
|
|
1074
|
+
T(() => {
|
|
1075
|
+
let e = _e.current;
|
|
1076
|
+
e !== void 0 && (_e.current = void 0, Ee(e)?.click());
|
|
1077
|
+
});
|
|
1078
|
+
let W = b === void 0 ? M.getRowModel().rows.map((e, t) => ({
|
|
1079
|
+
row: e,
|
|
1080
|
+
index: t,
|
|
1081
|
+
spacerHeight: 0
|
|
1082
|
+
})) : V.items.flatMap((e, t, n) => {
|
|
1083
|
+
let r = M.getRowModel().rows[e.index], i = n[t - 1];
|
|
1084
|
+
if (r === void 0) return [];
|
|
1085
|
+
let a = i === void 0 ? 0 : i.start + i.size;
|
|
1086
|
+
return [{
|
|
1087
|
+
row: r,
|
|
1088
|
+
index: e.index,
|
|
1089
|
+
spacerHeight: e.start - a
|
|
1090
|
+
}];
|
|
1091
|
+
}), G = W.some(({ row: e }) => e.id === ge) ? ge : void 0;
|
|
1092
|
+
ge !== void 0 && G === void 0 && L(void 0), lt(G ?? be, g);
|
|
1093
|
+
let K = j.filter((e) => !oe || e.isSecondary !== !0).length + (c === void 0 ? 0 : 1), Oe = c === void 0 ? 0 : 76, Ae = w != null && typeof w != "boolean" || k !== void 0, { minimumWidth: je, compactWidth: Me } = He(j, Oe), Ne = V.items.at(-1), Pe = V.size - (Ne === void 0 ? 0 : Ne.start + Ne.size), Fe = c === void 0 ? 0 : z.filter((e) => c.has(e)).length, Ie = z.length > 0 && Fe === z.length, J = Fe > 0 && !Ie;
|
|
1094
|
+
function qe(t) {
|
|
1095
|
+
return /* @__PURE__ */ P(le, { children: [
|
|
1096
|
+
/* @__PURE__ */ N("caption", {
|
|
1097
|
+
ref: fe,
|
|
1098
|
+
"aria-label": r,
|
|
1099
|
+
...m.props(q.caption, _ && te.hidden),
|
|
1100
|
+
children: r
|
|
1101
|
+
}),
|
|
1102
|
+
/* @__PURE__ */ N(Ge, {
|
|
1103
|
+
columns: j,
|
|
1104
|
+
canSelect: c !== void 0
|
|
1105
|
+
}),
|
|
1106
|
+
/* @__PURE__ */ N("thead", {
|
|
1107
|
+
ref: pe,
|
|
1108
|
+
...m.props(v && te.hidden),
|
|
1109
|
+
children: /* @__PURE__ */ P("tr", { children: [c !== void 0 && /* @__PURE__ */ N("th", {
|
|
1110
|
+
scope: "col",
|
|
1111
|
+
"aria-label": "Select",
|
|
1112
|
+
...m.props(q.header, q.selection, q.rowControl),
|
|
1113
|
+
children: /* @__PURE__ */ N(s.Root, {
|
|
1114
|
+
"aria-label": `Select every row of ${r}`,
|
|
1115
|
+
checked: Ie,
|
|
1116
|
+
indeterminate: J,
|
|
1117
|
+
disabled: z.length === 0,
|
|
1118
|
+
onCheckedChange: (e, n) => t.toggleAll(n.event),
|
|
1119
|
+
children: /* @__PURE__ */ N(s.Indicator, {})
|
|
1120
|
+
})
|
|
1121
|
+
}), j.map((e) => {
|
|
1122
|
+
let n = a?.columnId === e.id ? a.direction : void 0, i = ct[n ?? "none"];
|
|
1123
|
+
return /* @__PURE__ */ N("th", {
|
|
1124
|
+
scope: "col",
|
|
1125
|
+
title: e.label,
|
|
1126
|
+
"aria-sort": n,
|
|
1127
|
+
...m.props(q.header, Re[e.role], e.width !== void 0 && q.width(e.width), e.isSecondary === !0 && q.secondary),
|
|
1128
|
+
children: e.canSort === !0 && o !== void 0 ? /* @__PURE__ */ P(h, {
|
|
1129
|
+
type: "button",
|
|
1130
|
+
"aria-label": `Sort ${r} by ${e.label}`,
|
|
1131
|
+
...m.props(q.sort),
|
|
1132
|
+
onClick: (n) => t.toggleSort(e.id, n.nativeEvent),
|
|
1133
|
+
children: [/* @__PURE__ */ N("span", {
|
|
1134
|
+
...m.props(q.headerLabel),
|
|
1135
|
+
children: e.label
|
|
1136
|
+
}), /* @__PURE__ */ N(i, {
|
|
1137
|
+
size: 14,
|
|
1138
|
+
"aria-hidden": "true",
|
|
1139
|
+
...m.props(q.sortIcon)
|
|
1140
|
+
})]
|
|
1141
|
+
}) : /* @__PURE__ */ N("span", {
|
|
1142
|
+
...m.props(q.headerLabel),
|
|
1143
|
+
children: e.label
|
|
1144
|
+
})
|
|
1145
|
+
}, e.id);
|
|
1146
|
+
})] })
|
|
1147
|
+
}),
|
|
1148
|
+
/* @__PURE__ */ P("tbody", {
|
|
1149
|
+
onPointerLeave: () => L(void 0),
|
|
1150
|
+
onKeyDownCapture: () => L(void 0),
|
|
1151
|
+
onBlur: (e) => {
|
|
1152
|
+
e.currentTarget.contains(e.relatedTarget) || he((e) => e === void 0 ? void 0 : {
|
|
1153
|
+
id: e.id,
|
|
1154
|
+
isWithin: !1
|
|
1155
|
+
});
|
|
1156
|
+
},
|
|
1157
|
+
children: [
|
|
1158
|
+
W.map(({ row: e, index: n, spacerHeight: r }) => /* @__PURE__ */ P(re, { children: [r > 0 && /* @__PURE__ */ N("tr", {
|
|
1159
|
+
"aria-hidden": "true",
|
|
1160
|
+
children: /* @__PURE__ */ N("td", {
|
|
1161
|
+
colSpan: K,
|
|
1162
|
+
...m.props(q.spacer(r))
|
|
1163
|
+
})
|
|
1164
|
+
}), /* @__PURE__ */ P("tr", {
|
|
1165
|
+
"data-index": n,
|
|
1166
|
+
"data-row-id": e.id,
|
|
1167
|
+
"aria-rowindex": b === void 0 ? void 0 : n + 2,
|
|
1168
|
+
ref: b === void 0 || y === "fixed" ? void 0 : V.measure(n),
|
|
1169
|
+
onPointerMove: (t) => {
|
|
1170
|
+
t.pointerType === "mouse" && L(e.id);
|
|
1171
|
+
},
|
|
1172
|
+
onPointerEnter: (t) => {
|
|
1173
|
+
t.pointerType === "mouse" && L(e.id);
|
|
1174
|
+
},
|
|
1175
|
+
onPointerLeave: () => {
|
|
1176
|
+
L((t) => t === e.id ? void 0 : t);
|
|
1177
|
+
},
|
|
1178
|
+
onPointerDown: (e) => {
|
|
1179
|
+
e.pointerType !== "mouse" && L(void 0);
|
|
1180
|
+
},
|
|
1181
|
+
onFocus: () => {
|
|
1182
|
+
L(void 0), he({
|
|
1183
|
+
id: e.id,
|
|
1184
|
+
isWithin: !0
|
|
1185
|
+
});
|
|
1186
|
+
},
|
|
1187
|
+
...m.props(q.row, Te && q.actionable, (c?.has(e.id) === !0 || ee === e.id) && q.selected),
|
|
1188
|
+
children: [c !== void 0 && /* @__PURE__ */ N("td", {
|
|
1189
|
+
...m.props(q.cell, q.selection, q.rowControl),
|
|
1190
|
+
children: /* @__PURE__ */ N(s.Root, {
|
|
1191
|
+
"aria-label": u(e.original),
|
|
1192
|
+
checked: c.has(e.id),
|
|
1193
|
+
onCheckedChange: (n, r) => t.toggleRow(e.id, r.event),
|
|
1194
|
+
children: /* @__PURE__ */ N(s.Indicator, {})
|
|
1195
|
+
})
|
|
1196
|
+
}), j.map((t, r) => {
|
|
1197
|
+
let i = /* @__PURE__ */ N(Ke, {
|
|
1198
|
+
role: t.role,
|
|
1199
|
+
isFixed: y === "fixed",
|
|
1200
|
+
shouldTruncate: t.shouldTruncate,
|
|
1201
|
+
children: t.cell(e.original)
|
|
1202
|
+
});
|
|
1203
|
+
return /* @__PURE__ */ N("td", {
|
|
1204
|
+
"data-record-label": r === Ce || void 0,
|
|
1205
|
+
...m.props(q.cell, Le[y], Re[t.role], t.width !== void 0 && q.width(t.width), t.isSecondary === !0 && q.secondary),
|
|
1206
|
+
children: d !== void 0 && r === Ce ? /* @__PURE__ */ N(rt, {
|
|
1207
|
+
index: n,
|
|
1208
|
+
recordId: e.id,
|
|
1209
|
+
row: e.original,
|
|
1210
|
+
action: d,
|
|
1211
|
+
isActive: ee === e.id,
|
|
1212
|
+
children: i
|
|
1213
|
+
}) : i
|
|
1214
|
+
}, t.id);
|
|
1215
|
+
})]
|
|
1216
|
+
})] }, e.id)),
|
|
1217
|
+
b !== void 0 && Pe > 0 && /* @__PURE__ */ N("tr", {
|
|
1218
|
+
"aria-hidden": "true",
|
|
1219
|
+
children: /* @__PURE__ */ N("td", {
|
|
1220
|
+
colSpan: K,
|
|
1221
|
+
...m.props(q.spacer(Pe))
|
|
1222
|
+
})
|
|
1223
|
+
}),
|
|
1224
|
+
e.length === 0 && /* @__PURE__ */ N("tr", { children: /* @__PURE__ */ N("td", {
|
|
1225
|
+
colSpan: K,
|
|
1226
|
+
...m.props(q.emptyCell),
|
|
1227
|
+
children: /* @__PURE__ */ N("div", {
|
|
1228
|
+
...m.props(q.empty),
|
|
1229
|
+
children: i
|
|
1230
|
+
})
|
|
1231
|
+
}) })
|
|
1232
|
+
]
|
|
1233
|
+
})
|
|
1234
|
+
] });
|
|
1235
|
+
}
|
|
1236
|
+
let { api: Y, element: Je } = $e(De, (t) => ({
|
|
1237
|
+
"aria-label": r,
|
|
1238
|
+
"aria-busy": A === "pending" || void 0,
|
|
1239
|
+
"aria-rowcount": b === void 0 ? void 0 : Math.max(1, e.length) + 1,
|
|
1240
|
+
...m.props(q.table, q.fixed, q.minimumWidth(je, Me)),
|
|
1241
|
+
children: qe(t)
|
|
1242
|
+
}));
|
|
1243
|
+
return T(() => {
|
|
1244
|
+
if (p === void 0) {
|
|
1245
|
+
R.current = void 0;
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
let e = z.indexOf(p);
|
|
1249
|
+
if (R.current === p || e === -1) return;
|
|
1250
|
+
let t = requestAnimationFrame(() => {
|
|
1251
|
+
Y.focusRow(e) && (R.current = p);
|
|
1252
|
+
});
|
|
1253
|
+
return () => cancelAnimationFrame(t);
|
|
1254
|
+
}, [
|
|
1255
|
+
z,
|
|
1256
|
+
p,
|
|
1257
|
+
Te,
|
|
1258
|
+
Y
|
|
1259
|
+
]), /* @__PURE__ */ P("div", {
|
|
1260
|
+
...m.props(q.frame, ze[we]),
|
|
1261
|
+
children: [/* @__PURE__ */ P("div", {
|
|
1262
|
+
ref: ce.ref,
|
|
1263
|
+
"data-table-viewport": !0,
|
|
1264
|
+
role: "region",
|
|
1265
|
+
"aria-label": r,
|
|
1266
|
+
tabIndex: ce.tabIndex,
|
|
1267
|
+
...m.props(q.viewport, Be[we], typeof b?.height == "number" && q.virtual(b.height)),
|
|
1268
|
+
children: [
|
|
1269
|
+
Je,
|
|
1270
|
+
b !== void 0 && /* @__PURE__ */ N("div", {
|
|
1271
|
+
"aria-hidden": !0,
|
|
1272
|
+
...m.props(q.sizer(F + V.size))
|
|
1273
|
+
}),
|
|
1274
|
+
/* @__PURE__ */ N("div", {
|
|
1275
|
+
ref: de,
|
|
1276
|
+
...m.props(x !== void 0 && q.endContent),
|
|
1277
|
+
children: x
|
|
1278
|
+
})
|
|
1279
|
+
]
|
|
1280
|
+
}), Ae && /* @__PURE__ */ P("div", {
|
|
1281
|
+
...m.props(q.footer),
|
|
1282
|
+
children: [w, k !== void 0 && /* @__PURE__ */ N(ke, {
|
|
1283
|
+
...k,
|
|
1284
|
+
label: r
|
|
1285
|
+
})]
|
|
1286
|
+
})]
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
// packages/collections/src/table-query.tsx
|
|
1290
|
+
var ut = x(void 0);
|
|
1291
|
+
function Z(e) {
|
|
1292
|
+
if (e.reason.trim().length === 0) throw Error("A table query exception requires a reason.");
|
|
1293
|
+
}
|
|
1294
|
+
function dt({ search: e, filters: t, children: n, isFiltered: r = !1 }) {
|
|
1295
|
+
return e === void 0 ? /* @__PURE__ */ N(ut, {
|
|
1296
|
+
value: void 0,
|
|
1297
|
+
children: n
|
|
1298
|
+
}) : (e !== !0 && Z(e), t !== !0 && Z(t), /* @__PURE__ */ N(ut, {
|
|
1299
|
+
value: r,
|
|
1300
|
+
children: n
|
|
1301
|
+
}));
|
|
1302
|
+
}
|
|
1303
|
+
function ft(e) {
|
|
1304
|
+
if ("reason" in e) Z(e);
|
|
1305
|
+
else {
|
|
1306
|
+
if (e.length === 0) throw Error("Supply filter dimensions or explain why the table has none.");
|
|
1307
|
+
if (new Set(e.map((e) => e.id)).size !== e.length) throw Error("Each table filter must have a unique ID.");
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
var pt = [];
|
|
1311
|
+
function mt(e, t) {
|
|
1312
|
+
let [n, r] = O(""), [i, a] = O(/* @__PURE__ */ new Map()), o = typeof t.search == "function" ? t.search : void 0;
|
|
1313
|
+
typeof t.search != "function" && Z(t.search), ft(t.filters);
|
|
1314
|
+
let s = "reason" in t.filters ? pt : t.filters, c = o === void 0 ? void 0 : {
|
|
1315
|
+
value: n,
|
|
1316
|
+
onChange: r
|
|
1317
|
+
}, l = n.trim().toLowerCase(), u = E(() => s.map((t) => {
|
|
1318
|
+
let n = new Set(e.map(t.value)), r = i.get(t.id);
|
|
1319
|
+
r !== void 0 && n.add(r);
|
|
1320
|
+
let o = Array.from(n, (e) => ({
|
|
1321
|
+
value: `value:${e}`,
|
|
1322
|
+
label: t.formatLabel?.(e) ?? (e === "" ? "Unspecified" : e)
|
|
1323
|
+
}));
|
|
1324
|
+
return {
|
|
1325
|
+
id: t.id,
|
|
1326
|
+
label: t.label,
|
|
1327
|
+
options: [{
|
|
1328
|
+
value: "",
|
|
1329
|
+
label: "All"
|
|
1330
|
+
}, ...o],
|
|
1331
|
+
defaultValue: "",
|
|
1332
|
+
value: r === void 0 ? "" : `value:${r}`,
|
|
1333
|
+
onChange(e) {
|
|
1334
|
+
a((n) => {
|
|
1335
|
+
let r = new Map(n);
|
|
1336
|
+
return e === "" ? r.delete(t.id) : r.set(t.id, e.slice(6)), r;
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1340
|
+
}), [
|
|
1341
|
+
s,
|
|
1342
|
+
i,
|
|
1343
|
+
e
|
|
1344
|
+
]), d = l !== "" && o !== void 0, f = u.some((e) => e.value !== e.defaultValue);
|
|
1345
|
+
return {
|
|
1346
|
+
rows: d || f ? e.filter((e) => d && !o(e).toLowerCase().includes(l) ? !1 : s.every((t) => !i.has(t.id) || t.value(e) === i.get(t.id))) : e,
|
|
1347
|
+
search: c,
|
|
1348
|
+
filters: u,
|
|
1349
|
+
isFiltered: d || f
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
function ht() {
|
|
1353
|
+
let e = S(ut);
|
|
1354
|
+
if (e === void 0) throw Error("A frame-owned table requires its enclosing collection to supply TableQueryFrame.");
|
|
1355
|
+
return e;
|
|
1356
|
+
}
|
|
1357
|
+
function gt(e) {
|
|
1358
|
+
"reason" in e.search && Z(e.search), ft(e.filters);
|
|
1359
|
+
let t = "reason" in e.search ? void 0 : e.search, n = "reason" in e.filters ? [] : e.filters;
|
|
1360
|
+
return {
|
|
1361
|
+
search: t,
|
|
1362
|
+
filters: n,
|
|
1363
|
+
isFiltered: !!t?.value.trim() || n.some((e) => e.value !== e.defaultValue)
|
|
1364
|
+
};
|
|
1365
|
+
}
|
|
1366
|
+
// packages/collections/src/collection-filters.tsx
|
|
1367
|
+
var Q = {
|
|
1368
|
+
search: {
|
|
1369
|
+
kzqmXN: "xh8yej3",
|
|
1370
|
+
k1K539: "x1kk91vl",
|
|
1371
|
+
$$css: !0
|
|
1372
|
+
},
|
|
1373
|
+
icon: {
|
|
1374
|
+
k1xSpc: "x78zum5",
|
|
1375
|
+
kMwMTN: "x153jb6y",
|
|
1376
|
+
$$css: !0
|
|
1377
|
+
},
|
|
1378
|
+
positive: {
|
|
1379
|
+
kMwMTN: "x7ixh4y",
|
|
1380
|
+
$$css: !0
|
|
1381
|
+
},
|
|
1382
|
+
warning: {
|
|
1383
|
+
kMwMTN: "x1f9ixgr",
|
|
1384
|
+
$$css: !0
|
|
1385
|
+
},
|
|
1386
|
+
negative: {
|
|
1387
|
+
kMwMTN: "xr5kp14",
|
|
1388
|
+
$$css: !0
|
|
1389
|
+
}
|
|
1390
|
+
}, _t = {
|
|
1391
|
+
positive: Q.positive,
|
|
1392
|
+
negative: Q.negative,
|
|
1393
|
+
warning: Q.warning,
|
|
1394
|
+
neutral: void 0
|
|
1395
|
+
}, vt = /* @__PURE__ */ new Set([
|
|
1396
|
+
"Home",
|
|
1397
|
+
"End",
|
|
1398
|
+
"ArrowLeft",
|
|
1399
|
+
"ArrowRight",
|
|
1400
|
+
"Backspace",
|
|
1401
|
+
"Delete"
|
|
1402
|
+
]);
|
|
1403
|
+
function yt({ option: e }) {
|
|
1404
|
+
return /* @__PURE__ */ N("span", {
|
|
1405
|
+
...m.props(Q.icon, _t[e.tone ?? "neutral"]),
|
|
1406
|
+
children: e.icon ?? /* @__PURE__ */ N(me, {
|
|
1407
|
+
size: 14,
|
|
1408
|
+
"aria-hidden": !0
|
|
1409
|
+
})
|
|
1410
|
+
});
|
|
1411
|
+
}
|
|
1412
|
+
function bt({ groups: t }) {
|
|
1413
|
+
let [n, i] = O(""), a = t.filter((e) => e.label.toLowerCase().includes(n.toLowerCase())), o = t.length === 1 && t[0] !== void 0 ? `Filter by ${t[0].label.toLowerCase()}` : "Filters", s = De(/* @__PURE__ */ N(e, {
|
|
1414
|
+
"aria-label": o,
|
|
1415
|
+
title: "Filters"
|
|
1416
|
+
}));
|
|
1417
|
+
return /* @__PURE__ */ P(c.Root, {
|
|
1418
|
+
onOpenChange: (e) => {
|
|
1419
|
+
e || i("");
|
|
1420
|
+
},
|
|
1421
|
+
children: [/* @__PURE__ */ N(c.Trigger, {
|
|
1422
|
+
render: s,
|
|
1423
|
+
children: /* @__PURE__ */ N(I, {
|
|
1424
|
+
size: 14,
|
|
1425
|
+
"aria-hidden": !0
|
|
1426
|
+
})
|
|
1427
|
+
}), /* @__PURE__ */ P(c.Popup, {
|
|
1428
|
+
align: "end",
|
|
1429
|
+
children: [
|
|
1430
|
+
/* @__PURE__ */ N(xt, {
|
|
1431
|
+
label: "Find a filter",
|
|
1432
|
+
value: n,
|
|
1433
|
+
onChange: i
|
|
1434
|
+
}),
|
|
1435
|
+
a.map((e) => /* @__PURE__ */ N(St, { group: e }, e.id)),
|
|
1436
|
+
a.length === 0 && /* @__PURE__ */ N("div", {
|
|
1437
|
+
className: "x1hmw7ec x5g2kb4",
|
|
1438
|
+
children: /* @__PURE__ */ N(r, { children: "No filters found" })
|
|
1439
|
+
})
|
|
1440
|
+
]
|
|
1441
|
+
})]
|
|
1442
|
+
});
|
|
1443
|
+
}
|
|
1444
|
+
function xt({ label: e, value: t, onChange: n }) {
|
|
1445
|
+
return /* @__PURE__ */ N(p, {
|
|
1446
|
+
type: "search",
|
|
1447
|
+
"aria-label": e,
|
|
1448
|
+
placeholder: "Filter…",
|
|
1449
|
+
autoFocus: !0,
|
|
1450
|
+
value: t,
|
|
1451
|
+
onValueChange: n,
|
|
1452
|
+
onKeyDown: (e) => {
|
|
1453
|
+
(e.key.length === 1 || vt.has(e.key)) && e.stopPropagation();
|
|
1454
|
+
},
|
|
1455
|
+
xstyle: Q.search
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
function St({ group: e }) {
|
|
1459
|
+
let [t, n] = O(""), i = e.options.filter((e) => e.label.toLowerCase().includes(t.toLowerCase()));
|
|
1460
|
+
return /* @__PURE__ */ P(c.SubmenuRoot, {
|
|
1461
|
+
onOpenChange: (e) => {
|
|
1462
|
+
e || n("");
|
|
1463
|
+
},
|
|
1464
|
+
children: [/* @__PURE__ */ P(c.SubmenuTrigger, { children: [
|
|
1465
|
+
e.icon ?? /* @__PURE__ */ N(I, {
|
|
1466
|
+
size: 14,
|
|
1467
|
+
"aria-hidden": !0
|
|
1468
|
+
}),
|
|
1469
|
+
/* @__PURE__ */ N("span", {
|
|
1470
|
+
className: "x98rzlu xeuugli xj0a0fe",
|
|
1471
|
+
children: e.label
|
|
1472
|
+
}),
|
|
1473
|
+
/* @__PURE__ */ N("span", {
|
|
1474
|
+
className: "xazcve0 xb3r6kr xuxw1ft xlyipyv x153jb6y xy8obcc xas2l8k",
|
|
1475
|
+
children: e.options.find((t) => t.value === e.value)?.label
|
|
1476
|
+
}),
|
|
1477
|
+
/* @__PURE__ */ N(F, {
|
|
1478
|
+
size: 14,
|
|
1479
|
+
"aria-hidden": !0
|
|
1480
|
+
})
|
|
1481
|
+
] }), /* @__PURE__ */ P(c.Popup, {
|
|
1482
|
+
align: "start",
|
|
1483
|
+
"aria-label": e.label,
|
|
1484
|
+
children: [
|
|
1485
|
+
/* @__PURE__ */ N(xt, {
|
|
1486
|
+
label: `Find ${e.label.toLowerCase()}`,
|
|
1487
|
+
value: t,
|
|
1488
|
+
onChange: n
|
|
1489
|
+
}),
|
|
1490
|
+
/* @__PURE__ */ N(c.RadioGroup, {
|
|
1491
|
+
value: e.value,
|
|
1492
|
+
onValueChange: e.onChange,
|
|
1493
|
+
children: i.map((e) => /* @__PURE__ */ P(c.RadioItem, {
|
|
1494
|
+
value: e.value,
|
|
1495
|
+
closeOnSelect: !0,
|
|
1496
|
+
children: [/* @__PURE__ */ N(yt, { option: e }), /* @__PURE__ */ N("span", {
|
|
1497
|
+
className: "x98rzlu xeuugli xj0a0fe",
|
|
1498
|
+
children: e.label
|
|
1499
|
+
})]
|
|
1500
|
+
}, e.value))
|
|
1501
|
+
}),
|
|
1502
|
+
i.length === 0 && /* @__PURE__ */ N("div", {
|
|
1503
|
+
className: "x1hmw7ec x5g2kb4",
|
|
1504
|
+
children: /* @__PURE__ */ N(r, { children: "No options found" })
|
|
1505
|
+
})
|
|
1506
|
+
]
|
|
1507
|
+
})]
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1510
|
+
// packages/collections/src/query-controls.tsx
|
|
1511
|
+
function Ct(e) {
|
|
1512
|
+
return {
|
|
1513
|
+
value: e.search?.value ?? "",
|
|
1514
|
+
filters: e.selections,
|
|
1515
|
+
disabled: e.isDisabled,
|
|
1516
|
+
available: e.search !== void 0 || e.groups.length > 0
|
|
1517
|
+
};
|
|
1518
|
+
}
|
|
1519
|
+
function wt(e) {
|
|
1520
|
+
let t = JSON.parse(e);
|
|
1521
|
+
if (Array.isArray(t) && t.length === 2) {
|
|
1522
|
+
let e = t[0], n = t[1];
|
|
1523
|
+
if (typeof e == "string" && typeof n == "string") return [e, n];
|
|
1524
|
+
}
|
|
1525
|
+
throw Error("Select a listed filter option, or provide a filter ID and value.");
|
|
1526
|
+
}
|
|
1527
|
+
var Tt = se({
|
|
1528
|
+
name: "collection-query",
|
|
1529
|
+
options: {
|
|
1530
|
+
search: "value",
|
|
1531
|
+
groups: "list",
|
|
1532
|
+
selections: "value",
|
|
1533
|
+
isDisabled: "boolean"
|
|
1534
|
+
},
|
|
1535
|
+
state: Ct,
|
|
1536
|
+
sync: Ct,
|
|
1537
|
+
controlled: ["value", "filters"],
|
|
1538
|
+
api: ({ options: e }) => ({
|
|
1539
|
+
get setQuery() {
|
|
1540
|
+
let { search: t, isDisabled: n } = e();
|
|
1541
|
+
return n || t === void 0 ? null : (e) => {
|
|
1542
|
+
if (typeof e != "string") throw TypeError("The search term must be a string.");
|
|
1543
|
+
M({ options: () => t }, "onChange", e, { reason: "imperative" });
|
|
1544
|
+
};
|
|
1545
|
+
},
|
|
1546
|
+
get submitSearch() {
|
|
1547
|
+
let { search: t, isDisabled: n } = e();
|
|
1548
|
+
return n || t?.onSubmit === void 0 ? null : () => {
|
|
1549
|
+
M({ options: () => t }, "onSubmit", t.value, { reason: "imperative" });
|
|
1550
|
+
};
|
|
1551
|
+
},
|
|
1552
|
+
get setFilter() {
|
|
1553
|
+
let { groups: t, isDisabled: n } = e();
|
|
1554
|
+
return n || t.length === 0 ? null : (e, n) => {
|
|
1555
|
+
let [r, i] = n === void 0 ? wt(e) : [e, n], a = t.find((e) => e.id === r);
|
|
1556
|
+
if (a === void 0 || !a.options.some((e) => e.value === i)) throw Error("Unknown filter or option. Choose one of the listed filter options.");
|
|
1557
|
+
M({ options: () => a }, "onChange", i, { reason: "imperative" });
|
|
1558
|
+
};
|
|
1559
|
+
},
|
|
1560
|
+
items() {
|
|
1561
|
+
return e().groups.flatMap((e) => e.options.map((t) => ({
|
|
1562
|
+
value: JSON.stringify([e.id, t.value]),
|
|
1563
|
+
label: `${e.label} · ${t.label}`
|
|
1564
|
+
})));
|
|
1565
|
+
}
|
|
1566
|
+
}),
|
|
1567
|
+
agent: {
|
|
1568
|
+
actions: [
|
|
1569
|
+
"setQuery",
|
|
1570
|
+
"submitSearch",
|
|
1571
|
+
"setFilter"
|
|
1572
|
+
],
|
|
1573
|
+
items: (e) => e.items(),
|
|
1574
|
+
shown: (e) => e.available && !e.disabled
|
|
1575
|
+
},
|
|
1576
|
+
slots: (e) => ({ root: e({}) })
|
|
1577
|
+
}), Et = g(Tt, { root: "div" }).Root, Dt = { input: {
|
|
1578
|
+
k7Eaqz: "xeuugli",
|
|
1579
|
+
kUk6DE: "x98rzlu",
|
|
1580
|
+
$$css: !0
|
|
1581
|
+
} };
|
|
1582
|
+
function Ot({ label: t = "Collection controls", search: n, filters: r = [], filterContent: i, chips: a = [], viewActions: o, display: s, isPlaceholder: c = !1, isReady: u }) {
|
|
1583
|
+
let [d, f] = O(!1), [ee, te] = O(!1), ne = D(null), m = D(null), h = D(null), g = E(() => Object.fromEntries(r.map((e) => [e.id, e.value])), [r]), _ = c || !u, v = n !== void 0 && (d || n.value.length > 0);
|
|
1584
|
+
T(() => {
|
|
1585
|
+
d && !c && u && (h.current?.focus(), h.current?.select());
|
|
1586
|
+
}, [
|
|
1587
|
+
d,
|
|
1588
|
+
c,
|
|
1589
|
+
u
|
|
1590
|
+
]);
|
|
1591
|
+
function y() {
|
|
1592
|
+
(ne.current ?? m.current?.querySelector("button"))?.focus();
|
|
1593
|
+
}
|
|
1594
|
+
function re() {
|
|
1595
|
+
n !== void 0 && !c && u && (h.current?.focus(), h.current?.select(), f(!0));
|
|
1596
|
+
}
|
|
1597
|
+
function x(e, t) {
|
|
1598
|
+
n !== void 0 && M({ options: () => n }, "onChange", "", {
|
|
1599
|
+
reason: e,
|
|
1600
|
+
event: t
|
|
1601
|
+
}), f(!1), y();
|
|
1602
|
+
}
|
|
1603
|
+
function S(e) {
|
|
1604
|
+
v && !e.defaultPrevented && e.key === "Escape" && e.target instanceof Element && e.target.closest("[role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"], [data-native-find], input:not([data-view-find]), textarea, select") === null && (e.preventDefault(), e.stopPropagation(), x("escape-key", e.nativeEvent));
|
|
1605
|
+
}
|
|
1606
|
+
let C = r.filter((e) => e.value !== e.defaultValue).map((e) => ({
|
|
1607
|
+
id: `filter:${e.id}`,
|
|
1608
|
+
label: e.options.find((t) => t.value === e.value)?.label ?? e.value,
|
|
1609
|
+
onRemove: (t) => e.onChange(e.defaultValue, t)
|
|
1610
|
+
}));
|
|
1611
|
+
for (let e of a) C.push({
|
|
1612
|
+
...e,
|
|
1613
|
+
id: `chip:${e.id}`
|
|
1614
|
+
});
|
|
1615
|
+
let w = i !== void 0 || r.length > 0, ie = b.toArray([o, s]).length > 0, k = n !== void 0 || w || ie, A = n?.label ?? "Search this view", ae = n?.placeholder ?? "Find in view…";
|
|
1616
|
+
return {
|
|
1617
|
+
openSearch: re,
|
|
1618
|
+
onKeyDown: S,
|
|
1619
|
+
actions: k ? /* @__PURE__ */ P(U, {
|
|
1620
|
+
"aria-label": t,
|
|
1621
|
+
render: /* @__PURE__ */ N(Et, {
|
|
1622
|
+
search: n,
|
|
1623
|
+
groups: r,
|
|
1624
|
+
selections: g,
|
|
1625
|
+
isDisabled: _,
|
|
1626
|
+
ref: m,
|
|
1627
|
+
"aria-hidden": _,
|
|
1628
|
+
inert: _,
|
|
1629
|
+
className: "x78zum5 x6s0dn4 x1a02dak x13a6bvl x1hnptsi xeuugli x193iq5w"
|
|
1630
|
+
}),
|
|
1631
|
+
children: [
|
|
1632
|
+
n !== void 0 && /* @__PURE__ */ N(z, {
|
|
1633
|
+
disabled: c,
|
|
1634
|
+
render: /* @__PURE__ */ N(e, {
|
|
1635
|
+
ref: ne,
|
|
1636
|
+
type: "button",
|
|
1637
|
+
"aria-label": "Find in view",
|
|
1638
|
+
title: "Find in view",
|
|
1639
|
+
"data-view-find-trigger": !0,
|
|
1640
|
+
"aria-expanded": v,
|
|
1641
|
+
onClick: re
|
|
1642
|
+
}),
|
|
1643
|
+
children: /* @__PURE__ */ N(he, {
|
|
1644
|
+
size: 14,
|
|
1645
|
+
"aria-hidden": !0
|
|
1646
|
+
})
|
|
1647
|
+
}),
|
|
1648
|
+
v && /* @__PURE__ */ P("div", {
|
|
1649
|
+
className: "x78zum5 x6s0dn4 xunmzkg xdl07me x193iq5w",
|
|
1650
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1651
|
+
disabled: c,
|
|
1652
|
+
render: /* @__PURE__ */ N(p, {
|
|
1653
|
+
ref: h,
|
|
1654
|
+
type: "search",
|
|
1655
|
+
"data-view-find": !0,
|
|
1656
|
+
"aria-label": A,
|
|
1657
|
+
placeholder: ae,
|
|
1658
|
+
value: n.value,
|
|
1659
|
+
onValueChange: n.onChange,
|
|
1660
|
+
onKeyDown: (e) => {
|
|
1661
|
+
e.key === "Enter" && n.onSubmit !== void 0 && (e.preventDefault(), M({ options: () => n }, "onSubmit", n.value, {
|
|
1662
|
+
reason: "enter-key",
|
|
1663
|
+
event: e.nativeEvent
|
|
1664
|
+
})), e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), x("escape-key", e.nativeEvent));
|
|
1665
|
+
},
|
|
1666
|
+
xstyle: Dt.input
|
|
1667
|
+
})
|
|
1668
|
+
}), /* @__PURE__ */ N(z, {
|
|
1669
|
+
render: /* @__PURE__ */ N(e, {
|
|
1670
|
+
type: "button",
|
|
1671
|
+
variant: "ghost",
|
|
1672
|
+
"data-view-find-close": !0,
|
|
1673
|
+
"aria-label": "Close search",
|
|
1674
|
+
title: "Close search (Esc)",
|
|
1675
|
+
onClick: (e) => x("clear-press", e.nativeEvent)
|
|
1676
|
+
}),
|
|
1677
|
+
children: /* @__PURE__ */ N(L, {
|
|
1678
|
+
size: 14,
|
|
1679
|
+
"aria-hidden": !0
|
|
1680
|
+
})
|
|
1681
|
+
})]
|
|
1682
|
+
}),
|
|
1683
|
+
i === void 0 ? r.length > 0 ? /* @__PURE__ */ N(bt, { groups: r }) : null : /* @__PURE__ */ P(l.Root, {
|
|
1684
|
+
open: ee,
|
|
1685
|
+
onOpenChange: te,
|
|
1686
|
+
children: [/* @__PURE__ */ N(l.Trigger, {
|
|
1687
|
+
render: /* @__PURE__ */ N(z, { render: /* @__PURE__ */ N(e, {
|
|
1688
|
+
"aria-label": "Filters",
|
|
1689
|
+
title: "Filters"
|
|
1690
|
+
}) }),
|
|
1691
|
+
children: /* @__PURE__ */ N(I, {
|
|
1692
|
+
size: 14,
|
|
1693
|
+
"aria-hidden": !0
|
|
1694
|
+
})
|
|
1695
|
+
}), /* @__PURE__ */ P(l.Popup, {
|
|
1696
|
+
align: "end",
|
|
1697
|
+
className: "x1m258z3 xw7nakj",
|
|
1698
|
+
children: [/* @__PURE__ */ N(l.Title, { children: "Filters" }), i(() => te(!1))]
|
|
1699
|
+
})]
|
|
1700
|
+
}),
|
|
1701
|
+
o,
|
|
1702
|
+
s
|
|
1703
|
+
]
|
|
1704
|
+
}) : void 0,
|
|
1705
|
+
chips: C.length > 0 && /* @__PURE__ */ N("div", {
|
|
1706
|
+
"aria-hidden": _,
|
|
1707
|
+
inert: _,
|
|
1708
|
+
className: "xjp7ctv",
|
|
1709
|
+
children: /* @__PURE__ */ N(K, {
|
|
1710
|
+
filters: C,
|
|
1711
|
+
onRemove: (e, t) => {
|
|
1712
|
+
y(), C.find((t) => t.id === e)?.onRemove(t);
|
|
1713
|
+
}
|
|
1714
|
+
})
|
|
1715
|
+
})
|
|
1716
|
+
};
|
|
1717
|
+
}
|
|
1718
|
+
// packages/collections/src/data-table.tsx
|
|
1719
|
+
function kt({ columns: e, rows: t = 3, hideCaption: n = !0, ...r }) {
|
|
1720
|
+
let i = typeof r.window?.height == "string" ? r.window.height : "content", a = Array.from({ length: t }, (e, t) => ({ id: String(t) })), o = e.map(({ placeholder: e, ...t }) => ({
|
|
1721
|
+
...t,
|
|
1722
|
+
cell: () => e ?? /* @__PURE__ */ N(d, { width: "60%" })
|
|
1723
|
+
}));
|
|
1724
|
+
return /* @__PURE__ */ N("div", {
|
|
1725
|
+
"aria-hidden": !0,
|
|
1726
|
+
inert: !0,
|
|
1727
|
+
...m.props(ze[i], q.placeholder),
|
|
1728
|
+
children: /* @__PURE__ */ N(X, {
|
|
1729
|
+
...r,
|
|
1730
|
+
hideCaption: n,
|
|
1731
|
+
isPlaceholder: !0,
|
|
1732
|
+
rows: a,
|
|
1733
|
+
getRowId: (e) => e.id,
|
|
1734
|
+
columns: o,
|
|
1735
|
+
empty: null
|
|
1736
|
+
})
|
|
1737
|
+
});
|
|
1738
|
+
}
|
|
1739
|
+
function At({ query: e, ...t }) {
|
|
1740
|
+
switch (e.mode) {
|
|
1741
|
+
case "local":
|
|
1742
|
+
if (t.onEndReached !== void 0 || t.pagination !== void 0) throw Error("Local table queries require all rows. Use a controlled or frame query for a paged source.");
|
|
1743
|
+
return /* @__PURE__ */ N(Mt, {
|
|
1744
|
+
query: e,
|
|
1745
|
+
table: t
|
|
1746
|
+
});
|
|
1747
|
+
case "controlled": return /* @__PURE__ */ N(Nt, {
|
|
1748
|
+
table: {
|
|
1749
|
+
...t,
|
|
1750
|
+
filteredEmpty: t.filteredEmpty ?? t.empty
|
|
1751
|
+
},
|
|
1752
|
+
...gt(e)
|
|
1753
|
+
});
|
|
1754
|
+
case "frame": return /* @__PURE__ */ N(jt, { table: t });
|
|
1755
|
+
case "static": return Z(e), /* @__PURE__ */ N(dt, { children: /* @__PURE__ */ N(X, { ...t }) });
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
function jt({ table: e }) {
|
|
1759
|
+
let t = ht();
|
|
1760
|
+
return /* @__PURE__ */ N(dt, { children: /* @__PURE__ */ N(X, {
|
|
1761
|
+
...e,
|
|
1762
|
+
empty: t ? e.filteredEmpty ?? "No matching records." : e.empty
|
|
1763
|
+
}) });
|
|
1764
|
+
}
|
|
1765
|
+
function Mt({ query: e, table: t }) {
|
|
1766
|
+
let { rows: n, search: r, filters: i, isFiltered: a } = mt(t.rows, e);
|
|
1767
|
+
return /* @__PURE__ */ N(Nt, {
|
|
1768
|
+
table: {
|
|
1769
|
+
...t,
|
|
1770
|
+
rows: n
|
|
1771
|
+
},
|
|
1772
|
+
search: r,
|
|
1773
|
+
filters: i,
|
|
1774
|
+
isFiltered: a
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
function Nt({ table: e, search: t, filters: n, isFiltered: r }) {
|
|
1778
|
+
let i = Ot({
|
|
1779
|
+
...t !== void 0 && { search: t },
|
|
1780
|
+
filters: n,
|
|
1781
|
+
isReady: !0,
|
|
1782
|
+
label: e.caption
|
|
1783
|
+
}), a = D(null), o = {
|
|
1784
|
+
description: `Find in ${e.caption}`,
|
|
1785
|
+
layer: a,
|
|
1786
|
+
when: () => {
|
|
1787
|
+
let e = a.current;
|
|
1788
|
+
if (e === null) return !1;
|
|
1789
|
+
let t = e.ownerDocument.activeElement;
|
|
1790
|
+
return t === null || t.closest("[data-native-find], textarea, select, input:not([data-view-find]), [contenteditable=\"true\"], [role=\"dialog\"], [role=\"alertdialog\"], [role=\"menu\"], [role=\"listbox\"]") !== null ? !1 : t.closest("[data-table-query]") === e || t === e.ownerDocument.body && e.ownerDocument.querySelectorAll("[data-view-find-trigger]").length === 1;
|
|
1791
|
+
}
|
|
1792
|
+
};
|
|
1793
|
+
return R(t === void 0 ? null : "/", i.openSearch, o), R(t === void 0 ? null : "mod+f", i.openSearch, o), /* @__PURE__ */ N(dt, { children: /* @__PURE__ */ P("div", {
|
|
1794
|
+
ref: a,
|
|
1795
|
+
"data-table-query": !0,
|
|
1796
|
+
onKeyDown: i.onKeyDown,
|
|
1797
|
+
...m.props(ze[typeof e.window?.height == "string" ? e.window.height : "content"]),
|
|
1798
|
+
children: [(t !== void 0 || n.length > 0) && /* @__PURE__ */ N(G, {
|
|
1799
|
+
label: `${e.caption} controls`,
|
|
1800
|
+
actions: i.actions,
|
|
1801
|
+
children: i.chips
|
|
1802
|
+
}), /* @__PURE__ */ N(X, {
|
|
1803
|
+
...e,
|
|
1804
|
+
empty: r ? e.filteredEmpty ?? "No matching records." : e.empty
|
|
1805
|
+
})]
|
|
1806
|
+
}) });
|
|
1807
|
+
}
|
|
1808
|
+
// packages/collections/src/collection-scroll.tsx
|
|
1809
|
+
function Pt(e) {
|
|
1810
|
+
switch (e.status) {
|
|
1811
|
+
case "loading": return /* @__PURE__ */ N(n, {
|
|
1812
|
+
role: "status",
|
|
1813
|
+
variant: "caption",
|
|
1814
|
+
tone: "muted",
|
|
1815
|
+
children: e.message ?? "Loading…"
|
|
1816
|
+
});
|
|
1817
|
+
case "complete": return e.message === void 0 ? null : /* @__PURE__ */ N(n, {
|
|
1818
|
+
variant: "caption",
|
|
1819
|
+
tone: "muted",
|
|
1820
|
+
children: e.message
|
|
1821
|
+
});
|
|
1822
|
+
case "ready": return /* @__PURE__ */ N(t, {
|
|
1823
|
+
onClick: e.onLoadMore,
|
|
1824
|
+
children: e.message ?? "Load more"
|
|
1825
|
+
});
|
|
1826
|
+
case "error": return /* @__PURE__ */ P(i, {
|
|
1827
|
+
role: "status",
|
|
1828
|
+
children: [/* @__PURE__ */ N(n, {
|
|
1829
|
+
variant: "caption",
|
|
1830
|
+
tone: "muted",
|
|
1831
|
+
children: e.message ?? "More records could not be loaded."
|
|
1832
|
+
}), /* @__PURE__ */ N(t, {
|
|
1833
|
+
onClick: e.onLoadMore,
|
|
1834
|
+
children: "Retry"
|
|
1835
|
+
})]
|
|
1836
|
+
});
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
function Ft({ children: e, endContent: t, onEndReached: n, shouldFill: r = !1, endPosition: i = "end", label: a = "Collection" }) {
|
|
1840
|
+
let o = ne(), s = o.viewport, c = D(null);
|
|
1841
|
+
it({
|
|
1842
|
+
end: c,
|
|
1843
|
+
viewport: r ? s : void 0,
|
|
1844
|
+
onEndReached: n,
|
|
1845
|
+
content: e
|
|
1846
|
+
});
|
|
1847
|
+
let l = /* @__PURE__ */ N("div", {
|
|
1848
|
+
ref: c,
|
|
1849
|
+
...{
|
|
1850
|
+
0: {},
|
|
1851
|
+
1: { className: "x15x95ik x1az1eml xid9utz x1c8xbx5 x153jb6y xy8obcc x1hz01jw xas2l8k x2b8uid" }
|
|
1852
|
+
}[t !== void 0 | 0],
|
|
1853
|
+
children: t
|
|
1854
|
+
});
|
|
1855
|
+
return /* @__PURE__ */ P("div", {
|
|
1856
|
+
ref: o.ref,
|
|
1857
|
+
role: r ? "region" : void 0,
|
|
1858
|
+
"aria-label": r ? a : void 0,
|
|
1859
|
+
tabIndex: o.tabIndex,
|
|
1860
|
+
...{
|
|
1861
|
+
0: { className: "xeuugli" },
|
|
1862
|
+
1: { className: "xeuugli x98rzlu x2lwn1j x1odjw0f xy5w88m x1t137rt x13qnu6 x9v5kkp x19rmrnh x1bqaal" }
|
|
1863
|
+
}[!!r | 0],
|
|
1864
|
+
children: [
|
|
1865
|
+
i === "start" && l,
|
|
1866
|
+
e,
|
|
1867
|
+
i === "end" && l
|
|
1868
|
+
]
|
|
1869
|
+
});
|
|
1870
|
+
}
|
|
1871
|
+
// packages/collections/src/inspector.tsx
|
|
1872
|
+
var It = 860, Lt = x(void 0);
|
|
1873
|
+
function Rt({ reading: e }) {
|
|
1874
|
+
return { value: e };
|
|
1875
|
+
}
|
|
1876
|
+
var zt = se({
|
|
1877
|
+
name: "detail-field",
|
|
1878
|
+
options: { reading: "string" },
|
|
1879
|
+
state: Rt,
|
|
1880
|
+
sync: Rt,
|
|
1881
|
+
api: () => ({}),
|
|
1882
|
+
agent: { actions: [] },
|
|
1883
|
+
slots: (e) => ({ root: e({}) })
|
|
1884
|
+
}), Bt = g(zt, { root: "dd" }).Root;
|
|
1885
|
+
function Vt({ master: e, detail: n, label: r, masterLabel: i, revealKey: a, returnFocusRef: o, ...s }) {
|
|
1886
|
+
let c = w(), l = D(null), u = D(null), d = D(null);
|
|
1887
|
+
T(() => {
|
|
1888
|
+
a !== void 0 && l.current !== null && d.current !== null && l.current.clientWidth <= It && (d.current.focus({ preventScroll: !0 }), d.current.scrollIntoView({
|
|
1889
|
+
block: "start",
|
|
1890
|
+
behavior: "instant"
|
|
1891
|
+
}));
|
|
1892
|
+
}, [a]);
|
|
1893
|
+
function f() {
|
|
1894
|
+
let e = o?.current ?? u.current;
|
|
1895
|
+
e?.focus({ preventScroll: !0 }), e?.scrollIntoView({
|
|
1896
|
+
block: "nearest",
|
|
1897
|
+
behavior: "instant"
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
return /* @__PURE__ */ N("div", {
|
|
1901
|
+
..._({ className: "x9vvk8s x12h1iku xeuugli xbixft x1hz01jw xtqrqnz x1778rvt" }, s),
|
|
1902
|
+
children: /* @__PURE__ */ P("div", {
|
|
1903
|
+
ref: l,
|
|
1904
|
+
className: "xrvj5dj x4ruv2j x1y7acmc x7a106z x1j825kq xeuugli",
|
|
1905
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1906
|
+
ref: u,
|
|
1907
|
+
role: "group",
|
|
1908
|
+
"aria-label": i,
|
|
1909
|
+
"aria-details": c,
|
|
1910
|
+
tabIndex: -1,
|
|
1911
|
+
className: "xeuugli",
|
|
1912
|
+
children: e
|
|
1913
|
+
}), /* @__PURE__ */ P("aside", {
|
|
1914
|
+
ref: d,
|
|
1915
|
+
id: c,
|
|
1916
|
+
"aria-label": r,
|
|
1917
|
+
tabIndex: -1,
|
|
1918
|
+
className: "x7wzq59 x7cfggw xqfmuo8 xeuugli x1sbza1b xhuqrux xexx8yu xdz7uhd xpilrb4 xdctr63 x1t7ytsu x97x49r x972fbf x1mg79u0 x13fuv20 xhjagg4 x14ijc3v x13qnu6 x9v5kkp x19rmrnh x12ijfkc",
|
|
1919
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1920
|
+
className: "x1s85apg x1yamub6 x1xxlxpq",
|
|
1921
|
+
children: /* @__PURE__ */ P(t, {
|
|
1922
|
+
variant: "ghost",
|
|
1923
|
+
onClick: f,
|
|
1924
|
+
children: ["Back to ", i.toLowerCase()]
|
|
1925
|
+
})
|
|
1926
|
+
}), /* @__PURE__ */ N(Lt.Provider, {
|
|
1927
|
+
value: r,
|
|
1928
|
+
children: n
|
|
1929
|
+
})]
|
|
1930
|
+
})]
|
|
1931
|
+
})
|
|
1932
|
+
});
|
|
1933
|
+
}
|
|
1934
|
+
function Ht({ value: e, label: t }) {
|
|
1935
|
+
let n = typeof e == "number" ? String(e) : e;
|
|
1936
|
+
return typeof n == "string" ? /* @__PURE__ */ N(Bt, {
|
|
1937
|
+
"aria-label": t,
|
|
1938
|
+
reading: n,
|
|
1939
|
+
className: "xeuugli x1ghz6dp xbixft xj0a0fe xss6m8b",
|
|
1940
|
+
children: n
|
|
1941
|
+
}) : /* @__PURE__ */ N("dd", {
|
|
1942
|
+
className: "xeuugli x1ghz6dp xbixft xj0a0fe xss6m8b",
|
|
1943
|
+
children: e
|
|
1944
|
+
});
|
|
1945
|
+
}
|
|
1946
|
+
function Ut({ items: e, ...t }) {
|
|
1947
|
+
let n = S(Lt), r = t["aria-label"] ?? n;
|
|
1948
|
+
return /* @__PURE__ */ N("dl", {
|
|
1949
|
+
..._({ className: "x1ghz6dp xrvj5dj xezdspq x1i3977y xuytk5h x1hz01jw xvmahel xtqrqnz x1778rvt" }, t),
|
|
1950
|
+
children: e.map(({ label: e, value: t }) => /* @__PURE__ */ P("div", {
|
|
1951
|
+
className: "xjp7ctv",
|
|
1952
|
+
children: [/* @__PURE__ */ N("dt", {
|
|
1953
|
+
className: "xeuugli x153jb6y xj0a0fe",
|
|
1954
|
+
children: e
|
|
1955
|
+
}), /* @__PURE__ */ N(Ht, {
|
|
1956
|
+
value: t,
|
|
1957
|
+
label: r === void 0 ? e : `${r} · ${e}`
|
|
1958
|
+
})]
|
|
1959
|
+
}, e))
|
|
1960
|
+
});
|
|
1961
|
+
}
|
|
1962
|
+
// packages/collections/src/list-footer.tsx
|
|
1963
|
+
function Wt({ children: e, actions: t, ...n }) {
|
|
1964
|
+
return /* @__PURE__ */ P("div", {
|
|
1965
|
+
..._({ className: "x78zum5 x6s0dn4 x1qughib x1a02dak xeuugli x1n8ia3y x1qokhjc x1m92p3w x178xt8z x13fuv20 xhjagg4 x153jb6y x1hz01jw xvmahel xtqrqnz x1778rvt" }, n),
|
|
1966
|
+
children: [/* @__PURE__ */ N("div", {
|
|
1967
|
+
className: "xeuugli xj0a0fe",
|
|
1968
|
+
children: e
|
|
1969
|
+
}), t != null && /* @__PURE__ */ N("div", {
|
|
1970
|
+
className: "x78zum5 x6s0dn4 x1a02dak x1hnptsi xeuugli",
|
|
1971
|
+
children: t
|
|
1972
|
+
})]
|
|
1973
|
+
});
|
|
1974
|
+
}
|
|
1975
|
+
// packages/collections/src/metrics.tsx
|
|
1976
|
+
var $ = {
|
|
1977
|
+
grid: {
|
|
1978
|
+
k1xSpc: "x78zum5",
|
|
1979
|
+
kwnvtZ: "x1a02dak",
|
|
1980
|
+
khm7nJ: "xpb3s3w",
|
|
1981
|
+
k1C7PZ: "x1i3977y",
|
|
1982
|
+
k7Eaqz: "xeuugli",
|
|
1983
|
+
kogj98: "x1ghz6dp",
|
|
1984
|
+
$$css: !0
|
|
1985
|
+
},
|
|
1986
|
+
columns: {
|
|
1987
|
+
k1xSpc: "xrvj5dj",
|
|
1988
|
+
kumcoG: "xpuu00s",
|
|
1989
|
+
kOIVth: "x1j825kq",
|
|
1990
|
+
k7Eaqz: "xeuugli",
|
|
1991
|
+
kogj98: "x1ghz6dp",
|
|
1992
|
+
$$css: !0
|
|
1993
|
+
},
|
|
1994
|
+
metric: {
|
|
1995
|
+
k1xSpc: "x3nfvp2",
|
|
1996
|
+
kGNEyG: "x1pha0wt",
|
|
1997
|
+
kwnvtZ: "x1a02dak",
|
|
1998
|
+
kOIVth: "xunmzkg",
|
|
1999
|
+
k7Eaqz: "xeuugli",
|
|
2000
|
+
kMv6JI: "x1hz01jw",
|
|
2001
|
+
khiITx: "xvmahel",
|
|
2002
|
+
kGuDYH: "xtqrqnz",
|
|
2003
|
+
kLWn49: "x1778rvt",
|
|
2004
|
+
$$css: !0
|
|
2005
|
+
},
|
|
2006
|
+
label: {
|
|
2007
|
+
k7Eaqz: "xeuugli",
|
|
2008
|
+
kMwMTN: "x153jb6y",
|
|
2009
|
+
kayTVb: "x9ek82g",
|
|
2010
|
+
kHjlTd: "xj0a0fe",
|
|
2011
|
+
$$css: !0
|
|
2012
|
+
},
|
|
2013
|
+
value: {
|
|
2014
|
+
k7Eaqz: "xeuugli",
|
|
2015
|
+
kogj98: "x1ghz6dp",
|
|
2016
|
+
kMwMTN: "xbixft",
|
|
2017
|
+
k63SB2: "xk4h15q",
|
|
2018
|
+
kcqcaj: "xss6m8b",
|
|
2019
|
+
kHjlTd: "xj0a0fe",
|
|
2020
|
+
$$css: !0
|
|
2021
|
+
},
|
|
2022
|
+
statistic: {
|
|
2023
|
+
kXwgrk: "xdt5ytf",
|
|
2024
|
+
kGNEyG: "x1cy8zhl",
|
|
2025
|
+
$$css: !0
|
|
2026
|
+
},
|
|
2027
|
+
stackedLabel: {
|
|
2028
|
+
kayTVb: "x1g77sc7",
|
|
2029
|
+
$$css: !0
|
|
2030
|
+
},
|
|
2031
|
+
statisticValue: {
|
|
2032
|
+
kGuDYH: "x71lla1",
|
|
2033
|
+
kLWn49: "xgkpprq",
|
|
2034
|
+
k63SB2: "x1b5ytql",
|
|
2035
|
+
kb6lSQ: "x1wjjqco",
|
|
2036
|
+
$$css: !0
|
|
2037
|
+
},
|
|
2038
|
+
headline: {
|
|
2039
|
+
k1C7PZ: "xa2sdi0",
|
|
2040
|
+
$$css: !0
|
|
2041
|
+
},
|
|
2042
|
+
headlineLabel: {
|
|
2043
|
+
kayTVb: "x1g77sc7",
|
|
2044
|
+
kCS8Yb: "x1l7klhg",
|
|
2045
|
+
kGuDYH: "xy8obcc",
|
|
2046
|
+
$$css: !0
|
|
2047
|
+
},
|
|
2048
|
+
headlineValue: {
|
|
2049
|
+
kGuDYH: "xc0f4dz",
|
|
2050
|
+
kLWn49: "xzju6ct",
|
|
2051
|
+
k63SB2: "xtjd4bd",
|
|
2052
|
+
kb6lSQ: "x1wjjqco",
|
|
2053
|
+
$$css: !0
|
|
2054
|
+
},
|
|
2055
|
+
detail: {
|
|
2056
|
+
k7Eaqz: "xeuugli",
|
|
2057
|
+
kogj98: "x1ghz6dp",
|
|
2058
|
+
kMwMTN: "x153jb6y",
|
|
2059
|
+
kGuDYH: "xy8obcc",
|
|
2060
|
+
kLWn49: "xas2l8k",
|
|
2061
|
+
kAzted: "x1mqbd49",
|
|
2062
|
+
kHjlTd: "xj0a0fe",
|
|
2063
|
+
$$css: !0
|
|
2064
|
+
},
|
|
2065
|
+
inlineDetail: {
|
|
2066
|
+
kCS8Yb: "x1l7klhg",
|
|
2067
|
+
$$css: !0
|
|
2068
|
+
}
|
|
2069
|
+
}, Gt = {
|
|
2070
|
+
inline: {
|
|
2071
|
+
metric: void 0,
|
|
2072
|
+
label: void 0,
|
|
2073
|
+
value: void 0,
|
|
2074
|
+
detail: $.inlineDetail,
|
|
2075
|
+
valueWidth: "5ch"
|
|
2076
|
+
},
|
|
2077
|
+
statistic: {
|
|
2078
|
+
metric: $.statistic,
|
|
2079
|
+
label: $.stackedLabel,
|
|
2080
|
+
value: $.statisticValue,
|
|
2081
|
+
detail: void 0,
|
|
2082
|
+
valueWidth: "5ch"
|
|
2083
|
+
},
|
|
2084
|
+
headline: {
|
|
2085
|
+
metric: $.headline,
|
|
2086
|
+
label: $.headlineLabel,
|
|
2087
|
+
value: $.headlineValue,
|
|
2088
|
+
detail: void 0,
|
|
2089
|
+
valueWidth: "9ch"
|
|
2090
|
+
}
|
|
2091
|
+
}, Kt = {
|
|
2092
|
+
inline: $.grid,
|
|
2093
|
+
columns: $.columns
|
|
2094
|
+
};
|
|
2095
|
+
function qt({ layout: e = "inline", ...t }) {
|
|
2096
|
+
return /* @__PURE__ */ N("dl", { ..._(m.props(Kt[e]), t) });
|
|
2097
|
+
}
|
|
2098
|
+
function Jt({ label: e, value: t, detail: n, isLoading: r = !1, hasDetail: i = !1, variant: a = "inline", trend: o, ...s }) {
|
|
2099
|
+
let c = Gt[a];
|
|
2100
|
+
return /* @__PURE__ */ P("div", {
|
|
2101
|
+
..._(m.props($.metric, c.metric), s),
|
|
2102
|
+
children: [
|
|
2103
|
+
/* @__PURE__ */ N("dt", {
|
|
2104
|
+
...m.props($.label, c.label),
|
|
2105
|
+
children: e
|
|
2106
|
+
}),
|
|
2107
|
+
/* @__PURE__ */ N("dd", {
|
|
2108
|
+
...m.props($.value, c.value),
|
|
2109
|
+
children: r ? /* @__PURE__ */ N(d, { width: c.valueWidth }) : t
|
|
2110
|
+
}),
|
|
2111
|
+
(r ? i : n !== void 0) && /* @__PURE__ */ N("dd", {
|
|
2112
|
+
...m.props($.detail, c.detail),
|
|
2113
|
+
children: r ? /* @__PURE__ */ N(d, { width: "24ch" }) : n
|
|
2114
|
+
}),
|
|
2115
|
+
o !== void 0 && /* @__PURE__ */ N("dd", {
|
|
2116
|
+
className: "x1ghz6dp xeuugli xh8yej3 xkh2ocl",
|
|
2117
|
+
children: o
|
|
2118
|
+
})
|
|
2119
|
+
]
|
|
2120
|
+
});
|
|
2121
|
+
}
|
|
2122
|
+
// packages/collections/src/timestamp.tsx
|
|
2123
|
+
function Yt({ dateTime: e, label: t, title: n }) {
|
|
2124
|
+
return n === void 0 ? /* @__PURE__ */ N("time", {
|
|
2125
|
+
dateTime: e,
|
|
2126
|
+
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
2127
|
+
children: t
|
|
2128
|
+
}) : /* @__PURE__ */ P(u.Root, { children: [/* @__PURE__ */ N(u.Trigger, {
|
|
2129
|
+
render: /* @__PURE__ */ N("time", {
|
|
2130
|
+
dateTime: e,
|
|
2131
|
+
tabIndex: 0,
|
|
2132
|
+
"aria-label": n,
|
|
2133
|
+
className: "x1hz01jw xy8obcc xas2l8k x153jb6y xss6m8b xj0a0fe x13qnu6 x9v5kkp x19rmrnh x7s97pk"
|
|
2134
|
+
}),
|
|
2135
|
+
children: t
|
|
2136
|
+
}), /* @__PURE__ */ N(u.Popup, { children: n })] });
|
|
2137
|
+
}
|
|
2138
|
+
// packages/collections/src/timeline.tsx
|
|
2139
|
+
function Xt({ label: e, children: t }) {
|
|
2140
|
+
return /* @__PURE__ */ N(Se, {
|
|
2141
|
+
"aria-label": e,
|
|
2142
|
+
render: /* @__PURE__ */ N("ol", {}),
|
|
2143
|
+
className: "xe8uvvx x1ghz6dp x1717udv xeuugli",
|
|
2144
|
+
children: t
|
|
2145
|
+
});
|
|
2146
|
+
}
|
|
2147
|
+
function Zt({ icon: e, title: t, time: n, metadata: r, children: i, details: a, defaultOpen: s = !1 }) {
|
|
2148
|
+
let [c, l] = O(s), u = /* @__PURE__ */ P("div", {
|
|
2149
|
+
className: "x78zum5 x1pha0wt x1hnptsi x1a02dak xeuugli",
|
|
2150
|
+
children: [/* @__PURE__ */ N(Ee, {
|
|
2151
|
+
className: "xeuugli xk4h15q xj0a0fe",
|
|
2152
|
+
children: a === void 0 ? t : /* @__PURE__ */ N(o.Trigger, {
|
|
2153
|
+
className: "x14atkfc x16exltd x17oiadl xt970qd xlqzeqv",
|
|
2154
|
+
children: t
|
|
2155
|
+
})
|
|
2156
|
+
}), n != null && /* @__PURE__ */ N(V, {
|
|
2157
|
+
render: /* @__PURE__ */ N("div", {}),
|
|
2158
|
+
className: "xeuugli x153jb6y xy8obcc xas2l8k xss6m8b xj0a0fe",
|
|
2159
|
+
children: n
|
|
2160
|
+
})]
|
|
2161
|
+
}), d = /* @__PURE__ */ P(le, { children: [
|
|
2162
|
+
u,
|
|
2163
|
+
i != null && (!c || a === void 0) && /* @__PURE__ */ N(Ce, {
|
|
2164
|
+
className: "xeuugli x1ewvobj xj0a0fe",
|
|
2165
|
+
children: i
|
|
2166
|
+
}),
|
|
2167
|
+
r != null && /* @__PURE__ */ N("div", {
|
|
2168
|
+
className: "xeuugli x153jb6y xy8obcc xas2l8k xj0a0fe",
|
|
2169
|
+
children: r
|
|
2170
|
+
}),
|
|
2171
|
+
a !== void 0 && /* @__PURE__ */ N(o.Panel, { children: a })
|
|
2172
|
+
] });
|
|
2173
|
+
return /* @__PURE__ */ P(we, {
|
|
2174
|
+
render: /* @__PURE__ */ N("li", {}),
|
|
2175
|
+
className: "x1n2onr6 xrvj5dj x1eqwfih x1y1mm1b xhlx3wy xeuugli x1hz01jw xvmahel xtqrqnz x1778rvt xbixft x1cpjm7i x1hmns74 x1lk18uv x1gi6gvw x1jw5pjq x1vgi0k x1mi36wk x1wse844 xup0pd7 x1t137rt x13qnu6 x9v5kkp x19rmrnh x7s97pk",
|
|
2176
|
+
children: [/* @__PURE__ */ N(Te, {
|
|
2177
|
+
render: /* @__PURE__ */ N("span", {}),
|
|
2178
|
+
className: "x78zum5 x6s0dn4 xl56j7k x1b1e0sl x153jb6y",
|
|
2179
|
+
children: e
|
|
2180
|
+
}), a === void 0 ? /* @__PURE__ */ N("div", {
|
|
2181
|
+
className: "xrvj5dj x1hnptsi xeuugli",
|
|
2182
|
+
children: d
|
|
2183
|
+
}) : /* @__PURE__ */ N(o.Root, {
|
|
2184
|
+
open: c,
|
|
2185
|
+
onOpenChange: l,
|
|
2186
|
+
className: "xrvj5dj x1hnptsi xeuugli xh8yej3",
|
|
2187
|
+
children: d
|
|
2188
|
+
})]
|
|
2189
|
+
});
|
|
2190
|
+
}
|
|
2191
|
+
var Qt = {
|
|
2192
|
+
Root: Xt,
|
|
2193
|
+
Item: Zt
|
|
2194
|
+
};
|
|
2195
|
+
export { Pe as _, Wt as a, Oe as b, Pt as c, kt as d, Ot as f, Ne as g, mt as h, qt as i, Ft as l, dt as m, Yt as n, Ut as o, bt as p, Jt as r, Vt as s, Qt as t, At as u, ke as v, K as x, G as y };
|