@zohodesk/dot 1.3.3 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cli/AppearanceThemeValidationExcludeFiles.js +1 -0
- package/.cli/propValidation_report.html +1 -1
- package/README.md +14 -0
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +3 -7
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +3 -7
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +3 -7
- package/coverage/ExternalLink/ExternalLink.js.html +1 -1
- package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
- package/coverage/ExternalLink/index.html +1 -1
- package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
- package/coverage/ExternalLink/props/index.html +1 -1
- package/coverage/ExternalLink/props/propTypes.js.html +1 -1
- package/coverage/IconButton/IconButton.js.html +1 -1
- package/coverage/IconButton/IconButton.module.css.html +5 -2
- package/coverage/IconButton/index.html +1 -1
- package/coverage/IconButton/props/defaultProps.js.html +1 -1
- package/coverage/IconButton/props/index.html +1 -1
- package/coverage/IconButton/props/propTypes.js.html +1 -1
- package/coverage/Image/Image.js.html +1 -1
- package/coverage/Image/Image.module.css.html +1 -1
- package/coverage/Image/index.html +1 -1
- package/coverage/Image/props/defaultProps.js.html +1 -1
- package/coverage/Image/props/index.html +1 -1
- package/coverage/Image/props/propTypes.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
- package/coverage/avatar/AvatarWithTeam/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
- package/coverage/index.html +1 -1
- package/es/ActionButton/ActionButton.module.css +7 -0
- package/es/AlphabeticList/AlphabeticList.module.css +2 -0
- package/es/AttachmentViewer/AttachmentViewer.module.css +2 -0
- package/es/ChannelIcon/ChannelIcon.module.css +4 -0
- package/es/FormAction/FormAction.module.css +2 -0
- package/es/IconButton/IconButton.module.css +1 -0
- package/es/Provider/Config.js +2 -1
- package/es/TagWithIcon/TagWithIcon.module.css +19 -5
- package/es/avatar/AvatarIcon/AvatarIcon.module.css +6 -0
- package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -0
- package/es/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
- package/es/layout/SubtabLayout/SubtabLayout.module.css +2 -0
- package/es/list/Comment/Comment.js +4 -7
- package/es/list/Comment/Comment.module.css +1 -0
- package/es/list/Comment/props/defaultProps.js +2 -1
- package/es/list/Comment/props/propTypes.js +1 -0
- package/es/list/Dot/Dot.module.css +1 -0
- package/es/list/ListLayout/ListLayout.module.css +12 -0
- package/es/list/Subject/Subject.module.css +1 -0
- package/es/list/Thread/Thread.module.css +1 -0
- package/es/list/index.js +1 -2
- package/es/setup/header/Search/Search.module.css +1 -0
- package/es/setup/table/TableRow/SetupTableRow.module.css +3 -2
- package/es/v1/alert/AlertHeader/AlertHeader.js +2 -1
- package/es/v1/list/Comment/Comment.js +4 -7
- package/es/v1/list/index.js +1 -2
- package/es/v1/notification/DesktopNotification/DesktopNotification.js +84 -57
- package/es/v1/notification/DesktopNotification/props/defaultProps.js +17 -0
- package/es/v1/notification/DesktopNotification/props/propTypes.js +43 -0
- package/es/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +63 -26
- package/es/v1/notification/DesktopNotificationHeader/props/defaultProps.js +7 -0
- package/es/v1/notification/DesktopNotificationHeader/props/propTypes.js +13 -0
- package/es/v1/setup/header/Button/Button.js +17 -29
- package/es/v1/setup/header/Link/Link.js +23 -35
- package/es/v1/setup/header/Search/Search.js +43 -69
- package/es/v1/setup/header/Views/Views.js +27 -39
- package/es/v1/setup/helptips/Description/Description.js +8 -20
- package/es/v1/setup/helptips/Link/Link.js +20 -32
- package/es/v1/setup/helptips/ListGroup/ListGroup.js +18 -30
- package/es/v1/setup/helptips/Title/Title.js +8 -20
- package/es/version2/GlobalNotification/GlobalNotification.module.css +3 -0
- package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -0
- package/es/version2/lookup/AlertLookup/AlertLookupNew.module.css +1 -1
- package/es/version2/notification/DesktopNotification/DesktopNotification.js +78 -55
- package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +10 -4
- package/es/version2/notification/DesktopNotification/props/defaultProps.js +3 -1
- package/es/version2/notification/DesktopNotification/props/propTypes.js +2 -1
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +59 -23
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +14 -17
- package/es/version2/notification/DesktopNotificationHeader/props/defaultProps.js +3 -1
- package/es/version2/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
- package/lib/ActionButton/ActionButton.module.css +7 -0
- package/lib/AlphabeticList/AlphabeticList.module.css +2 -0
- package/lib/AttachmentViewer/AttachmentViewer.module.css +2 -0
- package/lib/ChannelIcon/ChannelIcon.module.css +4 -0
- package/lib/FormAction/FormAction.module.css +2 -0
- package/lib/IconButton/IconButton.module.css +1 -0
- package/lib/Provider/Config.js +2 -1
- package/lib/TagWithIcon/TagWithIcon.module.css +19 -5
- package/lib/avatar/AvatarIcon/AvatarIcon.module.css +6 -0
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +4 -0
- package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +1 -0
- package/lib/layout/SubtabLayout/SubtabLayout.module.css +2 -0
- package/lib/list/Comment/Comment.js +4 -8
- package/lib/list/Comment/Comment.module.css +1 -0
- package/lib/list/Comment/props/defaultProps.js +2 -1
- package/lib/list/Comment/props/propTypes.js +1 -0
- package/lib/list/Dot/Dot.module.css +1 -0
- package/lib/list/ListLayout/ListLayout.module.css +12 -0
- package/lib/list/Subject/Subject.module.css +1 -0
- package/lib/list/Thread/Thread.module.css +1 -0
- package/lib/list/index.js +0 -8
- package/lib/setup/header/Search/Search.module.css +1 -0
- package/lib/setup/table/TableRow/SetupTableRow.module.css +3 -2
- package/lib/v1/alert/AlertHeader/AlertHeader.js +2 -1
- package/lib/v1/list/Comment/Comment.js +4 -8
- package/lib/v1/list/index.js +0 -8
- package/lib/v1/notification/DesktopNotification/DesktopNotification.js +80 -64
- package/lib/v1/notification/DesktopNotification/props/defaultProps.js +26 -0
- package/lib/v1/notification/DesktopNotification/props/propTypes.js +55 -0
- package/lib/v1/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +63 -34
- package/lib/v1/notification/DesktopNotificationHeader/props/defaultProps.js +16 -0
- package/lib/v1/notification/DesktopNotificationHeader/props/propTypes.js +24 -0
- package/lib/v1/setup/header/Button/Button.js +17 -63
- package/lib/v1/setup/header/Link/Link.js +23 -69
- package/lib/v1/setup/header/Search/Search.js +57 -89
- package/lib/v1/setup/header/Views/Views.js +27 -73
- package/lib/v1/setup/helptips/Description/Description.js +8 -53
- package/lib/v1/setup/helptips/Link/Link.js +23 -69
- package/lib/v1/setup/helptips/ListGroup/ListGroup.js +26 -72
- package/lib/v1/setup/helptips/Title/Title.js +8 -53
- package/lib/version2/GlobalNotification/GlobalNotification.module.css +3 -0
- package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +1 -0
- package/lib/version2/lookup/AlertLookup/AlertLookupNew.module.css +1 -1
- package/lib/version2/notification/DesktopNotification/DesktopNotification.js +74 -55
- package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +10 -4
- package/lib/version2/notification/DesktopNotification/props/defaultProps.js +5 -1
- package/lib/version2/notification/DesktopNotification/props/propTypes.js +2 -1
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +57 -23
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +14 -17
- package/lib/version2/notification/DesktopNotificationHeader/props/defaultProps.js +5 -1
- package/lib/version2/notification/DesktopNotificationHeader/props/propTypes.js +2 -1
- package/package.json +11 -11
- package/result.json +1 -1
- package/es/list/UserTime/UserTime.js +0 -83
- package/es/list/UserTime/UserTime.module.css +0 -58
- package/es/list/UserTime/props/defaultProps.js +0 -3
- package/es/list/UserTime/props/propTypes.js +0 -18
- package/es/v1/list/UserTime/UserTime.js +0 -83
- package/lib/list/UserTime/UserTime.js +0 -136
- package/lib/list/UserTime/UserTime.module.css +0 -58
- package/lib/list/UserTime/props/defaultProps.js +0 -10
- package/lib/list/UserTime/props/propTypes.js +0 -29
- package/lib/v1/list/UserTime/UserTime.js +0 -136
package/lib/list/index.js
CHANGED
|
@@ -125,12 +125,6 @@ Object.defineProperty(exports, "Thread", {
|
|
|
125
125
|
return _Thread["default"];
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
|
-
Object.defineProperty(exports, "UserTime", {
|
|
129
|
-
enumerable: true,
|
|
130
|
-
get: function get() {
|
|
131
|
-
return _UserTime["default"];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
128
|
|
|
135
129
|
var _AvatarFlip = _interopRequireDefault(require("./AvatarFlip/AvatarFlip"));
|
|
136
130
|
|
|
@@ -164,8 +158,6 @@ var _TagNew = _interopRequireDefault(require("./TagNew/TagNew"));
|
|
|
164
158
|
|
|
165
159
|
var _Thread = _interopRequireDefault(require("./Thread/Thread"));
|
|
166
160
|
|
|
167
|
-
var _UserTime = _interopRequireDefault(require("./UserTime/UserTime"));
|
|
168
|
-
|
|
169
161
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
170
162
|
|
|
171
163
|
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; }
|
|
@@ -88,10 +88,11 @@ function AlertHeader(props) {
|
|
|
88
88
|
shrink: true,
|
|
89
89
|
id: htmlId
|
|
90
90
|
}, title), children && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
91
|
+
shrink: true,
|
|
91
92
|
adjust: true,
|
|
92
93
|
flexible: true
|
|
93
94
|
}, children))), onClose && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
94
|
-
className:
|
|
95
|
+
className: finalStyle.close
|
|
95
96
|
}, /*#__PURE__*/_react["default"].createElement(_AlertClose["default"], {
|
|
96
97
|
onClose: onClose,
|
|
97
98
|
dataTitle: closeTitle,
|
|
@@ -13,8 +13,6 @@ var _propTypes = require("../../../list/Comment/props/propTypes");
|
|
|
13
13
|
|
|
14
14
|
var _icons = require("@zohodesk/icons");
|
|
15
15
|
|
|
16
|
-
var _i18n = require("@zohodesk/i18n");
|
|
17
|
-
|
|
18
16
|
var _Button = _interopRequireDefault(require("@zohodesk/components/es/v1/semantic/Button/Button"));
|
|
19
17
|
|
|
20
18
|
var _CommentModule = _interopRequireDefault(require("../../../list/Comment/Comment.module.css"));
|
|
@@ -24,17 +22,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
24
22
|
function Comment(props) {
|
|
25
23
|
var count = props.count,
|
|
26
24
|
onClick = props.onClick,
|
|
27
|
-
className = props.className
|
|
28
|
-
|
|
29
|
-
var commentCount = parseInt(count);
|
|
30
|
-
var commentTitle = !commentCount ? i18N('tabs.request.comment') : commentCount > 1 ? i18N('support.comment.many', count) : i18N('support.comment.one');
|
|
25
|
+
className = props.className,
|
|
26
|
+
title = props.title;
|
|
31
27
|
return /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
32
28
|
customClass: "".concat(_CommentModule["default"].container, " ").concat(className, " "),
|
|
33
29
|
onClick: onClick,
|
|
34
30
|
dataId: "commentLstContainer",
|
|
35
|
-
title:
|
|
31
|
+
title: title,
|
|
36
32
|
a11y: {
|
|
37
|
-
ariaLabel:
|
|
33
|
+
ariaLabel: title
|
|
38
34
|
}
|
|
39
35
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
40
36
|
name: "ZD-TK-commentLine",
|
package/lib/v1/list/index.js
CHANGED
|
@@ -125,12 +125,6 @@ Object.defineProperty(exports, "Thread", {
|
|
|
125
125
|
return _Thread["default"];
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
|
-
Object.defineProperty(exports, "UserTime", {
|
|
129
|
-
enumerable: true,
|
|
130
|
-
get: function get() {
|
|
131
|
-
return _UserTime["default"];
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
128
|
|
|
135
129
|
var _AvatarFlip = _interopRequireDefault(require("./AvatarFlip/AvatarFlip"));
|
|
136
130
|
|
|
@@ -164,8 +158,6 @@ var _TagNew = _interopRequireDefault(require("./TagNew/TagNew"));
|
|
|
164
158
|
|
|
165
159
|
var _Thread = _interopRequireDefault(require("./Thread/Thread"));
|
|
166
160
|
|
|
167
|
-
var _UserTime = _interopRequireDefault(require("./UserTime/UserTime"));
|
|
168
|
-
|
|
169
161
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
170
162
|
|
|
171
163
|
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; }
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.DesktopNotificationUI = DesktopNotificationUI;
|
|
9
7
|
exports["default"] = DesktopNotification;
|
|
10
8
|
|
|
11
|
-
var _react =
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
10
|
|
|
13
|
-
var _defaultProps = require("
|
|
11
|
+
var _defaultProps = _interopRequireDefault(require("./props/defaultProps"));
|
|
14
12
|
|
|
15
|
-
var _propTypes = require("
|
|
13
|
+
var _propTypes = require("./props/propTypes");
|
|
16
14
|
|
|
17
15
|
var _Layout = require("@zohodesk/components/es/v1/Layout");
|
|
18
16
|
|
|
@@ -26,14 +24,12 @@ var _FormAction = _interopRequireDefault(require("../../../FormAction/FormAction
|
|
|
26
24
|
|
|
27
25
|
var _DesktopNotificationHeader = _interopRequireDefault(require("../DesktopNotificationHeader/DesktopNotificationHeader"));
|
|
28
26
|
|
|
27
|
+
var _CustomResponsive = require("@zohodesk/components/lib/Responsive/CustomResponsive");
|
|
28
|
+
|
|
29
29
|
var _DesktopNotificationModule = _interopRequireDefault(require("../../../version2/notification/DesktopNotification/DesktopNotification.module.css"));
|
|
30
30
|
|
|
31
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
32
32
|
|
|
33
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
34
|
-
|
|
35
|
-
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; }
|
|
36
|
-
|
|
37
33
|
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); }
|
|
38
34
|
|
|
39
35
|
var buttonPaletteObject = {
|
|
@@ -85,11 +81,13 @@ function DesktopNotificationUI(props) {
|
|
|
85
81
|
size = props.size,
|
|
86
82
|
onClose = props.onClose,
|
|
87
83
|
needClose = props.needClose,
|
|
84
|
+
renderAlertIcon = props.renderAlertIcon,
|
|
88
85
|
_props$customClass = props.customClass,
|
|
89
86
|
customClass = _props$customClass === void 0 ? {} : _props$customClass,
|
|
90
87
|
_props$i18nKeys = props.i18nKeys,
|
|
91
88
|
i18nKeys = _props$i18nKeys === void 0 ? {} : _props$i18nKeys,
|
|
92
|
-
customProps = props.customProps
|
|
89
|
+
customProps = props.customProps,
|
|
90
|
+
responsiveId = props.responsiveId;
|
|
93
91
|
var _i18nKeys$closeTitle = i18nKeys.closeTitle,
|
|
94
92
|
closeTitle = _i18nKeys$closeTitle === void 0 ? 'Close' : _i18nKeys$closeTitle;
|
|
95
93
|
var containerClass = customClass.containerClass;
|
|
@@ -115,68 +113,86 @@ function DesktopNotificationUI(props) {
|
|
|
115
113
|
var Zindex = isAnimate ? getNextIndex() : null;
|
|
116
114
|
var uiVariantOne = title && (info || secondaryInfo);
|
|
117
115
|
var uiVariantTwo = title && !(info || secondaryInfo) && !getSectionContainer;
|
|
116
|
+
|
|
117
|
+
function responsiveFunc(_ref2) {
|
|
118
|
+
var mediaQueryOR = _ref2.mediaQueryOR;
|
|
119
|
+
return {
|
|
120
|
+
uptoTablet: mediaQueryOR([{
|
|
121
|
+
maxWidth: 760
|
|
122
|
+
}])
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
118
126
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
119
127
|
className: _DesktopNotificationModule["default"].parentElement,
|
|
120
128
|
style: needAutoZindex && isAnimate ? {
|
|
121
129
|
zIndex: "".concat(Zindex)
|
|
122
130
|
} : {},
|
|
123
131
|
"data-selector-id": dataSelectorId
|
|
124
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
132
|
+
}, /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
|
|
133
|
+
query: responsiveFunc,
|
|
134
|
+
responsiveId: responsiveId
|
|
135
|
+
}, function (_ref3) {
|
|
136
|
+
var uptoTablet = _ref3.uptoTablet;
|
|
137
|
+
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, _extends({
|
|
138
|
+
className: "".concat(_DesktopNotificationModule["default"].container, " ").concat(isAnimate ? animateClass : animateRemoveClass, "\n ").concat(isShrinkView ? _DesktopNotificationModule["default"].globalNotify : '', " ").concat(containerClass, "\n ").concat(uptoTablet ? _DesktopNotificationModule["default"].tapWidth : _DesktopNotificationModule["default"]["".concat(size)]),
|
|
139
|
+
isCover: false,
|
|
140
|
+
dataId: dataId,
|
|
141
|
+
isInline: uiVariantTwo
|
|
142
|
+
}, ExtraProps), /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_DesktopNotificationHeader["default"], {
|
|
143
|
+
type: type,
|
|
144
|
+
title: title,
|
|
145
|
+
variant: titleVariant,
|
|
146
|
+
needIcon: needIcon,
|
|
147
|
+
onClose: onClose,
|
|
148
|
+
closeTitle: closeTitle,
|
|
149
|
+
renderAlertIcon: renderAlertIcon,
|
|
150
|
+
dataId: "".concat(dataId, "_close"),
|
|
151
|
+
needClose: needClose
|
|
152
|
+
})), /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
153
|
+
alignBox: "column"
|
|
154
|
+
}, uiVariantOne && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
155
|
+
flexible: true
|
|
156
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
157
|
+
className: "".concat(_DesktopNotificationModule["default"].section, " ").concat(_DesktopNotificationModule["default"].infoText)
|
|
158
|
+
}, subTitle && /*#__PURE__*/_react["default"].createElement("div", {
|
|
159
|
+
className: "".concat(_DesktopNotificationModule["default"].subTitle, " ").concat(info || secondaryInfo ? _DesktopNotificationModule["default"].subTitleMargin : '')
|
|
160
|
+
}, subTitle), info && /*#__PURE__*/_react["default"].createElement("div", null, info), secondaryInfo && /*#__PURE__*/_react["default"].createElement("div", {
|
|
161
|
+
className: "".concat(info ? _DesktopNotificationModule["default"].secondaryInfo : '')
|
|
162
|
+
}, secondaryInfo))), getSectionContainer && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
163
|
+
flexible: true
|
|
164
|
+
}, getSectionContainer()), submitText || cancelText ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
165
|
+
className: _DesktopNotificationModule["default"].footer
|
|
166
|
+
}, isMore ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
167
|
+
className: "".concat(_DesktopNotificationModule["default"].message)
|
|
168
|
+
}, message) : null, /*#__PURE__*/_react["default"].createElement(_FormAction["default"], {
|
|
169
|
+
size: "small",
|
|
170
|
+
paddingLeftSize: "xmedium"
|
|
171
|
+
}, submitText ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
172
|
+
onClick: onClickSubmit,
|
|
173
|
+
"data-id": "".concat(dataId, "_submitButton"),
|
|
174
|
+
"data-test-id": "".concat(dataId, "_submitButton")
|
|
175
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
176
|
+
align: "vertical",
|
|
177
|
+
alignBox: "row"
|
|
178
|
+
}, getSubmitContainer ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
179
|
+
flexible: true
|
|
180
|
+
}, getSubmitContainer()) : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
181
|
+
flexible: true
|
|
182
|
+
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
183
|
+
text: submitText,
|
|
184
|
+
palette: submitType ? submitType : buttonPalette
|
|
185
|
+
})))) : null, cancelText ? /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
186
|
+
text: cancelText,
|
|
187
|
+
palette: "secondary",
|
|
188
|
+
dataId: "".concat(dataId, "_cancelButton"),
|
|
189
|
+
onClick: onClickCancel
|
|
190
|
+
})) : null))) : null)), getBottomContainer ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, getBottomContainer()) : null);
|
|
191
|
+
}));
|
|
177
192
|
}
|
|
178
193
|
|
|
179
194
|
DesktopNotificationUI.propTypes = _propTypes.DesktopNotificationUI_propTypes;
|
|
195
|
+
DesktopNotificationUI.propTypes = _defaultProps["default"];
|
|
180
196
|
|
|
181
197
|
function DesktopNotification(props) {
|
|
182
198
|
return /*#__PURE__*/_react["default"].createElement(_AutoClose["default"], _extends({}, props, {
|
|
@@ -185,7 +201,7 @@ function DesktopNotification(props) {
|
|
|
185
201
|
}
|
|
186
202
|
|
|
187
203
|
DesktopNotification.propTypes = _propTypes.propTypes;
|
|
188
|
-
DesktopNotification.defaultProps = _defaultProps
|
|
204
|
+
DesktopNotification.defaultProps = _defaultProps["default"]; // if (__DOCS__) {
|
|
189
205
|
// DesktopNotification.docs = {
|
|
190
206
|
// componentGroup: 'DesktopNotification',
|
|
191
207
|
// folderName: 'Alert'
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _Config = require("../../../../Provider/Config");
|
|
9
|
+
|
|
10
|
+
var _default = {
|
|
11
|
+
isMore: false,
|
|
12
|
+
isAnimate: true,
|
|
13
|
+
isClose: false,
|
|
14
|
+
autoClose: false,
|
|
15
|
+
hideTime: '3000',
|
|
16
|
+
dataId: 'toastMessage',
|
|
17
|
+
needAutoZindex: true,
|
|
18
|
+
needIcon: true,
|
|
19
|
+
titleVariant: 'primary',
|
|
20
|
+
isShrinkView: false,
|
|
21
|
+
needClose: true,
|
|
22
|
+
customProps: {},
|
|
23
|
+
dataSelectorId: 'desktopNotification',
|
|
24
|
+
responsiveId: (0, _Config.getDotLibraryConfig)('desktopNotificationResponsiveId')
|
|
25
|
+
};
|
|
26
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.propTypes = exports.DesktopNotificationUI_propTypes = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var propTypes = {
|
|
13
|
+
isClose: _propTypes["default"].bool,
|
|
14
|
+
onPortalClose: _propTypes["default"].func,
|
|
15
|
+
autoClose: _propTypes["default"].bool,
|
|
16
|
+
hideTime: _propTypes["default"].string,
|
|
17
|
+
Element: _propTypes["default"].element,
|
|
18
|
+
responsiveId: _propTypes["default"].string
|
|
19
|
+
};
|
|
20
|
+
exports.propTypes = propTypes;
|
|
21
|
+
var DesktopNotificationUI_propTypes = {
|
|
22
|
+
type: _propTypes["default"].oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification', 'alarm']),
|
|
23
|
+
cancelText: _propTypes["default"].string,
|
|
24
|
+
submitText: _propTypes["default"].string,
|
|
25
|
+
submitType: _propTypes["default"].oneOf(['primary', 'danger', 'success']),
|
|
26
|
+
isMore: _propTypes["default"].bool,
|
|
27
|
+
customClass: _propTypes["default"].object,
|
|
28
|
+
dataId: _propTypes["default"].string,
|
|
29
|
+
getBottomContainer: _propTypes["default"].func,
|
|
30
|
+
getSectionContainer: _propTypes["default"].func,
|
|
31
|
+
getSubmitContainer: _propTypes["default"].func,
|
|
32
|
+
i18nKeys: _propTypes["default"].object,
|
|
33
|
+
dataSelectorId: _propTypes["default"].string,
|
|
34
|
+
info: _propTypes["default"].string,
|
|
35
|
+
isAnimate: _propTypes["default"].bool,
|
|
36
|
+
isShrinkView: _propTypes["default"].bool,
|
|
37
|
+
message: _propTypes["default"].string,
|
|
38
|
+
needAutoZindex: _propTypes["default"].bool,
|
|
39
|
+
needClose: _propTypes["default"].bool,
|
|
40
|
+
needIcon: _propTypes["default"].bool,
|
|
41
|
+
onCancel: _propTypes["default"].func,
|
|
42
|
+
onClose: _propTypes["default"].func,
|
|
43
|
+
onSubmit: _propTypes["default"].func,
|
|
44
|
+
secondaryInfo: _propTypes["default"].string,
|
|
45
|
+
size: _propTypes["default"].oneOf(['medium', 'large']),
|
|
46
|
+
subTitle: _propTypes["default"].string,
|
|
47
|
+
titleVariant: _propTypes["default"].oneOf(['primary', 'secondary']),
|
|
48
|
+
isClose: _propTypes["default"].bool,
|
|
49
|
+
renderAlertIcon: _propTypes["default"].func,
|
|
50
|
+
customProps: _propTypes["default"].shape({
|
|
51
|
+
ExtraProps: _propTypes["default"].object
|
|
52
|
+
}),
|
|
53
|
+
title: _propTypes["default"].string
|
|
54
|
+
};
|
|
55
|
+
exports.DesktopNotificationUI_propTypes = DesktopNotificationUI_propTypes;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = DesktopNotificationHeader;
|
|
9
7
|
|
|
10
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
12
|
-
var _defaultProps = require("
|
|
10
|
+
var _defaultProps = _interopRequireDefault(require("./props/defaultProps"));
|
|
13
11
|
|
|
14
|
-
var _propTypes = require("
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("./props/propTypes"));
|
|
15
13
|
|
|
16
14
|
var _Layout = require("@zohodesk/components/es/v1/Layout");
|
|
17
15
|
|
|
@@ -19,13 +17,13 @@ var _AlertClose = _interopRequireDefault(require("../../alert/AlertClose/AlertCl
|
|
|
19
17
|
|
|
20
18
|
var _AlertIcons = _interopRequireDefault(require("../../alert/alertIcons/AlertIcons"));
|
|
21
19
|
|
|
22
|
-
var
|
|
20
|
+
var _CustomResponsive = require("@zohodesk/components/lib/Responsive/CustomResponsive");
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
var _Typography = _interopRequireDefault(require("@zohodesk/components/es/v1/Typography/Typography"));
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
var _DesktopNotificationHeaderModule = _interopRequireDefault(require("../../../version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css"));
|
|
27
25
|
|
|
28
|
-
function
|
|
26
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
29
27
|
|
|
30
28
|
function DesktopNotificationHeader(props) {
|
|
31
29
|
var onClose = props.onClose,
|
|
@@ -36,39 +34,70 @@ function DesktopNotificationHeader(props) {
|
|
|
36
34
|
type = _props$type === void 0 ? '' : _props$type,
|
|
37
35
|
needIcon = props.needIcon,
|
|
38
36
|
title = props.title,
|
|
39
|
-
|
|
37
|
+
renderAlertIcon = props.renderAlertIcon,
|
|
38
|
+
needClose = props.needClose,
|
|
39
|
+
responsiveId = props.responsiveId;
|
|
40
|
+
|
|
41
|
+
function responsiveFunc(_ref) {
|
|
42
|
+
var mediaQueryOR = _ref.mediaQueryOR;
|
|
43
|
+
return {
|
|
44
|
+
uptoTablet: mediaQueryOR([{
|
|
45
|
+
maxWidth: 760
|
|
46
|
+
}])
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
40
50
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
41
51
|
align: "vertical",
|
|
42
52
|
alignBox: "row",
|
|
43
53
|
className: "".concat(_DesktopNotificationHeaderModule["default"].container, " ").concat(_DesktopNotificationHeaderModule["default"][variant], " ").concat(_DesktopNotificationHeaderModule["default"][type]),
|
|
44
54
|
isCover: false,
|
|
45
55
|
wrap: "wrap"
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
56
|
+
}, /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
|
|
57
|
+
query: responsiveFunc,
|
|
58
|
+
responsiveId: responsiveId
|
|
59
|
+
}, function (_ref2) {
|
|
60
|
+
var uptoTablet = _ref2.uptoTablet;
|
|
61
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, needIcon ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
62
|
+
className: _DesktopNotificationHeaderModule["default"].iconContainer
|
|
63
|
+
}, renderAlertIcon ? renderAlertIcon() : /*#__PURE__*/_react["default"].createElement(_AlertIcons["default"], {
|
|
64
|
+
type: type
|
|
65
|
+
})) : null, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
66
|
+
flexible: true
|
|
67
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
68
|
+
alignBox: "row",
|
|
69
|
+
align: "center"
|
|
70
|
+
}, variant === 'primary' ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
71
|
+
shrink: true
|
|
72
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
73
|
+
$i18n_dataTitle: title,
|
|
74
|
+
$ui_className: _DesktopNotificationHeaderModule["default"].title,
|
|
75
|
+
$ui_tagName: "h1",
|
|
76
|
+
$ui_size: uptoTablet ? '16' : '18',
|
|
77
|
+
$ui_lineHeight: "20",
|
|
78
|
+
$ui_weight: "bold",
|
|
79
|
+
$flag_reset: true,
|
|
80
|
+
$ui_wordBreak: "breakWord"
|
|
81
|
+
}, title)) : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
82
|
+
className: "".concat(_DesktopNotificationHeaderModule["default"].infoText)
|
|
83
|
+
}, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
84
|
+
$i18n_dataTitle: title,
|
|
85
|
+
$ui_className: _DesktopNotificationHeaderModule["default"].title,
|
|
86
|
+
$ui_size: "14",
|
|
87
|
+
$ui_wordBreak: "breakWord"
|
|
88
|
+
}, title)))), needClose ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
89
|
+
className: _DesktopNotificationHeaderModule["default"].close
|
|
90
|
+
}, /*#__PURE__*/_react["default"].createElement(_AlertClose["default"], {
|
|
91
|
+
onClose: onClose,
|
|
92
|
+
dataTitle: closeTitle,
|
|
93
|
+
dataId: dataId,
|
|
94
|
+
type: "light"
|
|
95
|
+
})) : null);
|
|
96
|
+
}));
|
|
68
97
|
}
|
|
69
98
|
|
|
70
|
-
DesktopNotificationHeader.propTypes = _propTypes
|
|
71
|
-
DesktopNotificationHeader.defaultProps = _defaultProps
|
|
99
|
+
DesktopNotificationHeader.propTypes = _propTypes["default"];
|
|
100
|
+
DesktopNotificationHeader.defaultProps = _defaultProps["default"]; // if (__DOCS__) {
|
|
72
101
|
// DesktopNotificationHeader.docs = {
|
|
73
102
|
// componentGroup: 'DesktopNotificationHeader',
|
|
74
103
|
// folderName: 'Alert'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _Config = require("../../../../Provider/Config");
|
|
9
|
+
|
|
10
|
+
var _default = {
|
|
11
|
+
needIcon: true,
|
|
12
|
+
variant: 'primary',
|
|
13
|
+
needClose: true,
|
|
14
|
+
responsiveId: (0, _Config.getDotLibraryConfig)('desktopNotificationResponsiveId')
|
|
15
|
+
};
|
|
16
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var _default = {
|
|
13
|
+
closeTitle: _propTypes["default"].string,
|
|
14
|
+
dataId: _propTypes["default"].string,
|
|
15
|
+
needClose: _propTypes["default"].bool,
|
|
16
|
+
needIcon: _propTypes["default"].bool,
|
|
17
|
+
onClose: _propTypes["default"].func,
|
|
18
|
+
title: _propTypes["default"].string,
|
|
19
|
+
renderAlertIcon: _propTypes["default"].func,
|
|
20
|
+
type: _propTypes["default"].oneOf(['success', 'error', 'danger', 'warning', 'info', 'notification', 'alarm']),
|
|
21
|
+
variant: _propTypes["default"].oneOf(['primary', 'secondary']),
|
|
22
|
+
responsiveId: _propTypes["default"].string
|
|
23
|
+
};
|
|
24
|
+
exports["default"] = _default;
|