@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
|
@@ -24,6 +24,8 @@ var AccountName_propTypes = {
|
|
|
24
24
|
secondaryAccountHref: _propTypes["default"].string,
|
|
25
25
|
secondaryAccountClick: _propTypes["default"].func,
|
|
26
26
|
secondaryAccountText: _propTypes["default"].string,
|
|
27
|
+
enableHighlight: _propTypes["default"].bool,
|
|
28
|
+
highlights: _propTypes["default"].object,
|
|
27
29
|
customProps: _propTypes["default"].shape({
|
|
28
30
|
LinkProps: _propTypes["default"].object,
|
|
29
31
|
TextProps: _propTypes["default"].object,
|
|
@@ -53,6 +55,8 @@ var ContactName_propTypes = {
|
|
|
53
55
|
}),
|
|
54
56
|
paidTitle: _propTypes["default"].string
|
|
55
57
|
}),
|
|
58
|
+
enableHighlight: _propTypes["default"].bool,
|
|
59
|
+
highlights: _propTypes["default"].object,
|
|
56
60
|
customProps: _propTypes["default"].shape({
|
|
57
61
|
LinkProps: _propTypes["default"].object,
|
|
58
62
|
TextProps: _propTypes["default"].object
|
|
@@ -63,6 +67,8 @@ var DepartmentText_propTypes = {
|
|
|
63
67
|
className: _propTypes["default"].string,
|
|
64
68
|
dataId: _propTypes["default"].string,
|
|
65
69
|
dataTitle: _propTypes["default"].string,
|
|
70
|
+
enableHighlight: _propTypes["default"].bool,
|
|
71
|
+
highlights: _propTypes["default"].object,
|
|
66
72
|
text: _propTypes["default"].string
|
|
67
73
|
};
|
|
68
74
|
exports.DepartmentText_propTypes = DepartmentText_propTypes;
|
|
@@ -76,6 +82,8 @@ var Email_propTypes = {
|
|
|
76
82
|
title: _propTypes["default"].string,
|
|
77
83
|
urlData: _propTypes["default"].object,
|
|
78
84
|
urlName: _propTypes["default"].string,
|
|
85
|
+
enableHighlight: _propTypes["default"].bool,
|
|
86
|
+
highlights: _propTypes["default"].object,
|
|
79
87
|
customProps: _propTypes["default"].shape({
|
|
80
88
|
LinkProps: _propTypes["default"].object,
|
|
81
89
|
TextProps: _propTypes["default"].object
|
|
@@ -100,6 +108,8 @@ var PhoneNumber_propTypes = {
|
|
|
100
108
|
title: _propTypes["default"].string,
|
|
101
109
|
urlData: _propTypes["default"].object,
|
|
102
110
|
urlName: _propTypes["default"].string,
|
|
111
|
+
enableHighlight: _propTypes["default"].bool,
|
|
112
|
+
highlights: _propTypes["default"].object,
|
|
103
113
|
customProps: _propTypes["default"].shape({
|
|
104
114
|
LinkProps: _propTypes["default"].object,
|
|
105
115
|
TextProps: _propTypes["default"].object
|
|
@@ -111,6 +121,8 @@ var PriorityText_propTypes = {
|
|
|
111
121
|
color: _propTypes["default"].oneOf(['red', 'green', 'gray', 'orange']),
|
|
112
122
|
dataId: _propTypes["default"].string,
|
|
113
123
|
dataTitle: _propTypes["default"].string,
|
|
124
|
+
enableHighlight: _propTypes["default"].bool,
|
|
125
|
+
highlights: _propTypes["default"].object,
|
|
114
126
|
text: _propTypes["default"].string
|
|
115
127
|
};
|
|
116
128
|
exports.PriorityText_propTypes = PriorityText_propTypes;
|
|
@@ -120,6 +132,8 @@ var SecondaryText_propTypes = {
|
|
|
120
132
|
dataTitle: _propTypes["default"].string,
|
|
121
133
|
onClick: _propTypes["default"].func,
|
|
122
134
|
text: _propTypes["default"].string,
|
|
135
|
+
enableHighlight: _propTypes["default"].bool,
|
|
136
|
+
highlights: _propTypes["default"].object,
|
|
123
137
|
customProps: _propTypes["default"].shape({
|
|
124
138
|
SecondaryTextProps: _propTypes["default"].object
|
|
125
139
|
})
|
|
@@ -131,6 +145,8 @@ var StatusText_propTypes = {
|
|
|
131
145
|
dataId: _propTypes["default"].string,
|
|
132
146
|
dataTitle: _propTypes["default"].string,
|
|
133
147
|
fontWeight: _propTypes["default"].oneOf(['regular', 'semibold', 'bold']),
|
|
148
|
+
enableHighlight: _propTypes["default"].bool,
|
|
149
|
+
highlights: _propTypes["default"].object,
|
|
134
150
|
text: _propTypes["default"].string
|
|
135
151
|
};
|
|
136
152
|
exports.StatusText_propTypes = StatusText_propTypes;
|
|
@@ -145,6 +161,8 @@ var TicketId_propTypes = {
|
|
|
145
161
|
url: _propTypes["default"].string,
|
|
146
162
|
urlData: _propTypes["default"].string,
|
|
147
163
|
urlName: _propTypes["default"].string,
|
|
164
|
+
enableHighlight: _propTypes["default"].bool,
|
|
165
|
+
highlights: _propTypes["default"].object,
|
|
148
166
|
customProps: _propTypes["default"].shape({
|
|
149
167
|
TicketIdProps: _propTypes["default"].object,
|
|
150
168
|
LinkProps: _propTypes["default"].object
|
|
@@ -158,6 +176,8 @@ var Website_propTypes = {
|
|
|
158
176
|
isLink: _propTypes["default"].bool,
|
|
159
177
|
target: _propTypes["default"].string,
|
|
160
178
|
text: _propTypes["default"].string,
|
|
179
|
+
enableHighlight: _propTypes["default"].bool,
|
|
180
|
+
highlights: _propTypes["default"].object,
|
|
161
181
|
title: _propTypes["default"].string
|
|
162
182
|
};
|
|
163
183
|
exports.Website_propTypes = Website_propTypes;
|
|
@@ -17,6 +17,8 @@ var _Link = _interopRequireDefault(require("../../Link/Link"));
|
|
|
17
17
|
|
|
18
18
|
var _cssUtils = require("@zohodesk/components/es/utils/cssUtils");
|
|
19
19
|
|
|
20
|
+
var _highlight = require("@zohodesk/components/es/Typography/highlight");
|
|
21
|
+
|
|
20
22
|
var _SubjectModule = _interopRequireDefault(require("./Subject.module.css"));
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -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); } }
|
|
@@ -75,11 +83,21 @@ var Subject = /*#__PURE__*/function (_Component) {
|
|
|
75
83
|
isDotted = _this$props.isDotted,
|
|
76
84
|
children = _this$props.children,
|
|
77
85
|
customProps = _this$props.customProps,
|
|
78
|
-
whiteSpace = _this$props.whiteSpace
|
|
86
|
+
whiteSpace = _this$props.whiteSpace,
|
|
87
|
+
enableHighlight = _this$props.enableHighlight,
|
|
88
|
+
highlights = _this$props.highlights;
|
|
79
89
|
var _customProps$LinkProp = customProps.LinkProps,
|
|
80
90
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
81
91
|
_customProps$TextProp = customProps.TextProps,
|
|
82
92
|
TextProps = _customProps$TextProp === void 0 ? {} : _customProps$TextProp;
|
|
93
|
+
|
|
94
|
+
var _ref = highlights || {},
|
|
95
|
+
_ref$highlightData = _ref.highlightData,
|
|
96
|
+
highlightData = _ref$highlightData === void 0 ? [] : _ref$highlightData;
|
|
97
|
+
|
|
98
|
+
var displayContent = enableHighlight && highlightData && highlightData.length > 0 && text ? (0, _highlight.highlight)(_objectSpread({
|
|
99
|
+
text: text
|
|
100
|
+
}, highlights)) : children ? children : text;
|
|
83
101
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
|
|
84
102
|
urlName: urlName,
|
|
85
103
|
href: href,
|
|
@@ -90,13 +108,13 @@ var Subject = /*#__PURE__*/function (_Component) {
|
|
|
90
108
|
title: text,
|
|
91
109
|
target: target,
|
|
92
110
|
"data-title-wrap": whiteSpace
|
|
93
|
-
}, LinkProps),
|
|
111
|
+
}, LinkProps), displayContent) : /*#__PURE__*/_react["default"].createElement("span", _extends({
|
|
94
112
|
className: "".concat(_SubjectModule["default"].subject, " ").concat(isDotted ? _SubjectModule["default"].dotted : '', " ").concat(_cssUtils.whiteSpaceClassMapping[whiteSpace], " ").concat(className, " ").concat(_SubjectModule["default"]["font_".concat(fontWeight)]),
|
|
95
113
|
"data-title": text,
|
|
96
114
|
"data-id": dataId,
|
|
97
115
|
"data-test-id": dataId,
|
|
98
116
|
"data-title-wrap": whiteSpace
|
|
99
|
-
}, TextProps),
|
|
117
|
+
}, TextProps), displayContent));
|
|
100
118
|
}
|
|
101
119
|
}]);
|
|
102
120
|
|
|
@@ -9,6 +9,29 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
11
|
|
|
12
|
+
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; }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
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; }
|
|
17
|
+
|
|
18
|
+
var highlightsStyleShape = _propTypes["default"].shape({
|
|
19
|
+
weight: _propTypes["default"].oneOf(['regular', 'light', 'semibold', 'bold']),
|
|
20
|
+
transform: _propTypes["default"].oneOf(['default', 'upper', 'lower', 'capital']),
|
|
21
|
+
decoration: _propTypes["default"].oneOf(['default', 'underline', 'strike', 'overline']),
|
|
22
|
+
typeFace: _propTypes["default"].oneOf(['normal', 'italic']),
|
|
23
|
+
customClass: _propTypes["default"].object
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
var commonHighlightProps = {
|
|
27
|
+
customStyle: _propTypes["default"].object,
|
|
28
|
+
isExcludedIndex: _propTypes["default"].bool,
|
|
29
|
+
isCaseSensitive: _propTypes["default"].bool,
|
|
30
|
+
isWholeWord: _propTypes["default"].bool,
|
|
31
|
+
tagName: _propTypes["default"].string,
|
|
32
|
+
render: _propTypes["default"].element,
|
|
33
|
+
highlightsStyle: _propTypes["default"].objectOf(highlightsStyleShape)
|
|
34
|
+
};
|
|
12
35
|
var propTypes = {
|
|
13
36
|
className: _propTypes["default"].string,
|
|
14
37
|
dataId: _propTypes["default"].string,
|
|
@@ -26,6 +49,15 @@ var propTypes = {
|
|
|
26
49
|
LinkProps: _propTypes["default"].object,
|
|
27
50
|
TextProps: _propTypes["default"].object
|
|
28
51
|
}),
|
|
29
|
-
whiteSpace: _propTypes["default"].oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'])
|
|
52
|
+
whiteSpace: _propTypes["default"].oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']),
|
|
53
|
+
// Highlight props
|
|
54
|
+
enableHighlight: _propTypes["default"].bool,
|
|
55
|
+
highlights: _propTypes["default"].objectOf(_propTypes["default"].shape(_objectSpread({
|
|
56
|
+
text: _propTypes["default"].string,
|
|
57
|
+
highlightData: _propTypes["default"].arrayOf(_propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].shape(_objectSpread({
|
|
58
|
+
highlightText: _propTypes["default"].string,
|
|
59
|
+
index: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].number), _propTypes["default"].number])
|
|
60
|
+
}, commonHighlightProps))]))
|
|
61
|
+
}, commonHighlightProps)))
|
|
30
62
|
};
|
|
31
63
|
exports.propTypes = propTypes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/dot",
|
|
3
|
-
"version": "1.0.0-temp-
|
|
3
|
+
"version": "1.0.0-temp-218",
|
|
4
4
|
"main": "lib/index",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"sstest": "react-cli sstest",
|
|
40
40
|
"common_package_build": "cd ../common && npm run build && cd ../dot",
|
|
41
41
|
"docs": "npm run css:review && review:props && react-cli docs",
|
|
42
|
-
"prepublishOnly": "node prePublish.js && npm run
|
|
42
|
+
"prepublishOnly": "node prePublish.js && npm run css:review && npm run review:props",
|
|
43
43
|
"postpublish": "node postPublish.js",
|
|
44
44
|
"test-clean": "react-cli clean ./coverage && react-cli clean ./unittest react-cli clean ./es && react-cli clean ./lib && react-cli clean ./package-lock.json && react-cli clean ./result.json",
|
|
45
45
|
"download": "npm run downloadOnly && cd ../ && npm run download",
|
|
@@ -73,12 +73,12 @@
|
|
|
73
73
|
"@zohodesk-private/node-plugins": "1.1.13",
|
|
74
74
|
"@zohodesk-private/react-prop-validator": "1.2.3",
|
|
75
75
|
"@zohodesk/a11y": "2.3.8",
|
|
76
|
-
"@zohodesk/components": "1.
|
|
76
|
+
"@zohodesk/components": "1.0.0-temp-235",
|
|
77
77
|
"@zohodesk/hooks": "2.0.5",
|
|
78
78
|
"@zohodesk/icons": "1.1.0",
|
|
79
79
|
"@zohodesk/layout": "^3.1.0",
|
|
80
80
|
"@zohodesk/svg": "1.2.2",
|
|
81
|
-
"@zohodesk/utils": "1.3.
|
|
81
|
+
"@zohodesk/utils": "1.3.15",
|
|
82
82
|
"@zohodesk/variables": "1.1.0",
|
|
83
83
|
"@zohodesk/virtualizer": "1.0.13",
|
|
84
84
|
"react-sortable-hoc": "^0.8.3",
|
|
@@ -89,20 +89,14 @@
|
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"velocity-react": "1.4.3",
|
|
91
91
|
"@zohodesk/variables": "1.1.0",
|
|
92
|
-
"@zohodesk/components": "1.
|
|
92
|
+
"@zohodesk/components": "1.4.19",
|
|
93
93
|
"@zohodesk/icons": "1.1.0",
|
|
94
94
|
"@zohodesk/svg": "1.2.2",
|
|
95
95
|
"@zohodesk/virtualizer": "1.0.13",
|
|
96
96
|
"react-sortable-hoc": "^0.8.3",
|
|
97
97
|
"@zohodesk/hooks": "2.0.5",
|
|
98
|
-
"@zohodesk/utils": "1.3.
|
|
98
|
+
"@zohodesk/utils": "1.3.15",
|
|
99
99
|
"@zohodesk/a11y": "2.3.8",
|
|
100
100
|
"@zohodesk/layout": "3.1.0"
|
|
101
|
-
},
|
|
102
|
-
"dependencies": {
|
|
103
|
-
"@zohodesk/react-cli": "^1.1.27"
|
|
104
|
-
},
|
|
105
|
-
"volta": {
|
|
106
|
-
"node": "18.12.0"
|
|
107
101
|
}
|
|
108
102
|
}
|