@zohodesk/dot 1.0.0-temp-216 → 1.0.0-temp-218
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/AudioPlayer/__tests__/AudioPlayer.spec.js +186 -38
- package/es/AudioPlayer/__tests__/__snapshots__/AudioPlayer.spec.js.snap +1851 -1
- package/es/list/SecondaryText/AccountName.js +12 -2
- package/es/list/SecondaryText/ContactName.js +12 -2
- package/es/list/SecondaryText/DepartmentText.js +12 -2
- package/es/list/SecondaryText/Email.js +13 -3
- package/es/list/SecondaryText/PhoneNumber.js +13 -3
- package/es/list/SecondaryText/PriorityText.js +12 -2
- package/es/list/SecondaryText/SecondaryText.js +12 -2
- package/es/list/SecondaryText/StatusText.js +12 -2
- package/es/list/SecondaryText/TicketId.js +13 -2
- package/es/list/SecondaryText/Website.js +13 -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 +13 -3
- package/es/list/Subject/props/defaultProps.js +3 -1
- package/es/list/Subject/props/propTypes.js +28 -1
- package/lib/AudioPlayer/__tests__/AudioPlayer.spec.js +192 -32
- package/lib/AudioPlayer/__tests__/__snapshots__/AudioPlayer.spec.js.snap +1851 -1
- package/lib/list/SecondaryText/AccountName.js +20 -2
- package/lib/list/SecondaryText/ContactName.js +20 -2
- package/lib/list/SecondaryText/DepartmentText.js +20 -2
- package/lib/list/SecondaryText/Email.js +21 -3
- package/lib/list/SecondaryText/PhoneNumber.js +21 -3
- package/lib/list/SecondaryText/PriorityText.js +20 -2
- package/lib/list/SecondaryText/SecondaryText.js +20 -2
- package/lib/list/SecondaryText/StatusText.js +20 -2
- package/lib/list/SecondaryText/TicketId.js +18 -2
- package/lib/list/SecondaryText/Website.js +21 -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 +21 -3
- package/lib/list/Subject/props/defaultProps.js +3 -1
- package/lib/list/Subject/props/propTypes.js +33 -1
- package/package.json +6 -12
|
@@ -15,6 +15,8 @@ var _propTypes = require("./props/propTypes");
|
|
|
15
15
|
|
|
16
16
|
var _Layout = require("@zohodesk/components/es/Layout");
|
|
17
17
|
|
|
18
|
+
var _highlight = require("@zohodesk/components/es/Typography/highlight");
|
|
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); } }
|
|
@@ -77,7 +85,17 @@ var AccountName = /*#__PURE__*/function (_Component) {
|
|
|
77
85
|
secondaryAccountHref = _this$props.secondaryAccountHref,
|
|
78
86
|
secondaryAccountClick = _this$props.secondaryAccountClick,
|
|
79
87
|
secondaryAccountText = _this$props.secondaryAccountText,
|
|
88
|
+
highlights = _this$props.highlights,
|
|
89
|
+
enableHighlight = _this$props.enableHighlight,
|
|
80
90
|
customProps = _this$props.customProps;
|
|
91
|
+
|
|
92
|
+
var _ref = highlights || {},
|
|
93
|
+
_ref$highlightData = _ref.highlightData,
|
|
94
|
+
highlightData = _ref$highlightData === void 0 ? [] : _ref$highlightData;
|
|
95
|
+
|
|
96
|
+
var displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? (0, _highlight.highlight)(_objectSpread({
|
|
97
|
+
text: text
|
|
98
|
+
}, highlights)) : text;
|
|
81
99
|
var _customProps$LinkProp = customProps.LinkProps,
|
|
82
100
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
83
101
|
_customProps$TextProp = customProps.TextProps,
|
|
@@ -111,9 +129,9 @@ var AccountName = /*#__PURE__*/function (_Component) {
|
|
|
111
129
|
ariaLabel: "Account Name ".concat(text)
|
|
112
130
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
113
131
|
className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
|
|
114
|
-
},
|
|
132
|
+
}, displayContent)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
115
133
|
className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '', " ").concat(notAccessible ? _SecondaryTextModule["default"].disable : '')
|
|
116
|
-
}, TextProps),
|
|
134
|
+
}, TextProps), displayContent)), secondaryAccountText && /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
|
|
117
135
|
href: secondaryAccountHref,
|
|
118
136
|
onClick: secondaryAccountClick,
|
|
119
137
|
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 _highlight = require("@zohodesk/components/es/Typography/highlight");
|
|
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); } }
|
|
@@ -81,6 +89,8 @@ var ContactName = /*#__PURE__*/function (_Component) {
|
|
|
81
89
|
notAccessible = _this$props$notAccess === void 0 ? false : _this$props$notAccess,
|
|
82
90
|
fontWeight = _this$props.fontWeight,
|
|
83
91
|
i18nKeys = _this$props.i18nKeys,
|
|
92
|
+
highlights = _this$props.highlights,
|
|
93
|
+
enableHighlight = _this$props.enableHighlight,
|
|
84
94
|
customProps = _this$props.customProps;
|
|
85
95
|
var _i18nKeys$sentimentTi = i18nKeys.sentimentTitles,
|
|
86
96
|
sentimentTitles = _i18nKeys$sentimentTi === void 0 ? {
|
|
@@ -95,6 +105,14 @@ var ContactName = /*#__PURE__*/function (_Component) {
|
|
|
95
105
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
96
106
|
_customProps$TextProp = customProps.TextProps,
|
|
97
107
|
TextProps = _customProps$TextProp === void 0 ? {} : _customProps$TextProp;
|
|
108
|
+
|
|
109
|
+
var _ref = highlights || {},
|
|
110
|
+
_ref$highlightData = _ref.highlightData,
|
|
111
|
+
highlightData = _ref$highlightData === void 0 ? [] : _ref$highlightData;
|
|
112
|
+
|
|
113
|
+
var displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? (0, _highlight.highlight)(_objectSpread({
|
|
114
|
+
text: text
|
|
115
|
+
}, highlights)) : text;
|
|
98
116
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
99
117
|
alignBox: "row",
|
|
100
118
|
align: "baseline",
|
|
@@ -121,10 +139,10 @@ var ContactName = /*#__PURE__*/function (_Component) {
|
|
|
121
139
|
ariaLabel: "Contact Name ".concat(text)
|
|
122
140
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
123
141
|
className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
|
|
124
|
-
},
|
|
142
|
+
}, displayContent)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
125
143
|
className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '', " ").concat(notAccessible ? _SecondaryTextModule["default"].disable : ''),
|
|
126
144
|
"data-title": dataTitle
|
|
127
|
-
}, TextProps),
|
|
145
|
+
}, TextProps), displayContent)), sentimentType && /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_SentimentStatus["default"], {
|
|
128
146
|
type: sentimentType,
|
|
129
147
|
dataTitle: sentimentDataTitle
|
|
130
148
|
})));
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _propTypes = require("./props/propTypes");
|
|
13
13
|
|
|
14
|
+
var _highlight = require("@zohodesk/components/es/Typography/highlight");
|
|
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); } }
|
|
@@ -57,13 +65,23 @@ var DepartmentText = /*#__PURE__*/function (_Component) {
|
|
|
57
65
|
className = _this$props.className,
|
|
58
66
|
text = _this$props.text,
|
|
59
67
|
dataTitle = _this$props.dataTitle,
|
|
60
|
-
dataId = _this$props.dataId
|
|
68
|
+
dataId = _this$props.dataId,
|
|
69
|
+
enableHighlight = _this$props.enableHighlight,
|
|
70
|
+
highlights = _this$props.highlights;
|
|
71
|
+
|
|
72
|
+
var _ref = highlights || {},
|
|
73
|
+
_ref$highlightData = _ref.highlightData,
|
|
74
|
+
highlightData = _ref$highlightData === void 0 ? [] : _ref$highlightData;
|
|
75
|
+
|
|
76
|
+
var displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? (0, _highlight.highlight)(_objectSpread({
|
|
77
|
+
text: text
|
|
78
|
+
}, highlights)) : text;
|
|
61
79
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
62
80
|
className: "".concat(_SecondaryTextModule["default"].departmentText, " ").concat(className ? className : ''),
|
|
63
81
|
"data-title": dataTitle,
|
|
64
82
|
"data-id": dataId,
|
|
65
83
|
"data-test-id": dataId
|
|
66
|
-
},
|
|
84
|
+
}, displayContent);
|
|
67
85
|
}
|
|
68
86
|
}]);
|
|
69
87
|
|
|
@@ -13,6 +13,8 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
13
13
|
|
|
14
14
|
var _propTypes = require("./props/propTypes");
|
|
15
15
|
|
|
16
|
+
var _highlight = require("@zohodesk/components/es/Typography/highlight");
|
|
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); } }
|
|
@@ -69,11 +77,21 @@ var Email = /*#__PURE__*/function (_Component) {
|
|
|
69
77
|
isLink = _this$props.isLink,
|
|
70
78
|
target = _this$props.target,
|
|
71
79
|
fontWeight = _this$props.fontWeight,
|
|
72
|
-
customProps = _this$props.customProps
|
|
80
|
+
customProps = _this$props.customProps,
|
|
81
|
+
enableHighlight = _this$props.enableHighlight,
|
|
82
|
+
highlights = _this$props.highlights;
|
|
73
83
|
var _customProps$LinkProp = customProps.LinkProps,
|
|
74
84
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
75
85
|
_customProps$TextProp = customProps.TextProps,
|
|
76
86
|
TextProps = _customProps$TextProp === void 0 ? {} : _customProps$TextProp;
|
|
87
|
+
|
|
88
|
+
var _ref = highlights || {},
|
|
89
|
+
_ref$highlightData = _ref.highlightData,
|
|
90
|
+
highlightData = _ref$highlightData === void 0 ? [] : _ref$highlightData;
|
|
91
|
+
|
|
92
|
+
var displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? (0, _highlight.highlight)(_objectSpread({
|
|
93
|
+
text: text
|
|
94
|
+
}, highlights)) : text;
|
|
77
95
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
|
|
78
96
|
href: href,
|
|
79
97
|
title: title,
|
|
@@ -83,10 +101,10 @@ var Email = /*#__PURE__*/function (_Component) {
|
|
|
83
101
|
className: _SecondaryTextModule["default"].link
|
|
84
102
|
}, LinkProps), /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
103
|
className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
|
|
86
|
-
},
|
|
104
|
+
}, displayContent)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
87
105
|
className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : ''),
|
|
88
106
|
"data-title": title
|
|
89
|
-
}, TextProps),
|
|
107
|
+
}, TextProps), displayContent));
|
|
90
108
|
}
|
|
91
109
|
}]);
|
|
92
110
|
|
|
@@ -13,6 +13,8 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
13
13
|
|
|
14
14
|
var _propTypes = require("./props/propTypes");
|
|
15
15
|
|
|
16
|
+
var _highlight = require("@zohodesk/components/es/Typography/highlight");
|
|
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); } }
|
|
@@ -71,11 +79,21 @@ var PhoneNumber = /*#__PURE__*/function (_Component) {
|
|
|
71
79
|
target = _this$props.target,
|
|
72
80
|
hasReload = _this$props.hasReload,
|
|
73
81
|
fontWeight = _this$props.fontWeight,
|
|
74
|
-
customProps = _this$props.customProps
|
|
82
|
+
customProps = _this$props.customProps,
|
|
83
|
+
enableHighlight = _this$props.enableHighlight,
|
|
84
|
+
highlights = _this$props.highlights;
|
|
75
85
|
var _customProps$LinkProp = customProps.LinkProps,
|
|
76
86
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
77
87
|
_customProps$TextProp = customProps.TextProps,
|
|
78
88
|
TextProps = _customProps$TextProp === void 0 ? {} : _customProps$TextProp;
|
|
89
|
+
|
|
90
|
+
var _ref = highlights || {},
|
|
91
|
+
_ref$highlightData = _ref.highlightData,
|
|
92
|
+
highlightData = _ref$highlightData === void 0 ? [] : _ref$highlightData;
|
|
93
|
+
|
|
94
|
+
var displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? (0, _highlight.highlight)(_objectSpread({
|
|
95
|
+
text: text
|
|
96
|
+
}, highlights)) : text;
|
|
79
97
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
|
|
80
98
|
href: href,
|
|
81
99
|
title: title,
|
|
@@ -87,10 +105,10 @@ var PhoneNumber = /*#__PURE__*/function (_Component) {
|
|
|
87
105
|
className: _SecondaryTextModule["default"].link
|
|
88
106
|
}, LinkProps), /*#__PURE__*/_react["default"].createElement("div", {
|
|
89
107
|
className: "".concat(_SecondaryTextModule["default"].phoneNumber, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
|
|
90
|
-
},
|
|
108
|
+
}, displayContent)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
91
109
|
className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : ''),
|
|
92
110
|
"data-title": title
|
|
93
|
-
}, TextProps),
|
|
111
|
+
}, TextProps), displayContent));
|
|
94
112
|
}
|
|
95
113
|
}]);
|
|
96
114
|
|
|
@@ -13,6 +13,8 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
13
13
|
|
|
14
14
|
var _propTypes = require("./props/propTypes");
|
|
15
15
|
|
|
16
|
+
var _highlight = require("@zohodesk/components/es/Typography/highlight");
|
|
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); } }
|
|
@@ -60,13 +68,23 @@ var PriorityText = /*#__PURE__*/function (_Component) {
|
|
|
60
68
|
color = _this$props.color,
|
|
61
69
|
text = _this$props.text,
|
|
62
70
|
dataTitle = _this$props.dataTitle,
|
|
63
|
-
dataId = _this$props.dataId
|
|
71
|
+
dataId = _this$props.dataId,
|
|
72
|
+
enableHighlight = _this$props.enableHighlight,
|
|
73
|
+
highlights = _this$props.highlights;
|
|
74
|
+
|
|
75
|
+
var _ref = highlights || {},
|
|
76
|
+
_ref$highlightData = _ref.highlightData,
|
|
77
|
+
highlightData = _ref$highlightData === void 0 ? [] : _ref$highlightData;
|
|
78
|
+
|
|
79
|
+
var displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? (0, _highlight.highlight)(_objectSpread({
|
|
80
|
+
text: text
|
|
81
|
+
}, highlights)) : text;
|
|
64
82
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
83
|
className: "".concat(_SecondaryTextModule["default"].priorityText, " ").concat(_SecondaryTextModule["default"][color], " ").concat(className ? className : ''),
|
|
66
84
|
"data-title": dataTitle,
|
|
67
85
|
"data-id": dataId,
|
|
68
86
|
"data-test-id": dataId
|
|
69
|
-
},
|
|
87
|
+
}, displayContent);
|
|
70
88
|
}
|
|
71
89
|
}]);
|
|
72
90
|
|
|
@@ -13,6 +13,8 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
13
13
|
|
|
14
14
|
var _propTypes = require("./props/propTypes");
|
|
15
15
|
|
|
16
|
+
var _highlight = require("@zohodesk/components/es/Typography/highlight");
|
|
17
|
+
|
|
16
18
|
var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -23,6 +25,12 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
23
25
|
|
|
24
26
|
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); }
|
|
25
27
|
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
26
34
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
35
|
|
|
28
36
|
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); } }
|
|
@@ -63,15 +71,25 @@ var SecondaryText = /*#__PURE__*/function (_Component) {
|
|
|
63
71
|
dataTitle = _this$props.dataTitle,
|
|
64
72
|
dataId = _this$props.dataId,
|
|
65
73
|
onClick = _this$props.onClick,
|
|
66
|
-
customProps = _this$props.customProps
|
|
74
|
+
customProps = _this$props.customProps,
|
|
75
|
+
enableHighlight = _this$props.enableHighlight,
|
|
76
|
+
highlights = _this$props.highlights;
|
|
67
77
|
var SecondaryTextProps = customProps.SecondaryTextProps;
|
|
78
|
+
|
|
79
|
+
var _ref = highlights || {},
|
|
80
|
+
_ref$highlightData = _ref.highlightData,
|
|
81
|
+
highlightData = _ref$highlightData === void 0 ? [] : _ref$highlightData;
|
|
82
|
+
|
|
83
|
+
var displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? (0, _highlight.highlight)(_objectSpread({
|
|
84
|
+
text: text
|
|
85
|
+
}, highlights)) : text;
|
|
68
86
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
69
87
|
className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(className ? className : ''),
|
|
70
88
|
"data-title": dataTitle,
|
|
71
89
|
"data-id": dataId,
|
|
72
90
|
"data-test-id": dataId,
|
|
73
91
|
onClick: onClick
|
|
74
|
-
}, SecondaryTextProps),
|
|
92
|
+
}, SecondaryTextProps), displayContent);
|
|
75
93
|
}
|
|
76
94
|
}]);
|
|
77
95
|
|
|
@@ -13,6 +13,8 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
13
13
|
|
|
14
14
|
var _propTypes = require("./props/propTypes");
|
|
15
15
|
|
|
16
|
+
var _highlight = require("@zohodesk/components/es/Typography/highlight");
|
|
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); } }
|
|
@@ -61,13 +69,23 @@ var StatusText = /*#__PURE__*/function (_Component) {
|
|
|
61
69
|
text = _this$props.text,
|
|
62
70
|
dataTitle = _this$props.dataTitle,
|
|
63
71
|
fontWeight = _this$props.fontWeight,
|
|
64
|
-
dataId = _this$props.dataId
|
|
72
|
+
dataId = _this$props.dataId,
|
|
73
|
+
enableHighlight = _this$props.enableHighlight,
|
|
74
|
+
highlights = _this$props.highlights;
|
|
75
|
+
|
|
76
|
+
var _ref = highlights || {},
|
|
77
|
+
_ref$highlightData = _ref.highlightData,
|
|
78
|
+
highlightData = _ref$highlightData === void 0 ? [] : _ref$highlightData;
|
|
79
|
+
|
|
80
|
+
var displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? (0, _highlight.highlight)(_objectSpread({
|
|
81
|
+
text: text
|
|
82
|
+
}, highlights)) : text;
|
|
65
83
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
66
84
|
className: "".concat(_SecondaryTextModule["default"].statusText, " ").concat(_SecondaryTextModule["default"][color], " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : ''),
|
|
67
85
|
"data-title": dataTitle,
|
|
68
86
|
"data-id": dataId,
|
|
69
87
|
"data-test-id": dataId
|
|
70
|
-
},
|
|
88
|
+
}, displayContent);
|
|
71
89
|
}
|
|
72
90
|
}]);
|
|
73
91
|
|
|
@@ -15,6 +15,8 @@ var _propTypes = require("./props/propTypes");
|
|
|
15
15
|
|
|
16
16
|
var _Link = _interopRequireDefault(require("../../Link/Link"));
|
|
17
17
|
|
|
18
|
+
var _highlight = require("@zohodesk/components/es/Typography/highlight");
|
|
19
|
+
|
|
18
20
|
var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -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); } }
|
|
@@ -70,11 +78,19 @@ var TicketId = /*#__PURE__*/function (_Component) {
|
|
|
70
78
|
target = _this$props.target,
|
|
71
79
|
urlName = _this$props.urlName,
|
|
72
80
|
urlData = _this$props.urlData,
|
|
73
|
-
customProps = _this$props.customProps
|
|
81
|
+
customProps = _this$props.customProps,
|
|
82
|
+
enableHighlight = _this$props.enableHighlight,
|
|
83
|
+
highlights = _this$props.highlights;
|
|
74
84
|
var _customProps$LinkProp = customProps.LinkProps,
|
|
75
85
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
76
86
|
_customProps$TicketId = customProps.TicketIdProps,
|
|
77
87
|
TicketIdProps = _customProps$TicketId === void 0 ? {} : _customProps$TicketId;
|
|
88
|
+
var _highlights$highlight = highlights.highlightData,
|
|
89
|
+
highlightData = _highlights$highlight === void 0 ? [] : _highlights$highlight;
|
|
90
|
+
var processedText = enableHighlight && highlightData && highlightData.length > 0 && typeof text === 'string' ? (0, _highlight.highlight)(_objectSpread({
|
|
91
|
+
text: text
|
|
92
|
+
}, highlights)) : text;
|
|
93
|
+
var textContent = Array.isArray(processedText) ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, processedText) : processedText;
|
|
78
94
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
79
95
|
className: "".concat(_SecondaryTextModule["default"].ticketId, " ").concat(isLink ? _SecondaryTextModule["default"].ticketIdLink : '', " ").concat(className ? className : ''),
|
|
80
96
|
"data-id": dataId,
|
|
@@ -87,7 +103,7 @@ var TicketId = /*#__PURE__*/function (_Component) {
|
|
|
87
103
|
href: url,
|
|
88
104
|
target: target,
|
|
89
105
|
onClick: onClick
|
|
90
|
-
}, LinkProps),
|
|
106
|
+
}, LinkProps), textContent) : textContent);
|
|
91
107
|
}
|
|
92
108
|
}]);
|
|
93
109
|
|
|
@@ -13,6 +13,8 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
13
13
|
|
|
14
14
|
var _propTypes = require("./props/propTypes");
|
|
15
15
|
|
|
16
|
+
var _highlight = require("@zohodesk/components/es/Typography/highlight");
|
|
17
|
+
|
|
16
18
|
var _ExternalLink = _interopRequireDefault(require("../../ExternalLink/ExternalLink"));
|
|
17
19
|
|
|
18
20
|
var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
|
|
@@ -23,6 +25,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
25
|
|
|
24
26
|
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; }
|
|
25
27
|
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
26
34
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
35
|
|
|
28
36
|
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); } }
|
|
@@ -64,17 +72,27 @@ var Website = /*#__PURE__*/function (_Component) {
|
|
|
64
72
|
href = _this$props.href,
|
|
65
73
|
dataId = _this$props.dataId,
|
|
66
74
|
isLink = _this$props.isLink,
|
|
67
|
-
target = _this$props.target
|
|
75
|
+
target = _this$props.target,
|
|
76
|
+
enableHighlight = _this$props.enableHighlight,
|
|
77
|
+
highlights = _this$props.highlights;
|
|
78
|
+
|
|
79
|
+
var _ref = highlights || {},
|
|
80
|
+
_ref$highlightData = _ref.highlightData,
|
|
81
|
+
highlightData = _ref$highlightData === void 0 ? [] : _ref$highlightData;
|
|
82
|
+
|
|
83
|
+
var displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? (0, _highlight.highlight)(_objectSpread({
|
|
84
|
+
text: text
|
|
85
|
+
}, highlights)) : text;
|
|
68
86
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_ExternalLink["default"], {
|
|
69
87
|
className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(className ? className : ''),
|
|
70
88
|
href: href,
|
|
71
89
|
title: title,
|
|
72
90
|
dataId: dataId,
|
|
73
91
|
target: target
|
|
74
|
-
},
|
|
92
|
+
}, displayContent) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
93
|
className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(className ? className : ''),
|
|
76
94
|
"data-title": text
|
|
77
|
-
},
|
|
95
|
+
}, displayContent));
|
|
78
96
|
}
|
|
79
97
|
}]);
|
|
80
98
|
|
|
@@ -8,6 +8,8 @@ var AccountName_defaultProps = {
|
|
|
8
8
|
isLink: true,
|
|
9
9
|
dataId: 'accountName',
|
|
10
10
|
fontWeight: 'regular',
|
|
11
|
+
enableHighlight: false,
|
|
12
|
+
highlights: {},
|
|
11
13
|
customProps: {}
|
|
12
14
|
};
|
|
13
15
|
exports.AccountName_defaultProps = AccountName_defaultProps;
|
|
@@ -17,12 +19,16 @@ var ContactName_defaultProps = {
|
|
|
17
19
|
dataId: 'contactName',
|
|
18
20
|
fontWeight: 'regular',
|
|
19
21
|
i18nKeys: {},
|
|
22
|
+
enableHighlight: false,
|
|
23
|
+
highlights: {},
|
|
20
24
|
customProps: {}
|
|
21
25
|
};
|
|
22
26
|
exports.ContactName_defaultProps = ContactName_defaultProps;
|
|
23
27
|
var Email_defaultProps = {
|
|
24
28
|
isLink: true,
|
|
25
29
|
fontWeight: 'regular',
|
|
30
|
+
enableHighlight: false,
|
|
31
|
+
highlights: {},
|
|
26
32
|
customProps: {}
|
|
27
33
|
};
|
|
28
34
|
exports.Email_defaultProps = Email_defaultProps;
|
|
@@ -30,30 +36,42 @@ var PhoneNumber_defaultProps = {
|
|
|
30
36
|
isLink: true,
|
|
31
37
|
hasReload: false,
|
|
32
38
|
fontWeight: 'regular',
|
|
39
|
+
enableHighlight: false,
|
|
40
|
+
highlights: {},
|
|
33
41
|
customProps: {}
|
|
34
42
|
};
|
|
35
43
|
exports.PhoneNumber_defaultProps = PhoneNumber_defaultProps;
|
|
36
44
|
var PriorityText_defaultProps = {
|
|
37
45
|
color: 'black',
|
|
46
|
+
enableHighlight: false,
|
|
47
|
+
highlights: {},
|
|
38
48
|
dataId: 'priority'
|
|
39
49
|
};
|
|
40
50
|
exports.PriorityText_defaultProps = PriorityText_defaultProps;
|
|
41
51
|
var SecondaryText_defaultProps = {
|
|
52
|
+
enableHighlight: false,
|
|
53
|
+
highlights: {},
|
|
42
54
|
customProps: {}
|
|
43
55
|
};
|
|
44
56
|
exports.SecondaryText_defaultProps = SecondaryText_defaultProps;
|
|
45
57
|
var StatusText_defaultProps = {
|
|
46
58
|
color: 'black',
|
|
47
59
|
dataId: 'statusContainer',
|
|
60
|
+
enableHighlight: false,
|
|
61
|
+
highlights: {},
|
|
48
62
|
fontWeight: 'regular'
|
|
49
63
|
};
|
|
50
64
|
exports.StatusText_defaultProps = StatusText_defaultProps;
|
|
51
65
|
var TicketId_defaultProps = {
|
|
52
66
|
dataId: 'ticketId',
|
|
67
|
+
enableHighlight: false,
|
|
68
|
+
highlights: {},
|
|
53
69
|
customProps: {}
|
|
54
70
|
};
|
|
55
71
|
exports.TicketId_defaultProps = TicketId_defaultProps;
|
|
56
72
|
var Website_defaultProps = {
|
|
73
|
+
enableHighlight: false,
|
|
74
|
+
highlights: {},
|
|
57
75
|
isLink: true
|
|
58
76
|
};
|
|
59
77
|
exports.Website_defaultProps = Website_defaultProps;
|