@demos-europe/demosplan-ui 0.4.12 → 0.4.13

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 (265) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/CHANGELOG.md +10 -0
  3. package/babel.config.js +9 -9
  4. package/dist/demosplan-ui.umd.js +1 -1
  5. package/eslint.config.js +104 -0
  6. package/jest/shallowMountWithGlobalMocks.js +8 -6
  7. package/jest.config.js +4 -4
  8. package/package.json +12 -5
  9. package/scripts/buildTokens.js +1 -1
  10. package/scripts/utils/transformTokens.js +2 -2
  11. package/src/components/DpAccordion/DpAccordion.vue +4 -4
  12. package/src/components/DpAnonymizeText/DpAnonymizeText.vue +4 -4
  13. package/src/components/DpBulkEditHeader/DpBulkEditHeader.stories.tsx +1 -1
  14. package/src/components/DpButton/DpButton.vue +51 -43
  15. package/src/components/DpButtonIcon/DpButtonIcon.vue +5 -5
  16. package/src/components/DpButtonRow/DpButtonRow.vue +5 -5
  17. package/src/components/DpCheckbox/DpCheckbox.vue +2 -2
  18. package/src/components/DpCheckboxGroup/DpCheckboxGroup.vue +4 -4
  19. package/src/components/DpColumnSelector/DpColumnSelector.vue +1 -1
  20. package/src/components/DpContextualHelp/DpContextualHelp.vue +4 -4
  21. package/src/components/DpDataTable/DpDataTable.vue +53 -49
  22. package/src/components/DpDataTable/DpResizableColumn.vue +1 -1
  23. package/src/components/DpDataTable/DpTableHeader.vue +6 -4
  24. package/src/components/DpDataTable/DpTableRow.vue +1 -1
  25. package/src/components/DpDataTableExtended/DpDataTableExtended.vue +8 -8
  26. package/src/components/DpDataTableExtended/DpSelectPageItemCount.vue +2 -2
  27. package/src/components/DpDatetimePicker/DpDatetimePicker.vue +6 -6
  28. package/src/components/DpDetails/DpDetails.vue +1 -1
  29. package/src/components/DpDraggable/DpDraggable.vue +10 -12
  30. package/src/components/DpEditor/DpEditor.vue +45 -45
  31. package/src/components/DpEditor/DpResizableImage.vue +6 -6
  32. package/src/components/DpEditor/DpUploadModal.vue +11 -12
  33. package/src/components/DpEditor/MentionList.vue +5 -3
  34. package/src/components/DpEditor/libs/editorObscure.js +2 -2
  35. package/src/components/DpFlyout/DpFlyout.vue +5 -5
  36. package/src/components/DpIcon/util/iconConfig.ts +28 -28
  37. package/src/components/DpInlineNotification/DpInlineNotification.vue +2 -2
  38. package/src/components/DpLabel/DpLabel.vue +5 -3
  39. package/src/components/DpModal/DpModal.vue +5 -5
  40. package/src/components/DpMultiselect/DpMultiselect.vue +23 -25
  41. package/src/components/DpMultistepNav/DpMultistepNav.vue +2 -2
  42. package/src/components/DpPager/DpPager.vue +12 -12
  43. package/src/components/DpResettableInput/DpResettableInput.vue +3 -3
  44. package/src/components/DpSearchField/DpSearchField.vue +7 -2
  45. package/src/components/DpSelect/DpSelect.vue +3 -3
  46. package/src/components/DpSkeletonBox/DpSkeletonBox.vue +1 -1
  47. package/src/components/DpSlidebar/DpSlidebar.vue +2 -2
  48. package/src/components/DpSplitButton/DpSplitButton.vue +2 -2
  49. package/src/components/DpStickyElement/DpStickyElement.vue +1 -1
  50. package/src/components/DpTabs/DpTabs.vue +1 -1
  51. package/src/components/DpTextArea/DpTextArea.vue +4 -4
  52. package/src/components/DpTimePicker/DpTimePicker.vue +14 -14
  53. package/src/components/DpToggle/DpToggle.vue +1 -1
  54. package/src/components/DpTooltip/DpTooltip.vue +4 -2
  55. package/src/components/DpTooltip/utils/tooltip.js +4 -4
  56. package/src/components/DpTooltipIcon/DpTooltipIcon.vue +2 -2
  57. package/src/components/DpTransitionExpand/DpTransitionExpand.vue +1 -1
  58. package/src/components/DpTreeList/DpTreeList.vue +4 -4
  59. package/src/components/DpTreeList/DpTreeListCheckbox.vue +1 -1
  60. package/src/components/DpTreeList/DpTreeListNode.vue +12 -12
  61. package/src/components/DpUploadFiles/DpUpload.vue +2 -2
  62. package/src/components/DpUploadFiles/DpUploadFiles.vue +10 -10
  63. package/src/components/DpUploadFiles/DpUploadedFile.vue +6 -6
  64. package/src/components/DpUploadFiles/DpUploadedFileList.vue +4 -4
  65. package/src/components/DpVideoPlayer/DpVideoPlayer.vue +7 -7
  66. package/src/directives/CleanHtml/CleanHtml.js +1 -1
  67. package/src/directives/Tooltip/Tooltip.js +1 -1
  68. package/src/lib/ActionMenu.js +48 -48
  69. package/src/lib/DpApi.js +2 -2
  70. package/src/lib/FileInfo.js +15 -15
  71. package/src/lib/validation/utils/assignHandlerForTrigger.js +8 -8
  72. package/src/lib/validation/utils/assignHandlersForInputs.js +51 -51
  73. package/src/lib/validation/utils/assignObserver.js +29 -29
  74. package/src/lib/validation/utils/helpers.js +4 -4
  75. package/src/lib/validation/utils/validateForm.js +15 -15
  76. package/src/lib/validation/utils/validateInputField.js +11 -11
  77. package/src/utils/index.js +2 -2
  78. package/tokens/dist/js/boxShadow.js +1 -1
  79. package/tokens/dist/js/breakpoints.js +1 -1
  80. package/tokens/dist/js/color.brand.js +1 -1
  81. package/tokens/dist/js/color.data.js +1 -1
  82. package/tokens/dist/js/color.palette.js +1 -1
  83. package/tokens/dist/js/color.ui.js +1 -1
  84. package/tokens/dist/js/fontSize.js +1 -1
  85. package/tokens/dist/js/rounded.js +1 -1
  86. package/tokens/dist/js/space.js +1 -1
  87. package/tokens/dist/js/zIndex.js +1 -1
  88. package/tokens/dist/scss/_boxShadow.scss +1 -1
  89. package/tokens/dist/scss/_breakpoints.scss +1 -1
  90. package/tokens/dist/scss/_color.brand.scss +1 -1
  91. package/tokens/dist/scss/_color.data.scss +1 -1
  92. package/tokens/dist/scss/_color.palette.scss +1 -1
  93. package/tokens/dist/scss/_color.ui.scss +1 -1
  94. package/tokens/dist/scss/_fontSize.scss +1 -1
  95. package/tokens/dist/scss/_rounded.scss +1 -1
  96. package/tokens/dist/scss/_space.scss +1 -1
  97. package/tokens/dist/scss/_zIndex.scss +1 -1
  98. package/types/icons.ts +26 -26
  99. package/coverage/clover.xml +0 -6
  100. package/coverage/coverage-final.json +0 -1
  101. package/coverage/lcov-report/base.css +0 -224
  102. package/coverage/lcov-report/block-navigation.js +0 -87
  103. package/coverage/lcov-report/components/DpContextualHelp/DpContextualHelp.vue.html +0 -271
  104. package/coverage/lcov-report/components/DpContextualHelp/index.html +0 -116
  105. package/coverage/lcov-report/components/DpDataTableExtended/DataTableSearch.js.html +0 -190
  106. package/coverage/lcov-report/components/DpDataTableExtended/index.html +0 -116
  107. package/coverage/lcov-report/components/DpEditor/libs/handleWordPaste.js.html +0 -1138
  108. package/coverage/lcov-report/components/DpEditor/libs/index.html +0 -116
  109. package/coverage/lcov-report/components/DpIcon/DpIcon.vue.html +0 -256
  110. package/coverage/lcov-report/components/DpIcon/index.html +0 -131
  111. package/coverage/lcov-report/components/DpIcon/index.ts.html +0 -91
  112. package/coverage/lcov-report/components/DpIcon/util/iconVariables.js.html +0 -682
  113. package/coverage/lcov-report/components/DpIcon/util/index.html +0 -116
  114. package/coverage/lcov-report/components/DpTooltip/utils/index.html +0 -116
  115. package/coverage/lcov-report/components/DpTooltip/utils/tooltip.js.html +0 -490
  116. package/coverage/lcov-report/components/shared/index.html +0 -116
  117. package/coverage/lcov-report/components/shared/translations.js.html +0 -490
  118. package/coverage/lcov-report/directives/CleanHtml/CleanHtml.js.html +0 -265
  119. package/coverage/lcov-report/directives/CleanHtml/index.html +0 -116
  120. package/coverage/lcov-report/directives/Tooltip/Tooltip.js.html +0 -349
  121. package/coverage/lcov-report/directives/Tooltip/index.html +0 -116
  122. package/coverage/lcov-report/directives/index.html +0 -116
  123. package/coverage/lcov-report/directives/index.js.html +0 -109
  124. package/coverage/lcov-report/favicon.png +0 -0
  125. package/coverage/lcov-report/index.html +0 -101
  126. package/coverage/lcov-report/jest/index.html +0 -116
  127. package/coverage/lcov-report/jest/shallowMountWithGlobalMocks.js.html +0 -208
  128. package/coverage/lcov-report/prettify.css +0 -1
  129. package/coverage/lcov-report/prettify.js +0 -2
  130. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  131. package/coverage/lcov-report/sorter.js +0 -196
  132. package/coverage/lcov-report/src/components/DpCheckbox/DpCheckbox.vue.html +0 -424
  133. package/coverage/lcov-report/src/components/DpCheckbox/index.html +0 -116
  134. package/coverage/lcov-report/src/components/DpContextualHelp/DpContextualHelp.vue.html +0 -361
  135. package/coverage/lcov-report/src/components/DpContextualHelp/index.html +0 -131
  136. package/coverage/lcov-report/src/components/DpContextualHelp/index.ts.html +0 -91
  137. package/coverage/lcov-report/src/components/DpDataTableExtended/DataTableSearch.js.html +0 -190
  138. package/coverage/lcov-report/src/components/DpDataTableExtended/index.html +0 -116
  139. package/coverage/lcov-report/src/components/DpDraggable/DpDraggable.vue.html +0 -499
  140. package/coverage/lcov-report/src/components/DpDraggable/index.html +0 -131
  141. package/coverage/lcov-report/src/components/DpDraggable/index.ts.html +0 -91
  142. package/coverage/lcov-report/src/components/DpEditor/libs/handleWordPaste.js.html +0 -1153
  143. package/coverage/lcov-report/src/components/DpEditor/libs/index.html +0 -116
  144. package/coverage/lcov-report/src/components/DpIcon/DpIcon.vue.html +0 -256
  145. package/coverage/lcov-report/src/components/DpIcon/index.html +0 -131
  146. package/coverage/lcov-report/src/components/DpIcon/index.ts.html +0 -91
  147. package/coverage/lcov-report/src/components/DpIcon/util/iconVariables.js.html +0 -706
  148. package/coverage/lcov-report/src/components/DpIcon/util/index.html +0 -116
  149. package/coverage/lcov-report/src/components/DpInput/DpInput.vue.html +0 -937
  150. package/coverage/lcov-report/src/components/DpInput/index.html +0 -131
  151. package/coverage/lcov-report/src/components/DpInput/index.ts.html +0 -91
  152. package/coverage/lcov-report/src/components/DpLabel/DpLabel.vue.html +0 -409
  153. package/coverage/lcov-report/src/components/DpLabel/index.html +0 -131
  154. package/coverage/lcov-report/src/components/DpLabel/index.ts.html +0 -91
  155. package/coverage/lcov-report/src/components/DpModal/DpModal.vue.html +0 -739
  156. package/coverage/lcov-report/src/components/DpModal/index.html +0 -131
  157. package/coverage/lcov-report/src/components/DpModal/index.ts.html +0 -91
  158. package/coverage/lcov-report/src/components/DpNotification/DpNotification.vue.html +0 -343
  159. package/coverage/lcov-report/src/components/DpNotification/index.html +0 -131
  160. package/coverage/lcov-report/src/components/DpNotification/index.ts.html +0 -91
  161. package/coverage/lcov-report/src/components/DpObscure/DpObscure.vue.html +0 -148
  162. package/coverage/lcov-report/src/components/DpObscure/index.html +0 -131
  163. package/coverage/lcov-report/src/components/DpObscure/index.ts.html +0 -91
  164. package/coverage/lcov-report/src/components/DpSelect/DpSelect.vue.html +0 -559
  165. package/coverage/lcov-report/src/components/DpSelect/index.html +0 -131
  166. package/coverage/lcov-report/src/components/DpSelect/index.ts.html +0 -91
  167. package/coverage/lcov-report/src/components/DpTooltip/utils/index.html +0 -116
  168. package/coverage/lcov-report/src/components/DpTooltip/utils/tooltip.js.html +0 -490
  169. package/coverage/lcov-report/src/components/DpTreeList/DpTreeList.vue.html +0 -1099
  170. package/coverage/lcov-report/src/components/DpTreeList/DpTreeListCheckbox.vue.html +0 -301
  171. package/coverage/lcov-report/src/components/DpTreeList/DpTreeListNode.vue.html +0 -1144
  172. package/coverage/lcov-report/src/components/DpTreeList/DpTreeListToggle.vue.html +0 -382
  173. package/coverage/lcov-report/src/components/DpTreeList/index.html +0 -161
  174. package/coverage/lcov-report/src/components/DpTreeList/utils/constants.js.html +0 -100
  175. package/coverage/lcov-report/src/components/DpTreeList/utils/index.html +0 -116
  176. package/coverage/lcov-report/src/components/DpUploadFiles/DpUpload.vue.html +0 -979
  177. package/coverage/lcov-report/src/components/DpUploadFiles/DpUploadFiles.vue.html +0 -970
  178. package/coverage/lcov-report/src/components/DpUploadFiles/DpUploadedFile.vue.html +0 -340
  179. package/coverage/lcov-report/src/components/DpUploadFiles/DpUploadedFileList.vue.html +0 -202
  180. package/coverage/lcov-report/src/components/DpUploadFiles/index.html +0 -176
  181. package/coverage/lcov-report/src/components/DpUploadFiles/index.ts.html +0 -91
  182. package/coverage/lcov-report/src/components/DpUploadFiles/utils/UppyTranslations.js.html +0 -151
  183. package/coverage/lcov-report/src/components/DpUploadFiles/utils/index.html +0 -116
  184. package/coverage/lcov-report/src/components/shared/index.html +0 -116
  185. package/coverage/lcov-report/src/components/shared/translations.js.html +0 -508
  186. package/coverage/lcov-report/src/directives/CleanHtml/CleanHtml.js.html +0 -265
  187. package/coverage/lcov-report/src/directives/CleanHtml/index.html +0 -116
  188. package/coverage/lcov-report/src/directives/Tooltip/Tooltip.js.html +0 -349
  189. package/coverage/lcov-report/src/directives/Tooltip/index.html +0 -116
  190. package/coverage/lcov-report/src/directives/index.html +0 -116
  191. package/coverage/lcov-report/src/directives/index.js.html +0 -109
  192. package/coverage/lcov-report/src/lib/ActionMenu.js.html +0 -610
  193. package/coverage/lcov-report/src/lib/Detabinator.js.html +0 -304
  194. package/coverage/lcov-report/src/lib/DpApi.js.html +0 -748
  195. package/coverage/lcov-report/src/lib/DpConfirm.js.html +0 -118
  196. package/coverage/lcov-report/src/lib/DpGetCssVariable.js.html +0 -103
  197. package/coverage/lcov-report/src/lib/FileInfo.js.html +0 -574
  198. package/coverage/lcov-report/src/lib/HighlightHashLink.js.html +0 -160
  199. package/coverage/lcov-report/src/lib/MatchMedia.js.html +0 -220
  200. package/coverage/lcov-report/src/lib/SideNav.js.html +0 -712
  201. package/coverage/lcov-report/src/lib/Sticky.js.html +0 -223
  202. package/coverage/lcov-report/src/lib/TableWrapper.js.html +0 -214
  203. package/coverage/lcov-report/src/lib/index.html +0 -281
  204. package/coverage/lcov-report/src/lib/index.js.html +0 -190
  205. package/coverage/lcov-report/src/lib/validation/utils/assignHandlersForInputs.js.html +0 -400
  206. package/coverage/lcov-report/src/lib/validation/utils/helpers.js.html +0 -523
  207. package/coverage/lcov-report/src/lib/validation/utils/index.html +0 -236
  208. package/coverage/lcov-report/src/lib/validation/utils/validateDatepicker.js.html +0 -160
  209. package/coverage/lcov-report/src/lib/validation/utils/validateEmail.js.html +0 -136
  210. package/coverage/lcov-report/src/lib/validation/utils/validateFieldset.js.html +0 -163
  211. package/coverage/lcov-report/src/lib/validation/utils/validateForm.js.html +0 -205
  212. package/coverage/lcov-report/src/lib/validation/utils/validateInputField.js.html +0 -403
  213. package/coverage/lcov-report/src/lib/validation/utils/validateMultiselect.js.html +0 -121
  214. package/coverage/lcov-report/src/lib/validation/utils/validateTiptap.js.html +0 -160
  215. package/coverage/lcov-report/src/mixins/dpSelectAllMixin.js.html +0 -232
  216. package/coverage/lcov-report/src/mixins/dpValidateMixin.js.html +0 -460
  217. package/coverage/lcov-report/src/mixins/index.html +0 -176
  218. package/coverage/lcov-report/src/mixins/index.js.html +0 -124
  219. package/coverage/lcov-report/src/mixins/prefixClassMixin/index.html +0 -116
  220. package/coverage/lcov-report/src/mixins/prefixClassMixin/prefixClassMixin.js.html +0 -121
  221. package/coverage/lcov-report/src/mixins/sessionStorageMixin.js.html +0 -160
  222. package/coverage/lcov-report/src/mixins/tableSelectAllItems.js.html +0 -427
  223. package/coverage/lcov-report/src/shared/index.html +0 -116
  224. package/coverage/lcov-report/src/shared/index.js.html +0 -103
  225. package/coverage/lcov-report/src/shared/props/index.html +0 -116
  226. package/coverage/lcov-report/src/shared/props/props.js.html +0 -310
  227. package/coverage/lcov-report/src/utils/date.js.html +0 -208
  228. package/coverage/lcov-report/src/utils/debounce.js.html +0 -163
  229. package/coverage/lcov-report/src/utils/deepMerge.js.html +0 -175
  230. package/coverage/lcov-report/src/utils/formatBytes.js.html +0 -133
  231. package/coverage/lcov-report/src/utils/formatString.js.html +0 -109
  232. package/coverage/lcov-report/src/utils/fullscreen.js.html +0 -253
  233. package/coverage/lcov-report/src/utils/getAnimationEventName.js.html +0 -157
  234. package/coverage/lcov-report/src/utils/getScrollTop.js.html +0 -109
  235. package/coverage/lcov-report/src/utils/hasOwnProp.js.html +0 -142
  236. package/coverage/lcov-report/src/utils/hasPermission.js.html +0 -214
  237. package/coverage/lcov-report/src/utils/index.html +0 -341
  238. package/coverage/lcov-report/src/utils/index.js.html +0 -217
  239. package/coverage/lcov-report/src/utils/lengthHint/index.html +0 -116
  240. package/coverage/lcov-report/src/utils/lengthHint/lengthHint.js.html +0 -268
  241. package/coverage/lcov-report/src/utils/prefixClass.js.html +0 -199
  242. package/coverage/lcov-report/src/utils/resistFingerprintingDuckTest.js.html +0 -232
  243. package/coverage/lcov-report/src/utils/sortAlphabetically.js.html +0 -193
  244. package/coverage/lcov-report/src/utils/throttle.js.html +0 -145
  245. package/coverage/lcov-report/src/utils/uniqueArrayByObjectKey.js.html +0 -151
  246. package/coverage/lcov-report/utils/date.js.html +0 -208
  247. package/coverage/lcov-report/utils/debounce.js.html +0 -163
  248. package/coverage/lcov-report/utils/deepMerge.js.html +0 -175
  249. package/coverage/lcov-report/utils/formatBytes.js.html +0 -133
  250. package/coverage/lcov-report/utils/fullscreen.js.html +0 -253
  251. package/coverage/lcov-report/utils/getAnimationEventName.js.html +0 -157
  252. package/coverage/lcov-report/utils/getScrollTop.js.html +0 -109
  253. package/coverage/lcov-report/utils/hasOwnProp.js.html +0 -142
  254. package/coverage/lcov-report/utils/hasPermission.js.html +0 -214
  255. package/coverage/lcov-report/utils/index.html +0 -326
  256. package/coverage/lcov-report/utils/index.js.html +0 -211
  257. package/coverage/lcov-report/utils/lengthHint/index.html +0 -116
  258. package/coverage/lcov-report/utils/lengthHint/lengthHint.js.html +0 -268
  259. package/coverage/lcov-report/utils/prefixClass.js.html +0 -199
  260. package/coverage/lcov-report/utils/resistFingerprintingDuckTest.js.html +0 -232
  261. package/coverage/lcov-report/utils/sortAlphabetically.js.html +0 -193
  262. package/coverage/lcov-report/utils/throttle.js.html +0 -145
  263. package/coverage/lcov-report/utils/uniqueArrayByObjectKey.js.html +0 -151
  264. package/coverage/lcov.info +0 -0
  265. package/style/style.css +0 -1002
@@ -0,0 +1,104 @@
1
+ const globals = require('globals')
2
+ const eslintJs = require('@eslint/js')
3
+ const pluginVue = require('eslint-plugin-vue')
4
+ const pluginVueA11y = require('eslint-plugin-vuejs-accessibility')
5
+ // Const stylistic = import('@stylistic/eslint-plugin')
6
+ const tsEslint = require('typescript-eslint')
7
+ const vueEslintParser = require('vue-eslint-parser')
8
+
9
+ async function getConfig () {
10
+ const stylistic = await import('@stylistic/eslint-plugin')
11
+
12
+ return [
13
+ eslintJs.configs.recommended,
14
+ ...tsEslint.configs.recommended,
15
+ ...pluginVue.configs['flat/recommended'],
16
+ ...pluginVueA11y.configs['flat/recommended'],
17
+ {
18
+ ignores: [
19
+ "**/node_modules/**",
20
+ '**/.yarn/**',
21
+ '**/tokens/dist/**',
22
+ '**/dist/**',
23
+ '**/.storybook/**'
24
+ ]
25
+ },
26
+ {
27
+ files: ["**/*.js", "**/*.ts", "**/*.vue"],
28
+ languageOptions: {
29
+ globals: globals.browser,
30
+ parser: vueEslintParser,
31
+ parserOptions: {
32
+ parser: tsEslint.parser
33
+ }
34
+ },
35
+ plugins: {
36
+ '@stylistic': stylistic,
37
+ 'typescript': tsEslint.plugin,
38
+ 'vue': pluginVue,
39
+ 'vuejs-accessibility': pluginVueA11y
40
+ },
41
+ rules: {
42
+ 'capitalized-comments': ['error', 'always', {
43
+ 'ignoreConsecutiveComments': true,
44
+ 'ignoreInlineComments': true
45
+ }],
46
+ 'generator-star-spacing': 'off',
47
+ 'multiline-comment-style': 'error',
48
+ 'sort-imports': ['error', { 'ignoreCase': true }],
49
+ '@/object-curly-spacing': ['error', 'always'],
50
+ '@/indent': ['error', 2],
51
+ 'vue/html-closing-bracket-newline': ['error', {
52
+ 'singleline': 'never',
53
+ 'multiline': 'never'
54
+ }],
55
+ 'vue/object-curly-spacing': ['error', 'always'],
56
+ 'vue/order-in-components': ['error', {
57
+ 'order': [
58
+ 'el',
59
+ 'name',
60
+ 'parent',
61
+ 'functional',
62
+ ['delimiters', 'comments'],
63
+ ['components', 'directives'],
64
+ 'extends',
65
+ 'mixins',
66
+ 'inheritAttrs',
67
+ 'model',
68
+ ['props', 'propsData'],
69
+ 'emits',
70
+ 'data',
71
+ 'computed',
72
+ 'watch',
73
+ 'methods',
74
+ 'LIFECYCLE_HOOKS',
75
+ ['template', 'render'],
76
+ 'renderError'
77
+ ]
78
+ }],
79
+ 'vue/block-order': ['error', {
80
+ 'order': [
81
+ 'docs',
82
+ 'template',
83
+ 'script:not([setup])',
84
+ 'script[setup]',
85
+ 'style'
86
+ ]
87
+ }],
88
+ 'vue/define-macros-order': ['error', {
89
+ 'order': ['defineProps', 'defineEmits'],
90
+ 'defineExposeLast': true
91
+ }],
92
+ 'vue/v-slot-style': ['error', {
93
+ 'atComponent': 'longform',
94
+ 'default': 'longform',
95
+ 'named': 'longform'
96
+ }],
97
+ 'vue/multi-word-component-names': 'warn',
98
+ 'vuejs-accessibility/label-has-for': 'warn'
99
+ }
100
+ }
101
+ ]
102
+ }
103
+
104
+ module.exports = getConfig()
@@ -5,8 +5,10 @@
5
5
  // Use Local Vue for testing
6
6
  import { shallowMount } from '@vue/test-utils'
7
7
 
8
- // then you can use `app.component` here
9
- // Mocking global stuff
8
+ /*
9
+ * Then you can use `app.component` here
10
+ * Mocking global stuff
11
+ */
10
12
  const globalMocks = {
11
13
  hasPermission: jest.fn(() => true),
12
14
  Translator: {
@@ -25,11 +27,11 @@ const globalMocks = {
25
27
  */
26
28
  const shallowMountWithGlobalMocks = (component, options) => {
27
29
  return shallowMount(component, {
28
- ...options,
29
- global: {
30
- mocks: globalMocks,
31
- }
30
+ ...options,
31
+ global: {
32
+ mocks: globalMocks,
32
33
  }
34
+ }
33
35
  )
34
36
  }
35
37
 
package/jest.config.js CHANGED
@@ -4,10 +4,10 @@ const path = require('path')
4
4
  module.exports = {
5
5
  collectCoverage: false,
6
6
  collectCoverageFrom: [
7
- './src/utils/*.{js}',
8
- './src/mixins/*.{js}',
9
- './src/lib/*.{js}',
10
- './src/components/*.{vue}'
7
+ './src/utils/*.{js}',
8
+ './src/mixins/*.{js}',
9
+ './src/lib/*.{js}',
10
+ './src/components/*.{vue}'
11
11
  ],
12
12
  coverageDirectory: './coverage',
13
13
  coverageReporters: ['clover', 'json', 'lcov', ['text', { skipFull: true }]],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@demos-europe/demosplan-ui",
3
- "version": "0.4.12",
3
+ "version": "0.4.13",
4
4
  "license": "MIT",
5
5
  "description": "Vue components, Vue directives, Design Token and Scss files to build interfaces for demosPlan.",
6
6
  "main": "./dist/demosplan-ui.umd.js",
@@ -77,17 +77,18 @@
77
77
  "@storybook/types": "^7.0.27",
78
78
  "@storybook/vue-webpack5": "7.6.17",
79
79
  "@storybook/vue3": "^7.0.27",
80
+ "@stylistic/eslint-plugin": "^4.2.0",
80
81
  "@types/eslint": "^9",
81
82
  "@types/jest": "^29.5.1",
82
83
  "@types/qs": "^6.9.7",
83
84
  "@types/sortablejs": "^1",
84
- "@typescript-eslint/eslint-plugin": "^5.4.0",
85
- "@typescript-eslint/parser": "^5.4.0",
85
+ "@typescript-eslint/eslint-plugin": "^8.29.0",
86
+ "@typescript-eslint/parser": "^8.29.0",
86
87
  "@vue/cli-plugin-typescript": "~5.0.0",
87
88
  "@vue/cli-service": "^5.0.8",
88
89
  "@vue/compat": "3.5.13",
89
90
  "@vue/compiler-sfc": "3.5.13",
90
- "@vue/eslint-config-typescript": "^13.0.0",
91
+ "@vue/eslint-config-typescript": "^14.5.0",
91
92
  "@vue/test-utils": "^2.4.6",
92
93
  "@webpack-cli/generators": "^3.0.0",
93
94
  "autoprefixer": "^10.4.14",
@@ -97,7 +98,11 @@
97
98
  "babel-plugin-syntax-jsx": "^6.18.0",
98
99
  "babel-plugin-transform-vue-jsx": "^3.7.0",
99
100
  "css-loader": "^7.0.0",
101
+ "eslint": "^9.23.0",
102
+ "eslint-plugin-vue": "^10.0.0",
103
+ "eslint-plugin-vuejs-accessibility": "^2.4.1",
100
104
  "glob": "^10.3.1",
105
+ "globals": "^16.0.0",
101
106
  "jest": "^29.7.0",
102
107
  "jest-environment-jsdom": "^29.7.0",
103
108
  "jest-junit": "^16.0.0",
@@ -120,6 +125,7 @@
120
125
  "ts-loader": "^9.4.4",
121
126
  "typescript": "~5.7.2",
122
127
  "vue": "^3.5.13",
128
+ "vue-eslint-parser": "^10.1.1",
123
129
  "vue-jest": "^3.0.7",
124
130
  "vue-loader": "^17.4.2",
125
131
  "vue-style-loader": "~4.1.3",
@@ -139,7 +145,8 @@
139
145
  "build:dev": "webpack --mode=development",
140
146
  "build:prod": "webpack --mode=production --define-process-env-node-env=production",
141
147
  "test": "jest",
142
- "watch": "webpack --watch"
148
+ "watch": "webpack --watch",
149
+ "lint": "eslint ."
143
150
  },
144
151
  "packageManager": "yarn@4.2.2"
145
152
  }
@@ -15,7 +15,7 @@ const files = glob
15
15
  .replace('tokens/src/', '')
16
16
  .replace('color/', '')
17
17
  .replace('.json', ''))
18
- .filter(filePath => !filePath.startsWith('_')) // Do not render tokens only used internally
18
+ .filter(filePath => !filePath.startsWith('_')) // Do not render tokens only used internally
19
19
 
20
20
  // Define custom output groups for Tailwind, rather than just grouping them by file path
21
21
  const corePlugins = ['fontSize', 'boxShadow', 'breakpoints', 'rounded', 'space', 'zIndex']
@@ -213,7 +213,7 @@ const transformDeclarationScss = (declaration, tokenPath) => {
213
213
  return declaration
214
214
  }
215
215
 
216
- const transformScssTokens = ({dictionary, options, file}) => {
216
+ const transformScssTokens = ({ dictionary, options, file }) => {
217
217
  const { outputReferences, formatting } = options
218
218
 
219
219
  let { allTokens } = dictionary
@@ -243,7 +243,7 @@ const transformScssTokens = ({dictionary, options, file}) => {
243
243
  .filter(function(strVal) { return !!strVal })
244
244
  .join('\n')
245
245
 
246
- return fileHeader({file, commentStyle: 'short'}) + '\n' + tokens + '\n'
246
+ return fileHeader({ file, commentStyle: 'short' }) + '\n' + tokens + '\n'
247
247
  }
248
248
 
249
249
  const transformTailwindTokens = (formatterArguments, corePluginsColor) => {
@@ -1,16 +1,16 @@
1
1
  <template>
2
2
  <div class="o-accordion">
3
3
  <button
4
- type="button"
5
4
  v-if="title !== ''"
6
- @click="() => toggle()"
5
+ type="button"
7
6
  :aria-expanded="isVisible.toString()"
8
7
  :data-cy="dataCy"
9
8
  :class="fontWeight === 'bold' ? 'weight--bold' : 'weight--normal'"
10
- class="btn--blank o-link--default text-left">
9
+ class="btn--blank o-link--default text-left"
10
+ @click="() => toggle()">
11
11
  <i
12
12
  class="w-2 fa"
13
- :class="{'fa-caret-right': !isVisible, 'fa-caret-down': isVisible}"
13
+ :class="{ 'fa-caret-right': !isVisible, 'fa-caret-down': isVisible }"
14
14
  aria-hidden="true" />
15
15
  <span :class="compressed ? 'font-size-medium' : 'o-accordion--title'">{{ title }}</span>
16
16
  </button>
@@ -20,11 +20,11 @@
20
20
  </div>
21
21
  </bubble-menu>
22
22
  <editor-content
23
+ ref="editorContent"
23
24
  autocomplete="off"
24
25
  autocorrect="off"
25
26
  autocapitalize="off"
26
27
  spellcheck="false"
27
- ref="editorContent"
28
28
  class="editor-content"
29
29
  :editor="editor" />
30
30
  </div>
@@ -33,8 +33,8 @@
33
33
  <script>
34
34
  import {
35
35
  Anonymize,
36
- PreventEditing,
37
36
  Obscure,
37
+ PreventEditing,
38
38
  UnAnonymize
39
39
  } from '../DpEditor/libs/customExtensions'
40
40
  import {
@@ -46,11 +46,11 @@ import {
46
46
  History,
47
47
  Italic,
48
48
  Link,
49
+ ListItem,
49
50
  OrderedList,
50
51
  Paragraph,
51
52
  Text,
52
- Underline,
53
- ListItem
53
+ Underline
54
54
  } from '../DpEditor/libs/tiptapExtensions'
55
55
  import {
56
56
  BubbleMenu,
@@ -22,7 +22,7 @@ const meta: Meta<typeof DpBulkEditHeader> = {
22
22
  },
23
23
  setup () {
24
24
  const toggleAll = (event) => {
25
- for (let element of (args as any).options) {
25
+ for (const element of (args as any).options) {
26
26
  element.checked = event.target.checked
27
27
  }
28
28
  }
@@ -2,20 +2,23 @@
2
2
  <template>
3
3
  <component
4
4
  :is="element"
5
+ v-tooltip="iconOnly ? text : null"
5
6
  :type="isButtonElement ? type : null"
6
7
  :href="!isButtonElement ? sanitizedHref : null"
7
8
  :class="classes"
8
9
  :disabled="disabled"
9
10
  :aria-hidden="busy"
10
- v-tooltip="iconOnly ? text : null"
11
- @click="emit('click', $event)">
11
+ @blur="emit('blur', $event)"
12
+ @click="emit('click', $event)"
13
+ @focus="emit('focus', $event)"
14
+ @mousedown="emit('mousedown', $event)">
12
15
  <dp-icon
13
16
  v-if="icon"
14
17
  aria-hidden="true"
15
18
  :icon="icon"
16
19
  :size="iconSize" />
17
20
  <span
18
- :class="{'sr-only': hideText}"
21
+ :class="{ 'sr-only': hideText }"
19
22
  v-text="text" />
20
23
  <dp-icon
21
24
  v-if="iconAfter"
@@ -27,10 +30,10 @@
27
30
 
28
31
  <script setup lang="ts">
29
32
  import { computed, onMounted, PropType } from 'vue'
33
+ import { proportions as ICON_PROPORTIONS, SIZES as ICON_SIZES } from '~/components/DpIcon/util/iconConfig'
30
34
  import { IconName, IconSize } from '../../../types'
31
35
  import DpIcon from '~/components/DpIcon/DpIcon.vue'
32
36
  import { sanitizeUrl } from '@braintree/sanitize-url'
33
- import { proportions as ICON_PROPORTIONS, SIZES as ICON_SIZES } from '~/components/DpIcon/util/iconConfig'
34
37
  import { Tooltip } from '~/directives'
35
38
 
36
39
  type ButtonColor = 'primary' | 'secondary' | 'warning'
@@ -153,38 +156,43 @@ const props = defineProps({
153
156
  }
154
157
  })
155
158
 
156
- const emit = defineEmits(['click'])
159
+ const emit = defineEmits([
160
+ 'blur',
161
+ 'click',
162
+ 'focus',
163
+ 'mousedown'
164
+ ])
157
165
 
158
166
  const iconOnly = computed(() => (props.icon || props.iconAfter) && props.hideText)
159
167
 
160
168
  const classes = computed(() => [
161
- 'inline-flex items-center leading-3 text-button select-none',
162
- ...colorClasses.value,
163
- ...spacingClasses.value,
164
- props.busy && 'bg-busy animate-busy pointer-events-none',
165
- props.disabled && 'opacity-40 pointer-events-none',
166
- props.rounded ? 'rounded-full' : 'rounded-button'
169
+ 'inline-flex items-center leading-3 text-button select-none',
170
+ ...colorClasses.value,
171
+ ...spacingClasses.value,
172
+ props.busy && 'bg-busy animate-busy pointer-events-none',
173
+ props.disabled && 'opacity-40 pointer-events-none',
174
+ props.rounded ? 'rounded-full' : 'rounded-button'
167
175
  ])
168
176
 
169
177
  const colorClasses = computed(() => {
170
- const colors = allColorClasses[props.color]
171
- const renderedColors = [colors.solidOutlineSubtle]
178
+ const colors = allColorClasses[props.color]
179
+ const renderedColors = [colors.solidOutlineSubtle]
172
180
 
173
- switch (props.variant) {
174
- case 'solid':
175
- renderedColors.push(colors.solidOutline, colors.solid)
176
- break
177
- case 'outline':
178
- renderedColors.push(colors.solidOutline, colors.outlineSubtle)
179
- break
180
- case 'subtle':
181
- renderedColors.push(colors.outlineSubtle, colors.subtle)
182
- break
183
- default:
184
- break
185
- }
181
+ switch (props.variant) {
182
+ case 'solid':
183
+ renderedColors.push(colors.solidOutline, colors.solid)
184
+ break
185
+ case 'outline':
186
+ renderedColors.push(colors.solidOutline, colors.outlineSubtle)
187
+ break
188
+ case 'subtle':
189
+ renderedColors.push(colors.outlineSubtle, colors.subtle)
190
+ break
191
+ default:
192
+ break
193
+ }
186
194
 
187
- return renderedColors
195
+ return renderedColors
188
196
  })
189
197
 
190
198
  // Visually compensate button padding for icons with portrait proportions
@@ -198,17 +206,17 @@ const spacingClasses = computed(() => {
198
206
  // The small and large iconOnly buttons create a scale alongside the medium iconOnly button which shares its 30px height with input fields.
199
207
  if (iconOnly.value) {
200
208
  switch (props.iconSize) {
201
- case 'large':
202
- padding = 'p-1.5'
203
- break
204
- case 'small':
205
- padding = 'p-0.5'
206
- break
207
- case 'medium':
208
- padding = 'p-[5px]'
209
- break
210
- default:
211
- break
209
+ case 'large':
210
+ padding = 'p-1.5'
211
+ break
212
+ case 'small':
213
+ padding = 'p-0.5'
214
+ break
215
+ case 'medium':
216
+ padding = 'p-[5px]'
217
+ break
218
+ default:
219
+ break
212
220
  }
213
221
  }
214
222
  return [
@@ -232,7 +240,7 @@ onMounted(() => {
232
240
  const allColorClasses = {
233
241
  primary: {
234
242
  /**
235
- * solidOutlineSubtle: classes that apply to all button color variants.
243
+ * SolidOutlineSubtle: classes that apply to all button color variants.
236
244
  *
237
245
  * Instead of hardcoding #005eb1 here, focus-visible:outline-interactive-hover/50 could be used.
238
246
  * However, for this to work, token css variables would have to be rendered within @layer base with modern rbg
@@ -245,7 +253,7 @@ const allColorClasses = {
245
253
  outline outline-4 outline-offset-0 outline-transparent
246
254
  focus-visible:outline-[#005eb1]/50 focus-visible:z-above-zero`,
247
255
  /**
248
- * solidOutline: classes that apply to "solid" and "outline" button color variants.
256
+ * SolidOutline: classes that apply to "solid" and "outline" button color variants.
249
257
  *
250
258
  * Solid buttons have a 1px border with the same color as the bg color, to be the same overall size as outline buttons.
251
259
  * The same border is applied to outline buttons.
@@ -256,21 +264,21 @@ const allColorClasses = {
256
264
  focus:border-interactive-hover\
257
265
  focus-visible:border-interactive-hover\
258
266
  active:border-interactive-active `,
259
- // outlineSubtle: classes that apply to "outline" and "subtle" button color variants.
267
+ // OutlineSubtle: classes that apply to "outline" and "subtle" button color variants.
260
268
  outlineSubtle: `
261
269
  bg-surface text-interactive\
262
270
  hover:bg-interactive-subtle-hover hover:text-interactive-hover\
263
271
  focus:bg-interactive-subtle-hover focus:text-interactive-hover\
264
272
  focus-visible:bg-interactive-subtle-hover focus-visible:text-interactive-hover\
265
273
  active:bg-interactive-subtle-active active:text-interactive-active `,
266
- // solid: classes that only apply to "solid" button color variant.
274
+ // Solid: classes that only apply to "solid" button color variant.
267
275
  solid: `
268
276
  bg-interactive text-on-dark\
269
277
  hover:text-on-dark hover:no-underline hover:bg-interactive-hover\
270
278
  focus:bg-interactive-hover\
271
279
  focus-visible:bg-interactive-hover\
272
280
  active:bg-interactive-active `,
273
- // subtle: classes that only apply to "subtle" button color variant.
281
+ // Subtle: classes that only apply to "subtle" button color variant.
274
282
  subtle: `
275
283
  border border-on-dark\
276
284
  hover:border-interactive-subtle-hover\
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <button
3
- class="btn--icon"
4
3
  v-tooltip="{
5
4
  content: text,
6
5
  delay: { show: 1000, hide: 200 }
7
6
  }"
7
+ class="btn--icon"
8
8
  @click="$emit('click')">
9
9
  <i
10
10
  :class="`fa ${icon}`"
@@ -23,6 +23,10 @@ import { Tooltip } from '~/directives'
23
23
  export default {
24
24
  name: 'DpButtonIcon',
25
25
 
26
+ directives: {
27
+ tooltip: Tooltip
28
+ },
29
+
26
30
  props: {
27
31
  icon: {
28
32
  type: String,
@@ -33,10 +37,6 @@ export default {
33
37
  type: String,
34
38
  required: true
35
39
  }
36
- },
37
-
38
- directives: {
39
- tooltip: Tooltip
40
40
  }
41
41
  }
42
42
  </script>
@@ -34,11 +34,6 @@ export default {
34
34
  DpButton
35
35
  },
36
36
 
37
- emits: [
38
- 'primary-action',
39
- 'secondary-action'
40
- ],
41
-
42
37
  props: {
43
38
  /**
44
39
  * Specifies if the buttons should align left or right inside their container.
@@ -137,6 +132,11 @@ export default {
137
132
  }
138
133
  },
139
134
 
135
+ emits: [
136
+ 'primary-action',
137
+ 'secondary-action'
138
+ ],
139
+
140
140
  computed: {
141
141
  align () {
142
142
  return this.alignment === 'left' ? 'text-left' : 'text-right'
@@ -13,9 +13,9 @@
13
13
  :value="valueToSend"
14
14
  :data-cy="dataCy !== '' ? dataCy : null"
15
15
  :data-dp-validate-error-fieldname="dataDpValidateErrorFieldname || label.text || null"
16
- @change="$emit('change', $event.target.checked)"
17
16
  true-value="1"
18
- false-value="0">
17
+ false-value="0"
18
+ @change="$emit('change', $event.target.checked)">
19
19
  <dp-label
20
20
  v-if="label.text !== ''"
21
21
  :class="prefixClass('o-form__label')"
@@ -35,10 +35,6 @@ export default {
35
35
  cleanhtml: CleanHtml
36
36
  },
37
37
 
38
- emits: [
39
- 'update'
40
- ],
41
-
42
38
  props: {
43
39
  dataCy: {
44
40
  type: String,
@@ -68,6 +64,10 @@ export default {
68
64
  }
69
65
  },
70
66
 
67
+ emits: [
68
+ 'update'
69
+ ],
70
+
71
71
  data () {
72
72
  return {
73
73
  selected: {}
@@ -12,9 +12,9 @@
12
12
  <div class="space-stack-xs u-pv-0_25">
13
13
  <dp-checkbox
14
14
  v-for="([value, label]) in selectableColumns"
15
- :data-cy="`columnSelector:${value}`"
16
15
  :id="`columnSelector:${value}`"
17
16
  :key="value"
17
+ :data-cy="`columnSelector:${value}`"
18
18
  :checked="selectedColumns.has(value)"
19
19
  :label="{
20
20
  text: label
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <dp-icon
3
+ v-tooltip="tooltip"
3
4
  :aria-label="ariaLabel"
4
5
  :icon="icon"
5
6
  :size="size"
6
- class="inline-block"
7
- v-tooltip="tooltip" />
7
+ class="inline-block" />
8
8
  </template>
9
9
 
10
10
  <script setup lang="ts">
@@ -15,8 +15,6 @@ import DpIcon from '~/components/DpIcon'
15
15
  import { SIZES as ICON_SIZES } from '~/components/DpIcon/util/iconConfig'
16
16
  import { Tooltip } from '~/directives'
17
17
 
18
- const vTooltip = Tooltip
19
-
20
18
  const props = defineProps({
21
19
  /**
22
20
  * The icon displayed as trigger for the tooltip.
@@ -58,6 +56,8 @@ const props = defineProps({
58
56
  }
59
57
  })
60
58
 
59
+ const vTooltip = Tooltip
60
+
61
61
  const ariaLabel = de.contextualHelp
62
62
 
63
63
  /**