@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
@@ -23,10 +23,10 @@ function assignHandlersForSingleInput (input) {
23
23
  const matchers = condition.split(comparisonType === 'isNotEqual' ? '!==' : '===')
24
24
  const validationContainer = input.closest('[data-dp-validate]')
25
25
  /**
26
- Use the form as the validation container. This is necessary because in some cases, such as wizard,
27
- the value of the 'data-dp-validate-if' attribute may refer to a different fieldset.
28
- By using the form, this condition can be found throughout the entire form.
29
- */
26
+ * Use the form as the validation container. This is necessary because in some cases, such as wizard,
27
+ * the value of the 'data-dp-validate-if' attribute may refer to a different fieldset.
28
+ * By using the form, this condition can be found throughout the entire form.
29
+ */
30
30
  const form = validationContainer.tagName === 'FIELDSET' && validationContainer.form ? validationContainer.form : validationContainer
31
31
 
32
32
  try {
@@ -49,56 +49,56 @@ function assignHandlersForSingleInput (input) {
49
49
  }
50
50
 
51
51
  switch (type) {
52
- case 'tiptap':
53
- awaitElement('div[contenteditable="true"]', input.parentNode).then(() => {
54
- const tiptapField = input.parentNode.querySelector('div[contenteditable="true"]')
55
- tiptapField.addEventListener('blur', () => validateTiptap(input))
56
- tiptapField.addEventListener('focus', () => {
57
- // If input has error remove it on focus
58
- if (tiptapField.classList.contains(errorClass)) {
59
- tiptapField.classList.remove(errorClass)
60
- }
61
- })
62
- observeValidationRelations(input, () => validateTiptap(input))
63
- })
64
- break
65
- case 'fieldset':
66
- checkboxes = Array.from(input.querySelectorAll('input[type="checkbox"]'))
67
- radios = Array.from(input.querySelectorAll('input[type="radio"]'))
68
-
69
- if (checkboxes.length > 0) {
70
- fieldsToCheck = checkboxes
71
- } else if (radios.length > 0) {
72
- fieldsToCheck = radios
73
- } else {
74
- fieldsToCheck = []
75
- }
76
-
77
- fieldsToCheck.forEach(checkbox => checkbox.addEventListener('blur', () => validateFieldset(input)))
78
- fieldsToCheck.forEach(checkbox => checkbox.addEventListener('change', () => validateFieldset(input)))
79
- observeValidationRelations(input, () => validateFieldset(input))
80
- break
81
- case 'datepicker':
82
- input.addEventListener('focus', () => {
52
+ case 'tiptap':
53
+ awaitElement('div[contenteditable="true"]', input.parentNode).then(() => {
54
+ const tiptapField = input.parentNode.querySelector('div[contenteditable="true"]')
55
+ tiptapField.addEventListener('blur', () => validateTiptap(input))
56
+ tiptapField.addEventListener('focus', () => {
83
57
  // If input has error remove it on focus
84
- if (input.classList.contains(errorClass)) {
85
- input.classList.remove(errorClass)
58
+ if (tiptapField.classList.contains(errorClass)) {
59
+ tiptapField.classList.remove(errorClass)
86
60
  }
87
61
  })
88
- input.addEventListener('blur', () => validateDatepicker(input))
89
- observeValidationRelations(input, () => validateDatepicker(input))
90
- break
91
- case 'input':
92
- input.addEventListener('focus', () => {
93
- // If input has error remove it on focus
94
- if (input.classList.contains(errorClass)) {
95
- input.classList.remove(errorClass)
96
- }
97
- })
98
- input.addEventListener('blur', () => validateInput(input))
99
- observeValidationRelations(input, () => validateInput(input))
100
- break
101
- default:
62
+ observeValidationRelations(input, () => validateTiptap(input))
63
+ })
64
+ break
65
+ case 'fieldset':
66
+ checkboxes = Array.from(input.querySelectorAll('input[type="checkbox"]'))
67
+ radios = Array.from(input.querySelectorAll('input[type="radio"]'))
68
+
69
+ if (checkboxes.length > 0) {
70
+ fieldsToCheck = checkboxes
71
+ } else if (radios.length > 0) {
72
+ fieldsToCheck = radios
73
+ } else {
74
+ fieldsToCheck = []
75
+ }
76
+
77
+ fieldsToCheck.forEach(checkbox => checkbox.addEventListener('blur', () => validateFieldset(input)))
78
+ fieldsToCheck.forEach(checkbox => checkbox.addEventListener('change', () => validateFieldset(input)))
79
+ observeValidationRelations(input, () => validateFieldset(input))
80
+ break
81
+ case 'datepicker':
82
+ input.addEventListener('focus', () => {
83
+ // If input has error remove it on focus
84
+ if (input.classList.contains(errorClass)) {
85
+ input.classList.remove(errorClass)
86
+ }
87
+ })
88
+ input.addEventListener('blur', () => validateDatepicker(input))
89
+ observeValidationRelations(input, () => validateDatepicker(input))
90
+ break
91
+ case 'input':
92
+ input.addEventListener('focus', () => {
93
+ // If input has error remove it on focus
94
+ if (input.classList.contains(errorClass)) {
95
+ input.classList.remove(errorClass)
96
+ }
97
+ })
98
+ input.addEventListener('blur', () => validateInput(input))
99
+ observeValidationRelations(input, () => validateInput(input))
100
+ break
101
+ default:
102
102
  }
103
103
  }
104
104
 
@@ -8,37 +8,37 @@ export default function assignObserver (form) {
8
8
  mutations.forEach((mutation) => {
9
9
  // Handle mutations here
10
10
  switch (mutation.type) {
11
- case 'childList':
12
- if (mutation.addedNodes.length > 0) {
13
- const addedNode = Array.from(mutation.addedNodes).filter(node => node.nodeType === 1)[0]
14
- if (!addedNode) {
15
- return false
16
- }
17
- if (shouldValidate(addedNode)) {
18
- // If the node itself is an input add handlers directly to it
19
- assignHandlersForSingleInput(addedNode)
20
- } else if (addedNode.children.length > 0 && getAllInputsArray(addedNode).length > 0) {
21
- // If it's not an input then look through its children and find all inputs that we want to validate
22
- getAllInputsArray(addedNode).forEach(childNode => {
23
- assignHandlersForSingleInput(childNode)
24
- })
25
- }
11
+ case 'childList':
12
+ if (mutation.addedNodes.length > 0) {
13
+ const addedNode = Array.from(mutation.addedNodes).filter(node => node.nodeType === 1)[0]
14
+ if (!addedNode) {
15
+ return false
26
16
  }
27
- break
28
- case 'attributes':
29
- if ((mutation.target.tagName === 'INPUT' || mutation.target.tagName === 'TEXTAREA') && (mutation.attributeName === 'required' || mutation.attributeName === 'pattern')) {
30
- if (mutation.oldValue === null) { // If required is now set, assign validation handlers
31
- assignHandlersForSingleInput(mutation.target)
32
- } else if (wasAttributeRemoved(mutation)) { // If required was removed, replace the node with it's clone to remove all event listeners
33
- const nodeClone = mutation.target.cloneNode()
34
- nodeClone.classList.remove(errorClass)
35
- nodeClone.setCustomValidity('')
36
- mutation.target.parentNode.replaceChild(nodeClone, mutation.target)
37
- }
17
+ if (shouldValidate(addedNode)) {
18
+ // If the node itself is an input add handlers directly to it
19
+ assignHandlersForSingleInput(addedNode)
20
+ } else if (addedNode.children.length > 0 && getAllInputsArray(addedNode).length > 0) {
21
+ // If it's not an input then look through its children and find all inputs that we want to validate
22
+ getAllInputsArray(addedNode).forEach(childNode => {
23
+ assignHandlersForSingleInput(childNode)
24
+ })
38
25
  }
39
- break
40
- default:
41
- break
26
+ }
27
+ break
28
+ case 'attributes':
29
+ if ((mutation.target.tagName === 'INPUT' || mutation.target.tagName === 'TEXTAREA') && (mutation.attributeName === 'required' || mutation.attributeName === 'pattern')) {
30
+ if (mutation.oldValue === null) { // If required is now set, assign validation handlers
31
+ assignHandlersForSingleInput(mutation.target)
32
+ } else if (wasAttributeRemoved(mutation)) { // If required was removed, replace the node with it's clone to remove all event listeners
33
+ const nodeClone = mutation.target.cloneNode()
34
+ nodeClone.classList.remove(errorClass)
35
+ nodeClone.setCustomValidity('')
36
+ mutation.target.parentNode.replaceChild(nodeClone, mutation.target)
37
+ }
38
+ }
39
+ break
40
+ default:
41
+ break
42
42
  }
43
43
  })
44
44
  }
@@ -16,7 +16,7 @@ function shouldValidate (input) {
16
16
  isRequired ||
17
17
  input.hasAttribute('pattern') ||
18
18
  input.getAttribute('type') === 'email' ||
19
- input.hasAttribute('data-ad-id') || /* this attribute is used to get the input of the Datepicker */
19
+ input.hasAttribute('data-ad-id') || /* This attribute is used to get the input of the Datepicker */
20
20
  input.hasAttribute('minlength') ||
21
21
  input.hasAttribute('maxlength') ||
22
22
  input.hasAttribute('data-dp-validate-maxlength') ||
@@ -32,9 +32,9 @@ function validateConditionsFulfilled (input) {
32
32
  const matchers = condition.split(comparisonType === 'isNotEqual' ? '!==' : '===')
33
33
  const validationContainer = input.closest('[data-dp-validate]')
34
34
  /**
35
- Use the form as the validation container. This is necessary because in some cases, such as wizard,
36
- the value of the 'data-dp-validate-if' attribute may refer to a different fieldset.
37
- By using the form, this condition can be found throughout the entire form.
35
+ *Use the form as the validation container. This is necessary because in some cases, such as wizard,
36
+ *the value of the 'data-dp-validate-if' attribute may refer to a different fieldset.
37
+ *By using the form, this condition can be found throughout the entire form.
38
38
  */
39
39
  const form = validationContainer.tagName === 'FIELDSET' && validationContainer.form ? validationContainer.form : validationContainer
40
40
 
@@ -13,21 +13,21 @@ export default function validateForm (form) {
13
13
  const type = getInputType(input)
14
14
  let isInputValid = true
15
15
  switch (type) {
16
- case 'multiselect':
17
- isInputValid = validateMultiselect(input)
18
- break
19
- case 'tiptap':
20
- isInputValid = validateTiptap(input)
21
- break
22
- case 'fieldset':
23
- isInputValid = validateFieldset(input)
24
- break
25
- case 'datepicker':
26
- isInputValid = validateDatepicker(input)
27
- break
28
- case 'input':
29
- default:
30
- isInputValid = validateInput(input)
16
+ case 'multiselect':
17
+ isInputValid = validateMultiselect(input)
18
+ break
19
+ case 'tiptap':
20
+ isInputValid = validateTiptap(input)
21
+ break
22
+ case 'fieldset':
23
+ isInputValid = validateFieldset(input)
24
+ break
25
+ case 'datepicker':
26
+ isInputValid = validateDatepicker(input)
27
+ break
28
+ case 'input':
29
+ default:
30
+ isInputValid = validateInput(input)
31
31
  }
32
32
 
33
33
  if (isInputValid === false) {
@@ -82,17 +82,17 @@ export default function validateInput (input) {
82
82
  } else if (inputPattern) {
83
83
  // Error label based on pattern
84
84
  switch (inputPattern) {
85
- case '^[0-9]{5}$':
86
- input.setCustomValidity(de.validation.error.zipCode)
87
- break
88
- case '[A-Za-zÄäÜüÖöß ]+':
89
- input.setCustomValidity(de.validation.error.city)
90
- break
91
- case 'email':
92
- input.setCustomValidity(de.validation.error.email)
93
- break
94
- default:
95
- input.setCustomValidity(de.validation.error.format)
85
+ case '^[0-9]{5}$':
86
+ input.setCustomValidity(de.validation.error.zipCode)
87
+ break
88
+ case '[A-Za-zÄäÜüÖöß ]+':
89
+ input.setCustomValidity(de.validation.error.city)
90
+ break
91
+ case 'email':
92
+ input.setCustomValidity(de.validation.error.email)
93
+ break
94
+ default:
95
+ input.setCustomValidity(de.validation.error.format)
96
96
  }
97
97
  } else {
98
98
  input.setCustomValidity(de.validation.error.default) // Theoretically this must not happen hence its not that helpful
@@ -1,7 +1,7 @@
1
1
  import { DATE_FORMAT_LONG, formatDate, toDate } from './date'
2
2
  import { exactlengthHint, maxlengthHint, minlengthHint } from './lengthHint/lengthHint'
3
- import { hasPermission, hasAllPermissions, hasAnyPermissions } from './hasPermission'
4
- import { toggleFullscreen, bindFullScreenChange, unbindFullScreenChange, isActiveFullScreen } from './fullscreen'
3
+ import { hasAllPermissions, hasAnyPermissions, hasPermission } from './hasPermission'
4
+ import { bindFullScreenChange, isActiveFullScreen, toggleFullscreen, unbindFullScreenChange } from './fullscreen'
5
5
  import { capitalizeFirstLetter } from './formatString'
6
6
  import debounce from './debounce'
7
7
  import deepMerge from './deepMerge'
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ * Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ * Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ * Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ * Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ * Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ * Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ * Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ * Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ * Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ * Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
  */
5
5
 
6
6
  module.exports = {
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ // Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
 
5
5
 
6
6
  $dp-box-shadow-xl: 0 0 16px rgb(0 0 0 / 20%), 0 0 3px rgb(0 0 0 / 50%) !default;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ // Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
 
5
5
 
6
6
  $dp-breakpoints-xl: 1400px;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ // Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
 
5
5
 
6
6
  $dp-color-highlight-contrast: $dp-color-white !default;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ // Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
 
5
5
 
6
6
  $dp-color-11-11: #313695;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ // Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
 
5
5
 
6
6
  $dp-color-magenta-dark-2: #650324 !default;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ // Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
 
5
5
 
6
6
  $dp-color-background-medium: $dp-color-neutral-light-3 !default;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ // Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
 
5
5
 
6
6
  $dp-font-size-7: 50px !default;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ // Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
 
5
5
 
6
6
  $dp-rounded-full: 9999px;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ // Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
 
5
5
 
6
6
  $dp-space-1_5: 9px;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Tue, 08 Apr 2025 08:02:44 GMT
3
+ // Generated on Mon, 14 Apr 2025 10:45:19 GMT
4
4
 
5
5
 
6
6
  $dp-z-ultimate: 10000;
package/types/icons.ts CHANGED
@@ -1,30 +1,30 @@
1
1
  export type IconAlias =
2
- 'ai' // alias for 'robot'
3
- | 'cancel' // alias for 'xmark' -> 'x'
4
- | 'chevron-down' // alias for 'caret-down'
5
- | 'chevron-left' // alias for 'caret-left'
6
- | 'chevron-right' // alias for 'caret-right'
7
- | 'chevron-up' // alias for 'caret-up'
8
- | 'close' // alias for 'xmark' -> 'x'
9
- | 'compress' // alias for 'corners-in'
10
- | 'delete' // alias for 'trash-simple'
11
- | 'download' // alias for 'download-simple'
12
- | 'drag-handle' // alias for 'dots-six-vertical'
13
- | 'edit' // alias for 'pencil-simple'
14
- | 'expand' // alias for 'corners-out'
15
- | 'history' // alias for 'clock-counter-clockwise'
16
- | 'lock' // alias for 'lock-simple'
17
- | 'mail' // alias for 'envelope-simple'
18
- | 'refresh' // alias for 'arrows-clockwise'
19
- | 'remove' // alias for 'xmark' -> 'x'
20
- | 'search' // alias for magnifying-glass
21
- | 'settings' // alias for 'gear-six', weight: fill
22
- | 'severe' // alias for 'warning-diamond'
23
- | 'spinner' // alias for 'circle-notch'
24
- | 'success' // alias for 'check-circle'
25
- | 'unlock' // alias for 'lock-simple-open'
26
- | 'userSolid' // alias for 'user', weight: fill
27
- | 'xmark' // alias for 'x'
2
+ 'ai' // Alias for 'robot'
3
+ | 'cancel' // Alias for 'xmark' -> 'x'
4
+ | 'chevron-down' // Alias for 'caret-down'
5
+ | 'chevron-left' // Alias for 'caret-left'
6
+ | 'chevron-right' // Alias for 'caret-right'
7
+ | 'chevron-up' // Alias for 'caret-up'
8
+ | 'close' // Alias for 'xmark' -> 'x'
9
+ | 'compress' // Alias for 'corners-in'
10
+ | 'delete' // Alias for 'trash-simple'
11
+ | 'download' // Alias for 'download-simple'
12
+ | 'drag-handle' // Alias for 'dots-six-vertical'
13
+ | 'edit' // Alias for 'pencil-simple'
14
+ | 'expand' // Alias for 'corners-out'
15
+ | 'history' // Alias for 'clock-counter-clockwise'
16
+ | 'lock' // Alias for 'lock-simple'
17
+ | 'mail' // Alias for 'envelope-simple'
18
+ | 'refresh' // Alias for 'arrows-clockwise'
19
+ | 'remove' // Alias for 'xmark' -> 'x'
20
+ | 'search' // Alias for magnifying-glass
21
+ | 'settings' // Alias for 'gear-six', weight: fill
22
+ | 'severe' // Alias for 'warning-diamond'
23
+ | 'spinner' // Alias for 'circle-notch'
24
+ | 'success' // Alias for 'check-circle'
25
+ | 'unlock' // Alias for 'lock-simple-open'
26
+ | 'userSolid' // Alias for 'user', weight: fill
27
+ | 'xmark' // Alias for 'x'
28
28
 
29
29
  export type AliasedPhosphorIconName =
30
30
  'arrows-clockwise'
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1733218267203" clover="3.2.0">
3
- <project timestamp="1733218267203" name="All files">
4
- <metrics statements="0" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0" elements="0" coveredelements="0" complexity="0" loc="0" ncloc="0" packages="0" files="0" classes="0"/>
5
- </project>
6
- </coverage>
@@ -1 +0,0 @@
1
- {}