@simple-reporting/base 1.0.37 → 1.0.39

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.
Files changed (274) hide show
  1. package/dev/.ddev/config.yaml +1 -1
  2. package/dev/.idea/codeStyles/Project.xml +61 -0
  3. package/dev/.idea/codeStyles/codeStyleConfig.xml +5 -0
  4. package/dev/.idea/copilot.data.migration.ask2agent.xml +6 -0
  5. package/dev/.idea/deployment.xml +14 -0
  6. package/dev/.idea/inspectionProfiles/Project_Default.xml +6 -0
  7. package/dev/.idea/modules.xml +8 -0
  8. package/dev/.idea/nsfd_report-demo-mms.iml +8 -0
  9. package/dev/.idea/php.xml +19 -0
  10. package/dev/.idea/prettier.xml +6 -0
  11. package/dev/.idea/vcs.xml +6 -0
  12. package/dev/.idea/watcherTasks.xml +4 -0
  13. package/dev/livingdocs.config.json +1192 -27
  14. package/dev/package.json +3 -1
  15. package/dev/src/App.vue +1 -2
  16. package/dev/src/Autoload.ts +1 -1
  17. package/dev/src/Dialog.vue +12 -61
  18. package/dev/src/assets/fonts/FontAwesome/font.scss +2 -0
  19. package/dev/src/assets/fonts/Inter/inter.scss +2 -4
  20. package/dev/src/assets/images/accordion-minus.svg +4 -0
  21. package/dev/src/assets/images/accordion-plus.svg +4 -0
  22. package/dev/src/assets/images/arrow-left.svg +5 -0
  23. package/dev/src/assets/images/arrow-right.svg +5 -0
  24. package/dev/src/assets/images/arrow-up.svg +5 -0
  25. package/dev/src/assets/images/chevron-down.svg +1 -0
  26. package/dev/src/assets/images/chevron-left.svg +1 -0
  27. package/dev/src/assets/images/chevron-right.svg +1 -0
  28. package/dev/src/assets/images/chevron-up.svg +1 -0
  29. package/dev/src/assets/images/close.svg +5 -0
  30. package/dev/src/assets/images/download.svg +6 -0
  31. package/dev/src/assets/images/facebook.svg +1 -0
  32. package/dev/src/assets/images/instagram.svg +1 -0
  33. package/dev/src/assets/images/language.svg +1 -0
  34. package/dev/src/assets/images/linkedIn.svg +1 -0
  35. package/dev/src/assets/images/logo.svg +1 -0
  36. package/dev/src/assets/images/menu-light.svg +3 -0
  37. package/dev/src/assets/images/menu.svg +3 -0
  38. package/dev/src/assets/images/nav-arrow-left.svg +3 -0
  39. package/dev/src/assets/images/nav-arrow-right.svg +3 -0
  40. package/dev/src/assets/images/search.svg +5 -0
  41. package/dev/src/assets/images/twitter.svg +1 -0
  42. package/dev/src/assets/images/xing.svg +1 -0
  43. package/dev/src/assets/scss/app.scss +9 -0
  44. package/dev/src/assets/scss/components/button.scss +37 -0
  45. package/dev/src/assets/scss/components/dialog.scss +84 -0
  46. package/dev/src/assets/scss/components/fontawesome.scss +56 -0
  47. package/dev/src/assets/scss/components/note/accordion.scss +55 -38
  48. package/dev/src/assets/scss/editor.scss +5 -5
  49. package/dev/src/assets/scss/general.scss +29 -2
  50. package/dev/src/assets/scss/margins.scss +57 -0
  51. package/dev/src/assets/scss/pdf.scss +0 -32
  52. package/dev/src/assets/scss/placeholders/breakout-grid.scss +34 -0
  53. package/dev/src/assets/scss/placeholders/button.scss +230 -0
  54. package/dev/src/assets/scss/placeholders/fontawesome.scss +7 -0
  55. package/dev/src/assets/scss/placeholders/grid.scss +354 -0
  56. package/dev/src/assets/scss/web.scss +17 -21
  57. package/dev/src/assets/scss/xbrl.scss +1 -0
  58. package/dev/src/components/Button/Default/Action.vue +65 -0
  59. package/dev/src/components/Button/Default/Content.vue +225 -0
  60. package/dev/src/components/Button/Default/ExternalLink.vue +63 -0
  61. package/dev/src/components/Button/Default/InternalLink.vue +64 -0
  62. package/dev/src/components/Button/Default.vue +101 -0
  63. package/dev/src/components/Page/MainNavigation.vue +96 -6
  64. package/dev/src/components/Page/MetaNavigation.vue +116 -0
  65. package/dev/src/components/Page/PrevNext.vue +140 -70
  66. package/dev/src/components/PageFooter.vue +405 -0
  67. package/dev/src/components/PageHeader.vue +828 -0
  68. package/dev/src/components/{Page/Main.vue → PageMain.vue} +11 -0
  69. package/dev/src/composables/globalLinks.ts +46 -0
  70. package/dev/src/composables/isDesktopView.ts +18 -0
  71. package/dev/src/composables/mainNavigation.ts +11 -0
  72. package/dev/src/entries/pdf.ts +5 -5
  73. package/dev/src/i18n/index.ts +1 -1
  74. package/dev/src/locales/de.json +40 -0
  75. package/dev/src/locales/en.json +40 -0
  76. package/dev/src/router/index.ts +1 -2
  77. package/dev/src/views/DevView.vue +1 -835
  78. package/dev/src/views/PageNotFound.vue +3 -69
  79. package/dev/srl.config.json +34 -49
  80. package/livingdocs/010.Titles/010.title-h1/scss/_spacing-variations.scss +17 -0
  81. package/livingdocs/010.Titles/010.title-h1/scss/general.scss +4 -0
  82. package/livingdocs/010.Titles/020.title-h2/scss/_spacing-variations.scss +12 -0
  83. package/livingdocs/010.Titles/020.title-h2/scss/general.scss +4 -0
  84. package/livingdocs/010.Titles/020.title-h2/title-h2.html +5 -4
  85. package/livingdocs/010.Titles/030.title-h3/scss/_spacing-variations.scss +13 -0
  86. package/livingdocs/010.Titles/030.title-h3/scss/general.scss +5 -1
  87. package/livingdocs/010.Titles/030.title-h3/title-h3.html +5 -4
  88. package/livingdocs/010.Titles/040.title-h4/scss/_spacing-variations.scss +12 -0
  89. package/livingdocs/010.Titles/040.title-h4/scss/general.scss +5 -1
  90. package/livingdocs/010.Titles/040.title-h4/title-h4.html +5 -4
  91. package/livingdocs/010.Titles/050.title-h5/scss/_spacing-variations.scss +11 -0
  92. package/livingdocs/010.Titles/050.title-h5/scss/general.scss +4 -0
  93. package/livingdocs/010.Titles/060.title-h6/scss/_spacing-variations.scss +10 -0
  94. package/livingdocs/010.Titles/060.title-h6/scss/general.scss +4 -0
  95. package/livingdocs/020.Text/010.lead/scss/_spacing-variations.scss +5 -0
  96. package/livingdocs/020.Text/010.lead/scss/general.scss +4 -0
  97. package/livingdocs/020.Text/020.paragraph/scss/_spacing-variations.scss +22 -0
  98. package/livingdocs/020.Text/020.paragraph/scss/general.scss +4 -0
  99. package/livingdocs/020.Text/060.quote-with-portrait/scss/_spacing-variations.scss +7 -0
  100. package/livingdocs/020.Text/060.quote-with-portrait/scss/general.scss +4 -1
  101. package/livingdocs/020.Text/060.quote-with-portrait/scss/pdf.scss +4 -10
  102. package/livingdocs/020.Text/060.quote-with-portrait/scss/web.scss +0 -1
  103. package/livingdocs/020.Text/070.footnote-container/scss/_spacing-variations.scss +22 -0
  104. package/livingdocs/020.Text/070.footnote-container/scss/general.scss +8 -0
  105. package/livingdocs/020.Text/070.footnote-container/scss/pdf.scss +0 -8
  106. package/livingdocs/020.Text/070.footnote-container/scss/web.scss +0 -5
  107. package/livingdocs/020.Text/070.footnote-container/scss/xbrl.scss +9 -1
  108. package/livingdocs/020.Text/080.footnote-item/scss/_spacing-variations.scss +4 -0
  109. package/livingdocs/020.Text/080.footnote-item/scss/general.scss +28 -1
  110. package/livingdocs/020.Text/080.footnote-item/scss/web.scss +0 -20
  111. package/livingdocs/020.Text/080.footnote-item/scss/xbrl.scss +26 -1
  112. package/livingdocs/030.Lists/010.unordered-list/ld-conf.json +3 -3
  113. package/livingdocs/030.Lists/010.unordered-list/scss/_spacing-variations.scss +22 -0
  114. package/livingdocs/030.Lists/010.unordered-list/scss/general.scss +3 -5
  115. package/livingdocs/030.Lists/010.unordered-list/scss/pdf.scss +3 -1
  116. package/livingdocs/030.Lists/010.unordered-list/scss/web.scss +15 -1
  117. package/livingdocs/030.Lists/010.unordered-list/scss/word.scss +1 -6
  118. package/livingdocs/030.Lists/010.unordered-list/scss/xbrl.scss +2 -1
  119. package/livingdocs/030.Lists/020.ordered-list/ld-conf.json +3 -3
  120. package/livingdocs/030.Lists/030.alphanumeric-list/ld-conf.json +3 -3
  121. package/livingdocs/030.Lists/040.list-item-unordered-list/ld-conf.json +23 -0
  122. package/livingdocs/030.Lists/040.list-item-unordered-list/list-item-unordered-list.html +8 -0
  123. package/livingdocs/030.Lists/040.list-item-unordered-list/scss/_spacing-variations.scss +4 -0
  124. package/livingdocs/030.Lists/040.list-item-unordered-list/scss/general.scss +14 -0
  125. package/livingdocs/030.Lists/{040.list-item → 040.list-item-unordered-list}/scss/pdf.scss +7 -1
  126. package/livingdocs/030.Lists/{040.list-item/scss/general.scss → 040.list-item-unordered-list/scss/web.scss} +17 -6
  127. package/livingdocs/030.Lists/040.list-item-unordered-list/scss/word.scss +5 -0
  128. package/livingdocs/030.Lists/040.list-item-unordered-list/scss/xbrl.scss +2 -0
  129. package/livingdocs/030.Lists/050.list-item-ordered-list/ld-conf.json +23 -0
  130. package/livingdocs/030.Lists/050.list-item-ordered-list/list-item-ordered-list.html +8 -0
  131. package/livingdocs/030.Lists/060.list-item-alphanumeric-list/ld-conf.json +23 -0
  132. package/livingdocs/030.Lists/060.list-item-alphanumeric-list/list-item-alphanumeric-list.html +8 -0
  133. package/livingdocs/040.Media/010.table/scss/_spacing-variations.scss +19 -0
  134. package/livingdocs/040.Media/010.table/scss/general.scss +270 -251
  135. package/livingdocs/040.Media/010.table/scss/pdf.scss +2 -18
  136. package/livingdocs/040.Media/010.table/scss/web.scss +0 -19
  137. package/livingdocs/040.Media/010.table/scss/xbrl.scss +4 -3
  138. package/livingdocs/040.Media/020.image/scss/_spacing-variations.scss +7 -0
  139. package/livingdocs/040.Media/020.image/scss/editor.scss +0 -1
  140. package/livingdocs/040.Media/020.image/scss/general.scss +6 -2
  141. package/livingdocs/040.Media/020.image/scss/pdf.scss +0 -4
  142. package/livingdocs/040.Media/020.image/scss/web.scss +0 -5
  143. package/livingdocs/040.Media/020.image/scss/xbrl.scss +1 -3
  144. package/livingdocs/040.Media/030.video/scss/_spacing-variations.scss +7 -0
  145. package/livingdocs/040.Media/030.video/scss/general.scss +19 -0
  146. package/livingdocs/040.Media/030.video/scss/pdf.scss +0 -10
  147. package/livingdocs/040.Media/030.video/scss/web.scss +0 -11
  148. package/livingdocs/040.Media/030.video/scss/xbrl.scss +1 -4
  149. package/livingdocs/060.Buttons/020.button/scss/general.scss +14 -75
  150. package/livingdocs/070.Container/020.columns-container/columns-container.html +1 -1
  151. package/livingdocs/070.Container/030.background-container/background-container.html +3 -0
  152. package/livingdocs/070.Container/030.background-container/ld-conf.json +4 -0
  153. package/livingdocs/070.Container/030.background-container/properties.json +1 -0
  154. package/livingdocs/070.Container/030.background-container/scss/_spacing-variations.scss +3 -0
  155. package/livingdocs/070.Container/030.background-container/scss/general.scss +9 -0
  156. package/livingdocs/070.Container/030.background-container/scss/pdf.scss +13 -0
  157. package/livingdocs/070.Container/030.background-container/scss/web.scss +1 -0
  158. package/livingdocs/070.Container/030.background-container/scss/word.scss +1 -0
  159. package/livingdocs/070.Container/030.background-container/scss/xbrl.scss +3 -0
  160. package/livingdocs/080.CV/010.cv/cv.html +2 -1
  161. package/livingdocs/080.CV/010.cv/scss/_spacing-variations.scss +5 -0
  162. package/livingdocs/080.CV/010.cv/scss/app.scss +16 -1
  163. package/livingdocs/080.CV/010.cv/scss/general.scss +4 -0
  164. package/livingdocs/080.CV/010.cv/scss/pdf.scss +2 -3
  165. package/livingdocs/080.CV/010.cv/scss/web.scss +17 -1
  166. package/livingdocs/080.CV/020.cv-time-span/scss/_spacing-variations.scss +14 -0
  167. package/livingdocs/080.CV/020.cv-time-span/scss/general.scss +4 -0
  168. package/livingdocs/080.CV/020.cv-time-span/scss/web.scss +0 -1
  169. package/livingdocs/100.Misc/010.anchor/scss/editor.scss +0 -1
  170. package/livingdocs/100.Misc/020.accordion/accordion.html +54 -7
  171. package/livingdocs/100.Misc/020.accordion/accordion.vue +83 -0
  172. package/livingdocs/100.Misc/020.accordion/scss/editor.scss +12 -0
  173. package/livingdocs/110.PDF/010.pdf-pagebreak/scss/editor.scss +0 -1
  174. package/livingdocs/110.PDF/021.pdf-columnbreak/scss/editor.scss +0 -1
  175. package/livingdocs/110.PDF/030.pdf-publication-title/scss/editor.scss +0 -1
  176. package/livingdocs/110.PDF/040.pdf-chapter-title/scss/editor.scss +0 -1
  177. package/livingdocs/110.PDF/050.pdf-chapter-navigation-container/scss/editor.scss +1 -1
  178. package/livingdocs/110.PDF/075.pdf-landscape-container/ld-conf.json +7 -0
  179. package/livingdocs/110.PDF/075.pdf-landscape-container/pdf-landscape-container.html +9 -0
  180. package/livingdocs/110.PDF/075.pdf-landscape-container/properties.json +15 -0
  181. package/livingdocs/110.PDF/075.pdf-landscape-container/scss/pdf.scss +19 -0
  182. package/livingdocs/110.PDF/100.pdf-toc-item/pdf-toc-item.html +3 -2
  183. package/livingdocs/110.PDF/100.pdf-toc-item/scss/general.scss +6 -5
  184. package/livingdocs/110.PDF/100.pdf-toc-item/scss/pdf.scss +9 -1
  185. package/livingdocs/130.Hosting_Components/010.download-center/download-center.html +7 -0
  186. package/livingdocs/130.Hosting_Components/010.download-center/download-center.vue +68 -0
  187. package/livingdocs/130.Hosting_Components/010.download-center/ld-conf.json +4 -0
  188. package/livingdocs/130.Hosting_Components/010.download-center/properties.json +1 -0
  189. package/livingdocs/130.Hosting_Components/010.download-center/scss/_spacing-variations.scss +3 -0
  190. package/livingdocs/130.Hosting_Components/010.download-center/scss/editor.scss +15 -0
  191. package/livingdocs/130.Hosting_Components/010.download-center/scss/general.scss +1 -0
  192. package/livingdocs/130.Hosting_Components/010.download-center/scss/pdf.scss +1 -0
  193. package/livingdocs/130.Hosting_Components/010.download-center/scss/web.scss +42 -0
  194. package/livingdocs/130.Hosting_Components/020.search/ld-conf.json +4 -0
  195. package/livingdocs/130.Hosting_Components/020.search/properties.json +1 -0
  196. package/livingdocs/130.Hosting_Components/020.search/scss/_spacing-variations.scss +4 -0
  197. package/livingdocs/130.Hosting_Components/020.search/scss/editor.scss +14 -0
  198. package/livingdocs/130.Hosting_Components/020.search/scss/general.scss +1 -0
  199. package/livingdocs/130.Hosting_Components/020.search/scss/pdf.scss +1 -0
  200. package/livingdocs/130.Hosting_Components/020.search/scss/web.scss +200 -0
  201. package/livingdocs/130.Hosting_Components/020.search/search.html +7 -0
  202. package/livingdocs/130.Hosting_Components/020.search/search.vue +484 -0
  203. package/livingdocs/999.Properties/breakout-grid/web.scss +5 -0
  204. package/livingdocs/999.Properties/grid/scss/app.scss +1 -0
  205. package/livingdocs/999.Properties/grid/scss/general.scss +31 -0
  206. package/livingdocs/999.Properties/grid/scss/pdf.scss +9 -0
  207. package/livingdocs/999.Properties/grid/scss/web.scss +1 -0
  208. package/livingdocs/999.Properties/grid/scss/xbrl.scss +2 -0
  209. package/livingdocs/999.Properties/icon/properties.json +2 -2
  210. package/package.json +1 -1
  211. package/plugins/viteSrlPlugin.js +16 -1
  212. package/scripts/build.js +1 -0
  213. package/scripts/config.js +6 -2
  214. package/scss/button.scss +25 -0
  215. package/scss/fa/font-free.scss +17 -0
  216. package/scss/fa/font-pro.scss +41 -0
  217. package/scss/fa/index.scss +118 -0
  218. package/scss/fa/source-free.scss +14 -0
  219. package/scss/fa/source-pro.scss +15 -0
  220. package/scss/index.scss +1 -0
  221. package/srl/.srl/components/Srl/Aria/TabChain.vue +6 -5
  222. package/srl/.srl/components/Srl/Article/Accordion.vue +37 -24
  223. package/srl/.srl/components/Srl/Article/Dialog/Button.vue +6 -5
  224. package/srl/.srl/components/Srl/Article/Root.vue +4 -1
  225. package/srl/.srl/components/Srl/Category/Accordion/Content.vue +2 -2
  226. package/srl/.srl/components/Srl/Category/Accordion.vue +8 -5
  227. package/srl/.srl/components/Srl/Menu/Item.vue +20 -5
  228. package/srl/.srl/components/Srl/Page/Dialog.vue +31 -14
  229. package/srl/.srl/types/nswow.d.ts +6 -1
  230. package/srl/.srl/utils/index.ts +2 -0
  231. package/srl/.srl/utils/pageState.ts +24 -23
  232. package/srl/srl/button.scss +2 -0
  233. package/srl/srl/fa/font-free.scss +17 -0
  234. package/srl/srl/fa/font-pro.scss +41 -0
  235. package/srl/srl/fa/index.scss +118 -0
  236. package/srl/srl/fa/source-free.scss +14 -0
  237. package/srl/srl/fa/source-pro.scss +15 -0
  238. package/dev/src/assets/fonts/Inter/Inter-Regular.ttf +0 -0
  239. package/dev/src/assets/fonts/Inter/Inter-SemiBold.ttf +0 -0
  240. package/dev/src/assets/fonts/Roboto/roboto-v30-latin-300.woff2 +0 -0
  241. package/dev/src/assets/fonts/Roboto/roboto-v30-latin-700.woff2 +0 -0
  242. package/dev/src/assets/fonts/Roboto/roboto-v30-latin-italic.woff2 +0 -0
  243. package/dev/src/assets/fonts/Roboto/roboto-v30-latin-regular.woff2 +0 -0
  244. package/dev/src/assets/images/mms-logo-white.svg +0 -105
  245. package/dev/src/assets/scss/components/icons.scss +0 -287
  246. package/dev/src/assets/scss/components/round-button.scss +0 -75
  247. package/dev/src/assets/scss/placeholders.scss +0 -588
  248. package/dev/src/components/Page/Footer.vue +0 -45
  249. package/dev/src/components/Page/Header.vue +0 -40
  250. package/dev/src/views/HomeView.vue +0 -5
  251. package/livingdocs/030.Lists/020.ordered-list/scss/general.scss +0 -6
  252. package/livingdocs/030.Lists/020.ordered-list/scss/pdf.scss +0 -5
  253. package/livingdocs/030.Lists/020.ordered-list/scss/word.scss +0 -9
  254. package/livingdocs/030.Lists/020.ordered-list/scss/xbrl.scss +0 -1
  255. package/livingdocs/030.Lists/030.alphanumeric-list/scss/general.scss +0 -6
  256. package/livingdocs/030.Lists/030.alphanumeric-list/scss/pdf.scss +0 -5
  257. package/livingdocs/030.Lists/030.alphanumeric-list/scss/word.scss +0 -9
  258. package/livingdocs/030.Lists/030.alphanumeric-list/scss/xbrl.scss +0 -1
  259. package/livingdocs/030.Lists/040.list-item/ld-conf.json +0 -5
  260. package/livingdocs/030.Lists/040.list-item/list-item.html +0 -5
  261. package/livingdocs/030.Lists/040.list-item/scss/web.scss +0 -27
  262. package/livingdocs/030.Lists/040.list-item/scss/word.scss +0 -19
  263. package/livingdocs/030.Lists/040.list-item/scss/xbrl.scss +0 -1
  264. /package/livingdocs/030.Lists/{020.ordered-list → 040.list-item-unordered-list}/scss/app.scss +0 -0
  265. /package/livingdocs/030.Lists/{020.ordered-list → 040.list-item-unordered-list}/scss/editor.scss +0 -0
  266. /package/livingdocs/{030.Lists/030.alphanumeric-list → 070.Container/030.background-container}/scss/app.scss +0 -0
  267. /package/livingdocs/{030.Lists/030.alphanumeric-list → 070.Container/030.background-container}/scss/editor.scss +0 -0
  268. /package/livingdocs/{030.Lists/040.list-item → 130.Hosting_Components/010.download-center}/scss/app.scss +0 -0
  269. /package/{dev/livingdocs/.gitkeep → livingdocs/130.Hosting_Components/010.download-center/scss/word.scss} +0 -0
  270. /package/livingdocs/{030.Lists/020.ordered-list/scss/web.scss → 130.Hosting_Components/010.download-center/scss/xbrl.scss} +0 -0
  271. /package/livingdocs/{030.Lists/040.list-item/scss/editor.scss → 130.Hosting_Components/020.search/scss/app.scss} +0 -0
  272. /package/livingdocs/{030.Lists/030.alphanumeric-list/scss/web.scss → 130.Hosting_Components/020.search/scss/word.scss} +0 -0
  273. /package/livingdocs/{060.Buttons/.gitkeep → 130.Hosting_Components/020.search/scss/xbrl.scss} +0 -0
  274. /package/livingdocs/999.Properties/{width → grid}/properties.json +0 -0
@@ -0,0 +1,484 @@
1
+ <script setup lang="ts">
2
+ import { useSearch, useLocale } from '#composables'
3
+ import { useRoute, useRouter } from 'vue-router'
4
+ import { computed, nextTick, onMounted, ref } from 'vue'
5
+ import ButtonDefault from '@/components/Button/Default.vue'
6
+ import { useGlobalLinks } from '@/composables/globalLinks.ts'
7
+ import SvgSearch from 'assets/images/search.svg?component'
8
+
9
+
10
+ const props = withDefaults(defineProps<{
11
+ searchMinLength?: number | string
12
+ charsAround?: number | string
13
+ wordsDistance?: number | string
14
+ useAutoSearch?: boolean | string
15
+ delayAutoSearch?: number | string
16
+ useMoreResults?: boolean | string
17
+ countMoreResults?: number | string
18
+ }>(), {
19
+ searchMinLength: 3,
20
+ charsAround: 50,
21
+ wordsDistance: 50,
22
+ useAutoSearch: false,
23
+ delayAutoSearch: 700,
24
+ useMoreResults: false,
25
+ countMoreResults: 10
26
+ })
27
+
28
+ /**
29
+ * Search component configuration
30
+ */
31
+ const searchMinLength = typeof props.searchMinLength === 'string' ?
32
+ parseInt(props.searchMinLength) : props.searchMinLength
33
+ const charsAround = typeof props.charsAround === 'string' ?
34
+ parseInt(props.charsAround) : props.charsAround
35
+ const wordsDistance = typeof props.wordsDistance === 'string' ?
36
+ parseInt(props.wordsDistance) : props.wordsDistance
37
+ const useAutoSearch = typeof props.useAutoSearch === 'string' ?
38
+ props.useAutoSearch === 'true' : props.useAutoSearch
39
+ const delayAutoSearch = typeof props.delayAutoSearch === 'string' ?
40
+ parseInt(props.delayAutoSearch) : props.delayAutoSearch
41
+ const useMoreResults = typeof props.useMoreResults === 'string' ?
42
+ props.useMoreResults === 'true' : props.useMoreResults
43
+ const countMoreResults = ref(
44
+ typeof props.countMoreResults === 'string' ?
45
+ parseInt(props.countMoreResults) : props.countMoreResults
46
+ )
47
+
48
+ /**
49
+ * Search component logic
50
+ */
51
+ const locale = useLocale()
52
+ const router = useRouter()
53
+ const route = useRoute()
54
+ const globalLinks = useGlobalLinks()
55
+ const isLoading = ref<boolean>(true)
56
+ const searchContext = await useSearch()
57
+ const searchInit = ref<boolean>(false)
58
+ const currentMoreResults = ref<number>(
59
+ window.sessionStorage.currentMoreResults ?
60
+ parseInt(window.sessionStorage.currentMoreResults) :
61
+ countMoreResults.value
62
+ )
63
+ const buttonMoreResults = ref<HTMLButtonElement>()
64
+ let searchTimer: NodeJS.Timeout | null = null
65
+
66
+ const searchInput = ref<HTMLInputElement>()
67
+ route.query.s ?
68
+ window.sessionStorage.currentSearchTerm = route.query.s?.toString() :
69
+ !window.sessionStorage.currentSearchTerm ?
70
+ window.sessionStorage.currentSearchTerm = "" :
71
+ null
72
+
73
+ !window.sessionStorage.currentMoreResults ?
74
+ window.sessionStorage.currentMoreResults = currentMoreResults.value.toString() :
75
+ null
76
+
77
+ const searchValue = ref<string>(window.sessionStorage.currentSearchTerm)
78
+ const arrSearchText = computed<string[]>(() => {
79
+ return searchValue.value
80
+ .split(" ")
81
+ .map((w) => w.trim())
82
+ .filter((w) => w)
83
+ })
84
+ const lastSearchValue = ref<string>(searchValue.value)
85
+ const searchResult = ref(startSearch())
86
+ const searchResultRows = ref<HTMLAnchorElement[]>()
87
+
88
+ function getBoldStyle() {
89
+ return "<b>$1</b>";
90
+ }
91
+
92
+ function applyStyle(style, text, words) {
93
+ const wordExpr = words.length > 1 ? words.join("|") : words[0];
94
+ const out = text.replace(new RegExp(`(${wordExpr})`, "gi"), style);
95
+ return out;
96
+ }
97
+
98
+ function extractWords(ranges) {
99
+ return ranges
100
+ .flat(2)
101
+ .reduce(
102
+ (acc, next) => (acc.includes(next.word) || acc.push(next.word), acc),
103
+ []
104
+ );
105
+ }
106
+
107
+ function postProcessResults({ length, texts, ranges }) {
108
+ let searchText = "";
109
+ let autocompText = "";
110
+
111
+ if (length > 0 && ranges.filter( r => r.index !== -1).length > 0) {
112
+ const text = texts.join(" ");
113
+ const words = extractWords(ranges);
114
+
115
+ searchText = text;
116
+
117
+ autocompText = true
118
+ ? applyStyle(getBoldStyle(), text, words)
119
+ : text;
120
+ }
121
+
122
+ return [{
123
+ searchText: searchText,
124
+ autocompText: autocompText,
125
+ }];
126
+ }
127
+
128
+ function fetchResults(texts: string, words: string[]) {
129
+ if (texts.length == 0) return { length: 0 };
130
+
131
+ const ranges = findRanges(texts, words);
132
+ const outTexts = extractRange(texts, ranges)
133
+
134
+ return {
135
+ texts: outTexts,
136
+ length: outTexts.length,
137
+ ranges,
138
+ };
139
+ }
140
+
141
+ function createIndexes(text: string, words: string[]) {
142
+ const createIndex = (text: string, word: string) => {
143
+ return {
144
+ index: text.search(new RegExp(word, "gi")),
145
+ word: word,
146
+ };
147
+ };
148
+
149
+ /*We sort words indexes from lower to higher*/
150
+ return words
151
+ .map((word) => createIndex(text, word))
152
+ .sort((a, b) => a.index - b.index);
153
+ }
154
+
155
+ function findRanges(text: string, words: string[]) {
156
+ const indexes = createIndexes(text, words);
157
+ let ranges = [];
158
+ let range = [];
159
+
160
+ indexes.map((index, i) => {
161
+ if (range.length == 0) return range.push(indexes[i]);
162
+
163
+ if (range[0].index + wordsDistance > indexes[i].index)
164
+ return range.push(indexes[i]);
165
+
166
+ ranges.push(range);
167
+ range = [indexes[i]];
168
+ });
169
+
170
+ if (range.length) ranges.push(range);
171
+
172
+ return ranges;
173
+ }
174
+
175
+
176
+ function extractRange(text, ranges) {
177
+ const texts = ranges.map((range) => {
178
+ // debugger
179
+ const first = range[0];
180
+ const last = range.length == 1 ? first : range[range.length - 1];
181
+
182
+ return extractText(text, first, last);
183
+ });
184
+
185
+ return texts;
186
+ }
187
+
188
+ function extractText(text, rangeFirst, rangeLast) {
189
+ const startIndex = rangeFirst.index - charsAround;
190
+ const lastIndex = rangeLast.index + charsAround;
191
+ const leftPad = startIndex > 0 ? "..." : "";
192
+ const rightPad = lastIndex < text.length ? "..." : "";
193
+
194
+ return leftPad + text.substring(startIndex, lastIndex) + rightPad;
195
+ }
196
+
197
+ function createResult(foundedParts, pageItem) {
198
+ if (!foundedParts) return null;
199
+
200
+ return {
201
+ pageItem: pageItem,
202
+ page: pageItem.slug,
203
+ foundedTexts: foundedParts,
204
+ };
205
+ }
206
+
207
+ function startSearch() {
208
+ const res = []
209
+ if (searchValue.value.length >= searchMinLength) {
210
+ const filterContext = searchContext.value.filter((i) => {
211
+ return arrSearchText.value.every((w) => new RegExp(w, "gi").test(i.words))
212
+ || new RegExp(searchValue.value, "gi").test(i.article.translatedTitle)
213
+ })
214
+
215
+ filterContext.forEach(page => {
216
+ const fetchRes = fetchResults(page.words, arrSearchText.value)
217
+ const postResult = postProcessResults(fetchRes)
218
+ let myResult = {
219
+ pageItem: page.article,
220
+ page: page.article.slug,
221
+ foundedTexts: postResult
222
+ }
223
+ res.push(myResult)
224
+ })
225
+ }
226
+ return res
227
+ }
228
+
229
+ startSearch()
230
+
231
+ function keyStartSearch(event: KeyboardEvent) {
232
+ if (useAutoSearch) {
233
+ if (searchTimer) {
234
+ clearTimeout(searchTimer)
235
+ }
236
+ searchTimer = setTimeout(() => {
237
+ triggerSearch()
238
+ }, delayAutoSearch)
239
+ if (event.key === "Enter") {
240
+ focusResult(0)
241
+ }
242
+ } else {
243
+ if (event.key === "Enter") {
244
+ triggerSearch()
245
+ if (searchResult.value.length) {
246
+ router.push({
247
+ ...route,
248
+ query: {
249
+ s: searchValue.value
250
+ }
251
+ })
252
+ }
253
+ }
254
+ }
255
+ }
256
+
257
+ function submitSearch() {
258
+ if (useAutoSearch) {
259
+ focusResult(0)
260
+ } else {
261
+ triggerSearch()
262
+ if (searchResult.value.length) {
263
+ router.push({
264
+ ...route,
265
+ query: {
266
+ s: searchValue.value
267
+ }
268
+ })
269
+ }
270
+ }
271
+ }
272
+
273
+ function triggerSearch() {
274
+ isLoading.value = true
275
+ searchInit.value = true
276
+ searchResult.value = []
277
+ searchResult.value = startSearch()
278
+ searchResult.value.length ? lastSearchValue.value = searchValue.value : null
279
+ window.sessionStorage.currentSearchTerm = lastSearchValue.value
280
+ resetMoreResults()
281
+ isLoading.value = false
282
+ }
283
+
284
+ function escapeHtml(html) {
285
+ const map = {
286
+ '&': '&amp;',
287
+ '<': '&lt;',
288
+ '>': '&gt;',
289
+ '"': '&quot;',
290
+ "'": '&#039;'
291
+ };
292
+ return html.replace(/[&<>"']/g, (char) => map[char]);
293
+ }
294
+
295
+ function focusResult(index: number) {
296
+ const item = searchResultRows.value?.[index]
297
+ !item || item.focus()
298
+ }
299
+
300
+ function nextResult(index: number) {
301
+ const treshhold = !useMoreResults ?
302
+ searchResult.value.length :
303
+ searchResult.value.length < currentMoreResults.value ?
304
+ searchResult.value.length :
305
+ currentMoreResults.value
306
+
307
+ let newIndex = index >= treshhold - 1 ? 0 : index + 1
308
+ buttonMoreResults.value && newIndex === 0 ?
309
+ buttonMoreResults.value.focus() :
310
+ focusResult(newIndex)
311
+ }
312
+
313
+ function prevResult(index: number) {
314
+ let newIndex = index <= 0 ? searchResult.value.length - 1 : index - 1
315
+ buttonMoreResults.value && newIndex === searchResult.value.length - 1 ?
316
+ buttonMoreResults.value.focus() :
317
+ focusResult(newIndex)
318
+ }
319
+
320
+ async function clickResult(index: number, href: string) {
321
+ setWindowState(index)
322
+ router.push({
323
+ path: href,
324
+ }).then(() => {
325
+ const mainElement: HTMLDivElement | null = document.querySelector('#srl-page-main')
326
+ if (mainElement) {
327
+ nextTick(() => {
328
+ setTimeout(() => {
329
+ mainElement.scrollTo({
330
+ top: 16,
331
+ behavior: 'instant'
332
+ })
333
+ mainElement.focus()
334
+ },700)
335
+ })
336
+ }
337
+ })
338
+ }
339
+
340
+ function resetMoreResults() {
341
+ currentMoreResults.value = countMoreResults.value
342
+ window.sessionStorage.currentMoreResults = currentMoreResults.value
343
+ }
344
+
345
+ function increaseMoreResults() {
346
+ const index = currentMoreResults.value
347
+ currentMoreResults.value += countMoreResults.value
348
+ window.sessionStorage.currentMoreResults = currentMoreResults.value
349
+ nextTick(() => {
350
+ focusResult(index)
351
+ })
352
+ }
353
+
354
+ onMounted(() => {
355
+ if (
356
+ window.history.state.currentSearchResult !== undefined &&
357
+ window.history.state.currentSearchResult !== -1 &&
358
+ searchResultRows.value?.length &&
359
+ searchResultRows.value[window.history.state.currentSearchResult]
360
+ ) {
361
+ focusResult(window.history.state.currentSearchResult)
362
+ } else {
363
+ searchInput.value?.focus()
364
+ }
365
+ })
366
+
367
+ function setWindowState(index: number) {
368
+ window.history.state.currentSearchResult = index
369
+ }
370
+
371
+ </script>
372
+
373
+ <template>
374
+ <div class="srl-search__wrap">
375
+ <div class="srl-grid srl-search-form">
376
+ <div class="srl-grid__inner">
377
+ <div class="srl-search-form__group">
378
+ <label for="search" class="srl-search-form__label">
379
+ {{$t('accessibility.searchLabel')}}
380
+ </label>
381
+ <input
382
+ id="search"
383
+ ref="searchInput"
384
+ type="text"
385
+ class="srl-search-form__input"
386
+ :placeholder="$t('search.placeholder')"
387
+ aria-label="Search"
388
+ v-model="searchValue"
389
+ @keydown="keyStartSearch"
390
+ @focus="setWindowState(-1)"
391
+ />
392
+ <button
393
+ tabindex="-2"
394
+ class="srl-button srl-button--icon"
395
+ type="button"
396
+ :aria-label="$t('search.search')"
397
+ @click="submitSearch"
398
+ >
399
+ <i class="srl-icon-search"/>
400
+ </button>
401
+ </div>
402
+ </div>
403
+ </div>
404
+
405
+ <div v-if="searchResult.length" class="srl-grid srl-search-results">
406
+ <div class="srl-grid__inner">
407
+ <h2 class="srl-title-h2 srl-search-results__main-title">
408
+ <span class="srl-title-h2__number-text-container">
409
+ <span class="srl-title-h2__text" v-text="$t('search.resultCount', { count: searchResult.length, text: lastSearchValue })" />
410
+ </span>
411
+ </h2>
412
+ <nav
413
+ class="srl-search-results__nav"
414
+ tabindex="-1"
415
+ @keydown.stop.prevent.up="focusResult(0)"
416
+ @keydown.stop.prevent.right="focusResult(0)"
417
+ @keydown.stop.prevent.down="focusResult(0)"
418
+ @keydown.stop.prevent.left="focusResult(0)"
419
+ @keydown.stop.prevent.esc="focusResult(0)"
420
+ >
421
+ <ul class="srl-search-results__list">
422
+ <template v-for="(item, index) in searchResult" :key="index">
423
+ <li v-if="!useMoreResults || currentMoreResults > index" class="srl-search-results__item">
424
+ <a
425
+ ref="searchResultRows"
426
+ :href="`./${locale}/${item.pageItem.slug}`"
427
+ class="srl-search-results__link"
428
+ @click.prevent.stop="clickResult(index, `/${locale}/${item.pageItem.slug}`)"
429
+ @keydown.stop.prevent.up="prevResult(index)"
430
+ @keydown.stop.prevent.right="nextResult(index)"
431
+ @keydown.stop.prevent.down="nextResult(index)"
432
+ @keydown.stop.prevent.left="prevResult(index)"
433
+ @keydown.stop.prevent.esc="searchInput?.focus()"
434
+ @keydown.stop.prevent.enter="clickResult(index, `/${locale}/${item.pageItem.slug}`)"
435
+ @keydown.stop.prevent.space="clickResult(index, `/${locale}/${item.pageItem.slug}`)"
436
+ >
437
+ <h3 class="srl-search-results__title">
438
+ {{ item.pageItem.translatedTitle }}
439
+ </h3>
440
+ <p
441
+ v-for="(text, textIndex) in item.foundedTexts"
442
+ :key="textIndex"
443
+ class="srl-search-results__snippet"
444
+ v-html="text.autocompText"
445
+ />
446
+ </a>
447
+ </li>
448
+ </template>
449
+ </ul>
450
+ </nav>
451
+ <div v-if="useMoreResults && currentMoreResults < searchResult.length" class="srl-grid srl-search-load-more">
452
+ <div class="srl-grid__inner">
453
+ <div class="srl-button-container">
454
+ <div class="srl-button-container__inner">
455
+ <button
456
+ ref="buttonMoreResults"
457
+ type="button"
458
+ class="srl-button"
459
+ :aria-label="$t('search.showMoreResults')"
460
+ @click="increaseMoreResults"
461
+ @keydown.stop.prevent.up="focusResult( currentMoreResults - 1 )"
462
+ @keydown.stop.prevent.right="focusResult( currentMoreResults - 1 )"
463
+ @keydown.stop.prevent.down="focusResult(0)"
464
+ @keydown.stop.prevent.left="focusResult(0)"
465
+ @keydown.stop.prevent.esc="searchInput?.focus()"
466
+ >
467
+ <i class="srl-button__icon" aria-hidden="true"></i>
468
+ <span class="srl-button__text" v-text="$t('search.showMoreResults')" />
469
+ </button>
470
+ </div>
471
+ </div>
472
+ </div>
473
+ </div>
474
+ </div>
475
+ </div>
476
+ <div v-else-if="searchResult.length === 0 && searchInit" class="srl-search-results">
477
+ <div class="srl-grid srl-lead srl-mt-200">
478
+ <p class="srl-grid__inner srl-lead__text srl-linkable">
479
+ {{$t('search.noResultsMessage')}}
480
+ </p>
481
+ </div>
482
+ </div>
483
+ </div>
484
+ </template>
@@ -0,0 +1,5 @@
1
+ @use "srl";
2
+
3
+ .srl-test {
4
+
5
+ }
@@ -0,0 +1 @@
1
+ @use "web";
@@ -0,0 +1,31 @@
1
+ @use "srl";
2
+
3
+ .srl-grid {
4
+ @extend %srl-grid-base;
5
+
6
+ .srl-grid {
7
+ @extend %srl-grid-reset;
8
+ }
9
+ }
10
+
11
+ .srl-grid__inner {
12
+ @extend %srl-regular-width;
13
+
14
+ .srl-wide-width & {
15
+ @extend %srl-wide-width;
16
+ }
17
+
18
+ .srl-quote.srl-wide-width & {
19
+ @extend %srl-quote-wide-width;
20
+ }
21
+ }
22
+
23
+ .srl-grid__aside {
24
+ @extend %srl-trim-margins;
25
+ @extend %srl-aside-width;
26
+ }
27
+
28
+ .srl-grid__content {
29
+ @extend %srl-trim-margins;
30
+ @extend %srl-regular-width;
31
+ }
@@ -0,0 +1,9 @@
1
+ @use "srl";
2
+
3
+ .srl-grid__aside {
4
+ @extend %srl-trim-margins;
5
+ }
6
+
7
+ .srl-grid__content {
8
+ @extend %srl-trim-margins;
9
+ }
@@ -0,0 +1 @@
1
+ @use "srl";
@@ -0,0 +1,2 @@
1
+ @use "srl";
2
+ @use "general";
@@ -8,11 +8,11 @@
8
8
  },
9
9
  {
10
10
  "caption": "Arrow right",
11
- "value": "srl-icon-arrow-right-after"
11
+ "value": "srl-button-icon-arrow-right-after"
12
12
  },
13
13
  {
14
14
  "caption": "Download",
15
- "value": "srl-icon-download-after"
15
+ "value": "srl-button-icon-download-after"
16
16
  }
17
17
  ]
18
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-reporting/base",
3
- "version": "1.0.37",
3
+ "version": "1.0.39",
4
4
  "description": "Manage srl templates, build and publish",
5
5
  "repository": {
6
6
  "url": "https://github.com/mmssolutionsio/simple-reporting-library"
@@ -17,6 +17,14 @@ import {
17
17
  import chalk from 'chalk';
18
18
  import { vueComponents } from '../scripts/vue/components.js';
19
19
 
20
+ /**
21
+ * Determine Font Awesome type (free or pro) based on the presence of the pro package in node_modules
22
+ * @type {string}
23
+ */
24
+ let faType = 'free'
25
+ if (existsSync(join(folders.root, 'node_modules', '@fortawesome', 'fontawesome-pro'))) {
26
+ faType = 'pro';
27
+ }
20
28
 
21
29
  /**
22
30
  * Output prompts message in a box
@@ -107,6 +115,7 @@ async function startActions() {
107
115
  if (!srlConfig || JSON.stringify(srlConfig) !== JSON.stringify(data)) {
108
116
  writeConfigJson(data);
109
117
  }
118
+
110
119
  if (srlConfig && srlConfig.version !== data.version) {
111
120
  await prepare();
112
121
  printPromptsMessage([
@@ -114,12 +123,14 @@ async function startActions() {
114
123
  'Trigger srl prepare',
115
124
  ]);
116
125
 
126
+ /*
117
127
  printPromptsMessage([
118
128
  'Build or dev process abort',
119
129
  'Please restart the process to apply the new version.',
120
130
  ]);
121
131
 
122
132
  process.exit();
133
+ */
123
134
  }
124
135
 
125
136
  await vueComponents();
@@ -146,7 +157,6 @@ function viteSrlPlugin() {
146
157
  return {
147
158
  name: 'vite-srl-plugin',
148
159
  config(config) {
149
- startActions();
150
160
 
151
161
  config.base = './';
152
162
 
@@ -164,8 +174,13 @@ function viteSrlPlugin() {
164
174
  config.resolve.alias['#ld'] = folders.ld;
165
175
  config.resolve.alias['assets'] = folders.srlAssets;
166
176
  config.resolve.alias['srl'] = folders.srlSystem;
177
+ config.resolve.alias['fa-source'] = join(folders.srlSystem, 'fa', `source-${faType}.scss`);
178
+ config.resolve.alias['fa-font'] = join(folders.srlSystem, 'fa', `font-${faType}.scss`);
167
179
  config.resolve.alias['vue'] = 'vue/dist/vue.esm-bundler.js';
168
180
  },
181
+ async configResolved() {
182
+ await startActions();
183
+ },
169
184
  async configureServer(server) {
170
185
  const fontPath = join(folders.srlAssets, 'fonts');
171
186
 
package/scripts/build.js CHANGED
@@ -940,6 +940,7 @@ async function mapIndexScss() {
940
940
  `@forward './typography' as typography-*;`,
941
941
  `@forward './helpers' as helpers-*;`,
942
942
  `@forward './spacer' as spacer-*;`,
943
+ `@forward "./button" as button-*;`,
943
944
  `@forward './meta';`,
944
945
  ]
945
946
 
package/scripts/config.js CHANGED
@@ -17,7 +17,9 @@ export const baseComponentsToInstall = [
17
17
  '030.Lists/010.unordered-list',
18
18
  '030.Lists/020.ordered-list',
19
19
  '030.Lists/030.alphanumeric-list',
20
- '030.Lists/040.list-item',
20
+ '030.Lists/040.list-item-unordered-list',
21
+ '030.Lists/050.list-item-ordered-list',
22
+ '030.Lists/060.list-item-alphanumeric-list',
21
23
  '040.Media/010.table',
22
24
  '040.Media/020.image',
23
25
  '040.Media/030.video',
@@ -35,8 +37,10 @@ export const baseComponentsToInstall = [
35
37
  '110.PDF/100.pdf-toc-item',
36
38
  '999.Properties/alignment',
37
39
  '999.Properties/hide-quote-characters',
40
+ '999.Properties/icon',
38
41
  '999.Properties/pdf-spacer',
39
- '999.Properties/width'
42
+ '999.Properties/reverse',
43
+ '999.Properties/grid',
40
44
  ];
41
45
 
42
46
  export const nsWowInternalLddUrl = 'https://nswow-ld.nswow.ch/designs';
@@ -0,0 +1,25 @@
1
+ @mixin switch($seletor) {
2
+ & {
3
+ &:hover {
4
+ #{$seletor} {
5
+ @extend %srl-button__switch-hover;
6
+ }
7
+ }
8
+
9
+ &:focus,
10
+ &:focus-visible {
11
+ #{$seletor} {
12
+ @extend %srl-button__switch-focus;
13
+ }
14
+ }
15
+
16
+ &.srl-active,
17
+ &[aria-expanded="true"],
18
+ &[aria-selected="true"],
19
+ &[aria-current="page"] {
20
+ #{$seletor} {
21
+ @extend %srl-button__switch-active;
22
+ }
23
+ }
24
+ }
25
+ }