@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,10 +1,16 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import {computed, defineComponent, ref, Ref, toRef} from 'vue'
|
|
3
|
-
import {
|
|
2
|
+
import { computed, defineComponent, ref, Ref, toRef } from 'vue'
|
|
3
|
+
import {
|
|
4
|
+
BTabs,
|
|
5
|
+
BTab,
|
|
6
|
+
BInputGroup,
|
|
7
|
+
BInputGroupAppend,
|
|
8
|
+
BFormInput
|
|
9
|
+
} from 'bootstrap-vue-next'
|
|
4
10
|
|
|
5
11
|
import HapticCopy from './HapticCopy.vue'
|
|
6
12
|
|
|
7
|
-
import {useI18n} from
|
|
13
|
+
import { useI18n } from 'vue-i18n'
|
|
8
14
|
|
|
9
15
|
type AdvancedLinkedFormClassName = `${'advanced-link-form--'}${string}`
|
|
10
16
|
interface AdvancedLinkedFormClasses {
|
|
@@ -100,57 +106,65 @@ export default defineComponent({
|
|
|
100
106
|
type: Boolean
|
|
101
107
|
}
|
|
102
108
|
},
|
|
103
|
-
emits:[
|
|
104
|
-
setup(props,{emit}) {
|
|
109
|
+
emits: ['update:modelValue'],
|
|
110
|
+
setup(props, { emit }) {
|
|
105
111
|
const { t } = useI18n()
|
|
106
|
-
const rawInput = ref<HTMLTextAreaElement| null>(null)
|
|
107
|
-
const richInput = ref<HTMLElement|null>(null)
|
|
108
|
-
const markdownInput = ref<HTMLTextAreaElement| null>(null)
|
|
109
|
-
const htmlInput = ref<HTMLTextAreaElement| null>(null)
|
|
110
|
-
const titleOrLink = computed(() => props.title || props.link)
|
|
112
|
+
const rawInput = ref<HTMLTextAreaElement | null>(null)
|
|
113
|
+
const richInput = ref<HTMLElement | null>(null)
|
|
114
|
+
const markdownInput = ref<HTMLTextAreaElement | null>(null)
|
|
115
|
+
const htmlInput = ref<HTMLTextAreaElement | null>(null)
|
|
116
|
+
const titleOrLink = computed(() => props.title || props.link)
|
|
111
117
|
|
|
112
|
-
const linkAsMarkdown = computed(
|
|
118
|
+
const linkAsMarkdown = computed(
|
|
119
|
+
() => `[${titleOrLink.value}](${props.link})`
|
|
120
|
+
)
|
|
113
121
|
|
|
114
|
-
const linkAsHtml = computed(
|
|
122
|
+
const linkAsHtml = computed(
|
|
123
|
+
() => `<a href="${props.link}" target="_blank">${titleOrLink.value}</a>`
|
|
124
|
+
)
|
|
115
125
|
const formClasses = computed(() => {
|
|
116
|
-
const propsToCheck = ['card', 'pills', 'small', 'vertical']
|
|
126
|
+
const propsToCheck = ['card', 'pills', 'small', 'vertical']
|
|
117
127
|
return propsToCheck.reduce((classes, prop) => {
|
|
118
128
|
//@ts-ignore
|
|
119
|
-
classes[`advanced-link-form--${prop}`] = props[prop]
|
|
120
|
-
return classes
|
|
121
|
-
}, {})
|
|
122
|
-
})
|
|
129
|
+
classes[`advanced-link-form--${prop}`] = props[prop]
|
|
130
|
+
return classes
|
|
131
|
+
}, {})
|
|
132
|
+
})
|
|
123
133
|
|
|
124
|
-
const size = computed(() => props.small ? 'sm' : 'md')
|
|
134
|
+
const size = computed(() => (props.small ? 'sm' : 'md'))
|
|
125
135
|
|
|
126
|
-
const showForm
|
|
127
|
-
return (name:string) => props.forms.indexOf(name) > -1
|
|
136
|
+
const showForm = computed(() => {
|
|
137
|
+
return (name: string) => props.forms.indexOf(name) > -1
|
|
128
138
|
})
|
|
129
139
|
|
|
130
|
-
const selectInput = (target: Ref<HTMLElement|null>) => {
|
|
140
|
+
const selectInput = (target: Ref<HTMLElement | null>) => {
|
|
131
141
|
// if(!target.value){
|
|
132
142
|
// throw new Error("no target")
|
|
133
143
|
// }
|
|
134
144
|
if (target.value instanceof HTMLTextAreaElement) {
|
|
135
|
-
target.value.select()
|
|
145
|
+
target.value.select()
|
|
136
146
|
}
|
|
137
|
-
}
|
|
147
|
+
}
|
|
138
148
|
|
|
139
|
-
const selectRaw = () => selectInput(rawInput)
|
|
149
|
+
const selectRaw = () => selectInput(rawInput)
|
|
140
150
|
|
|
141
151
|
function selectRich() {
|
|
142
|
-
if (!richInput.value) return
|
|
152
|
+
if (!richInput.value) return
|
|
143
153
|
|
|
144
|
-
const selection = window.getSelection ? window.getSelection() : null
|
|
154
|
+
const selection = window.getSelection ? window.getSelection() : null
|
|
145
155
|
if (selection) {
|
|
146
|
-
const range = document.createRange()
|
|
147
|
-
range.selectNodeContents(richInput.value)
|
|
148
|
-
selection.removeAllRanges()
|
|
149
|
-
selection.addRange(range)
|
|
150
|
-
} else if (
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
range
|
|
156
|
+
const range = document.createRange()
|
|
157
|
+
range.selectNodeContents(richInput.value)
|
|
158
|
+
selection.removeAllRanges()
|
|
159
|
+
selection.addRange(range)
|
|
160
|
+
} else if (
|
|
161
|
+
(document.body as HTMLElementSupportingCreateRange).createTextRange
|
|
162
|
+
) {
|
|
163
|
+
const range = (
|
|
164
|
+
document.body as HTMLElementSupportingCreateRange
|
|
165
|
+
).createTextRange()
|
|
166
|
+
range.moveToElementText(richInput.value)
|
|
167
|
+
range.select()
|
|
154
168
|
}
|
|
155
169
|
}
|
|
156
170
|
function selectMarkdown() {
|
|
@@ -173,9 +187,8 @@ export default defineComponent({
|
|
|
173
187
|
selectRich,
|
|
174
188
|
selectMarkdown,
|
|
175
189
|
selectHtml
|
|
176
|
-
}
|
|
190
|
+
}
|
|
177
191
|
}
|
|
178
|
-
|
|
179
192
|
})
|
|
180
193
|
</script>
|
|
181
194
|
|
|
@@ -196,9 +209,19 @@ export default defineComponent({
|
|
|
196
209
|
<b-tab v-if="showForm('raw')" :title="t('advanced-link-form.raw.tab')">
|
|
197
210
|
<div class="advanced-link-form__raw" :class="{ small }">
|
|
198
211
|
<b-input-group :size="size">
|
|
199
|
-
<b-form-input
|
|
212
|
+
<b-form-input
|
|
213
|
+
ref="rawInput"
|
|
214
|
+
readonly
|
|
215
|
+
:model-value="link"
|
|
216
|
+
class="advanced-link-form__raw__input"
|
|
217
|
+
@click="selectRaw"
|
|
218
|
+
/>
|
|
200
219
|
<b-input-group-append>
|
|
201
|
-
<haptic-copy
|
|
220
|
+
<haptic-copy
|
|
221
|
+
class="btn-secondary"
|
|
222
|
+
:text="link"
|
|
223
|
+
@attempt="selectRaw"
|
|
224
|
+
/>
|
|
202
225
|
</b-input-group-append>
|
|
203
226
|
</b-input-group>
|
|
204
227
|
</div>
|
|
@@ -206,11 +229,21 @@ export default defineComponent({
|
|
|
206
229
|
<b-tab v-if="showForm('rich')" :title="t('advanced-link-form.rich.tab')">
|
|
207
230
|
<div class="advanced-link-form__rich" :class="{ small }">
|
|
208
231
|
<b-input-group :size="size">
|
|
209
|
-
<a
|
|
210
|
-
|
|
211
|
-
|
|
232
|
+
<a
|
|
233
|
+
ref="richInput"
|
|
234
|
+
:href="link"
|
|
235
|
+
class="form-control advanced-link-form__rich__input"
|
|
236
|
+
@click.prevent="selectRich"
|
|
237
|
+
>{{ titleOrLink }}</a
|
|
238
|
+
>
|
|
212
239
|
<b-input-group-append>
|
|
213
|
-
<haptic-copy
|
|
240
|
+
<haptic-copy
|
|
241
|
+
class="btn-secondary"
|
|
242
|
+
html
|
|
243
|
+
:text="linkAsHtml"
|
|
244
|
+
:plain="link"
|
|
245
|
+
@attempt="selectRich"
|
|
246
|
+
/>
|
|
214
247
|
</b-input-group-append>
|
|
215
248
|
</b-input-group>
|
|
216
249
|
<p class="text-muted mt-2 mb-0">
|
|
@@ -218,7 +251,10 @@ export default defineComponent({
|
|
|
218
251
|
</p>
|
|
219
252
|
</div>
|
|
220
253
|
</b-tab>
|
|
221
|
-
<b-tab
|
|
254
|
+
<b-tab
|
|
255
|
+
v-if="showForm('markdown')"
|
|
256
|
+
:title="t('advanced-link-form.markdown.tab')"
|
|
257
|
+
>
|
|
222
258
|
<div class="advanced-link-form__markdown" :class="{ small }">
|
|
223
259
|
<b-input-group :size="size">
|
|
224
260
|
<b-form-input
|
|
@@ -229,7 +265,11 @@ export default defineComponent({
|
|
|
229
265
|
@click="selectMarkdown"
|
|
230
266
|
/>
|
|
231
267
|
<b-input-group-append>
|
|
232
|
-
<haptic-copy
|
|
268
|
+
<haptic-copy
|
|
269
|
+
class="btn-secondary"
|
|
270
|
+
:text="linkAsMarkdown"
|
|
271
|
+
@attempt="selectMarkdown"
|
|
272
|
+
/>
|
|
233
273
|
</b-input-group-append>
|
|
234
274
|
</b-input-group>
|
|
235
275
|
<p class="text-muted mt-2 mb-0">
|
|
@@ -240,9 +280,19 @@ export default defineComponent({
|
|
|
240
280
|
<b-tab v-if="showForm('html')" :title="t('advanced-link-form.html.tab')">
|
|
241
281
|
<div class="advanced-link-form__html" :class="{ small }">
|
|
242
282
|
<b-input-group :size="size">
|
|
243
|
-
<b-form-input
|
|
283
|
+
<b-form-input
|
|
284
|
+
ref="htmlInput"
|
|
285
|
+
readonly
|
|
286
|
+
:modelValue="linkAsHtml"
|
|
287
|
+
class="advanced-link-form__html__input"
|
|
288
|
+
@click="selectHtml"
|
|
289
|
+
/>
|
|
244
290
|
<b-input-group-append>
|
|
245
|
-
<haptic-copy
|
|
291
|
+
<haptic-copy
|
|
292
|
+
class="btn-secondary"
|
|
293
|
+
:text="linkAsHtml"
|
|
294
|
+
@attempt="selectHtml"
|
|
295
|
+
/>
|
|
246
296
|
</b-input-group-append>
|
|
247
297
|
</b-input-group>
|
|
248
298
|
</div>
|
package/lib/components/Brand.vue
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span class="brand" :style="style" :class="{ 'brand--animated': animated }">
|
|
3
|
-
<svg
|
|
3
|
+
<svg
|
|
4
|
+
:width="width"
|
|
5
|
+
:height="height"
|
|
6
|
+
viewBox="0 0 147.151 200"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
>
|
|
4
9
|
<path class="triangle" d="M101.997 200H45.155l28.42-46.427z" />
|
|
5
10
|
<path
|
|
6
11
|
class="globe"
|
|
@@ -20,60 +25,62 @@
|
|
|
20
25
|
/**
|
|
21
26
|
* A component to create variations of ICIJ logo
|
|
22
27
|
*/
|
|
23
|
-
import {computed, ref} from 'vue'
|
|
24
|
-
import isString from
|
|
28
|
+
import { computed, ref } from 'vue'
|
|
29
|
+
import isString from 'lodash/isString'
|
|
25
30
|
|
|
26
31
|
interface BrandProps {
|
|
27
32
|
/**
|
|
28
33
|
* Add a balancing effect to the globe
|
|
29
34
|
*/
|
|
30
|
-
animated?: boolean
|
|
35
|
+
animated?: boolean
|
|
31
36
|
/**
|
|
32
37
|
* Monochromatic logo's color
|
|
33
38
|
*/
|
|
34
|
-
color?: string | null
|
|
39
|
+
color?: string | null
|
|
35
40
|
/**
|
|
36
41
|
* Logo's background color
|
|
37
42
|
*/
|
|
38
|
-
background?: string | null
|
|
43
|
+
background?: string | null
|
|
39
44
|
/**
|
|
40
45
|
* Logo's size
|
|
41
46
|
*/
|
|
42
|
-
size?: number | string
|
|
47
|
+
size?: number | string
|
|
43
48
|
/**
|
|
44
49
|
* Force the width of the logo to be the same as the height
|
|
45
50
|
*/
|
|
46
|
-
square?: boolean
|
|
51
|
+
square?: boolean
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
interface BrandStyle {
|
|
50
|
-
'--monochrome-color': string | null
|
|
51
|
-
color: string | null
|
|
52
|
-
background: string | null
|
|
53
|
-
width: string | number
|
|
55
|
+
'--monochrome-color': string | null
|
|
56
|
+
color: string | null
|
|
57
|
+
background: string | null
|
|
58
|
+
width: string | number
|
|
54
59
|
}
|
|
55
60
|
|
|
56
|
-
const props = withDefaults(defineProps<BrandProps>(),{
|
|
61
|
+
const props = withDefaults(defineProps<BrandProps>(), {
|
|
57
62
|
color: null,
|
|
58
|
-
background:null,
|
|
63
|
+
background: null,
|
|
59
64
|
size: '70px'
|
|
60
|
-
})
|
|
61
|
-
const sizeAsNumber = ref(
|
|
65
|
+
})
|
|
66
|
+
const sizeAsNumber = ref(
|
|
67
|
+
isString(props.size) ? parseInt(props.size) : props.size
|
|
68
|
+
)
|
|
62
69
|
|
|
63
|
-
const width = computed(() => `${(147.151 / 200) * sizeAsNumber.value}px`)
|
|
64
|
-
const height = computed(() => `${sizeAsNumber.value}px`)
|
|
70
|
+
const width = computed(() => `${(147.151 / 200) * sizeAsNumber.value}px`)
|
|
71
|
+
const height = computed(() => `${sizeAsNumber.value}px`)
|
|
65
72
|
|
|
66
73
|
const style = computed<BrandStyle>(() => {
|
|
67
|
-
const {square} = props
|
|
68
|
-
const widthValue = square ? height.value : 'auto'
|
|
74
|
+
const { square } = props
|
|
75
|
+
const widthValue = square ? height.value : 'auto'
|
|
69
76
|
|
|
70
77
|
return {
|
|
71
78
|
'--monochrome-color': props.color,
|
|
72
79
|
color: props.color,
|
|
73
80
|
background: props.background,
|
|
74
|
-
width: widthValue
|
|
75
|
-
}
|
|
76
|
-
})
|
|
81
|
+
width: widthValue
|
|
82
|
+
}
|
|
83
|
+
})
|
|
77
84
|
</script>
|
|
78
85
|
|
|
79
86
|
<style scoped lang="scss">
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
<span
|
|
3
3
|
class="brand-expansion"
|
|
4
4
|
:style="style"
|
|
5
|
-
:class="{
|
|
5
|
+
:class="{
|
|
6
|
+
'brand-expansion--dark': dark,
|
|
7
|
+
'brand-expansion--animated': animated
|
|
8
|
+
}"
|
|
6
9
|
>
|
|
7
10
|
<svg
|
|
8
11
|
v-if="mode === 'short'"
|
|
@@ -41,7 +44,10 @@
|
|
|
41
44
|
class="globe"
|
|
42
45
|
d="M 106.692 88.5051 C 107.819 82.8227 108.526 76.8189 108.786 70.6453 L 128.03 70.6453 C 127.431 76.8914 125.785 82.9146 123.168 88.5051 Z M 112.263 104.021 C 107.739 108.545 102.563 112.178 96.9466 114.835 C 97.8831 113.313 98.751 111.751 99.5476 110.152 C 101.244 106.76 102.725 103.064 103.979 99.1273 L 116.611 99.1273 C 115.259 100.842 113.807 102.476 112.263 104.021 M 78.8877 88.5051 L 78.8877 70.6453 L 98.1543 70.6453 C 97.8706 76.8889 97.0908 82.9061 95.8503 88.5051 Z M 90.0467 105.401 C 86.8083 111.879 82.915 116.431 78.8877 118.601 L 78.8877 99.1273 L 92.7543 99.1273 C 91.9656 101.266 91.0617 103.36 90.0467 105.401 M 57.1059 105.401 C 56.0908 103.36 55.187 101.266 54.3983 99.1273 L 68.2649 99.1273 L 68.2649 118.601 C 64.237 116.431 60.3442 111.879 57.1059 105.401 M 48.9983 70.6453 L 68.2649 70.6453 L 68.2649 88.5051 L 51.3023 88.5051 C 50.0617 82.9061 49.282 76.8889 48.9983 70.6453 M 34.8894 104.021 C 33.3454 102.476 31.8937 100.842 30.5419 99.1273 L 43.1735 99.1273 C 44.4274 103.064 45.9091 106.76 47.6043 110.152 C 48.4014 111.751 49.2695 113.313 50.206 114.835 C 44.5894 112.179 39.4128 108.545 34.8894 104.021 M 23.9842 88.5051 C 21.3679 82.9146 19.7213 76.8914 19.1229 70.6453 L 38.367 70.6453 C 38.6263 76.8189 39.3337 82.8227 40.4604 88.5051 Z M 40.4604 42.1627 C 39.3337 47.8451 38.6263 53.8489 38.367 60.0225 L 19.1229 60.0225 C 19.7213 53.7764 21.3679 47.7532 23.9842 42.1627 Z M 34.8894 26.647 C 39.4128 22.123 44.5894 18.4895 50.206 15.8331 C 49.2695 17.3545 48.4014 18.9171 47.6043 20.516 C 45.9091 23.9078 44.4274 27.6045 43.1735 31.5405 L 30.5419 31.5405 C 31.8938 29.8255 33.3455 28.1915 34.8894 26.647 M 68.2649 42.1627 L 68.2649 60.0225 L 48.9983 60.0225 C 49.282 53.7795 50.0617 47.7617 51.3023 42.1627 Z M 57.1059 25.267 C 60.3442 18.789 64.237 14.237 68.2649 12.0663 L 68.2649 31.5405 L 54.3983 31.5405 C 55.1869 29.402 56.0907 27.3078 57.1059 25.267 M 90.0467 25.267 C 91.0619 27.3078 91.9657 29.402 92.7543 31.5405 L 78.8877 31.5405 L 78.8877 12.0663 C 82.915 14.237 86.8083 18.789 90.0467 25.267 M 98.1543 60.0225 L 78.8877 60.0225 L 78.8877 42.1627 L 95.8503 42.1627 C 97.0908 47.7617 97.8706 53.7795 98.1543 60.0225 M 112.263 26.647 C 113.807 28.1916 115.259 29.8256 116.611 31.5405 L 103.979 31.5405 C 102.725 27.6045 101.244 23.9078 99.5476 20.516 C 98.751 18.9169 97.8831 17.3544 96.9466 15.8331 C 102.563 18.4895 107.739 22.1236 112.263 26.647 M 123.168 42.1627 C 125.785 47.7532 127.431 53.7764 128.03 60.0225 L 108.786 60.0225 C 108.526 53.8489 107.819 47.8451 106.692 42.1627 Z M 119.774 19.136 C 107.434 6.79604 91.0274 0.00028712 73.576 0.00028712 C 56.1246 0.00028712 39.7178 6.79604 27.3778 19.136 C 15.0384 31.476 8.24207 47.8828 8.24207 65.3336 C 8.24207 82.7856 15.0384 99.1924 27.3778 111.532 C 39.7178 123.872 56.1246 130.668 73.576 130.668 C 91.0274 130.668 107.434 123.872 119.774 111.532 C 132.114 99.1924 138.91 82.7856 138.91 65.3336 C 138.91 47.8828 132.114 31.476 119.774 19.136"
|
|
43
46
|
/>
|
|
44
|
-
<path
|
|
47
|
+
<path
|
|
48
|
+
class="plate"
|
|
49
|
+
d="M 2e-06 136.811 L 147.151 136.811 L 147.151 147.433 L 2e-06 147.433 Z"
|
|
50
|
+
/>
|
|
45
51
|
<path
|
|
46
52
|
class="main-text"
|
|
47
53
|
d="M187.413 29.944h27.076v140.112h-27.076zM233.817 161.737c-6.145-6.416-9.216-15.223-9.216-26.424V70.72c0-13.918 2.773-24.41 8.318-31.48 5.546-7.067 14.244-10.602 26.098-10.602 10.33 0 18.648 2.83 24.956 8.482 6.305 5.655 9.46 13.81 9.46 24.466v24.14h-27.892V65.013c0-4.021-.488-6.794-1.467-8.318-.98-1.522-2.666-2.284-5.057-2.284-2.502 0-4.215.872-5.138 2.61-.925 1.74-1.386 4.297-1.386 7.667v70.3c0 3.697.543 6.39 1.63 8.073 1.087 1.688 2.717 2.528 4.894 2.528 4.348 0 6.524-3.532 6.524-10.602v-25.282h28.218v26.424c0 23.488-11.8 35.232-35.394 35.232-10.223 0-18.406-3.206-24.548-9.623M301.752 29.944h27.076v140.112h-27.076zM353.782 167.609c-5.22-2.5-9.326-6.17-12.315-11.01-2.992-4.837-4.485-10.684-4.485-17.534l-.001-29.344h27.566v27.712c0 2.503.515 4.486 1.55 5.954 1.032 1.469 2.635 2.202 4.811 2.202 2.065 0 3.614-.678 4.65-2.039 1.03-1.358 1.548-3.287 1.548-5.79V29.944h28.219v105.043c0 7.286-1.443 13.676-4.323 19.166-2.882 5.491-6.906 9.732-12.07 12.722-5.166 2.992-11.066 4.485-17.697 4.485-6.418 0-12.233-1.251-17.453-3.751"
|
|
@@ -64,7 +70,10 @@
|
|
|
64
70
|
class="globe"
|
|
65
71
|
d="M 106.691 88.5051 C 107.818 82.8227 108.526 76.8189 108.785 70.6453 L 128.029 70.6453 C 127.431 76.8914 125.784 82.9146 123.168 88.5051 Z M 112.262 104.021 C 107.739 108.545 102.563 112.178 96.9465 114.835 C 97.883 113.313 98.7509 111.751 99.5475 110.152 C 101.243 106.76 102.725 103.064 103.978 99.1273 L 116.611 99.1273 C 115.259 100.842 113.807 102.476 112.263 104.021 M 78.887 88.5051 L 78.887 70.6453 L 98.1536 70.6453 C 97.8699 76.8889 97.0901 82.9061 95.8502 88.5051 Z M 90.046 105.401 C 86.8076 111.879 82.9143 116.431 78.887 118.601 L 78.887 99.1273 L 92.7536 99.1273 C 91.9649 101.266 91.061 103.36 90.046 105.401 M 57.1052 105.401 C 56.0901 103.36 55.1863 101.266 54.3976 99.1273 L 68.2642 99.1273 L 68.2642 118.601 C 64.2363 116.431 60.3435 111.879 57.1052 105.401 M 48.9976 70.6453 L 68.2642 70.6453 L 68.2642 88.5051 L 51.3028 88.5051 C 50.0623 82.9061 49.2819 76.8889 48.9988 70.6453 M 34.8899 104.021 C 33.3459 102.476 31.8942 100.842 30.5424 99.1273 L 43.1734 99.1273 C 44.4273 103.064 45.9096 106.76 47.6049 110.152 C 48.4019 111.751 49.27 113.313 50.2065 114.835 C 44.5899 112.179 39.4133 108.545 34.8899 104.021 M 23.9841 88.5051 C 21.3678 82.9146 19.7212 76.8914 19.1229 70.6453 L 38.3669 70.6453 C 38.6262 76.8189 39.3336 82.8227 40.4609 88.5051 Z M 40.4603 42.1627 C 39.3342 47.8451 38.6262 53.8489 38.3669 60.0225 L 19.1229 60.0225 C 19.7212 53.7764 21.3678 47.7532 23.9841 42.1627 Z M 34.8893 26.647 C 39.4127 22.123 44.5893 18.4895 50.2059 15.8331 C 49.2694 17.3545 48.4013 18.9171 47.6043 20.516 C 45.909 23.9078 44.4273 27.6045 43.1734 31.5405 L 30.5424 31.5405 C 31.8943 29.8255 33.346 28.1915 34.8899 26.647 M 68.2648 42.1627 L 68.2648 60.0225 L 48.9988 60.0225 C 49.2819 53.7795 50.0617 47.7617 51.3022 42.1627 Z M 57.1064 25.267 C 60.3448 18.789 64.2375 14.237 68.2654 12.0663 L 68.2654 31.5405 L 54.3988 31.5405 C 55.1872 29.402 56.0908 27.3078 57.1058 25.267 M 90.0466 25.267 C 91.0618 27.3078 91.9656 29.402 92.7542 31.5405 L 78.8876 31.5405 L 78.8876 12.0663 C 82.9149 14.237 86.8083 18.789 90.0466 25.267 M 98.1548 60.0225 L 78.8876 60.0225 L 78.8876 42.1627 L 95.8502 42.1627 C 97.0908 47.7617 97.8711 53.7795 98.1542 60.0225 M 112.263 26.647 C 113.807 28.1916 115.258 29.8256 116.611 31.5405 L 103.978 31.5405 C 102.725 27.6045 101.243 23.9078 99.5475 20.516 C 98.7509 18.9169 97.883 17.3544 96.9465 15.8331 C 102.563 18.4895 107.739 22.1236 112.263 26.647 M 123.169 42.1627 C 125.785 47.7532 127.431 53.7764 128.03 60.0225 L 108.786 60.0225 C 108.526 53.8489 107.819 47.8451 106.692 42.1627 Z M 119.775 19.136 C 107.434 6.79604 91.0273 0.00028712 73.5759 0.00028712 C 56.1245 0.00028712 39.7177 6.79604 27.3777 19.136 C 15.0389 31.476 8.24198 47.8828 8.24198 65.3336 C 8.24198 82.7856 15.0383 99.1924 27.3777 111.532 C 39.7177 123.872 56.1245 130.668 73.5759 130.668 C 91.0279 130.668 107.434 123.872 119.774 111.532 C 132.114 99.1924 138.91 82.7856 138.91 65.3336 C 138.91 47.8828 132.114 31.476 119.774 19.136"
|
|
66
72
|
/>
|
|
67
|
-
<path
|
|
73
|
+
<path
|
|
74
|
+
class="plate"
|
|
75
|
+
d="M -8.72e-05 136.811 L 147.151 136.811 L 147.151 147.433 L -8.72e-05 147.433 Z"
|
|
76
|
+
/>
|
|
68
77
|
<path
|
|
69
78
|
class="main-text"
|
|
70
79
|
d="M203.5 25.928h12.66v65.517H203.5zM220.118 91.445V25.928h13.5l6.026 31.348V25.928h12.661v65.517h-12.814l-6.559-32.796v32.796ZM263.073 91.445V38.513h-7.78V25.928h28.678v12.585h-7.78v52.932ZM286.96 91.445V25.928h26.237V38.59h-12.89v12.737h12.357v12.357h-12.357v15.024h13.73v12.738ZM333.813 50.183c1.83 0 2.745-1.984 2.745-5.95 0-1.728-.075-3.025-.228-3.89-.152-.864-.433-1.46-.839-1.792-.408-.33-.992-.495-1.755-.495h-3.05v12.127Zm-16.475-24.255h20.136c3.204 0 5.682.724 7.437 2.174 1.753 1.45 2.936 3.484 3.546 6.102.61 2.619.916 5.962.916 10.03 0 3.712-.485 6.61-1.45 8.694-.966 2.086-2.644 3.535-5.034 4.348 1.984.408 3.42 1.4 4.309 2.974.89 1.577 1.336 3.713 1.336 6.408l-.153 24.787h-12.814V65.818c0-1.83-.357-2.999-1.068-3.508-.712-.508-2.01-.763-3.89-.763v29.898h-13.271zM352.712 91.445V25.928h13.5l6.026 31.348V25.928H384.9v65.517h-12.815l-6.56-32.796v32.796ZM402.592 70.394h5.95l-2.898-33.33h-.61Zm-14.491 21.051 6.33-65.517h22.195l6.255 65.517h-12.433l-.915-10.601H401.6l-.762 10.601zM430.148 91.445V38.513h-7.78V25.928h28.678v12.585h-7.78v52.932ZM453.761 25.928h12.661v65.517h-12.66zM488.616 78.479c.407-1.017.611-2.441.611-4.27V42.173c0-1.423-.19-2.58-.572-3.47-.382-.89-1.158-1.335-2.327-1.335-2.187 0-3.279 1.653-3.279 4.957v31.958c0 1.881.228 3.306.687 4.272.457.966 1.296 1.448 2.517 1.448 1.168 0 1.956-.507 2.363-1.525m-14.414 8.733c-2.747-3.228-4.12-7.767-4.12-13.614V42.403c0-5.644 1.373-9.902 4.12-12.776 2.745-2.872 6.761-4.31 12.05-4.31 5.288 0 9.305 1.438 12.052 4.31 2.745 2.873 4.118 7.132 4.118 12.776v31.195c0 5.898-1.373 10.449-4.118 13.653-2.747 3.203-6.764 4.805-12.051 4.805-5.29 0-9.306-1.614-12.051-4.844M506.234 91.445V25.928h13.5l6.026 31.348V25.928h12.661v65.517h-12.814l-6.559-32.796v32.796ZM556.114 70.394h5.95l-2.898-33.33h-.61Zm-14.491 21.051 6.33-65.517h22.195l6.254 65.517H563.97l-.915-10.601h-7.932l-.763 10.601zM579.574 91.445V25.928h13.118V80.31h13.501v11.136ZM631.475 87.556c-2.873-3-4.308-7.119-4.308-12.356V44.996c0-6.508 1.296-11.414 3.89-14.72 2.592-3.305 6.659-4.958 12.202-4.958 4.83 0 8.72 1.323 11.67 3.966 2.949 2.645 4.424 6.458 4.424 11.44v11.289H646.31v-9.687c0-1.88-.23-3.176-.687-3.89-.458-.71-1.246-1.067-2.365-1.067-1.17 0-1.97.408-2.402 1.22-.433.814-.649 2.01-.649 3.585v32.873c0 1.73.255 2.988.764 3.775.507.79 1.27 1.183 2.287 1.183 2.033 0 3.052-1.652 3.052-4.958V63.225h13.194v12.356c0 10.983-5.517 16.475-16.55 16.475-4.78 0-8.607-1.5-11.48-4.5M681.097 78.479c.407-1.017.61-2.441.61-4.27V42.173c0-1.423-.19-2.58-.571-3.47-.382-.89-1.158-1.335-2.327-1.335-2.187 0-3.279 1.653-3.279 4.957v31.958c0 1.881.228 3.306.687 4.272.457.966 1.296 1.448 2.517 1.448 1.168 0 1.955-.507 2.363-1.525m-14.414 8.733c-2.747-3.228-4.12-7.767-4.12-13.614V42.403c0-5.644 1.373-9.902 4.12-12.776 2.745-2.872 6.76-4.31 12.05-4.31 5.288 0 9.305 1.438 12.051 4.31 2.746 2.873 4.118 7.132 4.118 12.776v31.195c0 5.898-1.372 10.449-4.118 13.653-2.746 3.203-6.762 4.805-12.05 4.805-5.29 0-9.306-1.614-12.051-4.844M698.716 91.445V25.928h13.5l6.025 31.348V25.928h12.661v65.517H718.09l-6.56-32.796v32.796ZM738.24 87.631c-2.645-2.947-3.967-7.703-3.967-14.262v-6.406h12.89v8.16c0 3.255 1.04 4.882 3.127 4.882 1.169 0 1.983-.343 2.44-1.03.459-.687.687-1.843.687-3.47 0-2.136-.256-3.902-.763-5.301-.508-1.398-1.157-2.567-1.945-3.509-.789-.94-2.2-2.402-4.232-4.385l-5.645-5.645c-4.373-4.27-6.56-9-6.56-14.186 0-5.592 1.284-9.85 3.851-12.776 2.568-2.922 6.319-4.385 11.25-4.385 5.9 0 10.145 1.563 12.738 4.691 2.594 3.127 3.89 8.021 3.89 14.682h-13.347l-.076-4.5c0-.864-.242-1.55-.725-2.06-.483-.507-1.156-.762-2.02-.762-1.018 0-1.782.28-2.288.84-.51.56-.764 1.322-.764 2.287 0 2.135 1.22 4.347 3.66 6.635l7.628 7.323c1.78 1.729 3.254 3.369 4.424 4.92 1.17 1.551 2.11 3.382 2.822 5.49.712 2.111 1.068 4.616 1.068 7.514 0 6.458-1.182 11.352-3.547 14.681-2.363 3.331-6.267 4.997-11.708 4.997-5.948 0-10.246-1.475-12.889-4.424M788.02 78.479c.407-1.017.611-2.441.611-4.27V42.173c0-1.423-.191-2.58-.572-3.47-.381-.89-1.158-1.335-2.326-1.335-2.187 0-3.28 1.653-3.28 4.957v31.958c0 1.881.229 3.306.686 4.272.456.966 1.296 1.448 2.517 1.448 1.169 0 1.957-.507 2.365-1.525m-14.416 8.733c-2.745-3.228-4.118-7.767-4.118-13.614V42.403c0-5.644 1.373-9.902 4.118-12.776 2.745-2.872 6.762-4.31 12.05-4.31s9.306 1.438 12.052 4.31c2.745 2.873 4.118 7.132 4.118 12.776v31.195c0 5.898-1.373 10.449-4.118 13.653-2.746 3.203-6.763 4.805-12.051 4.805-5.289 0-9.306-1.614-12.05-4.844M822.113 50.183c1.83 0 2.746-1.984 2.746-5.95 0-1.728-.076-3.025-.229-3.89-.153-.864-.432-1.46-.838-1.792-.408-.33-.993-.495-1.755-.495h-3.05v12.127Zm-16.475-24.255h20.136c3.203 0 5.682.724 7.436 2.174 1.755 1.45 2.937 3.484 3.547 6.102.61 2.619.915 5.962.915 10.03 0 3.712-.484 6.61-1.45 8.694-.965 2.086-2.643 3.535-5.033 4.348 1.983.408 3.419 1.4 4.31 2.974.888 1.577 1.334 3.713 1.334 6.408l-.152 24.787h-12.814V65.818c0-1.83-.356-2.999-1.068-3.508-.712-.508-2.009-.763-3.89-.763v29.898h-13.271zM847.709 91.445V38.513h-7.78V25.928h28.678v12.585h-7.78v52.932ZM871.322 25.928h12.66v65.517h-12.66zM891.472 87.479c-2.62-3.051-3.928-7.576-3.928-13.576V25.928h12.738v47.44c0 2.086.203 3.714.61 4.883.406 1.17 1.27 1.753 2.593 1.753s2.185-.571 2.593-1.716c.406-1.144.61-2.783.61-4.92v-47.44h12.737v47.975c0 6-1.31 10.525-3.928 13.576-2.62 3.051-6.623 4.576-12.012 4.576-5.39 0-9.395-1.525-12.013-4.576M923.17 91.445V25.928h19.983l5.493 39.966 5.49-39.966h20.136v65.517h-11.974V44.234l-7.551 47.211h-11.745l-8.01-47.212v47.212ZM222.11 153.69c.406-1.016.61-2.44.61-4.27v-32.035c0-1.422-.19-2.58-.573-3.47-.381-.89-1.157-1.334-2.326-1.334-2.187 0-3.28 1.652-3.28 4.957v31.958c0 1.881.229 3.306.687 4.271.457.966 1.296 1.45 2.517 1.45 1.17 0 1.956-.509 2.364-1.526m-14.414 8.733c-2.747-3.229-4.12-7.767-4.12-13.615v-31.194c0-5.644 1.373-9.902 4.12-12.777 2.745-2.871 6.76-4.308 12.05-4.308 5.288 0 9.305 1.437 12.051 4.308 2.746 2.875 4.118 7.133 4.118 12.777v31.194c0 5.9-1.372 10.449-4.118 13.653-2.746 3.203-6.763 4.805-12.05 4.805-5.29 0-9.306-1.613-12.051-4.843M239.728 166.657v-65.518h26.236v12.738h-13.04v10.45h12.355v12.584h-12.356v29.746ZM287.396 101.14h12.66v65.517h-12.66zM304.014 166.657v-65.518h13.5l6.026 31.35v-31.35h12.661v65.518h-12.814l-6.559-32.797v32.797ZM347.275 166.657l-8.085-65.593h12.508l4.805 44.619 4.272-44.62h12.508l-8.085 65.594ZM376.264 166.657v-65.518h26.238V113.8h-12.89v12.738h12.356v12.357h-12.356v15.024h13.73v12.738ZM409.937 162.843c-2.644-2.948-3.965-7.703-3.965-14.263v-6.406h12.89v8.161c0 3.254 1.04 4.882 3.126 4.882 1.17 0 1.983-.344 2.441-1.03.457-.686.686-1.843.686-3.47 0-2.136-.255-3.902-.762-5.3-.51-1.4-1.158-2.568-1.945-3.51-.79-.94-2.2-2.402-4.233-4.385l-5.644-5.644c-4.375-4.272-6.56-9-6.56-14.187 0-5.592 1.283-9.85 3.852-12.775 2.566-2.923 6.318-4.386 11.25-4.386 5.898 0 10.145 1.564 12.737 4.691 2.593 3.127 3.89 8.021 3.89 14.681h-13.347l-.077-4.498c0-.865-.242-1.551-.724-2.06-.484-.508-1.158-.763-2.021-.763-1.018 0-1.78.28-2.289.839-.508.56-.762 1.322-.762 2.288 0 2.136 1.22 4.348 3.661 6.636l7.627 7.323c1.78 1.727 3.253 3.367 4.424 4.918 1.169 1.552 2.11 3.383 2.822 5.492.712 2.11 1.067 4.614 1.067 7.512 0 6.458-1.182 11.353-3.546 14.683-2.365 3.33-6.268 4.996-11.708 4.996-5.949 0-10.246-1.474-12.89-4.425M447.867 166.657v-52.932h-7.78v-12.586h28.678v12.586h-7.779v52.932ZM471.48 101.14h12.661v65.517H471.48zM491.272 162.271c-2.314-3.33-3.47-8.377-3.47-15.14v-28.22c0-6.051 1.346-10.626 4.042-13.729 2.695-3.101 6.712-4.652 12.051-4.652 4.321 0 7.676.865 10.068 2.593 2.39 1.729 4.042 4.246 4.957 7.55.916 3.307 1.373 7.551 1.373 12.739h-12.814v-5.873c0-1.577-.216-2.797-.648-3.662-.433-.864-1.208-1.296-2.325-1.296-2.492 0-3.738 1.627-3.738 4.88v31.73c0 1.983.254 3.483.762 4.5.508 1.018 1.399 1.526 2.67 1.526 1.27 0 2.16-.508 2.67-1.526.507-1.017.763-2.517.763-4.5v-9.382h-3.51v-11.287h16.018v38.135h-5.263l-2.212-5.492c-2.34 4.069-5.949 6.102-10.831 6.102-4.728 0-8.25-1.665-10.563-4.996M537.56 145.606h5.949l-2.899-33.33H540Zm-14.492 21.05 6.33-65.516h22.195l6.255 65.517h-12.433l-.915-10.602h-7.932l-.763 10.602zM565.115 166.657v-52.932h-7.78v-12.586h28.679v12.586h-7.78v52.932ZM588.728 101.14h12.662v65.517h-12.662zM612.257 166.657l-8.084-65.593h12.509l4.805 44.619 4.27-44.62h12.51l-8.085 65.594ZM641.247 166.657v-65.518h26.238V113.8h-12.89v12.738h12.356v12.357h-12.357v15.024h13.73v12.738ZM696.924 165.513c-2.44-1.169-4.36-2.885-5.758-5.148-1.4-2.262-2.098-4.996-2.098-8.2v-16.398h12.89v15.635c0 1.17.241 2.099.725 2.785.482.686 1.232 1.03 2.25 1.03.965 0 1.69-.318 2.174-.954.482-.635.724-1.537.724-2.707V101.14h13.195v49.119c0 3.407-.675 6.395-2.021 8.961-1.349 2.569-3.23 4.552-5.645 5.95-2.415 1.4-5.174 2.097-8.275 2.097-3 0-5.72-.585-8.161-1.754M742.968 153.69c.407-1.016.61-2.44.61-4.27v-32.035c0-1.422-.191-2.58-.571-3.47-.382-.89-1.158-1.334-2.327-1.334-2.187 0-3.28 1.652-3.28 4.957v31.958c0 1.881.23 3.306.686 4.271.457.966 1.297 1.45 2.517 1.45 1.17 0 1.957-.509 2.365-1.526m-14.415 8.733c-2.746-3.229-4.12-7.767-4.12-13.615v-31.194c0-5.644 1.374-9.902 4.12-12.777 2.745-2.871 6.762-4.308 12.05-4.308 5.289 0 9.306 1.437 12.051 4.308 2.746 2.875 4.119 7.133 4.119 12.777v31.194c0 5.9-1.373 10.449-4.119 13.653-2.745 3.203-6.762 4.805-12.05 4.805s-9.306-1.613-12.051-4.843M764.126 162.691c-2.62-3.05-3.928-7.575-3.928-13.577V101.14h12.737v47.44c0 2.086.203 3.714.61 4.882.406 1.17 1.27 1.755 2.594 1.755 1.32 0 2.185-.573 2.593-1.717.406-1.144.61-2.783.61-4.92v-47.44h12.737v47.974c0 6.002-1.31 10.526-3.928 13.577-2.62 3.051-6.623 4.576-12.012 4.576-5.391 0-9.395-1.525-12.013-4.576M812.298 125.394c1.831 0 2.746-1.983 2.746-5.95 0-1.727-.076-3.024-.229-3.89-.152-.863-.432-1.46-.84-1.792-.406-.33-.99-.495-1.753-.495h-3.05v12.127Zm-16.474-24.255h20.135c3.205 0 5.683.726 7.438 2.175 1.753 1.448 2.935 3.483 3.545 6.101.61 2.62.917 5.962.917 10.03 0 3.713-.485 6.61-1.45 8.694-.967 2.086-2.644 3.535-5.034 4.349 1.983.407 3.42 1.398 4.309 2.974.89 1.576 1.335 3.712 1.335 6.407l-.153 24.788h-12.813V141.03c0-1.83-.357-3-1.068-3.508-.712-.509-2.01-.764-3.89-.764v29.899h-13.271zM831.197 166.657v-65.518h13.5l6.026 31.35v-31.35h12.662v65.518H850.57l-6.559-32.797v32.797ZM881.078 145.606h5.95l-2.899-33.33h-.61Zm-14.492 21.05 6.331-65.516h22.194l6.255 65.517h-12.432l-.915-10.602h-7.932l-.763 10.602zM904.538 166.657v-65.518h13.118v54.381h13.5v11.137ZM933.91 101.14h12.66v65.517h-12.66zM953.7 162.843c-2.644-2.948-3.965-7.703-3.965-14.263v-6.406h12.89v8.161c0 3.254 1.04 4.882 3.126 4.882 1.17 0 1.983-.344 2.441-1.03.457-.686.686-1.843.686-3.47 0-2.136-.255-3.902-.762-5.3-.51-1.4-1.158-2.568-1.945-3.51-.79-.94-2.2-2.402-4.233-4.385l-5.644-5.644c-4.375-4.272-6.56-9-6.56-14.187 0-5.592 1.283-9.85 3.852-12.775 2.566-2.923 6.318-4.386 11.25-4.386 5.898 0 10.145 1.564 12.737 4.691 2.593 3.127 3.89 8.021 3.89 14.681h-13.347l-.077-4.498c0-.865-.242-1.551-.724-2.06-.485-.508-1.158-.763-2.02-.763-1.02 0-1.782.28-2.29.839-.509.56-.762 1.322-.762 2.288 0 2.136 1.22 4.348 3.661 6.636l7.627 7.323c1.78 1.727 3.253 3.367 4.423 4.918 1.17 1.552 2.11 3.383 2.823 5.492.712 2.11 1.067 4.614 1.067 7.512 0 6.458-1.182 11.353-3.546 14.683-2.365 3.33-6.268 4.996-11.709 4.996-5.948 0-10.244-1.474-12.89-4.425M991.63 166.657v-52.932h-7.78v-12.586h28.678v12.586h-7.78v52.932ZM1018.866 162.843c-2.645-2.948-3.967-7.703-3.967-14.263v-6.406h12.89v8.161c0 3.254 1.042 4.882 3.128 4.882 1.168 0 1.983-.344 2.44-1.03.458-.686.687-1.843.687-3.47 0-2.136-.256-3.902-.764-5.3-.507-1.4-1.156-2.568-1.945-3.51-.788-.94-2.199-2.402-4.231-4.385l-5.645-5.644c-4.374-4.272-6.56-9-6.56-14.187 0-5.592 1.285-9.85 3.852-12.775 2.567-2.923 6.318-4.386 11.25-4.386 5.899 0 10.144 1.564 12.737 4.691 2.594 3.127 3.89 8.021 3.89 14.681h-13.348l-.075-4.498c0-.865-.242-1.551-.725-2.06-.484-.508-1.156-.763-2.02-.763-1.018 0-1.782.28-2.289.839-.509.56-.764 1.322-.764 2.288 0 2.136 1.221 4.348 3.662 6.636l7.627 7.323c1.78 1.727 3.254 3.367 4.424 4.918 1.17 1.552 2.109 3.383 2.822 5.492.712 2.11 1.068 4.614 1.068 7.512 0 6.458-1.182 11.353-3.547 14.683-2.364 3.33-6.267 4.996-11.708 4.996-5.949 0-10.246-1.474-12.89-4.425"
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
:is="tag"
|
|
4
|
+
:id="uniqComponentId"
|
|
5
|
+
class="confirm-button"
|
|
6
|
+
@click.stop="toggleConfirmationTooltip"
|
|
7
|
+
>
|
|
7
8
|
<!-- @slot Main content of the button -->
|
|
8
9
|
<slot>-</slot>
|
|
9
10
|
<b-tooltip
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
ref="confirmationTooltip"
|
|
12
|
+
:model-value="showTooltip"
|
|
13
|
+
:placement="placement"
|
|
14
|
+
:target="uniqComponentId"
|
|
15
|
+
manual
|
|
15
16
|
>
|
|
16
17
|
<div class="confirm-button__tooltip">
|
|
17
18
|
<button
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
v-if="!noCloseButton"
|
|
20
|
+
class="confirm-button__tooltip__cancel btn btn-sm btn-link text-light p-0 float-end"
|
|
21
|
+
@click="cancel"
|
|
21
22
|
>
|
|
22
|
-
<fa icon="times"/>
|
|
23
|
+
<fa icon="times" />
|
|
23
24
|
</button>
|
|
24
25
|
<p class="confirm-button__tooltip__label mb-2">
|
|
25
26
|
{{ label }}
|
|
@@ -28,12 +29,15 @@
|
|
|
28
29
|
{{ description }}
|
|
29
30
|
</p>
|
|
30
31
|
<div class="confirm-button__tooltip__actions text-end">
|
|
31
|
-
<button
|
|
32
|
+
<button
|
|
33
|
+
class="confirm-button__tooltip__actions__cancel btn btn-sm btn-link text-light"
|
|
34
|
+
@click="cancel"
|
|
35
|
+
>
|
|
32
36
|
{{ no }}
|
|
33
37
|
</button>
|
|
34
38
|
<button
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
class="confirm-button__tooltip__actions__confirm btn btn-sm btn-link text-light fw-bold"
|
|
40
|
+
@click="confirm"
|
|
37
41
|
>
|
|
38
42
|
{{ yes }}
|
|
39
43
|
</button>
|
|
@@ -46,12 +50,12 @@
|
|
|
46
50
|
<script lang="ts">
|
|
47
51
|
import noop from 'lodash/noop'
|
|
48
52
|
import uniqueId from 'lodash/uniqueId'
|
|
49
|
-
import {faTimes} from '@fortawesome/free-solid-svg-icons/faTimes'
|
|
50
|
-
import {BTooltip, PopoverPlacement} from 'bootstrap-vue-next'
|
|
51
|
-
import {ComponentPublicInstance, defineComponent, PropType, ref} from 'vue'
|
|
53
|
+
import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes'
|
|
54
|
+
import { BTooltip, PopoverPlacement } from 'bootstrap-vue-next'
|
|
55
|
+
import { ComponentPublicInstance, defineComponent, PropType, ref } from 'vue'
|
|
52
56
|
|
|
53
|
-
import {default as Fa, library} from './Fa'
|
|
54
|
-
import {onBeforeMount} from
|
|
57
|
+
import { default as Fa, library } from './Fa'
|
|
58
|
+
import { onBeforeMount } from '@vue/runtime-core'
|
|
55
59
|
|
|
56
60
|
/**
|
|
57
61
|
* ConfirmButton
|
|
@@ -116,7 +120,7 @@ export default defineComponent({
|
|
|
116
120
|
*/
|
|
117
121
|
placement: {
|
|
118
122
|
type: String as PropType<PopoverPlacement>,
|
|
119
|
-
default:
|
|
123
|
+
default: 'top'
|
|
120
124
|
},
|
|
121
125
|
/**
|
|
122
126
|
* HTML tag to render this component to.
|
|
@@ -126,13 +130,13 @@ export default defineComponent({
|
|
|
126
130
|
default: 'button'
|
|
127
131
|
}
|
|
128
132
|
},
|
|
129
|
-
emits: ['toggled', 'cancelled',
|
|
130
|
-
setup(props, {emit}) {
|
|
133
|
+
emits: ['toggled', 'cancelled', 'confirmed'],
|
|
134
|
+
setup(props, { emit }) {
|
|
131
135
|
onBeforeMount(() => {
|
|
132
136
|
library.add(faTimes)
|
|
133
137
|
})
|
|
134
|
-
const showTooltip = ref<Boolean>(false)
|
|
135
|
-
const uniqComponentId = uniqueId('murmur-confirm-button-')
|
|
138
|
+
const showTooltip = ref<Boolean>(false)
|
|
139
|
+
const uniqComponentId = uniqueId('murmur-confirm-button-')
|
|
136
140
|
const confirmationTooltip = ref<ComponentPublicInstance | null>(null)
|
|
137
141
|
|
|
138
142
|
function toggleConfirmationTooltip(): void {
|
|
@@ -16,11 +16,14 @@
|
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script lang="ts">
|
|
19
|
-
import {computed, defineComponent, PropType} from 'vue'
|
|
19
|
+
import { computed, defineComponent, PropType } from 'vue'
|
|
20
20
|
|
|
21
21
|
import config from '@/config'
|
|
22
22
|
import { formatRows } from '@/utils/placeholder'
|
|
23
|
-
import type {
|
|
23
|
+
import type {
|
|
24
|
+
ContentPlaceholderRows,
|
|
25
|
+
ContentPlaceholderStyledRows
|
|
26
|
+
} from '@/utils/placeholderTypes'
|
|
24
27
|
|
|
25
28
|
/**
|
|
26
29
|
* A component to fill empty spaces with animated placeholders until content is loaded.
|
|
@@ -43,12 +46,13 @@ export default defineComponent({
|
|
|
43
46
|
default: '250%'
|
|
44
47
|
}
|
|
45
48
|
},
|
|
46
|
-
setup(props){
|
|
47
|
-
const formattedRows = computed(():ContentPlaceholderStyledRows=>{
|
|
48
|
-
return props.rows
|
|
49
|
-
|
|
49
|
+
setup(props) {
|
|
50
|
+
const formattedRows = computed((): ContentPlaceholderStyledRows => {
|
|
51
|
+
return props.rows
|
|
52
|
+
? formatRows(props.rows, 'content-placeholder__wrapper__row__box')
|
|
53
|
+
: []
|
|
50
54
|
})
|
|
51
|
-
return {formattedRows}
|
|
55
|
+
return { formattedRows }
|
|
52
56
|
}
|
|
53
57
|
})
|
|
54
58
|
</script>
|