lintje 0.2.0 → 0.4.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/chunks/{base-Bg-IFOPG.js → base-DRGvkF-r.js} +484 -309
- package/dist-elements/chunks/{controls-B1455oPG.js → controls-_4ac1Lpz.js} +7 -1
- package/dist-elements/chunks/{date-format-mHtZyBys.js → date-format-DxP9yfDp.js} +1 -1
- package/dist-elements/chunks/dialog-B7aRBtjy.js +28 -0
- package/dist-elements/chunks/{disclosure-BXTX04gM.js → disclosure-D39vAR5q.js} +1 -1
- package/dist-elements/chunks/{disclosure-CMXhX-Vb.js → disclosure-DirPLy2E.js} +6 -6
- package/dist-elements/chunks/download-C68kcwPj.js +206 -0
- package/dist-elements/chunks/{focus-trap-9BnE-xWv.js → focus-trap-Dv8zu64A.js} +1 -1
- package/dist-elements/chunks/input-BGMLam-O.js +195 -0
- package/dist-elements/chunks/input-lQTmOMOz.js +4 -0
- package/dist-elements/chunks/{player-DXOZEyEy.js → player-BApadXr8.js} +27 -27
- package/dist-elements/chunks/{sentence-BI3lwEuT.js → sentence-0wO85ZdJ.js} +3 -3
- package/dist-elements/chunks/{stagger-qGD3wmhg.js → stagger-BB_gcxBI.js} +88 -74
- package/dist-elements/content.js +1 -0
- package/dist-elements/core.js +1 -1
- package/dist-elements/custom-elements.json +8858 -7715
- package/dist-elements/data-types.json +6900 -0
- package/dist-elements/feedback.js +2 -1
- package/dist-elements/frame.js +0 -2
- package/dist-elements/guides/dashboard.md +8 -0
- package/dist-elements/guides/events.md +4 -5
- package/dist-elements/guides/loading.md +10 -9
- package/dist-elements/guides/page-contents.md +110 -0
- package/dist-elements/guides/start.md +12 -0
- package/dist-elements/inputs.js +3 -1
- package/dist-elements/layout.js +1 -1
- package/dist-elements/lintje.js +8562 -7138
- 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 +15 -15
- package/dist-elements/tag/ai-label.js +10 -10
- package/dist-elements/tag/announcement.js +36 -76
- package/dist-elements/tag/app-search.js +49 -49
- package/dist-elements/tag/audio-player.js +57 -57
- package/dist-elements/tag/badge.d.ts +1 -1
- package/dist-elements/tag/badge.js +1 -1
- package/dist-elements/tag/breadcrumbs.js +15 -15
- package/dist-elements/tag/button.d.ts +1 -1
- package/dist-elements/tag/button.js +1 -1
- package/dist-elements/tag/card-list.js +12 -12
- package/dist-elements/tag/card.js +39 -44
- package/dist-elements/tag/chart.js +1357 -787
- package/dist-elements/tag/chat-answer.js +49 -49
- package/dist-elements/tag/chat-composer.js +75 -71
- package/dist-elements/tag/chat-message.js +8 -8
- 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 +60 -0
- package/dist-elements/tag/checkbox.js +9 -8
- package/dist-elements/tag/code.js +9 -9
- package/dist-elements/tag/combobox.js +19 -18
- package/dist-elements/tag/conflict-alert.js +12 -12
- package/dist-elements/tag/copy-button.js +14 -14
- package/dist-elements/tag/data-table.js +880 -532
- package/dist-elements/tag/date-input.js +30 -29
- package/dist-elements/tag/date-range.js +39 -38
- 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 +23 -23
- package/dist-elements/tag/drawer.js +28 -32
- 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 +10 -10
- package/dist-elements/tag/expander.js +8 -8
- package/dist-elements/tag/explainer.js +11 -11
- package/dist-elements/tag/field.js +5 -5
- package/dist-elements/tag/file-upload.js +35 -34
- package/dist-elements/tag/filter-bar.js +56 -56
- package/dist-elements/tag/filter-sheet.js +11 -11
- package/dist-elements/tag/filter-zone.js +31 -31
- package/dist-elements/tag/find.d.ts +1 -0
- package/dist-elements/tag/find.js +128 -0
- package/dist-elements/tag/footer.js +21 -21
- package/dist-elements/tag/form-actions.js +29 -25
- package/dist-elements/tag/form-section.js +6 -6
- package/dist-elements/tag/form.js +12 -12
- package/dist-elements/tag/gallery.js +14 -14
- package/dist-elements/tag/grid-item.d.ts +1 -1
- package/dist-elements/tag/grid-item.js +1 -1
- package/dist-elements/tag/grid.d.ts +1 -1
- package/dist-elements/tag/grid.js +1 -1
- package/dist-elements/tag/hero.js +12 -12
- package/dist-elements/tag/highlight.js +5 -5
- package/dist-elements/tag/icon-button.d.ts +1 -1
- package/dist-elements/tag/icon-button.js +1 -1
- package/dist-elements/tag/icon.d.ts +1 -1
- package/dist-elements/tag/icon.js +1 -1
- package/dist-elements/tag/job-list.js +22 -44
- package/dist-elements/tag/kpi-row.js +12 -10
- package/dist-elements/tag/kpi.js +149 -140
- package/dist-elements/tag/level-meter.js +11 -11
- package/dist-elements/tag/list.js +55 -55
- package/dist-elements/tag/logo.js +30 -30
- package/dist-elements/tag/map.js +702 -671
- package/dist-elements/tag/menu-button.js +70 -69
- package/dist-elements/tag/modal.js +28 -37
- package/dist-elements/tag/multiselect.js +35 -34
- package/dist-elements/tag/note.js +5 -5
- package/dist-elements/tag/notifications.js +36 -36
- package/dist-elements/tag/number-input.js +13 -12
- package/dist-elements/tag/page-header.js +140 -37
- package/dist-elements/tag/pagination.js +54 -49
- package/dist-elements/tag/popover.d.ts +1 -1
- package/dist-elements/tag/popover.js +1 -1
- package/dist-elements/tag/progress-bar.d.ts +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 +7 -7
- package/dist-elements/tag/radio-group.js +13 -12
- package/dist-elements/tag/range.js +23 -22
- package/dist-elements/tag/recording-status.js +14 -14
- package/dist-elements/tag/repeater.js +10 -10
- package/dist-elements/tag/segmented.js +14 -13
- package/dist-elements/tag/select.js +11 -10
- package/dist-elements/tag/shell.js +356 -339
- package/dist-elements/tag/skeleton.d.ts +1 -1
- package/dist-elements/tag/skeleton.js +1 -1
- package/dist-elements/tag/slot-picker.js +16 -15
- package/dist-elements/tag/sortable-list.js +14 -14
- package/dist-elements/tag/spinner.d.ts +1 -1
- package/dist-elements/tag/spinner.js +1 -1
- package/dist-elements/tag/split-pane.js +12 -12
- package/dist-elements/tag/status-dot.d.ts +1 -1
- package/dist-elements/tag/status-dot.js +1 -1
- package/dist-elements/tag/stepper.js +21 -21
- package/dist-elements/tag/streaming-text.js +13 -13
- package/dist-elements/tag/sub-nav.js +39 -38
- package/dist-elements/tag/tabs.js +38 -38
- package/dist-elements/tag/tag-input.js +20 -19
- package/dist-elements/tag/text-editor.js +25 -24
- package/dist-elements/tag/text-input.js +15 -14
- package/dist-elements/tag/textarea.js +15 -14
- package/dist-elements/tag/tile.d.ts +1 -1
- package/dist-elements/tag/tile.js +1 -1
- package/dist-elements/tag/time-input.js +20 -19
- package/dist-elements/tag/toast.js +32 -23
- package/dist-elements/tag/toggle.js +9 -8
- package/dist-elements/tag/toggletip.js +27 -27
- package/dist-elements/tag/token-value.d.ts +1 -0
- package/dist-elements/tag/token-value.js +75 -0
- package/dist-elements/tag/tooltip.d.ts +1 -1
- package/dist-elements/tag/tooltip.js +1 -1
- package/dist-elements/tag/transcript.js +48 -48
- package/dist-elements/tag/translator.js +13 -13
- package/dist-elements/tag/tree-view.js +13 -13
- package/dist-elements/tag/user-menu.js +37 -37
- package/dist-elements/tag/video-player.js +21 -21
- package/dist-elements/tokens.css +120 -96
- package/dist-elements/tokens.json +1244 -0
- package/dist-elements/types/bundle/actions.d.ts +3 -3
- package/dist-elements/types/bundle/content.d.ts +1 -0
- package/dist-elements/types/bundle/feedback.d.ts +6 -5
- package/dist-elements/types/bundle/frame.d.ts +0 -2
- package/dist-elements/types/bundle/index.d.ts +0 -10
- package/dist-elements/types/bundle/inputs.d.ts +2 -0
- package/dist-elements/types/bundle/layout.d.ts +3 -3
- package/dist-elements/types/bundle/overlays.d.ts +3 -3
- package/dist-elements/types/categories.d.ts +4 -0
- package/dist-elements/types/{primitives → components/actions}/button/button.d.ts +13 -10
- package/dist-elements/types/components/actions/copy-button/copy-button.d.ts +8 -9
- package/dist-elements/types/{icons → components/actions}/icon/icon.d.ts +4 -5
- package/dist-elements/types/{primitives → components/actions}/icon-button/icon-button.d.ts +8 -6
- package/dist-elements/types/components/actions/menu-button/menu-button.d.ts +16 -18
- package/dist-elements/types/components/actions/qr-code/qr-code.d.ts +10 -10
- package/dist-elements/types/components/charts/chart/chart.d.ts +6 -5
- package/dist-elements/types/components/charts/explainer/explainer.d.ts +1 -1
- package/dist-elements/types/components/charts/kpi/kpi.d.ts +19 -11
- package/dist-elements/types/components/charts/kpi-row/kpi-row.d.ts +2 -8
- package/dist-elements/types/components/charts/note/note.d.ts +2 -2
- package/dist-elements/types/components/chat/chat/chat.d.ts +9 -11
- package/dist-elements/types/components/chat/chat-answer/chat-answer.d.ts +10 -11
- package/dist-elements/types/components/chat/chat-composer/chat-composer.d.ts +10 -12
- package/dist-elements/types/components/chat/chat-message/chat-message.d.ts +7 -8
- 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 +15 -17
- package/dist-elements/types/components/content/code/code.d.ts +3 -4
- package/dist-elements/types/components/content/document-viewer/document-viewer.d.ts +10 -11
- package/dist-elements/types/components/content/gallery/gallery.d.ts +5 -4
- package/dist-elements/types/components/content/highlight/highlight.d.ts +5 -4
- package/dist-elements/types/components/content/prose/prose.d.ts +3 -4
- package/dist-elements/types/components/content/token-value/token-value.d.ts +42 -0
- package/dist-elements/types/components/content/transcript/transcript.d.ts +15 -28
- package/dist-elements/types/components/content/translator/translator.d.ts +12 -16
- package/dist-elements/types/components/content/video-player/video-player.d.ts +12 -14
- package/dist-elements/types/components/feedback/ai-label/ai-label.d.ts +3 -4
- package/dist-elements/types/components/feedback/announcement/announcement.d.ts +5 -9
- package/dist-elements/types/{primitives → components/feedback}/badge/badge.d.ts +10 -6
- package/dist-elements/types/components/feedback/conflict-alert/conflict-alert.d.ts +4 -5
- 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/{primitives → components/feedback}/progress-bar/progress-bar.d.ts +9 -7
- package/dist-elements/types/components/feedback/recording-status/recording-status.d.ts +5 -6
- package/dist-elements/types/{primitives → components/feedback}/skeleton/skeleton.d.ts +2 -2
- package/dist-elements/types/{primitives → components/feedback}/spinner/spinner.d.ts +2 -3
- package/dist-elements/types/{primitives → components/feedback}/status-dot/status-dot.d.ts +5 -6
- package/dist-elements/types/components/feedback/streaming-text/streaming-text.d.ts +12 -9
- 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 +7 -7
- 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 +6 -7
- package/dist-elements/types/components/forms/form/form.d.ts +5 -5
- package/dist-elements/types/components/forms/form-actions/form-actions.d.ts +10 -8
- package/dist-elements/types/components/forms/form-section/form-section.d.ts +6 -5
- package/dist-elements/types/components/forms/repeater/repeater.d.ts +15 -9
- package/dist-elements/types/components/forms/stepper/stepper.d.ts +6 -5
- package/dist-elements/types/components/frame/app-search/app-search.d.ts +7 -8
- 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 +7 -11
- package/dist-elements/types/components/frame/page-header/page-header.d.ts +13 -16
- package/dist-elements/types/components/frame/shell/shell.d.ts +15 -14
- 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 +13 -12
- package/dist-elements/types/components/index.d.ts +51 -12
- 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 +14 -8
- package/dist-elements/types/components/inputs/date-input/date-input.d.ts +6 -6
- package/dist-elements/types/components/inputs/date-range/date-range.d.ts +13 -8
- package/dist-elements/types/components/inputs/field/field.d.ts +5 -3
- package/dist-elements/types/components/inputs/file-upload/file-upload.d.ts +8 -10
- package/dist-elements/types/components/inputs/find/find.d.ts +51 -0
- 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/shared/input.d.ts +1 -1
- package/dist-elements/types/components/inputs/slot-picker/slot-picker.d.ts +6 -5
- package/dist-elements/types/components/inputs/tag-input/tag-input.d.ts +8 -6
- package/dist-elements/types/components/inputs/text-editor/text-editor.d.ts +8 -8
- package/dist-elements/types/components/inputs/text-input/text-input.d.ts +12 -7
- package/dist-elements/types/components/inputs/textarea/textarea.d.ts +12 -11
- package/dist-elements/types/components/inputs/time-input/time-input.d.ts +8 -9
- package/dist-elements/types/components/inputs/toggle/toggle.d.ts +3 -1
- package/dist-elements/types/components/layout/expander/expander.d.ts +10 -11
- package/dist-elements/types/{primitives → components/layout}/grid/grid.d.ts +4 -4
- package/dist-elements/types/{primitives → components/layout}/grid-item/grid-item.d.ts +2 -2
- package/dist-elements/types/components/layout/split-pane/split-pane.d.ts +6 -6
- package/dist-elements/types/components/layout/tabs/tabs.d.ts +12 -10
- package/dist-elements/types/{primitives → components/layout}/tile/tile.d.ts +22 -10
- package/dist-elements/types/components/map/map/map.d.ts +12 -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 +9 -14
- package/dist-elements/types/{primitives → components/overlays}/popover/popover.d.ts +7 -6
- package/dist-elements/types/components/overlays/toggletip/toggletip.d.ts +4 -8
- package/dist-elements/types/{primitives → components/overlays}/tooltip/tooltip.d.ts +8 -8
- package/dist-elements/types/components/shared/announcement-block.d.ts +38 -0
- package/dist-elements/types/components/shared/charts/index.d.ts +5 -1
- package/dist-elements/types/components/shared/charts/kinds.d.ts +92 -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/leaflet.d.ts +5 -0
- package/dist-elements/types/components/shared/charts/map-chart/map-chart.d.ts +1 -1
- package/dist-elements/types/components/shared/charts/radar-chart/radar-chart.d.ts +31 -0
- package/dist-elements/types/components/shared/charts/shared/axes.d.ts +3 -1
- 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 +12 -0
- package/dist-elements/types/components/shared/charts/shared/types.d.ts +62 -0
- package/dist-elements/types/components/shared/charts/stacked-area-chart/stacked-area-chart.d.ts +13 -0
- package/dist-elements/types/components/shared/content-tile.d.ts +1 -1
- package/dist-elements/types/components/{forms/form → shared}/controls.d.ts +3 -2
- package/dist-elements/types/components/shared/dialog.d.ts +9 -0
- package/dist-elements/types/components/shared/empty-state-block.d.ts +26 -0
- package/dist-elements/types/components/shared/overflow.d.ts +58 -0
- package/dist-elements/types/components/shared/tone.d.ts +18 -0
- package/dist-elements/types/components/tables/activity-log/activity-log.d.ts +3 -4
- package/dist-elements/types/components/tables/card/card.d.ts +17 -23
- package/dist-elements/types/components/tables/card-list/card-list.d.ts +9 -11
- package/dist-elements/types/components/tables/data-table/actions.d.ts +1 -1
- package/dist-elements/types/components/tables/data-table/data-table.d.ts +88 -19
- package/dist-elements/types/components/tables/data-table/editing.d.ts +1 -1
- package/dist-elements/types/components/tables/data-table/filters.d.ts +15 -6
- package/dist-elements/types/components/tables/description-list/description-list.d.ts +13 -12
- package/dist-elements/types/components/tables/list/list.d.ts +13 -24
- 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 +5 -5
- package/dist-elements/types/core/focus.d.ts +1 -1
- 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/register.d.ts +1 -1
- package/dist-elements/types/types.d.ts +70 -10
- package/dist-icons/functioneel-kolommen.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/download-y528pIHP.js +0 -230
- package/dist-elements/chunks/input-BtuNFSWk.js +0 -195
- package/dist-elements/tag/confirm-dialog.d.ts +0 -1
- package/dist-elements/tag/confirm-dialog.js +0 -118
- 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
- package/dist-elements/types/primitives/index.d.ts +0 -33
- /package/dist-elements/types/components/content/{audio-player → shared}/playback.d.ts +0 -0
- /package/dist-elements/types/components/content/{audio-player → shared}/player.d.ts +0 -0
- /package/dist-elements/types/components/{inputs/date-input → shared}/date-format.d.ts +0 -0
- /package/dist-elements/types/{primitives → components}/shared/grid-item-element.d.ts +0 -0
- /package/dist-elements/types/{primitives → components}/shared/length.d.ts +0 -0
- /package/dist-elements/types/{primitives → components}/shared/place.d.ts +0 -0
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
1
|
+
import { F as e, Kt as t, O as n, Q as r, Yt as i, Z as a, Zt as o, at as s, d as c, en as l, et as u, f as d, lt as f, nn as p, o as m, ot as h, rt as g, st as _, ut as v } from "../chunks/base-DRGvkF-r.js";
|
|
2
|
+
import { n as y, r as b } from "../chunks/focus-trap-Dv8zu64A.js";
|
|
3
3
|
import "./menu-button.js";
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
4
|
+
import { t as x } from "../chunks/input-lQTmOMOz.js";
|
|
5
|
+
import { t as S } from "./announcement.js";
|
|
6
6
|
import "./drawer.js";
|
|
7
|
+
import "./empty-state.js";
|
|
7
8
|
import "./description-list.js";
|
|
8
|
-
import { d as
|
|
9
|
-
import { a as
|
|
9
|
+
import { d as C } from "../chunks/date-format-DxP9yfDp.js";
|
|
10
|
+
import { a as w, c as T, r as ee, t as E } from "../chunks/download-C68kcwPj.js";
|
|
10
11
|
import "./pagination.js";
|
|
11
12
|
import "./sortable-list.js";
|
|
12
13
|
//#region src/components/tables/data-table/data-table.css?inline
|
|
13
|
-
var ne = ":host {\n display: block;\n min-width: 0;\n}\n:host([hidden]) { display: none; }\n/* On the page there is no tile padding to bleed into below 768 px: the rows keep the page's edge. */\n:host([plain]) { --tile-pad-x: 0px; }\n\n/* ------------------------------------------------------------------------ */\n\n.lintje-data-table { min-width: 0; }\n\n.lintje-data-table__full { width: 100%; border-collapse: collapse; font: var(--text-table); }\n.lintje-data-table__mobile { display: none; width: 100%; border-collapse: collapse; font: var(--text-table); }\n\n/* A shadow marks each side where columns are hidden; it sits on the frame so it doesn't scroll. */\n.lintje-data-table__frame { position: relative; }\n.lintje-data-table__frame::before,\n.lintje-data-table__frame::after {\n content: '';\n position: absolute;\n top: 0; bottom: 0;\n width: var(--space-4);\n pointer-events: none;\n opacity: 0;\n transition: opacity var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-data-table__frame::before { left: 0; box-shadow: var(--shadow-scroll-start); }\n.lintje-data-table__frame::after { right: 0; box-shadow: var(--shadow-scroll-end); }\n.lintje-data-table__frame.is-scrollable-start::before,\n.lintje-data-table__frame.is-scrollable-end::after { opacity: 1; }\n/* Positioned, so an absolute visually hidden label is clipped with its cell. */\n.lintje-data-table__scroller { position: relative; overflow-x: auto; }\n/* A styled scrollbar is a classic one: it doesn't hide between scrolls like an overlay one. */\n.lintje-data-table__scroller::-webkit-scrollbar { height: 8px; }\n.lintje-data-table__scroller::-webkit-scrollbar-track { background: var(--color-bg-subtle); }\n.lintje-data-table__scroller::-webkit-scrollbar-thumb { background: var(--color-border-heavy); }\n@supports not selector(::-webkit-scrollbar) {\n .lintje-data-table__scroller { scrollbar-width: thin; scrollbar-color: var(--color-border-heavy) var(--color-bg-subtle); }\n}\n\n.lintje-data-table__header-cell,\n.lintje-data-table__name,\n.lintje-data-table__mobile-cell { text-align: left; }\n\n.lintje-data-table__header-cell {\n font: var(--text-table-head);\n font-size: var(--label-size);\n font-weight: var(--label-weight);\n letter-spacing: var(--label-tracking);\n text-transform: uppercase;\n color: var(--color-text-muted);\n background: var(--color-bg-surface);\n padding: 10px var(--space-3);\n border-bottom: 2px solid var(--color-border-heavy);\n}\n/* The sorted column: its label is text (4.5:1), the rule under it a line (3:1). */\n.lintje-data-table__header-cell.is-active {\n color: var(--color-accent-text);\n border-bottom-color: var(--color-accent-line);\n}\n/* The button takes the cell's padding, so the whole cell sorts. */\n.lintje-data-table__header-cell--sortable { padding: 0; }\n.lintje-data-table__sort-button {\n display: flex; align-items: center; gap: 6px;\n width: 100%;\n min-height: var(--h-target);\n padding: 0 var(--space-3);\n font: inherit; color: inherit; text-align: inherit;\n /* A button resets these; the header's label style must reach the label. */\n text-transform: inherit; letter-spacing: inherit;\n}\n.lintje-data-table__header-cell--align-right .lintje-data-table__sort-button { justify-content: flex-end; }\n/* Tracking also follows the last letter; it widened the table 1 px past its tile at 1024 px.\n Giving that trailing step back keeps the gap at 6 px. */\n.lintje-data-table__sort-label { margin-inline-end: calc(var(--label-tracking) * -1); }\n.lintje-data-table__sort-button:hover { background: var(--color-bg-subtle); }\n/* The scroller clips the ring, so it sits inside the cell. */\n.lintje-data-table__sort-button:focus-visible { outline-offset: -3px; }\n/* The arrows are a glyph, outside the type scale. */\n.lintje-data-table__sort-icon { font-size: 10px; color: var(--color-text-muted); }\n.lintje-data-table__header-cell.is-active .lintje-data-table__sort-icon { color: var(--color-accent-text); }\n\n.lintje-data-table__row { border-bottom: 1px solid var(--color-border-default); }\n/* Filler rows keep a short last page as tall as a full one. */\n.lintje-data-table__row--filler { border-bottom-color: transparent; }\n/* A row is one line: no cell wraps, not even at a hyphen (\"04-10-2026\"). */\n.lintje-data-table__cell {\n padding: 0 var(--space-3);\n height: var(--h-table-row);\n font-weight: 400;\n color: var(--color-text-primary);\n white-space: nowrap;\n}\n.lintje-data-table__name { font-weight: 700 !important; }\n/* The name that opens its row: a link's colour and line, the cell's weight and size. */\n.lintje-data-table__open {\n padding: 0;\n font: inherit; text-align: inherit;\n color: var(--color-link);\n text-decoration: underline;\n transition: color var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-data-table__open:hover { color: var(--color-link-hover); }\n.lintje-data-table__header-cell--align-right,\n.lintje-data-table__cell--align-right,\n.lintje-data-table__mobile-cell--align-right { text-align: right !important; }\n.lintje-data-table__cell--align-right { font-variant-numeric: tabular-nums; }\n/* A `truncate` column: `width: 1%` keeps the auto layout from handing it surplus width, so it is as\n wide as its longest value up to the cap, and a longer value ends in an ellipsis (the heatmap's\n label column does the same). */\n.lintje-data-table__cell--truncate { width: 1%; }\n.lintje-data-table__cell-text { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }\n/* The `title` needs a pointer: under the keyboard's focus and without hover the value wraps whole. */\n.lintje-data-table__row:focus-visible .lintje-data-table__cell-text,\n.lintje-data-table__row:has(:focus-visible) .lintje-data-table__cell-text { white-space: normal; overflow-wrap: anywhere; }\n@media (hover: none) {\n .lintje-data-table__cell-text { white-space: normal; overflow-wrap: anywhere; }\n}\n\n.lintje-data-table__row.is-clickable { cursor: pointer; }\n.lintje-data-table__row.is-clickable:hover,\n.lintje-data-table__mobile-row.is-clickable:hover { background: var(--color-bg-subtle); }\n/* Selected and hover share a surface; the 4 px edge is the only carrier, so it must stay visible. */\n.lintje-data-table__row.is-selected,\n.lintje-data-table__mobile-row.is-selected {\n background: var(--color-bg-selected);\n box-shadow: inset 4px 0 0 var(--color-accent-line);\n}\n/* A checked row takes the selected background without the bar: the bar means drilldown. */\n.lintje-data-table__check-cell { width: 24px; padding-right: var(--space-3); }\n.lintje-data-table__header-cell.lintje-data-table__check-cell { padding-block: 0; }\n.lintje-data-table__check-cell .lintje-choice,\n.lintje-data-table__mobile-check .lintje-choice { gap: 0; }\n.lintje-data-table__mobile-check { display: flex; align-items: center; gap: var(--space-3); }\n.lintje-data-table__mobile-identity { min-width: 0; }\n.lintje-data-table__row.is-checked,\n.lintje-data-table__mobile-row.is-checked { background: var(--color-bg-selected); }\n.lintje-data-table__row:focus-visible,\n.lintje-data-table__mobile-row:focus-visible { outline-offset: -3px; }\n\n.lintje-threshold-cell {\n display: inline-flex; align-items: center; justify-content: center;\n gap: var(--space-1);\n min-width: 44px;\n padding: 4px var(--space-2);\n font-weight: 700;\n}\n.lintje-threshold-cell__icon { flex: none; }\n.lintje-threshold-cell--good { background: transparent; }\n.lintje-threshold-cell--caution { background: var(--color-warning); color: var(--color-text-on-light-fill); }\n.lintje-threshold-cell--above-threshold { background: var(--color-error); color: var(--color-text-on-fill); }\n\n.lintje-data-table__muted { color: var(--color-text-muted); }\n\n/* Tones are modifiers, not inline colours: the host's `style-src 'self'` drops `style`. */\n.lintje-data-table__change { font-weight: 700; }\n.lintje-data-table__change--flat { color: var(--color-text-muted); }\n.lintje-data-table__change--up { color: var(--color-success-text); }\n.lintje-data-table__change--down { color: var(--color-error-text); }\n\n/* Each representation has its own pager; the phone's is hidden on desktop. */\n.lintje-data-table__pagination { padding-top: var(--space-3); }\n.lintje-data-table__pagination--mobile { display: none; }\n\n/* --- Editing a cell (editing.ts) ------------------------------------------ */\n/* The pencil sits at the end of the text, at the start for a number. */\n.lintje-data-table__cell--editable { position: relative; }\n.lintje-data-table__cell--editable:hover { background: var(--color-bg-subtle); }\n.lintje-data-table__edit-icon {\n position: absolute;\n top: 50%; right: var(--space-1);\n translate: 0 -50%;\n color: var(--color-text-muted);\n visibility: hidden;\n}\n.lintje-data-table__cell--align-right .lintje-data-table__edit-icon { right: auto; left: var(--space-1); }\n.lintje-data-table__cell--editable:hover .lintje-data-table__edit-icon { visibility: visible; }\n.lintje-data-table__cell--editable.is-editing { padding: 2px; vertical-align: top; }\n.lintje-data-table__cell--editable.is-editing:hover { background: transparent; }\n.lintje-data-table__editor {\n display: block;\n width: 100%; height: var(--h-control);\n padding: 0 var(--space-2);\n border: 1px solid var(--color-border-field);\n background: var(--color-bg-surface);\n color: var(--color-text-primary);\n font: var(--text-table);\n font-weight: 400;\n text-align: inherit;\n}\n.lintje-data-table__cell--align-right .lintje-data-table__editor { font-variant-numeric: tabular-nums; }\n.lintje-data-table__editor::placeholder { color: var(--color-text-placeholder); opacity: 1; }\n.lintje-data-table__editor.is-error { border: 2px solid var(--color-error); }\n.lintje-data-table__edit-error {\n display: block;\n padding: 2px var(--space-2) var(--space-1);\n font-size: 0.875rem; font-weight: 700;\n color: var(--color-error-text);\n text-align: left;\n}\n.lintje-data-table__busy {\n display: inline-flex; align-items: center; gap: var(--space-2);\n color: var(--color-text-muted);\n}\n\n/* --- Row actions and the selection bar (actions.ts) ------------------------ */\n.lintje-data-table__action-cell { width: var(--h-icon-button); text-align: right; }\n.lintje-data-table__selection {\n position: sticky; top: var(--h-sticky); z-index: 1;\n display: flex; flex-wrap: wrap; align-items: center;\n gap: var(--space-2) var(--space-4);\n padding: var(--space-2) var(--space-3);\n background: var(--color-bg-selected);\n border-top: 2px solid var(--color-accent-line);\n font: var(--text-table);\n color: var(--color-text-primary);\n}\n.lintje-data-table__selection-count { font-weight: 700; }\n.lintje-data-table__selection-clear { margin-left: auto; }\n\n/* --- Filters and the column chooser (filters.ts) ---------------------------- */\n.lintje-data-table__toolbar {\n display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;\n gap: var(--space-2) var(--space-4);\n padding-bottom: var(--space-3);\n}\n.lintje-data-table__toolbar--quiet,\n.lintje-data-table__sheet-button,\n.lintje-data-table__sort-menu { display: none; }\n.lintje-data-table__chips {\n display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);\n font: var(--text-small);\n}\n.lintje-data-table__chip {\n display: inline-flex; align-items: center; gap: var(--space-1);\n height: var(--h-chip);\n padding: 0 var(--space-1) 0 var(--space-2);\n background: var(--color-bg-subtle);\n border: 1px solid var(--color-border-default);\n color: var(--color-text-primary);\n white-space: nowrap;\n}\n/* A transparent hit area reaches the target height up and down; sideways stands other content. */\n.lintje-data-table__chip-clear {\n position: relative;\n width: var(--h-chip-field); height: var(--h-chip-field);\n display: flex; align-items: center; justify-content: center;\n color: var(--color-text-muted);\n}\n.lintje-data-table__chip-clear::after {\n content: '';\n position: absolute;\n inset: min(0px, calc((100% - var(--h-target)) / 2)) 0;\n}\n.lintje-data-table__chip-clear:hover { color: var(--color-text-primary); }\n.lintje-data-table__filter-total { color: var(--color-text-muted); }\n\n.lintje-data-table__header-cell--filterable { padding-block: 0; }\n.lintje-data-table__header-inner {\n display: flex; align-items: center; gap: var(--space-2);\n min-height: var(--h-control);\n}\n.lintje-data-table__header-cell--sortable .lintje-data-table__header-inner { padding-right: var(--space-2); }\n.lintje-data-table__header-inner .lintje-data-table__sort-button { flex: 1; min-width: 0; }\n.lintje-data-table__header-cell.is-filtered {\n background: var(--color-bg-subtle);\n color: var(--color-accent-text);\n}\n.lintje-data-table__header-label { display: inline-flex; align-items: center; gap: 6px; }\n.lintje-data-table__filter-dot {\n display: inline-block;\n width: 6px; height: 6px; flex: none;\n border-radius: 50%;\n background: var(--color-attention);\n}\n/* A transparent hit area reaches the target height up and down; on its left stands the sort button. */\n.lintje-data-table__funnel {\n position: relative;\n width: var(--h-chip); height: var(--h-chip); flex: none;\n display: flex; align-items: center; justify-content: center;\n margin-left: auto;\n border: 1px solid transparent;\n color: var(--color-text-muted);\n}\n.lintje-data-table__funnel::after {\n content: '';\n position: absolute;\n inset: min(0px, calc((100% - var(--h-target)) / 2)) 0;\n}\n.lintje-data-table__funnel:hover { background: var(--color-bg-subtle); color: var(--color-text-primary); }\n/* As wide as the row menus under it, so their icons line up. The phone row's toggle is the same. */\n.lintje-data-table__chooser-button,\n.lintje-data-table__mobile-toggle {\n width: var(--h-icon-button); height: var(--h-icon-button);\n display: flex; align-items: center; justify-content: center;\n margin-left: auto;\n border: 1px solid transparent;\n color: var(--color-text-muted);\n}\n.lintje-data-table__chooser-button:hover,\n.lintje-data-table__mobile-toggle:hover { background: var(--color-bg-subtle); color: var(--color-text-primary); }\n.lintje-data-table__funnel.is-filtered {\n background: var(--color-action-primary);\n border-color: var(--color-action-primary-border);\n color: var(--color-action-primary-text);\n}\n\n.lintje-data-table__filter-panel {\n display: flex; flex-direction: column; gap: var(--space-3);\n width: 260px; max-width: 100%;\n padding: var(--space-4);\n font: var(--text-table);\n color: var(--color-text-primary);\n}\n.lintje-data-table__filter-name { font-size: 0.875rem; font-weight: 700; }\n.lintje-data-table__filter-options { display: flex; flex-direction: column; }\n.lintje-data-table__filter-option { min-height: var(--h-option); }\n.lintje-data-table__filter-count { margin-left: auto; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }\n.lintje-data-table__filter-search {\n width: 100%; height: var(--h-control);\n padding: 0 var(--space-3);\n border: 1px solid var(--color-border-field);\n background: var(--color-bg-surface);\n color: var(--color-text-primary);\n font-size: 1rem;\n}\n.lintje-data-table__filter-search::placeholder { color: var(--color-text-placeholder); opacity: 1; }\n/* \"Wissen\" clears the field; it draws no cross of its own. */\n.lintje-data-table__filter-search::-webkit-search-cancel-button,\n.lintje-data-table__filter-search::-webkit-search-decoration { appearance: none; }\n.lintje-data-table__filter-actions {\n display: flex; justify-content: flex-end; gap: var(--space-2);\n padding-top: var(--space-1);\n}\n.lintje-data-table__filter-section {\n display: flex; flex-direction: column; gap: var(--space-2);\n margin-bottom: var(--space-6);\n}\n.lintje-data-table__chooser-note { font: var(--text-small); color: var(--color-text-muted); }\n\n/* --- Below 768 px the representation switches ---------------------------- */\n/* Below 768 px, from the media controller's `is-phone`: WebKit does not re-apply a shadow root's\n media query after a resize, and the script already decides by MOBILE. */\n:where(.lintje-data-table.is-phone) .lintje-data-table__toolbar { padding: 0 var(--tile-pad-x) var(--space-3); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__toolbar--quiet { display: flex; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__sheet-button,\n:where(.lintje-data-table.is-phone) .lintje-data-table__sort-menu { display: inline-flex; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__selection--mobile { top: auto; bottom: 0; margin-top: var(--space-3); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__frame { display: none; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile { display: table; }\n.lintje-data-table:where(.is-phone) { margin: 0 calc(var(--tile-pad-x) * -1); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__header-cell--mobile { padding: 10px var(--tile-pad-x); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__header-cell--mobile.lintje-data-table__header-cell--sortable { padding: 0; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__header-cell--mobile .lintje-data-table__sort-button { padding: 0 var(--tile-pad-x); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-row { border-bottom: 1px solid var(--color-border-default); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-row--filler,\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-row.is-open { border-bottom-color: transparent; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-detail { border-bottom: 1px solid var(--color-border-default); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-detail > .lintje-data-table__mobile-cell { padding-top: 0; }\n/* The toggle and the row menu sit at the row's end, on the name's first line. */\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-cell--actions { width: 1%; padding-inline-start: 0; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-actions { display: flex; align-items: center; justify-content: flex-end; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-cell {\n padding: var(--space-2) var(--tile-pad-x);\n vertical-align: top;\n font-weight: 400;\n}\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-name { display: block; font-size: 0.875rem; font-weight: 700; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-sub { display: block; font-size: 0.875rem; color: var(--color-text-muted); margin-top: 2px; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-measure { display: block; font-size: 0.875rem; font-weight: 700; font-variant-numeric: tabular-nums; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-status { display: block; font-size: 0.875rem; margin-top: 2px; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-status--within { color: var(--color-text-muted); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-status--outside { color: var(--color-error-text); font-weight: 700; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__pagination--full { display: none; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__pagination--mobile { display: block; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__pagination { padding: var(--space-3) var(--tile-pad-x) 0; }\n\n/* Forced colours drop the selected row's fill and inset bar. A real 4 px border on the first\n cell (Canvas at rest, Highlight when selected) replaces the bar without moving a column. */\n@media (forced-colors: active) {\n .lintje-data-table__row > :first-child,\n .lintje-data-table__mobile-row > :first-child { border-left: 4px solid Canvas; }\n .lintje-data-table__row.is-selected > :first-child,\n .lintje-data-table__mobile-row.is-selected > :first-child { border-left-color: Highlight; }\n .lintje-data-table__header-cell.is-active { border-bottom-color: Highlight; }\n .lintje-data-table__funnel.is-filtered { border-color: Highlight; }\n}\n";
|
|
14
|
+
var D = ":host {\n display: block;\n min-width: 0;\n}\n:host([hidden]) { display: none; }\n/* On the page there is no tile padding to bleed into below 768 px: the rows keep the page's edge. */\n:host([plain]) { --tile-pad-x: 0px; }\n/* A table breaks between its rows on paper, so it starts where the page has room. */\n@media print { :host { break-inside: auto; } }\n\n/* ------------------------------------------------------------------------ */\n\n.lintje-data-table { min-width: 0; }\n\n.lintje-data-table__full { width: 100%; border-collapse: collapse; font: var(--text-table); }\n.lintje-data-table__mobile { display: none; width: 100%; border-collapse: collapse; font: var(--text-table); }\n\n/* A shadow marks each side where columns are hidden; it sits on the frame so it doesn't scroll. */\n.lintje-data-table__frame { position: relative; }\n.lintje-data-table__frame::before,\n.lintje-data-table__frame::after {\n content: '';\n position: absolute;\n top: 0; bottom: 0;\n width: var(--space-4);\n pointer-events: none;\n opacity: 0;\n transition: opacity var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-data-table__frame::before { left: 0; box-shadow: var(--shadow-scroll-start); }\n.lintje-data-table__frame::after { right: 0; box-shadow: var(--shadow-scroll-end); }\n.lintje-data-table__frame.is-scrollable-start::before,\n.lintje-data-table__frame.is-scrollable-end::after { opacity: 1; }\n/* Positioned, so an absolute visually hidden label is clipped with its cell. */\n.lintje-data-table__scroller { position: relative; overflow-x: auto; }\n.lintje-data-table__scroller:focus-visible { outline-offset: -3px; }\n/* A styled scrollbar is a classic one: it doesn't hide between scrolls like an overlay one. */\n.lintje-data-table__scroller::-webkit-scrollbar { height: 8px; }\n.lintje-data-table__scroller::-webkit-scrollbar-track { background: var(--color-bg-subtle); }\n.lintje-data-table__scroller::-webkit-scrollbar-thumb { background: var(--color-border-heavy); }\n@supports not selector(::-webkit-scrollbar) {\n .lintje-data-table__scroller { scrollbar-width: thin; scrollbar-color: var(--color-border-heavy) var(--color-bg-subtle); }\n}\n\n.lintje-data-table__header-cell,\n.lintje-data-table__name,\n.lintje-data-table__mobile-cell { text-align: left; }\n\n.lintje-data-table__header-cell {\n font: var(--text-table-head);\n font-size: var(--label-size);\n font-weight: var(--label-weight);\n letter-spacing: var(--label-tracking);\n text-transform: uppercase;\n color: var(--color-text-muted);\n background: var(--color-bg-surface);\n padding: 10px var(--space-3);\n border-bottom: 2px solid var(--color-border-heavy);\n}\n/* The sorted column: its label is text (4.5:1), the rule under it a line (3:1). */\n.lintje-data-table__header-cell.is-active {\n color: var(--color-accent-text);\n border-bottom-color: var(--color-accent-line);\n}\n/* The button takes the cell's padding, so the whole cell sorts. */\n.lintje-data-table__header-cell--sortable { padding: 0; }\n.lintje-data-table__sort-button {\n display: flex; align-items: center; gap: 6px;\n width: 100%;\n min-height: var(--h-target);\n padding: 0 var(--space-3);\n font: inherit; color: inherit; text-align: inherit;\n /* A button resets these; the header's label style must reach the label. */\n text-transform: inherit; letter-spacing: inherit;\n}\n.lintje-data-table__header-cell--align-right .lintje-data-table__sort-button { justify-content: flex-end; }\n/* Tracking also follows the last letter; it widened the table 1 px past its tile at 1024 px.\n Giving that trailing step back keeps the gap at 6 px. */\n.lintje-data-table__sort-label { margin-inline-end: calc(var(--label-tracking) * -1); }\n.lintje-data-table__sort-button:hover { background: var(--color-bg-subtle); }\n/* The scroller clips the ring, so it sits inside the cell. */\n.lintje-data-table__sort-button:focus-visible { outline-offset: -3px; }\n/* The arrows are a glyph, outside the type scale, one above the other in a box that never changes\n width. A head says only what holds now: the sorted column shows its one arrow, and another\n column both under the pointer or the focus. A hidden arrow keeps its place. */\n.lintje-data-table__sort-icon {\n display: inline-flex; flex-direction: column; flex: none;\n font-size: 8px; line-height: 1;\n color: var(--color-text-muted);\n visibility: hidden;\n}\n.lintje-data-table__sort-button:hover .lintje-data-table__sort-icon,\n.lintje-data-table__sort-button:focus-visible .lintje-data-table__sort-icon,\n.lintje-data-table__header-cell.is-active .lintje-data-table__sort-icon { visibility: visible; }\n.lintje-data-table__sort-icon > .is-off { visibility: hidden; }\n.lintje-data-table__sort-icon > .is-on { color: var(--color-accent-text); }\n\n.lintje-data-table__row { border-bottom: 1px solid var(--color-border-default); }\n/* Filler rows keep a short last page as tall as a full one. */\n.lintje-data-table__row--filler { border-bottom-color: transparent; }\n/* A row is one line: no cell wraps, not even at a hyphen (\"04-10-2026\"). */\n.lintje-data-table__cell {\n padding: 0 var(--space-3);\n height: var(--h-table-row);\n font-weight: 400;\n color: var(--color-text-primary);\n white-space: nowrap;\n}\n.lintje-data-table__name { font-weight: 700 !important; }\n/* The name that opens its row is dark, as in the work list: a column of blue reads as a column of\n links and outweighs the figures beside it. The pointer and the focus show the line. */\n.lintje-data-table__open {\n padding: 0;\n font: inherit; text-align: inherit;\n color: var(--color-text-primary);\n text-decoration: none;\n transition: color var(--dur-hover) var(--ease-in-motion);\n}\n.lintje-data-table__open:hover,\n.lintje-data-table__open:focus-visible { color: var(--color-link); text-decoration: underline; }\n.lintje-data-table__header-cell--align-right,\n.lintje-data-table__cell--align-right,\n.lintje-data-table__mobile-cell--align-right { text-align: right !important; }\n.lintje-data-table__cell--align-right { font-variant-numeric: tabular-nums; }\n/* A `truncate` column: `width: 1%` keeps the auto layout from handing it surplus width, so it is as\n wide as its longest value up to the cap, and a longer value ends in an ellipsis (the heatmap's\n label column does the same). */\n.lintje-data-table__cell--truncate { width: 1%; }\n.lintje-data-table__cell-text { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }\n/* The `title` needs a pointer: under the keyboard's focus and without hover the value wraps whole. */\n.lintje-data-table__row:focus-visible .lintje-data-table__cell-text,\n.lintje-data-table__row:has(:focus-visible) .lintje-data-table__cell-text { white-space: normal; overflow-wrap: anywhere; }\n@media (hover: none) {\n .lintje-data-table__cell-text { white-space: normal; overflow-wrap: anywhere; }\n}\n\n.lintje-data-table__row.is-clickable { cursor: pointer; }\n.lintje-data-table__row.is-clickable:hover,\n.lintje-data-table__mobile-row.is-clickable:hover { background: var(--color-bg-subtle); }\n/* Selected and hover share a surface; the 4 px edge is the only carrier, so it must stay visible. */\n.lintje-data-table__row.is-selected,\n.lintje-data-table__mobile-row.is-selected {\n background: var(--color-bg-selected);\n box-shadow: inset 4px 0 0 var(--color-accent-line);\n}\n/* A checked row takes the selected background without the bar: the bar means drilldown. */\n.lintje-data-table__check-cell { width: 24px; padding-right: var(--space-3); }\n.lintje-data-table__header-cell.lintje-data-table__check-cell { padding-block: 0; }\n.lintje-data-table__check-cell .lintje-choice,\n.lintje-data-table__mobile-check .lintje-choice { gap: 0; }\n.lintje-data-table__mobile-check { display: flex; align-items: center; gap: var(--space-3); }\n.lintje-data-table__mobile-identity { min-width: 0; }\n.lintje-data-table__row.is-checked,\n.lintje-data-table__mobile-row.is-checked { background: var(--color-bg-selected); }\n.lintje-data-table__row:focus-visible,\n.lintje-data-table__mobile-row:focus-visible { outline-offset: -3px; }\n\n.lintje-threshold-cell {\n display: inline-flex; align-items: center; justify-content: center;\n gap: var(--space-1);\n min-width: 44px;\n padding: 4px var(--space-2);\n font-weight: 700;\n}\n.lintje-threshold-cell__icon { flex: none; }\n.lintje-threshold-cell--good { background: transparent; }\n/* At most one fill in a row: a caution is its glyph and weight, only a crossed threshold fills. */\n.lintje-threshold-cell--caution { background: transparent; }\n.lintje-threshold-cell--caution .lintje-threshold-cell__icon { color: var(--color-attention-line); }\n.lintje-threshold-cell--above-threshold { background: var(--color-error); color: var(--color-text-on-fill); }\n\n.lintje-data-table__muted { color: var(--color-text-muted); }\n\n/* Tones are modifiers, not inline colours: the host's `style-src 'self'` drops `style`. */\n.lintje-data-table__change { font-weight: 700; }\n.lintje-data-table__change--flat { color: var(--color-text-muted); }\n.lintje-data-table__change--up { color: var(--color-success-text); }\n.lintje-data-table__change--down { color: var(--color-error-text); }\n\n/* Each representation has its own pager; the phone's is hidden on desktop. */\n.lintje-data-table__pagination { padding-top: var(--space-3); }\n.lintje-data-table__pagination--mobile { display: none; }\n\n/* --- Editing a cell (editing.ts) ------------------------------------------ */\n/* The pencil sits at the end of the text, at the start for a number. */\n.lintje-data-table__cell--editable { position: relative; }\n.lintje-data-table__cell--editable:hover { background: var(--color-bg-subtle); }\n.lintje-data-table__edit-icon {\n position: absolute;\n top: 50%; right: var(--space-1);\n translate: 0 -50%;\n color: var(--color-text-muted);\n visibility: hidden;\n}\n.lintje-data-table__cell--align-right .lintje-data-table__edit-icon { right: auto; left: var(--space-1); }\n.lintje-data-table__cell--editable:hover .lintje-data-table__edit-icon { visibility: visible; }\n.lintje-data-table__cell--editable.is-editing { padding: 2px; vertical-align: top; }\n.lintje-data-table__cell--editable.is-editing:hover { background: transparent; }\n.lintje-data-table__editor {\n display: block;\n width: 100%; height: var(--h-control);\n padding: 0 var(--space-2);\n border: 1px solid var(--color-border-field);\n background: var(--color-bg-surface);\n color: var(--color-text-primary);\n font: var(--text-table);\n font-weight: 400;\n text-align: inherit;\n}\n.lintje-data-table__cell--align-right .lintje-data-table__editor { font-variant-numeric: tabular-nums; }\n.lintje-data-table__editor::placeholder { color: var(--color-text-placeholder); opacity: 1; }\n.lintje-data-table__editor.is-error { border: 2px solid var(--color-error); }\n.lintje-data-table__edit-error {\n display: block;\n padding: 2px var(--space-2) var(--space-1);\n font-size: 0.875rem; font-weight: 700;\n color: var(--color-error-text);\n text-align: left;\n}\n.lintje-data-table__busy {\n display: inline-flex; align-items: center; gap: var(--space-2);\n color: var(--color-text-muted);\n}\n\n/* --- Row actions and the selection bar (actions.ts) ------------------------ */\n.lintje-data-table__action-cell { width: var(--h-icon-button); text-align: right; }\n/* The chooser's tooltip is a sentence, not a column label: it does not take the head's capitals. */\n.lintje-data-table__action-cell lintje-tooltip { text-transform: none; letter-spacing: normal; font-weight: 400; }\n.lintje-data-table__selection {\n position: sticky; top: var(--h-sticky); z-index: 1;\n display: flex; flex-wrap: wrap; align-items: center;\n gap: var(--space-2) var(--space-4);\n padding: var(--space-2) var(--space-3);\n background: var(--color-bg-selected);\n border-top: 2px solid var(--color-accent-line);\n font: var(--text-table);\n color: var(--color-text-primary);\n}\n.lintje-data-table__selection-count { font-weight: 700; }\n.lintje-data-table__selection-clear { margin-left: auto; }\n\n/* --- Filters and the column chooser (filters.ts) ---------------------------- */\n.lintje-data-table__toolbar {\n display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;\n gap: var(--space-2) var(--space-4);\n padding-bottom: var(--space-3);\n}\n.lintje-data-table__toolbar--quiet,\n.lintje-data-table__sheet-button,\n.lintje-data-table__sort-menu { display: none; }\n.lintje-data-table__chips {\n display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);\n font: var(--text-small);\n}\n.lintje-data-table__chip {\n display: inline-flex; align-items: center; gap: var(--space-1);\n height: var(--h-chip);\n padding: 0 var(--space-1) 0 var(--space-2);\n background: var(--color-bg-subtle);\n border: 1px solid var(--color-border-default);\n color: var(--color-text-primary);\n white-space: nowrap;\n}\n/* A transparent hit area reaches the target height up and down; sideways stands other content. */\n.lintje-data-table__chip-clear {\n position: relative;\n width: var(--h-chip-field); height: var(--h-chip-field);\n display: flex; align-items: center; justify-content: center;\n color: var(--color-text-muted);\n}\n.lintje-data-table__chip-clear::after {\n content: '';\n position: absolute;\n inset: min(0px, calc((100% - var(--h-target)) / 2)) 0;\n}\n.lintje-data-table__chip-clear:hover { color: var(--color-text-primary); }\n.lintje-data-table__filter-total { color: var(--color-text-muted); }\n/* The table's own controls, at the toolbar's end, each with its word. */\n.lintje-data-table__tools { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }\n.lintje-data-table__chooser-reset { align-self: flex-start; }\n\n.lintje-data-table__header-cell--filterable { padding-block: 0; }\n.lintje-data-table__header-inner {\n display: flex; align-items: center; gap: var(--space-2);\n min-height: var(--h-control);\n}\n.lintje-data-table__header-cell--sortable .lintje-data-table__header-inner { padding-right: var(--space-2); }\n.lintje-data-table__header-inner .lintje-data-table__sort-button { flex: 1; min-width: 0; }\n/* A filtered column carries one mark, its filled funnel; the chips above say it in words. */\n/* A transparent hit area reaches the target height up and down; on its left stands the sort button. */\n.lintje-data-table__funnel {\n position: relative;\n width: var(--h-chip); height: var(--h-chip); flex: none;\n display: flex; align-items: center; justify-content: center;\n margin-left: auto;\n border: 1px solid transparent;\n color: var(--color-text-muted);\n}\n.lintje-data-table__funnel::after {\n content: '';\n position: absolute;\n inset: min(0px, calc((100% - var(--h-target)) / 2)) 0;\n}\n.lintje-data-table__funnel:hover { background: var(--color-bg-subtle); color: var(--color-text-primary); }\n/* As wide as the row menus beside or under them, so their icons line up. */\n.lintje-data-table__chooser-button,\n.lintje-data-table__detail-toggle,\n.lintje-data-table__mobile-toggle {\n width: var(--h-icon-button); height: var(--h-icon-button);\n display: flex; align-items: center; justify-content: center;\n margin-left: auto;\n border: 1px solid transparent;\n color: var(--color-text-muted);\n}\n.lintje-data-table__chooser-button:hover,\n.lintje-data-table__chooser-button[aria-expanded='true'],\n.lintje-data-table__detail-toggle:hover,\n.lintje-data-table__mobile-toggle:hover { background: var(--color-bg-subtle); color: var(--color-text-primary); }\n.lintje-data-table__funnel.is-filtered {\n background: var(--color-action-primary);\n border-color: var(--color-action-primary-border);\n color: var(--color-action-primary-text);\n}\n\n.lintje-data-table__filter-panel {\n display: flex; flex-direction: column; gap: var(--space-3);\n width: 260px; max-width: 100%;\n padding: var(--space-4);\n font: var(--text-table);\n color: var(--color-text-primary);\n}\n.lintje-data-table__filter-name { font-size: 0.875rem; font-weight: 700; }\n.lintje-data-table__filter-options { display: flex; flex-direction: column; }\n.lintje-data-table__filter-option { min-height: var(--h-option); }\n.lintje-data-table__filter-count { margin-left: auto; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }\n.lintje-data-table__filter-search {\n width: 100%; height: var(--h-control);\n padding: 0 var(--space-3);\n border: 1px solid var(--color-border-field);\n background: var(--color-bg-surface);\n color: var(--color-text-primary);\n font-size: 1rem;\n}\n.lintje-data-table__filter-search::placeholder { color: var(--color-text-placeholder); opacity: 1; }\n/* \"Wissen\" clears the field; it draws no cross of its own. */\n.lintje-data-table__filter-search::-webkit-search-cancel-button,\n.lintje-data-table__filter-search::-webkit-search-decoration { appearance: none; }\n.lintje-data-table__filter-actions {\n display: flex; justify-content: flex-end; gap: var(--space-2);\n padding-top: var(--space-1);\n}\n.lintje-data-table__filter-section {\n display: flex; flex-direction: column; gap: var(--space-2);\n margin-bottom: var(--space-6);\n}\n.lintje-data-table__chooser-note { font: var(--text-small); color: var(--color-text-muted); }\n\n/* The sizer: each column's widest value, with no height, so a sort or a page never moves a column. */\n.lintje-data-table__sizer .lintje-data-table__cell { height: 0; padding-block: 0; border: 0; }\n.lintje-data-table__sizer-box { height: 0; overflow: hidden; visibility: hidden; }\n\n/* --- A row's detail, groups and totals ------------------------------------- */\n.lintje-data-table__detail-cell { width: var(--h-icon-button); padding: 0; }\n.lintje-data-table__row.is-open { background: var(--color-bg-subtle); border-bottom-color: transparent; }\n.lintje-data-table__detail { border-bottom: 1px solid var(--color-border-default); }\n.lintje-data-table__detail-body { padding: 0 var(--space-3) var(--space-4) calc(var(--h-icon-button) + var(--space-3)); background: var(--color-bg-subtle); }\n\n/* A group's heading spans the name's column; collapsed, its other cells hold the subtotals. */\n.lintje-data-table__group-row { border-bottom: 1px solid var(--color-border-default); }\n.lintje-data-table__group-head { padding: 0; }\n.lintje-data-table__group-toggle {\n display: flex; align-items: center; gap: var(--space-2);\n width: 100%;\n min-height: var(--h-table-row);\n padding: 0 var(--space-3);\n font: inherit; font-weight: 700; color: var(--color-text-primary); text-align: left;\n}\n.lintje-data-table__group-toggle:hover { background: var(--color-bg-subtle); }\n.lintje-data-table__group-toggle:focus-visible { outline-offset: -3px; }\n.lintje-data-table__group-count { font-weight: 400; font-size: 0.875rem; color: var(--color-text-muted); }\n.lintje-data-table__group-row .lintje-data-table__cell { font-weight: 700; }\n/* Rows in a group stand in from its heading, by the chevron's width and gap. */\n.lintje-data-table__row--in-group > .lintje-data-table__name { padding-left: calc(var(--space-3) + var(--space-4) + var(--space-2)); }\n\n/* A total is the host's: bold, over a heavy line, never sticky. The word before it says how. */\n.lintje-data-table__total > *,\n.lintje-data-table__subtotal > * { font-weight: 700; }\n.lintje-data-table__total { border-top: 2px solid var(--color-border-heavy); }\n.lintje-data-table__subtotal { border-top: 1px solid var(--color-border-heavy); border-bottom: 1px solid var(--color-border-default); }\n.lintje-data-table__sum-label { text-align: left; }\n.lintje-data-table__subtotal > .lintje-data-table__sum-label { font-weight: 400; color: var(--color-text-muted); }\n.lintje-data-table__full .lintje-data-table__subtotal > .lintje-data-table__sum-label { padding-left: calc(var(--space-3) + var(--space-4) + var(--space-2)); }\n.lintje-data-table__how { font-weight: 400; font-size: 0.875rem; color: var(--color-text-muted); }\n\n/* --- Below 768 px the representation switches ---------------------------- */\n/* Below 768 px, from the media controller's `is-phone`: WebKit does not re-apply a shadow root's\n media query after a resize, and the script already decides by MOBILE. */\n:where(.lintje-data-table.is-phone) .lintje-data-table__toolbar { padding: 0 var(--tile-pad-x) var(--space-3); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__toolbar--quiet { display: flex; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__sheet-button,\n:where(.lintje-data-table.is-phone) .lintje-data-table__sort-menu { display: inline-flex; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__selection--mobile { top: auto; bottom: 0; margin-top: var(--space-3); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__frame { display: none; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile { display: table; }\n.lintje-data-table:where(.is-phone) { margin: 0 calc(var(--tile-pad-x) * -1); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__header-cell--mobile { padding: 10px var(--tile-pad-x); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__header-cell--mobile.lintje-data-table__header-cell--sortable { padding: 0; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__header-cell--mobile .lintje-data-table__sort-button { padding: 0 var(--tile-pad-x); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-row { border-bottom: 1px solid var(--color-border-default); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-row--filler,\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-row.is-open { border-bottom-color: transparent; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-detail { border-bottom: 1px solid var(--color-border-default); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-detail > .lintje-data-table__mobile-cell { padding-top: 0; }\n/* The toggle and the row menu sit at the row's end, on the name's first line. Two classes, so the\n cell padding below does not give the column its start back. */\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-cell.lintje-data-table__mobile-cell--actions,\n:where(.lintje-data-table.is-phone) .lintje-data-table__header-cell--mobile.lintje-data-table__mobile-cell--actions { width: 1%; padding-inline-start: 0; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-actions { display: flex; align-items: center; justify-content: flex-end; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-cell {\n padding: var(--space-2) var(--tile-pad-x);\n vertical-align: top;\n font-weight: 400;\n}\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-name { display: block; font-size: 0.875rem; font-weight: 700; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-sub { display: block; font-size: 0.875rem; color: var(--color-text-muted); margin-top: 2px; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-measure { display: block; font-size: 0.875rem; font-weight: 700; font-variant-numeric: tabular-nums; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-status { display: block; font-size: 0.875rem; margin-top: 2px; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-status--within { color: var(--color-text-muted); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__mobile-status--outside { color: var(--color-error-text); font-weight: 700; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__pagination--full { display: none; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__pagination--mobile { display: block; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__pagination { padding: var(--space-3) var(--tile-pad-x) 0; }\n/* The phone shows two columns and lists the rest under a row: there is nothing to choose. */\n:where(.lintje-data-table.is-phone) .lintje-data-table__group-row .lintje-data-table__mobile-cell { padding-block: 0; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__group-toggle { padding: 0; min-height: var(--h-target); }\n/* On a phone the name and the count run as text, so a long name wraps instead of widening the table. */\n:where(.lintje-data-table.is-phone) .lintje-data-table__group-toggle { display: block; padding-block: var(--space-3); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__group-toggle .lintje-icon { vertical-align: -2px; margin-inline-end: var(--space-2); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__group-count { margin-inline-start: var(--space-2); }\n:where(.lintje-data-table.is-phone) .lintje-data-table__group-row .lintje-data-table__mobile-cell--align-right { vertical-align: middle; }\n:where(.lintje-data-table.is-phone) .lintje-data-table__total { border-top: 2px solid var(--color-border-heavy); }\n\n/* Paper: every column on the sheet, a row never split, and no control. Values wrap rather than\n run off the edge. What the columns are filtered on stays, as the chips. */\n@media print {\n /* Its own height, not the cell's: a tile split over two sheets measures its rows again. */\n .lintje-data-table__tile { height: auto; }\n /* Chromium repeats a head on the next sheet without its words, so the head stands once. */\n .lintje-data-table__full thead { display: table-row-group; }\n .lintje-data-table__scroller { overflow: visible; }\n .lintje-data-table__frame::before,\n .lintje-data-table__frame::after { display: none; }\n .lintje-data-table__cell { white-space: normal; height: auto; padding-block: var(--space-2); }\n .lintje-data-table__cell-text { max-width: none; white-space: normal; }\n .lintje-data-table__row { break-inside: avoid; }\n /* The count belongs to the rows above it, not alone on a sheet of its own. */\n .lintje-data-table__pagination { break-before: avoid; }\n .lintje-data-table__row--filler,\n .lintje-data-table__check-cell,\n .lintje-data-table__action-cell,\n .lintje-data-table__sort-icon,\n .lintje-data-table__funnel,\n .lintje-data-table__tools,\n .lintje-data-table__clear-all,\n .lintje-data-table__detail-cell,\n .lintje-data-table__chip-clear,\n .lintje-data-table__selection,\n .lintje-data-table__edit-icon { display: none; }\n .lintje-data-table__open { color: inherit; text-decoration: none; }\n}\n\n/* Forced colours drop the selected row's fill and inset bar. A real 4 px border on the first\n cell (Canvas at rest, Highlight when selected) replaces the bar without moving a column. */\n@media (forced-colors: active) {\n .lintje-data-table__row > :first-child,\n .lintje-data-table__mobile-row > :first-child { border-left: 4px solid Canvas; }\n .lintje-data-table__row.is-selected > :first-child,\n .lintje-data-table__mobile-row.is-selected > :first-child { border-left-color: Highlight; }\n .lintje-data-table__header-cell.is-active { border-bottom-color: Highlight; }\n .lintje-data-table__funnel.is-filtered { border-color: Highlight; }\n}\n";
|
|
14
15
|
//#endregion
|
|
15
16
|
//#region src/components/tables/data-table/editing.ts
|
|
16
|
-
function
|
|
17
|
+
function te(e, t, n, r, i) {
|
|
17
18
|
if (t === "down") {
|
|
18
19
|
for (let t = e.row + 1; t < n; t++) if (i(t, e.column)) return {
|
|
19
20
|
row: t,
|
|
@@ -31,13 +32,13 @@ function re(e, t, n, r, i) {
|
|
|
31
32
|
}
|
|
32
33
|
return null;
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
+
function O(e) {
|
|
35
36
|
return `${e.id}\u001f${e.column}`;
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
+
function k(e) {
|
|
38
39
|
return e == null ? "" : String(e);
|
|
39
40
|
}
|
|
40
|
-
var
|
|
41
|
+
var ne = 0, re = class {
|
|
41
42
|
#e;
|
|
42
43
|
#t;
|
|
43
44
|
#n;
|
|
@@ -49,14 +50,14 @@ var ie = 0, k = class {
|
|
|
49
50
|
#c;
|
|
50
51
|
#l;
|
|
51
52
|
constructor(e) {
|
|
52
|
-
this.editing = null, this.message = "", this.#t = `lintje-data-table-${++
|
|
53
|
+
this.editing = null, this.message = "", this.#t = `lintje-data-table-${++ne}`, this.#n = /* @__PURE__ */ new Map(), this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Set(), this.#a = JSON.stringify([]), this.#o = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Set(), this.#c = null, this.#l = null, this.#e = e;
|
|
53
54
|
}
|
|
54
55
|
get hintId() {
|
|
55
56
|
return `${this.#t}-hint`;
|
|
56
57
|
}
|
|
57
58
|
sync(e) {
|
|
58
59
|
let t = e?.cellErrors ?? [], n = JSON.stringify(t);
|
|
59
|
-
n !== this.#a && (this.#a = n, this.#i.clear()), this.#o = new Map(t.map((e) => [
|
|
60
|
+
n !== this.#a && (this.#a = n, this.#i.clear()), this.#o = new Map(t.map((e) => [O(e), e])), this.#s = new Set((e?.busyCells ?? []).map(O));
|
|
60
61
|
for (let [e, t] of this.#n) {
|
|
61
62
|
if (this.#s.has(e)) continue;
|
|
62
63
|
this.#n.delete(e);
|
|
@@ -65,41 +66,41 @@ var ie = 0, k = class {
|
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
mode(e, t) {
|
|
68
|
-
let n =
|
|
69
|
+
let n = O(e), r = this.#n.get(n);
|
|
69
70
|
if (r !== void 0) return {
|
|
70
71
|
kind: "busy",
|
|
71
72
|
value: r
|
|
72
73
|
};
|
|
73
74
|
if (this.#s.has(n)) return {
|
|
74
75
|
kind: "busy",
|
|
75
|
-
value:
|
|
76
|
+
value: k(t)
|
|
76
77
|
};
|
|
77
78
|
let i = this.#o.get(n);
|
|
78
79
|
return i && !this.#i.has(n) ? {
|
|
79
80
|
kind: "editor",
|
|
80
|
-
value: i.value ?? this.#r.get(n) ??
|
|
81
|
+
value: i.value ?? this.#r.get(n) ?? k(t),
|
|
81
82
|
error: i.message
|
|
82
|
-
} : this.editing &&
|
|
83
|
+
} : this.editing && O(this.editing) === n ? {
|
|
83
84
|
kind: "editor",
|
|
84
|
-
value:
|
|
85
|
+
value: k(t)
|
|
85
86
|
} : { kind: "rest" };
|
|
86
87
|
}
|
|
87
88
|
open(e, t) {
|
|
88
89
|
this.#c = t.closest("table"), this.editing = e, this.#l = {
|
|
89
|
-
key:
|
|
90
|
+
key: O(e),
|
|
90
91
|
target: "editor"
|
|
91
92
|
}, this.#e.requestUpdate();
|
|
92
93
|
}
|
|
93
94
|
cancel(e) {
|
|
94
|
-
let t =
|
|
95
|
-
this.#o.has(t) && this.#i.add(t), this.#r.delete(t), this.editing &&
|
|
95
|
+
let t = O(e);
|
|
96
|
+
this.#o.has(t) && this.#i.add(t), this.#r.delete(t), this.editing && O(this.editing) === t && (this.editing = null), this.#l = {
|
|
96
97
|
key: t,
|
|
97
98
|
target: "cell"
|
|
98
99
|
}, this.#e.requestUpdate();
|
|
99
100
|
}
|
|
100
101
|
commit(e, t, n, r, i) {
|
|
101
|
-
let a =
|
|
102
|
-
if ((o || t !==
|
|
102
|
+
let a = O(e), o = this.#o.has(a) && !this.#i.has(a);
|
|
103
|
+
if ((o || t !== k(n)) && (o && this.#i.add(a), this.#n.set(a, t), this.message = "Wordt opgeslagen", this.#e.editCell({
|
|
103
104
|
id: e.id,
|
|
104
105
|
column: e.column,
|
|
105
106
|
value: t
|
|
@@ -107,7 +108,7 @@ var ie = 0, k = class {
|
|
|
107
108
|
key: a,
|
|
108
109
|
target: "cell"
|
|
109
110
|
}, r) {
|
|
110
|
-
let t = i.columns, n =
|
|
111
|
+
let t = i.columns, n = te({
|
|
111
112
|
row: i.ids.indexOf(e.id),
|
|
112
113
|
column: t.findIndex((t) => t.key === e.column)
|
|
113
114
|
}, r, i.ids.length, t.length, (e, n) => this.editable({
|
|
@@ -120,7 +121,7 @@ var ie = 0, k = class {
|
|
|
120
121
|
column: t[n.column]?.key ?? ""
|
|
121
122
|
};
|
|
122
123
|
this.editing = e, this.#l = {
|
|
123
|
-
key:
|
|
124
|
+
key: O(e),
|
|
124
125
|
target: "editor"
|
|
125
126
|
};
|
|
126
127
|
}
|
|
@@ -128,7 +129,7 @@ var ie = 0, k = class {
|
|
|
128
129
|
this.#e.requestUpdate();
|
|
129
130
|
}
|
|
130
131
|
editable(e, t) {
|
|
131
|
-
let n =
|
|
132
|
+
let n = O(e);
|
|
132
133
|
return !!t?.editor && !this.#n.has(n) && !this.#s.has(n);
|
|
133
134
|
}
|
|
134
135
|
restoreFocus(e) {
|
|
@@ -140,48 +141,48 @@ var ie = 0, k = class {
|
|
|
140
141
|
let r = n.querySelector(".lintje-data-table__editor");
|
|
141
142
|
t.target === "editor" && r ? (r.focus(), r instanceof HTMLInputElement && r.select()) : n.focus();
|
|
142
143
|
}
|
|
143
|
-
content(e, t, n, i, a
|
|
144
|
-
let
|
|
145
|
-
if (
|
|
146
|
-
><lintje-spinner size="16"></lintje-spinner><span>${
|
|
144
|
+
content(e, t, n, r, i, a) {
|
|
145
|
+
let o = this.mode(e, n);
|
|
146
|
+
if (o.kind === "busy") return p`<span class="lintje-data-table__busy"
|
|
147
|
+
><lintje-spinner size="16"></lintje-spinner><span>${o.value}</span></span
|
|
147
148
|
>`;
|
|
148
|
-
if (
|
|
149
|
+
if (o.kind === "rest") return p`${r}${v("functioneel-bewerken", {
|
|
149
150
|
size: 14,
|
|
150
151
|
className: "lintje-data-table__edit-icon"
|
|
151
152
|
})}`;
|
|
152
|
-
let
|
|
153
|
+
let s = o.error ? `${this.#t}-${a.copy}-error-${a.ids.indexOf(e.id)}-${e.column}` : null, c = (t) => {
|
|
153
154
|
let r = t.currentTarget;
|
|
154
|
-
t.stopPropagation(), t.key === "Escape" ? (t.preventDefault(), this.cancel(e)) : t.key === "Enter" ? (t.preventDefault(), this.commit(e, r.value, n, "down",
|
|
155
|
-
},
|
|
156
|
-
!
|
|
157
|
-
},
|
|
155
|
+
t.stopPropagation(), t.key === "Escape" ? (t.preventDefault(), this.cancel(e)) : t.key === "Enter" ? (t.preventDefault(), this.commit(e, r.value, n, "down", a)) : t.key === "Tab" && (t.preventDefault(), this.commit(e, r.value, n, t.shiftKey ? "previous" : "next", a));
|
|
156
|
+
}, u = (t) => {
|
|
157
|
+
!o.error && this.editing && O(this.editing) === O(e) && this.commit(e, t.currentTarget.value, n, null, a);
|
|
158
|
+
}, d = _({
|
|
158
159
|
"lintje-data-table__editor": !0,
|
|
159
160
|
"focus-inset": !0,
|
|
160
|
-
"is-error": !!
|
|
161
|
-
}),
|
|
162
|
-
class=${
|
|
163
|
-
aria-label=${
|
|
164
|
-
aria-invalid=${
|
|
165
|
-
aria-describedby=${
|
|
166
|
-
@keydown=${
|
|
167
|
-
@blur=${
|
|
161
|
+
"is-error": !!o.error
|
|
162
|
+
}), f = t.editor, m = f?.kind === "select" ? p`<select
|
|
163
|
+
class=${d}
|
|
164
|
+
aria-label=${i}
|
|
165
|
+
aria-invalid=${o.error ? "true" : l}
|
|
166
|
+
aria-describedby=${s ?? l}
|
|
167
|
+
@keydown=${c}
|
|
168
|
+
@blur=${u}
|
|
168
169
|
>
|
|
169
|
-
${(
|
|
170
|
+
${(f.options ?? []).map((e) => p`<option value=${e.value} ?selected=${e.value === o.value}>
|
|
170
171
|
${e.label ?? e.value}
|
|
171
172
|
</option>`)}
|
|
172
|
-
</select>` :
|
|
173
|
+
</select>` : p`<input
|
|
173
174
|
type="text"
|
|
174
|
-
class=${
|
|
175
|
-
inputmode=${
|
|
176
|
-
placeholder=${
|
|
177
|
-
aria-label=${
|
|
178
|
-
aria-invalid=${
|
|
179
|
-
aria-describedby=${
|
|
180
|
-
.value=${
|
|
181
|
-
@keydown=${
|
|
182
|
-
@blur=${
|
|
175
|
+
class=${d}
|
|
176
|
+
inputmode=${f?.kind === "number" ? "decimal" : l}
|
|
177
|
+
placeholder=${f?.kind === "date" ? "dd-mm-jjjj" : l}
|
|
178
|
+
aria-label=${i}
|
|
179
|
+
aria-invalid=${o.error ? "true" : l}
|
|
180
|
+
aria-describedby=${s ?? l}
|
|
181
|
+
.value=${o.value}
|
|
182
|
+
@keydown=${c}
|
|
183
|
+
@blur=${u}
|
|
183
184
|
/>`;
|
|
184
|
-
return
|
|
185
|
+
return p`${m}${o.error ? p`<span id=${s ?? l} class="lintje-data-table__edit-error">${o.error}</span>` : l}`;
|
|
185
186
|
}
|
|
186
187
|
cellClasses(e, t) {
|
|
187
188
|
let n = this.mode(e, t);
|
|
@@ -195,13 +196,13 @@ var ie = 0, k = class {
|
|
|
195
196
|
t.target === t.currentTarget && (t.key === "Enter" || t.key === "F2") && (t.preventDefault(), t.stopPropagation(), this.open(e, t.currentTarget));
|
|
196
197
|
}
|
|
197
198
|
renderStatus() {
|
|
198
|
-
return
|
|
199
|
+
return p`<span id=${this.hintId} class="visually-hidden">Bewerkbaar met Enter of F2</span
|
|
199
200
|
><span class="visually-hidden" role="status">${this.message}</span>`;
|
|
200
201
|
}
|
|
201
202
|
};
|
|
202
203
|
//#endregion
|
|
203
204
|
//#region src/components/tables/data-table/actions.ts
|
|
204
|
-
function
|
|
205
|
+
function ie(e, t, n) {
|
|
205
206
|
let r = e.indexOf(n), i = t == null ? -1 : e.indexOf(t);
|
|
206
207
|
if (r < 0) return [];
|
|
207
208
|
if (i < 0) return [n];
|
|
@@ -212,8 +213,8 @@ function ae(e, t) {
|
|
|
212
213
|
let n = new Set(e);
|
|
213
214
|
return [...e, ...t.filter((e) => !n.has(e))];
|
|
214
215
|
}
|
|
215
|
-
function
|
|
216
|
-
return
|
|
216
|
+
function A(e, t, n) {
|
|
217
|
+
return p`<lintje-menu-button
|
|
217
218
|
icon
|
|
218
219
|
variant="tertiary"
|
|
219
220
|
placement="bottom-end"
|
|
@@ -224,34 +225,34 @@ function j(e, t, n) {
|
|
|
224
225
|
}}
|
|
225
226
|
></lintje-menu-button>`;
|
|
226
227
|
}
|
|
227
|
-
function
|
|
228
|
-
let
|
|
228
|
+
function j(e, t, n, r, i) {
|
|
229
|
+
let a = n ? e.length > 0 ? p`<lintje-menu-button
|
|
229
230
|
label="Acties"
|
|
230
231
|
.items=${e}
|
|
231
232
|
@lintje-action=${(e) => {
|
|
232
|
-
e.stopPropagation(),
|
|
233
|
+
e.stopPropagation(), r(e.detail);
|
|
233
234
|
}}
|
|
234
|
-
></lintje-menu-button>` :
|
|
235
|
+
></lintje-menu-button>` : l : e.map((e) => p`<lintje-button
|
|
235
236
|
variant=${e.danger ? "danger-secondary" : "secondary"}
|
|
236
237
|
size="compact"
|
|
237
|
-
icon=${e.icon ??
|
|
238
|
+
icon=${e.icon ?? l}
|
|
238
239
|
?disabled=${!!e.disabled}
|
|
239
|
-
@click=${() =>
|
|
240
|
+
@click=${() => r(e.value)}
|
|
240
241
|
>${e.label}</lintje-button
|
|
241
242
|
>`);
|
|
242
|
-
return
|
|
243
|
+
return p`<div
|
|
243
244
|
class="lintje-data-table__selection ${n ? "lintje-data-table__selection--mobile" : ""}"
|
|
244
245
|
role="toolbar"
|
|
245
246
|
aria-label="Acties op de selectie"
|
|
246
247
|
>
|
|
247
248
|
<!-- The table's own status region reads the count: one inserted with its bar would not be. -->
|
|
248
249
|
<strong class="lintje-data-table__selection-count">${t} geselecteerd</strong>
|
|
249
|
-
${
|
|
250
|
+
${a}
|
|
250
251
|
<lintje-button
|
|
251
252
|
class="lintje-data-table__selection-clear"
|
|
252
253
|
variant="tertiary"
|
|
253
254
|
size="compact"
|
|
254
|
-
@click=${
|
|
255
|
+
@click=${i}
|
|
255
256
|
>Selectie opheffen</lintje-button
|
|
256
257
|
>
|
|
257
258
|
</div>`;
|
|
@@ -264,11 +265,11 @@ function M(e) {
|
|
|
264
265
|
function N(e) {
|
|
265
266
|
return M(e) ? Array.isArray(e) ? e : e.trim() : null;
|
|
266
267
|
}
|
|
267
|
-
function
|
|
268
|
+
function oe(e, t) {
|
|
268
269
|
return e.filter?.options?.find((e) => e.value === t)?.label ?? t;
|
|
269
270
|
}
|
|
270
|
-
function
|
|
271
|
-
let n = Array.isArray(t) ? t.map((t) =>
|
|
271
|
+
function se(e, t) {
|
|
272
|
+
let n = Array.isArray(t) ? t.map((t) => oe(e, t)).join(", ") : `‘${t}’`;
|
|
272
273
|
return `${e.header}: ${n}`;
|
|
273
274
|
}
|
|
274
275
|
function P(e, t) {
|
|
@@ -284,31 +285,31 @@ function F(e, t, n) {
|
|
|
284
285
|
index: t
|
|
285
286
|
})).sort((e, t) => (o.get(e.column.key) ?? o.size + e.index) - (o.get(t.column.key) ?? o.size + t.index)).map((e) => e.column).filter((e) => !a.has(e.key))];
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
+
function ce(e, t, n) {
|
|
288
289
|
let r = new Set(n);
|
|
289
290
|
return {
|
|
290
291
|
order: [e, ...t],
|
|
291
292
|
hidden: t.filter((e) => !r.has(e))
|
|
292
293
|
};
|
|
293
294
|
}
|
|
294
|
-
function
|
|
295
|
+
function I(e, t) {
|
|
295
296
|
return {
|
|
296
|
-
focusout: (
|
|
297
|
-
let
|
|
298
|
-
!
|
|
297
|
+
focusout: (n) => {
|
|
298
|
+
let r = n.relatedTarget, i = n.currentTarget, a = i.getRootNode().host;
|
|
299
|
+
!r || r === e || i.contains(r) || u(a, r) || t("away");
|
|
299
300
|
},
|
|
300
301
|
keydown: (e) => {
|
|
301
302
|
if (e.key !== "Tab" || e.defaultPrevented) return;
|
|
302
|
-
let n =
|
|
303
|
+
let n = b(e.currentTarget), r = n.indexOf(a());
|
|
303
304
|
(e.shiftKey ? r > 0 : r !== n.length - 1) || t(e.shiftKey ? "back" : "forward") && e.preventDefault();
|
|
304
305
|
}
|
|
305
306
|
};
|
|
306
307
|
}
|
|
307
|
-
function
|
|
308
|
+
function le(e, t, n, r) {
|
|
308
309
|
let i = M(t);
|
|
309
|
-
return
|
|
310
|
+
return p`<button
|
|
310
311
|
type="button"
|
|
311
|
-
class=${
|
|
312
|
+
class=${_({
|
|
312
313
|
"lintje-data-table__funnel": !0,
|
|
313
314
|
"is-filtered": i
|
|
314
315
|
})}
|
|
@@ -318,43 +319,40 @@ function R(e, t, n, r) {
|
|
|
318
319
|
aria-expanded=${n ? "true" : "false"}
|
|
319
320
|
@click=${(e) => r(e.currentTarget)}
|
|
320
321
|
>
|
|
321
|
-
${
|
|
322
|
+
${v("functioneel-trechter", { size: 14 })}
|
|
322
323
|
</button>`;
|
|
323
324
|
}
|
|
324
|
-
function
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
function B(e, t, n) {
|
|
328
|
-
if (e.filter?.kind === "text") return m`<input
|
|
325
|
+
function L(e, t, n) {
|
|
326
|
+
if (e.filter?.kind === "text") return p`<input
|
|
329
327
|
type="search"
|
|
330
328
|
class="lintje-data-table__filter-search"
|
|
331
329
|
aria-label=${`Zoek in ${e.header.toLocaleLowerCase("nl")}`}
|
|
332
330
|
.value=${typeof t == "string" ? t : ""}
|
|
333
331
|
@input=${(e) => n(e.target.value)}
|
|
334
332
|
/>`;
|
|
335
|
-
let
|
|
336
|
-
return
|
|
337
|
-
${(e.filter?.options ?? []).map((e) =>
|
|
333
|
+
let r = new Set(Array.isArray(t) ? t : []);
|
|
334
|
+
return p`<div class="lintje-data-table__filter-options">
|
|
335
|
+
${(e.filter?.options ?? []).map((e) => p`<label class="lintje-choice lintje-data-table__filter-option">
|
|
338
336
|
<input
|
|
339
337
|
type="checkbox"
|
|
340
338
|
class="lintje-choice__input"
|
|
341
|
-
.checked=${
|
|
339
|
+
.checked=${r.has(e.value)}
|
|
342
340
|
@change=${(t) => {
|
|
343
|
-
let
|
|
344
|
-
n(
|
|
341
|
+
let i = t.target.checked, a = [...r].filter((t) => t !== e.value);
|
|
342
|
+
n(i ? [...a, e.value] : a);
|
|
345
343
|
}}
|
|
346
344
|
/>
|
|
347
345
|
<span class="lintje-choice__box" aria-hidden="true"
|
|
348
346
|
><span class="lintje-choice__mark">✓</span></span
|
|
349
347
|
>
|
|
350
348
|
<span class="lintje-choice__label">${e.label ?? e.value}</span>
|
|
351
|
-
${e.count == null ?
|
|
349
|
+
${e.count == null ? l : p`<span class="lintje-data-table__filter-count">${e.count}</span>`}
|
|
352
350
|
</label>`)}
|
|
353
351
|
</div>`;
|
|
354
352
|
}
|
|
355
|
-
function
|
|
356
|
-
let { column: t } = e, n =
|
|
357
|
-
return
|
|
353
|
+
function ue(e) {
|
|
354
|
+
let { column: t } = e, n = I(e.anchor, e.onLeave);
|
|
355
|
+
return p`<lintje-popover
|
|
358
356
|
open
|
|
359
357
|
panel-role="dialog"
|
|
360
358
|
label=${P(t, null)}
|
|
@@ -367,7 +365,7 @@ function V(e) {
|
|
|
367
365
|
>
|
|
368
366
|
<div class="lintje-data-table__filter-panel">
|
|
369
367
|
<div class="lintje-data-table__filter-name">${t.header}</div>
|
|
370
|
-
${
|
|
368
|
+
${L(t, e.draft, e.onDraft)}
|
|
371
369
|
<div class="lintje-data-table__filter-actions">
|
|
372
370
|
<lintje-button variant="tertiary" size="compact" @click=${e.onClear}>Wissen</lintje-button>
|
|
373
371
|
<lintje-button variant="primary" size="compact" @click=${e.onApply}>Toepassen</lintje-button>
|
|
@@ -375,70 +373,79 @@ function V(e) {
|
|
|
375
373
|
</div>
|
|
376
374
|
</lintje-popover>`;
|
|
377
375
|
}
|
|
378
|
-
function
|
|
379
|
-
return
|
|
376
|
+
function R(e) {
|
|
377
|
+
return p`<lintje-drawer
|
|
380
378
|
open
|
|
381
379
|
heading="Filters"
|
|
382
380
|
@lintje-close=${(t) => {
|
|
383
381
|
t.stopPropagation(), e.onClose();
|
|
384
382
|
}}
|
|
385
383
|
>
|
|
386
|
-
${e.columns.map((t) =>
|
|
384
|
+
${e.columns.map((t) => p`<section class="lintje-data-table__filter-section">
|
|
387
385
|
<div class="lintje-data-table__filter-name">${t.header}</div>
|
|
388
|
-
${
|
|
386
|
+
${L(t, e.draft[t.key], (n) => e.onDraft(t.key, n))}
|
|
389
387
|
</section>`)}
|
|
390
388
|
<lintje-button slot="footer" variant="tertiary" @click=${e.onClear}>Wissen</lintje-button>
|
|
391
389
|
<lintje-button slot="footer" variant="primary" @click=${e.onApply}>Toepassen</lintje-button>
|
|
392
390
|
</lintje-drawer>`;
|
|
393
391
|
}
|
|
394
|
-
function
|
|
395
|
-
let t = e.columns.filter((t) => M(e.values[t.key])), n = t.length
|
|
396
|
-
return
|
|
397
|
-
class="lintje-data-table__toolbar ${
|
|
392
|
+
function z(e) {
|
|
393
|
+
let t = e.columns.filter((t) => M(e.values[t.key])), n = t.length === 0 && !e.chooser;
|
|
394
|
+
return p`<div
|
|
395
|
+
class="lintje-data-table__toolbar ${n ? "lintje-data-table__toolbar--quiet" : ""}"
|
|
398
396
|
>
|
|
399
397
|
<div class="lintje-data-table__chips">
|
|
400
|
-
${e.columns.length > 0 ?
|
|
398
|
+
${e.columns.length > 0 ? p`<lintje-button
|
|
401
399
|
class="lintje-data-table__sheet-button"
|
|
402
400
|
variant="secondary"
|
|
403
401
|
size="compact"
|
|
404
402
|
icon="functioneel-filters"
|
|
405
403
|
@click=${e.onOpenSheet}
|
|
406
404
|
>Filters</lintje-button
|
|
407
|
-
>` :
|
|
408
|
-
${e.sortMenu ??
|
|
405
|
+
>` : l}
|
|
406
|
+
${e.sortMenu ?? l}
|
|
409
407
|
${t.map((t) => {
|
|
410
408
|
let n = e.values[t.key];
|
|
411
|
-
return
|
|
412
|
-
>${
|
|
409
|
+
return p`<span class="lintje-data-table__chip"
|
|
410
|
+
>${se(t, n)}<button
|
|
413
411
|
type="button"
|
|
414
412
|
class="lintje-data-table__chip-clear"
|
|
415
413
|
aria-label=${`${P(t, null)} wissen`}
|
|
416
414
|
@click=${(n) => e.onClearFilter(t.key, n.currentTarget)}
|
|
417
415
|
>
|
|
418
|
-
${
|
|
416
|
+
${v("functioneel-kruis", { size: 12 })}
|
|
419
417
|
</button></span
|
|
420
418
|
>`;
|
|
421
419
|
})}
|
|
422
|
-
|
|
420
|
+
${t.length > 1 ? p`<button
|
|
421
|
+
type="button"
|
|
422
|
+
class="lintje-button lintje-button--tertiary lintje-button--compact lintje-data-table__clear-all"
|
|
423
|
+
@click=${(t) => e.onClearAll(t.currentTarget)}
|
|
424
|
+
>
|
|
425
|
+
<span class="lintje-button__label">Filters wissen</span>
|
|
426
|
+
</button>` : l}
|
|
427
|
+
${e.count ? p`<span class="lintje-data-table__filter-total">${e.count}</span>` : l}
|
|
423
428
|
</div>
|
|
429
|
+
${e.chooser ?? l}
|
|
424
430
|
</div>`;
|
|
425
431
|
}
|
|
426
|
-
function
|
|
427
|
-
return
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
432
|
+
function B(e, t) {
|
|
433
|
+
return p`<lintje-tooltip text="Kolommen kiezen" no-describe
|
|
434
|
+
><button
|
|
435
|
+
type="button"
|
|
436
|
+
class="lintje-data-table__chooser-button"
|
|
437
|
+
aria-label="Kolommen kiezen"
|
|
438
|
+
aria-haspopup="dialog"
|
|
439
|
+
aria-expanded=${e ? "true" : "false"}
|
|
440
|
+
@click=${(e) => t(e.currentTarget)}
|
|
441
|
+
>
|
|
442
|
+
${v("functioneel-kolommen", { size: 18 })}
|
|
443
|
+
</button></lintje-tooltip
|
|
444
|
+
>`;
|
|
438
445
|
}
|
|
439
|
-
function
|
|
440
|
-
let t =
|
|
441
|
-
return
|
|
446
|
+
function V(e) {
|
|
447
|
+
let t = I(e.anchor, e.onLeave);
|
|
448
|
+
return p`<lintje-popover
|
|
442
449
|
open
|
|
443
450
|
panel-role="dialog"
|
|
444
451
|
label="Kolommen kiezen"
|
|
@@ -464,13 +471,24 @@ function le(e) {
|
|
|
464
471
|
t.stopPropagation(), e.onChecked(t.detail);
|
|
465
472
|
}}
|
|
466
473
|
></lintje-sortable-list>
|
|
474
|
+
<lintje-button
|
|
475
|
+
class="lintje-data-table__chooser-reset"
|
|
476
|
+
variant="tertiary"
|
|
477
|
+
size="compact"
|
|
478
|
+
?disabled=${e.isDefault}
|
|
479
|
+
reason="Elke kolom staat al, in de standaardvolgorde."
|
|
480
|
+
@click=${() => {
|
|
481
|
+
e.isDefault || e.onReset();
|
|
482
|
+
}}
|
|
483
|
+
>Terugzetten naar standaard</lintje-button
|
|
484
|
+
>
|
|
467
485
|
</div>
|
|
468
486
|
</lintje-popover>`;
|
|
469
487
|
}
|
|
470
488
|
//#endregion
|
|
471
489
|
//#region src/components/tables/data-table/data-table.ts
|
|
472
|
-
var
|
|
473
|
-
function
|
|
490
|
+
var H = 5, de = 5, U = ":scope > tbody > .lintje-data-table__row:not(.lintje-data-table__row--filler), :scope > tbody > .lintje-data-table__mobile-row:not(.lintje-data-table__mobile-row--filler)";
|
|
491
|
+
function fe(e) {
|
|
474
492
|
for (let t = e; t;) {
|
|
475
493
|
let e = (t instanceof Element ? t.assignedSlot : null) ?? t.parentNode ?? (t instanceof ShadowRoot ? t.host : null);
|
|
476
494
|
if (e instanceof Element && e !== document.documentElement && e !== document.body && /auto|scroll|hidden/.test(getComputedStyle(e).overflowY)) return e;
|
|
@@ -478,27 +496,28 @@ function ue(e) {
|
|
|
478
496
|
}
|
|
479
497
|
return document.scrollingElement;
|
|
480
498
|
}
|
|
481
|
-
var
|
|
499
|
+
var pe = /* @__PURE__ */ new Set([
|
|
482
500
|
"number",
|
|
483
501
|
"percent",
|
|
484
502
|
"decimal",
|
|
485
503
|
"change",
|
|
486
504
|
"change-compact"
|
|
487
|
-
]),
|
|
505
|
+
]), me = /* @__PURE__ */ new Set([
|
|
488
506
|
"complete",
|
|
489
507
|
"delayed",
|
|
490
508
|
"outage",
|
|
491
509
|
"no-data"
|
|
492
510
|
]);
|
|
493
|
-
function
|
|
494
|
-
return e.format ?
|
|
511
|
+
function W(e, t) {
|
|
512
|
+
return e.format ? pe.has(e.format) : typeof t.find((t) => t[e.key] != null)?.[e.key] == "number";
|
|
495
513
|
}
|
|
496
|
-
function
|
|
514
|
+
function G(e, t) {
|
|
497
515
|
if (t == null) return null;
|
|
516
|
+
if (e.format === "label") return e.labels?.[String(t)]?.label ?? String(t);
|
|
498
517
|
let n;
|
|
499
|
-
return n = typeof t == "string" || e.format === "text" ? String(t) : e.format === "change" || e.format === "change-compact" ? `${t > 0 ? "▲" : t < 0 ? "▼" : "●"} ${t > 0 ? "+" : ""}${
|
|
518
|
+
return n = typeof t == "string" || e.format === "text" ? String(t) : e.format === "change" || e.format === "change-compact" ? `${t > 0 ? "▲" : t < 0 ? "▼" : "●"} ${t > 0 ? "+" : ""}${c(t, e.decimals ?? 0)}%` : e.format === "percent" ? d(t, e.decimals ?? 0) : e.format === "decimal" ? c(t, e.decimals ?? 1) : c(t, e.decimals ?? 0), e.unit ? `${n} ${e.unit}` : n;
|
|
500
519
|
}
|
|
501
|
-
function
|
|
520
|
+
function K(e, t) {
|
|
502
521
|
let n = e.threshold;
|
|
503
522
|
if (!n || typeof t != "number") return null;
|
|
504
523
|
let r = n.direction === "below-is-bad", i = r ? t < n.value : t > n.value, a = !i && n.caution != null && (r ? t <= n.caution : t >= n.caution);
|
|
@@ -508,17 +527,44 @@ function Y(e, t) {
|
|
|
508
527
|
label: i ? r ? "onder norm" : "boven norm" : a ? "dicht bij norm" : "binnen norm"
|
|
509
528
|
};
|
|
510
529
|
}
|
|
511
|
-
function
|
|
530
|
+
function q(e, t) {
|
|
512
531
|
if (t === 0 && e.zeroText != null) return e.zeroText;
|
|
513
532
|
if (e.format === "status" && t != null) return e.status?.labels?.[String(t)] ?? String(t);
|
|
514
|
-
let n =
|
|
533
|
+
let n = G(e, t), r = n == null ? null : K(e, t);
|
|
515
534
|
return r ? `${n} · ${r.label}` : n;
|
|
516
535
|
}
|
|
517
|
-
function
|
|
536
|
+
function he(e, t) {
|
|
518
537
|
let n = e.status?.tones?.[t] ?? t;
|
|
519
|
-
return
|
|
538
|
+
return me.has(n) ? n : null;
|
|
520
539
|
}
|
|
521
|
-
|
|
540
|
+
function J(e) {
|
|
541
|
+
return p`<span class="lintje-data-table__sort-icon" aria-hidden="true"
|
|
542
|
+
><span class=${_({
|
|
543
|
+
"lintje-data-table__sort-up": !0,
|
|
544
|
+
"is-on": e === "asc",
|
|
545
|
+
"is-off": e === "desc"
|
|
546
|
+
})}>▲</span
|
|
547
|
+
><span class=${_({
|
|
548
|
+
"lintje-data-table__sort-down": !0,
|
|
549
|
+
"is-on": e === "desc",
|
|
550
|
+
"is-off": e === "asc"
|
|
551
|
+
})}>▼</span
|
|
552
|
+
></span>`;
|
|
553
|
+
}
|
|
554
|
+
var Y = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`;
|
|
555
|
+
function X(e) {
|
|
556
|
+
return typeof e == "object" && e ? e : { value: e ?? null };
|
|
557
|
+
}
|
|
558
|
+
function ge(e) {
|
|
559
|
+
return {
|
|
560
|
+
key: e.key,
|
|
561
|
+
header: e.label,
|
|
562
|
+
format: e.format,
|
|
563
|
+
decimals: e.decimals,
|
|
564
|
+
unit: e.unit
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
var Z = p`<span aria-hidden="true" class="lintje-data-table__muted">—</span
|
|
522
568
|
><span class="visually-hidden">geen gegevens</span>`, Q = class {
|
|
523
569
|
#e;
|
|
524
570
|
#t;
|
|
@@ -536,30 +582,31 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
536
582
|
disconnect() {
|
|
537
583
|
this.#e?.removeEventListener("scroll", this.measure), this.#t?.disconnect(), this.#e = null, this.#t = null;
|
|
538
584
|
}
|
|
539
|
-
}, $ = class extends
|
|
585
|
+
}, $ = class extends T {
|
|
540
586
|
constructor(...e) {
|
|
541
|
-
super(...e), this.bare = !1, this.plain = !1, this.sort = null, this.checkedIds = [], this.page = 0, this.mobilePage = 0, this.#e = new
|
|
587
|
+
super(...e), this.bare = !1, this.plain = !1, this.sort = null, this.checkedIds = [], this.page = 0, this.mobilePage = 0, this.#e = new t(this), this.#t = new Q(() => this.requestUpdate()), this.#n = new Q(() => this.requestUpdate()), this.#r = JSON.stringify(null), this.#i = JSON.stringify([]), this.filterValues = {}, this.filterDraft = {}, this.columnOrder = null, this.hiddenKeys = [], this.panel = null, this.openRows = [], this.collapsedGroups = [], this.liveMessage = "", this.#a = 0, this.#o = !1, this.#s = new re({
|
|
542
588
|
requestUpdate: () => this.requestUpdate(),
|
|
543
589
|
editCell: (e) => this.emit("lintje-cell-edit", e)
|
|
544
590
|
}), this.#c = JSON.stringify({}), this.#l = "", this.#u = null, this.#d = null, this.#f = !1, this.#p = {
|
|
545
591
|
seen: "",
|
|
546
592
|
items: []
|
|
547
|
-
}, this.#m = null, this.#h = 0, this.#
|
|
548
|
-
cancelAnimationFrame(this.#
|
|
549
|
-
this.#
|
|
593
|
+
}, this.#m = null, this.#h = null, this.#g = 0, this.#y = () => {
|
|
594
|
+
cancelAnimationFrame(this.#g), this.#g = requestAnimationFrame(() => {
|
|
595
|
+
this.#g = 0, this.#b();
|
|
550
596
|
});
|
|
551
597
|
};
|
|
552
598
|
}
|
|
553
599
|
static {
|
|
554
600
|
this.styles = [
|
|
601
|
+
f,
|
|
602
|
+
s,
|
|
555
603
|
e,
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
a(ne)
|
|
604
|
+
o(g),
|
|
605
|
+
o(S),
|
|
606
|
+
o(n),
|
|
607
|
+
o(x),
|
|
608
|
+
ee,
|
|
609
|
+
o(D)
|
|
563
610
|
];
|
|
564
611
|
}
|
|
565
612
|
static {
|
|
@@ -579,7 +626,8 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
579
626
|
columnOrder: { state: !0 },
|
|
580
627
|
hiddenKeys: { state: !0 },
|
|
581
628
|
panel: { state: !0 },
|
|
582
|
-
|
|
629
|
+
openRows: { state: !0 },
|
|
630
|
+
collapsedGroups: { state: !0 },
|
|
583
631
|
liveMessage: { state: !0 }
|
|
584
632
|
};
|
|
585
633
|
}
|
|
@@ -599,21 +647,22 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
599
647
|
#p;
|
|
600
648
|
#m;
|
|
601
649
|
#h;
|
|
650
|
+
#g;
|
|
602
651
|
createRenderRoot() {
|
|
603
652
|
let e = super.createRenderRoot();
|
|
604
|
-
return e.addEventListener("focusin", this.#
|
|
653
|
+
return e.addEventListener("focusin", this.#y), e;
|
|
605
654
|
}
|
|
606
655
|
get dataSettings() {
|
|
607
656
|
return this.data ?? void 0;
|
|
608
657
|
}
|
|
609
658
|
disconnectedCallback() {
|
|
610
|
-
cancelAnimationFrame(this.#a), this.#a = 0, cancelAnimationFrame(this.#
|
|
659
|
+
cancelAnimationFrame(this.#a), this.#a = 0, cancelAnimationFrame(this.#g), this.#g = 0, this.#t.disconnect(), this.#n.disconnect(), super.disconnectedCallback();
|
|
611
660
|
}
|
|
612
661
|
expandChanged(e) {
|
|
613
662
|
e || this.#n.disconnect();
|
|
614
663
|
}
|
|
615
664
|
willUpdate(e) {
|
|
616
|
-
if (super.willUpdate(e), (e.has("data") || e.has("checkedIds")) && this.#
|
|
665
|
+
if (super.willUpdate(e), (e.has("data") || e.has("checkedIds")) && this.#_(), !e.has("data")) return;
|
|
617
666
|
let t = JSON.stringify(this.data?.sort ?? null);
|
|
618
667
|
t !== this.#r && (this.#r = t, this.sort = this.data?.sort ?? null);
|
|
619
668
|
let n = JSON.stringify(this.data?.checkedIds ?? []);
|
|
@@ -621,19 +670,25 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
621
670
|
let r = JSON.stringify(this.data?.filters ?? {});
|
|
622
671
|
r !== this.#c && (this.#c = r, this.filterValues = { ...this.data?.filters });
|
|
623
672
|
let i = JSON.stringify([this.data?.columns.map((e) => e.key) ?? [], this.data?.hiddenColumns ?? []]);
|
|
624
|
-
i !== this.#l && (this.#l = i, this.columnOrder = null, this.hiddenKeys = this.data?.hiddenColumns ?? []), this.#s.sync(this.data), this.#o
|
|
625
|
-
|
|
626
|
-
|
|
673
|
+
if (i !== this.#l && (this.#l = i, this.columnOrder = null, this.hiddenKeys = this.data?.hiddenColumns ?? []), this.#s.sync(this.data), this.#o) {
|
|
674
|
+
this.#o = !1;
|
|
675
|
+
let e = this.data?.totalRows;
|
|
676
|
+
this.announce(e == null ? Y(this.rows.length) : `${this.rows.length} van ${Y(e)}`);
|
|
677
|
+
}
|
|
678
|
+
let a = this.grouped, o = a ? this.groupsOf(this.rows).length : this.rows.length, s = (e) => Math.max(0, Math.ceil(o / e) - 1);
|
|
679
|
+
this.page = Math.min(this.page, s(a ? this.groupsPerPage : this.data?.pageSize ?? 25)), this.mobilePage = Math.min(this.mobilePage, s(a ? this.groupsPerPage : H));
|
|
680
|
+
let c = new Set(this.rows.map((e) => this.rowKey(e)));
|
|
681
|
+
this.openRows.some((e) => !c.has(e)) && (this.openRows = this.openRows.filter((e) => c.has(e)));
|
|
627
682
|
}
|
|
628
683
|
updated(e) {
|
|
629
|
-
super.updated(e), this.#s.restoreFocus(this.renderRoot), this.#
|
|
684
|
+
super.updated(e), this.#s.restoreFocus(this.renderRoot), this.#v();
|
|
630
685
|
}
|
|
631
|
-
#
|
|
632
|
-
if (this.#m = null, !
|
|
633
|
-
let e = [...this.renderRoot.querySelectorAll(".lintje-data-table")].find(
|
|
686
|
+
#_() {
|
|
687
|
+
if (this.#m = null, !r(this)) return;
|
|
688
|
+
let e = [...this.renderRoot.querySelectorAll(".lintje-data-table")].find(r);
|
|
634
689
|
if (!e) return;
|
|
635
690
|
let t = e.querySelector(":scope > .lintje-data-table__selection");
|
|
636
|
-
if (t &&
|
|
691
|
+
if (t && r(t)) {
|
|
637
692
|
this.#m = {
|
|
638
693
|
scope: e,
|
|
639
694
|
table: null,
|
|
@@ -642,38 +697,38 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
642
697
|
};
|
|
643
698
|
return;
|
|
644
699
|
}
|
|
645
|
-
let n = [...e.querySelectorAll("table")].find(
|
|
646
|
-
if (!n ||
|
|
647
|
-
let
|
|
700
|
+
let n = [...e.querySelectorAll("table")].find(r), i = n ? [...n.querySelectorAll(U)] : [], a = i.findIndex(r);
|
|
701
|
+
if (!n || a === -1) return;
|
|
702
|
+
let o = b(i[a]).findIndex(r);
|
|
648
703
|
this.#m = {
|
|
649
704
|
scope: e,
|
|
650
705
|
table: n,
|
|
651
|
-
row:
|
|
652
|
-
stop: Math.max(0,
|
|
706
|
+
row: a,
|
|
707
|
+
stop: Math.max(0, o)
|
|
653
708
|
};
|
|
654
709
|
}
|
|
655
|
-
#
|
|
710
|
+
#v() {
|
|
656
711
|
let e = this.#m;
|
|
657
712
|
if (this.#m = null, !e?.scope.isConnected) return;
|
|
658
|
-
let t =
|
|
713
|
+
let t = a();
|
|
659
714
|
if (t && t !== document.body) return;
|
|
660
|
-
let n = this.#e.matches ? ".lintje-data-table__mobile" : ".lintje-data-table__full", r = e.scope.querySelector(`${n} thead .lintje-choice__input`),
|
|
715
|
+
let n = this.#e.matches ? ".lintje-data-table__mobile" : ".lintje-data-table__full", r = e.scope.querySelector(`${n} thead .lintje-choice__input`), i;
|
|
661
716
|
if (e.table?.isConnected) {
|
|
662
|
-
let t = [...e.table.querySelectorAll(
|
|
663
|
-
|
|
717
|
+
let t = [...e.table.querySelectorAll(U)], n = t[Math.min(e.row, t.length - 1)], r = n ? b(n) : [];
|
|
718
|
+
i = r[Math.min(e.stop, r.length - 1)];
|
|
664
719
|
}
|
|
665
|
-
(
|
|
720
|
+
(i ?? r ?? b(e.scope)[0])?.focus();
|
|
666
721
|
}
|
|
667
|
-
#
|
|
668
|
-
#
|
|
669
|
-
let e =
|
|
722
|
+
#y;
|
|
723
|
+
#b() {
|
|
724
|
+
let e = a();
|
|
670
725
|
for (; e && e.getRootNode() !== this.renderRoot;) e = e.getRootNode().host ?? null;
|
|
671
726
|
if (e) for (let t of this.renderRoot.querySelectorAll(".lintje-data-table__selection")) {
|
|
672
727
|
if (!t.parentElement?.contains(e) || t.contains(e)) continue;
|
|
673
728
|
let n = t.getBoundingClientRect(), r = (e.closest("td, th") ?? e).getBoundingClientRect();
|
|
674
729
|
if (r.bottom <= n.top || r.top >= n.bottom) return;
|
|
675
730
|
let i = t.classList.contains("lintje-data-table__selection--mobile");
|
|
676
|
-
|
|
731
|
+
fe(t)?.scrollBy({
|
|
677
732
|
top: i ? r.bottom - n.top : r.top - n.bottom,
|
|
678
733
|
behavior: "instant"
|
|
679
734
|
});
|
|
@@ -690,6 +745,41 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
690
745
|
get rows() {
|
|
691
746
|
return this.data?.rows ?? [];
|
|
692
747
|
}
|
|
748
|
+
get groupColumn() {
|
|
749
|
+
let e = this.data?.groupBy;
|
|
750
|
+
return e ? this.columns.find((t) => t.key === e) : void 0;
|
|
751
|
+
}
|
|
752
|
+
get grouped() {
|
|
753
|
+
return !!this.groupColumn;
|
|
754
|
+
}
|
|
755
|
+
get groupsPerPage() {
|
|
756
|
+
return this.data?.groupsPerPage ?? de;
|
|
757
|
+
}
|
|
758
|
+
groupsOf(e) {
|
|
759
|
+
let t = this.groupColumn;
|
|
760
|
+
if (!t) return [];
|
|
761
|
+
let n = /* @__PURE__ */ new Map();
|
|
762
|
+
for (let e of this.rows) {
|
|
763
|
+
let r = e[t.key] ?? null, i = String(r);
|
|
764
|
+
n.has(i) || n.set(i, {
|
|
765
|
+
key: i,
|
|
766
|
+
value: r,
|
|
767
|
+
rows: []
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
for (let r of e) n.get(String(r[t.key] ?? null))?.rows.push(r);
|
|
771
|
+
return [...n.values()];
|
|
772
|
+
}
|
|
773
|
+
toggleGroup(e) {
|
|
774
|
+
this.collapsedGroups = this.collapsedGroups.includes(e) ? this.collapsedGroups.filter((t) => t !== e) : [...this.collapsedGroups, e];
|
|
775
|
+
}
|
|
776
|
+
get detailColumns() {
|
|
777
|
+
let e = new Set(this.shown), t = this.groupColumn;
|
|
778
|
+
return [...this.columns.filter((n) => !e.has(n) && n !== t), ...(this.data?.detailFields ?? []).map(ge)];
|
|
779
|
+
}
|
|
780
|
+
toggleRow(e) {
|
|
781
|
+
this.openRows = this.openRows.includes(e) ? this.openRows.filter((t) => t !== e) : [...this.openRows, e];
|
|
782
|
+
}
|
|
693
783
|
rowKey(e) {
|
|
694
784
|
return String(e[this.data?.rowKey ?? "id"]);
|
|
695
785
|
}
|
|
@@ -712,11 +802,12 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
712
802
|
}
|
|
713
803
|
sortValue(e, t) {
|
|
714
804
|
let n = t[e.key];
|
|
805
|
+
if (e.format === "label" && n != null) return G(e, n) ?? "";
|
|
715
806
|
if (e.editor?.kind === "date") {
|
|
716
|
-
let e =
|
|
807
|
+
let e = C(String(n ?? ""));
|
|
717
808
|
return e.kind === "ok" ? e.iso : "";
|
|
718
809
|
}
|
|
719
|
-
return n ?? (
|
|
810
|
+
return n ?? (W(e, this.rows) ? -Infinity : "");
|
|
720
811
|
}
|
|
721
812
|
get sortedRows() {
|
|
722
813
|
let e = this.activeSort, t = this.columns.find((t) => t.key === e.key);
|
|
@@ -760,7 +851,8 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
760
851
|
this.checkedIds = e, this.emit("lintje-checked-change", e), this.data?.bulkActions && this.announce(e.length > 0 ? `${e.length} geselecteerd` : "Selectie opgeheven");
|
|
761
852
|
}
|
|
762
853
|
get shown() {
|
|
763
|
-
|
|
854
|
+
let e = this.groupColumn, t = !this.data?.columnChooser && this.hiddenKeys.length === 0 ? this.columns : F(this.columns, this.columnOrder, this.hiddenKeys);
|
|
855
|
+
return e ? t.filter((t) => t !== e) : t;
|
|
764
856
|
}
|
|
765
857
|
get filterColumns() {
|
|
766
858
|
return this.columns.filter((e) => e.filter);
|
|
@@ -776,18 +868,18 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
776
868
|
let t = this.#u?.closest(".lintje-data-table")?.querySelector("lintje-popover");
|
|
777
869
|
if (this.panel !== e || !t) return;
|
|
778
870
|
let n = [t, ...t.querySelectorAll("*")];
|
|
779
|
-
await Promise.all(n.map((e) => e.updateComplete)), this.panel === e &&
|
|
871
|
+
await Promise.all(n.map((e) => e.updateComplete)), this.panel === e && b(t)[0]?.focus();
|
|
780
872
|
}
|
|
781
873
|
closePanel(e, t = !0) {
|
|
782
874
|
if (e && this.panel !== e) return;
|
|
783
875
|
let n = this.#u;
|
|
784
|
-
this.panel = null, this.#u = null, n && t &&
|
|
876
|
+
this.panel = null, this.#u = null, n && t && y(n).focus();
|
|
785
877
|
}
|
|
786
878
|
leavePanel(e, t) {
|
|
787
879
|
if (this.panel !== e) return !0;
|
|
788
880
|
let n = this.#u, r = n?.closest(".lintje-data-table");
|
|
789
881
|
if (t !== "forward" || !n || !r) return this.closePanel(e, t === "back"), !0;
|
|
790
|
-
let i = r.querySelector("lintje-popover"), a = new Set(i ?
|
|
882
|
+
let i = r.querySelector("lintje-popover"), a = new Set(i ? b(i) : []), o = b(r).filter((e) => !a.has(e)), s = o[o.indexOf(y(n)) + 1];
|
|
791
883
|
return s ? (this.closePanel(e, !1), s.focus(), !0) : !1;
|
|
792
884
|
}
|
|
793
885
|
applyFilters(e, t) {
|
|
@@ -803,25 +895,25 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
803
895
|
this.filterValues = n, this.page = 0, this.mobilePage = 0, this.closePanel();
|
|
804
896
|
}
|
|
805
897
|
async clearFilter(e, t) {
|
|
806
|
-
let n =
|
|
807
|
-
if (delete
|
|
898
|
+
let n = r(t), i = t.closest(".lintje-data-table"), a = { ...this.filterValues };
|
|
899
|
+
if (delete a[e], this.filterValues = a, this.page = 0, this.mobilePage = 0, this.#o = !0, this.emit("lintje-filter-change", {
|
|
808
900
|
column: e,
|
|
809
901
|
value: null
|
|
810
|
-
}), !n || !
|
|
902
|
+
}), !n || !i) return;
|
|
811
903
|
await this.updateComplete;
|
|
812
|
-
let
|
|
813
|
-
|
|
904
|
+
let o = i.querySelector(".lintje-data-table__chip-clear") ?? (this.#e.matches ? i.querySelector(".lintje-data-table__sheet-button") : i.querySelector(`.lintje-data-table__funnel[data-column="${e}"]`));
|
|
905
|
+
o && y(o).focus();
|
|
814
906
|
}
|
|
815
907
|
chooserItems() {
|
|
816
|
-
let [, ...
|
|
817
|
-
if (
|
|
818
|
-
let
|
|
908
|
+
let e = this.groupColumn, [, ...t] = F(this.columns, this.columnOrder, []).filter((t) => t !== e), n = JSON.stringify([t.map((e) => e.key), this.hiddenKeys]);
|
|
909
|
+
if (n !== this.#p.seen) {
|
|
910
|
+
let e = new Set(this.hiddenKeys);
|
|
819
911
|
this.#p = {
|
|
820
|
-
seen:
|
|
821
|
-
items:
|
|
822
|
-
id:
|
|
823
|
-
label:
|
|
824
|
-
checked: !
|
|
912
|
+
seen: n,
|
|
913
|
+
items: t.map((t) => ({
|
|
914
|
+
id: t.key,
|
|
915
|
+
label: t.header,
|
|
916
|
+
checked: !e.has(t.key)
|
|
825
917
|
}))
|
|
826
918
|
};
|
|
827
919
|
}
|
|
@@ -830,25 +922,53 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
830
922
|
changeColumns(e, t) {
|
|
831
923
|
let n = this.columns[0];
|
|
832
924
|
if (!n) return;
|
|
833
|
-
let r =
|
|
925
|
+
let r = ce(n.key, e, t);
|
|
834
926
|
this.columnOrder = e, this.hiddenKeys = r.hidden, this.emit("lintje-columns-change", r);
|
|
835
927
|
}
|
|
928
|
+
get columnsAreDefault() {
|
|
929
|
+
let [, ...e] = this.columns, t = this.columnOrder ?? e.map((e) => e.key);
|
|
930
|
+
return this.hiddenKeys.length === 0 && t.every((t, n) => t === e[n]?.key);
|
|
931
|
+
}
|
|
932
|
+
resetColumns() {
|
|
933
|
+
let [, ...e] = this.columns, t = e.map((e) => e.key);
|
|
934
|
+
this.changeColumns(t, t), this.#p = {
|
|
935
|
+
seen: "",
|
|
936
|
+
items: []
|
|
937
|
+
};
|
|
938
|
+
}
|
|
939
|
+
async clearAllFilters(e) {
|
|
940
|
+
let t = r(e), n = e.closest(".lintje-data-table"), i = Object.keys(this.filterValues).filter((e) => M(this.filterValues[e]));
|
|
941
|
+
this.filterValues = {}, this.page = 0, this.mobilePage = 0, this.#o = !0;
|
|
942
|
+
for (let e of i) this.emit("lintje-filter-change", {
|
|
943
|
+
column: e,
|
|
944
|
+
value: null
|
|
945
|
+
});
|
|
946
|
+
if (!t || !n) return;
|
|
947
|
+
await this.updateComplete;
|
|
948
|
+
let a = this.#e.matches ? n.querySelector(".lintje-data-table__sheet-button") : n.querySelector(".lintje-data-table__funnel");
|
|
949
|
+
a && y(a).focus();
|
|
950
|
+
}
|
|
836
951
|
render() {
|
|
837
952
|
let e = this.data;
|
|
838
|
-
if (!e) return
|
|
953
|
+
if (!e) return l;
|
|
839
954
|
if (this.bare) return this.table(this.#t);
|
|
840
955
|
if (this.plain) return this.content();
|
|
841
956
|
let t = (e.state ?? "ready") === "ready", n = this.#e.matches && e.mobileSubtitle ? e.mobileSubtitle : e.subtitle;
|
|
842
|
-
return
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
957
|
+
return p`<lintje-tile
|
|
958
|
+
class="lintje-data-table__tile"
|
|
959
|
+
breakable
|
|
960
|
+
id=${this.id ? `${this.id}-tile` : l}
|
|
961
|
+
span=${e.span ?? l}
|
|
962
|
+
heading=${e.title ?? l}
|
|
963
|
+
icon=${e.icon ?? l}
|
|
964
|
+
subtitle=${n ?? l}
|
|
965
|
+
intro=${e.intro ?? l}
|
|
966
|
+
footnote=${e.footnote ?? l}
|
|
850
967
|
?expandable=${!!e.expandable && t}
|
|
851
968
|
?download=${!!e.download && t}
|
|
969
|
+
state=${e.state ?? "ready"}
|
|
970
|
+
message=${e.message ?? l}
|
|
971
|
+
last-known=${e.lastKnown ?? l}
|
|
852
972
|
@lintje-tile-expand=${(e) => {
|
|
853
973
|
e.stopPropagation(), this.expand(!0);
|
|
854
974
|
}}
|
|
@@ -856,11 +976,11 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
856
976
|
e.stopPropagation(), this.csv();
|
|
857
977
|
}}
|
|
858
978
|
>
|
|
859
|
-
${e.notice ?
|
|
860
|
-
${this.content()}
|
|
979
|
+
${e.notice ? p`<lintje-announcement slot="notice" .data=${e.notice}></lintje-announcement>` : l}
|
|
980
|
+
${this.content(!0)}
|
|
861
981
|
</lintje-tile>
|
|
862
982
|
|
|
863
|
-
${this.renderExpandModal(this.expanded && t ? this.table(this.#n) :
|
|
983
|
+
${this.renderExpandModal(this.expanded && t ? this.table(this.#n) : l, {
|
|
864
984
|
heading: e.title,
|
|
865
985
|
subtitle: n,
|
|
866
986
|
footnote: e.footnote,
|
|
@@ -869,98 +989,140 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
869
989
|
}
|
|
870
990
|
csv() {
|
|
871
991
|
let e = this.data;
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
992
|
+
if (!e?.download) return;
|
|
993
|
+
let t = (e, t) => e.format === "label" && t != null ? G(e, t) : t, n = e.totals;
|
|
994
|
+
E(e.download.filename, [
|
|
995
|
+
e.columns.map((e) => e.header),
|
|
996
|
+
...e.rows.map((n) => e.columns.map((e) => t(e, n[e.key]))),
|
|
997
|
+
...n ? [e.columns.map((r, i) => i === 0 ? e.totalsLabel ?? "Totaal" : t(r, X(n[r.key]).value))] : []
|
|
998
|
+
]);
|
|
999
|
+
}
|
|
1000
|
+
content(e = !1) {
|
|
1001
|
+
let t = this.data;
|
|
1002
|
+
switch (t.state ?? "ready") {
|
|
1003
|
+
case "loading": return e ? p`<div slot="loading">${w({
|
|
1004
|
+
kind: "table",
|
|
1005
|
+
status: !1
|
|
1006
|
+
})}</div>` : w({ kind: "table" });
|
|
1007
|
+
case "empty": return e ? l : p`<lintje-empty-state compact status text=${t.message ?? l}></lintje-empty-state>`;
|
|
1008
|
+
case "error": return e ? l : p`<lintje-announcement
|
|
1009
|
+
compact
|
|
1010
|
+
.data=${{
|
|
1011
|
+
kind: "warning",
|
|
1012
|
+
text: t.message ?? "",
|
|
1013
|
+
live: !0
|
|
1014
|
+
}}
|
|
1015
|
+
></lintje-announcement>`;
|
|
884
1016
|
default: return this.table(this.#t);
|
|
885
1017
|
}
|
|
886
1018
|
}
|
|
887
1019
|
table(e) {
|
|
888
|
-
let t = this.data, n = this.sortedRows, i = t.pageSize ?? 25,
|
|
889
|
-
|
|
1020
|
+
let t = this.data, n = this.sortedRows, r = this.#e.matches, i = this.grouped, a = i ? this.groupsOf(n) : [], o = i ? a.length : n.length, s = i ? this.groupsPerPage : t.pageSize ?? 25, c = i ? this.groupsPerPage : H, u = Math.ceil(o / s), d = Math.ceil(o / c), f = a.slice(this.page * s, (this.page + 1) * s), h = a.slice(this.mobilePage * c, (this.mobilePage + 1) * c), g = new Set(this.collapsedGroups), v = i ? f.filter((e) => !g.has(e.key)).flatMap((e) => e.rows) : n.slice(this.page * s, (this.page + 1) * s), y = this.mobilePage * H, b = i ? [] : n.slice(y, y + H), x = !i && (r ? d : u) > 1, S = i ? {
|
|
1021
|
+
many: "groepen",
|
|
1022
|
+
one: "groep"
|
|
1023
|
+
} : {
|
|
1024
|
+
many: "rijen",
|
|
1025
|
+
one: "rij"
|
|
1026
|
+
}, C = e === this.#n === this.expanded, w = e === this.#n ? "modal" : "tile", T = e.start || e.end;
|
|
1027
|
+
return p`<div class=${_({
|
|
890
1028
|
"lintje-data-table": !0,
|
|
891
|
-
"is-phone":
|
|
1029
|
+
"is-phone": r
|
|
892
1030
|
})}>
|
|
893
|
-
${this.toolbar(e)} ${
|
|
1031
|
+
${this.toolbar(e, x)} ${r ? l : this.selectionBar(!1)}
|
|
894
1032
|
<!-- Desktop table: scrolls sideways when it is wider than the tile -->
|
|
895
1033
|
<div
|
|
896
|
-
class=${
|
|
1034
|
+
class=${_({
|
|
897
1035
|
"lintje-data-table__frame": !0,
|
|
898
1036
|
"is-scrollable-start": e.start,
|
|
899
1037
|
"is-scrollable-end": e.end
|
|
900
1038
|
})}
|
|
901
1039
|
>
|
|
902
|
-
<div
|
|
903
|
-
|
|
1040
|
+
<div
|
|
1041
|
+
class="lintje-data-table__scroller"
|
|
1042
|
+
${m(e.watch)}
|
|
1043
|
+
tabindex=${T ? 0 : l}
|
|
1044
|
+
role=${T ? "region" : l}
|
|
1045
|
+
aria-label=${T ? this.data?.caption ?? l : l}
|
|
1046
|
+
>
|
|
1047
|
+
${this.fullTable(v, u, s, e, i ? f : null)}
|
|
904
1048
|
</div>
|
|
905
1049
|
</div>
|
|
906
1050
|
|
|
907
1051
|
<!-- Mobile representation: two columns (C8) -->
|
|
908
|
-
${this.mobileTable(
|
|
909
|
-
${
|
|
1052
|
+
${this.mobileTable(b, d, w, i ? h : null)}
|
|
1053
|
+
${u > 1 ? this.pager("full", this.page, u, s, o, S, (e) => {
|
|
910
1054
|
this.page = e;
|
|
911
|
-
}) :
|
|
912
|
-
${
|
|
1055
|
+
}) : l}
|
|
1056
|
+
${d > 1 ? this.pager("mobile", this.mobilePage, d, c, o, S, (e) => {
|
|
913
1057
|
this.mobilePage = e;
|
|
914
|
-
}) :
|
|
915
|
-
${
|
|
916
|
-
${
|
|
917
|
-
<span class="visually-hidden" role="status">${
|
|
1058
|
+
}) : l}
|
|
1059
|
+
${r ? this.selectionBar(!0) : l} ${this.panels(e)}
|
|
1060
|
+
${C && this.columns.some((e) => e.editor) ? this.#s.renderStatus() : l}
|
|
1061
|
+
<span class="visually-hidden" role="status">${C ? this.liveMessage : ""}</span>
|
|
918
1062
|
</div>`;
|
|
919
1063
|
}
|
|
920
|
-
|
|
921
|
-
let
|
|
922
|
-
return this.filterColumns.
|
|
1064
|
+
get filteredCount() {
|
|
1065
|
+
let e = this.data?.totalRows;
|
|
1066
|
+
return this.filterColumns.some((e) => M(this.filterValues[e.key])) && e != null ? `${this.rows.length} van ${Y(e)}` : "";
|
|
1067
|
+
}
|
|
1068
|
+
toolbar(e, t) {
|
|
1069
|
+
let n = this.sortMenu(), r = this.groupToggle(), i = r === l ? void 0 : p`<div class="lintje-data-table__tools">${r}</div>`;
|
|
1070
|
+
return this.filterColumns.length === 0 && n === l && !i ? l : z({
|
|
923
1071
|
columns: this.filterColumns,
|
|
924
1072
|
values: this.filterValues,
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
1073
|
+
count: t ? "" : this.filteredCount,
|
|
1074
|
+
sortMenu: n,
|
|
1075
|
+
chooser: i,
|
|
928
1076
|
onClearFilter: (e, t) => void this.clearFilter(e, t),
|
|
1077
|
+
onClearAll: (e) => void this.clearAllFilters(e),
|
|
929
1078
|
onOpenSheet: () => this.openPanel({
|
|
930
1079
|
kind: "sheet",
|
|
931
1080
|
edges: e
|
|
932
1081
|
}, null)
|
|
933
1082
|
});
|
|
934
1083
|
}
|
|
1084
|
+
groupToggle() {
|
|
1085
|
+
if (!this.grouped) return l;
|
|
1086
|
+
let e = this.groupsOf(this.rows).map((e) => e.key), t = new Set(this.collapsedGroups), n = e.some((e) => !t.has(e));
|
|
1087
|
+
return p`<button
|
|
1088
|
+
type="button"
|
|
1089
|
+
class="lintje-button lintje-button--tertiary lintje-button--compact lintje-data-table__group-all"
|
|
1090
|
+
@click=${() => {
|
|
1091
|
+
this.collapsedGroups = n ? e : [], this.announce(n ? "Alle groepen ingeklapt" : "Alle groepen uitgeklapt");
|
|
1092
|
+
}}
|
|
1093
|
+
>
|
|
1094
|
+
<span class="lintje-button__label">${n ? "Alles inklappen" : "Alles uitklappen"}</span>
|
|
1095
|
+
</button>`;
|
|
1096
|
+
}
|
|
935
1097
|
sortMenu() {
|
|
936
1098
|
let e = this.shown.filter((e) => e.sortable !== !1), [t] = this.shown, n = this.mobileMeasure;
|
|
937
|
-
if (!e.some((e) => e !== t && e !== n)) return
|
|
938
|
-
let
|
|
1099
|
+
if (!e.some((e) => e !== t && e !== n)) return l;
|
|
1100
|
+
let r = this.activeSort, i = [
|
|
939
1101
|
{ heading: "Sorteren op" },
|
|
940
1102
|
...e.map((e) => ({
|
|
941
1103
|
value: `column:${e.key}`,
|
|
942
1104
|
label: e.header,
|
|
943
1105
|
radio: !0,
|
|
944
|
-
checked: e.key ===
|
|
1106
|
+
checked: e.key === r.key
|
|
945
1107
|
})),
|
|
946
1108
|
{ heading: "Volgorde" },
|
|
947
1109
|
{
|
|
948
1110
|
value: "direction:asc",
|
|
949
1111
|
label: "Oplopend",
|
|
950
1112
|
radio: !0,
|
|
951
|
-
checked:
|
|
1113
|
+
checked: r.direction === "asc"
|
|
952
1114
|
},
|
|
953
1115
|
{
|
|
954
1116
|
value: "direction:desc",
|
|
955
1117
|
label: "Aflopend",
|
|
956
1118
|
radio: !0,
|
|
957
|
-
checked:
|
|
1119
|
+
checked: r.direction === "desc"
|
|
958
1120
|
}
|
|
959
1121
|
];
|
|
960
|
-
return
|
|
1122
|
+
return p`<lintje-menu-button
|
|
961
1123
|
class="lintje-data-table__sort-menu"
|
|
962
1124
|
label="Sorteren"
|
|
963
|
-
.items=${
|
|
1125
|
+
.items=${i}
|
|
964
1126
|
@lintje-action=${(t) => {
|
|
965
1127
|
t.stopPropagation();
|
|
966
1128
|
let [n, r] = t.detail.split(/:(.*)/s), i = this.activeSort;
|
|
@@ -982,29 +1144,31 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
982
1144
|
}
|
|
983
1145
|
selectionBar(e) {
|
|
984
1146
|
let t = this.data;
|
|
985
|
-
return !t.selectable || !t.bulkActions || this.checkedIds.length === 0 ?
|
|
1147
|
+
return !t.selectable || !t.bulkActions || this.checkedIds.length === 0 ? l : j(t.bulkActions, this.checkedIds.length, e, (e) => this.emit("lintje-bulk-action", {
|
|
986
1148
|
ids: [...this.checkedIds],
|
|
987
1149
|
action: e
|
|
988
1150
|
}), () => this.setChecked([]));
|
|
989
1151
|
}
|
|
990
1152
|
panels(e) {
|
|
991
1153
|
let t = this.panel;
|
|
992
|
-
if (!t || t.edges !== e) return
|
|
1154
|
+
if (!t || t.edges !== e) return l;
|
|
993
1155
|
if (t.kind === "columns") {
|
|
994
1156
|
let e = this.columns[0];
|
|
995
|
-
return e ?
|
|
1157
|
+
return e ? V({
|
|
996
1158
|
first: e,
|
|
997
1159
|
items: this.chooserItems(),
|
|
998
1160
|
anchor: this.#u,
|
|
999
1161
|
onOrder: (e) => this.changeColumns(e, e.filter((e) => !this.hiddenKeys.includes(e))),
|
|
1000
1162
|
onChecked: (e) => this.changeColumns(this.chooserItems().map((e) => e.id), e),
|
|
1163
|
+
onReset: () => this.resetColumns(),
|
|
1164
|
+
isDefault: this.columnsAreDefault,
|
|
1001
1165
|
onClose: () => this.closePanel(t),
|
|
1002
1166
|
onLeave: (e) => this.leavePanel(t, e)
|
|
1003
|
-
}) :
|
|
1167
|
+
}) : l;
|
|
1004
1168
|
}
|
|
1005
1169
|
if (t.kind === "sheet") {
|
|
1006
1170
|
let e = this.filterColumns;
|
|
1007
|
-
return
|
|
1171
|
+
return R({
|
|
1008
1172
|
columns: e,
|
|
1009
1173
|
draft: this.filterDraft,
|
|
1010
1174
|
onDraft: (e, t) => {
|
|
@@ -1019,7 +1183,7 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
1019
1183
|
});
|
|
1020
1184
|
}
|
|
1021
1185
|
let n = this.columns.find((e) => e.key === t.column);
|
|
1022
|
-
return n ?
|
|
1186
|
+
return n ? ue({
|
|
1023
1187
|
column: n,
|
|
1024
1188
|
anchor: this.#u,
|
|
1025
1189
|
draft: this.filterDraft[n.key],
|
|
@@ -1033,177 +1197,325 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
1033
1197
|
onClear: () => this.applyFilters([n.key], !0),
|
|
1034
1198
|
onClose: () => this.closePanel(t),
|
|
1035
1199
|
onLeave: (e) => this.leavePanel(t, e)
|
|
1036
|
-
}) :
|
|
1200
|
+
}) : l;
|
|
1037
1201
|
}
|
|
1038
|
-
fullTable(e, t, n, i) {
|
|
1039
|
-
let a = this.data, o = this.shown, s = !!a.selectable, c =
|
|
1202
|
+
fullTable(e, t, n, r, i) {
|
|
1203
|
+
let a = this.data, o = this.shown, s = !!a.selectable, c = this.activeSort, u = a.rowActions?.length ? a.rowActions : null, d = this.detailColumns.length > 0, f = r === this.#n ? "modal" : "tile", m = i ? this.groupsOf(this.sortedRows).slice(0, this.page * n).reduce((e, t) => e + t.rows.length, 0) : this.page * n, h = {
|
|
1040
1204
|
ids: e.map((e) => this.rowKey(e)),
|
|
1041
1205
|
columns: o,
|
|
1042
|
-
offset:
|
|
1043
|
-
copy:
|
|
1044
|
-
};
|
|
1045
|
-
return
|
|
1206
|
+
offset: m,
|
|
1207
|
+
copy: f
|
|
1208
|
+
}, g = o.length + +!!s + +!!d + +!!this.actionColumn, _ = (e, t, n) => e.map((e, r) => this.fullRow(e, t + r, h, f, n));
|
|
1209
|
+
return p`<table class="lintje-data-table__full">
|
|
1046
1210
|
<caption class="visually-hidden">${a.caption}</caption>
|
|
1047
1211
|
<thead>
|
|
1048
1212
|
<tr>
|
|
1049
|
-
${s ?
|
|
1213
|
+
${s ? p`<th
|
|
1050
1214
|
scope="col"
|
|
1051
1215
|
class="lintje-data-table__header-cell lintje-data-table__check-cell"
|
|
1052
1216
|
>
|
|
1053
1217
|
${this.headerCheck()}
|
|
1054
|
-
</th>` :
|
|
1055
|
-
${
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
>
|
|
1061
|
-
|
|
1062
|
-
<span class="lintje-data-table__sort-icon" aria-hidden="true"
|
|
1063
|
-
>${t ? u.direction === "asc" ? "▲" : "▼" : "▲▼"}</span
|
|
1064
|
-
>
|
|
1065
|
-
</button>`;
|
|
1066
|
-
return m`<th
|
|
1067
|
-
scope="col"
|
|
1068
|
-
class=${l({
|
|
1069
|
-
"lintje-data-table__header-cell": !0,
|
|
1070
|
-
"lintje-data-table__header-cell--align-right": n,
|
|
1071
|
-
"lintje-data-table__header-cell--sortable": e.sortable !== !1,
|
|
1072
|
-
"lintje-data-table__header-cell--filterable": !!e.filter,
|
|
1073
|
-
"is-active": t,
|
|
1074
|
-
"is-filtered": a
|
|
1075
|
-
})}
|
|
1076
|
-
aria-sort=${t ? u.direction === "asc" ? "ascending" : "descending" : "none"}
|
|
1077
|
-
>
|
|
1078
|
-
${e.filter ? m`<span class="lintje-data-table__header-inner"
|
|
1079
|
-
>${s}${R(e, this.filterValues[e.key], this.panel?.kind === "filter" && this.panel.column === e.key, (t) => this.panel?.kind === "filter" && this.panel.column === e.key ? this.closePanel() : this.openPanel({
|
|
1080
|
-
kind: "filter",
|
|
1081
|
-
column: e.key,
|
|
1082
|
-
edges: i
|
|
1083
|
-
}, t))}</span
|
|
1084
|
-
>` : s}
|
|
1085
|
-
</th>`;
|
|
1086
|
-
})}
|
|
1087
|
-
${h ? m`<th scope="col" class="lintje-data-table__header-cell lintje-data-table__action-cell">
|
|
1088
|
-
${f ? m`<span class="visually-hidden">Acties</span>` : r}
|
|
1089
|
-
${p ? W(this.panel?.kind === "columns", (e) => this.panel?.kind === "columns" ? this.closePanel() : this.openPanel({
|
|
1218
|
+
</th>` : l}
|
|
1219
|
+
${d ? p`<th scope="col" class="lintje-data-table__header-cell lintje-data-table__detail-cell">
|
|
1220
|
+
<span class="visually-hidden">Details</span>
|
|
1221
|
+
</th>` : l}
|
|
1222
|
+
${o.map((e) => this.headerCell(e, c, r))}
|
|
1223
|
+
${this.actionColumn ? p`<th scope="col" class="lintje-data-table__header-cell lintje-data-table__action-cell">
|
|
1224
|
+
${u ? p`<span class="visually-hidden">Acties</span>` : l}
|
|
1225
|
+
${a.columnChooser ? B(this.panel?.kind === "columns", (e) => this.panel?.kind === "columns" ? this.closePanel() : this.openPanel({
|
|
1090
1226
|
kind: "columns",
|
|
1091
|
-
edges:
|
|
1092
|
-
}, e)) :
|
|
1093
|
-
</th>` :
|
|
1227
|
+
edges: r
|
|
1228
|
+
}, e)) : l}
|
|
1229
|
+
</th>` : l}
|
|
1094
1230
|
</tr>
|
|
1095
1231
|
</thead>
|
|
1096
|
-
|
|
1232
|
+
${i ? (() => {
|
|
1233
|
+
let e = 0;
|
|
1234
|
+
return i.map((t) => {
|
|
1235
|
+
let n = !this.collapsedGroups.includes(t.key), r = e;
|
|
1236
|
+
return e += n ? t.rows.length : 0, p`<tbody class="lintje-data-table__group">
|
|
1237
|
+
${this.groupRow(t, n)}
|
|
1238
|
+
${n ? _(t.rows, r, !0) : l}
|
|
1239
|
+
${n ? this.subtotalRow(t, o) : l}
|
|
1240
|
+
</tbody>`;
|
|
1241
|
+
});
|
|
1242
|
+
})() : p`<tbody>
|
|
1243
|
+
${_(e, 0, !1)}
|
|
1244
|
+
<!-- A short last page keeps the height of a full one, so the page below doesn't jump. -->
|
|
1245
|
+
${t > 1 ? Array.from({ length: n - e.length }, () => p`<tr
|
|
1246
|
+
class="lintje-data-table__row lintje-data-table__row--filler"
|
|
1247
|
+
aria-hidden="true"
|
|
1248
|
+
>
|
|
1249
|
+
<td class="lintje-data-table__cell" colspan=${g}></td>
|
|
1250
|
+
</tr>`) : l}
|
|
1251
|
+
</tbody>`}
|
|
1252
|
+
${this.sizerRow(o)}
|
|
1253
|
+
${this.totalsRow(o, a.totals, a.totalsLabel ?? "Totaal")}
|
|
1254
|
+
</table>`;
|
|
1255
|
+
}
|
|
1256
|
+
sizerRow(e) {
|
|
1257
|
+
let t = this.data, n = this.widestRow(e);
|
|
1258
|
+
return p`<tbody class="lintje-data-table__sizer" aria-hidden="true">
|
|
1259
|
+
<tr class=${_({ "lintje-data-table__row--in-group": this.grouped })}>
|
|
1260
|
+
${t.selectable ? p`<td class="lintje-data-table__cell lintje-data-table__check-cell"></td>` : l}
|
|
1261
|
+
${this.detailColumns.length > 0 ? p`<td class="lintje-data-table__cell lintje-data-table__detail-cell"></td>` : l}
|
|
1097
1262
|
${e.map((e, t) => {
|
|
1098
|
-
let
|
|
1099
|
-
return
|
|
1100
|
-
class=${
|
|
1101
|
-
"lintje-data-
|
|
1102
|
-
"
|
|
1103
|
-
"
|
|
1104
|
-
"
|
|
1263
|
+
let r = n[e.key] ?? null;
|
|
1264
|
+
return p`<td
|
|
1265
|
+
class=${_({
|
|
1266
|
+
"lintje-data-table__cell": !0,
|
|
1267
|
+
"lintje-data-table__name": t === 0,
|
|
1268
|
+
"lintje-data-table__cell--align-right": this.alignsRight(e),
|
|
1269
|
+
"lintje-data-table__cell--truncate": e.truncate === !0
|
|
1105
1270
|
})}
|
|
1106
|
-
tabindex=${c ? 0 : r}
|
|
1107
|
-
aria-selected=${c ? i : r}
|
|
1108
|
-
@click=${c ? () => this.emit("lintje-row-click", this.rowDetail(e)) : r}
|
|
1109
|
-
@keydown=${c ? (t) => this.rowKeydown(t, e) : r}
|
|
1110
1271
|
>
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1272
|
+
<div class="lintje-data-table__sizer-box">
|
|
1273
|
+
${e.truncate ? this.truncatedCell(e, r) : this.cell(e, r)}
|
|
1274
|
+
</div>
|
|
1275
|
+
</td>`;
|
|
1276
|
+
})}
|
|
1277
|
+
${this.actionColumn ? p`<td class="lintje-data-table__cell lintje-data-table__action-cell"></td>` : l}
|
|
1278
|
+
</tr>
|
|
1279
|
+
</tbody>`;
|
|
1280
|
+
}
|
|
1281
|
+
widestRow(e) {
|
|
1282
|
+
let t = e.map((e) => e.key).join(" "), n = this.#h;
|
|
1283
|
+
if (n && n.data === this.data && n.key === t) return n.row;
|
|
1284
|
+
let r = {};
|
|
1285
|
+
for (let t of e) {
|
|
1286
|
+
let e = -1;
|
|
1287
|
+
for (let n of this.rows) {
|
|
1288
|
+
let i = n[t.key] ?? null, a = (q(t, i) ?? "").length;
|
|
1289
|
+
a > e && (e = a, r[t.key] = i);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
return this.#h = {
|
|
1293
|
+
data: this.data,
|
|
1294
|
+
key: t,
|
|
1295
|
+
row: r
|
|
1296
|
+
}, r;
|
|
1297
|
+
}
|
|
1298
|
+
headerCell(e, t, n) {
|
|
1299
|
+
let r = t.key === e.key, i = this.alignsRight(e), a = !!e.filter && M(this.filterValues[e.key]), o = e.sortable === !1 ? e.header : p`<button
|
|
1300
|
+
type="button"
|
|
1301
|
+
class="lintje-data-table__sort-button"
|
|
1302
|
+
@click=${() => this.toggleSort(e)}
|
|
1303
|
+
>
|
|
1304
|
+
<span class="lintje-data-table__sort-label">${e.header}</span>
|
|
1305
|
+
${J(r ? t.direction : null)}
|
|
1306
|
+
</button>`;
|
|
1307
|
+
return p`<th
|
|
1308
|
+
scope="col"
|
|
1309
|
+
class=${_({
|
|
1310
|
+
"lintje-data-table__header-cell": !0,
|
|
1311
|
+
"lintje-data-table__header-cell--align-right": i,
|
|
1312
|
+
"lintje-data-table__header-cell--sortable": e.sortable !== !1,
|
|
1313
|
+
"lintje-data-table__header-cell--filterable": !!e.filter,
|
|
1314
|
+
"is-active": r,
|
|
1315
|
+
"is-filtered": a
|
|
1316
|
+
})}
|
|
1317
|
+
aria-sort=${r ? t.direction === "asc" ? "ascending" : "descending" : "none"}
|
|
1318
|
+
>
|
|
1319
|
+
${e.filter ? p`<span class="lintje-data-table__header-inner"
|
|
1320
|
+
>${o}${le(e, this.filterValues[e.key], this.panel?.kind === "filter" && this.panel.column === e.key, (t) => this.panel?.kind === "filter" && this.panel.column === e.key ? this.closePanel() : this.openPanel({
|
|
1321
|
+
kind: "filter",
|
|
1322
|
+
column: e.key,
|
|
1323
|
+
edges: n
|
|
1324
|
+
}, t))}</span
|
|
1325
|
+
>` : o}
|
|
1326
|
+
</th>`;
|
|
1327
|
+
}
|
|
1328
|
+
get actionColumn() {
|
|
1329
|
+
return !!this.data?.rowActions?.length || !!this.data?.columnChooser;
|
|
1330
|
+
}
|
|
1331
|
+
alignsRight(e) {
|
|
1332
|
+
return (e.align ?? (W(e, this.rows) ? "right" : "left")) === "right";
|
|
1333
|
+
}
|
|
1334
|
+
fullRow(e, t, n, r, i) {
|
|
1335
|
+
let a = this.data, o = this.shown, s = !!a.selectable, c = !!a.clickable && !s, u = a.rowActions?.length ? a.rowActions : null, d = this.detailColumns, f = this.rowKey(e), m = f === a.selectedId, h = this.checkedIds.includes(f), g = d.length > 0 && this.openRows.includes(f), v = `lintje-data-table-${r}-row-${f}`, y = o.length + +!!s + +(d.length > 0) + +!!this.actionColumn;
|
|
1336
|
+
return p`<tr
|
|
1337
|
+
class=${_({
|
|
1338
|
+
"lintje-data-table__row": !0,
|
|
1339
|
+
"lintje-data-table__row--in-group": i,
|
|
1340
|
+
"is-clickable": c,
|
|
1341
|
+
"is-selected": m,
|
|
1342
|
+
"is-checked": h,
|
|
1343
|
+
"is-open": g
|
|
1344
|
+
})}
|
|
1345
|
+
tabindex=${c ? 0 : l}
|
|
1346
|
+
aria-selected=${c ? m : l}
|
|
1347
|
+
@click=${c ? () => this.emit("lintje-row-click", this.rowDetail(e)) : l}
|
|
1348
|
+
@keydown=${c ? (t) => this.rowKeydown(t, e) : l}
|
|
1349
|
+
>
|
|
1350
|
+
${s ? p`<td class="lintje-data-table__cell lintje-data-table__check-cell">
|
|
1351
|
+
${this.rowCheck(e, f, h)}
|
|
1352
|
+
</td>` : l}
|
|
1353
|
+
${d.length > 0 ? p`<td
|
|
1354
|
+
class="lintje-data-table__cell lintje-data-table__detail-cell"
|
|
1355
|
+
@click=${(e) => e.stopPropagation()}
|
|
1356
|
+
@keydown=${(e) => e.stopPropagation()}
|
|
1357
|
+
>
|
|
1358
|
+
${this.rowToggle(e, g, v, "lintje-data-table__detail-toggle")}
|
|
1359
|
+
</td>` : l}
|
|
1360
|
+
${o.map((r, i) => {
|
|
1361
|
+
let a = r.truncate === !0, o = a ? this.truncatedCell(r, e[r.key]) : this.cell(r, e[r.key]), s = this.alignsRight(r);
|
|
1362
|
+
return r.editor ? this.editableCell(e, t, r, i === 0, s, o, n) : i === 0 ? p`<th
|
|
1363
|
+
scope="row"
|
|
1364
|
+
class=${_({
|
|
1365
|
+
"lintje-data-table__cell": !0,
|
|
1366
|
+
"lintje-data-table__name": !0,
|
|
1367
|
+
"lintje-data-table__cell--truncate": a
|
|
1368
|
+
})}
|
|
1369
|
+
>
|
|
1370
|
+
${this.opener(e, o)}
|
|
1371
|
+
</th>` : p`<td
|
|
1372
|
+
class=${_({
|
|
1373
|
+
"lintje-data-table__cell": !0,
|
|
1374
|
+
"lintje-data-table__cell--align-right": s,
|
|
1375
|
+
"lintje-data-table__cell--truncate": a
|
|
1134
1376
|
})}
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
@keydown=${(e) => e.stopPropagation()}
|
|
1139
|
-
>
|
|
1140
|
-
${j(f, this.rowDetail(e).label, (e) => this.emit("lintje-row-action", {
|
|
1141
|
-
id: n,
|
|
1142
|
-
action: e
|
|
1143
|
-
}))}
|
|
1144
|
-
</td>` : p ? m`<td class="lintje-data-table__cell lintje-data-table__action-cell"></td>` : r}
|
|
1145
|
-
</tr>`;
|
|
1377
|
+
>
|
|
1378
|
+
${o}
|
|
1379
|
+
</td>`;
|
|
1146
1380
|
})}
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1381
|
+
${u ? p`<td
|
|
1382
|
+
class="lintje-data-table__cell lintje-data-table__action-cell"
|
|
1383
|
+
@click=${(e) => e.stopPropagation()}
|
|
1384
|
+
@keydown=${(e) => e.stopPropagation()}
|
|
1151
1385
|
>
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
</
|
|
1157
|
-
</
|
|
1158
|
-
|
|
1386
|
+
${A(u, this.rowDetail(e).label, (e) => this.emit("lintje-row-action", {
|
|
1387
|
+
id: f,
|
|
1388
|
+
action: e
|
|
1389
|
+
}))}
|
|
1390
|
+
</td>` : this.actionColumn ? p`<td class="lintje-data-table__cell lintje-data-table__action-cell"></td>` : l}
|
|
1391
|
+
</tr>
|
|
1392
|
+
${d.length > 0 ? p`<tr class="lintje-data-table__detail" id=${v} ?hidden=${!g}>
|
|
1393
|
+
<td class="lintje-data-table__detail-body" colspan=${y}>
|
|
1394
|
+
${g ? this.detailList(e, d, "grid") : l}
|
|
1395
|
+
</td>
|
|
1396
|
+
</tr>` : l}`;
|
|
1159
1397
|
}
|
|
1160
|
-
|
|
1161
|
-
let
|
|
1398
|
+
rowToggle(e, t, n, r) {
|
|
1399
|
+
let { id: i, label: a } = this.rowDetail(e);
|
|
1400
|
+
return p`<button
|
|
1401
|
+
type="button"
|
|
1402
|
+
class=${r}
|
|
1403
|
+
aria-label=${`Alle gegevens van ${a}`}
|
|
1404
|
+
aria-expanded=${t ? "true" : "false"}
|
|
1405
|
+
aria-controls=${n}
|
|
1406
|
+
@click=${() => this.toggleRow(i)}
|
|
1407
|
+
>
|
|
1408
|
+
${v("functioneel-delta-omlaag", {
|
|
1409
|
+
size: 16,
|
|
1410
|
+
rotate: t ? 180 : void 0
|
|
1411
|
+
})}
|
|
1412
|
+
</button>`;
|
|
1413
|
+
}
|
|
1414
|
+
detailList(e, t, n) {
|
|
1415
|
+
let r = Math.ceil(t.length / 4);
|
|
1416
|
+
return p`<lintje-description-list
|
|
1417
|
+
layout=${n}
|
|
1418
|
+
.columns=${Math.ceil(t.length / r)}
|
|
1419
|
+
.items=${t.map((t) => ({
|
|
1420
|
+
label: t.header,
|
|
1421
|
+
value: q(t, e[t.key])
|
|
1422
|
+
}))}
|
|
1423
|
+
></lintje-description-list>`;
|
|
1424
|
+
}
|
|
1425
|
+
groupRow(e, t) {
|
|
1426
|
+
let n = this.data, r = this.groupColumn, i = this.shown, a = +!!n.selectable + +(this.detailColumns.length > 0), o = n.groupTotals?.[e.key], s = e.rows.length, c = p`<button
|
|
1427
|
+
type="button"
|
|
1428
|
+
class="lintje-data-table__group-toggle"
|
|
1429
|
+
aria-expanded=${t ? "true" : "false"}
|
|
1430
|
+
@click=${() => this.toggleGroup(e.key)}
|
|
1431
|
+
>
|
|
1432
|
+
${v("functioneel-delta-omlaag", {
|
|
1433
|
+
size: 16,
|
|
1434
|
+
rotate: t ? void 0 : 270
|
|
1435
|
+
})}
|
|
1436
|
+
<span class="lintje-data-table__group-name">${this.cell(r, e.value)}</span>
|
|
1437
|
+
<span class="lintje-data-table__group-count">${s} ${s === 1 ? "rij" : "rijen"}</span>
|
|
1438
|
+
</button>`;
|
|
1439
|
+
return p`<tr class="lintje-data-table__group-row">
|
|
1440
|
+
${a > 0 ? p`<td class="lintje-data-table__cell" colspan=${a}></td>` : l}
|
|
1441
|
+
<th scope="rowgroup" class="lintje-data-table__cell lintje-data-table__group-head">${c}</th>
|
|
1442
|
+
${i.slice(1).map((e) => this.totalCell(e, t ? void 0 : o?.[e.key]))}
|
|
1443
|
+
${this.actionColumn ? p`<td class="lintje-data-table__cell"></td>` : l}
|
|
1444
|
+
</tr>`;
|
|
1445
|
+
}
|
|
1446
|
+
subtotalRow(e, t) {
|
|
1447
|
+
let n = this.data?.groupTotals?.[e.key];
|
|
1448
|
+
if (!n) return l;
|
|
1449
|
+
let r = this.groupColumn, i = G(r, e.value) ?? "Zonder waarde";
|
|
1450
|
+
return this.sumRow("lintje-data-table__subtotal", `Subtotaal ${i}`, t, n);
|
|
1451
|
+
}
|
|
1452
|
+
totalsRow(e, t, n) {
|
|
1453
|
+
return t ? p`<tfoot>${this.sumRow("lintje-data-table__total", n, e, t)}</tfoot>` : l;
|
|
1454
|
+
}
|
|
1455
|
+
sumRow(e, t, n, r) {
|
|
1456
|
+
let i = +!!this.data.selectable + +(this.detailColumns.length > 0);
|
|
1457
|
+
return p`<tr class=${e}>
|
|
1458
|
+
${i > 0 ? p`<td class="lintje-data-table__cell" colspan=${i}></td>` : l}
|
|
1459
|
+
<th scope="row" class="lintje-data-table__cell lintje-data-table__sum-label">${t}</th>
|
|
1460
|
+
${n.slice(1).map((e) => this.totalCell(e, r[e.key]))}
|
|
1461
|
+
${this.actionColumn ? p`<td class="lintje-data-table__cell"></td>` : l}
|
|
1462
|
+
</tr>`;
|
|
1463
|
+
}
|
|
1464
|
+
totalCell(e, t) {
|
|
1465
|
+
let n = t === void 0;
|
|
1466
|
+
return p`<td
|
|
1467
|
+
class=${_({
|
|
1468
|
+
"lintje-data-table__cell": !0,
|
|
1469
|
+
"lintje-data-table__cell--align-right": this.alignsRight(e)
|
|
1470
|
+
})}
|
|
1471
|
+
>
|
|
1472
|
+
${n ? l : this.totalContent(e, t)}
|
|
1473
|
+
</td>`;
|
|
1474
|
+
}
|
|
1475
|
+
editableCell(e, t, n, r, i, a, o) {
|
|
1476
|
+
let s = this.#s, c = {
|
|
1162
1477
|
id: this.rowKey(e),
|
|
1163
1478
|
column: n.key
|
|
1164
|
-
},
|
|
1479
|
+
}, u = e[n.key] ?? null, d = s.mode(c, u).kind, f = _({
|
|
1165
1480
|
"lintje-data-table__cell": !0,
|
|
1166
|
-
"lintje-data-table__name":
|
|
1167
|
-
"lintje-data-table__cell--align-right":
|
|
1481
|
+
"lintje-data-table__name": r,
|
|
1482
|
+
"lintje-data-table__cell--align-right": i,
|
|
1168
1483
|
"lintje-data-table__cell--truncate": n.truncate === !0,
|
|
1169
1484
|
"focus-inset": !0,
|
|
1170
|
-
...
|
|
1171
|
-
}),
|
|
1172
|
-
|
|
1173
|
-
},
|
|
1174
|
-
|
|
1175
|
-
}, v = (e) => e.stopPropagation(), y =
|
|
1176
|
-
return
|
|
1485
|
+
...s.cellClasses(c, u)
|
|
1486
|
+
}), m = s.content(c, n, u, a, `${n.header} van rij ${o.offset + t + 1}`, o), h = (e) => {
|
|
1487
|
+
s.editable(c, n) && s.cellKeydown(c, e);
|
|
1488
|
+
}, g = (e) => {
|
|
1489
|
+
d === "rest" && s.editable(c, n) && s.open(c, e.currentTarget);
|
|
1490
|
+
}, v = (e) => e.stopPropagation(), y = d === "editor" ? -1 : 0, b = O(c);
|
|
1491
|
+
return r ? p`<th
|
|
1177
1492
|
scope="row"
|
|
1178
|
-
class=${
|
|
1493
|
+
class=${f}
|
|
1179
1494
|
tabindex=${y}
|
|
1180
1495
|
data-cell=${b}
|
|
1181
|
-
aria-describedby=${
|
|
1182
|
-
@keydown=${
|
|
1183
|
-
@dblclick=${
|
|
1496
|
+
aria-describedby=${d === "rest" ? s.hintId : l}
|
|
1497
|
+
@keydown=${h}
|
|
1498
|
+
@dblclick=${g}
|
|
1184
1499
|
@click=${v}
|
|
1185
1500
|
>
|
|
1186
|
-
${
|
|
1187
|
-
</th>` :
|
|
1188
|
-
class=${
|
|
1501
|
+
${m}
|
|
1502
|
+
</th>` : p`<td
|
|
1503
|
+
class=${f}
|
|
1189
1504
|
tabindex=${y}
|
|
1190
1505
|
data-cell=${b}
|
|
1191
|
-
aria-describedby=${
|
|
1192
|
-
@keydown=${
|
|
1193
|
-
@dblclick=${
|
|
1506
|
+
aria-describedby=${d === "rest" ? s.hintId : l}
|
|
1507
|
+
@keydown=${h}
|
|
1508
|
+
@dblclick=${g}
|
|
1194
1509
|
@click=${v}
|
|
1195
1510
|
>
|
|
1196
|
-
${
|
|
1511
|
+
${m}
|
|
1197
1512
|
</td>`;
|
|
1198
1513
|
}
|
|
1199
|
-
mobileTable(e, t, n) {
|
|
1200
|
-
let i = this.data, a = this.shown, o = !!i.selectable, s =
|
|
1201
|
-
if (!
|
|
1202
|
-
let h = u.
|
|
1203
|
-
|
|
1204
|
-
format: "change"
|
|
1205
|
-
} : u, g = i.rowActions?.length ? i.rowActions : null, _ = a.filter((e) => e !== c && e !== u), v = !!g || _.length > 0, y = v ? 3 : 2, b = d.key === u.key, x = new Set(this.mobileOpen);
|
|
1206
|
-
return m`<table class="lintje-data-table__mobile">
|
|
1514
|
+
mobileTable(e, t, n, r) {
|
|
1515
|
+
let i = this.data, a = this.shown, o = !!i.selectable, s = a[0], c = this.mobileMeasure, u = this.activeSort;
|
|
1516
|
+
if (!s || !c) return p`<table class="lintje-data-table__mobile"></table>`;
|
|
1517
|
+
let d = i.rowActions?.length ? i.rowActions : null, f = [...a.filter((e) => e !== s && e !== c), ...this.detailColumns], m = !!d || f.length > 0, h = m ? 3 : 2, g = u.key === c.key;
|
|
1518
|
+
return p`<table class="lintje-data-table__mobile">
|
|
1207
1519
|
<caption class="visually-hidden">${i.caption}</caption>
|
|
1208
1520
|
<thead>
|
|
1209
1521
|
<tr>
|
|
@@ -1211,157 +1523,184 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
1211
1523
|
scope="col"
|
|
1212
1524
|
class="lintje-data-table__header-cell lintje-data-table__header-cell--mobile"
|
|
1213
1525
|
>
|
|
1214
|
-
${o ?
|
|
1215
|
-
>${this.headerCheck()}${
|
|
1216
|
-
>` :
|
|
1526
|
+
${o ? p`<span class="lintje-data-table__mobile-check"
|
|
1527
|
+
>${this.headerCheck()}${s.header}</span
|
|
1528
|
+
>` : s.header}
|
|
1217
1529
|
</th>
|
|
1218
1530
|
<th
|
|
1219
1531
|
scope="col"
|
|
1220
|
-
class=${
|
|
1532
|
+
class=${_({
|
|
1221
1533
|
"lintje-data-table__header-cell": !0,
|
|
1222
1534
|
"lintje-data-table__header-cell--mobile": !0,
|
|
1223
1535
|
"lintje-data-table__header-cell--align-right": !0,
|
|
1224
|
-
"lintje-data-table__header-cell--sortable":
|
|
1225
|
-
"is-active":
|
|
1536
|
+
"lintje-data-table__header-cell--sortable": c.sortable !== !1,
|
|
1537
|
+
"is-active": g
|
|
1226
1538
|
})}
|
|
1227
|
-
aria-sort=${
|
|
1539
|
+
aria-sort=${c.sortable === !1 ? l : g ? u.direction === "asc" ? "ascending" : "descending" : "none"}
|
|
1228
1540
|
>
|
|
1229
|
-
${
|
|
1541
|
+
${c.sortable === !1 ? c.header : p`<button
|
|
1230
1542
|
type="button"
|
|
1231
1543
|
class="lintje-data-table__sort-button"
|
|
1232
|
-
@click=${() => this.toggleSort(
|
|
1544
|
+
@click=${() => this.toggleSort(c)}
|
|
1233
1545
|
>
|
|
1234
|
-
<span class="lintje-data-table__sort-label">${
|
|
1235
|
-
|
|
1236
|
-
>${b ? d.direction === "asc" ? "▲" : "▼" : "▲▼"}</span
|
|
1237
|
-
>
|
|
1546
|
+
<span class="lintje-data-table__sort-label">${c.header}</span>
|
|
1547
|
+
${J(g ? u.direction : null)}
|
|
1238
1548
|
</button>`}
|
|
1239
1549
|
</th>
|
|
1240
|
-
${
|
|
1550
|
+
${m ? p`<th
|
|
1241
1551
|
scope="col"
|
|
1242
1552
|
class="lintje-data-table__header-cell lintje-data-table__header-cell--mobile lintje-data-table__mobile-cell--actions"
|
|
1243
1553
|
>
|
|
1244
|
-
<span class="visually-hidden">${
|
|
1245
|
-
</th>` :
|
|
1554
|
+
<span class="visually-hidden">${d ? "Acties" : "Meer gegevens"}</span>
|
|
1555
|
+
</th>` : l}
|
|
1246
1556
|
</tr>
|
|
1247
1557
|
</thead>
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1558
|
+
${r ? r.map((e) => {
|
|
1559
|
+
let t = !this.collapsedGroups.includes(e.key);
|
|
1560
|
+
return p`<tbody class="lintje-data-table__group">
|
|
1561
|
+
${this.mobileGroupRow(e, t, c, h)}
|
|
1562
|
+
${t ? e.rows.map((e) => this.mobileRow(e, n, f, m, h, c)) : l}
|
|
1563
|
+
${t && i.groupTotals?.[e.key] ? this.mobileSumRow("lintje-data-table__subtotal", `Subtotaal ${G(this.groupColumn, e.value) ?? "Zonder waarde"}`, i.groupTotals[e.key]?.[c.key], c, h) : l}
|
|
1564
|
+
</tbody>`;
|
|
1565
|
+
}) : p`<tbody>
|
|
1566
|
+
${e.map((e) => this.mobileRow(e, n, f, m, h, c))}
|
|
1567
|
+
<!-- Empty rows with the same two lines per cell keep a short last page as tall as a full one. -->
|
|
1568
|
+
${t > 1 ? Array.from({ length: H - e.length }, () => p`<tr
|
|
1569
|
+
class="lintje-data-table__mobile-row lintje-data-table__mobile-row--filler"
|
|
1570
|
+
aria-hidden="true"
|
|
1571
|
+
>
|
|
1572
|
+
<td class="lintje-data-table__mobile-cell">
|
|
1573
|
+
<span class="lintje-data-table__mobile-name"> </span>
|
|
1574
|
+
${this.hasSubline ? p`<span class="lintje-data-table__mobile-sub"> </span>` : l}
|
|
1575
|
+
</td>
|
|
1576
|
+
<td class="lintje-data-table__mobile-cell" colspan=${h - 1}>
|
|
1577
|
+
<span class="lintje-data-table__mobile-measure"> </span>
|
|
1578
|
+
${c.threshold ? p`<span class="lintje-data-table__mobile-status"> </span>` : l}
|
|
1579
|
+
</td>
|
|
1580
|
+
</tr>`) : l}
|
|
1581
|
+
</tbody>`}
|
|
1582
|
+
${i.totals ? p`<tfoot>
|
|
1583
|
+
${this.mobileSumRow("lintje-data-table__total", i.totalsLabel ?? "Totaal", i.totals[c.key], c, h)}
|
|
1584
|
+
</tfoot>` : l}
|
|
1585
|
+
</table>`;
|
|
1586
|
+
}
|
|
1587
|
+
mobileRow(e, t, n, r, i, a) {
|
|
1588
|
+
let o = this.data, s = this.shown[0], c = !!o.selectable, u = !!o.clickable && !c, d = o.rowActions?.length ? o.rowActions : null, f = a.format === "change-compact" ? {
|
|
1589
|
+
...a,
|
|
1590
|
+
format: "change"
|
|
1591
|
+
} : a, m = this.rowKey(e), h = this.rowDetail(e), g = this.mobileStatus(a, e), v = n.length > 0 && this.openRows.includes(m), y = `lintje-data-table-${t}-detail-${m}`, b = p`<span class="lintje-data-table__mobile-name"
|
|
1592
|
+
>${this.opener(e, this.cell(s, e[s.key]))}</span
|
|
1593
|
+
>${this.subline(e)}`, x = m === o.selectedId, S = this.checkedIds.includes(m);
|
|
1594
|
+
return p`<tr
|
|
1595
|
+
class=${_({
|
|
1596
|
+
"lintje-data-table__mobile-row": !0,
|
|
1597
|
+
"is-clickable": u,
|
|
1598
|
+
"is-selected": x,
|
|
1599
|
+
"is-checked": S,
|
|
1600
|
+
"is-open": v
|
|
1601
|
+
})}
|
|
1602
|
+
tabindex=${u ? 0 : l}
|
|
1603
|
+
aria-selected=${u ? x : l}
|
|
1604
|
+
@click=${u ? () => this.emit("lintje-row-click", h) : l}
|
|
1605
|
+
@keydown=${u ? (t) => this.rowKeydown(t, e) : l}
|
|
1606
|
+
>
|
|
1607
|
+
<th scope="row" class="lintje-data-table__mobile-cell">
|
|
1608
|
+
${c ? p`<span class="lintje-data-table__mobile-check">
|
|
1609
|
+
${this.rowCheck(e, m, S)}
|
|
1610
|
+
<span class="lintje-data-table__mobile-identity">${b}</span>
|
|
1611
|
+
</span>` : b}
|
|
1612
|
+
</th>
|
|
1613
|
+
<td class="lintje-data-table__mobile-cell lintje-data-table__mobile-cell--align-right">
|
|
1614
|
+
<span class="lintje-data-table__mobile-measure"
|
|
1615
|
+
>${this.cell(f, e[a.key])}</span
|
|
1616
|
+
>
|
|
1617
|
+
${g ? p`<span
|
|
1618
|
+
class="lintje-data-table__mobile-status lintje-data-table__mobile-status--${g.tone}"
|
|
1619
|
+
>${g.label}</span
|
|
1620
|
+
>` : l}
|
|
1621
|
+
</td>
|
|
1622
|
+
${r ? p`<td
|
|
1623
|
+
class="lintje-data-table__mobile-cell lintje-data-table__mobile-cell--actions"
|
|
1624
|
+
@click=${(e) => e.stopPropagation()}
|
|
1625
|
+
@keydown=${(e) => e.stopPropagation()}
|
|
1274
1626
|
>
|
|
1275
|
-
<span class="lintje-data-table__mobile-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1627
|
+
<span class="lintje-data-table__mobile-actions">
|
|
1628
|
+
${n.length > 0 ? this.rowToggle(e, v, y, "lintje-data-table__mobile-toggle") : l}
|
|
1629
|
+
${d ? A(d, h.label, (e) => this.emit("lintje-row-action", {
|
|
1630
|
+
id: m,
|
|
1631
|
+
action: e
|
|
1632
|
+
})) : l}
|
|
1633
|
+
</span>
|
|
1634
|
+
</td>` : l}
|
|
1635
|
+
</tr>
|
|
1636
|
+
${n.length > 0 ? p`<tr class="lintje-data-table__mobile-detail" id=${y} ?hidden=${!v}>
|
|
1637
|
+
<td class="lintje-data-table__mobile-cell" colspan=${i}>
|
|
1638
|
+
${v ? this.detailList(e, n, "row") : l}
|
|
1282
1639
|
</td>
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
size: 16,
|
|
1299
|
-
rotate: b ? 180 : void 0
|
|
1300
|
-
})}
|
|
1301
|
-
</button>` : r}
|
|
1302
|
-
${g ? j(g, a.label, (e) => this.emit("lintje-row-action", {
|
|
1303
|
-
id: t,
|
|
1304
|
-
action: e
|
|
1305
|
-
})) : r}
|
|
1306
|
-
</span>
|
|
1307
|
-
</td>` : r}
|
|
1308
|
-
</tr>
|
|
1309
|
-
${_.length > 0 ? m`<tr
|
|
1310
|
-
class="lintje-data-table__mobile-detail"
|
|
1311
|
-
id=${S}
|
|
1312
|
-
?hidden=${!b}
|
|
1313
|
-
>
|
|
1314
|
-
<td class="lintje-data-table__mobile-cell" colspan=${y}>
|
|
1315
|
-
${b ? m`<lintje-description-list
|
|
1316
|
-
.items=${_.map((t) => ({
|
|
1317
|
-
label: t.header,
|
|
1318
|
-
value: X(t, e[t.key])
|
|
1319
|
-
}))}
|
|
1320
|
-
></lintje-description-list>` : r}
|
|
1321
|
-
</td>
|
|
1322
|
-
</tr>` : r}`;
|
|
1640
|
+
</tr>` : l}`;
|
|
1641
|
+
}
|
|
1642
|
+
mobileGroupRow(e, t, n, r) {
|
|
1643
|
+
let i = this.groupColumn, a = this.data?.groupTotals?.[e.key]?.[n.key], o = e.rows.length;
|
|
1644
|
+
return p`<tr class="lintje-data-table__group-row">
|
|
1645
|
+
<th scope="rowgroup" class="lintje-data-table__mobile-cell lintje-data-table__group-head">
|
|
1646
|
+
<button
|
|
1647
|
+
type="button"
|
|
1648
|
+
class="lintje-data-table__group-toggle"
|
|
1649
|
+
aria-expanded=${t ? "true" : "false"}
|
|
1650
|
+
@click=${() => this.toggleGroup(e.key)}
|
|
1651
|
+
>
|
|
1652
|
+
${v("functioneel-delta-omlaag", {
|
|
1653
|
+
size: 16,
|
|
1654
|
+
rotate: t ? void 0 : 270
|
|
1323
1655
|
})}
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1656
|
+
<span class="lintje-data-table__group-name">${this.cell(i, e.value)}</span>
|
|
1657
|
+
<span class="lintje-data-table__group-count">${o} ${o === 1 ? "rij" : "rijen"}</span>
|
|
1658
|
+
</button>
|
|
1659
|
+
</th>
|
|
1660
|
+
<td class="lintje-data-table__mobile-cell lintje-data-table__mobile-cell--align-right">
|
|
1661
|
+
${!t && a !== void 0 ? p`<span class="lintje-data-table__mobile-measure">${this.totalContent(n, a)}</span>` : l}
|
|
1662
|
+
</td>
|
|
1663
|
+
${r > 2 ? p`<td class="lintje-data-table__mobile-cell"></td>` : l}
|
|
1664
|
+
</tr>`;
|
|
1665
|
+
}
|
|
1666
|
+
mobileSumRow(e, t, n, r, i) {
|
|
1667
|
+
return p`<tr class=${e}>
|
|
1668
|
+
<th scope="row" class="lintje-data-table__mobile-cell lintje-data-table__sum-label">${t}</th>
|
|
1669
|
+
<td class="lintje-data-table__mobile-cell lintje-data-table__mobile-cell--align-right">
|
|
1670
|
+
${n === void 0 ? l : p`<span class="lintje-data-table__mobile-measure">${this.totalContent(r, n)}</span>`}
|
|
1671
|
+
</td>
|
|
1672
|
+
${i > 2 ? p`<td class="lintje-data-table__mobile-cell"></td>` : l}
|
|
1673
|
+
</tr>`;
|
|
1674
|
+
}
|
|
1675
|
+
totalContent(e, t) {
|
|
1676
|
+
let { value: n, how: r } = X(t), i = {
|
|
1677
|
+
...e,
|
|
1678
|
+
threshold: void 0
|
|
1679
|
+
};
|
|
1680
|
+
return p`${r ? p`<span class="lintje-data-table__how">${r} </span>` : l}${this.cell(i, n)}`;
|
|
1343
1681
|
}
|
|
1344
1682
|
rowKeydown(e, t) {
|
|
1345
1683
|
e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.emit("lintje-row-click", this.rowDetail(t)));
|
|
1346
1684
|
}
|
|
1347
|
-
pager(e, t, n, r, i, a) {
|
|
1348
|
-
let
|
|
1349
|
-
return
|
|
1685
|
+
pager(e, t, n, r, i, a, o) {
|
|
1686
|
+
let s = this.data?.caption, c = this.filteredCount ? this.data?.totalRows : void 0;
|
|
1687
|
+
return p`<lintje-pagination
|
|
1350
1688
|
class="lintje-data-table__pagination lintje-data-table__pagination--${e}"
|
|
1351
|
-
label=${
|
|
1689
|
+
label=${s ? `Paginering ${s}` : "Paginering"}
|
|
1352
1690
|
.page=${t + 1}
|
|
1353
1691
|
.pageCount=${n}
|
|
1354
1692
|
.pageSize=${r}
|
|
1355
1693
|
.total=${i}
|
|
1356
|
-
|
|
1357
|
-
unit
|
|
1694
|
+
.filteredFrom=${this.grouped ? void 0 : c}
|
|
1695
|
+
unit=${a.many}
|
|
1696
|
+
unit-one=${a.one}
|
|
1358
1697
|
@lintje-page-change=${(e) => {
|
|
1359
|
-
e.stopPropagation(),
|
|
1698
|
+
e.stopPropagation(), o(e.detail.page - 1), this.announce(`Pagina ${e.detail.page} van ${n}`);
|
|
1360
1699
|
}}
|
|
1361
1700
|
></lintje-pagination>`;
|
|
1362
1701
|
}
|
|
1363
1702
|
opener(e, t) {
|
|
1364
|
-
return this.data?.openable ?
|
|
1703
|
+
return this.data?.openable ? p`<button
|
|
1365
1704
|
type="button"
|
|
1366
1705
|
class="lintje-data-table__open"
|
|
1367
1706
|
@click=${(t) => {
|
|
@@ -1372,37 +1711,46 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
1372
1711
|
</button>` : t;
|
|
1373
1712
|
}
|
|
1374
1713
|
cell(e, t) {
|
|
1375
|
-
if (t === 0 && e.zeroText != null) return
|
|
1714
|
+
if (t === 0 && e.zeroText != null) return p`<span class="lintje-data-table__muted">${e.zeroText}</span>`;
|
|
1715
|
+
if (e.format === "label" && t != null) {
|
|
1716
|
+
let n = e.labels?.[String(t)];
|
|
1717
|
+
return n ? h({
|
|
1718
|
+
value: n.label,
|
|
1719
|
+
tone: n.tone,
|
|
1720
|
+
icon: n.icon,
|
|
1721
|
+
className: "lintje-data-table__label"
|
|
1722
|
+
}) : String(t);
|
|
1723
|
+
}
|
|
1376
1724
|
if (e.format === "status" && t != null) {
|
|
1377
|
-
let n =
|
|
1378
|
-
if (n) return
|
|
1725
|
+
let n = he(e, String(t));
|
|
1726
|
+
if (n) return p`<lintje-status-dot
|
|
1379
1727
|
tone=${n}
|
|
1380
|
-
label=${e.status?.labels?.[String(t)] ??
|
|
1728
|
+
label=${e.status?.labels?.[String(t)] ?? l}
|
|
1381
1729
|
></lintje-status-dot>`;
|
|
1382
1730
|
}
|
|
1383
|
-
let n =
|
|
1731
|
+
let n = G(e, t);
|
|
1384
1732
|
if (n == null) return Z;
|
|
1385
1733
|
if ((e.format === "change" || e.format === "change-compact") && typeof t == "number") {
|
|
1386
1734
|
let r = t === 0 ? "flat" : t > 0 ? "up" : "down";
|
|
1387
|
-
return e.format === "change-compact" ?
|
|
1735
|
+
return e.format === "change-compact" ? p`<span
|
|
1388
1736
|
class="lintje-data-table__change lintje-data-table__change--${r}"
|
|
1389
1737
|
aria-hidden="true"
|
|
1390
1738
|
>${t > 0 ? "▲" : t < 0 ? "▼" : "●"}</span
|
|
1391
|
-
><span class="visually-hidden">${n}</span>` :
|
|
1739
|
+
><span class="visually-hidden">${n}</span>` : p`<span class="lintje-data-table__change lintje-data-table__change--${r}">${n}</span>`;
|
|
1392
1740
|
}
|
|
1393
|
-
let
|
|
1394
|
-
if (!
|
|
1395
|
-
let
|
|
1741
|
+
let r = K(e, t);
|
|
1742
|
+
if (!r) return n;
|
|
1743
|
+
let i = r.tone === "good" ? l : v(r.tone === "caution" ? "functioneel-waarschuwing" : "functioneel-foutmelding", {
|
|
1396
1744
|
size: 14,
|
|
1397
1745
|
className: "lintje-threshold-cell__icon"
|
|
1398
1746
|
});
|
|
1399
|
-
return
|
|
1400
|
-
>${
|
|
1747
|
+
return p`<span class="lintje-threshold-cell lintje-threshold-cell--${r.tone}"
|
|
1748
|
+
>${i}${n}<span class="visually-hidden"> · ${r.label}</span></span
|
|
1401
1749
|
>`;
|
|
1402
1750
|
}
|
|
1403
1751
|
truncatedCell(e, t) {
|
|
1404
|
-
let n =
|
|
1405
|
-
return n == null ? Z :
|
|
1752
|
+
let n = q(e, t);
|
|
1753
|
+
return n == null ? Z : p`<span class="lintje-data-table__cell-text" aria-hidden="true" title=${n}
|
|
1406
1754
|
>${this.cell(e, t)}</span
|
|
1407
1755
|
><span class="visually-hidden">${n}</span>`;
|
|
1408
1756
|
}
|
|
@@ -1416,12 +1764,12 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
1416
1764
|
let t = this.data?.mobileSublineTemplate, n = null;
|
|
1417
1765
|
return t ? n = t.replace(/\{(\w+)\}/g, (t, n) => {
|
|
1418
1766
|
let r = this.columns.find((e) => e.key === n), i = e[n];
|
|
1419
|
-
return (r ?
|
|
1420
|
-
}) : this.sublineColumns.length > 0 && (n = this.sublineColumns.map((t) =>
|
|
1767
|
+
return (r ? G(r, i) : i == null ? null : String(i)) ?? "—";
|
|
1768
|
+
}) : this.sublineColumns.length > 0 && (n = this.sublineColumns.map((t) => G(t, e[t.key]) ?? "—").join(" · ")), n == null ? l : p`<span class="lintje-data-table__mobile-sub">${n}</span>`;
|
|
1421
1769
|
}
|
|
1422
1770
|
mobileStatus(e, t) {
|
|
1423
1771
|
if (!e.threshold) return null;
|
|
1424
|
-
let n =
|
|
1772
|
+
let n = K(e, t[e.key]);
|
|
1425
1773
|
return n && {
|
|
1426
1774
|
label: n.label,
|
|
1427
1775
|
tone: n.outside ? "outside" : "within"
|
|
@@ -1429,21 +1777,21 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
1429
1777
|
}
|
|
1430
1778
|
headerCheck() {
|
|
1431
1779
|
let e = this.uncheckable, t = this.rows.filter((t) => !e.has(this.rowKey(t))), n = new Set(this.checkedIds), r = t.filter((e) => n.has(this.rowKey(e))).length;
|
|
1432
|
-
return this.checkbox(
|
|
1780
|
+
return this.checkbox(p`<span class="visually-hidden">Alles selecteren</span>`, t.length > 0 && r === t.length, r > 0, (e) => this.setChecked(e ? t.map((e) => this.rowKey(e)) : []));
|
|
1433
1781
|
}
|
|
1434
1782
|
rowCheck(e, t, n) {
|
|
1435
1783
|
let r = this.columns[0], i = r ? this.sortValue(r, e) : t;
|
|
1436
|
-
return this.checkbox(
|
|
1784
|
+
return this.checkbox(p`<span class="visually-hidden">${`${i} selecteren`}</span>`, n, !1, (e) => {
|
|
1437
1785
|
let n = this.checkedIds.filter((e) => e !== t);
|
|
1438
1786
|
if (e && this.#f && this.data?.bulkActions) {
|
|
1439
1787
|
let e = this.uncheckable, n = this.sortedRows.map((e) => this.rowKey(e)).filter((t) => !e.has(t));
|
|
1440
|
-
this.setChecked(ae(this.checkedIds,
|
|
1788
|
+
this.setChecked(ae(this.checkedIds, ie(n, this.#d, t)));
|
|
1441
1789
|
} else this.setChecked(e ? [...n, t] : n);
|
|
1442
1790
|
this.#d = t;
|
|
1443
1791
|
}, this.uncheckable.has(t));
|
|
1444
1792
|
}
|
|
1445
1793
|
checkbox(e, t, n, r, i = !1) {
|
|
1446
|
-
return
|
|
1794
|
+
return p`<label class="lintje-choice${i ? " is-disabled" : ""}">
|
|
1447
1795
|
<input
|
|
1448
1796
|
type="checkbox"
|
|
1449
1797
|
class="lintje-choice__input"
|
|
@@ -1462,6 +1810,6 @@ var me = (e) => `${e} ${e === 1 ? "rij" : "rijen"}`, Z = m`<span aria-hidden="tr
|
|
|
1462
1810
|
</label>`;
|
|
1463
1811
|
}
|
|
1464
1812
|
};
|
|
1465
|
-
|
|
1813
|
+
i("lintje-data-table", $);
|
|
1466
1814
|
//#endregion
|
|
1467
1815
|
export { $ as LintjeDataTable };
|