@icij/murmur-next 4.0.0 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -19
- package/dist/lib/components/AccordionStep.vue.d.ts +79 -0
- package/dist/lib/components/AccordionWrapper.vue.d.ts +33 -0
- package/dist/lib/components/ActiveTextTruncate.vue.d.ts +101 -0
- package/dist/lib/components/AdvancedLinkForm.vue.d.ts +168 -0
- package/dist/lib/components/Brand.vue.d.ts +55 -0
- package/dist/lib/components/BrandExpansion.vue.d.ts +105 -0
- package/dist/lib/components/ConfirmButton.vue.d.ts +158 -0
- package/dist/lib/components/ContentPlaceholder.vue.d.ts +44 -0
- package/dist/lib/components/CustomPagination.vue.d.ts +130 -0
- package/dist/lib/components/DigitsInput.vue.d.ts +66 -0
- package/dist/lib/components/DonateForm.vue.d.ts +46 -0
- package/dist/lib/components/EmbedForm.vue.d.ts +121 -0
- package/dist/lib/components/EmbeddableFooter.vue.d.ts +103 -0
- package/dist/lib/components/FollowUsPopover.vue.d.ts +16 -0
- package/dist/lib/components/GenericFooter.vue.d.ts +47 -0
- package/dist/lib/components/GenericHeader.vue.d.ts +928 -0
- package/dist/lib/components/HapticCopy.vue.d.ts +156 -0
- package/dist/lib/components/ImddbHeader.vue.d.ts +960 -0
- package/dist/lib/components/OrdinalLegend.vue.d.ts +87 -0
- package/dist/lib/components/RangePicker.vue.d.ts +196 -0
- package/dist/lib/components/ResponsiveIframe.vue.d.ts +45 -0
- package/dist/lib/components/ScaleLegend.vue.d.ts +101 -0
- package/dist/lib/components/SecretInput.vue.d.ts +99 -0
- package/dist/lib/components/SelectableDropdown.vue.d.ts +210 -0
- package/dist/lib/components/SharingOptions.vue.d.ts +153 -0
- package/dist/lib/components/SharingOptionsLink.vue.d.ts +200 -0
- package/dist/lib/components/SignUpForm.vue.d.ts +141 -0
- package/dist/lib/components/SlideUpDown.vue.d.ts +74 -0
- package/dist/lib/components/TexturedDeck.vue.d.ts +89 -0
- package/dist/lib/components/TinyPagination.vue.d.ts +188 -0
- package/dist/lib/composables/chart.d.ts +48 -0
- package/dist/lib/composables/resizeObserver.d.ts +22 -0
- package/dist/lib/composables/sendEmail.d.ts +6 -0
- package/dist/lib/config.d.ts +19 -0
- package/dist/lib/config.default.d.ts +34 -0
- package/dist/lib/datavisualisations/BarChart.vue.d.ts +234 -0
- package/dist/lib/datavisualisations/ColumnChart.vue.d.ts +404 -0
- package/dist/lib/datavisualisations/LineChart.vue.d.ts +200 -0
- package/dist/lib/datavisualisations/StackedBarChart.vue.d.ts +342 -0
- package/dist/lib/datavisualisations/StackedColumnChart.vue.d.ts +412 -0
- package/dist/lib/enums.d.ts +32 -0
- package/dist/lib/i18n.d.ts +4 -0
- package/dist/lib/keys.d.ts +2 -0
- package/dist/lib/main.d.ts +52 -0
- package/dist/lib/maps/ChoroplethMap.vue.d.ts +460 -0
- package/dist/lib/maps/ChoroplethMapAnnotation.vue.d.ts +188 -0
- package/dist/lib/maps/SymbolMap.vue.d.ts +276 -0
- package/dist/lib/murmur.css +1 -0
- package/dist/lib/murmur.js +44661 -0
- package/dist/lib/murmur.js.map +1 -0
- package/dist/lib/murmur.umd.cjs +837 -0
- package/dist/lib/murmur.umd.cjs.map +1 -0
- package/dist/lib/types.d.ts +44 -0
- package/dist/lib/utils/animation.d.ts +8 -0
- package/dist/lib/utils/assets.d.ts +2 -0
- package/dist/lib/utils/clipboard.d.ts +2 -0
- package/dist/lib/utils/iframe-resizer.d.ts +10 -0
- package/dist/lib/utils/placeholder.d.ts +12 -0
- package/dist/lib/utils/placeholderTypes.d.ts +18 -0
- package/dist/lib/utils/strings.d.ts +1 -0
- package/lib/components/AccordionStep.vue +53 -42
- package/lib/components/AccordionWrapper.vue +25 -24
- package/lib/components/ActiveTextTruncate.vue +44 -22
- package/lib/components/AdvancedLinkForm.vue +96 -46
- package/lib/components/Brand.vue +30 -23
- package/lib/components/BrandExpansion.vue +12 -3
- package/lib/components/ConfirmButton.vue +30 -26
- package/lib/components/ContentPlaceholder.vue +11 -7
- package/lib/components/CustomPagination.vue +50 -32
- package/lib/components/DigitsInput.vue +64 -60
- package/lib/components/DonateForm.vue +112 -83
- package/lib/components/EmbedForm.vue +37 -21
- package/lib/components/EmbeddableFooter.vue +14 -10
- package/lib/components/FollowUsPopover.vue +42 -40
- package/lib/components/GenericFooter.vue +98 -23
- package/lib/components/GenericHeader.vue +66 -29
- package/lib/components/HapticCopy.vue +41 -29
- package/lib/components/ImddbHeader.vue +113 -92
- package/lib/components/OrdinalLegend.vue +43 -20
- package/lib/components/RangePicker.vue +63 -42
- package/lib/components/ResponsiveIframe.vue +9 -2
- package/lib/components/ScaleLegend.vue +56 -18
- package/lib/components/SecretInput.vue +7 -8
- package/lib/components/SelectableDropdown.vue +119 -74
- package/lib/components/SharingOptions.vue +93 -36
- package/lib/components/SharingOptionsLink.vue +11 -5
- package/lib/components/SignUpForm.vue +44 -23
- package/lib/components/SlideUpDown.vue +7 -2
- package/lib/components/TexturedDeck.vue +24 -14
- package/lib/components/TinyPagination.vue +35 -22
- package/lib/composables/chart.ts +174 -157
- package/lib/composables/resizeObserver.ts +29 -29
- package/lib/composables/sendEmail.ts +53 -42
- package/lib/config.default.ts +17 -10
- package/lib/config.ts +34 -27
- package/lib/datavisualisations/BarChart.vue +48 -42
- package/lib/datavisualisations/ColumnChart.vue +133 -89
- package/lib/datavisualisations/LineChart.vue +79 -57
- package/lib/datavisualisations/StackedBarChart.vue +116 -68
- package/lib/datavisualisations/StackedColumnChart.vue +196 -115
- package/lib/enums.ts +25 -15
- package/lib/i18n.ts +3 -3
- package/lib/keys.ts +2 -2
- package/lib/main.ts +14 -10
- package/lib/maps/ChoroplethMap.vue +299 -160
- package/lib/maps/ChoroplethMapAnnotation.vue +29 -18
- package/lib/maps/SymbolMap.vue +194 -123
- package/lib/shims-bootstrap-vue.d.ts +1 -1
- package/lib/shims-vue.d.ts +3 -3
- package/lib/styles/functions.scss +10 -6
- package/lib/styles/lib.scss +2 -4
- package/lib/styles/mixins.scss +8 -8
- package/lib/styles/utilities.scss +1 -1
- package/lib/styles/variables.scss +24 -18
- package/lib/types.ts +26 -10
- package/lib/utils/animation.ts +4 -4
- package/lib/utils/assets.ts +31 -28
- package/lib/utils/clipboard.ts +16 -10
- package/lib/utils/iframe-resizer.ts +18 -13
- package/lib/utils/placeholder.ts +54 -23
- package/lib/utils/placeholderTypes.ts +3 -3
- package/package.json +21 -2
- package/.github/workflows/deploy-github-pages.yaml +0 -50
- package/.storybook/app.scss +0 -14
- package/.storybook/doc_variables.scss +0 -20
- package/.storybook/main.ts +0 -35
- package/.storybook/preview-head.html +0 -2
- package/.storybook/preview.ts +0 -32
- package/deploy.js +0 -15
- package/docs/components/ApiTable.vue +0 -171
- package/docs/components/App.vue +0 -146
- package/docs/components/CollapsibleBlock.vue +0 -122
- package/docs/components/DocsHeader.vue +0 -68
- package/docs/components/DocsMenu.vue +0 -201
- package/docs/components/DocsMenuSection.vue +0 -109
- package/docs/components/EditLink.vue +0 -49
- package/docs/components/OutboundLink.vue +0 -13
- package/docs/components/PalettePresenter.vue +0 -96
- package/docs/components/RepositoryLink.vue +0 -28
- package/docs/components/SampleCard.vue +0 -119
- package/docs/main.js +0 -42
- package/docs/pages/components/accordion/doc.md +0 -96
- package/docs/pages/components/active-text-truncate/doc.md +0 -44
- package/docs/pages/components/advanced-link-form/doc.md +0 -105
- package/docs/pages/components/brand/doc.md +0 -30
- package/docs/pages/components/brand-expansion/doc.md +0 -70
- package/docs/pages/components/confirm-button/doc.md +0 -91
- package/docs/pages/components/content-placeholder/doc.md +0 -16
- package/docs/pages/components/custom-pagination/doc.md +0 -61
- package/docs/pages/components/digits-input/doc.md +0 -28
- package/docs/pages/components/donate-form/doc.md +0 -20
- package/docs/pages/components/embed-form/doc.md +0 -22
- package/docs/pages/components/embeddable-footer/doc.md +0 -60
- package/docs/pages/components/follow-us-popover/doc.md +0 -5
- package/docs/pages/components/generic-footer/doc.md +0 -21
- package/docs/pages/components/generic-header/doc.md +0 -24
- package/docs/pages/components/haptic-copy/doc.md +0 -27
- package/docs/pages/components/imddb-header/doc.md +0 -23
- package/docs/pages/components/ordinal-legend/doc.md +0 -44
- package/docs/pages/components/range-picker/doc.md +0 -86
- package/docs/pages/components/responsive-iframe/doc.md +0 -13
- package/docs/pages/components/scale-legend/doc.md +0 -65
- package/docs/pages/components/secret-input/doc.md +0 -12
- package/docs/pages/components/selectable-dropdown/doc.md +0 -156
- package/docs/pages/components/sharing-options/doc.md +0 -13
- package/docs/pages/components/sharing-options-link/doc.md +0 -36
- package/docs/pages/components/sign-up-form/doc.md +0 -13
- package/docs/pages/components/slide-up-down/doc.md +0 -28
- package/docs/pages/components/textured-deck/doc.md +0 -78
- package/docs/pages/components/tiny-pagination/doc.md +0 -92
- package/docs/pages/datavisualisation/bars/doc.md +0 -110
- package/docs/pages/datavisualisation/columns/doc.md +0 -165
- package/docs/pages/datavisualisation/lines/doc.md +0 -139
- package/docs/pages/datavisualisation/stacked-bar/doc.md +0 -160
- package/docs/pages/datavisualisation/stacked-column/doc.md +0 -191
- package/docs/pages/getting-started/about-icij/doc.md +0 -13
- package/docs/pages/getting-started/custom-bootstrap/doc.md +0 -36
- package/docs/pages/getting-started/installation-guide/doc.md +0 -59
- package/docs/pages/getting-started/internationalization/doc.md +0 -74
- package/docs/pages/maps/choropleth-map/doc.md +0 -420
- package/docs/pages/maps/choropleth-map-annotation/doc.md +0 -373
- package/docs/pages/maps/symbol-map/doc.md +0 -203
- package/docs/pages/structure/breakpoints/doc.md +0 -3
- package/docs/pages/structure/grid/doc.md +0 -3
- package/docs/pages/utilities/assets/doc.md +0 -138
- package/docs/pages/utilities/config/doc.md +0 -52
- package/docs/pages/utilities/iframes/doc.md +0 -3
- package/docs/pages/visual/colors/doc.md +0 -31
- package/docs/pages/visual/iconography/doc.md +0 -56
- package/docs/pages/visual/states/doc.md +0 -77
- package/docs/pages/visual/themes/doc.md +0 -3
- package/docs/pages/visual/typography/doc.md +0 -71
- package/docs/routes.js +0 -25
- package/docs/store/index.js +0 -21
- package/docs/styles/app.scss +0 -36
- package/docs/styles/variables.scss +0 -20
- package/loaders/highlight-loader.js +0 -13
- package/loaders/markdown-loader.js +0 -91
- package/loaders/metadata-loader.js +0 -18
- package/loaders/sass-extract-loader.js +0 -14
- package/loaders/vue-docgen-loader.js +0 -14
- package/plugins/MdPluginTypes.ts +0 -10
- package/plugins/docs.ts +0 -50
- package/plugins/front-matter.ts +0 -36
- package/plugins/highlight.ts +0 -27
- package/plugins/markdown-it/api-table.ts +0 -25
- package/plugins/markdown-it/sample-card.ts +0 -31
- package/plugins/plugin-delete.ts +0 -47
- package/plugins/plugin-docgen.ts +0 -23
- package/plugins/sass-vars.ts +0 -25
- package/plugins/vue-docgen.ts +0 -29
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/assets/img/arrow-bottom.svg +0 -3
- package/public/assets/img/texture-brick-black.jpg +0 -0
- package/public/assets/img/texture-brick.jpg +0 -0
- package/public/assets/img/texture-carbon-black.jpg +0 -0
- package/public/assets/img/texture-carbon.jpg +0 -0
- package/public/assets/img/texture-crack-black.jpg +0 -0
- package/public/assets/img/texture-crack.jpg +0 -0
- package/public/assets/img/texture-rock-black.jpg +0 -0
- package/public/assets/img/texture-rock.jpg +0 -0
- package/public/assets/img/texture-sand-black.jpg +0 -0
- package/public/assets/img/texture-sand.jpg +0 -0
- package/public/assets/img/texture-silk-black.jpg +0 -0
- package/public/assets/img/texture-silk.jpg +0 -0
- package/public/assets/topojson/france-departments.json +0 -1
- package/public/assets/topojson/paris-arrondissements.json +0 -1
- package/public/assets/topojson/world-countries-sans-antarctica.json +0 -1
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/site.webmanifest +0 -1
- package/stories/assets/code-brackets.svg +0 -1
- package/stories/assets/colors.svg +0 -1
- package/stories/assets/comments.svg +0 -1
- package/stories/assets/direction.svg +0 -1
- package/stories/assets/flow.svg +0 -1
- package/stories/assets/plugin.svg +0 -1
- package/stories/assets/repo.svg +0 -1
- package/stories/assets/stackalt.svg +0 -1
- package/stories/getting-started/about-icij.mdx +0 -14
- package/stories/getting-started/custom-bootstrap.mdx +0 -23
- package/stories/getting-started/installation-guide.mdx +0 -62
- package/stories/getting-started/internationalization.mdx +0 -63
- package/stories/murmur/components/AccordionStep.stories.ts +0 -33
- package/stories/murmur/components/AccordionWrapper.stories.ts +0 -69
- package/stories/murmur/components/ActiveTextTruncate.stories.ts +0 -32
- package/stories/murmur/components/AdvancedLinkForm.stories.ts +0 -77
- package/stories/murmur/components/Brand.stories.ts +0 -30
- package/stories/murmur/components/BrandExpansion.stories.ts +0 -41
- package/stories/murmur/components/ConfirmButton.stories.ts +0 -40
- package/stories/murmur/components/ContentPlaceholder.stories.ts +0 -41
- package/stories/murmur/components/CustomPagination.stories.ts +0 -42
- package/stories/murmur/components/DigitsInput.stories.ts +0 -29
- package/stories/murmur/components/DonateForm.stories.ts +0 -29
- package/stories/murmur/components/EmbedForm.stories.ts +0 -35
- package/stories/murmur/components/EmbeddableFooter.stories.ts +0 -59
- package/stories/murmur/components/FollowUsPopover.stories.ts +0 -24
- package/stories/murmur/components/GenericFooter.stories.ts +0 -27
- package/stories/murmur/components/GenericHeader.stories.ts +0 -27
- package/stories/murmur/components/HapticCopy.stories.ts +0 -40
- package/stories/murmur/components/ImddbHeader.stories.ts +0 -27
- package/stories/murmur/components/OrdinalLegend.stories.ts +0 -49
- package/stories/murmur/components/RangePicker.stories.ts +0 -98
- package/stories/murmur/components/ResponsiveIframe.stories.ts +0 -24
- package/stories/murmur/components/ScaleLegend.stories.ts +0 -65
- package/stories/murmur/components/SecretInput.stories.ts +0 -60
- package/stories/murmur/components/SelectableDropdown.stories.ts +0 -143
- package/stories/murmur/components/SharingOptions.stories.ts +0 -32
- package/stories/murmur/components/SharingOptionsLink.stories.ts +0 -53
- package/stories/murmur/components/SignUpForm.stories.ts +0 -51
- package/stories/murmur/components/SlideUpDown.stories.ts +0 -32
- package/stories/murmur/components/TexturedDeck.stories.ts +0 -83
- package/stories/murmur/components/TinyPagination.stories.ts +0 -65
- package/stories/murmur/datavisualisations/BarChart.stories.ts +0 -54
- package/stories/murmur/datavisualisations/ColumnChart.stories.ts +0 -88
- package/stories/murmur/datavisualisations/LineChart.stories.ts +0 -139
- package/stories/murmur/datavisualisations/StackedBarChart.stories.ts +0 -199
- package/stories/murmur/datavisualisations/StackedColumnChart.stories.ts +0 -136
- package/stories/murmur/decorators.ts +0 -108
- package/stories/murmur/maps/ChoroplethMap.stories.ts +0 -440
- package/stories/murmur/maps/ChoroplethMapAnnotation.stories.ts +0 -26
- package/stories/murmur/maps/SymbolMap.stories.ts +0 -24
- package/stories/murmur/utils.ts +0 -7
- package/tests/unit/components/AccordionStep.spec.ts +0 -157
- package/tests/unit/components/AccordionWrapper.spec.ts +0 -57
- package/tests/unit/components/ActiveTextTruncate.spec.js +0 -30
- package/tests/unit/components/AdvancedLinkForm.spec.js +0 -124
- package/tests/unit/components/Brand.spec.js +0 -50
- package/tests/unit/components/ContentPlaceholder.spec.js +0 -29
- package/tests/unit/components/CustomPagination.spec.js +0 -72
- package/tests/unit/components/DigitsInput.spec.ts +0 -157
- package/tests/unit/components/DonateForm.spec.js +0 -149
- package/tests/unit/components/EmbedForm.spec.js +0 -108
- package/tests/unit/components/EmbeddableFooter.spec.js +0 -11
- package/tests/unit/components/Fa.spec.js +0 -18
- package/tests/unit/components/FollowUsPopover.spec.js +0 -29
- package/tests/unit/components/GenericFooter.spec.js +0 -29
- package/tests/unit/components/GenericHeader.spec.js +0 -104
- package/tests/unit/components/HapticCopy.spec.js +0 -123
- package/tests/unit/components/ImddbHeader.spec.js +0 -96
- package/tests/unit/components/OrdinalLegend.spec.js +0 -120
- package/tests/unit/components/RangePicker.spec.ts +0 -87
- package/tests/unit/components/ResponsiveIframe.spec.js +0 -20
- package/tests/unit/components/ScaleLegend.spec.js +0 -139
- package/tests/unit/components/SecretInput.spec.js +0 -81
- package/tests/unit/components/SelectableDropdown.spec.js +0 -160
- package/tests/unit/components/SharingOptions.spec.js +0 -125
- package/tests/unit/components/SharingOptionsLink.spec.js +0 -184
- package/tests/unit/components/SignUpForm.spec.js +0 -145
- package/tests/unit/components/SlideUpDown.spec.js +0 -59
- package/tests/unit/components/TinyPagination.spec.js +0 -46
- package/tests/unit/config.spec.js +0 -136
- package/tests/unit/datavisualisations/BarChart.spec.js +0 -63
- package/tests/unit/datavisualisations/ColumnChart.spec.js +0 -344
- package/tests/unit/datavisualisations/LineChart.spec.js +0 -155
- package/tests/unit/datavisualisations/StackedBarChart.spec.js +0 -294
- package/tests/unit/datavisualisations/StackedColumnChart.spec.js +0 -443
- package/tests/unit/i18n.spec.ts +0 -19
- package/tests/unit/main.spec.js +0 -82
- package/tests/unit/maps/ChoroplethMap.spec.js +0 -214
- package/tests/unit/maps/ChoroplethMapAnnotation.spec.ts +0 -186
- package/tests/unit/maps/SymbolMap.spec.js +0 -92
- package/tests/unit/require.spec.js +0 -22
- package/tests/unit/setup.js +0 -13
- package/tests/unit/utils/assets.spec.js +0 -61
- package/tests/unit/utils/clipboard.spec.js +0 -18
- package/tests/unit/utils/iframe-resizer.spec.js +0 -71
- package/tsconfig.json +0 -35
- package/vite.config.ts +0 -79
- package/vitest.config.ts +0 -19
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { TinyPagination } from "@/components";
|
|
2
|
-
import { StoryObj } from "@storybook/vue3";
|
|
3
|
-
import {Size} from "@/enums";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: 'Murmur/components/TinyPagination',
|
|
7
|
-
component: TinyPagination,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
argTypes: {
|
|
10
|
-
size:{control:"inline-radio",options:["sm","md","lg"]},
|
|
11
|
-
pages:{type:"number",min:0}
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
type Story = StoryObj<typeof TinyPagination>;
|
|
16
|
-
const Template: Story = (args: any) => ({
|
|
17
|
-
components: { TinyPagination },
|
|
18
|
-
setup() {
|
|
19
|
-
return { args };
|
|
20
|
-
},
|
|
21
|
-
template: '<TinyPagination v-bind="args" />',
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export const Default = Template.bind({});
|
|
25
|
-
Default.args = {
|
|
26
|
-
modelValue:1,
|
|
27
|
-
totalRows:200
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const Small = Template.bind({});
|
|
31
|
-
Small.args = {
|
|
32
|
-
modelValue:1,
|
|
33
|
-
perPage:10,
|
|
34
|
-
totalRows:200,
|
|
35
|
-
size:Size.sm
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const Medium = Template.bind({});
|
|
39
|
-
Medium.args = {
|
|
40
|
-
modelValue:1,
|
|
41
|
-
perPage:10,
|
|
42
|
-
totalRows:200,
|
|
43
|
-
size:Size.md
|
|
44
|
-
};
|
|
45
|
-
export const Large = Template.bind({});
|
|
46
|
-
Large.args = {
|
|
47
|
-
modelValue:1,
|
|
48
|
-
perPage:10,
|
|
49
|
-
totalRows:200,
|
|
50
|
-
size:Size.lg
|
|
51
|
-
};
|
|
52
|
-
export const HideNavigation = Template.bind({});
|
|
53
|
-
HideNavigation.args = {
|
|
54
|
-
modelValue:1,
|
|
55
|
-
perPage:10,
|
|
56
|
-
totalRows:200,
|
|
57
|
-
noNav:true
|
|
58
|
-
};
|
|
59
|
-
export const CompactMode = Template.bind({});
|
|
60
|
-
CompactMode.args = {
|
|
61
|
-
modelValue:1,
|
|
62
|
-
perPage:10,
|
|
63
|
-
totalRows:200,
|
|
64
|
-
compact : true
|
|
65
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { BarChart } from "@/datavisualisations";
|
|
2
|
-
import { StoryObj } from "@storybook/vue3";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Murmur/datavisualisations/BarChart',
|
|
6
|
-
component: BarChart,
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
argTypes: {
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
type Story = StoryObj<typeof BarChart>;
|
|
13
|
-
const Template: Story = (args: any) => ({
|
|
14
|
-
components: { BarChart },
|
|
15
|
-
setup() {
|
|
16
|
-
return { args };
|
|
17
|
-
},
|
|
18
|
-
template: `<BarChart v-bind="args" />`
|
|
19
|
-
});
|
|
20
|
-
const breastImplantDecorator=()=>({template:`
|
|
21
|
-
<h4>Breast implant patients kept in the dark about potential risks</h4>
|
|
22
|
-
<p class="text-muted">
|
|
23
|
-
More than 300 people around the world who responded to an ICIJ survey said they were not aware of the dangers of breast implants prior to their surgeries.
|
|
24
|
-
</p>
|
|
25
|
-
<story/>`})
|
|
26
|
-
export const Default = Template.bind({});
|
|
27
|
-
Default.decorators=[breastImplantDecorator]
|
|
28
|
-
Default.args = {
|
|
29
|
-
data:"https://gist.githubusercontent.com/pirhoo/2308336d5f067ef7d84fec348fd63e29/raw/c0135f11e54e757187163dd0722b149a456c64b1/bars-icij-survey.json"
|
|
30
|
-
};
|
|
31
|
-
const dataWithHighlight=[
|
|
32
|
-
{
|
|
33
|
-
"label": "Warned about local complications",
|
|
34
|
-
"value": 52
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"label": "Not warned",
|
|
38
|
-
"value": 42,
|
|
39
|
-
"highlight": true
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"label": "Warned thoroughly",
|
|
43
|
-
"value": 1
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"label": "Other",
|
|
47
|
-
"value": 6
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
export const Highlight = Template.bind({});
|
|
51
|
-
Highlight.decorators=[breastImplantDecorator]
|
|
52
|
-
Highlight.args = {
|
|
53
|
-
data:dataWithHighlight
|
|
54
|
-
};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import {ColumnChart} from "@/datavisualisations";
|
|
2
|
-
import {StoryObj} from "@storybook/vue3";
|
|
3
|
-
import {ref} from "vue";
|
|
4
|
-
import {humanReadableGb} from "../utils";
|
|
5
|
-
import {leakSizeDecorator} from "../decorators";
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Murmur/datavisualisations/ColumnChart',
|
|
9
|
-
component: ColumnChart,
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
argTypes: {}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
type Story = StoryObj<typeof ColumnChart>;
|
|
15
|
-
const Template: Story = (args: any) => ({
|
|
16
|
-
components: {ColumnChart},
|
|
17
|
-
setup() {
|
|
18
|
-
return {args};
|
|
19
|
-
},
|
|
20
|
-
template: `
|
|
21
|
-
<ColumnChart v-bind="args"/>`
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const fixedHeight = 300
|
|
25
|
-
const dataUrl = "https://gist.githubusercontent.com/pirhoo/259a1a5159db4a665d0c043fac71beef/raw/e74087b06cd12be2b2d3a8ca995730e38719cd4b/colums-incidents.json"
|
|
26
|
-
const discreteData = [
|
|
27
|
-
{leak: 'Paradise Papers', size: 1.4 * 1e3},
|
|
28
|
-
{leak: 'Panama Papers', size: 2.6 * 1e3},
|
|
29
|
-
{leak: 'Swiss Leaks', size: 3.3},
|
|
30
|
-
{leak: 'LuxLeaks', size: 4},
|
|
31
|
-
{leak: 'Offshore Leaks', size: 260}
|
|
32
|
-
]
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const leakInjuriesDecorator = () => ({
|
|
37
|
-
template: `
|
|
38
|
-
<h4>Breast implant companies buried evidence of injuries for years</h4>
|
|
39
|
-
<p class="text-muted">
|
|
40
|
-
Incidents were reported as routine events that did not require public disclosure. After the U.S. Food and Drug Administration tightened enforcement of its reporting rules in 2017, reports of injuries soared.
|
|
41
|
-
</p>
|
|
42
|
-
<story/>
|
|
43
|
-
<p class="text-muted small">
|
|
44
|
-
Note: 2018 data includes January to June. Source: U.S. Food and Drug Administration, ICIJ analysis
|
|
45
|
-
</p>`
|
|
46
|
-
})
|
|
47
|
-
export const Default = Template.bind({})
|
|
48
|
-
Default.decorators = [ leakInjuriesDecorator]
|
|
49
|
-
Default.args = {
|
|
50
|
-
data:dataUrl,
|
|
51
|
-
xAxisTickCollapse:true,
|
|
52
|
-
hover:true
|
|
53
|
-
}
|
|
54
|
-
export const TooltipSlot: Story = (args: any) => ({
|
|
55
|
-
components: {ColumnChart},
|
|
56
|
-
setup() {
|
|
57
|
-
return { args};
|
|
58
|
-
},
|
|
59
|
-
template: `
|
|
60
|
-
<column-chart v-bind="args">
|
|
61
|
-
<template #tooltip="{ datum: { leak, size } }">
|
|
62
|
-
<span>The {{ leak }} investigation is {{ args.yAxisTickFormat(size)}}</span>
|
|
63
|
-
</template>
|
|
64
|
-
</column-chart>`
|
|
65
|
-
});
|
|
66
|
-
TooltipSlot.decorators = [leakSizeDecorator]
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
TooltipSlot.args = {
|
|
70
|
-
data: discreteData,
|
|
71
|
-
seriesName: "size",
|
|
72
|
-
timeseriesKey: "leak",
|
|
73
|
-
yAxisTickFormat: humanReadableGb,
|
|
74
|
-
yAxisYTicks: 4,
|
|
75
|
-
maxValue: 3000
|
|
76
|
-
};
|
|
77
|
-
export const DynamicHeight = TooltipSlot.bind({})
|
|
78
|
-
const clicked=ref(null)
|
|
79
|
-
DynamicHeight.args = {
|
|
80
|
-
data: discreteData,
|
|
81
|
-
seriesName: "size",
|
|
82
|
-
timeseriesKey: "leak",
|
|
83
|
-
yAxisTickFormat: humanReadableGb,
|
|
84
|
-
yAxisYTicks: 4,
|
|
85
|
-
maxValue: 3000,
|
|
86
|
-
stripped:true,
|
|
87
|
-
fixedHeight:fixedHeight
|
|
88
|
-
}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { LineChart } from "@/datavisualisations";
|
|
2
|
-
import { StoryObj } from "@storybook/vue3";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: 'Murmur/datavisualisations/LineChart',
|
|
6
|
-
component: LineChart,
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
argTypes: {
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
type Story = StoryObj<typeof LineChart>;
|
|
13
|
-
const Template: Story = (args: any) => ({
|
|
14
|
-
components: { LineChart },
|
|
15
|
-
setup() {
|
|
16
|
-
return { args };
|
|
17
|
-
},
|
|
18
|
-
template: `<LineChart v-bind="args" />`
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const dataUrl="https://gist.githubusercontent.com/pirhoo/a2cdb6de5e3e816c0e9d80226806a688/raw/da3fdf3488d6bd68c6cfd9b89943b750ac65fd33/line-approvals.json"
|
|
22
|
-
const data =[
|
|
23
|
-
{
|
|
24
|
-
"date": "1995",
|
|
25
|
-
"value": 284.1733871
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"date": "1996",
|
|
29
|
-
"value": 262.2768595
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"date": "1997",
|
|
33
|
-
"value": 196.8200456
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"date": "1998",
|
|
37
|
-
"value": 162.8752475
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"date": "1999",
|
|
41
|
-
"value": 136.9506399
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"date": "2000",
|
|
45
|
-
"value": 124.3350877
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"date": "2001",
|
|
49
|
-
"value": 125.4939024
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"date": "2002",
|
|
53
|
-
"value": 122.1694656
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"date": "2003",
|
|
57
|
-
"value": 111.5
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"date": "2004",
|
|
61
|
-
"value": 127.8108974
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"date": "2005",
|
|
65
|
-
"value": 96.66352624
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"date": "2006",
|
|
69
|
-
"value": 94.98603352
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"date": "2007",
|
|
73
|
-
"value": 104.7544803
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"date": "2008",
|
|
77
|
-
"value": 100.3127517
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"date": "2009",
|
|
81
|
-
"value": 96.34450402
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"date": "2010",
|
|
85
|
-
"value": 85.1799458
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
"date": "2011",
|
|
89
|
-
"value": 96.70278777
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"date": "2012",
|
|
93
|
-
"value": 88.19991705
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"date": "2013",
|
|
97
|
-
"value": 79.83682187
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"date": "2014",
|
|
101
|
-
"value": 78.45282258
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"date": "2015",
|
|
105
|
-
"value": 84.64591978
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"date": "2016",
|
|
109
|
-
"value": 79.61724542
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"date": "2017",
|
|
113
|
-
"value": 68.62495399
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"date": "2018",
|
|
117
|
-
"value": 67.30243261
|
|
118
|
-
}
|
|
119
|
-
]
|
|
120
|
-
const leakDevicesDecorator = () => ({
|
|
121
|
-
template: `
|
|
122
|
-
<div class="d-flex align-items-baseline">
|
|
123
|
-
<h4>
|
|
124
|
-
High-risk devices are being approved faster in the US
|
|
125
|
-
</h4>
|
|
126
|
-
</div>
|
|
127
|
-
<p class="text-muted">
|
|
128
|
-
The average time that it takes the Food and Drug Administration to review and approve a device through its pre-market approval process has dropped by more than 200 days since 1996.
|
|
129
|
-
</p>
|
|
130
|
-
<story/>
|
|
131
|
-
<p class="text-muted small">
|
|
132
|
-
Note: This chart shows the time, in days, between an application being received by the FDA and the device being approved. Source: U.S. Food and Drug Administration, ICIJ and AP analysis
|
|
133
|
-
</p>`
|
|
134
|
-
})
|
|
135
|
-
export const Default = Template.bind({});
|
|
136
|
-
Default.decorators = [ leakDevicesDecorator]
|
|
137
|
-
Default.args = {
|
|
138
|
-
data:dataUrl
|
|
139
|
-
};
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { StackedBarChart } from "@/datavisualisations";
|
|
2
|
-
import { StoryObj } from "@storybook/vue3";
|
|
3
|
-
import {humanReadableGb} from "../utils";
|
|
4
|
-
import {h} from "vue";
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Murmur/datavisualisations/StackedBarChart',
|
|
8
|
-
component: StackedBarChart,
|
|
9
|
-
tags: ['autodocs'],
|
|
10
|
-
argTypes: {
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
type Story = StoryObj<typeof StackedBarChart>;
|
|
15
|
-
const Template: Story = (args: any) => ({
|
|
16
|
-
components: { StackedBarChart },
|
|
17
|
-
setup() {
|
|
18
|
-
return { args };
|
|
19
|
-
},
|
|
20
|
-
template: `<StackedBarChart v-bind="args" >
|
|
21
|
-
{{args['header-right'].toString()}}
|
|
22
|
-
<template #header-left v-if="args['header-left']">${args['header-left']}</template>
|
|
23
|
-
<template #header-right v-if="args['header-right']!==null">${args['header-right']?.({sortBy:args.sortBy})??''}</template>
|
|
24
|
-
</StackedBarChart>`
|
|
25
|
-
});
|
|
26
|
-
const leakIncidentsDecorator = () => ({
|
|
27
|
-
template: `
|
|
28
|
-
<h4>
|
|
29
|
-
Medical device companies reported tens of thousands of incidents in 2017
|
|
30
|
-
</h4>
|
|
31
|
-
<p class="text-muted">
|
|
32
|
-
Companies must report when a patient has potentially been hurt or killed by one of their medical devices.
|
|
33
|
-
</p>
|
|
34
|
-
<story/>
|
|
35
|
-
<p class="text-muted small">
|
|
36
|
-
Note: The companies shown here are 10 of the biggest participants in the medical device industry. Numbers for Becton, Dickinson and Company include adverse events reported by C. R. Bard, which was acquired in 2017. Source: U.S. Food and Drug Administration, ICIJ analysis.
|
|
37
|
-
</p>
|
|
38
|
-
<p class="text-muted small">
|
|
39
|
-
Source: ICIJ.
|
|
40
|
-
</p>`
|
|
41
|
-
})
|
|
42
|
-
const data = {fixedHeight: 400,
|
|
43
|
-
incidentReports: [
|
|
44
|
-
{
|
|
45
|
-
"label":"Medtronic PLC",
|
|
46
|
-
"injury":71444,
|
|
47
|
-
"death":1828
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"label":"Abbott Laboratories",
|
|
51
|
-
"injury":40200,
|
|
52
|
-
"death":2816
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"label":"Johnson & Johnson",
|
|
56
|
-
"injury":25863,
|
|
57
|
-
"death":104
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"label":"Boston Scientific",
|
|
61
|
-
"injury":20509,
|
|
62
|
-
"death":725
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"label":"Zimmer Biomet Holdings",
|
|
66
|
-
"injury":15733,
|
|
67
|
-
"death":146
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"label":"Tandem Diabetes Care, Inc.",
|
|
71
|
-
"injury":13658,
|
|
72
|
-
"death":26
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"label":"Stryker",
|
|
76
|
-
"injury":5102,
|
|
77
|
-
"death":90
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"label":"Becton, Dickinson and Company",
|
|
81
|
-
"injury":3569,
|
|
82
|
-
"death":130
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"label":"DexCom, Inc.",
|
|
86
|
-
"injury":1198,
|
|
87
|
-
"death":25
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"label":"Philips",
|
|
91
|
-
"injury":450,
|
|
92
|
-
"death":268
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
moviesUrl: "https://gist.githubusercontent.com/pirhoo/20ce1b795555210c926967a291f8a7ad/raw/13d972b7d2b98b174c33fff38aac2b7d69c85fa7/stacked-bars-movies.json",
|
|
96
|
-
isRelative: true,
|
|
97
|
-
sortKeys: ['movie', 'budget', 'box_office'],
|
|
98
|
-
sortKey: ['movie'],
|
|
99
|
-
groups: ['Budget', 'Box Office'],
|
|
100
|
-
leakSizes: [
|
|
101
|
-
{ label: 'Paradise Papers', value: 1.4 * 1e3 },
|
|
102
|
-
{ label: 'Panama Papers', value: 2.6 * 1e3 },
|
|
103
|
-
{ label: 'Swiss Leaks', value: 3.3 },
|
|
104
|
-
{ label: 'LuxLeaks', value: 4 },
|
|
105
|
-
{ label: 'Offshore Leaks', value: 260 }
|
|
106
|
-
]}
|
|
107
|
-
export const Default = Template.bind({});
|
|
108
|
-
Default.decorators=[leakIncidentsDecorator]
|
|
109
|
-
Default.args = {
|
|
110
|
-
data:data.incidentReports,
|
|
111
|
-
};
|
|
112
|
-
export const LabelAbove = Template.bind({});
|
|
113
|
-
LabelAbove.decorators=[leakIncidentsDecorator]
|
|
114
|
-
LabelAbove.args = {
|
|
115
|
-
data:data.incidentReports,
|
|
116
|
-
labelAbove:true
|
|
117
|
-
};
|
|
118
|
-
const leaksSizeDecorator = () => ({
|
|
119
|
-
template: `
|
|
120
|
-
<h4>Leaks size</h4>
|
|
121
|
-
<p class="text-muted">
|
|
122
|
-
Size of each leak in GB.
|
|
123
|
-
</p>
|
|
124
|
-
<story/>`
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
export const FixedHeightHideLegend = Template.bind({});
|
|
128
|
-
FixedHeightHideLegend.decorators=[leaksSizeDecorator]
|
|
129
|
-
FixedHeightHideLegend.args = {
|
|
130
|
-
data:data.leakSizes,
|
|
131
|
-
fixedHeight:400,
|
|
132
|
-
xAxisTickFormat:humanReadableGb,
|
|
133
|
-
hideLegend:true
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
export const hideEmptyValues = Template.bind({});
|
|
138
|
-
hideEmptyValues.decorators=[]
|
|
139
|
-
hideEmptyValues.args = {
|
|
140
|
-
data:data.moviesUrl,
|
|
141
|
-
labelField:"movie",
|
|
142
|
-
groups:data.groups,
|
|
143
|
-
hideEmptyValues:true
|
|
144
|
-
};
|
|
145
|
-
export const sortByKey = Template.bind({});
|
|
146
|
-
sortByKey.decorators=[]
|
|
147
|
-
sortByKey.args = {
|
|
148
|
-
data:data.moviesUrl,
|
|
149
|
-
labelField:"movie",
|
|
150
|
-
sortBy:data.sortKey,
|
|
151
|
-
groups:data.groups,
|
|
152
|
-
};
|
|
153
|
-
sortByKey.argTypes={
|
|
154
|
-
sortBy:{control:"select",options:data.sortKeys}
|
|
155
|
-
}
|
|
156
|
-
export const relativeValues = Template.bind({});
|
|
157
|
-
relativeValues.decorators=[]
|
|
158
|
-
relativeValues.args = {
|
|
159
|
-
data:data.moviesUrl,
|
|
160
|
-
labelField:"movie",
|
|
161
|
-
sortBy:data.sortKey,
|
|
162
|
-
groups:data.groups,
|
|
163
|
-
relative:true
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
export const HeaderLeft = Template.bind({});
|
|
167
|
-
HeaderLeft.decorators=[leakIncidentsDecorator]
|
|
168
|
-
HeaderLeft.args = {
|
|
169
|
-
data:data.leakSizes,
|
|
170
|
-
fixedHeight:400,
|
|
171
|
-
xAxisTickFormat:humanReadableGb,
|
|
172
|
-
hideLegend:false,
|
|
173
|
-
'header-left':"<h1>Header Left</h1>",
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
HeaderLeft.argTypes={
|
|
177
|
-
sortBy:{control:"select",options:data.sortKeys}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export const HeaderRight = Template.bind({});
|
|
181
|
-
HeaderRight.decorators=[leakIncidentsDecorator]
|
|
182
|
-
HeaderRight.args = {
|
|
183
|
-
data:data.moviesUrl,
|
|
184
|
-
labelField:"movie",
|
|
185
|
-
sortBy:data.sortKey,
|
|
186
|
-
hideEmptyValues:true,
|
|
187
|
-
relative:true,
|
|
188
|
-
groups:data.groups,
|
|
189
|
-
hideLegend:true,
|
|
190
|
-
'header-right':({sortBy}:{sortBy:string})=>`<div class="ms-auto d-flex align-items-center p-0">
|
|
191
|
-
<label class="m-2 d-flex align-items-center">
|
|
192
|
-
Sort by ${sortBy}
|
|
193
|
-
</label>
|
|
194
|
-
</div>`
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
HeaderRight.argTypes={
|
|
198
|
-
sortBy:{control:"select",options:data.sortKeys}
|
|
199
|
-
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { StackedColumnChart } from "@/datavisualisations";
|
|
2
|
-
import { StoryObj } from "@storybook/vue3";
|
|
3
|
-
import {leakSizeDecorator} from "../decorators";
|
|
4
|
-
import {humanReadableGb} from "../utils";
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title: 'Murmur/datavisualisations/StackedColumnChart',
|
|
8
|
-
component: StackedColumnChart,
|
|
9
|
-
tags: ['autodocs'],
|
|
10
|
-
argTypes: {
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
type Story = StoryObj<typeof StackedColumnChart>;
|
|
15
|
-
const Template: Story = (args: any) => ({
|
|
16
|
-
components: { StackedColumnChart },
|
|
17
|
-
setup() {
|
|
18
|
-
return { args };
|
|
19
|
-
},
|
|
20
|
-
template: `<StackedColumnChart v-bind="args" />`
|
|
21
|
-
});
|
|
22
|
-
const data = {
|
|
23
|
-
incidentReportsUrl: 'https://gist.githubusercontent.com/pirhoo/4055e8d1ee3016805eaf1d2feabdd895/raw/a3d2ba8e9d19fcd9fc659dab50ec075248178238/stacked-colums-incidents.json',
|
|
24
|
-
incidentReportsGroups: ['Deaths', 'Injuries', 'Malfunctions'],
|
|
25
|
-
icijStaff: [
|
|
26
|
-
{ "city": "Washington DC", "developers": 1, "journalists": 6, "devops": 1, "finance": 1 },
|
|
27
|
-
{ "city": "Paris ", "developers": 5, "journalists": 1, "devops": 0, "finance": 0 },
|
|
28
|
-
{ "city": "Madrid ", "developers": 1, "journalists": 0, "devops": 4, "finance": 0 },
|
|
29
|
-
{ "city": "New York City", "developers": 0, "journalists": 3, "devops": 0, "finance": 1 },
|
|
30
|
-
{ "city": "Syndey", "developers": 0, "journalists": 2, "devops": 0, "finance": 1 },
|
|
31
|
-
],
|
|
32
|
-
leaksSize: [
|
|
33
|
-
{ leak: 'Offshore Leaks (2013)', size: 260 },
|
|
34
|
-
{ leak: 'Panama Papers (2016)', size: 2.6 * 1e3 },
|
|
35
|
-
{ leak: 'Paradise Papers (2017)', size: 1.4 * 1e3 }
|
|
36
|
-
]
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const leakIncidentsDecorator = () => ({
|
|
40
|
-
template: `
|
|
41
|
-
<h4>
|
|
42
|
-
Breast implant companies buried evidence of injuries for years
|
|
43
|
-
</h4>
|
|
44
|
-
<p class="text-muted">
|
|
45
|
-
Incidents were reported as routine events that did not require public disclosure. After the FDA tightened enforcement of its reporting rules in 2017, reports of injuries soared.
|
|
46
|
-
</p>
|
|
47
|
-
|
|
48
|
-
<story/>
|
|
49
|
-
<p class="text-muted small">
|
|
50
|
-
Source: U.S. Food and Drug Administration, ICIJ analysis
|
|
51
|
-
</p>`
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
const icijOfficesDecorator = () => ({
|
|
55
|
-
template: `
|
|
56
|
-
<h4>
|
|
57
|
-
ICIJ Staff by office
|
|
58
|
-
</h4>
|
|
59
|
-
<p class="text-muted">As of April 2021. This list is more or less accurate.</p>
|
|
60
|
-
<story/>
|
|
61
|
-
`
|
|
62
|
-
})
|
|
63
|
-
export const Default = Template.bind({});
|
|
64
|
-
Default.decorators=[leakIncidentsDecorator]
|
|
65
|
-
Default.args = {
|
|
66
|
-
data:data.incidentReportsUrl,
|
|
67
|
-
groups:data.incidentReportsGroups,
|
|
68
|
-
yAxisTickFormat:",.0f"
|
|
69
|
-
};
|
|
70
|
-
export const NoDirectLabeling = Template.bind({});
|
|
71
|
-
NoDirectLabeling.decorators=[leakIncidentsDecorator]
|
|
72
|
-
NoDirectLabeling.args = {
|
|
73
|
-
data:data.incidentReportsUrl,
|
|
74
|
-
groups:data.incidentReportsGroups,
|
|
75
|
-
noDirectLabeling:true
|
|
76
|
-
};
|
|
77
|
-
export const ColumnLabelField = Template.bind({});
|
|
78
|
-
ColumnLabelField.decorators=[icijOfficesDecorator]
|
|
79
|
-
ColumnLabelField.args = {
|
|
80
|
-
data:data.icijStaff,
|
|
81
|
-
labelField:"city",
|
|
82
|
-
};
|
|
83
|
-
export const HideEmptyValues = Template.bind({});
|
|
84
|
-
ColumnLabelField.decorators=[icijOfficesDecorator]
|
|
85
|
-
ColumnLabelField.args = {
|
|
86
|
-
data:data.icijStaff,
|
|
87
|
-
hideEmptyValues:true,
|
|
88
|
-
labelField:"city",
|
|
89
|
-
};
|
|
90
|
-
export const MaxValue = Template.bind({});
|
|
91
|
-
MaxValue.decorators=[icijOfficesDecorator]
|
|
92
|
-
MaxValue.args = {
|
|
93
|
-
data:data.icijStaff,
|
|
94
|
-
hideEmptyValues:true,
|
|
95
|
-
labelField:"city",
|
|
96
|
-
maxValue:"10",
|
|
97
|
-
};
|
|
98
|
-
export const NoTooltips = Template.bind({});
|
|
99
|
-
NoTooltips.decorators=[icijOfficesDecorator]
|
|
100
|
-
NoTooltips.args = {
|
|
101
|
-
data:data.icijStaff,
|
|
102
|
-
noTooltips:true,
|
|
103
|
-
hideEmptyValues:true,
|
|
104
|
-
labelField:"city",
|
|
105
|
-
maxValue:"10",
|
|
106
|
-
};
|
|
107
|
-
export const SingleValueProp = Template.bind({});
|
|
108
|
-
SingleValueProp.decorators=[leakSizeDecorator]
|
|
109
|
-
SingleValueProp.args = {
|
|
110
|
-
data:data.leaksSize,
|
|
111
|
-
yAxisTickFormat: humanReadableGb,
|
|
112
|
-
noTooltips:true,
|
|
113
|
-
labelField:"leak",
|
|
114
|
-
maxValue:"3000",
|
|
115
|
-
};
|
|
116
|
-
export const HideLegend = Template.bind({});
|
|
117
|
-
HideLegend.decorators=[leakSizeDecorator]
|
|
118
|
-
HideLegend.args = {
|
|
119
|
-
data:data.leaksSize,
|
|
120
|
-
yAxisTickFormat: humanReadableGb,
|
|
121
|
-
noTooltips:true,
|
|
122
|
-
labelField:"leak",
|
|
123
|
-
maxValue:"3000",
|
|
124
|
-
hideLegend:true
|
|
125
|
-
};
|
|
126
|
-
export const BarMaxWidth = Template.bind({});
|
|
127
|
-
BarMaxWidth.decorators=[leakSizeDecorator]
|
|
128
|
-
BarMaxWidth.args = {
|
|
129
|
-
data:data.leaksSize,
|
|
130
|
-
yAxisTickFormat: humanReadableGb,
|
|
131
|
-
noTooltips:true,
|
|
132
|
-
labelField:"leak",
|
|
133
|
-
maxValue:"3000",
|
|
134
|
-
barMaxWidth:"50%",
|
|
135
|
-
hideLegend:true
|
|
136
|
-
};
|