@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.
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +10 -0
- package/babel.config.js +9 -9
- package/dist/demosplan-ui.umd.js +1 -1
- package/eslint.config.js +104 -0
- package/jest/shallowMountWithGlobalMocks.js +8 -6
- package/jest.config.js +4 -4
- package/package.json +12 -5
- package/scripts/buildTokens.js +1 -1
- package/scripts/utils/transformTokens.js +2 -2
- package/src/components/DpAccordion/DpAccordion.vue +4 -4
- package/src/components/DpAnonymizeText/DpAnonymizeText.vue +4 -4
- package/src/components/DpBulkEditHeader/DpBulkEditHeader.stories.tsx +1 -1
- package/src/components/DpButton/DpButton.vue +51 -43
- package/src/components/DpButtonIcon/DpButtonIcon.vue +5 -5
- package/src/components/DpButtonRow/DpButtonRow.vue +5 -5
- package/src/components/DpCheckbox/DpCheckbox.vue +2 -2
- package/src/components/DpCheckboxGroup/DpCheckboxGroup.vue +4 -4
- package/src/components/DpColumnSelector/DpColumnSelector.vue +1 -1
- package/src/components/DpContextualHelp/DpContextualHelp.vue +4 -4
- package/src/components/DpDataTable/DpDataTable.vue +53 -49
- package/src/components/DpDataTable/DpResizableColumn.vue +1 -1
- package/src/components/DpDataTable/DpTableHeader.vue +6 -4
- package/src/components/DpDataTable/DpTableRow.vue +1 -1
- package/src/components/DpDataTableExtended/DpDataTableExtended.vue +8 -8
- package/src/components/DpDataTableExtended/DpSelectPageItemCount.vue +2 -2
- package/src/components/DpDatetimePicker/DpDatetimePicker.vue +6 -6
- package/src/components/DpDetails/DpDetails.vue +1 -1
- package/src/components/DpDraggable/DpDraggable.vue +10 -12
- package/src/components/DpEditor/DpEditor.vue +45 -45
- package/src/components/DpEditor/DpResizableImage.vue +6 -6
- package/src/components/DpEditor/DpUploadModal.vue +11 -12
- package/src/components/DpEditor/MentionList.vue +5 -3
- package/src/components/DpEditor/libs/editorObscure.js +2 -2
- package/src/components/DpFlyout/DpFlyout.vue +5 -5
- package/src/components/DpIcon/util/iconConfig.ts +28 -28
- package/src/components/DpInlineNotification/DpInlineNotification.vue +2 -2
- package/src/components/DpLabel/DpLabel.vue +5 -3
- package/src/components/DpModal/DpModal.vue +5 -5
- package/src/components/DpMultiselect/DpMultiselect.vue +23 -25
- package/src/components/DpMultistepNav/DpMultistepNav.vue +2 -2
- package/src/components/DpPager/DpPager.vue +12 -12
- package/src/components/DpResettableInput/DpResettableInput.vue +3 -3
- package/src/components/DpSearchField/DpSearchField.vue +7 -2
- package/src/components/DpSelect/DpSelect.vue +3 -3
- package/src/components/DpSkeletonBox/DpSkeletonBox.vue +1 -1
- package/src/components/DpSlidebar/DpSlidebar.vue +2 -2
- package/src/components/DpSplitButton/DpSplitButton.vue +2 -2
- package/src/components/DpStickyElement/DpStickyElement.vue +1 -1
- package/src/components/DpTabs/DpTabs.vue +1 -1
- package/src/components/DpTextArea/DpTextArea.vue +4 -4
- package/src/components/DpTimePicker/DpTimePicker.vue +14 -14
- package/src/components/DpToggle/DpToggle.vue +1 -1
- package/src/components/DpTooltip/DpTooltip.vue +4 -2
- package/src/components/DpTooltip/utils/tooltip.js +4 -4
- package/src/components/DpTooltipIcon/DpTooltipIcon.vue +2 -2
- package/src/components/DpTransitionExpand/DpTransitionExpand.vue +1 -1
- package/src/components/DpTreeList/DpTreeList.vue +4 -4
- package/src/components/DpTreeList/DpTreeListCheckbox.vue +1 -1
- package/src/components/DpTreeList/DpTreeListNode.vue +12 -12
- package/src/components/DpUploadFiles/DpUpload.vue +2 -2
- package/src/components/DpUploadFiles/DpUploadFiles.vue +10 -10
- package/src/components/DpUploadFiles/DpUploadedFile.vue +6 -6
- package/src/components/DpUploadFiles/DpUploadedFileList.vue +4 -4
- package/src/components/DpVideoPlayer/DpVideoPlayer.vue +7 -7
- package/src/directives/CleanHtml/CleanHtml.js +1 -1
- package/src/directives/Tooltip/Tooltip.js +1 -1
- package/src/lib/ActionMenu.js +48 -48
- package/src/lib/DpApi.js +2 -2
- package/src/lib/FileInfo.js +15 -15
- package/src/lib/validation/utils/assignHandlerForTrigger.js +8 -8
- package/src/lib/validation/utils/assignHandlersForInputs.js +51 -51
- package/src/lib/validation/utils/assignObserver.js +29 -29
- package/src/lib/validation/utils/helpers.js +4 -4
- package/src/lib/validation/utils/validateForm.js +15 -15
- package/src/lib/validation/utils/validateInputField.js +11 -11
- package/src/utils/index.js +2 -2
- package/tokens/dist/js/boxShadow.js +1 -1
- package/tokens/dist/js/breakpoints.js +1 -1
- package/tokens/dist/js/color.brand.js +1 -1
- package/tokens/dist/js/color.data.js +1 -1
- package/tokens/dist/js/color.palette.js +1 -1
- package/tokens/dist/js/color.ui.js +1 -1
- package/tokens/dist/js/fontSize.js +1 -1
- package/tokens/dist/js/rounded.js +1 -1
- package/tokens/dist/js/space.js +1 -1
- package/tokens/dist/js/zIndex.js +1 -1
- package/tokens/dist/scss/_boxShadow.scss +1 -1
- package/tokens/dist/scss/_breakpoints.scss +1 -1
- package/tokens/dist/scss/_color.brand.scss +1 -1
- package/tokens/dist/scss/_color.data.scss +1 -1
- package/tokens/dist/scss/_color.palette.scss +1 -1
- package/tokens/dist/scss/_color.ui.scss +1 -1
- package/tokens/dist/scss/_fontSize.scss +1 -1
- package/tokens/dist/scss/_rounded.scss +1 -1
- package/tokens/dist/scss/_space.scss +1 -1
- package/tokens/dist/scss/_zIndex.scss +1 -1
- package/types/icons.ts +26 -26
- package/coverage/clover.xml +0 -6
- package/coverage/coverage-final.json +0 -1
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/components/DpContextualHelp/DpContextualHelp.vue.html +0 -271
- package/coverage/lcov-report/components/DpContextualHelp/index.html +0 -116
- package/coverage/lcov-report/components/DpDataTableExtended/DataTableSearch.js.html +0 -190
- package/coverage/lcov-report/components/DpDataTableExtended/index.html +0 -116
- package/coverage/lcov-report/components/DpEditor/libs/handleWordPaste.js.html +0 -1138
- package/coverage/lcov-report/components/DpEditor/libs/index.html +0 -116
- package/coverage/lcov-report/components/DpIcon/DpIcon.vue.html +0 -256
- package/coverage/lcov-report/components/DpIcon/index.html +0 -131
- package/coverage/lcov-report/components/DpIcon/index.ts.html +0 -91
- package/coverage/lcov-report/components/DpIcon/util/iconVariables.js.html +0 -682
- package/coverage/lcov-report/components/DpIcon/util/index.html +0 -116
- package/coverage/lcov-report/components/DpTooltip/utils/index.html +0 -116
- package/coverage/lcov-report/components/DpTooltip/utils/tooltip.js.html +0 -490
- package/coverage/lcov-report/components/shared/index.html +0 -116
- package/coverage/lcov-report/components/shared/translations.js.html +0 -490
- package/coverage/lcov-report/directives/CleanHtml/CleanHtml.js.html +0 -265
- package/coverage/lcov-report/directives/CleanHtml/index.html +0 -116
- package/coverage/lcov-report/directives/Tooltip/Tooltip.js.html +0 -349
- package/coverage/lcov-report/directives/Tooltip/index.html +0 -116
- package/coverage/lcov-report/directives/index.html +0 -116
- package/coverage/lcov-report/directives/index.js.html +0 -109
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -101
- package/coverage/lcov-report/jest/index.html +0 -116
- package/coverage/lcov-report/jest/shallowMountWithGlobalMocks.js.html +0 -208
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/components/DpCheckbox/DpCheckbox.vue.html +0 -424
- package/coverage/lcov-report/src/components/DpCheckbox/index.html +0 -116
- package/coverage/lcov-report/src/components/DpContextualHelp/DpContextualHelp.vue.html +0 -361
- package/coverage/lcov-report/src/components/DpContextualHelp/index.html +0 -131
- package/coverage/lcov-report/src/components/DpContextualHelp/index.ts.html +0 -91
- package/coverage/lcov-report/src/components/DpDataTableExtended/DataTableSearch.js.html +0 -190
- package/coverage/lcov-report/src/components/DpDataTableExtended/index.html +0 -116
- package/coverage/lcov-report/src/components/DpDraggable/DpDraggable.vue.html +0 -499
- package/coverage/lcov-report/src/components/DpDraggable/index.html +0 -131
- package/coverage/lcov-report/src/components/DpDraggable/index.ts.html +0 -91
- package/coverage/lcov-report/src/components/DpEditor/libs/handleWordPaste.js.html +0 -1153
- package/coverage/lcov-report/src/components/DpEditor/libs/index.html +0 -116
- package/coverage/lcov-report/src/components/DpIcon/DpIcon.vue.html +0 -256
- package/coverage/lcov-report/src/components/DpIcon/index.html +0 -131
- package/coverage/lcov-report/src/components/DpIcon/index.ts.html +0 -91
- package/coverage/lcov-report/src/components/DpIcon/util/iconVariables.js.html +0 -706
- package/coverage/lcov-report/src/components/DpIcon/util/index.html +0 -116
- package/coverage/lcov-report/src/components/DpInput/DpInput.vue.html +0 -937
- package/coverage/lcov-report/src/components/DpInput/index.html +0 -131
- package/coverage/lcov-report/src/components/DpInput/index.ts.html +0 -91
- package/coverage/lcov-report/src/components/DpLabel/DpLabel.vue.html +0 -409
- package/coverage/lcov-report/src/components/DpLabel/index.html +0 -131
- package/coverage/lcov-report/src/components/DpLabel/index.ts.html +0 -91
- package/coverage/lcov-report/src/components/DpModal/DpModal.vue.html +0 -739
- package/coverage/lcov-report/src/components/DpModal/index.html +0 -131
- package/coverage/lcov-report/src/components/DpModal/index.ts.html +0 -91
- package/coverage/lcov-report/src/components/DpNotification/DpNotification.vue.html +0 -343
- package/coverage/lcov-report/src/components/DpNotification/index.html +0 -131
- package/coverage/lcov-report/src/components/DpNotification/index.ts.html +0 -91
- package/coverage/lcov-report/src/components/DpObscure/DpObscure.vue.html +0 -148
- package/coverage/lcov-report/src/components/DpObscure/index.html +0 -131
- package/coverage/lcov-report/src/components/DpObscure/index.ts.html +0 -91
- package/coverage/lcov-report/src/components/DpSelect/DpSelect.vue.html +0 -559
- package/coverage/lcov-report/src/components/DpSelect/index.html +0 -131
- package/coverage/lcov-report/src/components/DpSelect/index.ts.html +0 -91
- package/coverage/lcov-report/src/components/DpTooltip/utils/index.html +0 -116
- package/coverage/lcov-report/src/components/DpTooltip/utils/tooltip.js.html +0 -490
- package/coverage/lcov-report/src/components/DpTreeList/DpTreeList.vue.html +0 -1099
- package/coverage/lcov-report/src/components/DpTreeList/DpTreeListCheckbox.vue.html +0 -301
- package/coverage/lcov-report/src/components/DpTreeList/DpTreeListNode.vue.html +0 -1144
- package/coverage/lcov-report/src/components/DpTreeList/DpTreeListToggle.vue.html +0 -382
- package/coverage/lcov-report/src/components/DpTreeList/index.html +0 -161
- package/coverage/lcov-report/src/components/DpTreeList/utils/constants.js.html +0 -100
- package/coverage/lcov-report/src/components/DpTreeList/utils/index.html +0 -116
- package/coverage/lcov-report/src/components/DpUploadFiles/DpUpload.vue.html +0 -979
- package/coverage/lcov-report/src/components/DpUploadFiles/DpUploadFiles.vue.html +0 -970
- package/coverage/lcov-report/src/components/DpUploadFiles/DpUploadedFile.vue.html +0 -340
- package/coverage/lcov-report/src/components/DpUploadFiles/DpUploadedFileList.vue.html +0 -202
- package/coverage/lcov-report/src/components/DpUploadFiles/index.html +0 -176
- package/coverage/lcov-report/src/components/DpUploadFiles/index.ts.html +0 -91
- package/coverage/lcov-report/src/components/DpUploadFiles/utils/UppyTranslations.js.html +0 -151
- package/coverage/lcov-report/src/components/DpUploadFiles/utils/index.html +0 -116
- package/coverage/lcov-report/src/components/shared/index.html +0 -116
- package/coverage/lcov-report/src/components/shared/translations.js.html +0 -508
- package/coverage/lcov-report/src/directives/CleanHtml/CleanHtml.js.html +0 -265
- package/coverage/lcov-report/src/directives/CleanHtml/index.html +0 -116
- package/coverage/lcov-report/src/directives/Tooltip/Tooltip.js.html +0 -349
- package/coverage/lcov-report/src/directives/Tooltip/index.html +0 -116
- package/coverage/lcov-report/src/directives/index.html +0 -116
- package/coverage/lcov-report/src/directives/index.js.html +0 -109
- package/coverage/lcov-report/src/lib/ActionMenu.js.html +0 -610
- package/coverage/lcov-report/src/lib/Detabinator.js.html +0 -304
- package/coverage/lcov-report/src/lib/DpApi.js.html +0 -748
- package/coverage/lcov-report/src/lib/DpConfirm.js.html +0 -118
- package/coverage/lcov-report/src/lib/DpGetCssVariable.js.html +0 -103
- package/coverage/lcov-report/src/lib/FileInfo.js.html +0 -574
- package/coverage/lcov-report/src/lib/HighlightHashLink.js.html +0 -160
- package/coverage/lcov-report/src/lib/MatchMedia.js.html +0 -220
- package/coverage/lcov-report/src/lib/SideNav.js.html +0 -712
- package/coverage/lcov-report/src/lib/Sticky.js.html +0 -223
- package/coverage/lcov-report/src/lib/TableWrapper.js.html +0 -214
- package/coverage/lcov-report/src/lib/index.html +0 -281
- package/coverage/lcov-report/src/lib/index.js.html +0 -190
- package/coverage/lcov-report/src/lib/validation/utils/assignHandlersForInputs.js.html +0 -400
- package/coverage/lcov-report/src/lib/validation/utils/helpers.js.html +0 -523
- package/coverage/lcov-report/src/lib/validation/utils/index.html +0 -236
- package/coverage/lcov-report/src/lib/validation/utils/validateDatepicker.js.html +0 -160
- package/coverage/lcov-report/src/lib/validation/utils/validateEmail.js.html +0 -136
- package/coverage/lcov-report/src/lib/validation/utils/validateFieldset.js.html +0 -163
- package/coverage/lcov-report/src/lib/validation/utils/validateForm.js.html +0 -205
- package/coverage/lcov-report/src/lib/validation/utils/validateInputField.js.html +0 -403
- package/coverage/lcov-report/src/lib/validation/utils/validateMultiselect.js.html +0 -121
- package/coverage/lcov-report/src/lib/validation/utils/validateTiptap.js.html +0 -160
- package/coverage/lcov-report/src/mixins/dpSelectAllMixin.js.html +0 -232
- package/coverage/lcov-report/src/mixins/dpValidateMixin.js.html +0 -460
- package/coverage/lcov-report/src/mixins/index.html +0 -176
- package/coverage/lcov-report/src/mixins/index.js.html +0 -124
- package/coverage/lcov-report/src/mixins/prefixClassMixin/index.html +0 -116
- package/coverage/lcov-report/src/mixins/prefixClassMixin/prefixClassMixin.js.html +0 -121
- package/coverage/lcov-report/src/mixins/sessionStorageMixin.js.html +0 -160
- package/coverage/lcov-report/src/mixins/tableSelectAllItems.js.html +0 -427
- package/coverage/lcov-report/src/shared/index.html +0 -116
- package/coverage/lcov-report/src/shared/index.js.html +0 -103
- package/coverage/lcov-report/src/shared/props/index.html +0 -116
- package/coverage/lcov-report/src/shared/props/props.js.html +0 -310
- package/coverage/lcov-report/src/utils/date.js.html +0 -208
- package/coverage/lcov-report/src/utils/debounce.js.html +0 -163
- package/coverage/lcov-report/src/utils/deepMerge.js.html +0 -175
- package/coverage/lcov-report/src/utils/formatBytes.js.html +0 -133
- package/coverage/lcov-report/src/utils/formatString.js.html +0 -109
- package/coverage/lcov-report/src/utils/fullscreen.js.html +0 -253
- package/coverage/lcov-report/src/utils/getAnimationEventName.js.html +0 -157
- package/coverage/lcov-report/src/utils/getScrollTop.js.html +0 -109
- package/coverage/lcov-report/src/utils/hasOwnProp.js.html +0 -142
- package/coverage/lcov-report/src/utils/hasPermission.js.html +0 -214
- package/coverage/lcov-report/src/utils/index.html +0 -341
- package/coverage/lcov-report/src/utils/index.js.html +0 -217
- package/coverage/lcov-report/src/utils/lengthHint/index.html +0 -116
- package/coverage/lcov-report/src/utils/lengthHint/lengthHint.js.html +0 -268
- package/coverage/lcov-report/src/utils/prefixClass.js.html +0 -199
- package/coverage/lcov-report/src/utils/resistFingerprintingDuckTest.js.html +0 -232
- package/coverage/lcov-report/src/utils/sortAlphabetically.js.html +0 -193
- package/coverage/lcov-report/src/utils/throttle.js.html +0 -145
- package/coverage/lcov-report/src/utils/uniqueArrayByObjectKey.js.html +0 -151
- package/coverage/lcov-report/utils/date.js.html +0 -208
- package/coverage/lcov-report/utils/debounce.js.html +0 -163
- package/coverage/lcov-report/utils/deepMerge.js.html +0 -175
- package/coverage/lcov-report/utils/formatBytes.js.html +0 -133
- package/coverage/lcov-report/utils/fullscreen.js.html +0 -253
- package/coverage/lcov-report/utils/getAnimationEventName.js.html +0 -157
- package/coverage/lcov-report/utils/getScrollTop.js.html +0 -109
- package/coverage/lcov-report/utils/hasOwnProp.js.html +0 -142
- package/coverage/lcov-report/utils/hasPermission.js.html +0 -214
- package/coverage/lcov-report/utils/index.html +0 -326
- package/coverage/lcov-report/utils/index.js.html +0 -211
- package/coverage/lcov-report/utils/lengthHint/index.html +0 -116
- package/coverage/lcov-report/utils/lengthHint/lengthHint.js.html +0 -268
- package/coverage/lcov-report/utils/prefixClass.js.html +0 -199
- package/coverage/lcov-report/utils/resistFingerprintingDuckTest.js.html +0 -232
- package/coverage/lcov-report/utils/sortAlphabetically.js.html +0 -193
- package/coverage/lcov-report/utils/throttle.js.html +0 -145
- package/coverage/lcov-report/utils/uniqueArrayByObjectKey.js.html +0 -151
- package/coverage/lcov.info +0 -0
- package/style/style.css +0 -1002
|
@@ -1,460 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for src/mixins/dpValidateMixin.js</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/mixins</a> dpValidateMixin.js</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">0% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/56</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/32</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">0% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/14</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">0% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/54</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line low'></div>
|
|
65
|
-
<pre><table class="coverage">
|
|
66
|
-
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
-
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
-
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
-
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
-
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
-
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
-
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
-
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
-
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
-
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
-
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
-
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
-
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
-
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
-
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
-
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
-
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
-
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
-
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
-
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
-
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
-
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
-
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
-
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
-
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
-
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
-
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
-
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
-
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
-
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
-
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
-
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
-
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
-
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
-
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
-
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
-
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
-
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
-
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
-
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
-
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
-
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
-
<a name='L43'></a><a href='#L43'>43</a>
|
|
109
|
-
<a name='L44'></a><a href='#L44'>44</a>
|
|
110
|
-
<a name='L45'></a><a href='#L45'>45</a>
|
|
111
|
-
<a name='L46'></a><a href='#L46'>46</a>
|
|
112
|
-
<a name='L47'></a><a href='#L47'>47</a>
|
|
113
|
-
<a name='L48'></a><a href='#L48'>48</a>
|
|
114
|
-
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
|
-
<a name='L50'></a><a href='#L50'>50</a>
|
|
116
|
-
<a name='L51'></a><a href='#L51'>51</a>
|
|
117
|
-
<a name='L52'></a><a href='#L52'>52</a>
|
|
118
|
-
<a name='L53'></a><a href='#L53'>53</a>
|
|
119
|
-
<a name='L54'></a><a href='#L54'>54</a>
|
|
120
|
-
<a name='L55'></a><a href='#L55'>55</a>
|
|
121
|
-
<a name='L56'></a><a href='#L56'>56</a>
|
|
122
|
-
<a name='L57'></a><a href='#L57'>57</a>
|
|
123
|
-
<a name='L58'></a><a href='#L58'>58</a>
|
|
124
|
-
<a name='L59'></a><a href='#L59'>59</a>
|
|
125
|
-
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
|
-
<a name='L61'></a><a href='#L61'>61</a>
|
|
127
|
-
<a name='L62'></a><a href='#L62'>62</a>
|
|
128
|
-
<a name='L63'></a><a href='#L63'>63</a>
|
|
129
|
-
<a name='L64'></a><a href='#L64'>64</a>
|
|
130
|
-
<a name='L65'></a><a href='#L65'>65</a>
|
|
131
|
-
<a name='L66'></a><a href='#L66'>66</a>
|
|
132
|
-
<a name='L67'></a><a href='#L67'>67</a>
|
|
133
|
-
<a name='L68'></a><a href='#L68'>68</a>
|
|
134
|
-
<a name='L69'></a><a href='#L69'>69</a>
|
|
135
|
-
<a name='L70'></a><a href='#L70'>70</a>
|
|
136
|
-
<a name='L71'></a><a href='#L71'>71</a>
|
|
137
|
-
<a name='L72'></a><a href='#L72'>72</a>
|
|
138
|
-
<a name='L73'></a><a href='#L73'>73</a>
|
|
139
|
-
<a name='L74'></a><a href='#L74'>74</a>
|
|
140
|
-
<a name='L75'></a><a href='#L75'>75</a>
|
|
141
|
-
<a name='L76'></a><a href='#L76'>76</a>
|
|
142
|
-
<a name='L77'></a><a href='#L77'>77</a>
|
|
143
|
-
<a name='L78'></a><a href='#L78'>78</a>
|
|
144
|
-
<a name='L79'></a><a href='#L79'>79</a>
|
|
145
|
-
<a name='L80'></a><a href='#L80'>80</a>
|
|
146
|
-
<a name='L81'></a><a href='#L81'>81</a>
|
|
147
|
-
<a name='L82'></a><a href='#L82'>82</a>
|
|
148
|
-
<a name='L83'></a><a href='#L83'>83</a>
|
|
149
|
-
<a name='L84'></a><a href='#L84'>84</a>
|
|
150
|
-
<a name='L85'></a><a href='#L85'>85</a>
|
|
151
|
-
<a name='L86'></a><a href='#L86'>86</a>
|
|
152
|
-
<a name='L87'></a><a href='#L87'>87</a>
|
|
153
|
-
<a name='L88'></a><a href='#L88'>88</a>
|
|
154
|
-
<a name='L89'></a><a href='#L89'>89</a>
|
|
155
|
-
<a name='L90'></a><a href='#L90'>90</a>
|
|
156
|
-
<a name='L91'></a><a href='#L91'>91</a>
|
|
157
|
-
<a name='L92'></a><a href='#L92'>92</a>
|
|
158
|
-
<a name='L93'></a><a href='#L93'>93</a>
|
|
159
|
-
<a name='L94'></a><a href='#L94'>94</a>
|
|
160
|
-
<a name='L95'></a><a href='#L95'>95</a>
|
|
161
|
-
<a name='L96'></a><a href='#L96'>96</a>
|
|
162
|
-
<a name='L97'></a><a href='#L97'>97</a>
|
|
163
|
-
<a name='L98'></a><a href='#L98'>98</a>
|
|
164
|
-
<a name='L99'></a><a href='#L99'>99</a>
|
|
165
|
-
<a name='L100'></a><a href='#L100'>100</a>
|
|
166
|
-
<a name='L101'></a><a href='#L101'>101</a>
|
|
167
|
-
<a name='L102'></a><a href='#L102'>102</a>
|
|
168
|
-
<a name='L103'></a><a href='#L103'>103</a>
|
|
169
|
-
<a name='L104'></a><a href='#L104'>104</a>
|
|
170
|
-
<a name='L105'></a><a href='#L105'>105</a>
|
|
171
|
-
<a name='L106'></a><a href='#L106'>106</a>
|
|
172
|
-
<a name='L107'></a><a href='#L107'>107</a>
|
|
173
|
-
<a name='L108'></a><a href='#L108'>108</a>
|
|
174
|
-
<a name='L109'></a><a href='#L109'>109</a>
|
|
175
|
-
<a name='L110'></a><a href='#L110'>110</a>
|
|
176
|
-
<a name='L111'></a><a href='#L111'>111</a>
|
|
177
|
-
<a name='L112'></a><a href='#L112'>112</a>
|
|
178
|
-
<a name='L113'></a><a href='#L113'>113</a>
|
|
179
|
-
<a name='L114'></a><a href='#L114'>114</a>
|
|
180
|
-
<a name='L115'></a><a href='#L115'>115</a>
|
|
181
|
-
<a name='L116'></a><a href='#L116'>116</a>
|
|
182
|
-
<a name='L117'></a><a href='#L117'>117</a>
|
|
183
|
-
<a name='L118'></a><a href='#L118'>118</a>
|
|
184
|
-
<a name='L119'></a><a href='#L119'>119</a>
|
|
185
|
-
<a name='L120'></a><a href='#L120'>120</a>
|
|
186
|
-
<a name='L121'></a><a href='#L121'>121</a>
|
|
187
|
-
<a name='L122'></a><a href='#L122'>122</a>
|
|
188
|
-
<a name='L123'></a><a href='#L123'>123</a>
|
|
189
|
-
<a name='L124'></a><a href='#L124'>124</a>
|
|
190
|
-
<a name='L125'></a><a href='#L125'>125</a>
|
|
191
|
-
<a name='L126'></a><a href='#L126'>126</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
192
|
-
<span class="cline-any cline-neutral"> </span>
|
|
193
|
-
<span class="cline-any cline-neutral"> </span>
|
|
194
|
-
<span class="cline-any cline-neutral"> </span>
|
|
195
|
-
<span class="cline-any cline-neutral"> </span>
|
|
196
|
-
<span class="cline-any cline-neutral"> </span>
|
|
197
|
-
<span class="cline-any cline-neutral"> </span>
|
|
198
|
-
<span class="cline-any cline-neutral"> </span>
|
|
199
|
-
<span class="cline-any cline-neutral"> </span>
|
|
200
|
-
<span class="cline-any cline-neutral"> </span>
|
|
201
|
-
<span class="cline-any cline-neutral"> </span>
|
|
202
|
-
<span class="cline-any cline-neutral"> </span>
|
|
203
|
-
<span class="cline-any cline-neutral"> </span>
|
|
204
|
-
<span class="cline-any cline-neutral"> </span>
|
|
205
|
-
<span class="cline-any cline-neutral"> </span>
|
|
206
|
-
<span class="cline-any cline-neutral"> </span>
|
|
207
|
-
<span class="cline-any cline-no"> </span>
|
|
208
|
-
<span class="cline-any cline-neutral"> </span>
|
|
209
|
-
<span class="cline-any cline-neutral"> </span>
|
|
210
|
-
<span class="cline-any cline-neutral"> </span>
|
|
211
|
-
<span class="cline-any cline-neutral"> </span>
|
|
212
|
-
<span class="cline-any cline-neutral"> </span>
|
|
213
|
-
<span class="cline-any cline-neutral"> </span>
|
|
214
|
-
<span class="cline-any cline-neutral"> </span>
|
|
215
|
-
<span class="cline-any cline-neutral"> </span>
|
|
216
|
-
<span class="cline-any cline-neutral"> </span>
|
|
217
|
-
<span class="cline-any cline-neutral"> </span>
|
|
218
|
-
<span class="cline-any cline-neutral"> </span>
|
|
219
|
-
<span class="cline-any cline-neutral"> </span>
|
|
220
|
-
<span class="cline-any cline-no"> </span>
|
|
221
|
-
<span class="cline-any cline-no"> </span>
|
|
222
|
-
<span class="cline-any cline-no"> </span>
|
|
223
|
-
<span class="cline-any cline-no"> </span>
|
|
224
|
-
<span class="cline-any cline-neutral"> </span>
|
|
225
|
-
<span class="cline-any cline-no"> </span>
|
|
226
|
-
<span class="cline-any cline-no"> </span>
|
|
227
|
-
<span class="cline-any cline-neutral"> </span>
|
|
228
|
-
<span class="cline-any cline-no"> </span>
|
|
229
|
-
<span class="cline-any cline-neutral"> </span>
|
|
230
|
-
<span class="cline-any cline-no"> </span>
|
|
231
|
-
<span class="cline-any cline-no"> </span>
|
|
232
|
-
<span class="cline-any cline-no"> </span>
|
|
233
|
-
<span class="cline-any cline-no"> </span>
|
|
234
|
-
<span class="cline-any cline-no"> </span>
|
|
235
|
-
<span class="cline-any cline-no"> </span>
|
|
236
|
-
<span class="cline-any cline-neutral"> </span>
|
|
237
|
-
<span class="cline-any cline-no"> </span>
|
|
238
|
-
<span class="cline-any cline-no"> </span>
|
|
239
|
-
<span class="cline-any cline-no"> </span>
|
|
240
|
-
<span class="cline-any cline-neutral"> </span>
|
|
241
|
-
<span class="cline-any cline-no"> </span>
|
|
242
|
-
<span class="cline-any cline-neutral"> </span>
|
|
243
|
-
<span class="cline-any cline-no"> </span>
|
|
244
|
-
<span class="cline-any cline-no"> </span>
|
|
245
|
-
<span class="cline-any cline-no"> </span>
|
|
246
|
-
<span class="cline-any cline-no"> </span>
|
|
247
|
-
<span class="cline-any cline-neutral"> </span>
|
|
248
|
-
<span class="cline-any cline-no"> </span>
|
|
249
|
-
<span class="cline-any cline-neutral"> </span>
|
|
250
|
-
<span class="cline-any cline-neutral"> </span>
|
|
251
|
-
<span class="cline-any cline-no"> </span>
|
|
252
|
-
<span class="cline-any cline-no"> </span>
|
|
253
|
-
<span class="cline-any cline-neutral"> </span>
|
|
254
|
-
<span class="cline-any cline-neutral"> </span>
|
|
255
|
-
<span class="cline-any cline-neutral"> </span>
|
|
256
|
-
<span class="cline-any cline-no"> </span>
|
|
257
|
-
<span class="cline-any cline-no"> </span>
|
|
258
|
-
<span class="cline-any cline-neutral"> </span>
|
|
259
|
-
<span class="cline-any cline-neutral"> </span>
|
|
260
|
-
<span class="cline-any cline-neutral"> </span>
|
|
261
|
-
<span class="cline-any cline-neutral"> </span>
|
|
262
|
-
<span class="cline-any cline-neutral"> </span>
|
|
263
|
-
<span class="cline-any cline-neutral"> </span>
|
|
264
|
-
<span class="cline-any cline-no"> </span>
|
|
265
|
-
<span class="cline-any cline-no"> </span>
|
|
266
|
-
<span class="cline-any cline-no"> </span>
|
|
267
|
-
<span class="cline-any cline-no"> </span>
|
|
268
|
-
<span class="cline-any cline-neutral"> </span>
|
|
269
|
-
<span class="cline-any cline-no"> </span>
|
|
270
|
-
<span class="cline-any cline-no"> </span>
|
|
271
|
-
<span class="cline-any cline-neutral"> </span>
|
|
272
|
-
<span class="cline-any cline-neutral"> </span>
|
|
273
|
-
<span class="cline-any cline-no"> </span>
|
|
274
|
-
<span class="cline-any cline-neutral"> </span>
|
|
275
|
-
<span class="cline-any cline-no"> </span>
|
|
276
|
-
<span class="cline-any cline-no"> </span>
|
|
277
|
-
<span class="cline-any cline-no"> </span>
|
|
278
|
-
<span class="cline-any cline-no"> </span>
|
|
279
|
-
<span class="cline-any cline-neutral"> </span>
|
|
280
|
-
<span class="cline-any cline-neutral"> </span>
|
|
281
|
-
<span class="cline-any cline-neutral"> </span>
|
|
282
|
-
<span class="cline-any cline-neutral"> </span>
|
|
283
|
-
<span class="cline-any cline-no"> </span>
|
|
284
|
-
<span class="cline-any cline-neutral"> </span>
|
|
285
|
-
<span class="cline-any cline-no"> </span>
|
|
286
|
-
<span class="cline-any cline-neutral"> </span>
|
|
287
|
-
<span class="cline-any cline-no"> </span>
|
|
288
|
-
<span class="cline-any cline-neutral"> </span>
|
|
289
|
-
<span class="cline-any cline-no"> </span>
|
|
290
|
-
<span class="cline-any cline-neutral"> </span>
|
|
291
|
-
<span class="cline-any cline-no"> </span>
|
|
292
|
-
<span class="cline-any cline-no"> </span>
|
|
293
|
-
<span class="cline-any cline-neutral"> </span>
|
|
294
|
-
<span class="cline-any cline-no"> </span>
|
|
295
|
-
<span class="cline-any cline-no"> </span>
|
|
296
|
-
<span class="cline-any cline-no"> </span>
|
|
297
|
-
<span class="cline-any cline-neutral"> </span>
|
|
298
|
-
<span class="cline-any cline-no"> </span>
|
|
299
|
-
<span class="cline-any cline-no"> </span>
|
|
300
|
-
<span class="cline-any cline-no"> </span>
|
|
301
|
-
<span class="cline-any cline-no"> </span>
|
|
302
|
-
<span class="cline-any cline-neutral"> </span>
|
|
303
|
-
<span class="cline-any cline-neutral"> </span>
|
|
304
|
-
<span class="cline-any cline-no"> </span>
|
|
305
|
-
<span class="cline-any cline-neutral"> </span>
|
|
306
|
-
<span class="cline-any cline-neutral"> </span>
|
|
307
|
-
<span class="cline-any cline-neutral"> </span>
|
|
308
|
-
<span class="cline-any cline-neutral"> </span>
|
|
309
|
-
<span class="cline-any cline-no"> </span>
|
|
310
|
-
<span class="cline-any cline-no"> </span>
|
|
311
|
-
<span class="cline-any cline-neutral"> </span>
|
|
312
|
-
<span class="cline-any cline-neutral"> </span>
|
|
313
|
-
<span class="cline-any cline-neutral"> </span>
|
|
314
|
-
<span class="cline-any cline-neutral"> </span>
|
|
315
|
-
<span class="cline-any cline-neutral"> </span>
|
|
316
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">/*
|
|
317
|
-
* This is the dpValidate vue mixin that allows us to validate inputs in vue components.
|
|
318
|
-
* It is to be used in vue components. To use it in vanilla JS-context see: src/lib/validation/dpValidate.js
|
|
319
|
-
*
|
|
320
|
-
* Up to date documentation and usage examples can be found here:
|
|
321
|
-
* https://dplan-documentation.demos-europe.eu/development/application-architecture/validation/frontend/#_1-use-as-a-vue-mixin-dpvalidatemixin-js
|
|
322
|
-
*/
|
|
323
|
-
|
|
324
|
-
import { de } from '~/components/shared/translations'
|
|
325
|
-
import { errorClass, scrollToVisibleElement } from '~/lib/validation/utils/helpers'
|
|
326
|
-
import { assignHandlersForInputs } from '~/lib/validation/utils/assignHandlersForInputs'
|
|
327
|
-
import hasOwnProp from '~/utils/hasOwnProp'
|
|
328
|
-
import validateForm from '~/lib/validation/utils/validateForm'
|
|
329
|
-
|
|
330
|
-
export default {
|
|
331
|
-
<span class="fstat-no" title="function not covered" > da</span>ta () {
|
|
332
|
-
<span class="cstat-no" title="statement not covered" > return {</span>
|
|
333
|
-
dpValidate: {}
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
|
-
|
|
337
|
-
methods: {
|
|
338
|
-
/**
|
|
339
|
-
*
|
|
340
|
-
* @param formId
|
|
341
|
-
* @param callback
|
|
342
|
-
* @param forceCallback if true, the callback function is called even if the form is invalid
|
|
343
|
-
*/
|
|
344
|
-
<span class="fstat-no" title="function not covered" > dp</span>ValidateAction (formId, callback, forceCallback = <span class="branch-0 cbranch-no" title="branch not covered" >true)</span> {
|
|
345
|
-
const isForm = <span class="cstat-no" title="statement not covered" >this.$el.hasAttribute('data-dp-validate') && this.$el.getAttribute('data-dp-validate') === formId</span>
|
|
346
|
-
const form = <span class="cstat-no" title="statement not covered" >isForm ? this.$el : this.$el.querySelector(`[data-dp-validate=${formId}]`)</span>
|
|
347
|
-
const formValidation = <span class="cstat-no" title="statement not covered" >validateForm(form)</span>
|
|
348
|
-
<span class="cstat-no" title="statement not covered" > this.dpValidate = { ...this.dpValidate, [formId]: formValidation.valid }</span>
|
|
349
|
-
|
|
350
|
-
<span class="cstat-no" title="statement not covered" > if (hasOwnProp(this.dpValidate, 'invalidFields') === false) {</span>
|
|
351
|
-
<span class="cstat-no" title="statement not covered" > this.dpValidate.invalidFields = {}</span>
|
|
352
|
-
}
|
|
353
|
-
<span class="cstat-no" title="statement not covered" > this.dpValidate.invalidFields[formId] = formValidation.invalidFields</span>
|
|
354
|
-
|
|
355
|
-
<span class="cstat-no" title="statement not covered" > if (this.dpValidate[formId] === false) {</span>
|
|
356
|
-
const invalidFields = <span class="cstat-no" title="statement not covered" >this.dpValidate.invalidFields[formId]</span>
|
|
357
|
-
const customErrors = <span class="cstat-no" title="statement not covered" >invalidFields</span>
|
|
358
|
-
.filter(<span class="fstat-no" title="function not covered" >el</span>ement => <span class="cstat-no" title="statement not covered" >element.hasAttribute('data-dp-validate-error'))</span>
|
|
359
|
-
.map(<span class="fstat-no" title="function not covered" >el</span>ement => <span class="cstat-no" title="statement not covered" >element.dataset.dpValidateError)</span>
|
|
360
|
-
<span class="cstat-no" title="statement not covered" > customErrors.forEach(<span class="fstat-no" title="function not covered" >er</span>ror => <span class="cstat-no" title="statement not covered" >dplan.notify.notify('error', Translator.trans(error)))</span></span>
|
|
361
|
-
|
|
362
|
-
<span class="cstat-no" title="statement not covered" > if (customErrors.length === 0) {</span>
|
|
363
|
-
const nonEmptyUniqueFieldNames = <span class="cstat-no" title="statement not covered" >invalidFields</span>
|
|
364
|
-
.map(<span class="fstat-no" title="function not covered" >fi</span>eld => <span class="cstat-no" title="statement not covered" >field.getAttribute('data-dp-validate-error-fieldname'))</span>
|
|
365
|
-
.filter(Boolean)
|
|
366
|
-
.filter(<span class="fstat-no" title="function not covered" >(f</span>ield, idx, arr) => <span class="cstat-no" title="statement not covered" >arr.indexOf(field) === idx)</span>
|
|
367
|
-
|
|
368
|
-
<span class="cstat-no" title="statement not covered" > if (nonEmptyUniqueFieldNames.length) {</span>
|
|
369
|
-
const fieldsString = <span class="cstat-no" title="statement not covered" >nonEmptyUniqueFieldNames ? nonEmptyUniqueFieldNames.join(', ') : ' '</span>
|
|
370
|
-
const errorMandatoryFields = <span class="cstat-no" title="statement not covered" >de.error.mandatoryFields.intro + fieldsString + de.error.mandatoryFields.outro</span>
|
|
371
|
-
<span class="cstat-no" title="statement not covered" > dplan.notify.notify('error', errorMandatoryFields)</span>
|
|
372
|
-
} else {
|
|
373
|
-
<span class="cstat-no" title="statement not covered" > dplan.notify.notify('error', de.error.mandatoryFields.default)</span>
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
const firstErrorElement = <span class="cstat-no" title="statement not covered" >form.querySelector('.' + errorClass)</span>
|
|
377
|
-
<span class="cstat-no" title="statement not covered" > scrollToVisibleElement(firstErrorElement)</span>
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
// In some cases, we want to call the callback even if the form is invalid
|
|
381
|
-
<span class="cstat-no" title="statement not covered" > if ((this.dpValidate[formId] === false && forceCallback) || this.dpValidate[formId]) {</span>
|
|
382
|
-
<span class="cstat-no" title="statement not covered" > return callback()</span>
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
},
|
|
386
|
-
|
|
387
|
-
<span class="fstat-no" title="function not covered" > mo</span>unted () {
|
|
388
|
-
// Set the initial values for form validity to true and add event listener for input fields (focus and blur)
|
|
389
|
-
let forms = <span class="cstat-no" title="statement not covered" >[]</span>
|
|
390
|
-
<span class="cstat-no" title="statement not covered" > if (this.$el.hasAttribute('data-dp-validate')) {</span>
|
|
391
|
-
<span class="cstat-no" title="statement not covered" > this.isComponentForm = true </span>// It means a whole component is a form to be validated; it has no child-forms
|
|
392
|
-
<span class="cstat-no" title="statement not covered" > forms.push(this.$el)</span>
|
|
393
|
-
} else {
|
|
394
|
-
<span class="cstat-no" title="statement not covered" > this.isComponentForm = false </span>// It means in this component there are several forms that need to be validated
|
|
395
|
-
<span class="cstat-no" title="statement not covered" > forms = Array.from(this.$el.querySelectorAll('[data-dp-validate]'))</span>
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
<span class="cstat-no" title="statement not covered" > this.dpValidateForms = forms</span>
|
|
399
|
-
|
|
400
|
-
<span class="cstat-no" title="statement not covered" > this.dpValidateForms.forEach(<span class="fstat-no" title="function not covered" >fo</span>rm => {</span>
|
|
401
|
-
const formId = <span class="cstat-no" title="statement not covered" >form.getAttribute('data-dp-validate')</span>
|
|
402
|
-
<span class="cstat-no" title="statement not covered" > this.dpValidate[formId] = true</span>
|
|
403
|
-
<span class="cstat-no" title="statement not covered" > assignHandlersForInputs(form)</span>
|
|
404
|
-
})
|
|
405
|
-
},
|
|
406
|
-
|
|
407
|
-
<span class="fstat-no" title="function not covered" > up</span>dated () {
|
|
408
|
-
<span class="cstat-no" title="statement not covered" > this.$nextTick(<span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
409
|
-
// Check if new forms were added - only if component is not a form itself
|
|
410
|
-
<span class="cstat-no" title="statement not covered" > if (this.isComponentForm === false) {</span>
|
|
411
|
-
// Collect all forms, that are in DOM after the update
|
|
412
|
-
const afterUpdateForms = <span class="cstat-no" title="statement not covered" >Array.from(this.$el.querySelectorAll('[data-dp-validate]'))</span>
|
|
413
|
-
// Merge forms that are currently in DOM with the forms that were previously in DOM
|
|
414
|
-
const allForms = <span class="cstat-no" title="statement not covered" >afterUpdateForms.concat(this.dpValidateForms)</span>
|
|
415
|
-
// Loop over all forms
|
|
416
|
-
<span class="cstat-no" title="statement not covered" > allForms.forEach(<span class="fstat-no" title="function not covered" >fo</span>rm => {</span>
|
|
417
|
-
<span class="cstat-no" title="statement not covered" > if (this.dpValidateForms.includes(form) && afterUpdateForms.includes(form) === false) {</span>
|
|
418
|
-
// Remove form from dpValidateForms if it is no longer in DOM
|
|
419
|
-
const idx = <span class="cstat-no" title="statement not covered" >this.dpValidateForms.findIndex(<span class="fstat-no" title="function not covered" >el</span> => <span class="cstat-no" title="statement not covered" >el === form)</span></span>
|
|
420
|
-
<span class="cstat-no" title="statement not covered" > delete this.dpValidateForms[idx]</span>
|
|
421
|
-
} else <span class="cstat-no" title="statement not covered" >if (this.dpValidateForms.includes(form) === false && afterUpdateForms.includes(form)) {</span>
|
|
422
|
-
// If it is a new form (was just added to DOM), add it to dpValidateForms and assign handlers to each field
|
|
423
|
-
<span class="cstat-no" title="statement not covered" > this.dpValidateForms.push(form)</span>
|
|
424
|
-
const formId = <span class="cstat-no" title="statement not covered" >form.getAttribute('data-dp-validate')</span>
|
|
425
|
-
<span class="cstat-no" title="statement not covered" > this.dpValidate[formId] = true</span>
|
|
426
|
-
<span class="cstat-no" title="statement not covered" > assignHandlersForInputs(form)</span>
|
|
427
|
-
} else {
|
|
428
|
-
// If the form was previously in DOM and was not removed, reassign handlers as the required/validateIf/pattern properties may have changed
|
|
429
|
-
<span class="cstat-no" title="statement not covered" > assignHandlersForInputs(form)</span>
|
|
430
|
-
}
|
|
431
|
-
})
|
|
432
|
-
} else {
|
|
433
|
-
// If component is a form, only reassign handlers in existing forms
|
|
434
|
-
<span class="cstat-no" title="statement not covered" > this.dpValidateForms.forEach(<span class="fstat-no" title="function not covered" >fo</span>rm => {</span>
|
|
435
|
-
<span class="cstat-no" title="statement not covered" > assignHandlersForInputs(form)</span>
|
|
436
|
-
})
|
|
437
|
-
}
|
|
438
|
-
})
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
</pre></td></tr></table></pre>
|
|
442
|
-
|
|
443
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
444
|
-
</div><!-- /wrapper -->
|
|
445
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
446
|
-
Code coverage generated by
|
|
447
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
448
|
-
at 2024-12-02T14:13:18.182Z
|
|
449
|
-
</div>
|
|
450
|
-
<script src="../../prettify.js"></script>
|
|
451
|
-
<script>
|
|
452
|
-
window.onload = function () {
|
|
453
|
-
prettyPrint();
|
|
454
|
-
};
|
|
455
|
-
</script>
|
|
456
|
-
<script src="../../sorter.js"></script>
|
|
457
|
-
<script src="../../block-navigation.js"></script>
|
|
458
|
-
</body>
|
|
459
|
-
</html>
|
|
460
|
-
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!doctype html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
|
|
5
|
-
<head>
|
|
6
|
-
<title>Code coverage report for src/mixins</title>
|
|
7
|
-
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="../../prettify.css" />
|
|
9
|
-
<link rel="stylesheet" href="../../base.css" />
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="../../favicon.png" />
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<style type='text/css'>
|
|
13
|
-
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(../../sort-arrow-sprite.png);
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<div class='wrapper'>
|
|
21
|
-
<div class='pad1'>
|
|
22
|
-
<h1><a href="../../index.html">All files</a> src/mixins</h1>
|
|
23
|
-
<div class='clearfix'>
|
|
24
|
-
|
|
25
|
-
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">0% </span>
|
|
27
|
-
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/101</span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">0% </span>
|
|
34
|
-
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/68</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">0% </span>
|
|
41
|
-
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/34</span>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">0% </span>
|
|
48
|
-
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/95</span>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</div>
|
|
54
|
-
<p class="quiet">
|
|
55
|
-
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
-
</p>
|
|
57
|
-
<template id="filterTemplate">
|
|
58
|
-
<div class="quiet">
|
|
59
|
-
Filter:
|
|
60
|
-
<input type="search" id="fileSearch">
|
|
61
|
-
</div>
|
|
62
|
-
</template>
|
|
63
|
-
</div>
|
|
64
|
-
<div class='status-line low'></div>
|
|
65
|
-
<div class="pad1">
|
|
66
|
-
<table class="coverage-summary">
|
|
67
|
-
<thead>
|
|
68
|
-
<tr>
|
|
69
|
-
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
|
70
|
-
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
|
71
|
-
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
|
72
|
-
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
73
|
-
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
|
74
|
-
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
75
|
-
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
|
76
|
-
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
77
|
-
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
|
78
|
-
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
|
79
|
-
</tr>
|
|
80
|
-
</thead>
|
|
81
|
-
<tbody><tr>
|
|
82
|
-
<td class="file low" data-value="dpSelectAllMixin.js"><a href="dpSelectAllMixin.js.html">dpSelectAllMixin.js</a></td>
|
|
83
|
-
<td data-value="0" class="pic low">
|
|
84
|
-
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
85
|
-
</td>
|
|
86
|
-
<td data-value="0" class="pct low">0%</td>
|
|
87
|
-
<td data-value="9" class="abs low">0/9</td>
|
|
88
|
-
<td data-value="0" class="pct low">0%</td>
|
|
89
|
-
<td data-value="4" class="abs low">0/4</td>
|
|
90
|
-
<td data-value="0" class="pct low">0%</td>
|
|
91
|
-
<td data-value="5" class="abs low">0/5</td>
|
|
92
|
-
<td data-value="0" class="pct low">0%</td>
|
|
93
|
-
<td data-value="8" class="abs low">0/8</td>
|
|
94
|
-
</tr>
|
|
95
|
-
|
|
96
|
-
<tr>
|
|
97
|
-
<td class="file low" data-value="dpValidateMixin.js"><a href="dpValidateMixin.js.html">dpValidateMixin.js</a></td>
|
|
98
|
-
<td data-value="0" class="pic low">
|
|
99
|
-
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
100
|
-
</td>
|
|
101
|
-
<td data-value="0" class="pct low">0%</td>
|
|
102
|
-
<td data-value="56" class="abs low">0/56</td>
|
|
103
|
-
<td data-value="0" class="pct low">0%</td>
|
|
104
|
-
<td data-value="32" class="abs low">0/32</td>
|
|
105
|
-
<td data-value="0" class="pct low">0%</td>
|
|
106
|
-
<td data-value="14" class="abs low">0/14</td>
|
|
107
|
-
<td data-value="0" class="pct low">0%</td>
|
|
108
|
-
<td data-value="54" class="abs low">0/54</td>
|
|
109
|
-
</tr>
|
|
110
|
-
|
|
111
|
-
<tr>
|
|
112
|
-
<td class="file empty" data-value="index.js"><a href="index.js.html">index.js</a></td>
|
|
113
|
-
<td data-value="0" class="pic empty">
|
|
114
|
-
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
115
|
-
</td>
|
|
116
|
-
<td data-value="0" class="pct empty">0%</td>
|
|
117
|
-
<td data-value="0" class="abs empty">0/0</td>
|
|
118
|
-
<td data-value="0" class="pct empty">0%</td>
|
|
119
|
-
<td data-value="0" class="abs empty">0/0</td>
|
|
120
|
-
<td data-value="0" class="pct empty">0%</td>
|
|
121
|
-
<td data-value="0" class="abs empty">0/0</td>
|
|
122
|
-
<td data-value="0" class="pct empty">0%</td>
|
|
123
|
-
<td data-value="0" class="abs empty">0/0</td>
|
|
124
|
-
</tr>
|
|
125
|
-
|
|
126
|
-
<tr>
|
|
127
|
-
<td class="file low" data-value="sessionStorageMixin.js"><a href="sessionStorageMixin.js.html">sessionStorageMixin.js</a></td>
|
|
128
|
-
<td data-value="0" class="pic low">
|
|
129
|
-
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
130
|
-
</td>
|
|
131
|
-
<td data-value="0" class="pct low">0%</td>
|
|
132
|
-
<td data-value="7" class="abs low">0/7</td>
|
|
133
|
-
<td data-value="0" class="pct low">0%</td>
|
|
134
|
-
<td data-value="8" class="abs low">0/8</td>
|
|
135
|
-
<td data-value="0" class="pct low">0%</td>
|
|
136
|
-
<td data-value="4" class="abs low">0/4</td>
|
|
137
|
-
<td data-value="0" class="pct low">0%</td>
|
|
138
|
-
<td data-value="7" class="abs low">0/7</td>
|
|
139
|
-
</tr>
|
|
140
|
-
|
|
141
|
-
<tr>
|
|
142
|
-
<td class="file low" data-value="tableSelectAllItems.js"><a href="tableSelectAllItems.js.html">tableSelectAllItems.js</a></td>
|
|
143
|
-
<td data-value="0" class="pic low">
|
|
144
|
-
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
145
|
-
</td>
|
|
146
|
-
<td data-value="0" class="pct low">0%</td>
|
|
147
|
-
<td data-value="29" class="abs low">0/29</td>
|
|
148
|
-
<td data-value="0" class="pct low">0%</td>
|
|
149
|
-
<td data-value="24" class="abs low">0/24</td>
|
|
150
|
-
<td data-value="0" class="pct low">0%</td>
|
|
151
|
-
<td data-value="11" class="abs low">0/11</td>
|
|
152
|
-
<td data-value="0" class="pct low">0%</td>
|
|
153
|
-
<td data-value="26" class="abs low">0/26</td>
|
|
154
|
-
</tr>
|
|
155
|
-
|
|
156
|
-
</tbody>
|
|
157
|
-
</table>
|
|
158
|
-
</div>
|
|
159
|
-
<div class='push'></div><!-- for sticky footer -->
|
|
160
|
-
</div><!-- /wrapper -->
|
|
161
|
-
<div class='footer quiet pad2 space-top1 center small'>
|
|
162
|
-
Code coverage generated by
|
|
163
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
164
|
-
at 2024-12-02T14:13:18.182Z
|
|
165
|
-
</div>
|
|
166
|
-
<script src="../../prettify.js"></script>
|
|
167
|
-
<script>
|
|
168
|
-
window.onload = function () {
|
|
169
|
-
prettyPrint();
|
|
170
|
-
};
|
|
171
|
-
</script>
|
|
172
|
-
<script src="../../sorter.js"></script>
|
|
173
|
-
<script src="../../block-navigation.js"></script>
|
|
174
|
-
</body>
|
|
175
|
-
</html>
|
|
176
|
-
|