@zohodesk/dot 1.0.0-temp-218 → 1.0.0-temp-219
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 +16 -0
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +6 -6
- package/assets/Appearance/dark/themes/blue/blue_DotCTA_DarkModifyCategory.module.css +14 -0
- package/assets/Appearance/dark/themes/green/green_DotCTA_DarkModifyCategory.module.css +14 -0
- package/assets/Appearance/dark/themes/orange/orange_DotCTA_DarkModifyCategory.module.css +14 -0
- package/assets/Appearance/dark/themes/red/red_DotCTA_DarkModifyCategory.module.css +14 -0
- package/assets/Appearance/dark/themes/yellow/yellow_DotCTA_DarkModifyCategory.module.css +14 -0
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +12 -12
- package/assets/Appearance/light/themes/blue/blue_DotCTA_LightModifyCategory.module.css +14 -0
- package/assets/Appearance/light/themes/green/green_DotCTA_LightModifyCategory.module.css +14 -0
- package/assets/Appearance/light/themes/orange/orange_DotCTA_LightModifyCategory.module.css +14 -0
- package/assets/Appearance/light/themes/red/red_DotCTA_LightModifyCategory.module.css +14 -0
- package/assets/Appearance/light/themes/yellow/yellow_DotCTA_LightModifyCategory.module.css +14 -0
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +4 -4
- package/assets/Appearance/pureDark/themes/blue/blue_DotCTA_PureDarkModifyCategory.module.css +14 -0
- package/assets/Appearance/pureDark/themes/green/green_DotCTA_PureDarkModifyCategory.module.css +14 -0
- package/assets/Appearance/pureDark/themes/orange/orange_DotCTA_PureDarkModifyCategory.module.css +14 -0
- package/assets/Appearance/pureDark/themes/red/red_DotCTA_PureDarkModifyCategory.module.css +14 -0
- package/assets/Appearance/pureDark/themes/yellow/yellow_DotCTA_PureDarkModifyCategory.module.css +14 -0
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +1 -0
- package/es/list/SecondaryText/AccountName.js +2 -12
- package/es/list/SecondaryText/ContactName.js +2 -12
- package/es/list/SecondaryText/DepartmentText.js +2 -12
- package/es/list/SecondaryText/Email.js +3 -13
- package/es/list/SecondaryText/PhoneNumber.js +5 -15
- package/es/list/SecondaryText/PriorityText.js +2 -12
- package/es/list/SecondaryText/SecondaryText.js +2 -12
- package/es/list/SecondaryText/SecondaryText.module.css +5 -1
- package/es/list/SecondaryText/StatusText.js +2 -12
- package/es/list/SecondaryText/TicketId.js +2 -13
- package/es/list/SecondaryText/Website.js +3 -13
- package/es/list/SecondaryText/__tests__/__snapshots__/PhoneNumber.spec.js.snap +1 -1
- package/es/list/SecondaryText/props/defaultProps.js +0 -18
- package/es/list/SecondaryText/props/propTypes.js +0 -20
- package/es/list/Subject/Subject.js +3 -13
- package/es/list/Subject/props/defaultProps.js +1 -3
- package/es/list/Subject/props/propTypes.js +1 -28
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +2 -0
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +2 -0
- package/lib/list/SecondaryText/AccountName.js +2 -20
- package/lib/list/SecondaryText/ContactName.js +2 -20
- package/lib/list/SecondaryText/DepartmentText.js +2 -20
- package/lib/list/SecondaryText/Email.js +3 -21
- package/lib/list/SecondaryText/PhoneNumber.js +5 -23
- package/lib/list/SecondaryText/PriorityText.js +2 -20
- package/lib/list/SecondaryText/SecondaryText.js +2 -20
- package/lib/list/SecondaryText/SecondaryText.module.css +5 -1
- package/lib/list/SecondaryText/StatusText.js +2 -20
- package/lib/list/SecondaryText/TicketId.js +2 -18
- package/lib/list/SecondaryText/Website.js +3 -21
- package/lib/list/SecondaryText/__tests__/__snapshots__/PhoneNumber.spec.js.snap +1 -1
- package/lib/list/SecondaryText/props/defaultProps.js +0 -18
- package/lib/list/SecondaryText/props/propTypes.js +0 -20
- package/lib/list/Subject/Subject.js +3 -21
- package/lib/list/Subject/props/defaultProps.js +1 -3
- package/lib/list/Subject/props/propTypes.js +1 -33
- package/package.json +11 -11
|
@@ -2,7 +2,6 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import { ContactName_defaultProps } from "./props/defaultProps";
|
|
3
3
|
import { ContactName_propTypes } from "./props/propTypes";
|
|
4
4
|
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
5
|
-
import { highlight as highlightText } from '@zohodesk/components/es/Typography/highlight';
|
|
6
5
|
import Link from "../../Link/Link";
|
|
7
6
|
import SentimentStatus from "../SentimentStatus/SentimentStatus";
|
|
8
7
|
import { Icon } from '@zohodesk/icons';
|
|
@@ -24,8 +23,6 @@ export default class ContactName extends Component {
|
|
|
24
23
|
notAccessible = false,
|
|
25
24
|
fontWeight,
|
|
26
25
|
i18nKeys,
|
|
27
|
-
highlights,
|
|
28
|
-
enableHighlight,
|
|
29
26
|
customProps
|
|
30
27
|
} = this.props;
|
|
31
28
|
let {
|
|
@@ -41,13 +38,6 @@ export default class ContactName extends Component {
|
|
|
41
38
|
LinkProps = {},
|
|
42
39
|
TextProps = {}
|
|
43
40
|
} = customProps;
|
|
44
|
-
const {
|
|
45
|
-
highlightData = []
|
|
46
|
-
} = highlights || {};
|
|
47
|
-
const displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? highlightText({
|
|
48
|
-
text,
|
|
49
|
-
...highlights
|
|
50
|
-
}) : text;
|
|
51
41
|
return /*#__PURE__*/React.createElement(Container, {
|
|
52
42
|
alignBox: "row",
|
|
53
43
|
align: "baseline",
|
|
@@ -74,11 +64,11 @@ export default class ContactName extends Component {
|
|
|
74
64
|
ariaLabel: `Contact Name ${text}`
|
|
75
65
|
}, /*#__PURE__*/React.createElement("div", {
|
|
76
66
|
className: `${style.textStyle} ${style[`font_${fontWeight}`]} ${className ? className : ''}`
|
|
77
|
-
},
|
|
67
|
+
}, text)) : /*#__PURE__*/React.createElement("div", {
|
|
78
68
|
className: `${style.secondaryText} ${style[`font_${fontWeight}`]} ${className ? className : ''} ${notAccessible ? style.disable : ''}`,
|
|
79
69
|
"data-title": dataTitle,
|
|
80
70
|
...TextProps
|
|
81
|
-
},
|
|
71
|
+
}, text)), sentimentType && /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(SentimentStatus, {
|
|
82
72
|
type: sentimentType,
|
|
83
73
|
dataTitle: sentimentDataTitle
|
|
84
74
|
})));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { DepartmentText_propTypes } from "./props/propTypes";
|
|
3
|
-
import { highlight as highlightText } from '@zohodesk/components/es/Typography/highlight';
|
|
4
3
|
import style from "./SecondaryText.module.css";
|
|
5
4
|
export default class DepartmentText extends Component {
|
|
6
5
|
constructor(props) {
|
|
@@ -12,23 +11,14 @@ export default class DepartmentText extends Component {
|
|
|
12
11
|
className,
|
|
13
12
|
text,
|
|
14
13
|
dataTitle,
|
|
15
|
-
dataId
|
|
16
|
-
enableHighlight,
|
|
17
|
-
highlights
|
|
14
|
+
dataId
|
|
18
15
|
} = this.props;
|
|
19
|
-
const {
|
|
20
|
-
highlightData = []
|
|
21
|
-
} = highlights || {};
|
|
22
|
-
const displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? highlightText({
|
|
23
|
-
text,
|
|
24
|
-
...highlights
|
|
25
|
-
}) : text;
|
|
26
16
|
return /*#__PURE__*/React.createElement("div", {
|
|
27
17
|
className: `${style.departmentText} ${className ? className : ''}`,
|
|
28
18
|
"data-title": dataTitle,
|
|
29
19
|
"data-id": dataId,
|
|
30
20
|
"data-test-id": dataId
|
|
31
|
-
},
|
|
21
|
+
}, text);
|
|
32
22
|
}
|
|
33
23
|
|
|
34
24
|
}
|
|
@@ -6,7 +6,6 @@ import { Email_defaultProps } from "./props/defaultProps";
|
|
|
6
6
|
import { Email_propTypes } from "./props/propTypes";
|
|
7
7
|
/**** Components ****/
|
|
8
8
|
|
|
9
|
-
import { highlight as highlightText } from '@zohodesk/components/es/Typography/highlight';
|
|
10
9
|
import Link from "../../Link/Link";
|
|
11
10
|
/**** CSS ****/
|
|
12
11
|
|
|
@@ -23,21 +22,12 @@ export default class Email extends Component {
|
|
|
23
22
|
isLink,
|
|
24
23
|
target,
|
|
25
24
|
fontWeight,
|
|
26
|
-
customProps
|
|
27
|
-
enableHighlight,
|
|
28
|
-
highlights
|
|
25
|
+
customProps
|
|
29
26
|
} = this.props;
|
|
30
27
|
let {
|
|
31
28
|
LinkProps = {},
|
|
32
29
|
TextProps = {}
|
|
33
30
|
} = customProps;
|
|
34
|
-
const {
|
|
35
|
-
highlightData = []
|
|
36
|
-
} = highlights || {};
|
|
37
|
-
const displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? highlightText({
|
|
38
|
-
text,
|
|
39
|
-
...highlights
|
|
40
|
-
}) : text;
|
|
41
31
|
return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(Link, {
|
|
42
32
|
href: href,
|
|
43
33
|
title: title,
|
|
@@ -48,11 +38,11 @@ export default class Email extends Component {
|
|
|
48
38
|
...LinkProps
|
|
49
39
|
}, /*#__PURE__*/React.createElement("div", {
|
|
50
40
|
className: `${style.textStyle} ${style[`font_${fontWeight}`]} ${className ? className : ''}`
|
|
51
|
-
},
|
|
41
|
+
}, text)) : /*#__PURE__*/React.createElement("div", {
|
|
52
42
|
className: `${style.secondaryText} ${style[`font_${fontWeight}`]} ${className ? className : ''}`,
|
|
53
43
|
"data-title": title,
|
|
54
44
|
...TextProps
|
|
55
|
-
},
|
|
45
|
+
}, text));
|
|
56
46
|
}
|
|
57
47
|
|
|
58
48
|
}
|
|
@@ -6,7 +6,6 @@ import { PhoneNumber_defaultProps } from "./props/defaultProps";
|
|
|
6
6
|
import { PhoneNumber_propTypes } from "./props/propTypes";
|
|
7
7
|
/**** Components ****/
|
|
8
8
|
|
|
9
|
-
import { highlight as highlightText } from '@zohodesk/components/es/Typography/highlight';
|
|
10
9
|
import Link from "../../Link/Link";
|
|
11
10
|
/**** CSS ****/
|
|
12
11
|
|
|
@@ -25,21 +24,12 @@ export default class PhoneNumber extends Component {
|
|
|
25
24
|
target,
|
|
26
25
|
hasReload,
|
|
27
26
|
fontWeight,
|
|
28
|
-
customProps
|
|
29
|
-
enableHighlight,
|
|
30
|
-
highlights
|
|
27
|
+
customProps
|
|
31
28
|
} = this.props;
|
|
32
29
|
let {
|
|
33
30
|
LinkProps = {},
|
|
34
31
|
TextProps = {}
|
|
35
32
|
} = customProps;
|
|
36
|
-
const {
|
|
37
|
-
highlightData = []
|
|
38
|
-
} = highlights || {};
|
|
39
|
-
const displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? highlightText({
|
|
40
|
-
text,
|
|
41
|
-
...highlights
|
|
42
|
-
}) : text;
|
|
43
33
|
return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(Link, {
|
|
44
34
|
href: href,
|
|
45
35
|
title: title,
|
|
@@ -51,12 +41,12 @@ export default class PhoneNumber extends Component {
|
|
|
51
41
|
className: style.link,
|
|
52
42
|
...LinkProps
|
|
53
43
|
}, /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: `${style.phoneNumber} ${style[`font_${fontWeight}`]} ${className ? className : ''}`
|
|
55
|
-
},
|
|
56
|
-
className: `${style.secondaryText} ${style[`font_${fontWeight}`]} ${className ? className : ''}`,
|
|
44
|
+
className: `${style.phoneNumber} ${style.phonetxt} ${style[`font_${fontWeight}`]} ${className ? className : ''}`
|
|
45
|
+
}, text)) : /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: `${style.secondaryText} ${style.phonetxt} ${style[`font_${fontWeight}`]} ${className ? className : ''}`,
|
|
57
47
|
"data-title": title,
|
|
58
48
|
...TextProps
|
|
59
|
-
},
|
|
49
|
+
}, text));
|
|
60
50
|
}
|
|
61
51
|
|
|
62
52
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { PriorityText_defaultProps } from "./props/defaultProps";
|
|
3
3
|
import { PriorityText_propTypes } from "./props/propTypes";
|
|
4
|
-
import { highlight as highlightText } from '@zohodesk/components/es/Typography/highlight';
|
|
5
4
|
import style from "./SecondaryText.module.css";
|
|
6
5
|
export default class PriorityText extends Component {
|
|
7
6
|
constructor(props) {
|
|
@@ -14,23 +13,14 @@ export default class PriorityText extends Component {
|
|
|
14
13
|
color,
|
|
15
14
|
text,
|
|
16
15
|
dataTitle,
|
|
17
|
-
dataId
|
|
18
|
-
enableHighlight,
|
|
19
|
-
highlights
|
|
16
|
+
dataId
|
|
20
17
|
} = this.props;
|
|
21
|
-
const {
|
|
22
|
-
highlightData = []
|
|
23
|
-
} = highlights || {};
|
|
24
|
-
const displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? highlightText({
|
|
25
|
-
text,
|
|
26
|
-
...highlights
|
|
27
|
-
}) : text;
|
|
28
18
|
return /*#__PURE__*/React.createElement("div", {
|
|
29
19
|
className: `${style.priorityText} ${style[color]} ${className ? className : ''}`,
|
|
30
20
|
"data-title": dataTitle,
|
|
31
21
|
"data-id": dataId,
|
|
32
22
|
"data-test-id": dataId
|
|
33
|
-
},
|
|
23
|
+
}, text);
|
|
34
24
|
}
|
|
35
25
|
|
|
36
26
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { SecondaryText_defaultProps } from "./props/defaultProps";
|
|
3
3
|
import { SecondaryText_propTypes } from "./props/propTypes";
|
|
4
|
-
import { highlight as highlightText } from '@zohodesk/components/es/Typography/highlight';
|
|
5
4
|
import style from "./SecondaryText.module.css";
|
|
6
5
|
export default class SecondaryText extends Component {
|
|
7
6
|
constructor(props) {
|
|
@@ -15,20 +14,11 @@ export default class SecondaryText extends Component {
|
|
|
15
14
|
dataTitle,
|
|
16
15
|
dataId,
|
|
17
16
|
onClick,
|
|
18
|
-
customProps
|
|
19
|
-
enableHighlight,
|
|
20
|
-
highlights
|
|
17
|
+
customProps
|
|
21
18
|
} = this.props;
|
|
22
19
|
let {
|
|
23
20
|
SecondaryTextProps
|
|
24
21
|
} = customProps;
|
|
25
|
-
const {
|
|
26
|
-
highlightData = []
|
|
27
|
-
} = highlights || {};
|
|
28
|
-
const displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? highlightText({
|
|
29
|
-
text,
|
|
30
|
-
...highlights
|
|
31
|
-
}) : text;
|
|
32
22
|
return /*#__PURE__*/React.createElement("div", {
|
|
33
23
|
className: `${style.secondaryText} ${className ? className : ''}`,
|
|
34
24
|
"data-title": dataTitle,
|
|
@@ -36,7 +26,7 @@ export default class SecondaryText extends Component {
|
|
|
36
26
|
"data-test-id": dataId,
|
|
37
27
|
onClick: onClick,
|
|
38
28
|
...SecondaryTextProps
|
|
39
|
-
},
|
|
29
|
+
}, text);
|
|
40
30
|
}
|
|
41
31
|
|
|
42
32
|
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
color: var(--zdt_secondaryText_black_text);
|
|
20
20
|
}
|
|
21
21
|
.textStyle, .link{
|
|
22
|
-
display: block
|
|
22
|
+
display: block
|
|
23
23
|
}
|
|
24
24
|
.textStyle.textBold {
|
|
25
25
|
font-family: var(--zd_bold);
|
|
@@ -134,3 +134,7 @@ display: block
|
|
|
134
134
|
.black {
|
|
135
135
|
color: var(--zdt_secondaryText_black_text);
|
|
136
136
|
}
|
|
137
|
+
|
|
138
|
+
.phonetxt {
|
|
139
|
+
composes: ltr-dir from '~@zohodesk/components/es/common/common.module.css';
|
|
140
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { StatusText_defaultProps } from "./props/defaultProps";
|
|
3
3
|
import { StatusText_propTypes } from "./props/propTypes";
|
|
4
|
-
import { highlight as highlightText } from '@zohodesk/components/es/Typography/highlight';
|
|
5
4
|
import style from "./SecondaryText.module.css";
|
|
6
5
|
export default class StatusText extends Component {
|
|
7
6
|
constructor(props) {
|
|
@@ -15,23 +14,14 @@ export default class StatusText extends Component {
|
|
|
15
14
|
text,
|
|
16
15
|
dataTitle,
|
|
17
16
|
fontWeight,
|
|
18
|
-
dataId
|
|
19
|
-
enableHighlight,
|
|
20
|
-
highlights
|
|
17
|
+
dataId
|
|
21
18
|
} = this.props;
|
|
22
|
-
const {
|
|
23
|
-
highlightData = []
|
|
24
|
-
} = highlights || {};
|
|
25
|
-
const displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? highlightText({
|
|
26
|
-
text,
|
|
27
|
-
...highlights
|
|
28
|
-
}) : text;
|
|
29
19
|
return /*#__PURE__*/React.createElement("div", {
|
|
30
20
|
className: `${style.statusText} ${style[color]} ${style[`font_${fontWeight}`]} ${className ? className : ''}`,
|
|
31
21
|
"data-title": dataTitle,
|
|
32
22
|
"data-id": dataId,
|
|
33
23
|
"data-test-id": dataId
|
|
34
|
-
},
|
|
24
|
+
}, text);
|
|
35
25
|
}
|
|
36
26
|
|
|
37
27
|
}
|
|
@@ -2,7 +2,6 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import { TicketId_defaultProps } from "./props/defaultProps";
|
|
3
3
|
import { TicketId_propTypes } from "./props/propTypes";
|
|
4
4
|
import Link from "../../Link/Link";
|
|
5
|
-
import { highlight as highlightText } from '@zohodesk/components/es/Typography/highlight';
|
|
6
5
|
import style from "./SecondaryText.module.css";
|
|
7
6
|
export default class TicketId extends Component {
|
|
8
7
|
constructor(props) {
|
|
@@ -21,22 +20,12 @@ export default class TicketId extends Component {
|
|
|
21
20
|
target,
|
|
22
21
|
urlName,
|
|
23
22
|
urlData,
|
|
24
|
-
customProps
|
|
25
|
-
enableHighlight,
|
|
26
|
-
highlights
|
|
23
|
+
customProps
|
|
27
24
|
} = this.props;
|
|
28
25
|
let {
|
|
29
26
|
LinkProps = {},
|
|
30
27
|
TicketIdProps = {}
|
|
31
28
|
} = customProps;
|
|
32
|
-
const {
|
|
33
|
-
highlightData = []
|
|
34
|
-
} = highlights;
|
|
35
|
-
const processedText = enableHighlight && highlightData && highlightData.length > 0 && typeof text === 'string' ? highlightText({
|
|
36
|
-
text,
|
|
37
|
-
...highlights
|
|
38
|
-
}) : text;
|
|
39
|
-
const textContent = Array.isArray(processedText) ? /*#__PURE__*/React.createElement(React.Fragment, null, processedText) : processedText;
|
|
40
29
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
30
|
className: `${style.ticketId} ${isLink ? style.ticketIdLink : ''} ${className ? className : ''}`,
|
|
42
31
|
"data-id": dataId,
|
|
@@ -51,7 +40,7 @@ export default class TicketId extends Component {
|
|
|
51
40
|
target: target,
|
|
52
41
|
onClick: onClick,
|
|
53
42
|
...LinkProps
|
|
54
|
-
},
|
|
43
|
+
}, text) : text);
|
|
55
44
|
}
|
|
56
45
|
|
|
57
46
|
}
|
|
@@ -6,7 +6,6 @@ import { Website_defaultProps } from "./props/defaultProps";
|
|
|
6
6
|
import { Website_propTypes } from "./props/propTypes";
|
|
7
7
|
/**** Components ****/
|
|
8
8
|
|
|
9
|
-
import { highlight as highlightText } from '@zohodesk/components/es/Typography/highlight';
|
|
10
9
|
import ExternalLink from "../../ExternalLink/ExternalLink";
|
|
11
10
|
/**** CSS ****/
|
|
12
11
|
|
|
@@ -20,27 +19,18 @@ export default class Website extends Component {
|
|
|
20
19
|
href,
|
|
21
20
|
dataId,
|
|
22
21
|
isLink,
|
|
23
|
-
target
|
|
24
|
-
enableHighlight,
|
|
25
|
-
highlights
|
|
22
|
+
target
|
|
26
23
|
} = this.props;
|
|
27
|
-
const {
|
|
28
|
-
highlightData = []
|
|
29
|
-
} = highlights || {};
|
|
30
|
-
const displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? highlightText({
|
|
31
|
-
text,
|
|
32
|
-
...highlights
|
|
33
|
-
}) : text;
|
|
34
24
|
return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(ExternalLink, {
|
|
35
25
|
className: `${style.textStyle} ${className ? className : ''}`,
|
|
36
26
|
href: href,
|
|
37
27
|
title: title,
|
|
38
28
|
dataId: dataId,
|
|
39
29
|
target: target
|
|
40
|
-
},
|
|
30
|
+
}, text) : /*#__PURE__*/React.createElement("div", {
|
|
41
31
|
className: `${style.secondaryText} ${className ? className : ''}`,
|
|
42
32
|
"data-title": text
|
|
43
|
-
},
|
|
33
|
+
}, text));
|
|
44
34
|
}
|
|
45
35
|
|
|
46
36
|
}
|
|
@@ -2,8 +2,6 @@ export const AccountName_defaultProps = {
|
|
|
2
2
|
isLink: true,
|
|
3
3
|
dataId: 'accountName',
|
|
4
4
|
fontWeight: 'regular',
|
|
5
|
-
enableHighlight: false,
|
|
6
|
-
highlights: {},
|
|
7
5
|
customProps: {}
|
|
8
6
|
};
|
|
9
7
|
export const ContactName_defaultProps = {
|
|
@@ -12,51 +10,35 @@ export const ContactName_defaultProps = {
|
|
|
12
10
|
dataId: 'contactName',
|
|
13
11
|
fontWeight: 'regular',
|
|
14
12
|
i18nKeys: {},
|
|
15
|
-
enableHighlight: false,
|
|
16
|
-
highlights: {},
|
|
17
13
|
customProps: {}
|
|
18
14
|
};
|
|
19
15
|
export const Email_defaultProps = {
|
|
20
16
|
isLink: true,
|
|
21
17
|
fontWeight: 'regular',
|
|
22
|
-
enableHighlight: false,
|
|
23
|
-
highlights: {},
|
|
24
18
|
customProps: {}
|
|
25
19
|
};
|
|
26
20
|
export const PhoneNumber_defaultProps = {
|
|
27
21
|
isLink: true,
|
|
28
22
|
hasReload: false,
|
|
29
23
|
fontWeight: 'regular',
|
|
30
|
-
enableHighlight: false,
|
|
31
|
-
highlights: {},
|
|
32
24
|
customProps: {}
|
|
33
25
|
};
|
|
34
26
|
export const PriorityText_defaultProps = {
|
|
35
27
|
color: 'black',
|
|
36
|
-
enableHighlight: false,
|
|
37
|
-
highlights: {},
|
|
38
28
|
dataId: 'priority'
|
|
39
29
|
};
|
|
40
30
|
export const SecondaryText_defaultProps = {
|
|
41
|
-
enableHighlight: false,
|
|
42
|
-
highlights: {},
|
|
43
31
|
customProps: {}
|
|
44
32
|
};
|
|
45
33
|
export const StatusText_defaultProps = {
|
|
46
34
|
color: 'black',
|
|
47
35
|
dataId: 'statusContainer',
|
|
48
|
-
enableHighlight: false,
|
|
49
|
-
highlights: {},
|
|
50
36
|
fontWeight: 'regular'
|
|
51
37
|
};
|
|
52
38
|
export const TicketId_defaultProps = {
|
|
53
39
|
dataId: 'ticketId',
|
|
54
|
-
enableHighlight: false,
|
|
55
|
-
highlights: {},
|
|
56
40
|
customProps: {}
|
|
57
41
|
};
|
|
58
42
|
export const Website_defaultProps = {
|
|
59
|
-
enableHighlight: false,
|
|
60
|
-
highlights: {},
|
|
61
43
|
isLink: true
|
|
62
44
|
};
|
|
@@ -14,8 +14,6 @@ export const AccountName_propTypes = {
|
|
|
14
14
|
secondaryAccountHref: PropTypes.string,
|
|
15
15
|
secondaryAccountClick: PropTypes.func,
|
|
16
16
|
secondaryAccountText: PropTypes.string,
|
|
17
|
-
enableHighlight: PropTypes.bool,
|
|
18
|
-
highlights: PropTypes.object,
|
|
19
17
|
customProps: PropTypes.shape({
|
|
20
18
|
LinkProps: PropTypes.object,
|
|
21
19
|
TextProps: PropTypes.object,
|
|
@@ -44,8 +42,6 @@ export const ContactName_propTypes = {
|
|
|
44
42
|
}),
|
|
45
43
|
paidTitle: PropTypes.string
|
|
46
44
|
}),
|
|
47
|
-
enableHighlight: PropTypes.bool,
|
|
48
|
-
highlights: PropTypes.object,
|
|
49
45
|
customProps: PropTypes.shape({
|
|
50
46
|
LinkProps: PropTypes.object,
|
|
51
47
|
TextProps: PropTypes.object
|
|
@@ -55,8 +51,6 @@ export const DepartmentText_propTypes = {
|
|
|
55
51
|
className: PropTypes.string,
|
|
56
52
|
dataId: PropTypes.string,
|
|
57
53
|
dataTitle: PropTypes.string,
|
|
58
|
-
enableHighlight: PropTypes.bool,
|
|
59
|
-
highlights: PropTypes.object,
|
|
60
54
|
text: PropTypes.string
|
|
61
55
|
};
|
|
62
56
|
export const Email_propTypes = {
|
|
@@ -69,8 +63,6 @@ export const Email_propTypes = {
|
|
|
69
63
|
title: PropTypes.string,
|
|
70
64
|
urlData: PropTypes.object,
|
|
71
65
|
urlName: PropTypes.string,
|
|
72
|
-
enableHighlight: PropTypes.bool,
|
|
73
|
-
highlights: PropTypes.object,
|
|
74
66
|
customProps: PropTypes.shape({
|
|
75
67
|
LinkProps: PropTypes.object,
|
|
76
68
|
TextProps: PropTypes.object
|
|
@@ -93,8 +85,6 @@ export const PhoneNumber_propTypes = {
|
|
|
93
85
|
title: PropTypes.string,
|
|
94
86
|
urlData: PropTypes.object,
|
|
95
87
|
urlName: PropTypes.string,
|
|
96
|
-
enableHighlight: PropTypes.bool,
|
|
97
|
-
highlights: PropTypes.object,
|
|
98
88
|
customProps: PropTypes.shape({
|
|
99
89
|
LinkProps: PropTypes.object,
|
|
100
90
|
TextProps: PropTypes.object
|
|
@@ -105,8 +95,6 @@ export const PriorityText_propTypes = {
|
|
|
105
95
|
color: PropTypes.oneOf(['red', 'green', 'gray', 'orange']),
|
|
106
96
|
dataId: PropTypes.string,
|
|
107
97
|
dataTitle: PropTypes.string,
|
|
108
|
-
enableHighlight: PropTypes.bool,
|
|
109
|
-
highlights: PropTypes.object,
|
|
110
98
|
text: PropTypes.string
|
|
111
99
|
};
|
|
112
100
|
export const SecondaryText_propTypes = {
|
|
@@ -115,8 +103,6 @@ export const SecondaryText_propTypes = {
|
|
|
115
103
|
dataTitle: PropTypes.string,
|
|
116
104
|
onClick: PropTypes.func,
|
|
117
105
|
text: PropTypes.string,
|
|
118
|
-
enableHighlight: PropTypes.bool,
|
|
119
|
-
highlights: PropTypes.object,
|
|
120
106
|
customProps: PropTypes.shape({
|
|
121
107
|
SecondaryTextProps: PropTypes.object
|
|
122
108
|
})
|
|
@@ -127,8 +113,6 @@ export const StatusText_propTypes = {
|
|
|
127
113
|
dataId: PropTypes.string,
|
|
128
114
|
dataTitle: PropTypes.string,
|
|
129
115
|
fontWeight: PropTypes.oneOf(['regular', 'semibold', 'bold']),
|
|
130
|
-
enableHighlight: PropTypes.bool,
|
|
131
|
-
highlights: PropTypes.object,
|
|
132
116
|
text: PropTypes.string
|
|
133
117
|
};
|
|
134
118
|
export const TicketId_propTypes = {
|
|
@@ -142,8 +126,6 @@ export const TicketId_propTypes = {
|
|
|
142
126
|
url: PropTypes.string,
|
|
143
127
|
urlData: PropTypes.string,
|
|
144
128
|
urlName: PropTypes.string,
|
|
145
|
-
enableHighlight: PropTypes.bool,
|
|
146
|
-
highlights: PropTypes.object,
|
|
147
129
|
customProps: PropTypes.shape({
|
|
148
130
|
TicketIdProps: PropTypes.object,
|
|
149
131
|
LinkProps: PropTypes.object
|
|
@@ -156,7 +138,5 @@ export const Website_propTypes = {
|
|
|
156
138
|
isLink: PropTypes.bool,
|
|
157
139
|
target: PropTypes.string,
|
|
158
140
|
text: PropTypes.string,
|
|
159
|
-
enableHighlight: PropTypes.bool,
|
|
160
|
-
highlights: PropTypes.object,
|
|
161
141
|
title: PropTypes.string
|
|
162
142
|
};
|
|
@@ -3,7 +3,6 @@ import { defaultProps } from "./props/defaultProps";
|
|
|
3
3
|
import { propTypes } from "./props/propTypes";
|
|
4
4
|
import Link from "../../Link/Link";
|
|
5
5
|
import { whiteSpaceClassMapping } from '@zohodesk/components/es/utils/cssUtils';
|
|
6
|
-
import { highlight as highlightText } from '@zohodesk/components/es/Typography/highlight';
|
|
7
6
|
import style from "./Subject.module.css";
|
|
8
7
|
export default class Subject extends Component {
|
|
9
8
|
constructor(props) {
|
|
@@ -25,21 +24,12 @@ export default class Subject extends Component {
|
|
|
25
24
|
isDotted,
|
|
26
25
|
children,
|
|
27
26
|
customProps,
|
|
28
|
-
whiteSpace
|
|
29
|
-
enableHighlight,
|
|
30
|
-
highlights
|
|
27
|
+
whiteSpace
|
|
31
28
|
} = this.props;
|
|
32
29
|
let {
|
|
33
30
|
LinkProps = {},
|
|
34
31
|
TextProps = {}
|
|
35
32
|
} = customProps;
|
|
36
|
-
const {
|
|
37
|
-
highlightData = []
|
|
38
|
-
} = highlights || {};
|
|
39
|
-
const displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? highlightText({
|
|
40
|
-
text,
|
|
41
|
-
...highlights
|
|
42
|
-
}) : children ? children : text;
|
|
43
33
|
return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(Link, {
|
|
44
34
|
urlName: urlName,
|
|
45
35
|
href: href,
|
|
@@ -51,14 +41,14 @@ export default class Subject extends Component {
|
|
|
51
41
|
target: target,
|
|
52
42
|
"data-title-wrap": whiteSpace,
|
|
53
43
|
...LinkProps
|
|
54
|
-
},
|
|
44
|
+
}, children ? children : text) : /*#__PURE__*/React.createElement("span", {
|
|
55
45
|
className: `${style.subject} ${isDotted ? style.dotted : ''} ${whiteSpaceClassMapping[whiteSpace]} ${className} ${style[`font_${fontWeight}`]}`,
|
|
56
46
|
"data-title": text,
|
|
57
47
|
"data-id": dataId,
|
|
58
48
|
"data-test-id": dataId,
|
|
59
49
|
"data-title-wrap": whiteSpace,
|
|
60
50
|
...TextProps
|
|
61
|
-
},
|
|
51
|
+
}, text));
|
|
62
52
|
}
|
|
63
53
|
|
|
64
54
|
}
|
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
-
const highlightsStyleShape = PropTypes.shape({
|
|
3
|
-
weight: PropTypes.oneOf(['regular', 'light', 'semibold', 'bold']),
|
|
4
|
-
transform: PropTypes.oneOf(['default', 'upper', 'lower', 'capital']),
|
|
5
|
-
decoration: PropTypes.oneOf(['default', 'underline', 'strike', 'overline']),
|
|
6
|
-
typeFace: PropTypes.oneOf(['normal', 'italic']),
|
|
7
|
-
customClass: PropTypes.object
|
|
8
|
-
});
|
|
9
|
-
const commonHighlightProps = {
|
|
10
|
-
customStyle: PropTypes.object,
|
|
11
|
-
isExcludedIndex: PropTypes.bool,
|
|
12
|
-
isCaseSensitive: PropTypes.bool,
|
|
13
|
-
isWholeWord: PropTypes.bool,
|
|
14
|
-
tagName: PropTypes.string,
|
|
15
|
-
render: PropTypes.element,
|
|
16
|
-
highlightsStyle: PropTypes.objectOf(highlightsStyleShape)
|
|
17
|
-
};
|
|
18
2
|
export const propTypes = {
|
|
19
3
|
className: PropTypes.string,
|
|
20
4
|
dataId: PropTypes.string,
|
|
@@ -32,16 +16,5 @@ export const propTypes = {
|
|
|
32
16
|
LinkProps: PropTypes.object,
|
|
33
17
|
TextProps: PropTypes.object
|
|
34
18
|
}),
|
|
35
|
-
whiteSpace: PropTypes.oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'])
|
|
36
|
-
// Highlight props
|
|
37
|
-
enableHighlight: PropTypes.bool,
|
|
38
|
-
highlights: PropTypes.objectOf(PropTypes.shape({
|
|
39
|
-
text: PropTypes.string,
|
|
40
|
-
highlightData: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
|
|
41
|
-
highlightText: PropTypes.string,
|
|
42
|
-
index: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
|
|
43
|
-
...commonHighlightProps
|
|
44
|
-
})])),
|
|
45
|
-
...commonHighlightProps
|
|
46
|
-
}))
|
|
19
|
+
whiteSpace: PropTypes.oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'])
|
|
47
20
|
};
|