@simple-reporting/base 0.0.1
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/.github/workflows/npm-publish.yml +25 -0
- package/.nvmrc +1 -0
- package/.prettierrc +6 -0
- package/README.md +23 -0
- package/cli.js +114 -0
- package/dev/.ddev/config.yaml +279 -0
- package/dev/.ddev/nginx_full/custom.conf +12 -0
- package/dev/.env +1 -0
- package/dev/.env.development +1 -0
- package/dev/.eslintrc.cjs +15 -0
- package/dev/.nvmrc +1 -0
- package/dev/.prettierrc.json +8 -0
- package/dev/.vscode/extensions.json +3 -0
- package/dev/.vscode/settings.json +4 -0
- package/dev/README.md +45 -0
- package/dev/env.d.ts +1 -0
- package/dev/index.html +17 -0
- package/dev/ldd.html +7 -0
- package/dev/livingdocs/Media/image/app.scss +25 -0
- package/dev/livingdocs/Media/image/general.scss +11 -0
- package/dev/livingdocs/Media/image/image.html +46 -0
- package/dev/livingdocs/Media/image/ldd.scss +1 -0
- package/dev/livingdocs/Media/image/pdf.scss +1 -0
- package/dev/livingdocs/Media/image/print.scss +7 -0
- package/dev/livingdocs/Media/image/properties.json +41 -0
- package/dev/livingdocs/Media/image/web.scss +0 -0
- package/dev/livingdocs/Media/image/word.scss +1 -0
- package/dev/livingdocs/Properties/grid/app.scss +1 -0
- package/dev/livingdocs/Properties/grid/general.scss +95 -0
- package/dev/livingdocs/Properties/grid/ldd.scss +1 -0
- package/dev/livingdocs/Properties/grid/pdf.scss +1 -0
- package/dev/livingdocs/Properties/grid/print.scss +94 -0
- package/dev/livingdocs/Properties/grid/properties.json +68 -0
- package/dev/livingdocs/Properties/grid/web.scss +98 -0
- package/dev/livingdocs/Properties/grid/word.scss +1 -0
- package/dev/livingdocs/Text/paragraph/general.scss +9 -0
- package/dev/livingdocs/Text/paragraph/paragraph.html +22 -0
- package/dev/livingdocs/Titles/title-h1/general.scss +10 -0
- package/dev/livingdocs/Titles/title-h1/title-h1.html +16 -0
- package/dev/livingdocs/Titles/title-h2/app.scss +1 -0
- package/dev/livingdocs/Titles/title-h2/general.scss +13 -0
- package/dev/livingdocs/Titles/title-h2/ldd.scss +1 -0
- package/dev/livingdocs/Titles/title-h2/pdf.scss +1 -0
- package/dev/livingdocs/Titles/title-h2/print.scss +36 -0
- package/dev/livingdocs/Titles/title-h2/title-h2.html +24 -0
- package/dev/livingdocs/Titles/title-h2/web.scss +27 -0
- package/dev/livingdocs/Titles/title-h2/word.scss +1 -0
- package/dev/livingdocs/Titles/title-h3/app.scss +1 -0
- package/dev/livingdocs/Titles/title-h3/general.scss +13 -0
- package/dev/livingdocs/Titles/title-h3/ldd.scss +1 -0
- package/dev/livingdocs/Titles/title-h3/pdf.scss +1 -0
- package/dev/livingdocs/Titles/title-h3/print.scss +34 -0
- package/dev/livingdocs/Titles/title-h3/title-h3.html +24 -0
- package/dev/livingdocs/Titles/title-h3/web.scss +27 -0
- package/dev/livingdocs/Titles/title-h3/word.scss +1 -0
- package/dev/livingdocs/Titles/title-h4/app.scss +1 -0
- package/dev/livingdocs/Titles/title-h4/general.scss +13 -0
- package/dev/livingdocs/Titles/title-h4/ldd.scss +1 -0
- package/dev/livingdocs/Titles/title-h4/pdf.scss +1 -0
- package/dev/livingdocs/Titles/title-h4/print.scss +34 -0
- package/dev/livingdocs/Titles/title-h4/title-h4.html +24 -0
- package/dev/livingdocs/Titles/title-h4/web.scss +27 -0
- package/dev/livingdocs/Titles/title-h4/word.scss +1 -0
- package/dev/livingdocs/Titles/title-h5/general.scss +10 -0
- package/dev/livingdocs/Titles/title-h5/title-h5.html +16 -0
- package/dev/livingdocs/Titles/title-h6/general.scss +10 -0
- package/dev/livingdocs/Titles/title-h6/title-h6.html +16 -0
- package/dev/livingdocs.config.json +376 -0
- package/dev/nswow/ArticleAutoloader.ts +100 -0
- package/dev/nswow/ArticleLoader.ts +91 -0
- package/dev/nswow/colors.scss +3 -0
- package/dev/nswow/config.scss +13 -0
- package/dev/nswow/core-styles.scss +2 -0
- package/dev/nswow/fonts.scss +2 -0
- package/dev/nswow/grid.scss +2 -0
- package/dev/nswow/helpers.scss +2 -0
- package/dev/nswow/index.scss +9 -0
- package/dev/nswow/meta.scss +2 -0
- package/dev/nswow/spacer.scss +2 -0
- package/dev/nswow/system.scss +2 -0
- package/dev/nswow/typography.scss +3 -0
- package/dev/nswow.config.json +293 -0
- package/dev/package.json +61 -0
- package/dev/pdf/pdf-configuration-debug.xml +6 -0
- package/dev/pdf/pdf-configuration.xml +3 -0
- package/dev/pdf.ts +1 -0
- package/dev/public/.keep +0 -0
- package/dev/src/App.vue +44 -0
- package/dev/src/Autoload.ts +6 -0
- package/dev/src/assets/fonts/Roboto/roboto-v30-latin-300.woff2 +0 -0
- package/dev/src/assets/fonts/Roboto/roboto-v30-latin-700.woff2 +0 -0
- package/dev/src/assets/fonts/Roboto/roboto-v30-latin-italic.woff2 +0 -0
- package/dev/src/assets/fonts/Roboto/roboto-v30-latin-regular.woff2 +0 -0
- package/dev/src/assets/images/mms-logo-black.svg +91 -0
- package/dev/src/assets/images/mms-logo-white.svg +105 -0
- package/dev/src/assets/scss/app.scss +39 -0
- package/dev/src/assets/scss/general.scss +17 -0
- package/dev/src/assets/scss/ldd.scss +27 -0
- package/dev/src/assets/scss/pdf.scss +2 -0
- package/dev/src/assets/scss/print.scss +1 -0
- package/dev/src/assets/scss/web.scss +1 -0
- package/dev/src/assets/scss/word.scss +2 -0
- package/dev/src/components/LanguageSwitch.vue +100 -0
- package/dev/src/components/MainNavigation.vue +209 -0
- package/dev/src/components/MenuItem/MenuArticle.vue +15 -0
- package/dev/src/components/MenuItem/MenuEntry.vue +26 -0
- package/dev/src/components/MenuItem/MenuExternal.vue +28 -0
- package/dev/src/components/MenuItem/index.ts +5 -0
- package/dev/src/components/PageFooter.vue +86 -0
- package/dev/src/components/PageHeader.vue +149 -0
- package/dev/src/components/PageModal.vue +95 -0
- package/dev/src/components/PrevNext.vue +144 -0
- package/dev/src/components/ScrollToTop.vue +63 -0
- package/dev/src/components/SrlPage/KFCApplication/KFCApplication.vue +715 -0
- package/dev/src/components/SrlPage/KFCApplication/KFCDropdownCharts.vue +112 -0
- package/dev/src/components/SrlPage/KFCApplication/KFCDropdownPeriod.vue +85 -0
- package/dev/src/components/SrlPage/KFCApplication/KFCTable.vue +63 -0
- package/dev/src/components/SrlPage/KFCApplication/hooks/kfcData.ts +9 -0
- package/dev/src/components/SrlPage/KFCApplication/models/KFCApplication.ts +183 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_highcharts-basic.scss +1136 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_highcharts-custom.scss +71 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_highcharts-general.scss +113 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_iz-keyfigure-comparison-dropdown.scss +189 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_iz-keyfigure-comparison.scss +151 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_kfc-loading.scss +40 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_kfc-print.scss +20 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_srl-button-kfc.scss +21 -0
- package/dev/src/components/SrlPage/KFCApplication/scss/_variables.scss +10 -0
- package/dev/src/components/SrlPage/KFCApplication/services/xlsxParser.ts +194 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgColumnView.vue +28 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgDownloadChart.vue +26 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgDropdown.vue +18 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgIndexedValues.vue +18 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgLegendSwap.vue +18 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgLineView.vue +28 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgPDFChart.vue +26 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgPrintChart.vue +33 -0
- package/dev/src/components/SrlPage/KFCApplication/theme/SvgTableView.vue +67 -0
- package/dev/src/components/SrlPage/KFCApplication/utils/XDownloader.js +455 -0
- package/dev/src/components/SrlPage/KFCApplication/utils/XDownloaderStyle.js +44 -0
- package/dev/src/components/SrlPage/KFCApplication/utils/XTableNamer.js +68 -0
- package/dev/src/composables/config.ts +48 -0
- package/dev/src/i18n/index.ts +51 -0
- package/dev/src/i18n/translation.ts +85 -0
- package/dev/src/locales/de.json +15 -0
- package/dev/src/locales/en.json +15 -0
- package/dev/src/main.ts +16 -0
- package/dev/src/router/index.ts +47 -0
- package/dev/src/types/nswow.d.ts +73 -0
- package/dev/src/utils/variables.ts +13 -0
- package/dev/src/views/ArticleView.vue +77 -0
- package/dev/src/views/DownloadsView.vue +88 -0
- package/dev/src/views/HomeView.vue +35 -0
- package/dev/src/views/PageNotFound.vue +73 -0
- package/dev/src/views/SearchView.vue +126 -0
- package/dev/tsconfig.app.json +16 -0
- package/dev/tsconfig.json +14 -0
- package/dev/tsconfig.node.json +19 -0
- package/dev/tsconfig.vitest.json +11 -0
- package/dev/vite.config.ts +27 -0
- package/dev/vitest.config.ts +14 -0
- package/dev/word.ts +1 -0
- package/livingdocs/Buttons/button/app.scss +1 -0
- package/livingdocs/Buttons/button/button.html +18 -0
- package/livingdocs/Buttons/button/general.scss +33 -0
- package/livingdocs/Buttons/button/ldd.scss +1 -0
- package/livingdocs/Buttons/button/pdf.scss +1 -0
- package/livingdocs/Buttons/button/word.scss +1 -0
- package/livingdocs/Buttons/button-container/app.scss +1 -0
- package/livingdocs/Buttons/button-container/button-container.html +31 -0
- package/livingdocs/Buttons/button-container/general.scss +12 -0
- package/livingdocs/Buttons/button-container/ldd.scss +1 -0
- package/livingdocs/Buttons/button-container/pdf.scss +3 -0
- package/livingdocs/Buttons/button-container/properties.json +19 -0
- package/livingdocs/Buttons/button-container/word.scss +3 -0
- package/livingdocs/CV/cv-timeline/app.scss +1 -0
- package/livingdocs/CV/cv-timeline/cv-timeline.html +19 -0
- package/livingdocs/CV/cv-timeline/general.scss +1 -0
- package/livingdocs/CV/cv-timeline/ldd.scss +1 -0
- package/livingdocs/CV/cv-timeline/pdf.scss +1 -0
- package/livingdocs/CV/cv-timeline/print.scss +35 -0
- package/livingdocs/CV/cv-timeline/web.scss +27 -0
- package/livingdocs/CV/cv-timeline/word.scss +1 -0
- package/livingdocs/Container/column-container/column-container.html +44 -0
- package/livingdocs/Container/column-container/general.scss +105 -0
- package/livingdocs/Container/column-container/properties.json +83 -0
- package/livingdocs/Lists/alphanumeric-list-group/alphanumeric-list-group.html +25 -0
- package/livingdocs/Lists/alphanumeric-list-group/app.scss +1 -0
- package/livingdocs/Lists/alphanumeric-list-group/general.scss +5 -0
- package/livingdocs/Lists/alphanumeric-list-group/ldd.scss +1 -0
- package/livingdocs/Lists/alphanumeric-list-group/pdf.scss +1 -0
- package/livingdocs/Lists/alphanumeric-list-group/print.scss +0 -0
- package/livingdocs/Lists/alphanumeric-list-group/web.scss +0 -0
- package/livingdocs/Lists/alphanumeric-list-group/word.scss +1 -0
- package/livingdocs/Lists/list-item/app.scss +1 -0
- package/livingdocs/Lists/list-item/general.scss +4 -0
- package/livingdocs/Lists/list-item/ldd.scss +1 -0
- package/livingdocs/Lists/list-item/list-item.html +17 -0
- package/livingdocs/Lists/list-item/pdf.scss +1 -0
- package/livingdocs/Lists/list-item/print.scss +0 -0
- package/livingdocs/Lists/list-item/web.scss +0 -0
- package/livingdocs/Lists/list-item/word.scss +1 -0
- package/livingdocs/Lists/ordered-list-group/app.scss +1 -0
- package/livingdocs/Lists/ordered-list-group/general.scss +5 -0
- package/livingdocs/Lists/ordered-list-group/ldd.scss +1 -0
- package/livingdocs/Lists/ordered-list-group/ordered-list-group.html +25 -0
- package/livingdocs/Lists/ordered-list-group/pdf.scss +1 -0
- package/livingdocs/Lists/ordered-list-group/print.scss +0 -0
- package/livingdocs/Lists/ordered-list-group/web.scss +0 -0
- package/livingdocs/Lists/ordered-list-group/word.scss +1 -0
- package/livingdocs/Lists/unordered-list-group/app.scss +1 -0
- package/livingdocs/Lists/unordered-list-group/general.scss +5 -0
- package/livingdocs/Lists/unordered-list-group/ldd.scss +1 -0
- package/livingdocs/Lists/unordered-list-group/pdf.scss +1 -0
- package/livingdocs/Lists/unordered-list-group/print.scss +0 -0
- package/livingdocs/Lists/unordered-list-group/unordered-list-group.html +25 -0
- package/livingdocs/Lists/unordered-list-group/web.scss +0 -0
- package/livingdocs/Lists/unordered-list-group/word.scss +1 -0
- package/livingdocs/Media/chart/app.scss +19 -0
- package/livingdocs/Media/chart/chart.html +29 -0
- package/livingdocs/Media/chart/general.scss +11 -0
- package/livingdocs/Media/chart/ldd.scss +1 -0
- package/livingdocs/Media/chart/pdf.scss +9 -0
- package/livingdocs/Media/chart/print.scss +0 -0
- package/livingdocs/Media/chart/properties.json +41 -0
- package/livingdocs/Media/chart/web.scss +0 -0
- package/livingdocs/Media/chart/word.scss +1 -0
- package/livingdocs/Media/graphic/app.scss +1 -0
- package/livingdocs/Media/graphic/general.scss +18 -0
- package/livingdocs/Media/graphic/graphic.html +29 -0
- package/livingdocs/Media/graphic/ldd.scss +1 -0
- package/livingdocs/Media/graphic/pdf.scss +1 -0
- package/livingdocs/Media/graphic/print.scss +0 -0
- package/livingdocs/Media/graphic/properties.json +36 -0
- package/livingdocs/Media/graphic/web.scss +0 -0
- package/livingdocs/Media/graphic/word.scss +1 -0
- package/livingdocs/Media/image/app.scss +25 -0
- package/livingdocs/Media/image/general.scss +11 -0
- package/livingdocs/Media/image/image.html +55 -0
- package/livingdocs/Media/image/ldd.scss +1 -0
- package/livingdocs/Media/image/pdf.scss +1 -0
- package/livingdocs/Media/image/print.scss +7 -0
- package/livingdocs/Media/image/properties.json +41 -0
- package/livingdocs/Media/image/web.scss +0 -0
- package/livingdocs/Media/image/word.scss +1 -0
- package/livingdocs/Media/nswow-table/app.scss +2 -0
- package/livingdocs/Media/nswow-table/app.ts +35 -0
- package/livingdocs/Media/nswow-table/general.scss +281 -0
- package/livingdocs/Media/nswow-table/ldd.scss +2 -0
- package/livingdocs/Media/nswow-table/nswow-table.html +30 -0
- package/livingdocs/Media/nswow-table/pdf.scss +8 -0
- package/livingdocs/Media/nswow-table/print.scss +0 -0
- package/livingdocs/Media/nswow-table/properties.json +66 -0
- package/livingdocs/Media/nswow-table/web.scss +23 -0
- package/livingdocs/Media/nswow-table/word.scss +2 -0
- package/livingdocs/Media/video/app.scss +1 -0
- package/livingdocs/Media/video/general.scss +7 -0
- package/livingdocs/Media/video/ldd.scss +1 -0
- package/livingdocs/Media/video/pdf.scss +1 -0
- package/livingdocs/Media/video/print.scss +5 -0
- package/livingdocs/Media/video/properties.json +41 -0
- package/livingdocs/Media/video/video.html +26 -0
- package/livingdocs/Media/video/web.scss +0 -0
- package/livingdocs/Media/video/word.scss +1 -0
- package/livingdocs/Misc/accordion/accordion.html +56 -0
- package/livingdocs/Misc/accordion/app.scss +63 -0
- package/livingdocs/Misc/accordion/app.ts +10 -0
- package/livingdocs/Misc/accordion/general.scss +44 -0
- package/livingdocs/Misc/accordion/ldd.scss +36 -0
- package/livingdocs/Misc/accordion/pdf.scss +39 -0
- package/livingdocs/Misc/accordion/word.scss +39 -0
- package/livingdocs/Misc/anchor/anchor.html +15 -0
- package/livingdocs/Misc/anchor/app.scss +10 -0
- package/livingdocs/Misc/anchor/app.ts +11 -0
- package/livingdocs/Misc/anchor/general.scss +1 -0
- package/livingdocs/Misc/anchor/pdf.scss +1 -0
- package/livingdocs/Misc/anchor/print.scss +3 -0
- package/livingdocs/Misc/anchor/word.scss +1 -0
- package/livingdocs/Misc/spacer/app.scss +1 -0
- package/livingdocs/Misc/spacer/general.scss +8 -0
- package/livingdocs/Misc/spacer/ldd.scss +1 -0
- package/livingdocs/Misc/spacer/pdf.scss +1 -0
- package/livingdocs/Misc/spacer/print.scss +18 -0
- package/livingdocs/Misc/spacer/properties.json +52 -0
- package/livingdocs/Misc/spacer/spacer.html +12 -0
- package/livingdocs/Misc/spacer/web.scss +18 -0
- package/livingdocs/Misc/spacer/word.scss +1 -0
- package/livingdocs/PDF_only/pdf-cover/ldd.scss +42 -0
- package/livingdocs/PDF_only/pdf-cover/pdf-cover.html +29 -0
- package/livingdocs/PDF_only/pdf-cover/pdf.scss +1 -0
- package/livingdocs/PDF_only/pdf-cover/print.scss +0 -0
- package/livingdocs/PDF_only/pdf-cover/word.scss +1 -0
- package/livingdocs/PDF_only/pdf-cover-chapter/ldd.scss +19 -0
- package/livingdocs/PDF_only/pdf-cover-chapter/pdf-chapter-cover.html +18 -0
- package/livingdocs/PDF_only/pdf-cover-chapter/pdf.scss +1 -0
- package/livingdocs/PDF_only/pdf-cover-chapter/print.scss +19 -0
- package/livingdocs/PDF_only/pdf-cover-chapter/word.scss +1 -0
- package/livingdocs/PDF_only/pdf-pagebreak/general.scss +4 -0
- package/livingdocs/PDF_only/pdf-pagebreak/ldd.scss +5 -0
- package/livingdocs/PDF_only/pdf-pagebreak/pdf-pagebreak.html +8 -0
- package/livingdocs/PDF_only/pdf-publication-title/general.scss +5 -0
- package/livingdocs/PDF_only/pdf-publication-title/pdf-publication-title.html +15 -0
- package/livingdocs/PDF_only/pdf-toc-item/general.scss +41 -0
- package/livingdocs/PDF_only/pdf-toc-item/pdf-toc-item.html +33 -0
- package/livingdocs/PDF_only/pdf-toc-item/properties.json +7 -0
- package/livingdocs/PDF_only/pdf-toc-item-blank/general.scss +5 -0
- package/livingdocs/PDF_only/pdf-toc-item-blank/pdf-toc-item-blank.html +11 -0
- package/livingdocs/PDF_only/pdf-toc-item-title/general.scss +5 -0
- package/livingdocs/PDF_only/pdf-toc-item-title/pdf-toc-item-title.html +11 -0
- package/livingdocs/PDF_only/pdf-toc-page/app.scss +1 -0
- package/livingdocs/PDF_only/pdf-toc-page/general.scss +1 -0
- package/livingdocs/PDF_only/pdf-toc-page/ldd.scss +1 -0
- package/livingdocs/PDF_only/pdf-toc-page/pdf-toc-page.html +33 -0
- package/livingdocs/PDF_only/pdf-toc-page/pdf.scss +1 -0
- package/livingdocs/PDF_only/pdf-toc-page/properties.json +12 -0
- package/livingdocs/PDF_only/pdf-toc-page/word.scss +1 -0
- package/livingdocs/PDF_only/pdf-video-link/ldd.scss +16 -0
- package/livingdocs/PDF_only/pdf-video-link/pdf-video-link.html +41 -0
- package/livingdocs/PDF_only/pdf-video-link/pdf.scss +1 -0
- package/livingdocs/PDF_only/pdf-video-link/print.scss +12 -0
- package/livingdocs/PDF_only/pdf-video-link/word.scss +1 -0
- package/livingdocs/Properties/grid/app.scss +1 -0
- package/livingdocs/Properties/grid/general.scss +95 -0
- package/livingdocs/Properties/grid/ldd.scss +1 -0
- package/livingdocs/Properties/grid/pdf.scss +1 -0
- package/livingdocs/Properties/grid/print.scss +94 -0
- package/livingdocs/Properties/grid/properties.json +68 -0
- package/livingdocs/Properties/grid/web.scss +98 -0
- package/livingdocs/Properties/grid/word.scss +1 -0
- package/livingdocs/Signatures/signature-container/app.scss +1 -0
- package/livingdocs/Signatures/signature-container/general.scss +7 -0
- package/livingdocs/Signatures/signature-container/ldd.scss +1 -0
- package/livingdocs/Signatures/signature-container/pdf.scss +1 -0
- package/livingdocs/Signatures/signature-container/print.scss +0 -0
- package/livingdocs/Signatures/signature-container/signature-container.html +30 -0
- package/livingdocs/Signatures/signature-container/web.scss +0 -0
- package/livingdocs/Signatures/signature-container/word.scss +1 -0
- package/livingdocs/Signatures/signature-item/app.scss +1 -0
- package/livingdocs/Signatures/signature-item/general.scss +53 -0
- package/livingdocs/Signatures/signature-item/ldd.scss +1 -0
- package/livingdocs/Signatures/signature-item/pdf.scss +1 -0
- package/livingdocs/Signatures/signature-item/print.scss +0 -0
- package/livingdocs/Signatures/signature-item/signature-item.html +23 -0
- package/livingdocs/Signatures/signature-item/web.scss +0 -0
- package/livingdocs/Signatures/signature-item/word.scss +1 -0
- package/livingdocs/Text/footnote/app.scss +1 -0
- package/livingdocs/Text/footnote/footnote.html +14 -0
- package/livingdocs/Text/footnote/general.scss +12 -0
- package/livingdocs/Text/footnote/ldd.scss +1 -0
- package/livingdocs/Text/footnote/pdf.scss +1 -0
- package/livingdocs/Text/footnote/print.scss +36 -0
- package/livingdocs/Text/footnote/web.scss +27 -0
- package/livingdocs/Text/footnote/word.scss +1 -0
- package/livingdocs/Text/lead/general.scss +9 -0
- package/livingdocs/Text/lead/lead.html +23 -0
- package/livingdocs/Text/paragraph/general.scss +9 -0
- package/livingdocs/Text/paragraph/paragraph.html +24 -0
- package/livingdocs/Text/quote/general.scss +43 -0
- package/livingdocs/Text/quote/properties.json +7 -0
- package/livingdocs/Text/quote/quote.html +29 -0
- package/livingdocs/Text/quote-with-portrait/general.scss +81 -0
- package/livingdocs/Text/quote-with-portrait/properties.json +12 -0
- package/livingdocs/Text/quote-with-portrait/quote-with-portrait.html +49 -0
- package/livingdocs/Titles/title-h1/general.scss +10 -0
- package/livingdocs/Titles/title-h1/title-h1.html +16 -0
- package/livingdocs/Titles/title-h2/app.scss +1 -0
- package/livingdocs/Titles/title-h2/general.scss +13 -0
- package/livingdocs/Titles/title-h2/ldd.scss +1 -0
- package/livingdocs/Titles/title-h2/pdf.scss +1 -0
- package/livingdocs/Titles/title-h2/print.scss +36 -0
- package/livingdocs/Titles/title-h2/title-h2.html +26 -0
- package/livingdocs/Titles/title-h2/web.scss +27 -0
- package/livingdocs/Titles/title-h2/word.scss +1 -0
- package/livingdocs/Titles/title-h3/app.scss +1 -0
- package/livingdocs/Titles/title-h3/general.scss +13 -0
- package/livingdocs/Titles/title-h3/ldd.scss +1 -0
- package/livingdocs/Titles/title-h3/pdf.scss +1 -0
- package/livingdocs/Titles/title-h3/print.scss +34 -0
- package/livingdocs/Titles/title-h3/title-h3.html +26 -0
- package/livingdocs/Titles/title-h3/web.scss +27 -0
- package/livingdocs/Titles/title-h3/word.scss +1 -0
- package/livingdocs/Titles/title-h4/app.scss +1 -0
- package/livingdocs/Titles/title-h4/general.scss +13 -0
- package/livingdocs/Titles/title-h4/ldd.scss +1 -0
- package/livingdocs/Titles/title-h4/pdf.scss +1 -0
- package/livingdocs/Titles/title-h4/print.scss +34 -0
- package/livingdocs/Titles/title-h4/title-h4.html +26 -0
- package/livingdocs/Titles/title-h4/web.scss +27 -0
- package/livingdocs/Titles/title-h4/word.scss +1 -0
- package/livingdocs/Titles/title-h5/general.scss +10 -0
- package/livingdocs/Titles/title-h5/title-h5.html +16 -0
- package/livingdocs/Titles/title-h6/general.scss +10 -0
- package/livingdocs/Titles/title-h6/title-h6.html +16 -0
- package/package.json +50 -0
- package/preparePublish.cjs +95 -0
- package/scripts/beaver.d.ts +6 -0
- package/scripts/beaver.js +316 -0
- package/scripts/build.d.ts +40 -0
- package/scripts/build.js +812 -0
- package/scripts/colors.d.ts +3 -0
- package/scripts/colors.js +27 -0
- package/scripts/components.d.ts +43 -0
- package/scripts/components.js +566 -0
- package/scripts/config.d.ts +1 -0
- package/scripts/config.js +1 -0
- package/scripts/doPublish.d.ts +1 -0
- package/scripts/doPublish.js +43 -0
- package/scripts/init.d.ts +9 -0
- package/scripts/init.js +45 -0
- package/scripts/migrate-livingdocs-build/LICENSE +21 -0
- package/scripts/migrate-livingdocs-build/bin/build.d.ts +8 -0
- package/scripts/migrate-livingdocs-build/bin/build.js +53 -0
- package/scripts/migrate-livingdocs-build/bin/migrate.d.ts +2 -0
- package/scripts/migrate-livingdocs-build/bin/migrate.js +43 -0
- package/scripts/migrate-livingdocs-build/dev/build/v1.d.ts +9 -0
- package/scripts/migrate-livingdocs-build/dev/build/v1.d.ts.map +1 -0
- package/scripts/migrate-livingdocs-build/dev/build/v1.js +51 -0
- package/scripts/migrate-livingdocs-build/dev/build/v2.d.ts +2 -0
- package/scripts/migrate-livingdocs-build/dev/build/v2.d.ts.map +1 -0
- package/scripts/migrate-livingdocs-build/dev/build/v2.js +44 -0
- package/scripts/migrate-livingdocs-build/dev/build/zip-archive.d.ts +2 -0
- package/scripts/migrate-livingdocs-build/dev/build/zip-archive.d.ts.map +1 -0
- package/scripts/migrate-livingdocs-build/dev/build/zip-archive.js +39 -0
- package/scripts/migrate-livingdocs-build/dev/build.d.ts +9 -0
- package/scripts/migrate-livingdocs-build/dev/build.js +7 -0
- package/scripts/migrate-livingdocs-build/dev/configuration-defaults.d.ts +20 -0
- package/scripts/migrate-livingdocs-build/dev/configuration-defaults.js +18 -0
- package/scripts/migrate-livingdocs-build/dev/configuration.d.ts +2 -0
- package/scripts/migrate-livingdocs-build/dev/configuration.js +34 -0
- package/scripts/migrate-livingdocs-build/dev/lib.d.ts +33 -0
- package/scripts/migrate-livingdocs-build/dev/lib.js +251 -0
- package/scripts/migrate-livingdocs-build/dev/livingdocs-design.d.ts +9 -0
- package/scripts/migrate-livingdocs-build/dev/livingdocs-design.js +80 -0
- package/scripts/migrate-livingdocs-build/dev/logger.d.ts +2 -0
- package/scripts/migrate-livingdocs-build/dev/logger.js +16 -0
- package/scripts/migrate-livingdocs-build/dev/migrate.d.ts +22 -0
- package/scripts/migrate-livingdocs-build/dev/migrate.js +241 -0
- package/scripts/migrate-livingdocs-build/readme.md +62 -0
- package/scripts/preparePublish.d.ts +1 -0
- package/scripts/preparePublish.js +88 -0
- package/scripts/renamePackage.d.ts +1 -0
- package/scripts/renamePackage.js +48 -0
- package/scripts/utils.d.ts +49 -0
- package/scripts/utils.js +106 -0
- package/scripts/vite.d.ts +10 -0
- package/scripts/vite.js +58 -0
- package/scss/colors/functions.scss +18 -0
- package/scss/colors/index.scss +3 -0
- package/scss/colors/mixins.scss +45 -0
- package/scss/colors/variables.scss +6 -0
- package/scss/config.scss +7 -0
- package/scss/core-styles.scss +22 -0
- package/scss/fonts/functions.scss +21 -0
- package/scss/fonts/index.scss +3 -0
- package/scss/fonts/mixins.scss +31 -0
- package/scss/fonts/variables.scss +8 -0
- package/scss/grid/functions.scss +29 -0
- package/scss/grid/index.scss +3 -0
- package/scss/grid/mixins.scss +388 -0
- package/scss/grid/variables.scss +10 -0
- package/scss/helpers/functions.scss +0 -0
- package/scss/helpers/index.scss +3 -0
- package/scss/helpers/mixins.scss +87 -0
- package/scss/helpers/variables.scss +7 -0
- package/scss/index.scss +8 -0
- package/scss/meta/functions.scss +64 -0
- package/scss/meta/index.scss +3 -0
- package/scss/meta/mixins.scss +6 -0
- package/scss/meta/variables.scss +8 -0
- package/scss/spacer/functions.scss +9 -0
- package/scss/spacer/index.scss +3 -0
- package/scss/spacer/mixins.scss +236 -0
- package/scss/spacer/variables.scss +6 -0
- package/scss/system/functions.scss +77 -0
- package/scss/system/index.scss +3 -0
- package/scss/system/mixins.scss +27 -0
- package/scss/system/root.scss +39 -0
- package/scss/system/variables.scss +13 -0
- package/scss/typography/functions.scss +63 -0
- package/scss/typography/index.scss +3 -0
- package/scss/typography/mixins.scss +262 -0
- package/scss/typography/variables.scss +11 -0
- package/tags.txt +1 -0
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
import XTableNamer from './XTableNamer.js'
|
|
2
|
+
import * as Excel from 'exceljs/dist/exceljs.min.js'
|
|
3
|
+
import { saveAs } from 'file-saver'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Exceldownload working with NSWOW2 Tables
|
|
7
|
+
*/
|
|
8
|
+
class XDownloader {
|
|
9
|
+
constructor(config = {}) {
|
|
10
|
+
const {
|
|
11
|
+
tableTitle,
|
|
12
|
+
tableSelector,
|
|
13
|
+
excludeTableSelector,
|
|
14
|
+
downloadText, // Text for downloadbutton, can be empty if you want to use an icon
|
|
15
|
+
styles, // cell Styles from classes
|
|
16
|
+
numFmt, // numFmt overwrite for custom formatting
|
|
17
|
+
mergeStrings, // Set mergeStrings for all Tables
|
|
18
|
+
tableCellFormatter,
|
|
19
|
+
footnoteFormatter
|
|
20
|
+
} = config
|
|
21
|
+
|
|
22
|
+
const env = this.getEnvironement()
|
|
23
|
+
|
|
24
|
+
this.excludeTableSelector = excludeTableSelector || null
|
|
25
|
+
this.tableSelector = tableSelector || '.ns-table-wrap'
|
|
26
|
+
this.downloadText = downloadText || 'XLS' //Text on button, can be empty
|
|
27
|
+
this.tableTitle = tableTitle || null
|
|
28
|
+
this.styles =
|
|
29
|
+
styles.map((item) => {
|
|
30
|
+
if (!item.index) item.index = 0
|
|
31
|
+
return item
|
|
32
|
+
}) || {}
|
|
33
|
+
this.numFmt = numFmt || function (cell) {}
|
|
34
|
+
this.mergeStrings = mergeStrings || []
|
|
35
|
+
this.tableCellFormatter = tableCellFormatter || this.htmlTableCellFormatter
|
|
36
|
+
this.footnoteFormatter = footnoteFormatter || this.footnoteFormatter
|
|
37
|
+
|
|
38
|
+
const tables = Array.prototype.slice
|
|
39
|
+
.call(document.querySelectorAll(this.tableSelector))
|
|
40
|
+
.filter((table) => {
|
|
41
|
+
if (!this.excludeTableSelector) return true
|
|
42
|
+
|
|
43
|
+
const finding = table.querySelector(this.excludeTableSelector)
|
|
44
|
+
|
|
45
|
+
if (!!finding) return false
|
|
46
|
+
|
|
47
|
+
return true
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
new XTableNamer()
|
|
51
|
+
|
|
52
|
+
tables.forEach((table) => {
|
|
53
|
+
if (this.checkTable(table)) {
|
|
54
|
+
this.createWorkbook(table)
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
checkTable(table) {
|
|
60
|
+
/*const TDs = Array.prototype.slice.call( table.querySelectorAll('tr:first-child > td') );
|
|
61
|
+
let rt = true;
|
|
62
|
+
TDs.forEach( td => {
|
|
63
|
+
if(td.colSpan > 1) rt = false;
|
|
64
|
+
} );*/
|
|
65
|
+
return true
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
createWorkbook(table) {
|
|
69
|
+
this.name = table.querySelector('[data-tableid]').dataset.tableid //if you have an error on this line replace data-tableid with data-table-id & tableid to tableId
|
|
70
|
+
const workbook = new Excel.Workbook()
|
|
71
|
+
this.worksheet = workbook.addWorksheet(this.name)
|
|
72
|
+
this.fileName = this.tableTitle
|
|
73
|
+
try {
|
|
74
|
+
this.parseTable(table)
|
|
75
|
+
this.parseFootnote(table)
|
|
76
|
+
this.mergeCells(table)
|
|
77
|
+
this.saveFile(this.fileName + '.xlsx', workbook)
|
|
78
|
+
} catch (err) {
|
|
79
|
+
alert(`Die Tabelle hat verbundene Zellen in der ersten Reihe, das wird nicht unterstützt vom XDownloader.
|
|
80
|
+
Falls verbundene Zellen in der ersten Reihe benötigt werden bitte erste Zeile leer mit der Klasse .excel-download erfassen`)
|
|
81
|
+
console.error(err)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
mergeCells(table) {
|
|
86
|
+
this.mergeStrings = this.mergeStrings.filter((value, index) => {
|
|
87
|
+
// console.log('merge string' + value, index, this.mergeStrings.indexOf(value))
|
|
88
|
+
return this.mergeStrings.indexOf(value) === index
|
|
89
|
+
})
|
|
90
|
+
// console.log(this.mergeStrings);
|
|
91
|
+
|
|
92
|
+
this.mergeStrings.forEach((s) => {
|
|
93
|
+
try {
|
|
94
|
+
this.worksheet.mergeCells(s.trim())
|
|
95
|
+
} catch (error) {
|
|
96
|
+
console.error(error)
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* This one parses the footnotes and puts it after the table content in the worksheet
|
|
103
|
+
* @param {*} table
|
|
104
|
+
*/
|
|
105
|
+
parseFootnote(table) {
|
|
106
|
+
const footnotes = document.querySelectorAll('.iz-keyfigure-comparison__footnote')
|
|
107
|
+
this.worksheet.addRow([])
|
|
108
|
+
footnotes.forEach((fn) => {
|
|
109
|
+
let prettyFootnote = this.footnoteFormatter.call(this, fn)
|
|
110
|
+
this.worksheet.addRow([prettyFootnote])
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
footnoteFormatter(footnote) {
|
|
115
|
+
return footnote.innerText.replace('\n', ' ')
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
getFileTitle(elem) {
|
|
119
|
+
let name = elem.querySelector('[data-tableid]').dataset.tableid
|
|
120
|
+
if (name) name = name.replaceAll(/\./g, '')
|
|
121
|
+
return name
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
getTitle(elem) {
|
|
125
|
+
return elem.closest(this.tableSelector).dataset.xTitle
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
htmlTableCellFormatter(td) {
|
|
129
|
+
let cell = document.createElement('td')
|
|
130
|
+
cell.innerHTML = td.innerHTML
|
|
131
|
+
let superscript = cell.querySelector('.superscript')
|
|
132
|
+
let superscriptContent = ''
|
|
133
|
+
if (superscript) {
|
|
134
|
+
superscriptContent = '(' + superscript.innerText + ')'
|
|
135
|
+
superscript.parentNode.removeChild(superscript)
|
|
136
|
+
}
|
|
137
|
+
if (td.querySelector('.note__link')) {
|
|
138
|
+
return this.correctNote(cell.innerText.trim() + ' ' + superscriptContent)
|
|
139
|
+
} else {
|
|
140
|
+
return this.correct(cell.innerText.trim() + ' ' + superscriptContent)
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* This one parses the table and puts it into the worksheet
|
|
146
|
+
* @param {*} table
|
|
147
|
+
*/
|
|
148
|
+
parseTable(table) {
|
|
149
|
+
const t = table.querySelector('table')
|
|
150
|
+
const rows = Array.prototype.slice.call(t.querySelectorAll('tr'))
|
|
151
|
+
let row
|
|
152
|
+
let content = []
|
|
153
|
+
|
|
154
|
+
let counterR = 0
|
|
155
|
+
let counterC = 0
|
|
156
|
+
|
|
157
|
+
const title = this.getTitle(table)
|
|
158
|
+
|
|
159
|
+
let styles = []
|
|
160
|
+
|
|
161
|
+
this.setColumnWidhtByHeader(rows)
|
|
162
|
+
|
|
163
|
+
rows.forEach((r) => {
|
|
164
|
+
styles = []
|
|
165
|
+
counterC = 0
|
|
166
|
+
content = []
|
|
167
|
+
counterR++ //counters to keep track where you are
|
|
168
|
+
|
|
169
|
+
const tds = Array.prototype.slice.call(r.querySelectorAll('td'))
|
|
170
|
+
|
|
171
|
+
tds.forEach((t) => {
|
|
172
|
+
//second iteration for actual content
|
|
173
|
+
counterC++
|
|
174
|
+
|
|
175
|
+
styles[counterC] = this.getStyles(t) // get styles based on classes of the td
|
|
176
|
+
let c = this.tableCellFormatter.call(this, t)
|
|
177
|
+
|
|
178
|
+
if (isNaN(c)) {
|
|
179
|
+
c = c
|
|
180
|
+
} else {
|
|
181
|
+
if (c == '\u00A0' || c.trim() == '') {
|
|
182
|
+
//apparently this is still considered not NaN
|
|
183
|
+
c = c
|
|
184
|
+
} else {
|
|
185
|
+
c = parseFloat(c)
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
// console.log(c);
|
|
189
|
+
content.push(c)
|
|
190
|
+
const colspan = parseInt(styles[counterC].colspan)
|
|
191
|
+
// console.log(t.innerText, colspan)
|
|
192
|
+
if (colspan > 1) {
|
|
193
|
+
for (let i = 1; i < colspan; i++) {
|
|
194
|
+
content.push('')
|
|
195
|
+
counterC++
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
this.worksheet.addRow(content)
|
|
201
|
+
row = this.worksheet.lastRow
|
|
202
|
+
|
|
203
|
+
for (let i = 1; i < styles.length; i++) {
|
|
204
|
+
if (!!styles[i]) {
|
|
205
|
+
if (!!styles[i].alignment) {
|
|
206
|
+
row.getCell(i).alignment = styles[i].alignment
|
|
207
|
+
}
|
|
208
|
+
if (!!styles[i].border) {
|
|
209
|
+
row.getCell(i).border = styles[i].border
|
|
210
|
+
// console.log(styles[i].border)
|
|
211
|
+
}
|
|
212
|
+
if (!!styles[i].font) {
|
|
213
|
+
row.getCell(i).font = styles[i].font
|
|
214
|
+
}
|
|
215
|
+
if (!!styles[i].fill) {
|
|
216
|
+
row.getCell(i).fill = styles[i].fill
|
|
217
|
+
// console.log(i, styles[i].fill.fgColor)
|
|
218
|
+
}
|
|
219
|
+
let colspan = parseInt(styles[i].colspan)
|
|
220
|
+
// console.log(counterR, colspan)
|
|
221
|
+
|
|
222
|
+
if (colspan > 1) {
|
|
223
|
+
const mergeString =
|
|
224
|
+
this.getLetter(i) +
|
|
225
|
+
(counterR + (!this.tableTitle ? 1 : 4)) +
|
|
226
|
+
':' +
|
|
227
|
+
this.getLetter(i + colspan - 1) +
|
|
228
|
+
(counterR + (!this.tableTitle ? 1 : 4))
|
|
229
|
+
this.mergeStrings.push(mergeString)
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (!!this.numFmt) {
|
|
234
|
+
this.numFmt.call(this, row.getCell(i), i, counterR)
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
})
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
setColumnWidhtByHeader(rows) {
|
|
241
|
+
const headerClasses = [
|
|
242
|
+
'excel_download',
|
|
243
|
+
...this.styles.filter((item) => item.head).map((item) => item.class)
|
|
244
|
+
]
|
|
245
|
+
let isHeader = false
|
|
246
|
+
let first = true
|
|
247
|
+
let content = []
|
|
248
|
+
let headerRow = null
|
|
249
|
+
let exceldownload = rows.filter((row) => row.classList.contains('excel_download'))
|
|
250
|
+
|
|
251
|
+
if (!!exceldownload[0]) {
|
|
252
|
+
headerRow = exceldownload[0]
|
|
253
|
+
} else {
|
|
254
|
+
rows.forEach((r) => {
|
|
255
|
+
if (first) {
|
|
256
|
+
headerClasses.forEach((item) => {
|
|
257
|
+
if (r.classList.contains(item)) isHeader = true
|
|
258
|
+
headerRow = r
|
|
259
|
+
})
|
|
260
|
+
}
|
|
261
|
+
})
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (headerRow) {
|
|
265
|
+
first = false
|
|
266
|
+
|
|
267
|
+
const tds = Array.prototype.slice.call(headerRow.querySelectorAll('td'))
|
|
268
|
+
|
|
269
|
+
tds.forEach((t) => {
|
|
270
|
+
//first iteration for header column without content to set widths of columns
|
|
271
|
+
content.push({
|
|
272
|
+
header: ' ',
|
|
273
|
+
key: 'id',
|
|
274
|
+
width: t.offsetWidth / 7
|
|
275
|
+
})
|
|
276
|
+
})
|
|
277
|
+
this.worksheet.columns = content
|
|
278
|
+
|
|
279
|
+
content = []
|
|
280
|
+
|
|
281
|
+
let row = this.worksheet.lastRow
|
|
282
|
+
row.height = 0.5
|
|
283
|
+
|
|
284
|
+
if (this.tableTitle) {
|
|
285
|
+
let title = ''
|
|
286
|
+
if (typeof this.tableTitle == 'string') {
|
|
287
|
+
title = this.tableTitle
|
|
288
|
+
} else if (typeof this.tableTitle == 'function') {
|
|
289
|
+
title = this.tableTitle.call(this, table)
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
this.worksheet.addRow([])
|
|
293
|
+
|
|
294
|
+
this.worksheet.addRow([title])
|
|
295
|
+
row = this.worksheet.lastRow
|
|
296
|
+
|
|
297
|
+
row.getCell('A').font = {
|
|
298
|
+
size: 16,
|
|
299
|
+
bold: true
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
this.worksheet.addRow([])
|
|
303
|
+
}
|
|
304
|
+
} else {
|
|
305
|
+
return
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* check for classes and return the right styles
|
|
311
|
+
* can be extended
|
|
312
|
+
* @param {*} t
|
|
313
|
+
*/
|
|
314
|
+
getStyles(t) {
|
|
315
|
+
let r = []
|
|
316
|
+
|
|
317
|
+
const styles = this.styles
|
|
318
|
+
.filter((style) => {
|
|
319
|
+
return t.classList.contains(style.class)
|
|
320
|
+
})
|
|
321
|
+
.sort((a, b) => {
|
|
322
|
+
// sort index of importance lowest first
|
|
323
|
+
if (a.index < b.index) {
|
|
324
|
+
return 1
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if (a.index > b.index) {
|
|
328
|
+
return -1
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return 0
|
|
332
|
+
})
|
|
333
|
+
|
|
334
|
+
if (t.classList.contains('ns-horizontal-left')) {
|
|
335
|
+
r.alignment = { horizontal: 'left', wrapText: true }
|
|
336
|
+
}
|
|
337
|
+
if (t.classList.contains('ns-horizontal-right')) {
|
|
338
|
+
r.alignment = { horizontal: 'right', wrapText: true }
|
|
339
|
+
}
|
|
340
|
+
if (t.classList.contains('ns-horizontal-center')) {
|
|
341
|
+
r.alignment = { horizontal: 'center', wrapText: true }
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// merge all styles, most important style is applied last
|
|
345
|
+
if (styles.length > 0) {
|
|
346
|
+
styles.forEach((style) => {
|
|
347
|
+
r = {
|
|
348
|
+
...r,
|
|
349
|
+
...style,
|
|
350
|
+
class: undefined, // remove classes
|
|
351
|
+
head: undefined,
|
|
352
|
+
index: undefined
|
|
353
|
+
}
|
|
354
|
+
})
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// if no border style set
|
|
358
|
+
if ((!'border') in r) {
|
|
359
|
+
// console.log(r)
|
|
360
|
+
r.border = {}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// when no fill set, default to white to hide lines
|
|
364
|
+
if (!!!r.fill || !!!r.fill.fgColor) {
|
|
365
|
+
r.fill = {
|
|
366
|
+
type: 'pattern',
|
|
367
|
+
pattern: 'solid',
|
|
368
|
+
fgColor: {
|
|
369
|
+
argb: 'FFFFFFFF'
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
r.colspan = t.colSpan
|
|
375
|
+
|
|
376
|
+
return r
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* savefile doesnt need explanation as well
|
|
381
|
+
* @param {*} fileName
|
|
382
|
+
* @param {*} workbook
|
|
383
|
+
*/
|
|
384
|
+
async saveFile(fileName, workbook) {
|
|
385
|
+
const xls64 = await workbook.xlsx.writeBuffer({
|
|
386
|
+
base64: true
|
|
387
|
+
})
|
|
388
|
+
saveAs(
|
|
389
|
+
new Blob([xls64], {
|
|
390
|
+
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
|
391
|
+
}),
|
|
392
|
+
fileName
|
|
393
|
+
)
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* delete the thousand marks and replace false minus with right one
|
|
398
|
+
*/
|
|
399
|
+
correct(text) {
|
|
400
|
+
return text
|
|
401
|
+
.replace(/'/g, '')
|
|
402
|
+
.replace(/’/g, '')
|
|
403
|
+
.replace(/–/g, '-')
|
|
404
|
+
.replace(/,/g, '.')
|
|
405
|
+
.replace(/–/g, '-')
|
|
406
|
+
.replace(/,/g, '.')
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
correctNote(text) {
|
|
410
|
+
return text.replace(/'/g, '').replace(/’/g, '').replace(/–/g, '-')
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
getLetter(number) {
|
|
414
|
+
const letters = [
|
|
415
|
+
'A',
|
|
416
|
+
'B',
|
|
417
|
+
'C',
|
|
418
|
+
'D',
|
|
419
|
+
'E',
|
|
420
|
+
'F',
|
|
421
|
+
'G',
|
|
422
|
+
'H',
|
|
423
|
+
'I',
|
|
424
|
+
'J',
|
|
425
|
+
'K',
|
|
426
|
+
'L',
|
|
427
|
+
'M',
|
|
428
|
+
'N',
|
|
429
|
+
'O',
|
|
430
|
+
'P',
|
|
431
|
+
'Q',
|
|
432
|
+
'R',
|
|
433
|
+
'S',
|
|
434
|
+
'T',
|
|
435
|
+
'U',
|
|
436
|
+
'V',
|
|
437
|
+
'W',
|
|
438
|
+
'X',
|
|
439
|
+
'Y',
|
|
440
|
+
'Z'
|
|
441
|
+
]
|
|
442
|
+
return letters[number - 1]
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
getEnvironement() {
|
|
446
|
+
const body = document.querySelector('body')
|
|
447
|
+
if (body.classList.contains('wp-production')) {
|
|
448
|
+
return 'production'
|
|
449
|
+
} else {
|
|
450
|
+
return 'stage'
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export default XDownloader
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const XDownloaderStyle = [
|
|
2
|
+
{
|
|
3
|
+
class: 'head',
|
|
4
|
+
font: {
|
|
5
|
+
bold: true,
|
|
6
|
+
color: {
|
|
7
|
+
argb: 'FF000000'
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
border: {
|
|
11
|
+
bottom: {
|
|
12
|
+
style: 'thin',
|
|
13
|
+
color: {
|
|
14
|
+
argb: 'FF000000'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
head: true,
|
|
19
|
+
index: 10
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
class: 'line',
|
|
23
|
+
border: {
|
|
24
|
+
bottom: {
|
|
25
|
+
style: 'thin',
|
|
26
|
+
color: {
|
|
27
|
+
argb: 'FFE0E0E0'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
class: 'ns-background-06',
|
|
34
|
+
fill: {
|
|
35
|
+
type: 'pattern',
|
|
36
|
+
pattern: 'solid',
|
|
37
|
+
fgColor: {
|
|
38
|
+
argb: 'FFF5F2ED'
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
export default XDownloaderStyle
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exceldownload working with NSWOW2 Tables
|
|
3
|
+
*/
|
|
4
|
+
class XTableNamer {
|
|
5
|
+
constructor() {
|
|
6
|
+
const elements = Array.prototype.slice.call(
|
|
7
|
+
document.querySelectorAll(
|
|
8
|
+
'.content .ns-table-wrap, .content .ns-title-h1, .content .ns-title-h2, .content .accordion-title'
|
|
9
|
+
)
|
|
10
|
+
)
|
|
11
|
+
let h1
|
|
12
|
+
let h2
|
|
13
|
+
let c
|
|
14
|
+
const pageTitle = document.querySelector('.header__top-title')
|
|
15
|
+
|
|
16
|
+
elements.forEach((element) => {
|
|
17
|
+
const className = element.classList[0]
|
|
18
|
+
|
|
19
|
+
switch (className) {
|
|
20
|
+
case 'ns-title-h1':
|
|
21
|
+
const span = element
|
|
22
|
+
if (!!span) {
|
|
23
|
+
h1 = span.innerText
|
|
24
|
+
}
|
|
25
|
+
c = 0
|
|
26
|
+
break
|
|
27
|
+
case 'ns-title-h2':
|
|
28
|
+
if (!!element.innerText.trim()) {
|
|
29
|
+
h2 = element.innerText
|
|
30
|
+
c = 0
|
|
31
|
+
}
|
|
32
|
+
break
|
|
33
|
+
case 'accordion-title':
|
|
34
|
+
const spanL = element.querySelector('span:last-child')
|
|
35
|
+
if (!!spanL.innerText.trim()) {
|
|
36
|
+
h2 = spanL.innerText
|
|
37
|
+
c = 0
|
|
38
|
+
}
|
|
39
|
+
break
|
|
40
|
+
case 'ns-table-wrap':
|
|
41
|
+
let title = ''
|
|
42
|
+
let fileTitle = ''
|
|
43
|
+
if (!!pageTitle) {
|
|
44
|
+
title += pageTitle.innerText + ' – '
|
|
45
|
+
}
|
|
46
|
+
if (!!h1) {
|
|
47
|
+
title += h1.trim()
|
|
48
|
+
}
|
|
49
|
+
if (!!h2) {
|
|
50
|
+
title += ' - ' + h2.trim()
|
|
51
|
+
fileTitle += h2.trim().replace(/\s/g, '_')
|
|
52
|
+
} else {
|
|
53
|
+
fileTitle += h1.trim().replace(/\s/g, '_')
|
|
54
|
+
}
|
|
55
|
+
if (c > 0) {
|
|
56
|
+
title += ' ' + (c + 1)
|
|
57
|
+
fileTitle += '_' + (c + 1)
|
|
58
|
+
}
|
|
59
|
+
element.dataset.xTitle = title
|
|
60
|
+
element.dataset.xFileTitle = fileTitle
|
|
61
|
+
c++
|
|
62
|
+
break
|
|
63
|
+
}
|
|
64
|
+
// ifelement.
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export default XTableNamer
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
const config = ref<NsWowConfig>({
|
|
4
|
+
loaded: false,
|
|
5
|
+
settings: {
|
|
6
|
+
languages: ['de', 'en'],
|
|
7
|
+
defaultLanguage: 'de',
|
|
8
|
+
shortBreadcrumb: false,
|
|
9
|
+
search: {
|
|
10
|
+
boldTheWord: true
|
|
11
|
+
},
|
|
12
|
+
categories: []
|
|
13
|
+
},
|
|
14
|
+
articles: {},
|
|
15
|
+
menus: {}
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
async function getData() {
|
|
19
|
+
const file = `./json/settings.json`
|
|
20
|
+
try {
|
|
21
|
+
const response: Response = await fetch(file)
|
|
22
|
+
const lazySettings: NsWowSettings = await response.json()
|
|
23
|
+
config.value.settings = Object.assign(config.value.settings, lazySettings)
|
|
24
|
+
} catch (e) {
|
|
25
|
+
console.error(`"${file}" could not be loaded.`)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
for (const locale of config.value.settings.languages) {
|
|
29
|
+
const file: string = `./json/routing_${locale}.json`
|
|
30
|
+
try {
|
|
31
|
+
const response: Response = await fetch(file)
|
|
32
|
+
const routing: NsWowResponseRouting = await response.json()
|
|
33
|
+
config.value.articles[locale] = routing.pages
|
|
34
|
+
config.value.menus[locale] = routing.menu
|
|
35
|
+
} catch (e) {
|
|
36
|
+
console.error(`"${file}" could not be loaded.`)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
config.value.loaded = true
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default async function useConfig() {
|
|
44
|
+
if (!config.value.loaded) {
|
|
45
|
+
await getData()
|
|
46
|
+
}
|
|
47
|
+
return config
|
|
48
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { createI18n, type I18n, type I18nOptions, type LocaleMessages } from 'vue-i18n'
|
|
2
|
+
import useConfig from '@/composables/config'
|
|
3
|
+
|
|
4
|
+
let i18n: I18n | undefined = undefined
|
|
5
|
+
const initI18n = async function () {
|
|
6
|
+
if (!i18n) {
|
|
7
|
+
const config = await useConfig()
|
|
8
|
+
const defaultMessagesImport = import.meta.glob('@/locales/*.json', {
|
|
9
|
+
eager: true,
|
|
10
|
+
import: 'default'
|
|
11
|
+
})
|
|
12
|
+
const defaultMessages: LocaleMessages<any> = {}
|
|
13
|
+
|
|
14
|
+
for (const path in defaultMessagesImport) {
|
|
15
|
+
const matched = path.match(/([A-Za-z0-9-_]+)\./i)
|
|
16
|
+
if (matched && matched.length > 1) {
|
|
17
|
+
const locale = matched[1]
|
|
18
|
+
defaultMessages[locale] = defaultMessagesImport[path]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const file = `./json/translations_hosting.json`
|
|
23
|
+
try {
|
|
24
|
+
const responseMessages = await fetch(file)
|
|
25
|
+
if (responseMessages.ok) {
|
|
26
|
+
const importMessages: LocaleMessages<any> = await responseMessages.json()
|
|
27
|
+
for (const lang in importMessages) {
|
|
28
|
+
if (typeof defaultMessages[lang] !== 'undefined') {
|
|
29
|
+
importMessages[lang] = Object.assign(defaultMessages[lang], importMessages[lang])
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
} catch (e) {
|
|
34
|
+
console.error(`"${file}" could not be loaded.`)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const options: I18nOptions = {
|
|
38
|
+
legacy: false,
|
|
39
|
+
locale: config.value.settings.defaultLanguage,
|
|
40
|
+
fallbackLocale: config.value.settings.defaultLanguage,
|
|
41
|
+
availableLocales: Object.keys(defaultMessages),
|
|
42
|
+
globalInjection: true,
|
|
43
|
+
messages: defaultMessages
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
i18n = createI18n<false, typeof options>(options)
|
|
47
|
+
}
|
|
48
|
+
return i18n
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { initI18n, i18n }
|