@bk2k/ui 0.6.8 → 0.7.1
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 +56 -2
- package/CHANGELOG.md +199 -0
- package/USAGE.md +102 -28
- 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 +2 -1
- package/dist/clipboard.js +1 -0
- package/dist/components/bk-alert.js +3 -2
- 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 +42 -14
- package/dist/components/bk-button.js +67 -20
- package/dist/components/bk-card.d.ts +7 -0
- package/dist/components/bk-card.js +21 -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 +10 -0
- package/dist/components/bk-chart-bar.d.ts +17 -0
- package/dist/components/bk-chart-bar.js +25 -4
- package/dist/components/bk-chart-line.d.ts +28 -0
- package/dist/components/bk-chart-line.js +27 -7
- 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 +55 -8
- package/dist/components/bk-chip.js +46 -8
- 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 +3 -3
- package/dist/components/bk-combobox.js +9 -21
- package/dist/components/bk-delta.d.ts +10 -0
- package/dist/components/bk-delta.js +8 -6
- package/dist/components/bk-dialog.d.ts +12 -5
- package/dist/components/bk-dialog.js +14 -6
- 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.js +3 -2
- 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 +69 -6
- package/dist/components/bk-image-compare.js +116 -32
- 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 +178 -11
- package/dist/components/bk-image-viewer.js +310 -52
- package/dist/components/bk-input-color.d.ts +2 -5
- package/dist/components/bk-input-color.js +0 -14
- package/dist/components/bk-input-file.d.ts +17 -0
- package/dist/components/bk-input-file.js +18 -8
- 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-tags.d.ts +219 -0
- package/dist/components/bk-input-tags.js +293 -0
- package/dist/components/bk-input-text.d.ts +20 -0
- package/dist/components/bk-input-text.js +34 -4
- package/dist/components/bk-input-time.js +2 -1
- package/dist/components/bk-item.js +2 -1
- package/dist/components/bk-lightbox.d.ts +37 -4
- package/dist/components/bk-lightbox.js +13 -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-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.d.ts +2 -0
- package/dist/components/bk-page-cta.js +10 -1
- 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-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-shell-app.d.ts +10 -4
- package/dist/components/bk-shell-app.js +32 -9
- package/dist/components/bk-shell-sites.d.ts +2 -1
- package/dist/components/bk-shell-sites.js +3 -5
- package/dist/components/bk-sortable.js +7 -17
- package/dist/components/bk-split-grid.d.ts +104 -3
- package/dist/components/bk-split-grid.js +430 -2
- package/dist/components/bk-stat-group.js +2 -1
- package/dist/components/bk-stat.d.ts +19 -0
- package/dist/components/bk-stat.js +8 -4
- 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 +3 -1
- package/dist/components/bk-table.js +10 -13
- 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 +52 -8
- package/dist/components/bk-tabs.js +181 -97
- 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 +12 -1
- package/dist/i18n/en.d.ts +2 -0
- package/dist/i18n/en.js +3 -0
- package/dist/i18n.d.ts +16 -2
- package/dist/i18n.js +28 -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 +14 -1
- package/dist/internal/announcer.js +33 -12
- 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.js +4 -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/define.d.ts +9 -0
- package/dist/internal/define.js +47 -1
- package/dist/internal/drag.d.ts +11 -0
- package/dist/internal/drag.js +23 -0
- package/dist/internal/elements.d.ts +6 -0
- package/dist/internal/elements.js +5 -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.js +2 -5
- package/dist/internal/hue.d.ts +8 -0
- package/dist/internal/hue.js +15 -4
- 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/bk-tabs.d.ts +4 -0
- package/dist/internal/late/bk-tabs.js +8 -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 +8 -3
- package/dist/internal/late.js +19 -4
- 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/internal/tags.d.ts +15 -0
- package/dist/internal/tags.js +44 -0
- package/dist/internal/text-field.d.ts +2 -0
- package/dist/internal/text-field.js +8 -0
- package/dist/internal/toggle-control.js +3 -1
- package/dist/jsx.d.ts +222 -54
- package/dist/kit.d.ts +1 -0
- package/dist/kit.js +3 -0
- 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 +17 -13
- 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 +15 -5
- 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 +7 -7
- package/dist/standalone/bk-button-group.js +5 -5
- package/dist/standalone/bk-button-share.js +7 -7
- 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 +26 -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 +145 -117
- 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 +128 -107
- 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 +7 -7
- package/dist/standalone/bk-checkbox.js +4 -4
- package/dist/standalone/bk-chip-group.js +11 -7
- package/dist/standalone/bk-chip.js +59 -18
- 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 +23 -31
- package/dist/standalone/bk-command-menu.js +6 -6
- package/dist/standalone/bk-command-palette.js +8 -7
- 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 +5 -5
- 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 +2 -2
- package/dist/standalone/bk-facts.js +9 -8
- 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 +127 -58
- package/dist/standalone/bk-image-crop.js +6 -6
- package/dist/standalone/bk-image-editor.js +1 -1
- package/dist/standalone/bk-image-viewer.js +283 -92
- package/dist/standalone/bk-input-code.js +4 -4
- package/dist/standalone/bk-input-color.js +4 -14
- 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 +22 -15
- 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-tags.js +224 -0
- 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 +24 -7
- package/dist/standalone/bk-lines.js +1 -1
- package/dist/standalone/bk-link.js +33 -19
- package/dist/standalone/bk-listbox-columns.js +8 -8
- 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 +4 -4
- 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 +9 -9
- 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 +13 -4
- 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 +4 -4
- package/dist/standalone/bk-picture.js +1 -166
- package/dist/standalone/bk-popover-help.js +3 -3
- package/dist/standalone/bk-popover.js +2 -2
- package/dist/standalone/bk-presence-cursor.js +3 -3
- 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 +7 -7
- 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 +17 -15
- package/dist/standalone/bk-select-cascade.js +3 -3
- package/dist/standalone/bk-select-tree.js +4 -4
- package/dist/standalone/bk-select.js +5 -5
- package/dist/standalone/bk-shell-app.js +1 -1221
- 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 +55 -60
- package/dist/standalone/bk-spinner.js +2 -2
- package/dist/standalone/bk-split-grid.js +324 -44
- package/dist/standalone/bk-split.js +8 -8
- package/dist/standalone/bk-stack.js +1 -1
- package/dist/standalone/bk-stat-group.js +8 -7
- package/dist/standalone/bk-stat.js +12 -9
- 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 +8 -8
- 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 -1937
- package/dist/standalone/bk-tabs-item.js +58 -35
- package/dist/standalone/bk-tabs-panel.js +7 -3
- package/dist/standalone/bk-tabs.js +3 -352
- 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 +21 -20
- 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 +5 -5
- 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-6tMlCOq1.js +41 -0
- package/dist/standalone/chunks/{appearance-waHnV0kk.js → appearance-CBOJXbmC.js} +1 -1
- package/dist/standalone/chunks/{bk-alert-offline-B1bQxOZp.js → bk-alert-offline-hCLuG-RM.js} +3 -3
- package/dist/standalone/chunks/{bk-carousel-BCwIQhG5.js → bk-carousel-_dudBMVq.js} +4 -4
- package/dist/standalone/chunks/{bk-diagram-DWK8CvRZ.js → bk-diagram-BB2odomE.js} +5 -5
- package/dist/standalone/chunks/{bk-dialog-DX0cPJ1o.js → bk-dialog-DcvwnOtN.js} +59 -25
- package/dist/standalone/chunks/{bk-icon-DssFsNuB.js → bk-icon-D4kI4F18.js} +4 -3
- package/dist/standalone/chunks/{bk-image-editor-DXEj9gCu.js → bk-image-editor-SRVkHI-4.js} +5 -5
- package/dist/standalone/chunks/{bk-input-date-range-Cbx_lpf0.js → bk-input-date-range-C0Vd-p0T.js} +2 -2
- package/dist/standalone/chunks/{bk-input-rich-ZB68vziu.js → bk-input-rich-AmDv87E5.js} +6 -6
- package/dist/standalone/chunks/{bk-input-text-DD32uWNO.js → bk-input-text-2n89GDIT.js} +73 -54
- package/dist/standalone/chunks/{bk-model-viewer-Dr81ahVv.js → bk-model-viewer-BoNYBd6W.js} +4 -4
- package/dist/standalone/chunks/bk-picture-CA5gLxgZ.js +186 -0
- package/dist/standalone/chunks/{bk-qr-code-QaYvZwOR.js → bk-qr-code-CSFfc8As.js} +3 -3
- package/dist/standalone/chunks/bk-shell-app-BlCOG25y.js +1236 -0
- package/dist/standalone/chunks/{bk-surface-DkIhrWMt.js → bk-surface-BULRdKam.js} +9 -7
- package/dist/standalone/chunks/{bk-swatch-palette-BNNXTP3w.js → bk-swatch-palette-Cqj85tSW.js} +6 -6
- package/dist/standalone/chunks/bk-table-DWlD7yoM.js +1945 -0
- package/dist/standalone/chunks/bk-tabs-STkr3-E1.js +422 -0
- package/dist/standalone/chunks/{bk-toast-group-BSeO_rPs.js → bk-toast-group-5nZg7BaJ.js} +27 -24
- package/dist/standalone/chunks/{brush-Bn3lPdHN.js → brush-DALmXSru.js} +18 -2
- package/dist/standalone/chunks/{busy-B7Mxemwm.js → busy-eG3uHonz.js} +5 -4
- package/dist/standalone/chunks/{chart-tokens-D1Exf7BW.js → chart-tokens-DQ4hVSmn.js} +2 -2
- package/dist/standalone/chunks/{choice-field-CGvE4tyb.js → choice-field-B0oe_9fI.js} +6 -6
- package/dist/standalone/chunks/{choice-item-B6-9ZRlf.js → choice-item-Cx-nm1js.js} +17 -8
- package/dist/standalone/chunks/{clipboard-Crzt1Sh9.js → clipboard-RqIeP9Uz.js} +1 -1
- package/dist/standalone/chunks/{clipboard-BKlrP5rj.js → clipboard-UVLSkL4C.js} +1 -1
- package/dist/standalone/chunks/{crop-frame-poLCGrBG.js → crop-frame-Z9N0QML4.js} +1 -11
- package/dist/standalone/chunks/{date-field-BlI6grfT.js → date-field-Dy1_qxNv.js} +48 -47
- package/dist/standalone/chunks/define-6OfuRn5c.js +60 -0
- 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-CyXQIJ2x.js → form-control-Bmk0SRDX.js} +2 -2
- package/dist/standalone/chunks/{frame-abXBnl8a.js → frame-xIMVEUCi.js} +5 -4
- package/dist/standalone/chunks/{handle-menu-ZVR_msk2.js → handle-menu-BAe9fPYJ.js} +14 -33
- package/dist/standalone/chunks/{heading-text-CV5gBf7k.js → heading-text-B2kF-b8p.js} +1 -1
- package/dist/standalone/chunks/hue-vLbNdAEl.js +20 -0
- package/dist/standalone/chunks/{i18n-B6Al9xCK.js → i18n-DFfGgd3d.js} +49 -34
- package/dist/standalone/chunks/{i18n-BI16HQmm.js → i18n-DQAcbHkY.js} +1 -1
- package/dist/standalone/chunks/late-CPQ_RbU-.js +30 -0
- package/dist/standalone/chunks/link--YWr8exL.js +69 -0
- package/dist/standalone/chunks/{marks-0kbeB4n8.js → marks-pOUDNUf1.js} +2 -2
- package/dist/standalone/chunks/{options-DMEc8rQt.js → options-ySaDL-dW.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-ac49G87f.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-ggoyjMvC.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-BAUc_LqI.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-BK-B4m5A.js → summary-W5s0TFqV.js} +1 -1
- package/dist/standalone/chunks/tags-CMLAGsVw.js +37 -0
- package/dist/standalone/chunks/{text-field-4IUUpRHE.js → text-field-CufOGdfr.js} +17 -11
- package/dist/standalone/chunks/{toggle-control-ioV2jhNY.js → toggle-control-Cgqp1jhf.js} +5 -3
- package/dist/standalone/chunks/{tokens-BuahF1lF.js → tokens-C_ul7pL9.js} +4 -3
- package/dist/standalone/chunks/{virtual-B-1oN14Y.js → virtual-D-qgACnE.js} +1 -1
- package/dist/standalone/confirm.js +27 -14
- package/dist/standalone/i18n-de.js +13 -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 +6 -5
- package/dist/tokens.css +6 -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-B_TlKzWj.js +0 -275
- package/dist/standalone/chunks/define-CzVPD4Zi.js +0 -30
- package/dist/standalone/chunks/hue-Jvb-141g.js +0 -14
- package/dist/standalone/chunks/keyed-CZ2AaouM.js +0 -16
- package/dist/standalone/chunks/link-CWSMsx04.js +0 -60
|
@@ -1,24 +1,24 @@
|
|
|
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-6OfuRn5c.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 },
|
|
@@ -86,10 +86,14 @@ var V = class extends r {
|
|
|
86
86
|
valueFormat: {
|
|
87
87
|
attribute: "value-format",
|
|
88
88
|
type: Object
|
|
89
|
+
},
|
|
90
|
+
tooltipFields: {
|
|
91
|
+
attribute: "tooltip-fields",
|
|
92
|
+
converter: m
|
|
89
93
|
}
|
|
90
94
|
};
|
|
91
95
|
i18n = new c(this);
|
|
92
|
-
chart = new
|
|
96
|
+
chart = new W(this);
|
|
93
97
|
hot = null;
|
|
94
98
|
active = {
|
|
95
99
|
i: 0,
|
|
@@ -99,7 +103,7 @@ var V = class extends r {
|
|
|
99
103
|
viewStart = 0;
|
|
100
104
|
viewRows = [];
|
|
101
105
|
layoutCache = null;
|
|
102
|
-
brush = new
|
|
106
|
+
brush = new v((e, t) => this.applyRange(e, t));
|
|
103
107
|
links = new d(this);
|
|
104
108
|
constructor() {
|
|
105
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;
|
|
@@ -147,12 +151,12 @@ var V = class extends r {
|
|
|
147
151
|
return o ? null : s;
|
|
148
152
|
}
|
|
149
153
|
isEmpty(e) {
|
|
150
|
-
return this.effectiveSeries.every((t) =>
|
|
154
|
+
return this.effectiveSeries.every((t) => U(e?.[t.key]) === null);
|
|
151
155
|
}
|
|
152
156
|
detailText(e) {
|
|
153
157
|
if (!this.detail) return "";
|
|
154
158
|
let t = e?.[this.detail];
|
|
155
|
-
return t instanceof Date ?
|
|
159
|
+
return t instanceof Date ? b(this.i18n.locale, t.getTime()) : t == null ? "" : String(t);
|
|
156
160
|
}
|
|
157
161
|
categoryName(e) {
|
|
158
162
|
let t = this.category(e), n = this.detailText(e);
|
|
@@ -176,11 +180,12 @@ var V = class extends r {
|
|
|
176
180
|
u(this, "select", r, !0) && (this.current = this.rawKey(n));
|
|
177
181
|
}
|
|
178
182
|
categoryLabel(e) {
|
|
179
|
-
|
|
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;
|
|
180
185
|
}
|
|
181
186
|
static styles = [
|
|
182
187
|
l,
|
|
183
|
-
...
|
|
188
|
+
...H,
|
|
184
189
|
i`
|
|
185
190
|
.plot { height: var(--bk-chart-height); }
|
|
186
191
|
:host([orientation="horizontal"]) .plot { height: auto; }
|
|
@@ -208,17 +213,17 @@ var V = class extends r {
|
|
|
208
213
|
.cat:hover { outline: var(--bk-border-width) solid Highlight; outline-offset: var(--bk-focus-offset-inset); }
|
|
209
214
|
}
|
|
210
215
|
`,
|
|
211
|
-
|
|
216
|
+
A
|
|
212
217
|
];
|
|
213
218
|
get effectiveSeries() {
|
|
214
|
-
return
|
|
219
|
+
return N(this.series, this.data, this.x);
|
|
215
220
|
}
|
|
216
221
|
category(e) {
|
|
217
222
|
let t = e?.[this.x];
|
|
218
|
-
return t instanceof Date ?
|
|
223
|
+
return t instanceof Date ? b(this.i18n.locale, t.getTime()) : t == null ? "" : String(t);
|
|
219
224
|
}
|
|
220
225
|
fmt(e) {
|
|
221
|
-
return
|
|
226
|
+
return y(this.i18n.locale, e, this.valueFormat);
|
|
222
227
|
}
|
|
223
228
|
willUpdate(e) {
|
|
224
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")) {
|
|
@@ -230,17 +235,17 @@ var V = class extends r {
|
|
|
230
235
|
}
|
|
231
236
|
}
|
|
232
237
|
layout() {
|
|
233
|
-
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 ?
|
|
234
|
-
if (f)
|
|
235
|
-
else if (s)
|
|
236
|
-
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));
|
|
237
242
|
if (c && !f) for (let e = 0; e < i; e++) for (let t = 0; t < a; t++) {
|
|
238
243
|
let n = l(e, t);
|
|
239
|
-
n !== null && (
|
|
244
|
+
n !== null && (_ = Math.min(_, n), v = Math.max(v, n));
|
|
240
245
|
}
|
|
241
|
-
let
|
|
242
|
-
|
|
243
|
-
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) => {
|
|
244
249
|
if (this.contiguous) return {
|
|
245
250
|
t: Math.max(1, e - t.gap),
|
|
246
251
|
groupW: Math.max(1, e - t.gap)
|
|
@@ -250,31 +255,36 @@ var V = class extends r {
|
|
|
250
255
|
t: i,
|
|
251
256
|
groupW: n * (i * (1 + u) + r) + (n - 1) * t.gap
|
|
252
257
|
};
|
|
253
|
-
},
|
|
258
|
+
}, I, L, R, V, H, W = this.labels ? b + 4 + t.clear + t.gap : 0, G, K;
|
|
254
259
|
if (o) {
|
|
255
|
-
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 +
|
|
256
|
-
|
|
257
|
-
let l =
|
|
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;
|
|
258
263
|
if (this.labels && !f) {
|
|
259
|
-
let e = Math.max(0, ...p.flatMap((e, t) => s ? [m[t]] : e).map((e) =>
|
|
264
|
+
let e = Math.max(0, ...p.flatMap((e, t) => s ? [m[t]] : e).map((e) => B(this.fmt(e), b, x)));
|
|
260
265
|
d = Math.max(d, e + 8);
|
|
261
266
|
}
|
|
262
|
-
|
|
267
|
+
R = e - d;
|
|
263
268
|
} else {
|
|
264
|
-
|
|
265
|
-
let n = Math.max(...G.ticks.map((e) =>
|
|
266
|
-
|
|
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;
|
|
267
272
|
}
|
|
268
273
|
let q = [];
|
|
269
274
|
if (!o && s && a >= 2 && a <= 4 && i > 0 && this.seriesLabels !== "none") {
|
|
270
|
-
let t = Math.max(...n.map((e) =>
|
|
271
|
-
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) => ({
|
|
272
277
|
j: t,
|
|
273
278
|
y: 0,
|
|
274
279
|
text: e.label
|
|
275
280
|
})));
|
|
276
281
|
}
|
|
277
|
-
|
|
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 = [], $ = [];
|
|
278
288
|
for (let e = 0; e < i; e++) {
|
|
279
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;
|
|
280
290
|
for (let h = 0; h < a; h++) {
|
|
@@ -287,13 +297,13 @@ var V = class extends r {
|
|
|
287
297
|
}
|
|
288
298
|
let O = (v ?? 0) < 0, k;
|
|
289
299
|
if (o) {
|
|
290
|
-
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)] : [
|
|
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];
|
|
291
301
|
k = {
|
|
292
302
|
i: e,
|
|
293
303
|
j: h,
|
|
294
304
|
value: g,
|
|
295
305
|
share: y,
|
|
296
|
-
path: v === null ? "" :
|
|
306
|
+
path: v === null ? "" : z(n, T, r, X, t.radius, i),
|
|
297
307
|
x: n,
|
|
298
308
|
y: T,
|
|
299
309
|
w: r,
|
|
@@ -307,13 +317,13 @@ var V = class extends r {
|
|
|
307
317
|
stub: ""
|
|
308
318
|
};
|
|
309
319
|
} else {
|
|
310
|
-
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)] : [
|
|
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];
|
|
311
321
|
k = {
|
|
312
322
|
i: e,
|
|
313
323
|
j: h,
|
|
314
324
|
value: g,
|
|
315
325
|
share: y,
|
|
316
|
-
path: v === null ? "" :
|
|
326
|
+
path: v === null ? "" : z(T, n, X, r, t.radius, i),
|
|
317
327
|
x: T,
|
|
318
328
|
y: n,
|
|
319
329
|
w: X,
|
|
@@ -329,7 +339,7 @@ var V = class extends r {
|
|
|
329
339
|
}
|
|
330
340
|
if (g === null && (!s || M[e] && h === 0)) {
|
|
331
341
|
let e = Math.max(t.clear, Math.round(X / 2));
|
|
332
|
-
k.stub = o ?
|
|
342
|
+
k.stub = o ? z(Z, T, e, X, t.radius, "right") : z(T, Z - e, X, e, t.radius, "top");
|
|
333
343
|
}
|
|
334
344
|
Q.push(k);
|
|
335
345
|
let A = l(e, h);
|
|
@@ -337,7 +347,7 @@ var V = class extends r {
|
|
|
337
347
|
let e = T - X * u - t.gap, n = X * u, r = J(A), i = A < 0 ? o ? "left" : "bottom" : o ? "right" : "top";
|
|
338
348
|
$.push({
|
|
339
349
|
j: h,
|
|
340
|
-
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)
|
|
341
351
|
});
|
|
342
352
|
}
|
|
343
353
|
}
|
|
@@ -348,18 +358,18 @@ var V = class extends r {
|
|
|
348
358
|
let n = e.find((e) => e.j === t.j);
|
|
349
359
|
return {
|
|
350
360
|
...t,
|
|
351
|
-
y: n && n.value && n.h >=
|
|
361
|
+
y: n && n.value && n.h >= b ? n.y + n.h / 2 : NaN
|
|
352
362
|
};
|
|
353
363
|
}).filter((e) => Number.isFinite(e.y));
|
|
354
364
|
let t = q.map((e) => e.y).sort((e, t) => e - t);
|
|
355
|
-
t.some((e, n) => n && e - t[n - 1] <
|
|
365
|
+
t.some((e, n) => n && e - t[n - 1] < b + 2) && (q = []);
|
|
356
366
|
}
|
|
357
367
|
return {
|
|
358
|
-
H:
|
|
359
|
-
x0:
|
|
360
|
-
x1:
|
|
361
|
-
y0:
|
|
362
|
-
y1:
|
|
368
|
+
H: I,
|
|
369
|
+
x0: L,
|
|
370
|
+
x1: R,
|
|
371
|
+
y0: V,
|
|
372
|
+
y1: H,
|
|
363
373
|
ticks: G,
|
|
364
374
|
fmtTick: K,
|
|
365
375
|
valueScale: J,
|
|
@@ -370,7 +380,7 @@ var V = class extends r {
|
|
|
370
380
|
cmp: !!c,
|
|
371
381
|
t: X,
|
|
372
382
|
zero: Z,
|
|
373
|
-
cats:
|
|
383
|
+
cats: D,
|
|
374
384
|
details: k,
|
|
375
385
|
hasDetail: A,
|
|
376
386
|
empty: M,
|
|
@@ -386,21 +396,27 @@ var V = class extends r {
|
|
|
386
396
|
k: a
|
|
387
397
|
};
|
|
388
398
|
}
|
|
389
|
-
markLabel(e) {
|
|
390
|
-
let
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
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
|
|
395
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(", ");
|
|
396
412
|
}
|
|
397
413
|
tooltipFor(e) {
|
|
398
|
-
let t = this.effectiveSeries, n = this.viewRows[e.i], r = this.i18n.locale, i = t.reduce((e, t) => e + Math.max(0,
|
|
399
|
-
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);
|
|
400
416
|
return {
|
|
401
417
|
label: a.label,
|
|
402
418
|
value: c,
|
|
403
|
-
color:
|
|
419
|
+
color: F(a, o, t.length),
|
|
404
420
|
marker: "rect",
|
|
405
421
|
active: o === e.j && t.length > 1
|
|
406
422
|
};
|
|
@@ -408,23 +424,31 @@ var V = class extends r {
|
|
|
408
424
|
if (this.layoutCache?.cmp) {
|
|
409
425
|
let i = this.compareLabel || p(r, "chartPrevious");
|
|
410
426
|
t.forEach((o, s) => {
|
|
411
|
-
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))})` : "";
|
|
412
428
|
a.push({
|
|
413
429
|
label: t.length > 1 ? `${o.label} · ${i}` : i,
|
|
414
430
|
value: this.fmt(c) + u,
|
|
415
|
-
color:
|
|
431
|
+
color: F(o, s, t.length),
|
|
416
432
|
marker: "rect",
|
|
417
433
|
active: !1
|
|
418
434
|
});
|
|
419
435
|
});
|
|
420
436
|
}
|
|
421
|
-
|
|
437
|
+
this.mode !== "grouped" && t.length > 1 && a.push({
|
|
422
438
|
label: p(r, "chartTotal"),
|
|
423
439
|
value: this.fmt(i),
|
|
424
440
|
color: "",
|
|
425
441
|
marker: "rect",
|
|
426
442
|
active: !1
|
|
427
|
-
})
|
|
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 {
|
|
428
452
|
title: this.categoryName(n),
|
|
429
453
|
rows: a,
|
|
430
454
|
x: e.ax,
|
|
@@ -542,19 +566,23 @@ var V = class extends r {
|
|
|
542
566
|
this.detail && a.push(this.detailLabel || p(e, "chartDetail"));
|
|
543
567
|
for (let n of t) a.push(n.label, ...r ? [`${n.label} · ${i}`, `${n.label} · ${p(e, "chartChange")}`] : []);
|
|
544
568
|
n && a.push(p(e, "chartTotal"));
|
|
545
|
-
let o =
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
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)) : "–");
|
|
551
577
|
}
|
|
552
|
-
}), 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;
|
|
553
581
|
});
|
|
554
582
|
return {
|
|
555
583
|
caption: this.heading || p(e, "chartData"),
|
|
556
584
|
columns: a,
|
|
557
|
-
rows:
|
|
585
|
+
rows: s
|
|
558
586
|
};
|
|
559
587
|
}
|
|
560
588
|
renderPlot() {
|
|
@@ -563,27 +591,27 @@ var V = class extends r {
|
|
|
563
591
|
let i = this.layout();
|
|
564
592
|
this.layoutCache = i;
|
|
565
593
|
let s = this.chart.specs, c = s.labelSize, l = s.font, u = this.i18n.locale;
|
|
566
|
-
if (!i.n || !i.k) return
|
|
594
|
+
if (!i.n || !i.k) return P(u, r, this.chart.height || 120);
|
|
567
595
|
let d = i.horizontal, f = this.variant === "minimal", m = i.ticks.ticks.filter((e) => !f || e === 0).map((e) => {
|
|
568
596
|
let t = i.valueScale(e);
|
|
569
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>
|
|
570
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>
|
|
571
599
|
<text class="tick" x=${i.x0 - 8} y=${t} dy="0.32em" text-anchor="end">${i.fmtTick(e)}</text>`;
|
|
572
|
-
}), h = this.viewRows.map((e) => this.isCurrent(e)), g = h.some(Boolean), _, v = (e) =>
|
|
600
|
+
}), h = this.viewRows.map((e) => this.isCurrent(e)), g = h.some(Boolean), _, v = (e) => B(e, c, l), y = (e, t, r, a) => {
|
|
573
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);
|
|
574
602
|
return n`<rect class="current-mark" x=${l} y=${u} width=${o} height=${s.indicator} rx=${s.indicator / 2}></rect>`;
|
|
575
603
|
};
|
|
576
604
|
if (d) {
|
|
577
605
|
let e = i.x0 - 8;
|
|
578
606
|
_ = i.cats.map((r, a) => {
|
|
579
|
-
let o = i.bands.center(a), s =
|
|
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;
|
|
580
608
|
return n`<text class=${h[a] ? "current" : ""} x=${e} y=${d} dy="0.32em" text-anchor="end">${s}</text>
|
|
581
609
|
${u ? n`<text class="detail" x=${e} y=${f} dy="0.32em" text-anchor="end">${u}</text>` : t}${p}`;
|
|
582
610
|
});
|
|
583
611
|
} else {
|
|
584
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) => {
|
|
585
613
|
if (n % e) return null;
|
|
586
|
-
let r =
|
|
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));
|
|
587
615
|
return {
|
|
588
616
|
text: r,
|
|
589
617
|
detail: a,
|
|
@@ -598,7 +626,7 @@ var V = class extends r {
|
|
|
598
626
|
${a.detail ? n`<text class="detail" x=${a.x} y=${r} text-anchor="middle">${a.detail}</text>` : t}${s}` : n`${s}`;
|
|
599
627
|
});
|
|
600
628
|
}
|
|
601
|
-
let b = i.series, x = this.hot, S = i.ghosts.map((e) => n`<path class="ghost" style=${a({ "--_bk-chart-c":
|
|
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, {
|
|
602
630
|
vertical: !d,
|
|
603
631
|
inset: s.clear,
|
|
604
632
|
x0: i.x0,
|
|
@@ -615,8 +643,8 @@ var V = class extends r {
|
|
|
615
643
|
let n = i.bands.start(t);
|
|
616
644
|
return [n, n + i.bands.width];
|
|
617
645
|
}
|
|
618
|
-
}, u), w = this.brush.span,
|
|
619
|
-
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 = [];
|
|
620
648
|
if (this.labels && !i.percent) {
|
|
621
649
|
let e = i.stacked ? i.totals.map((e, t) => {
|
|
622
650
|
let n = i.bars.filter((e) => e.i === t && e.path);
|
|
@@ -632,12 +660,12 @@ var V = class extends r {
|
|
|
632
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);
|
|
633
661
|
for (let r of e) {
|
|
634
662
|
if (!r) continue;
|
|
635
|
-
let e = this.fmt(r.v), a =
|
|
636
|
-
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>`);
|
|
637
665
|
}
|
|
638
666
|
}
|
|
639
|
-
let
|
|
640
|
-
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) {
|
|
641
669
|
let n = (e) => {
|
|
642
670
|
let t = Math.round(i.bands.start(e)), n = Math.round(i.bands.start(e) + i.bands.width);
|
|
643
671
|
return d ? {
|
|
@@ -651,45 +679,45 @@ var V = class extends r {
|
|
|
651
679
|
width: `${n - t}px`,
|
|
652
680
|
height: `${Math.round(i.H)}px`
|
|
653
681
|
};
|
|
654
|
-
}, 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 = {
|
|
655
683
|
enter: (e) => this.enter(s(e)),
|
|
656
684
|
focus: (e) => {
|
|
657
685
|
this.active = {
|
|
658
686
|
i: e,
|
|
659
|
-
j:
|
|
687
|
+
j: j.j
|
|
660
688
|
}, this.enter(s(e));
|
|
661
689
|
}
|
|
662
|
-
}, l = i.cats.map((e, t) =>
|
|
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])}
|
|
663
691
|
target=${o(this.target)} rel=${o(this.rel)} aria-current=${h[i] ? "page" : t} aria-label=${this.categoryLabel(i)}
|
|
664
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}
|
|
665
693
|
aria-current=${h[i] ? "true" : t} aria-label=${this.categoryLabel(i)}
|
|
666
|
-
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] ?
|
|
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}
|
|
667
695
|
style=${a(n(i))} @pointerenter=${() => c.enter(i)}></div>`);
|
|
668
696
|
return e`<div class="plot" part="plot" style=${a(d ? { height: `${i.H}px` } : {})}>
|
|
669
697
|
<svg width=${r} height=${i.H} aria-hidden="true">
|
|
670
|
-
${
|
|
698
|
+
${V()}
|
|
671
699
|
<g>${m}${_}</g>
|
|
672
|
-
<g>${C.back}${S}${
|
|
673
|
-
<g>${
|
|
700
|
+
<g>${C.back}${S}${E}${D}${C.front}</g>
|
|
701
|
+
<g>${O}${A}</g>
|
|
674
702
|
</svg>
|
|
675
|
-
<div class="cats" role=${
|
|
703
|
+
<div class="cats" role=${M === "button" ? "toolbar" : "group"} aria-orientation=${o(M === "button" ? d ? "vertical" : "horizontal" : void 0)}
|
|
676
704
|
aria-label=${this.heading || this.getAttribute("aria-label") || p(u, "chartData")}
|
|
677
705
|
@keydown=${this.onCategoryKey} @pointerleave=${this.onLeave}>${v}</div>
|
|
678
706
|
</div>`;
|
|
679
707
|
}
|
|
680
|
-
let
|
|
681
|
-
tabindex=${e.i ===
|
|
682
|
-
@pointerenter=${() => this.enter(e)} @focus=${(t) => this.onFocus(t, e)} @blur=${this.onBlur}></rect>`),
|
|
683
|
-
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;
|
|
684
712
|
return e`<div class="plot" part="plot" style=${a(d ? { height: `${i.H}px` } : {})}>
|
|
685
713
|
<svg width=${r} height=${i.H} role="group" aria-label=${this.heading || p(u, "chartData")}
|
|
686
714
|
@keydown=${this.onKey} @pointerleave=${this.onLeave} @pointerdown=${this.onDown} @pointermove=${this.onMove} @pointerup=${this.onUp}>
|
|
687
|
-
${
|
|
715
|
+
${V()}
|
|
688
716
|
<g aria-hidden="true">${m}${_}</g>
|
|
689
|
-
<g aria-hidden="true">${C.back}${
|
|
690
|
-
<g aria-hidden="true">${
|
|
691
|
-
<g>${
|
|
692
|
-
${
|
|
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}
|
|
693
721
|
</svg>
|
|
694
722
|
</div>`;
|
|
695
723
|
}
|
|
@@ -701,21 +729,21 @@ var V = class extends r {
|
|
|
701
729
|
if (this.mode !== "grouped" && t.length > 1) {
|
|
702
730
|
let o = n.map((e, n) => ({
|
|
703
731
|
name: i[n],
|
|
704
|
-
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)
|
|
705
733
|
}));
|
|
706
|
-
a.push(
|
|
707
|
-
} 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) => ({
|
|
708
736
|
name: i[n],
|
|
709
|
-
value:
|
|
737
|
+
value: U(e[t.key])
|
|
710
738
|
})), r)));
|
|
711
739
|
if (this.compare?.length && this.mode === "grouped" && !this.contiguous) {
|
|
712
|
-
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);
|
|
713
741
|
a.push(p(e, "chartSummaryCompare", {
|
|
714
742
|
previous: this.compareLabel || p(e, "chartPrevious"),
|
|
715
|
-
change:
|
|
743
|
+
change: j(e, i, o, r)
|
|
716
744
|
}));
|
|
717
745
|
}
|
|
718
|
-
return a.push(
|
|
746
|
+
return a.push(D(e, E(this), r, (e) => String(e))), a.filter(Boolean).join(" ");
|
|
719
747
|
}
|
|
720
748
|
selectionStatus() {
|
|
721
749
|
if (!this.selectable) return;
|
|
@@ -731,7 +759,7 @@ var V = class extends r {
|
|
|
731
759
|
render() {
|
|
732
760
|
let n = this.i18n.locale, r = this.effectiveSeries, i = r.map((e, t) => ({
|
|
733
761
|
label: e.label,
|
|
734
|
-
color:
|
|
762
|
+
color: F(e, t, r.length)
|
|
735
763
|
}));
|
|
736
764
|
this.compare?.length && this.mode === "grouped" && !this.contiguous && i.push({
|
|
737
765
|
label: this.compareLabel || p(n, "chartPrevious"),
|
|
@@ -739,7 +767,7 @@ var V = class extends r {
|
|
|
739
767
|
pattern: "outlined"
|
|
740
768
|
});
|
|
741
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;
|
|
742
|
-
return
|
|
770
|
+
return R({
|
|
743
771
|
locale: n,
|
|
744
772
|
heading: this.heading,
|
|
745
773
|
level: this.level,
|
|
@@ -759,5 +787,5 @@ var V = class extends r {
|
|
|
759
787
|
});
|
|
760
788
|
}
|
|
761
789
|
};
|
|
762
|
-
s("bk-chart-bar",
|
|
763
|
-
export {
|
|
790
|
+
s("bk-chart-bar", G);
|
|
791
|
+
export { G as BkChartBar };
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
-
import { t as o } from "./chunks/define-
|
|
4
|
-
import { t as s } from "./chunks/i18n-
|
|
5
|
-
import { t as c } from "./chunks/styles-
|
|
6
|
-
import { r as l } from "./chunks/chart-tokens-
|
|
7
|
-
import { t as u } from "./chunks/i18n-
|
|
3
|
+
import { t as o } from "./chunks/define-6OfuRn5c.js";
|
|
4
|
+
import { t as s } from "./chunks/i18n-DFfGgd3d.js";
|
|
5
|
+
import { t as c } from "./chunks/styles-CaeyhYDA.js";
|
|
6
|
+
import { r as l } from "./chunks/chart-tokens-DQ4hVSmn.js";
|
|
7
|
+
import { t as u } from "./chunks/i18n-DQAcbHkY.js";
|
|
8
8
|
import { a as d } from "./chunks/format-DEwvmPPd.js";
|
|
9
|
-
import { a as f, i as p, n as m, o as h, r as g } from "./chunks/marks-
|
|
10
|
-
import { c as _, d as v, f as y, i as b, l as x, o as S, r as C, t as w, u as T } from "./chunks/frame-
|
|
9
|
+
import { a as f, i as p, n as m, o as h, r as g } from "./chunks/marks-pOUDNUf1.js";
|
|
10
|
+
import { c as _, d as v, f as y, i as b, l as x, o as S, r as C, t as w, u as T } from "./chunks/frame-xIMVEUCi.js";
|
|
11
11
|
import "./bk-chart-mark.js";
|
|
12
12
|
// dist/components/bk-chart-bridge.js
|
|
13
13
|
l();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { a as e, n as t, t as n, u as r } from "./chunks/lit-D8x-qXgH.js";
|
|
2
2
|
import { t as i } from "./chunks/style-map-BMvn17E7.js";
|
|
3
|
-
import { t as a } from "./chunks/define-
|
|
4
|
-
import { t as o } from "./chunks/i18n-
|
|
5
|
-
import { t as s } from "./chunks/styles-
|
|
6
|
-
import { r as c } from "./chunks/chart-tokens-
|
|
7
|
-
import { t as l } from "./chunks/i18n-
|
|
3
|
+
import { t as a } from "./chunks/define-6OfuRn5c.js";
|
|
4
|
+
import { t as o } from "./chunks/i18n-DFfGgd3d.js";
|
|
5
|
+
import { t as s } from "./chunks/styles-CaeyhYDA.js";
|
|
6
|
+
import { r as c } from "./chunks/chart-tokens-DQ4hVSmn.js";
|
|
7
|
+
import { t as l } from "./chunks/i18n-DQAcbHkY.js";
|
|
8
8
|
import { a as u, o as d } from "./chunks/format-DEwvmPPd.js";
|
|
9
9
|
import { a as f } from "./chunks/scale-BcW5wHaU.js";
|
|
10
|
-
import { r as p, t as m } from "./chunks/frame-
|
|
10
|
+
import { r as p, t as m } from "./chunks/frame-xIMVEUCi.js";
|
|
11
11
|
// dist/components/bk-chart-bullet.js
|
|
12
12
|
c();
|
|
13
13
|
function h(e, t, n, r = 0) {
|