@designsystem-se/af 32.3.1-beta.1 → 33.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/digi-bar-chart.js +1 -1
- package/components/digi-calendar-datepicker.js +3 -4
- package/components/digi-calendar-week-view.js +1 -1
- package/components/digi-calendar.js +1 -1
- package/components/digi-card.js +1 -1
- package/components/digi-chart-line.js +1 -1
- package/components/digi-code-block.js +1 -1
- package/components/digi-code-example.js +9 -7
- package/components/digi-context-menu.js +151 -52
- package/components/digi-dialog.js +3 -4
- package/components/digi-expandable-accordion.js +2 -3
- package/components/digi-expandable-faq-item.js +1 -1
- package/components/digi-footer.js +2 -3
- package/components/digi-form-error-list.js +3 -4
- package/components/digi-form-file-upload.js +1 -1
- package/components/digi-form-receipt.js +1 -2
- package/components/digi-form-select-filter.js +2 -3
- package/components/digi-header-avatar.js +2 -2
- package/components/digi-header-navigation.js +3 -4
- package/components/digi-header.js +3 -4
- package/components/digi-info-card-multi.js +4 -4
- package/components/digi-info-card.js +1 -1
- package/components/digi-list.js +1 -1
- package/components/digi-loader-spinner.js +1 -1
- package/components/digi-media-image.js +1 -1
- package/components/digi-navigation-context-menu.js +1 -1
- package/components/digi-navigation-pagination.js +9 -10
- package/components/digi-navigation-sidebar-button.js +1 -1
- package/components/digi-navigation-sidebar.js +4 -4
- package/components/digi-navigation-vertical-menu-item.js +6 -6
- package/components/digi-navigation-vertical-menu.js +1 -1
- package/components/digi-notification-alert.js +1 -1
- package/components/digi-notification-error-page.js +7 -15
- package/components/digi-progress-circle.js +12 -8
- package/components/digi-progress-indicator.js +7 -3
- package/components/digi-progress-list-item.js +5 -5
- package/components/digi-progress-list.js +2 -2
- package/components/digi-progressbar.js +2 -2
- package/components/digi-quote.js +3 -3
- package/components/digi-table.js +1 -1
- package/components/digi-tablist-panel.js +2 -2
- package/components/digi-tablist.js +5 -5
- package/components/digi-tag-media.js +1 -1
- package/components/digi-tag.js +5 -3
- package/components/digi-tools-feedback-banner.js +1 -1
- package/components/digi-tools-feedback-rating.js +3 -3
- package/components/digi-tools-feedback.js +2 -3
- package/components/digi-tools-languagepicker.js +5 -5
- package/components/digi-typography-heading-jumbo.js +6 -2
- package/components/digi-typography-meta.js +37 -1
- package/components/digi-typography-preamble.js +1 -1
- package/components/digi-typography-time.js +1 -1
- package/components/digi-typography.js +1 -1
- package/components/digi-util-breakpoint-observer.js +1 -1
- package/components/digi-util-detect-click-outside.js +1 -1
- package/components/digi-util-detect-focus-outside.js +1 -1
- package/components/digi-util-intersection-observer.js +1 -1
- package/components/digi-util-keydown-handler.js +1 -1
- package/components/digi-util-keyup-handler.js +1 -1
- package/components/digi-util-resize-observer.js +1 -1
- package/components/index.d.ts +0 -6
- package/components/index.js +1 -5
- package/components/{p-d7211fec.js → p-2b4c472b.js} +1 -11
- package/components/{p-1ee02c0b.js → p-38b0d0c7.js} +1 -2
- package/components/{p-e87d124f.js → p-4b8bc232.js} +1 -1
- package/components/{p-ed121585.js → p-50634baa.js} +1 -1
- package/components/{p-83e38978.js → p-5e487ed4.js} +1 -1
- package/components/{p-dfa85da0.js → p-8a1aaa8e.js} +6 -6
- package/components/{p-809fd710.js → p-918e9955.js} +2 -2
- package/components/{p-23d4119d.js → p-950b05b1.js} +1 -1
- package/components/{p-f034b64e.js → p-aa59e5c0.js} +1 -1
- package/components/{p-af7ab137.js → p-d08de295.js} +1 -1
- package/components/{p-648cd0b2.js → p-ef49c2f8.js} +4 -5
- package/components/{p-2bfb4163.js → p-f0bdf339.js} +1 -1
- package/components/{p-71554a36.js → p-f3c5a743.js} +1 -1
- package/custom-elements.json +11 -120
- package/dist/cjs/digi-arbetsformedlingen.cjs.js +1 -1
- package/dist/cjs/digi-button_6.cjs.entry.js +246 -2301
- package/dist/cjs/digi-calendar-datepicker.cjs.entry.js +3 -4
- package/dist/cjs/digi-chart-line.cjs.entry.js +2314 -0
- package/dist/cjs/digi-code-block_3.cjs.entry.js +3 -4
- package/dist/cjs/digi-code-example.cjs.entry.js +7 -5
- package/dist/cjs/digi-dialog.cjs.entry.js +3 -4
- package/dist/cjs/digi-expandable-accordion.cjs.entry.js +3 -4
- package/dist/cjs/digi-footer.cjs.entry.js +3 -4
- package/dist/cjs/digi-form-error-list.cjs.entry.js +3 -4
- package/dist/cjs/digi-form-receipt.cjs.entry.js +3 -4
- package/dist/cjs/digi-form-select-filter.cjs.entry.js +3 -4
- package/dist/cjs/digi-header-navigation.cjs.entry.js +3 -4
- package/dist/cjs/digi-header.cjs.entry.js +4 -5
- package/dist/cjs/digi-icon-chart_2.cjs.entry.js +53 -0
- package/dist/cjs/digi-icon-language-outline_4.cjs.entry.js +5 -5
- package/dist/cjs/digi-icon-x.cjs.entry.js +30 -0
- package/dist/cjs/digi-layout-block.cjs.entry.js +47 -0
- package/dist/cjs/digi-loader-spinner.cjs.entry.js +1 -1
- package/dist/cjs/digi-logo_2.cjs.entry.js +1 -1
- package/dist/cjs/digi-media-image_2.cjs.entry.js +1 -1
- package/dist/cjs/digi-navigation-pagination.cjs.entry.js +9 -10
- package/dist/cjs/digi-navigation-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/digi-navigation-vertical-menu-item.cjs.entry.js +6 -6
- package/dist/cjs/digi-navigation-vertical-menu.cjs.entry.js +1 -1
- package/dist/cjs/digi-notification-alert.cjs.entry.js +5 -6
- package/dist/cjs/digi-notification-error-page.cjs.entry.js +7 -15
- package/dist/cjs/digi-progress-circle.cjs.entry.js +12 -8
- package/dist/cjs/digi-progress-indicator.cjs.entry.js +7 -3
- package/dist/cjs/digi-progress-list-item.cjs.entry.js +5 -5
- package/dist/cjs/digi-progress-list.cjs.entry.js +1 -1
- package/dist/cjs/digi-progressbar.cjs.entry.js +2 -2
- package/dist/cjs/digi-quote.cjs.entry.js +1 -1
- package/dist/cjs/digi-table.cjs.entry.js +1 -1
- package/dist/cjs/digi-tablist-panel.cjs.entry.js +2 -2
- package/dist/cjs/digi-tablist.cjs.entry.js +5 -5
- package/dist/cjs/digi-tag-media.cjs.entry.js +2 -2
- package/dist/cjs/digi-tag.cjs.entry.js +3 -2
- package/dist/cjs/digi-tools-feedback-banner.cjs.entry.js +1 -1
- package/dist/cjs/digi-tools-feedback-rating.cjs.entry.js +2 -2
- package/dist/cjs/digi-tools-feedback.cjs.entry.js +4 -5
- package/dist/cjs/digi-tools-languagepicker.cjs.entry.js +3 -3
- package/dist/cjs/digi-typography-heading-jumbo.cjs.entry.js +6 -2
- package/dist/cjs/digi-typography-meta.cjs.entry.js +1 -1
- package/dist/cjs/digi-typography-preamble.cjs.entry.js +1 -1
- package/dist/cjs/digi-typography-time.cjs.entry.js +1 -1
- package/dist/cjs/digi-util-breakpoint-observer.cjs.entry.js +1 -1
- package/dist/cjs/digi-util-detect-click-outside.cjs.entry.js +1 -1
- package/dist/cjs/digi-util-detect-focus-outside.cjs.entry.js +1 -1
- package/dist/cjs/digi-util-keydown-handler.cjs.entry.js +1 -1
- package/dist/cjs/digi-util-keyup-handler.cjs.entry.js +1 -1
- package/dist/cjs/digi-util-resize-observer.cjs.entry.js +1 -1
- package/dist/cjs/index-cfa8e9be.js +18 -30
- package/dist/cjs/index.cjs.js +22 -35
- package/dist/cjs/layout-block-container.enum-52ae6994.js +8 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{tools-feedback-variation.enum-4547e1e3.js → tools-feedback-variation.enum-2ac9956e.js} +0 -10
- package/dist/cjs/{layout-container-max-width.enum-7e637f44.js → typography-variation.enum-d7083728.js} +6 -7
- package/dist/collection/collection-manifest.json +0 -3
- package/dist/collection/components/_code/code-example/code-example.js +7 -5
- package/dist/collection/components/_loader/loader-spinner/loader-spinner.css +1 -0
- package/dist/collection/components/_navigation/navigation-context-menu/navigation-context-menu.css +85 -172
- package/dist/collection/components/_navigation/navigation-context-menu/navigation-context-menu.js +190 -62
- package/dist/collection/components/_navigation/navigation-context-menu-legacy/navigation-context-menu.js +5 -5
- package/dist/collection/components/_navigation/navigation-pagination/navigation-pagination.js +6 -6
- package/dist/collection/components/_navigation/navigation-sidebar/navigation-sidebar.js +2 -2
- package/dist/collection/components/_navigation/navigation-sidebar-button/navigation-sidebar-button.js +1 -1
- package/dist/collection/components/_navigation/navigation-tablist/navigation-tablist.js +5 -5
- package/dist/collection/components/_navigation/navigation-tablist-panel/tablist-panel.js +2 -2
- package/dist/collection/components/_navigation/navigation-vertical-menu/navigation-vertical-menu.js +1 -1
- package/dist/collection/components/_navigation/navigation-vertical-menu-item/navigation-vertical-menu-item.js +6 -6
- package/dist/collection/components/_notification/notification-alert/notification-alert.js +2 -2
- package/dist/collection/components/_notification/notification-error-page/illustrations/illustrations.js +7 -7
- package/dist/collection/components/_notification/notification-error-page/notification-error-page.js +3 -3
- package/dist/collection/components/_progress/progress-circle/progress-circle.js +12 -8
- package/dist/collection/components/_progress/progress-indicator/progress-indicator.js +7 -3
- package/dist/collection/components/_progress/progress-list/progress-list.js +1 -1
- package/dist/collection/components/_progress/progress-list-item/progress-list-item.js +5 -5
- package/dist/collection/components/_progress/progressbar/progressbar.js +2 -2
- package/dist/collection/components/_quote/quote/quote.js +1 -2
- package/dist/collection/components/_table/table/table.js +1 -1
- package/dist/collection/components/_tag/tag/tag.css +10 -0
- package/dist/collection/components/_tag/tag/tag.js +25 -1
- package/dist/collection/components/_tag/tag-media/tag-media.js +2 -2
- package/dist/collection/components/_tools/tools-feedback/tools-feedback.js +1 -1
- package/dist/collection/components/_tools/tools-feedback-banner/tools-feedback-banner.js +1 -1
- package/dist/collection/components/_tools/tools-feedback-rating/tools-feedback-rating.js +2 -2
- package/dist/collection/components/_tools/tools-languagepicker/tools-languagepicker.js +4 -4
- package/dist/collection/components/_typography/typography/typography.js +1 -1
- package/dist/collection/components/_typography/typography-heading-jumbo/typography-heading-jumbo.js +6 -2
- package/dist/collection/components/_typography/typography-meta/typography-meta.js +1 -1
- package/dist/collection/components/_typography/typography-preamble/typography-preamble.js +1 -1
- package/dist/collection/components/_typography/typography-time/typography-time.js +1 -1
- package/dist/collection/components/_util/util-breakpoint-observer/util-breakpoint-observer.js +1 -1
- package/dist/collection/components/_util/util-detect-click-outside/util-detect-click-outside.js +1 -1
- package/dist/collection/components/_util/util-detect-focus-outside/util-detect-focus-outside.js +1 -1
- package/dist/collection/components/_util/util-intersection-observer/util-intersection-observer.js +1 -1
- package/dist/collection/components/_util/util-keydown-handler/util-keydown-handler.js +1 -1
- package/dist/collection/components/_util/util-keyup-handler/util-keyup-handler.js +1 -1
- package/dist/collection/components/_util/util-resize-observer/util-resize-observer.js +1 -1
- package/dist/collection/design-tokens/components/_navigation-context-menu.variables.scss +3 -47
- package/dist/collection/design-tokens/css/variables.css +3 -0
- package/dist/collection/design-tokens/scss/variables.scss +3 -0
- package/dist/collection/design-tokens/styleguide/web.json +57 -0
- package/dist/collection/design-tokens/styleguide/web.scss +3 -0
- package/dist/collection/enums.js +0 -2
- package/dist/collection/interfaces.js +0 -1
- package/dist/digi-arbetsformedlingen/design-tokens/components/_navigation-context-menu.variables.scss +41 -45
- package/dist/digi-arbetsformedlingen/design-tokens/css/variables.css +3 -0
- package/dist/digi-arbetsformedlingen/design-tokens/scss/variables.scss +3 -0
- package/dist/digi-arbetsformedlingen/design-tokens/styleguide/web.json +57 -0
- package/dist/digi-arbetsformedlingen/design-tokens/styleguide/web.scss +3 -0
- package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.css +1 -1
- package/dist/digi-arbetsformedlingen/digi-arbetsformedlingen.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/index.esm.js +1 -1
- package/dist/digi-arbetsformedlingen/p-005c72ca.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-028dd0d4.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-5a7a3e3d.entry.js → p-04ca1ba6.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-0551a242.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-a64f6920.entry.js → p-0f485fa7.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-14368210.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-16aa5a85.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-b1759898.entry.js → p-1d3f7336.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-a4727186.entry.js → p-20a65f1c.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-2af9b440.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-d3ad14b2.entry.js → p-2f79bfcc.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-11a56b7a.entry.js → p-346297b2.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-ca626e5c.entry.js → p-349f73d9.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-6b57023d.entry.js → p-3ee7d913.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-816ed242.entry.js → p-3fde4aec.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-40a81c4a.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-edda9cea.entry.js → p-419d99f0.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-4638e6b1.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-c2bec230.entry.js → p-48664690.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-4fa41b6b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-bbad90a7.entry.js → p-57665401.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-59d1de44.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-64609e83.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-61e92fa9.entry.js → p-66b0d3c6.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-0a6f6df3.entry.js → p-68886e60.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-699e385a.entry.js → p-7bbee718.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-7f4f58d5.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-81cac8dd.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-860e37c2.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-8f42a48e.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-9a53b638.entry.js → p-9657af86.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-9d5f4dd0.entry.js → p-966ea804.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-9a06e85b.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-cccdb2c8.entry.js → p-9d8d64fa.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-caf79640.entry.js → p-a6fcc0f7.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-a7970fe3.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-eb7ca274.entry.js → p-affe6eac.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-b77ea3a1.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-70d542da.entry.js → p-ba740002.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-bad82d8a.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-bd56d622.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-c16371b2.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-7b7c092f.entry.js → p-c16e6afe.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-c2a5da97.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-8fc1143f.js → p-c2ee26cb.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-c750cc28.entry.js → p-d630f2e9.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-9c72fecd.entry.js → p-e07fed59.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-e361c7bb.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-edd43c5d.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-ee5f2630.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-eedd8fdb.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/{p-305a1547.entry.js → p-f0cdaac5.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-0873a381.entry.js → p-f427db52.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/{p-22beda0f.entry.js → p-f84d9dea.entry.js} +1 -1
- package/dist/digi-arbetsformedlingen/p-fa7824e9.entry.js +1 -0
- package/dist/digi-arbetsformedlingen/p-fa890d2b.entry.js +1 -0
- package/dist/esm/digi-arbetsformedlingen.js +1 -1
- package/dist/esm/digi-bar-chart.entry.js +1 -1
- package/dist/esm/digi-button_6.entry.js +243 -2298
- package/dist/esm/digi-calendar-datepicker.entry.js +3 -4
- package/dist/esm/digi-chart-line.entry.js +2310 -0
- package/dist/esm/digi-code-block_3.entry.js +3 -4
- package/dist/esm/digi-code-example.entry.js +7 -5
- package/dist/esm/digi-dialog.entry.js +3 -4
- package/dist/esm/digi-expandable-accordion.entry.js +3 -4
- package/dist/esm/digi-footer.entry.js +3 -4
- package/dist/esm/digi-form-error-list.entry.js +3 -4
- package/dist/esm/digi-form-receipt.entry.js +3 -4
- package/dist/esm/digi-form-select-filter.entry.js +3 -4
- package/dist/esm/digi-header-navigation.entry.js +3 -4
- package/dist/esm/digi-header.entry.js +3 -4
- package/dist/esm/digi-icon-chart_2.entry.js +48 -0
- package/dist/esm/digi-icon-language-outline_4.entry.js +5 -5
- package/dist/esm/digi-icon-x.entry.js +26 -0
- package/dist/esm/digi-layout-block.entry.js +43 -0
- package/dist/esm/digi-loader-spinner.entry.js +1 -1
- package/dist/esm/digi-logo_2.entry.js +1 -1
- package/dist/esm/digi-media-image_2.entry.js +1 -1
- package/dist/esm/digi-navigation-pagination.entry.js +9 -10
- package/dist/esm/digi-navigation-sidebar.entry.js +2 -2
- package/dist/esm/digi-navigation-vertical-menu-item.entry.js +6 -6
- package/dist/esm/digi-navigation-vertical-menu.entry.js +1 -1
- package/dist/esm/digi-notification-alert.entry.js +5 -6
- package/dist/esm/digi-notification-error-page.entry.js +7 -15
- package/dist/esm/digi-progress-circle.entry.js +12 -8
- package/dist/esm/digi-progress-indicator.entry.js +7 -3
- package/dist/esm/digi-progress-list-item.entry.js +5 -5
- package/dist/esm/digi-progress-list.entry.js +1 -1
- package/dist/esm/digi-progressbar.entry.js +2 -2
- package/dist/esm/digi-quote.entry.js +1 -1
- package/dist/esm/digi-table.entry.js +1 -1
- package/dist/esm/digi-tablist-panel.entry.js +2 -2
- package/dist/esm/digi-tablist.entry.js +5 -5
- package/dist/esm/digi-tag-media.entry.js +2 -2
- package/dist/esm/digi-tag.entry.js +3 -2
- package/dist/esm/digi-tools-feedback-banner.entry.js +1 -1
- package/dist/esm/digi-tools-feedback-rating.entry.js +2 -2
- package/dist/esm/digi-tools-feedback.entry.js +4 -5
- package/dist/esm/digi-tools-languagepicker.entry.js +3 -3
- package/dist/esm/digi-typography-heading-jumbo.entry.js +6 -2
- package/dist/esm/digi-typography-meta.entry.js +1 -1
- package/dist/esm/digi-typography-preamble.entry.js +1 -1
- package/dist/esm/digi-typography-time.entry.js +1 -1
- package/dist/esm/digi-util-breakpoint-observer.entry.js +1 -1
- package/dist/esm/digi-util-detect-click-outside.entry.js +1 -1
- package/dist/esm/digi-util-detect-focus-outside.entry.js +1 -1
- package/dist/esm/digi-util-keydown-handler.entry.js +1 -1
- package/dist/esm/digi-util-keyup-handler.entry.js +1 -1
- package/dist/esm/digi-util-resize-observer.entry.js +1 -1
- package/dist/esm/index-8e318bb2.js +18 -30
- package/dist/esm/index.js +3 -4
- package/dist/esm/layout-block-container.enum-29d52ee9.js +8 -0
- package/dist/esm/{linear-f59f8318.js → linear-ef018ffb.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{tools-feedback-variation.enum-92d10df2.js → tools-feedback-variation.enum-45abb679.js} +1 -11
- package/dist/esm/{layout-container-max-width.enum-c40018ac.js → typography-variation.enum-d9fdbf06.js} +7 -8
- package/dist/types/components/_code/code-example/code-example.d.ts +1 -0
- package/dist/types/components/_navigation/navigation-context-menu/navigation-context-menu.d.ts +52 -14
- package/dist/types/components/_navigation/navigation-context-menu/navigation-context-menu.types.d.ts +7 -3
- package/dist/types/components/_progress/progress-circle/progress-circle.d.ts +4 -0
- package/dist/types/components/_progress/progress-indicator/progress-indicator.d.ts +4 -0
- package/dist/types/components/_quote/quote/quote.d.ts +0 -1
- package/dist/types/components/_tag/tag/tag.d.ts +4 -0
- package/dist/types/components/_tools/tools-languagepicker/tools-languagepicker.d.ts +1 -1
- package/dist/types/components/_typography/typography-heading-jumbo/typography-heading-jumbo.d.ts +4 -0
- package/dist/types/components.d.ts +77 -220
- package/dist/types/enums.d.ts +0 -2
- package/dist/types/interfaces.d.ts +0 -1
- package/hydrate/index.js +250 -451
- package/hydrate/index.mjs +250 -451
- package/package.json +1 -1
- package/components/digi-navigation-dropdown.d.ts +0 -11
- package/components/digi-navigation-dropdown.js +0 -6
- package/components/digi-quote-multi-container.d.ts +0 -11
- package/components/digi-quote-multi-container.js +0 -39
- package/components/digi-quote-single.d.ts +0 -11
- package/components/digi-quote-single.js +0 -63
- package/components/p-3f827c1d.js +0 -39
- package/components/p-8fa816d6.js +0 -8
- package/components/p-e308ef6b.js +0 -221
- package/dist/cjs/digi-context-menu.cjs.entry.js +0 -132
- package/dist/cjs/digi-icon-check.cjs.entry.js +0 -30
- package/dist/cjs/digi-icon-chevron-down.cjs.entry.js +0 -30
- package/dist/cjs/digi-layout-block_2.cjs.entry.js +0 -92
- package/dist/cjs/digi-navigation-dropdown.cjs.entry.js +0 -188
- package/dist/cjs/digi-quote-multi-container.cjs.entry.js +0 -23
- package/dist/cjs/digi-quote-single.cjs.entry.js +0 -33
- package/dist/cjs/quote-single-variation.enum-53f94dbc.js +0 -8
- package/dist/cjs/typography-variation.enum-5b035b3b.js +0 -7
- package/dist/collection/components/_navigation/navigation-dropdown/navigation-dropdown.css +0 -319
- package/dist/collection/components/_navigation/navigation-dropdown/navigation-dropdown.js +0 -539
- package/dist/collection/components/_navigation/navigation-dropdown/navigation-dropdown.types.js +0 -1
- package/dist/collection/components/_quote/quote-multi-container/quote-multi-container-heading-level.enum.js +0 -9
- package/dist/collection/components/_quote/quote-multi-container/quote-multi-container.css +0 -26
- package/dist/collection/components/_quote/quote-multi-container/quote-multi-container.js +0 -86
- package/dist/collection/components/_quote/quote-single/quote-single-variation.enum.js +0 -6
- package/dist/collection/components/_quote/quote-single/quote.css +0 -324
- package/dist/collection/components/_quote/quote-single/quote.js +0 -141
- package/dist/collection/design-tokens/components/_quote-quote-multi-container.variables.scss +0 -5
- package/dist/collection/design-tokens/components/_quote-single.variables.scss +0 -14
- package/dist/digi-arbetsformedlingen/design-tokens/components/_quote-quote-multi-container.variables.scss +0 -5
- package/dist/digi-arbetsformedlingen/design-tokens/components/_quote-single.variables.scss +0 -14
- package/dist/digi-arbetsformedlingen/p-02646d18.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-0eac1bee.js +0 -1
- package/dist/digi-arbetsformedlingen/p-125dd887.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-167234fc.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-195cf497.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-25faef21.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-300aa9ef.js +0 -1
- package/dist/digi-arbetsformedlingen/p-331e95be.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-4028ad65.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-45fe2828.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-4c6f74fb.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-4e9b1820.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-51706444.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-7cb35359.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-81e86ac1.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-848aa358.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-87c1f5c7.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-8fa816d6.js +0 -1
- package/dist/digi-arbetsformedlingen/p-903b00e6.js +0 -1
- package/dist/digi-arbetsformedlingen/p-994395cb.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-a06dd644.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-a272c883.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-a6d806e5.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-d7fe697e.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-de4c4238.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-e092908a.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-e661462a.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-e8ae7a8d.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-f2339f8e.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-f4c3f47e.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-fb8ac3de.entry.js +0 -1
- package/dist/digi-arbetsformedlingen/p-fc4dc147.entry.js +0 -1
- package/dist/esm/digi-context-menu.entry.js +0 -128
- package/dist/esm/digi-icon-check.entry.js +0 -26
- package/dist/esm/digi-icon-chevron-down.entry.js +0 -26
- package/dist/esm/digi-layout-block_2.entry.js +0 -87
- package/dist/esm/digi-navigation-dropdown.entry.js +0 -184
- package/dist/esm/digi-quote-multi-container.entry.js +0 -19
- package/dist/esm/digi-quote-single.entry.js +0 -29
- package/dist/esm/quote-single-variation.enum-be92a9f7.js +0 -8
- package/dist/esm/typography-variation.enum-38d1ef90.js +0 -7
- package/dist/types/components/_navigation/navigation-dropdown/navigation-dropdown.d.ts +0 -44
- package/dist/types/components/_navigation/navigation-dropdown/navigation-dropdown.types.d.ts +0 -18
- package/dist/types/components/_quote/quote-multi-container/quote-multi-container-heading-level.enum.d.ts +0 -8
- package/dist/types/components/_quote/quote-multi-container/quote-multi-container.d.ts +0 -25
- package/dist/types/components/_quote/quote-single/quote-single-variation.enum.d.ts +0 -5
- package/dist/types/components/_quote/quote-single/quote.d.ts +0 -40
|
@@ -3,9 +3,10 @@ import { r as randomIdGenerator } from './randomIdGenerator.util-56406f2e.js';
|
|
|
3
3
|
import { B as ButtonSize } from './button-size.enum-2dcd673f.js';
|
|
4
4
|
import { B as ButtonType } from './button-type.enum-5250ae0b.js';
|
|
5
5
|
import { B as ButtonVariation } from './button-variation.enum-94fffdd6.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { T as TypographyVariation } from './typography-variation.enum-
|
|
6
|
+
import { d as detectClickOutside } from './detectClickOutside.util-72594957.js';
|
|
7
|
+
import { d as detectFocusOutside } from './detectFocusOutside.util-a8676bee.js';
|
|
8
|
+
import { L as LayoutContainerVariation, a as LayoutContainerMaxWidth, T as TypographyVariation } from './typography-variation.enum-d9fdbf06.js';
|
|
9
|
+
import './detectClosest.util-58a7504f.js';
|
|
9
10
|
|
|
10
11
|
const buttonCss = ".digi--util--fs--xs.sc-digi-button{font-size:var(--digi--global--typography--font-size--small) !important}.digi--util--fs--s.sc-digi-button{font-size:calc(var(--digi--global--typography--font-size--small) + 1px) !important}.digi--util--fs--m.sc-digi-button{font-size:var(--digi--global--typography--font-size--base) !important}.digi--util--fs--l.sc-digi-button{font-size:var(--digi--global--typography--font-size--large) !important}.digi--util--fw--sb.sc-digi-button{font-weight:var(--digi--global--typography--font-weight--semibold) !important}.digi--util--pt--1.sc-digi-button{padding-top:var(--digi--global--spacing--smallest-2) !important}.digi--util--pt--10.sc-digi-button{padding-top:var(--digi--global--spacing--smallest) !important}.digi--util--pt--20.sc-digi-button{padding-top:var(--digi--global--spacing--base) !important}.digi--util--pt--30.sc-digi-button{padding-top:var(--digi--global--spacing--largest-2) !important}.digi--util--pt--40.sc-digi-button{padding-top:var(--digi--global--spacing--largest-4) !important}.digi--util--pt--50.sc-digi-button{padding-top:2.5rem !important}.digi--util--pt--60.sc-digi-button{padding-top:var(--digi--global--spacing--largest-5) !important}.digi--util--pt--70.sc-digi-button{padding-top:var(--digi--global--spacing--largest-6) !important}.digi--util--pt--80.sc-digi-button{padding-top:4.5rem !important}.digi--util--pt--90.sc-digi-button{padding-top:5rem !important}.digi--util--pb--1.sc-digi-button{padding-bottom:var(--digi--global--spacing--smallest-2) !important}.digi--util--pb--10.sc-digi-button{padding-bottom:var(--digi--global--spacing--smallest) !important}.digi--util--pb--20.sc-digi-button{padding-bottom:var(--digi--global--spacing--base) !important}.digi--util--pb--30.sc-digi-button{padding-bottom:var(--digi--global--spacing--largest-2) !important}.digi--util--pb--40.sc-digi-button{padding-bottom:var(--digi--global--spacing--largest-4) !important}.digi--util--pb--50.sc-digi-button{padding-bottom:2.5rem !important}.digi--util--pb--60.sc-digi-button{padding-bottom:var(--digi--global--spacing--largest-5) !important}.digi--util--pb--70.sc-digi-button{padding-bottom:var(--digi--global--spacing--largest-6) !important}.digi--util--pb--80.sc-digi-button{padding-bottom:4.5rem !important}.digi--util--pb--90.sc-digi-button{padding-bottom:5rem !important}.digi--util--p--1.sc-digi-button{padding:var(--digi--global--spacing--smallest-2) !important}.digi--util--p--10.sc-digi-button{padding:var(--digi--global--spacing--smallest) !important}.digi--util--p--20.sc-digi-button{padding:var(--digi--global--spacing--base) !important}.digi--util--p--30.sc-digi-button{padding:var(--digi--global--spacing--largest-2) !important}.digi--util--p--40.sc-digi-button{padding:var(--digi--global--spacing--largest-4) !important}.digi--util--p--50.sc-digi-button{padding:2.5rem !important}.digi--util--p--60.sc-digi-button{padding:var(--digi--global--spacing--largest-5) !important}.digi--util--p--70.sc-digi-button{padding:var(--digi--global--spacing--largest-6) !important}.digi--util--p--80.sc-digi-button{padding:4.5rem !important}.digi--util--p--90.sc-digi-button{padding:5rem !important}.digi--util--ptb--1.sc-digi-button{padding-top:var(--digi--global--spacing--smallest-2) !important;padding-bottom:var(--digi--global--spacing--smallest-2) !important}.digi--util--ptb--10.sc-digi-button{padding-top:var(--digi--global--spacing--smallest) !important;padding-bottom:var(--digi--global--spacing--smallest) !important}.digi--util--ptb--20.sc-digi-button{padding-top:var(--digi--global--spacing--base) !important;padding-bottom:var(--digi--global--spacing--base) !important}.digi--util--ptb--30.sc-digi-button{padding-top:var(--digi--global--spacing--largest-2) !important;padding-bottom:var(--digi--global--spacing--largest-2) !important}.digi--util--ptb--40.sc-digi-button{padding-top:var(--digi--global--spacing--largest-4) !important;padding-bottom:var(--digi--global--spacing--largest-4) !important}.digi--util--ptb--50.sc-digi-button{padding-top:2.5rem !important;padding-bottom:2.5rem !important}.digi--util--ptb--60.sc-digi-button{padding-top:var(--digi--global--spacing--largest-5) !important;padding-bottom:var(--digi--global--spacing--largest-5) !important}.digi--util--ptb--70.sc-digi-button{padding-top:var(--digi--global--spacing--largest-6) !important;padding-bottom:var(--digi--global--spacing--largest-6) !important}.digi--util--ptb--80.sc-digi-button{padding-top:4.5rem !important;padding-bottom:4.5rem !important}.digi--util--ptb--90.sc-digi-button{padding-top:5rem !important;padding-bottom:5rem !important}.digi--util--plr--1.sc-digi-button{padding-left:var(--digi--global--spacing--smallest-2) !important;padding-right:var(--digi--global--spacing--smallest-2) !important}.digi--util--plr--10.sc-digi-button{padding-left:var(--digi--global--spacing--smallest) !important;padding-right:var(--digi--global--spacing--smallest) !important}.digi--util--plr--20.sc-digi-button{padding-left:var(--digi--global--spacing--base) !important;padding-right:var(--digi--global--spacing--base) !important}.digi--util--plr--30.sc-digi-button{padding-left:var(--digi--global--spacing--largest-2) !important;padding-right:var(--digi--global--spacing--largest-2) !important}.digi--util--plr--40.sc-digi-button{padding-left:var(--digi--global--spacing--largest-4) !important;padding-right:var(--digi--global--spacing--largest-4) !important}.digi--util--plr--50.sc-digi-button{padding-left:2.5rem !important;padding-right:2.5rem !important}.digi--util--plr--60.sc-digi-button{padding-left:var(--digi--global--spacing--largest-5) !important;padding-right:var(--digi--global--spacing--largest-5) !important}.digi--util--plr--70.sc-digi-button{padding-left:var(--digi--global--spacing--largest-6) !important;padding-right:var(--digi--global--spacing--largest-6) !important}.digi--util--plr--80.sc-digi-button{padding-left:4.5rem !important;padding-right:4.5rem !important}.digi--util--plr--90.sc-digi-button{padding-left:5rem !important;padding-right:5rem !important}.digi--util--sr-only.sc-digi-button{border:0;clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.digi--util--hidden.sc-digi-button{display:none}.sc-digi-button-h{--digi--button--color--background--primary--default:var(--digi--color--background--inverted-1);--digi--button--color--background--primary--hover:var(--digi--color--background--inverted-6);--digi--button--color--background--primary--focus:var(--digi--color--background--inverted-6);--digi--button--color--background--primary--active:var(--digi--color--background--inverted-6);--digi--button--color--background--secondary--default:var(--digi--color--background--primary);--digi--button--color--background--secondary--hover:var(--digi--color--background--inverted-5);--digi--button--color--background--secondary--focus:var(--digi--color--background--inverted-5);--digi--button--color--background--secondary--active:var(--digi--color--background--inverted-5);--digi--button--color--background--function--default:transparent;--digi--button--color--background--function--hover:transparent;--digi--button--color--background--function--focus:transparent;--digi--button--color--background--function--active:transparent;--digi--button--color--text--primary--default:var(--digi--color--text--inverted);--digi--button--color--text--primary--hover:var(--digi--color--text--inverted);--digi--button--color--text--primary--focus:var(--digi--color--text--inverted);--digi--button--color--text--primary--active:var(--digi--color--text--inverted);--digi--button--color--text--secondary--default:var(--digi--color--text--secondary);--digi--button--color--text--secondary--hover:var(--digi--color--text--secondary);--digi--button--color--text--secondary--focus:var(--digi--color--text--secondary);--digi--button--color--text--secondary--active:var(--digi--color--text--secondary);--digi--button--color--text--function--default:var(--digi--color--text--link);--digi--button--color--text--function--hover:var(--digi--color--text--link-hover);--digi--button--color--text--function--focus:var(--digi--color--text--secondary);--digi--button--color--text--function--active:var(--digi--color--text--secondary);--digi--button--color--border--primary--default:var(--digi--color--border--secondary);--digi--button--color--border--primary--hover:var(--digi--color--border--inverted-2);--digi--button--color--border--primary--focus:var(--digi--color--border--inverted-2);--digi--button--color--border--primary--active:var(--digi--color--border--inverted-2);--digi--button--color--border--secondary--default:var(--digi--color--border--secondary);--digi--button--color--border--secondary--hover:var(--digi--color--border--secondary);--digi--button--color--border--secondary--focus:var(--digi--color--border--secondary);--digi--button--color--border--secondary--active:var(--digi--color--border--secondary);--digi--button--color--border--function--default:initial;--digi--button--color--border--function--hover:initial;--digi--button--color--border--function--focus:initial;--digi--button--color--border--function--active:initial;--digi--button--color--icon--primary--default:var(--digi--color--text--inverted);--digi--button--color--icon--primary--hover:var(--digi--color--text--inverted);--digi--button--color--icon--primary--focus:var(--digi--color--text--inverted);--digi--button--color--icon--primary--active:var(--digi--color--text--inverted);--digi--button--color--icon--secondary--default:var(--digi--color--text--secondary);--digi--button--color--icon--secondary--hover:var(--digi--color--text--secondary);--digi--button--color--icon--secondary--focus:var(--digi--color--text--secondary);--digi--button--color--icon--secondary--active:var(--digi--color--text--secondary);--digi--button--color--icon--function--default:var(--digi--color--text--link);--digi--button--color--icon--function--hover:var(--digi--color--text--link-hover);--digi--button--color--icon--function--focus:var(--digi--color--text--secondary);--digi--button--color--icon--function--active:var(--digi--color--text--secondary);--digi--button--border-width--primary--default:var(--digi--border-width--primary);--digi--button--border-width--primary--hover:var(--digi--border-width--primary);--digi--button--border-width--secondary--default:var(--digi--border-width--primary);--digi--button--border-width--secondary--hover:var(--digi--border-width--primary);--digi--button--border-width--function--default:initial;--digi--button--border-width--function--hover:initial;--digi--button--border-style--primary--default:var(--digi--border-style--primary);--digi--button--border-style--primary--hover:var(--digi--border-style--primary);--digi--button--border-style--primary--focus:var(--digi--border-style--primary);--digi--button--border-style--primary--active:var(--digi--border-style--primary);--digi--button--border-style--secondary--default:var(--digi--border-style--primary);--digi--button--border-style--secondary--hover:var(--digi--border-style--primary);--digi--button--border-style--secondary--focus:var(--digi--border-style--primary);--digi--button--border-style--secondary--active:var(--digi--border-style--primary);--digi--button--border-style--function--default:var(--digi--border-style--secondary);--digi--button--border-style--function--hover:var(--digi--border-style--secondary);--digi--button--border-style--function--focus:var(--digi--border-style--secondary);--digi--button--border-style--function--active:var(--digi--border-style--secondary);--digi--button--border-radius--primary--default:var(--digi--border-radius--secondary);--digi--button--border-radius--primary--hover:var(--digi--border-radius--secondary);--digi--button--border-radius--primary--focus:var(--digi--border-radius--secondary);--digi--button--border-radius--primary--active:var(--digi--border-radius--secondary);--digi--button--border-radius--secondary--default:var(--digi--border-radius--secondary);--digi--button--border-radius--secondary--hover:var(--digi--border-radius--secondary);--digi--button--border-radius--secondary--focus:var(--digi--border-radius--secondary);--digi--button--border-radius--secondary--active:var(--digi--border-radius--secondary);--digi--button--border-radius--function--default:initial;--digi--button--border-radius--function--hover:initial;--digi--button--border-radius--function--focus:initial;--digi--button--border-radius--function--active:initial;--digi--button--padding--small:var(--digi--gutter--button-block-small) var(--digi--gutter--button-inline-small);--digi--button--padding--medium:var(--digi--gutter--button-block-medium) var(--digi--gutter--button-inline-medium);--digi--button--padding--large:var(--digi--gutter--button-block-large) var(--digi--gutter--button-inline-large);--digi--button--font-size--small:var(--digi--global--typography--font-size--interaction-small);--digi--button--font-size--medium:var(--digi--global--typography--font-size--interaction-medium);--digi--button--font-size--large:var(--digi--global--typography--font-size--interaction-large);--digi--button--font-family:var(--digi--global--typography--font-family--default);--digi--button--font-weight--default:var(--digi--typography--button--font-weight--desktop);--digi--button--font-weight--function:var(--digi--typography--label--font-weight--desktop);--digi--button--width:initial;--digi--button--display:initial;--digi--button--justify-content--default:initial;--digi--button--justify-content--full-width:center;--digi--button--align-items:center;--digi--button--text-align--default:initial;--digi--button--text-align--full-width:center;--digi--button--outline--default:initial;--digi--button--outline--focus:initial;--digi--button--cursor:pointer;--digi--button--icon--spacing:var(--digi--gutter--large);--digi--button--min-height--small:unset;--digi--button--min-height--large:unset}.sc-digi-button-h .digi-button.sc-digi-button{font-family:var(--digi--button--font-family);background:var(--COLOR--BACKGROUND--DEFAULT);color:var(--COLOR--TEXT--DEFAULT);padding:var(--PADDING);border-radius:var(--BORDER-RADIUS--DEFAULT);border-width:var(--BORDER-WIDTH--DEFAULT);border-style:var(--BORDER-STYLE--DEFAULT);border-color:var(--COLOR--BORDER--DEFAULT);font-weight:var(--FONT-WEIGHT);font-size:var(--FONT-SIZE);outline:var(--digi--button--outline--default);text-align:var(--digi--button--text-align--default);width:var(--digi--button--width);display:var(--digi--button--display);justify-content:var(--digi--button--justify-content--default);cursor:var(--digi--button--cursor);min-height:var(--MIN-HEIGHT);align-items:var(--digi--button--align-items);white-space:nowrap}.sc-digi-button-h .digi-button--variation-primary.sc-digi-button{--COLOR--BACKGROUND--DEFAULT:var(\n --digi--button--color--background--primary--default\n );--COLOR--BACKGROUND--HOVER:var(\n --digi--button--color--background--primary--hover\n );--COLOR--BACKGROUND--FOCUS:var(\n --digi--button--color--background--primary--focus\n );--COLOR--BACKGROUND--ACTIVE:var(\n --digi--button--color--background--primary--active\n );--COLOR--TEXT--DEFAULT:var(--digi--button--color--text--primary--default);--COLOR--TEXT--HOVER:var(--digi--button--color--text--primary--hover);--COLOR--TEXT--FOCUS:var(--digi--button--color--text--primary--focus);--COLOR--TEXT--ACTIVE:var(--digi--button--color--text--primary--active);--COLOR--ICON--DEFAULT:var(--digi--button--color--icon--primary--default);--COLOR--ICON--HOVER:var(--digi--button--color--icon--primary--hover);--COLOR--ICON--FOCUS:var(--digi--button--color--icon--primary--focus);--COLOR--ICON--ACTIVE:var(--digi--button--color--icon--primary--active);--COLOR--BORDER--DEFAULT:var(\n --digi--button--color--border--primary--default\n );--COLOR--BORDER--HOVER:var(--digi--button--color--border--primary--hover);--COLOR--BORDER--FOCUS:var(--digi--button--color--border--primary--focus);--COLOR--BORDER--ACTIVE:var(--digi--button--color--border--primary--active);--BORDER-RADIUS--DEFAULT:var(\n --digi--button--border-radius--primary--default\n );--BORDER-RADIUS--HOVER:var(--digi--button--border-radius--primary--hover);--BORDER-RADIUS--FOCUS:var(--digi--button--border-radius--primary--focus);--BORDER-RADIUS--ACTIVE:var(--digi--button--border-radius--primary--active);--BORDER-WIDTH--DEFAULT:var(--digi--button--border-width--primary--default);--BORDER-WIDTH--HOVER:var(--digi--button--border-width--primary--hover);--BORDER-WIDTH--FOCUS:var(--digi--button--border-width--primary--focus);--BORDER-WIDTH--ACTIVE:var(--digi--button--border-width--primary--active);--BORDER-STYLE--DEFAULT:var(--digi--button--border-style--primary--default);--BORDER-STYLE--HOVER:var(--digi--button--border-style--primary--hover);--BORDER-STYLE--FOCUS:var(--digi--button--border-style--primary--focus);--BORDER-STYLE--ACTIVE:var(--digi--button--border-style--primary--active);--FONT-WEIGHT:var(--digi--button--font-weight--default)}.sc-digi-button-h .digi-button--variation-secondary.sc-digi-button{--COLOR--BACKGROUND--DEFAULT:var(\n --digi--button--color--background--secondary--default\n );--COLOR--BACKGROUND--HOVER:var(\n --digi--button--color--background--secondary--hover\n );--COLOR--BACKGROUND--FOCUS:var(\n --digi--button--color--background--secondary--focus\n );--COLOR--BACKGROUND--ACTIVE:var(\n --digi--button--color--background--secondary--active\n );--COLOR--TEXT--DEFAULT:var(--digi--button--color--text--secondary--default);--COLOR--TEXT--HOVER:var(--digi--button--color--text--secondary--hover);--COLOR--TEXT--FOCUS:var(--digi--button--color--text--secondary--focus);--COLOR--TEXT--ACTIVE:var(--digi--button--color--text--secondary--active);--COLOR--ICON--DEFAULT:var(--digi--button--color--icon--secondary--default);--COLOR--ICON--HOVER:var(--digi--button--color--icon--secondary--hover);--COLOR--ICON--FOCUS:var(--digi--button--color--icon--secondary--focus);--COLOR--ICON--ACTIVE:var(--digi--button--color--icon--secondary--active);--COLOR--BORDER--DEFAULT:var(\n --digi--button--color--border--secondary--default\n );--COLOR--BORDER--HOVER:var(--digi--button--color--border--secondary--hover);--COLOR--BORDER--FOCUS:var(--digi--button--color--border--secondary--focus);--COLOR--BORDER--ACTIVE:var(\n --digi--button--color--border--secondary--active\n );--BORDER-RADIUS--DEFAULT:var(\n --digi--button--border-radius--secondary--default\n );--BORDER-RADIUS--HOVER:var(--digi--button--border-radius--secondary--hover);--BORDER-RADIUS--FOCUS:var(--digi--button--border-radius--secondary--focus);--BORDER-RADIUS--ACTIVE:var(\n --digi--button--border-radius--secondary--active\n );--BORDER-WIDTH--DEFAULT:var(\n --digi--button--border-width--secondary--default\n );--BORDER-WIDTH--HOVER:var(--digi--button--border-width--secondary--hover);--BORDER-WIDTH--FOCUS:var(--digi--button--border-width--secondary--focus);--BORDER-WIDTH--ACTIVE:var(--digi--button--border-width--secondary--active);--BORDER-STYLE--DEFAULT:var(\n --digi--button--border-style--secondary--default\n );--BORDER-STYLE--HOVER:var(--digi--button--border-style--secondary--hover);--BORDER-STYLE--FOCUS:var(--digi--button--border-style--secondary--focus);--BORDER-STYLE--ACTIVE:var(--digi--button--border-style--secondary--active);--FONT-WEIGHT:var(--digi--button--font-weight--default)}.sc-digi-button-h .digi-button--variation-function.sc-digi-button{--COLOR--BACKGROUND--DEFAULT:var(\n --digi--button--color--background--function--default\n );--COLOR--BACKGROUND--HOVER:var(\n --digi--button--color--background--function--hover\n );--COLOR--BACKGROUND--FOCUS:var(\n --digi--button--color--background--function--focus\n );--COLOR--BACKGROUND--ACTIVE:var(\n --digi--button--color--background--function--active\n );--COLOR--TEXT--DEFAULT:var(--digi--button--color--text--function--default);--COLOR--TEXT--HOVER:var(--digi--button--color--text--function--hover);--COLOR--TEXT--FOCUS:var(--digi--button--color--text--function--focus);--COLOR--TEXT--ACTIVE:var(--digi--button--color--text--function--active);--COLOR--ICON--DEFAULT:var(--digi--button--color--icon--function--default);--COLOR--ICON--HOVER:var(--digi--button--color--icon--function--hover);--COLOR--ICON--FOCUS:var(--digi--button--color--icon--function--focus);--COLOR--ICON--ACTIVE:var(--digi--button--color--icon--function--active);--COLOR--BORDER--DEFAULT:var(\n --digi--button--color--border--function--default\n );--COLOR--BORDER--HOVER:var(--digi--button--color--border--function--hover);--COLOR--BORDER--FOCUS:var(--digi--button--color--border--function--focus);--COLOR--BORDER--ACTIVE:var(--digi--button--color--border--function--active);--BORDER-RADIUS--DEFAULT:var(\n --digi--button--border-radius--function--default\n );--BORDER-RADIUS--HOVER:var(--digi--button--border-radius--function--hover);--BORDER-RADIUS--FOCUS:var(--digi--button--border-radius--function--focus);--BORDER-RADIUS--ACTIVE:var(--digi--button--border-radius--function--active);--BORDER-WIDTH--DEFAULT:var(--digi--button--border-width--function--default);--BORDER-WIDTH--HOVER:var(--digi--button--border-width--function--hover);--BORDER-WIDTH--FOCUS:var(--digi--button--border-width--function--focus);--BORDER-WIDTH--ACTIVE:var(--digi--button--border-width--function--active);--BORDER-STYLE--DEFAULT:var(--digi--button--border-style--function--default);--BORDER-STYLE--HOVER:var(--digi--button--border-style--function--hover);--BORDER-STYLE--FOCUS:var(--digi--button--border-style--function--focus);--BORDER-STYLE--ACTIVE:var(--digi--button--border-style--function--active);--FONT-WEIGHT:var(--digi--button--font-weight--function)}.sc-digi-button-h .digi-button--variation-function.sc-digi-button:hover,.sc-digi-button-h .digi-button--variation-function.sc-digi-button:focus{text-decoration:underline}.sc-digi-button-h .digi-button--size-small.sc-digi-button{--FONT-SIZE:var(--digi--button--font-size--small);--PADDING:var(--digi--button--padding--small);--MIN-HEIGHT:var(--digi--button--min-height--small)}.sc-digi-button-h .digi-button--size-medium.sc-digi-button{--FONT-SIZE:var(--digi--button--font-size--medium);--PADDING:var(--digi--button--padding--medium);--MIN-HEIGHT:var(--digi--button--min-height--small)}.sc-digi-button-h .digi-button--size-large.sc-digi-button{--FONT-SIZE:var(--digi--button--font-size--large);--PADDING:var(--digi--button--padding--large);--MIN-HEIGHT:var(--digi--button--min-height--large)}.sc-digi-button-h .digi-button.sc-digi-button-s>[slot^=icon],.sc-digi-button-h .digi-button .sc-digi-button-s>[slot^=icon]{--digi--icon--height:1em;--digi--icon--width:1em;--digi--icon--color:var(--COLOR--ICON--DEFAULT);min-height:0}.sc-digi-button-h .digi-button.sc-digi-button:hover{background:var(--COLOR--BACKGROUND--HOVER);border-radius:var(--BORDER-RADIUS--HOVER);border-width:var(--BORDER-WIDTH--HOVER);border-style:var(--BORDER-STYLE--HOVER);border-color:var(--COLOR--BORDER--HOVER);color:var(--COLOR--TEXT--HOVER)}.sc-digi-button-h .digi-button:hover.sc-digi-button-s>[slot^=icon],.sc-digi-button-h .digi-button:hover .sc-digi-button-s>[slot^=icon]{--digi--icon--color:var(--COLOR--ICON--HOVER)}.sc-digi-button-h .digi-button.sc-digi-button:focus-visible{background:var(--COLOR--BACKGROUND--FOCUS);color:var(--COLOR--TEXT--FOCUS);border-style:var(--BORDER-STYLE--FOCUS);border-color:var(--COLOR--BORDER--FOCUS);outline:2px solid black;outline-offset:2px;box-shadow:0px 0px 0px 5px white}.sc-digi-button-h .digi-button:focus-visible.sc-digi-button-s>[slot^=icon],.sc-digi-button-h .digi-button:focus-visible .sc-digi-button-s>[slot^=icon]{--digi--icon--color:var(--COLOR--ICON--FOCUS)}.sc-digi-button-h .digi-button.sc-digi-button:active{background:var(--COLOR--BACKGROUND--ACTIVE);color:var(--COLOR--TEXT--ACTIVE)}.sc-digi-button-h .digi-button:active.sc-digi-button-s>[slot^=icon],.sc-digi-button-h .digi-button:active .sc-digi-button-s>[slot^=icon]{--digi--icon--color:var(--COLOR--ICON--ACTIVE)}.sc-digi-button-h .digi-button--icon.sc-digi-button,.sc-digi-button-h .digi-button--icon-secondary.sc-digi-button{--digi--button--display:flex;align-items:center;justify-content:var(--digi--button--justify-content--default);gap:var(--digi--button--icon--spacing)}.sc-digi-button-h .digi-button--full-width.sc-digi-button{--digi--button--width:100%;--digi--button--text-align--default:var(\n --digi--button--text-align--full-width\n );--digi--button--justify-content--default:var(\n --digi--button--justify-content--full-width\n )}";
|
|
11
12
|
const DigiButtonStyle0 = buttonCss;
|
|
@@ -126,2314 +127,236 @@ const Button = class {
|
|
|
126
127
|
};
|
|
127
128
|
Button.style = DigiButtonStyle0;
|
|
128
129
|
|
|
129
|
-
function sourceEvent(event) {
|
|
130
|
-
|
|
131
|
-
while (sourceEvent = event.sourceEvent) event = sourceEvent;
|
|
132
|
-
return event;
|
|
133
|
-
}
|
|
130
|
+
const navigationContextMenuCss = ".digi--util--fs--xs{font-size:var(--digi--global--typography--font-size--small) !important}.digi--util--fs--s{font-size:calc(var(--digi--global--typography--font-size--small) + 1px) !important}.digi--util--fs--m{font-size:var(--digi--global--typography--font-size--base) !important}.digi--util--fs--l{font-size:var(--digi--global--typography--font-size--large) !important}.digi--util--fw--sb{font-weight:var(--digi--global--typography--font-weight--semibold) !important}.digi--util--pt--1{padding-top:var(--digi--global--spacing--smallest-2) !important}.digi--util--pt--10{padding-top:var(--digi--global--spacing--smallest) !important}.digi--util--pt--20{padding-top:var(--digi--global--spacing--base) !important}.digi--util--pt--30{padding-top:var(--digi--global--spacing--largest-2) !important}.digi--util--pt--40{padding-top:var(--digi--global--spacing--largest-4) !important}.digi--util--pt--50{padding-top:2.5rem !important}.digi--util--pt--60{padding-top:var(--digi--global--spacing--largest-5) !important}.digi--util--pt--70{padding-top:var(--digi--global--spacing--largest-6) !important}.digi--util--pt--80{padding-top:4.5rem !important}.digi--util--pt--90{padding-top:5rem !important}.digi--util--pb--1{padding-bottom:var(--digi--global--spacing--smallest-2) !important}.digi--util--pb--10{padding-bottom:var(--digi--global--spacing--smallest) !important}.digi--util--pb--20{padding-bottom:var(--digi--global--spacing--base) !important}.digi--util--pb--30{padding-bottom:var(--digi--global--spacing--largest-2) !important}.digi--util--pb--40{padding-bottom:var(--digi--global--spacing--largest-4) !important}.digi--util--pb--50{padding-bottom:2.5rem !important}.digi--util--pb--60{padding-bottom:var(--digi--global--spacing--largest-5) !important}.digi--util--pb--70{padding-bottom:var(--digi--global--spacing--largest-6) !important}.digi--util--pb--80{padding-bottom:4.5rem !important}.digi--util--pb--90{padding-bottom:5rem !important}.digi--util--p--1{padding:var(--digi--global--spacing--smallest-2) !important}.digi--util--p--10{padding:var(--digi--global--spacing--smallest) !important}.digi--util--p--20{padding:var(--digi--global--spacing--base) !important}.digi--util--p--30{padding:var(--digi--global--spacing--largest-2) !important}.digi--util--p--40{padding:var(--digi--global--spacing--largest-4) !important}.digi--util--p--50{padding:2.5rem !important}.digi--util--p--60{padding:var(--digi--global--spacing--largest-5) !important}.digi--util--p--70{padding:var(--digi--global--spacing--largest-6) !important}.digi--util--p--80{padding:4.5rem !important}.digi--util--p--90{padding:5rem !important}.digi--util--ptb--1{padding-top:var(--digi--global--spacing--smallest-2) !important;padding-bottom:var(--digi--global--spacing--smallest-2) !important}.digi--util--ptb--10{padding-top:var(--digi--global--spacing--smallest) !important;padding-bottom:var(--digi--global--spacing--smallest) !important}.digi--util--ptb--20{padding-top:var(--digi--global--spacing--base) !important;padding-bottom:var(--digi--global--spacing--base) !important}.digi--util--ptb--30{padding-top:var(--digi--global--spacing--largest-2) !important;padding-bottom:var(--digi--global--spacing--largest-2) !important}.digi--util--ptb--40{padding-top:var(--digi--global--spacing--largest-4) !important;padding-bottom:var(--digi--global--spacing--largest-4) !important}.digi--util--ptb--50{padding-top:2.5rem !important;padding-bottom:2.5rem !important}.digi--util--ptb--60{padding-top:var(--digi--global--spacing--largest-5) !important;padding-bottom:var(--digi--global--spacing--largest-5) !important}.digi--util--ptb--70{padding-top:var(--digi--global--spacing--largest-6) !important;padding-bottom:var(--digi--global--spacing--largest-6) !important}.digi--util--ptb--80{padding-top:4.5rem !important;padding-bottom:4.5rem !important}.digi--util--ptb--90{padding-top:5rem !important;padding-bottom:5rem !important}.digi--util--plr--1{padding-left:var(--digi--global--spacing--smallest-2) !important;padding-right:var(--digi--global--spacing--smallest-2) !important}.digi--util--plr--10{padding-left:var(--digi--global--spacing--smallest) !important;padding-right:var(--digi--global--spacing--smallest) !important}.digi--util--plr--20{padding-left:var(--digi--global--spacing--base) !important;padding-right:var(--digi--global--spacing--base) !important}.digi--util--plr--30{padding-left:var(--digi--global--spacing--largest-2) !important;padding-right:var(--digi--global--spacing--largest-2) !important}.digi--util--plr--40{padding-left:var(--digi--global--spacing--largest-4) !important;padding-right:var(--digi--global--spacing--largest-4) !important}.digi--util--plr--50{padding-left:2.5rem !important;padding-right:2.5rem !important}.digi--util--plr--60{padding-left:var(--digi--global--spacing--largest-5) !important;padding-right:var(--digi--global--spacing--largest-5) !important}.digi--util--plr--70{padding-left:var(--digi--global--spacing--largest-6) !important;padding-right:var(--digi--global--spacing--largest-6) !important}.digi--util--plr--80{padding-left:4.5rem !important;padding-right:4.5rem !important}.digi--util--plr--90{padding-left:5rem !important;padding-right:5rem !important}.digi--util--sr-only{border:0;clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.digi--util--hidden{display:none}.digi-navigation-context-menu{display:block;box-sizing:border-box;width:fit-content}.digi-navigation-context-menu *,.digi-navigation-context-menu *::before,.digi-navigation-context-menu *::after{box-sizing:border-box}:host{--digi--navigation-context-menu--toggle-icon--transition:ease-in-out 0.2s all;--digi--navigation-context-menu--toggle-icon--transform:rotate(-180deg);--digi--navigation-context-menu--content--background-color:var(--digi--color--background--primary);--digi--navigation-context-menu--content--border-radius:var(--digi--border-radius--secondary);--digi--navigation-context-menu--content--box-shadow:0 0.125rem 0.375rem 0 rgba(0, 0, 0, 0.7);--digi--navigation-context-menu--content--max-width:90vw;--digi--navigation-context-menu--content--max-height:15rem;--digi--navigation-context-menu--button-icon--width:0.875rem;--digi--navigation-context-menu--button-trigger--font-size:var(--digi--typography--body--font-size--desktop);--digi--navigation-context-menu--button-trigger--padding:0;--digi--navigation-context-menu--item--font-size:var(--digi--typography--body--font-size--desktop);--digi--navigation-context-menu--item--background-color--active:var(--digi--color--background--neutral-6);--digi--navigation-context-menu--item--display:flex;--digi--navigation-context-menu--item--font-family:var(--digi--global--typography--font-family--default);--digi--navigation-context-menu--item--font-color:var(--digi--color--text--primary)}.digi-navigation-context-menu--id-wrapper{display:grid}.digi-navigation-context-menu--id-wrapper .digi-navigation-context-menu__toggle-icon{transition:var(--digi--navigation-context-menu--toggle-icon--transition)}.digi-navigation-context-menu--id-wrapper .digi-navigation-context-menu{--HORIZONTAL-POSITION:unset;display:block}.digi-navigation-context-menu--id-wrapper .digi-navigation-context-menu--active .digi-navigation-context-menu__toggle-icon{transform:var(--digi--navigation-context-menu--toggle-icon--transform)}.digi-navigation-context-menu--id-wrapper .digi-navigation-context-menu__trigger-button{display:block;--digi--button--padding--medium:var(\n --digi--navigation-context-menu--button-trigger--padding\n );width:fit-content;--digi--button--font-size--medium:var(\n --digi--navigation-context-menu--button-trigger--font-size\n )}.digi-navigation-context-menu--id-wrapper .digi-navigation-context-menu__list{width:100%;position:relative;display:inline-grid}.digi-navigation-context-menu--id-wrapper .dropdown-wrapper{padding:0.5rem 0;display:none;width:max-content;min-width:100%;max-width:var(--digi--navigation-context-menu--content--max-width);max-height:var(--digi--navigation-context-menu--content--max-height);overflow-y:auto;box-sizing:border-box;z-index:10;margin-top:0.5rem;background-color:var(--digi--navigation-context-menu--content--background-color);border-radius:var(--digi--navigation-context-menu--content--border-radius);box-shadow:var(--digi--navigation-context-menu--content--box-shadow);position:absolute}.digi-navigation-context-menu--id-wrapper .dropdown-wrapper--visible{display:block}.digi-navigation-context-menu--id-wrapper .dropdown-wrapper--position-right{right:0}.digi-navigation-context-menu--id-wrapper .dropdown-wrapper--position-center{left:50%;transform:translateX(-50%)}.digi-navigation-context-menu--id-wrapper .content-wrapper{display:flex;flex-direction:row;align-items:baseline;padding-left:1rem;padding-right:1rem;gap:0.5rem}.digi-navigation-context-menu--id-wrapper .digi-navigation-context-menu__item{font-size:var(--digi--navigation-context-menu--item--font-size);display:var(--digi--navigation-context-menu--item--display);font-family:var(--digi--navigation-context-menu--item--font-family);padding:0.625rem 0;max-width:max-content;min-width:100%;width:100%;position:relative;cursor:pointer}.digi-navigation-context-menu--id-wrapper .digi-navigation-context-menu__item:hover{background-color:var(--digi--navigation-context-menu--item--background-color--active)}.digi-navigation-context-menu--id-wrapper .digi-navigation-context-menu__item:focus-visible{outline:2px solid black;outline-offset:-3px;box-shadow:0px 0px 0px 5px inset white}.digi-navigation-context-menu--id-wrapper .digi-navigation-context-menu__item--active{font-weight:600;background-color:var(--digi--navigation-context-menu--item--background-color--active)}.digi-navigation-context-menu--id-wrapper .digi-navigation-context-menu__item--link{list-style:none;margin:0;padding:0}.digi-navigation-context-menu--id-wrapper .digi-navigation-context-menu__item--link a{padding:0.625rem 1rem;color:var(--digi--navigation-context-menu--item--font-color, #333333);text-decoration:none;margin:0;width:100%}.digi-navigation-context-menu--id-wrapper .digi-navigation-context-menu__button-icon{--digi--icon--width:var(\n --digi--navigation-context-menu--button-icon--width\n )}";
|
|
131
|
+
const DigiContextMenuStyle0 = navigationContextMenuCss;
|
|
134
132
|
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
if (node) {
|
|
139
|
-
var svg = node.ownerSVGElement || node;
|
|
140
|
-
if (svg.createSVGPoint) {
|
|
141
|
-
var point = svg.createSVGPoint();
|
|
142
|
-
point.x = event.clientX, point.y = event.clientY;
|
|
143
|
-
point = point.matrixTransform(node.getScreenCTM().inverse());
|
|
144
|
-
return [point.x, point.y];
|
|
145
|
-
}
|
|
146
|
-
if (node.getBoundingClientRect) {
|
|
147
|
-
var rect = node.getBoundingClientRect();
|
|
148
|
-
return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
|
|
133
|
+
function deserializeProp(prop) {
|
|
134
|
+
if (typeof prop === 'string') {
|
|
135
|
+
return JSON.parse(prop);
|
|
149
136
|
}
|
|
150
|
-
|
|
151
|
-
return [event.pageX, event.pageY];
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// These are typically used in conjunction with noevent to ensure that we can
|
|
155
|
-
// preventDefault on the event.
|
|
156
|
-
const nonpassive = {passive: false};
|
|
157
|
-
const nonpassivecapture = {capture: true, passive: false};
|
|
158
|
-
|
|
159
|
-
function nopropagation(event) {
|
|
160
|
-
event.stopImmediatePropagation();
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
function noevent(event) {
|
|
164
|
-
event.preventDefault();
|
|
165
|
-
event.stopImmediatePropagation();
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function dragDisable(view) {
|
|
169
|
-
var root = view.document.documentElement,
|
|
170
|
-
selection = select(view).on("dragstart.drag", noevent, nonpassivecapture);
|
|
171
|
-
if ("onselectstart" in root) {
|
|
172
|
-
selection.on("selectstart.drag", noevent, nonpassivecapture);
|
|
173
|
-
} else {
|
|
174
|
-
root.__noselect = root.style.MozUserSelect;
|
|
175
|
-
root.style.MozUserSelect = "none";
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function yesdrag(view, noclick) {
|
|
180
|
-
var root = view.document.documentElement,
|
|
181
|
-
selection = select(view).on("dragstart.drag", null);
|
|
182
|
-
if (noclick) {
|
|
183
|
-
selection.on("click.drag", noevent, nonpassivecapture);
|
|
184
|
-
setTimeout(function() { selection.on("click.drag", null); }, 0);
|
|
185
|
-
}
|
|
186
|
-
if ("onselectstart" in root) {
|
|
187
|
-
selection.on("selectstart.drag", null);
|
|
188
|
-
} else {
|
|
189
|
-
root.style.MozUserSelect = root.__noselect;
|
|
190
|
-
delete root.__noselect;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
const constant$1 = x => () => x;
|
|
195
|
-
|
|
196
|
-
function DragEvent(type, {
|
|
197
|
-
sourceEvent,
|
|
198
|
-
subject,
|
|
199
|
-
target,
|
|
200
|
-
identifier,
|
|
201
|
-
active,
|
|
202
|
-
x, y, dx, dy,
|
|
203
|
-
dispatch
|
|
204
|
-
}) {
|
|
205
|
-
Object.defineProperties(this, {
|
|
206
|
-
type: {value: type, enumerable: true, configurable: true},
|
|
207
|
-
sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},
|
|
208
|
-
subject: {value: subject, enumerable: true, configurable: true},
|
|
209
|
-
target: {value: target, enumerable: true, configurable: true},
|
|
210
|
-
identifier: {value: identifier, enumerable: true, configurable: true},
|
|
211
|
-
active: {value: active, enumerable: true, configurable: true},
|
|
212
|
-
x: {value: x, enumerable: true, configurable: true},
|
|
213
|
-
y: {value: y, enumerable: true, configurable: true},
|
|
214
|
-
dx: {value: dx, enumerable: true, configurable: true},
|
|
215
|
-
dy: {value: dy, enumerable: true, configurable: true},
|
|
216
|
-
_: {value: dispatch}
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
DragEvent.prototype.on = function() {
|
|
221
|
-
var value = this._.on.apply(this._, arguments);
|
|
222
|
-
return value === this._ ? this : value;
|
|
223
|
-
};
|
|
224
|
-
|
|
225
|
-
// Ignore right-click, since that should open the context menu.
|
|
226
|
-
function defaultFilter(event) {
|
|
227
|
-
return !event.ctrlKey && !event.button;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
function defaultContainer() {
|
|
231
|
-
return this.parentNode;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
function defaultSubject(event, d) {
|
|
235
|
-
return d == null ? {x: event.x, y: event.y} : d;
|
|
137
|
+
return prop;
|
|
236
138
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
selection
|
|
258
|
-
.on("mousedown.drag", mousedowned)
|
|
259
|
-
.filter(touchable)
|
|
260
|
-
.on("touchstart.drag", touchstarted)
|
|
261
|
-
.on("touchmove.drag", touchmoved, nonpassive)
|
|
262
|
-
.on("touchend.drag touchcancel.drag", touchended)
|
|
263
|
-
.style("touch-action", "none")
|
|
264
|
-
.style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
function mousedowned(event, d) {
|
|
268
|
-
if (touchending || !filter.call(this, event, d)) return;
|
|
269
|
-
var gesture = beforestart(this, container.call(this, event, d), event, d, "mouse");
|
|
270
|
-
if (!gesture) return;
|
|
271
|
-
select(event.view)
|
|
272
|
-
.on("mousemove.drag", mousemoved, nonpassivecapture)
|
|
273
|
-
.on("mouseup.drag", mouseupped, nonpassivecapture);
|
|
274
|
-
dragDisable(event.view);
|
|
275
|
-
nopropagation(event);
|
|
276
|
-
mousemoving = false;
|
|
277
|
-
mousedownx = event.clientX;
|
|
278
|
-
mousedowny = event.clientY;
|
|
279
|
-
gesture("start", event);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
function mousemoved(event) {
|
|
283
|
-
noevent(event);
|
|
284
|
-
if (!mousemoving) {
|
|
285
|
-
var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;
|
|
286
|
-
mousemoving = dx * dx + dy * dy > clickDistance2;
|
|
287
|
-
}
|
|
288
|
-
gestures.mouse("drag", event);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
function mouseupped(event) {
|
|
292
|
-
select(event.view).on("mousemove.drag mouseup.drag", null);
|
|
293
|
-
yesdrag(event.view, mousemoving);
|
|
294
|
-
noevent(event);
|
|
295
|
-
gestures.mouse("end", event);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
function touchstarted(event, d) {
|
|
299
|
-
if (!filter.call(this, event, d)) return;
|
|
300
|
-
var touches = event.changedTouches,
|
|
301
|
-
c = container.call(this, event, d),
|
|
302
|
-
n = touches.length, i, gesture;
|
|
303
|
-
|
|
304
|
-
for (i = 0; i < n; ++i) {
|
|
305
|
-
if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {
|
|
306
|
-
nopropagation(event);
|
|
307
|
-
gesture("start", event, touches[i]);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
function touchmoved(event) {
|
|
313
|
-
var touches = event.changedTouches,
|
|
314
|
-
n = touches.length, i, gesture;
|
|
315
|
-
|
|
316
|
-
for (i = 0; i < n; ++i) {
|
|
317
|
-
if (gesture = gestures[touches[i].identifier]) {
|
|
318
|
-
noevent(event);
|
|
319
|
-
gesture("drag", event, touches[i]);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
function touchended(event) {
|
|
325
|
-
var touches = event.changedTouches,
|
|
326
|
-
n = touches.length, i, gesture;
|
|
327
|
-
|
|
328
|
-
if (touchending) clearTimeout(touchending);
|
|
329
|
-
touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!
|
|
330
|
-
for (i = 0; i < n; ++i) {
|
|
331
|
-
if (gesture = gestures[touches[i].identifier]) {
|
|
332
|
-
nopropagation(event);
|
|
333
|
-
gesture("end", event, touches[i]);
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
function beforestart(that, container, event, d, identifier, touch) {
|
|
339
|
-
var dispatch = listeners.copy(),
|
|
340
|
-
p = pointer(touch || event, container), dx, dy,
|
|
341
|
-
s;
|
|
342
|
-
|
|
343
|
-
if ((s = subject.call(that, new DragEvent("beforestart", {
|
|
344
|
-
sourceEvent: event,
|
|
345
|
-
target: drag,
|
|
346
|
-
identifier,
|
|
347
|
-
active,
|
|
348
|
-
x: p[0],
|
|
349
|
-
y: p[1],
|
|
350
|
-
dx: 0,
|
|
351
|
-
dy: 0,
|
|
352
|
-
dispatch
|
|
353
|
-
}), d)) == null) return;
|
|
354
|
-
|
|
355
|
-
dx = s.x - p[0] || 0;
|
|
356
|
-
dy = s.y - p[1] || 0;
|
|
357
|
-
|
|
358
|
-
return function gesture(type, event, touch) {
|
|
359
|
-
var p0 = p, n;
|
|
360
|
-
switch (type) {
|
|
361
|
-
case "start": gestures[identifier] = gesture, n = active++; break;
|
|
362
|
-
case "end": delete gestures[identifier], --active; // falls through
|
|
363
|
-
case "drag": p = pointer(touch || event, container), n = active; break;
|
|
364
|
-
}
|
|
365
|
-
dispatch.call(
|
|
366
|
-
type,
|
|
367
|
-
that,
|
|
368
|
-
new DragEvent(type, {
|
|
369
|
-
sourceEvent: event,
|
|
370
|
-
subject: s,
|
|
371
|
-
target: drag,
|
|
372
|
-
identifier,
|
|
373
|
-
active: n,
|
|
374
|
-
x: p[0] + dx,
|
|
375
|
-
y: p[1] + dy,
|
|
376
|
-
dx: p[0] - p0[0],
|
|
377
|
-
dy: p[1] - p0[1],
|
|
378
|
-
dispatch
|
|
379
|
-
}),
|
|
380
|
-
d
|
|
381
|
-
);
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
drag.filter = function(_) {
|
|
386
|
-
return arguments.length ? (filter = typeof _ === "function" ? _ : constant$1(!!_), drag) : filter;
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
drag.container = function(_) {
|
|
390
|
-
return arguments.length ? (container = typeof _ === "function" ? _ : constant$1(_), drag) : container;
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
drag.subject = function(_) {
|
|
394
|
-
return arguments.length ? (subject = typeof _ === "function" ? _ : constant$1(_), drag) : subject;
|
|
395
|
-
};
|
|
396
|
-
|
|
397
|
-
drag.touchable = function(_) {
|
|
398
|
-
return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$1(!!_), drag) : touchable;
|
|
399
|
-
};
|
|
400
|
-
|
|
401
|
-
drag.on = function() {
|
|
402
|
-
var value = listeners.on.apply(listeners, arguments);
|
|
403
|
-
return value === listeners ? drag : value;
|
|
404
|
-
};
|
|
405
|
-
|
|
406
|
-
drag.clickDistance = function(_) {
|
|
407
|
-
return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);
|
|
408
|
-
};
|
|
409
|
-
|
|
410
|
-
return drag;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
function quadInOut(t) {
|
|
414
|
-
return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
const pi$1 = Math.PI,
|
|
418
|
-
tau$1 = 2 * pi$1,
|
|
419
|
-
epsilon = 1e-6,
|
|
420
|
-
tauEpsilon = tau$1 - epsilon;
|
|
421
|
-
|
|
422
|
-
function append(strings) {
|
|
423
|
-
this._ += strings[0];
|
|
424
|
-
for (let i = 1, n = strings.length; i < n; ++i) {
|
|
425
|
-
this._ += arguments[i] + strings[i];
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
function appendRound(digits) {
|
|
430
|
-
let d = Math.floor(digits);
|
|
431
|
-
if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);
|
|
432
|
-
if (d > 15) return append;
|
|
433
|
-
const k = 10 ** d;
|
|
434
|
-
return function(strings) {
|
|
435
|
-
this._ += strings[0];
|
|
436
|
-
for (let i = 1, n = strings.length; i < n; ++i) {
|
|
437
|
-
this._ += Math.round(arguments[i] * k) / k + strings[i];
|
|
438
|
-
}
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
class Path {
|
|
443
|
-
constructor(digits) {
|
|
444
|
-
this._x0 = this._y0 = // start of current subpath
|
|
445
|
-
this._x1 = this._y1 = null; // end of current subpath
|
|
446
|
-
this._ = "";
|
|
447
|
-
this._append = digits == null ? append : appendRound(digits);
|
|
448
|
-
}
|
|
449
|
-
moveTo(x, y) {
|
|
450
|
-
this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;
|
|
451
|
-
}
|
|
452
|
-
closePath() {
|
|
453
|
-
if (this._x1 !== null) {
|
|
454
|
-
this._x1 = this._x0, this._y1 = this._y0;
|
|
455
|
-
this._append`Z`;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
lineTo(x, y) {
|
|
459
|
-
this._append`L${this._x1 = +x},${this._y1 = +y}`;
|
|
460
|
-
}
|
|
461
|
-
quadraticCurveTo(x1, y1, x, y) {
|
|
462
|
-
this._append`Q${+x1},${+y1},${this._x1 = +x},${this._y1 = +y}`;
|
|
463
|
-
}
|
|
464
|
-
bezierCurveTo(x1, y1, x2, y2, x, y) {
|
|
465
|
-
this._append`C${+x1},${+y1},${+x2},${+y2},${this._x1 = +x},${this._y1 = +y}`;
|
|
466
|
-
}
|
|
467
|
-
arcTo(x1, y1, x2, y2, r) {
|
|
468
|
-
x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
|
|
469
|
-
|
|
470
|
-
// Is the radius negative? Error.
|
|
471
|
-
if (r < 0) throw new Error(`negative radius: ${r}`);
|
|
472
|
-
|
|
473
|
-
let x0 = this._x1,
|
|
474
|
-
y0 = this._y1,
|
|
475
|
-
x21 = x2 - x1,
|
|
476
|
-
y21 = y2 - y1,
|
|
477
|
-
x01 = x0 - x1,
|
|
478
|
-
y01 = y0 - y1,
|
|
479
|
-
l01_2 = x01 * x01 + y01 * y01;
|
|
480
|
-
|
|
481
|
-
// Is this path empty? Move to (x1,y1).
|
|
482
|
-
if (this._x1 === null) {
|
|
483
|
-
this._append`M${this._x1 = x1},${this._y1 = y1}`;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
// Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
|
|
487
|
-
else if (!(l01_2 > epsilon));
|
|
488
|
-
|
|
489
|
-
// Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?
|
|
490
|
-
// Equivalently, is (x1,y1) coincident with (x2,y2)?
|
|
491
|
-
// Or, is the radius zero? Line to (x1,y1).
|
|
492
|
-
else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
|
|
493
|
-
this._append`L${this._x1 = x1},${this._y1 = y1}`;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
// Otherwise, draw an arc!
|
|
497
|
-
else {
|
|
498
|
-
let x20 = x2 - x0,
|
|
499
|
-
y20 = y2 - y0,
|
|
500
|
-
l21_2 = x21 * x21 + y21 * y21,
|
|
501
|
-
l20_2 = x20 * x20 + y20 * y20,
|
|
502
|
-
l21 = Math.sqrt(l21_2),
|
|
503
|
-
l01 = Math.sqrt(l01_2),
|
|
504
|
-
l = r * Math.tan((pi$1 - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
|
|
505
|
-
t01 = l / l01,
|
|
506
|
-
t21 = l / l21;
|
|
507
|
-
|
|
508
|
-
// If the start tangent is not coincident with (x0,y0), line to.
|
|
509
|
-
if (Math.abs(t01 - 1) > epsilon) {
|
|
510
|
-
this._append`L${x1 + t01 * x01},${y1 + t01 * y01}`;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
this._append`A${r},${r},0,0,${+(y01 * x20 > x01 * y20)},${this._x1 = x1 + t21 * x21},${this._y1 = y1 + t21 * y21}`;
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
arc(x, y, r, a0, a1, ccw) {
|
|
517
|
-
x = +x, y = +y, r = +r, ccw = !!ccw;
|
|
518
|
-
|
|
519
|
-
// Is the radius negative? Error.
|
|
520
|
-
if (r < 0) throw new Error(`negative radius: ${r}`);
|
|
521
|
-
|
|
522
|
-
let dx = r * Math.cos(a0),
|
|
523
|
-
dy = r * Math.sin(a0),
|
|
524
|
-
x0 = x + dx,
|
|
525
|
-
y0 = y + dy,
|
|
526
|
-
cw = 1 ^ ccw,
|
|
527
|
-
da = ccw ? a0 - a1 : a1 - a0;
|
|
528
|
-
|
|
529
|
-
// Is this path empty? Move to (x0,y0).
|
|
530
|
-
if (this._x1 === null) {
|
|
531
|
-
this._append`M${x0},${y0}`;
|
|
139
|
+
const ContextMenu = class {
|
|
140
|
+
constructor(hostRef) {
|
|
141
|
+
registerInstance(this, hostRef);
|
|
142
|
+
this.afChangeItem = createEvent(this, "afChangeItem", 7);
|
|
143
|
+
this.afFocusItem = createEvent(this, "afFocusItem", 7);
|
|
144
|
+
this.afToggleMenu = createEvent(this, "afToggleMenu", 7);
|
|
145
|
+
this.afBlur = createEvent(this, "afBlur", 7);
|
|
146
|
+
this.itemRefs = {};
|
|
147
|
+
this.visible = false;
|
|
148
|
+
this.activeItemIdx = undefined;
|
|
149
|
+
this.selectItemIdx = 0;
|
|
150
|
+
this.afId = randomIdGenerator('digi-context-menu');
|
|
151
|
+
this.afIcon = undefined;
|
|
152
|
+
this.afTitle = undefined;
|
|
153
|
+
this.afMenuItems = undefined;
|
|
154
|
+
this.afDir = undefined;
|
|
155
|
+
this.afLang = undefined;
|
|
156
|
+
this.afAriaLabel = undefined;
|
|
157
|
+
this.afMenuPosition = 'left-bottom';
|
|
158
|
+
this.afActiveItem = undefined;
|
|
532
159
|
}
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
160
|
+
clickHandler(e) {
|
|
161
|
+
const target = e.target;
|
|
162
|
+
const selector = `#${this.afId}-identifier`;
|
|
163
|
+
if (detectClickOutside(target, selector) && this.visible) {
|
|
164
|
+
this.hideMenu();
|
|
165
|
+
}
|
|
537
166
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
// Is this a complete circle? Draw two arcs to complete the circle.
|
|
546
|
-
if (da > tauEpsilon) {
|
|
547
|
-
this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;
|
|
167
|
+
focusoutHandler(e) {
|
|
168
|
+
const target = e.target;
|
|
169
|
+
const selector = `#${this.afId}-identifier`;
|
|
170
|
+
if (detectFocusOutside(target, selector) && this.visible) {
|
|
171
|
+
this.hideMenu();
|
|
172
|
+
this.afBlur.emit();
|
|
173
|
+
}
|
|
548
174
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
175
|
+
syncActiveItem() {
|
|
176
|
+
if (this.afActiveItem != null) {
|
|
177
|
+
const menuItems = this.afMenuItems;
|
|
178
|
+
this.activeItemIdx = menuItems.findIndex((item) => item.id.toString() === this.afActiveItem);
|
|
179
|
+
}
|
|
553
180
|
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
this._append`M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${w = +w}v${+h}h${-w}Z`;
|
|
557
|
-
}
|
|
558
|
-
toString() {
|
|
559
|
-
return this._;
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
function constant(x) {
|
|
564
|
-
return function constant() {
|
|
565
|
-
return x;
|
|
566
|
-
};
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
const cos = Math.cos;
|
|
570
|
-
const sin = Math.sin;
|
|
571
|
-
const sqrt = Math.sqrt;
|
|
572
|
-
const pi = Math.PI;
|
|
573
|
-
const tau = 2 * pi;
|
|
574
|
-
|
|
575
|
-
function withPath(shape) {
|
|
576
|
-
let digits = 3;
|
|
577
|
-
|
|
578
|
-
shape.digits = function(_) {
|
|
579
|
-
if (!arguments.length) return digits;
|
|
580
|
-
if (_ == null) {
|
|
581
|
-
digits = null;
|
|
582
|
-
} else {
|
|
583
|
-
const d = Math.floor(_);
|
|
584
|
-
if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
|
|
585
|
-
digits = d;
|
|
181
|
+
syncItems() {
|
|
182
|
+
this.afMenuItems = deserializeProp(this.afMenuItems);
|
|
586
183
|
}
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
return () => new Path(digits);
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
function array(x) {
|
|
594
|
-
return typeof x === "object" && "length" in x
|
|
595
|
-
? x // Array, TypedArray, NodeList, array-like
|
|
596
|
-
: Array.from(x); // Map, Set, iterable, string, or anything else
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
function Linear(context) {
|
|
600
|
-
this._context = context;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
Linear.prototype = {
|
|
604
|
-
areaStart: function() {
|
|
605
|
-
this._line = 0;
|
|
606
|
-
},
|
|
607
|
-
areaEnd: function() {
|
|
608
|
-
this._line = NaN;
|
|
609
|
-
},
|
|
610
|
-
lineStart: function() {
|
|
611
|
-
this._point = 0;
|
|
612
|
-
},
|
|
613
|
-
lineEnd: function() {
|
|
614
|
-
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
|
|
615
|
-
this._line = 1 - this._line;
|
|
616
|
-
},
|
|
617
|
-
point: function(x, y) {
|
|
618
|
-
x = +x, y = +y;
|
|
619
|
-
switch (this._point) {
|
|
620
|
-
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
621
|
-
case 1: this._point = 2; // falls through
|
|
622
|
-
default: this._context.lineTo(x, y); break;
|
|
184
|
+
componentWillLoad() {
|
|
185
|
+
this.syncItems();
|
|
186
|
+
this.syncActiveItem();
|
|
623
187
|
}
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
return new Linear(context);
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
function x(p) {
|
|
632
|
-
return p[0];
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
function y(p) {
|
|
636
|
-
return p[1];
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
function line(x$1, y$1) {
|
|
640
|
-
var defined = constant(true),
|
|
641
|
-
context = null,
|
|
642
|
-
curve = curveLinear,
|
|
643
|
-
output = null,
|
|
644
|
-
path = withPath(line);
|
|
645
|
-
|
|
646
|
-
x$1 = typeof x$1 === "function" ? x$1 : (x$1 === undefined) ? x : constant(x$1);
|
|
647
|
-
y$1 = typeof y$1 === "function" ? y$1 : (y$1 === undefined) ? y : constant(y$1);
|
|
648
|
-
|
|
649
|
-
function line(data) {
|
|
650
|
-
var i,
|
|
651
|
-
n = (data = array(data)).length,
|
|
652
|
-
d,
|
|
653
|
-
defined0 = false,
|
|
654
|
-
buffer;
|
|
655
|
-
|
|
656
|
-
if (context == null) output = curve(buffer = path());
|
|
657
|
-
|
|
658
|
-
for (i = 0; i <= n; ++i) {
|
|
659
|
-
if (!(i < n && defined(d = data[i], i, data)) === defined0) {
|
|
660
|
-
if (defined0 = !defined0) output.lineStart();
|
|
661
|
-
else output.lineEnd();
|
|
662
|
-
}
|
|
663
|
-
if (defined0) output.point(+x$1(d, i, data), +y$1(d, i, data));
|
|
188
|
+
get digiIcon() {
|
|
189
|
+
if (this.afIcon != null) {
|
|
190
|
+
return `digi-icon-${this.afIcon}`;
|
|
191
|
+
}
|
|
664
192
|
}
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
line.x = function(_) {
|
|
670
|
-
return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), line) : x$1;
|
|
671
|
-
};
|
|
672
|
-
|
|
673
|
-
line.y = function(_) {
|
|
674
|
-
return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), line) : y$1;
|
|
675
|
-
};
|
|
676
|
-
|
|
677
|
-
line.defined = function(_) {
|
|
678
|
-
return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line) : defined;
|
|
679
|
-
};
|
|
680
|
-
|
|
681
|
-
line.curve = function(_) {
|
|
682
|
-
return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;
|
|
683
|
-
};
|
|
684
|
-
|
|
685
|
-
line.context = function(_) {
|
|
686
|
-
return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;
|
|
687
|
-
};
|
|
688
|
-
|
|
689
|
-
return line;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
const circle = {
|
|
693
|
-
draw(context, size) {
|
|
694
|
-
const r = sqrt(size / pi);
|
|
695
|
-
context.moveTo(r, 0);
|
|
696
|
-
context.arc(0, 0, r, 0, tau);
|
|
697
|
-
}
|
|
698
|
-
};
|
|
699
|
-
|
|
700
|
-
const tan30 = sqrt(1 / 3);
|
|
701
|
-
const tan30_2 = tan30 * 2;
|
|
702
|
-
|
|
703
|
-
const diamond = {
|
|
704
|
-
draw(context, size) {
|
|
705
|
-
const y = sqrt(size / tan30_2);
|
|
706
|
-
const x = y * tan30;
|
|
707
|
-
context.moveTo(0, -y);
|
|
708
|
-
context.lineTo(x, 0);
|
|
709
|
-
context.lineTo(0, y);
|
|
710
|
-
context.lineTo(-x, 0);
|
|
711
|
-
context.closePath();
|
|
712
|
-
}
|
|
713
|
-
};
|
|
714
|
-
|
|
715
|
-
const ka = 0.89081309152928522810;
|
|
716
|
-
const kr = sin(pi / 10) / sin(7 * pi / 10);
|
|
717
|
-
const kx = sin(tau / 10) * kr;
|
|
718
|
-
const ky = -cos(tau / 10) * kr;
|
|
719
|
-
|
|
720
|
-
const star = {
|
|
721
|
-
draw(context, size) {
|
|
722
|
-
const r = sqrt(size * ka);
|
|
723
|
-
const x = kx * r;
|
|
724
|
-
const y = ky * r;
|
|
725
|
-
context.moveTo(0, -r);
|
|
726
|
-
context.lineTo(x, y);
|
|
727
|
-
for (let i = 1; i < 5; ++i) {
|
|
728
|
-
const a = tau * i / 5;
|
|
729
|
-
const c = cos(a);
|
|
730
|
-
const s = sin(a);
|
|
731
|
-
context.lineTo(s * r, -c * r);
|
|
732
|
-
context.lineTo(c * x - s * y, s * x + c * y);
|
|
193
|
+
hideMenu() {
|
|
194
|
+
this.visible = false;
|
|
195
|
+
this.afToggleMenu.emit(this.visible);
|
|
733
196
|
}
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
const sqrt3 = sqrt(3);
|
|
739
|
-
|
|
740
|
-
const triangle = {
|
|
741
|
-
draw(context, size) {
|
|
742
|
-
const y = -sqrt(size / (sqrt3 * 3));
|
|
743
|
-
context.moveTo(0, y * 2);
|
|
744
|
-
context.lineTo(-sqrt3 * y, -y);
|
|
745
|
-
context.lineTo(sqrt3 * y, -y);
|
|
746
|
-
context.closePath();
|
|
747
|
-
}
|
|
748
|
-
};
|
|
749
|
-
|
|
750
|
-
function Symbol(type, size) {
|
|
751
|
-
let context = null,
|
|
752
|
-
path = withPath(symbol);
|
|
753
|
-
|
|
754
|
-
type = typeof type === "function" ? type : constant(type || circle);
|
|
755
|
-
size = typeof size === "function" ? size : constant(size === undefined ? 64 : +size);
|
|
756
|
-
|
|
757
|
-
function symbol() {
|
|
758
|
-
let buffer;
|
|
759
|
-
if (!context) context = buffer = path();
|
|
760
|
-
type.apply(this, arguments).draw(context, +size.apply(this, arguments));
|
|
761
|
-
if (buffer) return context = null, buffer + "" || null;
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
symbol.type = function(_) {
|
|
765
|
-
return arguments.length ? (type = typeof _ === "function" ? _ : constant(_), symbol) : type;
|
|
766
|
-
};
|
|
767
|
-
|
|
768
|
-
symbol.size = function(_) {
|
|
769
|
-
return arguments.length ? (size = typeof _ === "function" ? _ : constant(+_), symbol) : size;
|
|
770
|
-
};
|
|
771
|
-
|
|
772
|
-
symbol.context = function(_) {
|
|
773
|
-
return arguments.length ? (context = _ == null ? null : _, symbol) : context;
|
|
774
|
-
};
|
|
775
|
-
|
|
776
|
-
return symbol;
|
|
777
|
-
}
|
|
778
|
-
|
|
779
|
-
function point(that, x, y) {
|
|
780
|
-
that._context.bezierCurveTo(
|
|
781
|
-
(2 * that._x0 + that._x1) / 3,
|
|
782
|
-
(2 * that._y0 + that._y1) / 3,
|
|
783
|
-
(that._x0 + 2 * that._x1) / 3,
|
|
784
|
-
(that._y0 + 2 * that._y1) / 3,
|
|
785
|
-
(that._x0 + 4 * that._x1 + x) / 6,
|
|
786
|
-
(that._y0 + 4 * that._y1 + y) / 6
|
|
787
|
-
);
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
function Basis(context) {
|
|
791
|
-
this._context = context;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
Basis.prototype = {
|
|
795
|
-
areaStart: function() {
|
|
796
|
-
this._line = 0;
|
|
797
|
-
},
|
|
798
|
-
areaEnd: function() {
|
|
799
|
-
this._line = NaN;
|
|
800
|
-
},
|
|
801
|
-
lineStart: function() {
|
|
802
|
-
this._x0 = this._x1 =
|
|
803
|
-
this._y0 = this._y1 = NaN;
|
|
804
|
-
this._point = 0;
|
|
805
|
-
},
|
|
806
|
-
lineEnd: function() {
|
|
807
|
-
switch (this._point) {
|
|
808
|
-
case 3: point(this, this._x1, this._y1); // falls through
|
|
809
|
-
case 2: this._context.lineTo(this._x1, this._y1); break;
|
|
197
|
+
showMenu() {
|
|
198
|
+
this.visible = true;
|
|
199
|
+
this.afToggleMenu.emit(this.visible);
|
|
810
200
|
}
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
|
|
818
|
-
case 1: this._point = 2; break;
|
|
819
|
-
case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // falls through
|
|
820
|
-
default: point(this, x, y); break;
|
|
201
|
+
isLink() {
|
|
202
|
+
if (this.afMenuItems && this.afMenuItems.length > 0) {
|
|
203
|
+
const itemToCheck = this.afMenuItems[0];
|
|
204
|
+
return itemToCheck.type && itemToCheck.type === 'link';
|
|
205
|
+
}
|
|
206
|
+
return false;
|
|
821
207
|
}
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
const
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
const ChartLine = class {
|
|
835
|
-
constructor(hostRef) {
|
|
836
|
-
registerInstance(this, hostRef);
|
|
837
|
-
this._lineTypes = [null, '1.0, 7.0', '9.0, 7.0'];
|
|
838
|
-
this._toggled = false;
|
|
839
|
-
this._tickSize = 0;
|
|
840
|
-
// Selection list from legend chips
|
|
841
|
-
this._selectedLines = [];
|
|
842
|
-
// Dragging
|
|
843
|
-
this._dragStart = 0;
|
|
844
|
-
this._dragDir = 0;
|
|
845
|
-
this._loading = false;
|
|
846
|
-
this.margin = {
|
|
847
|
-
bottom: 0,
|
|
848
|
-
top: 6,
|
|
849
|
-
left: 5,
|
|
850
|
-
right: 15
|
|
851
|
-
};
|
|
852
|
-
this.fontSize = '0.875rem';
|
|
853
|
-
this.xPadding = 5;
|
|
854
|
-
this.yPadding = 8;
|
|
855
|
-
this.xTickSize = 5;
|
|
856
|
-
// How many line types that exists currently
|
|
857
|
-
this.lineTypes = 3;
|
|
858
|
-
// Formats
|
|
859
|
-
this.formatStyle = ',d';
|
|
860
|
-
this.axisNumberFormat = {
|
|
861
|
-
decimal: ',',
|
|
862
|
-
thousands: ' ',
|
|
863
|
-
grouping: [3],
|
|
864
|
-
currency: ['', 'kr']
|
|
865
|
-
};
|
|
866
|
-
// Observer for watching size changes when in line chart mode
|
|
867
|
-
this.lineChartObserver = new ResizeObserver((entries) => {
|
|
868
|
-
entries.forEach(() => {
|
|
869
|
-
this.resizeSvg();
|
|
870
|
-
this.resizeLines();
|
|
871
|
-
this.repositionTooltip(); // Called on both div.resize, and window.resize
|
|
872
|
-
select(this._legendDiv).style('width', this.dims.width + 'px');
|
|
873
|
-
});
|
|
874
|
-
});
|
|
875
|
-
// Observer for watching size changes when in table mode
|
|
876
|
-
this.tableObserver = new ResizeObserver((entries) => {
|
|
877
|
-
entries.forEach(() => {
|
|
878
|
-
select(this._legendDiv).style('width', this.dims.width + 'px');
|
|
879
|
-
this.resizeTable();
|
|
880
|
-
});
|
|
881
|
-
});
|
|
882
|
-
this.dragStart = (e) => {
|
|
883
|
-
const container = select(this._legendDiv).node();
|
|
884
|
-
this._dragStart = e.x - container.offsetLeft;
|
|
885
|
-
this._scrollLeft = container.scrollLeft;
|
|
886
|
-
};
|
|
887
|
-
this.drag = (e) => {
|
|
888
|
-
const container = select(this._legendDiv);
|
|
889
|
-
this._dragDir = e.x;
|
|
890
|
-
const delta = this._dragDir - container.node().offsetLeft;
|
|
891
|
-
const walk = (delta - this._dragStart) * 1; //scroll-fast
|
|
892
|
-
container.property('scrollLeft', this._scrollLeft - walk);
|
|
893
|
-
};
|
|
894
|
-
// Set yTicks
|
|
895
|
-
this.setYTicks = (init = false) => {
|
|
896
|
-
// Fixed number of y-axis lines
|
|
897
|
-
const step = this._chartData.meta && this._chartData.meta.numberOfReferenceLines
|
|
898
|
-
? this._chartData.meta.numberOfReferenceLines
|
|
899
|
-
: 5, min = this._yAxis.domain()[0], max = this._yAxis.domain()[1], stepValue = (max - min) / (step - 1), tickValues = range(min, max + stepValue, stepValue);
|
|
900
|
-
if (!init) {
|
|
901
|
-
this._yAxisHandle
|
|
902
|
-
.style('font-size', this.fontSize)
|
|
903
|
-
.transition()
|
|
904
|
-
.duration(400)
|
|
905
|
-
.call(axisLeft(this._yAxis)
|
|
906
|
-
.ticks(step)
|
|
907
|
-
.tickPadding(this.yPadding)
|
|
908
|
-
.tickValues(tickValues)
|
|
909
|
-
.tickSize(-(this.dims.width - this.margin.left))
|
|
910
|
-
.tickFormat((d) => formatLocale(this.axisNumberFormat).format(this.formatStyle)(d)))
|
|
911
|
-
.on('end', () => this.leftSetAxis());
|
|
912
|
-
}
|
|
913
|
-
else {
|
|
914
|
-
this._yAxisHandle.style('font-size', this.fontSize).call(axisLeft(this._yAxis)
|
|
915
|
-
.ticks(step)
|
|
916
|
-
.tickPadding(this.yPadding)
|
|
917
|
-
.tickValues(tickValues)
|
|
918
|
-
.tickSize(-(this.dims.width - this.margin.left))
|
|
919
|
-
.tickFormat((d) => formatLocale(this.axisNumberFormat).format(this.formatStyle)(d)));
|
|
920
|
-
}
|
|
921
|
-
this._yAxisHandle
|
|
922
|
-
.selectAll('line')
|
|
923
|
-
.attr('stroke', getComputedStyle(document.documentElement)
|
|
924
|
-
.getPropertyValue('--digi--global--color--neutral--grayscale--darker')
|
|
925
|
-
.trim()
|
|
926
|
-
.toLocaleLowerCase());
|
|
927
|
-
this._yAxisHandle.select('.domain').attr('display', 'none');
|
|
928
|
-
if (init)
|
|
929
|
-
this.leftSetAxis(init);
|
|
930
|
-
};
|
|
931
|
-
// Adding event listeners to the chart
|
|
932
|
-
this.addListenersToChart = () => {
|
|
933
|
-
this._Tipbox
|
|
934
|
-
.style('cursor', 'pointer')
|
|
935
|
-
.on('mousemove', this.drawTooltipLine)
|
|
936
|
-
.on('touchmove', 'ontouchstart' in window || window.navigator.maxTouchPoints
|
|
937
|
-
? this.drawTooltip
|
|
938
|
-
: null)
|
|
939
|
-
.on('mouseup', this.drawTooltip)
|
|
940
|
-
.on('mouseleave', () => {
|
|
941
|
-
this._secondaryLine.attr('display', 'none');
|
|
942
|
-
if (!this._toggled) {
|
|
943
|
-
this._TooltipLine.attr('display', 'none');
|
|
944
|
-
this._Circles.selectAll('circle').attr('display', 'none');
|
|
945
|
-
}
|
|
946
|
-
});
|
|
947
|
-
};
|
|
948
|
-
// Initialize legend
|
|
949
|
-
this.initLegend = () => {
|
|
950
|
-
const container = select(this._legendDiv);
|
|
951
|
-
select(this._legendDiv).style('width', this.dims.width + 'px');
|
|
952
|
-
container.selectAll('.chip').remove();
|
|
953
|
-
container.call(drag().on('start', this.dragStart).on('drag', this.drag));
|
|
954
|
-
container
|
|
955
|
-
.selectAll('legendChips')
|
|
956
|
-
.data(this._chartData.data.series)
|
|
957
|
-
.join('button')
|
|
958
|
-
.attr('class', 'chip')
|
|
959
|
-
.attr('type', 'button')
|
|
960
|
-
.attr('aria-pressed', false)
|
|
961
|
-
.style('padding', '0.15rem 0.75rem')
|
|
962
|
-
.style('border', '2px solid white')
|
|
963
|
-
.style('border-radius', '6px')
|
|
964
|
-
.style('display', 'flex')
|
|
965
|
-
.style('flex-direction', 'row')
|
|
966
|
-
.style('gap', '0.5rem')
|
|
967
|
-
.style('align-items', 'center')
|
|
968
|
-
.style('flex-wrap', 'nowrap')
|
|
969
|
-
.style('min-width', 'fit-content')
|
|
970
|
-
.style('height', 'calc(2rem - 2px)')
|
|
971
|
-
.style('font-size', this.fontSize)
|
|
972
|
-
.style('white-space', 'nowrap')
|
|
973
|
-
.style('box-sizing', 'border-box')
|
|
974
|
-
.style('background-color', 'white')
|
|
975
|
-
.style('cursor', 'pointer')
|
|
976
|
-
.html((d) => {
|
|
977
|
-
return '<span style="pointer-events:none;">' + d.title + '</span>';
|
|
978
|
-
})
|
|
979
|
-
.on('click', this.togglePath)
|
|
980
|
-
.on('mouseover', this.highlightPath)
|
|
981
|
-
.on('mouseleave', this.colorLines)
|
|
982
|
-
.datum((d) => d)
|
|
983
|
-
.insert('svg', 'span')
|
|
984
|
-
.attr('class', 'legendSvg')
|
|
985
|
-
.attr('pointer-events', 'none')
|
|
986
|
-
.attr('width', 32)
|
|
987
|
-
.attr('height', 28)
|
|
988
|
-
.append('line')
|
|
989
|
-
.attr('stroke', (d) => this.colorFunction(d))
|
|
990
|
-
.attr('stroke-linecap', 'round')
|
|
991
|
-
.attr('stroke-width', 6)
|
|
992
|
-
.attr('stroke-dasharray', (d, i) => this.dashFunction(d, i))
|
|
993
|
-
.attr('x1', 3)
|
|
994
|
-
.attr('x2', 29)
|
|
995
|
-
.attr('y1', '50%')
|
|
996
|
-
.attr('y2', '50%');
|
|
997
|
-
// Only if data contains many lines
|
|
998
|
-
if (this._chartData.data.series.length <= this.lineTypes)
|
|
999
|
-
return;
|
|
1000
|
-
container
|
|
1001
|
-
.selectAll('.legendSvg')
|
|
1002
|
-
.filter((...[, i]) => {
|
|
1003
|
-
return i > 2;
|
|
1004
|
-
})
|
|
1005
|
-
.append('path')
|
|
1006
|
-
.attr('d', (...[, i]) => this.symbolType(i, 110))
|
|
1007
|
-
.attr('fill', (d) => this.colorFunction(d))
|
|
1008
|
-
.attr('transform', 'translate(16,14)');
|
|
1009
|
-
};
|
|
1010
|
-
// Highlights a line
|
|
1011
|
-
this.highlightPath = (event, element) => {
|
|
1012
|
-
if (event.target.className != 'chip')
|
|
1013
|
-
return;
|
|
1014
|
-
const target = select(event.target);
|
|
1015
|
-
target.style('border', (d) => '2px solid ' + this.colorFunction(d));
|
|
1016
|
-
this._lineChartContainer
|
|
1017
|
-
.selectAll('.linePath')
|
|
1018
|
-
.transition('highlight')
|
|
1019
|
-
.duration(150)
|
|
1020
|
-
.attr('stroke', (d, i, nodelist) => {
|
|
1021
|
-
if (d.title === element.title) {
|
|
1022
|
-
select(nodelist[i]).raise();
|
|
1023
|
-
return this.colorFunction(d);
|
|
1024
|
-
}
|
|
1025
|
-
else
|
|
1026
|
-
return '#E3E3E3';
|
|
1027
|
-
});
|
|
1028
|
-
this._lineChartContainer
|
|
1029
|
-
.selectAll('.symbolGroup')
|
|
1030
|
-
.attr('fill', (d, i, nodelist) => {
|
|
1031
|
-
if (d.title === element.title) {
|
|
1032
|
-
select(nodelist[i]).raise();
|
|
1033
|
-
}
|
|
1034
|
-
});
|
|
1035
|
-
this._lineChartContainer
|
|
1036
|
-
.selectAll('.symbolGroup')
|
|
1037
|
-
.selectAll('.symbol')
|
|
1038
|
-
.transition('highlight')
|
|
1039
|
-
.duration(150)
|
|
1040
|
-
.attr('fill', (d) => {
|
|
1041
|
-
if (!d)
|
|
1042
|
-
return;
|
|
1043
|
-
if (d.title === element.title) {
|
|
1044
|
-
return this.colorFunction(d);
|
|
1045
|
-
}
|
|
1046
|
-
else
|
|
1047
|
-
return '#E3E3E3';
|
|
1048
|
-
});
|
|
1049
|
-
};
|
|
1050
|
-
// Selecting a path to view sollely from legend
|
|
1051
|
-
this.togglePath = (event) => {
|
|
1052
|
-
if (event.target.className != 'chip')
|
|
1053
|
-
return;
|
|
1054
|
-
const target = select(event.target);
|
|
1055
|
-
// Using color of text to identify what state the legend chip is in, so resetting this the last thing we do
|
|
1056
|
-
const swap = 'white' === target.style('color');
|
|
1057
|
-
target
|
|
1058
|
-
.style('border', (d) => '2px solid ' + this.colorFunction(d))
|
|
1059
|
-
.style('background-color', (d) => swap ? 'white' : this.colorFunction(d))
|
|
1060
|
-
.style('color', () => (swap ? 'black' : 'white'))
|
|
1061
|
-
.attr('aria-pressed', target.attr('aria-pressed') == 'false' ? true : false)
|
|
1062
|
-
.select('line')
|
|
1063
|
-
.attr('stroke', (d) => (swap ? this.colorFunction(d) : 'white'));
|
|
1064
|
-
target
|
|
1065
|
-
.select('path')
|
|
1066
|
-
.attr('fill', (d) => (swap ? this.colorFunction(d) : 'white'));
|
|
1067
|
-
if (swap) {
|
|
1068
|
-
this._selectedLines = this._selectedLines.filter((elem) => {
|
|
1069
|
-
return elem.title === target.datum()['title'] ? false : true;
|
|
1070
|
-
});
|
|
1071
|
-
}
|
|
1072
|
-
else {
|
|
1073
|
-
this._selectedLines.push(this._coreSeries.filter((elem) => elem.title === target.datum()['title'])[0]);
|
|
1074
|
-
}
|
|
1075
|
-
if (this._selectedLines.length < 1)
|
|
1076
|
-
this._chartData.data.series = JSON.parse(JSON.stringify(this._coreSeries));
|
|
1077
|
-
else {
|
|
1078
|
-
this._chartData.data.series.map((serie) => {
|
|
1079
|
-
const index = this._selectedLines.findIndex((selected) => {
|
|
1080
|
-
return serie.title === selected.title;
|
|
1081
|
-
});
|
|
1082
|
-
if (index != -1) {
|
|
1083
|
-
serie.yValues = this._selectedLines[index].yValues;
|
|
1084
|
-
}
|
|
1085
|
-
else {
|
|
1086
|
-
serie.yValues = [];
|
|
1087
|
-
}
|
|
1088
|
-
});
|
|
1089
|
-
}
|
|
1090
|
-
this.updateSvg();
|
|
1091
|
-
};
|
|
1092
|
-
// Coloring all lines
|
|
1093
|
-
this.colorLines = (event) => {
|
|
1094
|
-
const target = select(event.target);
|
|
1095
|
-
target.style('border', '2px solid white');
|
|
1096
|
-
this._lineChartContainer
|
|
1097
|
-
.selectAll('.linePath')
|
|
1098
|
-
.transition('highlight')
|
|
1099
|
-
.duration(150)
|
|
1100
|
-
.attr('stroke', (d) => this.colorFunction(d));
|
|
1101
|
-
this._lineChartContainer
|
|
1102
|
-
.selectAll('.symbolGroup')
|
|
1103
|
-
.selectAll('.symbol')
|
|
1104
|
-
.transition('highlight')
|
|
1105
|
-
.duration(150)
|
|
1106
|
-
.attr('fill', (d) => (d ? this.colorFunction(d) : null));
|
|
1107
|
-
};
|
|
1108
|
-
// Returns a line type given a integer value
|
|
1109
|
-
this.dashFunction = (...[, index]) => {
|
|
1110
|
-
return this._lineTypes[index % this._lineTypes.length];
|
|
1111
|
-
};
|
|
1112
|
-
// Initialize the drawing of the lines
|
|
1113
|
-
this.initLines = () => {
|
|
1114
|
-
this.defineLineAndScale();
|
|
1115
|
-
// TODO: do this data appending somewhere else
|
|
1116
|
-
this._lineChartContainer
|
|
1117
|
-
.selectAll('linePath')
|
|
1118
|
-
.data(this.reshapeData(this._chartData.data.series))
|
|
1119
|
-
.join('path')
|
|
1120
|
-
.attr('class', 'linePath')
|
|
1121
|
-
.attr('stroke', (d) => this.colorFunction(d))
|
|
1122
|
-
.attr('stroke-linecap', 'round')
|
|
1123
|
-
.attr('stroke-width', (d) => (d.length > 1 ? 4 : 6))
|
|
1124
|
-
.attr('stroke-dasharray', (d, i) => d.length > 1 ? this.dashFunction(d, i) : null)
|
|
1125
|
-
.attr('fill', 'none')
|
|
1126
|
-
.attr('d', (d) => this._LineFunc(d.line));
|
|
1127
|
-
this.addSymbols();
|
|
1128
|
-
};
|
|
1129
|
-
this.defineLineAndScale = () => {
|
|
1130
|
-
this._LineFunc = line()
|
|
1131
|
-
.defined((d) => d[1] != null && d[1] != undefined && !isNaN(d[1]))
|
|
1132
|
-
.x((d) => this._lineScale(d[0]))
|
|
1133
|
-
.y((d) => this._yAxis(d[1]));
|
|
1134
|
-
};
|
|
1135
|
-
// Modifies data object adds a line member to object, line is an array of pairs of number: [number, number][]
|
|
1136
|
-
// Line is used to feed into _LineFunc
|
|
1137
|
-
this.reshapeData = (series) => {
|
|
1138
|
-
return series.map((obj) => {
|
|
1139
|
-
obj.line = this._chartData.data.xValues.map((elem, ind) => {
|
|
1140
|
-
return [elem, obj.yValues[ind]];
|
|
1141
|
-
});
|
|
1142
|
-
obj.length = obj.yValues.filter((e) => e != null && e != undefined).length;
|
|
1143
|
-
return obj;
|
|
1144
|
-
});
|
|
1145
|
-
};
|
|
1146
|
-
// Adding symbols to lines where needed
|
|
1147
|
-
this.addSymbols = (transition = false) => {
|
|
1148
|
-
// Remove all old symbols
|
|
1149
|
-
this._lineChartContainer
|
|
1150
|
-
.selectAll('.symbolGroup')
|
|
1151
|
-
.data(this.reshapeData(this._chartData.data.series.filter((...[, index]) => index > 2)))
|
|
1152
|
-
.join((enter) => {
|
|
1153
|
-
if (!transition) {
|
|
1154
|
-
enter
|
|
1155
|
-
.append('g')
|
|
1156
|
-
.attr('class', 'symbolGroup')
|
|
1157
|
-
.selectAll('symbols')
|
|
1158
|
-
.data((d, i) => {
|
|
1159
|
-
return d.line.map((num) => {
|
|
1160
|
-
if (num[1] != null)
|
|
1161
|
-
return {
|
|
1162
|
-
val: num[1],
|
|
1163
|
-
x: num[0],
|
|
1164
|
-
title: d.title,
|
|
1165
|
-
colorToken: d.colorToken,
|
|
1166
|
-
index: i
|
|
1167
|
-
};
|
|
1168
|
-
else
|
|
1169
|
-
return null;
|
|
1170
|
-
});
|
|
1171
|
-
})
|
|
1172
|
-
.join('path')
|
|
1173
|
-
.attr('class', 'symbol')
|
|
1174
|
-
.attr('d', (d) => (d ? this.symbolType(d.index) : null))
|
|
1175
|
-
.attr('fill', (d) => (d ? this.colorFunction(d) : null))
|
|
1176
|
-
.attr('transform', (d) => d
|
|
1177
|
-
? `translate(${this._lineScale(d.x)},${this._yAxis(d.val)})`
|
|
1178
|
-
: null);
|
|
1179
|
-
}
|
|
1180
|
-
else {
|
|
1181
|
-
enter
|
|
1182
|
-
.append('g')
|
|
1183
|
-
.attr('class', 'symbolGroup')
|
|
1184
|
-
.selectAll('symbol')
|
|
1185
|
-
.data((d, i) => {
|
|
1186
|
-
return d.line.map((num) => {
|
|
1187
|
-
if (num[1] != null)
|
|
1188
|
-
return {
|
|
1189
|
-
val: num[1],
|
|
1190
|
-
x: num[0],
|
|
1191
|
-
title: d.title,
|
|
1192
|
-
colorToken: d.colorToken,
|
|
1193
|
-
index: i
|
|
1194
|
-
};
|
|
1195
|
-
else
|
|
1196
|
-
return null;
|
|
1197
|
-
});
|
|
1198
|
-
})
|
|
1199
|
-
.join('path')
|
|
1200
|
-
.attr('class', 'symbol')
|
|
1201
|
-
.attr('d', (d) => (d ? this.symbolType(d.index) : null))
|
|
1202
|
-
.attr('fill', (d) => (d ? this.colorFunction(d) : null))
|
|
1203
|
-
.attr('transform', (d) => d
|
|
1204
|
-
? `translate(${this._lineScale(d.x)},${this._yAxis(d.val)})`
|
|
1205
|
-
: null);
|
|
1206
|
-
}
|
|
1207
|
-
}, (update) => {
|
|
1208
|
-
if (!transition) {
|
|
1209
|
-
update
|
|
1210
|
-
.selectAll('.symbol')
|
|
1211
|
-
.data((d, i) => {
|
|
1212
|
-
return d.line.map((num) => {
|
|
1213
|
-
if (num[1] != null)
|
|
1214
|
-
return {
|
|
1215
|
-
val: num[1],
|
|
1216
|
-
x: num[0],
|
|
1217
|
-
title: d.title,
|
|
1218
|
-
colorToken: d.colorToken,
|
|
1219
|
-
index: i
|
|
1220
|
-
};
|
|
1221
|
-
else
|
|
1222
|
-
return null;
|
|
1223
|
-
});
|
|
1224
|
-
})
|
|
1225
|
-
.join('path')
|
|
1226
|
-
.attr('class', 'symbol')
|
|
1227
|
-
.attr('d', (d) => (d ? this.symbolType(d.index) : null))
|
|
1228
|
-
.attr('fill', (d) => (d ? this.colorFunction(d) : null))
|
|
1229
|
-
.attr('transform', (d) => d
|
|
1230
|
-
? `translate(${this._lineScale(d.x)},${this._yAxis(d.val)})`
|
|
1231
|
-
: null);
|
|
1232
|
-
}
|
|
1233
|
-
else {
|
|
1234
|
-
update
|
|
1235
|
-
.selectAll('path')
|
|
1236
|
-
.data((d, i) => {
|
|
1237
|
-
const toReturn = d.line.map((num) => {
|
|
1238
|
-
if (num[1] != null)
|
|
1239
|
-
return {
|
|
1240
|
-
val: num[1],
|
|
1241
|
-
x: num[0],
|
|
1242
|
-
title: d.title,
|
|
1243
|
-
colorToken: d.colorToken,
|
|
1244
|
-
index: i
|
|
1245
|
-
};
|
|
1246
|
-
else
|
|
1247
|
-
return null;
|
|
1248
|
-
});
|
|
1249
|
-
return toReturn.filter((e) => e);
|
|
1250
|
-
})
|
|
1251
|
-
.join((enter) => {
|
|
1252
|
-
enter
|
|
1253
|
-
.append('path')
|
|
1254
|
-
.attr('class', 'symbol')
|
|
1255
|
-
.attr('d', (d) => d ? this.symbolType(d.index) : null)
|
|
1256
|
-
.attr('fill', (d) => d ? this.colorFunction(d) : null)
|
|
1257
|
-
.attr('transform', (d) => d
|
|
1258
|
-
? `translate(${this._lineScale(d.x)},${this._yAxis(d.val)})`
|
|
1259
|
-
: null)
|
|
1260
|
-
.attr('opacity', 0)
|
|
1261
|
-
.transition()
|
|
1262
|
-
.duration(400)
|
|
1263
|
-
.ease(polyInOut)
|
|
1264
|
-
.attr('opacity', 1);
|
|
1265
|
-
}, (update) => {
|
|
1266
|
-
update
|
|
1267
|
-
.transition()
|
|
1268
|
-
.duration(400)
|
|
1269
|
-
.ease(polyInOut)
|
|
1270
|
-
.attr('d', (d) => d ? this.symbolType(d.index) : null)
|
|
1271
|
-
.attr('fill', (d) => d ? this.colorFunction(d) : null)
|
|
1272
|
-
.attr('transform', (d) => d
|
|
1273
|
-
? `translate(${this._lineScale(d.x)},${this._yAxis(d.val)})`
|
|
1274
|
-
: null);
|
|
1275
|
-
}, (exit) => exit.remove());
|
|
1276
|
-
}
|
|
1277
|
-
}, (exit) => exit.remove());
|
|
1278
|
-
};
|
|
1279
|
-
// Returns a symbol type given a index, currently we have support for 10 lines
|
|
1280
|
-
this.symbolType = (index, size) => {
|
|
1281
|
-
if (index < this.lineTypes)
|
|
1282
|
-
return Symbol()
|
|
1283
|
-
.type(circle)
|
|
1284
|
-
.size(size ? size : 90)();
|
|
1285
|
-
else if (index >= this.lineTypes && index < this.lineTypes * 2)
|
|
1286
|
-
return Symbol()
|
|
1287
|
-
.type(diamond)
|
|
1288
|
-
.size(size ? size : 90)();
|
|
1289
|
-
else
|
|
1290
|
-
return Symbol()
|
|
1291
|
-
.type(star)
|
|
1292
|
-
.size(size ? size : 90)();
|
|
1293
|
-
};
|
|
1294
|
-
// Setting dimension variable
|
|
1295
|
-
this.setDims = (onlyHeight = false) => {
|
|
1296
|
-
// Get title dimensions
|
|
1297
|
-
const tempTitle = select(this._titleDiv).node().getBoundingClientRect(), tempLegend = select(this._legendDiv).node().getBoundingClientRect();
|
|
1298
|
-
const rem = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
1299
|
-
if (!onlyHeight)
|
|
1300
|
-
this.dims = select(this._chartDiv).node().getBoundingClientRect();
|
|
1301
|
-
this.dims.height =
|
|
1302
|
-
this._maxHeight - tempLegend.height - tempTitle.height - 1.75 * rem;
|
|
1303
|
-
};
|
|
1304
|
-
// Resizing svg element and its children
|
|
1305
|
-
this.resizeSvg = () => {
|
|
1306
|
-
if (this._loading)
|
|
1307
|
-
return this.loadingResize();
|
|
1308
|
-
this.setDims();
|
|
1309
|
-
this._svg.attr('width', this.dims.width).attr('height', this.dims.height);
|
|
1310
|
-
/**** Update yAxis ****/
|
|
1311
|
-
this._yAxis.range([this.dims.height - this.margin.bottom, this.margin.top]);
|
|
1312
|
-
// Fixed number of y-axis lines
|
|
1313
|
-
this.setYTicks(true);
|
|
1314
|
-
/**** Update xAxis ****/
|
|
1315
|
-
this._xAxis.range([
|
|
1316
|
-
0,
|
|
1317
|
-
this.dims.width - this.margin.left - this.margin.right
|
|
1318
|
-
]);
|
|
1319
|
-
const ticks = Math.min(Math.max(Math.floor((this.dims.width - this.margin.left - this.margin.right) /
|
|
1320
|
-
this._tickSize) - 2, 1), this._chartData.data.xValues.length);
|
|
1321
|
-
this._xAxisHandle
|
|
1322
|
-
.attr('transform', 'translate(0,' + (this.dims.height - this.margin.bottom) + ')')
|
|
1323
|
-
.call(axisBottom(this._xAxis)
|
|
1324
|
-
.ticks(ticks)
|
|
1325
|
-
.tickPadding(this.xPadding)
|
|
1326
|
-
.tickFormat((d) => {
|
|
1327
|
-
if (this._chartData.data.xValueNames)
|
|
1328
|
-
return this._chartData.data.xValueNames[this._chartData.data.xValues.indexOf(d)];
|
|
1329
|
-
else
|
|
1330
|
-
return d;
|
|
1331
|
-
}));
|
|
1332
|
-
this._Tipbox
|
|
1333
|
-
.attr('width', this.dims.width - this.margin.left / 2)
|
|
1334
|
-
.attr('height', this.dims.height - this.margin.top - this.margin.bottom)
|
|
1335
|
-
.attr('transform', `translate(${this.margin.left / 2},${this.margin.top})`);
|
|
1336
|
-
};
|
|
1337
|
-
// resizing chart while loading
|
|
1338
|
-
this.loadingResize = () => {
|
|
1339
|
-
this.setDims();
|
|
1340
|
-
this._svg.attr('width', this.dims.width);
|
|
1341
|
-
this.setYTicks();
|
|
1342
|
-
this._xAxis.range([
|
|
1343
|
-
0,
|
|
1344
|
-
this.dims.width - this.margin.left - this.margin.right
|
|
1345
|
-
]);
|
|
1346
|
-
const ticks = Math.min(Math.floor((this.dims.width - this.margin.left - this.margin.right) /
|
|
1347
|
-
this._tickSize) - 2, this._xAxis.domain()[1]);
|
|
1348
|
-
this._xAxisHandle.call(axisBottom(this._xAxis)
|
|
1349
|
-
.ticks(ticks)
|
|
1350
|
-
.tickPadding(this.xPadding)
|
|
1351
|
-
.tickFormat((d) => {
|
|
1352
|
-
if (this._chartData.data && this._chartData.data.xValueNames)
|
|
1353
|
-
return this._chartData.data.xValueNames[this._chartData.data.xValues.indexOf(d)];
|
|
1354
|
-
else
|
|
1355
|
-
return d;
|
|
1356
|
-
}));
|
|
1357
|
-
this._lineScale.range([
|
|
1358
|
-
0,
|
|
1359
|
-
this.dims.width - this.margin.left - this.margin.right
|
|
1360
|
-
]);
|
|
1361
|
-
const LineFunc = line()
|
|
1362
|
-
.defined((d) => d[1] != null)
|
|
1363
|
-
.x((d) => this._lineScale(d[0]))
|
|
1364
|
-
.y((d) => this._yAxis(d[1]))
|
|
1365
|
-
.curve(basis);
|
|
1366
|
-
this._lineChartContainer
|
|
1367
|
-
.selectAll('.linePath')
|
|
1368
|
-
.attr('d', (d) => LineFunc(d));
|
|
1369
|
-
};
|
|
1370
|
-
this.resizeLines = () => {
|
|
1371
|
-
if (this._loading)
|
|
1372
|
-
return;
|
|
1373
|
-
this._lineScale.range([
|
|
1374
|
-
0,
|
|
1375
|
-
this.dims.width - this.margin.left - this.margin.right
|
|
1376
|
-
]);
|
|
1377
|
-
this.defineLineAndScale();
|
|
1378
|
-
this._lineChartContainer
|
|
1379
|
-
.selectAll('.linePath')
|
|
1380
|
-
.attr('stroke', (d) => this.colorFunction(d))
|
|
1381
|
-
.attr('d', (d) => this._LineFunc(d.line));
|
|
1382
|
-
this._lineChartContainer
|
|
1383
|
-
.selectAll('.symbolGroup')
|
|
1384
|
-
.selectAll('.symbol')
|
|
1385
|
-
.attr('transform', (d, i) => d
|
|
1386
|
-
? `translate(${this._lineScale(this._chartData.data.xValues[i])},${this._yAxis(d.val)})`
|
|
1387
|
-
: null);
|
|
1388
|
-
};
|
|
1389
|
-
this.colorFunction = (properties) => {
|
|
1390
|
-
return properties.colorToken
|
|
1391
|
-
? getComputedStyle(document.documentElement)
|
|
1392
|
-
.getPropertyValue(properties.colorToken)
|
|
1393
|
-
.trim()
|
|
1394
|
-
.toLocaleLowerCase()
|
|
1395
|
-
: this._Color(properties.title);
|
|
1396
|
-
};
|
|
1397
|
-
this.drawTooltipLine = (event) => {
|
|
1398
|
-
if (this._toggled)
|
|
1399
|
-
return this.drawDottedLine(event);
|
|
1400
|
-
this.drawMainLineAndCircles(event);
|
|
1401
|
-
};
|
|
1402
|
-
this.closeTooltip = () => {
|
|
1403
|
-
this._toggled = false;
|
|
1404
|
-
this._tooltip.style('display', 'none');
|
|
1405
|
-
this._secondaryLine.attr('display', 'none');
|
|
1406
|
-
this._TooltipLine.attr('display', 'none');
|
|
1407
|
-
this._Circles.selectAll('circle').attr('display', 'none');
|
|
1408
|
-
this._Circles
|
|
1409
|
-
.selectAll('circle')
|
|
1410
|
-
.attr('fill', 'white')
|
|
1411
|
-
.attr('stroke', (d) => this.colorFunction(d));
|
|
1412
|
-
this._svg.select('.tooltipPointer').remove();
|
|
1413
|
-
};
|
|
1414
|
-
this.drawDottedLine = (event) => {
|
|
1415
|
-
this._hoverPoint = this.closest(Math.round(this._lineScale.invert(pointer(event, this._Tipbox.node())[0] - this.margin.left / 2)));
|
|
1416
|
-
if (this._hoverPoint === this._tooltipPoint)
|
|
1417
|
-
return this._secondaryLine.attr('display', 'none');
|
|
1418
|
-
this._secondaryLine
|
|
1419
|
-
.attr('display', null)
|
|
1420
|
-
.attr('stroke', 'gray')
|
|
1421
|
-
.attr('stroke-dasharray', 4)
|
|
1422
|
-
.attr('x1', this._xAxis(this._hoverPoint.toString()) + this.margin.left)
|
|
1423
|
-
.attr('x2', this._xAxis(this._hoverPoint.toString()) + this.margin.left)
|
|
1424
|
-
.attr('y1', this._yAxis(this._maxVal))
|
|
1425
|
-
.attr('y2', this.dims.height - this.margin.bottom)
|
|
1426
|
-
.style('pointer-events', 'none');
|
|
1427
|
-
};
|
|
1428
|
-
this.drawMainLineAndCircles = (event) => {
|
|
1429
|
-
this._hoverPoint = this.touchPosition(event);
|
|
1430
|
-
const stringPoint = this._hoverPoint.toString();
|
|
1431
|
-
this._TooltipLine
|
|
1432
|
-
.attr('display', null)
|
|
1433
|
-
.attr('stroke', 'gray')
|
|
1434
|
-
.attr('x1', this._xAxis(stringPoint) + this.margin.left)
|
|
1435
|
-
.attr('x2', this._xAxis(stringPoint) + this.margin.left)
|
|
1436
|
-
.attr('y1', this._yAxis(this._maxVal))
|
|
1437
|
-
.attr('y2', this.dims.height - this.margin.bottom)
|
|
1438
|
-
.style('pointer-events', 'none');
|
|
1439
|
-
this._Circles
|
|
1440
|
-
.selectAll('circle')
|
|
1441
|
-
.attr('display', null)
|
|
1442
|
-
.attr('pointer-events', 'none');
|
|
1443
|
-
this.positionCircles(stringPoint);
|
|
1444
|
-
};
|
|
1445
|
-
// Returns the position/index to draw tooltip/tooltip line
|
|
1446
|
-
this.touchPosition = (event) => {
|
|
1447
|
-
if (event.type === 'touchmove') {
|
|
1448
|
-
event.preventDefault();
|
|
1449
|
-
return this.closest(Math.round(this._lineScale.invert(pointer(event.touches[0], this._Tipbox.node())[0] -
|
|
1450
|
-
this.margin.left / 2)));
|
|
1451
|
-
}
|
|
1452
|
-
else {
|
|
1453
|
-
return this.closest(Math.round(this._lineScale.invert(pointer(event, this._Tipbox.node())[0] - this.margin.left / 2)));
|
|
1454
|
-
}
|
|
1455
|
-
};
|
|
1456
|
-
// Function for drawing tooltip
|
|
1457
|
-
this.drawTooltip = (event) => {
|
|
1458
|
-
this.drawMainLineAndCircles(event);
|
|
1459
|
-
this._toggled = true;
|
|
1460
|
-
this._tooltipPoint = this.touchPosition(event);
|
|
1461
|
-
this._tooltipDataIndex = this._chartData.data.xValues.indexOf(this._tooltipPoint);
|
|
1462
|
-
// Heading
|
|
1463
|
-
this._tooltip.style('display', 'flex');
|
|
1464
|
-
const tooltipBody = this._tooltip.select('.tooltipBody');
|
|
1465
|
-
tooltipBody
|
|
1466
|
-
.select(this._tooltipHeading)
|
|
1467
|
-
.style('margin', '0 0.75rem 0 0 ')
|
|
1468
|
-
.html(() => {
|
|
1469
|
-
if (this._chartData.data.xValueNames)
|
|
1470
|
-
return this._chartData.data.xValueNames[this._chartData.data.xValues.indexOf(this._tooltipPoint)];
|
|
1471
|
-
return this._tooltipPoint;
|
|
1472
|
-
});
|
|
1473
|
-
// Body
|
|
1474
|
-
tooltipBody
|
|
1475
|
-
.selectAll('div')
|
|
1476
|
-
.data(this._chartData.data.series)
|
|
1477
|
-
.join('div')
|
|
1478
|
-
.style('display', 'flex')
|
|
1479
|
-
.style('flex-direction', 'row')
|
|
1480
|
-
.style('flex-wrap', 'nowrap')
|
|
1481
|
-
.style('white-space', 'nowrap')
|
|
1482
|
-
.style('justify-content', 'space-between')
|
|
1483
|
-
.html((d) => {
|
|
1484
|
-
return d.yValues[this._tooltipDataIndex] != null
|
|
1485
|
-
? '<span>' +
|
|
1486
|
-
d.title +
|
|
1487
|
-
'</span><span style="margin-left:0.75rem;">' +
|
|
1488
|
-
formatLocale(this.axisNumberFormat).format(this.formatStyle)(d.yValues[this._tooltipDataIndex]) +
|
|
1489
|
-
'</span>'
|
|
1490
|
-
: null;
|
|
1491
|
-
});
|
|
1492
|
-
this.positionTooltipWithinBounds(this._xAxis(this._tooltipPoint.toString()) + this.margin.left);
|
|
1493
|
-
this._Circles
|
|
1494
|
-
.selectAll('circle')
|
|
1495
|
-
.attr('fill', (d) => this.colorFunction(d))
|
|
1496
|
-
.attr('stroke', 'white');
|
|
1497
|
-
this._svg.select('.tooltipPointer').remove();
|
|
1498
|
-
const sym = Symbol().type(triangle).size(60);
|
|
1499
|
-
this._svg
|
|
1500
|
-
.append('path')
|
|
1501
|
-
.attr('d', sym)
|
|
1502
|
-
.attr('class', 'tooltipPointer')
|
|
1503
|
-
.attr('fill', 'rgba(10, 10, 10, 0.90)')
|
|
1504
|
-
.style('filter', 'drop-shadow(gray 0px -1px 1px)')
|
|
1505
|
-
.attr('transform', `translate(${this._xAxis(this._tooltipPoint.toString()) + this.margin.left},${this._yAxis(this._maxVal) - 7}) rotate(180) scale(1.5,1.0)`);
|
|
1506
|
-
};
|
|
1507
|
-
this.initYAxis = (empty) => {
|
|
1508
|
-
// Y Axis
|
|
1509
|
-
this._yAxis = linear()
|
|
1510
|
-
.domain([0, empty ? 10 : this._maxVal])
|
|
1511
|
-
.nice(3)
|
|
1512
|
-
.range([this.dims.height - this.margin.bottom, this.margin.top]);
|
|
1513
|
-
// The magic number is just needed in initialization, because getting the exact size is impossible during the initialization
|
|
1514
|
-
this.margin.left =
|
|
1515
|
-
this.getTextSize(formatLocale(this.axisNumberFormat).format(this.formatStyle)(this._yAxis.domain()[1])) +
|
|
1516
|
-
this.yPadding +
|
|
1517
|
-
3;
|
|
1518
|
-
this._lineChartContainer = this._svg
|
|
1519
|
-
.append('g')
|
|
1520
|
-
.attr('transform', `translate(${this.margin.left},0)`);
|
|
1521
|
-
this._yAxisHandle = this._lineChartContainer
|
|
1522
|
-
.append('g')
|
|
1523
|
-
.attr('class', 'yAxis');
|
|
1524
|
-
this.setYTicks(true);
|
|
1525
|
-
};
|
|
1526
|
-
this.initXAxis = (empty) => {
|
|
1527
|
-
this._lineChartContainer.select('.xAxis').remove();
|
|
1528
|
-
// X axis
|
|
1529
|
-
if (!empty) {
|
|
1530
|
-
if (this._chartData.data.xValueNames)
|
|
1531
|
-
this.margin.right =
|
|
1532
|
-
this.getTextSize(this._chartData.data.xValueNames[this._chartData.data.xValueNames.length - 1]) /
|
|
1533
|
-
2 +
|
|
1534
|
-
1;
|
|
1535
|
-
else
|
|
1536
|
-
this.margin.right =
|
|
1537
|
-
this.getTextSize(max(this._chartData.data.xValues).toString()) /
|
|
1538
|
-
2 +
|
|
1539
|
-
1;
|
|
1540
|
-
}
|
|
1541
|
-
this._xAxis = linear()
|
|
1542
|
-
.domain([
|
|
1543
|
-
empty ? 1 : min(this._chartData.data.xValues),
|
|
1544
|
-
empty ? 10 : max(this._chartData.data.xValues)
|
|
1545
|
-
]) // This is the min and the max of the data
|
|
1546
|
-
.range([0, this.dims.width - this.margin.left - this.margin.right]);
|
|
1547
|
-
this._lineScale = linear()
|
|
1548
|
-
.domain([
|
|
1549
|
-
empty ? 1 : min(this._chartData.data.xValues),
|
|
1550
|
-
empty ? 10 : max(this._chartData.data.xValues)
|
|
1551
|
-
]) // This is the min and the max of the data
|
|
1552
|
-
.range([0, this.dims.width - this.margin.left - this.margin.right]);
|
|
1553
|
-
const ticks = Math.min(Math.max(Math.floor((this.dims.width - this.margin.left - this.margin.right) /
|
|
1554
|
-
this._tickSize) - 2, 2), empty ? 10 : this._chartData.data.xValues.length);
|
|
1555
|
-
this._xAxisHandle = this._lineChartContainer
|
|
1556
|
-
.append('g')
|
|
1557
|
-
.attr('transform', 'translate(0,' + (this.dims.height - this.margin.bottom) + ')')
|
|
1558
|
-
.attr('class', 'xAxis')
|
|
1559
|
-
.style('font-size', this.fontSize)
|
|
1560
|
-
.call(axisBottom(this._xAxis)
|
|
1561
|
-
.ticks(ticks)
|
|
1562
|
-
.tickSize(this.xTickSize)
|
|
1563
|
-
.tickPadding(this.xPadding)
|
|
1564
|
-
.tickFormat((d) => {
|
|
1565
|
-
if (!empty && this._chartData.data.xValueNames)
|
|
1566
|
-
return this._chartData.data.xValueNames[this._chartData.data.xValues.indexOf(d)];
|
|
1567
|
-
else
|
|
1568
|
-
return d;
|
|
1569
|
-
}));
|
|
1570
|
-
// Removing the domain
|
|
1571
|
-
this._xAxisHandle.select('.domain').attr('display', 'none');
|
|
1572
|
-
this._xAxisHandle
|
|
1573
|
-
.selectAll('line')
|
|
1574
|
-
.attr('stroke-linecap', 'round')
|
|
1575
|
-
.attr('stroke', getComputedStyle(document.documentElement)
|
|
1576
|
-
.getPropertyValue('--digi--global--color--neutral--grayscale--darkest-3')
|
|
1577
|
-
.trim()
|
|
1578
|
-
.toLocaleLowerCase());
|
|
1579
|
-
};
|
|
1580
|
-
this.positionCircles = (point, transition) => {
|
|
1581
|
-
if (transition) {
|
|
1582
|
-
this._Circles
|
|
1583
|
-
.selectAll('circle')
|
|
1584
|
-
.transition('positioncircles')
|
|
1585
|
-
.duration(transition)
|
|
1586
|
-
.attr('cx', () => {
|
|
1587
|
-
return this._xAxis(point) + this.margin.left;
|
|
1588
|
-
})
|
|
1589
|
-
.attr('cy', (d, i, circleList) => {
|
|
1590
|
-
const selData = d.yValues[this._chartData.data.xValues.indexOf(parseInt(point))];
|
|
1591
|
-
if (this._yAxis(selData))
|
|
1592
|
-
return this._yAxis(selData);
|
|
1593
|
-
else {
|
|
1594
|
-
select(circleList[i]).attr('display', 'none');
|
|
1595
|
-
return null;
|
|
1596
|
-
}
|
|
1597
|
-
});
|
|
1598
|
-
}
|
|
1599
|
-
else {
|
|
1600
|
-
this._Circles
|
|
1601
|
-
.selectAll('circle')
|
|
1602
|
-
.attr('cx', () => {
|
|
1603
|
-
return this._xAxis(point) + this.margin.left;
|
|
1604
|
-
})
|
|
1605
|
-
.attr('cy', (d, i, circleList) => {
|
|
1606
|
-
const selData = d.yValues[this._chartData.data.xValues.indexOf(parseInt(point))];
|
|
1607
|
-
if (this._yAxis(selData))
|
|
1608
|
-
return this._yAxis(selData);
|
|
1609
|
-
else {
|
|
1610
|
-
select(circleList[i]).attr('display', 'none');
|
|
1611
|
-
return null;
|
|
1612
|
-
}
|
|
1613
|
-
});
|
|
1614
|
-
}
|
|
1615
|
-
};
|
|
1616
|
-
this.repositionTooltip = () => {
|
|
1617
|
-
if (!this._toggled)
|
|
1618
|
-
return;
|
|
1619
|
-
const stringPoint = this._chartData.data.xValues[this._tooltipDataIndex].toString();
|
|
1620
|
-
this._TooltipLine
|
|
1621
|
-
.attr('stroke', 'gray')
|
|
1622
|
-
.attr('x1', this._xAxis(stringPoint) + this.margin.left)
|
|
1623
|
-
.attr('x2', this._xAxis(stringPoint) + this.margin.left)
|
|
1624
|
-
.attr('y1', this._yAxis(this._maxVal))
|
|
1625
|
-
.attr('y2', this.dims.height - this.margin.bottom);
|
|
1626
|
-
this.positionTooltipWithinBounds(this._xAxis(stringPoint) + this.margin.left);
|
|
1627
|
-
this._svg
|
|
1628
|
-
.select('.tooltipPointer')
|
|
1629
|
-
.attr('transform', `translate(${this._xAxis(this._tooltipPoint.toString()) + this.margin.left},${this._yAxis(this._maxVal) - 7}) rotate(180) scale(1.5,1.0)`);
|
|
1630
|
-
this.positionCircles(stringPoint);
|
|
1631
|
-
};
|
|
1632
|
-
// Checks if tooltip bounding box is outside svg width, if so, moves tooltip within svg bounds
|
|
1633
|
-
this.positionTooltipWithinBounds = (pos, transitionTimer) => {
|
|
1634
|
-
this._tooltip.style('transform', () => {
|
|
1635
|
-
// We reset the position of the tooltip, and adjust for the maximum value, -1px for it to align perfectly
|
|
1636
|
-
return `translateY(${this._yAxis(this._maxVal) - this._tooltip.node().getBoundingClientRect().height - 9}px)`;
|
|
1637
|
-
});
|
|
1638
|
-
const rect = this._chartDiv.getBoundingClientRect();
|
|
1639
|
-
const comparativePosition = pos + rect.left;
|
|
1640
|
-
const tooltipWidth = this._tooltip.node().getBoundingClientRect().width / 2;
|
|
1641
|
-
if (rect.left < comparativePosition - tooltipWidth &&
|
|
1642
|
-
rect.right > comparativePosition + tooltipWidth) {
|
|
1643
|
-
this._tooltip.style('left', pos - tooltipWidth + 'px');
|
|
1644
|
-
}
|
|
1645
|
-
else if (rect.right < comparativePosition + tooltipWidth) {
|
|
1646
|
-
this._tooltip.style('left', pos -
|
|
1647
|
-
this._tooltip.node().getBoundingClientRect().width +
|
|
1648
|
-
Math.max(this.margin.right, 10) +
|
|
1649
|
-
'px');
|
|
1650
|
-
}
|
|
1651
|
-
else if (rect.left > comparativePosition - tooltipWidth) {
|
|
1652
|
-
if (transitionTimer)
|
|
1653
|
-
this._tooltip
|
|
1654
|
-
.transition('moveTooltip')
|
|
1655
|
-
.duration(transitionTimer)
|
|
1656
|
-
.ease(polyInOut)
|
|
1657
|
-
.style('left', pos - this.margin.left + 'px');
|
|
1658
|
-
else
|
|
1659
|
-
this._tooltip.style('left', pos - this.margin.left + 'px');
|
|
1660
|
-
}
|
|
1661
|
-
else {
|
|
1662
|
-
this._tooltip.style('left', pos -
|
|
1663
|
-
document.getElementById(this.afId).getBoundingClientRect().width / 2 +
|
|
1664
|
-
'px');
|
|
208
|
+
async handleToggle() {
|
|
209
|
+
if (this.visible) {
|
|
210
|
+
this.hideMenu();
|
|
211
|
+
this.focusOnButton();
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
this.showMenu();
|
|
215
|
+
if (!this.isLink()) {
|
|
216
|
+
const idx = this.activeItemIdx || 0;
|
|
217
|
+
const item = this.afMenuItems[idx];
|
|
218
|
+
setTimeout(() => this.itemRefs[item.id].focus(), 25);
|
|
1665
219
|
}
|
|
1666
|
-
}
|
|
1667
|
-
this.mapColorToLine = () => {
|
|
1668
|
-
// list of group names
|
|
1669
|
-
this._Color = ordinal()
|
|
1670
|
-
.domain(this._chartData.data.series.map(function (d) {
|
|
1671
|
-
return d.title;
|
|
1672
|
-
}))
|
|
1673
|
-
.range([
|
|
1674
|
-
'#00005a',
|
|
1675
|
-
'#D43372',
|
|
1676
|
-
'#058470',
|
|
1677
|
-
'#0058A3',
|
|
1678
|
-
'#556D22',
|
|
1679
|
-
'#1616B2',
|
|
1680
|
-
'#AA295B',
|
|
1681
|
-
'#035548'
|
|
1682
|
-
]);
|
|
1683
|
-
};
|
|
1684
|
-
this.computeMaxVal = () => {
|
|
1685
|
-
// Compute max value from datasets
|
|
1686
|
-
this._maxVal = parseFloat(max(this._chartData.data.series, (d) => max(d['yValues'])));
|
|
1687
|
-
};
|
|
1688
|
-
// Updates number format if specified to be in percentage
|
|
1689
|
-
this.checkPercentage = () => {
|
|
1690
|
-
if (this._chartData.meta && this._chartData.meta.percentage)
|
|
1691
|
-
this.formatStyle = '.1%';
|
|
1692
|
-
else
|
|
1693
|
-
this.formatStyle = ',d';
|
|
1694
|
-
};
|
|
1695
|
-
this.closest = (target) => {
|
|
1696
|
-
return this._chartData.data.xValues.reduce(function (prev, curr) {
|
|
1697
|
-
return Math.abs(curr - target) < Math.abs(prev - target) ? curr : prev;
|
|
1698
|
-
});
|
|
1699
|
-
};
|
|
1700
|
-
// Removes resize observer for chart and inits table
|
|
1701
|
-
this.activateTable = (event) => {
|
|
1702
|
-
this.closeTooltip();
|
|
1703
|
-
this.lineChartObserver.disconnect();
|
|
1704
|
-
this.tableObserver.observe(this._chartDiv);
|
|
1705
|
-
this._status.innerHTML = '<p>Visas som tabell</p>';
|
|
1706
|
-
select(this._host).select('.tableButton').style('display', 'none');
|
|
1707
|
-
select(this._host).select('.chartButton').style('display', null);
|
|
1708
|
-
event.target.nextSibling.lastChild.focus();
|
|
1709
|
-
const duration = 150;
|
|
1710
|
-
this._svg
|
|
1711
|
-
.attr('opacity', 1)
|
|
1712
|
-
.transition('fadeout')
|
|
1713
|
-
.duration(duration)
|
|
1714
|
-
.attr('opacity', 0)
|
|
1715
|
-
.on('end', () => {
|
|
1716
|
-
this._svg.remove();
|
|
1717
|
-
this._legendDiv.style['display'] = 'none';
|
|
1718
|
-
this._tableDiv.style['display'] = 'block';
|
|
1719
|
-
this.setTableContent();
|
|
1720
|
-
this.setTableDimensions();
|
|
1721
|
-
select(this._tableDiv)
|
|
1722
|
-
.style('opacity', 0)
|
|
1723
|
-
.transition('fadein')
|
|
1724
|
-
.duration(duration)
|
|
1725
|
-
.style('opacity', 1);
|
|
1726
|
-
});
|
|
1727
|
-
select(this._legendDiv)
|
|
1728
|
-
.style('opacity', 1)
|
|
1729
|
-
.transition('fadeout')
|
|
1730
|
-
.duration(duration)
|
|
1731
|
-
.style('opacity', 0);
|
|
1732
|
-
};
|
|
1733
|
-
// Resize table
|
|
1734
|
-
this.resizeTable = () => {
|
|
1735
|
-
this.setDims();
|
|
1736
|
-
this.setTableDimensions();
|
|
1737
|
-
};
|
|
1738
|
-
// Removes observer and calls init functions for line chart
|
|
1739
|
-
this.reInitChart = (event) => {
|
|
1740
|
-
this.tableObserver.disconnect();
|
|
1741
|
-
this._status.innerHTML = '<p>Visas som diagram</p>';
|
|
1742
|
-
select(this._host).select('.tableButton').style('display', null);
|
|
1743
|
-
select(this._host).select('.chartButton').style('display', 'none');
|
|
1744
|
-
event.target.previousSibling.lastChild.focus();
|
|
1745
|
-
const table = select(this._tableDiv);
|
|
1746
|
-
table
|
|
1747
|
-
.style('opacity', 1)
|
|
1748
|
-
.transition()
|
|
1749
|
-
.duration(150)
|
|
1750
|
-
.style('opacity', 0)
|
|
1751
|
-
.on('end', () => {
|
|
1752
|
-
table.style('display', 'none');
|
|
1753
|
-
this.initSvg();
|
|
1754
|
-
this.initLines();
|
|
1755
|
-
this._svg
|
|
1756
|
-
.attr('opacity', 0)
|
|
1757
|
-
.transition()
|
|
1758
|
-
.duration(150)
|
|
1759
|
-
.attr('opacity', 1);
|
|
1760
|
-
select(this._legendDiv)
|
|
1761
|
-
.style('display', null)
|
|
1762
|
-
.style('opacity', 0)
|
|
1763
|
-
.transition()
|
|
1764
|
-
.duration(150)
|
|
1765
|
-
.style('opacity', 1);
|
|
1766
|
-
});
|
|
1767
|
-
};
|
|
1768
|
-
this.afHeadingLevel = undefined;
|
|
1769
|
-
this.afId = randomIdGenerator('tooltip');
|
|
1770
|
-
this.afChartData = undefined;
|
|
220
|
+
}
|
|
1771
221
|
}
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
222
|
+
async focusOnButton() {
|
|
223
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
224
|
+
// @ts-expect-error
|
|
225
|
+
const digiButton = this.buttonRef;
|
|
226
|
+
const button = (await digiButton.afMGetButtonElement());
|
|
227
|
+
button.focus();
|
|
228
|
+
}
|
|
229
|
+
handleChangeItem(item, idx) {
|
|
230
|
+
this.activeItemIdx = idx;
|
|
231
|
+
this.handleToggle();
|
|
232
|
+
this.afChangeItem.emit({ item, idx });
|
|
233
|
+
}
|
|
234
|
+
handleRef(ref, refId, payload) {
|
|
235
|
+
if (refId === 'item') {
|
|
236
|
+
this.itemRefs[payload.id] = ref;
|
|
1777
237
|
}
|
|
1778
|
-
this._chartData = JSON.parse(data);
|
|
1779
|
-
// Making deep copy of this
|
|
1780
|
-
if (this._chartData.data)
|
|
1781
|
-
this._coreSeries = JSON.parse(JSON.stringify(this._chartData.data.series));
|
|
1782
238
|
}
|
|
1783
|
-
|
|
1784
|
-
this.
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
Number(this.fontSize.replace(/[^\d.]|\.(?=.*\.)/g, '')) +
|
|
1790
|
-
this.xPadding +
|
|
1791
|
-
this.xTickSize;
|
|
1792
|
-
this.lineChartObserver.observe(this._chartDiv);
|
|
1793
|
-
select(this._chartDiv).select('svg').remove();
|
|
1794
|
-
// Initialize an empty div, that we can place info in for tooltip
|
|
1795
|
-
// Styling for tooltip is in .scss file
|
|
1796
|
-
this._tooltip = select('#' + this.afId);
|
|
1797
|
-
this._tooltip.select('.close').on('click', this.closeTooltip);
|
|
1798
|
-
this._tooltipHeading =
|
|
1799
|
-
'h' + (parseInt(this.afHeadingLevel.replace(/\D/g, '')) + 1);
|
|
1800
|
-
// Add heading placeholder for heading
|
|
1801
|
-
this._tooltip
|
|
1802
|
-
.selectAll('.tooltipBody')
|
|
1803
|
-
.append(this._tooltipHeading) // increment heading level by one
|
|
1804
|
-
.style('margin', '0 0.75rem')
|
|
1805
|
-
.style('font-weight', '500');
|
|
1806
|
-
this._maxHeight = select(this._host)
|
|
1807
|
-
.node()
|
|
1808
|
-
.parentNode.getBoundingClientRect().height;
|
|
1809
|
-
this.setDims();
|
|
1810
|
-
this.setTickSize();
|
|
1811
|
-
this.checkPercentage();
|
|
1812
|
-
select(this._chartDiv).attr('height', this.dims.height + 'px');
|
|
1813
|
-
// Appending svg
|
|
1814
|
-
this._svg = select(this._chartDiv)
|
|
1815
|
-
.append('svg')
|
|
1816
|
-
.attr('aria-hidden', true)
|
|
1817
|
-
.attr('role', 'img')
|
|
1818
|
-
.attr('aria-label', this._chartData && this._chartData.title
|
|
1819
|
-
? 'Linjediagram om ' + this._chartData.title.toLowerCase()
|
|
1820
|
-
: 'Linjediagram');
|
|
1821
|
-
this._svg.attr('width', this.dims.width).attr('height', this.dims.height);
|
|
1822
|
-
this.mapColorToLine();
|
|
1823
|
-
this._TooltipLine = this._svg
|
|
1824
|
-
.append('line')
|
|
1825
|
-
.attr('id', 'toolTipLine' + this.afId);
|
|
1826
|
-
this._secondaryLine = this._svg
|
|
1827
|
-
.append('line')
|
|
1828
|
-
.attr('id', 'secondaryLine' + this.afId);
|
|
1829
|
-
this.computeMaxVal();
|
|
1830
|
-
this.initYAxis();
|
|
1831
|
-
this.initXAxis();
|
|
1832
|
-
this._Tipbox = this._svg
|
|
1833
|
-
.append('rect')
|
|
1834
|
-
.attr('class', 'svgRect')
|
|
1835
|
-
.attr('width', this.dims.width - this.margin.left / 2)
|
|
1836
|
-
.attr('height', this.dims.height - this.margin.top - this.margin.bottom)
|
|
1837
|
-
.attr('opacity', 0)
|
|
1838
|
-
.attr('transform', `translate(${this.margin.left / 2},0)`);
|
|
1839
|
-
this.addListenersToChart();
|
|
1840
|
-
this._Circles = this._svg
|
|
1841
|
-
.append('g')
|
|
1842
|
-
.attr('class', 'circleGroup')
|
|
1843
|
-
.on('mousemove', this.drawTooltipLine);
|
|
1844
|
-
this._Circles
|
|
1845
|
-
.selectAll('circle')
|
|
1846
|
-
.data(this._chartData.data.series)
|
|
1847
|
-
.join('circle')
|
|
1848
|
-
.attr('stroke', (d) => this.colorFunction(d))
|
|
1849
|
-
.attr('fill', 'white')
|
|
1850
|
-
.attr('stroke-width', '1px')
|
|
1851
|
-
.attr('r', 7)
|
|
1852
|
-
.attr('display', 'none');
|
|
1853
|
-
select(window).on('resize.' + this.afId, this.repositionTooltip);
|
|
239
|
+
isActive(idx) {
|
|
240
|
+
if ((this.activeItemIdx !== undefined || this.activeItemIdx !== null) &&
|
|
241
|
+
this.activeItemIdx === idx) {
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
return false;
|
|
1854
245
|
}
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
this.margin.bottom =
|
|
1858
|
-
Number(window
|
|
1859
|
-
.getComputedStyle(document.body)
|
|
1860
|
-
.getPropertyValue('font-size')
|
|
1861
|
-
.match(/\d+/)[0]) *
|
|
1862
|
-
Number(this.fontSize.replace(/[^\d.]|\.(?=.*\.)/g, '')) +
|
|
1863
|
-
this.xPadding +
|
|
1864
|
-
this.xTickSize;
|
|
1865
|
-
select(this._chartDiv).select('svg').remove();
|
|
1866
|
-
// Initialize an empty div, that we can place info in for tooltip
|
|
1867
|
-
// Styling for tooltip is in .scss file
|
|
1868
|
-
this._tooltip = select('#' + this.afId);
|
|
1869
|
-
select('digi-icon-x').on('click', this.closeTooltip);
|
|
1870
|
-
this._tooltipHeading =
|
|
1871
|
-
'h' + (parseInt(this.afHeadingLevel.replace(/\D/g, '')) + 1);
|
|
1872
|
-
// Add heading placeholder for heading
|
|
1873
|
-
this._tooltip
|
|
1874
|
-
.selectAll('.tooltipBody')
|
|
1875
|
-
.append(this._tooltipHeading) // increment heading level by one
|
|
1876
|
-
.style('margin', '0 0.75rem')
|
|
1877
|
-
.style('font-weight', '500');
|
|
1878
|
-
this._maxHeight = select(this._host)
|
|
1879
|
-
.node()
|
|
1880
|
-
.parentNode.getBoundingClientRect().height;
|
|
1881
|
-
this.setDims();
|
|
1882
|
-
select(this._chartDiv).attr('height', this.dims.height + 'px');
|
|
1883
|
-
this._svg = select(this._chartDiv)
|
|
1884
|
-
.append('svg')
|
|
1885
|
-
.attr('aria-hidden', true);
|
|
1886
|
-
this._svg.attr('width', this.dims.width).attr('height', this.dims.height);
|
|
1887
|
-
this._TooltipLine = this._svg
|
|
1888
|
-
.append('line')
|
|
1889
|
-
.attr('id', 'toolTipLine' + this.afId);
|
|
1890
|
-
this._secondaryLine = this._svg
|
|
1891
|
-
.append('line')
|
|
1892
|
-
.attr('id', 'secondaryLine' + this.afId);
|
|
1893
|
-
this.initYAxis(true);
|
|
1894
|
-
this.initXAxis(true);
|
|
1895
|
-
this._Tipbox = this._svg
|
|
1896
|
-
.append('rect')
|
|
1897
|
-
.attr('class', 'svgRect')
|
|
1898
|
-
.attr('width', this.dims.width - this.margin.left / 2)
|
|
1899
|
-
.attr('height', this.dims.height - this.margin.top - this.margin.bottom)
|
|
1900
|
-
.attr('opacity', 0)
|
|
1901
|
-
.attr('transform', `translate(${this.margin.left / 2},0)`);
|
|
1902
|
-
this._Circles = this._svg
|
|
1903
|
-
.append('g')
|
|
1904
|
-
.attr('class', 'circleGroup')
|
|
1905
|
-
.on('mousemove', this.drawTooltipLine);
|
|
1906
|
-
this.defineLineAndScale();
|
|
1907
|
-
this.lineChartObserver.observe(this._chartDiv);
|
|
1908
|
-
this.loadingState(true);
|
|
246
|
+
isSelected(idx) {
|
|
247
|
+
return this.selectItemIdx === idx;
|
|
1909
248
|
}
|
|
1910
|
-
|
|
1911
|
-
this.
|
|
1912
|
-
|
|
1913
|
-
const duration = 400;
|
|
1914
|
-
const LineFunc = line()
|
|
1915
|
-
.defined((d) => d[1] != null)
|
|
1916
|
-
.x((d) => this._lineScale(d[0]))
|
|
1917
|
-
.y((d) => this._yAxis(d[1]))
|
|
1918
|
-
.curve(basis);
|
|
1919
|
-
// close potentially open tooltip
|
|
1920
|
-
this.closeTooltip();
|
|
1921
|
-
// Remove hover listeners from chart
|
|
1922
|
-
this._Tipbox
|
|
1923
|
-
.style('cursor', 'wait')
|
|
1924
|
-
.on('mousemove', null)
|
|
1925
|
-
.on('touchmove', null)
|
|
1926
|
-
.on('mouseup', null)
|
|
1927
|
-
.on('mouseleave', null);
|
|
1928
|
-
select(this._titleDiv)
|
|
1929
|
-
.select(this.afHeadingLevel)
|
|
1930
|
-
.html(`${_t.loading}...`);
|
|
1931
|
-
const height = select(this._titleDiv).style('height');
|
|
1932
|
-
select(this._titleDiv)
|
|
1933
|
-
.style('height', this._prevHeight)
|
|
1934
|
-
.transition('adjust')
|
|
1935
|
-
.duration(400)
|
|
1936
|
-
.style('height', height)
|
|
1937
|
-
.on('end', () => select(this._titleDiv).style('height', null));
|
|
1938
|
-
select(this._legendDiv).style('display', 'none');
|
|
1939
|
-
const animateRandomLine = () => {
|
|
1940
|
-
let firstVal = this._xAxis.domain()[0];
|
|
1941
|
-
const randomData = [...Array(this._xAxis.domain()[1])].map(() => {
|
|
1942
|
-
const dataPoint = [
|
|
1943
|
-
firstVal,
|
|
1944
|
-
Math.round(Math.random() * this._yAxis.domain()[1] * 100) / 100
|
|
1945
|
-
]; // This assumes domain is from 0 to maxVal
|
|
1946
|
-
firstVal++;
|
|
1947
|
-
return dataPoint;
|
|
1948
|
-
});
|
|
1949
|
-
this._lineChartContainer.selectAll('.linePath').remove();
|
|
1950
|
-
this._lineChartContainer
|
|
1951
|
-
.selectAll('linePath')
|
|
1952
|
-
.data([randomData])
|
|
1953
|
-
.join('path')
|
|
1954
|
-
.attr('class', 'linePath')
|
|
1955
|
-
.attr('stroke', 'lightgray')
|
|
1956
|
-
.attr('stroke-linecap', 'round')
|
|
1957
|
-
.attr('stroke-width', 4)
|
|
1958
|
-
.attr('fill', 'none')
|
|
1959
|
-
.attr('d', (d) => LineFunc(d))
|
|
1960
|
-
.transition()
|
|
1961
|
-
.duration(duration * 3)
|
|
1962
|
-
.ease(quadInOut)
|
|
1963
|
-
.attrTween('stroke-dasharray', function () {
|
|
1964
|
-
const length = this.getTotalLength();
|
|
1965
|
-
return interpolate(`0,${length}`, `${length},${length}`);
|
|
1966
|
-
})
|
|
1967
|
-
.on('end', () => {
|
|
1968
|
-
this._lineChartContainer
|
|
1969
|
-
.selectAll('.linePath')
|
|
1970
|
-
.attr('stroke-dasharray', function () {
|
|
1971
|
-
const length = this.getTotalLength();
|
|
1972
|
-
return length + ' ' + length;
|
|
1973
|
-
})
|
|
1974
|
-
.attr('stroke-dashoffset', 0)
|
|
1975
|
-
.transition()
|
|
1976
|
-
.duration(duration * 3)
|
|
1977
|
-
.ease(quadInOut)
|
|
1978
|
-
.attr('stroke-dashoffset', function () {
|
|
1979
|
-
return -this.getTotalLength();
|
|
1980
|
-
})
|
|
1981
|
-
.on('end', () => animateRandomLine());
|
|
1982
|
-
});
|
|
1983
|
-
};
|
|
1984
|
-
const flattenLines = () => {
|
|
1985
|
-
const data = this._lineChartContainer
|
|
1986
|
-
.selectAll('.linePath')
|
|
1987
|
-
.data()
|
|
1988
|
-
.map((elem) => {
|
|
1989
|
-
elem.line = elem.line.map((point) => {
|
|
1990
|
-
return point[1]
|
|
1991
|
-
? [point[0], this._yAxis.domain()[0]]
|
|
1992
|
-
: [point[0], undefined];
|
|
1993
|
-
});
|
|
1994
|
-
return elem;
|
|
1995
|
-
});
|
|
1996
|
-
this._lineChartContainer
|
|
1997
|
-
.selectAll('.linePath')
|
|
1998
|
-
.data(data)
|
|
1999
|
-
.transition()
|
|
2000
|
-
.duration(duration)
|
|
2001
|
-
.ease(polyInOut)
|
|
2002
|
-
.attr('d', (d) => this._LineFunc(d.line))
|
|
2003
|
-
.on('end', (...[, i]) => (i === 0 ? animateRandomLine() : null));
|
|
2004
|
-
this._lineChartContainer
|
|
2005
|
-
.selectAll('.symbolGroup')
|
|
2006
|
-
.selectAll('.symbol')
|
|
2007
|
-
.transition()
|
|
2008
|
-
.duration(duration)
|
|
2009
|
-
.ease(linear$1)
|
|
2010
|
-
.attr('transform', (d) => d
|
|
2011
|
-
? `translate(${this._lineScale(d.x)},${this._yAxis(this._yAxis.domain()[0])})`
|
|
2012
|
-
: null)
|
|
2013
|
-
.attr('opacity', 0);
|
|
2014
|
-
};
|
|
2015
|
-
// Start loadingstate, either from empty set or last set
|
|
2016
|
-
if (empty)
|
|
2017
|
-
animateRandomLine();
|
|
2018
|
-
else
|
|
2019
|
-
flattenLines();
|
|
2020
|
-
}
|
|
2021
|
-
updateSvg() {
|
|
2022
|
-
// displaying legend again
|
|
2023
|
-
if (this._loading) {
|
|
2024
|
-
select(this._host).select('.tableButton').style('display', null);
|
|
2025
|
-
select(this._legendDiv).style('display', null);
|
|
2026
|
-
select(this._titleDiv).style('height', null);
|
|
249
|
+
nextIdx(idx) {
|
|
250
|
+
if (idx > this.afMenuItems.length - 1) {
|
|
251
|
+
return 0;
|
|
2027
252
|
}
|
|
2028
|
-
if (
|
|
2029
|
-
this.
|
|
2030
|
-
this.getTextSize(this._chartData.data.xValueNames[this._chartData.data.xValueNames.length - 1]) /
|
|
2031
|
-
2 +
|
|
2032
|
-
1;
|
|
2033
|
-
else
|
|
2034
|
-
this.margin.right =
|
|
2035
|
-
this.getTextSize(max(this._chartData.data.xValues).toString()) / 2 +
|
|
2036
|
-
1;
|
|
2037
|
-
this.checkPercentage();
|
|
2038
|
-
this.setDims(true);
|
|
2039
|
-
this.mapColorToLine();
|
|
2040
|
-
this.computeMaxVal();
|
|
2041
|
-
this.setTickSize();
|
|
2042
|
-
select(this._chartDiv).attr('height', this.dims.height + 'px');
|
|
2043
|
-
// Updating Svg attributes
|
|
2044
|
-
this._svg
|
|
2045
|
-
.attr('width', this.dims.width + 'px')
|
|
2046
|
-
.attr('height', this.dims.height + 'px')
|
|
2047
|
-
.attr('aria-label', this._chartData && this._chartData.title
|
|
2048
|
-
? 'Linjediagram om ' + this._chartData.title.toLowerCase()
|
|
2049
|
-
: 'Linjediagram');
|
|
2050
|
-
// Y Axis
|
|
2051
|
-
this._yAxis = linear()
|
|
2052
|
-
.domain([0, this._maxVal])
|
|
2053
|
-
.nice(3)
|
|
2054
|
-
.range([this.dims.height - this.margin.bottom, this.margin.top]);
|
|
2055
|
-
// Updating margins
|
|
2056
|
-
this.margin.left =
|
|
2057
|
-
this.getTextSize(formatLocale(this.axisNumberFormat).format(this.formatStyle)(this._yAxis.domain()[1])) +
|
|
2058
|
-
this.yPadding +
|
|
2059
|
-
3;
|
|
2060
|
-
/**** Update xAxis ****/
|
|
2061
|
-
const oldDomain = this._xAxis.domain();
|
|
2062
|
-
this.initXAxis();
|
|
2063
|
-
this._lineChartContainer
|
|
2064
|
-
.transition('position')
|
|
2065
|
-
.duration(400)
|
|
2066
|
-
.ease(polyInOut)
|
|
2067
|
-
.attr('width', this.dims.width)
|
|
2068
|
-
.attr('height', this.dims.height)
|
|
2069
|
-
.attr('transform', `translate(${this.margin.left},0)`);
|
|
2070
|
-
this.setYTicks();
|
|
2071
|
-
this.defineLineAndScale();
|
|
2072
|
-
//this.leftSetAxis();
|
|
2073
|
-
this.addSymbols(true);
|
|
2074
|
-
if (this._loading) {
|
|
2075
|
-
select(this._host).select('.tableButton').style('display', null);
|
|
2076
|
-
this.addListenersToChart();
|
|
2077
|
-
const height = select(this._titleDiv).style('height');
|
|
2078
|
-
select(this._titleDiv)
|
|
2079
|
-
.style('height', this._prevHeight)
|
|
2080
|
-
.transition('adjust')
|
|
2081
|
-
.duration(400)
|
|
2082
|
-
.style('height', height)
|
|
2083
|
-
.on('end', () => select(this._titleDiv).style('height', null));
|
|
2084
|
-
select(this._legendDiv)
|
|
2085
|
-
.style('opacity', 0)
|
|
2086
|
-
.transition()
|
|
2087
|
-
.duration(400)
|
|
2088
|
-
.ease(polyInOut)
|
|
2089
|
-
.style('opacity', 1);
|
|
2090
|
-
this._lineChartContainer.selectAll('.linePath').on('end', null);
|
|
2091
|
-
// Setting starting state for symbols
|
|
2092
|
-
this._lineChartContainer
|
|
2093
|
-
.selectAll('.symbolGroup')
|
|
2094
|
-
.selectAll('.symbol')
|
|
2095
|
-
.attr('opacity', 0)
|
|
2096
|
-
.attr('transform', (d) => d
|
|
2097
|
-
? `translate(${this._lineScale(d.x)},${this._yAxis(this._yAxis.domain()[0])})`
|
|
2098
|
-
: null);
|
|
2099
|
-
this._lineChartContainer
|
|
2100
|
-
.selectAll('.linePath')
|
|
2101
|
-
.transition()
|
|
2102
|
-
.duration(400)
|
|
2103
|
-
.ease(quadInOut)
|
|
2104
|
-
.attr('stroke-dashoffset', function () {
|
|
2105
|
-
return -this.getTotalLength();
|
|
2106
|
-
})
|
|
2107
|
-
.on('end', () => {
|
|
2108
|
-
this._lineChartContainer
|
|
2109
|
-
.selectAll('.linePath')
|
|
2110
|
-
.data(this.reshapeData(this._chartData.data.series))
|
|
2111
|
-
.join('path')
|
|
2112
|
-
.attr('class', 'linePath')
|
|
2113
|
-
.attr('stroke', (d) => this.colorFunction(d))
|
|
2114
|
-
.attr('stroke-linecap', 'round')
|
|
2115
|
-
.attr('stroke-width', 4)
|
|
2116
|
-
.attr('fill', 'none')
|
|
2117
|
-
.attr('stroke-dasharray', this.dashFunction)
|
|
2118
|
-
.attr('stroke-dashoffset', null)
|
|
2119
|
-
.attr('d', (d) => this._LineFunc(d.line.map((pair) => [
|
|
2120
|
-
pair[0],
|
|
2121
|
-
this._yAxis.domain()[0]
|
|
2122
|
-
])));
|
|
2123
|
-
// Transitioning in lines
|
|
2124
|
-
this._lineChartContainer
|
|
2125
|
-
.selectAll('.linePath')
|
|
2126
|
-
.transition()
|
|
2127
|
-
.duration(400)
|
|
2128
|
-
.ease(polyInOut)
|
|
2129
|
-
.attr('d', (d) => this._LineFunc(d.line));
|
|
2130
|
-
// Transitioning in symbols
|
|
2131
|
-
this._lineChartContainer
|
|
2132
|
-
.selectAll('.symbolGroup')
|
|
2133
|
-
.selectAll('.symbol')
|
|
2134
|
-
.transition()
|
|
2135
|
-
.duration(400)
|
|
2136
|
-
.ease(polyInOut)
|
|
2137
|
-
.attr('transform', (d) => d
|
|
2138
|
-
? `translate(${this._lineScale(d.x)},${this._yAxis(d.val)})`
|
|
2139
|
-
: null)
|
|
2140
|
-
.attr('opacity', 1);
|
|
2141
|
-
this._loading = false;
|
|
2142
|
-
});
|
|
253
|
+
else if (idx < 0) {
|
|
254
|
+
return this.afMenuItems.length - 1;
|
|
2143
255
|
}
|
|
2144
256
|
else {
|
|
2145
|
-
|
|
2146
|
-
.selectAll('.linePath')
|
|
2147
|
-
.data(this.reshapeData(this._chartData.data.series))
|
|
2148
|
-
.join('path')
|
|
2149
|
-
.transition()
|
|
2150
|
-
.duration(400)
|
|
2151
|
-
.ease(polyInOut)
|
|
2152
|
-
.attr('class', 'linePath')
|
|
2153
|
-
.attr('stroke', (d) => this.colorFunction(d))
|
|
2154
|
-
.attr('stroke-linecap', 'round')
|
|
2155
|
-
.attr('stroke-width', (d) => (d.length > 1 ? 4 : 6))
|
|
2156
|
-
.attr('fill', 'none')
|
|
2157
|
-
.attr('stroke-dasharray', (d, i) => d.length > 1 ? this.dashFunction(d, i) : null)
|
|
2158
|
-
.attr('d', (d) => this._LineFunc(d.line));
|
|
257
|
+
return idx;
|
|
2159
258
|
}
|
|
2160
|
-
// If we have the exact same domain, the tooltip may continue to be active
|
|
2161
|
-
if (this._toggled && oldDomain === this._xAxis.domain()) {
|
|
2162
|
-
const stringPoint = this._chartData.data.xValues[this._tooltipDataIndex].toString();
|
|
2163
|
-
this._Circles
|
|
2164
|
-
.selectAll('circle')
|
|
2165
|
-
.data(this._chartData.data.series)
|
|
2166
|
-
.join('circle')
|
|
2167
|
-
.transition('New circles')
|
|
2168
|
-
.duration(400)
|
|
2169
|
-
.ease(polyInOut)
|
|
2170
|
-
.attr('stroke', 'white')
|
|
2171
|
-
.attr('fill', (d) => this.colorFunction(d))
|
|
2172
|
-
.attr('stroke-width', '1px')
|
|
2173
|
-
.attr('r', 7);
|
|
2174
|
-
this.positionCircles(stringPoint, 400);
|
|
2175
|
-
const oldPos = this._TooltipLine.attr('y1');
|
|
2176
|
-
this._TooltipLine
|
|
2177
|
-
.transition()
|
|
2178
|
-
.duration(400)
|
|
2179
|
-
.ease(polyInOut)
|
|
2180
|
-
.attr('x1', this._xAxis(stringPoint) + this.margin.left)
|
|
2181
|
-
.attr('x2', this._xAxis(stringPoint) + this.margin.left)
|
|
2182
|
-
.attr('y1', this._yAxis(this._maxVal))
|
|
2183
|
-
.attr('y2', this.dims.height - this.margin.bottom);
|
|
2184
|
-
const tooltipBody = this._tooltip.select('.tooltipBody');
|
|
2185
|
-
tooltipBody
|
|
2186
|
-
.select(this._tooltipHeading)
|
|
2187
|
-
.style('margin', '0 0.75rem')
|
|
2188
|
-
.html(() => {
|
|
2189
|
-
if (this._chartData.data.xValueNames)
|
|
2190
|
-
return this._chartData.data.xValueNames[this._tooltipPoint - 1];
|
|
2191
|
-
return this._tooltipPoint;
|
|
2192
|
-
});
|
|
2193
|
-
// Body
|
|
2194
|
-
tooltipBody
|
|
2195
|
-
.selectAll('div')
|
|
2196
|
-
.data(this._chartData.data.series)
|
|
2197
|
-
.join('div')
|
|
2198
|
-
.style('display', 'flex')
|
|
2199
|
-
.style('flex-direction', 'row')
|
|
2200
|
-
.style('flex-wrap', 'nowrap')
|
|
2201
|
-
.style('white-space', 'nowrap')
|
|
2202
|
-
.style('justify-content', 'space-between')
|
|
2203
|
-
.html((d) => {
|
|
2204
|
-
return ('<span>' +
|
|
2205
|
-
d.title +
|
|
2206
|
-
': </span><span class="tooltipVal">' +
|
|
2207
|
-
d.yValues[this._tooltipDataIndex] +
|
|
2208
|
-
'</span>');
|
|
2209
|
-
});
|
|
2210
|
-
this.positionTooltipWithinBounds(this._xAxis(stringPoint) + this.margin.left, 400);
|
|
2211
|
-
this._tooltip
|
|
2212
|
-
.style('transform', () => {
|
|
2213
|
-
// We reset the position of the tooltip, and adjust for the maximum value, -1px for it to align perfectly
|
|
2214
|
-
return `translateY(${oldPos - this._tooltip.node().getBoundingClientRect().height - 9}px)`;
|
|
2215
|
-
})
|
|
2216
|
-
.transition()
|
|
2217
|
-
.duration(400)
|
|
2218
|
-
.ease(polyInOut)
|
|
2219
|
-
.style('transform', () => {
|
|
2220
|
-
// We reset the position of the tooltip, and adjust for the maximum value, -1px for it to align perfectly
|
|
2221
|
-
return `translateY(${this._yAxis(this._maxVal) - this._tooltip.node().getBoundingClientRect().height - 9}px)`;
|
|
2222
|
-
});
|
|
2223
|
-
this._svg
|
|
2224
|
-
.select('.tooltipPointer')
|
|
2225
|
-
.transition()
|
|
2226
|
-
.duration(400)
|
|
2227
|
-
.ease(polyInOut)
|
|
2228
|
-
.attr('transform', `translate(${this._xAxis(stringPoint) + this.margin.left},${this._yAxis(this._maxVal) - 7}) rotate(180) scale(1.5,1.0)`);
|
|
2229
|
-
}
|
|
2230
|
-
else {
|
|
2231
|
-
this._Circles
|
|
2232
|
-
.selectAll('circle')
|
|
2233
|
-
.data(this._chartData.data.series)
|
|
2234
|
-
.join('circle')
|
|
2235
|
-
.attr('stroke', (d) => this.colorFunction(d))
|
|
2236
|
-
.attr('fill', 'white')
|
|
2237
|
-
.attr('stroke-width', '1px')
|
|
2238
|
-
.attr('r', 7)
|
|
2239
|
-
.attr('display', 'none');
|
|
2240
|
-
this.closeTooltip();
|
|
2241
|
-
}
|
|
2242
|
-
}
|
|
2243
|
-
componentWillLoad() {
|
|
2244
|
-
this.afChartDataUpdate();
|
|
2245
|
-
}
|
|
2246
|
-
componentDidLoad() {
|
|
2247
|
-
if (Object.keys(this._chartData).length === 0)
|
|
2248
|
-
return this.initEmpty();
|
|
2249
|
-
// clearing selection
|
|
2250
|
-
this._selectedLines = [];
|
|
2251
|
-
this.initSvg();
|
|
2252
|
-
this.initLegend();
|
|
2253
|
-
this.initLines();
|
|
2254
|
-
document.fonts.onloadingdone = () => {
|
|
2255
|
-
this.setTickSize();
|
|
2256
|
-
this.resizeSvg();
|
|
2257
|
-
};
|
|
2258
|
-
}
|
|
2259
|
-
componentWillUpdate() {
|
|
2260
|
-
this._prevHeight = select(this._titleDiv).style('height');
|
|
2261
259
|
}
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
this.
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
this.
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
const
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
const size = this.getTextSize(elem) + textPadding;
|
|
2300
|
-
if (size > this._tickSize)
|
|
2301
|
-
this._tickSize = size;
|
|
2302
|
-
}
|
|
2303
|
-
}
|
|
2304
|
-
else {
|
|
2305
|
-
for (const elem of this._chartData.data.xValues) {
|
|
2306
|
-
const size = this.getTextSize(elem.toString()) + textPadding;
|
|
2307
|
-
if (size > this._tickSize)
|
|
2308
|
-
this._tickSize = size;
|
|
2309
|
-
}
|
|
260
|
+
activateItem(idx) {
|
|
261
|
+
const item = this.afMenuItems[idx];
|
|
262
|
+
this.activeItemIdx = idx;
|
|
263
|
+
this.focusItem(idx);
|
|
264
|
+
this.handleChangeItem(item, idx);
|
|
265
|
+
}
|
|
266
|
+
focusItem(idx) {
|
|
267
|
+
var _a;
|
|
268
|
+
const item = this.afMenuItems[idx];
|
|
269
|
+
this.selectItemIdx = idx;
|
|
270
|
+
(_a = this.itemRefs[item.id]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
271
|
+
this.afFocusItem.emit({ item, idx });
|
|
272
|
+
}
|
|
273
|
+
focusCaptured() {
|
|
274
|
+
const menuItems = this.afMenuItems;
|
|
275
|
+
return menuItems.some((item) => this.itemRefs[item.id] === document.activeElement);
|
|
276
|
+
}
|
|
277
|
+
handleKey(e) {
|
|
278
|
+
if (!this.focusCaptured())
|
|
279
|
+
return;
|
|
280
|
+
switch (e.key) {
|
|
281
|
+
case 'ArrowUp':
|
|
282
|
+
this.focusItem(this.nextIdx(this.selectItemIdx - 1));
|
|
283
|
+
break;
|
|
284
|
+
case 'ArrowDown':
|
|
285
|
+
this.focusItem(this.nextIdx(this.selectItemIdx + 1));
|
|
286
|
+
break;
|
|
287
|
+
case 'Escape':
|
|
288
|
+
this.hideMenu();
|
|
289
|
+
this.focusOnButton();
|
|
290
|
+
break;
|
|
291
|
+
case 'Enter':
|
|
292
|
+
case ' ':
|
|
293
|
+
e.preventDefault();
|
|
294
|
+
e.stopPropagation();
|
|
295
|
+
this.activateItem(this.selectItemIdx);
|
|
296
|
+
break;
|
|
2310
297
|
}
|
|
2311
298
|
}
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
if (!init) {
|
|
2316
|
-
this._yAxisHandle
|
|
2317
|
-
.selectAll('text')
|
|
2318
|
-
.transition('shuffle text')
|
|
2319
|
-
.duration(400)
|
|
2320
|
-
.attr('transform', (...[, i, nodelist]) => {
|
|
2321
|
-
const size = nodelist[i].getComputedTextLength();
|
|
2322
|
-
shiftArray.push(size);
|
|
2323
|
-
return `translate(${-1 * (this.margin.left - (size + this.yPadding))},0)`;
|
|
2324
|
-
});
|
|
2325
|
-
this._yAxisHandle
|
|
2326
|
-
.selectAll('line')
|
|
2327
|
-
.transition('shuffle line')
|
|
2328
|
-
.duration(400)
|
|
2329
|
-
.attr('x1', (...[, i]) => {
|
|
2330
|
-
return -1 * (this.margin.left - (shiftArray[i] + this.yPadding));
|
|
2331
|
-
});
|
|
299
|
+
handleLinkClick(e, item, idx) {
|
|
300
|
+
if (!item.overrideLink) {
|
|
301
|
+
window.location.assign(item.href);
|
|
2332
302
|
}
|
|
2333
303
|
else {
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
.attr('transform', (...[, i, nodelist]) => {
|
|
2337
|
-
const size = nodelist[i].getComputedTextLength();
|
|
2338
|
-
shiftArray.push(size);
|
|
2339
|
-
return `translate(${-1 * (this.margin.left - (size + this.yPadding))},0)`;
|
|
2340
|
-
});
|
|
2341
|
-
this._yAxisHandle.selectAll('line').attr('x1', (...[, i]) => {
|
|
2342
|
-
return -1 * (this.margin.left - (shiftArray[i] + this.yPadding));
|
|
2343
|
-
});
|
|
304
|
+
e.preventDefault();
|
|
305
|
+
this.handleChangeItem(item, idx);
|
|
2344
306
|
}
|
|
2345
307
|
}
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
}
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
select(this._titleDiv).node().getBoundingClientRect().height -
|
|
2364
|
-
parseFloat(getComputedStyle(document.documentElement).fontSize) *
|
|
2365
|
-
0.65 +
|
|
2366
|
-
'px');
|
|
2367
|
-
table.style('width', this.dims.width -
|
|
2368
|
-
parseFloat(getComputedStyle(document.documentElement).fontSize) * 0.65 +
|
|
2369
|
-
'px');
|
|
2370
|
-
}
|
|
2371
|
-
animateTableDimensions() {
|
|
2372
|
-
const height = select(this._titleDiv).style('height');
|
|
2373
|
-
select(this._titleDiv)
|
|
2374
|
-
.style('height', this._prevHeight)
|
|
2375
|
-
.transition('adjust')
|
|
2376
|
-
.duration(400)
|
|
2377
|
-
.style('height', height)
|
|
2378
|
-
.on('end', () => select(this._titleDiv).style('height', null));
|
|
2379
|
-
const table = select(this._tableDiv);
|
|
2380
|
-
table
|
|
2381
|
-
.transition('adjustHeight')
|
|
2382
|
-
.duration(400)
|
|
2383
|
-
// The last value is for compensating the padding set on the table element, changing padding in css, will need change in these two lines
|
|
2384
|
-
.style('height', this._maxHeight -
|
|
2385
|
-
(parseFloat(height) +
|
|
2386
|
-
parseFloat(getComputedStyle(document.documentElement).fontSize) *
|
|
2387
|
-
1.25) -
|
|
2388
|
-
parseFloat(getComputedStyle(document.documentElement).fontSize) *
|
|
2389
|
-
0.65 +
|
|
2390
|
-
'px');
|
|
2391
|
-
table.style('width', this.dims.width -
|
|
2392
|
-
parseFloat(getComputedStyle(document.documentElement).fontSize) * 0.65 +
|
|
2393
|
-
'px');
|
|
2394
|
-
}
|
|
2395
|
-
// Extracting all headings from data and returning a string with <th>-elements with headings
|
|
2396
|
-
headings() {
|
|
2397
|
-
let headingsString = `<th scope="col">${this._chartData.x}</th>`;
|
|
2398
|
-
this._coreSeries.forEach((elem) => {
|
|
2399
|
-
headingsString = headingsString.concat(`<th scope="col">${elem.title}</th>`);
|
|
2400
|
-
});
|
|
2401
|
-
return headingsString;
|
|
2402
|
-
}
|
|
2403
|
-
// Building the table body
|
|
2404
|
-
tableBody() {
|
|
2405
|
-
let body = '';
|
|
2406
|
-
const loopable = this._chartData.data.xValueNames
|
|
2407
|
-
? this._chartData.data.xValueNames
|
|
2408
|
-
: this._chartData.data.xValues;
|
|
2409
|
-
loopable.forEach((elem, index) => {
|
|
2410
|
-
let cells = '';
|
|
2411
|
-
this._coreSeries.forEach((serie) => {
|
|
2412
|
-
cells = cells.concat(`<td>${serie.yValues[index] != null ? formatLocale(this.axisNumberFormat).format(this.formatStyle)(serie.yValues[index]) : '-'}</td>`);
|
|
2413
|
-
});
|
|
2414
|
-
body = body.concat(`<tr><th scope='row'>${elem}${cells}</th></tr>`);
|
|
2415
|
-
});
|
|
2416
|
-
return body;
|
|
308
|
+
renderLink(item, idx) {
|
|
309
|
+
const menuItem = this.afMenuItems[idx];
|
|
310
|
+
return (h("li", { id: `${this.afId}-listbox-item-${item.id}`, key: item.id, class: {
|
|
311
|
+
'digi-navigation-context-menu__item': true,
|
|
312
|
+
'digi-navigation-context-menu__item--link': true,
|
|
313
|
+
'digi-navigation-context-menu__item--active': this.isActive(idx)
|
|
314
|
+
}, dir: this.afDir, lang: this.afLang, ref: (ref) => { var _a; return (_a = this.handleRef) === null || _a === void 0 ? void 0 : _a.call(this, ref, 'item', item); } }, h("a", { "aria-label": item.ariaLabel ? item.ariaLabel : null, href: menuItem.href ? menuItem.href : null, onClick: (e) => this.handleLinkClick(e, item, idx) }, item.title)));
|
|
315
|
+
}
|
|
316
|
+
renderDiv(item, idx) {
|
|
317
|
+
return (h("div", { role: "option", id: `${this.afId}-listbox-item-${item.id}`, key: item.id, class: {
|
|
318
|
+
'digi-navigation-context-menu__item': true,
|
|
319
|
+
'digi-navigation-context-menu__item--active': this.isActive(idx)
|
|
320
|
+
}, dir: this.afDir, lang: this.afLang, "aria-selected": this.isActive(idx).toString(), tabIndex: this.isSelected(idx) ? 0 : -1, onClick: () => { var _a; return (_a = this.handleChangeItem) === null || _a === void 0 ? void 0 : _a.call(this, item, idx); }, ref: (ref) => { var _a; return (_a = this.handleRef) === null || _a === void 0 ? void 0 : _a.call(this, ref, 'item', item); } }, h("div", { class: "content-wrapper" }, h("digi-icon-check", { class: "digi-navigation-context-menu__button-icon", slot: "icon", style: {
|
|
321
|
+
visibility: idx === this.activeItemIdx && this.visible
|
|
322
|
+
? 'visible'
|
|
323
|
+
: 'hidden'
|
|
324
|
+
} }), h("span", { "aria-label": item.ariaLabel ? item.ariaLabel : null }, item.title)), ' '));
|
|
2417
325
|
}
|
|
2418
326
|
render() {
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
327
|
+
const menuItems = this.afMenuItems;
|
|
328
|
+
return (h(Host, { key: '8b9ddb1d31e294505f5ae3f226510ba587ecfc04', class: 'digi-navigation-context-menu' }, h("div", { key: 'bcc94554eb00a58409b7cae6a5c3668767ddb26d', id: `${this.afId}-identifier`, class: "digi-navigation-context-menu--id-wrapper" }, h("digi-button", { key: '287e0f1f1afba43c8250185e5ea589aa26c5367c', id: `${this.afId}-trigger`, ref: (ref) => (this.buttonRef = ref), onClick: () => this.handleToggle(), afVariation: "function", afAriaControls: `${this.afId}-dropdown`, afAriaExpanded: this.visible, afAriaLabel: this.afAriaLabel || null, class: {
|
|
329
|
+
'digi-navigation-context-menu__trigger-button': true,
|
|
330
|
+
'digi-navigation-context-menu--active': this.visible
|
|
331
|
+
} }, !!this.afIcon && h(this.digiIcon, { key: 'db42fdd3432f87096be2e5da8b3e05732b0aedf4', slot: "icon" }), this.afTitle, h("digi-icon-chevron-down", { key: '7977ded8cc5a7aa0aec7e2735dc38f95a4d31a06', class: "digi-navigation-context-menu__toggle-icon", slot: "icon-secondary" })), h("div", { key: '5ff21d52bb2f57c8777bd04bf906730c960bc054', class: "digi-navigation-context-menu__list" }, h("div", { key: 'a8e81ab1b3c371ef501bf96f7c14c11d54a97836', onKeyDown: (e) => {
|
|
332
|
+
this.handleKey(e);
|
|
333
|
+
}, id: `${this.afId}-dropdown`, style: {
|
|
334
|
+
visibility: this.visible ? 'visible' : 'hidden'
|
|
335
|
+
}, role: this.isLink() ? 'list' : 'listbox', "aria-labelledby": `${this.afId}-trigger`, class: {
|
|
336
|
+
'dropdown-wrapper': true,
|
|
337
|
+
'dropdown-wrapper--visible': this.visible,
|
|
338
|
+
'dropdown-wrapper--position-right': this.afMenuPosition === 'right-bottom',
|
|
339
|
+
'dropdown-wrapper--position-center': this.afMenuPosition === 'center-bottom'
|
|
340
|
+
} }, menuItems &&
|
|
341
|
+
menuItems.map((item, idx) => {
|
|
342
|
+
const menuItem = menuItems[idx];
|
|
343
|
+
if (menuItem.type && (menuItem === null || menuItem === void 0 ? void 0 : menuItem.type) === 'link') {
|
|
344
|
+
return this.renderLink(item, idx);
|
|
345
|
+
}
|
|
346
|
+
return this.renderDiv(item, idx);
|
|
347
|
+
}))))));
|
|
2425
348
|
}
|
|
2426
|
-
get element() { return getElement(this); }
|
|
2427
349
|
static get watchers() { return {
|
|
2428
|
-
"
|
|
350
|
+
"afActiveItem": ["syncActiveItem"],
|
|
351
|
+
"afMenuItems": ["syncItems"]
|
|
2429
352
|
}; }
|
|
2430
353
|
};
|
|
2431
|
-
|
|
354
|
+
ContextMenu.style = DigiContextMenuStyle0;
|
|
2432
355
|
|
|
2433
|
-
const
|
|
2434
|
-
const
|
|
356
|
+
const iconCheckCss = ".sc-digi-icon-check-h{--digi--icon--color:var(--digi--color--icons--primary);--digi--icon--width:initial;--digi--icon--height:auto;display:flex;min-height:1.4em;align-items:center}.sc-digi-icon-check-h svg.sc-digi-icon-check{color:var(--digi--icon--color);max-width:var(--digi--icon--width);max-height:var(--digi--icon--height);width:var(--digi--icon--width, auto);height:var(--digi--icon--height, auto)}";
|
|
357
|
+
const DigiIconCheckStyle0 = iconCheckCss;
|
|
2435
358
|
|
|
2436
|
-
const
|
|
359
|
+
const IconCheck = class {
|
|
2437
360
|
constructor(hostRef) {
|
|
2438
361
|
registerInstance(this, hostRef);
|
|
2439
362
|
this.afTitle = undefined;
|
|
@@ -2443,19 +366,19 @@ const IconChart = class {
|
|
|
2443
366
|
this.titleId = randomIdGenerator('icontitle');
|
|
2444
367
|
}
|
|
2445
368
|
render() {
|
|
2446
|
-
return (h("svg", { key: '
|
|
369
|
+
return (h("svg", { key: 'b93763762cb15da9dd043c599d28801dd1b7b6d2', class: "digi-icon-check", width: "23", height: "18", viewBox: "0 0 23 18", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": this.afSvgAriaHidden ? 'true' : 'false', "aria-labelledby": this.afSvgAriaLabelledby
|
|
2447
370
|
? this.afSvgAriaLabelledby
|
|
2448
371
|
: this.afTitle
|
|
2449
372
|
? this.titleId
|
|
2450
|
-
: undefined },
|
|
373
|
+
: undefined }, this.afTitle && h("title", { key: '50601b1e8c8eaf8a33d0a1074005e9c65b87113d', id: this.titleId }, this.afTitle), this.afDesc && h("desc", { key: '06f9aacdab41e114f4f47f690ece821651ac4ee3' }, this.afDesc), h("path", { key: '1af3c61a39655f9002f6826fc8beaf48b2a976b1', class: "digi-icon-check__shape", d: "M20.547.18L7.315 13.627 2.453 8.686a.597.597 0 00-.853 0L.177 10.132a.62.62 0 000 .868l6.711 6.82c.236.24.618.24.854 0L22.823 2.493a.62.62 0 000-.867L21.4.18a.597.597 0 00-.853 0z", fill: "currentColor", "fill-rule": "nonzero" })));
|
|
2451
374
|
}
|
|
2452
375
|
};
|
|
2453
|
-
|
|
376
|
+
IconCheck.style = DigiIconCheckStyle0;
|
|
2454
377
|
|
|
2455
|
-
const
|
|
2456
|
-
const
|
|
378
|
+
const iconChevronDownCss = ".sc-digi-icon-chevron-down-h{--digi--icon--color:var(--digi--color--icons--primary);--digi--icon--width:initial;--digi--icon--height:auto;display:flex;min-height:1.4em;align-items:center}.sc-digi-icon-chevron-down-h svg.sc-digi-icon-chevron-down{color:var(--digi--icon--color);max-width:var(--digi--icon--width);max-height:var(--digi--icon--height);width:var(--digi--icon--width, auto);height:var(--digi--icon--height, auto)}";
|
|
379
|
+
const DigiIconChevronDownStyle0 = iconChevronDownCss;
|
|
2457
380
|
|
|
2458
|
-
const
|
|
381
|
+
const IconChevronDown = class {
|
|
2459
382
|
constructor(hostRef) {
|
|
2460
383
|
registerInstance(this, hostRef);
|
|
2461
384
|
this.afTitle = undefined;
|
|
@@ -2465,36 +388,58 @@ const IconTable = class {
|
|
|
2465
388
|
this.titleId = randomIdGenerator('icontitle');
|
|
2466
389
|
}
|
|
2467
390
|
render() {
|
|
2468
|
-
return (h("svg", { key: '
|
|
391
|
+
return (h("svg", { key: '5ac426b453a30750f70586d7ba38119c3ac36a73', class: "digi-icon-chevron-down", width: "14", height: "8", viewBox: "0 0 14 8", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": this.afSvgAriaHidden ? 'true' : 'false', "aria-labelledby": this.afSvgAriaLabelledby
|
|
2469
392
|
? this.afSvgAriaLabelledby
|
|
2470
393
|
: this.afTitle
|
|
2471
394
|
? this.titleId
|
|
2472
|
-
: undefined
|
|
395
|
+
: undefined }, this.afTitle && h("title", { key: '7f9ebb68d4f0a68f17df66c02e290e46b24a3004', id: this.titleId }, this.afTitle), this.afDesc && h("desc", { key: '5267ccd4d49aaf68cc85bb84dbcca21b1540d8c5' }, this.afDesc), h("path", { key: '4c0d7b31ff1e20fc32941d442ca3b04ca8349081', class: "digi-icon-chevron-down__shape", d: "M1 1l6.074 6L13 1.147", stroke: "currentColor", "stroke-width": "2", fill: "none", "fill-rule": "evenodd" })));
|
|
2473
396
|
}
|
|
2474
397
|
};
|
|
2475
|
-
|
|
398
|
+
IconChevronDown.style = DigiIconChevronDownStyle0;
|
|
2476
399
|
|
|
2477
|
-
const
|
|
2478
|
-
const
|
|
400
|
+
const layoutContainerCss = ".digi--util--fs--xs.sc-digi-layout-container{font-size:var(--digi--global--typography--font-size--small) !important}.digi--util--fs--s.sc-digi-layout-container{font-size:calc(var(--digi--global--typography--font-size--small) + 1px) !important}.digi--util--fs--m.sc-digi-layout-container{font-size:var(--digi--global--typography--font-size--base) !important}.digi--util--fs--l.sc-digi-layout-container{font-size:var(--digi--global--typography--font-size--large) !important}.digi--util--fw--sb.sc-digi-layout-container{font-weight:var(--digi--global--typography--font-weight--semibold) !important}.digi--util--pt--1.sc-digi-layout-container{padding-top:var(--digi--global--spacing--smallest-2) !important}.digi--util--pt--10.sc-digi-layout-container{padding-top:var(--digi--global--spacing--smallest) !important}.digi--util--pt--20.sc-digi-layout-container{padding-top:var(--digi--global--spacing--base) !important}.digi--util--pt--30.sc-digi-layout-container{padding-top:var(--digi--global--spacing--largest-2) !important}.digi--util--pt--40.sc-digi-layout-container{padding-top:var(--digi--global--spacing--largest-4) !important}.digi--util--pt--50.sc-digi-layout-container{padding-top:2.5rem !important}.digi--util--pt--60.sc-digi-layout-container{padding-top:var(--digi--global--spacing--largest-5) !important}.digi--util--pt--70.sc-digi-layout-container{padding-top:var(--digi--global--spacing--largest-6) !important}.digi--util--pt--80.sc-digi-layout-container{padding-top:4.5rem !important}.digi--util--pt--90.sc-digi-layout-container{padding-top:5rem !important}.digi--util--pb--1.sc-digi-layout-container{padding-bottom:var(--digi--global--spacing--smallest-2) !important}.digi--util--pb--10.sc-digi-layout-container{padding-bottom:var(--digi--global--spacing--smallest) !important}.digi--util--pb--20.sc-digi-layout-container{padding-bottom:var(--digi--global--spacing--base) !important}.digi--util--pb--30.sc-digi-layout-container{padding-bottom:var(--digi--global--spacing--largest-2) !important}.digi--util--pb--40.sc-digi-layout-container{padding-bottom:var(--digi--global--spacing--largest-4) !important}.digi--util--pb--50.sc-digi-layout-container{padding-bottom:2.5rem !important}.digi--util--pb--60.sc-digi-layout-container{padding-bottom:var(--digi--global--spacing--largest-5) !important}.digi--util--pb--70.sc-digi-layout-container{padding-bottom:var(--digi--global--spacing--largest-6) !important}.digi--util--pb--80.sc-digi-layout-container{padding-bottom:4.5rem !important}.digi--util--pb--90.sc-digi-layout-container{padding-bottom:5rem !important}.digi--util--p--1.sc-digi-layout-container{padding:var(--digi--global--spacing--smallest-2) !important}.digi--util--p--10.sc-digi-layout-container{padding:var(--digi--global--spacing--smallest) !important}.digi--util--p--20.sc-digi-layout-container{padding:var(--digi--global--spacing--base) !important}.digi--util--p--30.sc-digi-layout-container{padding:var(--digi--global--spacing--largest-2) !important}.digi--util--p--40.sc-digi-layout-container{padding:var(--digi--global--spacing--largest-4) !important}.digi--util--p--50.sc-digi-layout-container{padding:2.5rem !important}.digi--util--p--60.sc-digi-layout-container{padding:var(--digi--global--spacing--largest-5) !important}.digi--util--p--70.sc-digi-layout-container{padding:var(--digi--global--spacing--largest-6) !important}.digi--util--p--80.sc-digi-layout-container{padding:4.5rem !important}.digi--util--p--90.sc-digi-layout-container{padding:5rem !important}.digi--util--ptb--1.sc-digi-layout-container{padding-top:var(--digi--global--spacing--smallest-2) !important;padding-bottom:var(--digi--global--spacing--smallest-2) !important}.digi--util--ptb--10.sc-digi-layout-container{padding-top:var(--digi--global--spacing--smallest) !important;padding-bottom:var(--digi--global--spacing--smallest) !important}.digi--util--ptb--20.sc-digi-layout-container{padding-top:var(--digi--global--spacing--base) !important;padding-bottom:var(--digi--global--spacing--base) !important}.digi--util--ptb--30.sc-digi-layout-container{padding-top:var(--digi--global--spacing--largest-2) !important;padding-bottom:var(--digi--global--spacing--largest-2) !important}.digi--util--ptb--40.sc-digi-layout-container{padding-top:var(--digi--global--spacing--largest-4) !important;padding-bottom:var(--digi--global--spacing--largest-4) !important}.digi--util--ptb--50.sc-digi-layout-container{padding-top:2.5rem !important;padding-bottom:2.5rem !important}.digi--util--ptb--60.sc-digi-layout-container{padding-top:var(--digi--global--spacing--largest-5) !important;padding-bottom:var(--digi--global--spacing--largest-5) !important}.digi--util--ptb--70.sc-digi-layout-container{padding-top:var(--digi--global--spacing--largest-6) !important;padding-bottom:var(--digi--global--spacing--largest-6) !important}.digi--util--ptb--80.sc-digi-layout-container{padding-top:4.5rem !important;padding-bottom:4.5rem !important}.digi--util--ptb--90.sc-digi-layout-container{padding-top:5rem !important;padding-bottom:5rem !important}.digi--util--plr--1.sc-digi-layout-container{padding-left:var(--digi--global--spacing--smallest-2) !important;padding-right:var(--digi--global--spacing--smallest-2) !important}.digi--util--plr--10.sc-digi-layout-container{padding-left:var(--digi--global--spacing--smallest) !important;padding-right:var(--digi--global--spacing--smallest) !important}.digi--util--plr--20.sc-digi-layout-container{padding-left:var(--digi--global--spacing--base) !important;padding-right:var(--digi--global--spacing--base) !important}.digi--util--plr--30.sc-digi-layout-container{padding-left:var(--digi--global--spacing--largest-2) !important;padding-right:var(--digi--global--spacing--largest-2) !important}.digi--util--plr--40.sc-digi-layout-container{padding-left:var(--digi--global--spacing--largest-4) !important;padding-right:var(--digi--global--spacing--largest-4) !important}.digi--util--plr--50.sc-digi-layout-container{padding-left:2.5rem !important;padding-right:2.5rem !important}.digi--util--plr--60.sc-digi-layout-container{padding-left:var(--digi--global--spacing--largest-5) !important;padding-right:var(--digi--global--spacing--largest-5) !important}.digi--util--plr--70.sc-digi-layout-container{padding-left:var(--digi--global--spacing--largest-6) !important;padding-right:var(--digi--global--spacing--largest-6) !important}.digi--util--plr--80.sc-digi-layout-container{padding-left:4.5rem !important;padding-right:4.5rem !important}.digi--util--plr--90.sc-digi-layout-container{padding-left:5rem !important;padding-right:5rem !important}.digi--util--sr-only.sc-digi-layout-container{border:0;clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.digi--util--hidden.sc-digi-layout-container{display:none}.sc-digi-layout-container-h{--digi--layout-container--width:var(--digi--container-width--smaller);--digi--layout-container--gutter:var(--digi--container-gutter--base);--digi--layout-container--vertical-padding:0;--digi--layout-container--margin-top:0;--digi--layout-container--margin-bottom:0}.sc-digi-layout-container-h .digi-layout-container.sc-digi-layout-container{box-sizing:border-box;width:100%;max-width:var(--digi--layout-container--width);padding:var(--digi--layout-container--vertical-padding) var(--digi--layout-container--gutter);margin-left:auto;margin-right:auto;margin-top:var(--digi--layout-container--margin-top);margin-bottom:var(--digi--layout-container--margin-bottom);box-sizing:border-box}@media (min-width: 36rem){.sc-digi-layout-container-h .digi-layout-container.sc-digi-layout-container{--digi--layout-container--width:var(--digi--container-width--small);--digi--layout-container--gutter:var(--digi--container-gutter--small)}}@media (min-width: 48rem){.sc-digi-layout-container-h .digi-layout-container.sc-digi-layout-container{--digi--layout-container--width:var(--digi--container-width--medium);--digi--layout-container--gutter:var(--digi--container-gutter--medium)}}@media (min-width: 62rem){.sc-digi-layout-container-h .digi-layout-container.sc-digi-layout-container{--digi--layout-container--width:var(--digi--container-width--large);--digi--layout-container--gutter:var(--digi--container-gutter--large)}}@media (min-width: 75rem){.sc-digi-layout-container-h .digi-layout-container.sc-digi-layout-container{--digi--layout-container--width:var(--digi--container-width--larger);--digi--layout-container--gutter:var(--digi--container-gutter--larger)}}@media (min-width: 87.5rem){.sc-digi-layout-container-h .digi-layout-container.sc-digi-layout-container{--digi--layout-container--width:var(--digi--container-width--largest);--digi--layout-container--gutter:var(--digi--container-gutter--largest)}.sc-digi-layout-container-h .digi-layout-container--max-width-1200.sc-digi-layout-container{--digi--layout-container--width:var(--digi--global--size--larger)}}.sc-digi-layout-container-h .digi-layout-container--fluid.sc-digi-layout-container{--digi--layout-container--width:none !important}.sc-digi-layout-container-h .digi-layout-container--no-gutter.sc-digi-layout-container{--digi--layout-container--gutter:0}.sc-digi-layout-container-h .digi-layout-container--vertical-padding.sc-digi-layout-container{--digi--layout-container--vertical-padding:var(--digi--padding--large)}.sc-digi-layout-container-h .digi-layout-container--margin-top.sc-digi-layout-container{--digi--layout-container--margin-top:var(--digi--margin--large)}.sc-digi-layout-container-h .digi-layout-container--margin-bottom.sc-digi-layout-container{--digi--layout-container--margin-bottom:var(--digi--margin--large)}";
|
|
401
|
+
const DigiLayoutContainerStyle0 = layoutContainerCss;
|
|
2479
402
|
|
|
2480
|
-
const
|
|
403
|
+
const LayoutContainer = class {
|
|
2481
404
|
constructor(hostRef) {
|
|
2482
405
|
registerInstance(this, hostRef);
|
|
2483
|
-
this.
|
|
2484
|
-
this.
|
|
2485
|
-
this.
|
|
2486
|
-
this.
|
|
2487
|
-
this.
|
|
406
|
+
this._variation = LayoutContainerVariation.STATIC;
|
|
407
|
+
this.afVariation = LayoutContainerVariation.STATIC;
|
|
408
|
+
this.afMaxWidth = LayoutContainerMaxWidth.WIDTH_1400;
|
|
409
|
+
this.afNoGutter = undefined;
|
|
410
|
+
this.afVerticalPadding = undefined;
|
|
411
|
+
this.afMarginTop = undefined;
|
|
412
|
+
this.afMarginBottom = undefined;
|
|
413
|
+
}
|
|
414
|
+
variationChangeHandler() {
|
|
415
|
+
this._variation = this.afVariation;
|
|
416
|
+
}
|
|
417
|
+
componentWillLoad() {
|
|
418
|
+
this.variationChangeHandler();
|
|
419
|
+
}
|
|
420
|
+
get cssModifiers() {
|
|
421
|
+
if (this._variation === LayoutContainerVariation.NONE) {
|
|
422
|
+
return {};
|
|
423
|
+
}
|
|
424
|
+
return {
|
|
425
|
+
'digi-layout-container': true,
|
|
426
|
+
'digi-layout-container--static': this._variation === LayoutContainerVariation.STATIC,
|
|
427
|
+
'digi-layout-container--fluid': this._variation === LayoutContainerVariation.FLUID,
|
|
428
|
+
'digi-layout-container--max-width-1200': this.afMaxWidth === LayoutContainerMaxWidth.WIDTH_1200,
|
|
429
|
+
'digi-layout-container--no-gutter': this.afNoGutter,
|
|
430
|
+
'digi-layout-container--vertical-padding': this.afVerticalPadding,
|
|
431
|
+
'digi-layout-container--margin-top': this.afMarginTop,
|
|
432
|
+
'digi-layout-container--margin-bottom': this.afMarginBottom
|
|
433
|
+
};
|
|
2488
434
|
}
|
|
2489
435
|
render() {
|
|
2490
|
-
return (h("
|
|
2491
|
-
? this.afSvgAriaLabelledby
|
|
2492
|
-
: this.afTitle
|
|
2493
|
-
? this.titleId
|
|
2494
|
-
: undefined, xmlns: "http://www.w3.org/2000/svg" }, this.afTitle && h("title", { key: '12da73d80236640ba89463221e4f15cccddee097', id: this.titleId }, this.afTitle), this.afDesc && h("desc", { key: 'e9083ab8497e6b711aa1452456f2d5897e1e6829' }, this.afDesc), h("g", { key: 'd8a9bbd2743f1b3e01739576fec36cbe470d4c52', class: "digi-icon-x__shape", stroke: "currentColor", "stroke-width": "2", fill: "none", "fill-rule": "evenodd", "stroke-linecap": "square" }, h("path", { key: '5a20c2fee197c4120038b297cd243a22b5aab5f2', d: "M2 2l7.986 7.986M9.986 2L2 9.986" }))));
|
|
436
|
+
return (h("div", { key: '01d65500134b20d0b99a22905e9159325fca4931', class: Object.assign({}, this.cssModifiers) }, h("slot", { key: '256b8c6ee913710e1cc359fe228be062705b9546' })));
|
|
2495
437
|
}
|
|
438
|
+
static get watchers() { return {
|
|
439
|
+
"afVariation": ["variationChangeHandler"]
|
|
440
|
+
}; }
|
|
2496
441
|
};
|
|
2497
|
-
|
|
442
|
+
LayoutContainer.style = DigiLayoutContainerStyle0;
|
|
2498
443
|
|
|
2499
444
|
const typographyCss = ".digi--util--fs--xs{font-size:var(--digi--global--typography--font-size--small) !important}.digi--util--fs--s{font-size:calc(var(--digi--global--typography--font-size--small) + 1px) !important}.digi--util--fs--m{font-size:var(--digi--global--typography--font-size--base) !important}.digi--util--fs--l{font-size:var(--digi--global--typography--font-size--large) !important}.digi--util--fw--sb{font-weight:var(--digi--global--typography--font-weight--semibold) !important}.digi--util--pt--1{padding-top:var(--digi--global--spacing--smallest-2) !important}.digi--util--pt--10{padding-top:var(--digi--global--spacing--smallest) !important}.digi--util--pt--20{padding-top:var(--digi--global--spacing--base) !important}.digi--util--pt--30{padding-top:var(--digi--global--spacing--largest-2) !important}.digi--util--pt--40{padding-top:var(--digi--global--spacing--largest-4) !important}.digi--util--pt--50{padding-top:2.5rem !important}.digi--util--pt--60{padding-top:var(--digi--global--spacing--largest-5) !important}.digi--util--pt--70{padding-top:var(--digi--global--spacing--largest-6) !important}.digi--util--pt--80{padding-top:4.5rem !important}.digi--util--pt--90{padding-top:5rem !important}.digi--util--pb--1{padding-bottom:var(--digi--global--spacing--smallest-2) !important}.digi--util--pb--10{padding-bottom:var(--digi--global--spacing--smallest) !important}.digi--util--pb--20{padding-bottom:var(--digi--global--spacing--base) !important}.digi--util--pb--30{padding-bottom:var(--digi--global--spacing--largest-2) !important}.digi--util--pb--40{padding-bottom:var(--digi--global--spacing--largest-4) !important}.digi--util--pb--50{padding-bottom:2.5rem !important}.digi--util--pb--60{padding-bottom:var(--digi--global--spacing--largest-5) !important}.digi--util--pb--70{padding-bottom:var(--digi--global--spacing--largest-6) !important}.digi--util--pb--80{padding-bottom:4.5rem !important}.digi--util--pb--90{padding-bottom:5rem !important}.digi--util--p--1{padding:var(--digi--global--spacing--smallest-2) !important}.digi--util--p--10{padding:var(--digi--global--spacing--smallest) !important}.digi--util--p--20{padding:var(--digi--global--spacing--base) !important}.digi--util--p--30{padding:var(--digi--global--spacing--largest-2) !important}.digi--util--p--40{padding:var(--digi--global--spacing--largest-4) !important}.digi--util--p--50{padding:2.5rem !important}.digi--util--p--60{padding:var(--digi--global--spacing--largest-5) !important}.digi--util--p--70{padding:var(--digi--global--spacing--largest-6) !important}.digi--util--p--80{padding:4.5rem !important}.digi--util--p--90{padding:5rem !important}.digi--util--ptb--1{padding-top:var(--digi--global--spacing--smallest-2) !important;padding-bottom:var(--digi--global--spacing--smallest-2) !important}.digi--util--ptb--10{padding-top:var(--digi--global--spacing--smallest) !important;padding-bottom:var(--digi--global--spacing--smallest) !important}.digi--util--ptb--20{padding-top:var(--digi--global--spacing--base) !important;padding-bottom:var(--digi--global--spacing--base) !important}.digi--util--ptb--30{padding-top:var(--digi--global--spacing--largest-2) !important;padding-bottom:var(--digi--global--spacing--largest-2) !important}.digi--util--ptb--40{padding-top:var(--digi--global--spacing--largest-4) !important;padding-bottom:var(--digi--global--spacing--largest-4) !important}.digi--util--ptb--50{padding-top:2.5rem !important;padding-bottom:2.5rem !important}.digi--util--ptb--60{padding-top:var(--digi--global--spacing--largest-5) !important;padding-bottom:var(--digi--global--spacing--largest-5) !important}.digi--util--ptb--70{padding-top:var(--digi--global--spacing--largest-6) !important;padding-bottom:var(--digi--global--spacing--largest-6) !important}.digi--util--ptb--80{padding-top:4.5rem !important;padding-bottom:4.5rem !important}.digi--util--ptb--90{padding-top:5rem !important;padding-bottom:5rem !important}.digi--util--plr--1{padding-left:var(--digi--global--spacing--smallest-2) !important;padding-right:var(--digi--global--spacing--smallest-2) !important}.digi--util--plr--10{padding-left:var(--digi--global--spacing--smallest) !important;padding-right:var(--digi--global--spacing--smallest) !important}.digi--util--plr--20{padding-left:var(--digi--global--spacing--base) !important;padding-right:var(--digi--global--spacing--base) !important}.digi--util--plr--30{padding-left:var(--digi--global--spacing--largest-2) !important;padding-right:var(--digi--global--spacing--largest-2) !important}.digi--util--plr--40{padding-left:var(--digi--global--spacing--largest-4) !important;padding-right:var(--digi--global--spacing--largest-4) !important}.digi--util--plr--50{padding-left:2.5rem !important;padding-right:2.5rem !important}.digi--util--plr--60{padding-left:var(--digi--global--spacing--largest-5) !important;padding-right:var(--digi--global--spacing--largest-5) !important}.digi--util--plr--70{padding-left:var(--digi--global--spacing--largest-6) !important;padding-right:var(--digi--global--spacing--largest-6) !important}.digi--util--plr--80{padding-left:4.5rem !important;padding-right:4.5rem !important}.digi--util--plr--90{padding-left:5rem !important;padding-right:5rem !important}.digi--util--sr-only{border:0;clip:rect(1px, 1px, 1px, 1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.digi--util--hidden{display:none}digi-typography{--digi--typography--h1--margin--small:var(--digi--margin--h1-small);--digi--typography--h1--margin--medium:var(--digi--margin--h1-medium);--digi--typography--h1--margin--large:var(--digi--margin--h1-large);--digi--typography--h2--margin--small:var(--digi--margin--h2-small);--digi--typography--h2--margin--large:var(--digi--margin--h2-large);--digi--typography--h3--margin--small:var(--digi--margin--h3-small);--digi--typography--h3--margin--large:var(--digi--margin--h3-large);--digi--typography--h4--margin--small:var(--digi--margin--h4-h6-small);--digi--typography--h4--margin--large:var(--digi--margin--h4-h6-large);--digi--typography--h5--margin--small:var(--digi--margin--h4-h6-small);--digi--typography--h6--margin--large:var(--digi--margin--h4-h6-large);--digi--typography--paragraph--margin--small:var(--digi--margin--text-small);--digi--typography--paragraph--margin--large:var(--digi--margin--text-large);--digi--typography--paragraph--margin-top:initial;--digi--typography--color--text:var(--digi--color--text--primary);--digi--typography--text-decoration-thickness--hover:0.156em;--digi--typography--text-decoration-thickness--default:0.05em;--digi--typography--text-underline-offset:3px;font-family:var(--digi--global--typography--font-family--default);color:var(--digi--typography--color--text);--FONT-SIZE--BODY:var(--digi--typography--body--font-size--mobile);--LINE-HEIGHT--BODY:var(--digi--typography--body--line-height--mobile);--FONT-WEIGHT--BODY:var(--digi--typography--body--font-weight--mobile);--TEXT-DECORATION--BODY:var(\n --digi--typography--body--text-decoration--mobile\n );--MARGIN--BODY:var(--digi--typography--paragraph--margin--small);--FONT-SIZE--LINK:var(--digi--typography--link--font-size--mobile);--LINE-HEIGHT--LINK:var(--digi--typography--link--line-height--mobile);--FONT-WEIGHT--LINK:var(--digi--typography--link--font-weight--mobile);--TEXT-DECORATION--LINK:var(\n --digi--typography--link--text-decoration--mobile\n );--FONT-SIZE--HEADING-1:var(--digi--typography--heading-1--font-size--mobile);--LINE-HEIGHT--HEADING-1:var(\n --digi--typography--heading-1--line-height--mobile\n );--FONT-WEIGHT--HEADING-1:var(\n --digi--typography--heading-1--font-weight--mobile\n );--TEXT-DECORATION--HEADING-1:var(\n --digi--typography--heading-1--text-decoration--mobile\n );--MARGIN--HEADING-1:var(--digi--typography--h1--margin--small);--FONT-SIZE--HEADING-2:var(--digi--typography--heading-2--font-size--mobile);--LINE-HEIGHT--HEADING-2:var(\n --digi--typography--heading-2--line-height--mobile\n );--FONT-WEIGHT--HEADING-2:var(\n --digi--typography--heading-2--font-weight--mobile\n );--TEXT-DECORATION--HEADING-2:var(\n --digi--typography--heading-2--text-decoration--mobile\n );--MARGIN--HEADING-2:var(--digi--typography--h2--margin--small);--FONT-SIZE--HEADING-3:var(--digi--typography--heading-3--font-size--mobile);--LINE-HEIGHT--HEADING-3:var(\n --digi--typography--heading-3--line-height--mobile\n );--FONT-WEIGHT--HEADING-3:var(\n --digi--typography--heading-3--font-weight--mobile\n );--TEXT-DECORATION--HEADING-3:var(\n --digi--typography--heading-3--text-decoration--mobile\n );--MARGIN--HEADING-3:var(--digi--typography--h3--margin--small);--FONT-SIZE--HEADING-4:var(--digi--typography--heading-4--font-size--mobile);--LINE-HEIGHT--HEADING-4:var(\n --digi--typography--heading-4--line-height--mobile\n );--FONT-WEIGHT--HEADING-4:var(\n --digi--typography--heading-4--font-weight--mobile\n );--TEXT-DECORATION--HEADING-4:var(\n --digi--typography--heading-4--text-decoration--mobile\n );--MARGIN--HEADING-4:var(--digi--typography--h4--margin--small);--FONT-SIZE--HEADING-5:var(--digi--typography--heading-4--font-size--mobile);--LINE-HEIGHT--HEADING-5:var(\n --digi--typography--heading-4--line-height--mobile\n );--FONT-WEIGHT--HEADING-5:var(\n --digi--typography--heading-4--font-weight--mobile\n );--TEXT-DECORATION--HEADING-5:var(\n --digi--typography--heading-4--text-decoration--mobile\n );--MARGIN--HEADING-5:var(--digi--typography--h4--margin--small);--FONT-SIZE--HEADING-6:var(--digi--typography--heading-4--font-size--mobile);--LINE-HEIGHT--HEADING-6:var(\n --digi--typography--heading-4--line-height--mobile\n );--FONT-WEIGHT--HEADING-6:var(\n --digi--typography--heading-4--font-weight--mobile\n );--TEXT-DECORATION--HEADING-6:var(\n --digi--typography--heading-4--text-decoration--mobile\n );--MARGIN--HEADING-6:var(--digi--typography--h4--margin--small);font-size:var(--FONT-SIZE--BODY);line-height:var(--LINE-HEIGHT--BODY);font-weight:var(--FONT-WEIGHT--BODY);text-decoration:var(--TEXT-DECORATION--BODY)}@media (min-width: 62rem){digi-typography{--FONT-SIZE--BODY:var(--digi--typography--body--font-size--desktop);--LINE-HEIGHT--BODY:var(--digi--typography--body--line-height--desktop);--FONT-WEIGHT--BODY:var(--digi--typography--body--font-weight--desktop);--TEXT-DECORATION--BODY:var(\n --digi--typography--body--text-decoration--desktop\n );--MARGIN--BODY:var(--digi--typography--paragraph--margin--small);--FONT-SIZE--LINK:var(--digi--typography--link--font-size--desktop);--LINE-HEIGHT--LINK:var(--digi--typography--link--line-height--desktop);--FONT-WEIGHT--LINK:var(--digi--typography--link--font-weight--desktop);--TEXT-DECORATION--LINK:var(\n --digi--typography--link--text-decoration--desktop\n );--FONT-SIZE--HEADING-1:var(\n --digi--typography--heading-1--font-size--desktop\n );--LINE-HEIGHT--HEADING-1:var(\n --digi--typography--heading-1--line-height--desktop\n );--FONT-WEIGHT--HEADING-1:var(\n --digi--typography--heading-1--font-weight--desktop\n );--TEXT-DECORATION--HEADING-1:var(\n --digi--typography--heading-1--text-decoration--desktop\n );--MARGIN--HEADING-1:var(--digi--typography--h1--margin--medium);--FONT-SIZE--HEADING-2:var(\n --digi--typography--heading-2--font-size--desktop\n );--LINE-HEIGHT--HEADING-2:var(\n --digi--typography--heading-2--line-height--desktop\n );--FONT-WEIGHT--HEADING-2:var(\n --digi--typography--heading-2--font-weight--desktop\n );--TEXT-DECORATION--HEADING-2:var(\n --digi--typography--heading-2--text-decoration--desktop\n );--MARGIN--HEADING-2:var(--digi--typography--h2--margin--small);--FONT-SIZE--HEADING-3:var(\n --digi--typography--heading-3--font-size--desktop\n );--LINE-HEIGHT--HEADING-3:var(\n --digi--typography--heading-3--line-height--desktop\n );--FONT-WEIGHT--HEADING-3:var(\n --digi--typography--heading-3--font-weight--desktop\n );--TEXT-DECORATION--HEADING-3:var(\n --digi--typography--heading-3--text-decoration--desktop\n );--MARGIN--HEADING-3:var(--digi--typography--h3--margin--small);--FONT-SIZE--HEADING-4:var(\n --digi--typography--heading-4--font-size--desktop\n );--LINE-HEIGHT--HEADING-4:var(\n --digi--typography--heading-4--line-height--desktop\n );--FONT-WEIGHT--HEADING-4:var(\n --digi--typography--heading-4--font-weight--desktop\n );--TEXT-DECORATION--HEADING-4:var(\n --digi--typography--heading-4--text-decoration--desktop\n );--MARGIN--HEADING-4:var(--digi--typography--h4--margin--small);--FONT-SIZE--HEADING-5:var(\n --digi--typography--heading-4--font-size--desktop\n );--LINE-HEIGHT--HEADING-5:var(\n --digi--typography--heading-4--line-height--desktop\n );--FONT-WEIGHT--HEADING-5:var(\n --digi--typography--heading-4--font-weight--desktop\n );--TEXT-DECORATION--HEADING-5:var(\n --digi--typography--heading-4--text-decoration--desktop\n );--MARGIN--HEADING-5:var(--digi--typography--h5--margin--small);--FONT-SIZE--HEADING-6:var(\n --digi--typography--heading-4--font-size--desktop\n );--LINE-HEIGHT--HEADING-6:var(\n --digi--typography--heading-4--line-height--desktop\n );--FONT-WEIGHT--HEADING-6:var(\n --digi--typography--heading-4--font-weight--desktop\n );--TEXT-DECORATION--HEADING-6:var(\n --digi--typography--heading-4--text-decoration--desktop\n );--MARGIN--HEADING-6:var(--digi--typography--h6--margin--small)}}digi-typography .digi-typography--large{--FONT-SIZE--BODY:var(--digi--typography--body--font-size--desktop);--LINE-HEIGHT--BODY:var(--digi--typography--body--line-height--desktop);--FONT-WEIGHT--BODY:var(--digi--typography--body--font-weight--desktop);--TEXT-DECORATION--BODY:var(\n --digi--typography--body--text-decoration--desktop\n );--MARGIN--BODY:var(--digi--typography--paragraph--margin--small);--FONT-SIZE--LINK:var(--digi--typography--link--font-size--desktop);--LINE-HEIGHT--LINK:var(--digi--typography--link--line-height--desktop);--FONT-WEIGHT--LINK:var(--digi--typography--link--font-weight--desktop);--TEXT-DECORATION--LINK:var(\n --digi--typography--link--text-decoration--desktop\n );--FONT-SIZE--HEADING-1:var(\n --digi--typography--heading-1--font-size--desktop\n );--LINE-HEIGHT--HEADING-1:var(\n --digi--typography--heading-1--line-height--desktop\n );--FONT-WEIGHT--HEADING-1:var(\n --digi--typography--heading-1--font-weight--desktop\n );--TEXT-DECORATION--HEADING-1:var(\n --digi--typography--heading-1--text-decoration--desktop\n );--MARGIN--HEADING-1:var(--digi--typography--h1--margin--medium);--FONT-SIZE--HEADING-2:var(\n --digi--typography--heading-2--font-size--desktop\n );--LINE-HEIGHT--HEADING-2:var(\n --digi--typography--heading-2--line-height--desktop\n );--FONT-WEIGHT--HEADING-2:var(\n --digi--typography--heading-2--font-weight--desktop\n );--TEXT-DECORATION--HEADING-2:var(\n --digi--typography--heading-2--text-decoration--desktop\n );--MARGIN--HEADING-2:var(--digi--typography--h2--margin--small);--FONT-SIZE--HEADING-3:var(\n --digi--typography--heading-3--font-size--desktop\n );--LINE-HEIGHT--HEADING-3:var(\n --digi--typography--heading-3--line-height--desktop\n );--FONT-WEIGHT--HEADING-3:var(\n --digi--typography--heading-3--font-weight--desktop\n );--TEXT-DECORATION--HEADING-3:var(\n --digi--typography--heading-3--text-decoration--desktop\n );--MARGIN--HEADING-3:var(--digi--typography--h3--margin--small);--FONT-SIZE--HEADING-4:var(\n --digi--typography--heading-4--font-size--desktop\n );--LINE-HEIGHT--HEADING-4:var(\n --digi--typography--heading-4--line-height--desktop\n );--FONT-WEIGHT--HEADING-4:var(\n --digi--typography--heading-4--font-weight--desktop\n );--TEXT-DECORATION--HEADING-4:var(\n --digi--typography--heading-4--text-decoration--desktop\n );--MARGIN--HEADING-4:var(--digi--typography--h4--margin--small);--FONT-SIZE--HEADING-5:var(\n --digi--typography--heading-4--font-size--desktop\n );--LINE-HEIGHT--HEADING-5:var(\n --digi--typography--heading-4--line-height--desktop\n );--FONT-WEIGHT--HEADING-5:var(\n --digi--typography--heading-4--font-weight--desktop\n );--TEXT-DECORATION--HEADING-5:var(\n --digi--typography--heading-4--text-decoration--desktop\n );--MARGIN--HEADING-5:var(--digi--typography--h5--margin--small);--FONT-SIZE--HEADING-6:var(\n --digi--typography--heading-4--font-size--desktop\n );--LINE-HEIGHT--HEADING-6:var(\n --digi--typography--heading-4--line-height--desktop\n );--FONT-WEIGHT--HEADING-6:var(\n --digi--typography--heading-4--font-weight--desktop\n );--TEXT-DECORATION--HEADING-6:var(\n --digi--typography--heading-4--text-decoration--desktop\n );--MARGIN--HEADING-6:var(--digi--typography--h6--margin--small)}@media (min-width: 62rem){digi-typography .digi-typography--large{--FONT-SIZE--BODY:var(--digi--typography--body--font-size--desktop-large);--LINE-HEIGHT--BODY:var(\n --digi--typography--body--line-height--desktop-large\n );--FONT-WEIGHT--BODY:var(\n --digi--typography--body--font-weight--desktop-large\n );--TEXT-DECORATION--BODY:var(\n --digi--typography--body--text-decoration--desktop-large\n );--MARGIN--BODY:var(--digi--typography--paragraph--margin--large);--FONT-SIZE--LINK:var(--digi--typography--link--font-size--desktop-large);--LINE-HEIGHT--LINK:var(\n --digi--typography--link--line-height--desktop-large\n );--FONT-WEIGHT--LINK:var(\n --digi--typography--link--font-weight--desktop-large\n );--TEXT-DECORATION--LINK:var(\n --digi--typography--link--text-decoration--desktop-large\n );--FONT-SIZE--HEADING-1:var(\n --digi--typography--heading-1--font-size--desktop-large\n );--LINE-HEIGHT--HEADING-1:var(\n --digi--typography--heading-1--line-height--desktop-large\n );--FONT-WEIGHT--HEADING-1:var(\n --digi--typography--heading-1--font-weight--desktop-large\n );--TEXT-DECORATION--HEADING-1:var(\n --digi--typography--heading-1--text-decoration--desktop-large\n );--MARGIN--HEADING-1:var(--digi--typography--h1--margin--large);--FONT-SIZE--HEADING-2:var(\n --digi--typography--heading-2--font-size--desktop-large\n );--LINE-HEIGHT--HEADING-2:var(\n --digi--typography--heading-2--line-height--desktop-large\n );--FONT-WEIGHT--HEADING-2:var(\n --digi--typography--heading-2--font-weight--desktop-large\n );--TEXT-DECORATION--HEADING-2:var(\n --digi--typography--heading-2--text-decoration--desktop-large\n );--MARGIN--HEADING-2:var(--digi--typography--h2--margin--large);--FONT-SIZE--HEADING-3:var(\n --digi--typography--heading-3--font-size--desktop-large\n );--LINE-HEIGHT--HEADING-3:var(\n --digi--typography--heading-3--line-height--desktop-large\n );--FONT-WEIGHT--HEADING-3:var(\n --digi--typography--heading-3--font-weight--desktop-large\n );--TEXT-DECORATION--HEADING-3:var(\n --digi--typography--heading-3--text-decoration--desktop-large\n );--MARGIN--HEADING-3:var(--digi--typography--h3--margin--large);--FONT-SIZE--HEADING-4:var(\n --digi--typography--heading-4--font-size--desktop-large\n );--LINE-HEIGHT--HEADING-4:var(\n --digi--typography--heading-4--line-height--desktop-large\n );--FONT-WEIGHT--HEADING-4:var(\n --digi--typography--heading-4--font-weight--desktop-large\n );--TEXT-DECORATION--HEADING-4:var(\n --digi--typography--heading-4--text-decoration--desktop-large\n );--MARGIN--HEADING-4:var(--digi--typography--h4--margin--large);--FONT-SIZE--HEADING-5:var(\n --digi--typography--heading-4--font-size--desktop-large\n );--LINE-HEIGHT--HEADING-5:var(\n --digi--typography--heading-4--line-height--desktop-large\n );--FONT-WEIGHT--HEADING-5:var(\n --digi--typography--heading-4--font-weight--desktop-large\n );--TEXT-DECORATION--HEADING-5:var(\n --digi--typography--heading-4--text-decoration--desktop-large\n );--MARGIN--HEADING-5:var(--digi--typography--h5--margin--large);--FONT-SIZE--HEADING-6:var(\n --digi--typography--heading-4--font-size--desktop-large\n );--LINE-HEIGHT--HEADING-6:var(\n --digi--typography--heading-4--line-height--desktop-large\n );--FONT-WEIGHT--HEADING-6:var(\n --digi--typography--heading-4--font-weight--desktop-large\n );--TEXT-DECORATION--HEADING-6:var(\n --digi--typography--heading-4--text-decoration--desktop-large\n );--MARGIN--HEADING-6:var(--digi--typography--h6--margin--large)}}digi-typography .digi-typography--hide-visited a:visited{color:var(--digi--color--text--link-secondary, var(--digi--color--text--link))}digi-typography h1,digi-typography h2,digi-typography h3,digi-typography h4,digi-typography h5,digi-typography h6{margin-top:0;}digi-typography h1,digi-typography .digi-h1{font-size:var(--FONT-SIZE--HEADING-1);line-height:var(--LINE-HEIGHT--HEADING-1);font-weight:var(--FONT-WEIGHT--HEADING-1);text-decoration:var(--TEXT-DECORATION--HEADING-1);margin-bottom:var(--MARGIN--HEADING-1)}digi-typography h2,digi-typography .digi-h2{font-size:var(--FONT-SIZE--HEADING-2);line-height:var(--LINE-HEIGHT--HEADING-2);font-weight:var(--FONT-WEIGHT--HEADING-2);text-decoration:var(--TEXT-DECORATION--HEADING-2);margin-bottom:var(--MARGIN--HEADING-2)}digi-typography h3,digi-typography .digi-h3{font-size:var(--FONT-SIZE--HEADING-3);line-height:var(--LINE-HEIGHT--HEADING-3);font-weight:var(--FONT-WEIGHT--HEADING-3);text-decoration:var(--TEXT-DECORATION--HEADING-3);margin-bottom:var(--MARGIN--HEADING-3)}digi-typography h4,digi-typography .digi-h4{font-size:var(--FONT-SIZE--HEADING-4);line-height:var(--LINE-HEIGHT--HEADING-4);font-weight:var(--FONT-WEIGHT--HEADING-4);text-decoration:var(--TEXT-DECORATION--HEADING-4);margin-bottom:var(--MARGIN--HEADING-4)}digi-typography h5,digi-typography .digi-h5{font-size:var(--FONT-SIZE--HEADING-5);line-height:var(--LINE-HEIGHT--HEADING-5);font-weight:var(--FONT-WEIGHT--HEADING-5);text-decoration:var(--TEXT-DECORATION--HEADING-5);margin-bottom:var(--MARGIN--HEADING-5)}digi-typography h6,digi-typography .digi-h6{font-size:var(--FONT-SIZE--HEADING-6);line-height:var(--LINE-HEIGHT--HEADING-6);font-weight:var(--FONT-WEIGHT--HEADING-6);text-decoration:var(--TEXT-DECORATION--HEADING-6);margin-bottom:var(--MARGIN--HEADING-6)}digi-typography p,digi-typography blockquote{font-size:var(--FONT-SIZE--BODY);line-height:var(--LINE-HEIGHT--BODY);font-weight:var(--FONT-WEIGHT--BODY);text-decoration:var(--TEXT-DECORATION--BODY);margin-top:initial;margin-bottom:var(--MARGIN--BODY);max-width:var(--digi--paragraph-width--medium)}digi-typography p:last-child,digi-typography blockquote:last-child{margin-bottom:0}digi-typography blockquote{margin-inline:0}digi-typography digi-typography-preamble{display:block;margin-bottom:var(--MARGIN--BODY)}digi-typography digi-typography-preamble:last-child{margin-bottom:0}digi-typography ul,digi-typography ol,digi-typography dl{font-size:var(--FONT-SIZE--BODY);line-height:var(--LINE-HEIGHT--BODY);font-weight:var(--FONT-WEIGHT--BODY);text-decoration:var(--TEXT-DECORATION--BODY);max-width:var(--digi--paragraph-width--medium);margin-bottom:var(--MARGIN--BODY)}digi-typography ul:last-child,digi-typography ol:last-child,digi-typography dl:last-child{margin-bottom:0}digi-typography a{font-size:1em;line-height:var(--LINE-HEIGHT--LINK);font-weight:inherit;text-decoration:var(--TEXT-DECORATION--LINK);color:var(--digi--color--text--link-secondary, var(--digi--color--text--link));text-decoration-thickness:var(--digi--typography--text-decoration-thickness--default);text-underline-offset:var(--digi--typography--text-underline-offset)}digi-typography a:hover{text-decoration:var(--TEXT-DECORATION--LINK);text-decoration-thickness:var(--digi--typography--text-decoration-thickness--hover)}digi-typography a:focus-visible{outline:2px solid black;outline-offset:2px;box-shadow:0px 0px 0px 5px white}digi-typography a:visited{color:var(--digi--color--text--link-secondary-visited, var(--digi--color--text--link-visited))}digi-typography strong{font-weight:var(--digi--typography--label--font-weight--desktop)}";
|
|
2500
445
|
const DigiTypographyStyle0 = typographyCss;
|
|
@@ -2513,9 +458,9 @@ const Typography = class {
|
|
|
2513
458
|
};
|
|
2514
459
|
}
|
|
2515
460
|
render() {
|
|
2516
|
-
return (h("div", { key: '
|
|
461
|
+
return (h("div", { key: 'd4c7dde696cb9e4f629649c2d12e5b015c7aa713', class: Object.assign({ 'digi-typography': true }, this.cssModifiers) }, h("slot", { key: '4512f6b74ec58c3f04437c6ef598eb1d3625d347' })));
|
|
2517
462
|
}
|
|
2518
463
|
};
|
|
2519
464
|
Typography.style = DigiTypographyStyle0;
|
|
2520
465
|
|
|
2521
|
-
export { Button as digi_button,
|
|
466
|
+
export { Button as digi_button, ContextMenu as digi_context_menu, IconCheck as digi_icon_check, IconChevronDown as digi_icon_chevron_down, LayoutContainer as digi_layout_container, Typography as digi_typography };
|