scb-wc 0.1.2 → 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 -1663
- package/blazor/scb-blazor-bridge.js +6827 -2517
- 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 -2517
- 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,121 @@
|
|
|
1
|
+
//#region src/scb-test-components/scb-viz/scb-viz-print-runtime.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
return `<table class="scb-viz-print-table">${e.headers.length ? `<thead><tr>${e.headers.map((n, r) => `<th scope="col" class="${e.alignments[r] === "right" ? "align-right" : "align-left"}"><span class="scb-viz-print-table-heading-text">${n.html || t(n.text)}</span></th>`).join("")}</tr></thead>` : ""}${`<tbody>${e.rows.map((n, r) => {
|
|
4
|
+
let i = e.rowHeaderRows[r] === !0;
|
|
5
|
+
return `<tr>${n.map((n, r) => {
|
|
6
|
+
let a = e.alignments[r] === "right" ? "align-right" : "align-left", o = n.html || t(n.text);
|
|
7
|
+
return r === 0 && i ? `<th scope="row" class="${a}">${o}</th>` : `<td class="${a}">${o}</td>`;
|
|
8
|
+
}).join("")}</tr>`;
|
|
9
|
+
}).join("")}</tbody>`}</table>`;
|
|
10
|
+
}
|
|
11
|
+
function t(e) {
|
|
12
|
+
let t = [];
|
|
13
|
+
if (e.description && t.push(`
|
|
14
|
+
<section class="print-section">
|
|
15
|
+
<h2>${e.escapeHtml(e.descriptionLabel)}</h2>
|
|
16
|
+
<div class="body-text-rich">${e.renderRichTextHtml(e.description)}</div>
|
|
17
|
+
</section>
|
|
18
|
+
`), e.comment || e.source || e.footnote || e.officialStatistics) {
|
|
19
|
+
let n = [];
|
|
20
|
+
e.comment && n.push(`
|
|
21
|
+
<section class="print-section print-meta-section">
|
|
22
|
+
<h3>${e.escapeHtml(e.commentLabel)}</h3>
|
|
23
|
+
<div class="body-text-rich">${e.renderRichTextHtml(e.comment)}</div>
|
|
24
|
+
</section>
|
|
25
|
+
`), e.source && n.push(`
|
|
26
|
+
<section class="print-section print-meta-section">
|
|
27
|
+
<h3>${e.escapeHtml(e.sourceLabel)}</h3>
|
|
28
|
+
<div>${e.escapeHtml(e.source)}</div>
|
|
29
|
+
</section>
|
|
30
|
+
`), e.footnote && n.push(`
|
|
31
|
+
<section class="print-section print-meta-section">
|
|
32
|
+
<h3>${e.escapeHtml(e.footnoteLabel)}</h3>
|
|
33
|
+
<div class="body-text-rich">${e.renderRichTextHtml(e.footnote)}</div>
|
|
34
|
+
</section>
|
|
35
|
+
`), e.officialStatistics && e.sosLogotypeSvg && n.push(`
|
|
36
|
+
<div class="print-sos">${e.sosLogotypeSvg}</div>
|
|
37
|
+
`), t.push(`
|
|
38
|
+
<section class="print-section print-more-about-stats">
|
|
39
|
+
<h2>${e.escapeHtml(e.moreAboutStatsLabel)}</h2>
|
|
40
|
+
${n.join("")}
|
|
41
|
+
</section>
|
|
42
|
+
`);
|
|
43
|
+
}
|
|
44
|
+
return t.join("");
|
|
45
|
+
}
|
|
46
|
+
function n(e) {
|
|
47
|
+
let t = e.escapeHtml;
|
|
48
|
+
return `<!doctype html>
|
|
49
|
+
<html lang="${t(e.lang || "sv")}">
|
|
50
|
+
<head>
|
|
51
|
+
<meta charset="utf-8">
|
|
52
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
53
|
+
<title>${t(e.title || (e.lang === "en" ? "Visualization" : "Visualisering"))}</title>
|
|
54
|
+
<style>
|
|
55
|
+
:root { color-scheme: light; }
|
|
56
|
+
@page { margin: 16mm; }
|
|
57
|
+
* { box-sizing: border-box; }
|
|
58
|
+
html, body { margin: 0; padding: 0; background: #fff; }
|
|
59
|
+
body {
|
|
60
|
+
font-family: var(--brand-font, Inter, 'Segoe UI', Arial, sans-serif);
|
|
61
|
+
color: var(--md-sys-color-on-surface, #1f1f1f);
|
|
62
|
+
-webkit-print-color-adjust: exact;
|
|
63
|
+
print-color-adjust: exact;
|
|
64
|
+
}
|
|
65
|
+
.viz-print { width: 100%; }
|
|
66
|
+
.viz-header { max-width: 600px; margin-bottom: 24px; }
|
|
67
|
+
.viz-title { font-size: 1.75rem; font-weight: 600; line-height: 1.25; margin: 0; }
|
|
68
|
+
.viz-subtitle { font-size: 1rem; font-weight: 400; line-height: 1.5; margin: 0; }
|
|
69
|
+
.viz-content { width: 100%; }
|
|
70
|
+
.viz-chart-image, .viz-image { display: block; max-width: 100%; height: auto; }
|
|
71
|
+
.print-section { max-width: 600px; margin-top: 16px; }
|
|
72
|
+
.print-section h2, .print-section h3 { margin: 0 0 8px 0; font-size: 1rem; font-weight: 600; line-height: 1.5; }
|
|
73
|
+
.print-section h3 { margin-bottom: 4px; }
|
|
74
|
+
.print-more-about-stats { margin-top: 16px; }
|
|
75
|
+
.print-meta-section { margin-top: 0; margin-bottom: 16px; }
|
|
76
|
+
.print-sos { display: inline-flex; margin-top: 8px; color: inherit; }
|
|
77
|
+
.print-sos svg { height: 24px; width: auto; display: block; }
|
|
78
|
+
.scb-viz-print-table { border-collapse: collapse; width: max-content; max-width: 100%; font-size: 1rem; line-height: 1.5; }
|
|
79
|
+
.scb-viz-print-table th, .scb-viz-print-table td { border: 1px solid #c5c7d0; padding: 8px 12px; text-align: start; }
|
|
80
|
+
.scb-viz-print-table thead th {
|
|
81
|
+
font-weight: 700;
|
|
82
|
+
vertical-align: top;
|
|
83
|
+
}
|
|
84
|
+
.scb-viz-print-table-heading-text {
|
|
85
|
+
display: block;
|
|
86
|
+
max-inline-size: var(--scb-viz-table-header-max-width, 12rem);
|
|
87
|
+
min-inline-size: 0;
|
|
88
|
+
white-space: normal;
|
|
89
|
+
word-break: normal;
|
|
90
|
+
overflow-wrap: break-word;
|
|
91
|
+
hyphens: auto;
|
|
92
|
+
text-wrap: pretty;
|
|
93
|
+
}
|
|
94
|
+
.scb-viz-print-table tbody th {
|
|
95
|
+
font-weight: 400;
|
|
96
|
+
white-space: normal;
|
|
97
|
+
overflow-wrap: break-word;
|
|
98
|
+
word-break: normal;
|
|
99
|
+
hyphens: auto;
|
|
100
|
+
}
|
|
101
|
+
.scb-viz-print-table tbody tr:nth-child(odd) { background: #f5f5f5; }
|
|
102
|
+
.scb-viz-print-table tbody tr:nth-child(even) { background: #fff; }
|
|
103
|
+
.scb-viz-print-table .align-right { text-align: right; }
|
|
104
|
+
.scb-viz-print-table tbody td.align-right { white-space: nowrap; }
|
|
105
|
+
.scb-viz-print-table .align-left { text-align: left; }
|
|
106
|
+
</style>
|
|
107
|
+
</head>
|
|
108
|
+
<body>
|
|
109
|
+
<article class="viz-print">
|
|
110
|
+
<header class="viz-header">
|
|
111
|
+
${e.title ? `<h1 class="viz-title">${t(e.title)}</h1>` : ""}
|
|
112
|
+
${e.subtitle ? `<div class="viz-subtitle">${t(e.subtitle)}</div>` : ""}
|
|
113
|
+
</header>
|
|
114
|
+
<div class="viz-content">${e.contentHtml}</div>
|
|
115
|
+
${e.footerHtml || ""}
|
|
116
|
+
</article>
|
|
117
|
+
</body>
|
|
118
|
+
</html>`;
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
export { n as buildScbVizPrintDocumentHtml, t as buildScbVizPrintableFooterHtml, e as buildScbVizPrintableTableHtml };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
//#region src/scb-test-components/scb-viz/scb-viz-series-differentiation-registry.ts
|
|
2
|
+
var e = (e, t, n = "1.25") => {
|
|
3
|
+
let r = document.createElementNS(e, "path");
|
|
4
|
+
return r.setAttribute("d", t), r.setAttribute("class", "scb-viz-highcharts-pattern__mark"), r.setAttribute("stroke-width", n), r.setAttribute("stroke-linecap", "square"), r;
|
|
5
|
+
}, t = (e, t, n, r) => {
|
|
6
|
+
let i = document.createElementNS(e, "circle");
|
|
7
|
+
return i.setAttribute("cx", t), i.setAttribute("cy", n), i.setAttribute("r", r), i.setAttribute("class", "scb-viz-highcharts-pattern__mark--dot"), i;
|
|
8
|
+
}, n = (e, t, n, r, i) => {
|
|
9
|
+
let a = document.createElementNS(e, "rect");
|
|
10
|
+
return a.setAttribute("x", t), a.setAttribute("y", n), a.setAttribute("width", r), a.setAttribute("height", i), a.setAttribute("class", "scb-viz-highcharts-pattern__mark--square"), a;
|
|
11
|
+
}, r = {
|
|
12
|
+
dashStyles: [
|
|
13
|
+
"Solid",
|
|
14
|
+
"ShortDash",
|
|
15
|
+
"ShortDot",
|
|
16
|
+
"ShortDashDot",
|
|
17
|
+
"ShortDashDotDot",
|
|
18
|
+
"Dot",
|
|
19
|
+
"LongDash",
|
|
20
|
+
"LongDashDot",
|
|
21
|
+
"Dash",
|
|
22
|
+
"DashDot"
|
|
23
|
+
],
|
|
24
|
+
markerSymbols: [
|
|
25
|
+
"circle",
|
|
26
|
+
"diamond",
|
|
27
|
+
"square",
|
|
28
|
+
"triangle",
|
|
29
|
+
"triangle-down"
|
|
30
|
+
],
|
|
31
|
+
defaultPatternKind: "grid",
|
|
32
|
+
patterns: [
|
|
33
|
+
{
|
|
34
|
+
kind: "diagonal",
|
|
35
|
+
appendMarks: (t, n) => {
|
|
36
|
+
t.appendChild(e(n, "M-2,8 l10,-10 M0,10 l10,-10 M8,12 l4,-4"));
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
kind: "dots",
|
|
41
|
+
appendMarks: (e, n) => {
|
|
42
|
+
e.appendChild(t(n, "2", "2", "1.2")), e.appendChild(t(n, "7", "7", "1.2"));
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
kind: "cross",
|
|
47
|
+
appendMarks: (t, n) => {
|
|
48
|
+
t.appendChild(e(n, "M0,0 L10,10 M10,0 L0,10"));
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
kind: "vertical",
|
|
53
|
+
appendMarks: (t, n) => {
|
|
54
|
+
t.appendChild(e(n, "M2,0 L2,10 M7,0 L7,10"));
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
kind: "horizontal",
|
|
59
|
+
appendMarks: (t, n) => {
|
|
60
|
+
t.appendChild(e(n, "M0,2 L10,2 M0,7 L10,7"));
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
kind: "grid",
|
|
65
|
+
appendMarks: (t, n) => {
|
|
66
|
+
t.appendChild(e(n, "M0,0 L10,0 M0,5 L10,5 M0,10 L10,10", "1"));
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
kind: "diagonal-reverse",
|
|
71
|
+
appendMarks: (t, n) => {
|
|
72
|
+
t.appendChild(e(n, "M0,0 L10,10 M-2,2 L8,12 M2,-2 L12,8"));
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
kind: "dots-dense",
|
|
77
|
+
appendMarks: (e, n) => {
|
|
78
|
+
e.appendChild(t(n, "2", "2", "1")), e.appendChild(t(n, "7", "2", "1")), e.appendChild(t(n, "2", "7", "1")), e.appendChild(t(n, "7", "7", "1"));
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
kind: "checker",
|
|
83
|
+
appendMarks: (e, t) => {
|
|
84
|
+
e.appendChild(n(t, "0", "0", "4", "4")), e.appendChild(n(t, "5", "5", "4", "4"));
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
kind: "zigzag",
|
|
89
|
+
appendMarks: (t, n) => {
|
|
90
|
+
t.appendChild(e(n, "M-2,8 L2,4 L6,8 L10,4 L14,8 M-2,3 L2,-1 L6,3 L10,-1 L14,3"));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
};
|
|
95
|
+
function i() {
|
|
96
|
+
return r;
|
|
97
|
+
}
|
|
98
|
+
function a() {
|
|
99
|
+
return r.patterns.map(({ kind: e }) => e);
|
|
100
|
+
}
|
|
101
|
+
function o(e) {
|
|
102
|
+
return r.patterns.find(({ kind: t }) => t === e) || r.patterns.find(({ kind: e }) => e === r.defaultPatternKind) || r.patterns[0];
|
|
103
|
+
}
|
|
104
|
+
function s(e, t, n) {
|
|
105
|
+
let r = o(n);
|
|
106
|
+
return r?.appendMarks(e, t), r?.kind || n;
|
|
107
|
+
}
|
|
108
|
+
function c(e) {
|
|
109
|
+
let t = r.dashStyles, n = r.markerSymbols, i = a();
|
|
110
|
+
return {
|
|
111
|
+
dashStyle: t[e % t.length],
|
|
112
|
+
markerSymbol: n[e % n.length],
|
|
113
|
+
patternKind: i[e % i.length]
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { s as appendScbVizSeriesDifferentiationPatternMarks, o as getScbVizSeriesDifferentiationPatternDefinition, a as getScbVizSeriesDifferentiationPatternKinds, i as getScbVizSeriesDifferentiationRegistry, c as getScbVizSeriesDifferentiationVariant, r as scbVizSeriesDifferentiationRegistry };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { appendScbVizSeriesDifferentiationPatternMarks as e, getScbVizSeriesDifferentiationVariant as t } from "./scb-viz-series-differentiation-registry.js";
|
|
2
|
+
//#region src/scb-test-components/scb-viz/scb-viz-series-differentiation-runtime.ts
|
|
3
|
+
function n(e) {
|
|
4
|
+
return t(e);
|
|
5
|
+
}
|
|
6
|
+
function r(e, t) {
|
|
7
|
+
let n = "", r = t && t.options && typeof t.options == "object" ? t.options : {}, a = t && t.userOptions && typeof t.userOptions == "object" ? t.userOptions : {}, o = e && e.options && typeof e.options == "object" ? e.options : {}, s = o.custom && typeof o.custom == "object" ? o.custom : {}, c = e && e.custom && typeof e.custom == "object" ? e.custom : {};
|
|
8
|
+
return r.chart && typeof r.chart.id == "string" ? n = r.chart.id : a.chart && typeof a.chart.id == "string" && (n = a.chart.id), n = String(n || "").trim().toLowerCase(), n === "grouped-column" || n === "grouped-bar" || r.custom && r.custom.scbVizGroupedClustered === !0 || s.scbVizGroupedCategory === !0 || s.scbVizGroupedCategoryLegend === !0 || c.scbVizGroupedCategory === !0 || c.scbVizGroupedCategoryLegend === !0 || e && e._scbVizGroupedCategoryLegendItem === !0 ? !0 : i(e);
|
|
9
|
+
}
|
|
10
|
+
function i(e) {
|
|
11
|
+
return Array.isArray(e?.points) && e.points.some((e) => {
|
|
12
|
+
let t = e && e.custom && typeof e.custom == "object" ? e.custom : {};
|
|
13
|
+
return typeof t.scbVizGroup == "string" && t.scbVizGroup.trim();
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function a(e) {
|
|
17
|
+
let t = [
|
|
18
|
+
e?.colorIndex,
|
|
19
|
+
e?.options?.colorIndex,
|
|
20
|
+
e?.userOptions?.colorIndex,
|
|
21
|
+
e?.series?.colorIndex,
|
|
22
|
+
e?.series?.options?.colorIndex
|
|
23
|
+
].find((e) => Number.isInteger(e));
|
|
24
|
+
return Number.isInteger(t) ? Number(t) : null;
|
|
25
|
+
}
|
|
26
|
+
function o(e) {
|
|
27
|
+
return !e || typeof e != "object" ? {
|
|
28
|
+
indexByKey: {},
|
|
29
|
+
nextIndex: 0
|
|
30
|
+
} : ((!e.scbVizGroupedSeriesDifferentiationStore || typeof e.scbVizGroupedSeriesDifferentiationStore != "object") && (e.scbVizGroupedSeriesDifferentiationStore = {
|
|
31
|
+
indexByKey: {},
|
|
32
|
+
nextIndex: 0
|
|
33
|
+
}), e.scbVizGroupedSeriesDifferentiationStore);
|
|
34
|
+
}
|
|
35
|
+
function s(e, t) {
|
|
36
|
+
let n = a(e);
|
|
37
|
+
if (Number.isInteger(n)) return `color:${n}`;
|
|
38
|
+
let r = e?.custom && typeof e.custom == "object" && typeof e.custom.scbVizGroup == "string" ? e.custom.scbVizGroup.trim() : "";
|
|
39
|
+
if (r) return `group:${r}`;
|
|
40
|
+
let i = typeof e?.name == "string" ? e.name.trim() : "";
|
|
41
|
+
if (i) return `name:${i}`;
|
|
42
|
+
let o = typeof e?.series?.name == "string" ? e.series.name.trim() : "";
|
|
43
|
+
return o ? `series:${o}` : `fallback:${t}`;
|
|
44
|
+
}
|
|
45
|
+
function c(e, t, n) {
|
|
46
|
+
let r = a(e);
|
|
47
|
+
if (typeof r == "number" && Number.isInteger(r)) return r;
|
|
48
|
+
let i = o(t), c = s(e, n);
|
|
49
|
+
return Object.prototype.hasOwnProperty.call(i.indexByKey, c) || (i.indexByKey[c] = i.nextIndex, i.nextIndex += 1), i.indexByKey[c];
|
|
50
|
+
}
|
|
51
|
+
function l(e, t, r) {
|
|
52
|
+
let i = c(e, t, r);
|
|
53
|
+
return {
|
|
54
|
+
variantIndex: i,
|
|
55
|
+
...n(i)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function u(e) {
|
|
59
|
+
return e.getCurrentPrintableView() !== "diagram" || !e.chart?.series?.length || !e.isHighchartsStyledMode(e.chart) ? !1 : e.chart.series.some((t) => e.getSeriesDifferentiationGroup(t, e.chart) !== null);
|
|
60
|
+
}
|
|
61
|
+
function d(e) {
|
|
62
|
+
let t = e?.element ?? e;
|
|
63
|
+
return t instanceof SVGElement ? t : null;
|
|
64
|
+
}
|
|
65
|
+
function f(e) {
|
|
66
|
+
return !!(e?.styledMode || e?.renderer?.styledMode || e?.options?.chart?.styledMode);
|
|
67
|
+
}
|
|
68
|
+
function p(e) {
|
|
69
|
+
if (e?.container instanceof SVGSVGElement) return e.container;
|
|
70
|
+
let t = e?.renderTo?.querySelector("svg") ?? e?.container?.querySelector?.("svg");
|
|
71
|
+
return t instanceof SVGSVGElement ? t : null;
|
|
72
|
+
}
|
|
73
|
+
function m(e, t) {
|
|
74
|
+
let n = d(e);
|
|
75
|
+
return Array.from(n?.classList ?? []).find((e) => /^highcharts-color-\d+$/.test(e)) ?? `highcharts-color-${t}`;
|
|
76
|
+
}
|
|
77
|
+
function h(e, t) {
|
|
78
|
+
let n = d(e);
|
|
79
|
+
n && (n.setAttribute("data-scb-viz-role", t.role), t.dashStyle ? n.setAttribute("data-scb-viz-dash-style", t.dashStyle) : n.removeAttribute("data-scb-viz-dash-style"), t.patternKind ? n.setAttribute("data-scb-viz-pattern-kind", t.patternKind) : n.removeAttribute("data-scb-viz-pattern-kind"));
|
|
80
|
+
}
|
|
81
|
+
function g(e) {
|
|
82
|
+
let t = d(e);
|
|
83
|
+
t && (t.removeAttribute("data-scb-viz-role"), t.removeAttribute("data-scb-viz-dash-style"), t.removeAttribute("data-scb-viz-pattern-kind"));
|
|
84
|
+
}
|
|
85
|
+
function _(e, t) {
|
|
86
|
+
let n = d(e);
|
|
87
|
+
if (!n || !t) return;
|
|
88
|
+
let r = Array.from(n.classList).find((e) => /^highcharts-color-\d+$/.test(e));
|
|
89
|
+
r !== t && (r && (n.classList.remove(r), n.setAttribute("data-scb-viz-prev-color-class", r)), n.classList.add(t), n.setAttribute("data-scb-viz-added-color-class", t));
|
|
90
|
+
}
|
|
91
|
+
function v(e) {
|
|
92
|
+
let t = d(e);
|
|
93
|
+
if (!t) return;
|
|
94
|
+
let n = t.getAttribute("data-scb-viz-added-color-class"), r = t.getAttribute("data-scb-viz-prev-color-class");
|
|
95
|
+
n && (t.classList.remove(n), t.removeAttribute("data-scb-viz-added-color-class")), r && (t.classList.add(r), t.removeAttribute("data-scb-viz-prev-color-class"));
|
|
96
|
+
}
|
|
97
|
+
function y(e) {
|
|
98
|
+
let t = [], n = [], r = d(e?.legendItem?.group), i = (e, t) => {
|
|
99
|
+
let n = d(t);
|
|
100
|
+
!n || e.includes(n) || e.push(n);
|
|
101
|
+
};
|
|
102
|
+
if (i(t, e?.legendLine), i(t, e?.legendItem?.line), i(n, e?.legendSymbol), i(n, e?.legendItem?.symbol), i(n, e?.legendArea), i(n, e?.legendItem?.area), r) {
|
|
103
|
+
let e = r.querySelector(".highcharts-graph, .highcharts-legend-graph, line");
|
|
104
|
+
e && i(t, e), r.querySelectorAll("rect, circle, .highcharts-point, .highcharts-area, .highcharts-legend-symbol, path").forEach((e) => {
|
|
105
|
+
i(n, e);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
graphTargets: t,
|
|
110
|
+
fillTargets: n.filter((e) => !t.includes(e))
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function b(t, n, r) {
|
|
114
|
+
let i = p(t);
|
|
115
|
+
if (!i) return;
|
|
116
|
+
let a = "http://www.w3.org/2000/svg", o = i.querySelector("defs");
|
|
117
|
+
o instanceof SVGDefsElement || (o = document.createElementNS(a, "defs"), i.insertBefore(o, i.firstChild));
|
|
118
|
+
let s = `scb-viz-pattern-${n}-${r}`;
|
|
119
|
+
if (o.querySelector(`#${s}`)) return;
|
|
120
|
+
let c = document.createElementNS(a, "pattern");
|
|
121
|
+
c.setAttribute("id", s), c.setAttribute("patternUnits", "userSpaceOnUse"), c.setAttribute("width", "10"), c.setAttribute("height", "10"), c.classList.add(n);
|
|
122
|
+
let l = document.createElementNS(a, "rect");
|
|
123
|
+
l.setAttribute("x", "0"), l.setAttribute("y", "0"), l.setAttribute("width", "10"), l.setAttribute("height", "10"), l.setAttribute("class", "scb-viz-highcharts-pattern__background"), c.appendChild(l), e(c, a, r), o.appendChild(c);
|
|
124
|
+
}
|
|
125
|
+
//#endregion
|
|
126
|
+
export { v as clearScbVizSeriesDifferentiationColorClass, g as clearScbVizSeriesDifferentiationMetadata, o as ensureScbVizGroupedSeriesDifferentiationStore, b as ensureScbVizStyledModeSeriesPattern, s as getScbVizGroupedSeriesDifferentiationKey, l as getScbVizGroupedSeriesDifferentiationVariant, c as getScbVizGroupedSeriesDifferentiationVariantIndex, m as getScbVizHighchartsColorClassName, d as getScbVizHighchartsSvgElement, p as getScbVizHighchartsSvgRoot, y as getScbVizLegendSeriesDifferentiationTargets, a as getScbVizSeriesDifferentiationColorIndex, n as getScbVizSeriesDifferentiationVariantByIndex, r as isScbVizGroupedSeriesDifferentiationChart, f as isScbVizHighchartsStyledMode, _ as setScbVizSeriesDifferentiationColorClass, h as setScbVizSeriesDifferentiationMetadata, u as shouldShowScbVizSeriesDifferentiationAction, i as usesScbVizGroupedPointDifferentiation };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
//#region src/scb-test-components/scb-viz/scb-viz-table-runtime.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e && typeof e == "object" && "html" in e && "text" in e ? {
|
|
4
|
+
html: typeof e.html == "string" ? e.html : "",
|
|
5
|
+
text: typeof e.text == "string" ? e.text : ""
|
|
6
|
+
} : {
|
|
7
|
+
html: "",
|
|
8
|
+
text: e == null ? "" : String(e)
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function t(e) {
|
|
12
|
+
if (!e) return;
|
|
13
|
+
let t = e.assignedElements({ flatten: !0 }), n = [];
|
|
14
|
+
t.forEach((e) => {
|
|
15
|
+
if (e.tagName === "TABLE") {
|
|
16
|
+
n.push(e);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
e.querySelectorAll("table").forEach((e) => n.push(e));
|
|
20
|
+
});
|
|
21
|
+
let r = n[0];
|
|
22
|
+
if (!r) return;
|
|
23
|
+
let i = [], a = [], o = [], s = (e) => e ? (e.textContent ?? "").replace(/\s+/g, " ").trim() : "", c = (e) => e ? {
|
|
24
|
+
html: (e.innerHTML ?? "").trim(),
|
|
25
|
+
text: s(e)
|
|
26
|
+
} : {
|
|
27
|
+
html: "",
|
|
28
|
+
text: ""
|
|
29
|
+
}, l = r.querySelector("thead tr");
|
|
30
|
+
l && Array.from(l.querySelectorAll("th, td")).forEach((e) => {
|
|
31
|
+
i.push(c(e));
|
|
32
|
+
});
|
|
33
|
+
let u = Array.from(r.querySelectorAll("tbody tr")), d = u.length > 0 ? u : Array.from(r.querySelectorAll("tr")).filter((e) => e.closest("thead") === null);
|
|
34
|
+
if (d.forEach((e) => {
|
|
35
|
+
let t = Array.from(e.querySelectorAll("th, td"));
|
|
36
|
+
if (t.length === 0) return;
|
|
37
|
+
o.push(t[0].tagName === "TH" && e.closest("thead") === null && e.closest("tfoot") === null);
|
|
38
|
+
let n = [];
|
|
39
|
+
t.forEach((e) => n.push(c(e))), a.push(n);
|
|
40
|
+
}), !l && a.length > 0) {
|
|
41
|
+
let e = a[0], t = d[0], n = Array.from(t?.querySelectorAll("th, td") ?? []);
|
|
42
|
+
n.length > 0 && n.every((e) => e.tagName === "TH") && t?.closest("tbody") === null && (i.splice(0, i.length, ...e), a.shift(), o.shift());
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
headers: i.length > 0 ? i : void 0,
|
|
46
|
+
rows: a,
|
|
47
|
+
rowHeaderRows: o.length > 0 ? o : void 0
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function n(t, n) {
|
|
51
|
+
let r = Math.max(t.headers?.length ?? 0, ...t.rows.map((e) => e.length)), i = [];
|
|
52
|
+
for (let a = 0; a < r; a += 1) {
|
|
53
|
+
if (a === 0) {
|
|
54
|
+
i.push("left");
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
let r = t.rows.map((t) => e(t[a]).text).filter((e) => e !== "" && e != null), o = r.length > 0 && r.every((e) => n(e) !== null);
|
|
58
|
+
i.push(o ? "right" : "left");
|
|
59
|
+
}
|
|
60
|
+
return i;
|
|
61
|
+
}
|
|
62
|
+
function r(t, n) {
|
|
63
|
+
let r = n.normalizeCell ?? e, i = n.formatCell ?? ((e) => r(e)), a = n.inferAlignments(t), o = Math.max(t.headers?.length ?? 0, ...t.rows.map((e) => e.length));
|
|
64
|
+
return {
|
|
65
|
+
alignments: a,
|
|
66
|
+
colCount: o,
|
|
67
|
+
headers: (t.headers ?? []).map((e) => r(e)),
|
|
68
|
+
rows: t.rows.map((e) => {
|
|
69
|
+
let t = e.map((e, t) => i(e, t, a));
|
|
70
|
+
for (; t.length < o;) t.push({
|
|
71
|
+
html: "",
|
|
72
|
+
text: ""
|
|
73
|
+
});
|
|
74
|
+
return t;
|
|
75
|
+
}),
|
|
76
|
+
rowHeaderRows: t.rowHeaderRows ?? []
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function i(t, n = e) {
|
|
80
|
+
let r = [];
|
|
81
|
+
return t.headers?.length && r.push(t.headers.map((e) => n(e).text)), t.rows.forEach((e) => {
|
|
82
|
+
r.push(e.map((e) => n(e).text));
|
|
83
|
+
}), r;
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
export { r as buildScbVizResolvedTableView, i as createScbVizCsvRows, n as inferScbVizTableAlignments, e as normalizeScbVizRenderableCell, t as readScbVizTableDataFromSlot };
|