@zohodesk/dot 1.0.0-temp-218 → 1.0.0-temp-220

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.
Files changed (44) hide show
  1. package/README.md +10 -0
  2. package/es/list/SecondaryText/AccountName.js +2 -12
  3. package/es/list/SecondaryText/ContactName.js +2 -12
  4. package/es/list/SecondaryText/DepartmentText.js +2 -12
  5. package/es/list/SecondaryText/Email.js +3 -13
  6. package/es/list/SecondaryText/PhoneNumber.js +5 -15
  7. package/es/list/SecondaryText/PriorityText.js +2 -12
  8. package/es/list/SecondaryText/SecondaryText.js +2 -12
  9. package/es/list/SecondaryText/SecondaryText.module.css +5 -1
  10. package/es/list/SecondaryText/StatusText.js +2 -12
  11. package/es/list/SecondaryText/TicketId.js +2 -13
  12. package/es/list/SecondaryText/Website.js +3 -13
  13. package/es/list/SecondaryText/__tests__/__snapshots__/PhoneNumber.spec.js.snap +1 -1
  14. package/es/list/SecondaryText/props/defaultProps.js +0 -18
  15. package/es/list/SecondaryText/props/propTypes.js +0 -20
  16. package/es/list/Subject/Subject.js +3 -13
  17. package/es/list/Subject/props/defaultProps.js +1 -3
  18. package/es/list/Subject/props/propTypes.js +1 -28
  19. package/es/version2/GlobalNotification/GlobalNotification.js +46 -7
  20. package/es/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +9 -0
  21. package/es/version2/GlobalNotification/props/propTypes.js +2 -1
  22. package/es/version2/GlobalNotification/utils/constants.js +6 -0
  23. package/lib/list/SecondaryText/AccountName.js +2 -20
  24. package/lib/list/SecondaryText/ContactName.js +2 -20
  25. package/lib/list/SecondaryText/DepartmentText.js +2 -20
  26. package/lib/list/SecondaryText/Email.js +3 -21
  27. package/lib/list/SecondaryText/PhoneNumber.js +5 -23
  28. package/lib/list/SecondaryText/PriorityText.js +2 -20
  29. package/lib/list/SecondaryText/SecondaryText.js +2 -20
  30. package/lib/list/SecondaryText/SecondaryText.module.css +5 -1
  31. package/lib/list/SecondaryText/StatusText.js +2 -20
  32. package/lib/list/SecondaryText/TicketId.js +2 -18
  33. package/lib/list/SecondaryText/Website.js +3 -21
  34. package/lib/list/SecondaryText/__tests__/__snapshots__/PhoneNumber.spec.js.snap +1 -1
  35. package/lib/list/SecondaryText/props/defaultProps.js +0 -18
  36. package/lib/list/SecondaryText/props/propTypes.js +0 -20
  37. package/lib/list/Subject/Subject.js +3 -21
  38. package/lib/list/Subject/props/defaultProps.js +1 -3
  39. package/lib/list/Subject/props/propTypes.js +1 -33
  40. package/lib/version2/GlobalNotification/GlobalNotification.js +68 -18
  41. package/lib/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +10 -0
  42. package/lib/version2/GlobalNotification/props/propTypes.js +2 -1
  43. package/lib/version2/GlobalNotification/utils/constants.js +13 -0
  44. package/package.json +13 -13
@@ -1,20 +1,4 @@
1
1
  import PropTypes from 'prop-types';
2
- const highlightsStyleShape = PropTypes.shape({
3
- weight: PropTypes.oneOf(['regular', 'light', 'semibold', 'bold']),
4
- transform: PropTypes.oneOf(['default', 'upper', 'lower', 'capital']),
5
- decoration: PropTypes.oneOf(['default', 'underline', 'strike', 'overline']),
6
- typeFace: PropTypes.oneOf(['normal', 'italic']),
7
- customClass: PropTypes.object
8
- });
9
- const commonHighlightProps = {
10
- customStyle: PropTypes.object,
11
- isExcludedIndex: PropTypes.bool,
12
- isCaseSensitive: PropTypes.bool,
13
- isWholeWord: PropTypes.bool,
14
- tagName: PropTypes.string,
15
- render: PropTypes.element,
16
- highlightsStyle: PropTypes.objectOf(highlightsStyleShape)
17
- };
18
2
  export const propTypes = {
19
3
  className: PropTypes.string,
20
4
  dataId: PropTypes.string,
@@ -32,16 +16,5 @@ export const propTypes = {
32
16
  LinkProps: PropTypes.object,
33
17
  TextProps: PropTypes.object
34
18
  }),
35
- whiteSpace: PropTypes.oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']),
36
- // Highlight props
37
- enableHighlight: PropTypes.bool,
38
- highlights: PropTypes.objectOf(PropTypes.shape({
39
- text: PropTypes.string,
40
- highlightData: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
41
- highlightText: PropTypes.string,
42
- index: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),
43
- ...commonHighlightProps
44
- })])),
45
- ...commonHighlightProps
46
- }))
19
+ whiteSpace: PropTypes.oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'])
47
20
  };
@@ -7,6 +7,8 @@ import AlertClose from "../AlertClose/AlertClose";
7
7
  import style from "./GlobalNotification.module.css";
8
8
  import { Container, Box } from '@zohodesk/components/es/Layout';
9
9
  import { cancelBubblingEffect } from '@zohodesk/components/es/utils/Common';
10
+ import getCurrentTime from "../../utils/getCurrentTime";
11
+ import { STATUS } from "./utils/constants";
10
12
  export default class GlobalNotification extends React.Component {
11
13
  constructor(props) {
12
14
  super(props);
@@ -15,6 +17,8 @@ export default class GlobalNotification extends React.Component {
15
17
  shadowClose: true
16
18
  };
17
19
  this.onClose = this.onClose.bind(this);
20
+ this.getNotiifcationData = this.getNotiifcationData.bind(this);
21
+ this.handleStatusChange = this.handleStatusChange.bind(this);
18
22
  }
19
23
 
20
24
  componentDidMount() {
@@ -24,18 +28,44 @@ export default class GlobalNotification extends React.Component {
24
28
  id,
25
29
  needAutoClose
26
30
  } = this.props;
31
+ this.handleStatusChange(STATUS.MOUNTED);
27
32
 
28
33
  if (needAutoClose) {
29
34
  this.hideMessageTimer = setTimeout(() => {
30
35
  hideMessage(id);
36
+ this.handleStatusChange(STATUS.DISMISSING);
31
37
  }, hideTime);
32
38
  }
33
39
  }
34
40
 
41
+ componentDidUpdate(prevProps) {
42
+ if (prevProps.id === this.props.id && (prevProps.message !== this.props.message || prevProps.type !== this.props.type)) {
43
+ this.handleStatusChange(STATUS.UPDATED);
44
+ }
45
+ }
46
+
35
47
  componentWillUnmount() {
36
48
  if (this.hideMessageTimer) {
37
49
  clearTimeout(this.hideMessageTimer);
38
50
  }
51
+
52
+ this.handleStatusChange(STATUS.UNMOUNTED);
53
+ }
54
+
55
+ handleStatusChange(status) {
56
+ const {
57
+ onStatusChange
58
+ } = this.props;
59
+
60
+ if (typeof onStatusChange == 'function') {
61
+ const notificationData = this.getNotiifcationData();
62
+ const currentTime = getCurrentTime();
63
+ onStatusChange({
64
+ status,
65
+ ...notificationData,
66
+ time: currentTime
67
+ });
68
+ }
39
69
  }
40
70
 
41
71
  onClose(e) {
@@ -47,20 +77,31 @@ export default class GlobalNotification extends React.Component {
47
77
  this.setState({
48
78
  shadowClose: false
49
79
  });
80
+ this.handleStatusChange(STATUS.DISMISSING);
50
81
  hideMessage && hideMessage(id);
51
82
  onClose && onClose(e);
52
83
  }
53
84
 
85
+ getNotiifcationData() {
86
+ const {
87
+ id,
88
+ type,
89
+ message
90
+ } = this.props;
91
+ return {
92
+ id,
93
+ type,
94
+ message
95
+ };
96
+ }
97
+
54
98
  render() {
55
99
  let {
56
- type,
57
- message,
58
100
  hideMessage,
59
101
  onClick,
60
102
  i18nKeys = {},
61
103
  customProps,
62
104
  dataSelectorId,
63
- id,
64
105
  needShadow,
65
106
  shadowCount,
66
107
  eleRef
@@ -71,15 +112,13 @@ export default class GlobalNotification extends React.Component {
71
112
  let {
72
113
  closeTitle = 'Close'
73
114
  } = i18nKeys;
74
- return /*#__PURE__*/React.createElement(GlobalNotificationUI, {
75
- type: type,
76
- message: message,
115
+ const notificationData = this.getNotiifcationData();
116
+ return /*#__PURE__*/React.createElement(GlobalNotificationUI, { ...notificationData,
77
117
  hideMessage: hideMessage,
78
118
  onClick: onClick,
79
119
  closeTitle: closeTitle,
80
120
  customProps: customProps,
81
121
  dataSelectorId: dataSelectorId,
82
- id: id,
83
122
  shadowCount: shadowCount,
84
123
  onClose: this.onClose,
85
124
  needShadow: shadowClose && needShadow,
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
3
  import GlobalNotification from "../GlobalNotification";
4
+ import { STATUS } from "../utils/constants";
4
5
  describe('GlobalNotification', () => {
5
6
  test('rendering the defult props', () => {
6
7
  const {
@@ -8,4 +9,12 @@ describe('GlobalNotification', () => {
8
9
  } = render( /*#__PURE__*/React.createElement(GlobalNotification, null));
9
10
  expect(asFragment()).toMatchSnapshot();
10
11
  });
12
+ });
13
+ describe('GlobalNotification Constants', () => {
14
+ test('should have correct constant values', () => {
15
+ expect(STATUS.MOUNTED).toBe('mounted');
16
+ expect(STATUS.UPDATED).toBe('updated');
17
+ expect(STATUS.DISMISSING).toBe('dismissing');
18
+ expect(STATUS.UNMOUNTED).toBe('unmounted');
19
+ });
11
20
  });
@@ -15,7 +15,8 @@ export const propTypes = {
15
15
  needAutoClose: PropTypes.bool,
16
16
  isCollapseView: PropTypes.bool,
17
17
  shadowCount: PropTypes.number,
18
- needShadow: PropTypes.bool
18
+ needShadow: PropTypes.bool,
19
+ onStatusChange: PropTypes.func
19
20
  };
20
21
  export const UI_propTypes = {
21
22
  dataSelectorId: PropTypes.string,
@@ -0,0 +1,6 @@
1
+ export const STATUS = {
2
+ MOUNTED: 'mounted',
3
+ UNMOUNTED: 'unmounted',
4
+ UPDATED: 'updated',
5
+ DISMISSING: 'dismissing'
6
+ };
@@ -15,8 +15,6 @@ 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
-
20
18
  var _Link = _interopRequireDefault(require("../../Link/Link"));
21
19
 
22
20
  var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
@@ -29,12 +27,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
29
27
 
30
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); }
31
29
 
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
-
38
30
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
39
31
 
40
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); } }
@@ -85,17 +77,7 @@ var AccountName = /*#__PURE__*/function (_Component) {
85
77
  secondaryAccountHref = _this$props.secondaryAccountHref,
86
78
  secondaryAccountClick = _this$props.secondaryAccountClick,
87
79
  secondaryAccountText = _this$props.secondaryAccountText,
88
- highlights = _this$props.highlights,
89
- enableHighlight = _this$props.enableHighlight,
90
80
  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;
99
81
  var _customProps$LinkProp = customProps.LinkProps,
100
82
  LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
101
83
  _customProps$TextProp = customProps.TextProps,
@@ -129,9 +111,9 @@ var AccountName = /*#__PURE__*/function (_Component) {
129
111
  ariaLabel: "Account Name ".concat(text)
130
112
  }), /*#__PURE__*/_react["default"].createElement("div", {
131
113
  className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
132
- }, displayContent)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
114
+ }, text)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
133
115
  className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '', " ").concat(notAccessible ? _SecondaryTextModule["default"].disable : '')
134
- }, TextProps), displayContent)), secondaryAccountText && /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
116
+ }, TextProps), text)), secondaryAccountText && /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_Link["default"], {
135
117
  href: secondaryAccountHref,
136
118
  onClick: secondaryAccountClick,
137
119
  className: _SecondaryTextModule["default"].link
@@ -15,8 +15,6 @@ 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
-
20
18
  var _Link = _interopRequireDefault(require("../../Link/Link"));
21
19
 
22
20
  var _SentimentStatus = _interopRequireDefault(require("../SentimentStatus/SentimentStatus"));
@@ -33,12 +31,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
33
31
 
34
32
  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); }
35
33
 
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
-
42
34
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
43
35
 
44
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); } }
@@ -89,8 +81,6 @@ var ContactName = /*#__PURE__*/function (_Component) {
89
81
  notAccessible = _this$props$notAccess === void 0 ? false : _this$props$notAccess,
90
82
  fontWeight = _this$props.fontWeight,
91
83
  i18nKeys = _this$props.i18nKeys,
92
- highlights = _this$props.highlights,
93
- enableHighlight = _this$props.enableHighlight,
94
84
  customProps = _this$props.customProps;
95
85
  var _i18nKeys$sentimentTi = i18nKeys.sentimentTitles,
96
86
  sentimentTitles = _i18nKeys$sentimentTi === void 0 ? {
@@ -105,14 +95,6 @@ var ContactName = /*#__PURE__*/function (_Component) {
105
95
  LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
106
96
  _customProps$TextProp = customProps.TextProps,
107
97
  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;
116
98
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
117
99
  alignBox: "row",
118
100
  align: "baseline",
@@ -139,10 +121,10 @@ var ContactName = /*#__PURE__*/function (_Component) {
139
121
  ariaLabel: "Contact Name ".concat(text)
140
122
  }), /*#__PURE__*/_react["default"].createElement("div", {
141
123
  className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
142
- }, displayContent)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
124
+ }, text)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
143
125
  className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '', " ").concat(notAccessible ? _SecondaryTextModule["default"].disable : ''),
144
126
  "data-title": dataTitle
145
- }, TextProps), displayContent)), sentimentType && /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_SentimentStatus["default"], {
127
+ }, TextProps), text)), sentimentType && /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_SentimentStatus["default"], {
146
128
  type: sentimentType,
147
129
  dataTitle: sentimentDataTitle
148
130
  })));
@@ -11,8 +11,6 @@ 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
-
16
14
  var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
17
15
 
18
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -21,12 +19,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
21
19
 
22
20
  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
21
 
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
-
30
22
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
31
23
 
32
24
  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,23 +57,13 @@ var DepartmentText = /*#__PURE__*/function (_Component) {
65
57
  className = _this$props.className,
66
58
  text = _this$props.text,
67
59
  dataTitle = _this$props.dataTitle,
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;
60
+ dataId = _this$props.dataId;
79
61
  return /*#__PURE__*/_react["default"].createElement("div", {
80
62
  className: "".concat(_SecondaryTextModule["default"].departmentText, " ").concat(className ? className : ''),
81
63
  "data-title": dataTitle,
82
64
  "data-id": dataId,
83
65
  "data-test-id": dataId
84
- }, displayContent);
66
+ }, text);
85
67
  }
86
68
  }]);
87
69
 
@@ -13,8 +13,6 @@ 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
-
18
16
  var _Link = _interopRequireDefault(require("../../Link/Link"));
19
17
 
20
18
  var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
@@ -27,12 +25,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
27
25
 
28
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); }
29
27
 
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
-
36
28
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
37
29
 
38
30
  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,21 +69,11 @@ var Email = /*#__PURE__*/function (_Component) {
77
69
  isLink = _this$props.isLink,
78
70
  target = _this$props.target,
79
71
  fontWeight = _this$props.fontWeight,
80
- customProps = _this$props.customProps,
81
- enableHighlight = _this$props.enableHighlight,
82
- highlights = _this$props.highlights;
72
+ customProps = _this$props.customProps;
83
73
  var _customProps$LinkProp = customProps.LinkProps,
84
74
  LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
85
75
  _customProps$TextProp = customProps.TextProps,
86
76
  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;
95
77
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
96
78
  href: href,
97
79
  title: title,
@@ -101,10 +83,10 @@ var Email = /*#__PURE__*/function (_Component) {
101
83
  className: _SecondaryTextModule["default"].link
102
84
  }, LinkProps), /*#__PURE__*/_react["default"].createElement("div", {
103
85
  className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
104
- }, displayContent)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
86
+ }, text)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
105
87
  className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : ''),
106
88
  "data-title": title
107
- }, TextProps), displayContent));
89
+ }, TextProps), text));
108
90
  }
109
91
  }]);
110
92
 
@@ -13,8 +13,6 @@ 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
-
18
16
  var _Link = _interopRequireDefault(require("../../Link/Link"));
19
17
 
20
18
  var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
@@ -27,12 +25,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
27
25
 
28
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); }
29
27
 
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
-
36
28
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
37
29
 
38
30
  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); } }
@@ -79,21 +71,11 @@ var PhoneNumber = /*#__PURE__*/function (_Component) {
79
71
  target = _this$props.target,
80
72
  hasReload = _this$props.hasReload,
81
73
  fontWeight = _this$props.fontWeight,
82
- customProps = _this$props.customProps,
83
- enableHighlight = _this$props.enableHighlight,
84
- highlights = _this$props.highlights;
74
+ customProps = _this$props.customProps;
85
75
  var _customProps$LinkProp = customProps.LinkProps,
86
76
  LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
87
77
  _customProps$TextProp = customProps.TextProps,
88
78
  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;
97
79
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
98
80
  href: href,
99
81
  title: title,
@@ -104,11 +86,11 @@ var PhoneNumber = /*#__PURE__*/function (_Component) {
104
86
  hasReload: hasReload,
105
87
  className: _SecondaryTextModule["default"].link
106
88
  }, LinkProps), /*#__PURE__*/_react["default"].createElement("div", {
107
- className: "".concat(_SecondaryTextModule["default"].phoneNumber, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
108
- }, displayContent)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
109
- className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : ''),
89
+ className: "".concat(_SecondaryTextModule["default"].phoneNumber, " ").concat(_SecondaryTextModule["default"].phonetxt, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : '')
90
+ }, text)) : /*#__PURE__*/_react["default"].createElement("div", _extends({
91
+ className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(_SecondaryTextModule["default"].phonetxt, " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : ''),
110
92
  "data-title": title
111
- }, TextProps), displayContent));
93
+ }, TextProps), text));
112
94
  }
113
95
  }]);
114
96
 
@@ -13,8 +13,6 @@ 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
-
18
16
  var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
19
17
 
20
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -23,12 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
23
21
 
24
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; }
25
23
 
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
-
32
24
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
33
25
 
34
26
  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); } }
@@ -68,23 +60,13 @@ var PriorityText = /*#__PURE__*/function (_Component) {
68
60
  color = _this$props.color,
69
61
  text = _this$props.text,
70
62
  dataTitle = _this$props.dataTitle,
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;
63
+ dataId = _this$props.dataId;
82
64
  return /*#__PURE__*/_react["default"].createElement("div", {
83
65
  className: "".concat(_SecondaryTextModule["default"].priorityText, " ").concat(_SecondaryTextModule["default"][color], " ").concat(className ? className : ''),
84
66
  "data-title": dataTitle,
85
67
  "data-id": dataId,
86
68
  "data-test-id": dataId
87
- }, displayContent);
69
+ }, text);
88
70
  }
89
71
  }]);
90
72
 
@@ -13,8 +13,6 @@ 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
-
18
16
  var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
19
17
 
20
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -25,12 +23,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
25
23
 
26
24
  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
25
 
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
-
34
26
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
35
27
 
36
28
  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,25 +63,15 @@ var SecondaryText = /*#__PURE__*/function (_Component) {
71
63
  dataTitle = _this$props.dataTitle,
72
64
  dataId = _this$props.dataId,
73
65
  onClick = _this$props.onClick,
74
- customProps = _this$props.customProps,
75
- enableHighlight = _this$props.enableHighlight,
76
- highlights = _this$props.highlights;
66
+ customProps = _this$props.customProps;
77
67
  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;
86
68
  return /*#__PURE__*/_react["default"].createElement("div", _extends({
87
69
  className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(className ? className : ''),
88
70
  "data-title": dataTitle,
89
71
  "data-id": dataId,
90
72
  "data-test-id": dataId,
91
73
  onClick: onClick
92
- }, SecondaryTextProps), displayContent);
74
+ }, SecondaryTextProps), text);
93
75
  }
94
76
  }]);
95
77
 
@@ -19,7 +19,7 @@
19
19
  color: var(--zdt_secondaryText_black_text);
20
20
  }
21
21
  .textStyle, .link{
22
- display: block
22
+ display: block
23
23
  }
24
24
  .textStyle.textBold {
25
25
  font-family: var(--zd_bold);
@@ -134,3 +134,7 @@ display: block
134
134
  .black {
135
135
  color: var(--zdt_secondaryText_black_text);
136
136
  }
137
+
138
+ .phonetxt {
139
+ composes: ltr-dir from '~@zohodesk/components/es/common/common.module.css';
140
+ }