lintje 0.1.1 → 0.3.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 +2 -2
- package/dist-elements/actions.js +1 -1
- package/dist-elements/charts.js +1 -1
- package/dist-elements/chunks/{base-rBLTcEIv.js → base-CbmWxUig.js} +538 -337
- package/dist-elements/chunks/{controls-B1455oPG.js → controls-DxmnDSBr.js} +6 -0
- package/dist-elements/chunks/{date-format-B5DPGjAw.js → date-format-mHtZyBys.js} +28 -2
- package/dist-elements/chunks/dialog-DChINFxD.js +28 -0
- package/dist-elements/chunks/disclosure-D39vAR5q.js +4 -0
- package/dist-elements/chunks/{disclosure-CHasOudX.js → disclosure-DLkXPUpV.js} +10 -10
- package/dist-elements/chunks/download-Ct9q2anY.js +206 -0
- package/dist-elements/chunks/{focus-trap-w3vCamJ6.js → focus-trap-BwOxE5BX.js} +1 -1
- package/dist-elements/chunks/input-CRW_exv_.js +195 -0
- package/dist-elements/chunks/{player-Bq9YGnpt.js → player-B8QXJ0Z5.js} +35 -35
- package/dist-elements/chunks/{sentence-CLNJOeXz.js → sentence-B19AyZBS.js} +1 -1
- package/dist-elements/chunks/{stagger-9hYzxhMG.js → stagger-BHoOgy0g.js} +163 -135
- package/dist-elements/core.js +1 -1
- package/dist-elements/custom-elements.json +2049 -1329
- package/dist-elements/data-types.json +6798 -0
- package/dist-elements/feedback.js +2 -1
- package/dist-elements/frame.js +0 -2
- package/dist-elements/guides/dashboard.md +9 -1
- package/dist-elements/guides/events.md +7 -7
- package/dist-elements/guides/loading.md +10 -9
- package/dist-elements/guides/page-contents.md +110 -0
- package/dist-elements/guides/start.md +13 -1
- package/dist-elements/inputs.js +3 -1
- package/dist-elements/layout.js +1 -1
- package/dist-elements/lintje.js +24508 -23210
- package/dist-elements/map.js +1 -1
- package/dist-elements/overlays.js +2 -2
- package/dist-elements/skills/lintje/SKILL.md +1 -1
- package/dist-elements/tables.js +1 -1
- package/dist-elements/tag/activity-log.js +18 -18
- package/dist-elements/tag/ai-label.js +11 -11
- package/dist-elements/tag/announcement.js +36 -76
- package/dist-elements/tag/app-search.js +50 -50
- package/dist-elements/tag/audio-player.js +57 -57
- package/dist-elements/tag/badge.js +1 -1
- package/dist-elements/tag/breadcrumbs.js +20 -20
- package/dist-elements/tag/button.js +1 -1
- package/dist-elements/tag/card-list.js +12 -12
- package/dist-elements/tag/card.js +51 -56
- package/dist-elements/tag/chart.d.ts +1 -0
- package/dist-elements/tag/chart.js +2123 -0
- package/dist-elements/tag/chat-answer.js +51 -51
- package/dist-elements/tag/chat-composer.js +75 -71
- package/dist-elements/tag/chat-message.js +13 -13
- package/dist-elements/tag/chat-strip.js +22 -22
- package/dist-elements/tag/chat-suggestions.js +12 -12
- package/dist-elements/tag/chat.js +56 -56
- package/dist-elements/tag/checkbox-group.d.ts +1 -0
- package/dist-elements/tag/checkbox-group.js +59 -0
- package/dist-elements/tag/checkbox.js +4 -4
- package/dist-elements/tag/code.js +7 -7
- package/dist-elements/tag/combobox.js +18 -18
- package/dist-elements/tag/conflict-alert.js +12 -12
- package/dist-elements/tag/copy-button.js +17 -17
- package/dist-elements/tag/data-table.js +880 -532
- package/dist-elements/tag/date-input.js +44 -52
- package/dist-elements/tag/date-range.js +42 -42
- package/dist-elements/tag/description-list.js +29 -32
- package/dist-elements/tag/dialog.d.ts +1 -0
- package/dist-elements/tag/dialog.js +144 -0
- package/dist-elements/tag/document-viewer.js +29 -29
- package/dist-elements/tag/drawer.js +27 -31
- package/dist-elements/tag/empty-state.js +19 -30
- package/dist-elements/tag/error-page.d.ts +1 -0
- package/dist-elements/tag/error-page.js +109 -0
- package/dist-elements/tag/error-summary.js +16 -16
- package/dist-elements/tag/expander.js +7 -7
- package/dist-elements/tag/explainer.js +11 -11
- package/dist-elements/tag/field.js +7 -7
- package/dist-elements/tag/file-upload.js +32 -32
- package/dist-elements/tag/filter-bar.js +57 -57
- package/dist-elements/tag/filter-sheet.js +12 -12
- package/dist-elements/tag/filter-zone.js +31 -31
- package/dist-elements/tag/footer.js +21 -21
- package/dist-elements/tag/form-actions.js +30 -26
- package/dist-elements/tag/form-section.js +7 -7
- package/dist-elements/tag/form.js +12 -12
- package/dist-elements/tag/gallery.js +16 -16
- package/dist-elements/tag/grid-item.js +1 -1
- package/dist-elements/tag/grid.js +1 -1
- package/dist-elements/tag/hero.js +12 -12
- package/dist-elements/tag/highlight.js +9 -9
- package/dist-elements/tag/icon-button.js +1 -1
- package/dist-elements/tag/icon.js +1 -1
- package/dist-elements/tag/job-list.js +23 -45
- package/dist-elements/tag/kpi-row.js +14 -10
- package/dist-elements/tag/kpi.js +276 -77
- package/dist-elements/tag/level-meter.js +11 -11
- package/dist-elements/tag/list.js +63 -63
- package/dist-elements/tag/logo.js +34 -34
- package/dist-elements/tag/map.d.ts +1 -0
- package/dist-elements/tag/map.js +21935 -0
- package/dist-elements/tag/menu-button.js +70 -68
- package/dist-elements/tag/modal.js +27 -36
- package/dist-elements/tag/multiselect.js +33 -33
- package/dist-elements/tag/note.js +6 -6
- package/dist-elements/tag/notifications.js +36 -36
- package/dist-elements/tag/number-input.js +6 -6
- package/dist-elements/tag/page-header.js +138 -35
- package/dist-elements/tag/pagination.js +54 -49
- package/dist-elements/tag/popover.js +1 -1
- package/dist-elements/tag/progress-bar.js +1 -1
- package/dist-elements/tag/prose.js +6 -6
- package/dist-elements/tag/qr-code.js +8 -8
- package/dist-elements/tag/radio-group.js +7 -7
- package/dist-elements/tag/range.js +28 -28
- package/dist-elements/tag/recording-status.js +16 -16
- package/dist-elements/tag/repeater.js +10 -10
- package/dist-elements/tag/segmented.js +9 -9
- package/dist-elements/tag/select.js +6 -6
- package/dist-elements/tag/shell.js +356 -339
- package/dist-elements/tag/skeleton.js +1 -1
- package/dist-elements/tag/slot-picker.d.ts +1 -0
- package/dist-elements/tag/slot-picker.js +74 -0
- package/dist-elements/tag/sortable-list.js +18 -18
- package/dist-elements/tag/spinner.js +1 -1
- package/dist-elements/tag/split-pane.js +12 -12
- package/dist-elements/tag/status-dot.js +1 -1
- package/dist-elements/tag/stepper.js +21 -21
- package/dist-elements/tag/streaming-text.js +21 -21
- package/dist-elements/tag/sub-nav.js +40 -39
- package/dist-elements/tag/tabs.js +38 -38
- package/dist-elements/tag/tag-input.js +19 -19
- package/dist-elements/tag/text-editor.js +19 -19
- package/dist-elements/tag/text-input.js +6 -6
- package/dist-elements/tag/textarea.js +16 -16
- package/dist-elements/tag/tile.js +1 -1
- package/dist-elements/tag/time-input.js +136 -42
- package/dist-elements/tag/toast.js +32 -23
- package/dist-elements/tag/toggle.js +4 -4
- package/dist-elements/tag/toggletip.js +27 -27
- package/dist-elements/tag/tooltip.js +1 -1
- package/dist-elements/tag/transcript.js +47 -47
- package/dist-elements/tag/translator.js +13 -13
- package/dist-elements/tag/tree-view.js +20 -20
- package/dist-elements/tag/user-menu.js +42 -41
- package/dist-elements/tag/video-player.js +21 -21
- package/dist-elements/tokens.css +122 -96
- package/dist-elements/types/bundle/charts.d.ts +1 -1
- package/dist-elements/types/bundle/feedback.d.ts +1 -0
- package/dist-elements/types/bundle/frame.d.ts +0 -2
- package/dist-elements/types/bundle/index.d.ts +1 -1
- package/dist-elements/types/bundle/inputs.d.ts +2 -0
- package/dist-elements/types/bundle/map.d.ts +1 -1
- package/dist-elements/types/bundle/overlays.d.ts +1 -1
- package/dist-elements/types/components/actions/copy-button/copy-button.d.ts +6 -7
- package/dist-elements/types/components/actions/menu-button/menu-button.d.ts +13 -15
- package/dist-elements/types/components/actions/qr-code/qr-code.d.ts +9 -9
- package/dist-elements/types/components/charts/{chart-tile/chart-tile.d.ts → chart/chart.d.ts} +12 -11
- package/dist-elements/types/components/charts/kpi/gauge.d.ts +18 -0
- package/dist-elements/types/components/charts/kpi/kpi.d.ts +38 -5
- package/dist-elements/types/components/charts/kpi-row/kpi-row.d.ts +1 -7
- package/dist-elements/types/components/charts/note/note.d.ts +1 -1
- package/dist-elements/types/components/chat/chat/chat.d.ts +8 -10
- package/dist-elements/types/components/chat/chat-answer/chat-answer.d.ts +8 -9
- package/dist-elements/types/components/chat/chat-composer/chat-composer.d.ts +8 -10
- package/dist-elements/types/components/chat/chat-message/chat-message.d.ts +6 -7
- package/dist-elements/types/components/chat/chat-strip/chat-strip.d.ts +5 -5
- package/dist-elements/types/components/chat/chat-suggestions/chat-suggestions.d.ts +9 -10
- package/dist-elements/types/components/content/audio-player/audio-player.d.ts +10 -12
- package/dist-elements/types/components/content/code/code.d.ts +2 -3
- package/dist-elements/types/components/content/document-viewer/document-viewer.d.ts +8 -9
- package/dist-elements/types/components/content/gallery/gallery.d.ts +5 -4
- package/dist-elements/types/components/content/highlight/highlight.d.ts +4 -3
- package/dist-elements/types/components/content/prose/prose.d.ts +2 -3
- package/dist-elements/types/components/content/transcript/transcript.d.ts +12 -25
- package/dist-elements/types/components/content/translator/translator.d.ts +11 -15
- package/dist-elements/types/components/content/video-player/video-player.d.ts +11 -13
- package/dist-elements/types/components/feedback/ai-label/ai-label.d.ts +3 -4
- package/dist-elements/types/components/feedback/announcement/announcement.d.ts +3 -7
- package/dist-elements/types/components/feedback/conflict-alert/conflict-alert.d.ts +3 -4
- package/dist-elements/types/components/feedback/empty-state/empty-state.d.ts +5 -8
- package/dist-elements/types/components/feedback/error-page/error-page.d.ts +52 -0
- package/dist-elements/types/components/feedback/job-list/job-list.d.ts +9 -12
- package/dist-elements/types/components/feedback/level-meter/level-meter.d.ts +4 -6
- package/dist-elements/types/components/feedback/recording-status/recording-status.d.ts +5 -6
- package/dist-elements/types/components/feedback/streaming-text/streaming-text.d.ts +10 -7
- package/dist-elements/types/components/feedback/toast/toast.d.ts +8 -9
- package/dist-elements/types/components/filters/filter-bar/filter-bar.d.ts +9 -4
- package/dist-elements/types/components/filters/filter-sheet/filter-sheet.d.ts +5 -5
- package/dist-elements/types/components/filters/filter-zone/filter-zone.d.ts +4 -4
- package/dist-elements/types/components/forms/error-summary/error-summary.d.ts +5 -6
- package/dist-elements/types/components/forms/form/form.d.ts +5 -5
- package/dist-elements/types/components/forms/form-actions/form-actions.d.ts +9 -7
- package/dist-elements/types/components/forms/form-section/form-section.d.ts +6 -5
- package/dist-elements/types/components/forms/repeater/repeater.d.ts +13 -7
- package/dist-elements/types/components/forms/stepper/stepper.d.ts +5 -4
- package/dist-elements/types/components/frame/app-search/app-search.d.ts +6 -7
- package/dist-elements/types/components/frame/breadcrumbs/breadcrumbs.d.ts +2 -2
- package/dist-elements/types/components/frame/footer/footer.d.ts +3 -2
- package/dist-elements/types/components/frame/hero/hero.d.ts +7 -9
- package/dist-elements/types/components/frame/notifications/notifications.d.ts +5 -9
- package/dist-elements/types/components/frame/page-header/page-header.d.ts +12 -15
- package/dist-elements/types/components/frame/shell/shell.d.ts +14 -13
- package/dist-elements/types/components/frame/sub-nav/sub-nav.d.ts +10 -6
- package/dist-elements/types/components/frame/user-menu/user-menu.d.ts +11 -10
- package/dist-elements/types/components/index.d.ts +16 -14
- package/dist-elements/types/components/inputs/checkbox/checkbox.d.ts +4 -4
- package/dist-elements/types/components/inputs/checkbox-group/checkbox-group.d.ts +33 -0
- package/dist-elements/types/components/inputs/combobox/combobox.d.ts +12 -6
- package/dist-elements/types/components/inputs/date-input/date-format.d.ts +4 -0
- package/dist-elements/types/components/inputs/date-input/date-input.d.ts +5 -5
- package/dist-elements/types/components/inputs/date-range/date-range.d.ts +11 -6
- package/dist-elements/types/components/inputs/field/field.d.ts +5 -3
- package/dist-elements/types/components/inputs/file-upload/file-upload.d.ts +6 -8
- package/dist-elements/types/components/inputs/multiselect/multiselect.d.ts +4 -6
- package/dist-elements/types/components/inputs/number-input/number-input.d.ts +8 -7
- package/dist-elements/types/components/inputs/radio-group/radio-group.d.ts +2 -4
- package/dist-elements/types/components/inputs/range/range.d.ts +5 -6
- package/dist-elements/types/components/inputs/segmented/segmented.d.ts +7 -4
- package/dist-elements/types/components/inputs/select/select.d.ts +6 -3
- package/dist-elements/types/components/inputs/slot-picker/slot-picker.d.ts +42 -0
- package/dist-elements/types/components/inputs/tag-input/tag-input.d.ts +7 -5
- package/dist-elements/types/components/inputs/text-editor/text-editor.d.ts +6 -6
- package/dist-elements/types/components/inputs/text-input/text-input.d.ts +11 -6
- package/dist-elements/types/components/inputs/textarea/textarea.d.ts +12 -11
- package/dist-elements/types/components/inputs/time-input/time-format.d.ts +4 -0
- package/dist-elements/types/components/inputs/time-input/time-input.d.ts +25 -7
- package/dist-elements/types/components/inputs/toggle/toggle.d.ts +3 -1
- package/dist-elements/types/components/layout/expander/expander.d.ts +9 -10
- package/dist-elements/types/components/layout/split-pane/split-pane.d.ts +6 -6
- package/dist-elements/types/components/layout/tabs/tabs.d.ts +11 -9
- package/dist-elements/types/components/map/{map-tile/map-tile.d.ts → map/map.d.ts} +16 -11
- package/dist-elements/types/components/overlays/dialog/dialog.d.ts +49 -0
- package/dist-elements/types/components/overlays/drawer/drawer.d.ts +6 -5
- package/dist-elements/types/components/overlays/modal/modal.d.ts +7 -12
- package/dist-elements/types/components/overlays/toggletip/toggletip.d.ts +3 -7
- package/dist-elements/types/components/shared/charts/histogram-chart/histogram-chart.d.ts +33 -0
- package/dist-elements/types/components/shared/charts/index.d.ts +7 -2
- package/dist-elements/types/components/shared/charts/kinds.d.ts +86 -0
- package/dist-elements/types/components/shared/charts/line-chart/line-chart.d.ts +2 -2
- package/dist-elements/types/components/shared/charts/map-chart/area.d.ts +16 -0
- package/dist-elements/types/components/shared/charts/map-chart/drawings.d.ts +6 -2
- package/dist-elements/types/components/shared/charts/map-chart/geo.d.ts +6 -0
- package/dist-elements/types/components/shared/charts/map-chart/leaflet.d.ts +45 -2
- package/dist-elements/types/components/shared/charts/map-chart/map-chart.d.ts +17 -3
- package/dist-elements/types/components/shared/charts/map-chart/map-legend.d.ts +26 -0
- package/dist-elements/types/components/shared/charts/map-chart/marks.d.ts +47 -0
- package/dist-elements/types/components/shared/charts/map-chart/reveal.d.ts +1 -1
- package/dist-elements/types/components/shared/charts/scatter-chart/scatter-chart.d.ts +29 -0
- package/dist-elements/types/components/shared/charts/shared/axes.d.ts +21 -4
- package/dist-elements/types/components/shared/charts/shared/chart-icons.d.ts +4 -3
- package/dist-elements/types/components/shared/charts/shared/chart-states.d.ts +8 -19
- package/dist-elements/types/components/shared/charts/shared/controller.d.ts +34 -15
- package/dist-elements/types/components/shared/charts/shared/types.d.ts +141 -6
- package/dist-elements/types/components/shared/charts/stacked-area-chart/stacked-area-chart.d.ts +13 -0
- package/dist-elements/types/components/shared/dialog.d.ts +9 -0
- package/dist-elements/types/components/shared/overflow.d.ts +58 -0
- package/dist-elements/types/components/tables/activity-log/activity-log.d.ts +2 -3
- package/dist-elements/types/components/tables/card/card.d.ts +14 -20
- package/dist-elements/types/components/tables/card-list/card-list.d.ts +9 -11
- package/dist-elements/types/components/tables/data-table/data-table.d.ts +85 -16
- package/dist-elements/types/components/tables/data-table/filters.d.ts +13 -4
- package/dist-elements/types/components/tables/description-list/description-list.d.ts +12 -11
- package/dist-elements/types/components/tables/list/list.d.ts +9 -20
- package/dist-elements/types/components/tables/pagination/pagination.d.ts +12 -11
- package/dist-elements/types/components/tables/sortable-list/sortable-list.d.ts +5 -6
- package/dist-elements/types/components/tables/tree-view/tree-view.d.ts +4 -4
- package/dist-elements/types/core/format.d.ts +5 -2
- package/dist-elements/types/core/media.d.ts +2 -2
- package/dist-elements/types/core/motion.d.ts +5 -0
- package/dist-elements/types/core/print.d.ts +15 -0
- package/dist-elements/types/core/shortcuts.d.ts +2 -2
- package/dist-elements/types/icons/icon/icon.d.ts +2 -3
- package/dist-elements/types/icons/register.d.ts +1 -1
- package/dist-elements/types/primitives/badge/badge.d.ts +9 -5
- package/dist-elements/types/primitives/button/button.d.ts +12 -9
- package/dist-elements/types/primitives/grid/grid.d.ts +3 -3
- package/dist-elements/types/primitives/grid-item/grid-item.d.ts +1 -1
- package/dist-elements/types/primitives/icon-button/icon-button.d.ts +7 -5
- package/dist-elements/types/primitives/index.d.ts +3 -1
- package/dist-elements/types/primitives/popover/popover.d.ts +5 -4
- package/dist-elements/types/primitives/progress-bar/progress-bar.d.ts +8 -6
- package/dist-elements/types/primitives/shared/announcement-block.d.ts +38 -0
- package/dist-elements/types/primitives/shared/empty-state-block.d.ts +26 -0
- package/dist-elements/types/primitives/shared/place.d.ts +1 -1
- package/dist-elements/types/primitives/shared/tone.d.ts +18 -0
- package/dist-elements/types/primitives/skeleton/skeleton.d.ts +1 -1
- package/dist-elements/types/primitives/spinner/spinner.d.ts +1 -2
- package/dist-elements/types/primitives/status-dot/status-dot.d.ts +4 -5
- package/dist-elements/types/primitives/tile/tile.d.ts +17 -5
- package/dist-elements/types/primitives/tooltip/tooltip.d.ts +8 -6
- package/dist-elements/types/types.d.ts +106 -16
- package/dist-icons/functioneel-cirkelselectie.svg +1 -0
- package/dist-icons/functioneel-kolommen.svg +1 -0
- package/dist-icons/functioneel-lasso.svg +1 -0
- package/dist-icons/functioneel-punaise-outline.svg +1 -0
- package/dist-icons/functioneel-punaise.svg +1 -0
- package/dist-icons/functioneel-rechthoekselectie.svg +1 -0
- package/dist-icons/functioneel-selectie.svg +1 -0
- package/dist-icons/functioneel-trechter.svg +1 -0
- package/package.json +1 -1
- package/dist-elements/chunks/confirm-dialog-D5EVGuil.js +0 -4
- package/dist-elements/chunks/disclosure-Z7Ny17sS.js +0 -4
- package/dist-elements/chunks/download-lFooAfD1.js +0 -226
- package/dist-elements/chunks/input-jQVTln7H.js +0 -195
- package/dist-elements/tag/chart-tile.d.ts +0 -1
- package/dist-elements/tag/chart-tile.js +0 -1474
- package/dist-elements/tag/confirm-dialog.d.ts +0 -1
- package/dist-elements/tag/confirm-dialog.js +0 -118
- package/dist-elements/tag/map-tile.d.ts +0 -1
- package/dist-elements/tag/map-tile.js +0 -22292
- package/dist-elements/tag/session-expiry.d.ts +0 -1
- package/dist-elements/tag/session-expiry.js +0 -184
- package/dist-elements/tag/shortcuts.d.ts +0 -1
- package/dist-elements/tag/shortcuts.js +0 -104
- package/dist-elements/types/components/frame/session-expiry/session-expiry.d.ts +0 -55
- package/dist-elements/types/components/frame/shortcuts/shortcuts.d.ts +0 -41
- package/dist-elements/types/components/overlays/confirm-dialog/confirm-dialog.d.ts +0 -41
|
@@ -21,6 +21,17 @@ export interface LineSeriesData {
|
|
|
21
21
|
comparison?: boolean;
|
|
22
22
|
area?: boolean;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Something that happened at a category. The chart numbers its events 1, 2, … from left to
|
|
26
|
+
* right, in the host's order within one category; one whose `index` is not in `labels` is left
|
|
27
|
+
* out and takes no number.
|
|
28
|
+
*/
|
|
29
|
+
export interface ChartEvent {
|
|
30
|
+
/** Index into `labels`: the category it happened at. */
|
|
31
|
+
index: number;
|
|
32
|
+
/** What happened, in a few words; listed under the chart and shown in the tooltip. */
|
|
33
|
+
label: string;
|
|
34
|
+
}
|
|
24
35
|
export interface BarSeriesData {
|
|
25
36
|
label: string;
|
|
26
37
|
values: number[];
|
|
@@ -28,6 +39,25 @@ export interface BarSeriesData {
|
|
|
28
39
|
/** One entry per value: the drilldown of that bar or segment, or null. */
|
|
29
40
|
links?: (ChartLink | null)[];
|
|
30
41
|
}
|
|
42
|
+
/** One point of a scatter plot: a named record, clickable with a `href` like a table row. */
|
|
43
|
+
export interface ScatterPoint {
|
|
44
|
+
label: string;
|
|
45
|
+
/** null = no data, never 0 (rule 15): the point is not drawn and stays in the table. */
|
|
46
|
+
x: number | null;
|
|
47
|
+
y: number | null;
|
|
48
|
+
/** The identity a click carries; without it the series' label and its own: `Loket · Utrecht`. */
|
|
49
|
+
id?: string;
|
|
50
|
+
href?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* A series of a scatter plot: a colour and the shape that colour has on a map (rule 13).
|
|
54
|
+
* Without a colour the series take the data colours in their order.
|
|
55
|
+
*/
|
|
56
|
+
export interface ScatterSeriesData {
|
|
57
|
+
label: string;
|
|
58
|
+
color?: ChartColor;
|
|
59
|
+
points: ScatterPoint[];
|
|
60
|
+
}
|
|
31
61
|
export type ChartSpec = {
|
|
32
62
|
kind: 'line';
|
|
33
63
|
labels: string[];
|
|
@@ -40,6 +70,8 @@ export type ChartSpec = {
|
|
|
40
70
|
pendingHours?: number;
|
|
41
71
|
fixedMax?: number;
|
|
42
72
|
small?: boolean;
|
|
73
|
+
/** Events: a numbered square above their category, listed with their text under the chart. */
|
|
74
|
+
events?: ChartEvent[];
|
|
43
75
|
} | {
|
|
44
76
|
kind: 'bar';
|
|
45
77
|
labels: string[];
|
|
@@ -86,6 +118,22 @@ export type ChartSpec = {
|
|
|
86
118
|
normalized?: boolean;
|
|
87
119
|
totalOnTop?: boolean;
|
|
88
120
|
small?: boolean;
|
|
121
|
+
} | {
|
|
122
|
+
kind: 'stacked-area';
|
|
123
|
+
labels: string[];
|
|
124
|
+
/**
|
|
125
|
+
* The parts of one variable, the first at the bottom. A `null` in any part breaks the whole
|
|
126
|
+
* stack at that point: no area bridges it and the period is hatched (rule 15).
|
|
127
|
+
*/
|
|
128
|
+
series: {
|
|
129
|
+
label: string;
|
|
130
|
+
values: (number | null)[];
|
|
131
|
+
}[];
|
|
132
|
+
/** The variable the stack divides: its parts take this colour's tints. Default sky blue. */
|
|
133
|
+
color?: ChartColor;
|
|
134
|
+
axisTitle?: string;
|
|
135
|
+
unit?: string;
|
|
136
|
+
small?: boolean;
|
|
89
137
|
} | {
|
|
90
138
|
kind: 'pie';
|
|
91
139
|
segments: {
|
|
@@ -124,6 +172,21 @@ export type ChartSpec = {
|
|
|
124
172
|
thresholdLabel?: string;
|
|
125
173
|
pendingHours?: number;
|
|
126
174
|
small?: boolean;
|
|
175
|
+
} | {
|
|
176
|
+
kind: 'scatter';
|
|
177
|
+
series: ScatterSeriesData[];
|
|
178
|
+
/** The vertical axis: its title above the chart, in the tooltip and as a table column. */
|
|
179
|
+
axisTitle: string;
|
|
180
|
+
unit?: string;
|
|
181
|
+
/** The horizontal axis: its title under its labels, right-aligned. */
|
|
182
|
+
xTitle: string;
|
|
183
|
+
xUnit?: string;
|
|
184
|
+
/** A horizontal norm on the vertical axis, dashed in the emphasis colour. */
|
|
185
|
+
threshold?: number;
|
|
186
|
+
thresholdLabel?: string;
|
|
187
|
+
/** The labels of the points that show their name; all of them, or none when one does not fit. */
|
|
188
|
+
dataLabels?: string[];
|
|
189
|
+
small?: boolean;
|
|
127
190
|
} | {
|
|
128
191
|
kind: 'heatmap';
|
|
129
192
|
columnLabels: string[];
|
|
@@ -146,11 +209,40 @@ export type ChartSpec = {
|
|
|
146
209
|
values: (number | null)[][];
|
|
147
210
|
links?: (ChartLink | null)[][];
|
|
148
211
|
};
|
|
212
|
+
} | {
|
|
213
|
+
kind: 'histogram';
|
|
214
|
+
/**
|
|
215
|
+
* The classes in ascending order, each starting where the one before ends. `to: null` is
|
|
216
|
+
* an open last class ("30+"); `count: null` is no data, never 0 (rule 15).
|
|
217
|
+
*/
|
|
218
|
+
bins: {
|
|
219
|
+
from: number;
|
|
220
|
+
to: number | null;
|
|
221
|
+
count: number | null;
|
|
222
|
+
}[];
|
|
223
|
+
/** What the classes count, in the legend and the tooltip. Default "Aantal". */
|
|
224
|
+
label?: string;
|
|
225
|
+
color?: ChartColor;
|
|
226
|
+
/** Above the y-axis, e.g. "aanvragen per twee dagen". */
|
|
227
|
+
axisTitle?: string;
|
|
228
|
+
/** Under the x labels, right-aligned, e.g. "doorlooptijd in dagen". */
|
|
229
|
+
xTitle?: string;
|
|
230
|
+
/** The unit of the x-axis, e.g. "dagen": in the tooltip and beside the lines. */
|
|
231
|
+
unit?: string;
|
|
232
|
+
/** A solid emphasis line at this x value. */
|
|
233
|
+
median?: number;
|
|
234
|
+
/** The text beside the median line; default "mediaan" with its value and unit. */
|
|
235
|
+
medianLabel?: string;
|
|
236
|
+
/** A dashed emphasis line at this x value. */
|
|
237
|
+
threshold?: number;
|
|
238
|
+
/** The text beside the threshold line; default "norm" with its value and unit. */
|
|
239
|
+
thresholdLabel?: string;
|
|
240
|
+
small?: boolean;
|
|
149
241
|
};
|
|
150
242
|
export type ChartKind = ChartSpec['kind'];
|
|
151
243
|
/**
|
|
152
244
|
* What a map draws. `polygons` are areas that carry their own outline (`MapValue.polygon`);
|
|
153
|
-
* `plots` stacks several drawings, from `
|
|
245
|
+
* `plots` stacks several drawings, from `MapSpec.plots`.
|
|
154
246
|
*/
|
|
155
247
|
export type MapVariant = 'flows' | 'points' | 'choropleth' | 'polygons' | 'plots' | 'scope-picker';
|
|
156
248
|
/** A map point's data colour, by name: one of the data colours, each with its own shape. */
|
|
@@ -176,6 +268,45 @@ export interface MapValue {
|
|
|
176
268
|
/** A URL the host minted, carried into `lintje-mark-select`. */
|
|
177
269
|
href?: string;
|
|
178
270
|
}
|
|
271
|
+
/**
|
|
272
|
+
* An area drawn on the map to choose what lies in it: a lasso, a ring of `[lon, lat]` pairs with
|
|
273
|
+
* the first point not repeated, or a circle around a `[lon, lat]` centre.
|
|
274
|
+
*/
|
|
275
|
+
export type MapArea = {
|
|
276
|
+
kind: 'lasso';
|
|
277
|
+
ring: [number, number][];
|
|
278
|
+
} | {
|
|
279
|
+
kind: 'circle';
|
|
280
|
+
centre: [number, number];
|
|
281
|
+
radiusKm: number;
|
|
282
|
+
};
|
|
283
|
+
/** A tool that draws an area on the map. */
|
|
284
|
+
export type MapTool = 'lasso' | 'circle' | 'rect';
|
|
285
|
+
/**
|
|
286
|
+
* The parts of a map a host switches on or off. Without a value each keeps its default: every
|
|
287
|
+
* part on, except the drawing tools, which choose for a host that filters on an area. With two
|
|
288
|
+
* or more tools on, one button opens a menu of them.
|
|
289
|
+
*/
|
|
290
|
+
export interface MapControls {
|
|
291
|
+
/** The + and − buttons, a double click and a pinch. Default on. */
|
|
292
|
+
zoom?: boolean;
|
|
293
|
+
/** Zooming on the wheel with Ctrl or ⌘ held. Default on. */
|
|
294
|
+
wheel?: boolean;
|
|
295
|
+
/** Panning with the mouse. Default on; on a phone a finger always scrolls the page. */
|
|
296
|
+
drag?: boolean;
|
|
297
|
+
/** The reset: the whole area in view and nothing chosen. Default on. */
|
|
298
|
+
reset?: boolean;
|
|
299
|
+
/** Choosing with a drawn lasso; sends `lintje-area-select`. Default off. */
|
|
300
|
+
lasso?: boolean;
|
|
301
|
+
/** Choosing with a drawn circle; sends `lintje-area-select`. Default off. */
|
|
302
|
+
circle?: boolean;
|
|
303
|
+
/** Choosing with a drawn rectangle, sent as a lasso of four corners. Default off. */
|
|
304
|
+
rect?: boolean;
|
|
305
|
+
/** A scale bar in km bottom right. Default on. */
|
|
306
|
+
scale?: boolean;
|
|
307
|
+
/** The legend above the map: a line per layer with its key and its series. Default on. */
|
|
308
|
+
legend?: boolean;
|
|
309
|
+
}
|
|
179
310
|
/** The basemap the map draws on, a WMS service the host configures. */
|
|
180
311
|
export interface WmsBasemap {
|
|
181
312
|
kind: 'wms';
|
|
@@ -213,12 +344,12 @@ export interface MapPlotData {
|
|
|
213
344
|
};
|
|
214
345
|
/**
|
|
215
346
|
* What each series in this layer means, over the map's own `seriesLabels`. A colour may serve
|
|
216
|
-
* several layers;
|
|
347
|
+
* several layers; each layer's line in the legend names and switches its own.
|
|
217
348
|
*/
|
|
218
349
|
seriesLabels?: Partial<Record<MapSeriesKey, string>>;
|
|
219
350
|
}
|
|
220
|
-
/** The map's data, as `
|
|
221
|
-
export interface
|
|
351
|
+
/** The map's data, as `MapData` in `src/types.ts` carries it, without the tile fields. */
|
|
352
|
+
export interface MapSpec {
|
|
222
353
|
variant: MapVariant;
|
|
223
354
|
geo?: 'world' | 'netherlands';
|
|
224
355
|
/** The marks of a one-variant map; empty with `variant: 'plots'`. */
|
|
@@ -232,7 +363,7 @@ export interface MapTileData {
|
|
|
232
363
|
};
|
|
233
364
|
unit?: string;
|
|
234
365
|
description: string;
|
|
235
|
-
/** Map height in px; default 400,
|
|
366
|
+
/** Map height in px; default 400, 280 below 768 px. */
|
|
236
367
|
height?: number;
|
|
237
368
|
selectedId?: string | null;
|
|
238
369
|
layers?: {
|
|
@@ -247,6 +378,10 @@ export interface MapTileData {
|
|
|
247
378
|
selectLabel?: string;
|
|
248
379
|
/** The URL that undoes the selection, for a page that keeps it in the URL. */
|
|
249
380
|
clearHref?: string;
|
|
250
|
-
/**
|
|
381
|
+
/** Tiles under the map: Leaflet draws the basemap, the map draws its data over it. */
|
|
251
382
|
basemap?: WmsBasemap;
|
|
383
|
+
/** Which parts of the map show and answer; each left out keeps its default. */
|
|
384
|
+
controls?: MapControls;
|
|
385
|
+
/** The area the host keeps, from its URL: adopted when it changes, as `selectedId` is. */
|
|
386
|
+
selectedArea?: MapArea | null;
|
|
252
387
|
}
|
package/dist-elements/types/components/shared/charts/stacked-area-chart/stacked-area-chart.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stacked areas: the parts of one variable in its tints, the first at the bottom and darkest. A
|
|
3
|
+
* missing value breaks its part and every part above it; the parts below stay, and the rest of
|
|
4
|
+
* the column is hatched (rule 15). A part switched off shrinks out and the parts above settle.
|
|
5
|
+
*/
|
|
6
|
+
import { type TemplateResult } from 'lit';
|
|
7
|
+
import { type ChartOptions } from '../shared/controller.js';
|
|
8
|
+
import type { ChartSpec } from '../shared/types.js';
|
|
9
|
+
type StackedAreaSpec = Extract<ChartSpec, {
|
|
10
|
+
kind: 'stacked-area';
|
|
11
|
+
}>;
|
|
12
|
+
export declare function renderStackedAreaChart(spec: StackedAreaSpec, options: ChartOptions): TemplateResult;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class DialogHold {
|
|
2
|
+
#private;
|
|
3
|
+
constructor(onEscape: () => void);
|
|
4
|
+
get held(): boolean;
|
|
5
|
+
isTopmost(): boolean;
|
|
6
|
+
/** The focus stays where it is: the window moves it once its content has drawn. */
|
|
7
|
+
hold(container: HTMLElement): void;
|
|
8
|
+
release(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Actions that do not fit on one line give way to one menu, "Meer", in front of the ones that
|
|
3
|
+
* stay: the page header's actions today. `overflowCount` is the arithmetic; `OverflowController`
|
|
4
|
+
* measures and applies it for an element whose actions are slotted `lintje-button`s.
|
|
5
|
+
*
|
|
6
|
+
* Both widths compared are independent of the outcome, so the choice cannot flip back and forth:
|
|
7
|
+
* an action in the menu stays laid out, invisible (`data-lintje-overflow`, hidden by the owner's
|
|
8
|
+
* `::slotted` rule), and the menu's trigger stays laid out the same way while it is spare, so
|
|
9
|
+
* every natural width can be read in either state. The owner's order is the priority: the first
|
|
10
|
+
* action goes first, the last never goes, and a menu of one row does not exist.
|
|
11
|
+
*/
|
|
12
|
+
import type { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
13
|
+
import type { LintjeButton } from '../../primitives/button/button.js';
|
|
14
|
+
import type { MenuEntry } from '../actions/menu-button/menu-button.js';
|
|
15
|
+
export interface OverflowItem {
|
|
16
|
+
width: number;
|
|
17
|
+
/** Never goes into the menu: the last action, and anything that is not a button. */
|
|
18
|
+
fixed: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* How many of the collapsible items, from the first, go into the menu so that the rest and the
|
|
22
|
+
* menu's trigger fit in `room` on one line. One alone never goes: then two go, or, with no second
|
|
23
|
+
* one to go with it, none.
|
|
24
|
+
*/
|
|
25
|
+
export declare function overflowCount(items: OverflowItem[], menuWidth: number, gap: number, room: number): number;
|
|
26
|
+
export interface OverflowHost extends ReactiveControllerHost, HTMLElement {
|
|
27
|
+
readonly renderRoot: HTMLElement | DocumentFragment;
|
|
28
|
+
}
|
|
29
|
+
export interface OverflowOptions {
|
|
30
|
+
/** The box the actions must fit in on one line, in the host's render root. */
|
|
31
|
+
row: string;
|
|
32
|
+
/** The `lintje-menu-button` that is "Meer", in the host's render root. */
|
|
33
|
+
menu: string;
|
|
34
|
+
/** The name of the slot the actions are in. */
|
|
35
|
+
slot: string;
|
|
36
|
+
}
|
|
37
|
+
export declare class OverflowController implements ReactiveController {
|
|
38
|
+
#private;
|
|
39
|
+
private readonly host;
|
|
40
|
+
private readonly options;
|
|
41
|
+
/** The buttons that went into the menu, in order. */
|
|
42
|
+
collapsed: LintjeButton[];
|
|
43
|
+
constructor(host: OverflowHost, options: OverflowOptions);
|
|
44
|
+
hostDisconnected(): void;
|
|
45
|
+
hostUpdated(): void;
|
|
46
|
+
/** The actions in the slot, in order. */
|
|
47
|
+
get actions(): HTMLElement[];
|
|
48
|
+
/** The menu's rows: one per collapsed button, a danger button after a separator. */
|
|
49
|
+
items(): MenuEntry[];
|
|
50
|
+
/** A chosen row clicks its button, so the owner's own listener sees the click. */
|
|
51
|
+
activate(value: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* Reads the room and every natural width, and asks for a render when the count changes. The
|
|
54
|
+
* attributes are written after that render (`hostUpdated`), never inside the observer: a
|
|
55
|
+
* synchronous change there would resize the row during the observer's own delivery.
|
|
56
|
+
*/
|
|
57
|
+
measure(): void;
|
|
58
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `<lintje-activity-log>` — a timeline of what happened to one item, newest first.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* written in Dutch.
|
|
4
|
+
* The host sends the entries in order, with `when` already written in Dutch. "Toon eerdere" shows
|
|
5
|
+
* ten more.
|
|
7
6
|
*/
|
|
8
7
|
import { type PropertyDeclarations, type TemplateResult } from 'lit';
|
|
9
8
|
import { LintjeElement } from '../../../core/element.js';
|
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<lintje-card>` — one item of a collection: a product, a dataset, a recording, an app.
|
|
3
|
-
* line above the title (its kind, its owner), the title, a line of text, optionally a few facts
|
|
4
|
-
* as a small table, a status as a glyph and its word, and at most two actions. A screenshot stands above it, a logo beside the title.
|
|
5
|
-
* Square and flat; in a grid it is drawn by `lintje-card-list`.
|
|
2
|
+
* `<lintje-card>` — one item of a collection: a product, a dataset, a recording, an app.
|
|
6
3
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* actions are. The card knows no domain: "toegang" or "eigenaar" are the host's words.
|
|
13
|
-
*
|
|
14
|
-
* `iconActions` stand beside the title as icon buttons, also on a card that is a link: an action
|
|
15
|
-
* on the item itself, such as marking it. One with `pressed` is a switch; the card keeps nothing
|
|
16
|
-
* and the host sets the new `pressed` after the event.
|
|
17
|
-
*
|
|
18
|
-
* `layout="horizontal"` wants a column of at least `--w-card-wide`; `lintje-card-list` keeps to it.
|
|
4
|
+
* Square and flat; in a grid it is drawn by `lintje-card-list`. A card is either a link or carries
|
|
5
|
+
* actions, never both: with an `href` and no actions the whole card is clickable. Icon actions
|
|
6
|
+
* stand beside the title, also on a card that is a link; one with `pressed` is a switch, and the
|
|
7
|
+
* host sets the new `pressed` after the event. The card knows no domain: "toegang" or "eigenaar"
|
|
8
|
+
* are the host's words.
|
|
19
9
|
*
|
|
20
10
|
* Events: `lintje-navigate` `{ href }` (a plain click on the title, the card or an action with an
|
|
21
|
-
* `href`
|
|
22
|
-
*
|
|
11
|
+
* `href`), `lintje-card-action` `{ id, value, pressed? }` (an action without `href`; `pressed`
|
|
12
|
+
* from an icon action that is a switch).
|
|
23
13
|
*/
|
|
24
14
|
import { type PropertyDeclarations, type PropertyValues, type TemplateResult } from 'lit';
|
|
25
15
|
import { LintjeElement } from '../../../core/element.js';
|
|
16
|
+
import { type Tone } from '../../../primitives/shared/tone.js';
|
|
26
17
|
import '../../../primitives/button/button.js';
|
|
27
18
|
import '../../../primitives/icon-button/icon-button.js';
|
|
28
19
|
import '../../../primitives/skeleton/skeleton.js';
|
|
29
|
-
export type CardStatusTone =
|
|
20
|
+
export type CardStatusTone = Tone;
|
|
30
21
|
export interface CardStatus {
|
|
31
22
|
/** The word that carries the status: "Je hebt toegang". */
|
|
32
23
|
label: string;
|
|
@@ -94,7 +85,10 @@ export declare class LintjeCard extends LintjeElement {
|
|
|
94
85
|
static styles: import("lit").CSSResult[];
|
|
95
86
|
static properties: PropertyDeclarations;
|
|
96
87
|
data?: CardData;
|
|
97
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* `horizontal`: the picture or logo in a column on the left, for a long list; below 768 px the
|
|
90
|
+
* vertical card. It wants a column of at least `--w-card-wide`, as `lintje-card-list` keeps.
|
|
91
|
+
*/
|
|
98
92
|
layout: CardLayout;
|
|
99
93
|
/** The level of the title, 2 to 4: a card stands under the page's or a section's heading. */
|
|
100
94
|
headingLevel: 2 | 3 | 4;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<lintje-card-list>` — a collection as cards: a real list, in as many columns as fit
|
|
3
|
-
*
|
|
4
|
-
* `layout="horizontal"` draws every card across, two side by side at most where they fit.
|
|
2
|
+
* `<lintje-card-list>` — a collection as cards: a real list, in as many columns as fit, every
|
|
3
|
+
* card in a row as tall as the tallest; below 768 px one column.
|
|
5
4
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* through. While `loading` it holds skeleton cards, so the page does not jump; a status region
|
|
10
|
-
* that is always there says it loads, and then how many it loaded.
|
|
11
|
-
*
|
|
12
|
-
* Events: those of its cards.
|
|
5
|
+
* It draws a `lintje-card` for each item and adds nothing of its own: the cards' events reach the
|
|
6
|
+
* host as they are. While `loading` it holds skeleton cards, so the page does not jump. The
|
|
7
|
+
* `empty` slot takes the way out under the empty text, such as a link.
|
|
13
8
|
*/
|
|
14
9
|
import { type PropertyDeclarations, type PropertyValues, type TemplateResult } from 'lit';
|
|
15
10
|
import { LintjeElement } from '../../../core/element.js';
|
|
@@ -22,7 +17,10 @@ export declare class LintjeCardList extends LintjeElement {
|
|
|
22
17
|
items: CardData[];
|
|
23
18
|
/** Names the list for a screen reader when no heading right above it does. */
|
|
24
19
|
label?: string;
|
|
25
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* `horizontal`: every card with its picture in a column on the left, for a long list; two side
|
|
22
|
+
* by side at most, where they fit.
|
|
23
|
+
*/
|
|
26
24
|
layout: CardLayout;
|
|
27
25
|
/** The level of every card's title, 2 to 4. */
|
|
28
26
|
headingLevel: 2 | 3 | 4;
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `<lintje-data-table>` — the data table, inside a tile
|
|
3
|
-
* two-column representation. Missing values are a muted dash, never 0 (rule 15).
|
|
2
|
+
* `<lintje-data-table>` — the data table, inside a tile; below 768 px a two-column list.
|
|
4
3
|
*
|
|
5
|
-
* The table never filters, saves or confirms: it
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* without a tile but with its states.
|
|
4
|
+
* A missing value is a muted dash, never 0. The table never filters, saves or confirms: it shows a
|
|
5
|
+
* change at once, and the host confirms it in the next `data`. Open rows and collapsed groups are
|
|
6
|
+
* the table's own: it sends nothing for them.
|
|
9
7
|
*
|
|
10
|
-
* Events: `lintje-sort-change` `{key, direction} | null`, `lintje-row-click`
|
|
11
|
-
* `lintje-row-open` `{id, label, href?}`,
|
|
12
|
-
* `lintje-
|
|
13
|
-
*
|
|
14
|
-
* `lintje-
|
|
15
|
-
* `lintje-filter-change` `{column, value}`, `lintje-columns-change` `{order, hidden}`.
|
|
8
|
+
* Events: `lintje-sort-change` `{ key, direction } | null`, `lintje-row-click`
|
|
9
|
+
* `{ id, label, href? }`, `lintje-row-open` `{ id, label, href? }`, `lintje-checked-change`
|
|
10
|
+
* `string[]`, `lintje-cell-edit` `{ id, column, value }`, `lintje-row-action` `{ id, action }`,
|
|
11
|
+
* `lintje-bulk-action` `{ ids, action }`, `lintje-filter-change` `{ column, value }`,
|
|
12
|
+
* `lintje-columns-change` `{ order, hidden }`.
|
|
16
13
|
*/
|
|
17
14
|
import { nothing, type PropertyDeclarations, type PropertyValues, type TemplateResult } from 'lit';
|
|
18
15
|
import { type FrameSettings } from '../../../core/element.js';
|
|
19
16
|
import { LintjeContentTileElement } from '../../shared/content-tile.js';
|
|
20
17
|
import '../../feedback/announcement/announcement.js';
|
|
18
|
+
import '../../feedback/empty-state/empty-state.js';
|
|
21
19
|
import '../description-list/description-list.js';
|
|
22
20
|
import '../../actions/menu-button/menu-button.js';
|
|
23
21
|
import '../pagination/pagination.js';
|
|
@@ -56,8 +54,12 @@ export declare class LintjeDataTable extends LintjeContentTileElement {
|
|
|
56
54
|
static styles: import("lit").CSSResult[];
|
|
57
55
|
static properties: PropertyDeclarations;
|
|
58
56
|
data?: DataTableData | null;
|
|
57
|
+
/** The table alone, for a component that already stands in a tile. */
|
|
59
58
|
bare: boolean;
|
|
60
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* On an application page: no tile, so no title or tile buttons, but with its states; the page's
|
|
61
|
+
* heading names it.
|
|
62
|
+
*/
|
|
61
63
|
plain: boolean;
|
|
62
64
|
/** The sort and checked rows are shown before the host confirms them. */
|
|
63
65
|
sort: SortState | null;
|
|
@@ -71,8 +73,10 @@ export declare class LintjeDataTable extends LintjeContentTileElement {
|
|
|
71
73
|
columnOrder: string[] | null;
|
|
72
74
|
hiddenKeys: string[];
|
|
73
75
|
panel: Panel | null;
|
|
74
|
-
/** The
|
|
75
|
-
|
|
76
|
+
/** The rows whose detail is open: on the phone the same list, so turning the screen keeps them. */
|
|
77
|
+
openRows: string[];
|
|
78
|
+
/** The groups of `groupBy` that stand collapsed, by their value. */
|
|
79
|
+
collapsedGroups: string[];
|
|
76
80
|
/** What the table's status region says: a sort, a page, a selection, a filter's result. */
|
|
77
81
|
liveMessage: string;
|
|
78
82
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
@@ -83,6 +87,22 @@ export declare class LintjeDataTable extends LintjeContentTileElement {
|
|
|
83
87
|
protected updated(changed: PropertyValues<this>): void;
|
|
84
88
|
private get columns();
|
|
85
89
|
private get rows();
|
|
90
|
+
/** The column `groupBy` names; it heads its groups and is not a column of its own. */
|
|
91
|
+
private get groupColumn();
|
|
92
|
+
private get grouped();
|
|
93
|
+
private get groupsPerPage();
|
|
94
|
+
/**
|
|
95
|
+
* `rows` in groups: the groups in the order they first occur in the host's rows, each group's
|
|
96
|
+
* rows in the order of `rows` as given (already sorted).
|
|
97
|
+
*/
|
|
98
|
+
private groupsOf;
|
|
99
|
+
private toggleGroup;
|
|
100
|
+
/**
|
|
101
|
+
* What a row's detail lists: the columns the chooser hides, then `detailFields`. Empty: rows
|
|
102
|
+
* have no detail on desktop.
|
|
103
|
+
*/
|
|
104
|
+
private get detailColumns();
|
|
105
|
+
private toggleRow;
|
|
86
106
|
private rowKey;
|
|
87
107
|
/** The row's key, the name in its first column and the `href` the host minted on the row. */
|
|
88
108
|
private rowDetail;
|
|
@@ -114,11 +134,24 @@ export declare class LintjeDataTable extends LintjeContentTileElement {
|
|
|
114
134
|
private clearFilter;
|
|
115
135
|
private chooserItems;
|
|
116
136
|
private changeColumns;
|
|
137
|
+
/** Every column shown, in the order the host declared them. */
|
|
138
|
+
private get columnsAreDefault();
|
|
139
|
+
private resetColumns;
|
|
140
|
+
/** "Filters wissen": one `lintje-filter-change` per active column, as a chip would send. */
|
|
141
|
+
private clearAllFilters;
|
|
117
142
|
protected render(): TemplateResult | typeof nothing;
|
|
118
143
|
private csv;
|
|
144
|
+
/**
|
|
145
|
+
* The table, or its state. In a tile the skeleton goes in the tile's `loading` slot and empty
|
|
146
|
+
* and error are the tile's; `plain`, without a tile, composes the elements itself.
|
|
147
|
+
*/
|
|
119
148
|
private content;
|
|
120
149
|
private table;
|
|
150
|
+
/** "6 van 131 rijen" while a filter narrows the rows and the host gave the total. */
|
|
151
|
+
private get filteredCount();
|
|
121
152
|
private toolbar;
|
|
153
|
+
/** "Alles inklappen" while any group is open, else "Alles uitklappen". */
|
|
154
|
+
private groupToggle;
|
|
122
155
|
/**
|
|
123
156
|
* Below 768 px only one measure has a header: "Sorteren" reaches every sortable column. Hidden
|
|
124
157
|
* from 768 px, where every column's header sorts.
|
|
@@ -128,9 +161,45 @@ export declare class LintjeDataTable extends LintjeContentTileElement {
|
|
|
128
161
|
private selectionBar;
|
|
129
162
|
private panels;
|
|
130
163
|
private fullTable;
|
|
164
|
+
/**
|
|
165
|
+
* A row of no height with each column's widest value over every row, not only this page's: a
|
|
166
|
+
* sort or another page shows other rows, and the columns keep their width.
|
|
167
|
+
*/
|
|
168
|
+
private sizerRow;
|
|
169
|
+
/** Per column the value whose words are longest, over every row; kept while the data stands. */
|
|
170
|
+
private widestRow;
|
|
171
|
+
/** A column's head: the sort button and, for a filterable column, its funnel. */
|
|
172
|
+
private headerCell;
|
|
173
|
+
/** The desktop's last column: the rows' menus, and in its head the column chooser. */
|
|
174
|
+
private get actionColumn();
|
|
175
|
+
private alignsRight;
|
|
176
|
+
/** One body row and, while it is open, its detail under it. */
|
|
177
|
+
private fullRow;
|
|
178
|
+
/** The button that opens a row's detail; the phone's row and the desktop's share it. */
|
|
179
|
+
private rowToggle;
|
|
180
|
+
/** What a row's columns leave out, as label and value. */
|
|
181
|
+
private detailList;
|
|
182
|
+
/**
|
|
183
|
+
* A group's heading: a button with the group's word and its count. Collapsed, the row carries
|
|
184
|
+
* the group's subtotals, so a collapsed table still reads.
|
|
185
|
+
*/
|
|
186
|
+
private groupRow;
|
|
187
|
+
private subtotalRow;
|
|
188
|
+
private totalsRow;
|
|
189
|
+
/** A totals or subtotal row: its label in the name's place, the host's values under their columns. */
|
|
190
|
+
private sumRow;
|
|
191
|
+
private totalCell;
|
|
131
192
|
private editableCell;
|
|
132
193
|
private mobileTable;
|
|
133
|
-
|
|
194
|
+
/** A phone row: the name and its line, one measure, the toggle and the menu; its list under it. */
|
|
195
|
+
private mobileRow;
|
|
196
|
+
private mobileGroupRow;
|
|
197
|
+
private mobileSumRow;
|
|
198
|
+
/**
|
|
199
|
+
* A total's value with the word before it that says how it was made. A threshold judges one
|
|
200
|
+
* row, not a sum: a total shows its figure plain.
|
|
201
|
+
*/
|
|
202
|
+
private totalContent;
|
|
134
203
|
/** Enter or Space on the row itself; a key meant for a control inside it stays that control's. */
|
|
135
204
|
private rowKeydown;
|
|
136
205
|
/** The page is view state, not a number: it stays out of the URL. The table counts from 0. */
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { type TemplateResult } from 'lit';
|
|
9
9
|
import '../../../primitives/popover/popover.js';
|
|
10
10
|
import '../../../primitives/button/button.js';
|
|
11
|
+
import '../../../primitives/tooltip/tooltip.js';
|
|
11
12
|
import '../../overlays/drawer/drawer.js';
|
|
12
13
|
import '../sortable-list/sortable-list.js';
|
|
13
14
|
import type { SortableItem } from '../sortable-list/sortable-list.js';
|
|
@@ -28,7 +29,6 @@ export declare function columnsChange(first: string, order: readonly string[], c
|
|
|
28
29
|
/** How the focus left a column panel: Tab past its first or last stop, or anywhere else. */
|
|
29
30
|
export type PanelLeave = 'back' | 'forward' | 'away';
|
|
30
31
|
export declare function renderFunnel(column: TableColumnData, value: FilterValue | null | undefined, expanded: boolean, onOpen: (anchor: HTMLElement) => void): TemplateResult;
|
|
31
|
-
export declare function renderFilterDot(): TemplateResult;
|
|
32
32
|
export declare function renderFilterField(column: TableColumnData, value: FilterValue | undefined, onChange: (value: FilterValue) => void): TemplateResult;
|
|
33
33
|
export declare function renderFilterPopover(options: {
|
|
34
34
|
column: TableColumnData;
|
|
@@ -52,14 +52,20 @@ export declare function renderFiltersSheet(options: {
|
|
|
52
52
|
export declare function renderToolbar(options: {
|
|
53
53
|
columns: TableColumnData[];
|
|
54
54
|
values: Record<string, FilterValue>;
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
/** "6 van 131 rijen" while a filter is active and no pager below says it; else empty. */
|
|
56
|
+
count: string;
|
|
57
57
|
/** Below 768 px, beside "Filters": the sort on any column. */
|
|
58
58
|
sortMenu?: unknown;
|
|
59
|
+
/** The table's own controls at the toolbar's end ("Alles inklappen"). */
|
|
60
|
+
chooser?: unknown;
|
|
59
61
|
onClearFilter: (column: string, button: HTMLElement) => void;
|
|
62
|
+
onClearAll: (button: HTMLElement) => void;
|
|
60
63
|
onOpenSheet: () => void;
|
|
61
64
|
}): TemplateResult;
|
|
62
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* "Kolommen kiezen": a quiet icon at the end of the head, above the rows' menus, where the columns
|
|
67
|
+
* are. The tooltip says its name, which is already the button's own.
|
|
68
|
+
*/
|
|
63
69
|
export declare function renderChooserButton(expanded: boolean, onOpen: (anchor: HTMLElement) => void): TemplateResult;
|
|
64
70
|
export declare function renderColumnChooser(options: {
|
|
65
71
|
first: TableColumnData;
|
|
@@ -67,6 +73,9 @@ export declare function renderColumnChooser(options: {
|
|
|
67
73
|
anchor: Element | null;
|
|
68
74
|
onOrder: (order: string[]) => void;
|
|
69
75
|
onChecked: (checked: string[]) => void;
|
|
76
|
+
/** Every column shown, in the host's order; disabled while that is what stands. */
|
|
77
|
+
onReset: () => void;
|
|
78
|
+
isDefault: boolean;
|
|
70
79
|
onClose: () => void;
|
|
71
80
|
onLeave: (how: PanelLeave) => boolean;
|
|
72
81
|
}): TemplateResult;
|