@zohodesk/dot 1.0.0-temp-223.3 → 1.0.0-temp-218.1
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/assets/Appearance/dark/mode/Dot_DarkMode.module.css +315 -315
- package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +15 -15
- package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +15 -15
- package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +15 -15
- package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +15 -15
- package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +15 -15
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +307 -307
- package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +15 -15
- package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +15 -15
- package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +15 -15
- package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +15 -15
- package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +15 -15
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +317 -317
- package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +15 -15
- package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +15 -15
- package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +15 -15
- package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +15 -15
- package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +15 -15
- package/es/common/dot_boxShadow.module.css +2 -1
- package/es/list/SecondaryText/AccountName.js +8 -2
- package/es/list/SecondaryText/ContactName.js +8 -2
- package/es/list/SecondaryText/DepartmentText.js +8 -2
- package/es/list/SecondaryText/Email.js +9 -3
- package/es/list/SecondaryText/PhoneNumber.js +9 -3
- package/es/list/SecondaryText/PriorityText.js +8 -2
- package/es/list/SecondaryText/SecondaryText.js +8 -2
- package/es/list/SecondaryText/StatusText.js +8 -2
- package/es/list/SecondaryText/TicketId.js +9 -2
- package/es/list/SecondaryText/Website.js +9 -3
- package/es/list/SecondaryText/props/defaultProps.js +18 -0
- package/es/list/SecondaryText/props/propTypes.js +20 -0
- package/es/list/Subject/Subject.js +9 -3
- package/es/list/Subject/props/defaultProps.js +3 -1
- package/es/list/Subject/props/propTypes.js +28 -1
- package/lib/common/dot_boxShadow.module.css +2 -1
- package/lib/list/SecondaryText/AccountName.js +17 -2
- package/lib/list/SecondaryText/ContactName.js +17 -2
- package/lib/list/SecondaryText/DepartmentText.js +17 -2
- package/lib/list/SecondaryText/Email.js +18 -3
- package/lib/list/SecondaryText/PhoneNumber.js +18 -3
- package/lib/list/SecondaryText/PriorityText.js +17 -2
- package/lib/list/SecondaryText/SecondaryText.js +17 -2
- package/lib/list/SecondaryText/StatusText.js +17 -2
- package/lib/list/SecondaryText/TicketId.js +18 -2
- package/lib/list/SecondaryText/Website.js +18 -3
- package/lib/list/SecondaryText/props/defaultProps.js +18 -0
- package/lib/list/SecondaryText/props/propTypes.js +20 -0
- package/lib/list/Subject/Subject.js +18 -3
- package/lib/list/Subject/props/defaultProps.js +3 -1
- package/lib/list/Subject/props/propTypes.js +33 -1
- package/package.json +8 -8
|
@@ -2,6 +2,8 @@ export const AccountName_defaultProps = {
|
|
|
2
2
|
isLink: true,
|
|
3
3
|
dataId: 'accountName',
|
|
4
4
|
fontWeight: 'regular',
|
|
5
|
+
enableHighlight: false,
|
|
6
|
+
highlights: {},
|
|
5
7
|
customProps: {}
|
|
6
8
|
};
|
|
7
9
|
export const ContactName_defaultProps = {
|
|
@@ -10,35 +12,51 @@ export const ContactName_defaultProps = {
|
|
|
10
12
|
dataId: 'contactName',
|
|
11
13
|
fontWeight: 'regular',
|
|
12
14
|
i18nKeys: {},
|
|
15
|
+
enableHighlight: false,
|
|
16
|
+
highlights: {},
|
|
13
17
|
customProps: {}
|
|
14
18
|
};
|
|
15
19
|
export const Email_defaultProps = {
|
|
16
20
|
isLink: true,
|
|
17
21
|
fontWeight: 'regular',
|
|
22
|
+
enableHighlight: false,
|
|
23
|
+
highlights: {},
|
|
18
24
|
customProps: {}
|
|
19
25
|
};
|
|
20
26
|
export const PhoneNumber_defaultProps = {
|
|
21
27
|
isLink: true,
|
|
22
28
|
hasReload: false,
|
|
23
29
|
fontWeight: 'regular',
|
|
30
|
+
enableHighlight: false,
|
|
31
|
+
highlights: {},
|
|
24
32
|
customProps: {}
|
|
25
33
|
};
|
|
26
34
|
export const PriorityText_defaultProps = {
|
|
27
35
|
color: 'black',
|
|
36
|
+
enableHighlight: false,
|
|
37
|
+
highlights: {},
|
|
28
38
|
dataId: 'priority'
|
|
29
39
|
};
|
|
30
40
|
export const SecondaryText_defaultProps = {
|
|
41
|
+
enableHighlight: false,
|
|
42
|
+
highlights: {},
|
|
31
43
|
customProps: {}
|
|
32
44
|
};
|
|
33
45
|
export const StatusText_defaultProps = {
|
|
34
46
|
color: 'black',
|
|
35
47
|
dataId: 'statusContainer',
|
|
48
|
+
enableHighlight: false,
|
|
49
|
+
highlights: {},
|
|
36
50
|
fontWeight: 'regular'
|
|
37
51
|
};
|
|
38
52
|
export const TicketId_defaultProps = {
|
|
39
53
|
dataId: 'ticketId',
|
|
54
|
+
enableHighlight: false,
|
|
55
|
+
highlights: {},
|
|
40
56
|
customProps: {}
|
|
41
57
|
};
|
|
42
58
|
export const Website_defaultProps = {
|
|
59
|
+
enableHighlight: false,
|
|
60
|
+
highlights: {},
|
|
43
61
|
isLink: true
|
|
44
62
|
};
|
|
@@ -14,6 +14,8 @@ 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,
|
|
17
19
|
customProps: PropTypes.shape({
|
|
18
20
|
LinkProps: PropTypes.object,
|
|
19
21
|
TextProps: PropTypes.object,
|
|
@@ -42,6 +44,8 @@ export const ContactName_propTypes = {
|
|
|
42
44
|
}),
|
|
43
45
|
paidTitle: PropTypes.string
|
|
44
46
|
}),
|
|
47
|
+
enableHighlight: PropTypes.bool,
|
|
48
|
+
highlights: PropTypes.object,
|
|
45
49
|
customProps: PropTypes.shape({
|
|
46
50
|
LinkProps: PropTypes.object,
|
|
47
51
|
TextProps: PropTypes.object
|
|
@@ -51,6 +55,8 @@ export const DepartmentText_propTypes = {
|
|
|
51
55
|
className: PropTypes.string,
|
|
52
56
|
dataId: PropTypes.string,
|
|
53
57
|
dataTitle: PropTypes.string,
|
|
58
|
+
enableHighlight: PropTypes.bool,
|
|
59
|
+
highlights: PropTypes.object,
|
|
54
60
|
text: PropTypes.string
|
|
55
61
|
};
|
|
56
62
|
export const Email_propTypes = {
|
|
@@ -63,6 +69,8 @@ export const Email_propTypes = {
|
|
|
63
69
|
title: PropTypes.string,
|
|
64
70
|
urlData: PropTypes.object,
|
|
65
71
|
urlName: PropTypes.string,
|
|
72
|
+
enableHighlight: PropTypes.bool,
|
|
73
|
+
highlights: PropTypes.object,
|
|
66
74
|
customProps: PropTypes.shape({
|
|
67
75
|
LinkProps: PropTypes.object,
|
|
68
76
|
TextProps: PropTypes.object
|
|
@@ -85,6 +93,8 @@ export const PhoneNumber_propTypes = {
|
|
|
85
93
|
title: PropTypes.string,
|
|
86
94
|
urlData: PropTypes.object,
|
|
87
95
|
urlName: PropTypes.string,
|
|
96
|
+
enableHighlight: PropTypes.bool,
|
|
97
|
+
highlights: PropTypes.object,
|
|
88
98
|
customProps: PropTypes.shape({
|
|
89
99
|
LinkProps: PropTypes.object,
|
|
90
100
|
TextProps: PropTypes.object
|
|
@@ -95,6 +105,8 @@ export const PriorityText_propTypes = {
|
|
|
95
105
|
color: PropTypes.oneOf(['red', 'green', 'gray', 'orange']),
|
|
96
106
|
dataId: PropTypes.string,
|
|
97
107
|
dataTitle: PropTypes.string,
|
|
108
|
+
enableHighlight: PropTypes.bool,
|
|
109
|
+
highlights: PropTypes.object,
|
|
98
110
|
text: PropTypes.string
|
|
99
111
|
};
|
|
100
112
|
export const SecondaryText_propTypes = {
|
|
@@ -103,6 +115,8 @@ export const SecondaryText_propTypes = {
|
|
|
103
115
|
dataTitle: PropTypes.string,
|
|
104
116
|
onClick: PropTypes.func,
|
|
105
117
|
text: PropTypes.string,
|
|
118
|
+
enableHighlight: PropTypes.bool,
|
|
119
|
+
highlights: PropTypes.object,
|
|
106
120
|
customProps: PropTypes.shape({
|
|
107
121
|
SecondaryTextProps: PropTypes.object
|
|
108
122
|
})
|
|
@@ -113,6 +127,8 @@ export const StatusText_propTypes = {
|
|
|
113
127
|
dataId: PropTypes.string,
|
|
114
128
|
dataTitle: PropTypes.string,
|
|
115
129
|
fontWeight: PropTypes.oneOf(['regular', 'semibold', 'bold']),
|
|
130
|
+
enableHighlight: PropTypes.bool,
|
|
131
|
+
highlights: PropTypes.object,
|
|
116
132
|
text: PropTypes.string
|
|
117
133
|
};
|
|
118
134
|
export const TicketId_propTypes = {
|
|
@@ -126,6 +142,8 @@ export const TicketId_propTypes = {
|
|
|
126
142
|
url: PropTypes.string,
|
|
127
143
|
urlData: PropTypes.string,
|
|
128
144
|
urlName: PropTypes.string,
|
|
145
|
+
enableHighlight: PropTypes.bool,
|
|
146
|
+
highlights: PropTypes.object,
|
|
129
147
|
customProps: PropTypes.shape({
|
|
130
148
|
TicketIdProps: PropTypes.object,
|
|
131
149
|
LinkProps: PropTypes.object
|
|
@@ -138,5 +156,7 @@ export const Website_propTypes = {
|
|
|
138
156
|
isLink: PropTypes.bool,
|
|
139
157
|
target: PropTypes.string,
|
|
140
158
|
text: PropTypes.string,
|
|
159
|
+
enableHighlight: PropTypes.bool,
|
|
160
|
+
highlights: PropTypes.object,
|
|
141
161
|
title: PropTypes.string
|
|
142
162
|
};
|
|
@@ -3,6 +3,7 @@ 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 { highlightText } from '@zohodesk/components/es/Typography/utils/textHighlighter';
|
|
6
7
|
import style from "./Subject.module.css";
|
|
7
8
|
export default class Subject extends Component {
|
|
8
9
|
constructor(props) {
|
|
@@ -24,12 +25,17 @@ export default class Subject extends Component {
|
|
|
24
25
|
isDotted,
|
|
25
26
|
children,
|
|
26
27
|
customProps,
|
|
27
|
-
whiteSpace
|
|
28
|
+
whiteSpace,
|
|
29
|
+
enableHighlight,
|
|
30
|
+
highlights
|
|
28
31
|
} = this.props;
|
|
29
32
|
let {
|
|
30
33
|
LinkProps = {},
|
|
31
34
|
TextProps = {}
|
|
32
35
|
} = customProps;
|
|
36
|
+
const displayContent = enableHighlight && highlights?.data && highlights?.data?.length > 0 && text ? highlightText({ ...highlights,
|
|
37
|
+
text
|
|
38
|
+
}) : children ? children : text;
|
|
33
39
|
return /*#__PURE__*/React.createElement(React.Fragment, null, isLink ? /*#__PURE__*/React.createElement(Link, {
|
|
34
40
|
urlName: urlName,
|
|
35
41
|
href: href,
|
|
@@ -41,14 +47,14 @@ export default class Subject extends Component {
|
|
|
41
47
|
target: target,
|
|
42
48
|
"data-title-wrap": whiteSpace,
|
|
43
49
|
...LinkProps
|
|
44
|
-
},
|
|
50
|
+
}, displayContent) : /*#__PURE__*/React.createElement("span", {
|
|
45
51
|
className: `${style.subject} ${isDotted ? style.dotted : ''} ${whiteSpaceClassMapping[whiteSpace]} ${className} ${style[`font_${fontWeight}`]}`,
|
|
46
52
|
"data-title": text,
|
|
47
53
|
"data-id": dataId,
|
|
48
54
|
"data-test-id": dataId,
|
|
49
55
|
"data-title-wrap": whiteSpace,
|
|
50
56
|
...TextProps
|
|
51
|
-
},
|
|
57
|
+
}, displayContent));
|
|
52
58
|
}
|
|
53
59
|
|
|
54
60
|
}
|
|
@@ -1,4 +1,20 @@
|
|
|
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
|
+
};
|
|
2
18
|
export const propTypes = {
|
|
3
19
|
className: PropTypes.string,
|
|
4
20
|
dataId: PropTypes.string,
|
|
@@ -16,5 +32,16 @@ export const propTypes = {
|
|
|
16
32
|
LinkProps: PropTypes.object,
|
|
17
33
|
TextProps: PropTypes.object
|
|
18
34
|
}),
|
|
19
|
-
whiteSpace: PropTypes.oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'])
|
|
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
|
+
}))
|
|
20
47
|
};
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
--zd_bs_desktopnotification_container: var(--zd_bs_contrast_outline, 0 4px 20px var(--zdt_desktopnotification_box_shadow));
|
|
38
38
|
|
|
39
39
|
/* onboarding */
|
|
40
|
-
--zd_bs_onboarding_close_icon: var(--zd_bs_contrast_outline, 0px 2px 15px
|
|
40
|
+
--zd_bs_onboarding_close_icon: var(--zd_bs_contrast_outline, 0px 2px 15px rgba(0, 0, 0, 0.09));
|
|
41
41
|
--zd_bs_onboarding_gradient: var(--zd_bs_contrast_outline, 0px 20px 30px 0px var(--zdt_onboarding_bg_box_shadow));
|
|
42
42
|
--zd_bs_onboarding_primary_button: var(--zd_bs_contrast_outline, 0px 4px 20px 0px var(--zdt_onboarding_primary_button_shadow));
|
|
43
|
+
|
|
43
44
|
}
|
|
@@ -15,6 +15,8 @@ var _propTypes = require("./props/propTypes");
|
|
|
15
15
|
|
|
16
16
|
var _Layout = require("@zohodesk/components/es/Layout");
|
|
17
17
|
|
|
18
|
+
var _textHighlighter = require("@zohodesk/components/es/Typography/utils/textHighlighter");
|
|
19
|
+
|
|
18
20
|
var _Link = _interopRequireDefault(require("../../Link/Link"));
|
|
19
21
|
|
|
20
22
|
var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
|
|
@@ -27,6 +29,12 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
27
29
|
|
|
28
30
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
31
|
|
|
32
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
33
|
+
|
|
34
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
35
|
+
|
|
36
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
37
|
+
|
|
30
38
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
31
39
|
|
|
32
40
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -61,6 +69,8 @@ var AccountName = /*#__PURE__*/function (_Component) {
|
|
|
61
69
|
_createClass(AccountName, [{
|
|
62
70
|
key: "render",
|
|
63
71
|
value: function render() {
|
|
72
|
+
var _highlights$data;
|
|
73
|
+
|
|
64
74
|
var _this$props = this.props,
|
|
65
75
|
dataTitle = _this$props.dataTitle,
|
|
66
76
|
dataId = _this$props.dataId,
|
|
@@ -77,7 +87,12 @@ var AccountName = /*#__PURE__*/function (_Component) {
|
|
|
77
87
|
secondaryAccountHref = _this$props.secondaryAccountHref,
|
|
78
88
|
secondaryAccountClick = _this$props.secondaryAccountClick,
|
|
79
89
|
secondaryAccountText = _this$props.secondaryAccountText,
|
|
90
|
+
highlights = _this$props.highlights,
|
|
91
|
+
enableHighlight = _this$props.enableHighlight,
|
|
80
92
|
customProps = _this$props.customProps;
|
|
93
|
+
var displayContent = enableHighlight && highlights !== null && highlights !== void 0 && highlights.data && (highlights === null || highlights === void 0 ? void 0 : (_highlights$data = highlights.data) === null || _highlights$data === void 0 ? void 0 : _highlights$data.length) > 0 && text ? (0, _textHighlighter.highlightText)(_objectSpread(_objectSpread({}, highlights), {}, {
|
|
94
|
+
text: text
|
|
95
|
+
})) : text;
|
|
81
96
|
var _customProps$LinkProp = customProps.LinkProps,
|
|
82
97
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
83
98
|
_customProps$TextProp = customProps.TextProps,
|
|
@@ -111,9 +126,9 @@ var AccountName = /*#__PURE__*/function (_Component) {
|
|
|
111
126
|
ariaLabel: "Account Name ".concat(text)
|
|
112
127
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
113
128
|
className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
|
|
114
|
-
},
|
|
129
|
+
}, displayContent)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
115
130
|
className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '', " ").concat(notAccessible ? _SecondaryTextModule["default"].disable : '')
|
|
116
|
-
}, TextProps),
|
|
131
|
+
}, TextProps), displayContent)), secondaryAccountText && /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
|
|
117
132
|
href: secondaryAccountHref,
|
|
118
133
|
onClick: secondaryAccountClick,
|
|
119
134
|
className: _SecondaryTextModule["default"].link
|
|
@@ -15,6 +15,8 @@ var _propTypes = require("./props/propTypes");
|
|
|
15
15
|
|
|
16
16
|
var _Layout = require("@zohodesk/components/es/Layout");
|
|
17
17
|
|
|
18
|
+
var _textHighlighter = require("@zohodesk/components/es/Typography/utils/textHighlighter");
|
|
19
|
+
|
|
18
20
|
var _Link = _interopRequireDefault(require("../../Link/Link"));
|
|
19
21
|
|
|
20
22
|
var _SentimentStatus = _interopRequireDefault(require("../SentimentStatus/SentimentStatus"));
|
|
@@ -31,6 +33,12 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
31
33
|
|
|
32
34
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
33
35
|
|
|
36
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
+
|
|
38
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
|
+
|
|
40
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
41
|
+
|
|
34
42
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
35
43
|
|
|
36
44
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -65,6 +73,8 @@ var ContactName = /*#__PURE__*/function (_Component) {
|
|
|
65
73
|
_createClass(ContactName, [{
|
|
66
74
|
key: "render",
|
|
67
75
|
value: function render() {
|
|
76
|
+
var _highlights$data;
|
|
77
|
+
|
|
68
78
|
var _this$props = this.props,
|
|
69
79
|
dataTitle = _this$props.dataTitle,
|
|
70
80
|
dataId = _this$props.dataId,
|
|
@@ -81,6 +91,8 @@ var ContactName = /*#__PURE__*/function (_Component) {
|
|
|
81
91
|
notAccessible = _this$props$notAccess === void 0 ? false : _this$props$notAccess,
|
|
82
92
|
fontWeight = _this$props.fontWeight,
|
|
83
93
|
i18nKeys = _this$props.i18nKeys,
|
|
94
|
+
highlights = _this$props.highlights,
|
|
95
|
+
enableHighlight = _this$props.enableHighlight,
|
|
84
96
|
customProps = _this$props.customProps;
|
|
85
97
|
var _i18nKeys$sentimentTi = i18nKeys.sentimentTitles,
|
|
86
98
|
sentimentTitles = _i18nKeys$sentimentTi === void 0 ? {
|
|
@@ -95,6 +107,9 @@ var ContactName = /*#__PURE__*/function (_Component) {
|
|
|
95
107
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
96
108
|
_customProps$TextProp = customProps.TextProps,
|
|
97
109
|
TextProps = _customProps$TextProp === void 0 ? {} : _customProps$TextProp;
|
|
110
|
+
var displayContent = enableHighlight && highlights !== null && highlights !== void 0 && highlights.data && (highlights === null || highlights === void 0 ? void 0 : (_highlights$data = highlights.data) === null || _highlights$data === void 0 ? void 0 : _highlights$data.length) > 0 && text ? (0, _textHighlighter.highlightText)(_objectSpread(_objectSpread({}, highlights), {}, {
|
|
111
|
+
text: text
|
|
112
|
+
})) : text;
|
|
98
113
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
99
114
|
alignBox: "row",
|
|
100
115
|
align: "baseline",
|
|
@@ -121,10 +136,10 @@ var ContactName = /*#__PURE__*/function (_Component) {
|
|
|
121
136
|
ariaLabel: "Contact Name ".concat(text)
|
|
122
137
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
138
|
className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
|
|
124
|
-
},
|
|
139
|
+
}, displayContent)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
125
140
|
className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '', " ").concat(notAccessible ? _SecondaryTextModule["default"].disable : ''),
|
|
126
141
|
"data-title": dataTitle
|
|
127
|
-
}, TextProps),
|
|
142
|
+
}, TextProps), displayContent)), sentimentType && /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_SentimentStatus["default"], {
|
|
128
143
|
type: sentimentType,
|
|
129
144
|
dataTitle: sentimentDataTitle
|
|
130
145
|
})));
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _propTypes = require("./props/propTypes");
|
|
13
13
|
|
|
14
|
+
var _textHighlighter = require("@zohodesk/components/es/Typography/utils/textHighlighter");
|
|
15
|
+
|
|
14
16
|
var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -19,6 +21,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
21
|
|
|
20
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
23
|
|
|
24
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
+
|
|
26
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
|
+
|
|
28
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
29
|
+
|
|
22
30
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
31
|
|
|
24
32
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -53,17 +61,24 @@ var DepartmentText = /*#__PURE__*/function (_Component) {
|
|
|
53
61
|
_createClass(DepartmentText, [{
|
|
54
62
|
key: "render",
|
|
55
63
|
value: function render() {
|
|
64
|
+
var _highlights$data;
|
|
65
|
+
|
|
56
66
|
var _this$props = this.props,
|
|
57
67
|
className = _this$props.className,
|
|
58
68
|
text = _this$props.text,
|
|
59
69
|
dataTitle = _this$props.dataTitle,
|
|
60
|
-
dataId = _this$props.dataId
|
|
70
|
+
dataId = _this$props.dataId,
|
|
71
|
+
enableHighlight = _this$props.enableHighlight,
|
|
72
|
+
highlights = _this$props.highlights;
|
|
73
|
+
var displayContent = enableHighlight && highlights !== null && highlights !== void 0 && highlights.data && (highlights === null || highlights === void 0 ? void 0 : (_highlights$data = highlights.data) === null || _highlights$data === void 0 ? void 0 : _highlights$data.length) > 0 && text ? (0, _textHighlighter.highlightText)(_objectSpread(_objectSpread({}, highlights), {}, {
|
|
74
|
+
text: text
|
|
75
|
+
})) : text;
|
|
61
76
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
62
77
|
className: "".concat(_SecondaryTextModule["default"].departmentText, " ").concat(className ? className : ''),
|
|
63
78
|
"data-title": dataTitle,
|
|
64
79
|
"data-id": dataId,
|
|
65
80
|
"data-test-id": dataId
|
|
66
|
-
},
|
|
81
|
+
}, displayContent);
|
|
67
82
|
}
|
|
68
83
|
}]);
|
|
69
84
|
|
|
@@ -13,6 +13,8 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
13
13
|
|
|
14
14
|
var _propTypes = require("./props/propTypes");
|
|
15
15
|
|
|
16
|
+
var _textHighlighter = require("@zohodesk/components/es/Typography/utils/textHighlighter");
|
|
17
|
+
|
|
16
18
|
var _Link = _interopRequireDefault(require("../../Link/Link"));
|
|
17
19
|
|
|
18
20
|
var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
|
|
@@ -25,6 +27,12 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
25
27
|
|
|
26
28
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
29
|
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
+
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
33
|
+
|
|
34
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
+
|
|
28
36
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
37
|
|
|
30
38
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -59,6 +67,8 @@ var Email = /*#__PURE__*/function (_Component) {
|
|
|
59
67
|
_createClass(Email, [{
|
|
60
68
|
key: "render",
|
|
61
69
|
value: function render() {
|
|
70
|
+
var _highlights$data;
|
|
71
|
+
|
|
62
72
|
var _this$props = this.props,
|
|
63
73
|
text = _this$props.text,
|
|
64
74
|
urlData = _this$props.urlData,
|
|
@@ -69,11 +79,16 @@ var Email = /*#__PURE__*/function (_Component) {
|
|
|
69
79
|
isLink = _this$props.isLink,
|
|
70
80
|
target = _this$props.target,
|
|
71
81
|
fontWeight = _this$props.fontWeight,
|
|
72
|
-
customProps = _this$props.customProps
|
|
82
|
+
customProps = _this$props.customProps,
|
|
83
|
+
enableHighlight = _this$props.enableHighlight,
|
|
84
|
+
highlights = _this$props.highlights;
|
|
73
85
|
var _customProps$LinkProp = customProps.LinkProps,
|
|
74
86
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
75
87
|
_customProps$TextProp = customProps.TextProps,
|
|
76
88
|
TextProps = _customProps$TextProp === void 0 ? {} : _customProps$TextProp;
|
|
89
|
+
var displayContent = enableHighlight && highlights !== null && highlights !== void 0 && highlights.data && (highlights === null || highlights === void 0 ? void 0 : (_highlights$data = highlights.data) === null || _highlights$data === void 0 ? void 0 : _highlights$data.length) > 0 && text ? (0, _textHighlighter.highlightText)(_objectSpread(_objectSpread({}, highlights), {}, {
|
|
90
|
+
text: text
|
|
91
|
+
})) : text;
|
|
77
92
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
|
|
78
93
|
href: href,
|
|
79
94
|
title: title,
|
|
@@ -83,10 +98,10 @@ var Email = /*#__PURE__*/function (_Component) {
|
|
|
83
98
|
className: _SecondaryTextModule["default"].link
|
|
84
99
|
}, LinkProps), /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
100
|
className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
|
|
86
|
-
},
|
|
101
|
+
}, displayContent)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
87
102
|
className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : ''),
|
|
88
103
|
"data-title": title
|
|
89
|
-
}, TextProps),
|
|
104
|
+
}, TextProps), displayContent));
|
|
90
105
|
}
|
|
91
106
|
}]);
|
|
92
107
|
|
|
@@ -13,6 +13,8 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
13
13
|
|
|
14
14
|
var _propTypes = require("./props/propTypes");
|
|
15
15
|
|
|
16
|
+
var _textHighlighter = require("@zohodesk/components/es/Typography/utils/textHighlighter");
|
|
17
|
+
|
|
16
18
|
var _Link = _interopRequireDefault(require("../../Link/Link"));
|
|
17
19
|
|
|
18
20
|
var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
|
|
@@ -25,6 +27,12 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
25
27
|
|
|
26
28
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
29
|
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
+
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
33
|
+
|
|
34
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
+
|
|
28
36
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
37
|
|
|
30
38
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -59,6 +67,8 @@ var PhoneNumber = /*#__PURE__*/function (_Component) {
|
|
|
59
67
|
_createClass(PhoneNumber, [{
|
|
60
68
|
key: "render",
|
|
61
69
|
value: function render() {
|
|
70
|
+
var _highlights$data;
|
|
71
|
+
|
|
62
72
|
var _this$props = this.props,
|
|
63
73
|
text = _this$props.text,
|
|
64
74
|
urlData = _this$props.urlData,
|
|
@@ -71,11 +81,16 @@ var PhoneNumber = /*#__PURE__*/function (_Component) {
|
|
|
71
81
|
target = _this$props.target,
|
|
72
82
|
hasReload = _this$props.hasReload,
|
|
73
83
|
fontWeight = _this$props.fontWeight,
|
|
74
|
-
customProps = _this$props.customProps
|
|
84
|
+
customProps = _this$props.customProps,
|
|
85
|
+
enableHighlight = _this$props.enableHighlight,
|
|
86
|
+
highlights = _this$props.highlights;
|
|
75
87
|
var _customProps$LinkProp = customProps.LinkProps,
|
|
76
88
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
77
89
|
_customProps$TextProp = customProps.TextProps,
|
|
78
90
|
TextProps = _customProps$TextProp === void 0 ? {} : _customProps$TextProp;
|
|
91
|
+
var displayContent = enableHighlight && highlights !== null && highlights !== void 0 && highlights.data && (highlights === null || highlights === void 0 ? void 0 : (_highlights$data = highlights.data) === null || _highlights$data === void 0 ? void 0 : _highlights$data.length) > 0 && text ? (0, _textHighlighter.highlightText)(_objectSpread(_objectSpread({}, highlights), {}, {
|
|
92
|
+
text: text
|
|
93
|
+
})) : text;
|
|
79
94
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
|
|
80
95
|
href: href,
|
|
81
96
|
title: title,
|
|
@@ -87,10 +102,10 @@ var PhoneNumber = /*#__PURE__*/function (_Component) {
|
|
|
87
102
|
className: _SecondaryTextModule["default"].link
|
|
88
103
|
}, LinkProps), /*#__PURE__*/_react["default"].createElement("div", {
|
|
89
104
|
className: "".concat(_SecondaryTextModule["default"].phoneNumber, " ").concat(_SecondaryTextModule["default"].phonetxt, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
|
|
90
|
-
},
|
|
105
|
+
}, displayContent)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
91
106
|
className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"].phonetxt, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : ''),
|
|
92
107
|
"data-title": title
|
|
93
|
-
}, TextProps),
|
|
108
|
+
}, TextProps), displayContent));
|
|
94
109
|
}
|
|
95
110
|
}]);
|
|
96
111
|
|
|
@@ -13,6 +13,8 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
13
13
|
|
|
14
14
|
var _propTypes = require("./props/propTypes");
|
|
15
15
|
|
|
16
|
+
var _textHighlighter = require("@zohodesk/components/es/Typography/utils/textHighlighter");
|
|
17
|
+
|
|
16
18
|
var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -21,6 +23,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
23
|
|
|
22
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
25
|
|
|
26
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
+
|
|
28
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
|
+
|
|
30
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
|
+
|
|
24
32
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
33
|
|
|
26
34
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -55,18 +63,25 @@ var PriorityText = /*#__PURE__*/function (_Component) {
|
|
|
55
63
|
_createClass(PriorityText, [{
|
|
56
64
|
key: "render",
|
|
57
65
|
value: function render() {
|
|
66
|
+
var _highlights$data;
|
|
67
|
+
|
|
58
68
|
var _this$props = this.props,
|
|
59
69
|
className = _this$props.className,
|
|
60
70
|
color = _this$props.color,
|
|
61
71
|
text = _this$props.text,
|
|
62
72
|
dataTitle = _this$props.dataTitle,
|
|
63
|
-
dataId = _this$props.dataId
|
|
73
|
+
dataId = _this$props.dataId,
|
|
74
|
+
enableHighlight = _this$props.enableHighlight,
|
|
75
|
+
highlights = _this$props.highlights;
|
|
76
|
+
var displayContent = enableHighlight && highlights !== null && highlights !== void 0 && highlights.data && (highlights === null || highlights === void 0 ? void 0 : (_highlights$data = highlights.data) === null || _highlights$data === void 0 ? void 0 : _highlights$data.length) > 0 && text ? (0, _textHighlighter.highlightText)(_objectSpread(_objectSpread({}, highlights), {}, {
|
|
77
|
+
text: text
|
|
78
|
+
})) : text;
|
|
64
79
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
80
|
className: "".concat(_SecondaryTextModule["default"].priorityText, " ").concat(_SecondaryTextModule["default"][color], " ").concat(className ? className : ''),
|
|
66
81
|
"data-title": dataTitle,
|
|
67
82
|
"data-id": dataId,
|
|
68
83
|
"data-test-id": dataId
|
|
69
|
-
},
|
|
84
|
+
}, displayContent);
|
|
70
85
|
}
|
|
71
86
|
}]);
|
|
72
87
|
|