@madgex/design-system 1.60.6 → 1.60.8
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/__tests__/unit/src/components/accordion.spec.js +16 -12
- package/coverage/cobertura-coverage.xml +59 -173
- package/coverage/components/accordion/accordion.js.html +70 -43
- package/coverage/components/accordion/index.html +15 -15
- package/coverage/components/inputs/combobox/combobox.js.html +1 -1
- package/coverage/components/inputs/combobox/index.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/Combobox.vue.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/ListBoxOption.vue.html +1 -1
- package/coverage/components/inputs/combobox/vue-components/index.html +1 -1
- package/coverage/components/inputs/file-upload/file-upload.js.html +1 -1
- package/coverage/components/inputs/file-upload/index.html +1 -1
- package/coverage/components/inputs/textarea/character-count.js.html +1 -1
- package/coverage/components/inputs/textarea/index.html +1 -1
- package/coverage/components/modal/index.html +1 -1
- package/coverage/components/modal/modal.js.html +1 -1
- package/coverage/components/notification/index.html +1 -1
- package/coverage/components/notification/notification.js.html +1 -1
- package/coverage/components/popover/index.html +1 -1
- package/coverage/components/popover/popover.js.html +1 -1
- package/coverage/components/switch-state/index.html +1 -1
- package/coverage/components/switch-state/switch-state.js.html +1 -1
- package/coverage/components/tabs/index.html +1 -1
- package/coverage/components/tabs/tabs.js.html +1 -1
- package/coverage/index.html +17 -47
- package/coverage/js/common.js.html +1 -1
- package/coverage/js/fractal-scripts/combobox.js.html +1 -1
- package/coverage/js/fractal-scripts/index.html +1 -1
- package/coverage/js/fractal-scripts/notification.js.html +1 -1
- package/coverage/js/fractal-scripts/switch-state.js.html +1 -1
- package/coverage/js/index-fractal.js.html +1 -1
- package/coverage/js/index-polyfills.js.html +1 -1
- package/coverage/js/index-vue.js.html +3 -6
- package/coverage/js/index.html +1 -1
- package/coverage/js/index.js.html +1 -1
- package/coverage/js/polyfills/arrayPrototypeFind.js.html +1 -1
- package/coverage/js/polyfills/closest.js.html +1 -1
- package/coverage/js/polyfills/index.html +1 -1
- package/coverage/js/polyfills/objectAssign.js.html +1 -1
- package/coverage/js/polyfills/remove.js.html +1 -1
- package/coverage/tokens/_config.js.html +1 -1
- package/coverage/tokens/index.html +1 -1
- package/dist/_tokens/css/_tokens.css +1 -1
- package/dist/_tokens/js/_tokens-module.js +1 -1
- package/dist/_tokens/scss/_tokens.scss +1 -1
- package/dist/assets/icons.json +1 -1
- package/dist/css/index.css +1 -1
- package/dist/js/index.js +5 -5
- package/package.json +1 -1
- package/src/components/{macro-index.njk → _macro-index.njk} +0 -1
- package/src/components/accordion/README.md +18 -7
- package/src/components/accordion/_template.njk +46 -52
- package/src/components/accordion/accordion.config.js +8 -8
- package/src/components/accordion/accordion.js +42 -33
- package/src/components/accordion/accordion.njk +2 -1
- package/src/components/accordion/accordion.scss +15 -15
- package/src/components/inputs/_form-elements.scss +54 -19
- package/src/components/inputs/checkbox/README.md +3 -1
- package/src/components/inputs/checkbox/_template.njk +80 -17
- package/src/components/inputs/checkbox/checkbox.config.js +110 -1
- package/src/components/inputs/checkbox/checkbox.njk +3 -1
- package/src/components/inputs/label/_template.njk +38 -29
- package/src/components/popover/popover.scss +1 -0
- package/src/js/index-vue.js +1 -2
- package/src/layout/forms/forms.config.js +20 -20
- package/src/layout/forms/forms.njk +11 -12
- package/src/scss/components/__index.scss +0 -1
- package/tasks/createMacroIndex.js +1 -1
- package/__tests__/unit/src/components/multiselect.spec.js +0 -91
- package/coverage/components/inputs/multi-select/index.html +0 -110
- package/coverage/components/inputs/multi-select/multi-select.js.html +0 -175
- package/coverage/components/inputs/multi-select/vue-components/MultiSelect.vue.html +0 -229
- package/coverage/components/inputs/multi-select/vue-components/MultiSelectCheckbox.vue.html +0 -349
- package/coverage/components/inputs/multi-select/vue-components/MultiSelectCheckboxGroup.vue.html +0 -274
- package/coverage/components/inputs/multi-select/vue-components/index.html +0 -140
- package/cypress/integration/components/multi-select.spec.js +0 -9
- package/src/components/inputs/multi-select/README.md +0 -18
- package/src/components/inputs/multi-select/_macro.njk +0 -3
- package/src/components/inputs/multi-select/_template.njk +0 -57
- package/src/components/inputs/multi-select/multi-select.config.js +0 -178
- package/src/components/inputs/multi-select/multi-select.js +0 -32
- package/src/components/inputs/multi-select/multi-select.njk +0 -16
- package/src/components/inputs/multi-select/multi-select.scss +0 -39
- package/src/components/inputs/multi-select/vue-components/MultiSelect.vue +0 -50
- package/src/components/inputs/multi-select/vue-components/MultiSelectCheckbox.vue +0 -90
- package/src/components/inputs/multi-select/vue-components/MultiSelectCheckboxGroup.vue +0 -65
|
@@ -4,10 +4,10 @@ import accordion from '../../../../src/components/accordion/accordion';
|
|
|
4
4
|
window.getComputedStyle = jest.fn().mockReturnValue({ 'font-size': '16px' });
|
|
5
5
|
|
|
6
6
|
describe('Accordion - checkBreakpoint', () => {
|
|
7
|
-
|
|
7
|
+
const element = {
|
|
8
8
|
dataset: {
|
|
9
|
-
bp: ''
|
|
10
|
-
}
|
|
9
|
+
bp: '',
|
|
10
|
+
},
|
|
11
11
|
};
|
|
12
12
|
beforeEach(() => {});
|
|
13
13
|
it('shows accordion when no bp is set', async () => {
|
|
@@ -49,19 +49,20 @@ describe('Accordion - checkBreakpoint', () => {
|
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
describe('Accordion - createButton', () => {
|
|
52
|
-
|
|
53
|
-
element.
|
|
52
|
+
const element = document.createElement('div');
|
|
53
|
+
element.classList.add('mds-accordion-trigger');
|
|
54
|
+
element.innerHTML = '<span>this is the span</span>';
|
|
54
55
|
beforeEach(() => {});
|
|
55
56
|
it('created the button and contains correct attrs', async () => {
|
|
56
57
|
expect.assertions(2);
|
|
57
|
-
const accordionTriggerButton = accordion.createButton('
|
|
58
|
+
const accordionTriggerButton = accordion.createButton('accordionTriggerId', element);
|
|
58
59
|
expect(accordionTriggerButton.innerHTML).toContain('this is the span');
|
|
59
|
-
expect(accordionTriggerButton.classList).toEqual(expect.objectContaining({ '0': 'mds-
|
|
60
|
+
expect(accordionTriggerButton.classList).toEqual(expect.objectContaining({ '0': 'mds-accordion-trigger__button' }));
|
|
60
61
|
});
|
|
61
62
|
});
|
|
62
63
|
|
|
63
64
|
describe('Accordion - switchLabel', () => {
|
|
64
|
-
|
|
65
|
+
const element = document.createElement('span');
|
|
65
66
|
element.dataset.labelinverse = 'view less';
|
|
66
67
|
element.textContent = 'view more';
|
|
67
68
|
beforeEach(() => {});
|
|
@@ -73,12 +74,15 @@ describe('Accordion - switchLabel', () => {
|
|
|
73
74
|
});
|
|
74
75
|
|
|
75
76
|
describe('Accordion - setAccordion', () => {
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
const accordionTrigger = document.createElement('div');
|
|
78
|
+
accordionTrigger.classList.add('mds-accordion-trigger');
|
|
79
|
+
accordionTrigger.innerHTML = '<span><span class="mds-accordion-trigger__label">label</span></span>';
|
|
80
|
+
const accordionContent = document.createElement('div');
|
|
81
|
+
accordionContent.classList.add('mds-accordion-content');
|
|
78
82
|
beforeEach(() => {});
|
|
79
83
|
it('set accordion button', async () => {
|
|
80
84
|
expect.assertions(1);
|
|
81
|
-
accordion.setAccordion(
|
|
82
|
-
expect(
|
|
85
|
+
accordion.setAccordion(accordionTrigger, accordionContent);
|
|
86
|
+
expect(accordionTrigger.textContent).toContain('label');
|
|
83
87
|
});
|
|
84
88
|
});
|
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
<?xml version="1.0" ?>
|
|
2
2
|
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
|
|
3
|
-
<coverage lines-valid="
|
|
3
|
+
<coverage lines-valid="504" lines-covered="206" line-rate="0.40869999999999995" branches-valid="151" branches-covered="51" branch-rate="0.33770000000000006" timestamp="1604488337500" complexity="0" version="0.1">
|
|
4
4
|
<sources>
|
|
5
5
|
<source>/var/lib/jenkins/jobs/madgex-design-system/branches/master/workspace</source>
|
|
6
6
|
</sources>
|
|
7
7
|
<packages>
|
|
8
|
-
<package name="components.accordion" line-rate="0.
|
|
8
|
+
<package name="components.accordion" line-rate="0.7237" branch-rate="0.6111">
|
|
9
9
|
<classes>
|
|
10
|
-
<class name="accordion.js" filename="src/components/accordion/accordion.js" line-rate="0.
|
|
10
|
+
<class name="accordion.js" filename="src/components/accordion/accordion.js" line-rate="0.7237" branch-rate="0.6111">
|
|
11
11
|
<methods>
|
|
12
12
|
<method name="(anonymous_0)" hits="0" signature="()V">
|
|
13
13
|
<lines>
|
|
14
|
-
<line number="
|
|
14
|
+
<line number="9" hits="0"/>
|
|
15
15
|
</lines>
|
|
16
16
|
</method>
|
|
17
17
|
<method name="(anonymous_1)" hits="0" signature="()V">
|
|
18
18
|
<lines>
|
|
19
|
-
<line number="
|
|
19
|
+
<line number="13" hits="0"/>
|
|
20
20
|
</lines>
|
|
21
21
|
</method>
|
|
22
22
|
<method name="(anonymous_2)" hits="6" signature="()V">
|
|
23
23
|
<lines>
|
|
24
|
-
<line number="
|
|
24
|
+
<line number="24" hits="6"/>
|
|
25
25
|
</lines>
|
|
26
26
|
</method>
|
|
27
27
|
<method name="(anonymous_3)" hits="1" signature="()V">
|
|
28
28
|
<lines>
|
|
29
|
-
<line number="
|
|
29
|
+
<line number="59" hits="1"/>
|
|
30
30
|
</lines>
|
|
31
31
|
</method>
|
|
32
32
|
<method name="(anonymous_4)" hits="0" signature="()V">
|
|
33
33
|
<lines>
|
|
34
|
-
<line number="
|
|
34
|
+
<line number="72" hits="0"/>
|
|
35
35
|
</lines>
|
|
36
36
|
</method>
|
|
37
37
|
<method name="(anonymous_5)" hits="2" signature="()V">
|
|
38
38
|
<lines>
|
|
39
|
-
<line number="
|
|
39
|
+
<line number="77" hits="2"/>
|
|
40
40
|
</lines>
|
|
41
41
|
</method>
|
|
42
42
|
<method name="(anonymous_6)" hits="1" signature="()V">
|
|
43
43
|
<lines>
|
|
44
|
-
<line number="
|
|
44
|
+
<line number="93" hits="1"/>
|
|
45
45
|
</lines>
|
|
46
46
|
</method>
|
|
47
47
|
<method name="(anonymous_7)" hits="0" signature="()V">
|
|
48
48
|
<lines>
|
|
49
|
-
<line number="
|
|
49
|
+
<line number="103" hits="0"/>
|
|
50
50
|
</lines>
|
|
51
51
|
</method>
|
|
52
52
|
</methods>
|
|
@@ -57,70 +57,76 @@
|
|
|
57
57
|
<line number="4" hits="1" branch="false"/>
|
|
58
58
|
<line number="5" hits="1" branch="false"/>
|
|
59
59
|
<line number="6" hits="1" branch="false"/>
|
|
60
|
-
<line number="
|
|
61
|
-
<line number="
|
|
60
|
+
<line number="8" hits="1" branch="false"/>
|
|
61
|
+
<line number="10" hits="0" branch="false"/>
|
|
62
62
|
<line number="11" hits="0" branch="false"/>
|
|
63
|
-
<line number="
|
|
63
|
+
<line number="13" hits="0" branch="false"/>
|
|
64
64
|
<line number="14" hits="0" branch="false"/>
|
|
65
65
|
<line number="15" hits="0" branch="false"/>
|
|
66
66
|
<line number="16" hits="0" branch="true" condition-coverage="0% (0/2)"/>
|
|
67
67
|
<line number="17" hits="0" branch="false"/>
|
|
68
68
|
<line number="19" hits="0" branch="false"/>
|
|
69
|
-
<line number="
|
|
70
|
-
<line number="
|
|
71
|
-
<line number="27" hits="
|
|
69
|
+
<line number="20" hits="0" branch="false"/>
|
|
70
|
+
<line number="25" hits="6" branch="false"/>
|
|
71
|
+
<line number="27" hits="6" branch="true" condition-coverage="100% (2/2)"/>
|
|
72
72
|
<line number="28" hits="5" branch="false"/>
|
|
73
|
-
<line number="
|
|
74
|
-
<line number="
|
|
73
|
+
<line number="29" hits="5" branch="false"/>
|
|
74
|
+
<line number="33" hits="5" branch="true" condition-coverage="100% (4/4)"/>
|
|
75
75
|
<line number="35" hits="2" branch="false"/>
|
|
76
|
-
<line number="
|
|
76
|
+
<line number="36" hits="2" branch="false"/>
|
|
77
77
|
<line number="38" hits="1" branch="false"/>
|
|
78
78
|
<line number="39" hits="1" branch="false"/>
|
|
79
79
|
<line number="40" hits="1" branch="false"/>
|
|
80
|
-
<line number="
|
|
80
|
+
<line number="41" hits="1" branch="false"/>
|
|
81
81
|
<line number="43" hits="1" branch="false"/>
|
|
82
82
|
<line number="44" hits="1" branch="false"/>
|
|
83
83
|
<line number="45" hits="1" branch="false"/>
|
|
84
|
-
<line number="
|
|
85
|
-
<line number="
|
|
86
|
-
<line number="51" hits="
|
|
87
|
-
<line number="
|
|
88
|
-
<line number="
|
|
89
|
-
<line number="
|
|
84
|
+
<line number="46" hits="1" branch="false"/>
|
|
85
|
+
<line number="48" hits="1" branch="false"/>
|
|
86
|
+
<line number="51" hits="4" branch="true" condition-coverage="100% (2/2)"/>
|
|
87
|
+
<line number="52" hits="3" branch="false"/>
|
|
88
|
+
<line number="55" hits="1" branch="false"/>
|
|
89
|
+
<line number="57" hits="1" branch="false"/>
|
|
90
90
|
<line number="60" hits="1" branch="false"/>
|
|
91
91
|
<line number="61" hits="1" branch="false"/>
|
|
92
92
|
<line number="62" hits="1" branch="false"/>
|
|
93
93
|
<line number="63" hits="1" branch="false"/>
|
|
94
94
|
<line number="64" hits="1" branch="false"/>
|
|
95
95
|
<line number="65" hits="1" branch="false"/>
|
|
96
|
-
<line number="66" hits="1" branch="
|
|
97
|
-
<line number="
|
|
98
|
-
<line number="69" hits="
|
|
99
|
-
<line number="70" hits="
|
|
100
|
-
<line number="
|
|
101
|
-
<line number="
|
|
102
|
-
<line number="
|
|
103
|
-
<line number="77" hits="2" branch="false"/>
|
|
96
|
+
<line number="66" hits="1" branch="true" condition-coverage="50% (1/2)"/>
|
|
97
|
+
<line number="67" hits="1" branch="false"/>
|
|
98
|
+
<line number="69" hits="1" branch="false"/>
|
|
99
|
+
<line number="70" hits="1" branch="false"/>
|
|
100
|
+
<line number="72" hits="1" branch="false"/>
|
|
101
|
+
<line number="73" hits="0" branch="false"/>
|
|
102
|
+
<line number="74" hits="0" branch="false"/>
|
|
104
103
|
<line number="78" hits="2" branch="false"/>
|
|
105
104
|
<line number="79" hits="2" branch="false"/>
|
|
106
105
|
<line number="80" hits="2" branch="false"/>
|
|
107
|
-
<line number="
|
|
106
|
+
<line number="82" hits="2" branch="false"/>
|
|
108
107
|
<line number="83" hits="2" branch="false"/>
|
|
109
|
-
<line number="
|
|
110
|
-
<line number="
|
|
111
|
-
<line number="
|
|
112
|
-
<line number="
|
|
113
|
-
<line number="
|
|
114
|
-
<line number="
|
|
115
|
-
<line number="
|
|
116
|
-
<line number="
|
|
117
|
-
<line number="
|
|
118
|
-
<line number="
|
|
119
|
-
<line number="
|
|
120
|
-
<line number="
|
|
108
|
+
<line number="84" hits="2" branch="false"/>
|
|
109
|
+
<line number="85" hits="2" branch="false"/>
|
|
110
|
+
<line number="86" hits="2" branch="false"/>
|
|
111
|
+
<line number="87" hits="2" branch="true" condition-coverage="50% (1/2)"/>
|
|
112
|
+
<line number="88" hits="2" branch="false"/>
|
|
113
|
+
<line number="91" hits="2" branch="false"/>
|
|
114
|
+
<line number="94" hits="1" branch="false"/>
|
|
115
|
+
<line number="96" hits="1" branch="true" condition-coverage="50% (1/2)"/>
|
|
116
|
+
<line number="97" hits="1" branch="false"/>
|
|
117
|
+
<line number="98" hits="1" branch="false"/>
|
|
118
|
+
<line number="99" hits="1" branch="false"/>
|
|
119
|
+
<line number="101" hits="1" branch="false"/>
|
|
121
120
|
<line number="104" hits="0" branch="false"/>
|
|
122
121
|
<line number="105" hits="0" branch="false"/>
|
|
123
|
-
<line number="107" hits="0" branch="
|
|
122
|
+
<line number="107" hits="0" branch="true" condition-coverage="0% (0/2)"/>
|
|
123
|
+
<line number="108" hits="0" branch="false"/>
|
|
124
|
+
<line number="109" hits="0" branch="false"/>
|
|
125
|
+
<line number="110" hits="0" branch="false"/>
|
|
126
|
+
<line number="112" hits="0" branch="false"/>
|
|
127
|
+
<line number="113" hits="0" branch="false"/>
|
|
128
|
+
<line number="114" hits="0" branch="false"/>
|
|
129
|
+
<line number="116" hits="0" branch="false"/>
|
|
124
130
|
</lines>
|
|
125
131
|
</class>
|
|
126
132
|
</classes>
|
|
@@ -483,126 +489,6 @@
|
|
|
483
489
|
</class>
|
|
484
490
|
</classes>
|
|
485
491
|
</package>
|
|
486
|
-
<package name="components.inputs.multi-select" line-rate="0" branch-rate="0">
|
|
487
|
-
<classes>
|
|
488
|
-
<class name="multi-select.js" filename="src/components/inputs/multi-select/multi-select.js" line-rate="0" branch-rate="0">
|
|
489
|
-
<methods>
|
|
490
|
-
<method name="constructOptionsList" hits="0" signature="()V">
|
|
491
|
-
<lines>
|
|
492
|
-
<line number="6" hits="0"/>
|
|
493
|
-
</lines>
|
|
494
|
-
</method>
|
|
495
|
-
<method name="(anonymous_1)" hits="0" signature="()V">
|
|
496
|
-
<lines>
|
|
497
|
-
<line number="8" hits="0"/>
|
|
498
|
-
</lines>
|
|
499
|
-
</method>
|
|
500
|
-
<method name="(anonymous_2)" hits="0" signature="()V">
|
|
501
|
-
<lines>
|
|
502
|
-
<line number="28" hits="0"/>
|
|
503
|
-
</lines>
|
|
504
|
-
</method>
|
|
505
|
-
</methods>
|
|
506
|
-
<lines>
|
|
507
|
-
<line number="3" hits="0" branch="false"/>
|
|
508
|
-
<line number="4" hits="0" branch="false"/>
|
|
509
|
-
<line number="7" hits="0" branch="false"/>
|
|
510
|
-
<line number="8" hits="0" branch="false"/>
|
|
511
|
-
<line number="9" hits="0" branch="false"/>
|
|
512
|
-
<line number="10" hits="0" branch="false"/>
|
|
513
|
-
<line number="11" hits="0" branch="false"/>
|
|
514
|
-
<line number="12" hits="0" branch="false"/>
|
|
515
|
-
<line number="20" hits="0" branch="false"/>
|
|
516
|
-
<line number="29" hits="0" branch="false"/>
|
|
517
|
-
</lines>
|
|
518
|
-
</class>
|
|
519
|
-
</classes>
|
|
520
|
-
</package>
|
|
521
|
-
<package name="components.inputs.multi-select.vue-components" line-rate="0.6154" branch-rate="0.5">
|
|
522
|
-
<classes>
|
|
523
|
-
<class name="MultiSelect.vue" filename="src/components/inputs/multi-select/vue-components/MultiSelect.vue" line-rate="0.6" branch-rate="1">
|
|
524
|
-
<methods>
|
|
525
|
-
<method name="_default" hits="0" signature="()V">
|
|
526
|
-
<lines>
|
|
527
|
-
<line number="26" hits="0"/>
|
|
528
|
-
</lines>
|
|
529
|
-
</method>
|
|
530
|
-
<method name="provide" hits="4" signature="()V">
|
|
531
|
-
<lines>
|
|
532
|
-
<line number="33" hits="4"/>
|
|
533
|
-
</lines>
|
|
534
|
-
</method>
|
|
535
|
-
<method name="data" hits="4" signature="()V">
|
|
536
|
-
<lines>
|
|
537
|
-
<line number="38" hits="4"/>
|
|
538
|
-
</lines>
|
|
539
|
-
</method>
|
|
540
|
-
<method name="options" hits="0" signature="()V">
|
|
541
|
-
<lines>
|
|
542
|
-
<line number="45" hits="0"/>
|
|
543
|
-
</lines>
|
|
544
|
-
</method>
|
|
545
|
-
</methods>
|
|
546
|
-
<lines>
|
|
547
|
-
<line number="8" hits="1" branch="false"/>
|
|
548
|
-
<line number="26" hits="0" branch="false"/>
|
|
549
|
-
<line number="34" hits="4" branch="false"/>
|
|
550
|
-
<line number="39" hits="4" branch="false"/>
|
|
551
|
-
<line number="46" hits="0" branch="false"/>
|
|
552
|
-
</lines>
|
|
553
|
-
</class>
|
|
554
|
-
<class name="MultiSelectCheckbox.vue" filename="src/components/inputs/multi-select/vue-components/MultiSelectCheckbox.vue" line-rate="0.6667000000000001" branch-rate="0.5">
|
|
555
|
-
<methods>
|
|
556
|
-
<method name="data" hits="20" signature="()V">
|
|
557
|
-
<lines>
|
|
558
|
-
<line number="64" hits="20"/>
|
|
559
|
-
</lines>
|
|
560
|
-
</method>
|
|
561
|
-
<method name="get" hits="20" signature="()V">
|
|
562
|
-
<lines>
|
|
563
|
-
<line number="72" hits="20"/>
|
|
564
|
-
</lines>
|
|
565
|
-
</method>
|
|
566
|
-
<method name="set" hits="0" signature="()V">
|
|
567
|
-
<lines>
|
|
568
|
-
<line number="76" hits="0"/>
|
|
569
|
-
</lines>
|
|
570
|
-
</method>
|
|
571
|
-
<method name="toggleExpansion" hits="1" signature="()V">
|
|
572
|
-
<lines>
|
|
573
|
-
<line number="82" hits="1"/>
|
|
574
|
-
</lines>
|
|
575
|
-
</method>
|
|
576
|
-
<method name="toggleChecked" hits="0" signature="()V">
|
|
577
|
-
<lines>
|
|
578
|
-
<line number="85" hits="0"/>
|
|
579
|
-
</lines>
|
|
580
|
-
</method>
|
|
581
|
-
</methods>
|
|
582
|
-
<lines>
|
|
583
|
-
<line number="65" hits="20" branch="false"/>
|
|
584
|
-
<line number="73" hits="20" branch="true" condition-coverage="50% (1/2)"/>
|
|
585
|
-
<line number="74" hits="20" branch="false"/>
|
|
586
|
-
<line number="77" hits="0" branch="false"/>
|
|
587
|
-
<line number="83" hits="1" branch="false"/>
|
|
588
|
-
<line number="86" hits="0" branch="false"/>
|
|
589
|
-
</lines>
|
|
590
|
-
</class>
|
|
591
|
-
<class name="MultiSelectCheckboxGroup.vue" filename="src/components/inputs/multi-select/vue-components/MultiSelectCheckboxGroup.vue" line-rate="0.5" branch-rate="1">
|
|
592
|
-
<methods>
|
|
593
|
-
<method name="_default" hits="0" signature="()V">
|
|
594
|
-
<lines>
|
|
595
|
-
<line number="49" hits="0"/>
|
|
596
|
-
</lines>
|
|
597
|
-
</method>
|
|
598
|
-
</methods>
|
|
599
|
-
<lines>
|
|
600
|
-
<line number="35" hits="1" branch="false"/>
|
|
601
|
-
<line number="49" hits="0" branch="false"/>
|
|
602
|
-
</lines>
|
|
603
|
-
</class>
|
|
604
|
-
</classes>
|
|
605
|
-
</package>
|
|
606
492
|
<package name="components.inputs.textarea" line-rate="0" branch-rate="0">
|
|
607
493
|
<classes>
|
|
608
494
|
<class name="character-count.js" filename="src/components/inputs/textarea/character-count.js" line-rate="0" branch-rate="0">
|
|
@@ -1169,17 +1055,17 @@
|
|
|
1169
1055
|
<methods>
|
|
1170
1056
|
<method name="(anonymous_0)" hits="0" signature="()V">
|
|
1171
1057
|
<lines>
|
|
1172
|
-
<line number="
|
|
1058
|
+
<line number="12" hits="0"/>
|
|
1173
1059
|
</lines>
|
|
1174
1060
|
</method>
|
|
1175
1061
|
</methods>
|
|
1176
1062
|
<lines>
|
|
1063
|
+
<line number="6" hits="0" branch="false"/>
|
|
1177
1064
|
<line number="7" hits="0" branch="false"/>
|
|
1178
|
-
<line number="
|
|
1065
|
+
<line number="9" hits="0" branch="false"/>
|
|
1179
1066
|
<line number="10" hits="0" branch="false"/>
|
|
1180
|
-
<line number="
|
|
1067
|
+
<line number="12" hits="0" branch="false"/>
|
|
1181
1068
|
<line number="13" hits="0" branch="false"/>
|
|
1182
|
-
<line number="14" hits="0" branch="false"/>
|
|
1183
1069
|
</lines>
|
|
1184
1070
|
</class>
|
|
1185
1071
|
<class name="index.js" filename="src/js/index.js" line-rate="0" branch-rate="1">
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
<div class='clearfix'>
|
|
23
23
|
|
|
24
24
|
<div class='fl pad1y space-right2'>
|
|
25
|
-
<span class="strong">
|
|
25
|
+
<span class="strong">72.37% </span>
|
|
26
26
|
<span class="quiet">Statements</span>
|
|
27
|
-
<span class='fraction'>
|
|
27
|
+
<span class='fraction'>55/76</span>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
<div class='fl pad1y space-right2'>
|
|
32
|
-
<span class="strong">
|
|
32
|
+
<span class="strong">61.11% </span>
|
|
33
33
|
<span class="quiet">Branches</span>
|
|
34
|
-
<span class='fraction'>
|
|
34
|
+
<span class='fraction'>11/18</span>
|
|
35
35
|
</div>
|
|
36
36
|
|
|
37
37
|
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
<div class='fl pad1y space-right2'>
|
|
46
|
-
<span class="strong">
|
|
46
|
+
<span class="strong">72.37% </span>
|
|
47
47
|
<span class="quiet">Lines</span>
|
|
48
|
-
<span class='fraction'>
|
|
48
|
+
<span class='fraction'>55/76</span>
|
|
49
49
|
</div>
|
|
50
50
|
|
|
51
51
|
|
|
@@ -167,8 +167,16 @@
|
|
|
167
167
|
<a name='L109'></a><a href='#L109'>109</a>
|
|
168
168
|
<a name='L110'></a><a href='#L110'>110</a>
|
|
169
169
|
<a name='L111'></a><a href='#L111'>111</a>
|
|
170
|
-
<a name='L112'></a><a href='#L112'>112</a
|
|
171
|
-
<
|
|
170
|
+
<a name='L112'></a><a href='#L112'>112</a>
|
|
171
|
+
<a name='L113'></a><a href='#L113'>113</a>
|
|
172
|
+
<a name='L114'></a><a href='#L114'>114</a>
|
|
173
|
+
<a name='L115'></a><a href='#L115'>115</a>
|
|
174
|
+
<a name='L116'></a><a href='#L116'>116</a>
|
|
175
|
+
<a name='L117'></a><a href='#L117'>117</a>
|
|
176
|
+
<a name='L118'></a><a href='#L118'>118</a>
|
|
177
|
+
<a name='L119'></a><a href='#L119'>119</a>
|
|
178
|
+
<a name='L120'></a><a href='#L120'>120</a>
|
|
179
|
+
<a name='L121'></a><a href='#L121'>121</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
172
180
|
<span class="cline-any cline-yes">1x</span>
|
|
173
181
|
<span class="cline-any cline-yes">1x</span>
|
|
174
182
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -184,8 +192,10 @@
|
|
|
184
192
|
<span class="cline-any cline-no"> </span>
|
|
185
193
|
<span class="cline-any cline-no"> </span>
|
|
186
194
|
<span class="cline-any cline-no"> </span>
|
|
195
|
+
<span class="cline-any cline-no"> </span>
|
|
187
196
|
<span class="cline-any cline-neutral"> </span>
|
|
188
197
|
<span class="cline-any cline-no"> </span>
|
|
198
|
+
<span class="cline-any cline-no"> </span>
|
|
189
199
|
<span class="cline-any cline-neutral"> </span>
|
|
190
200
|
<span class="cline-any cline-neutral"> </span>
|
|
191
201
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -235,6 +245,9 @@
|
|
|
235
245
|
<span class="cline-any cline-yes">1x</span>
|
|
236
246
|
<span class="cline-any cline-neutral"> </span>
|
|
237
247
|
<span class="cline-any cline-yes">1x</span>
|
|
248
|
+
<span class="cline-any cline-yes">1x</span>
|
|
249
|
+
<span class="cline-any cline-neutral"> </span>
|
|
250
|
+
<span class="cline-any cline-yes">1x</span>
|
|
238
251
|
<span class="cline-any cline-no"> </span>
|
|
239
252
|
<span class="cline-any cline-no"> </span>
|
|
240
253
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -243,11 +256,15 @@
|
|
|
243
256
|
<span class="cline-any cline-yes">2x</span>
|
|
244
257
|
<span class="cline-any cline-yes">2x</span>
|
|
245
258
|
<span class="cline-any cline-yes">2x</span>
|
|
259
|
+
<span class="cline-any cline-neutral"> </span>
|
|
260
|
+
<span class="cline-any cline-yes">2x</span>
|
|
246
261
|
<span class="cline-any cline-yes">2x</span>
|
|
247
262
|
<span class="cline-any cline-yes">2x</span>
|
|
248
263
|
<span class="cline-any cline-yes">2x</span>
|
|
249
264
|
<span class="cline-any cline-yes">2x</span>
|
|
250
265
|
<span class="cline-any cline-yes">2x</span>
|
|
266
|
+
<span class="cline-any cline-yes">2x</span>
|
|
267
|
+
<span class="cline-any cline-neutral"> </span>
|
|
251
268
|
<span class="cline-any cline-neutral"> </span>
|
|
252
269
|
<span class="cline-any cline-yes">2x</span>
|
|
253
270
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -264,39 +281,41 @@
|
|
|
264
281
|
<span class="cline-any cline-neutral"> </span>
|
|
265
282
|
<span class="cline-any cline-no"> </span>
|
|
266
283
|
<span class="cline-any cline-no"> </span>
|
|
267
|
-
<span class="cline-any cline-no"> </span>
|
|
268
284
|
<span class="cline-any cline-neutral"> </span>
|
|
269
285
|
<span class="cline-any cline-no"> </span>
|
|
270
286
|
<span class="cline-any cline-no"> </span>
|
|
271
287
|
<span class="cline-any cline-no"> </span>
|
|
288
|
+
<span class="cline-any cline-no"> </span>
|
|
272
289
|
<span class="cline-any cline-neutral"> </span>
|
|
273
290
|
<span class="cline-any cline-no"> </span>
|
|
274
291
|
<span class="cline-any cline-no"> </span>
|
|
292
|
+
<span class="cline-any cline-no"> </span>
|
|
275
293
|
<span class="cline-any cline-neutral"> </span>
|
|
276
294
|
<span class="cline-any cline-no"> </span>
|
|
277
295
|
<span class="cline-any cline-neutral"> </span>
|
|
278
296
|
<span class="cline-any cline-neutral"> </span>
|
|
279
297
|
<span class="cline-any cline-neutral"> </span>
|
|
280
298
|
<span class="cline-any cline-neutral"> </span>
|
|
281
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const
|
|
282
|
-
const
|
|
283
|
-
const
|
|
284
|
-
const
|
|
285
|
-
const
|
|
299
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const accordionTriggerClass = 'mds-accordion-trigger';
|
|
300
|
+
const accordionTriggerButtonClass = 'mds-accordion-trigger__button';
|
|
301
|
+
const accordionTriggerLabelClass = 'mds-accordion-trigger__label';
|
|
302
|
+
const accordionTriggerExpandedClass = 'mds-accordion-trigger--expanded';
|
|
303
|
+
const accordionContentExpandedClass = 'mds-accordion-content--expanded';
|
|
286
304
|
const accordionLabelInverseData = 'data-labelinverse';
|
|
287
|
-
const accordionTriggerLabelClass = 'mds-accordion__trigger-label';
|
|
288
305
|
|
|
289
306
|
const accordion = {
|
|
290
307
|
init: <span class="fstat-no" title="function not covered" >()</span> => {
|
|
291
|
-
const
|
|
308
|
+
const accordionTriggerList = <span class="cstat-no" title="statement not covered" >Array.from(document.querySelectorAll(`.${accordionTriggerClass}`));</span>
|
|
292
309
|
const screenWidth = <span class="cstat-no" title="statement not covered" >window.innerWidth;</span>
|
|
293
310
|
|
|
294
|
-
<span class="cstat-no" title="statement not covered" >
|
|
295
|
-
const
|
|
311
|
+
<span class="cstat-no" title="statement not covered" > accordionTriggerList.forEach(<span class="fstat-no" title="function not covered" >(t</span>rigger) => {</span>
|
|
312
|
+
const accordionContent = <span class="cstat-no" title="statement not covered" >trigger.nextElementSibling;</span>
|
|
313
|
+
const isAccordion = <span class="cstat-no" title="statement not covered" >accordion.checkBreakpoint(trigger, screenWidth);</span>
|
|
296
314
|
<span class="cstat-no" title="statement not covered" > if (isAccordion) {</span>
|
|
297
|
-
<span class="cstat-no" title="statement not covered" > accordion.setAccordion(
|
|
315
|
+
<span class="cstat-no" title="statement not covered" > accordion.setAccordion(trigger, accordionContent);</span>
|
|
298
316
|
} else {
|
|
299
|
-
<span class="cstat-no" title="statement not covered" >
|
|
317
|
+
<span class="cstat-no" title="statement not covered" > trigger.classList.add(accordionTriggerExpandedClass);</span>
|
|
318
|
+
<span class="cstat-no" title="statement not covered" > accordionContent.classList.add(accordionContentExpandedClass);</span>
|
|
300
319
|
}
|
|
301
320
|
});
|
|
302
321
|
},
|
|
@@ -335,30 +354,37 @@ const accordion = {
|
|
|
335
354
|
}
|
|
336
355
|
return true;
|
|
337
356
|
},
|
|
338
|
-
setAccordion: (
|
|
339
|
-
const
|
|
340
|
-
const
|
|
341
|
-
const
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
357
|
+
setAccordion: (accordionTrigger, accordionContent) => {
|
|
358
|
+
const triggerContainer = accordionTrigger;
|
|
359
|
+
const accordionTriggerId = triggerContainer.id;
|
|
360
|
+
const label = triggerContainer.querySelector('.mds-accordion-trigger__label');
|
|
361
|
+
const labelText = label.innerText;
|
|
362
|
+
const triggerButton = accordion.createButton(accordionTriggerId, triggerContainer);
|
|
363
|
+
triggerContainer.classList.remove('mds-display-none');
|
|
364
|
+
<span class="missing-if-branch" title="else path not taken" >E</span>if (accordionContent.nodeName.toLowerCase() !== 'fieldset') {
|
|
365
|
+
accordionContent.setAttribute('aria-label', labelText);
|
|
366
|
+
}
|
|
367
|
+
triggerContainer.innerHTML = '';
|
|
368
|
+
triggerContainer.appendChild(triggerButton);
|
|
347
369
|
|
|
348
|
-
|
|
370
|
+
triggerButton.addEventListener('click', <span class="fstat-no" title="function not covered" >(e</span>lem) => {
|
|
349
371
|
<span class="cstat-no" title="statement not covered" > elem.preventDefault();</span>
|
|
350
|
-
<span class="cstat-no" title="statement not covered" > accordion.toggleExpand(
|
|
372
|
+
<span class="cstat-no" title="statement not covered" > accordion.toggleExpand(triggerButton, triggerContainer, accordionContent);</span>
|
|
351
373
|
});
|
|
352
374
|
},
|
|
353
|
-
createButton: (
|
|
375
|
+
createButton: (accordionTriggerId, element) => {
|
|
354
376
|
const accordionTriggerSpan = element.querySelector(`.${accordionTriggerClass} > span`);
|
|
355
377
|
const accordionTriggerButton = document.createElement('button');
|
|
356
378
|
accordionTriggerButton.className = accordionTriggerButtonClass;
|
|
357
|
-
|
|
358
|
-
accordionTriggerButton.
|
|
379
|
+
// can't use multiple arguments in classList.add() due to IE
|
|
380
|
+
accordionTriggerButton.classList.add('mds-button');
|
|
381
|
+
accordionTriggerButton.classList.add('mds-button--plain');
|
|
382
|
+
accordionTriggerButton.classList.add('mds-padding-b0');
|
|
383
|
+
accordionTriggerButton.setAttribute('id', accordionTriggerId);
|
|
359
384
|
accordionTriggerButton.setAttribute('aria-expanded', false);
|
|
360
|
-
|
|
361
|
-
|
|
385
|
+
<span class="missing-if-branch" title="else path not taken" >E</span>if (accordionTriggerSpan) {
|
|
386
|
+
accordionTriggerButton.appendChild(accordionTriggerSpan);
|
|
387
|
+
}
|
|
362
388
|
|
|
363
389
|
return accordionTriggerButton;
|
|
364
390
|
},
|
|
@@ -372,17 +398,18 @@ const accordion = {
|
|
|
372
398
|
}
|
|
373
399
|
return element;
|
|
374
400
|
},
|
|
375
|
-
toggleExpand: <span class="fstat-no" title="function not covered" >(
|
|
376
|
-
const accordionTriggerButton = <span class="cstat-no" title="statement not covered" >
|
|
377
|
-
const accordionTriggerButtonLabel = <span class="cstat-no" title="statement not covered" >
|
|
378
|
-
const accordionParent = <span class="cstat-no" title="statement not covered" >accordionTriggerButton.closest(`.${accordionClass}`);</span>
|
|
401
|
+
toggleExpand: <span class="fstat-no" title="function not covered" >(t</span>riggerButton, triggerContainer, accordionContent) => {
|
|
402
|
+
const accordionTriggerButton = <span class="cstat-no" title="statement not covered" >triggerButton;</span>
|
|
403
|
+
const accordionTriggerButtonLabel = <span class="cstat-no" title="statement not covered" >triggerButton.querySelector(`.${accordionTriggerLabelClass}`);</span>
|
|
379
404
|
|
|
380
405
|
<span class="cstat-no" title="statement not covered" > if (accordionTriggerButton.getAttribute('aria-expanded') === 'false') {</span>
|
|
381
406
|
<span class="cstat-no" title="statement not covered" > accordionTriggerButton.setAttribute('aria-expanded', true);</span>
|
|
382
|
-
<span class="cstat-no" title="statement not covered" >
|
|
407
|
+
<span class="cstat-no" title="statement not covered" > triggerContainer.classList.add(accordionTriggerExpandedClass);</span>
|
|
408
|
+
<span class="cstat-no" title="statement not covered" > accordionContent.classList.add(accordionContentExpandedClass);</span>
|
|
383
409
|
} else {
|
|
384
410
|
<span class="cstat-no" title="statement not covered" > accordionTriggerButton.setAttribute('aria-expanded', false);</span>
|
|
385
|
-
<span class="cstat-no" title="statement not covered" >
|
|
411
|
+
<span class="cstat-no" title="statement not covered" > triggerContainer.classList.remove(accordionTriggerExpandedClass);</span>
|
|
412
|
+
<span class="cstat-no" title="statement not covered" > accordionContent.classList.remove(accordionContentExpandedClass);</span>
|
|
386
413
|
}
|
|
387
414
|
<span class="cstat-no" title="statement not covered" > accordion.switchLabel(accordionTriggerButtonLabel);</span>
|
|
388
415
|
},
|
|
@@ -396,7 +423,7 @@ export default accordion;
|
|
|
396
423
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
397
424
|
Code coverage generated by
|
|
398
425
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
399
|
-
at Wed
|
|
426
|
+
at Wed Nov 04 2020 11:12:17 GMT+0000 (Greenwich Mean Time)
|
|
400
427
|
</div>
|
|
401
428
|
</div>
|
|
402
429
|
<script src="../../prettify.js"></script>
|