@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.
- package/README.md +10 -0
- package/es/list/SecondaryText/AccountName.js +2 -12
- package/es/list/SecondaryText/ContactName.js +2 -12
- package/es/list/SecondaryText/DepartmentText.js +2 -12
- package/es/list/SecondaryText/Email.js +3 -13
- package/es/list/SecondaryText/PhoneNumber.js +5 -15
- package/es/list/SecondaryText/PriorityText.js +2 -12
- package/es/list/SecondaryText/SecondaryText.js +2 -12
- package/es/list/SecondaryText/SecondaryText.module.css +5 -1
- package/es/list/SecondaryText/StatusText.js +2 -12
- package/es/list/SecondaryText/TicketId.js +2 -13
- package/es/list/SecondaryText/Website.js +3 -13
- package/es/list/SecondaryText/__tests__/__snapshots__/PhoneNumber.spec.js.snap +1 -1
- package/es/list/SecondaryText/props/defaultProps.js +0 -18
- package/es/list/SecondaryText/props/propTypes.js +0 -20
- package/es/list/Subject/Subject.js +3 -13
- package/es/list/Subject/props/defaultProps.js +1 -3
- package/es/list/Subject/props/propTypes.js +1 -28
- package/es/version2/GlobalNotification/GlobalNotification.js +46 -7
- package/es/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +9 -0
- package/es/version2/GlobalNotification/props/propTypes.js +2 -1
- package/es/version2/GlobalNotification/utils/constants.js +6 -0
- package/lib/list/SecondaryText/AccountName.js +2 -20
- package/lib/list/SecondaryText/ContactName.js +2 -20
- package/lib/list/SecondaryText/DepartmentText.js +2 -20
- package/lib/list/SecondaryText/Email.js +3 -21
- package/lib/list/SecondaryText/PhoneNumber.js +5 -23
- package/lib/list/SecondaryText/PriorityText.js +2 -20
- package/lib/list/SecondaryText/SecondaryText.js +2 -20
- package/lib/list/SecondaryText/SecondaryText.module.css +5 -1
- package/lib/list/SecondaryText/StatusText.js +2 -20
- package/lib/list/SecondaryText/TicketId.js +2 -18
- package/lib/list/SecondaryText/Website.js +3 -21
- package/lib/list/SecondaryText/__tests__/__snapshots__/PhoneNumber.spec.js.snap +1 -1
- package/lib/list/SecondaryText/props/defaultProps.js +0 -18
- package/lib/list/SecondaryText/props/propTypes.js +0 -20
- package/lib/list/Subject/Subject.js +3 -21
- package/lib/list/Subject/props/defaultProps.js +1 -3
- package/lib/list/Subject/props/propTypes.js +1 -33
- package/lib/version2/GlobalNotification/GlobalNotification.js +68 -18
- package/lib/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +10 -0
- package/lib/version2/GlobalNotification/props/propTypes.js +2 -1
- package/lib/version2/GlobalNotification/utils/constants.js +13 -0
- package/package.json +13 -13
|
@@ -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); } }
|
|
@@ -69,23 +61,13 @@ var StatusText = /*#__PURE__*/function (_Component) {
|
|
|
69
61
|
text = _this$props.text,
|
|
70
62
|
dataTitle = _this$props.dataTitle,
|
|
71
63
|
fontWeight = _this$props.fontWeight,
|
|
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;
|
|
64
|
+
dataId = _this$props.dataId;
|
|
83
65
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
84
66
|
className: "".concat(_SecondaryTextModule["default"].statusText, " ").concat(_SecondaryTextModule["default"][color], " ").concat(_SecondaryTextModule["default"]["font_".concat(fontWeight)], " ").concat(className ? className : ''),
|
|
85
67
|
"data-title": dataTitle,
|
|
86
68
|
"data-id": dataId,
|
|
87
69
|
"data-test-id": dataId
|
|
88
|
-
},
|
|
70
|
+
}, text);
|
|
89
71
|
}
|
|
90
72
|
}]);
|
|
91
73
|
|
|
@@ -15,8 +15,6 @@ 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
|
-
|
|
20
18
|
var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
|
|
21
19
|
|
|
22
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -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); } }
|
|
@@ -78,19 +70,11 @@ var TicketId = /*#__PURE__*/function (_Component) {
|
|
|
78
70
|
target = _this$props.target,
|
|
79
71
|
urlName = _this$props.urlName,
|
|
80
72
|
urlData = _this$props.urlData,
|
|
81
|
-
customProps = _this$props.customProps
|
|
82
|
-
enableHighlight = _this$props.enableHighlight,
|
|
83
|
-
highlights = _this$props.highlights;
|
|
73
|
+
customProps = _this$props.customProps;
|
|
84
74
|
var _customProps$LinkProp = customProps.LinkProps,
|
|
85
75
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
86
76
|
_customProps$TicketId = customProps.TicketIdProps,
|
|
87
77
|
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;
|
|
94
78
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
95
79
|
className: "".concat(_SecondaryTextModule["default"].ticketId, " ").concat(isLink ? _SecondaryTextModule["default"].ticketIdLink : '', " ").concat(className ? className : ''),
|
|
96
80
|
"data-id": dataId,
|
|
@@ -103,7 +87,7 @@ var TicketId = /*#__PURE__*/function (_Component) {
|
|
|
103
87
|
href: url,
|
|
104
88
|
target: target,
|
|
105
89
|
onClick: onClick
|
|
106
|
-
}, LinkProps),
|
|
90
|
+
}, LinkProps), text) : text);
|
|
107
91
|
}
|
|
108
92
|
}]);
|
|
109
93
|
|
|
@@ -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 _ExternalLink = _interopRequireDefault(require("../../ExternalLink/ExternalLink"));
|
|
19
17
|
|
|
20
18
|
var _SecondaryTextModule = _interopRequireDefault(require("./SecondaryText.module.css"));
|
|
@@ -25,12 +23,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
23
|
|
|
26
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; }
|
|
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); } }
|
|
@@ -72,27 +64,17 @@ var Website = /*#__PURE__*/function (_Component) {
|
|
|
72
64
|
href = _this$props.href,
|
|
73
65
|
dataId = _this$props.dataId,
|
|
74
66
|
isLink = _this$props.isLink,
|
|
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;
|
|
67
|
+
target = _this$props.target;
|
|
86
68
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_ExternalLink["default"], {
|
|
87
69
|
className: "".concat(_SecondaryTextModule["default"].textStyle, " ").concat(className ? className : ''),
|
|
88
70
|
href: href,
|
|
89
71
|
title: title,
|
|
90
72
|
dataId: dataId,
|
|
91
73
|
target: target
|
|
92
|
-
},
|
|
74
|
+
}, text) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
75
|
className: "".concat(_SecondaryTextModule["default"].secondaryText, " ").concat(className ? className : ''),
|
|
94
76
|
"data-title": text
|
|
95
|
-
},
|
|
77
|
+
}, text));
|
|
96
78
|
}
|
|
97
79
|
}]);
|
|
98
80
|
|
|
@@ -8,8 +8,6 @@ var AccountName_defaultProps = {
|
|
|
8
8
|
isLink: true,
|
|
9
9
|
dataId: 'accountName',
|
|
10
10
|
fontWeight: 'regular',
|
|
11
|
-
enableHighlight: false,
|
|
12
|
-
highlights: {},
|
|
13
11
|
customProps: {}
|
|
14
12
|
};
|
|
15
13
|
exports.AccountName_defaultProps = AccountName_defaultProps;
|
|
@@ -19,16 +17,12 @@ var ContactName_defaultProps = {
|
|
|
19
17
|
dataId: 'contactName',
|
|
20
18
|
fontWeight: 'regular',
|
|
21
19
|
i18nKeys: {},
|
|
22
|
-
enableHighlight: false,
|
|
23
|
-
highlights: {},
|
|
24
20
|
customProps: {}
|
|
25
21
|
};
|
|
26
22
|
exports.ContactName_defaultProps = ContactName_defaultProps;
|
|
27
23
|
var Email_defaultProps = {
|
|
28
24
|
isLink: true,
|
|
29
25
|
fontWeight: 'regular',
|
|
30
|
-
enableHighlight: false,
|
|
31
|
-
highlights: {},
|
|
32
26
|
customProps: {}
|
|
33
27
|
};
|
|
34
28
|
exports.Email_defaultProps = Email_defaultProps;
|
|
@@ -36,42 +30,30 @@ var PhoneNumber_defaultProps = {
|
|
|
36
30
|
isLink: true,
|
|
37
31
|
hasReload: false,
|
|
38
32
|
fontWeight: 'regular',
|
|
39
|
-
enableHighlight: false,
|
|
40
|
-
highlights: {},
|
|
41
33
|
customProps: {}
|
|
42
34
|
};
|
|
43
35
|
exports.PhoneNumber_defaultProps = PhoneNumber_defaultProps;
|
|
44
36
|
var PriorityText_defaultProps = {
|
|
45
37
|
color: 'black',
|
|
46
|
-
enableHighlight: false,
|
|
47
|
-
highlights: {},
|
|
48
38
|
dataId: 'priority'
|
|
49
39
|
};
|
|
50
40
|
exports.PriorityText_defaultProps = PriorityText_defaultProps;
|
|
51
41
|
var SecondaryText_defaultProps = {
|
|
52
|
-
enableHighlight: false,
|
|
53
|
-
highlights: {},
|
|
54
42
|
customProps: {}
|
|
55
43
|
};
|
|
56
44
|
exports.SecondaryText_defaultProps = SecondaryText_defaultProps;
|
|
57
45
|
var StatusText_defaultProps = {
|
|
58
46
|
color: 'black',
|
|
59
47
|
dataId: 'statusContainer',
|
|
60
|
-
enableHighlight: false,
|
|
61
|
-
highlights: {},
|
|
62
48
|
fontWeight: 'regular'
|
|
63
49
|
};
|
|
64
50
|
exports.StatusText_defaultProps = StatusText_defaultProps;
|
|
65
51
|
var TicketId_defaultProps = {
|
|
66
52
|
dataId: 'ticketId',
|
|
67
|
-
enableHighlight: false,
|
|
68
|
-
highlights: {},
|
|
69
53
|
customProps: {}
|
|
70
54
|
};
|
|
71
55
|
exports.TicketId_defaultProps = TicketId_defaultProps;
|
|
72
56
|
var Website_defaultProps = {
|
|
73
|
-
enableHighlight: false,
|
|
74
|
-
highlights: {},
|
|
75
57
|
isLink: true
|
|
76
58
|
};
|
|
77
59
|
exports.Website_defaultProps = Website_defaultProps;
|
|
@@ -24,8 +24,6 @@ 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,
|
|
29
27
|
customProps: _propTypes["default"].shape({
|
|
30
28
|
LinkProps: _propTypes["default"].object,
|
|
31
29
|
TextProps: _propTypes["default"].object,
|
|
@@ -55,8 +53,6 @@ var ContactName_propTypes = {
|
|
|
55
53
|
}),
|
|
56
54
|
paidTitle: _propTypes["default"].string
|
|
57
55
|
}),
|
|
58
|
-
enableHighlight: _propTypes["default"].bool,
|
|
59
|
-
highlights: _propTypes["default"].object,
|
|
60
56
|
customProps: _propTypes["default"].shape({
|
|
61
57
|
LinkProps: _propTypes["default"].object,
|
|
62
58
|
TextProps: _propTypes["default"].object
|
|
@@ -67,8 +63,6 @@ var DepartmentText_propTypes = {
|
|
|
67
63
|
className: _propTypes["default"].string,
|
|
68
64
|
dataId: _propTypes["default"].string,
|
|
69
65
|
dataTitle: _propTypes["default"].string,
|
|
70
|
-
enableHighlight: _propTypes["default"].bool,
|
|
71
|
-
highlights: _propTypes["default"].object,
|
|
72
66
|
text: _propTypes["default"].string
|
|
73
67
|
};
|
|
74
68
|
exports.DepartmentText_propTypes = DepartmentText_propTypes;
|
|
@@ -82,8 +76,6 @@ var Email_propTypes = {
|
|
|
82
76
|
title: _propTypes["default"].string,
|
|
83
77
|
urlData: _propTypes["default"].object,
|
|
84
78
|
urlName: _propTypes["default"].string,
|
|
85
|
-
enableHighlight: _propTypes["default"].bool,
|
|
86
|
-
highlights: _propTypes["default"].object,
|
|
87
79
|
customProps: _propTypes["default"].shape({
|
|
88
80
|
LinkProps: _propTypes["default"].object,
|
|
89
81
|
TextProps: _propTypes["default"].object
|
|
@@ -108,8 +100,6 @@ var PhoneNumber_propTypes = {
|
|
|
108
100
|
title: _propTypes["default"].string,
|
|
109
101
|
urlData: _propTypes["default"].object,
|
|
110
102
|
urlName: _propTypes["default"].string,
|
|
111
|
-
enableHighlight: _propTypes["default"].bool,
|
|
112
|
-
highlights: _propTypes["default"].object,
|
|
113
103
|
customProps: _propTypes["default"].shape({
|
|
114
104
|
LinkProps: _propTypes["default"].object,
|
|
115
105
|
TextProps: _propTypes["default"].object
|
|
@@ -121,8 +111,6 @@ var PriorityText_propTypes = {
|
|
|
121
111
|
color: _propTypes["default"].oneOf(['red', 'green', 'gray', 'orange']),
|
|
122
112
|
dataId: _propTypes["default"].string,
|
|
123
113
|
dataTitle: _propTypes["default"].string,
|
|
124
|
-
enableHighlight: _propTypes["default"].bool,
|
|
125
|
-
highlights: _propTypes["default"].object,
|
|
126
114
|
text: _propTypes["default"].string
|
|
127
115
|
};
|
|
128
116
|
exports.PriorityText_propTypes = PriorityText_propTypes;
|
|
@@ -132,8 +120,6 @@ var SecondaryText_propTypes = {
|
|
|
132
120
|
dataTitle: _propTypes["default"].string,
|
|
133
121
|
onClick: _propTypes["default"].func,
|
|
134
122
|
text: _propTypes["default"].string,
|
|
135
|
-
enableHighlight: _propTypes["default"].bool,
|
|
136
|
-
highlights: _propTypes["default"].object,
|
|
137
123
|
customProps: _propTypes["default"].shape({
|
|
138
124
|
SecondaryTextProps: _propTypes["default"].object
|
|
139
125
|
})
|
|
@@ -145,8 +131,6 @@ var StatusText_propTypes = {
|
|
|
145
131
|
dataId: _propTypes["default"].string,
|
|
146
132
|
dataTitle: _propTypes["default"].string,
|
|
147
133
|
fontWeight: _propTypes["default"].oneOf(['regular', 'semibold', 'bold']),
|
|
148
|
-
enableHighlight: _propTypes["default"].bool,
|
|
149
|
-
highlights: _propTypes["default"].object,
|
|
150
134
|
text: _propTypes["default"].string
|
|
151
135
|
};
|
|
152
136
|
exports.StatusText_propTypes = StatusText_propTypes;
|
|
@@ -161,8 +145,6 @@ var TicketId_propTypes = {
|
|
|
161
145
|
url: _propTypes["default"].string,
|
|
162
146
|
urlData: _propTypes["default"].string,
|
|
163
147
|
urlName: _propTypes["default"].string,
|
|
164
|
-
enableHighlight: _propTypes["default"].bool,
|
|
165
|
-
highlights: _propTypes["default"].object,
|
|
166
148
|
customProps: _propTypes["default"].shape({
|
|
167
149
|
TicketIdProps: _propTypes["default"].object,
|
|
168
150
|
LinkProps: _propTypes["default"].object
|
|
@@ -176,8 +158,6 @@ var Website_propTypes = {
|
|
|
176
158
|
isLink: _propTypes["default"].bool,
|
|
177
159
|
target: _propTypes["default"].string,
|
|
178
160
|
text: _propTypes["default"].string,
|
|
179
|
-
enableHighlight: _propTypes["default"].bool,
|
|
180
|
-
highlights: _propTypes["default"].object,
|
|
181
161
|
title: _propTypes["default"].string
|
|
182
162
|
};
|
|
183
163
|
exports.Website_propTypes = Website_propTypes;
|
|
@@ -17,8 +17,6 @@ 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
|
-
|
|
22
20
|
var _SubjectModule = _interopRequireDefault(require("./Subject.module.css"));
|
|
23
21
|
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -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); } }
|
|
@@ -83,21 +75,11 @@ var Subject = /*#__PURE__*/function (_Component) {
|
|
|
83
75
|
isDotted = _this$props.isDotted,
|
|
84
76
|
children = _this$props.children,
|
|
85
77
|
customProps = _this$props.customProps,
|
|
86
|
-
whiteSpace = _this$props.whiteSpace
|
|
87
|
-
enableHighlight = _this$props.enableHighlight,
|
|
88
|
-
highlights = _this$props.highlights;
|
|
78
|
+
whiteSpace = _this$props.whiteSpace;
|
|
89
79
|
var _customProps$LinkProp = customProps.LinkProps,
|
|
90
80
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
91
81
|
_customProps$TextProp = customProps.TextProps,
|
|
92
82
|
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;
|
|
101
83
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
|
|
102
84
|
urlName: urlName,
|
|
103
85
|
href: href,
|
|
@@ -108,13 +90,13 @@ var Subject = /*#__PURE__*/function (_Component) {
|
|
|
108
90
|
title: text,
|
|
109
91
|
target: target,
|
|
110
92
|
"data-title-wrap": whiteSpace
|
|
111
|
-
}, LinkProps),
|
|
93
|
+
}, LinkProps), children ? children : text) : /*#__PURE__*/_react["default"].createElement("span", _extends({
|
|
112
94
|
className: "".concat(_SubjectModule["default"].subject, " ").concat(isDotted ? _SubjectModule["default"].dotted : '', " ").concat(_cssUtils.whiteSpaceClassMapping[whiteSpace], " ").concat(className, " ").concat(_SubjectModule["default"]["font_".concat(fontWeight)]),
|
|
113
95
|
"data-title": text,
|
|
114
96
|
"data-id": dataId,
|
|
115
97
|
"data-test-id": dataId,
|
|
116
98
|
"data-title-wrap": whiteSpace
|
|
117
|
-
}, TextProps),
|
|
99
|
+
}, TextProps), text));
|
|
118
100
|
}
|
|
119
101
|
}]);
|
|
120
102
|
|
|
@@ -9,29 +9,6 @@ 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
|
-
};
|
|
35
12
|
var propTypes = {
|
|
36
13
|
className: _propTypes["default"].string,
|
|
37
14
|
dataId: _propTypes["default"].string,
|
|
@@ -49,15 +26,6 @@ var propTypes = {
|
|
|
49
26
|
LinkProps: _propTypes["default"].object,
|
|
50
27
|
TextProps: _propTypes["default"].object
|
|
51
28
|
}),
|
|
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)))
|
|
29
|
+
whiteSpace: _propTypes["default"].oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'])
|
|
62
30
|
};
|
|
63
31
|
exports.propTypes = propTypes;
|
|
@@ -27,10 +27,20 @@ var _Layout = require("@zohodesk/components/es/Layout");
|
|
|
27
27
|
|
|
28
28
|
var _Common = require("@zohodesk/components/es/utils/Common");
|
|
29
29
|
|
|
30
|
+
var _getCurrentTime = _interopRequireDefault(require("../../utils/getCurrentTime"));
|
|
31
|
+
|
|
32
|
+
var _constants = require("./utils/constants");
|
|
33
|
+
|
|
30
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
35
|
|
|
32
36
|
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
37
|
|
|
38
|
+
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; }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
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; }
|
|
43
|
+
|
|
34
44
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
35
45
|
|
|
36
46
|
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); } }
|
|
@@ -67,30 +77,61 @@ var GlobalNotification = /*#__PURE__*/function (_React$Component) {
|
|
|
67
77
|
shadowClose: true
|
|
68
78
|
};
|
|
69
79
|
_this.onClose = _this.onClose.bind(_assertThisInitialized(_this));
|
|
80
|
+
_this.getNotiifcationData = _this.getNotiifcationData.bind(_assertThisInitialized(_this));
|
|
81
|
+
_this.handleStatusChange = _this.handleStatusChange.bind(_assertThisInitialized(_this));
|
|
70
82
|
return _this;
|
|
71
83
|
}
|
|
72
84
|
|
|
73
85
|
_createClass(GlobalNotification, [{
|
|
74
86
|
key: "componentDidMount",
|
|
75
87
|
value: function componentDidMount() {
|
|
88
|
+
var _this2 = this;
|
|
89
|
+
|
|
76
90
|
var _this$props = this.props,
|
|
77
91
|
hideMessage = _this$props.hideMessage,
|
|
78
92
|
hideTime = _this$props.hideTime,
|
|
79
93
|
id = _this$props.id,
|
|
80
94
|
needAutoClose = _this$props.needAutoClose;
|
|
95
|
+
this.handleStatusChange(_constants.STATUS.MOUNTED);
|
|
81
96
|
|
|
82
97
|
if (needAutoClose) {
|
|
83
98
|
this.hideMessageTimer = setTimeout(function () {
|
|
84
99
|
hideMessage(id);
|
|
100
|
+
|
|
101
|
+
_this2.handleStatusChange(_constants.STATUS.DISMISSING);
|
|
85
102
|
}, hideTime);
|
|
86
103
|
}
|
|
87
104
|
}
|
|
105
|
+
}, {
|
|
106
|
+
key: "componentDidUpdate",
|
|
107
|
+
value: function componentDidUpdate(prevProps) {
|
|
108
|
+
if (prevProps.id === this.props.id && (prevProps.message !== this.props.message || prevProps.type !== this.props.type)) {
|
|
109
|
+
this.handleStatusChange(_constants.STATUS.UPDATED);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
88
112
|
}, {
|
|
89
113
|
key: "componentWillUnmount",
|
|
90
114
|
value: function componentWillUnmount() {
|
|
91
115
|
if (this.hideMessageTimer) {
|
|
92
116
|
clearTimeout(this.hideMessageTimer);
|
|
93
117
|
}
|
|
118
|
+
|
|
119
|
+
this.handleStatusChange(_constants.STATUS.UNMOUNTED);
|
|
120
|
+
}
|
|
121
|
+
}, {
|
|
122
|
+
key: "handleStatusChange",
|
|
123
|
+
value: function handleStatusChange(status) {
|
|
124
|
+
var onStatusChange = this.props.onStatusChange;
|
|
125
|
+
|
|
126
|
+
if (typeof onStatusChange == 'function') {
|
|
127
|
+
var notificationData = this.getNotiifcationData();
|
|
128
|
+
var currentTime = (0, _getCurrentTime["default"])();
|
|
129
|
+
onStatusChange(_objectSpread(_objectSpread({
|
|
130
|
+
status: status
|
|
131
|
+
}, notificationData), {}, {
|
|
132
|
+
time: currentTime
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
94
135
|
}
|
|
95
136
|
}, {
|
|
96
137
|
key: "onClose",
|
|
@@ -102,42 +143,51 @@ var GlobalNotification = /*#__PURE__*/function (_React$Component) {
|
|
|
102
143
|
this.setState({
|
|
103
144
|
shadowClose: false
|
|
104
145
|
});
|
|
146
|
+
this.handleStatusChange(_constants.STATUS.DISMISSING);
|
|
105
147
|
hideMessage && hideMessage(id);
|
|
106
148
|
onClose && onClose(e);
|
|
107
149
|
}
|
|
108
150
|
}, {
|
|
109
|
-
key: "
|
|
110
|
-
value: function
|
|
151
|
+
key: "getNotiifcationData",
|
|
152
|
+
value: function getNotiifcationData() {
|
|
111
153
|
var _this$props3 = this.props,
|
|
112
|
-
type = _this$props3.type,
|
|
113
|
-
message = _this$props3.message,
|
|
114
|
-
hideMessage = _this$props3.hideMessage,
|
|
115
|
-
onClick = _this$props3.onClick,
|
|
116
|
-
_this$props3$i18nKeys = _this$props3.i18nKeys,
|
|
117
|
-
i18nKeys = _this$props3$i18nKeys === void 0 ? {} : _this$props3$i18nKeys,
|
|
118
|
-
customProps = _this$props3.customProps,
|
|
119
|
-
dataSelectorId = _this$props3.dataSelectorId,
|
|
120
154
|
id = _this$props3.id,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
155
|
+
type = _this$props3.type,
|
|
156
|
+
message = _this$props3.message;
|
|
157
|
+
return {
|
|
158
|
+
id: id,
|
|
159
|
+
type: type,
|
|
160
|
+
message: message
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
}, {
|
|
164
|
+
key: "render",
|
|
165
|
+
value: function render() {
|
|
166
|
+
var _this$props4 = this.props,
|
|
167
|
+
hideMessage = _this$props4.hideMessage,
|
|
168
|
+
onClick = _this$props4.onClick,
|
|
169
|
+
_this$props4$i18nKeys = _this$props4.i18nKeys,
|
|
170
|
+
i18nKeys = _this$props4$i18nKeys === void 0 ? {} : _this$props4$i18nKeys,
|
|
171
|
+
customProps = _this$props4.customProps,
|
|
172
|
+
dataSelectorId = _this$props4.dataSelectorId,
|
|
173
|
+
needShadow = _this$props4.needShadow,
|
|
174
|
+
shadowCount = _this$props4.shadowCount,
|
|
175
|
+
eleRef = _this$props4.eleRef;
|
|
124
176
|
var shadowClose = this.state.shadowClose;
|
|
125
177
|
var _i18nKeys$closeTitle = i18nKeys.closeTitle,
|
|
126
178
|
closeTitle = _i18nKeys$closeTitle === void 0 ? 'Close' : _i18nKeys$closeTitle;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
message: message,
|
|
179
|
+
var notificationData = this.getNotiifcationData();
|
|
180
|
+
return /*#__PURE__*/_react["default"].createElement(GlobalNotificationUI, _extends({}, notificationData, {
|
|
130
181
|
hideMessage: hideMessage,
|
|
131
182
|
onClick: onClick,
|
|
132
183
|
closeTitle: closeTitle,
|
|
133
184
|
customProps: customProps,
|
|
134
185
|
dataSelectorId: dataSelectorId,
|
|
135
|
-
id: id,
|
|
136
186
|
shadowCount: shadowCount,
|
|
137
187
|
onClose: this.onClose,
|
|
138
188
|
needShadow: shadowClose && needShadow,
|
|
139
189
|
eleRef: eleRef
|
|
140
|
-
});
|
|
190
|
+
}));
|
|
141
191
|
}
|
|
142
192
|
}]);
|
|
143
193
|
|
|
@@ -6,6 +6,8 @@ var _react2 = require("@testing-library/react");
|
|
|
6
6
|
|
|
7
7
|
var _GlobalNotification = _interopRequireDefault(require("../GlobalNotification"));
|
|
8
8
|
|
|
9
|
+
var _constants = require("../utils/constants");
|
|
10
|
+
|
|
9
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
12
|
|
|
11
13
|
describe('GlobalNotification', function () {
|
|
@@ -15,4 +17,12 @@ describe('GlobalNotification', function () {
|
|
|
15
17
|
|
|
16
18
|
expect(asFragment()).toMatchSnapshot();
|
|
17
19
|
});
|
|
20
|
+
});
|
|
21
|
+
describe('GlobalNotification Constants', function () {
|
|
22
|
+
test('should have correct constant values', function () {
|
|
23
|
+
expect(_constants.STATUS.MOUNTED).toBe('mounted');
|
|
24
|
+
expect(_constants.STATUS.UPDATED).toBe('updated');
|
|
25
|
+
expect(_constants.STATUS.DISMISSING).toBe('dismissing');
|
|
26
|
+
expect(_constants.STATUS.UNMOUNTED).toBe('unmounted');
|
|
27
|
+
});
|
|
18
28
|
});
|
|
@@ -25,7 +25,8 @@ var propTypes = {
|
|
|
25
25
|
needAutoClose: _propTypes["default"].bool,
|
|
26
26
|
isCollapseView: _propTypes["default"].bool,
|
|
27
27
|
shadowCount: _propTypes["default"].number,
|
|
28
|
-
needShadow: _propTypes["default"].bool
|
|
28
|
+
needShadow: _propTypes["default"].bool,
|
|
29
|
+
onStatusChange: _propTypes["default"].func
|
|
29
30
|
};
|
|
30
31
|
exports.propTypes = propTypes;
|
|
31
32
|
var UI_propTypes = {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.STATUS = void 0;
|
|
7
|
+
var STATUS = {
|
|
8
|
+
MOUNTED: 'mounted',
|
|
9
|
+
UNMOUNTED: 'unmounted',
|
|
10
|
+
UPDATED: 'updated',
|
|
11
|
+
DISMISSING: 'dismissing'
|
|
12
|
+
};
|
|
13
|
+
exports.STATUS = STATUS;
|