derive-dashboards 0.7.1 → 0.9.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/CHANGELOG.md +513 -0
- package/README.md +8 -2
- package/dist/adapter/statement.mjs +9 -7
- package/dist/authorize.mjs +27 -6
- package/dist/body.mjs +28 -25
- package/dist/cache.d.mts +2 -2
- package/dist/charts/data/buckets.d.mts +25 -7
- package/dist/charts/data/buckets.mjs +92 -15
- package/dist/charts/data/clean.mjs +254 -12
- package/dist/charts/data/format.d.mts +7 -2
- package/dist/charts/data/format.mjs +68 -70
- package/dist/charts/data/input-error.d.mts +2 -0
- package/dist/charts/data/input-error.mjs +2 -0
- package/dist/charts/data/rows.d.mts +3 -1
- package/dist/charts/data/rows.mjs +4 -2
- package/dist/charts/data/types.d.mts +50 -7
- package/dist/charts/data/words.d.mts +13 -0
- package/dist/charts/data/words.mjs +8 -1
- package/dist/charts/describe.mjs +6 -6
- package/dist/charts/index.d.mts +14 -14
- package/dist/charts/index.mjs +4 -1
- package/dist/charts/kinds/area-marks.mjs +86 -44
- package/dist/charts/kinds/area.d.mts +3 -3
- package/dist/charts/kinds/area.mjs +32 -11
- package/dist/charts/kinds/bars-data.d.mts +3 -3
- package/dist/charts/kinds/bars-data.mjs +12 -6
- package/dist/charts/kinds/bars-layout.mjs +60 -6
- package/dist/charts/kinds/bars-marks.mjs +6 -6
- package/dist/charts/kinds/bars.d.mts +5 -3
- package/dist/charts/kinds/bars.mjs +39 -6
- package/dist/charts/kinds/columns-data.mjs +14 -5
- package/dist/charts/kinds/columns-marks.mjs +52 -23
- package/dist/charts/kinds/columns.d.mts +2 -2
- package/dist/charts/kinds/columns.mjs +36 -10
- package/dist/charts/kinds/course-data.mjs +44 -0
- package/dist/charts/kinds/course-layout.mjs +77 -0
- package/dist/charts/kinds/course-marks.mjs +52 -0
- package/dist/charts/kinds/course-words.mjs +64 -0
- package/dist/charts/kinds/course.d.mts +10 -0
- package/dist/charts/kinds/course.mjs +55 -0
- package/dist/charts/kinds/dumbbell-data.d.mts +4 -4
- package/dist/charts/kinds/dumbbell-data.mjs +3 -3
- package/dist/charts/kinds/dumbbell-layout.mjs +17 -8
- package/dist/charts/kinds/dumbbell.d.mts +5 -3
- package/dist/charts/kinds/dumbbell.mjs +35 -4
- package/dist/charts/kinds/funnel-data.d.mts +3 -3
- package/dist/charts/kinds/funnel-data.mjs +11 -16
- package/dist/charts/kinds/funnel-layout.mjs +7 -6
- package/dist/charts/kinds/funnel.d.mts +5 -4
- package/dist/charts/kinds/funnel.mjs +33 -6
- package/dist/charts/kinds/grid-data.d.mts +3 -3
- package/dist/charts/kinds/grid-data.mjs +55 -13
- package/dist/charts/kinds/grid-layout.mjs +88 -13
- package/dist/charts/kinds/grid-legend.mjs +60 -0
- package/dist/charts/kinds/grid-marks.mjs +81 -32
- package/dist/charts/kinds/grid-time.mjs +19 -5
- package/dist/charts/kinds/grid-words.mjs +57 -35
- package/dist/charts/kinds/grid.d.mts +7 -4
- package/dist/charts/kinds/grid.mjs +51 -9
- package/dist/charts/kinds/histogram-data.mjs +68 -26
- package/dist/charts/kinds/histogram-layout.mjs +4 -3
- package/dist/charts/kinds/histogram-words.mjs +2 -3
- package/dist/charts/kinds/histogram.d.mts +2 -2
- package/dist/charts/kinds/histogram.mjs +17 -1
- package/dist/charts/kinds/line-marks.mjs +19 -11
- package/dist/charts/kinds/line.d.mts +2 -2
- package/dist/charts/kinds/line.mjs +21 -3
- package/dist/charts/kinds/multiples-grid.mjs +57 -27
- package/dist/charts/kinds/multiples-head.mjs +52 -22
- package/dist/charts/kinds/multiples-layout.mjs +106 -52
- package/dist/charts/kinds/multiples-marks.mjs +6 -5
- package/dist/charts/kinds/multiples-words.mjs +53 -38
- package/dist/charts/kinds/multiples.d.mts +2 -2
- package/dist/charts/kinds/multiples.mjs +35 -7
- package/dist/charts/kinds/row-chart.d.mts +7 -0
- package/dist/charts/kinds/row-chart.mjs +47 -10
- package/dist/charts/kinds/row-marks.mjs +5 -5
- package/dist/charts/kinds/scatter-data.d.mts +5 -5
- package/dist/charts/kinds/scatter-data.mjs +6 -6
- package/dist/charts/kinds/scatter-marks.mjs +46 -19
- package/dist/charts/kinds/scatter-words.mjs +8 -8
- package/dist/charts/kinds/scatter.d.mts +5 -3
- package/dist/charts/kinds/scatter.mjs +18 -0
- package/dist/charts/kinds/stat-data.mjs +7 -7
- package/dist/charts/kinds/stat-marks.mjs +2 -2
- package/dist/charts/kinds/stat.d.mts +4 -4
- package/dist/charts/kinds/stat.mjs +19 -0
- package/dist/charts/kinds/time-chart.mjs +13 -4
- package/dist/charts/kinds/time-frame.mjs +50 -19
- package/dist/charts/kinds/time-plan.mjs +29 -2
- package/dist/charts/kinds/time-plot.mjs +1 -1
- package/dist/charts/kinds/time-stops.mjs +58 -29
- package/dist/charts/kinds/waterfall-data.d.mts +3 -3
- package/dist/charts/kinds/waterfall-data.mjs +2 -2
- package/dist/charts/kinds/waterfall.d.mts +5 -4
- package/dist/charts/kinds/waterfall.mjs +29 -2
- package/dist/charts/layout/frame.mjs +5 -3
- package/dist/charts/layout/stack.mjs +43 -22
- package/dist/charts/marks/axes.mjs +12 -6
- package/dist/charts/marks/budget.mjs +14 -0
- package/dist/charts/marks/end-labels.mjs +24 -10
- package/dist/charts/marks/legend.mjs +19 -8
- package/dist/charts/marks/lines.mjs +3 -3
- package/dist/charts/marks/more.mjs +79 -13
- package/dist/charts/marks/notes.mjs +12 -6
- package/dist/charts/marks/series-line.mjs +14 -10
- package/dist/charts/marks/thin.mjs +16 -33
- package/dist/charts/marks/x-axis.mjs +3 -2
- package/dist/charts/scale/calendar.mjs +41 -26
- package/dist/charts/scale/linear.mjs +58 -0
- package/dist/charts/scale/value.d.mts +21 -0
- package/dist/charts/scale/value.mjs +67 -9
- package/dist/charts/scene/lazy.mjs +27 -0
- package/dist/charts/scene/markup.mjs +2 -1
- package/dist/charts/scene/svg.mjs +20 -8
- package/dist/charts/scene/types.d.mts +34 -0
- package/dist/charts/text/measure.mjs +33 -3
- package/dist/charts/theme.d.mts +25 -25
- package/dist/charts/theme.mjs +47 -30
- package/dist/charts-react/Chart.d.mts +20 -0
- package/dist/charts-react/Chart.mjs +9 -67
- package/dist/charts-react/Reader.mjs +50 -96
- package/dist/charts-react/box.mjs +106 -0
- package/dist/charts-react/bucket-names.mjs +9 -24
- package/dist/charts-react/columns-picture.mjs +12 -0
- package/dist/charts-react/exact-sum.mjs +4 -7
- package/dist/charts-react/from-answer.mjs +9 -4
- package/dist/charts-react/index.d.mts +9 -2
- package/dist/charts-react/index.mjs +9 -2
- package/dist/charts-react/kinds/area.d.mts +4 -0
- package/dist/charts-react/kinds/area.mjs +38 -0
- package/dist/charts-react/kinds/bar.d.mts +4 -0
- package/dist/charts-react/kinds/bar.mjs +15 -0
- package/dist/charts-react/kinds/funnel.d.mts +4 -0
- package/dist/charts-react/kinds/funnel.mjs +13 -0
- package/dist/charts-react/kinds/heatmap.d.mts +4 -0
- package/dist/charts-react/kinds/heatmap.mjs +13 -0
- package/dist/charts-react/kinds/line.d.mts +4 -0
- package/dist/charts-react/kinds/line.mjs +20 -0
- package/dist/charts-react/kinds/multiples.d.mts +4 -0
- package/dist/charts-react/kinds/multiples.mjs +33 -0
- package/dist/charts-react/kinds/number.d.mts +5 -0
- package/dist/charts-react/kinds/number.mjs +86 -0
- package/dist/charts-react/plan-bars.mjs +15 -8
- package/dist/charts-react/plan-funnel.mjs +3 -1
- package/dist/charts-react/plan-grid.mjs +14 -5
- package/dist/charts-react/plan-of.mjs +17 -0
- package/dist/charts-react/plan-parts.mjs +16 -5
- package/dist/charts-react/plan-time.mjs +4 -53
- package/dist/charts-react/reader-page.d.mts +1 -1
- package/dist/charts-react/reader-page.mjs +19 -9
- package/dist/charts-react/renderers.d.mts +14 -0
- package/dist/charts-react/renderers.mjs +22 -0
- package/dist/charts-react/table.d.mts +1 -0
- package/dist/charts-react/table.mjs +108 -0
- package/dist/charts-react/tiles.mjs +21 -49
- package/dist/charts-react/useScene.mjs +45 -17
- package/dist/charts-react/words.mjs +19 -0
- package/dist/checks.mjs +97 -19
- package/dist/cli/add.mjs +4 -3
- package/dist/cli/doctor.mjs +2 -2
- package/dist/core/conformance/index.d.mts +5 -2
- package/dist/core/conformance/index.mjs +5 -2
- package/dist/core/conformance/memory/aggregate.mjs +11 -6
- package/dist/core/conformance/memory/rows.d.mts +7 -3
- package/dist/core/conformance/memory/rows.mjs +19 -13
- package/dist/core/conformance/memory/source.mjs +4 -4
- package/dist/core/document/control-fields.d.mts +20 -0
- package/dist/core/document/control-fields.mjs +117 -0
- package/dist/core/document/display-comparisons.d.mts +17 -0
- package/dist/core/document/display-comparisons.mjs +15 -4
- package/dist/core/document/display-entries.d.mts +14 -0
- package/dist/core/document/display-entries.mjs +25 -9
- package/dist/core/document/display-validation.d.mts +5 -1
- package/dist/core/document/display-validation.mjs +14 -7
- package/dist/core/document/display.d.mts +11 -8
- package/dist/core/document/display.mjs +26 -3
- package/dist/core/document/layout.d.mts +8 -9
- package/dist/core/document/layout.mjs +23 -6
- package/dist/core/document/stacked.d.mts +0 -7
- package/dist/core/document/types.mjs +8 -6
- package/dist/core/document/upgrade.d.mts +1 -0
- package/dist/core/document/upgrade.mjs +4 -2
- package/dist/core/engine/access.mjs +3 -3
- package/dist/core/engine/assert.mjs +4 -2
- package/dist/core/engine/bucket.mjs +2 -2
- package/dist/core/engine/checks.mjs +6 -7
- package/dist/core/engine/custom/ask.mjs +22 -2
- package/dist/core/engine/custom/cells.mjs +22 -22
- package/dist/core/engine/custom/level.mjs +12 -13
- package/dist/core/engine/custom/measures.mjs +12 -9
- package/dist/core/engine/custom/reader.mjs +3 -1
- package/dist/core/engine/custom/records.mjs +8 -7
- package/dist/core/engine/custom/unread.mjs +78 -0
- package/dist/core/engine/custom/where.mjs +15 -10
- package/dist/core/engine/index.d.mts +2 -13
- package/dist/core/engine/index.mjs +2 -12
- package/dist/core/engine/measure.mjs +1 -0
- package/dist/core/engine/members.mjs +7 -3
- package/dist/core/engine/nan.mjs +10 -1
- package/dist/core/engine/native.mjs +2 -20
- package/dist/core/engine/numbers.mjs +26 -14
- package/dist/core/engine/postgres.mjs +9 -5
- package/dist/core/engine/prepare.mjs +4 -4
- package/dist/core/engine/rank-sets.mjs +1 -1
- package/dist/core/engine/read.mjs +5 -4
- package/dist/core/engine/reader.d.mts +6 -0
- package/dist/core/engine/record-layout.mjs +3 -3
- package/dist/core/engine/run.mjs +77 -20
- package/dist/core/engine/segmented.d.mts +2 -1
- package/dist/core/engine/segmented.mjs +19 -12
- package/dist/core/engine/series.mjs +1 -1
- package/dist/core/engine/shape.mjs +8 -8
- package/dist/core/engine/sql-partition.mjs +2 -2
- package/dist/core/engine/sql-pass.mjs +3 -2
- package/dist/core/engine/sql-reader.mjs +13 -5
- package/dist/core/engine/sql-reads.mjs +2 -1
- package/dist/core/engine/sql-records.mjs +2 -2
- package/dist/core/engine/sql-split.mjs +1 -1
- package/dist/core/engine/sql-unread.mjs +70 -0
- package/dist/core/engine/time.mjs +2 -1
- package/dist/core/engine/types.d.mts +17 -0
- package/dist/core/engine/version.d.mts +1 -1
- package/dist/core/engine/version.mjs +1 -1
- package/dist/core/error/codes.d.mts +24 -1
- package/dist/core/error/codes.mjs +23 -3
- package/dist/core/error/refusal.d.mts +8 -3
- package/dist/core/error/refusal.mjs +6 -1
- package/dist/core/exact/decimal.d.mts +1 -14
- package/dist/core/exact/decimal.mjs +9 -19
- package/dist/core/exact/stored.d.mts +9 -0
- package/dist/core/exact/stored.mjs +38 -0
- package/dist/core/exact/text.d.mts +16 -1
- package/dist/core/exact/text.mjs +50 -1
- package/dist/core/format/digits.mjs +55 -0
- package/dist/core/format/index.d.mts +16 -0
- package/dist/core/format/index.mjs +27 -0
- package/dist/core/format/number.d.mts +27 -0
- package/dist/core/format/number.mjs +158 -0
- package/dist/core/format/write.d.mts +6 -0
- package/dist/core/format/write.mjs +57 -0
- package/dist/core/index.d.mts +43 -33
- package/dist/core/index.mjs +31 -28
- package/dist/core/model/defaults.d.mts +18 -1
- package/dist/core/model/defaults.mjs +19 -1
- package/dist/core/model/define.d.mts +17 -8
- package/dist/core/model/define.mjs +2 -0
- package/dist/core/model/member.d.mts +5 -3
- package/dist/core/model/member.mjs +33 -6
- package/dist/core/model/storage.mjs +40 -12
- package/dist/core/model/types.d.mts +17 -1
- package/dist/core/model/types.mjs +5 -0
- package/dist/core/model/validate/expr.d.mts +1 -7
- package/dist/core/model/validate/fields.d.mts +2 -0
- package/dist/core/model/validate/fields.mjs +14 -7
- package/dist/core/model/validate/issues.mjs +5 -1
- package/dist/core/model/validate/known-members.mjs +6 -5
- package/dist/core/model/validate/shape.mjs +36 -3
- package/dist/core/model/validate/source.mjs +2 -2
- package/dist/core/oracle/data.d.mts +4 -2
- package/dist/core/oracle/evaluate.d.mts +19 -1
- package/dist/core/oracle/evaluate.mjs +56 -10
- package/dist/core/oracle/expr.mjs +1 -1
- package/dist/core/oracle/facts.mjs +12 -5
- package/dist/core/oracle/measure.mjs +1 -1
- package/dist/core/oracle/request.mjs +39 -4
- package/dist/core/oracle/segmented.d.mts +3 -1
- package/dist/core/oracle/segmented.mjs +19 -13
- package/dist/core/oracle/unread.mjs +32 -0
- package/dist/core/oracle/visibility.mjs +4 -3
- package/dist/core/policy/bind.d.mts +2 -11
- package/dist/core/policy/bind.mjs +1 -1
- package/dist/core/policy/match.mjs +1 -1
- package/dist/core/query/closure.d.mts +7 -2
- package/dist/core/query/closure.mjs +29 -12
- package/dist/core/query/compose-tile.d.mts +3 -2
- package/dist/core/query/compose-tile.mjs +32 -13
- package/dist/core/query/compose.d.mts +0 -5
- package/dist/core/query/drill/internal.d.mts +5 -5
- package/dist/core/query/drill/internal.mjs +11 -0
- package/dist/core/query/drill/links.d.mts +2 -3
- package/dist/core/query/drill/links.mjs +18 -4
- package/dist/core/query/drill/selection.d.mts +8 -2
- package/dist/core/query/drill/selection.mjs +14 -3
- package/dist/core/query/drill/synthetic.mjs +1 -1
- package/dist/core/query/drill/time.mjs +11 -10
- package/dist/core/query/filter.d.mts +1 -6
- package/dist/core/query/filter.mjs +1 -4
- package/dist/core/query/fold.mjs +23 -0
- package/dist/core/query/segments.mjs +42 -3
- package/dist/core/query/to-wire.d.mts +7 -0
- package/dist/core/query/to-wire.mjs +14 -2
- package/dist/core/query/types.d.mts +30 -13
- package/dist/core/result/columns.mjs +23 -13
- package/dist/core/result/number.mjs +3 -3
- package/dist/core/result/status.d.mts +13 -0
- package/dist/core/result/status.mjs +18 -0
- package/dist/core/result/time-axis.d.mts +14 -13
- package/dist/core/result/time-axis.mjs +20 -2
- package/dist/core/result/types.d.mts +33 -3
- package/dist/core/result/whole.d.mts +23 -0
- package/dist/core/result/whole.mjs +27 -0
- package/dist/core/schema/agent-query.d.mts +89 -0
- package/dist/core/schema/agent-query.mjs +115 -0
- package/dist/core/schema/aliases.mjs +1 -52
- package/dist/core/schema/answer-parts.mjs +17 -13
- package/dist/core/schema/answers.d.mts +787 -319
- package/dist/core/schema/commands.d.mts +33 -23
- package/dist/core/schema/commands.mjs +26 -18
- package/dist/core/schema/custom.mjs +46 -45
- package/dist/core/schema/document.d.mts +32 -27
- package/dist/core/schema/document.mjs +61 -81
- package/dist/core/schema/drill-answers.mjs +4 -1
- package/dist/core/schema/drill.d.mts +14 -9
- package/dist/core/schema/drill.mjs +23 -22
- package/dist/core/schema/index.d.mts +5 -3
- package/dist/core/schema/index.mjs +5 -3
- package/dist/core/schema/options.d.mts +92 -0
- package/dist/core/schema/options.mjs +104 -0
- package/dist/core/schema/picks.d.mts +2 -2
- package/dist/core/schema/picks.mjs +7 -6
- package/dist/core/schema/query.d.mts +9 -83
- package/dist/core/schema/query.mjs +49 -73
- package/dist/core/schema/strict.d.mts +3 -0
- package/dist/core/schema/strict.mjs +91 -0
- package/dist/core/schema/union-error.mjs +30 -7
- package/dist/core/schema/view.d.mts +4 -3
- package/dist/core/schema/view.mjs +16 -11
- package/dist/core/store/ddl.d.mts +0 -2
- package/dist/core/store/ddl.mjs +1 -5
- package/dist/core/time/bucket.d.mts +1 -18
- package/dist/core/time/bucket.mjs +12 -8
- package/dist/core/time/compare.mjs +3 -2
- package/dist/core/time/index.d.mts +7 -8
- package/dist/core/time/instant.d.mts +15 -9
- package/dist/core/time/instant.mjs +23 -9
- package/dist/core/time/range.d.mts +3 -15
- package/dist/core/time/range.mjs +17 -7
- package/dist/core/time/stored.d.mts +8 -5
- package/dist/core/time/stored.mjs +51 -15
- package/dist/core/time/temporal.d.mts +1 -5
- package/dist/core/time/temporal.mjs +9 -4
- package/dist/core/time/text-time.d.mts +31 -2
- package/dist/core/time/text-time.mjs +139 -22
- package/dist/core/time/zone.d.mts +6 -1
- package/dist/core/time/zone.mjs +13 -4
- package/dist/core/types/api.d.mts +1 -1
- package/dist/core/types/api.mjs +1 -1
- package/dist/core/types/dashboard.d.mts +185 -0
- package/dist/core/types/dashboard.mjs +26 -0
- package/dist/core/types/drill-api.d.mts +14 -2
- package/dist/core/types/infer.d.mts +0 -4
- package/dist/core/types/options-check.d.mts +42 -0
- package/dist/core/types/options-check.mjs +90 -0
- package/dist/core/types/options.d.mts +14 -8
- package/dist/core/value/casefold.d.mts +1 -3
- package/dist/core/value/stored.d.mts +26 -0
- package/dist/core/value/stored.mjs +28 -0
- package/dist/cursor-seal.mjs +37 -9
- package/dist/dashboard-documents.d.mts +14 -6
- package/dist/dashboard-documents.mjs +32 -12
- package/dist/dashboards.mjs +10 -9
- package/dist/drill-access.mjs +6 -6
- package/dist/drill-change.mjs +18 -20
- package/dist/drill-comparison.mjs +2 -1
- package/dist/drill-crumbs.mjs +63 -28
- package/dist/drill-distinct.mjs +2 -1
- package/dist/drill-explain.mjs +1 -1
- package/dist/drill-items.mjs +1 -1
- package/dist/drill-open.mjs +39 -23
- package/dist/drill-seal.mjs +41 -13
- package/dist/drill-share.mjs +1 -1
- package/dist/drill-summary.mjs +2 -1
- package/dist/drill-targets.mjs +4 -4
- package/dist/drill-views.mjs +4 -3
- package/dist/drill.mjs +1 -1
- package/dist/editing.mjs +5 -3
- package/dist/endpoints/index.d.mts +29 -8
- package/dist/endpoints/index.mjs +4 -1
- package/dist/endpoints/meta.mjs +4 -3
- package/dist/endpoints/query.mjs +5 -2
- package/dist/endpoints/read.mjs +7 -6
- package/dist/endpoints/versions.mjs +2 -1
- package/dist/execute.d.mts +3 -0
- package/dist/execute.mjs +23 -12
- package/dist/grant.d.mts +9 -0
- package/dist/grant.mjs +43 -0
- package/dist/handler.mjs +8 -13
- package/dist/http.d.mts +6 -2
- package/dist/http.mjs +6 -2
- package/dist/index.d.mts +25 -4
- package/dist/index.mjs +91 -40
- package/dist/llms.txt +3 -3
- package/dist/mcp/api.mjs +2 -1
- package/dist/mcp/query.mjs +3 -8
- package/dist/mcp/resolve.mjs +9 -2
- package/dist/node/index.d.mts +36 -0
- package/dist/node/index.mjs +89 -0
- package/dist/node/request.d.mts +12 -0
- package/dist/node/request.mjs +119 -0
- package/dist/node/response.mjs +58 -0
- package/dist/principal.mjs +15 -7
- package/dist/react/Canvas.mjs +90 -69
- package/dist/react/Cell.mjs +2 -1
- package/dist/react/Dashboard.d.mts +15 -1
- package/dist/react/Dashboard.mjs +43 -42
- package/dist/react/DashboardList.mjs +9 -4
- package/dist/react/Editing.d.mts +9 -0
- package/dist/react/Editing.mjs +8 -3
- package/dist/react/Grid.mjs +1 -1
- package/dist/react/Header.mjs +25 -52
- package/dist/react/History.mjs +3 -2
- package/dist/react/LoadFailed.mjs +59 -0
- package/dist/react/Panel.d.mts +1 -1
- package/dist/react/Panel.mjs +1 -1
- package/dist/react/Parts.d.mts +34 -0
- package/dist/react/Parts.mjs +9 -6
- package/dist/react/ReviewPanel.mjs +1 -1
- package/dist/react/RowBody.d.mts +2 -0
- package/dist/react/RowBody.mjs +5 -1
- package/dist/react/Share.mjs +153 -0
- package/dist/react/TabStrip.mjs +37 -0
- package/dist/react/Tile.d.mts +3 -1
- package/dist/react/Tile.mjs +89 -92
- package/dist/react/TileState.mjs +117 -0
- package/dist/react/ago.mjs +45 -0
- package/dist/react/arrange.mjs +1 -1
- package/dist/react/board.mjs +2 -2
- package/dist/react/bucket-name.d.mts +8 -0
- package/dist/react/bucket-name.mjs +13 -0
- package/dist/react/builder/DisplayOptions.mjs +219 -0
- package/dist/react/builder/Preview.mjs +13 -13
- package/dist/react/builder/RangeEditor.mjs +4 -3
- package/dist/react/builder/WidgetBuilder.d.mts +1 -7
- package/dist/react/builder/WidgetBuilder.mjs +12 -3
- package/dist/react/builder/base.d.mts +13 -2
- package/dist/react/builder/base.mjs +70 -12
- package/dist/react/builder/display.d.mts +3 -0
- package/dist/react/builder/display.mjs +256 -0
- package/dist/react/builder/labels.mjs +19 -5
- package/dist/react/builder/options.mjs +11 -6
- package/dist/react/builder/state.mjs +25 -3
- package/dist/react/builder/useBuilder.d.mts +7 -1
- package/dist/react/builder/useBuilder.mjs +6 -9
- package/dist/react/builder/usePreview.mjs +3 -2
- package/dist/react/builder/words.d.mts +16 -1
- package/dist/react/builder/words.mjs +41 -1
- package/dist/react/change-text.mjs +149 -0
- package/dist/react/client.d.mts +9 -0
- package/dist/react/client.mjs +105 -14
- package/dist/react/columns.mjs +9 -1
- package/dist/react/context.d.mts +24 -3
- package/dist/react/context.mjs +23 -7
- package/dist/react/dates-shown.mjs +76 -0
- package/dist/react/draft.mjs +3 -2
- package/dist/react/drill/Bars.mjs +12 -16
- package/dist/react/drill/Comparison.mjs +1 -1
- package/dist/react/drill/DrillPanel.d.mts +1 -1
- package/dist/react/drill/DrillPanel.mjs +2 -1
- package/dist/react/drill/Header.mjs +65 -12
- package/dist/react/drill/Items.d.mts +1 -1
- package/dist/react/drill/Notes.mjs +10 -7
- package/dist/react/drill/PanelStates.mjs +8 -1
- package/dist/react/drill/Trend.mjs +10 -5
- package/dist/react/drill/board.d.mts +1 -1
- package/dist/react/drill/board.mjs +1 -0
- package/dist/react/drill/host.mjs +4 -1
- package/dist/react/drill/lazy.mjs +2 -27
- package/dist/react/drill/props.d.mts +19 -8
- package/dist/react/drill/props.mjs +62 -18
- package/dist/react/drill/state.d.mts +15 -5
- package/dist/react/drill/state.mjs +12 -3
- package/dist/react/drill/words.d.mts +46 -3
- package/dist/react/drill/words.mjs +30 -5
- package/dist/react/english.mjs +33 -8
- package/dist/react/export/ExportButton.mjs +4 -1
- package/dist/react/export/csv.d.mts +7 -2
- package/dist/react/export/csv.mjs +24 -7
- package/dist/react/failure-words.mjs +60 -0
- package/dist/react/filters/bar.d.mts +1 -1
- package/dist/react/filters/bar.mjs +4 -1
- package/dist/react/filters/calendar.mjs +23 -8
- package/dist/react/filters/chip.mjs +7 -3
- package/dist/react/filters/context.d.mts +13 -1
- package/dist/react/filters/context.mjs +1 -1
- package/dist/react/filters/dates-said.mjs +57 -0
- package/dist/react/filters/days.d.mts +3 -4
- package/dist/react/filters/days.mjs +10 -17
- package/dist/react/filters/hooks.d.mts +11 -0
- package/dist/react/filters/hooks.mjs +10 -6
- package/dist/react/filters/menu-search.mjs +17 -9
- package/dist/react/filters/menu.mjs +10 -8
- package/dist/react/filters/phone.mjs +41 -16
- package/dist/react/filters/place.mjs +40 -0
- package/dist/react/filters/popover.mjs +18 -13
- package/dist/react/filters/rules.d.mts +4 -3
- package/dist/react/filters/rules.mjs +3 -3
- package/dist/react/filters/sheet.mjs +7 -3
- package/dist/react/filters/state.mjs +6 -1
- package/dist/react/filters/values.mjs +24 -7
- package/dist/react/filters/words.d.mts +13 -0
- package/dist/react/filters/words.mjs +5 -0
- package/dist/react/format-time.d.mts +17 -6
- package/dist/react/format-time.mjs +152 -33
- package/dist/react/format.d.mts +3 -3
- package/dist/react/format.mjs +35 -122
- package/dist/react/headline.d.mts +12 -0
- package/dist/react/headline.mjs +107 -0
- package/dist/react/index.d.mts +20 -17
- package/dist/react/index.mjs +13 -10
- package/dist/react/lazy.mjs +38 -0
- package/dist/react/messages.d.mts +78 -2
- package/dist/react/now.mjs +38 -0
- package/dist/react/place.mjs +4 -2
- package/dist/react/read.d.mts +1 -0
- package/dist/react/read.mjs +140 -9
- package/dist/react/renderers/exact.mjs +31 -59
- package/dist/react/renderers/index.d.mts +27 -6
- package/dist/react/renderers/index.mjs +154 -92
- package/dist/react/renderers/list-parts.mjs +24 -0
- package/dist/react/renderers/list.d.mts +1 -0
- package/dist/react/renderers/list.mjs +99 -43
- package/dist/react/renderers/more-rows.mjs +75 -0
- package/dist/react/renderers/number-before.mjs +320 -0
- package/dist/react/renderers/number-period.mjs +54 -0
- package/dist/react/renderers/number-whole.mjs +29 -0
- package/dist/react/renderers/props.d.mts +24 -1
- package/dist/react/renderers/props.mjs +8 -0
- package/dist/react/renderers/table-cells.mjs +137 -31
- package/dist/react/renderers/table-fit.mjs +55 -10
- package/dist/react/renderers/table-measure.mjs +29 -9
- package/dist/react/renderers/table-row.mjs +14 -9
- package/dist/react/renderers/table-scale.mjs +2 -3
- package/dist/react/renderers/table-sort.mjs +3 -2
- package/dist/react/renderers/table-whole.mjs +37 -0
- package/dist/react/renderers/table.mjs +73 -53
- package/dist/react/review.d.mts +7 -0
- package/dist/react/review.mjs +35 -8
- package/dist/react/roving.d.mts +6 -0
- package/dist/react/roving.mjs +123 -0
- package/dist/react/says-dates.d.mts +7 -0
- package/dist/react/says-dates.mjs +51 -0
- package/dist/react/series.mjs +5 -6
- package/dist/react/stable.mjs +1 -1
- package/dist/react/tabs/EditTabs.mjs +125 -0
- package/dist/react/tabs/NameField.mjs +72 -0
- package/dist/react/tabs/TabMenu.mjs +175 -0
- package/dist/react/tabs/actions.mjs +37 -0
- package/dist/react/tabs/commands.mjs +76 -0
- package/dist/react/tabs/focus.mjs +22 -0
- package/dist/react/tabs/keys.mjs +28 -0
- package/dist/react/theme-unlayered.css +1 -1
- package/dist/react/theme.css +1 -1
- package/dist/react/tile-store.d.mts +4 -0
- package/dist/react/tile-store.mjs +93 -13
- package/dist/react/touch.d.mts +16 -0
- package/dist/react/touch.mjs +39 -0
- package/dist/react/useBoard.d.mts +6 -0
- package/dist/react/useBoard.mjs +1 -0
- package/dist/react/useDashboard.d.mts +2 -0
- package/dist/react/useDashboard.mjs +5 -2
- package/dist/react/useTiles.d.mts +3 -0
- package/dist/react/useTiles.mjs +73 -17
- package/dist/react/view-grid.mjs +2 -2
- package/dist/react/view.mjs +1 -1
- package/dist/recharts/axes.mjs +1 -1
- package/dist/recharts/axis.mjs +23 -73
- package/dist/recharts/bar.d.mts +2 -1
- package/dist/recharts/bar.mjs +140 -64
- package/dist/recharts/fit.mjs +33 -0
- package/dist/recharts/line.mjs +23 -17
- package/dist/recharts/marks.mjs +2 -1
- package/dist/recharts/parts.mjs +19 -14
- package/dist/recharts/table.mjs +8 -3
- package/dist/refusal.mjs +46 -0
- package/dist/registry/filter-bar.json +1 -1
- package/dist/skills/derive-dashboards/SKILL.md +25 -9
- package/dist/tile-doc.mjs +1 -1
- package/package.json +21 -6
- package/dist/charts-react/plan.d.mts +0 -3
- package/dist/charts-react/plan.mjs +0 -37
- package/dist/charts-react/tiles.d.mts +0 -24
- package/dist/core/policy/match.d.mts +0 -16
- package/dist/core/schema/aliases.d.mts +0 -7
- package/dist/core/time/compare.d.mts +0 -30
- package/dist/react/EditBar.d.mts +0 -16
- package/dist/react/History.d.mts +0 -30
- package/dist/react/ReviewPanel.d.mts +0 -15
- package/dist/react/digits.mjs +0 -46
- package/dist/react/drill/trend-touch.mjs +0 -33
- package/dist/react/renderers/exact.d.mts +0 -6
package/dist/react/index.mjs
CHANGED
|
@@ -1,45 +1,48 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { formatBucket, formatInstant, formatInstantAt } from "./format-time.mjs";
|
|
3
|
+
import { bucketName } from "./bucket-name.mjs";
|
|
2
4
|
import { WidgetPreview } from "./builder/Preview.mjs";
|
|
3
5
|
import { useBuilder } from "./builder/useBuilder.mjs";
|
|
4
|
-
import { WidgetBuilder } from "./builder/WidgetBuilder.mjs";
|
|
5
6
|
import { createDashboardsClient } from "./client.mjs";
|
|
6
7
|
import { DashboardsProvider, useDashboards } from "./context.mjs";
|
|
8
|
+
import { DashboardsError } from "./errors.mjs";
|
|
7
9
|
import { Dashboard } from "./Dashboard.mjs";
|
|
8
10
|
import { DashboardList } from "./DashboardList.mjs";
|
|
9
11
|
import { useDraft } from "./draft.mjs";
|
|
10
12
|
import { DashboardTile } from "./drill/DashboardTile.mjs";
|
|
11
13
|
import { DrillPanel } from "./drill/lazy.mjs";
|
|
12
|
-
import { formatBucket, formatInstant, formatInstantAt } from "./format-time.mjs";
|
|
13
|
-
import { exactDigits } from "./renderers/exact.mjs";
|
|
14
14
|
import { drillFrom } from "./drill/state.mjs";
|
|
15
15
|
import { useDrill } from "./drill/useDrill.mjs";
|
|
16
16
|
import { ENGLISH_DRILL } from "./drill/words.mjs";
|
|
17
|
-
import {
|
|
18
|
-
import { EditBar } from "./EditBar.mjs";
|
|
17
|
+
import { WidgetBuilder } from "./Editing.mjs";
|
|
19
18
|
import { csvOf, exportRows } from "./export/csv.mjs";
|
|
20
|
-
import {
|
|
19
|
+
import { fitted } from "./renderers/props.mjs";
|
|
21
20
|
import { downloadCsv } from "./export/download.mjs";
|
|
21
|
+
import { TableTile } from "./renderers/table.mjs";
|
|
22
22
|
import { ENGLISH_FILTERS } from "./filters/words.mjs";
|
|
23
23
|
import { FilterBar } from "./filters/bar.mjs";
|
|
24
24
|
import { fieldOf, useControlValues, useFilterFields } from "./filters/hooks.mjs";
|
|
25
25
|
import { rules_exports } from "./filters/rules.mjs";
|
|
26
26
|
import { Popover } from "./filters/popover.mjs";
|
|
27
27
|
import { formatCell, formatTick, plotValue } from "./format.mjs";
|
|
28
|
-
import {
|
|
28
|
+
import { formatHeadline } from "./headline.mjs";
|
|
29
29
|
import { ENGLISH } from "./english.mjs";
|
|
30
30
|
import { ChangeList, Panel } from "./Panel.mjs";
|
|
31
|
-
import { ReviewPanel } from "./
|
|
31
|
+
import { EditBar, HistoryPanel, ReviewPanel, VersionBar } from "./Parts.mjs";
|
|
32
32
|
import { answerIds } from "./renderers/entries.mjs";
|
|
33
|
-
import { NumberTile } from "./renderers/index.mjs";
|
|
33
|
+
import { BUILTIN_RENDERERS, NumberTile, headlineColumn } from "./renderers/index.mjs";
|
|
34
34
|
import { ListTile } from "./renderers/list.mjs";
|
|
35
35
|
import { useReview } from "./review.mjs";
|
|
36
36
|
import { ENGLISH_REVIEW } from "./review-words.mjs";
|
|
37
|
+
import { Roving } from "./roving.mjs";
|
|
38
|
+
import { useSaysDates } from "./says-dates.mjs";
|
|
37
39
|
import { SeriesSlotsContext } from "./scope.mjs";
|
|
38
40
|
import { OTHER_KEY, lastBucketOpen, toSeries } from "./series.mjs";
|
|
39
41
|
import { pointCell, pointText, rowAt } from "./series-points.mjs";
|
|
40
42
|
import { chartColors, seriesSlots } from "./series-slots.mjs";
|
|
41
43
|
import { Tile } from "./Tile.mjs";
|
|
44
|
+
import { tapOpens, useTapPreview } from "./touch.mjs";
|
|
42
45
|
import { useBoard } from "./useBoard.mjs";
|
|
43
46
|
import { useDashboard } from "./useDashboard.mjs";
|
|
44
47
|
import { useTiles } from "./useTiles.mjs";
|
|
45
|
-
export { ChangeList, Dashboard, DashboardList, DashboardTile, DashboardsError, DashboardsProvider, DrillPanel, ENGLISH, ENGLISH_DRILL, ENGLISH_FILTERS, ENGLISH_REVIEW, EditBar, FilterBar, HistoryPanel, ListTile, NumberTile, OTHER_KEY, Panel, Popover, ReviewPanel, SeriesSlotsContext, TableTile, Tile, VersionBar, WidgetBuilder, WidgetPreview, answerIds, chartColors, createDashboardsClient, csvOf, downloadCsv, drillFrom,
|
|
48
|
+
export { BUILTIN_RENDERERS, ChangeList, Dashboard, DashboardList, DashboardTile, DashboardsError, DashboardsProvider, DrillPanel, ENGLISH, ENGLISH_DRILL, ENGLISH_FILTERS, ENGLISH_REVIEW, EditBar, FilterBar, HistoryPanel, ListTile, NumberTile, OTHER_KEY, Panel, Popover, ReviewPanel, Roving, SeriesSlotsContext, TableTile, Tile, VersionBar, WidgetBuilder, WidgetPreview, answerIds, bucketName, chartColors, createDashboardsClient, csvOf, downloadCsv, drillFrom, exportRows, fieldOf, rules_exports as filterRules, fitted, formatBucket, formatCell, formatHeadline, formatInstant, formatInstantAt, formatTick, headlineColumn, lastBucketOpen, plotValue, pointCell, pointText, rowAt, seriesSlots, tapOpens, toSeries, useBoard, useBuilder, useControlValues, useDashboard, useDashboards, useDraft, useDrill, useFilterFields, useReview, useSaysDates, useTapPreview, useTiles };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/lazy.tsx
|
|
4
|
+
/**
|
|
5
|
+
* A part only some viewers open (the drill panel, the widget builder, the tabs while editing),
|
|
6
|
+
* its module loaded on the first mount, never on the server, so a dashboard that never opens it
|
|
7
|
+
* never downloads it. Each mounted part hears when the one shared import settles; until then it
|
|
8
|
+
* draws nothing, or `Before` where what stands in its place must not blink away, and a failed
|
|
9
|
+
* import is thrown to the nearest error boundary.
|
|
10
|
+
*/
|
|
11
|
+
function lazyPart(load, Before) {
|
|
12
|
+
let loaded = null;
|
|
13
|
+
let pending;
|
|
14
|
+
const settle = async () => {
|
|
15
|
+
try {
|
|
16
|
+
loaded = { part: await load() };
|
|
17
|
+
} catch (error) {
|
|
18
|
+
loaded = { error };
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const subscribe = (notify) => {
|
|
22
|
+
let listener = notify;
|
|
23
|
+
pending ??= settle();
|
|
24
|
+
pending.then(() => listener?.());
|
|
25
|
+
return () => {
|
|
26
|
+
listener = void 0;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
const snapshot = () => loaded;
|
|
30
|
+
const serverSnapshot = () => null;
|
|
31
|
+
return function LazyPart(props) {
|
|
32
|
+
const module = useSyncExternalStore(subscribe, snapshot, serverSnapshot);
|
|
33
|
+
if (module === null) return Before === void 0 ? null : /* @__PURE__ */ jsx(Before, { ...props });
|
|
34
|
+
if ("error" in module) throw module.error;
|
|
35
|
+
return /* @__PURE__ */ jsx(module.part, { ...props });
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export { lazyPart };
|
|
@@ -23,15 +23,62 @@ export type Messages = ReviewMessages & DrillMessages & BuilderMessages & {
|
|
|
23
23
|
sortBy: (column: string) => string;
|
|
24
24
|
/** Under a long table that draws its first rows only: "Show 500 more of 5,000 rows". Both counts are already written for the reader. */
|
|
25
25
|
showMoreRows: (more: string, of: string) => string;
|
|
26
|
+
/** On the same button once every row is drawn: folds a long table or list back to its first rows. */
|
|
27
|
+
showFirstRows: (first: string) => string;
|
|
26
28
|
loading: string;
|
|
29
|
+
/** A tile of a kind no renderer draws: the kind, and the kinds the provider has renderers for. */
|
|
30
|
+
noRenderer: (kind: string, kinds: readonly string[]) => string;
|
|
27
31
|
noAccess: string;
|
|
28
32
|
noData: string;
|
|
29
33
|
noRows: string;
|
|
30
34
|
/** Beside the last time bucket while it is still running: its value is not final yet. */
|
|
31
35
|
soFar: string;
|
|
36
|
+
/**
|
|
37
|
+
* In place of a tile's dates, once the viewer has picked dates, on a tile that reads every
|
|
38
|
+
* date whatever is picked (a lifetime figure).
|
|
39
|
+
*/
|
|
40
|
+
tileAllTime: string;
|
|
32
41
|
dashboardFailed: string;
|
|
42
|
+
/**
|
|
43
|
+
* After `dashboardFailed`, when something in front of the handler answered that the
|
|
44
|
+
* viewer is not signed in or may not ask (a 401 or a 403 with no handler behind it):
|
|
45
|
+
* most often a session that ended while the page was open.
|
|
46
|
+
*/
|
|
47
|
+
dashboardSignedOut: string;
|
|
48
|
+
/**
|
|
49
|
+
* After `dashboardFailed`, when nothing is mounted where the page asks (a 404 with no
|
|
50
|
+
* handler behind it): the page is set up wrong, which a retry does not change. What is
|
|
51
|
+
* missing is written to the browser's console.
|
|
52
|
+
*/
|
|
53
|
+
dashboardSetup: string;
|
|
54
|
+
/** After `dashboardFailed`, with "Try again": the server said to wait (a 429, a 503). */
|
|
55
|
+
dashboardBusy: string;
|
|
56
|
+
/** After `dashboardFailed`, with "Try again": the server failed (a 500). */
|
|
57
|
+
dashboardServerFailed: string;
|
|
58
|
+
/** An action that never reached the server, or met a server that could not answer just now. */
|
|
59
|
+
serverUnreachable: string;
|
|
33
60
|
/** A dashboard already shown, while the server cannot be reached. */
|
|
34
61
|
dashboardUnreachable: string;
|
|
62
|
+
/**
|
|
63
|
+
* A dashboard already shown, when reading it again met a sign-in layer turning the viewer
|
|
64
|
+
* away (a 401, a 403 or a redirect with no handler behind it): the session may have ended.
|
|
65
|
+
* It does not update until the viewer signs in again.
|
|
66
|
+
*/
|
|
67
|
+
dashboardSignedOutShown: string;
|
|
68
|
+
/**
|
|
69
|
+
* On a tile that still shows its answer to the filters picked before, because a sign-in
|
|
70
|
+
* layer turned away its request for the filters picked now.
|
|
71
|
+
*/
|
|
72
|
+
tileNotUpdated: string;
|
|
73
|
+
/**
|
|
74
|
+
* On a tile that still shows its answer to the filters picked before, because the request
|
|
75
|
+
* for the filters picked now did not arrive or the server failed it: it is asked for again.
|
|
76
|
+
*/
|
|
77
|
+
tileNotUpdatedYet: string;
|
|
78
|
+
/** Said once for the whole dashboard, to a screen reader: how many tiles are not updated yet. */
|
|
79
|
+
tilesNotUpdatedYet: (tiles: number) => string;
|
|
80
|
+
/** Share, where the clipboard is refused: the line over the link to copy by hand. */
|
|
81
|
+
shareCopyByHand: string;
|
|
35
82
|
/** A dashboard this viewer cannot find: never published, removed, or not shared with them. */
|
|
36
83
|
dashboardMissing: string;
|
|
37
84
|
rowsFailed: string;
|
|
@@ -126,6 +173,12 @@ export type Messages = ReviewMessages & DrillMessages & BuilderMessages & {
|
|
|
126
173
|
chartPartial?: string;
|
|
127
174
|
chartAveraged?: (count: number) => string;
|
|
128
175
|
chartMerged?: (count: number, grain: Grain, approximate: boolean) => string;
|
|
176
|
+
/**
|
|
177
|
+
* Under a bar chart whose bars each add up a split: the parts, the first few by name and
|
|
178
|
+
* the rest counted with `moreRows`. Default: "Each bar adds up low, high and Other. Show it
|
|
179
|
+
* as a table to see each."
|
|
180
|
+
*/
|
|
181
|
+
chartSummed?: (parts: readonly string[]) => string;
|
|
129
182
|
chartFunnel?: {
|
|
130
183
|
continues: (percent: string) => string;
|
|
131
184
|
largestDrop: string;
|
|
@@ -133,7 +186,7 @@ export type Messages = ReviewMessages & DrillMessages & BuilderMessages & {
|
|
|
133
186
|
ofFirstStep: (percent: string) => string;
|
|
134
187
|
ofStepBefore: (percent: string) => string;
|
|
135
188
|
};
|
|
136
|
-
/** What the builder keeps as it was, though it cannot edit it. */
|
|
189
|
+
/** What the builder keeps as it was, though it cannot edit it: `display` is a display option it does not offer for the kind. */
|
|
137
190
|
keptAside: (kept: {
|
|
138
191
|
display: boolean;
|
|
139
192
|
queries: readonly string[];
|
|
@@ -176,6 +229,28 @@ export type Messages = ReviewMessages & DrillMessages & BuilderMessages & {
|
|
|
176
229
|
discardAsk: (changes: number) => string;
|
|
177
230
|
/** A tab with no widgets yet, while editing. */
|
|
178
231
|
emptyTab: string;
|
|
232
|
+
/** After the last tab while editing: adds a tab. */
|
|
233
|
+
addTab: string;
|
|
234
|
+
/** A new tab's name: "New tab", then "New tab 2" when that is taken. */
|
|
235
|
+
newTab: (n: number) => string;
|
|
236
|
+
/** The field a tab's name is edited in, and what it says when left empty. */
|
|
237
|
+
tabName: string;
|
|
238
|
+
tabNameEmpty: string;
|
|
239
|
+
/** What the name field says of a name another tab already has, with that tab's name as it writes it. */
|
|
240
|
+
tabNameTaken: (title: string) => string;
|
|
241
|
+
/** Screen-reader name of the button that opens a tab's menu, which says which tab. */
|
|
242
|
+
tabOptions: (title: string) => string;
|
|
243
|
+
/** A tab's menu: Rename, Move left, Move right, Remove tab. */
|
|
244
|
+
renameTab: string;
|
|
245
|
+
moveTabLeft: string;
|
|
246
|
+
moveTabRight: string;
|
|
247
|
+
removeTab: string;
|
|
248
|
+
/** Remove tab while it asks, naming the tab and how many tiles go with it. */
|
|
249
|
+
removeTabAsk: (title: string, tiles: number) => string;
|
|
250
|
+
/** What Remove tab reads while its question is asked: the answer that removes the tab. */
|
|
251
|
+
removeTabYes: string;
|
|
252
|
+
/** Why the only tab cannot be removed. */
|
|
253
|
+
lastTab: string;
|
|
179
254
|
/** The button that confirms a discard, so it never reads the same as the one that asked. */
|
|
180
255
|
discardConfirm: string;
|
|
181
256
|
/** Discard on a dashboard never published, which goes with its draft. */
|
|
@@ -186,8 +261,9 @@ export type Messages = ReviewMessages & DrillMessages & BuilderMessages & {
|
|
|
186
261
|
unreachable: string;
|
|
187
262
|
/** Said when a tile is removed while editing. */
|
|
188
263
|
removedTile: (title: string) => string;
|
|
189
|
-
/** A tile whose request
|
|
264
|
+
/** A tile whose request never reached the server, and one the server failed (5xx). */
|
|
190
265
|
tileUnreachable: string;
|
|
266
|
+
tileServerFailed: string;
|
|
191
267
|
/** A list (a field's values, the history) that could not be read; with drillRetry beside it. */
|
|
192
268
|
readFailed: string;
|
|
193
269
|
/** A field with no values this viewer can see (or none matching the search). */
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
// src/now.ts
|
|
3
|
+
const EVERY = 6e4;
|
|
4
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
5
|
+
let timer;
|
|
6
|
+
/** The time as last read; none while nothing asks. */
|
|
7
|
+
let read;
|
|
8
|
+
function tick() {
|
|
9
|
+
read = Date.now();
|
|
10
|
+
for (const listener of listeners) listener();
|
|
11
|
+
}
|
|
12
|
+
function subscribe(listener) {
|
|
13
|
+
listeners.add(listener);
|
|
14
|
+
if (timer === void 0) {
|
|
15
|
+
read = Date.now();
|
|
16
|
+
timer = setInterval(tick, EVERY);
|
|
17
|
+
}
|
|
18
|
+
return () => {
|
|
19
|
+
listeners.delete(listener);
|
|
20
|
+
if (listeners.size > 0) return;
|
|
21
|
+
clearInterval(timer);
|
|
22
|
+
timer = void 0;
|
|
23
|
+
read = void 0;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const current = () => read;
|
|
27
|
+
/** Not read: a server, or a caller that asked for no clock. */
|
|
28
|
+
const NOT_READ = void 0;
|
|
29
|
+
const none = () => NOT_READ;
|
|
30
|
+
/** Nothing to listen to, for a caller that writes nothing against the time. */
|
|
31
|
+
const idle = () => () => {};
|
|
32
|
+
/**
|
|
33
|
+
* The time now in milliseconds, read again each minute; undefined on a server and in the first
|
|
34
|
+
* draw. A caller with nothing to write against it says so (`wanted: false`), and is never
|
|
35
|
+
* drawn again for the clock.
|
|
36
|
+
*/
|
|
37
|
+
const useNow = (wanted) => useSyncExternalStore(wanted ? subscribe : idle, wanted ? current : none, none);
|
|
38
|
+
export { useNow };
|
package/dist/react/place.mjs
CHANGED
|
@@ -4,11 +4,13 @@ const overlaps = (a, b) => a.x < b.x + b.w && b.x < a.x + a.w && a.y < b.y + b.h
|
|
|
4
4
|
/**
|
|
5
5
|
* Where a box is drawn on the 12-column CSS grid, as variables the theme places it by: a rule
|
|
6
6
|
* (the one-column phone layout, or a host's own) can then place it otherwise, which an inline
|
|
7
|
-
* grid position would always beat.
|
|
7
|
+
* grid position would always beat. The rows it spans are said alone too, for a rule that
|
|
8
|
+
* sizes it by them.
|
|
8
9
|
*/
|
|
9
10
|
const placeOf = (box) => ({
|
|
10
11
|
"--dd-at-column": `${String(box.x + 1)} / span ${String(box.w)}`,
|
|
11
|
-
"--dd-at-row": `${String(box.y + 1)} / span ${String(box.h)}
|
|
12
|
+
"--dd-at-row": `${String(box.y + 1)} / span ${String(box.h)}`,
|
|
13
|
+
"--dd-at-rows": String(box.h)
|
|
12
14
|
});
|
|
13
15
|
/** Brings an element into view when asked, without motion if the viewer asked for none. */
|
|
14
16
|
function useBringIntoView(wanted) {
|
package/dist/react/read.d.mts
CHANGED
package/dist/react/read.mjs
CHANGED
|
@@ -1,18 +1,140 @@
|
|
|
1
1
|
import { DashboardsError } from "./errors.mjs";
|
|
2
2
|
import { CONTRACT_VERSION } from "derive-dashboards/core";
|
|
3
3
|
// src/read.ts
|
|
4
|
+
/** Statuses a server or a proxy answers with when it cannot answer just now, whatever is mounted. */
|
|
5
|
+
const AWAY = /* @__PURE__ */ new Set([
|
|
6
|
+
408,
|
|
7
|
+
425,
|
|
8
|
+
429
|
|
9
|
+
]);
|
|
10
|
+
/** The path of a URL, absolute or relative to the page. */
|
|
11
|
+
const pathOf = (url) => new URL(url || "/", "http://x/").pathname;
|
|
12
|
+
/**
|
|
13
|
+
* What the client says of a failure no handler sent, to whoever set the page up. A 401 or a 403
|
|
14
|
+
* is most often a sign-in layer in front of the handler, turning away a session that ended. A
|
|
15
|
+
* server's own failure (a 500, a 502) or a refusal for now (a 429) is most often a proxy or a
|
|
16
|
+
* server that could not answer, with the mount as it should be. Any other is most often nothing
|
|
17
|
+
* mounted at the path.
|
|
18
|
+
*/
|
|
19
|
+
function noHandler(response) {
|
|
20
|
+
const path = pathOf(response.url);
|
|
21
|
+
const status = String(response.status);
|
|
22
|
+
if (response.status === 401 || response.status === 403) return `Something in front of the dashboards handler answered ${path} (${status}): most often a sign-in layer turning away a session that ended. If the viewer is signed in, check that the handler is mounted at that path and that requests to it pass that layer.`;
|
|
23
|
+
if (response.status === 413) return `Something in front of the dashboards handler refused the request to ${path} as too large (413): most often a body parser's limit (express.json() takes 100 kB unless told otherwise). Mount the handler before that parser, or raise its limit for that path.`;
|
|
24
|
+
if (response.status >= 500 || AWAY.has(response.status)) return `Something in front of the dashboards handler answered ${path} (${status}): most often a proxy or a server that could not answer just now. The page offers to try again. If it keeps happening, check the server behind that path before the mount.`;
|
|
25
|
+
return `No dashboards handler answered ${path} (${status}). Mount the handler at that path, or set the client's baseURL to where it is mounted. A server on another origin must also expose the dd-contract header.`;
|
|
26
|
+
}
|
|
27
|
+
/** Whether an answer is a redirect nobody followed: an opaque redirect in a browser, a 3xx elsewhere. */
|
|
28
|
+
const leftUnfollowed = (response) => response.type === "opaqueredirect" || response.status >= 300 && response.status < 400;
|
|
29
|
+
/**
|
|
30
|
+
* Whether an answer is a redirect that fetch left for the caller (`redirect: "manual"`), not
|
|
31
|
+
* the handler's: one nobody followed, with no fingerprint.
|
|
32
|
+
*/
|
|
33
|
+
const unfollowed = (response) => response.headers.get("dd-contract") === null && leftUnfollowed(response);
|
|
34
|
+
/**
|
|
35
|
+
* A redirect the browser would not let this page follow and read: most often a sign-in page on
|
|
36
|
+
* another site (Okta, Auth0, a cloud's access proxy) turning away a session that ended. It is a
|
|
37
|
+
* viewer turned away, as a sign-in layer's 401 is, so the page says the same.
|
|
38
|
+
*/
|
|
39
|
+
function redirectedAway(url) {
|
|
40
|
+
return new DashboardsError(401, {
|
|
41
|
+
code: "NO_HANDLER",
|
|
42
|
+
message: `The request to ${pathOf(url)} was redirected somewhere this page may not read: most often a sign-in page on another site turning away a session that ended. If the viewer is signed in, check that requests to that path reach the dashboards handler without a redirect.`
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/** The types a web page is sent as: HTML, or XHTML. */
|
|
46
|
+
const PAGE_TYPES = ["text/html", "application/xhtml+xml"];
|
|
47
|
+
/** Redirects that keep a request's method and body, so the handler behind one reads it as sent. */
|
|
48
|
+
const KEEPS_METHOD = /* @__PURE__ */ new Set([307, 308]);
|
|
49
|
+
/** The handler's own words for a refusal, or the status's where its body has none. */
|
|
50
|
+
async function ownWords(response) {
|
|
51
|
+
const parsed = await response.json().catch(() => null);
|
|
52
|
+
const error = typeof parsed === "object" && parsed !== null && "error" in parsed ? parsed.error : null;
|
|
53
|
+
const message = typeof error === "object" && error !== null && "message" in error ? error.message : null;
|
|
54
|
+
return typeof message === "string" ? message : response.statusText;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A POST that a redirect turned into a GET: fetch follows a 301, 302 or 303 as a GET, and the
|
|
58
|
+
* handler behind it answers its own 404, since its endpoints answer POST. That is a setup to
|
|
59
|
+
* change, not the handler refusing what was asked, so it is said to whoever set the page up,
|
|
60
|
+
* with the handler's words. Read only by the handler's fingerprint and status, never by its
|
|
61
|
+
* words. A 307 or 308 keeps the POST, so a 404 behind one is the handler's own; in a browser
|
|
62
|
+
* the redirect's status is hidden (an opaque redirect), so there any redirect counts.
|
|
63
|
+
*/
|
|
64
|
+
async function methodLost(first, followed, asked) {
|
|
65
|
+
if (asked.method !== "POST" || KEEPS_METHOD.has(first.status)) return void 0;
|
|
66
|
+
if (followed.status !== 404 || followed.headers.get("dd-contract") === null) return void 0;
|
|
67
|
+
const ended = followed.redirected ? ` and ended at ${pathOf(followed.url)}` : "";
|
|
68
|
+
return new DashboardsError(404, {
|
|
69
|
+
code: "NO_HANDLER",
|
|
70
|
+
message: `The request to ${pathOf(asked.url)} was redirected${ended}, where the dashboards handler answered: “${await ownWords(followed)}” A 301, 302 or 303 redirect turns a POST into a GET. In the client's options, set baseURL to where the handler answers, or redirect with 307 or 308.`
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/** Whether an ok answer is a web page, which the handler never sends. */
|
|
74
|
+
function webPage(response) {
|
|
75
|
+
const type = (response.headers.get("content-type") ?? "").toLowerCase();
|
|
76
|
+
return response.ok && PAGE_TYPES.some((page) => type.startsWith(page));
|
|
77
|
+
}
|
|
78
|
+
/** Where a redirect sent the request, when the answer says: the page it ended at, or its Location. */
|
|
79
|
+
function sentTo(response) {
|
|
80
|
+
if (response.redirected) return pathOf(response.url);
|
|
81
|
+
const location = response.headers.get("location");
|
|
82
|
+
return location === null ? void 0 : pathOf(location);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* What the client says, to whoever set the page up, of a redirect answered where the handler
|
|
86
|
+
* was asked: most often a sign-in layer sending a viewer whose session ended to its sign-in
|
|
87
|
+
* page, the way most of them turn a viewer away.
|
|
88
|
+
*/
|
|
89
|
+
function signInPage(response, asked) {
|
|
90
|
+
const to = sentTo(response);
|
|
91
|
+
return `The request to ${asked} was ${to === void 0 ? "redirected, and the browser does not say where" : `redirected to ${to}`}: most often a sign-in page turning away a session that ended. If the viewer is signed in, check that requests to that path reach the dashboards handler without one.`;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Whether an answer with no fingerprint is a viewer turned away to a sign-in page: a redirect
|
|
95
|
+
* left unfollowed, or an answer of success a redirect led to (the sign-in page itself). A
|
|
96
|
+
* redirect that led to an error is that error: a host's own redirect to a proxy's 503 page is
|
|
97
|
+
* an outage, which waiting may mend, not a session that ended.
|
|
98
|
+
*/
|
|
99
|
+
const turnedToSignIn = (response) => leftUnfollowed(response) || response.ok && response.redirected;
|
|
100
|
+
/**
|
|
101
|
+
* A web page answered with success that no redirect led to: most often the app's own page,
|
|
102
|
+
* which a single-page app sends for every path nothing else answers, the handler's included
|
|
103
|
+
* until it is mounted. That is a setup to change, so it is said to whoever set the page up and
|
|
104
|
+
* never read as a session that ended: signing in again would bring the same page back.
|
|
105
|
+
*/
|
|
106
|
+
function ownPage(response, asked) {
|
|
107
|
+
if (!webPage(response)) return void 0;
|
|
108
|
+
return new DashboardsError(404, {
|
|
109
|
+
code: "NO_HANDLER",
|
|
110
|
+
message: `The request to ${asked} was answered with a web page, not by the dashboards handler: most often the app's own page, sent for any path nothing is mounted at. Mount the handler at that path, or set the client's baseURL to where it is mounted. A sign-in layer that shows its page in place, without a redirect, answers the same.`
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Why an answer with no fingerprint is not the handler's, or nothing where it may be. A redirect
|
|
115
|
+
* is a viewer turned away, as a sign-in layer's 401 is, so the page says the same.
|
|
116
|
+
*/
|
|
117
|
+
function notTheHandler(response, asked) {
|
|
118
|
+
if (turnedToSignIn(response)) return new DashboardsError(401, {
|
|
119
|
+
code: "NO_HANDLER",
|
|
120
|
+
message: signInPage(response, asked)
|
|
121
|
+
});
|
|
122
|
+
if (!response.ok) return new DashboardsError(response.status, {
|
|
123
|
+
code: "NO_HANDLER",
|
|
124
|
+
message: noHandler(response)
|
|
125
|
+
});
|
|
126
|
+
return ownPage(response, asked);
|
|
127
|
+
}
|
|
4
128
|
/**
|
|
5
129
|
* A server from another release: its answers are not read, whatever they hold. An answer with
|
|
6
130
|
* no fingerprint is refused too when nothing else checks it (no schemas), so a proxy that strips
|
|
7
131
|
* the header, or a cross-origin server that does not expose it, cannot turn the check off
|
|
8
|
-
* silently.
|
|
132
|
+
* silently. `url` is what was asked for, which a redirected answer no longer says.
|
|
9
133
|
*/
|
|
10
|
-
function checkContract(response, schemas) {
|
|
134
|
+
function checkContract(response, schemas, url) {
|
|
11
135
|
const sent = response.headers.get("dd-contract");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
message: `No dashboards handler answered ${new URL(response.url || "http://x/").pathname} (${String(response.status)}). Mount the handler at that path, or set the client's baseURL to where it is mounted. A server on another origin must also expose the dd-contract header.`
|
|
15
|
-
});
|
|
136
|
+
const other = sent === null ? notTheHandler(response, pathOf(url)) : void 0;
|
|
137
|
+
if (other !== void 0) throw other;
|
|
16
138
|
if (sent === null && schemas === void 0) throw new DashboardsError(502, {
|
|
17
139
|
code: "CONTRACT_MISMATCH",
|
|
18
140
|
message: "The server's answer has no dd-contract header, so this page cannot tell it is the same release. A proxy may be removing it; a server on another origin must expose it (Access-Control-Expose-Headers: dd-contract)."
|
|
@@ -40,15 +162,24 @@ function checked(what, parse) {
|
|
|
40
162
|
});
|
|
41
163
|
}
|
|
42
164
|
}
|
|
165
|
+
/** Whether a path is one of the library's own endpoints, which the schemas have an answer for. */
|
|
166
|
+
const isLibraryPath = (schemas, path) => Object.hasOwn(schemas.answers, path);
|
|
43
167
|
/** How answers are read: checked by the schemas when the host gave them, else on trust. */
|
|
44
168
|
function readerOf(schemas) {
|
|
169
|
+
const answer = (path, json) => schemas === void 0 ? trusted(path, json) : checked(path, () => schemas.answers[path].parse(json));
|
|
45
170
|
return {
|
|
46
|
-
answer
|
|
47
|
-
|
|
171
|
+
answer,
|
|
172
|
+
/**
|
|
173
|
+
* Any endpoint's answer, by path, as `call` reads it: a library endpoint's as `answer`
|
|
174
|
+
* reads it, so `call("/dashboards/get")` is checked as `getDashboard` is; a plugin's,
|
|
175
|
+
* typed by `TypedCall` from the server's own endpoint, as it came.
|
|
176
|
+
*/
|
|
177
|
+
any(path, json) {
|
|
178
|
+
return schemas !== void 0 && isLibraryPath(schemas, path) ? answer(path, json) : json;
|
|
48
179
|
},
|
|
49
180
|
line(json) {
|
|
50
181
|
return schemas === void 0 ? trusted("/dashboards/tiles", json) : checked("/dashboards/tiles", () => schemas.tileLine.parse(json));
|
|
51
182
|
}
|
|
52
183
|
};
|
|
53
184
|
}
|
|
54
|
-
export { checkContract, readerOf };
|
|
185
|
+
export { checkContract, methodLost, readerOf, redirectedAway, unfollowed };
|
|
@@ -1,68 +1,40 @@
|
|
|
1
|
+
import { cellDigits, decimalPlaces, formatExact, parseExact } from "derive-dashboards/core";
|
|
1
2
|
// src/renderers/exact.ts
|
|
2
|
-
const PLAIN_DECIMAL = /^-?\d+(\.\d+)?$/u;
|
|
3
3
|
/**
|
|
4
|
-
* A cell's exact
|
|
5
|
-
*
|
|
4
|
+
* A cell's digits when they are exact ("12.50"): an exact cell's, and a whole number a float
|
|
5
|
+
* holds exactly. Undefined for any other float, whose digits are how it is written and not what
|
|
6
|
+
* it is, and for text: a change between two such is a float's, written to the figures one keeps.
|
|
6
7
|
*/
|
|
7
8
|
const exactDigits = (cell) => {
|
|
8
9
|
if (typeof cell === "number") return Number.isSafeInteger(cell) ? String(cell) : void 0;
|
|
9
|
-
|
|
10
|
+
return typeof cell === "string" ? void 0 : cellDigits(cell);
|
|
10
11
|
};
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
return
|
|
16
|
-
};
|
|
17
|
-
/** How many places after the point a decimal text has. */
|
|
18
|
-
const placesOf = (digits) => digits.split(".")[1]?.length ?? 0;
|
|
19
|
-
/** Which of two exact decimals is the larger: below zero when the first is smaller, zero when they are equal. */
|
|
20
|
-
function compareExact(a, b) {
|
|
21
|
-
const scale = Math.max(placesOf(a), placesOf(b));
|
|
22
|
-
const d = unitsOf(a, scale) - unitsOf(b, scale);
|
|
23
|
-
return d === 0n ? 0 : d > 0n ? 1 : -1;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* A plain decimal with its point moved `by` places to the right (to the left when negative):
|
|
27
|
-
* "0.425" by 2 is "42.5". Only the point moves: every digit is kept, and no float is made.
|
|
28
|
-
*/
|
|
29
|
-
function moved(digits, by) {
|
|
30
|
-
const [whole = "0", part = ""] = digits.replace("-", "").split(".");
|
|
31
|
-
const all = `${whole}${part}`;
|
|
32
|
-
const at = whole.length + by;
|
|
33
|
-
const padded = at <= 0 ? `${"0".repeat(1 - at)}${all}` : all.padEnd(at, "0");
|
|
34
|
-
const cut = Math.max(at, 1);
|
|
35
|
-
const left = padded.slice(0, cut).replace(/^0+(?=\d)/u, "");
|
|
36
|
-
const right = padded.slice(cut);
|
|
37
|
-
return `${digits.startsWith("-") && /[1-9]/u.test(all) ? "-" : ""}${left}${right === "" ? "" : `.${right}`}`;
|
|
12
|
+
/** Plain decimal text as minor units at a scale it fits; anything else is a caller's fault, not zero. */
|
|
13
|
+
function unitsOf(text, scale) {
|
|
14
|
+
const units = parseExact(text, scale);
|
|
15
|
+
if (units === void 0) throw new TypeError(`"${text}" is not plain decimal text (cellDigits).`);
|
|
16
|
+
return units;
|
|
38
17
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
function plainText(text) {
|
|
47
|
-
if (PLAIN_DECIMAL.test(text)) return text;
|
|
48
|
-
const found = EXPONENT.exec(text)?.groups;
|
|
49
|
-
const power = Number(found?.["power"]);
|
|
50
|
-
if (found === void 0 || Math.abs(power) > MOST_POWER) return void 0;
|
|
51
|
-
return moved(found["digits"] ?? "0", power);
|
|
18
|
+
/** a − b of two plain decimals in minor units at the longer scale of the two, by core. */
|
|
19
|
+
function minus(a, b) {
|
|
20
|
+
const scale = Math.max(decimalPlaces(a), decimalPlaces(b));
|
|
21
|
+
return {
|
|
22
|
+
d: unitsOf(a, scale) - unitsOf(b, scale),
|
|
23
|
+
scale
|
|
24
|
+
};
|
|
52
25
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (cell !== null && typeof cell === "object" && "v" in cell && typeof cell.v === "string") return plainText(cell.v);
|
|
26
|
+
const signOf$1 = (d) => d === 0n ? 0 : d > 0n ? 1 : -1;
|
|
27
|
+
/** Which of two exact decimals is the larger: below zero when the first is smaller, zero when they are equal. */
|
|
28
|
+
const compareExact = (a, b) => signOf$1(minus(a, b).d);
|
|
29
|
+
/** a − b of two plain decimals, exactly, as a cell of `type`. */
|
|
30
|
+
function exactDifference(a, b, type) {
|
|
31
|
+
const { d, scale } = minus(a, b);
|
|
32
|
+
return {
|
|
33
|
+
sign: signOf$1(d),
|
|
34
|
+
size: {
|
|
35
|
+
t: type,
|
|
36
|
+
v: formatExact(d < 0n ? -d : d, scale)
|
|
37
|
+
}
|
|
38
|
+
};
|
|
67
39
|
}
|
|
68
|
-
export { compareExact,
|
|
40
|
+
export { compareExact, exactDifference, exactDigits };
|
|
@@ -1,9 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ListTile } from "./list.mjs";
|
|
2
|
+
import { TileRenderer, TileRendererProps, fitted } from "./props.mjs";
|
|
3
3
|
import { TableTile } from "./table.mjs";
|
|
4
|
+
import { ResultColumn } from "derive-dashboards/core";
|
|
5
|
+
import { ReactNode } from "react";
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
+
* The value a number tile shows large, as a column of its answer by bucket: what a small trend
|
|
8
|
+
* beside the number draws. Undefined when the answer has no whole, no buckets, or the tile
|
|
9
|
+
* shows no value. `index` is the column's place in `answer.columns`, so a caller reads
|
|
10
|
+
* `answer.rows[i][index]`; the tile itself reads the whole, whose columns have no time column.
|
|
7
11
|
*/
|
|
8
|
-
export declare function
|
|
9
|
-
|
|
12
|
+
export declare function headlineColumn(props: TileRendererProps): {
|
|
13
|
+
column: ResultColumn;
|
|
14
|
+
index: number;
|
|
15
|
+
} | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* One value, large, with how it moved and a second figure (`Figures`). With a whole
|
|
18
|
+
* (`time.whole`) every figure is the whole range's, never a bucket's. A chart kit may hand it a
|
|
19
|
+
* small trend (`course`), which it lays beside the large value, or under it in a narrow tile.
|
|
20
|
+
*/
|
|
21
|
+
export declare function NumberTile({ course, ...props }: TileRendererProps & {
|
|
22
|
+
course?: ReactNode;
|
|
23
|
+
}): import("react").JSX.Element;
|
|
24
|
+
/** The renderers every dashboard has: a number, a table and a list. */
|
|
25
|
+
export declare const BUILTIN_RENDERERS: {
|
|
26
|
+
number: typeof NumberTile;
|
|
27
|
+
table: typeof TableTile;
|
|
28
|
+
list: typeof ListTile;
|
|
29
|
+
};
|
|
30
|
+
export { TableTile, type TileRenderer, type TileRendererProps, fitted };
|