@zohodesk/dot 1.9.4 → 1.9.5
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/README.md +5 -0
- package/es/list/Subject/Subject.js +3 -3
- package/es/list/Subject/__tests__/Subject.spec.js +9 -0
- package/es/list/Subject/__tests__/__snapshots__/Subject.spec.js.snap +90 -0
- package/es/list/listCommon.module.css +2 -2
- package/lib/list/Subject/Subject.js +3 -3
- package/lib/list/Subject/__tests__/Subject.spec.js +9 -0
- package/lib/list/Subject/__tests__/__snapshots__/Subject.spec.js.snap +90 -0
- package/lib/list/listCommon.module.css +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.9.5
|
|
6
|
+
|
|
7
|
+
- **listCommon.module.css** A css active ignore comment has been added to fix the hover and click pseudo-class collision issue on iOS tablets.
|
|
8
|
+
- **list/Subject** dataId and testId have been moved back to the parent element as they were earlier.
|
|
9
|
+
|
|
5
10
|
# 1.9.4
|
|
6
11
|
|
|
7
12
|
- **list/Subject** testId added in missed place (issue fix)
|
|
@@ -47,13 +47,13 @@ export default class Subject extends Component {
|
|
|
47
47
|
href: href,
|
|
48
48
|
urlData: urlData,
|
|
49
49
|
onClick: onClick,
|
|
50
|
-
target: target
|
|
50
|
+
target: target,
|
|
51
|
+
customId: dataId,
|
|
52
|
+
testId: dataId
|
|
51
53
|
}, LinkProps), children ? children : /*#__PURE__*/React.createElement(Typography, {
|
|
52
54
|
$tagAttributes_text: linkTagAttributes,
|
|
53
55
|
$i18n_dataTitle: text,
|
|
54
56
|
$ui_className: `${style.subject} ${whiteSpaceClassMapping[whiteSpace]} ${className} ${style.cursorPointer}`,
|
|
55
|
-
customId: dataId,
|
|
56
|
-
testId: dataId,
|
|
57
57
|
$flag_dotted: isDotted,
|
|
58
58
|
$ui_weight: fontWeight,
|
|
59
59
|
$ui_highlightConfig: isHighlighted ? highlightData : DUMMY_OBJECT
|
|
@@ -17,4 +17,13 @@ describe('Subject', () => {
|
|
|
17
17
|
}));
|
|
18
18
|
expect(asFragment()).toMatchSnapshot();
|
|
19
19
|
});
|
|
20
|
+
test.each(whiteSpace)('rendering the whiteSpace of -%s', whiteSpace => {
|
|
21
|
+
const {
|
|
22
|
+
asFragment
|
|
23
|
+
} = render( /*#__PURE__*/React.createElement(Subject, {
|
|
24
|
+
whiteSpace: whiteSpace,
|
|
25
|
+
isLink: true
|
|
26
|
+
}));
|
|
27
|
+
expect(asFragment()).toMatchSnapshot();
|
|
28
|
+
});
|
|
20
29
|
});
|
|
@@ -18,6 +18,21 @@ exports[`Subject rendering the whiteSpace of -break-spaces 1`] = `
|
|
|
18
18
|
</DocumentFragment>
|
|
19
19
|
`;
|
|
20
20
|
|
|
21
|
+
exports[`Subject rendering the whiteSpace of -break-spaces 2`] = `
|
|
22
|
+
<DocumentFragment>
|
|
23
|
+
<a
|
|
24
|
+
class="container "
|
|
25
|
+
href="javascript:void(0);"
|
|
26
|
+
rel="noopener noreferrer"
|
|
27
|
+
>
|
|
28
|
+
<div
|
|
29
|
+
class="dotted font_regular subject whiteSpace_breakSpaces cursorPointer"
|
|
30
|
+
data-title-wrap="break-spaces"
|
|
31
|
+
/>
|
|
32
|
+
</a>
|
|
33
|
+
</DocumentFragment>
|
|
34
|
+
`;
|
|
35
|
+
|
|
21
36
|
exports[`Subject rendering the whiteSpace of -normal 1`] = `
|
|
22
37
|
<DocumentFragment>
|
|
23
38
|
<div
|
|
@@ -27,6 +42,21 @@ exports[`Subject rendering the whiteSpace of -normal 1`] = `
|
|
|
27
42
|
</DocumentFragment>
|
|
28
43
|
`;
|
|
29
44
|
|
|
45
|
+
exports[`Subject rendering the whiteSpace of -normal 2`] = `
|
|
46
|
+
<DocumentFragment>
|
|
47
|
+
<a
|
|
48
|
+
class="container "
|
|
49
|
+
href="javascript:void(0);"
|
|
50
|
+
rel="noopener noreferrer"
|
|
51
|
+
>
|
|
52
|
+
<div
|
|
53
|
+
class="dotted font_regular subject whiteSpace_normal cursorPointer"
|
|
54
|
+
data-title-wrap="normal"
|
|
55
|
+
/>
|
|
56
|
+
</a>
|
|
57
|
+
</DocumentFragment>
|
|
58
|
+
`;
|
|
59
|
+
|
|
30
60
|
exports[`Subject rendering the whiteSpace of -nowrap 1`] = `
|
|
31
61
|
<DocumentFragment>
|
|
32
62
|
<div
|
|
@@ -36,6 +66,21 @@ exports[`Subject rendering the whiteSpace of -nowrap 1`] = `
|
|
|
36
66
|
</DocumentFragment>
|
|
37
67
|
`;
|
|
38
68
|
|
|
69
|
+
exports[`Subject rendering the whiteSpace of -nowrap 2`] = `
|
|
70
|
+
<DocumentFragment>
|
|
71
|
+
<a
|
|
72
|
+
class="container "
|
|
73
|
+
href="javascript:void(0);"
|
|
74
|
+
rel="noopener noreferrer"
|
|
75
|
+
>
|
|
76
|
+
<div
|
|
77
|
+
class="dotted font_regular subject whiteSpace_nowrap cursorPointer"
|
|
78
|
+
data-title-wrap="nowrap"
|
|
79
|
+
/>
|
|
80
|
+
</a>
|
|
81
|
+
</DocumentFragment>
|
|
82
|
+
`;
|
|
83
|
+
|
|
39
84
|
exports[`Subject rendering the whiteSpace of -pre 1`] = `
|
|
40
85
|
<DocumentFragment>
|
|
41
86
|
<div
|
|
@@ -45,6 +90,21 @@ exports[`Subject rendering the whiteSpace of -pre 1`] = `
|
|
|
45
90
|
</DocumentFragment>
|
|
46
91
|
`;
|
|
47
92
|
|
|
93
|
+
exports[`Subject rendering the whiteSpace of -pre 2`] = `
|
|
94
|
+
<DocumentFragment>
|
|
95
|
+
<a
|
|
96
|
+
class="container "
|
|
97
|
+
href="javascript:void(0);"
|
|
98
|
+
rel="noopener noreferrer"
|
|
99
|
+
>
|
|
100
|
+
<div
|
|
101
|
+
class="dotted font_regular subject whiteSpace_pre cursorPointer"
|
|
102
|
+
data-title-wrap="pre"
|
|
103
|
+
/>
|
|
104
|
+
</a>
|
|
105
|
+
</DocumentFragment>
|
|
106
|
+
`;
|
|
107
|
+
|
|
48
108
|
exports[`Subject rendering the whiteSpace of -pre-line 1`] = `
|
|
49
109
|
<DocumentFragment>
|
|
50
110
|
<div
|
|
@@ -54,6 +114,21 @@ exports[`Subject rendering the whiteSpace of -pre-line 1`] = `
|
|
|
54
114
|
</DocumentFragment>
|
|
55
115
|
`;
|
|
56
116
|
|
|
117
|
+
exports[`Subject rendering the whiteSpace of -pre-line 2`] = `
|
|
118
|
+
<DocumentFragment>
|
|
119
|
+
<a
|
|
120
|
+
class="container "
|
|
121
|
+
href="javascript:void(0);"
|
|
122
|
+
rel="noopener noreferrer"
|
|
123
|
+
>
|
|
124
|
+
<div
|
|
125
|
+
class="dotted font_regular subject whiteSpace_preLine cursorPointer"
|
|
126
|
+
data-title-wrap="pre-line"
|
|
127
|
+
/>
|
|
128
|
+
</a>
|
|
129
|
+
</DocumentFragment>
|
|
130
|
+
`;
|
|
131
|
+
|
|
57
132
|
exports[`Subject rendering the whiteSpace of -pre-wrap 1`] = `
|
|
58
133
|
<DocumentFragment>
|
|
59
134
|
<div
|
|
@@ -62,3 +137,18 @@ exports[`Subject rendering the whiteSpace of -pre-wrap 1`] = `
|
|
|
62
137
|
/>
|
|
63
138
|
</DocumentFragment>
|
|
64
139
|
`;
|
|
140
|
+
|
|
141
|
+
exports[`Subject rendering the whiteSpace of -pre-wrap 2`] = `
|
|
142
|
+
<DocumentFragment>
|
|
143
|
+
<a
|
|
144
|
+
class="container "
|
|
145
|
+
href="javascript:void(0);"
|
|
146
|
+
rel="noopener noreferrer"
|
|
147
|
+
>
|
|
148
|
+
<div
|
|
149
|
+
class="dotted font_regular subject whiteSpace_preWrap cursorPointer"
|
|
150
|
+
data-title-wrap="pre-wrap"
|
|
151
|
+
/>
|
|
152
|
+
</a>
|
|
153
|
+
</DocumentFragment>
|
|
154
|
+
`;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
.classic .floatingIconContainer {
|
|
42
42
|
display: none;
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
/*Active:ignore*/
|
|
45
45
|
.compact .floatingIconContainer,
|
|
46
46
|
.superCompact .floatingIconContainer,
|
|
47
47
|
.listContainer:hover .classic .floatingIconContainer,
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
position: relative;
|
|
70
70
|
transition: var(--zd_transition3) all ease;
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
/*Active:ignore*/
|
|
73
73
|
.listContainer:hover .compact .floatingIconContainer,
|
|
74
74
|
.listContainer:hover .superCompact .floatingIconContainer,
|
|
75
75
|
.hoveredStyle .compact .floatingIconContainer,
|
|
@@ -105,13 +105,13 @@ var Subject = /*#__PURE__*/function (_Component) {
|
|
|
105
105
|
href: href,
|
|
106
106
|
urlData: urlData,
|
|
107
107
|
onClick: onClick,
|
|
108
|
-
target: target
|
|
108
|
+
target: target,
|
|
109
|
+
customId: dataId,
|
|
110
|
+
testId: dataId
|
|
109
111
|
}, LinkProps), children ? children : /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
110
112
|
$tagAttributes_text: linkTagAttributes,
|
|
111
113
|
$i18n_dataTitle: text,
|
|
112
114
|
$ui_className: "".concat(_SubjectModule["default"].subject, " ").concat(_cssUtils.whiteSpaceClassMapping[whiteSpace], " ").concat(className, " ").concat(_SubjectModule["default"].cursorPointer),
|
|
113
|
-
customId: dataId,
|
|
114
|
-
testId: dataId,
|
|
115
115
|
$flag_dotted: isDotted,
|
|
116
116
|
$ui_weight: fontWeight,
|
|
117
117
|
$ui_highlightConfig: isHighlighted ? highlightData : _Common.DUMMY_OBJECT
|
|
@@ -24,4 +24,13 @@ describe('Subject', function () {
|
|
|
24
24
|
|
|
25
25
|
expect(asFragment()).toMatchSnapshot();
|
|
26
26
|
});
|
|
27
|
+
test.each(whiteSpace)('rendering the whiteSpace of -%s', function (whiteSpace) {
|
|
28
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
|
|
29
|
+
whiteSpace: whiteSpace,
|
|
30
|
+
isLink: true
|
|
31
|
+
})),
|
|
32
|
+
asFragment = _render3.asFragment;
|
|
33
|
+
|
|
34
|
+
expect(asFragment()).toMatchSnapshot();
|
|
35
|
+
});
|
|
27
36
|
});
|
|
@@ -18,6 +18,21 @@ exports[`Subject rendering the whiteSpace of -break-spaces 1`] = `
|
|
|
18
18
|
</DocumentFragment>
|
|
19
19
|
`;
|
|
20
20
|
|
|
21
|
+
exports[`Subject rendering the whiteSpace of -break-spaces 2`] = `
|
|
22
|
+
<DocumentFragment>
|
|
23
|
+
<a
|
|
24
|
+
class="container "
|
|
25
|
+
href="javascript:void(0);"
|
|
26
|
+
rel="noopener noreferrer"
|
|
27
|
+
>
|
|
28
|
+
<div
|
|
29
|
+
class="dotted font_regular subject whiteSpace_breakSpaces cursorPointer"
|
|
30
|
+
data-title-wrap="break-spaces"
|
|
31
|
+
/>
|
|
32
|
+
</a>
|
|
33
|
+
</DocumentFragment>
|
|
34
|
+
`;
|
|
35
|
+
|
|
21
36
|
exports[`Subject rendering the whiteSpace of -normal 1`] = `
|
|
22
37
|
<DocumentFragment>
|
|
23
38
|
<div
|
|
@@ -27,6 +42,21 @@ exports[`Subject rendering the whiteSpace of -normal 1`] = `
|
|
|
27
42
|
</DocumentFragment>
|
|
28
43
|
`;
|
|
29
44
|
|
|
45
|
+
exports[`Subject rendering the whiteSpace of -normal 2`] = `
|
|
46
|
+
<DocumentFragment>
|
|
47
|
+
<a
|
|
48
|
+
class="container "
|
|
49
|
+
href="javascript:void(0);"
|
|
50
|
+
rel="noopener noreferrer"
|
|
51
|
+
>
|
|
52
|
+
<div
|
|
53
|
+
class="dotted font_regular subject whiteSpace_normal cursorPointer"
|
|
54
|
+
data-title-wrap="normal"
|
|
55
|
+
/>
|
|
56
|
+
</a>
|
|
57
|
+
</DocumentFragment>
|
|
58
|
+
`;
|
|
59
|
+
|
|
30
60
|
exports[`Subject rendering the whiteSpace of -nowrap 1`] = `
|
|
31
61
|
<DocumentFragment>
|
|
32
62
|
<div
|
|
@@ -36,6 +66,21 @@ exports[`Subject rendering the whiteSpace of -nowrap 1`] = `
|
|
|
36
66
|
</DocumentFragment>
|
|
37
67
|
`;
|
|
38
68
|
|
|
69
|
+
exports[`Subject rendering the whiteSpace of -nowrap 2`] = `
|
|
70
|
+
<DocumentFragment>
|
|
71
|
+
<a
|
|
72
|
+
class="container "
|
|
73
|
+
href="javascript:void(0);"
|
|
74
|
+
rel="noopener noreferrer"
|
|
75
|
+
>
|
|
76
|
+
<div
|
|
77
|
+
class="dotted font_regular subject whiteSpace_nowrap cursorPointer"
|
|
78
|
+
data-title-wrap="nowrap"
|
|
79
|
+
/>
|
|
80
|
+
</a>
|
|
81
|
+
</DocumentFragment>
|
|
82
|
+
`;
|
|
83
|
+
|
|
39
84
|
exports[`Subject rendering the whiteSpace of -pre 1`] = `
|
|
40
85
|
<DocumentFragment>
|
|
41
86
|
<div
|
|
@@ -45,6 +90,21 @@ exports[`Subject rendering the whiteSpace of -pre 1`] = `
|
|
|
45
90
|
</DocumentFragment>
|
|
46
91
|
`;
|
|
47
92
|
|
|
93
|
+
exports[`Subject rendering the whiteSpace of -pre 2`] = `
|
|
94
|
+
<DocumentFragment>
|
|
95
|
+
<a
|
|
96
|
+
class="container "
|
|
97
|
+
href="javascript:void(0);"
|
|
98
|
+
rel="noopener noreferrer"
|
|
99
|
+
>
|
|
100
|
+
<div
|
|
101
|
+
class="dotted font_regular subject whiteSpace_pre cursorPointer"
|
|
102
|
+
data-title-wrap="pre"
|
|
103
|
+
/>
|
|
104
|
+
</a>
|
|
105
|
+
</DocumentFragment>
|
|
106
|
+
`;
|
|
107
|
+
|
|
48
108
|
exports[`Subject rendering the whiteSpace of -pre-line 1`] = `
|
|
49
109
|
<DocumentFragment>
|
|
50
110
|
<div
|
|
@@ -54,6 +114,21 @@ exports[`Subject rendering the whiteSpace of -pre-line 1`] = `
|
|
|
54
114
|
</DocumentFragment>
|
|
55
115
|
`;
|
|
56
116
|
|
|
117
|
+
exports[`Subject rendering the whiteSpace of -pre-line 2`] = `
|
|
118
|
+
<DocumentFragment>
|
|
119
|
+
<a
|
|
120
|
+
class="container "
|
|
121
|
+
href="javascript:void(0);"
|
|
122
|
+
rel="noopener noreferrer"
|
|
123
|
+
>
|
|
124
|
+
<div
|
|
125
|
+
class="dotted font_regular subject whiteSpace_preLine cursorPointer"
|
|
126
|
+
data-title-wrap="pre-line"
|
|
127
|
+
/>
|
|
128
|
+
</a>
|
|
129
|
+
</DocumentFragment>
|
|
130
|
+
`;
|
|
131
|
+
|
|
57
132
|
exports[`Subject rendering the whiteSpace of -pre-wrap 1`] = `
|
|
58
133
|
<DocumentFragment>
|
|
59
134
|
<div
|
|
@@ -62,3 +137,18 @@ exports[`Subject rendering the whiteSpace of -pre-wrap 1`] = `
|
|
|
62
137
|
/>
|
|
63
138
|
</DocumentFragment>
|
|
64
139
|
`;
|
|
140
|
+
|
|
141
|
+
exports[`Subject rendering the whiteSpace of -pre-wrap 2`] = `
|
|
142
|
+
<DocumentFragment>
|
|
143
|
+
<a
|
|
144
|
+
class="container "
|
|
145
|
+
href="javascript:void(0);"
|
|
146
|
+
rel="noopener noreferrer"
|
|
147
|
+
>
|
|
148
|
+
<div
|
|
149
|
+
class="dotted font_regular subject whiteSpace_preWrap cursorPointer"
|
|
150
|
+
data-title-wrap="pre-wrap"
|
|
151
|
+
/>
|
|
152
|
+
</a>
|
|
153
|
+
</DocumentFragment>
|
|
154
|
+
`;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
.classic .floatingIconContainer {
|
|
42
42
|
display: none;
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
/*Active:ignore*/
|
|
45
45
|
.compact .floatingIconContainer,
|
|
46
46
|
.superCompact .floatingIconContainer,
|
|
47
47
|
.listContainer:hover .classic .floatingIconContainer,
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
position: relative;
|
|
70
70
|
transition: var(--zd_transition3) all ease;
|
|
71
71
|
}
|
|
72
|
-
|
|
72
|
+
/*Active:ignore*/
|
|
73
73
|
.listContainer:hover .compact .floatingIconContainer,
|
|
74
74
|
.listContainer:hover .superCompact .floatingIconContainer,
|
|
75
75
|
.hoveredStyle .compact .floatingIconContainer,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/dot",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.5",
|
|
4
4
|
"main": "lib/index",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@zohodesk-private/react-prop-validator": "1.2.3",
|
|
70
70
|
"@zohodesk/a11y": "2.3.8",
|
|
71
71
|
"@zohodesk/components": "1.6.3",
|
|
72
|
-
"@zohodesk/hooks": "2.0.
|
|
72
|
+
"@zohodesk/hooks": "2.0.8",
|
|
73
73
|
"@zohodesk/icons": "1.2.4",
|
|
74
74
|
"@zohodesk/layout": "^3.1.0",
|
|
75
75
|
"@zohodesk/svg": "1.3.2",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"@zohodesk/svg": "1.3.2",
|
|
91
91
|
"@zohodesk/virtualizer": "1.0.13",
|
|
92
92
|
"react-sortable-hoc": "^0.8.3",
|
|
93
|
-
"@zohodesk/hooks": "2.0.
|
|
93
|
+
"@zohodesk/hooks": "2.0.8",
|
|
94
94
|
"@zohodesk/utils": "1.3.16",
|
|
95
95
|
"@zohodesk/a11y": "2.3.8",
|
|
96
96
|
"@zohodesk/layout": "3.1.0"
|