@bk2k/ui 0.6.7 → 0.7.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/BUILDING.md +88 -2
- package/CHANGELOG.md +193 -0
- package/USAGE.md +102 -33
- package/custom-elements.json +1 -1
- package/dist/charts/chart-tokens.js +1 -1
- package/dist/charts/fields.d.ts +20 -0
- package/dist/charts/fields.js +27 -0
- package/dist/charts/frame.d.ts +2 -0
- package/dist/charts/frame.js +4 -2
- package/dist/clipboard.js +1 -0
- package/dist/components/bk-alert.js +2 -1
- package/dist/components/bk-avatar-group.js +4 -6
- package/dist/components/bk-avatar.d.ts +10 -0
- package/dist/components/bk-avatar.js +17 -0
- package/dist/components/bk-bar.js +2 -0
- package/dist/components/bk-button-group.js +1 -1
- package/dist/components/bk-button-top.js +2 -1
- package/dist/components/bk-button.d.ts +55 -17
- package/dist/components/bk-button.js +71 -24
- package/dist/components/bk-card.d.ts +4 -0
- package/dist/components/bk-card.js +15 -2
- package/dist/components/bk-carousel-controls.d.ts +2 -0
- package/dist/components/bk-carousel-controls.js +4 -2
- package/dist/components/bk-chart-area.d.ts +6 -0
- package/dist/components/bk-chart-bar.d.ts +63 -9
- package/dist/components/bk-chart-bar.js +152 -41
- package/dist/components/bk-chart-line.d.ts +13 -0
- package/dist/components/bk-chart-line.js +11 -1
- package/dist/components/bk-chip-group.d.ts +2 -2
- package/dist/components/bk-chip-group.js +4 -0
- package/dist/components/bk-chip.d.ts +53 -8
- package/dist/components/bk-chip.js +43 -7
- package/dist/components/bk-code.js +6 -2
- package/dist/components/bk-columns.d.ts +11 -0
- package/dist/components/bk-columns.js +8 -1
- package/dist/components/bk-combobox.d.ts +30 -6
- package/dist/components/bk-combobox.js +63 -20
- package/dist/components/bk-delta.d.ts +10 -0
- package/dist/components/bk-delta.js +8 -6
- package/dist/components/bk-dialog.d.ts +16 -6
- package/dist/components/bk-dialog.js +20 -8
- package/dist/components/bk-disclosure.js +4 -2
- package/dist/components/bk-drop-target.d.ts +7 -1
- package/dist/components/bk-drop-target.js +20 -4
- package/dist/components/bk-error-summary.d.ts +5 -0
- package/dist/components/bk-error-summary.js +13 -4
- package/dist/components/bk-facts-item.js +8 -6
- package/dist/components/bk-facts.d.ts +6 -4
- package/dist/components/bk-facts.js +22 -10
- package/dist/components/bk-footnote.d.ts +73 -0
- package/dist/components/bk-footnote.js +97 -0
- package/dist/components/bk-footnotes-item.d.ts +92 -0
- package/dist/components/bk-footnotes-item.js +139 -0
- package/dist/components/bk-footnotes.d.ts +51 -0
- package/dist/components/bk-footnotes.js +43 -0
- package/dist/components/bk-icon.js +2 -2
- package/dist/components/bk-image-compare.d.ts +33 -5
- package/dist/components/bk-image-compare.js +72 -24
- package/dist/components/bk-image-crop.d.ts +3 -3
- package/dist/components/bk-image-editor.d.ts +1 -1
- package/dist/components/bk-image-viewer.d.ts +107 -11
- package/dist/components/bk-image-viewer.js +205 -34
- package/dist/components/bk-input-inline.d.ts +15 -6
- package/dist/components/bk-input-inline.js +22 -6
- package/dist/components/bk-input-number.js +2 -1
- package/dist/components/bk-input-search.d.ts +1 -1
- package/dist/components/bk-input-search.js +2 -1
- package/dist/components/bk-input-text.d.ts +11 -0
- package/dist/components/bk-input-text.js +17 -3
- package/dist/components/bk-input-time-zone.d.ts +3 -0
- package/dist/components/bk-input-time.js +2 -1
- package/dist/components/bk-item.js +2 -1
- package/dist/components/bk-lightbox.d.ts +12 -3
- package/dist/components/bk-lightbox.js +6 -3
- package/dist/components/bk-link.d.ts +9 -1
- package/dist/components/bk-link.js +14 -4
- package/dist/components/bk-menu-item.d.ts +40 -0
- package/dist/components/bk-menu-item.js +57 -9
- package/dist/components/bk-menu-label.js +2 -1
- package/dist/components/bk-menu-list.d.ts +1 -0
- package/dist/components/bk-menu-list.js +10 -0
- package/dist/components/bk-menu.d.ts +8 -1
- package/dist/components/bk-menu.js +16 -5
- package/dist/components/bk-message-feedback.d.ts +4 -3
- package/dist/components/bk-message-feedback.js +7 -5
- package/dist/components/bk-message-list.js +2 -1
- package/dist/components/bk-message-source.d.ts +1 -2
- package/dist/components/bk-message-source.js +3 -11
- package/dist/components/bk-message.js +2 -0
- package/dist/components/bk-model-viewer.d.ts +12 -1
- package/dist/components/bk-model-viewer.js +15 -2
- package/dist/components/bk-nav-group.js +1 -1
- package/dist/components/bk-nav-item.d.ts +18 -0
- package/dist/components/bk-nav-item.js +18 -5
- package/dist/components/bk-nav.d.ts +1 -1
- package/dist/components/bk-page-cta.js +2 -0
- package/dist/components/bk-page-section.d.ts +1 -1
- package/dist/components/bk-page-section.js +3 -9
- package/dist/components/bk-pane.d.ts +1 -0
- package/dist/components/bk-pane.js +7 -5
- package/dist/components/bk-panel.d.ts +1 -1
- package/dist/components/bk-panel.js +6 -5
- package/dist/components/bk-period-nav.d.ts +102 -0
- package/dist/components/bk-period-nav.js +69 -0
- package/dist/components/bk-picture.d.ts +17 -4
- package/dist/components/bk-picture.js +8 -1
- package/dist/components/bk-segmented-item.d.ts +24 -4
- package/dist/components/bk-segmented-item.js +37 -5
- package/dist/components/bk-segmented.js +2 -13
- package/dist/components/bk-select-cascade.d.ts +1 -1
- package/dist/components/bk-select-tree.d.ts +1 -1
- package/dist/components/bk-select.d.ts +1 -1
- package/dist/components/bk-select.js +2 -1
- package/dist/components/bk-shell-app.d.ts +13 -6
- package/dist/components/bk-shell-app.js +47 -11
- package/dist/components/bk-shell-sites.d.ts +2 -1
- package/dist/components/bk-shell-sites.js +3 -5
- package/dist/components/bk-sortable.d.ts +3 -0
- package/dist/components/bk-sortable.js +10 -17
- package/dist/components/bk-split-grid.d.ts +104 -3
- package/dist/components/bk-split-grid.js +425 -2
- package/dist/components/bk-split.d.ts +3 -0
- package/dist/components/bk-split.js +3 -0
- package/dist/components/bk-stat-group.js +2 -1
- package/dist/components/bk-stat.d.ts +17 -0
- package/dist/components/bk-stat.js +7 -3
- package/dist/components/bk-steps.js +2 -1
- package/dist/components/bk-surface.d.ts +2 -0
- package/dist/components/bk-surface.js +6 -3
- package/dist/components/bk-table.d.ts +17 -13
- package/dist/components/bk-table.js +94 -15
- package/dist/components/bk-tabs-item.d.ts +45 -7
- package/dist/components/bk-tabs-item.js +51 -20
- package/dist/components/bk-tabs-panel.d.ts +6 -3
- package/dist/components/bk-tabs-panel.js +6 -0
- package/dist/components/bk-tabs.d.ts +50 -7
- package/dist/components/bk-tabs.js +168 -96
- package/dist/components/bk-text.js +2 -1
- package/dist/components/bk-toast-group.d.ts +3 -1
- package/dist/components/bk-toast-group.js +11 -1
- package/dist/components/bk-tooltip.d.ts +3 -1
- package/dist/components/bk-tooltip.js +2 -1
- package/dist/components/bk-video.js +2 -2
- package/dist/components/bk-zoom.d.ts +3 -1
- package/dist/components/confirm.d.ts +15 -0
- package/dist/components/confirm.js +27 -4
- package/dist/i18n/de.js +19 -1
- package/dist/i18n/en.d.ts +2 -0
- package/dist/i18n/en.js +3 -0
- package/dist/i18n.d.ts +23 -2
- package/dist/i18n.js +35 -4
- package/dist/icons/brands-static.d.ts +3 -0
- package/dist/icons/brands-static.js +5 -0
- package/dist/icons/core.d.ts +1 -0
- package/dist/icons/core.js +2 -0
- package/dist/icons/load-static.d.ts +3 -0
- package/dist/icons/load-static.js +5 -0
- package/dist/icons/load.js +1 -0
- package/dist/icons/registry.js +1 -1
- package/dist/icons/set/save-as.d.ts +3 -0
- package/dist/icons/set/save-as.js +7 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/internal/announcer.d.ts +8 -1
- package/dist/internal/announcer.js +26 -10
- package/dist/internal/backdrop.d.ts +19 -0
- package/dist/internal/backdrop.js +29 -0
- package/dist/internal/busy.d.ts +3 -2
- package/dist/internal/busy.js +4 -5
- package/dist/internal/choice-field.js +1 -1
- package/dist/internal/choice-item.d.ts +17 -6
- package/dist/internal/choice-item.js +20 -9
- package/dist/internal/cloak.d.ts +3 -0
- package/dist/internal/cloak.js +7 -0
- package/dist/internal/crop-frame.d.ts +1 -1
- package/dist/internal/crop-frame.js +2 -7
- package/dist/internal/date-field.js +2 -1
- package/dist/internal/drag.d.ts +11 -0
- package/dist/internal/drag.js +23 -0
- package/dist/internal/english-static.d.ts +3 -0
- package/dist/internal/english-static.js +5 -0
- package/dist/internal/english.d.ts +8 -0
- package/dist/internal/english.js +6 -0
- package/dist/internal/footnotes.d.ts +56 -0
- package/dist/internal/footnotes.js +143 -0
- package/dist/internal/handle-menu.d.ts +2 -3
- package/dist/internal/handle-menu.js +11 -3
- package/dist/internal/late/bk-shell-app.d.ts +4 -0
- package/dist/internal/late/bk-shell-app.js +7 -0
- package/dist/internal/late/bk-table.d.ts +4 -0
- package/dist/internal/late/bk-table.js +17 -0
- package/dist/internal/late/handle-menu.d.ts +4 -0
- package/dist/internal/late/handle-menu.js +9 -0
- package/dist/internal/late/static.d.ts +7 -0
- package/dist/internal/late/static.js +5 -0
- package/dist/internal/late.d.ts +20 -0
- package/dist/internal/late.js +45 -0
- package/dist/internal/link.d.ts +2 -0
- package/dist/internal/link.js +11 -1
- package/dist/internal/own-text.d.ts +8 -0
- package/dist/internal/own-text.js +7 -0
- package/dist/internal/scope.js +1 -1
- package/dist/internal/scroll-lock.d.ts +4 -1
- package/dist/internal/scroll-lock.js +17 -4
- package/dist/internal/slider.js +2 -1
- package/dist/internal/styles.js +3 -0
- package/dist/internal/submit.d.ts +23 -0
- package/dist/internal/submit.js +57 -0
- package/dist/jsx.d.ts +176 -56
- package/dist/reset.css +10 -0
- package/dist/standalone/all.js +226 -221
- package/dist/standalone/appearance.js +1 -1
- package/dist/standalone/bk-accordion-item.js +4 -4
- package/dist/standalone/bk-accordion.js +2 -2
- package/dist/standalone/bk-action-bar.js +3 -3
- package/dist/standalone/bk-alert-offline.js +1 -2
- package/dist/standalone/bk-alert.js +13 -12
- package/dist/standalone/bk-app-state.js +1 -1
- package/dist/standalone/bk-attachment.js +4 -4
- package/dist/standalone/bk-avatar-group.js +12 -10
- package/dist/standalone/bk-avatar.js +14 -4
- package/dist/standalone/bk-badge.js +2 -2
- package/dist/standalone/bk-bar.js +3 -1
- package/dist/standalone/bk-brand.js +3 -3
- package/dist/standalone/bk-breadcrumbs.js +5 -5
- package/dist/standalone/bk-button-copy.js +5 -5
- package/dist/standalone/bk-button-group.js +5 -5
- package/dist/standalone/bk-button-share.js +5 -5
- package/dist/standalone/bk-button-top.js +9 -8
- package/dist/standalone/bk-button.js +74 -34
- package/dist/standalone/bk-calendar-event.js +1 -1
- package/dist/standalone/bk-calendar-week.js +3 -3
- package/dist/standalone/bk-calendar.js +4 -4
- package/dist/standalone/bk-card.js +20 -7
- package/dist/standalone/bk-carousel-controls.js +7 -6
- package/dist/standalone/bk-carousel-item.js +2 -2
- package/dist/standalone/bk-carousel.js +1 -1
- package/dist/standalone/bk-chart-area.js +1 -1
- package/dist/standalone/bk-chart-bar-list.js +8 -8
- package/dist/standalone/bk-chart-bar.js +253 -166
- package/dist/standalone/bk-chart-bridge.js +7 -7
- package/dist/standalone/bk-chart-bullet.js +6 -6
- package/dist/standalone/bk-chart-calendar.js +7 -7
- package/dist/standalone/bk-chart-heatmap.js +7 -7
- package/dist/standalone/bk-chart-histogram.js +5 -5
- package/dist/standalone/bk-chart-legend.js +6 -6
- package/dist/standalone/bk-chart-line.js +116 -103
- package/dist/standalone/bk-chart-mark.js +1 -1
- package/dist/standalone/bk-chart-scatter.js +6 -6
- package/dist/standalone/bk-chart-sparkline.js +6 -6
- package/dist/standalone/bk-chart-stacked-bar.js +7 -7
- package/dist/standalone/bk-chart-tracker.js +6 -6
- package/dist/standalone/bk-chart-waterfall.js +6 -6
- package/dist/standalone/bk-checkbox-group.js +4 -4
- package/dist/standalone/bk-checkbox.js +4 -4
- package/dist/standalone/bk-chip-group.js +9 -5
- package/dist/standalone/bk-chip.js +56 -17
- package/dist/standalone/bk-cluster.js +1 -1
- package/dist/standalone/bk-code-diff.js +4 -4
- package/dist/standalone/bk-code-stack.js +4 -4
- package/dist/standalone/bk-code.js +10 -6
- package/dist/standalone/bk-color-panel.js +5 -5
- package/dist/standalone/bk-columns.js +13 -5
- package/dist/standalone/bk-combobox.js +53 -33
- package/dist/standalone/bk-command-menu.js +6 -6
- package/dist/standalone/bk-command-palette.js +6 -5
- package/dist/standalone/bk-composer.js +6 -6
- package/dist/standalone/bk-delta.js +11 -10
- package/dist/standalone/bk-diagram.js +1 -1
- package/dist/standalone/bk-dialog.js +1 -1
- package/dist/standalone/bk-disclosure.js +7 -5
- package/dist/standalone/bk-divider.js +2 -2
- package/dist/standalone/bk-drawer.js +3 -3
- package/dist/standalone/bk-drop-target.js +12 -6
- package/dist/standalone/bk-empty-state.js +3 -3
- package/dist/standalone/bk-error-summary.js +9 -6
- package/dist/standalone/bk-facts-item.js +10 -8
- package/dist/standalone/bk-facts.js +28 -16
- package/dist/standalone/bk-feature.js +3 -3
- package/dist/standalone/bk-fieldset.js +3 -3
- package/dist/standalone/bk-filter-bar.js +4 -4
- package/dist/standalone/bk-folder-browser.js +4 -4
- package/dist/standalone/bk-footnote.js +82 -0
- package/dist/standalone/bk-footnotes-item.js +122 -0
- package/dist/standalone/bk-footnotes.js +37 -0
- package/dist/standalone/bk-form-guard.js +2 -2
- package/dist/standalone/bk-form-steps.js +3 -3
- package/dist/standalone/bk-grid.js +1 -1
- package/dist/standalone/bk-icon-tile.js +3 -3
- package/dist/standalone/bk-icon.js +1 -1
- package/dist/standalone/bk-image-compare.js +88 -47
- package/dist/standalone/bk-image-crop.js +6 -6
- package/dist/standalone/bk-image-editor.js +2 -1
- package/dist/standalone/bk-image-viewer.js +180 -59
- package/dist/standalone/bk-input-code.js +4 -4
- package/dist/standalone/bk-input-color.js +4 -4
- package/dist/standalone/bk-input-date-range.js +2 -2
- package/dist/standalone/bk-input-date.js +2 -2
- package/dist/standalone/bk-input-file.js +5 -5
- package/dist/standalone/bk-input-group.js +4 -4
- package/dist/standalone/bk-input-inline.js +17 -10
- package/dist/standalone/bk-input-number.js +9 -8
- package/dist/standalone/bk-input-rating.js +6 -6
- package/dist/standalone/bk-input-rich.js +1 -1
- package/dist/standalone/bk-input-search.js +23 -22
- package/dist/standalone/bk-input-slider-range.js +5 -5
- package/dist/standalone/bk-input-slider.js +5 -5
- package/dist/standalone/bk-input-text.js +1 -1
- package/dist/standalone/bk-input-time-zone.js +1 -1
- package/dist/standalone/bk-input-time.js +29 -28
- package/dist/standalone/bk-item-group.js +3 -3
- package/dist/standalone/bk-item.js +12 -11
- package/dist/standalone/bk-kbd-shortcuts.js +4 -3
- package/dist/standalone/bk-kbd.js +68 -1
- package/dist/standalone/bk-lightbox.js +11 -7
- package/dist/standalone/bk-lines.js +1 -1
- package/dist/standalone/bk-link.js +33 -19
- package/dist/standalone/bk-listbox-columns.js +6 -6
- package/dist/standalone/bk-listbox-item.js +1 -1
- package/dist/standalone/bk-listbox-search.js +7 -7
- package/dist/standalone/bk-listbox-transfer.js +6 -6
- package/dist/standalone/bk-listbox.js +7 -7
- package/dist/standalone/bk-logo-wall.js +2 -2
- package/dist/standalone/bk-logo.js +3 -3
- package/dist/standalone/bk-menu-bar.js +3 -3
- package/dist/standalone/bk-menu-context.js +1 -1
- package/dist/standalone/bk-menu-divider.js +2 -2
- package/dist/standalone/bk-menu-item.js +73 -29
- package/dist/standalone/bk-menu-label.js +7 -6
- package/dist/standalone/bk-menu-list.js +10 -4
- package/dist/standalone/bk-menu.js +19 -10
- package/dist/standalone/bk-message-approval.js +4 -4
- package/dist/standalone/bk-message-branches.js +3 -3
- package/dist/standalone/bk-message-citation.js +10 -10
- package/dist/standalone/bk-message-feedback.js +10 -6
- package/dist/standalone/bk-message-list.js +6 -5
- package/dist/standalone/bk-message-reasoning.js +5 -5
- package/dist/standalone/bk-message-source.js +13 -21
- package/dist/standalone/bk-message-tool-group.js +5 -5
- package/dist/standalone/bk-message-tool.js +5 -5
- package/dist/standalone/bk-message.js +6 -4
- package/dist/standalone/bk-meter.js +3 -3
- package/dist/standalone/bk-model-viewer.js +1 -1
- package/dist/standalone/bk-nav-divider.js +2 -2
- package/dist/standalone/bk-nav-group.js +6 -6
- package/dist/standalone/bk-nav-item.js +31 -23
- package/dist/standalone/bk-nav-toc.js +3 -3
- package/dist/standalone/bk-nav.js +3 -3
- package/dist/standalone/bk-overflow.js +3 -3
- package/dist/standalone/bk-page-cta.js +5 -3
- package/dist/standalone/bk-page-footer-column.js +2 -2
- package/dist/standalone/bk-page-footer.js +3 -3
- package/dist/standalone/bk-page-header.js +3 -3
- package/dist/standalone/bk-page-hero.js +3 -3
- package/dist/standalone/bk-page-pager.js +5 -5
- package/dist/standalone/bk-page-section.js +6 -6
- package/dist/standalone/bk-pagination.js +6 -6
- package/dist/standalone/bk-pane.js +10 -9
- package/dist/standalone/bk-panel.js +9 -10
- package/dist/standalone/bk-period-nav.js +69 -0
- package/dist/standalone/bk-picture.js +24 -15
- package/dist/standalone/bk-popover-help.js +3 -3
- package/dist/standalone/bk-popover.js +2 -2
- package/dist/standalone/bk-presence-cursor.js +2 -2
- package/dist/standalone/bk-preview.js +4 -4
- package/dist/standalone/bk-progress.js +3 -3
- package/dist/standalone/bk-prose.js +3 -3
- package/dist/standalone/bk-qr-code.js +1 -1
- package/dist/standalone/bk-radio-group.js +4 -4
- package/dist/standalone/bk-radio.js +3 -3
- package/dist/standalone/bk-rating.js +5 -5
- package/dist/standalone/bk-scroll.js +3 -3
- package/dist/standalone/bk-segmented-item.js +40 -16
- package/dist/standalone/bk-segmented.js +15 -13
- package/dist/standalone/bk-select-cascade.js +3 -3
- package/dist/standalone/bk-select-tree.js +4 -4
- package/dist/standalone/bk-select.js +7 -6
- package/dist/standalone/bk-shell-app.js +1 -1217
- package/dist/standalone/bk-shell-centered.js +2 -2
- package/dist/standalone/bk-shell-sites.js +5 -7
- package/dist/standalone/bk-skeleton.js +2 -2
- package/dist/standalone/bk-sortable.js +58 -60
- package/dist/standalone/bk-spinner.js +2 -2
- package/dist/standalone/bk-split-grid.js +318 -41
- package/dist/standalone/bk-split.js +9 -6
- package/dist/standalone/bk-stack.js +1 -1
- package/dist/standalone/bk-stat-group.js +8 -7
- package/dist/standalone/bk-stat.js +11 -8
- package/dist/standalone/bk-status-dot.js +3 -3
- package/dist/standalone/bk-steps-item.js +5 -5
- package/dist/standalone/bk-steps.js +8 -7
- package/dist/standalone/bk-surface.js +1 -1
- package/dist/standalone/bk-swatch-group.js +4 -4
- package/dist/standalone/bk-swatch-palette.js +1 -1
- package/dist/standalone/bk-swatch.js +2 -2
- package/dist/standalone/bk-switch.js +4 -4
- package/dist/standalone/bk-table.js +1 -1887
- package/dist/standalone/bk-tabs-item.js +58 -35
- package/dist/standalone/bk-tabs-panel.js +7 -3
- package/dist/standalone/bk-tabs.js +160 -98
- package/dist/standalone/bk-tasks-item.js +4 -4
- package/dist/standalone/bk-tasks.js +2 -2
- package/dist/standalone/bk-testimonial.js +3 -3
- package/dist/standalone/bk-text.js +19 -18
- package/dist/standalone/bk-time-countdown.js +4 -4
- package/dist/standalone/bk-time-relative.js +3 -3
- package/dist/standalone/bk-timeline-item.js +4 -4
- package/dist/standalone/bk-timeline.js +2 -2
- package/dist/standalone/bk-toast-group.js +1 -1
- package/dist/standalone/bk-toast.js +4 -4
- package/dist/standalone/bk-toolbar.js +2 -2
- package/dist/standalone/bk-tooltip.js +8 -7
- package/dist/standalone/bk-tree-item.js +6 -6
- package/dist/standalone/bk-tree.js +3 -3
- package/dist/standalone/bk-video.js +6 -6
- package/dist/standalone/bk-visually-hidden.js +2 -2
- package/dist/standalone/bk-zoom.js +5 -5
- package/dist/standalone/chunks/announcer-D1zrRWwO.js +36 -0
- package/dist/standalone/chunks/{appearance-waHnV0kk.js → appearance-CBOJXbmC.js} +1 -1
- package/dist/standalone/chunks/{bk-alert-offline-BoMEYxnE.js → bk-alert-offline-Clw0ZSsH.js} +3 -3
- package/dist/standalone/chunks/{bk-carousel-B7-9OanA.js → bk-carousel-Biz7t8sL.js} +4 -4
- package/dist/standalone/chunks/{bk-diagram-CpOpicmo.js → bk-diagram-D_fQf6SF.js} +5 -5
- package/dist/standalone/chunks/{bk-dialog-a2BtUBf2.js → bk-dialog-DwZyUUHh.js} +65 -27
- package/dist/standalone/chunks/{bk-icon-DssFsNuB.js → bk-icon-Bp_flKdv.js} +4 -3
- package/dist/standalone/chunks/{bk-image-editor-z_Uj83fy.js → bk-image-editor-BADsoLRL.js} +5 -5
- package/dist/standalone/chunks/{bk-input-date-range-BQkbPlSJ.js → bk-input-date-range-DHcJ8-5g.js} +2 -2
- package/dist/standalone/chunks/{bk-input-rich-Dte_b4Ev.js → bk-input-rich-CFhW6vRa.js} +6 -6
- package/dist/standalone/chunks/{bk-input-text-CUNQG1ah.js → bk-input-text-DviyLBqj.js} +63 -54
- package/dist/standalone/chunks/{bk-model-viewer-D1XJPgAG.js → bk-model-viewer-w_Ah4Tvs.js} +22 -8
- package/dist/standalone/chunks/{bk-qr-code-CbI9rdOK.js → bk-qr-code-CYMovNVl.js} +3 -3
- package/dist/standalone/chunks/bk-shell-app-B2lxHit8.js +1235 -0
- package/dist/standalone/chunks/{bk-surface-DkIhrWMt.js → bk-surface-D7e0tErs.js} +9 -7
- package/dist/standalone/chunks/{bk-swatch-palette-BNNXTP3w.js → bk-swatch-palette-x13JgJQi.js} +6 -6
- package/dist/standalone/chunks/bk-table-CP8n_jy7.js +1944 -0
- package/dist/standalone/chunks/{bk-toast-group-Cix-Urgi.js → bk-toast-group-CoL6W7uk.js} +27 -24
- package/dist/standalone/chunks/{brush-Bn3lPdHN.js → brush-DALmXSru.js} +18 -2
- package/dist/standalone/chunks/{busy-B7Mxemwm.js → busy-BUB22mGY.js} +5 -4
- package/dist/standalone/chunks/{chart-tokens-D1Exf7BW.js → chart-tokens-DQ4hVSmn.js} +2 -2
- package/dist/standalone/chunks/{choice-field-BnuK9mp_.js → choice-field-poOTerh1.js} +6 -6
- package/dist/standalone/chunks/{choice-item-B6-9ZRlf.js → choice-item-Cx-nm1js.js} +17 -8
- package/dist/standalone/chunks/clipboard-RqIeP9Uz.js +29 -0
- package/dist/standalone/chunks/clipboard-UVLSkL4C.js +34 -0
- package/dist/standalone/chunks/{crop-frame-poLCGrBG.js → crop-frame-Z9N0QML4.js} +1 -11
- package/dist/standalone/chunks/{date-field-BQ5k-DDL.js → date-field-B-fCXa2D.js} +48 -47
- package/dist/standalone/chunks/{define-CzVPD4Zi.js → define-DkVeu7e9.js} +1 -1
- package/dist/standalone/chunks/drag-DT4__0t9.js +12 -0
- package/dist/standalone/chunks/footnotes-BeisMxLk.js +94 -0
- package/dist/standalone/chunks/{form-control-D7dqSP9M.js → form-control-CHpfKAKa.js} +2 -2
- package/dist/standalone/chunks/{frame-BW1nKuoM.js → frame-xIMVEUCi.js} +7 -4
- package/dist/standalone/chunks/handle-menu-BgYUbGO2.js +56 -0
- package/dist/standalone/chunks/{heading-text-CV5gBf7k.js → heading-text-CgnCa_q2.js} +1 -1
- package/dist/standalone/chunks/{i18n-CNsBRNPu.js → i18n-DFfGgd3d.js} +56 -34
- package/dist/standalone/chunks/{i18n-CrZgrRu9.js → i18n-DQAcbHkY.js} +1 -1
- package/dist/standalone/chunks/link--YWr8exL.js +69 -0
- package/dist/standalone/chunks/{marks-CdqbbJpM.js → marks-pOUDNUf1.js} +2 -2
- package/dist/standalone/chunks/{options-DMEc8rQt.js → options-BdC8-KKM.js} +2 -2
- package/dist/standalone/chunks/own-text-mpZVnMyX.js +5 -0
- package/dist/standalone/chunks/{palettes-CKLHSIPx.js → palettes-J4bQ21ks.js} +2 -2
- package/dist/standalone/chunks/{popover-base-oDhxsYMr.js → popover-base-hxo-Vh6E.js} +2 -2
- package/dist/standalone/chunks/{prose-BG4oQH-i.js → prose-BiuJgiah.js} +1 -1
- package/dist/standalone/chunks/{ramp-EclrETaQ.js → ramp-CGDOcqBZ.js} +1 -1
- package/dist/standalone/chunks/save-as-DBGZjczB.js +6 -0
- package/dist/standalone/chunks/shortcuts-DPxCSO4M.js +210 -0
- package/dist/standalone/chunks/{slider-BWT8Fmwz.js → slider-jp3d-Ld-.js} +15 -14
- package/dist/standalone/chunks/{stars-BN9M_9Q1.js → stars-BgKEjDQx.js} +1 -1
- package/dist/standalone/chunks/{styles-DwSR-9a3.js → styles-CaeyhYDA.js} +3 -0
- package/dist/standalone/chunks/submit-BjBGB8OW.js +42 -0
- package/dist/standalone/chunks/{summary-BwL-Gp8w.js → summary-W5s0TFqV.js} +1 -1
- package/dist/standalone/chunks/{text-field-CTp2b-Ai.js → text-field-CqhJSAwZ.js} +4 -4
- package/dist/standalone/chunks/{toggle-control-DXkgmz7R.js → toggle-control-lvZbQtGW.js} +2 -2
- package/dist/standalone/chunks/{tokens-BuahF1lF.js → tokens-C_ul7pL9.js} +4 -3
- package/dist/standalone/chunks/{virtual-B-1oN14Y.js → virtual-C_h6sHnm.js} +1 -1
- package/dist/standalone/confirm.js +27 -14
- package/dist/standalone/i18n-de.js +20 -2
- package/dist/standalone/icons.js +100 -98
- package/dist/standalone/links.js +1 -1
- package/dist/standalone/reset.css +10 -0
- package/dist/standalone/toast.js +1 -1
- package/dist/standalone/tokens.css +9 -5
- package/dist/tokens.css +9 -5
- package/dist/tokens.js +4 -3
- package/package.json +25 -2
- package/dist/standalone/chunks/announcer-haFcvqbe.js +0 -25
- package/dist/standalone/chunks/bk-kbd-B7bz8hmV.js +0 -275
- package/dist/standalone/chunks/clipboard-DBGdJ-1S.js +0 -61
- package/dist/standalone/chunks/handle-menu-DsxWvv4D.js +0 -22
- package/dist/standalone/chunks/link-CWSMsx04.js +0 -60
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
import { a as e, n as t, s as n, t as r, u as i } from "./chunks/lit-D8x-qXgH.js";
|
|
2
2
|
import { t as a } from "./chunks/style-map-BMvn17E7.js";
|
|
3
3
|
import { t as o } from "./chunks/if-defined-z_20pBRr.js";
|
|
4
|
-
import { t as s } from "./chunks/define-
|
|
5
|
-
import { t as c } from "./chunks/i18n-
|
|
6
|
-
import { t as l } from "./chunks/styles-
|
|
4
|
+
import { t as s } from "./chunks/define-DkVeu7e9.js";
|
|
5
|
+
import { t as c } from "./chunks/i18n-DFfGgd3d.js";
|
|
6
|
+
import { t as l } from "./chunks/styles-CaeyhYDA.js";
|
|
7
7
|
import { n as u } from "./chunks/events-DQ4e9cPN.js";
|
|
8
|
-
import { t as d } from "./chunks/link
|
|
9
|
-
import { r as f } from "./chunks/chart-tokens-
|
|
10
|
-
import { t as p } from "./chunks/i18n-
|
|
11
|
-
import { a as m, i as h, n as g,
|
|
12
|
-
import { a as
|
|
13
|
-
import { t as
|
|
14
|
-
import { a as
|
|
15
|
-
import { n as
|
|
16
|
-
import { a as
|
|
8
|
+
import { t as d } from "./chunks/link--YWr8exL.js";
|
|
9
|
+
import { r as f } from "./chunks/chart-tokens-DQ4hVSmn.js";
|
|
10
|
+
import { t as p } from "./chunks/i18n-DQAcbHkY.js";
|
|
11
|
+
import { a as m, i as h, n as g, r as _, t as v } from "./chunks/brush-DALmXSru.js";
|
|
12
|
+
import { a as y, i as b, n as x, t as S } from "./chunks/format-DEwvmPPd.js";
|
|
13
|
+
import { a as C, n as w, t as T } from "./chunks/scale-BcW5wHaU.js";
|
|
14
|
+
import { a as E, i as D, n as O, o as k, r as A } from "./chunks/marks-pOUDNUf1.js";
|
|
15
|
+
import { n as j, t as M } from "./chunks/summary-W5s0TFqV.js";
|
|
16
|
+
import { a as N, c as P, d as F, f as I, i as L, l as R, n as z, o as B, p as V, r as H, s as U, t as W } from "./chunks/frame-xIMVEUCi.js";
|
|
17
17
|
import "./bk-chart-legend.js";
|
|
18
18
|
import "./chunks/grid-BV0_DQ5v.js";
|
|
19
19
|
// dist/components/bk-chart-bar.js
|
|
20
20
|
f();
|
|
21
|
-
var
|
|
21
|
+
var G = class extends r {
|
|
22
22
|
static properties = {
|
|
23
23
|
data: { attribute: !1 },
|
|
24
24
|
series: { attribute: !1 },
|
|
25
25
|
x: {},
|
|
26
26
|
xLabel: { attribute: "x-label" },
|
|
27
|
+
detail: {},
|
|
28
|
+
detailLabel: { attribute: "detail-label" },
|
|
27
29
|
orientation: {
|
|
28
30
|
reflect: !0,
|
|
29
31
|
useDefault: !0
|
|
@@ -84,10 +86,14 @@ var V = class extends r {
|
|
|
84
86
|
valueFormat: {
|
|
85
87
|
attribute: "value-format",
|
|
86
88
|
type: Object
|
|
89
|
+
},
|
|
90
|
+
tooltipFields: {
|
|
91
|
+
attribute: "tooltip-fields",
|
|
92
|
+
converter: m
|
|
87
93
|
}
|
|
88
94
|
};
|
|
89
95
|
i18n = new c(this);
|
|
90
|
-
chart = new
|
|
96
|
+
chart = new W(this);
|
|
91
97
|
hot = null;
|
|
92
98
|
active = {
|
|
93
99
|
i: 0,
|
|
@@ -97,7 +103,7 @@ var V = class extends r {
|
|
|
97
103
|
viewStart = 0;
|
|
98
104
|
viewRows = [];
|
|
99
105
|
layoutCache = null;
|
|
100
|
-
brush = new
|
|
106
|
+
brush = new v((e, t) => this.applyRange(e, t));
|
|
101
107
|
links = new d(this);
|
|
102
108
|
constructor() {
|
|
103
109
|
super(), this.data = [], this.series = [], this.x = "label", this.orientation = "vertical", this.mode = "grouped", this.labels = !1, this.seriesLabels = "auto", this.contiguous = !1, this.table = !1, this.bare = !1, this.variant = "default", this.selectable = !1, this.clickable = !1, this.showSummary = !1, this.range = null;
|
|
@@ -132,7 +138,35 @@ var V = class extends r {
|
|
|
132
138
|
return this.rawKey(n) === t || n instanceof Date && this.rawKey(n).startsWith(t) || this.category(e) === t;
|
|
133
139
|
}
|
|
134
140
|
categoryHref(e) {
|
|
135
|
-
|
|
141
|
+
let t = this.href ?? "", n = (t) => t in e || t === "x", r = (t) => t in e ? e[t] : e[this.x], i = (e) => e == null || e === "", a = /^\{([\w-]+)\}$/.exec(t);
|
|
142
|
+
if (a && n(a[1])) {
|
|
143
|
+
let e = r(a[1]);
|
|
144
|
+
return i(e) ? null : this.rawKey(e);
|
|
145
|
+
}
|
|
146
|
+
let o = !1, s = t.replace(/\{([\w-]+)\}/g, (e, t) => {
|
|
147
|
+
if (!n(t)) return e;
|
|
148
|
+
let a = r(t);
|
|
149
|
+
return i(a) && (o = !0), encodeURIComponent(this.rawKey(a));
|
|
150
|
+
});
|
|
151
|
+
return o ? null : s;
|
|
152
|
+
}
|
|
153
|
+
isEmpty(e) {
|
|
154
|
+
return this.effectiveSeries.every((t) => U(e?.[t.key]) === null);
|
|
155
|
+
}
|
|
156
|
+
detailText(e) {
|
|
157
|
+
if (!this.detail) return "";
|
|
158
|
+
let t = e?.[this.detail];
|
|
159
|
+
return t instanceof Date ? b(this.i18n.locale, t.getTime()) : t == null ? "" : String(t);
|
|
160
|
+
}
|
|
161
|
+
categoryName(e) {
|
|
162
|
+
let t = this.category(e), n = this.detailText(e);
|
|
163
|
+
return n ? p(this.i18n.locale, "chartCategoryDetail", {
|
|
164
|
+
category: t,
|
|
165
|
+
detail: n
|
|
166
|
+
}) : t;
|
|
167
|
+
}
|
|
168
|
+
get marksCurrent() {
|
|
169
|
+
return this.pickMode !== null || this.current !== void 0 && this.current !== null && this.current !== "";
|
|
136
170
|
}
|
|
137
171
|
choose(e) {
|
|
138
172
|
let t = this.viewStart + e, n = this.data[t]?.[this.x], r = {
|
|
@@ -146,11 +180,12 @@ var V = class extends r {
|
|
|
146
180
|
u(this, "select", r, !0) && (this.current = this.rawKey(n));
|
|
147
181
|
}
|
|
148
182
|
categoryLabel(e) {
|
|
149
|
-
|
|
183
|
+
let t = this.layoutCache?.bars.filter((t) => t.i === e) ?? [], n = t.map((e) => this.markLabel(e, !1)).join("; ");
|
|
184
|
+
return this.extraFields.length && t.length ? `${n}; ${this.extraText(this.viewRows[e])}` : n;
|
|
150
185
|
}
|
|
151
186
|
static styles = [
|
|
152
187
|
l,
|
|
153
|
-
...
|
|
188
|
+
...H,
|
|
154
189
|
i`
|
|
155
190
|
.plot { height: var(--bk-chart-height); }
|
|
156
191
|
:host([orientation="horizontal"]) .plot { height: auto; }
|
|
@@ -167,23 +202,28 @@ var V = class extends r {
|
|
|
167
202
|
}
|
|
168
203
|
.mark.rest { fill: var(--bk-chart-bar-rest, var(--bk-chart-other)); }
|
|
169
204
|
text.current { fill: var(--bk-chart-bar-current-label, var(--bk-text)); font-weight: var(--bk-weight-medium); }
|
|
205
|
+
text.detail { fill: var(--bk-chart-bar-detail, var(--bk-chart-label)); }
|
|
206
|
+
.current-mark { fill: var(--bk-chart-bar-current-mark, var(--bk-accent-solid)); }
|
|
207
|
+
.stub { fill: none; stroke: var(--bk-chart-bar-stub, var(--bk-chart-axis)); stroke-width: 1; }
|
|
170
208
|
@media (forced-colors: active) {
|
|
171
209
|
.ghost { fill: none; stroke: CanvasText; } .selection { fill: Highlight; stroke: Highlight; }
|
|
172
210
|
.mark.rest { fill: GrayText; }
|
|
211
|
+
.current-mark { fill: Highlight; }
|
|
212
|
+
.stub { stroke: GrayText; }
|
|
173
213
|
.cat:hover { outline: var(--bk-border-width) solid Highlight; outline-offset: var(--bk-focus-offset-inset); }
|
|
174
214
|
}
|
|
175
215
|
`,
|
|
176
|
-
|
|
216
|
+
A
|
|
177
217
|
];
|
|
178
218
|
get effectiveSeries() {
|
|
179
|
-
return
|
|
219
|
+
return N(this.series, this.data, this.x);
|
|
180
220
|
}
|
|
181
221
|
category(e) {
|
|
182
222
|
let t = e?.[this.x];
|
|
183
|
-
return t instanceof Date ?
|
|
223
|
+
return t instanceof Date ? b(this.i18n.locale, t.getTime()) : t == null ? "" : String(t);
|
|
184
224
|
}
|
|
185
225
|
fmt(e) {
|
|
186
|
-
return
|
|
226
|
+
return y(this.i18n.locale, e, this.valueFormat);
|
|
187
227
|
}
|
|
188
228
|
willUpdate(e) {
|
|
189
229
|
if ((e.has("data") || e.has("range")) && (this.range && this.range[1] >= (this.data?.length ?? 0) && (this.range = null), this.viewStart = this.range?.[0] ?? 0, this.viewRows = this.range ? (this.data ?? []).slice(this.range[0], this.range[1] + 1) : this.data ?? []), e.has("data") || e.has("series") || e.has("mode") || e.has("range")) {
|
|
@@ -195,17 +235,17 @@ var V = class extends r {
|
|
|
195
235
|
}
|
|
196
236
|
}
|
|
197
237
|
layout() {
|
|
198
|
-
let { width: e } = this.chart, t = this.chart.specs, n = this.effectiveSeries, r = this.viewRows, i = r.length, a = n.length, o = this.orientation === "horizontal", s = this.mode !== "grouped", c = this.compare?.length && !s && !this.contiguous ? this.compare : null, l = (e, t) => c ?
|
|
199
|
-
if (f)
|
|
200
|
-
else if (s)
|
|
201
|
-
else for (let e of p) for (let t of e) t !== null && (
|
|
238
|
+
let { width: e } = this.chart, t = this.chart.specs, n = this.effectiveSeries, r = this.viewRows, i = r.length, a = n.length, o = this.orientation === "horizontal", s = this.mode !== "grouped", c = this.compare?.length && !s && !this.contiguous ? this.compare : null, l = (e, t) => c ? U(c[this.viewStart + e]?.[n[t].key]) : null, u = c ? .5 : 0, d = E(this), f = this.mode === "percent", p = r.map((e) => n.map((t) => U(e[t.key]))), m = p.map((e) => e.reduce((e, t) => e + (t && t > 0 ? t : 0), 0)), h = p.map((e) => e.reduce((e, t) => e + (t && t < 0 ? t : 0), 0)), g = this.i18n.locale, _ = 0, v = 0;
|
|
239
|
+
if (f) v = 1;
|
|
240
|
+
else if (s) _ = Math.min(0, ...h), v = Math.max(0, ...m);
|
|
241
|
+
else for (let e of p) for (let t of e) t !== null && (_ = Math.min(_, t), v = Math.max(v, t));
|
|
202
242
|
if (c && !f) for (let e = 0; e < i; e++) for (let t = 0; t < a; t++) {
|
|
203
243
|
let n = l(e, t);
|
|
204
|
-
n !== null && (
|
|
244
|
+
n !== null && (_ = Math.min(_, n), v = Math.max(v, n));
|
|
205
245
|
}
|
|
206
|
-
let
|
|
207
|
-
|
|
208
|
-
let
|
|
246
|
+
let y = f ? null : O(d);
|
|
247
|
+
y && (_ = Math.min(_, y[0]), v = Math.max(v, y[1]));
|
|
248
|
+
let b = t.labelSize, x = t.font, D = r.map((e) => this.category(e)), k = r.map((e) => this.detailText(e)), A = k.some(Boolean), j = Math.max(0, ...D.map((e) => B(e, b, x)), ...k.map((e) => B(e, b, x))), M = r.map((e) => this.isEmpty(e)), N = b + t.clear, P = this.marksCurrent ? t.clear + t.indicator : 0, F = (e) => {
|
|
209
249
|
if (this.contiguous) return {
|
|
210
250
|
t: Math.max(1, e - t.gap),
|
|
211
251
|
groupW: Math.max(1, e - t.gap)
|
|
@@ -215,124 +255,139 @@ var V = class extends r {
|
|
|
215
255
|
t: i,
|
|
216
256
|
groupW: n * (i * (1 + u) + r) + (n - 1) * t.gap
|
|
217
257
|
};
|
|
218
|
-
},
|
|
258
|
+
}, I, L, R, V, H, W = this.labels ? b + 4 + t.clear + t.gap : 0, G, K;
|
|
219
259
|
if (o) {
|
|
220
|
-
let n = s ? 1 : Math.max(1, a), r = this.contiguous ? t.barMax : n * (t.barMax * (1 + u) + (u ? t.gap : 0)) + (n - 1) * t.gap, o = Math.max(r / .7, t.hitMin + 8);
|
|
221
|
-
|
|
222
|
-
let
|
|
260
|
+
let n = s ? 1 : Math.max(1, a), r = this.contiguous ? t.barMax : n * (t.barMax * (1 + u) + (u ? t.gap : 0)) + (n - 1) * t.gap, o = (A ? N / 2 + b / 2 : b / 2) + P, c = Math.max(r / .7, t.hitMin + 8, Math.ceil(2 * o + 2 * t.clear));
|
|
261
|
+
L = Math.ceil(Math.min(j, e * .35) + 8), V = 2, H = V + i * c, I = this.variant === "minimal" ? H + 2 : H + b + 10 + t.clear, G = f ? C(0, 1, 4) : C(_, v, Math.max(2, Math.round((e - L) / 90))), K = S(g, G.ticks, f ? { style: "percent" } : this.valueFormat);
|
|
262
|
+
let l = B(K(G.ticks[G.ticks.length - 1]), b, x), d = this.variant === "minimal" ? 2 : l / 2 + 2;
|
|
223
263
|
if (this.labels && !f) {
|
|
224
|
-
let e = Math.max(0, ...p.flatMap((e, t) => s ? [m[t]] : e).map((e) =>
|
|
225
|
-
|
|
264
|
+
let e = Math.max(0, ...p.flatMap((e, t) => s ? [m[t]] : e).map((e) => B(this.fmt(e), b, x)));
|
|
265
|
+
d = Math.max(d, e + 8);
|
|
226
266
|
}
|
|
227
|
-
|
|
267
|
+
R = e - d;
|
|
228
268
|
} else {
|
|
229
|
-
|
|
230
|
-
let n = Math.max(...
|
|
231
|
-
|
|
269
|
+
I = this.chart.height, V = Math.max(W, b / 2 + 2), H = I - (b + 10 + t.clear + (A ? N : 0) + P), G = C(_, v, Math.max(2, Math.round((H - V) / 48))), f && (G = C(0, 1, 4)), K = S(g, G.ticks, f ? { style: "percent" } : this.valueFormat);
|
|
270
|
+
let n = Math.max(...G.ticks.map((e) => B(K(e), b, x)));
|
|
271
|
+
L = this.variant === "minimal" ? 0 : Math.ceil(n + 8), R = e - 4;
|
|
232
272
|
}
|
|
233
|
-
let
|
|
273
|
+
let q = [];
|
|
234
274
|
if (!o && s && a >= 2 && a <= 4 && i > 0 && this.seriesLabels !== "none") {
|
|
235
|
-
let t = Math.max(...n.map((e) =>
|
|
236
|
-
e -
|
|
275
|
+
let t = Math.max(...n.map((e) => B(e.label, b, x)));
|
|
276
|
+
e - L - (t + 12) >= 200 && (R = e - (t + 12), q = n.map((e, t) => ({
|
|
237
277
|
j: t,
|
|
238
278
|
y: 0,
|
|
239
279
|
text: e.label
|
|
240
280
|
})));
|
|
241
281
|
}
|
|
242
|
-
|
|
282
|
+
this.variant === "minimal" && !f && v > _ && (G = {
|
|
283
|
+
...G,
|
|
284
|
+
min: Math.min(0, _),
|
|
285
|
+
max: Math.max(0, v)
|
|
286
|
+
});
|
|
287
|
+
let J = o ? w([G.min, G.max], [L, R]) : w([G.min, G.max], [H, V]), Y = o ? T(i, [V, H]) : T(i, [L, R]), { t: X, groupW: ee } = F(Y.width), Z = J(0), Q = [], $ = [];
|
|
243
288
|
for (let e = 0; e < i; e++) {
|
|
244
|
-
let n =
|
|
289
|
+
let n = Y.center(e) - ee / 2, r = 0, i = 0, c = s ? p[e].reduce((e, t, n) => t && t > 0 ? n : e, -1) : -1, d = s ? p[e].reduce((e, t, n) => t && t < 0 ? n : e, -1) : -1;
|
|
245
290
|
for (let h = 0; h < a; h++) {
|
|
246
291
|
let g = p[e][h], _ = m[e] || 1, v = g === null ? null : f ? Math.max(0, g) / _ : g, y = g !== null && m[e] ? Math.max(0, g) / m[e] : 0, b = 0, x = v ?? 0, S = !0, C = !0;
|
|
247
292
|
s && v !== null && (v >= 0 ? (b = r, x = r + v, C = r === 0, r = x, S = h === c) : (b = i, x = i + v, C = i === 0, i = x, S = h === d));
|
|
248
|
-
let w =
|
|
293
|
+
let w = X * (1 + u) + (u ? t.gap : 0), T = s ? n : n + h * (w + t.gap) + (u ? X * u + t.gap : 0), E = J(b), D = J(x);
|
|
249
294
|
if (s && !C && v !== null && v !== 0) {
|
|
250
295
|
let e = Math.sign(D - E);
|
|
251
296
|
E += e * t.gap, Math.sign(D - E) !== e && (E = D);
|
|
252
297
|
}
|
|
253
298
|
let O = (v ?? 0) < 0, k;
|
|
254
299
|
if (o) {
|
|
255
|
-
let n = Math.min(E, D), r = Math.abs(D - E), i = S ? O ? "left" : "right" : "none", o = s ? Math.max(
|
|
300
|
+
let n = Math.min(E, D), r = Math.abs(D - E), i = S ? O ? "left" : "right" : "none", o = s ? Math.max(X, Math.min(t.hitMin, Y.width)) : Math.max(X + t.gap, Math.min(t.hitMin, Y.width / Math.max(1, a))), c = T + X / 2 - o / 2, [l, u] = s ? [n - t.gap / 2, Math.max(r + t.gap, 4)] : [L, R - L];
|
|
256
301
|
k = {
|
|
257
302
|
i: e,
|
|
258
303
|
j: h,
|
|
259
304
|
value: g,
|
|
260
305
|
share: y,
|
|
261
|
-
path: v === null ? "" :
|
|
306
|
+
path: v === null ? "" : z(n, T, r, X, t.radius, i),
|
|
262
307
|
x: n,
|
|
263
308
|
y: T,
|
|
264
309
|
w: r,
|
|
265
|
-
h:
|
|
310
|
+
h: X,
|
|
266
311
|
hx: l,
|
|
267
312
|
hy: c,
|
|
268
313
|
hw: u,
|
|
269
314
|
hh: o,
|
|
270
315
|
ax: O ? n : n + r,
|
|
271
|
-
ay: T +
|
|
316
|
+
ay: T + X / 2,
|
|
317
|
+
stub: ""
|
|
272
318
|
};
|
|
273
319
|
} else {
|
|
274
|
-
let n = Math.min(E, D), r = Math.abs(D - E), i = S ? O ? "bottom" : "top" : "none", o = s ? Math.max(
|
|
320
|
+
let n = Math.min(E, D), r = Math.abs(D - E), i = S ? O ? "bottom" : "top" : "none", o = s ? Math.max(X, Math.min(t.hitMin, Y.width)) : Math.max(X + t.gap, Math.min(t.hitMin, Y.width / Math.max(1, a))), c = T + X / 2 - o / 2, [l, u] = s ? [n - t.gap / 2, Math.max(r + t.gap, 4)] : [V, H - V];
|
|
275
321
|
k = {
|
|
276
322
|
i: e,
|
|
277
323
|
j: h,
|
|
278
324
|
value: g,
|
|
279
325
|
share: y,
|
|
280
|
-
path: v === null ? "" :
|
|
326
|
+
path: v === null ? "" : z(T, n, X, r, t.radius, i),
|
|
281
327
|
x: T,
|
|
282
328
|
y: n,
|
|
283
|
-
w:
|
|
329
|
+
w: X,
|
|
284
330
|
h: r,
|
|
285
331
|
hx: c,
|
|
286
332
|
hy: l,
|
|
287
333
|
hw: o,
|
|
288
334
|
hh: u,
|
|
289
|
-
ax: T +
|
|
290
|
-
ay: O ? n + r : n
|
|
335
|
+
ax: T + X / 2,
|
|
336
|
+
ay: O ? n + r : n,
|
|
337
|
+
stub: ""
|
|
291
338
|
};
|
|
292
339
|
}
|
|
293
|
-
|
|
340
|
+
if (g === null && (!s || M[e] && h === 0)) {
|
|
341
|
+
let e = Math.max(t.clear, Math.round(X / 2));
|
|
342
|
+
k.stub = o ? z(Z, T, e, X, t.radius, "right") : z(T, Z - e, X, e, t.radius, "top");
|
|
343
|
+
}
|
|
344
|
+
Q.push(k);
|
|
294
345
|
let A = l(e, h);
|
|
295
346
|
if (A !== null) {
|
|
296
|
-
let e = T -
|
|
297
|
-
|
|
347
|
+
let e = T - X * u - t.gap, n = X * u, r = J(A), i = A < 0 ? o ? "left" : "bottom" : o ? "right" : "top";
|
|
348
|
+
$.push({
|
|
298
349
|
j: h,
|
|
299
|
-
path: o ?
|
|
350
|
+
path: o ? z(Math.min(Z, r), e, Math.abs(r - Z), n, t.radius, i) : z(e, Math.min(Z, r), n, Math.abs(r - Z), t.radius, i)
|
|
300
351
|
});
|
|
301
352
|
}
|
|
302
353
|
}
|
|
303
354
|
}
|
|
304
|
-
if (
|
|
305
|
-
let e =
|
|
306
|
-
|
|
355
|
+
if (q.length) {
|
|
356
|
+
let e = Q.filter((e) => e.i === i - 1);
|
|
357
|
+
q = q.map((t) => {
|
|
307
358
|
let n = e.find((e) => e.j === t.j);
|
|
308
359
|
return {
|
|
309
360
|
...t,
|
|
310
|
-
y: n && n.value && n.h >=
|
|
361
|
+
y: n && n.value && n.h >= b ? n.y + n.h / 2 : NaN
|
|
311
362
|
};
|
|
312
363
|
}).filter((e) => Number.isFinite(e.y));
|
|
313
|
-
let t =
|
|
314
|
-
t.some((e, n) => n && e - t[n - 1] <
|
|
364
|
+
let t = q.map((e) => e.y).sort((e, t) => e - t);
|
|
365
|
+
t.some((e, n) => n && e - t[n - 1] < b + 2) && (q = []);
|
|
315
366
|
}
|
|
316
367
|
return {
|
|
317
|
-
H:
|
|
318
|
-
x0:
|
|
319
|
-
x1:
|
|
320
|
-
y0:
|
|
321
|
-
y1:
|
|
322
|
-
ticks:
|
|
323
|
-
fmtTick:
|
|
324
|
-
valueScale:
|
|
325
|
-
bands:
|
|
326
|
-
bars:
|
|
327
|
-
ghosts:
|
|
368
|
+
H: I,
|
|
369
|
+
x0: L,
|
|
370
|
+
x1: R,
|
|
371
|
+
y0: V,
|
|
372
|
+
y1: H,
|
|
373
|
+
ticks: G,
|
|
374
|
+
fmtTick: K,
|
|
375
|
+
valueScale: J,
|
|
376
|
+
bands: Y,
|
|
377
|
+
bars: Q,
|
|
378
|
+
ghosts: $,
|
|
328
379
|
marks: d,
|
|
329
380
|
cmp: !!c,
|
|
330
|
-
t:
|
|
331
|
-
zero:
|
|
332
|
-
cats:
|
|
381
|
+
t: X,
|
|
382
|
+
zero: Z,
|
|
383
|
+
cats: D,
|
|
384
|
+
details: k,
|
|
385
|
+
hasDetail: A,
|
|
386
|
+
empty: M,
|
|
387
|
+
lineStep: N,
|
|
333
388
|
values: p,
|
|
334
389
|
totals: m,
|
|
335
|
-
seriesLabels:
|
|
390
|
+
seriesLabels: q,
|
|
336
391
|
horizontal: o,
|
|
337
392
|
stacked: s,
|
|
338
393
|
percent: f,
|
|
@@ -341,21 +396,27 @@ var V = class extends r {
|
|
|
341
396
|
k: a
|
|
342
397
|
};
|
|
343
398
|
}
|
|
344
|
-
markLabel(e) {
|
|
345
|
-
let
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
value: r
|
|
399
|
+
markLabel(e, t = !0) {
|
|
400
|
+
let n = this.effectiveSeries[e.j], r = this.categoryName(this.viewRows[e.i]), i = e.value === null ? p(this.i18n.locale, "chartNoValue") : this.mode === "percent" ? `${x(this.i18n.locale, e.share, 1)} (${this.fmt(e.value)})` : this.fmt(e.value), a = p(this.i18n.locale, "chartMark", {
|
|
401
|
+
category: r,
|
|
402
|
+
series: n?.label ?? "",
|
|
403
|
+
value: i
|
|
350
404
|
});
|
|
405
|
+
return t && this.extraFields.length ? `${a}; ${this.extraText(this.viewRows[e.i])}` : a;
|
|
406
|
+
}
|
|
407
|
+
get extraFields() {
|
|
408
|
+
return h(this.tooltipFields);
|
|
409
|
+
}
|
|
410
|
+
extraText(e) {
|
|
411
|
+
return this.extraFields.map((t) => `${g(t)} ${_(this.i18n.locale, e, t)}`).join(", ");
|
|
351
412
|
}
|
|
352
413
|
tooltipFor(e) {
|
|
353
|
-
let t = this.effectiveSeries, n = this.viewRows[e.i], r = this.i18n.locale, i = t.reduce((e, t) => e + Math.max(0,
|
|
354
|
-
let s =
|
|
414
|
+
let t = this.effectiveSeries, n = this.viewRows[e.i], r = this.i18n.locale, i = t.reduce((e, t) => e + Math.max(0, U(n[t.key]) ?? 0), 0), a = t.map((a, o) => {
|
|
415
|
+
let s = U(n[a.key]), c = this.mode === "percent" && s !== null ? `${x(r, i ? Math.max(0, s) / i : 0, 1)} · ${this.fmt(s)}` : this.fmt(s);
|
|
355
416
|
return {
|
|
356
417
|
label: a.label,
|
|
357
418
|
value: c,
|
|
358
|
-
color:
|
|
419
|
+
color: F(a, o, t.length),
|
|
359
420
|
marker: "rect",
|
|
360
421
|
active: o === e.j && t.length > 1
|
|
361
422
|
};
|
|
@@ -363,24 +424,32 @@ var V = class extends r {
|
|
|
363
424
|
if (this.layoutCache?.cmp) {
|
|
364
425
|
let i = this.compareLabel || p(r, "chartPrevious");
|
|
365
426
|
t.forEach((o, s) => {
|
|
366
|
-
let c =
|
|
427
|
+
let c = U(this.compare[this.viewStart + e.i]?.[o.key] ?? null), l = U(n[o.key]), u = l !== null && c !== null ? ` (${j(r, l, c, (e) => this.fmt(e))})` : "";
|
|
367
428
|
a.push({
|
|
368
429
|
label: t.length > 1 ? `${o.label} · ${i}` : i,
|
|
369
430
|
value: this.fmt(c) + u,
|
|
370
|
-
color:
|
|
431
|
+
color: F(o, s, t.length),
|
|
371
432
|
marker: "rect",
|
|
372
433
|
active: !1
|
|
373
434
|
});
|
|
374
435
|
});
|
|
375
436
|
}
|
|
376
|
-
|
|
437
|
+
this.mode !== "grouped" && t.length > 1 && a.push({
|
|
377
438
|
label: p(r, "chartTotal"),
|
|
378
439
|
value: this.fmt(i),
|
|
379
440
|
color: "",
|
|
380
441
|
marker: "rect",
|
|
381
442
|
active: !1
|
|
382
|
-
})
|
|
383
|
-
|
|
443
|
+
});
|
|
444
|
+
for (let e of this.extraFields) a.push({
|
|
445
|
+
label: g(e),
|
|
446
|
+
value: _(r, n, e),
|
|
447
|
+
color: "",
|
|
448
|
+
marker: "rect",
|
|
449
|
+
active: !1
|
|
450
|
+
});
|
|
451
|
+
return {
|
|
452
|
+
title: this.categoryName(n),
|
|
384
453
|
rows: a,
|
|
385
454
|
x: e.ax,
|
|
386
455
|
y: e.ay
|
|
@@ -462,52 +531,58 @@ var V = class extends r {
|
|
|
462
531
|
}, this.requestUpdate(), await this.updateComplete, this.renderRoot.querySelector(`.hit[data-i="${r}"][data-j="${i}"]`)?.focus();
|
|
463
532
|
}
|
|
464
533
|
onCategoryKey = async (e) => {
|
|
465
|
-
let t =
|
|
466
|
-
if (
|
|
467
|
-
let
|
|
534
|
+
let t = e.target.closest("a.cat, button.cat"), n = [...this.renderRoot.querySelectorAll("a.cat, button.cat")], r = t ? n.indexOf(t) : -1;
|
|
535
|
+
if (r < 0) return;
|
|
536
|
+
let i = this.orientation === "horizontal", a = r;
|
|
468
537
|
switch (e.key) {
|
|
469
|
-
case
|
|
470
|
-
|
|
538
|
+
case i ? "ArrowDown" : "ArrowRight":
|
|
539
|
+
a = Math.min(n.length - 1, r + 1);
|
|
471
540
|
break;
|
|
472
|
-
case
|
|
473
|
-
|
|
541
|
+
case i ? "ArrowUp" : "ArrowLeft":
|
|
542
|
+
a = Math.max(0, r - 1);
|
|
474
543
|
break;
|
|
475
544
|
case "Home":
|
|
476
|
-
|
|
545
|
+
a = 0;
|
|
477
546
|
break;
|
|
478
547
|
case "End":
|
|
479
|
-
|
|
548
|
+
a = n.length - 1;
|
|
480
549
|
break;
|
|
481
550
|
case "Escape":
|
|
482
551
|
this.chart.hideTooltip();
|
|
483
552
|
return;
|
|
484
553
|
default: return;
|
|
485
554
|
}
|
|
555
|
+
let o = Number(n[a].dataset.i);
|
|
486
556
|
e.preventDefault(), this.active = {
|
|
487
|
-
i,
|
|
557
|
+
i: o,
|
|
488
558
|
j: this.active.j
|
|
489
|
-
}, this.requestUpdate(), await this.updateComplete, this.renderRoot.querySelector(`.cat[data-i="${
|
|
559
|
+
}, this.requestUpdate(), await this.updateComplete, this.renderRoot.querySelector(`.cat[data-i="${o}"]`)?.focus();
|
|
490
560
|
};
|
|
491
561
|
toggleTable() {
|
|
492
562
|
this.table = !this.table, this.chart.hideTooltip();
|
|
493
563
|
}
|
|
494
564
|
tableModel() {
|
|
495
565
|
let e = this.i18n.locale, t = this.effectiveSeries, n = this.mode !== "grouped" && t.length > 1, r = !!this.compare?.length && this.mode === "grouped" && !this.contiguous, i = this.compareLabel || p(e, "chartPrevious"), a = [this.xLabel || p(e, "chartCategory")];
|
|
566
|
+
this.detail && a.push(this.detailLabel || p(e, "chartDetail"));
|
|
496
567
|
for (let n of t) a.push(n.label, ...r ? [`${n.label} · ${i}`, `${n.label} · ${p(e, "chartChange")}`] : []);
|
|
497
568
|
n && a.push(p(e, "chartTotal"));
|
|
498
|
-
let o =
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
569
|
+
let o = this.extraFields;
|
|
570
|
+
for (let e of o) a.push(g(e));
|
|
571
|
+
let s = (this.data ?? []).map((i, a) => {
|
|
572
|
+
let s = t.map((e) => U(i[e.key])), c = [this.category(i)];
|
|
573
|
+
this.detail && c.push(this.detailText(i)), s.forEach((n, i) => {
|
|
574
|
+
if (c.push(this.fmt(n)), r) {
|
|
575
|
+
let r = U(this.compare[a]?.[t[i].key] ?? null);
|
|
576
|
+
c.push(this.fmt(r), n !== null && r !== null ? j(e, n, r, (e) => this.fmt(e)) : "–");
|
|
504
577
|
}
|
|
505
|
-
}), n &&
|
|
578
|
+
}), n && c.push(this.fmt(s.reduce((e, t) => e + (t ?? 0), 0)));
|
|
579
|
+
for (let t of o) c.push(_(e, i, t));
|
|
580
|
+
return c;
|
|
506
581
|
});
|
|
507
582
|
return {
|
|
508
583
|
caption: this.heading || p(e, "chartData"),
|
|
509
584
|
columns: a,
|
|
510
|
-
rows:
|
|
585
|
+
rows: s
|
|
511
586
|
};
|
|
512
587
|
}
|
|
513
588
|
renderPlot() {
|
|
@@ -516,31 +591,42 @@ var V = class extends r {
|
|
|
516
591
|
let i = this.layout();
|
|
517
592
|
this.layoutCache = i;
|
|
518
593
|
let s = this.chart.specs, c = s.labelSize, l = s.font, u = this.i18n.locale;
|
|
519
|
-
if (!i.n || !i.k) return
|
|
594
|
+
if (!i.n || !i.k) return P(u, r, this.chart.height || 120);
|
|
520
595
|
let d = i.horizontal, f = this.variant === "minimal", m = i.ticks.ticks.filter((e) => !f || e === 0).map((e) => {
|
|
521
596
|
let t = i.valueScale(e);
|
|
522
597
|
return f ? d ? n`<line class="axis" x1=${Math.round(t) + .5} x2=${Math.round(t) + .5} y1=${i.y0} y2=${i.y1}></line>` : n`<line class="axis" x1=${i.x0} x2=${i.x1} y1=${Math.round(t) + .5} y2=${Math.round(t) + .5}></line>` : d ? n`<line class=${e === 0 ? "axis" : "grid"} x1=${Math.round(t) + .5} x2=${Math.round(t) + .5} y1=${i.y0} y2=${i.y1}></line>
|
|
523
598
|
<text class="tick" x=${t} y=${i.y1 + c + 4 + s.clear} text-anchor="middle">${i.fmtTick(e)}</text>` : n`<line class=${e === 0 ? "axis" : "grid"} x1=${i.x0} x2=${i.x1} y1=${Math.round(t) + .5} y2=${Math.round(t) + .5}></line>
|
|
524
599
|
<text class="tick" x=${i.x0 - 8} y=${t} dy="0.32em" text-anchor="end">${i.fmtTick(e)}</text>`;
|
|
525
|
-
}), h = this.viewRows.map((e) => this.isCurrent(e)), g = h.some(Boolean), _
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
600
|
+
}), h = this.viewRows.map((e) => this.isCurrent(e)), g = h.some(Boolean), _, v = (e) => B(e, c, l), y = (e, t, r, a) => {
|
|
601
|
+
let o = Math.max(Math.round(t), Math.round(i.t), s.hitMin), l = Math.round(a === "middle" ? e - o / 2 : e - o), u = Math.round(r + c * .25 + s.clear / 2);
|
|
602
|
+
return n`<rect class="current-mark" x=${l} y=${u} width=${o} height=${s.indicator} rx=${s.indicator / 2}></rect>`;
|
|
603
|
+
};
|
|
604
|
+
if (d) {
|
|
605
|
+
let e = i.x0 - 8;
|
|
606
|
+
_ = i.cats.map((r, a) => {
|
|
607
|
+
let o = i.bands.center(a), s = L(r, e, c, l), u = i.details[a] ? L(i.details[a], e, c, l) : "", d = i.hasDetail ? o - i.lineStep / 2 : o, f = o + i.lineStep / 2, p = h[a] ? y(e, Math.max(v(s), v(u)), (i.hasDetail ? f : d) + c * .32, "end") : t;
|
|
608
|
+
return n`<text class=${h[a] ? "current" : ""} x=${e} y=${d} dy="0.32em" text-anchor="end">${s}</text>
|
|
609
|
+
${u ? n`<text class="detail" x=${e} y=${f} dy="0.32em" text-anchor="end">${u}</text>` : t}${p}`;
|
|
610
|
+
});
|
|
611
|
+
} else {
|
|
612
|
+
let e = i.y1 + c + 4 + s.clear, r = e + i.lineStep, a = Math.max(...i.cats.map(v), ...i.details.map(v)), o = (e, t) => Math.min(Math.max(i.bands.center(t), i.x0 + e / 2), i.x1 - e / 2), u = (e) => i.cats.map((t, n) => {
|
|
613
|
+
if (n % e) return null;
|
|
614
|
+
let r = L(t, i.bands.width * e - 4, c, l), a = i.details[n] ? L(i.details[n], i.bands.width * e - 4, c, l) : "", s = Math.max(v(r), v(a));
|
|
534
615
|
return {
|
|
535
|
-
text:
|
|
536
|
-
|
|
537
|
-
|
|
616
|
+
text: r,
|
|
617
|
+
detail: a,
|
|
618
|
+
x: o(s, n),
|
|
619
|
+
w: s
|
|
538
620
|
};
|
|
539
|
-
}),
|
|
540
|
-
for (;
|
|
541
|
-
_ =
|
|
621
|
+
}), d = (e) => e.filter((e) => e !== null).every((e, t, n) => t === 0 || e.x - e.w / 2 >= n[t - 1].x + n[t - 1].w / 2 + 4), f = Math.max(1, Math.ceil((a + 8) / Math.max(1, i.bands.width))), p = u(f);
|
|
622
|
+
for (; f < i.cats.length && !d(p);) p = u(++f);
|
|
623
|
+
_ = p.map((a, o) => {
|
|
624
|
+
let s = h[o] ? y(a?.x ?? i.bands.center(o), Math.min(a?.w ?? 0, i.bands.width), i.hasDetail ? r : e, "middle") : t;
|
|
625
|
+
return a ? n`<text class=${h[o] ? "current" : ""} x=${a.x} y=${e} text-anchor="middle">${a.text}</text>
|
|
626
|
+
${a.detail ? n`<text class="detail" x=${a.x} y=${r} text-anchor="middle">${a.detail}</text>` : t}${s}` : n`${s}`;
|
|
627
|
+
});
|
|
542
628
|
}
|
|
543
|
-
let
|
|
629
|
+
let b = i.series, x = this.hot, S = i.ghosts.map((e) => n`<path class="ghost" style=${a({ "--_bk-chart-c": F(b[e.j], e.j, b.length) })} d=${e.path}></path>`), C = k(i.marks, {
|
|
544
630
|
vertical: !d,
|
|
545
631
|
inset: s.clear,
|
|
546
632
|
x0: i.x0,
|
|
@@ -557,8 +643,8 @@ var V = class extends r {
|
|
|
557
643
|
let n = i.bands.start(t);
|
|
558
644
|
return [n, n + i.bands.width];
|
|
559
645
|
}
|
|
560
|
-
}, u),
|
|
561
|
-
style=${a({ "--_bk-chart-c":
|
|
646
|
+
}, u), w = this.brush.span, T = w && this.selectable ? d ? n`<rect class="selection" x=${i.x0} y=${i.bands.start(w[0])} width=${i.x1 - i.x0} height=${(w[1] - w[0] + 1) * i.bands.width}></rect>` : n`<rect class="selection" x=${i.bands.start(w[0])} y=${i.y0} width=${(w[1] - w[0] + 1) * i.bands.width} height=${i.y1 - i.y0}></rect>` : t, E = i.bars.map((e) => e.path ? n`<path class="mark ${x && x.i === e.i && x.j === e.j ? "hot" : ""} ${g && !h[e.i] ? "rest" : ""}" data-slot=${I(b[e.j], e.j)}
|
|
647
|
+
style=${a({ "--_bk-chart-c": F(b[e.j], e.j, b.length) })} d=${e.path}></path>` : n``), D = i.bars.map((e) => e.stub ? n`<path class="stub" d=${e.stub}></path>` : n``), O = [];
|
|
562
648
|
if (this.labels && !i.percent) {
|
|
563
649
|
let e = i.stacked ? i.totals.map((e, t) => {
|
|
564
650
|
let n = i.bars.filter((e) => e.i === t && e.path);
|
|
@@ -574,12 +660,12 @@ var V = class extends r {
|
|
|
574
660
|
})), t = d ? 1e400 : i.stacked ? i.bands.width : i.t + s.gap + Math.max(0, (i.bands.width - (i.t + s.gap) * i.k) / i.k);
|
|
575
661
|
for (let r of e) {
|
|
576
662
|
if (!r) continue;
|
|
577
|
-
let e = this.fmt(r.v), a =
|
|
578
|
-
a > t || !d && r.neg && r.b.y + r.b.h + c + 2 > i.y1 || d && r.neg && r.b.x - a - 4 < i.x0 ||
|
|
663
|
+
let e = this.fmt(r.v), a = B(e, c, l);
|
|
664
|
+
a > t || !d && r.neg && r.b.y + r.b.h + c + 2 > i.y1 || d && r.neg && r.b.x - a - 4 < i.x0 || O.push(d ? n`<text class="value-label" x=${r.neg ? r.b.x - 4 : r.b.x + r.b.w + 4} y=${r.b.y + r.b.h / 2} dy="0.32em" text-anchor=${r.neg ? "end" : "start"}>${e}</text>` : n`<text class="value-label" x=${r.b.x + r.b.w / 2} y=${r.neg ? r.b.y + r.b.h + c : r.b.y - s.clear - s.gap} text-anchor="middle">${e}</text>`);
|
|
579
665
|
}
|
|
580
666
|
}
|
|
581
|
-
let
|
|
582
|
-
if (
|
|
667
|
+
let A = i.seriesLabels.map((e) => n`<text x=${i.x1 + 8} y=${e.y} dy="0.32em">${e.text}</text>`), j = this.active, M = this.pickMode;
|
|
668
|
+
if (M) {
|
|
583
669
|
let n = (e) => {
|
|
584
670
|
let t = Math.round(i.bands.start(e)), n = Math.round(i.bands.start(e) + i.bands.width);
|
|
585
671
|
return d ? {
|
|
@@ -593,44 +679,45 @@ var V = class extends r {
|
|
|
593
679
|
width: `${n - t}px`,
|
|
594
680
|
height: `${Math.round(i.H)}px`
|
|
595
681
|
};
|
|
596
|
-
}, s = (e) => i.bars.find((t) => t.i === e && t.j === Math.min(
|
|
682
|
+
}, s = (e) => i.bars.find((t) => t.i === e && t.j === Math.min(j.j, i.k - 1)) ?? i.bars.find((t) => t.i === e), c = {
|
|
597
683
|
enter: (e) => this.enter(s(e)),
|
|
598
684
|
focus: (e) => {
|
|
599
685
|
this.active = {
|
|
600
686
|
i: e,
|
|
601
|
-
j:
|
|
687
|
+
j: j.j
|
|
602
688
|
}, this.enter(s(e));
|
|
603
689
|
}
|
|
604
|
-
}, l = i.cats.map((r, i) =>
|
|
690
|
+
}, l = i.cats.map((e, t) => M === "link" && !i.empty[t] ? this.categoryHref(this.viewRows[t]) : null), f = (e) => M === "link" ? l[e] !== null : !i.empty[e], g = f(j.i) ? j.i : i.cats.findIndex((e, t) => f(t)), v = i.cats.map((r, i) => f(i) ? M === "link" ? e`<a class="cat interactive" part="category" data-i=${i} href=${this.links.href(l[i])}
|
|
605
691
|
target=${o(this.target)} rel=${o(this.rel)} aria-current=${h[i] ? "page" : t} aria-label=${this.categoryLabel(i)}
|
|
606
|
-
style=${a(n(i))} @click=${this.links.click} @pointerenter=${() => c.enter(i)} @focus=${() => c.focus(i)} @blur=${this.onBlur}></a>` : e`<button type="button" class="cat interactive" part="category" data-i=${i} tabindex=${i ===
|
|
692
|
+
style=${a(n(i))} @click=${this.links.click} @pointerenter=${() => c.enter(i)} @focus=${() => c.focus(i)} @blur=${this.onBlur}></a>` : e`<button type="button" class="cat interactive" part="category" data-i=${i} tabindex=${i === g ? 0 : -1}
|
|
607
693
|
aria-current=${h[i] ? "true" : t} aria-label=${this.categoryLabel(i)}
|
|
608
|
-
style=${a(n(i))} @click=${() => this.choose(i)} @pointerenter=${() => c.enter(i)} @focus=${() => c.focus(i)} @blur=${this.onBlur}></button>`)
|
|
694
|
+
style=${a(n(i))} @click=${() => this.choose(i)} @pointerenter=${() => c.enter(i)} @focus=${() => c.focus(i)} @blur=${this.onBlur}></button>` : e`<div class="cat" data-i=${i} role="img" aria-label=${this.categoryLabel(i)} aria-current=${h[i] ? M === "link" ? "page" : "true" : t}
|
|
695
|
+
style=${a(n(i))} @pointerenter=${() => c.enter(i)}></div>`);
|
|
609
696
|
return e`<div class="plot" part="plot" style=${a(d ? { height: `${i.H}px` } : {})}>
|
|
610
697
|
<svg width=${r} height=${i.H} aria-hidden="true">
|
|
611
|
-
${
|
|
698
|
+
${V()}
|
|
612
699
|
<g>${m}${_}</g>
|
|
613
|
-
<g>${
|
|
614
|
-
<g>${
|
|
700
|
+
<g>${C.back}${S}${E}${D}${C.front}</g>
|
|
701
|
+
<g>${O}${A}</g>
|
|
615
702
|
</svg>
|
|
616
|
-
<div class="cats" role=${
|
|
703
|
+
<div class="cats" role=${M === "button" ? "toolbar" : "group"} aria-orientation=${o(M === "button" ? d ? "vertical" : "horizontal" : void 0)}
|
|
617
704
|
aria-label=${this.heading || this.getAttribute("aria-label") || p(u, "chartData")}
|
|
618
|
-
@keydown=${this.onCategoryKey} @pointerleave=${this.onLeave}>${
|
|
705
|
+
@keydown=${this.onCategoryKey} @pointerleave=${this.onLeave}>${v}</div>
|
|
619
706
|
</div>`;
|
|
620
707
|
}
|
|
621
|
-
let
|
|
622
|
-
tabindex=${e.i ===
|
|
623
|
-
@pointerenter=${() => this.enter(e)} @focus=${(t) => this.onFocus(t, e)} @blur=${this.onBlur}></rect>`),
|
|
624
|
-
height=${Math.max(
|
|
708
|
+
let N = i.bars.map((e) => n`<rect class="hit" data-i=${e.i} data-j=${e.j} role="img" aria-label=${this.markLabel(e)}
|
|
709
|
+
tabindex=${e.i === j.i && e.j === j.j ? 0 : -1} x=${e.hx} y=${e.hy} width=${Math.max(1, e.hw)} height=${Math.max(1, e.hh)}
|
|
710
|
+
@pointerenter=${() => this.enter(e)} @focus=${(t) => this.onFocus(t, e)} @blur=${this.onBlur}></rect>`), R = this.ring ? i.bars.find((e) => e.i === j.i && e.j === j.j) : void 0, z = R ? n`<rect class="ring" x=${R.x - 3} y=${R.y - 3} width=${R.w + 6}
|
|
711
|
+
height=${Math.max(R.h, 1) + 6} rx=${s.radius + 2}></rect>` : t;
|
|
625
712
|
return e`<div class="plot" part="plot" style=${a(d ? { height: `${i.H}px` } : {})}>
|
|
626
713
|
<svg width=${r} height=${i.H} role="group" aria-label=${this.heading || p(u, "chartData")}
|
|
627
714
|
@keydown=${this.onKey} @pointerleave=${this.onLeave} @pointerdown=${this.onDown} @pointermove=${this.onMove} @pointerup=${this.onUp}>
|
|
628
|
-
${
|
|
715
|
+
${V()}
|
|
629
716
|
<g aria-hidden="true">${m}${_}</g>
|
|
630
|
-
<g aria-hidden="true">${
|
|
631
|
-
<g aria-hidden="true">${
|
|
632
|
-
<g>${
|
|
633
|
-
${
|
|
717
|
+
<g aria-hidden="true">${C.back}${T}${S}${E}${D}${C.front}</g>
|
|
718
|
+
<g aria-hidden="true">${O}${A}</g>
|
|
719
|
+
<g>${N}</g>
|
|
720
|
+
${z}
|
|
634
721
|
</svg>
|
|
635
722
|
</div>`;
|
|
636
723
|
}
|
|
@@ -642,21 +729,21 @@ var V = class extends r {
|
|
|
642
729
|
if (this.mode !== "grouped" && t.length > 1) {
|
|
643
730
|
let o = n.map((e, n) => ({
|
|
644
731
|
name: i[n],
|
|
645
|
-
value: t.reduce((t, n) => t + Math.max(0,
|
|
732
|
+
value: t.reduce((t, n) => t + Math.max(0, U(e[n.key]) ?? 0), 0)
|
|
646
733
|
}));
|
|
647
|
-
a.push(
|
|
648
|
-
} else t.slice(0, 3).forEach((t) => a.push(
|
|
734
|
+
a.push(M(e, this.heading || p(e, "chartTotal"), o, r));
|
|
735
|
+
} else t.slice(0, 3).forEach((t) => a.push(M(e, t.label, n.map((e, n) => ({
|
|
649
736
|
name: i[n],
|
|
650
|
-
value:
|
|
737
|
+
value: U(e[t.key])
|
|
651
738
|
})), r)));
|
|
652
739
|
if (this.compare?.length && this.mode === "grouped" && !this.contiguous) {
|
|
653
|
-
let i = n.reduce((e, n) => e + (
|
|
740
|
+
let i = n.reduce((e, n) => e + (U(n[t[0].key]) ?? 0), 0), o = n.reduce((e, n, r) => e + (U(this.compare[this.viewStart + r]?.[t[0].key] ?? null) ?? 0), 0);
|
|
654
741
|
a.push(p(e, "chartSummaryCompare", {
|
|
655
742
|
previous: this.compareLabel || p(e, "chartPrevious"),
|
|
656
|
-
change:
|
|
743
|
+
change: j(e, i, o, r)
|
|
657
744
|
}));
|
|
658
745
|
}
|
|
659
|
-
return a.push(
|
|
746
|
+
return a.push(D(e, E(this), r, (e) => String(e))), a.filter(Boolean).join(" ");
|
|
660
747
|
}
|
|
661
748
|
selectionStatus() {
|
|
662
749
|
if (!this.selectable) return;
|
|
@@ -672,7 +759,7 @@ var V = class extends r {
|
|
|
672
759
|
render() {
|
|
673
760
|
let n = this.i18n.locale, r = this.effectiveSeries, i = r.map((e, t) => ({
|
|
674
761
|
label: e.label,
|
|
675
|
-
color:
|
|
762
|
+
color: F(e, t, r.length)
|
|
676
763
|
}));
|
|
677
764
|
this.compare?.length && this.mode === "grouped" && !this.contiguous && i.push({
|
|
678
765
|
label: this.compareLabel || p(n, "chartPrevious"),
|
|
@@ -680,7 +767,7 @@ var V = class extends r {
|
|
|
680
767
|
pattern: "outlined"
|
|
681
768
|
});
|
|
682
769
|
let a = i.length >= 2 ? e`<bk-chart-legend marker="rect" .items=${i}></bk-chart-legend>` : t, o = this.range ? e`<div class="tools"><button type="button" class="toggle interactive" part="reset" @click=${() => this.reset()}>${p(n, "chartResetZoom")}</button></div>` : t;
|
|
683
|
-
return
|
|
770
|
+
return R({
|
|
684
771
|
locale: n,
|
|
685
772
|
heading: this.heading,
|
|
686
773
|
level: this.level,
|
|
@@ -700,5 +787,5 @@ var V = class extends r {
|
|
|
700
787
|
});
|
|
701
788
|
}
|
|
702
789
|
};
|
|
703
|
-
s("bk-chart-bar",
|
|
704
|
-
export {
|
|
790
|
+
s("bk-chart-bar", G);
|
|
791
|
+
export { G as BkChartBar };
|