scb-wc 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +194 -164
- package/all.js +91 -5
- package/blazor/CustomEvents.cs +83 -0
- package/blazor/ScbBlazorInteropBase.cs +4460 -1674
- package/blazor/scb-blazor-bridge.js +6827 -2805
- package/blazor/wrappers/ScbAccordion.razor +50 -0
- package/blazor/wrappers/ScbAppBar.razor +95 -0
- package/blazor/wrappers/ScbBreadcrumb.razor +59 -0
- package/blazor/wrappers/ScbCalendar.razor +100 -0
- package/blazor/wrappers/ScbCalendarCard.razor +189 -0
- package/blazor/wrappers/ScbCheckbox.razor +92 -0
- package/blazor/wrappers/ScbCollapse.razor +76 -0
- package/blazor/wrappers/ScbCookiesConsent.razor +106 -0
- package/blazor/wrappers/ScbDatepicker.razor +77 -0
- package/blazor/wrappers/ScbDialog.razor +72 -0
- package/blazor/wrappers/ScbDrawer.razor +64 -0
- package/blazor/wrappers/ScbDropZone.razor +168 -0
- package/blazor/wrappers/ScbDropdown.razor +76 -0
- package/blazor/wrappers/ScbHorizontalScroller.razor +137 -0
- package/blazor/wrappers/ScbList.razor +77 -0
- package/blazor/wrappers/ScbMenu.razor +71 -0
- package/blazor/wrappers/ScbNav.razor +92 -0
- package/blazor/wrappers/ScbNotificationCard.razor +122 -0
- package/blazor/wrappers/ScbOptionsMenu.razor +88 -0
- package/blazor/wrappers/ScbPagination.razor +80 -0
- package/blazor/wrappers/ScbRadioGroup.razor +94 -0
- package/blazor/wrappers/ScbSearch.razor +83 -0
- package/blazor/wrappers/ScbSegmentedButton.razor +85 -0
- package/blazor/wrappers/ScbSelect.razor +79 -0
- package/blazor/wrappers/ScbSlider.razor +96 -0
- package/blazor/wrappers/ScbSnackbar.razor +93 -0
- package/blazor/wrappers/ScbSwitch.razor +92 -0
- package/blazor/wrappers/ScbTable.razor +67 -0
- package/blazor/wrappers/ScbTableAdvanced.razor +78 -0
- package/blazor/wrappers/ScbTabs.razor +55 -0
- package/blazor/wrappers/ScbTextfield.razor +104 -0
- package/blazor/wrappers/ScbTooltip.razor +88 -0
- package/blazor/wrappers/ScbViz.razor +142 -0
- package/demo-data-preview.svg +12 -0
- package/dummy.png +0 -0
- package/fonts/inter/files/inter-latin-wght-italic.woff2 +0 -0
- package/fonts/inter/files/inter-latin-wght-normal.woff2 +0 -0
- package/fonts/material-symbols-outlined/files/material-symbols-outlined-latin-wght-normal.woff2 +0 -0
- package/index.js +91 -1
- package/mvc/components/all.js +90 -1
- package/mvc/components/scb-accordion/scb-accordion-item.js +211 -0
- package/mvc/components/scb-accordion/scb-accordion.js +44 -0
- package/mvc/components/scb-app-bar/scb-app-bar.js +166 -0
- package/mvc/components/scb-avatar/scb-avatar.js +111 -0
- package/mvc/components/scb-badge/scb-badge.js +80 -0
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +14 -0
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +96 -0
- package/mvc/components/scb-button/scb-button.js +268 -0
- package/mvc/components/scb-calendar/scb-calendar-event.js +6 -0
- package/mvc/components/scb-calendar/scb-calendar.js +168 -0
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +346 -0
- package/mvc/components/scb-card/scb-card.js +761 -0
- package/mvc/components/scb-checkbox/scb-checkbox-group.js +33 -0
- package/mvc/components/scb-checkbox/scb-checkbox.js +140 -0
- package/mvc/components/scb-chevron/scb-chevron.js +121 -0
- package/mvc/components/scb-chip/scb-chip.js +66 -0
- package/mvc/components/scb-collapse/scb-collapse.js +89 -0
- package/mvc/components/scb-cookies-consent/scb-cookies-consent.js +78 -0
- package/mvc/components/scb-datepicker/scb-datepicker.js +296 -0
- package/mvc/components/scb-dialog/scb-dialog.js +265 -0
- package/mvc/components/scb-divider/scb-divider.js +69 -0
- package/mvc/components/scb-drawer/scb-drawer.js +128 -0
- package/mvc/components/scb-drop-zone/scb-drop-zone.js +555 -0
- package/mvc/components/scb-dropdown/scb-dropdown.js +306 -0
- package/mvc/components/scb-fab/scb-fab.js +108 -0
- package/mvc/components/scb-fact-card/scb-fact-card-content.js +46 -0
- package/mvc/components/scb-fact-card/scb-fact-card.js +226 -0
- package/mvc/components/scb-footer/scb-footer-section.js +3 -0
- package/mvc/components/scb-footer/scb-footer.js +210 -0
- package/mvc/components/scb-gallery-grid/scb-gallery-grid.js +131 -0
- package/mvc/components/scb-grid/scb-grid-item.js +11 -0
- package/mvc/components/scb-grid/scb-grid.js +98 -0
- package/mvc/components/scb-grid/scb-stack.js +33 -0
- package/mvc/components/scb-header/scb-header-menu-group.js +1 -0
- package/mvc/components/scb-header/scb-header-menu-item.js +5 -0
- package/mvc/components/scb-header/scb-header-tab.js +5 -0
- package/mvc/components/scb-header/scb-header-utility.js +1 -0
- package/mvc/components/scb-header/scb-header.js +681 -0
- package/mvc/components/scb-horizontal-scroller/scb-horizontal-scroller.js +196 -0
- package/mvc/components/scb-icon-button/scb-icon-button.js +171 -0
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +212 -0
- package/mvc/components/scb-link/scb-link.js +61 -0
- package/mvc/components/scb-list/scb-list-item.js +153 -0
- package/mvc/components/scb-list/scb-list.js +26 -0
- package/mvc/components/scb-menu/scb-menu-item.js +205 -0
- package/mvc/components/scb-menu/scb-menu-section.js +42 -0
- package/mvc/components/scb-menu/scb-menu.js +81 -0
- package/mvc/components/scb-menu/scb-sub-menu.js +10 -0
- package/mvc/components/scb-nav/scb-nav-item.js +28 -0
- package/mvc/components/scb-nav/scb-nav.js +104 -0
- package/mvc/components/scb-notification-card/scb-notification-card.js +358 -0
- package/mvc/components/scb-options-menu/scb-options-menu-item.js +66 -0
- package/mvc/components/scb-options-menu/scb-options-menu.js +88 -0
- package/mvc/components/scb-options-menu/scb-options-sub-menu.js +34 -0
- package/mvc/components/scb-overlay/scb-overlay.js +49 -0
- package/mvc/components/scb-pagination/scb-pagination.js +312 -0
- package/mvc/components/scb-progress-indicator/scb-progress-indicator.js +87 -0
- package/mvc/components/scb-progress-stepper/scb-progress-step.js +147 -0
- package/mvc/components/scb-progress-stepper/scb-progress-stepper.js +62 -0
- package/mvc/components/scb-radio-button/scb-radio-button.js +132 -0
- package/mvc/components/scb-radio-button/scb-radio-group.js +43 -0
- package/mvc/components/scb-scrollspy/scb-scrollspy.js +79 -0
- package/mvc/components/scb-search/scb-search.js +292 -0
- package/mvc/components/scb-segmented-button/scb-segmented-button.js +32 -0
- package/mvc/components/scb-segmented-button/scb-segmented-item.js +74 -0
- package/mvc/components/scb-select/scb-select-option.js +61 -0
- package/mvc/components/scb-select/scb-select.js +284 -0
- package/mvc/components/scb-skeleton/scb-skeleton.js +38 -0
- package/mvc/components/scb-slider/scb-slider.js +27 -0
- package/mvc/components/scb-snackbar/scb-snackbar.js +128 -0
- package/mvc/components/scb-status-pill/scb-status-pill.js +45 -0
- package/mvc/components/scb-stepper/scb-step.js +239 -0
- package/mvc/components/scb-stepper/scb-stepper.js +139 -0
- package/mvc/components/scb-switch/scb-switch.js +59 -0
- package/mvc/components/scb-table/scb-table.js +51 -0
- package/mvc/components/scb-table-advanced/scb-table-advanced.js +76 -0
- package/mvc/components/scb-tabs/scb-primary-tab.js +6 -0
- package/mvc/components/scb-tabs/scb-secondary-tab.js +6 -0
- package/mvc/components/scb-tabs/scb-tabs.js +28 -0
- package/mvc/components/scb-textfield/scb-textfield.js +595 -0
- package/mvc/components/scb-toc/scb-toc-item.js +303 -0
- package/mvc/components/scb-toc/scb-toc.js +19 -0
- package/mvc/components/scb-tooltip/scb-tooltip.js +196 -0
- package/mvc/components/scb-vignette/scb-vignette.js +37 -0
- package/mvc/components/scb-viz/scb-viz-actions-runtime.js +2 -0
- package/mvc/components/scb-viz/scb-viz-print-runtime.js +98 -0
- package/mvc/components/scb-viz/scb-viz-series-differentiation-registry.js +1 -0
- package/mvc/components/scb-viz/scb-viz-series-differentiation-runtime.js +1 -0
- package/mvc/components/scb-viz/scb-viz-table-runtime.js +1 -0
- package/mvc/components/scb-viz/scb-viz.js +1140 -0
- package/mvc/fonts/inter/files/inter-latin-wght-italic.woff2 +0 -0
- package/mvc/fonts/inter/files/inter-latin-wght-normal.woff2 +0 -0
- package/mvc/fonts/material-symbols-outlined/files/material-symbols-outlined-latin-wght-normal.woff2 +0 -0
- package/mvc/scb-blazor-bridge.js +6827 -2805
- package/mvc/scb-logo.svg +20 -20
- package/mvc/scb-typography.css +1 -1
- package/mvc/scb-wc.css +3 -2
- package/mvc/scb.svg +13 -13
- package/mvc/vendor/assertClassBrand.js +1 -0
- package/mvc/vendor/classPrivateFieldGet2.js +1 -0
- package/mvc/vendor/decorate.js +1 -0
- package/mvc/vendor/preload-helper.js +1 -0
- package/mvc/vendor/vendor-lit.js +1 -0
- package/mvc/vendor/vendor-material.js +364 -0
- package/mvc/vendor/vendor.js +4 -0
- package/package.json +420 -77
- package/scb-accordion/scb-accordion-item.js +340 -0
- package/scb-accordion/scb-accordion.js +151 -0
- package/scb-app-bar/scb-app-bar.js +317 -0
- package/scb-avatar/scb-avatar.js +197 -0
- package/scb-badge/scb-badge.js +165 -0
- package/scb-breadcrumb/scb-breadcrumb-item.js +62 -0
- package/scb-breadcrumb/scb-breadcrumb.js +255 -0
- package/scb-button/scb-button.js +398 -0
- package/scb-calendar/scb-calendar-event.js +48 -0
- package/scb-calendar/scb-calendar.js +700 -0
- package/scb-calendar-card/scb-calendar-card.js +505 -0
- package/scb-card/scb-card.js +1231 -0
- package/scb-checkbox/scb-checkbox-group.js +104 -0
- package/scb-checkbox/scb-checkbox.js +316 -0
- package/scb-chevron/scb-chevron.js +144 -0
- package/scb-chip/scb-chip.js +234 -0
- package/scb-collapse/scb-collapse.js +231 -0
- package/scb-cookies-consent/scb-cookies-consent.js +164 -0
- package/scb-datepicker/scb-datepicker.js +470 -0
- package/scb-dialog/scb-dialog.js +574 -0
- package/scb-divider/scb-divider.js +119 -0
- package/scb-drawer/scb-drawer.js +297 -0
- package/scb-drop-zone/scb-drop-zone.js +965 -0
- package/scb-dropdown/scb-dropdown.js +598 -0
- package/scb-fab/scb-fab.js +190 -0
- package/scb-fact-card/scb-fact-card-content.js +82 -0
- package/scb-fact-card/scb-fact-card.js +376 -0
- package/scb-footer/scb-footer-section.js +23 -0
- package/scb-footer/scb-footer.js +343 -0
- package/scb-gallery-grid/scb-gallery-grid.js +242 -0
- package/scb-grid/scb-grid-item.js +81 -0
- package/scb-grid/scb-grid.js +200 -0
- package/scb-grid/scb-stack.js +120 -0
- package/scb-header/scb-header-menu-group.js +21 -0
- package/scb-header/scb-header-menu-item.js +22 -0
- package/scb-header/scb-header-tab.js +25 -0
- package/scb-header/scb-header-utility.js +27 -0
- package/scb-header/scb-header.js +1358 -0
- package/scb-horizontal-scroller/scb-horizontal-scroller.js +353 -0
- package/scb-icon-button/scb-icon-button.js +335 -0
- package/scb-keyfigure-card/scb-keyfigure-card.js +340 -0
- package/scb-link/scb-link.js +136 -0
- package/scb-list/scb-list-item.js +297 -0
- package/scb-list/scb-list.js +119 -0
- package/scb-menu/scb-menu-item.js +330 -0
- package/scb-menu/scb-menu-section.js +60 -0
- package/scb-menu/scb-menu.js +154 -0
- package/scb-menu/scb-sub-menu.js +36 -0
- package/scb-nav/scb-nav-item.js +96 -0
- package/scb-nav/scb-nav.js +263 -0
- package/scb-notification-card/scb-notification-card.js +479 -0
- package/scb-options-menu/scb-options-menu-item.js +218 -0
- package/scb-options-menu/scb-options-menu.js +237 -0
- package/scb-options-menu/scb-options-sub-menu.js +69 -0
- package/scb-overlay/scb-overlay.js +144 -0
- package/scb-pagination/scb-pagination.js +438 -0
- package/scb-progress-indicator/scb-progress-indicator.js +199 -0
- package/scb-progress-stepper/scb-progress-step.js +213 -0
- package/scb-progress-stepper/scb-progress-stepper.js +132 -0
- package/scb-radio-button/scb-radio-button.js +249 -0
- package/scb-radio-button/scb-radio-group.js +216 -0
- package/scb-scrollspy/scb-scrollspy.js +670 -0
- package/scb-search/scb-search.js +643 -0
- package/scb-segmented-button/scb-segmented-button.js +215 -0
- package/scb-segmented-button/scb-segmented-item.js +133 -0
- package/scb-select/scb-select-option.js +88 -0
- package/scb-select/scb-select.js +517 -0
- package/scb-skeleton/scb-skeleton.js +92 -0
- package/scb-slider/scb-slider.js +98 -0
- package/scb-snackbar/scb-snackbar.js +223 -0
- package/scb-status-pill/scb-status-pill.js +100 -0
- package/scb-stepper/scb-step.js +311 -0
- package/scb-stepper/scb-stepper.js +325 -0
- package/scb-switch/scb-switch.js +182 -0
- package/scb-table/scb-table.js +202 -0
- package/scb-table-advanced/scb-table-advanced.js +327 -0
- package/scb-tabs/scb-primary-tab.js +68 -0
- package/scb-tabs/scb-secondary-tab.js +68 -0
- package/scb-tabs/scb-tabs.js +100 -0
- package/scb-test-components/index.d.ts +90 -0
- package/scb-test-components/scb-accordion/scb-accordion-item.d.ts +39 -0
- package/scb-test-components/scb-accordion/scb-accordion.d.ts +27 -0
- package/scb-test-components/scb-app-bar/scb-app-bar.d.ts +25 -0
- package/scb-test-components/scb-avatar/scb-avatar.d.ts +37 -0
- package/scb-test-components/scb-badge/scb-badge.d.ts +28 -0
- package/scb-test-components/scb-breadcrumb/scb-breadcrumb-item.d.ts +15 -0
- package/scb-test-components/scb-breadcrumb/scb-breadcrumb.d.ts +27 -0
- package/scb-test-components/scb-button/scb-button.d.ts +40 -0
- package/scb-test-components/scb-calendar/scb-calendar-event.d.ts +15 -0
- package/scb-test-components/scb-calendar/scb-calendar.d.ts +77 -0
- package/scb-test-components/scb-calendar-card/scb-calendar-card.d.ts +45 -0
- package/scb-test-components/scb-card/scb-card.d.ts +101 -0
- package/scb-test-components/scb-checkbox/scb-checkbox-group.d.ts +23 -0
- package/scb-test-components/scb-checkbox/scb-checkbox.d.ts +52 -0
- package/scb-test-components/scb-chevron/scb-chevron.d.ts +13 -0
- package/scb-test-components/scb-chip/scb-chip.d.ts +61 -0
- package/scb-test-components/scb-collapse/scb-collapse.d.ts +29 -0
- package/scb-test-components/scb-cookies-consent/scb-cookies-consent.d.ts +23 -0
- package/scb-test-components/scb-datepicker/scb-datepicker.d.ts +39 -0
- package/scb-test-components/scb-dialog/scb-dialog.d.ts +72 -0
- package/scb-test-components/scb-divider/scb-divider.d.ts +34 -0
- package/scb-test-components/scb-drawer/scb-drawer.d.ts +72 -0
- package/scb-test-components/scb-drop-zone/scb-drop-zone.d.ts +143 -0
- package/scb-test-components/scb-dropdown/scb-dropdown.d.ts +70 -0
- package/scb-test-components/scb-fab/scb-fab.d.ts +42 -0
- package/scb-test-components/scb-fact-card/scb-fact-card-content.d.ts +15 -0
- package/scb-test-components/scb-fact-card/scb-fact-card.d.ts +49 -0
- package/scb-test-components/scb-footer/scb-footer-section.d.ts +20 -0
- package/scb-test-components/scb-footer/scb-footer.d.ts +31 -0
- package/scb-test-components/scb-gallery-grid/scb-gallery-grid.d.ts +20 -0
- package/scb-test-components/scb-grid/scb-grid-item.d.ts +32 -0
- package/scb-test-components/scb-grid/scb-grid.d.ts +36 -0
- package/scb-test-components/scb-grid/scb-stack.d.ts +32 -0
- package/scb-test-components/scb-header/scb-header-menu-group.d.ts +12 -0
- package/scb-test-components/scb-header/scb-header-menu-item.d.ts +13 -0
- package/scb-test-components/scb-header/scb-header-tab.d.ts +13 -0
- package/scb-test-components/scb-header/scb-header-utility.d.ts +14 -0
- package/scb-test-components/scb-header/scb-header.d.ts +132 -0
- package/scb-test-components/scb-horizontal-scroller/scb-horizontal-scroller.d.ts +47 -0
- package/scb-test-components/scb-icon-button/scb-icon-button.d.ts +76 -0
- package/scb-test-components/scb-keyfigure-card/scb-keyfigure-card.d.ts +46 -0
- package/scb-test-components/scb-link/scb-link.d.ts +25 -0
- package/scb-test-components/scb-list/scb-list-item.d.ts +38 -0
- package/scb-test-components/scb-list/scb-list.d.ts +26 -0
- package/scb-test-components/scb-menu/scb-menu-item.d.ts +52 -0
- package/scb-test-components/scb-menu/scb-menu-section.d.ts +11 -0
- package/scb-test-components/scb-menu/scb-menu.d.ts +25 -0
- package/scb-test-components/scb-menu/scb-sub-menu.d.ts +14 -0
- package/scb-test-components/scb-nav/scb-nav-item.d.ts +20 -0
- package/scb-test-components/scb-nav/scb-nav.d.ts +50 -0
- package/scb-test-components/scb-notification-card/scb-notification-card.d.ts +46 -0
- package/scb-test-components/scb-options-menu/scb-options-menu-item.d.ts +29 -0
- package/scb-test-components/scb-options-menu/scb-options-menu.d.ts +35 -0
- package/scb-test-components/scb-options-menu/scb-options-sub-menu.d.ts +11 -0
- package/scb-test-components/scb-overlay/scb-overlay.d.ts +24 -0
- package/scb-test-components/scb-pagination/scb-pagination.d.ts +36 -0
- package/scb-test-components/scb-progress-indicator/scb-progress-indicator.d.ts +28 -0
- package/scb-test-components/scb-progress-stepper/scb-progress-step.d.ts +21 -0
- package/scb-test-components/scb-progress-stepper/scb-progress-stepper.d.ts +22 -0
- package/scb-test-components/scb-radio-button/scb-radio-button.d.ts +26 -0
- package/scb-test-components/scb-radio-button/scb-radio-group.d.ts +49 -0
- package/scb-test-components/scb-scrollspy/scb-scrollspy.d.ts +217 -0
- package/scb-test-components/scb-search/scb-search.d.ts +96 -0
- package/scb-test-components/scb-segmented-button/scb-segmented-button.d.ts +80 -0
- package/scb-test-components/scb-segmented-button/scb-segmented-item.d.ts +21 -0
- package/scb-test-components/scb-select/scb-select-option.d.ts +16 -0
- package/scb-test-components/scb-select/scb-select.d.ts +62 -0
- package/scb-test-components/scb-skeleton/scb-skeleton.d.ts +25 -0
- package/scb-test-components/scb-slider/scb-slider.d.ts +28 -0
- package/scb-test-components/scb-snackbar/scb-snackbar.d.ts +24 -0
- package/scb-test-components/scb-status-pill/scb-status-pill.d.ts +22 -0
- package/scb-test-components/scb-stepper/scb-step.d.ts +22 -0
- package/scb-test-components/scb-stepper/scb-stepper.d.ts +47 -0
- package/scb-test-components/scb-switch/scb-switch.d.ts +52 -0
- package/scb-test-components/scb-table/scb-table.d.ts +24 -0
- package/scb-test-components/scb-table-advanced/scb-table-advanced.d.ts +39 -0
- package/scb-test-components/scb-tabs/scb-primary-tab.d.ts +15 -0
- package/scb-test-components/scb-tabs/scb-secondary-tab.d.ts +15 -0
- package/scb-test-components/scb-tabs/scb-tabs.d.ts +21 -0
- package/scb-test-components/scb-textfield/scb-textfield.d.ts +75 -0
- package/scb-test-components/scb-toc/scb-toc-item.d.ts +38 -0
- package/scb-test-components/scb-toc/scb-toc.d.ts +27 -0
- package/scb-test-components/scb-tooltip/scb-tooltip.d.ts +51 -0
- package/scb-test-components/scb-vignette/scb-vignette.d.ts +20 -0
- package/scb-test-components/scb-viz/scb-viz-actions-runtime.d.ts +26 -0
- package/scb-test-components/scb-viz/scb-viz-print-runtime.d.ts +27 -0
- package/scb-test-components/scb-viz/scb-viz-series-differentiation-registry.d.ts +21 -0
- package/scb-test-components/scb-viz/scb-viz-series-differentiation-runtime.d.ts +42 -0
- package/scb-test-components/scb-viz/scb-viz-table-runtime.d.ts +28 -0
- package/scb-test-components/scb-viz/scb-viz.d.ts +207 -0
- package/scb-textfield/scb-textfield.js +827 -0
- package/scb-toc/scb-toc-item.js +477 -0
- package/scb-toc/scb-toc.js +101 -0
- package/scb-tooltip/scb-tooltip.js +402 -0
- package/scb-typography.css +1 -1
- package/scb-vignette/scb-vignette.js +88 -0
- package/scb-viz/scb-viz-actions-runtime.js +143 -0
- package/scb-viz/scb-viz-print-runtime.js +121 -0
- package/scb-viz/scb-viz-series-differentiation-registry.js +117 -0
- package/scb-viz/scb-viz-series-differentiation-runtime.js +126 -0
- package/scb-viz/scb-viz-table-runtime.js +86 -0
- package/scb-viz/scb-viz.js +2195 -0
- package/scb-wc-selfhost.css +29 -0
- package/scb-wc.bundle.js +12893 -1099
- package/scb-wc.css +3 -2
- package/scb-wc.d.ts +180 -0
- package/index.d.ts +0 -0
- package/mvc/components/index.js +0 -1
|
@@ -0,0 +1,2195 @@
|
|
|
1
|
+
import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.126.0/helpers/decorate.js";
|
|
2
|
+
import "../scb-accordion/scb-accordion.js";
|
|
3
|
+
import "../scb-icon-button/scb-icon-button.js";
|
|
4
|
+
import "../scb-divider/scb-divider.js";
|
|
5
|
+
import "../scb-chip/scb-chip.js";
|
|
6
|
+
import "../scb-horizontal-scroller/scb-horizontal-scroller.js";
|
|
7
|
+
import "../scb-segmented-button/scb-segmented-item.js";
|
|
8
|
+
import "../scb-segmented-button/scb-segmented-button.js";
|
|
9
|
+
import { buildScbVizExportFileName as t, createScbVizCsvBlob as n, createScbVizRasterBlobFromElement as r, createScbVizRasterDataUrlFromElement as i, downloadScbVizBlob as a, getScbVizCurrentFullscreenElement as o, isScbVizFullscreenSupported as s, openScbVizPrintFrame as c, runWithScbVizForcedPrintLightMode as l, toggleScbVizFullscreen as u } from "./scb-viz-actions-runtime.js";
|
|
10
|
+
import { buildScbVizPrintDocumentHtml as d, buildScbVizPrintableFooterHtml as f, buildScbVizPrintableTableHtml as p } from "./scb-viz-print-runtime.js";
|
|
11
|
+
import { getScbVizSeriesDifferentiationPatternKinds as m } from "./scb-viz-series-differentiation-registry.js";
|
|
12
|
+
import { clearScbVizSeriesDifferentiationColorClass as h, clearScbVizSeriesDifferentiationMetadata as g, ensureScbVizStyledModeSeriesPattern as _, getScbVizGroupedSeriesDifferentiationVariant as v, getScbVizHighchartsColorClassName as y, getScbVizHighchartsSvgRoot as b, getScbVizLegendSeriesDifferentiationTargets as x, getScbVizSeriesDifferentiationVariantByIndex as S, isScbVizGroupedSeriesDifferentiationChart as C, isScbVizHighchartsStyledMode as w, setScbVizSeriesDifferentiationColorClass as T, setScbVizSeriesDifferentiationMetadata as E, shouldShowScbVizSeriesDifferentiationAction as D, usesScbVizGroupedPointDifferentiation as O } from "./scb-viz-series-differentiation-runtime.js";
|
|
13
|
+
import { buildScbVizResolvedTableView as k, createScbVizCsvRows as A, inferScbVizTableAlignments as j, normalizeScbVizRenderableCell as M, readScbVizTableDataFromSlot as N } from "./scb-viz-table-runtime.js";
|
|
14
|
+
import { LitElement as P, css as F, html as I } from "lit";
|
|
15
|
+
import { customElement as L, property as R, state as z } from "lit/decorators.js";
|
|
16
|
+
import { unsafeHTML as B } from "lit/directives/unsafe-html.js";
|
|
17
|
+
import { unsafeSVG as V } from "lit/directives/unsafe-svg.js";
|
|
18
|
+
//#region src/scb-test-components/scb-viz/scb-viz.ts
|
|
19
|
+
var H = "<svg version=\"1.1\" id=\"Lager_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n viewBox=\"0 0 727.3 87.3\" style=\"enable-background:new 0 0 727.3 87.3;\" xml:space=\"preserve\" fill=\"currentColor\">\n<style type=\"text/css\">\n .st0{clip-path:url(#SVGID_00000118375311472882578510000008414848687067442345_);}\n .st1{clip-path:url(#SVGID_00000138564698325205407360000002276421278379188096_);}\n</style>\n<g>\n <defs>\n <rect id=\"SVGID_1_\" width=\"87.9\" height=\"87.3\"/>\n </defs>\n <clipPath id=\"SVGID_00000049194455212780167100000017351139687135426220_\">\n <use xlink:href=\"#SVGID_1_\" style=\"overflow:visible;\"/>\n </clipPath>\n <path style=\"clip-path:url(#SVGID_00000049194455212780167100000017351139687135426220_);\" d=\"M51.9,47.4c-3.5-1.9-6.1-3-8.4-3.9\n c-2.6-1.1-4.8-2-8.1-4.1c-3.2-2-4.7-5.5-3.8-8.7c1.1-3.9,5.5-6.3,11.7-6.4c5.2-0.1,10.3,2,14,5.6l7.1-7.3\n C58.9,17,51.1,13.9,43.2,14c-5.6,0.1-10.3,1.4-14.1,4c-3.6,2.4-6.2,5.9-7.3,9.9C19.7,35.5,23,43.6,30,48c4,2.6,6.9,3.7,9.7,4.9\n c2.1,0.9,4.3,1.8,7.3,3.4c6,3.3,7.3,9.9,5.6,14.4c-1.8,4.6-6.3,6.9-12.5,6.6c-16.8-2-29.9-16.3-29.9-33.6c0-6.7,2-13,5.4-18.3\n c-0.5-4.8-0.4-11.5,2.7-17.4c-1.9,1.4-3.8,2.9-5.5,4.7C4.6,20.9,0,32,0,43.7s4.6,22.8,12.9,31.1c5.2,5.2,11.4,8.9,18.2,11\n c3.8,1,8,1.5,12.6,1.2c13.4-1,18-9.1,19.5-16.1l0,0l0,0c0.7-3.7,0.5-7.7-0.8-11.4C60.5,54.4,56.8,50.1,51.9,47.4\"/>\n</g>\n<g>\n <defs>\n <rect id=\"SVGID_00000037663519358145686510000008852139513316315266_\" width=\"87.9\" height=\"87.3\"/>\n </defs>\n <clipPath id=\"SVGID_00000178915587967540748200000001082786752601951668_\">\n <use xlink:href=\"#SVGID_00000037663519358145686510000008852139513316315266_\" style=\"overflow:visible;\"/>\n </clipPath>\n <path style=\"clip-path:url(#SVGID_00000178915587967540748200000001082786752601951668_);\" d=\"M75.1,12.6C70.8,8.3,65.7,5,60.3,2.9\n c-6.2-2.3-14-3.5-22.9-1.5c-15.1,3.4-18,14.3-18.5,19.8C25.1,14.3,34,10,44,10c18.6,0,33.8,15.1,33.8,33.8c0,9.5-3.9,18-10.2,24.2\n c-0.4,4.5-1.5,10-3.7,15c4.1-2.1,7.9-4.8,11.2-8.1C83.4,66.6,88,55.6,88,43.8C87.9,32,83.4,20.9,75.1,12.6\"/>\n</g>\n<path d=\"M48.5,32.9c-4.8-2.3-7.3-4.1-7.3-4.1s-4.5-0.2-4.5,4c0,3.5,4.4,4.1,15.2,8.8c14.3,6.3,15.4,20.1,15.4,20.1s3.5-14.2-8-22.8\n C55.8,36.5,55.4,36.1,48.5,32.9\"/>\n<path d=\"M47.8,70.1c2.3-3,0.8-6.3,0.8-6.3s-3,1.5-9.2,0c-7.6-2-10.1-5.5-10.1-5.5l-5.8,6.1c0,0,5.7,5.8,14,7.6\n C42.3,73,45.6,72.9,47.8,70.1\"/>\n<path d=\"M107.2,56.4c3.3,2.8,7.1,4.2,11.6,4.2c5.3-0.1,8-2,8.1-5.9c0-3.1-1.7-5-5.3-5.7c-1.6-0.2-3.5-0.5-5.4-0.8\n c-3.5-0.6-6.2-1.9-8-4c-1.9-2.1-2.8-4.8-2.8-7.8c0-3.7,1.2-6.7,3.6-8.9c2.3-2.2,5.6-3.4,9.8-3.4c5.1,0.1,9.5,1.6,13.3,4.4l-3.5,5.3\n c-3.1-2.1-6.4-3.2-10.1-3.3c-1.9,0-3.5,0.5-4.8,1.5s-2,2.6-2,4.6c0,1.2,0.5,2.3,1.4,3.3s2.4,1.7,4.4,2.1c1.1,0.2,2.7,0.4,4.6,0.7\n c3.8,0.5,6.7,2,8.5,4.3s2.7,4.9,2.7,7.9c-0.2,8.1-5,12.2-14.4,12.3c-6.1,0-11.3-1.9-15.6-5.8L107.2,56.4z\"/>\n<path d=\"M135.3,36.6h6.2l6.8,21.1h0.1l6.8-21.1h6.2l-10.7,30.1h-4.8L135.3,36.6z\"/>\n<path d=\"M169.4,53.9c0,2.4,0.7,4.3,2,5.5c1.3,1.3,2.9,1.9,4.9,1.9c2.4,0,4.5-1,6.4-2.9l4.2,3.7c-3,3.3-6.5,4.9-10.5,4.9\n c-1.5,0-3-0.2-4.5-0.7c-0.7-0.2-1.4-0.6-2.1-1c-0.7-0.4-1.4-0.8-2-1.4c-1.2-1.1-2.2-2.7-3-4.7c-0.8-1.9-1.3-4.4-1.3-7.5\n c0-3,0.4-5.4,1.1-7.4c0.7-2,1.7-3.6,2.8-4.7c1.2-1.2,2.5-2,3.9-2.5s2.8-0.8,4.2-0.8c3.3,0,6.1,1.2,8.4,3.4c2.3,2.3,3.5,5.4,3.6,9.3\n v5L169.4,53.9L169.4,53.9z M181.7,48.9c-0.1-2.3-0.7-4.1-1.8-5.3c-1.1-1.1-2.6-1.7-4.3-1.7c-1.8,0-3.2,0.6-4.3,1.7\n c-1.1,1.2-1.7,3-1.8,5.3H181.7z\"/>\n<path d=\"M193.8,36.6h5.8v3.2h0.1c1.9-2.4,4.5-3.6,7.6-3.6c2.3,0,4.4,0.8,6.1,2.3l-4.3,5.2c-1.2-1-2.5-1.5-3.8-1.5\n c-1.5,0-2.8,0.5-3.8,1.5c-1.2,1-1.8,2.6-1.9,4.8v18.1h-5.8L193.8,36.6L193.8,36.6z\"/>\n<path d=\"M216.3,24.4h5.8v6h-5.8V24.4z M216.3,36.6h5.8v30.1h-5.8V36.6z\"/>\n<path d=\"M246,63.5c-1.9,2.2-4.4,3.4-7.5,3.5c-1.9,0-3.5-0.5-4.7-1.2c-1.3-0.8-2.3-1.6-3-2.4c-0.8-1-1.3-2.2-1.7-3.6\n c-0.4-1.4-0.5-4.1-0.5-8.1s0.2-6.8,0.5-8.2s0.9-2.6,1.7-3.6c0.7-0.9,1.7-1.8,3-2.5s2.8-1.1,4.7-1.1c2.9,0,5.4,1.2,7.5,3.6v-3.2h5.8\n V66c-0.1,4.5-1.3,7.8-3.8,10s-5.4,3.3-8.9,3.3c-3.9-0.1-7.3-1.8-10.1-5l4.5-3.7c0.7,0.7,1.6,1.3,2.6,1.8c1,0.6,2,0.9,3.1,0.9\n c2,0,3.6-0.6,4.8-1.7c1.2-1.2,1.8-2.8,1.8-4.8v-3.3H246z M234.4,51.6c0,2.3,0.1,3.9,0.2,4.8c0.1,0.9,0.4,1.7,0.9,2.3\n c0.4,0.5,1,1,1.8,1.5s1.7,0.8,2.9,0.8s2.1-0.3,2.9-0.8c0.8-0.4,1.3-0.9,1.7-1.5c0.5-0.6,0.8-1.4,1-2.3c0.1-0.9,0.2-2.5,0.2-4.8\n s-0.1-4-0.2-4.9c-0.2-0.9-0.5-1.6-1-2.2c-0.4-0.5-1-1.1-1.7-1.6c-0.8-0.4-1.7-0.7-2.9-0.7c-1.1,0-2.1,0.3-2.9,0.7\n c-0.8,0.5-1.4,1.1-1.8,1.6c-0.5,0.6-0.8,1.3-0.9,2.2S234.4,49.3,234.4,51.6z\"/>\n<path d=\"M264,53.9c0,2.4,0.7,4.3,2,5.5c1.3,1.3,2.9,1.9,4.9,1.9c2.4,0,4.5-1,6.4-2.9l4.2,3.7c-3,3.3-6.5,4.9-10.5,4.9\n c-1.5,0-3-0.2-4.5-0.7c-0.7-0.2-1.4-0.6-2.1-1s-1.4-0.8-2-1.4c-1.2-1.1-2.2-2.7-3-4.7c-0.8-1.9-1.3-4.4-1.3-7.5c0-3,0.4-5.4,1.1-7.4\n s1.7-3.6,2.8-4.7c1.2-1.2,2.5-2,3.9-2.5s2.8-0.8,4.2-0.8c3.3,0,6.1,1.2,8.4,3.4c2.3,2.3,3.5,5.4,3.6,9.3v5L264,53.9L264,53.9z\n M276.3,48.9c-0.1-2.3-0.7-4.1-1.8-5.3c-1.1-1.1-2.6-1.7-4.3-1.7c-1.8,0-3.2,0.6-4.3,1.7c-1.1,1.2-1.7,3-1.8,5.3H276.3z\"/>\n<path d=\"M289.4,57.4c2.4,2.6,5.5,3.9,9.2,3.9c1.7,0,3.1-0.3,4.1-1s1.6-1.6,1.6-2.8c0-1.1-0.3-1.8-1-2.3c-0.7-0.4-1.5-0.7-2.6-0.7\n l-5.2-0.5c-2.5-0.2-4.4-1.1-6-2.5s-2.4-3.4-2.4-6c0-3.1,1.1-5.4,3.2-7c2-1.5,4.6-2.3,7.7-2.3c1.3,0,2.6,0.1,3.6,0.3\n c1.1,0.2,2.1,0.5,3,0.8c1.8,0.8,3.4,1.8,4.8,3l-3.6,4.4c-1.1-0.8-2.3-1.5-3.6-2.1c-1.2-0.5-2.7-0.7-4.3-0.7c-1.8,0-3.1,0.3-3.9,1\n s-1.2,1.5-1.2,2.6c0,0.7,0.3,1.3,0.9,1.8c0.6,0.6,1.6,0.9,3,1.1l4.8,0.4c3,0.2,5.2,1.2,6.6,2.8c1.3,1.6,1.9,3.7,1.9,6.2\n c0,2.9-1.2,5.2-3.5,6.8c-2.2,1.6-5.1,2.5-8.6,2.5c-4.8,0-9-1.8-12.8-5.4L289.4,57.4z\"/>\n<path d=\"M328.2,51.6c0-3.2,0.3-5.6,0.8-7.3s1.3-3.1,2.4-4.2c0.8-1,1.9-1.9,3.4-2.7c1.4-0.7,3.2-1.1,5.5-1.2c2.3,0,4.2,0.4,5.6,1.2\n s2.5,1.7,3.3,2.7c1.2,1.1,2,2.5,2.5,4.2s0.7,4.1,0.7,7.3s-0.2,5.6-0.7,7.2c-0.5,1.7-1.3,3.1-2.5,4.3c-0.4,0.4-0.8,0.9-1.4,1.3\n c-0.5,0.5-1.1,0.9-1.9,1.2c-1.4,0.8-3.3,1.3-5.6,1.3c-2.2,0-4-0.5-5.5-1.3c-1.4-0.8-2.6-1.6-3.4-2.5c-1.1-1.2-1.9-2.7-2.4-4.3\n C328.5,57.1,328.2,54.7,328.2,51.6z M346.4,51.6c0-2.2-0.1-3.7-0.3-4.7c-0.2-0.9-0.6-1.8-1.2-2.5c-0.4-0.7-1.1-1.2-1.9-1.6\n c-0.8-0.4-1.7-0.6-2.8-0.6c-1,0-1.9,0.2-2.8,0.6c-0.8,0.4-1.5,0.9-2,1.6c-0.5,0.7-0.9,1.5-1.1,2.5s-0.3,2.5-0.3,4.6s0.1,3.6,0.3,4.6\n c0.2,1,0.6,1.9,1.1,2.6c0.5,0.6,1.2,1.1,2,1.5s1.8,0.6,2.8,0.6c1.1,0,2-0.2,2.8-0.6c0.8-0.4,1.5-1,1.9-1.5c0.6-0.8,1-1.6,1.2-2.6\n C346.3,55.2,346.4,53.7,346.4,51.6z\"/>\n<path d=\"M359.5,41.2h-3v-4.6h3v-4c0-2.9,0.8-5,2.3-6.3s3.4-1.9,5.6-1.9h3.8v5.7h-3.3c-1.8-0.1-2.6,0.8-2.5,2.5v4h5.9v4.6h-5.9v25.4\n h-5.8V41.2H359.5z\"/>\n<path d=\"M373.1,41.2h-3v-4.6h3v-4c0-2.9,0.8-5,2.3-6.3s3.4-1.9,5.6-1.9h3.8v5.7h-3.3c-1.8-0.1-2.6,0.8-2.5,2.5v4h5.9v4.6H379v25.4\n h-5.8V41.2H373.1z\"/>\n<path d=\"M388.8,24.4h5.8v6h-5.8V24.4z M388.8,36.6h5.8v30.1h-5.8V36.6z\"/>\n<path d=\"M423.1,61.8c-1.3,1.5-2.8,2.7-4.5,3.7s-3.7,1.5-6,1.5c-3.4,0-6.5-1.2-9-3.6c-2.7-2.4-4.1-6.3-4.1-11.7\n c0.1-5.5,1.5-9.4,4.1-11.9c2.6-2.4,5.6-3.6,9.1-3.6c2.3,0,4.3,0.5,6,1.4s3.2,2.2,4.5,3.8l-4.3,4c-1.5-2-3.5-3.1-5.9-3.2\n c-5-0.1-7.5,3.1-7.6,9.4c0.1,6.3,2.6,9.4,7.6,9.3c2.5,0,4.4-1.1,5.9-3.1L423.1,61.8z\"/>\n<path d=\"M427.9,24.4h5.8v6h-5.8V24.4z M427.9,36.6h5.8v30.1h-5.8V36.6z\"/>\n<path d=\"M446,53.9c0,2.4,0.7,4.3,2,5.5c1.3,1.3,2.9,1.9,4.9,1.9c2.4,0,4.5-1,6.4-2.9l4.2,3.7c-3,3.3-6.5,4.9-10.5,4.9\n c-1.5,0-3-0.2-4.5-0.7c-0.7-0.2-1.4-0.6-2.1-1s-1.4-0.8-2-1.4c-1.2-1.1-2.2-2.7-3-4.7c-0.8-1.9-1.3-4.4-1.3-7.5c0-3,0.4-5.4,1.1-7.4\n s1.7-3.6,2.8-4.7c1.2-1.2,2.5-2,3.9-2.5s2.8-0.8,4.2-0.8c3.3,0,6.1,1.2,8.4,3.4c2.3,2.3,3.5,5.4,3.6,9.3v5L446,53.9L446,53.9z\n M458.3,48.9c-0.1-2.3-0.7-4.1-1.8-5.3c-1.1-1.1-2.6-1.7-4.3-1.7s-3.2,0.6-4.3,1.7c-1.1,1.2-1.7,3-1.8,5.3H458.3z\"/>\n<path d=\"M471,24.4h5.8v34.5c0,1.4,0.7,2.1,2.2,2.1h2v5.7h-2.6c-2.1,0-3.9-0.5-5.3-1.6c-1.5-1.1-2.2-3-2.2-5.6V24.4H471z\"/>\n<path d=\"M484.8,24.4h5.8v34.5c0,1.4,0.7,2.1,2.2,2.1h2v5.7h-2.6c-2.1,0-3.9-0.5-5.3-1.6c-1.5-1.1-2.2-3-2.2-5.6V24.4H484.8z\"/>\n<path d=\"M513.6,64L513.6,64c-0.6,1-1.5,1.8-2.6,2.3c-1.1,0.5-2.7,0.8-4.7,0.8c-3.3,0-5.8-0.9-7.5-2.7c-1.9-1.7-2.8-3.9-2.8-6.5\n c0-2.5,0.8-4.6,2.4-6.3s4-2.6,7.1-2.6h8.1v-3.2c0-2.7-2-3.9-6-3.9c-1.5,0-2.6,0.2-3.5,0.5c-0.9,0.4-1.6,1-2.1,1.9l-4.6-3.6\n c2.2-3,5.5-4.5,9.8-4.4c3.7,0,6.6,0.7,8.8,2.1c2.2,1.5,3.3,4.1,3.3,7.8v20.5h-5.8V64H513.6z M513.6,53.9h-7\n c-3.4,0.1-5.1,1.3-5.1,3.6c0,1,0.4,1.9,1.3,2.6c0.8,0.8,2.2,1.2,4.2,1.2c2.5,0,4.2-0.3,5.2-0.9c0.9-0.6,1.4-2.1,1.4-4.3V53.9z\"/>\n<path d=\"M542,57.4c2.4,2.6,5.5,3.9,9.2,3.9c1.7,0,3.1-0.3,4.1-1c1.1-0.7,1.6-1.6,1.6-2.8c0-1.1-0.3-1.8-1-2.3\n c-0.7-0.4-1.5-0.7-2.6-0.7l-5.2-0.5c-2.5-0.2-4.4-1.1-6-2.5s-2.4-3.4-2.4-6c0-3.1,1.1-5.4,3.2-7c2-1.5,4.6-2.3,7.7-2.3\n c1.3,0,2.6,0.1,3.6,0.3c1.1,0.2,2.1,0.5,3,0.8c1.8,0.8,3.4,1.8,4.8,3l-3.6,4.4c-1.1-0.8-2.3-1.5-3.6-2.1c-1.2-0.5-2.7-0.7-4.3-0.7\n c-1.8,0-3.1,0.3-3.9,1c-0.8,0.7-1.2,1.5-1.2,2.6c0,0.7,0.3,1.3,0.9,1.8c0.6,0.6,1.6,0.9,3,1.1l4.8,0.4c3,0.2,5.2,1.2,6.6,2.8\n c1.3,1.6,1.9,3.7,1.9,6.2c0,2.9-1.2,5.2-3.5,6.8c-2.2,1.6-5.1,2.5-8.6,2.5c-4.8,0-9-1.8-12.8-5.4L542,57.4z\"/>\n<path d=\"M569.4,27.4h5.8v9.2h4.3v4.6h-4.3v17.5c0,1.5,0.7,2.3,2.1,2.2h2.2v5.7h-3.1c-2.1,0-3.7-0.7-5-2c-1.3-1.3-2-3.1-2-5.4v-18\n h-2.9v-4.6h2.9V27.4z\"/>\n<path d=\"M600.4,64L600.4,64c-0.6,1-1.5,1.8-2.6,2.3s-2.7,0.8-4.7,0.8c-3.3,0-5.8-0.9-7.5-2.7c-1.9-1.7-2.8-3.9-2.8-6.5\n c0-2.5,0.8-4.6,2.4-6.3c1.6-1.7,4-2.6,7.1-2.6h8.1v-3.2c0-2.7-2-3.9-6-3.9c-1.5,0-2.6,0.2-3.5,0.5c-0.9,0.4-1.6,1-2.1,1.9l-4.6-3.6\n c2.2-3,5.5-4.5,9.8-4.4c3.7,0,6.6,0.7,8.8,2.1c2.2,1.5,3.3,4.1,3.3,7.8v20.5h-5.8L600.4,64L600.4,64z M600.4,53.9h-7\n c-3.4,0.1-5.1,1.3-5.1,3.6c0,1,0.4,1.9,1.3,2.6c0.8,0.8,2.2,1.2,4.2,1.2c2.5,0,4.2-0.3,5.2-0.9c0.9-0.6,1.4-2.1,1.4-4.3L600.4,53.9\n L600.4,53.9z\"/>\n<path d=\"M614.6,27.4h5.8v9.2h4.3v4.6h-4.3v17.5c0,1.5,0.7,2.3,2.1,2.2h2.2v5.7h-3.1c-2.1,0-3.7-0.7-5-2c-1.3-1.3-2-3.1-2-5.4v-18\n h-2.9v-4.6h2.9V27.4z\"/>\n<path d=\"M630.5,24.4h5.8v6h-5.8V24.4z M630.5,36.6h5.8v30.1h-5.8V36.6z\"/>\n<path d=\"M644.9,57.4c2.4,2.6,5.5,3.9,9.2,3.9c1.7,0,3.1-0.3,4.1-1c1.1-0.7,1.6-1.6,1.6-2.8c0-1.1-0.3-1.8-1-2.3\n c-0.7-0.4-1.5-0.7-2.6-0.7L651,54c-2.5-0.2-4.4-1.1-6-2.5s-2.4-3.4-2.4-6c0-3.1,1.1-5.4,3.2-7c2-1.5,4.6-2.3,7.7-2.3\n c1.3,0,2.6,0.1,3.6,0.3c1.1,0.2,2.1,0.5,3,0.8c1.8,0.8,3.4,1.8,4.8,3l-3.6,4.4c-1.1-0.8-2.3-1.5-3.6-2.1c-1.2-0.5-2.7-0.7-4.3-0.7\n c-1.8,0-3.1,0.3-3.9,1c-0.8,0.7-1.2,1.5-1.2,2.6c0,0.7,0.3,1.3,0.9,1.8c0.6,0.6,1.6,0.9,3,1.1l4.8,0.4c3,0.2,5.2,1.2,6.6,2.8\n c1.3,1.6,1.9,3.7,1.9,6.2c0,2.9-1.2,5.2-3.5,6.8c-2.2,1.6-5.1,2.5-8.6,2.5c-4.8,0-9-1.8-12.8-5.4L644.9,57.4z\"/>\n<path d=\"M672.4,27.4h5.8v9.2h4.3v4.6h-4.3v17.5c0,1.5,0.7,2.3,2.1,2.2h2.2v5.7h-3.1c-2.1,0-3.7-0.7-5-2c-1.3-1.3-2-3.1-2-5.4v-18\n h-2.9v-4.6h2.9V27.4z\"/>\n<path d=\"M688.2,24.4h5.8v6h-5.8V24.4z M688.2,36.6h5.8v30.1h-5.8V36.6z\"/>\n<path d=\"M701.8,24.4h5.8v26.3h0.1l11.2-14.1h7l-10,11.7l11.4,18.3H720l-7.7-14l-4.6,5.4v8.7h-5.8V24.4H701.8z\"/>\n</svg>\n", U = 0, W = class extends P {
|
|
20
|
+
constructor(...e) {
|
|
21
|
+
super(...e), this.variant = "Standard", this.selectedChip = "Diagram", this.title = "", this.subtitle = "", this.description = "", this.comment = "", this.source = "", this.footnote = "", this.lang = "sv", this.imageHref = "", this.officialStatistics = !1, this.disableToggle = !1, this.contentMaxWidth = "", this.containerMaxWidth = "", this.contentHeight = "", this.toggleHeightMode = "stable", this._actionsMenuOpen = !1, this._seriesDifferentiationEnabled = !1, this._isFullscreen = !1, this._seriesDifferentiationSnapshots = /* @__PURE__ */ new WeakMap(), this._diagramReflowFrame = 0, this._chartConfigSyncFrame = 0, this._fullscreenDiagramSizingFrame = 0, this._fullscreenDiagramHeight = "", this._instanceId = `scb-viz-${++U}`, this.spacing = void 0, this.spacingTop = void 0, this.spacingBottom = void 0, this.spacingLeft = void 0, this.spacingRight = void 0, this._onDocumentFullscreenChange = () => {
|
|
22
|
+
this._syncFullscreenState();
|
|
23
|
+
}, this._onWindowResize = () => {
|
|
24
|
+
this._isFullscreen && this.#c();
|
|
25
|
+
}, this._onToggleFullscreenClick = async () => {
|
|
26
|
+
this._closeActionsMenu(), await this._toggleFullscreen();
|
|
27
|
+
}, this._onDocumentPointerDown = (e) => {
|
|
28
|
+
if (!this._actionsMenuOpen) return;
|
|
29
|
+
let t = e.composedPath(), n = this.shadowRoot?.querySelector(".actions-menu");
|
|
30
|
+
n && t.includes(n) || this._closeActionsMenu();
|
|
31
|
+
}, this._onDocumentKeyDown = (e) => {
|
|
32
|
+
this._actionsMenuOpen && e.key === "Escape" && (e.preventDefault(), this._closeActionsMenu(), this._focusMenuButton());
|
|
33
|
+
}, this._onPrintClick = async () => {
|
|
34
|
+
this._closeActionsMenu(), await this.#x();
|
|
35
|
+
}, this._onDownloadPngClick = async () => {
|
|
36
|
+
this._canExportRaster() && (this._closeActionsMenu(), await this.#_("png"));
|
|
37
|
+
}, this._onDownloadJpgClick = async () => {
|
|
38
|
+
this._canExportRaster() && (this._closeActionsMenu(), await this.#_("jpeg"));
|
|
39
|
+
}, this._onDownloadCsvClick = () => {
|
|
40
|
+
this._canExportCsv() && (this._closeActionsMenu(), this.#S());
|
|
41
|
+
}, this._onToggleSeriesDifferentiationClick = () => {
|
|
42
|
+
this._seriesDifferentiationEnabled = !this._seriesDifferentiationEnabled, this._closeActionsMenu(), this.#g();
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
get descriptionLabel() {
|
|
46
|
+
return this.lang === "en" ? "Description of the chart" : "Beskrivning av diagrammet";
|
|
47
|
+
}
|
|
48
|
+
get moreAboutStatsLabel() {
|
|
49
|
+
return this.lang === "en" ? "More about the statistics" : "Mer om statistiken";
|
|
50
|
+
}
|
|
51
|
+
get commentLabel() {
|
|
52
|
+
return this.lang === "en" ? "Comments" : "Kommentar";
|
|
53
|
+
}
|
|
54
|
+
get sourceLabel() {
|
|
55
|
+
return this.lang === "en" ? "Source" : "Källa";
|
|
56
|
+
}
|
|
57
|
+
get footnoteLabel() {
|
|
58
|
+
return this.lang === "en" ? "Footnotes" : "Fotnot";
|
|
59
|
+
}
|
|
60
|
+
get officialStatisticsLabel() {
|
|
61
|
+
return this.lang === "en" ? "Official statistics of Sweden" : "Sveriges officiella statistik";
|
|
62
|
+
}
|
|
63
|
+
get officialStatisticsTitle() {
|
|
64
|
+
return this.lang === "en" ? "Part of Official statistics of Sweden" : "Tillhör Sveriges officiella statistik";
|
|
65
|
+
}
|
|
66
|
+
get officialStatisticsAlt() {
|
|
67
|
+
return this.lang === "en" ? "Read more about Official statistics of Sweden" : "Läs mer om Sveriges officiella statistik";
|
|
68
|
+
}
|
|
69
|
+
get actionsMenuLabel() {
|
|
70
|
+
return this.lang === "en" ? "Open menu" : "Öppna meny";
|
|
71
|
+
}
|
|
72
|
+
get printLabel() {
|
|
73
|
+
return this.lang === "en" ? "Print" : "Skriv ut";
|
|
74
|
+
}
|
|
75
|
+
get downloadPngLabel() {
|
|
76
|
+
return this.lang === "en" ? "Download PNG" : "Ladda ner PNG";
|
|
77
|
+
}
|
|
78
|
+
get downloadJpgLabel() {
|
|
79
|
+
return this.lang === "en" ? "Download JPG" : "Ladda ner JPG";
|
|
80
|
+
}
|
|
81
|
+
get downloadCsvLabel() {
|
|
82
|
+
return this.lang === "en" ? "Download CSV" : "Ladda ner CSV";
|
|
83
|
+
}
|
|
84
|
+
get enableSeriesDifferentiationLabel() {
|
|
85
|
+
return this.lang === "en" ? "Show symbols and patterns" : "Visa symboler och mönster";
|
|
86
|
+
}
|
|
87
|
+
get disableSeriesDifferentiationLabel() {
|
|
88
|
+
return this.lang === "en" ? "Hide symbols and patterns" : "Dölj symboler och mönster";
|
|
89
|
+
}
|
|
90
|
+
get enterFullscreenLabel() {
|
|
91
|
+
return this.lang === "en" ? "View fullscreen" : "Visa i helskärm";
|
|
92
|
+
}
|
|
93
|
+
get exitFullscreenLabel() {
|
|
94
|
+
return this.lang === "en" ? "Exit fullscreen" : "Avsluta helskärm";
|
|
95
|
+
}
|
|
96
|
+
_getImageAltText() {
|
|
97
|
+
return this.lang === "en" ? "Chart image" : "Diagrambild";
|
|
98
|
+
}
|
|
99
|
+
_getTitleId() {
|
|
100
|
+
return this.title ? `${this._instanceId}-title` : void 0;
|
|
101
|
+
}
|
|
102
|
+
_getSubtitleId() {
|
|
103
|
+
return this.subtitle ? `${this._instanceId}-subtitle` : void 0;
|
|
104
|
+
}
|
|
105
|
+
_getDescriptionId() {
|
|
106
|
+
return this.description ? `${this._instanceId}-description` : void 0;
|
|
107
|
+
}
|
|
108
|
+
_getContentAriaLabelledBy() {
|
|
109
|
+
let e = [this._getTitleId(), this._getSubtitleId()].filter(Boolean);
|
|
110
|
+
return e.length ? e.join(" ") : void 0;
|
|
111
|
+
}
|
|
112
|
+
_getContentAriaDescribedBy() {
|
|
113
|
+
let e = [this._getDescriptionId()].filter(Boolean);
|
|
114
|
+
return e.length ? e.join(" ") : void 0;
|
|
115
|
+
}
|
|
116
|
+
static {
|
|
117
|
+
this.styles = F`
|
|
118
|
+
:host {
|
|
119
|
+
display: block;
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
--_scb-viz-font-family: var(--brand-font, Inter, 'Segoe UI', Arial, sans-serif);
|
|
122
|
+
--_scb-viz-body-font-size: var(--md-sys-typescale-body-large-size, 1rem);
|
|
123
|
+
--_scb-viz-body-font-weight: var(--weight-regular, 400);
|
|
124
|
+
--_scb-viz-body-line-height: var(--md-sys-typescale-body-large-line-height, 1.5);
|
|
125
|
+
--_scb-viz-body-letter-spacing: var(--md-sys-typescale-body-large-tracking, normal);
|
|
126
|
+
--_scb-viz-title-size: var(--md-sys-typescale-title-large-size, 1.75rem);
|
|
127
|
+
--_scb-viz-title-weight: var(--weight-semibold, 600);
|
|
128
|
+
--_scb-viz-title-line-height: var(--md-sys-typescale-title-large-line-height, 1.25);
|
|
129
|
+
--_scb-viz-title-letter-spacing: var(--md-sys-typescale-title-large-tracking, normal);
|
|
130
|
+
--_scb-viz-subtitle-size: var(--md-sys-typescale-body-large-size, 1rem);
|
|
131
|
+
--_scb-viz-subtitle-weight: var(--weight-regular, 400);
|
|
132
|
+
--_scb-viz-subtitle-line-height: var(--md-sys-typescale-body-large-line-height, 1.5);
|
|
133
|
+
--_scb-viz-subtitle-letter-spacing: var(--md-sys-typescale-body-large-tracking, normal);
|
|
134
|
+
--_scb-viz-section-title-size: var(--md-sys-typescale-title-medium-size, 1rem);
|
|
135
|
+
--_scb-viz-section-title-weight: var(--weight-semibold, 600);
|
|
136
|
+
--_scb-viz-section-title-line-height: var(--md-sys-typescale-title-medium-line-height, 1.5);
|
|
137
|
+
--_scb-viz-section-title-letter-spacing: var(--md-sys-typescale-title-medium-tracking, normal);
|
|
138
|
+
--_scb-viz-text-color: var(--md-sys-color-on-surface, #1f1f1f);
|
|
139
|
+
font-family: var(--_scb-viz-font-family);
|
|
140
|
+
font-size: var(--_scb-viz-body-font-size);
|
|
141
|
+
font-weight: var(--_scb-viz-body-font-weight);
|
|
142
|
+
line-height: var(--_scb-viz-body-line-height);
|
|
143
|
+
letter-spacing: var(--_scb-viz-body-letter-spacing);
|
|
144
|
+
font-style: normal;
|
|
145
|
+
text-align: start;
|
|
146
|
+
color: var(--_scb-viz-text-color);
|
|
147
|
+
background: var(--scb-viz-surface-color, var(--md-sys-color-surface, #fff));
|
|
148
|
+
padding: var(--scb-viz-padding, var(--spacing-7, 24px));
|
|
149
|
+
max-width: var(--scb-viz-container-max-width, 100%);
|
|
150
|
+
border-radius: var(--scb-viz-border-radius, var(--spacing-04, 16px));
|
|
151
|
+
border: 1px solid var(--scb-viz-outline-color, var(--md-sys-color-outline-variant, #c5c7d0));
|
|
152
|
+
/* Spacing styrs av attributen via CSS-variabler. */
|
|
153
|
+
margin-block-start: var(--scb-viz-spacing-block-start, 0);
|
|
154
|
+
margin-block-end: var(--scb-viz-spacing-block-end, 0);
|
|
155
|
+
margin-inline-start: var(--scb-viz-spacing-inline-start, 0);
|
|
156
|
+
margin-inline-end: var(--scb-viz-spacing-inline-end, 0);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
:host *,
|
|
160
|
+
:host *::before,
|
|
161
|
+
:host *::after {
|
|
162
|
+
box-sizing: border-box;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
scb-segmented-button {
|
|
166
|
+
--brand-font: var(--_scb-viz-font-family);
|
|
167
|
+
--weight-regular: var(--_scb-viz-body-font-weight);
|
|
168
|
+
--weight-semibold: var(--_scb-viz-section-title-weight);
|
|
169
|
+
--scb-segmented-button-height: var(--icon-size-small, 32px);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
scb-icon-button {
|
|
173
|
+
--brand-font: var(--_scb-viz-font-family);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
scb-accordion,
|
|
177
|
+
scb-accordion-item {
|
|
178
|
+
--brand-font: var(--_scb-viz-font-family);
|
|
179
|
+
--weight-regular: var(--_scb-viz-body-font-weight);
|
|
180
|
+
--weight-semibold: var(--_scb-viz-section-title-weight);
|
|
181
|
+
--scb-accordion-title-font-size: var(--_scb-viz-section-title-size);
|
|
182
|
+
--scb-accordion-title-line-height: var(--_scb-viz-section-title-line-height);
|
|
183
|
+
--scb-accordion-title-letter-spacing: var(--_scb-viz-section-title-letter-spacing);
|
|
184
|
+
--scb-accordion-supporting-font-size: var(--_scb-viz-body-font-size);
|
|
185
|
+
--scb-accordion-supporting-line-height: var(--_scb-viz-body-line-height);
|
|
186
|
+
--scb-accordion-supporting-letter-spacing: var(--_scb-viz-body-letter-spacing);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.label {
|
|
190
|
+
font-family: var(--_scb-viz-font-family);
|
|
191
|
+
font-size: var(--_scb-viz-title-size);
|
|
192
|
+
font-weight: var(--_scb-viz-title-weight);
|
|
193
|
+
line-height: var(--_scb-viz-title-line-height);
|
|
194
|
+
letter-spacing: var(--_scb-viz-title-letter-spacing);
|
|
195
|
+
text-align: start;
|
|
196
|
+
margin: 0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.sub-label {
|
|
200
|
+
font-family: var(--_scb-viz-font-family);
|
|
201
|
+
font-size: var(--_scb-viz-subtitle-size);
|
|
202
|
+
font-weight: var(--_scb-viz-subtitle-weight);
|
|
203
|
+
line-height: var(--_scb-viz-subtitle-line-height);
|
|
204
|
+
letter-spacing: var(--_scb-viz-subtitle-letter-spacing);
|
|
205
|
+
text-align: start;
|
|
206
|
+
margin: 0;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.secondary-label {
|
|
210
|
+
font-family: var(--_scb-viz-font-family);
|
|
211
|
+
font-size: var(--_scb-viz-section-title-size);
|
|
212
|
+
font-weight: var(--_scb-viz-section-title-weight);
|
|
213
|
+
line-height: var(--_scb-viz-section-title-line-height);
|
|
214
|
+
letter-spacing: var(--_scb-viz-section-title-letter-spacing);
|
|
215
|
+
text-align: start;
|
|
216
|
+
margin: 0;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.body-text {
|
|
220
|
+
font-family: var(--_scb-viz-font-family);
|
|
221
|
+
font-size: var(--_scb-viz-body-font-size);
|
|
222
|
+
font-weight: var(--_scb-viz-body-font-weight);
|
|
223
|
+
line-height: var(--_scb-viz-body-line-height);
|
|
224
|
+
letter-spacing: var(--_scb-viz-body-letter-spacing);
|
|
225
|
+
font-style: normal;
|
|
226
|
+
text-align: start;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.body-text-rich {
|
|
230
|
+
display: flex;
|
|
231
|
+
flex-direction: column;
|
|
232
|
+
gap: var(--spacing-4, 16px);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.body-text-paragraph {
|
|
236
|
+
margin: 0;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.visually-hidden,
|
|
240
|
+
.highcharts-visually-hidden {
|
|
241
|
+
position: absolute !important;
|
|
242
|
+
width: 1px !important;
|
|
243
|
+
height: 1px !important;
|
|
244
|
+
padding: 0 !important;
|
|
245
|
+
margin: -1px !important;
|
|
246
|
+
overflow: hidden !important;
|
|
247
|
+
white-space: nowrap !important;
|
|
248
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
249
|
+
clip-path: inset(50%) !important;
|
|
250
|
+
border: 0 !important;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.section {
|
|
254
|
+
display: flex;
|
|
255
|
+
flex-direction: column;
|
|
256
|
+
gap: var(--spacing-2, 8px);
|
|
257
|
+
color: var(--_scb-viz-text-color);
|
|
258
|
+
font-family: var(--_scb-viz-font-family);
|
|
259
|
+
font-style: normal;
|
|
260
|
+
text-align: start;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.more-about-stats-content {
|
|
264
|
+
display: flex;
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
gap: var(--spacing-7, 24px);
|
|
267
|
+
max-width: 600px;
|
|
268
|
+
color: var(--_scb-viz-text-color);
|
|
269
|
+
font-family: var(--_scb-viz-font-family);
|
|
270
|
+
font-style: normal;
|
|
271
|
+
text-align: start;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.sos-logotype-link {
|
|
275
|
+
display: inline-flex;
|
|
276
|
+
border: 0;
|
|
277
|
+
color: var(--_scb-viz-text-color);
|
|
278
|
+
line-height: 0;
|
|
279
|
+
text-decoration: none;
|
|
280
|
+
width: fit-content;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.sos-logotype-link:focus-visible {
|
|
284
|
+
outline: var(--stroke-focus-ring, 2px) solid var(--md-focus-ring-color, currentColor);
|
|
285
|
+
outline-offset: var(--spacing-1, 4px);
|
|
286
|
+
border-radius: var(--radius-xs, 4px);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.sos-logotype-small {
|
|
290
|
+
height: 26px;
|
|
291
|
+
width: auto;
|
|
292
|
+
display: block;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.sos-logotype-small svg {
|
|
296
|
+
height: 100%;
|
|
297
|
+
width: auto;
|
|
298
|
+
display: block;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
@media only screen and (min-width: 768px) {
|
|
302
|
+
.sos-logotype-small {
|
|
303
|
+
height: 24px;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.header {
|
|
308
|
+
margin-bottom: var(--spacing-7, 24px);
|
|
309
|
+
max-width: 600px;
|
|
310
|
+
color: var(--_scb-viz-text-color);
|
|
311
|
+
font-family: var(--_scb-viz-font-family);
|
|
312
|
+
font-style: normal;
|
|
313
|
+
text-align: start;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.header-row {
|
|
317
|
+
display: flex;
|
|
318
|
+
align-items: flex-start;
|
|
319
|
+
justify-content: space-between;
|
|
320
|
+
gap: var(--spacing-4, 16px);
|
|
321
|
+
margin-bottom: var(--spacing-7, 24px);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.header-row .header {
|
|
325
|
+
flex: 1 1 auto;
|
|
326
|
+
margin-bottom: 0;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.header-row .actions-menu {
|
|
330
|
+
margin-block-start: 0;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.actions-row {
|
|
334
|
+
display: flex;
|
|
335
|
+
align-items: flex-start;
|
|
336
|
+
justify-content: space-between;
|
|
337
|
+
gap: var(--spacing-4, 16px);
|
|
338
|
+
margin-bottom: var(--spacing-9, 40px);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.flipp-wrapper {
|
|
342
|
+
flex: 1 1 auto;
|
|
343
|
+
max-width: 234px;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.actions-menu {
|
|
347
|
+
position: relative;
|
|
348
|
+
flex: 0 0 auto;
|
|
349
|
+
display: inline-flex;
|
|
350
|
+
align-items: flex-start;
|
|
351
|
+
justify-content: flex-end;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.actions-menu-panel {
|
|
355
|
+
position: absolute;
|
|
356
|
+
inset-block-start: calc(100% + var(--spacing-2, 8px));
|
|
357
|
+
inset-inline-end: 0;
|
|
358
|
+
min-width: 180px;
|
|
359
|
+
padding: var(--spacing-2, 8px);
|
|
360
|
+
border: 1px solid var(--scb-viz-outline-color, var(--md-sys-color-outline-variant, #c5c7d0));
|
|
361
|
+
border-radius: var(--radius-m, 12px);
|
|
362
|
+
background: var(--scb-viz-surface-color, var(--md-sys-color-surface, #fff));
|
|
363
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
364
|
+
display: none;
|
|
365
|
+
z-index: 10;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.actions-menu-panel--open {
|
|
369
|
+
display: block;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.actions-menu-list {
|
|
373
|
+
list-style: none;
|
|
374
|
+
margin: 0;
|
|
375
|
+
padding: 0;
|
|
376
|
+
display: flex;
|
|
377
|
+
flex-direction: column;
|
|
378
|
+
gap: var(--spacing-1, 4px);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.actions-menu-item {
|
|
382
|
+
appearance: none;
|
|
383
|
+
border: 0;
|
|
384
|
+
border-radius: var(--radius-s, 8px);
|
|
385
|
+
background: transparent;
|
|
386
|
+
color: var(--_scb-viz-text-color);
|
|
387
|
+
width: 100%;
|
|
388
|
+
display: flex;
|
|
389
|
+
align-items: center;
|
|
390
|
+
gap: var(--scb-viz-actions-menu-item-gap, var(--spacing-2, 8px));
|
|
391
|
+
text-align: start;
|
|
392
|
+
font-family: var(--_scb-viz-font-family);
|
|
393
|
+
font-size: var(--_scb-viz-body-font-size);
|
|
394
|
+
font-weight: var(--_scb-viz-body-font-weight);
|
|
395
|
+
line-height: var(--_scb-viz-body-line-height);
|
|
396
|
+
letter-spacing: var(--_scb-viz-body-letter-spacing);
|
|
397
|
+
padding-block: var(--spacing-2, 8px);
|
|
398
|
+
padding-inline: var(--spacing-3, 12px);
|
|
399
|
+
cursor: pointer;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.actions-menu-item-icon {
|
|
403
|
+
display: inline-flex;
|
|
404
|
+
align-items: center;
|
|
405
|
+
justify-content: center;
|
|
406
|
+
flex: 0 0 auto;
|
|
407
|
+
font-family: 'Material Symbols Outlined';
|
|
408
|
+
font-size: var(--scb-viz-actions-menu-item-icon-size, var(--icon-size-small, 20px));
|
|
409
|
+
line-height: 1;
|
|
410
|
+
font-style: normal;
|
|
411
|
+
font-weight: 400;
|
|
412
|
+
letter-spacing: normal;
|
|
413
|
+
text-transform: none;
|
|
414
|
+
white-space: nowrap;
|
|
415
|
+
direction: ltr;
|
|
416
|
+
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
|
|
417
|
+
-webkit-font-smoothing: antialiased;
|
|
418
|
+
text-rendering: optimizeLegibility;
|
|
419
|
+
-moz-osx-font-smoothing: grayscale;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.actions-menu-item-label {
|
|
423
|
+
flex: 1 1 auto;
|
|
424
|
+
min-width: 0;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.actions-menu-item:hover {
|
|
428
|
+
background: var(--md-sys-color-surface-container, #f5f5f5);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
.actions-menu-item:focus-visible {
|
|
432
|
+
outline: var(--stroke-focus-ring, 2px) solid var(--md-focus-ring-color, currentColor);
|
|
433
|
+
outline-offset: 0;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.actions-menu-item:disabled {
|
|
437
|
+
background: transparent;
|
|
438
|
+
color: var(--md-sys-color-on-surface-variant, rgba(0, 0, 0, 0.56));
|
|
439
|
+
cursor: default;
|
|
440
|
+
opacity: 0.64;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.actions-menu-item:disabled:hover {
|
|
444
|
+
background: transparent;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.content,
|
|
448
|
+
.description,
|
|
449
|
+
.footer {
|
|
450
|
+
color: var(--_scb-viz-text-color);
|
|
451
|
+
font-family: var(--_scb-viz-font-family);
|
|
452
|
+
font-style: normal;
|
|
453
|
+
text-align: start;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.description {
|
|
457
|
+
margin-bottom: var(--spacing-8, 32px);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.footer {
|
|
461
|
+
margin-top: var(--spacing-7, 24px);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.footer-statistics-print {
|
|
465
|
+
display: none;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.print-more-about-stats {
|
|
469
|
+
max-width: 600px;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.print-more-about-stats .more-about-stats-content {
|
|
473
|
+
gap: var(--spacing-5, 16px);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.print-more-about-stats-heading {
|
|
477
|
+
margin-bottom: var(--spacing-5, 16px);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.description.section {
|
|
481
|
+
max-width: 600px;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.table-scroller,
|
|
485
|
+
.diagram-scroller {
|
|
486
|
+
display: none;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.image-content {
|
|
490
|
+
display: none;
|
|
491
|
+
width: 100%;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.diagram-content {
|
|
495
|
+
width: 100%;
|
|
496
|
+
max-width: var(--scb-viz-content-max-width, none);
|
|
497
|
+
min-width: var(--scb-viz-content-max-width, 0);
|
|
498
|
+
min-height: var(--scb-viz-diagram-min-height, 600px);
|
|
499
|
+
height: var(--scb-viz-diagram-height, auto);
|
|
500
|
+
overflow: var(--scb-viz-diagram-overflow, visible);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
::slotted([slot='diagram']) {
|
|
504
|
+
display: block;
|
|
505
|
+
width: 100%;
|
|
506
|
+
max-width: 100%;
|
|
507
|
+
min-width: 0;
|
|
508
|
+
min-height: var(--scb-viz-diagram-min-height, 600px);
|
|
509
|
+
height: var(--scb-viz-diagram-height, auto);
|
|
510
|
+
overflow: var(--scb-viz-diagram-overflow, visible);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.standard-content-shell {
|
|
514
|
+
display: block;
|
|
515
|
+
width: 100%;
|
|
516
|
+
min-width: 0;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.standard-content-shell--stable {
|
|
520
|
+
min-height: var(--scb-viz-standard-content-height, var(--scb-viz-diagram-min-height, 600px));
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.standard-content-panel {
|
|
524
|
+
display: none;
|
|
525
|
+
width: 100%;
|
|
526
|
+
min-width: 0;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.standard-content-panel--active {
|
|
530
|
+
display: flex;
|
|
531
|
+
flex-direction: column;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.standard-diagram-scroller,
|
|
535
|
+
.standard-table-scroller {
|
|
536
|
+
display: flex;
|
|
537
|
+
width: 100%;
|
|
538
|
+
min-width: 0;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.table-panel-scroll {
|
|
542
|
+
width: 100%;
|
|
543
|
+
min-width: 0;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.standard-content-shell--stable .standard-content-panel--table.standard-content-panel--active {
|
|
547
|
+
height: var(--scb-viz-standard-content-height, var(--scb-viz-diagram-min-height, 600px));
|
|
548
|
+
min-height: 0;
|
|
549
|
+
overflow: hidden;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.standard-content-shell--stable .standard-content-panel--table.standard-content-panel--active .standard-table-scroller {
|
|
553
|
+
flex: 1 1 auto;
|
|
554
|
+
min-height: 0;
|
|
555
|
+
height: 100%;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.standard-content-shell--stable .standard-content-panel--table.standard-content-panel--active .table-panel-scroll {
|
|
559
|
+
flex: 1 1 auto;
|
|
560
|
+
min-height: 0;
|
|
561
|
+
overflow: auto;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
:host([variant='Table']) .table-scroller {
|
|
565
|
+
display: flex;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
:host([variant='Image']) .image-content {
|
|
569
|
+
display: block;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
:host([variant='Image']) img {
|
|
573
|
+
height: auto;
|
|
574
|
+
max-width: 100%;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
:host([variant='Image']) .diagram-scroller {
|
|
578
|
+
display: none;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
:host([variant='Image']) .table-scroller {
|
|
582
|
+
display: none;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
:host([variant='Standard'].chip-diagram) .diagram-scroller {
|
|
586
|
+
display: flex;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
:host([variant='Standard'].chip-table) .table-scroller {
|
|
590
|
+
display: flex;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.table-source {
|
|
594
|
+
display: none;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.scb-viz-table {
|
|
598
|
+
border-collapse: collapse;
|
|
599
|
+
width: max-content;
|
|
600
|
+
max-width: none;
|
|
601
|
+
font-family: var(--_scb-viz-font-family);
|
|
602
|
+
font-size: var(--_scb-viz-body-font-size);
|
|
603
|
+
font-weight: var(--_scb-viz-body-font-weight);
|
|
604
|
+
line-height: var(--_scb-viz-body-line-height);
|
|
605
|
+
letter-spacing: var(--_scb-viz-body-letter-spacing);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.scb-viz-table th,
|
|
609
|
+
.scb-viz-table td {
|
|
610
|
+
border: 1px solid var(--scb-viz-outline-color, var(--md-sys-color-outline-variant, #c5c7d0));
|
|
611
|
+
padding-block: var(--spacing-2, 8px);
|
|
612
|
+
padding-inline: var(--spacing-3, 12px);
|
|
613
|
+
background-color: inherit;
|
|
614
|
+
text-align: start;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.scb-viz-table thead th {
|
|
618
|
+
font-weight: var(--weight-bold, 700);
|
|
619
|
+
vertical-align: top;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
.scb-viz-table-heading-text {
|
|
623
|
+
display: block;
|
|
624
|
+
max-inline-size: var(--scb-viz-table-header-max-width, 12rem);
|
|
625
|
+
min-inline-size: 0;
|
|
626
|
+
white-space: normal;
|
|
627
|
+
word-break: normal;
|
|
628
|
+
overflow-wrap: break-word;
|
|
629
|
+
hyphens: auto;
|
|
630
|
+
text-wrap: pretty;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.scb-viz-table tbody th {
|
|
634
|
+
font-weight: var(--weight-regular, 400);
|
|
635
|
+
white-space: normal;
|
|
636
|
+
overflow-wrap: break-word;
|
|
637
|
+
word-break: normal;
|
|
638
|
+
hyphens: auto;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.scb-viz-table tbody tr:nth-child(odd) {
|
|
642
|
+
background: var(--md-sys-color-surface-container, #f5f5f5);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.scb-viz-table tbody tr:nth-child(even) {
|
|
646
|
+
background: var(--md-sys-color-surface, #fff);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.scb-viz-table .align-left {
|
|
650
|
+
text-align: left;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.scb-viz-table .align-right {
|
|
654
|
+
text-align: right;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.scb-viz-table tbody td.align-right {
|
|
658
|
+
white-space: nowrap;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
:host([data-scb-viz-fullscreen]) {
|
|
662
|
+
width: 100%;
|
|
663
|
+
height: 100%;
|
|
664
|
+
max-width: none;
|
|
665
|
+
margin: 0;
|
|
666
|
+
border: 0;
|
|
667
|
+
border-radius: 0;
|
|
668
|
+
overflow: auto;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
:host([data-scb-viz-fullscreen]) .viz-container {
|
|
672
|
+
min-height: 100%;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
:host([data-scb-viz-force-light]),
|
|
676
|
+
:host([data-scb-viz-print-preview]) {
|
|
677
|
+
color-scheme: light;
|
|
678
|
+
--_scb-viz-text-color: #1f1f1f;
|
|
679
|
+
--scb-viz-surface-color: #fff;
|
|
680
|
+
--scb-viz-outline-color: #c5c7d0;
|
|
681
|
+
--md-sys-color-surface: #fff;
|
|
682
|
+
--md-sys-color-surface-container: #f5f5f5;
|
|
683
|
+
--md-sys-color-surface-container-highest: #e7e8ec;
|
|
684
|
+
--md-sys-color-on-surface: #1f1f1f;
|
|
685
|
+
--md-sys-color-on-surface-variant: rgba(0, 0, 0, 0.72);
|
|
686
|
+
--md-sys-color-outline-variant: #c5c7d0;
|
|
687
|
+
--md-focus-ring-color: #1f1f1f;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
:host([data-scb-viz-print-preview]) {
|
|
691
|
+
background: transparent;
|
|
692
|
+
border: 0;
|
|
693
|
+
border-radius: 0;
|
|
694
|
+
box-shadow: none;
|
|
695
|
+
max-width: none;
|
|
696
|
+
padding: 0;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
:host([data-scb-viz-print-preview]) .actions-row {
|
|
700
|
+
display: none !important;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
:host([data-scb-viz-print-preview]) .actions-menu-panel {
|
|
704
|
+
display: none !important;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
:host([data-scb-viz-print-preview]) .standard-content-shell--stable,
|
|
708
|
+
:host([data-scb-viz-print-preview]) .standard-content-shell--stable .standard-content-panel--active,
|
|
709
|
+
:host([data-scb-viz-print-preview]) .standard-content-shell--stable .standard-diagram-scroller,
|
|
710
|
+
:host([data-scb-viz-print-preview]) .standard-content-shell--stable .standard-table-scroller,
|
|
711
|
+
:host([data-scb-viz-print-preview]) .standard-content-shell--stable .table-panel-scroll,
|
|
712
|
+
:host([data-scb-viz-print-preview]) .standard-content-shell--stable .diagram-content,
|
|
713
|
+
:host([data-scb-viz-print-preview]) .standard-content-shell--stable ::slotted([slot='diagram']) {
|
|
714
|
+
height: auto !important;
|
|
715
|
+
min-height: 0 !important;
|
|
716
|
+
overflow: visible !important;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
:host([data-scb-viz-print-preview]) .table-panel-scroll {
|
|
720
|
+
overflow: visible !important;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
:host([data-scb-viz-print-preview]) scb-horizontal-scroller {
|
|
724
|
+
overflow: visible !important;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
:host([data-scb-viz-print-preview]) .description {
|
|
728
|
+
margin-bottom: var(--spacing-5, 16px);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
:host([data-scb-viz-print-preview]) .footer {
|
|
732
|
+
margin-top: var(--spacing-5, 16px);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
:host([data-scb-viz-print-preview]) .footer-statistics-screen {
|
|
736
|
+
display: none !important;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
:host([data-scb-viz-print-preview]) .footer-statistics-print {
|
|
740
|
+
display: block !important;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
:host([data-scb-viz-print-preview]) .viz-container {
|
|
744
|
+
zoom: var(--scb-viz-print-scale, 1);
|
|
745
|
+
width: calc(100% / var(--scb-viz-print-scale, 1));
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
@media print {
|
|
749
|
+
:host {
|
|
750
|
+
color-scheme: light;
|
|
751
|
+
--_scb-viz-text-color: #1f1f1f;
|
|
752
|
+
--scb-viz-surface-color: #fff;
|
|
753
|
+
--scb-viz-outline-color: #c5c7d0;
|
|
754
|
+
--md-sys-color-surface: #fff;
|
|
755
|
+
--md-sys-color-surface-container: #f5f5f5;
|
|
756
|
+
--md-sys-color-surface-container-highest: #e7e8ec;
|
|
757
|
+
--md-sys-color-on-surface: #1f1f1f;
|
|
758
|
+
--md-sys-color-on-surface-variant: rgba(0, 0, 0, 0.72);
|
|
759
|
+
--md-sys-color-outline-variant: #c5c7d0;
|
|
760
|
+
--md-focus-ring-color: #1f1f1f;
|
|
761
|
+
background: transparent;
|
|
762
|
+
border: 0;
|
|
763
|
+
border-radius: 0;
|
|
764
|
+
box-shadow: none;
|
|
765
|
+
max-width: none;
|
|
766
|
+
padding: 0;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
.actions-row {
|
|
770
|
+
display: none !important;
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
.actions-menu-panel {
|
|
774
|
+
display: none !important;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
.standard-content-shell--stable,
|
|
778
|
+
.standard-content-shell--stable .standard-content-panel--active,
|
|
779
|
+
.standard-content-shell--stable .standard-diagram-scroller,
|
|
780
|
+
.standard-content-shell--stable .standard-table-scroller,
|
|
781
|
+
.standard-content-shell--stable .table-panel-scroll,
|
|
782
|
+
.standard-content-shell--stable .diagram-content,
|
|
783
|
+
.standard-content-shell--stable ::slotted([slot='diagram']) {
|
|
784
|
+
height: auto !important;
|
|
785
|
+
min-height: 0 !important;
|
|
786
|
+
overflow: visible !important;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.table-panel-scroll {
|
|
790
|
+
overflow: visible !important;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
scb-horizontal-scroller {
|
|
794
|
+
overflow: visible !important;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
.description {
|
|
798
|
+
margin-bottom: var(--spacing-5, 16px);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
.footer {
|
|
802
|
+
margin-top: var(--spacing-5, 16px);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.footer-statistics-screen {
|
|
806
|
+
display: none !important;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.footer-statistics-print {
|
|
810
|
+
display: block !important;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.viz-container {
|
|
814
|
+
zoom: var(--scb-viz-print-scale, 1);
|
|
815
|
+
width: calc(100% / var(--scb-viz-print-scale, 1));
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
`;
|
|
819
|
+
}
|
|
820
|
+
connectedCallback() {
|
|
821
|
+
super.connectedCallback(), document.addEventListener("pointerdown", this._onDocumentPointerDown, !0), document.addEventListener("keydown", this._onDocumentKeyDown), document.addEventListener("fullscreenchange", this._onDocumentFullscreenChange), document.addEventListener("webkitfullscreenchange", this._onDocumentFullscreenChange), window.addEventListener("resize", this._onWindowResize), window.visualViewport?.addEventListener("resize", this._onWindowResize);
|
|
822
|
+
}
|
|
823
|
+
firstUpdated(e) {
|
|
824
|
+
this._readTableDataFromSlot(), this.#C(), this.#T(), this.#u(), this._syncChipClass(), this.#e(), this.#r(), this._syncFullscreenState(), this.#c();
|
|
825
|
+
}
|
|
826
|
+
updated(e) {
|
|
827
|
+
super.updated(e), (e.has("selectedChip") || e.has("variant")) && (this._syncChipClass(), this._closeActionsMenu()), e.has("selectedChip") && this._dispatchSelectedChipChanged(), (e.has("spacing") || e.has("spacingTop") || e.has("spacingBottom") || e.has("spacingLeft") || e.has("spacingRight")) && this.#C(), e.has("containerMaxWidth") && this.#T(), e.has("variant") && this.#e(), (e.has("contentMaxWidth") || e.has("contentHeight") || e.has("toggleHeightMode") || e.has("variant")) && this.#u(), (e.has("selectedChip") || e.has("variant") || e.has("contentMaxWidth") || e.has("contentHeight") || e.has("toggleHeightMode") || e.has("_isFullscreen")) && this.#r(), (e.has("selectedChip") || e.has("variant")) && this._seriesDifferentiationEnabled && requestAnimationFrame(() => {
|
|
828
|
+
this.#g();
|
|
829
|
+
}), (e.has("valueFormat") || e.has("timeFormat") || e.has("yAxisSettings") || e.has("selectedChip") || e.has("variant")) && this.#f(), (e.has("title") || e.has("subtitle") || e.has("description") || e.has("comment") || e.has("source") || e.has("footnote") || e.has("officialStatistics") || e.has("selectedChip") || e.has("variant") || e.has("_isFullscreen")) && this.#c();
|
|
830
|
+
}
|
|
831
|
+
disconnectedCallback() {
|
|
832
|
+
super.disconnectedCallback(), document.removeEventListener("pointerdown", this._onDocumentPointerDown, !0), document.removeEventListener("keydown", this._onDocumentKeyDown), document.removeEventListener("fullscreenchange", this._onDocumentFullscreenChange), document.removeEventListener("webkitfullscreenchange", this._onDocumentFullscreenChange), window.removeEventListener("resize", this._onWindowResize), window.visualViewport?.removeEventListener("resize", this._onWindowResize), this.#t(), this.#n(), this.#d(), this.#s();
|
|
833
|
+
}
|
|
834
|
+
_onTableSlotChange(e) {
|
|
835
|
+
let t = e.target;
|
|
836
|
+
t && (this._readTableDataFromSlot(t), this.requestUpdate());
|
|
837
|
+
}
|
|
838
|
+
_onDiagramSlotChange() {
|
|
839
|
+
this.#u(), this.#r(), this.#f(), this._seriesDifferentiationEnabled && requestAnimationFrame(() => {
|
|
840
|
+
this.#g();
|
|
841
|
+
}), this.requestUpdate();
|
|
842
|
+
}
|
|
843
|
+
#e() {
|
|
844
|
+
if (this.#t(), typeof ResizeObserver > "u") return;
|
|
845
|
+
let e = this.shadowRoot?.querySelector(".diagram-content");
|
|
846
|
+
e && (this._diagramResizeObserver = new ResizeObserver(() => {
|
|
847
|
+
this.#r();
|
|
848
|
+
}), this._diagramResizeObserver.observe(this), this._diagramResizeObserver.observe(e));
|
|
849
|
+
}
|
|
850
|
+
#t() {
|
|
851
|
+
this._diagramResizeObserver?.disconnect(), this._diagramResizeObserver = void 0;
|
|
852
|
+
}
|
|
853
|
+
#n() {
|
|
854
|
+
this._diagramReflowFrame &&= (cancelAnimationFrame(this._diagramReflowFrame), 0);
|
|
855
|
+
}
|
|
856
|
+
#r() {
|
|
857
|
+
this.variant !== "Standard" || this.selectedChip !== "Diagram" || (this.#n(), this._diagramReflowFrame = requestAnimationFrame(() => {
|
|
858
|
+
this._diagramReflowFrame = requestAnimationFrame(() => {
|
|
859
|
+
this._diagramReflowFrame = 0, this.#o();
|
|
860
|
+
});
|
|
861
|
+
}));
|
|
862
|
+
}
|
|
863
|
+
#i(e) {
|
|
864
|
+
let t = e?.getAttribute("data-highcharts-chart");
|
|
865
|
+
if (!t) return;
|
|
866
|
+
let n = Number.parseInt(t, 10);
|
|
867
|
+
return Number.isNaN(n) ? void 0 : n;
|
|
868
|
+
}
|
|
869
|
+
#a(e) {
|
|
870
|
+
for (let t of e) {
|
|
871
|
+
let e = this.#i(t);
|
|
872
|
+
if (e !== void 0) return e;
|
|
873
|
+
let n = t.querySelector("[data-highcharts-chart]"), r = this.#i(n);
|
|
874
|
+
if (r !== void 0) return r;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
#o() {
|
|
878
|
+
if (this.variant !== "Standard" || this.selectedChip !== "Diagram") return;
|
|
879
|
+
let e = this.shadowRoot?.querySelector("slot[name=\"diagram\"]");
|
|
880
|
+
if (!e) return;
|
|
881
|
+
let t = e.assignedElements({ flatten: !0 });
|
|
882
|
+
if (t.length === 0) return;
|
|
883
|
+
let n = this.#a(t);
|
|
884
|
+
if (n === void 0) return;
|
|
885
|
+
let r = window.Highcharts?.charts?.[n];
|
|
886
|
+
r && (r.setSize?.(null, null, !1), r.reflow?.(), this._seriesDifferentiationEnabled && this.#g());
|
|
887
|
+
}
|
|
888
|
+
_normalizeRenderableCell(e) {
|
|
889
|
+
return M(e);
|
|
890
|
+
}
|
|
891
|
+
_readTableDataFromSlot(e) {
|
|
892
|
+
let t = e || this.shadowRoot?.querySelector("slot[name=\"table\"]");
|
|
893
|
+
this._slottedTableData = N(t);
|
|
894
|
+
}
|
|
895
|
+
_inferTableAlignments(e) {
|
|
896
|
+
return j(e, (e) => this._parseTableNumericValue(e));
|
|
897
|
+
}
|
|
898
|
+
_parseTableNumericValue(e) {
|
|
899
|
+
if (e == null) return null;
|
|
900
|
+
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
901
|
+
let t = String(e).replace(/[ \s]+/g, "").trim();
|
|
902
|
+
if (!t) return null;
|
|
903
|
+
t.endsWith("%") && (t = t.slice(0, -1));
|
|
904
|
+
let n = t.lastIndexOf(","), r = t.lastIndexOf(".");
|
|
905
|
+
if (n > -1 && r > -1 ? t = n > r ? t.replace(/\./g, "").replace(",", ".") : t.replace(/,/g, "") : n > -1 && (t = t.replace(",", ".")), !/^-?\d+(?:\.\d+)?$/.test(t)) return null;
|
|
906
|
+
let i = Number(t);
|
|
907
|
+
return Number.isFinite(i) ? i : null;
|
|
908
|
+
}
|
|
909
|
+
_formatTableCell(e, t, n) {
|
|
910
|
+
let r = this._normalizeRenderableCell(e);
|
|
911
|
+
if (r.html) return r;
|
|
912
|
+
let i = r.text;
|
|
913
|
+
if (!i) return r;
|
|
914
|
+
if (t === 0) {
|
|
915
|
+
let e = this._normalizeTimeFormat(this.timeFormat), t = this._formatCategoryTimeLabel(i, e);
|
|
916
|
+
return t === null ? r : {
|
|
917
|
+
html: "",
|
|
918
|
+
text: t
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
if (n[t] !== "right") return r;
|
|
922
|
+
if (this._shouldPreserveSourceValueFormatting(this.valueFormat)) {
|
|
923
|
+
let e = this._localizeAutomaticNumericText(i);
|
|
924
|
+
return e === null ? r : {
|
|
925
|
+
html: "",
|
|
926
|
+
text: e
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
let a = this._parseTableNumericValue(i);
|
|
930
|
+
if (a === null) return r;
|
|
931
|
+
let o = this._normalizeValueFormat(this.valueFormat), s = this._formatValueForDisplay(a, o, !0);
|
|
932
|
+
return s === null ? r : {
|
|
933
|
+
html: "",
|
|
934
|
+
text: s
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
#s() {
|
|
938
|
+
this._fullscreenDiagramSizingFrame &&= (cancelAnimationFrame(this._fullscreenDiagramSizingFrame), 0);
|
|
939
|
+
}
|
|
940
|
+
#c() {
|
|
941
|
+
this.#s(), this._fullscreenDiagramSizingFrame = requestAnimationFrame(() => {
|
|
942
|
+
this._fullscreenDiagramSizingFrame = requestAnimationFrame(() => {
|
|
943
|
+
this._fullscreenDiagramSizingFrame = 0, this.#l();
|
|
944
|
+
});
|
|
945
|
+
});
|
|
946
|
+
}
|
|
947
|
+
_getViewportHeight() {
|
|
948
|
+
return Math.round(window.visualViewport?.height || window.innerHeight || document.documentElement.clientHeight || 0);
|
|
949
|
+
}
|
|
950
|
+
_readCssLength(e) {
|
|
951
|
+
let t = Number.parseFloat(e || "0");
|
|
952
|
+
return Number.isFinite(t) ? t : 0;
|
|
953
|
+
}
|
|
954
|
+
_getElementOuterHeight(e) {
|
|
955
|
+
let t = this.shadowRoot?.querySelector(e);
|
|
956
|
+
if (!t) return 0;
|
|
957
|
+
let n = getComputedStyle(t);
|
|
958
|
+
return t.getBoundingClientRect().height + this._readCssLength(n.marginTop) + this._readCssLength(n.marginBottom);
|
|
959
|
+
}
|
|
960
|
+
_getFullscreenDiagramHeight() {
|
|
961
|
+
if (!this._isFullscreen || this.variant !== "Standard" || this.selectedChip !== "Diagram") return "";
|
|
962
|
+
let e = this._getViewportHeight();
|
|
963
|
+
if (!e) return "";
|
|
964
|
+
let t = getComputedStyle(this), n = this._readCssLength(t.paddingTop) + this._readCssLength(t.paddingBottom) + this._getElementOuterHeight(".header") + this._getElementOuterHeight(".actions-row") + this._getElementOuterHeight(".footer") + 16, r = Math.floor(e - n);
|
|
965
|
+
return !Number.isFinite(r) || r <= 0 ? "" : `${Math.max(320, r)}px`;
|
|
966
|
+
}
|
|
967
|
+
#l() {
|
|
968
|
+
let e = this._getFullscreenDiagramHeight();
|
|
969
|
+
this._fullscreenDiagramHeight !== e && (this._fullscreenDiagramHeight = e, this.#u(), this.#r());
|
|
970
|
+
}
|
|
971
|
+
_getResolvedContentMaxWidth() {
|
|
972
|
+
return this.contentMaxWidth?.trim() || "";
|
|
973
|
+
}
|
|
974
|
+
_getResolvedDiagramHeight() {
|
|
975
|
+
return this._fullscreenDiagramHeight || this.contentHeight?.trim() || "";
|
|
976
|
+
}
|
|
977
|
+
_getResolvedDiagramScrollerWidth() {
|
|
978
|
+
return this._getResolvedContentMaxWidth();
|
|
979
|
+
}
|
|
980
|
+
_getResolvedToggleHeightMode() {
|
|
981
|
+
return this.toggleHeightMode === "auto" ? "auto" : "stable";
|
|
982
|
+
}
|
|
983
|
+
_getResolvedStandardContentHeight() {
|
|
984
|
+
return this._getResolvedDiagramHeight() || "600px";
|
|
985
|
+
}
|
|
986
|
+
#u() {
|
|
987
|
+
let e = this.variant === "Standard" ? this._getResolvedDiagramHeight() : "", t = this.variant === "Standard" && this._getResolvedToggleHeightMode() === "stable" ? this._getResolvedStandardContentHeight() : "";
|
|
988
|
+
this.variant === "Standard" ? this.style.setProperty("--scb-viz-diagram-min-height", e || "600px") : this.style.removeProperty("--scb-viz-diagram-min-height"), e ? (this.style.setProperty("--scb-viz-diagram-height", e), this.style.setProperty("--scb-viz-diagram-overflow", "hidden")) : (this.style.removeProperty("--scb-viz-diagram-height"), this.style.removeProperty("--scb-viz-diagram-overflow")), t ? this.style.setProperty("--scb-viz-standard-content-height", t) : this.style.removeProperty("--scb-viz-standard-content-height");
|
|
989
|
+
}
|
|
990
|
+
_getResolvedTableData() {
|
|
991
|
+
return this.tableData ?? this._slottedTableData;
|
|
992
|
+
}
|
|
993
|
+
_getResolvedTableView(e) {
|
|
994
|
+
return k(e, {
|
|
995
|
+
inferAlignments: (e) => this._inferTableAlignments(e),
|
|
996
|
+
normalizeCell: (e) => this._normalizeRenderableCell(e),
|
|
997
|
+
formatCell: (e, t, n) => this._formatTableCell(e, t, n)
|
|
998
|
+
});
|
|
999
|
+
}
|
|
1000
|
+
_getDiagramAssignedElements() {
|
|
1001
|
+
let e = this.shadowRoot?.querySelector("slot[name=\"diagram\"]");
|
|
1002
|
+
return e ? e.assignedElements({ flatten: !0 }) : [];
|
|
1003
|
+
}
|
|
1004
|
+
_findExportableVisualElement(e) {
|
|
1005
|
+
for (let t of e) {
|
|
1006
|
+
if (t instanceof SVGSVGElement || t instanceof HTMLCanvasElement || t instanceof HTMLImageElement) return t;
|
|
1007
|
+
let e = t.querySelector("svg, canvas, img");
|
|
1008
|
+
if (e instanceof SVGSVGElement || e instanceof HTMLCanvasElement || e instanceof HTMLImageElement) return e;
|
|
1009
|
+
}
|
|
1010
|
+
return null;
|
|
1011
|
+
}
|
|
1012
|
+
_getExportableVisualElement() {
|
|
1013
|
+
if (this.variant === "Table") return null;
|
|
1014
|
+
if (this.variant === "Image") {
|
|
1015
|
+
let e = this.shadowRoot?.querySelector(".image-content img");
|
|
1016
|
+
return e instanceof HTMLImageElement ? e : null;
|
|
1017
|
+
}
|
|
1018
|
+
return this._findExportableVisualElement(this._getDiagramAssignedElements());
|
|
1019
|
+
}
|
|
1020
|
+
#d() {
|
|
1021
|
+
this._chartConfigSyncFrame &&= (cancelAnimationFrame(this._chartConfigSyncFrame), 0);
|
|
1022
|
+
}
|
|
1023
|
+
#f() {
|
|
1024
|
+
this.#d(), this._chartConfigSyncFrame = requestAnimationFrame(() => {
|
|
1025
|
+
this._chartConfigSyncFrame = requestAnimationFrame(() => {
|
|
1026
|
+
this._chartConfigSyncFrame = 0, this.#p();
|
|
1027
|
+
});
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
1030
|
+
_getDefaultValueFormat() {
|
|
1031
|
+
return {
|
|
1032
|
+
type: "number",
|
|
1033
|
+
scale: "auto",
|
|
1034
|
+
decimals: 0,
|
|
1035
|
+
decimalSeparator: this.lang === "en" ? "." : ","
|
|
1036
|
+
};
|
|
1037
|
+
}
|
|
1038
|
+
_normalizeValueFormat(e) {
|
|
1039
|
+
let t = this._getDefaultValueFormat(), n = e && typeof e == "object" ? e : {};
|
|
1040
|
+
return {
|
|
1041
|
+
type: [
|
|
1042
|
+
"number",
|
|
1043
|
+
"currency",
|
|
1044
|
+
"percent"
|
|
1045
|
+
].includes(String(n.type)) ? String(n.type) : t.type,
|
|
1046
|
+
scale: [
|
|
1047
|
+
"auto",
|
|
1048
|
+
"raw",
|
|
1049
|
+
"thousands",
|
|
1050
|
+
"millions",
|
|
1051
|
+
"billions"
|
|
1052
|
+
].includes(String(n.scale)) ? String(n.scale) : t.scale,
|
|
1053
|
+
decimals: Number.isFinite(Number(n.decimals)) ? Math.max(0, Math.min(20, Number(n.decimals))) : t.decimals,
|
|
1054
|
+
decimalSeparator: String(n.decimalSeparator) === "." ? "." : String(n.decimalSeparator) === "," ? "," : t.decimalSeparator
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
_shouldPreserveSourceValueFormatting(e) {
|
|
1058
|
+
let t = this._normalizeValueFormat(e);
|
|
1059
|
+
return t.type === "number" && t.scale === "auto";
|
|
1060
|
+
}
|
|
1061
|
+
_normalizeTimeFormat(e) {
|
|
1062
|
+
let t = {
|
|
1063
|
+
mode: "raw",
|
|
1064
|
+
display: "raw"
|
|
1065
|
+
}, n = e && typeof e == "object" ? e : {}, r = [
|
|
1066
|
+
"raw",
|
|
1067
|
+
"year",
|
|
1068
|
+
"monthCode",
|
|
1069
|
+
"quarterCode",
|
|
1070
|
+
"weekCode",
|
|
1071
|
+
"tertialCode"
|
|
1072
|
+
], i = typeof n.mode == "string" ? n.mode : t.mode, a = typeof n.display == "string" ? n.display : t.display;
|
|
1073
|
+
r.includes(i) || (i = t.mode);
|
|
1074
|
+
let o = {
|
|
1075
|
+
raw: ["raw"],
|
|
1076
|
+
year: ["raw", "year"],
|
|
1077
|
+
monthCode: [
|
|
1078
|
+
"raw",
|
|
1079
|
+
"iso-month",
|
|
1080
|
+
"short-month",
|
|
1081
|
+
"long-month"
|
|
1082
|
+
],
|
|
1083
|
+
quarterCode: [
|
|
1084
|
+
"raw",
|
|
1085
|
+
"quarter-compact",
|
|
1086
|
+
"quarter-short",
|
|
1087
|
+
"quarter-long"
|
|
1088
|
+
],
|
|
1089
|
+
weekCode: [
|
|
1090
|
+
"raw",
|
|
1091
|
+
"week-compact",
|
|
1092
|
+
"week-long"
|
|
1093
|
+
],
|
|
1094
|
+
tertialCode: [
|
|
1095
|
+
"raw",
|
|
1096
|
+
"tertial-compact",
|
|
1097
|
+
"tertial-short",
|
|
1098
|
+
"tertial-long"
|
|
1099
|
+
]
|
|
1100
|
+
};
|
|
1101
|
+
return o[i].includes(a) || (a = o[i][0]), i === "raw" && (a = "raw"), {
|
|
1102
|
+
mode: i,
|
|
1103
|
+
display: a
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
_normalizeYAxisSettings(e) {
|
|
1107
|
+
let t = e && typeof e == "object" ? e : {}, n = Number.isFinite(Number(t.referenceLineValue)) ? Number(t.referenceLineValue) : null;
|
|
1108
|
+
return {
|
|
1109
|
+
startAtZero: !!t.startAtZero,
|
|
1110
|
+
referenceLineEnabled: !!t.referenceLineEnabled && Number.isFinite(n),
|
|
1111
|
+
referenceLineValue: n,
|
|
1112
|
+
referenceLineLabel: typeof t.referenceLineLabel == "string" ? t.referenceLineLabel : ""
|
|
1113
|
+
};
|
|
1114
|
+
}
|
|
1115
|
+
_getShortMonthNames() {
|
|
1116
|
+
return [
|
|
1117
|
+
"jan",
|
|
1118
|
+
"feb",
|
|
1119
|
+
"mar",
|
|
1120
|
+
"apr",
|
|
1121
|
+
"maj",
|
|
1122
|
+
"jun",
|
|
1123
|
+
"jul",
|
|
1124
|
+
"aug",
|
|
1125
|
+
"sep",
|
|
1126
|
+
"okt",
|
|
1127
|
+
"nov",
|
|
1128
|
+
"dec"
|
|
1129
|
+
];
|
|
1130
|
+
}
|
|
1131
|
+
_getLongMonthNames() {
|
|
1132
|
+
return [
|
|
1133
|
+
"januari",
|
|
1134
|
+
"februari",
|
|
1135
|
+
"mars",
|
|
1136
|
+
"april",
|
|
1137
|
+
"maj",
|
|
1138
|
+
"juni",
|
|
1139
|
+
"juli",
|
|
1140
|
+
"augusti",
|
|
1141
|
+
"september",
|
|
1142
|
+
"oktober",
|
|
1143
|
+
"november",
|
|
1144
|
+
"december"
|
|
1145
|
+
];
|
|
1146
|
+
}
|
|
1147
|
+
_formatCategoryTimeLabel(e, t) {
|
|
1148
|
+
if (!e || t.mode === "raw" || t.display === "raw") return null;
|
|
1149
|
+
if (t.mode === "year") {
|
|
1150
|
+
let t = /^\s*(\d{4})\s*$/.exec(e);
|
|
1151
|
+
return t ? t[1] : null;
|
|
1152
|
+
}
|
|
1153
|
+
if (t.mode === "monthCode") {
|
|
1154
|
+
let n = /^\s*(\d{4})M(0?[1-9]|1[0-2])\s*$/i.exec(e);
|
|
1155
|
+
if (!n) return null;
|
|
1156
|
+
let r = Number(n[2]) - 1, i = n[1], a = String(r + 1).padStart(2, "0");
|
|
1157
|
+
return t.display === "iso-month" ? `${i}-${a}` : t.display === "short-month" ? `${this._getShortMonthNames()[r]} ${i}` : t.display === "long-month" ? `${this._getLongMonthNames()[r]} ${i}` : e;
|
|
1158
|
+
}
|
|
1159
|
+
if (t.mode === "quarterCode") {
|
|
1160
|
+
let n = /^\s*(\d{4})(?:K(V)?|Q)(0?[1-4])\s*$/i.exec(e);
|
|
1161
|
+
if (!n) return null;
|
|
1162
|
+
let r = Number(n[3]), i = n[1];
|
|
1163
|
+
return t.display === "quarter-compact" ? `${i} K${r}` : t.display === "quarter-short" ? `kv ${r} ${i}` : t.display === "quarter-long" ? `${[
|
|
1164
|
+
"första",
|
|
1165
|
+
"andra",
|
|
1166
|
+
"tredje",
|
|
1167
|
+
"fjärde"
|
|
1168
|
+
][r - 1]} kvartalet ${i}` : e;
|
|
1169
|
+
}
|
|
1170
|
+
if (t.mode === "weekCode") {
|
|
1171
|
+
let n = /^\s*(\d{4})(?:V|W)(0?[1-9]|[1-4][0-9]|5[0-3])\s*$/i.exec(e);
|
|
1172
|
+
if (!n) return null;
|
|
1173
|
+
let r = Number(n[2]), i = n[1];
|
|
1174
|
+
return t.display === "week-compact" ? `${i} v. ${r}` : t.display === "week-long" ? `vecka ${r} ${i}` : e;
|
|
1175
|
+
}
|
|
1176
|
+
if (t.mode === "tertialCode") {
|
|
1177
|
+
let n = /^\s*(\d{4})T(0?[1-3])\s*$/i.exec(e);
|
|
1178
|
+
if (!n) return null;
|
|
1179
|
+
let r = Number(n[2]), i = n[1];
|
|
1180
|
+
return t.display === "tertial-compact" ? `${i} T${r}` : t.display === "tertial-short" ? `tertial ${r} ${i}` : t.display === "tertial-long" ? `${[
|
|
1181
|
+
"första",
|
|
1182
|
+
"andra",
|
|
1183
|
+
"tredje"
|
|
1184
|
+
][r - 1]} tertialet ${i}` : e;
|
|
1185
|
+
}
|
|
1186
|
+
return null;
|
|
1187
|
+
}
|
|
1188
|
+
_localizeAutomaticNumericText(e) {
|
|
1189
|
+
let t = this._normalizeValueFormat(this.valueFormat), n = String(e ?? "").trim();
|
|
1190
|
+
if (!n || n === ".." || n === "...") return null;
|
|
1191
|
+
let r = n.replace(/[ \s]/g, "");
|
|
1192
|
+
if (!/^-?\d+(?:[.,]\d+)?$/.test(r)) return null;
|
|
1193
|
+
let i = t.decimalSeparator === "." ? "." : ",";
|
|
1194
|
+
return i === "." && r.indexOf(",") !== -1 ? r.replace(",", ".") : i === "," && r.indexOf(".") !== -1 ? r.replace(".", ",") : r;
|
|
1195
|
+
}
|
|
1196
|
+
_inferAutomaticValueDecimals(e) {
|
|
1197
|
+
if (!Number.isFinite(e)) return 0;
|
|
1198
|
+
let t = String(e);
|
|
1199
|
+
/e/i.test(t) && (t = e.toFixed(6).replace(/0+$/, "").replace(/\.$/, ""));
|
|
1200
|
+
let n = t.replace(/^-/, "").split(".");
|
|
1201
|
+
return n.length > 1 ? Math.min(n[1].length, 6) : 0;
|
|
1202
|
+
}
|
|
1203
|
+
_formatAutomaticValueForDisplay(e, t) {
|
|
1204
|
+
if (!Number.isFinite(e)) return null;
|
|
1205
|
+
let n = this._localizeAutomaticNumericText(t);
|
|
1206
|
+
if (n !== null) return n;
|
|
1207
|
+
let r = this._normalizeValueFormat(this.valueFormat), i = this._inferAutomaticValueDecimals(e);
|
|
1208
|
+
return this._formatLocalizedNumber(e, i, r.decimalSeparator);
|
|
1209
|
+
}
|
|
1210
|
+
_formatLocalizedNumber(e, t, n) {
|
|
1211
|
+
let r = new Intl.NumberFormat(this.lang === "en" ? "en-GB" : "sv-SE", {
|
|
1212
|
+
minimumFractionDigits: t,
|
|
1213
|
+
maximumFractionDigits: t
|
|
1214
|
+
}), i = n === "." || n === "," ? n : this.lang === "en" ? "." : ",";
|
|
1215
|
+
return r.formatToParts(e).map((e) => e.type === "decimal" ? i : e.value).join("");
|
|
1216
|
+
}
|
|
1217
|
+
_formatValueForDisplay(e, t, n) {
|
|
1218
|
+
if (!Number.isFinite(e)) return null;
|
|
1219
|
+
let r = {
|
|
1220
|
+
raw: 1,
|
|
1221
|
+
thousands: 1e3,
|
|
1222
|
+
millions: 1e6,
|
|
1223
|
+
billions: 1e9
|
|
1224
|
+
}, i = {
|
|
1225
|
+
raw: "",
|
|
1226
|
+
thousands: this.lang === "en" ? "k" : "t",
|
|
1227
|
+
millions: this.lang === "en" ? "M" : "mn",
|
|
1228
|
+
billions: this.lang === "en" ? "B" : "md"
|
|
1229
|
+
}, a = t.scale;
|
|
1230
|
+
if (a === "auto") {
|
|
1231
|
+
let t = Math.abs(e);
|
|
1232
|
+
a = t >= 1e9 ? "billions" : t >= 1e6 ? "millions" : t >= 1e3 ? "thousands" : "raw";
|
|
1233
|
+
}
|
|
1234
|
+
let o = e / (r[a] || 1), s = this._formatLocalizedNumber(o, t.decimals, t.decimalSeparator);
|
|
1235
|
+
t.type === "percent" ? s = `${s} %` : t.type === "currency" && (s = n ? `${s} kr` : s);
|
|
1236
|
+
let c = i[a] || "";
|
|
1237
|
+
return c && (s = `${s} ${c}`), s;
|
|
1238
|
+
}
|
|
1239
|
+
_isCategoryAxis(e) {
|
|
1240
|
+
return e?.categories?.length > 0 || e?.options?.type === "category";
|
|
1241
|
+
}
|
|
1242
|
+
_isTooltipNumericLikeText(e) {
|
|
1243
|
+
if (typeof e != "string") return !1;
|
|
1244
|
+
let t = e.trim();
|
|
1245
|
+
return t ? /^-?\d+(?:[.,]\d+)?$/.test(t) : !1;
|
|
1246
|
+
}
|
|
1247
|
+
_getTooltipPointRowIndex(e) {
|
|
1248
|
+
let t = e?.point || e;
|
|
1249
|
+
return Number.isFinite(t?.x) ? Number(t.x) : Number.isFinite(e?.x) ? Number(e.x) : Number.isFinite(t?.index) ? Number(t.index) : Number.isFinite(e?.index) ? Number(e.index) : null;
|
|
1250
|
+
}
|
|
1251
|
+
_getTooltipTableCategoryValue(e) {
|
|
1252
|
+
let t = this._getResolvedTableData();
|
|
1253
|
+
if (!t?.rows?.length) return "";
|
|
1254
|
+
let n = this._getTooltipPointRowIndex(e);
|
|
1255
|
+
if (n === null || n < 0 || n >= t.rows.length) return "";
|
|
1256
|
+
let r = t.rows[n];
|
|
1257
|
+
return !Array.isArray(r) || r.length === 0 ? "" : this._normalizeRenderableCell(r[0]).text;
|
|
1258
|
+
}
|
|
1259
|
+
_getTooltipSeriesDataCategoryValue(e) {
|
|
1260
|
+
let t = e?.point || e, n = t?.series || e?.series, r = this._getTooltipPointRowIndex(e);
|
|
1261
|
+
if (!n || r === null) return "";
|
|
1262
|
+
let i = [n?.options?.data, n?.userOptions?.data];
|
|
1263
|
+
for (let e of i) {
|
|
1264
|
+
if (!Array.isArray(e) || r < 0 || r >= e.length) continue;
|
|
1265
|
+
let t = e[r];
|
|
1266
|
+
if (!t || typeof t != "object") continue;
|
|
1267
|
+
let n = t.category !== void 0 && t.category !== null ? String(t.category) : typeof t.name == "string" ? t.name : "";
|
|
1268
|
+
if (n && !this._isTooltipNumericLikeText(n)) return n;
|
|
1269
|
+
}
|
|
1270
|
+
let a = t?.options?.category !== void 0 && t.options.category !== null ? String(t.options.category) : "";
|
|
1271
|
+
if (a && !this._isTooltipNumericLikeText(a)) return a;
|
|
1272
|
+
let o = typeof t?.name == "string" ? t.name.trim() : "";
|
|
1273
|
+
return o && !this._isTooltipNumericLikeText(o) ? o : "";
|
|
1274
|
+
}
|
|
1275
|
+
_getTooltipXAxisLabel(e, t) {
|
|
1276
|
+
let n = e?.point || e, r = n?.series?.xAxis || e?.series?.xAxis, i = this._getTooltipPointRowIndex(e), a = [];
|
|
1277
|
+
if (r && Array.isArray(r.categories) && i !== null) {
|
|
1278
|
+
let e = r.categories[i];
|
|
1279
|
+
e != null && a.push(String(e));
|
|
1280
|
+
}
|
|
1281
|
+
typeof n?.category == "string" && n.category.trim() && a.push(n.category), typeof e?.key == "string" && e.key.trim() && a.push(e.key), typeof e?.x == "string" && e.x.trim() && a.push(e.x);
|
|
1282
|
+
let o = this._getTooltipSeriesDataCategoryValue(e);
|
|
1283
|
+
o && a.push(o);
|
|
1284
|
+
let s = this._getTooltipTableCategoryValue(e);
|
|
1285
|
+
s && a.push(s);
|
|
1286
|
+
for (let e of a) {
|
|
1287
|
+
let n = String(e).trim();
|
|
1288
|
+
if (!(!n || this._isTooltipNumericLikeText(n))) return this._formatCategoryTimeLabel(n, t) ?? n;
|
|
1289
|
+
}
|
|
1290
|
+
let c = a.find((e) => String(e).trim());
|
|
1291
|
+
if (!c) return "";
|
|
1292
|
+
let l = String(c).trim();
|
|
1293
|
+
return this._formatCategoryTimeLabel(l, t) ?? l;
|
|
1294
|
+
}
|
|
1295
|
+
_getTooltipPointLabel(e) {
|
|
1296
|
+
let t = e?.point || e, n = t?.series || e?.series, r = String(t?.series?.type || n?.type || t?.series?.options?.type || n?.options?.type || t?.series?.chart?.options?.chart?.type || "").trim().toLowerCase();
|
|
1297
|
+
return ["pie", "variablepie"].includes(r) ? t?.name || n?.name || "" : n?.name || t?.name || "";
|
|
1298
|
+
}
|
|
1299
|
+
_applyTimeFormatToLiveChart(e) {
|
|
1300
|
+
let t = this._normalizeTimeFormat(this.timeFormat);
|
|
1301
|
+
if (t.mode === "raw" || t.display === "raw") return;
|
|
1302
|
+
let n = this._formatCategoryTimeLabel.bind(this);
|
|
1303
|
+
[...e?.xAxis || [], ...e?.yAxis || []].forEach((e) => {
|
|
1304
|
+
if (!this._isCategoryAxis(e)) return;
|
|
1305
|
+
let r = e.options?.labels && typeof e.options.labels == "object" ? { ...e.options.labels } : {}, i = typeof r.formatter == "function" ? r.formatter : null;
|
|
1306
|
+
r.formatter = function() {
|
|
1307
|
+
let e = "";
|
|
1308
|
+
if (this?.axis && Array.isArray(this.axis.categories) && typeof this.pos == "number") {
|
|
1309
|
+
let t = this.axis.categories[this.pos];
|
|
1310
|
+
t != null && (e = String(t));
|
|
1311
|
+
} else this?.value !== void 0 && this.value !== null && (e = String(this.value));
|
|
1312
|
+
let r = n(e, t);
|
|
1313
|
+
return r === null ? i ? i.call(this) : e : r;
|
|
1314
|
+
}, delete r.format, e.update({ labels: r }, !1);
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
_applyValueFormatToLiveChart(e) {
|
|
1318
|
+
let t = this._normalizeValueFormat(this.valueFormat), n = this._normalizeTimeFormat(this.timeFormat), r = this._formatValueForDisplay.bind(this), i = this._formatAutomaticValueForDisplay.bind(this), a = this._getTooltipXAxisLabel.bind(this), o = this._getTooltipPointLabel.bind(this);
|
|
1319
|
+
if (this._shouldPreserveSourceValueFormatting(this.valueFormat)) {
|
|
1320
|
+
let r = e?.options?.tooltip && typeof e.options.tooltip == "object" ? { ...e.options.tooltip } : {}, s = e?.options?.plotOptions && typeof e.options.plotOptions == "object" ? { ...e.options.plotOptions } : {}, c = s.series && typeof s.series == "object" ? { ...s.series } : {}, l = c.dataLabels && typeof c.dataLabels == "object" ? { ...c.dataLabels } : {}, u = e?.options?.lang && typeof e.options.lang == "object" ? { ...e.options.lang } : {};
|
|
1321
|
+
delete l.format, delete l.formatter, u.decimalPoint = t.decimalSeparator === "." ? "." : ",", u.thousandsSep = " ", r.valueDecimals = void 0, r.formatter = function() {
|
|
1322
|
+
let e = Array.isArray(this.points) && this.points.length ? this.points : [this.point || this], t = a(this, n), r = [];
|
|
1323
|
+
return e.forEach((e) => {
|
|
1324
|
+
let t = e?.point || e, n = Number.isFinite(e?.y) ? e.y : t?.y, a = o(e), s = i(n, t?.options && t.options.y !== void 0 && t.options.y !== null ? String(t.options.y) : t && t.y !== void 0 && t.y !== null ? String(t.y) : "");
|
|
1325
|
+
!Number.isFinite(n) || s == null || r.push(`${a ? `${String(a)}: ` : ""}<b>${String(s)}</b><br/>`);
|
|
1326
|
+
}), `${t ? `<span>${String(t)}</span><br/>` : ""}${r.join("")}`;
|
|
1327
|
+
}.bind(this), e.update({
|
|
1328
|
+
lang: u,
|
|
1329
|
+
tooltip: r,
|
|
1330
|
+
plotOptions: {
|
|
1331
|
+
...s,
|
|
1332
|
+
series: {
|
|
1333
|
+
...c,
|
|
1334
|
+
dataLabels: l
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
}, !1, !1, !1), (e?.yAxis || []).forEach((e) => {
|
|
1338
|
+
let t = e.options?.labels && typeof e.options.labels == "object" ? { ...e.options.labels } : {};
|
|
1339
|
+
delete t.format, delete t.formatter, e.update({ labels: t }, !1);
|
|
1340
|
+
});
|
|
1341
|
+
return;
|
|
1342
|
+
}
|
|
1343
|
+
e.update({
|
|
1344
|
+
tooltip: {
|
|
1345
|
+
...e.options?.tooltip || {},
|
|
1346
|
+
valueDecimals: t.decimals,
|
|
1347
|
+
formatter: function() {
|
|
1348
|
+
let e = Array.isArray(this.points) && this.points.length ? this.points : [this.point || this], i = a(this, n), s = [];
|
|
1349
|
+
return e.forEach((e) => {
|
|
1350
|
+
let n = e?.point || e, i = r(Number.isFinite(e?.y) ? e.y : n?.y, t, !0);
|
|
1351
|
+
if (i === null) return;
|
|
1352
|
+
let a = o(e);
|
|
1353
|
+
s.push(`${a ? `${String(a)}: ` : ""}<b>${i}</b><br/>`);
|
|
1354
|
+
}), `${i ? `<span>${String(i)}</span><br/>` : ""}${s.join("")}`;
|
|
1355
|
+
}
|
|
1356
|
+
},
|
|
1357
|
+
plotOptions: {
|
|
1358
|
+
...e.options?.plotOptions || {},
|
|
1359
|
+
series: {
|
|
1360
|
+
...e.options?.plotOptions?.series || {},
|
|
1361
|
+
dataLabels: {
|
|
1362
|
+
...e.options?.plotOptions?.series?.dataLabels || {},
|
|
1363
|
+
formatter: function() {
|
|
1364
|
+
return r(Number.isFinite(this?.y) ? this.y : this?.point?.y, t, t.type === "percent") ?? null;
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
}, !1, !1, !1), (e?.yAxis || []).forEach((e) => {
|
|
1370
|
+
let n = e.options?.labels && typeof e.options.labels == "object" ? { ...e.options.labels } : {}, i = typeof n.formatter == "function" ? n.formatter : null, a = !(e.options?.title && typeof e.options.title.text == "string" && e.options.title.text.trim());
|
|
1371
|
+
n.formatter = function() {
|
|
1372
|
+
let e = r(this?.value, t, a);
|
|
1373
|
+
return e === null ? i ? i.call(this) : this?.value : e;
|
|
1374
|
+
}, (t.type === "percent" || t.scale !== "auto") && delete n.format, e.update({ labels: n }, !1);
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
_applyYAxisSettingsToLiveChart(e) {
|
|
1378
|
+
let t = this._normalizeYAxisSettings(this.yAxisSettings), n = e?.yAxis || [];
|
|
1379
|
+
n.length && n.forEach((e, n) => {
|
|
1380
|
+
let r = e.options && typeof e.options == "object" ? e.options : {}, i = {}, a = r.min !== void 0 && r.min !== null && r.min !== "";
|
|
1381
|
+
n === 0 && t.startAtZero && !a && (i.min = 0);
|
|
1382
|
+
let o = Array.isArray(r.plotLines) ? r.plotLines.filter((e) => e?.id !== "scb-viz-reference-line") : [];
|
|
1383
|
+
n === 0 && t.referenceLineEnabled && Number.isFinite(t.referenceLineValue) && o.push({
|
|
1384
|
+
id: "scb-viz-reference-line",
|
|
1385
|
+
className: "scb-axis-plotline scb-viz-reference-line",
|
|
1386
|
+
value: t.referenceLineValue
|
|
1387
|
+
}), o.length ? i.plotLines = o : Array.isArray(r.plotLines) && (i.plotLines = []), e.update(i, !1);
|
|
1388
|
+
});
|
|
1389
|
+
}
|
|
1390
|
+
#p() {
|
|
1391
|
+
let e = this._getCurrentHighchartsChart();
|
|
1392
|
+
if (!e) return;
|
|
1393
|
+
let t = !1;
|
|
1394
|
+
this.timeFormat !== void 0 && (this._applyTimeFormatToLiveChart(e), t = !0), this.valueFormat !== void 0 && (this._applyValueFormatToLiveChart(e), t = !0), this.yAxisSettings !== void 0 && (this._applyYAxisSettingsToLiveChart(e), t = !0), t && e.redraw(!1);
|
|
1395
|
+
}
|
|
1396
|
+
_getCurrentHighchartsChart() {
|
|
1397
|
+
if (this._getCurrentPrintableView() !== "diagram") return;
|
|
1398
|
+
let e = this.#a(this._getDiagramAssignedElements());
|
|
1399
|
+
if (e !== void 0) return window.Highcharts?.charts?.[e];
|
|
1400
|
+
}
|
|
1401
|
+
_getSeriesDifferentiationGroup(e, t) {
|
|
1402
|
+
let n = String(e?.type || e?.options?.type || t?.options?.chart?.type || "").trim().toLowerCase();
|
|
1403
|
+
return [
|
|
1404
|
+
"line",
|
|
1405
|
+
"spline",
|
|
1406
|
+
"scatter"
|
|
1407
|
+
].includes(n) ? "line" : ["area", "areaspline"].includes(n) ? "area" : ["column", "bar"].includes(n) ? this._isGroupedSeriesDifferentiationChart(e, t) ? "grouped-fill" : "fill" : ["pie", "variablepie"].includes(n) ? "point-fill" : null;
|
|
1408
|
+
}
|
|
1409
|
+
_getSeriesDifferentiationVariantByIndex(e) {
|
|
1410
|
+
return S(e);
|
|
1411
|
+
}
|
|
1412
|
+
_isGroupedSeriesDifferentiationChart(e, t) {
|
|
1413
|
+
return C(e, t);
|
|
1414
|
+
}
|
|
1415
|
+
_usesGroupedPointDifferentiation(e) {
|
|
1416
|
+
return O(e);
|
|
1417
|
+
}
|
|
1418
|
+
_getGroupedSeriesDifferentiationVariant(e, t, n) {
|
|
1419
|
+
let r = v(e, t, n);
|
|
1420
|
+
return {
|
|
1421
|
+
...r,
|
|
1422
|
+
variantIndex: typeof r.variantIndex == "number" ? r.variantIndex : n
|
|
1423
|
+
};
|
|
1424
|
+
}
|
|
1425
|
+
_applyGroupedLegendSeriesDifferentiation(e) {
|
|
1426
|
+
(Array.isArray(e?.legend?.allItems) ? e.legend.allItems : []).forEach((t, n) => {
|
|
1427
|
+
let r = t && t.series ? t.series : t;
|
|
1428
|
+
if (!this._isGroupedSeriesDifferentiationChart(r, e)) return;
|
|
1429
|
+
let { variantIndex: i, patternKind: a } = this._getGroupedSeriesDifferentiationVariant(t, e, n), o = this._getHighchartsColorClassName(t?.legendSymbol ?? t?.legendItem?.symbol ?? t?.legendItem?.group, i);
|
|
1430
|
+
this._getLegendSeriesDifferentiationTargets(t).fillTargets.forEach((e) => {
|
|
1431
|
+
this._setSeriesDifferentiationMetadata(e, {
|
|
1432
|
+
role: "legend-fill",
|
|
1433
|
+
patternKind: a
|
|
1434
|
+
}), this._setSeriesDifferentiationColorClass(e, o);
|
|
1435
|
+
}), this._ensureStyledModeSeriesPattern(e, o, a);
|
|
1436
|
+
});
|
|
1437
|
+
}
|
|
1438
|
+
_clearGroupedLegendSeriesDifferentiation(e) {
|
|
1439
|
+
(Array.isArray(e?.legend?.allItems) ? e.legend.allItems : []).forEach((t) => {
|
|
1440
|
+
let n = t && t.series ? t.series : t;
|
|
1441
|
+
if (!this._isGroupedSeriesDifferentiationChart(n, e)) return;
|
|
1442
|
+
let r = this._getLegendSeriesDifferentiationTargets(t);
|
|
1443
|
+
r.graphTargets.forEach((e) => {
|
|
1444
|
+
this._clearSeriesDifferentiationMetadata(e);
|
|
1445
|
+
}), r.fillTargets.forEach((e) => {
|
|
1446
|
+
this._clearSeriesDifferentiationMetadata(e), this._clearSeriesDifferentiationColorClass(e);
|
|
1447
|
+
});
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
_shouldShowSeriesDifferentiationAction() {
|
|
1451
|
+
return D({
|
|
1452
|
+
chart: this._getCurrentHighchartsChart(),
|
|
1453
|
+
getCurrentPrintableView: () => this._getCurrentPrintableView(),
|
|
1454
|
+
getSeriesDifferentiationGroup: (e, t) => this._getSeriesDifferentiationGroup(e, t),
|
|
1455
|
+
isHighchartsStyledMode: (e) => this._isHighchartsStyledMode(e)
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
_getSeriesDifferentiationSnapshotStore(e) {
|
|
1459
|
+
let t = this._seriesDifferentiationSnapshots.get(e);
|
|
1460
|
+
return t || (t = /* @__PURE__ */ new Map(), this._seriesDifferentiationSnapshots.set(e, t)), t;
|
|
1461
|
+
}
|
|
1462
|
+
_cloneSeriesOptionValue(e) {
|
|
1463
|
+
return Array.isArray(e) ? e.map((e) => this._cloneSeriesOptionValue(e)) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, this._cloneSeriesOptionValue(t)])) : e;
|
|
1464
|
+
}
|
|
1465
|
+
_captureSeriesDifferentiationSnapshot(e) {
|
|
1466
|
+
let t = this._cloneSeriesOptionValue(e?.options?.marker), n = this._cloneSeriesOptionValue(e?.resetA11yMarkerOptions), r = this._cloneSeriesOptionValue(e?.userOptions?.marker), i = t?.states, a = e?.a11yMarkersForced === !0 && n && Object.keys(n).length > 0 || i?.normal?.opacity === 0 && n && Object.keys(n).length > 0 ? n : r;
|
|
1467
|
+
return { marker: a && Object.keys(a).length > 0 ? a : t && Object.keys(t).length > 0 ? t : { enabled: !1 } };
|
|
1468
|
+
}
|
|
1469
|
+
_isHighchartsStyledMode(e) {
|
|
1470
|
+
return w(e);
|
|
1471
|
+
}
|
|
1472
|
+
_getHighchartsSvgRoot(e) {
|
|
1473
|
+
return b(e);
|
|
1474
|
+
}
|
|
1475
|
+
_getHighchartsColorClassName(e, t) {
|
|
1476
|
+
return y(e, t);
|
|
1477
|
+
}
|
|
1478
|
+
_setSeriesDifferentiationMetadata(e, t) {
|
|
1479
|
+
E(e, t);
|
|
1480
|
+
}
|
|
1481
|
+
_clearSeriesDifferentiationMetadata(e) {
|
|
1482
|
+
g(e);
|
|
1483
|
+
}
|
|
1484
|
+
_setSeriesDifferentiationColorClass(e, t) {
|
|
1485
|
+
T(e, t);
|
|
1486
|
+
}
|
|
1487
|
+
_clearSeriesDifferentiationColorClass(e) {
|
|
1488
|
+
h(e);
|
|
1489
|
+
}
|
|
1490
|
+
_getLegendSeriesDifferentiationTargets(e) {
|
|
1491
|
+
return x(e);
|
|
1492
|
+
}
|
|
1493
|
+
_ensureStyledModeSeriesPattern(e, t, n) {
|
|
1494
|
+
_(e, t, n);
|
|
1495
|
+
}
|
|
1496
|
+
_applyStyledModeSeriesDifferentiation(e) {
|
|
1497
|
+
let t = this._getHighchartsSvgRoot(e);
|
|
1498
|
+
if (!t) return;
|
|
1499
|
+
t.classList.add("scb-viz-series-differentiation-enabled");
|
|
1500
|
+
let n = m(), r = this._getSeriesDifferentiationSnapshotStore(e);
|
|
1501
|
+
e.series?.forEach((t, i) => {
|
|
1502
|
+
let a = this._getSeriesDifferentiationGroup(t, e);
|
|
1503
|
+
if (!a) return;
|
|
1504
|
+
let o = String(t?.index ?? i);
|
|
1505
|
+
r.has(o) || r.set(o, this._captureSeriesDifferentiationSnapshot(t));
|
|
1506
|
+
let s = a === "grouped-fill" && this._usesGroupedPointDifferentiation(t), c = a === "grouped-fill" ? this._getGroupedSeriesDifferentiationVariant(t, e, i) : {
|
|
1507
|
+
variantIndex: i,
|
|
1508
|
+
...this._getSeriesDifferentiationVariantByIndex(i)
|
|
1509
|
+
}, { dashStyle: l, markerSymbol: u, patternKind: d } = c, f = this._getHighchartsColorClassName(t?.graph ?? t?.area ?? t?.group, c.variantIndex), p = this._getLegendSeriesDifferentiationTargets(t);
|
|
1510
|
+
this._setSeriesDifferentiationMetadata(t?.graph, {
|
|
1511
|
+
role: "graph",
|
|
1512
|
+
dashStyle: l
|
|
1513
|
+
}), a === "area" && (this._setSeriesDifferentiationMetadata(t?.area, {
|
|
1514
|
+
role: "area",
|
|
1515
|
+
patternKind: d
|
|
1516
|
+
}), this._setSeriesDifferentiationColorClass(t?.area, f), this._ensureStyledModeSeriesPattern(e, f, d)), a === "fill" && (t.points?.forEach((e) => {
|
|
1517
|
+
this._setSeriesDifferentiationMetadata(e?.graphic, {
|
|
1518
|
+
role: "fill",
|
|
1519
|
+
patternKind: d
|
|
1520
|
+
}), this._setSeriesDifferentiationColorClass(e?.graphic, f);
|
|
1521
|
+
}), this._ensureStyledModeSeriesPattern(e, f, d)), a === "grouped-fill" && (s ? t.points?.forEach((t, n) => {
|
|
1522
|
+
let r = this._getGroupedSeriesDifferentiationVariant(t, e, n), i = this._getHighchartsColorClassName(t?.graphic ?? t?.legendSymbol ?? t?.legendItem?.symbol ?? t?.legendItem?.group, r.variantIndex);
|
|
1523
|
+
this._setSeriesDifferentiationMetadata(t?.graphic, {
|
|
1524
|
+
role: "fill",
|
|
1525
|
+
patternKind: r.patternKind
|
|
1526
|
+
}), this._setSeriesDifferentiationColorClass(t?.graphic, i), this._ensureStyledModeSeriesPattern(e, i, r.patternKind);
|
|
1527
|
+
}) : (t.points?.forEach((e) => {
|
|
1528
|
+
this._setSeriesDifferentiationMetadata(e?.graphic, {
|
|
1529
|
+
role: "fill",
|
|
1530
|
+
patternKind: d
|
|
1531
|
+
}), this._setSeriesDifferentiationColorClass(e?.graphic, f);
|
|
1532
|
+
}), this._ensureStyledModeSeriesPattern(e, f, d))), a === "point-fill" && t.points?.forEach((t, r) => {
|
|
1533
|
+
let i = n[r % n.length], a = this._getHighchartsColorClassName(t?.graphic ?? t?.legendSymbol ?? t?.legendItem?.symbol ?? t?.legendItem?.group, r), o = this._getLegendSeriesDifferentiationTargets(t);
|
|
1534
|
+
this._setSeriesDifferentiationMetadata(t?.graphic, {
|
|
1535
|
+
role: "fill",
|
|
1536
|
+
patternKind: i
|
|
1537
|
+
}), this._setSeriesDifferentiationColorClass(t?.graphic, a), this._ensureStyledModeSeriesPattern(e, a, i), o.fillTargets.forEach((e) => {
|
|
1538
|
+
this._setSeriesDifferentiationMetadata(e, {
|
|
1539
|
+
role: "legend-fill",
|
|
1540
|
+
patternKind: i
|
|
1541
|
+
}), this._setSeriesDifferentiationColorClass(e, a);
|
|
1542
|
+
});
|
|
1543
|
+
}), (a === "line" || a === "area") && p.graphTargets.forEach((e) => {
|
|
1544
|
+
this._setSeriesDifferentiationMetadata(e, {
|
|
1545
|
+
role: "legend-symbol",
|
|
1546
|
+
dashStyle: l
|
|
1547
|
+
});
|
|
1548
|
+
}), (a === "area" || a === "fill" || a === "grouped-fill" && !s) && p.fillTargets.forEach((e) => {
|
|
1549
|
+
this._setSeriesDifferentiationMetadata(e, {
|
|
1550
|
+
role: "legend-fill",
|
|
1551
|
+
patternKind: d
|
|
1552
|
+
}), this._setSeriesDifferentiationColorClass(e, f);
|
|
1553
|
+
}), (a === "line" || a === "area") && t.update({ marker: {
|
|
1554
|
+
enabled: !0,
|
|
1555
|
+
symbol: u
|
|
1556
|
+
} }, !1);
|
|
1557
|
+
}), this._applyGroupedLegendSeriesDifferentiation(e), e.redraw(!1);
|
|
1558
|
+
}
|
|
1559
|
+
_restoreStyledModeSeriesDifferentiation(e) {
|
|
1560
|
+
this._getHighchartsSvgRoot(e)?.classList.remove("scb-viz-series-differentiation-enabled");
|
|
1561
|
+
let t = this._getSeriesDifferentiationSnapshotStore(e);
|
|
1562
|
+
e.series?.forEach((n, r) => {
|
|
1563
|
+
let i = this._getSeriesDifferentiationGroup(n, e);
|
|
1564
|
+
if (!i) return;
|
|
1565
|
+
let a = this._getLegendSeriesDifferentiationTargets(n);
|
|
1566
|
+
if (this._clearSeriesDifferentiationMetadata(n?.graph), this._clearSeriesDifferentiationMetadata(n?.area), this._clearSeriesDifferentiationColorClass(n?.area), n.points?.forEach((e) => {
|
|
1567
|
+
let t = this._getLegendSeriesDifferentiationTargets(e);
|
|
1568
|
+
this._clearSeriesDifferentiationMetadata(e?.graphic), this._clearSeriesDifferentiationColorClass(e?.graphic), t.graphTargets.forEach((e) => {
|
|
1569
|
+
this._clearSeriesDifferentiationMetadata(e);
|
|
1570
|
+
}), t.fillTargets.forEach((e) => {
|
|
1571
|
+
this._clearSeriesDifferentiationMetadata(e), this._clearSeriesDifferentiationColorClass(e);
|
|
1572
|
+
});
|
|
1573
|
+
}), a.graphTargets.forEach((e) => {
|
|
1574
|
+
this._clearSeriesDifferentiationMetadata(e);
|
|
1575
|
+
}), a.fillTargets.forEach((e) => {
|
|
1576
|
+
this._clearSeriesDifferentiationMetadata(e), this._clearSeriesDifferentiationColorClass(e);
|
|
1577
|
+
}), i === "line" || i === "area") {
|
|
1578
|
+
let e = t.get(String(n?.index ?? r));
|
|
1579
|
+
n.update({ marker: this._cloneSeriesOptionValue(e?.marker) }, !1);
|
|
1580
|
+
}
|
|
1581
|
+
}), this._clearGroupedLegendSeriesDifferentiation(e), e.redraw(!1), this._seriesDifferentiationSnapshots.delete(e);
|
|
1582
|
+
}
|
|
1583
|
+
#m(e) {
|
|
1584
|
+
this._isHighchartsStyledMode(e) && this._applyStyledModeSeriesDifferentiation(e);
|
|
1585
|
+
}
|
|
1586
|
+
#h(e) {
|
|
1587
|
+
this._isHighchartsStyledMode(e) && this._restoreStyledModeSeriesDifferentiation(e);
|
|
1588
|
+
}
|
|
1589
|
+
#g() {
|
|
1590
|
+
let e = this._getCurrentHighchartsChart();
|
|
1591
|
+
if (e) {
|
|
1592
|
+
if (this._seriesDifferentiationEnabled) {
|
|
1593
|
+
this.#m(e);
|
|
1594
|
+
return;
|
|
1595
|
+
}
|
|
1596
|
+
this.#h(e);
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
_canExportRaster() {
|
|
1600
|
+
return this._getExportableVisualElement() !== null;
|
|
1601
|
+
}
|
|
1602
|
+
_canExportCsv() {
|
|
1603
|
+
return !!this._getResolvedTableData()?.rows?.length;
|
|
1604
|
+
}
|
|
1605
|
+
_buildExportFileName(e) {
|
|
1606
|
+
return t({
|
|
1607
|
+
lang: this.lang,
|
|
1608
|
+
title: this.title
|
|
1609
|
+
}, e);
|
|
1610
|
+
}
|
|
1611
|
+
_getFullscreenTarget() {
|
|
1612
|
+
return this;
|
|
1613
|
+
}
|
|
1614
|
+
_getCurrentFullscreenElement() {
|
|
1615
|
+
return o();
|
|
1616
|
+
}
|
|
1617
|
+
_isFullscreenSupported() {
|
|
1618
|
+
return s(this._getFullscreenTarget());
|
|
1619
|
+
}
|
|
1620
|
+
_syncFullscreenState() {
|
|
1621
|
+
let e = this._getCurrentFullscreenElement() === this._getFullscreenTarget();
|
|
1622
|
+
this._isFullscreen = e, this.toggleAttribute("data-scb-viz-fullscreen", e), this.#c(), this.#r();
|
|
1623
|
+
}
|
|
1624
|
+
async _toggleFullscreen() {
|
|
1625
|
+
await u(this._getFullscreenTarget());
|
|
1626
|
+
}
|
|
1627
|
+
_renderActionsMenu() {
|
|
1628
|
+
let e = this._getCurrentPrintableView(), t = this._canExportRaster(), n = this._canExportCsv(), r = t && (e === "diagram" || e === "image"), i = n && e === "table", a = this._shouldShowSeriesDifferentiationAction();
|
|
1629
|
+
return I`
|
|
1630
|
+
<div class="actions-menu">
|
|
1631
|
+
<scb-icon-button
|
|
1632
|
+
icon="more_vert"
|
|
1633
|
+
variant="outlined"
|
|
1634
|
+
size="medium"
|
|
1635
|
+
shape="square"
|
|
1636
|
+
label=${this.actionsMenuLabel}
|
|
1637
|
+
title=${this.actionsMenuLabel}
|
|
1638
|
+
aria-label=${this.actionsMenuLabel}
|
|
1639
|
+
aria-haspopup="menu"
|
|
1640
|
+
aria-expanded=${this._actionsMenuOpen ? "true" : "false"}
|
|
1641
|
+
@click=${(e) => this._toggleActionsMenu(e)}
|
|
1642
|
+
></scb-icon-button>
|
|
1643
|
+
<div
|
|
1644
|
+
class=${`actions-menu-panel ${this._actionsMenuOpen ? "actions-menu-panel--open" : ""}`}
|
|
1645
|
+
role="menu"
|
|
1646
|
+
aria-label=${this.actionsMenuLabel}
|
|
1647
|
+
>
|
|
1648
|
+
<ul class="actions-menu-list">
|
|
1649
|
+
<li>
|
|
1650
|
+
<button
|
|
1651
|
+
type="button"
|
|
1652
|
+
class="actions-menu-item"
|
|
1653
|
+
role="menuitem"
|
|
1654
|
+
@click=${this._onPrintClick}
|
|
1655
|
+
>
|
|
1656
|
+
<span class="actions-menu-item-icon" aria-hidden="true">print</span>
|
|
1657
|
+
<span class="actions-menu-item-label">${this.printLabel}</span>
|
|
1658
|
+
</button>
|
|
1659
|
+
</li>
|
|
1660
|
+
${r ? I`
|
|
1661
|
+
<li>
|
|
1662
|
+
<button
|
|
1663
|
+
type="button"
|
|
1664
|
+
class="actions-menu-item"
|
|
1665
|
+
role="menuitem"
|
|
1666
|
+
@click=${this._onDownloadPngClick}
|
|
1667
|
+
>
|
|
1668
|
+
<span class="actions-menu-item-icon" aria-hidden="true">image</span>
|
|
1669
|
+
<span class="actions-menu-item-label">${this.downloadPngLabel}</span>
|
|
1670
|
+
</button>
|
|
1671
|
+
</li>
|
|
1672
|
+
<li>
|
|
1673
|
+
<button
|
|
1674
|
+
type="button"
|
|
1675
|
+
class="actions-menu-item"
|
|
1676
|
+
role="menuitem"
|
|
1677
|
+
@click=${this._onDownloadJpgClick}
|
|
1678
|
+
>
|
|
1679
|
+
<span class="actions-menu-item-icon" aria-hidden="true">image</span>
|
|
1680
|
+
<span class="actions-menu-item-label">${this.downloadJpgLabel}</span>
|
|
1681
|
+
</button>
|
|
1682
|
+
</li>
|
|
1683
|
+
` : ""}
|
|
1684
|
+
${i ? I`
|
|
1685
|
+
<li>
|
|
1686
|
+
<button
|
|
1687
|
+
type="button"
|
|
1688
|
+
class="actions-menu-item"
|
|
1689
|
+
role="menuitem"
|
|
1690
|
+
@click=${this._onDownloadCsvClick}
|
|
1691
|
+
>
|
|
1692
|
+
<span class="actions-menu-item-icon" aria-hidden="true">table_view</span>
|
|
1693
|
+
<span class="actions-menu-item-label">${this.downloadCsvLabel}</span>
|
|
1694
|
+
</button>
|
|
1695
|
+
</li>
|
|
1696
|
+
` : ""}
|
|
1697
|
+
${a ? I`
|
|
1698
|
+
<li>
|
|
1699
|
+
<button
|
|
1700
|
+
type="button"
|
|
1701
|
+
class="actions-menu-item"
|
|
1702
|
+
role="menuitemcheckbox"
|
|
1703
|
+
aria-checked=${this._seriesDifferentiationEnabled ? "true" : "false"}
|
|
1704
|
+
@click=${this._onToggleSeriesDifferentiationClick}
|
|
1705
|
+
>
|
|
1706
|
+
<span class="actions-menu-item-icon" aria-hidden="true">texture</span>
|
|
1707
|
+
<span class="actions-menu-item-label"
|
|
1708
|
+
>${this._seriesDifferentiationEnabled ? this.disableSeriesDifferentiationLabel : this.enableSeriesDifferentiationLabel}</span
|
|
1709
|
+
>
|
|
1710
|
+
</button>
|
|
1711
|
+
</li>
|
|
1712
|
+
` : ""}
|
|
1713
|
+
${this._isFullscreenSupported() ? I`
|
|
1714
|
+
<li>
|
|
1715
|
+
<button
|
|
1716
|
+
type="button"
|
|
1717
|
+
class="actions-menu-item"
|
|
1718
|
+
role="menuitem"
|
|
1719
|
+
@click=${this._onToggleFullscreenClick}
|
|
1720
|
+
>
|
|
1721
|
+
<span class="actions-menu-item-icon" aria-hidden="true">${this._isFullscreen ? "fullscreen_exit" : "fullscreen"}</span>
|
|
1722
|
+
<span class="actions-menu-item-label"
|
|
1723
|
+
>${this._isFullscreen ? this.exitFullscreenLabel : this.enterFullscreenLabel}</span
|
|
1724
|
+
>
|
|
1725
|
+
</button>
|
|
1726
|
+
</li>
|
|
1727
|
+
` : ""}
|
|
1728
|
+
</ul>
|
|
1729
|
+
</div>
|
|
1730
|
+
</div>
|
|
1731
|
+
`;
|
|
1732
|
+
}
|
|
1733
|
+
_renderActions() {
|
|
1734
|
+
return I`
|
|
1735
|
+
<div class="actions-row">
|
|
1736
|
+
${this.variant === "Standard" && !this.disableToggle ? I`
|
|
1737
|
+
<div class="flipp-wrapper">
|
|
1738
|
+
<scb-segmented-button
|
|
1739
|
+
.value=${this.selectedChip || ""}
|
|
1740
|
+
@change=${(e) => this._onSegmentedChange(e)}
|
|
1741
|
+
>
|
|
1742
|
+
<scb-segmented-item
|
|
1743
|
+
label=${this.lang === "en" ? "Figure" : "Diagram"}
|
|
1744
|
+
value="Diagram"
|
|
1745
|
+
icon="bar_chart"
|
|
1746
|
+
></scb-segmented-item>
|
|
1747
|
+
<scb-segmented-item
|
|
1748
|
+
label=${this.lang === "en" ? "Table" : "Tabell"}
|
|
1749
|
+
value="Table"
|
|
1750
|
+
icon="table"
|
|
1751
|
+
></scb-segmented-item>
|
|
1752
|
+
</scb-segmented-button>
|
|
1753
|
+
</div>
|
|
1754
|
+
` : I`<div></div>`}
|
|
1755
|
+
${this._renderActionsMenu()}
|
|
1756
|
+
</div>
|
|
1757
|
+
`;
|
|
1758
|
+
}
|
|
1759
|
+
_renderHeader(e = !1) {
|
|
1760
|
+
let t = I`
|
|
1761
|
+
<div class="header">
|
|
1762
|
+
${this.title ? I` <div id=${this._getTitleId()} class="label">${this.title}</div> ` : ""}
|
|
1763
|
+
${this.subtitle ? I` <div id=${this._getSubtitleId()} class="sub-label">${this.subtitle}</div> ` : ""}
|
|
1764
|
+
</div>
|
|
1765
|
+
`;
|
|
1766
|
+
return e ? I`
|
|
1767
|
+
<div class="header-row">
|
|
1768
|
+
${t}
|
|
1769
|
+
${this._renderActionsMenu()}
|
|
1770
|
+
</div>
|
|
1771
|
+
` : t;
|
|
1772
|
+
}
|
|
1773
|
+
_renderTable() {
|
|
1774
|
+
let e = this._getResolvedTableData();
|
|
1775
|
+
if (!e || !e.rows || e.rows.length === 0) return null;
|
|
1776
|
+
let { alignments: t, headers: n, rows: r, rowHeaderRows: i } = this._getResolvedTableView(e), a = [this.title, this.subtitle].map((e) => typeof e == "string" ? e.trim() : "").filter(Boolean).join(". ");
|
|
1777
|
+
return I`
|
|
1778
|
+
<table class="scb-viz-table" part="table">
|
|
1779
|
+
${a ? I`<caption class="visually-hidden">${a}</caption>` : ""}
|
|
1780
|
+
${n.length > 0 ? I`
|
|
1781
|
+
<thead>
|
|
1782
|
+
<tr>
|
|
1783
|
+
${n.map((e, n) => I`<th scope="col" class=${t[n] === "right" ? "align-right" : "align-left"}><span class="scb-viz-table-heading-text">${e.html ? B(e.html) : e.text}</span></th>`)}
|
|
1784
|
+
</tr>
|
|
1785
|
+
</thead>
|
|
1786
|
+
` : ""}
|
|
1787
|
+
<tbody>
|
|
1788
|
+
${r.map((e, n) => {
|
|
1789
|
+
let r = i[n] === !0;
|
|
1790
|
+
return I`
|
|
1791
|
+
<tr>
|
|
1792
|
+
${e.map((e, n) => {
|
|
1793
|
+
let i = t[n] === "right" ? "align-right" : "align-left", a = e.html ? B(e.html) : e.text;
|
|
1794
|
+
return n === 0 && r ? I`<th scope="row" class=${i}>${a}</th>` : I`<td class=${i}>${a}</td>`;
|
|
1795
|
+
})}
|
|
1796
|
+
</tr>
|
|
1797
|
+
`;
|
|
1798
|
+
})}
|
|
1799
|
+
</tbody>
|
|
1800
|
+
</table>
|
|
1801
|
+
`;
|
|
1802
|
+
}
|
|
1803
|
+
_renderRichText(e) {
|
|
1804
|
+
let t = typeof e == "string" ? e.replace(/\r\n?/g, "\n") : "", n = t.split(/\n{2,}/).filter((e) => e !== "");
|
|
1805
|
+
return n.length ? I`${n.map((e) => I`<p class="body-text-paragraph">${e.split("\n").map((e, t) => I`${t > 0 ? I`<br />` : ""}${e}`)}</p>`)}` : t;
|
|
1806
|
+
}
|
|
1807
|
+
_escapeHtml(e) {
|
|
1808
|
+
return String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1809
|
+
}
|
|
1810
|
+
_renderRichTextHtml(e) {
|
|
1811
|
+
let t = typeof e == "string" ? e.replace(/\r\n?/g, "\n") : "", n = t.split(/\n{2,}/).filter((e) => e !== "");
|
|
1812
|
+
return n.length ? n.map((e) => `<p class="body-text-paragraph">${e.split("\n").map((e) => this._escapeHtml(e)).join("<br>")}</p>`).join("") : this._escapeHtml(t);
|
|
1813
|
+
}
|
|
1814
|
+
_hasMoreAboutStats() {
|
|
1815
|
+
return !!(this.comment || this.source || this.footnote || this.officialStatistics);
|
|
1816
|
+
}
|
|
1817
|
+
_renderMoreAboutStatsContent() {
|
|
1818
|
+
return I`
|
|
1819
|
+
<div class="more-about-stats-content">
|
|
1820
|
+
${this.comment ? I`
|
|
1821
|
+
<div class="section">
|
|
1822
|
+
<div class="secondary-label">${this.commentLabel}</div>
|
|
1823
|
+
<div class="body-text body-text-rich">${this._renderRichText(this.comment)}</div>
|
|
1824
|
+
</div>
|
|
1825
|
+
` : ""}
|
|
1826
|
+
${this.source ? I`
|
|
1827
|
+
<div class="section">
|
|
1828
|
+
<div class="secondary-label">${this.sourceLabel}</div>
|
|
1829
|
+
<div class="body-text">${this.source}</div>
|
|
1830
|
+
</div>
|
|
1831
|
+
` : ""}
|
|
1832
|
+
${this.footnote ? I`
|
|
1833
|
+
<div class="section">
|
|
1834
|
+
<div class="secondary-label">${this.footnoteLabel}</div>
|
|
1835
|
+
<div class="body-text body-text-rich">${this._renderRichText(this.footnote)}</div>
|
|
1836
|
+
</div>
|
|
1837
|
+
` : ""}
|
|
1838
|
+
${this.officialStatistics ? I`
|
|
1839
|
+
<a
|
|
1840
|
+
class="sos-logotype-link"
|
|
1841
|
+
href="https://www.scb.se/sos"
|
|
1842
|
+
target="_blank"
|
|
1843
|
+
rel="noopener"
|
|
1844
|
+
title="${this.officialStatisticsTitle}"
|
|
1845
|
+
aria-label="${this.officialStatisticsAlt}"
|
|
1846
|
+
>
|
|
1847
|
+
<span class="sos-logotype-small" aria-hidden="true">
|
|
1848
|
+
${V(H)}
|
|
1849
|
+
</span>
|
|
1850
|
+
</a>
|
|
1851
|
+
` : ""}
|
|
1852
|
+
</div>
|
|
1853
|
+
`;
|
|
1854
|
+
}
|
|
1855
|
+
_renderMoreAboutStatsScreen() {
|
|
1856
|
+
return this._hasMoreAboutStats() ? I`
|
|
1857
|
+
<div class="footer-statistics-screen">
|
|
1858
|
+
<scb-divider></scb-divider>
|
|
1859
|
+
<scb-accordion>
|
|
1860
|
+
<scb-accordion-item title="${this.moreAboutStatsLabel}">
|
|
1861
|
+
${this._renderMoreAboutStatsContent()}
|
|
1862
|
+
</scb-accordion-item>
|
|
1863
|
+
</scb-accordion>
|
|
1864
|
+
</div>
|
|
1865
|
+
` : "";
|
|
1866
|
+
}
|
|
1867
|
+
_renderMoreAboutStatsPrint() {
|
|
1868
|
+
return this._hasMoreAboutStats() ? I`
|
|
1869
|
+
<div class="footer-statistics-print print-more-about-stats">
|
|
1870
|
+
<div class="secondary-label print-more-about-stats-heading">
|
|
1871
|
+
${this.moreAboutStatsLabel}
|
|
1872
|
+
</div>
|
|
1873
|
+
${this._renderMoreAboutStatsContent()}
|
|
1874
|
+
</div>
|
|
1875
|
+
` : "";
|
|
1876
|
+
}
|
|
1877
|
+
_renderFooter() {
|
|
1878
|
+
return I`
|
|
1879
|
+
<div class="footer">
|
|
1880
|
+
${this.description ? I`
|
|
1881
|
+
<div id=${this._getDescriptionId()} class="description section">
|
|
1882
|
+
<div class="secondary-label">${this.descriptionLabel}</div>
|
|
1883
|
+
<div class="body-text body-text-rich">${this._renderRichText(this.description)}</div>
|
|
1884
|
+
</div>
|
|
1885
|
+
` : ""}
|
|
1886
|
+
${this._renderMoreAboutStatsScreen()}
|
|
1887
|
+
${this._renderMoreAboutStatsPrint()}
|
|
1888
|
+
</div>
|
|
1889
|
+
`;
|
|
1890
|
+
}
|
|
1891
|
+
render() {
|
|
1892
|
+
switch (this.variant) {
|
|
1893
|
+
case "Table": return I`
|
|
1894
|
+
<div part="container" class="viz-container">
|
|
1895
|
+
${this._renderHeader(!0)}
|
|
1896
|
+
<div
|
|
1897
|
+
class="content"
|
|
1898
|
+
role="group"
|
|
1899
|
+
aria-labelledby=${this._getContentAriaLabelledBy()}
|
|
1900
|
+
aria-describedby=${this._getContentAriaDescribedBy()}
|
|
1901
|
+
>
|
|
1902
|
+
<scb-horizontal-scroller
|
|
1903
|
+
width="100%"
|
|
1904
|
+
class="table-scroller"
|
|
1905
|
+
variant="inline"
|
|
1906
|
+
show-scrollbar
|
|
1907
|
+
>
|
|
1908
|
+
${this._renderTable()}
|
|
1909
|
+
</scb-horizontal-scroller>
|
|
1910
|
+
</div>
|
|
1911
|
+
${this._renderFooter()}
|
|
1912
|
+
<slot
|
|
1913
|
+
name="table"
|
|
1914
|
+
class="table-source"
|
|
1915
|
+
@slotchange=${(e) => this._onTableSlotChange(e)}
|
|
1916
|
+
></slot>
|
|
1917
|
+
<slot></slot>
|
|
1918
|
+
</div>
|
|
1919
|
+
`;
|
|
1920
|
+
case "Image": return I`
|
|
1921
|
+
<div part="container" class="viz-container">
|
|
1922
|
+
${this._renderHeader(!0)}
|
|
1923
|
+
<div
|
|
1924
|
+
class="content image-content"
|
|
1925
|
+
role="img"
|
|
1926
|
+
aria-labelledby=${this._getContentAriaLabelledBy()}
|
|
1927
|
+
aria-describedby=${this._getContentAriaDescribedBy()}
|
|
1928
|
+
style=${this._getResolvedContentMaxWidth() ? `max-width: ${this._getResolvedContentMaxWidth()}; --scb-viz-content-max-width: ${this._getResolvedContentMaxWidth()};` : ""}
|
|
1929
|
+
>
|
|
1930
|
+
<img src="${this.imageHref}" alt="" />
|
|
1931
|
+
</div>
|
|
1932
|
+
${this._renderFooter()}
|
|
1933
|
+
<slot
|
|
1934
|
+
name="table"
|
|
1935
|
+
class="table-source"
|
|
1936
|
+
@slotchange=${(e) => this._onTableSlotChange(e)}
|
|
1937
|
+
></slot>
|
|
1938
|
+
<slot></slot>
|
|
1939
|
+
</div>
|
|
1940
|
+
`;
|
|
1941
|
+
default: {
|
|
1942
|
+
let e = this._getResolvedContentMaxWidth(), t = I`
|
|
1943
|
+
<div
|
|
1944
|
+
class="diagram-content"
|
|
1945
|
+
style=${e ? `--scb-viz-content-max-width: ${e};` : ""}
|
|
1946
|
+
>
|
|
1947
|
+
<slot name="diagram" @slotchange=${this._onDiagramSlotChange}></slot>
|
|
1948
|
+
</div>
|
|
1949
|
+
`;
|
|
1950
|
+
return I`
|
|
1951
|
+
<div part="container" class="viz-container">
|
|
1952
|
+
${this._renderHeader()}
|
|
1953
|
+
${this._renderActions()}
|
|
1954
|
+
<div
|
|
1955
|
+
class="content"
|
|
1956
|
+
role="group"
|
|
1957
|
+
aria-labelledby=${this._getContentAriaLabelledBy()}
|
|
1958
|
+
aria-describedby=${this._getContentAriaDescribedBy()}
|
|
1959
|
+
>
|
|
1960
|
+
<div
|
|
1961
|
+
class=${`standard-content-shell ${this._getResolvedToggleHeightMode() === "stable" ? "standard-content-shell--stable" : ""}`}
|
|
1962
|
+
>
|
|
1963
|
+
<div
|
|
1964
|
+
class=${`standard-content-panel standard-content-panel--diagram ${this.selectedChip === "Diagram" ? "standard-content-panel--active" : ""}`}
|
|
1965
|
+
>
|
|
1966
|
+
${e ? I`
|
|
1967
|
+
<scb-horizontal-scroller
|
|
1968
|
+
width=${this._getResolvedDiagramScrollerWidth()}
|
|
1969
|
+
class="standard-diagram-scroller"
|
|
1970
|
+
variant="inline"
|
|
1971
|
+
show-scrollbar
|
|
1972
|
+
>
|
|
1973
|
+
${t}
|
|
1974
|
+
</scb-horizontal-scroller>
|
|
1975
|
+
` : I`<div class="standard-diagram-scroller">${t}</div>`}
|
|
1976
|
+
</div>
|
|
1977
|
+
<div
|
|
1978
|
+
class=${`standard-content-panel standard-content-panel--table ${this.selectedChip === "Table" ? "standard-content-panel--active" : ""}`}
|
|
1979
|
+
>
|
|
1980
|
+
<div class="table-panel-scroll">
|
|
1981
|
+
<scb-horizontal-scroller
|
|
1982
|
+
width="100%"
|
|
1983
|
+
class="standard-table-scroller"
|
|
1984
|
+
variant="inline"
|
|
1985
|
+
show-scrollbar
|
|
1986
|
+
>
|
|
1987
|
+
${this._renderTable()}
|
|
1988
|
+
</scb-horizontal-scroller>
|
|
1989
|
+
</div>
|
|
1990
|
+
</div>
|
|
1991
|
+
</div>
|
|
1992
|
+
</div>
|
|
1993
|
+
${this._renderFooter()}
|
|
1994
|
+
<slot
|
|
1995
|
+
name="table"
|
|
1996
|
+
class="table-source"
|
|
1997
|
+
@slotchange=${(e) => this._onTableSlotChange(e)}
|
|
1998
|
+
></slot>
|
|
1999
|
+
<slot></slot>
|
|
2000
|
+
</div>
|
|
2001
|
+
`;
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
_syncChipClass() {
|
|
2006
|
+
let e = this.variant === "Standard";
|
|
2007
|
+
this.classList.toggle("chip-diagram", e && this.selectedChip === "Diagram"), this.classList.toggle("chip-table", e && this.selectedChip === "Table");
|
|
2008
|
+
}
|
|
2009
|
+
_dispatchSelectedChipChanged() {
|
|
2010
|
+
let e = { selectedChip: this.selectedChip };
|
|
2011
|
+
this.dispatchEvent(new CustomEvent("selected-chip-changed", {
|
|
2012
|
+
detail: e,
|
|
2013
|
+
bubbles: !0,
|
|
2014
|
+
composed: !0
|
|
2015
|
+
})), this.dispatchEvent(new CustomEvent("selectedchipchanged", {
|
|
2016
|
+
detail: e,
|
|
2017
|
+
bubbles: !0,
|
|
2018
|
+
composed: !0
|
|
2019
|
+
}));
|
|
2020
|
+
}
|
|
2021
|
+
_onSegmentedChange(e) {
|
|
2022
|
+
let t = e.detail?.value;
|
|
2023
|
+
this.selectedChip === t ? this.selectedChip = null : this.selectedChip = t;
|
|
2024
|
+
}
|
|
2025
|
+
_toggleActionsMenu(e) {
|
|
2026
|
+
e.stopPropagation(), this._actionsMenuOpen = !this._actionsMenuOpen, this._actionsMenuOpen && requestAnimationFrame(() => {
|
|
2027
|
+
this._focusFirstMenuItem();
|
|
2028
|
+
});
|
|
2029
|
+
}
|
|
2030
|
+
_closeActionsMenu() {
|
|
2031
|
+
this._actionsMenuOpen = !1;
|
|
2032
|
+
}
|
|
2033
|
+
_focusMenuButton() {
|
|
2034
|
+
(this.shadowRoot?.querySelector(".actions-menu scb-icon-button"))?.focus();
|
|
2035
|
+
}
|
|
2036
|
+
_focusFirstMenuItem() {
|
|
2037
|
+
(this.shadowRoot?.querySelector(".actions-menu-item"))?.focus();
|
|
2038
|
+
}
|
|
2039
|
+
_getExportSurfaceTarget() {
|
|
2040
|
+
return this.shadowRoot?.querySelector(".viz-container") ?? this;
|
|
2041
|
+
}
|
|
2042
|
+
async #_(e) {
|
|
2043
|
+
let t = this._getExportableVisualElement();
|
|
2044
|
+
if (!t) return;
|
|
2045
|
+
let n = await r(t, this._getExportSurfaceTarget(), e);
|
|
2046
|
+
n && a(n, this._buildExportFileName(e === "jpeg" ? "jpg" : "png"));
|
|
2047
|
+
}
|
|
2048
|
+
_getCurrentPrintableView() {
|
|
2049
|
+
return this.variant === "Table" ? "table" : this.variant === "Image" ? "image" : this.selectedChip === "Table" ? "table" : "diagram";
|
|
2050
|
+
}
|
|
2051
|
+
#v(e) {
|
|
2052
|
+
return p(this._getResolvedTableView(e), (e) => this._escapeHtml(e));
|
|
2053
|
+
}
|
|
2054
|
+
#y() {
|
|
2055
|
+
return f({
|
|
2056
|
+
comment: this.comment,
|
|
2057
|
+
commentLabel: this.commentLabel,
|
|
2058
|
+
description: this.description,
|
|
2059
|
+
descriptionLabel: this.descriptionLabel,
|
|
2060
|
+
escapeHtml: (e) => this._escapeHtml(e),
|
|
2061
|
+
footnote: this.footnote,
|
|
2062
|
+
footnoteLabel: this.footnoteLabel,
|
|
2063
|
+
moreAboutStatsLabel: this.moreAboutStatsLabel,
|
|
2064
|
+
officialStatistics: this.officialStatistics,
|
|
2065
|
+
renderRichTextHtml: (e) => this._renderRichTextHtml(e),
|
|
2066
|
+
sosLogotypeSvg: H,
|
|
2067
|
+
source: this.source,
|
|
2068
|
+
sourceLabel: this.sourceLabel
|
|
2069
|
+
});
|
|
2070
|
+
}
|
|
2071
|
+
#b(e) {
|
|
2072
|
+
return d({
|
|
2073
|
+
contentHtml: e,
|
|
2074
|
+
escapeHtml: (e) => this._escapeHtml(e),
|
|
2075
|
+
footerHtml: this.#y(),
|
|
2076
|
+
lang: this.lang,
|
|
2077
|
+
subtitle: this.subtitle,
|
|
2078
|
+
title: this.title
|
|
2079
|
+
});
|
|
2080
|
+
}
|
|
2081
|
+
async #x() {
|
|
2082
|
+
await l(this, async () => {
|
|
2083
|
+
let e = this._getCurrentPrintableView(), t = "";
|
|
2084
|
+
if (e === "table") {
|
|
2085
|
+
let e = this._getResolvedTableData();
|
|
2086
|
+
if (!e?.rows?.length) return;
|
|
2087
|
+
t = this.#v(e);
|
|
2088
|
+
} else if (e === "image") {
|
|
2089
|
+
let e = this.shadowRoot?.querySelector(".image-content img"), n = e?.currentSrc || e?.src || this.imageHref;
|
|
2090
|
+
if (!n) return;
|
|
2091
|
+
t = `<img class="viz-image" src="${this._escapeHtml(n)}" alt="${this._escapeHtml(this._getImageAltText())}">`;
|
|
2092
|
+
} else {
|
|
2093
|
+
let e = this._getExportableVisualElement();
|
|
2094
|
+
if (!e) return;
|
|
2095
|
+
let n = await i(e, this._getExportSurfaceTarget(), "png");
|
|
2096
|
+
if (!n) return;
|
|
2097
|
+
t = `<img class="viz-chart-image" src="${n}" alt="${this._escapeHtml(this._getImageAltText())}">`;
|
|
2098
|
+
}
|
|
2099
|
+
await c(this.#b(t));
|
|
2100
|
+
});
|
|
2101
|
+
}
|
|
2102
|
+
#S() {
|
|
2103
|
+
let e = this._getResolvedTableData();
|
|
2104
|
+
e?.rows?.length && a(n(A(e, (e) => this._normalizeRenderableCell(e)), this.lang), this._buildExportFileName("csv"));
|
|
2105
|
+
}
|
|
2106
|
+
#C() {
|
|
2107
|
+
let e = this.#w(this.spacing), t = this.#w(this.spacingTop) ?? e, n = this.#w(this.spacingBottom) ?? e, r = this.#w(this.spacingLeft), i = this.#w(this.spacingRight);
|
|
2108
|
+
t ? this.style.setProperty("--scb-viz-spacing-block-start", t) : this.style.removeProperty("--scb-viz-spacing-block-start"), n ? this.style.setProperty("--scb-viz-spacing-block-end", n) : this.style.removeProperty("--scb-viz-spacing-block-end"), r ? this.style.setProperty("--scb-viz-spacing-inline-start", r) : this.style.removeProperty("--scb-viz-spacing-inline-start"), i ? this.style.setProperty("--scb-viz-spacing-inline-end", i) : this.style.removeProperty("--scb-viz-spacing-inline-end");
|
|
2109
|
+
}
|
|
2110
|
+
#w(e) {
|
|
2111
|
+
if (!e) return;
|
|
2112
|
+
let t = String(e).trim();
|
|
2113
|
+
if (t) return /^\d+$/.test(t) ? `var(--spacing-${Math.max(0, Math.min(14, parseInt(t, 10)))})` : t;
|
|
2114
|
+
}
|
|
2115
|
+
#T() {
|
|
2116
|
+
let e = this.containerMaxWidth?.trim();
|
|
2117
|
+
e ? this.style.setProperty("--scb-viz-container-max-width", e) : this.style.removeProperty("--scb-viz-container-max-width");
|
|
2118
|
+
}
|
|
2119
|
+
};
|
|
2120
|
+
e([R({
|
|
2121
|
+
type: String,
|
|
2122
|
+
reflect: !0
|
|
2123
|
+
})], W.prototype, "variant", void 0), e([R({
|
|
2124
|
+
type: String,
|
|
2125
|
+
reflect: !0,
|
|
2126
|
+
attribute: "selected-chip"
|
|
2127
|
+
})], W.prototype, "selectedChip", void 0), e([R({
|
|
2128
|
+
type: String,
|
|
2129
|
+
reflect: !0
|
|
2130
|
+
})], W.prototype, "title", void 0), e([R({
|
|
2131
|
+
type: String,
|
|
2132
|
+
reflect: !0
|
|
2133
|
+
})], W.prototype, "subtitle", void 0), e([R({
|
|
2134
|
+
type: String,
|
|
2135
|
+
reflect: !0
|
|
2136
|
+
})], W.prototype, "description", void 0), e([R({
|
|
2137
|
+
type: String,
|
|
2138
|
+
reflect: !0
|
|
2139
|
+
})], W.prototype, "comment", void 0), e([R({
|
|
2140
|
+
type: String,
|
|
2141
|
+
reflect: !0
|
|
2142
|
+
})], W.prototype, "source", void 0), e([R({
|
|
2143
|
+
type: String,
|
|
2144
|
+
reflect: !0
|
|
2145
|
+
})], W.prototype, "footnote", void 0), e([R({
|
|
2146
|
+
type: String,
|
|
2147
|
+
reflect: !0,
|
|
2148
|
+
attribute: "lang"
|
|
2149
|
+
})], W.prototype, "lang", void 0), e([R({
|
|
2150
|
+
type: String,
|
|
2151
|
+
reflect: !0,
|
|
2152
|
+
attribute: "image-href"
|
|
2153
|
+
})], W.prototype, "imageHref", void 0), e([R({
|
|
2154
|
+
type: Boolean,
|
|
2155
|
+
reflect: !0,
|
|
2156
|
+
attribute: "official-statistics"
|
|
2157
|
+
})], W.prototype, "officialStatistics", void 0), e([R({
|
|
2158
|
+
type: Boolean,
|
|
2159
|
+
reflect: !0,
|
|
2160
|
+
attribute: "disable-toggle"
|
|
2161
|
+
})], W.prototype, "disableToggle", void 0), e([R({
|
|
2162
|
+
type: String,
|
|
2163
|
+
attribute: "content-max-width"
|
|
2164
|
+
})], W.prototype, "contentMaxWidth", void 0), e([R({
|
|
2165
|
+
type: String,
|
|
2166
|
+
attribute: "container-max-width"
|
|
2167
|
+
})], W.prototype, "containerMaxWidth", void 0), e([R({
|
|
2168
|
+
type: String,
|
|
2169
|
+
attribute: "content-height"
|
|
2170
|
+
})], W.prototype, "contentHeight", void 0), e([R({
|
|
2171
|
+
type: String,
|
|
2172
|
+
reflect: !0,
|
|
2173
|
+
attribute: "toggle-height-mode"
|
|
2174
|
+
})], W.prototype, "toggleHeightMode", void 0), e([R({ attribute: !1 })], W.prototype, "tableData", void 0), e([R({ attribute: !1 })], W.prototype, "valueFormat", void 0), e([R({ attribute: !1 })], W.prototype, "timeFormat", void 0), e([R({ attribute: !1 })], W.prototype, "yAxisSettings", void 0), e([z()], W.prototype, "_slottedTableData", void 0), e([z()], W.prototype, "_actionsMenuOpen", void 0), e([z()], W.prototype, "_seriesDifferentiationEnabled", void 0), e([z()], W.prototype, "_isFullscreen", void 0), e([R({
|
|
2175
|
+
type: String,
|
|
2176
|
+
reflect: !0
|
|
2177
|
+
})], W.prototype, "spacing", void 0), e([R({
|
|
2178
|
+
type: String,
|
|
2179
|
+
attribute: "spacing-top",
|
|
2180
|
+
reflect: !0
|
|
2181
|
+
})], W.prototype, "spacingTop", void 0), e([R({
|
|
2182
|
+
type: String,
|
|
2183
|
+
attribute: "spacing-bottom",
|
|
2184
|
+
reflect: !0
|
|
2185
|
+
})], W.prototype, "spacingBottom", void 0), e([R({
|
|
2186
|
+
type: String,
|
|
2187
|
+
attribute: "spacing-left",
|
|
2188
|
+
reflect: !0
|
|
2189
|
+
})], W.prototype, "spacingLeft", void 0), e([R({
|
|
2190
|
+
type: String,
|
|
2191
|
+
attribute: "spacing-right",
|
|
2192
|
+
reflect: !0
|
|
2193
|
+
})], W.prototype, "spacingRight", void 0), W = e([L("scb-viz")], W);
|
|
2194
|
+
//#endregion
|
|
2195
|
+
export { W as ScbViz };
|