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
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export type ChartQuestion = 'time' | 'compare' | 'parts' | 'spread' | 'relation' | 'target';
|
|
2
|
+
/** The questions in the order a page asks them, as a reader would put them. */
|
|
3
|
+
export declare const CHART_QUESTIONS: Readonly<Record<ChartQuestion, string>>;
|
|
4
|
+
export interface ChartKindGuide {
|
|
5
|
+
/** The kind's Dutch name. */
|
|
6
|
+
label: string;
|
|
7
|
+
question: ChartQuestion;
|
|
8
|
+
/** What the kind is for. */
|
|
9
|
+
use: string;
|
|
10
|
+
/** When another kind fits better, and which. */
|
|
11
|
+
avoid: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const CHART_KINDS: {
|
|
14
|
+
readonly line: {
|
|
15
|
+
readonly label: 'Lijn';
|
|
16
|
+
readonly question: 'time';
|
|
17
|
+
readonly use: 'Het verloop van een of meer reeksen over de tijd, met een vergelijking in grijs, een peilmoment of wat er gebeurde.';
|
|
18
|
+
readonly avoid: 'Een paar losse groepen zonder volgorde: neem staven.';
|
|
19
|
+
};
|
|
20
|
+
readonly 'stacked-area': {
|
|
21
|
+
readonly label: 'Gestapeld vlak';
|
|
22
|
+
readonly question: 'time';
|
|
23
|
+
readonly use: 'Hoe de delen van één variabele samen het totaal vormen, door de tijd.';
|
|
24
|
+
readonly avoid: 'Delen die je los wilt volgen: alleen de onderste laag staat op de nullijn. Neem lijnen.';
|
|
25
|
+
};
|
|
26
|
+
readonly 'dual-axis': {
|
|
27
|
+
readonly label: 'Twee assen';
|
|
28
|
+
readonly question: 'time';
|
|
29
|
+
readonly use: 'Twee maten met een andere eenheid over dezelfde periode, zoals aantallen en een wachttijd met norm.';
|
|
30
|
+
readonly avoid: 'Twee maten in dezelfde eenheid: neem een lijn met twee reeksen. Waar de lijnen elkaar kruisen, kiest de schaal, niet de data.';
|
|
31
|
+
};
|
|
32
|
+
readonly bar: {
|
|
33
|
+
readonly label: 'Staven';
|
|
34
|
+
readonly question: 'compare';
|
|
35
|
+
readonly use: 'Eén waarde per groep of per periode, als de losse waarden tellen, met datalabels of een trendlijn.';
|
|
36
|
+
readonly avoid: 'Lange namen of veel groepen: neem horizontale staven.';
|
|
37
|
+
};
|
|
38
|
+
readonly 'horizontal-bar': {
|
|
39
|
+
readonly label: 'Horizontale staven';
|
|
40
|
+
readonly question: 'compare';
|
|
41
|
+
readonly use: 'Groepen met lange namen, op grootte, met een norm die laat zien wie erboven zit.';
|
|
42
|
+
readonly avoid: 'Een verloop in de tijd: tijd loopt van links naar rechts. Neem staven of een lijn.';
|
|
43
|
+
};
|
|
44
|
+
readonly 'grouped-bar': {
|
|
45
|
+
readonly label: 'Gegroepeerde staven';
|
|
46
|
+
readonly question: 'compare';
|
|
47
|
+
readonly use: 'Twee of drie reeksen naast elkaar per groep, om ze binnen de groep te vergelijken.';
|
|
48
|
+
readonly avoid: 'Meer dan drie reeksen: de groepen worden onleesbaar. Neem een lijn of een tabel.';
|
|
49
|
+
};
|
|
50
|
+
readonly 'stacked-bar': {
|
|
51
|
+
readonly label: 'Gestapelde staven';
|
|
52
|
+
readonly question: 'parts';
|
|
53
|
+
readonly use: 'De samenstelling per groep of per periode, in aantallen of op 100 %.';
|
|
54
|
+
readonly avoid: 'Eén geheel op één moment: neem een taart. Een deel boven de onderste laag precies vergelijken: neem gegroepeerde staven.';
|
|
55
|
+
};
|
|
56
|
+
readonly pie: {
|
|
57
|
+
readonly label: 'Taart of donut';
|
|
58
|
+
readonly question: 'parts';
|
|
59
|
+
readonly use: 'De delen van één geheel op één moment, tot vijf; meer vouwt tot "Overig". Een donut toont ook het deel van een geheel, met het cijfer in het midden.';
|
|
60
|
+
readonly avoid: 'Een verloop in de tijd, of delen die bijna even groot zijn: neem gestapelde staven.';
|
|
61
|
+
};
|
|
62
|
+
readonly histogram: {
|
|
63
|
+
readonly label: 'Histogram';
|
|
64
|
+
readonly question: 'spread';
|
|
65
|
+
readonly use: 'Hoe waarden over klassen vallen, zoals doorlooptijden, met een mediaan of een termijn.';
|
|
66
|
+
readonly avoid: 'Groepen zonder volgorde of zonder doorlopende as: neem staven.';
|
|
67
|
+
};
|
|
68
|
+
readonly heatmap: {
|
|
69
|
+
readonly label: 'Heatmap';
|
|
70
|
+
readonly question: 'spread';
|
|
71
|
+
readonly use: 'Een waarde over twee indelingen tegelijk, zoals uur en dag, in vijf klassen.';
|
|
72
|
+
readonly avoid: 'Precieze waarden aflezen: klassen ronden af. Neem een tabel.';
|
|
73
|
+
};
|
|
74
|
+
readonly scatter: {
|
|
75
|
+
readonly label: 'Spreiding';
|
|
76
|
+
readonly question: 'relation';
|
|
77
|
+
readonly use: 'Of twee maten samenhangen: een punt per eenheid, met een norm op de verticale as.';
|
|
78
|
+
readonly avoid: 'Een verloop in de tijd: neem een lijn.';
|
|
79
|
+
};
|
|
80
|
+
readonly 'target-progress': {
|
|
81
|
+
readonly label: 'Voortgang tegen een doel';
|
|
82
|
+
readonly question: 'target';
|
|
83
|
+
readonly use: 'Hoe ver een paar onderdelen zijn tegen één doel.';
|
|
84
|
+
readonly avoid: 'Eén kerncijfer tegen een doel: dat is een KPI op een schaal, in lintje-kpi.';
|
|
85
|
+
};
|
|
86
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Line and area chart with comparison, hatching
|
|
3
|
-
* as 0 (rule 15): `null` points are skipped and the missing part is hatched or cut off.
|
|
2
|
+
* Line and area chart with comparison, hatching, as-of time and events. Missing data is never
|
|
3
|
+
* drawn as 0 (rule 15): `null` points are skipped and the missing part is hatched or cut off.
|
|
4
4
|
*/
|
|
5
5
|
import { type TemplateResult } from 'lit';
|
|
6
6
|
import { type ChartOptions } from '../shared/controller.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { MapDrawing } from './drawings.js';
|
|
2
|
+
import type { MapArea } from '../shared/types.js';
|
|
3
|
+
/** The great-circle distance in km. */
|
|
4
|
+
export declare function distanceKm([lon1, lat1]: [number, number], [lon2, lat2]: [number, number]): number;
|
|
5
|
+
/**
|
|
6
|
+
* A rectangle between two corners, as a lasso of four: in Mercator a line of one longitude or
|
|
7
|
+
* latitude is straight, so the box on the screen is the box in degrees.
|
|
8
|
+
*/
|
|
9
|
+
export declare function rectRing([lon1, lat1]: [number, number], [lon2, lat2]: [number, number]): [number, number][];
|
|
10
|
+
/** A ring of four corners that is a rectangle: what `rectRing` draws, for the panel's words. */
|
|
11
|
+
export declare function isRect(ring: [number, number][]): boolean;
|
|
12
|
+
/** A ring without any area: every corner on one line of longitude or of latitude. */
|
|
13
|
+
export declare const flatRing: (ring: [number, number][]) => boolean;
|
|
14
|
+
export declare function inArea(area: MapArea, point: [number, number]): boolean;
|
|
15
|
+
/** The ids of the marks of every drawing that lie wholly in the area, in drawing order. */
|
|
16
|
+
export declare function idsInArea(area: MapArea, drawings: MapDrawing[], geo?: string): string[];
|
|
@@ -3,16 +3,20 @@
|
|
|
3
3
|
* svg map, the basemap and the tile's CSV read the same list, so a figure always speaks the unit
|
|
4
4
|
* and the series names of its own layer.
|
|
5
5
|
*/
|
|
6
|
-
import type { MapSeriesKey,
|
|
6
|
+
import type { MapSeriesKey, MapSpec, MapValue, MapVariant } from '../shared/types.js';
|
|
7
7
|
export type DrawingVariant = Exclude<MapVariant, 'plots'>;
|
|
8
8
|
export interface MapDrawing {
|
|
9
9
|
variant: DrawingVariant;
|
|
10
10
|
values: MapValue[];
|
|
11
|
+
/** The layer's place in the stack, from the bottom; what keys a series switched off. */
|
|
12
|
+
index: number;
|
|
11
13
|
/** The layer's name in the legend and the CSV: its `label`, or the word for its variant. */
|
|
12
14
|
name: string;
|
|
13
15
|
unit: string;
|
|
14
16
|
/** The largest figure, at least 1: what the classes, widths and sizes scale to. */
|
|
15
17
|
max: number;
|
|
18
|
+
/** The smallest figure a mark carries, for the legend's range; `max` without any. */
|
|
19
|
+
min: number;
|
|
16
20
|
destination?: {
|
|
17
21
|
lon: number;
|
|
18
22
|
lat: number;
|
|
@@ -21,6 +25,6 @@ export interface MapDrawing {
|
|
|
21
25
|
seriesLabels?: Partial<Record<MapSeriesKey, string>>;
|
|
22
26
|
}
|
|
23
27
|
/** The drawings in the order they draw, bottom first; `unit` is the map's own. */
|
|
24
|
-
export declare function mapDrawings(data:
|
|
28
|
+
export declare function mapDrawings(data: MapSpec, unit: string): MapDrawing[];
|
|
25
29
|
/** A figure and its unit, without a dangling space when the unit is empty. */
|
|
26
30
|
export declare function withUnit(figure: string, unit: string): string;
|
|
@@ -1,8 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The map's surface: Leaflet carries the map — the projection, the panes, dragging, zooming and
|
|
3
|
+
* the tiles of a basemap — and the design system draws the data itself, into Leaflet's svg
|
|
4
|
+
* renderer (`marks.ts`). One instance hangs on the `ChartController`; `sync()` runs on every
|
|
5
|
+
* render. Geometry is unprojected (`*.lonlat.json`) and projected here once, at the zoom the
|
|
6
|
+
* map opens on; a pan or a zoom moves the drawing's group, not its paths.
|
|
7
|
+
*/
|
|
8
|
+
import * as L from 'leaflet';
|
|
1
9
|
import type { ChartController } from '../shared/controller.js';
|
|
2
|
-
import type {
|
|
10
|
+
import type { MapArea, MapSpec, MapTool, MapValue } from '../shared/types.js';
|
|
3
11
|
export interface LeafletSyncOptions {
|
|
4
12
|
unit: string;
|
|
5
13
|
active: string | null;
|
|
14
|
+
/** The series the legend switched off, as `seriesKey()` names them. */
|
|
15
|
+
hidden: string[];
|
|
16
|
+
/** The layers of a stack switched off, by their place in it. */
|
|
17
|
+
hiddenLayers: number[];
|
|
18
|
+
/** The area that chose marks, and the marks it chose. */
|
|
19
|
+
area: MapArea | null;
|
|
20
|
+
chosen: string[];
|
|
21
|
+
/** The drawing tool that is on, and what a finished area goes to. */
|
|
22
|
+
tool: MapTool | null;
|
|
23
|
+
drawn: (area: MapArea) => void;
|
|
24
|
+
/** Escape with no area being drawn: the tool goes off. */
|
|
25
|
+
stopTool: () => void;
|
|
26
|
+
/** Panning with the mouse, and zooming by double click and pinch; the host may switch them off. */
|
|
27
|
+
drag: boolean;
|
|
28
|
+
zoom: boolean;
|
|
29
|
+
/** The scale bar shows: a move redraws the map so it follows. */
|
|
30
|
+
scale: boolean;
|
|
6
31
|
select: (value: MapValue) => void;
|
|
7
32
|
clear: () => void;
|
|
8
33
|
/** Below 768 px, where a one-finger drag belongs to the page (rule 9). */
|
|
@@ -11,6 +36,8 @@ export interface LeafletSyncOptions {
|
|
|
11
36
|
export declare class LeafletSurface {
|
|
12
37
|
#private;
|
|
13
38
|
constructor(controller: ChartController);
|
|
39
|
+
/** The Leaflet map, once the container has a size; a test looks at it. */
|
|
40
|
+
get map(): L.Map | null;
|
|
14
41
|
/**
|
|
15
42
|
* `ref` callback for the container. The map is built by the `ResizeObserver`, not here: Lit
|
|
16
43
|
* commits a `ref` while the node is in its template fragment (0 × 0), and Leaflet would write
|
|
@@ -18,9 +45,25 @@ export declare class LeafletSurface {
|
|
|
18
45
|
*/
|
|
19
46
|
readonly attach: (element: Element | undefined) => void;
|
|
20
47
|
/** Applying synchronously is deliberate: a selection must land in the frame of its panel. */
|
|
21
|
-
sync(data:
|
|
48
|
+
sync(data: MapSpec, options: LeafletSyncOptions): void;
|
|
22
49
|
zoomIn(): void;
|
|
23
50
|
zoomOut(): void;
|
|
51
|
+
/** A wheel with its key: so many doublings around the pointer, fractional. */
|
|
52
|
+
zoomBy(event: MouseEvent, doublings: number): void;
|
|
53
|
+
/**
|
|
54
|
+
* The scale bar: a round distance in metres (1, 2 or 5 times a power of ten), at most `room`
|
|
55
|
+
* px wide, measured across the middle of the view, where Mercator's scale holds for what the
|
|
56
|
+
* reader looks at.
|
|
57
|
+
*/
|
|
58
|
+
scaleBar(room?: number): {
|
|
59
|
+
width: number;
|
|
60
|
+
metres: number;
|
|
61
|
+
} | null;
|
|
62
|
+
/**
|
|
63
|
+
* On paper the box has another size, and Leaflet would keep the screen's pixels and cut the
|
|
64
|
+
* rest off: the area the reader saw fills the paper's box instead, and returns afterwards.
|
|
65
|
+
*/
|
|
66
|
+
print(printing: boolean): void;
|
|
24
67
|
home(): void;
|
|
25
68
|
destroy(): void;
|
|
26
69
|
}
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The map: its chrome — the legend above it, the layer switcher, the zoom buttons, the select
|
|
3
|
+
* button with its menu of tools, the scale and the selection panel — around the surface that
|
|
4
|
+
* draws it (`leaflet.ts`).
|
|
5
|
+
*/
|
|
2
6
|
import { type TemplateResult } from 'lit';
|
|
3
7
|
import type { ChartOptions } from '../shared/controller.js';
|
|
4
|
-
import type {
|
|
8
|
+
import type { MapArea, MapSpec, MapValue } from '../shared/types.js';
|
|
9
|
+
import '../../../../primitives/popover/popover.js';
|
|
10
|
+
/** The map's own height in a tile: on a phone taller, so all its buttons fit on the touch size. */
|
|
11
|
+
export declare const MAP_HEIGHT: {
|
|
12
|
+
readonly desktop: 400;
|
|
13
|
+
readonly mobile: 280;
|
|
14
|
+
};
|
|
15
|
+
/** The distance of the scale, in m or km: the figure beside the bracket. */
|
|
16
|
+
export declare function scaleLabel(metres: number): string;
|
|
5
17
|
/**
|
|
6
18
|
* What the map sends back. `description` and `selectedId` come from the map's own data, so
|
|
7
19
|
* the chart options of those names are omitted.
|
|
@@ -13,5 +25,7 @@ export interface MapOptions extends Omit<ChartOptions, 'description' | 'onSelect
|
|
|
13
25
|
/** The selection was undone (chosen mark again, empty map, Escape, close); travels the id. */
|
|
14
26
|
onClear?: (previousId: string) => void;
|
|
15
27
|
onLayerChange?: (value: string) => void;
|
|
28
|
+
/** An area was drawn, or undone (`null`); travels the ids of every mark in it. */
|
|
29
|
+
onArea?: (area: MapArea | null, ids: string[]) => void;
|
|
16
30
|
}
|
|
17
|
-
export declare function renderMap(data:
|
|
31
|
+
export declare function renderMap(data: MapSpec, options: MapOptions): TemplateResult;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The legend above the map: a line per layer — its name, which switches the layer; its key,
|
|
3
|
+
* what its figures mean; its series, each a switch; and the hatch where it has gaps. The key is
|
|
4
|
+
* the same drawing as the map's: the classes, the sizes or the widths of its marks.
|
|
5
|
+
*/
|
|
6
|
+
import { type TemplateResult } from 'lit';
|
|
7
|
+
import { type MapDrawing } from './drawings.js';
|
|
8
|
+
/** The lines a tile shows before the rest folds under "Nog n lagen". */
|
|
9
|
+
export declare const LEGEND_ROWS = 3;
|
|
10
|
+
export interface MapLegendOptions {
|
|
11
|
+
drawings: MapDrawing[];
|
|
12
|
+
/** The layers switched off, by their place in the stack. */
|
|
13
|
+
hiddenLayers: number[];
|
|
14
|
+
/** The series switched off, as `seriesKey()` names them. */
|
|
15
|
+
hiddenSeries: string[];
|
|
16
|
+
/** The modal: every layer, the classes with their bounds, the sizes nested at true size. */
|
|
17
|
+
expanded: boolean;
|
|
18
|
+
/** Below 768 px: one column, the series of a layer on their own line. */
|
|
19
|
+
mobile: boolean;
|
|
20
|
+
/** A tile's legend of more than `LEGEND_ROWS` layers is unfolded. */
|
|
21
|
+
open: boolean;
|
|
22
|
+
onLayer: (index: number) => void;
|
|
23
|
+
onSeries: (key: string) => void;
|
|
24
|
+
onOpen: (open: boolean) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare function renderMapLegend(options: MapLegendOptions): TemplateResult;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The data on the map, drawn by the design system itself into Leaflet's svg: the land, then every
|
|
3
|
+
* drawing in the host's order, the first at the bottom. Geometry is projected once, at the zoom
|
|
4
|
+
* the surface took as its reference; a pan or a zoom moves the group that holds it, so a mark
|
|
5
|
+
* with a pixel size (a point, the destination of the flows) is a `__symbol` the surface places
|
|
6
|
+
* and scales back by itself. Every event a mark answers stops at the mark: the map's own click
|
|
7
|
+
* clears the selection, and its double click zooms.
|
|
8
|
+
*/
|
|
9
|
+
import { nothing, type SVGTemplateResult } from 'lit';
|
|
10
|
+
import type { ChartController } from '../shared/controller.js';
|
|
11
|
+
import { type MapDrawing } from './drawings.js';
|
|
12
|
+
import type { MapArea, MapSeriesKey, MapValue } from '../shared/types.js';
|
|
13
|
+
/** Longitude and latitude to the surface's reference pixels. */
|
|
14
|
+
export type Project = (lon: number, lat: number) => [number, number];
|
|
15
|
+
/** A shape of the map's own geometry, as a path in reference pixels. */
|
|
16
|
+
export interface LandShape {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
d: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const CLASSES: string[];
|
|
22
|
+
export declare function classFor(value: number, max: number): number;
|
|
23
|
+
/** What every mark draws with. */
|
|
24
|
+
export interface MarksContext {
|
|
25
|
+
/** The controller's id, which names the hatch pattern. */
|
|
26
|
+
id: string;
|
|
27
|
+
active: string | null;
|
|
28
|
+
/** The marks a drawn area chose: outlined as a chosen mark is, the flows beside them muted. */
|
|
29
|
+
chosen: Set<string>;
|
|
30
|
+
controller: ChartController;
|
|
31
|
+
select: (value: MapValue) => void;
|
|
32
|
+
project: Project;
|
|
33
|
+
/** On a basemap the tiles are the land: only the areas with a row are drawn. */
|
|
34
|
+
tiled: boolean;
|
|
35
|
+
/** The series the legend switched off, as `seriesKey(drawing, series)`: not drawn. */
|
|
36
|
+
hidden: Set<string>;
|
|
37
|
+
/** The layers the legend switched off, by their place in the stack: drawn `is-off`, so they can go with a motion. */
|
|
38
|
+
hiddenLayers: Set<number>;
|
|
39
|
+
}
|
|
40
|
+
/** The radius of a point with a figure: between 3 and 18 px, by the square root of its share. */
|
|
41
|
+
export declare function pointRadius(value: number, max: number): number;
|
|
42
|
+
/** A series of one layer, as the legend switches it: a colour may serve several layers. */
|
|
43
|
+
export declare const seriesKey: (drawing: MapDrawing, series: MapSeriesKey) => string;
|
|
44
|
+
/** A drawn area, in the reference pixels; a circle with its middle. `draft` is the area while it is drawn. */
|
|
45
|
+
export declare function renderRegion(area: MapArea | null, project: Project, draft?: boolean): SVGTemplateResult | typeof nothing;
|
|
46
|
+
/** The whole drawing: the hatch, the land, then the drawings in order, each as one of three kinds. */
|
|
47
|
+
export declare function renderData(land: LandShape[], drawings: MapDrawing[], context: MarksContext, area?: MapArea | null): SVGTemplateResult;
|
|
@@ -11,7 +11,7 @@ export interface Box {
|
|
|
11
11
|
/** How far a revealed mark stands off the overlay or edge it passed, in px. */
|
|
12
12
|
export declare const REVEAL_MARGIN = 8;
|
|
13
13
|
/** What stands over the drawing: the tile's own overlays and Leaflet's credit. */
|
|
14
|
-
export declare const OVERLAYS = ".lintje-map-chart__layers, .lintje-map-chart__zoom, .lintje-map-
|
|
14
|
+
export declare const OVERLAYS = ".lintje-map-chart__layers, .lintje-map-chart__zoom, .lintje-map-chart__selection, .lintje-map-chart__scale-bar, .leaflet-control";
|
|
15
15
|
/** The overlays in `area`, as boxes in client pixels; one that is not drawn has no size. */
|
|
16
16
|
export declare function overlayBoxes(area: Element): Box[];
|
|
17
17
|
/**
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scatter plot: two value axes, a point per record. A series is a colour and the shape that
|
|
3
|
+
* colour has on a map (rule 13); a point without both values is not drawn (rule 15).
|
|
4
|
+
*/
|
|
5
|
+
import { type TemplateResult } from 'lit';
|
|
6
|
+
import { type PlotArea } from '../shared/scale.js';
|
|
7
|
+
import { type ChartOptions } from '../shared/controller.js';
|
|
8
|
+
import type { ChartSpec } from '../shared/types.js';
|
|
9
|
+
type ScatterSpec = Extract<ChartSpec, {
|
|
10
|
+
kind: 'scatter';
|
|
11
|
+
}>;
|
|
12
|
+
interface DataLabel {
|
|
13
|
+
label: string;
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
anchor: 'start' | 'end';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The named points' labels, above-left of their point or above-right where the left has no
|
|
20
|
+
* room. A label must stay in the drawing, clear of the other labels and of every other point;
|
|
21
|
+
* when one cannot, none shows (all or nothing).
|
|
22
|
+
*/
|
|
23
|
+
export declare function placeDataLabels(points: {
|
|
24
|
+
label: string;
|
|
25
|
+
x: number;
|
|
26
|
+
y: number;
|
|
27
|
+
}[], names: string[], area: PlotArea, fontFamily: string): DataLabel[];
|
|
28
|
+
export declare function renderScatterChart(spec: ScatterSpec, options: ChartOptions): TemplateResult;
|
|
29
|
+
export {};
|
|
@@ -8,26 +8,41 @@ export type SvgSlot = SVGTemplateResult | typeof nothing | false | null | undefi
|
|
|
8
8
|
export interface LegendItem {
|
|
9
9
|
label: string;
|
|
10
10
|
color?: string;
|
|
11
|
-
|
|
11
|
+
/** `point`: the series' symbol alone, as a scatter plot or a map draws it; `hatch` is "no data". */
|
|
12
|
+
shape?: 'square' | 'line' | 'dashed' | 'point' | 'hatch';
|
|
12
13
|
/** The shape the line carries at its end, drawn on its line marker (rule 13). */
|
|
13
14
|
symbol?: SeriesKey;
|
|
14
15
|
hidden?: boolean;
|
|
16
|
+
/** Not a series but a reference, such as a norm: never a toggle. */
|
|
17
|
+
fixed?: boolean;
|
|
18
|
+
/** What `onToggle` receives; without it the label. */
|
|
19
|
+
key?: string;
|
|
15
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* A series' symbol as a scatter plot draws it, for a marker: its shape in `currentColor`, and a
|
|
23
|
+
* dark-yellow one with the edge of its text colour (`lineCasing`).
|
|
24
|
+
*/
|
|
25
|
+
export declare function renderSymbol(symbol: SeriesKey, color: string | undefined, centre: number): SVGTemplateResult;
|
|
16
26
|
export declare function renderLegend({ items, onToggle, position, }: {
|
|
17
27
|
items: LegendItem[];
|
|
18
28
|
onToggle?: (label: string) => void;
|
|
19
29
|
position?: 'top' | 'bottom' | 'right';
|
|
20
30
|
}): TemplateResult;
|
|
31
|
+
type XAnchor = 'start' | 'middle' | 'end';
|
|
21
32
|
export interface ChartFrameOptions {
|
|
22
33
|
area?: PlotArea;
|
|
23
34
|
ticks: number[];
|
|
24
35
|
max: number;
|
|
25
36
|
/** Unit above the axis, e.g. "Afgehandelde aanvragen". */
|
|
26
37
|
axisTitle?: string;
|
|
38
|
+
/** `anchor` defaults to the middle; the last label of a value axis ends at the plot's edge. */
|
|
27
39
|
xLabels?: {
|
|
28
40
|
label: string;
|
|
29
41
|
x: number;
|
|
42
|
+
anchor?: XAnchor;
|
|
30
43
|
}[];
|
|
44
|
+
/** The title of a value axis along the bottom, under its labels at the right. */
|
|
45
|
+
xTitle?: string;
|
|
31
46
|
/** Description for screen readers; replaces the chart in the accessibility tree. */
|
|
32
47
|
description: string;
|
|
33
48
|
height?: number;
|
|
@@ -57,14 +72,15 @@ export declare function renderFocusRing(id: string): SVGTemplateResult;
|
|
|
57
72
|
export declare function focusRingStyle(id: string): Record<string, string>;
|
|
58
73
|
/**
|
|
59
74
|
* The x labels that fit: every one while no two neighbours touch, otherwise every second,
|
|
60
|
-
* third, … from the first on. Neighbours are measured pair by pair,
|
|
61
|
-
* a short one can fit where equal day labels do not.
|
|
75
|
+
* third, … from the first on. Neighbours are measured pair by pair, each where its anchor puts
|
|
76
|
+
* it, so one long name beside a short one can fit where equal day labels do not.
|
|
62
77
|
*/
|
|
63
78
|
export declare function thinLabels<T extends {
|
|
64
79
|
label: string;
|
|
65
80
|
x: number;
|
|
81
|
+
anchor?: XAnchor;
|
|
66
82
|
}>(labels: T[], fontFamily?: string): T[];
|
|
67
|
-
export declare function renderChartFrame({ area, ticks, max, axisTitle, xLabels, description, defs, zeroLine, formatTick, id, height, fontFamily, interactive, keys, }: ChartFrameOptions, children: SvgSlot): TemplateResult;
|
|
83
|
+
export declare function renderChartFrame({ area, ticks, max, axisTitle, xLabels, xTitle, description, defs, zeroLine, formatTick, id, height, fontFamily, interactive, keys, }: ChartFrameOptions, children: SvgSlot): TemplateResult;
|
|
68
84
|
/**
|
|
69
85
|
* The as-of marker. Up to 6 pending hours (tail) it draws nothing and the missing hours are
|
|
70
86
|
* hatched; beyond that (early) the series is cut off, with a line, a label and a note.
|
|
@@ -77,3 +93,4 @@ export declare function renderAsOfMarker({ area, index, count, label, lastValue,
|
|
|
77
93
|
lastValue?: string;
|
|
78
94
|
pendingHours: number;
|
|
79
95
|
}): SvgSlot;
|
|
96
|
+
export {};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { type TemplateResult } from 'lit';
|
|
7
7
|
/** One icon, or the text that stands in for it while no file has that name. */
|
|
8
|
-
export declare function chartIcon(name: string, text: string, size?: number): TemplateResult | string;
|
|
8
|
+
export declare function chartIcon(name: string, text: string, size?: number, flip?: 'horizontal' | 'vertical'): TemplateResult | string;
|
|
9
9
|
/** The map's zoom controls, in the order the map and its skeleton draw them. */
|
|
10
10
|
export declare const ZOOM_CONTROLS: readonly [{
|
|
11
11
|
readonly action: 'in';
|
|
@@ -19,7 +19,8 @@ export declare const ZOOM_CONTROLS: readonly [{
|
|
|
19
19
|
readonly label: 'Uitzoomen';
|
|
20
20
|
}, {
|
|
21
21
|
readonly action: 'home';
|
|
22
|
-
readonly name: 'functioneel-
|
|
22
|
+
readonly name: 'functioneel-refresh';
|
|
23
|
+
readonly flip: 'horizontal';
|
|
23
24
|
readonly text: 'Terug';
|
|
24
|
-
readonly label: '
|
|
25
|
+
readonly label: 'Kaart terugzetten';
|
|
25
26
|
}];
|
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* their CSS. A host with its own announcement element passes it in `announcement`.
|
|
2
|
+
* The loading skeleton in the shape of the chart. Empty and error are the tile's: it draws them
|
|
3
|
+
* with the shared blocks. The skeleton writes the markup of `lintje-skeleton`, not its CSS.
|
|
5
4
|
*/
|
|
6
5
|
import { type TemplateResult } from 'lit';
|
|
7
6
|
export type ChartSkeletonKind = 'line' | 'bar' | 'pie' | 'donut' | 'heatmap' | 'map' | 'table';
|
|
8
|
-
/** Loading skeleton in the shape of the chart, exactly `height` tall so the tile keeps its size. */
|
|
9
|
-
export declare function renderChartSkeleton({ kind, height, }?: {
|
|
10
|
-
kind?: ChartSkeletonKind;
|
|
11
|
-
height?: string;
|
|
12
|
-
}): TemplateResult;
|
|
13
|
-
/** Axes, grid and zero line stay; the message names the way out itself. */
|
|
14
|
-
export declare function renderChartEmpty(message: unknown, height?: string): TemplateResult;
|
|
15
|
-
/** The error announcement for a component: `live: true`, so a screen reader speaks it. */
|
|
16
|
-
export declare function liveAnnouncement(message: unknown): TemplateResult;
|
|
17
7
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
8
|
+
* Loading skeleton in the shape of the chart, exactly `height` tall so the tile keeps its size.
|
|
9
|
+
* Inside a tile's `loading` slot the tile's region speaks (`status: false`); on its own it is
|
|
10
|
+
* the region, in words.
|
|
20
11
|
*/
|
|
21
|
-
export declare function
|
|
22
|
-
|
|
23
|
-
lastKnown?: unknown;
|
|
12
|
+
export declare function renderChartSkeleton({ kind, height, status, }?: {
|
|
13
|
+
kind?: ChartSkeletonKind;
|
|
24
14
|
height?: string;
|
|
25
|
-
|
|
26
|
-
announcement?: (message: unknown) => TemplateResult;
|
|
15
|
+
status?: boolean;
|
|
27
16
|
}): TemplateResult;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type PlotArea } from './scale.js';
|
|
2
2
|
import type { LeafletSurface } from '../map-chart/leaflet.js';
|
|
3
3
|
import type { ChartSelection } from './mark-select.js';
|
|
4
|
+
import type { SeriesKey } from './series-shapes.js';
|
|
5
|
+
import type { MapArea, MapTool } from './types.js';
|
|
4
6
|
/** What every `render*` takes besides its data. */
|
|
5
7
|
export interface ChartOptions {
|
|
6
8
|
/** The state this chart keeps between renders. One per chart. */
|
|
@@ -27,11 +29,21 @@ export declare function chartArea(options: ChartOptions, margins?: Partial<PlotA
|
|
|
27
29
|
export interface TooltipRow {
|
|
28
30
|
label: string;
|
|
29
31
|
value: string;
|
|
30
|
-
|
|
32
|
+
/** The swatch; a row without one is a plain figure. */
|
|
33
|
+
color?: string;
|
|
34
|
+
/** A line above the row, which sums up the rows before it: a total. */
|
|
35
|
+
divider?: boolean;
|
|
36
|
+
/** The series' shape instead of a square swatch, as its legend draws it. */
|
|
37
|
+
symbol?: SeriesKey;
|
|
31
38
|
}
|
|
32
39
|
export interface TooltipContent {
|
|
33
40
|
title: string;
|
|
34
41
|
rows: TooltipRow[];
|
|
42
|
+
/** The events at this category, under the values: their number and text. */
|
|
43
|
+
events?: {
|
|
44
|
+
number: number;
|
|
45
|
+
label: string;
|
|
46
|
+
}[];
|
|
35
47
|
}
|
|
36
48
|
export interface TooltipState {
|
|
37
49
|
x: number;
|
|
@@ -59,27 +71,32 @@ export declare class ChartController {
|
|
|
59
71
|
/** What the keyboard's tooltip says, for the chart's status region; empty otherwise. */
|
|
60
72
|
status: string;
|
|
61
73
|
hiddenSeries: string[];
|
|
74
|
+
/** The layers of a stacked map switched off in its legend, by their place in the stack. */
|
|
75
|
+
hiddenLayers: number[];
|
|
62
76
|
hoverSegment: number | null;
|
|
63
77
|
selectedCell: {
|
|
64
78
|
row: number;
|
|
65
79
|
column: number;
|
|
66
80
|
} | null;
|
|
67
81
|
dimmedClass: number | null;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
x: number;
|
|
72
|
-
y: number;
|
|
73
|
-
} | null;
|
|
74
|
-
/** How far a revealed mark moved the view past the map's edge, in its units; `null` for none. */
|
|
75
|
-
mapNudge: {
|
|
76
|
-
x: number;
|
|
77
|
-
y: number;
|
|
78
|
-
} | null;
|
|
82
|
+
/** What a wheel without its modifier shows, until its timer clears it. */
|
|
83
|
+
mapHint: string | null;
|
|
84
|
+
mapHintTimer: ReturnType<typeof setTimeout> | null;
|
|
79
85
|
mapSelection: string | null;
|
|
86
|
+
/** The drawing tool that is on: a pointer on the map then draws instead of panning. */
|
|
87
|
+
mapTool: MapTool | null;
|
|
88
|
+
/** The tool the map's one select button shows: the last one used, until a shape is chosen. */
|
|
89
|
+
mapLastTool: MapTool | null;
|
|
90
|
+
/** The menu of tools stands open, and which row takes the focus once it has drawn. */
|
|
91
|
+
mapMenuOpen: boolean;
|
|
92
|
+
mapMenuFocus: 'first' | 'last' | 'checked' | null;
|
|
93
|
+
/** A legend of more than three layers is unfolded. */
|
|
94
|
+
mapLegendOpen: boolean;
|
|
95
|
+
/** The area that chose marks, and the last one the host sent, compared as JSON. */
|
|
96
|
+
mapArea: MapArea | null;
|
|
97
|
+
hostArea: string | undefined;
|
|
80
98
|
hostSelection: string | null | undefined;
|
|
81
|
-
|
|
82
|
-
/** The Leaflet map, created lazily when the data carries a basemap; `detach()` destroys it. */
|
|
99
|
+
/** The map's surface, created on the first render; `detach()` destroys it. */
|
|
83
100
|
leaflet: LeafletSurface | null;
|
|
84
101
|
/** Centre and zoom of the Leaflet map. `detach()` keeps it so a re-attach does not reset. */
|
|
85
102
|
leafletView: {
|
|
@@ -88,7 +105,8 @@ export declare class ChartController {
|
|
|
88
105
|
zoom: number;
|
|
89
106
|
} | null;
|
|
90
107
|
private readonly notify;
|
|
91
|
-
|
|
108
|
+
/** The chart's box, once attached; the map finds its own buttons in it. */
|
|
109
|
+
element: HTMLElement | null;
|
|
92
110
|
private measuring;
|
|
93
111
|
private resizeObserver;
|
|
94
112
|
private intersectionObserver;
|
|
@@ -128,6 +146,7 @@ export declare class ChartController {
|
|
|
128
146
|
private watching;
|
|
129
147
|
private watchEscape;
|
|
130
148
|
private unwatchEscape;
|
|
149
|
+
toggleLayer(index: number): void;
|
|
131
150
|
toggleSeries(label: string): void;
|
|
132
151
|
private read;
|
|
133
152
|
/**
|