@zohodesk/dot 1.3.0 → 1.3.2
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/PropLessFiles.html +1 -1
- package/.cli/PropValidationExcludeFilesArray.js +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +21 -12
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +163 -553
- package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +3 -12
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +163 -553
- package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +3 -12
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +163 -553
- package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +3 -12
- package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +3 -12
- 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 +466 -0
- package/coverage/IconButton/IconButton.module.css.html +151 -0
- package/coverage/IconButton/index.html +131 -0
- package/coverage/IconButton/props/defaultProps.js.html +136 -0
- package/coverage/IconButton/props/index.html +131 -0
- package/coverage/IconButton/props/propTypes.js.html +187 -0
- 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/coverage-final.json +4 -0
- package/coverage/coverage-summary.json +5 -1
- package/coverage/index.html +40 -10
- package/es/IconButton/__tests__/IconButton.spec.js +148 -0
- package/es/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
- package/es/form/fields/FieldContainer/props/propTypes.js +1 -1
- package/es/v1/ActionButton/ActionButton.js +2 -2
- package/es/v1/AlphabeticList/AlphabeticList.js +6 -2
- package/es/v1/Attachment/Attachment.js +78 -75
- package/es/v1/AttachmentViewer/AttachmentImage.js +44 -63
- package/es/v1/Image/Image.js +26 -33
- package/es/v1/Loader/Loader.js +12 -18
- package/es/v1/Message/Message.js +16 -42
- package/es/v1/PlusIcon/PlusIcon.js +25 -37
- package/es/v1/Separator/Separator.js +40 -47
- package/es/v1/Upload/Upload.js +59 -66
- package/es/v1/alert/AlertHeader/AlertHeader.js +5 -4
- package/es/v1/alert/AlertHeader/props/defaultProps.js +12 -0
- package/es/v1/alert/AlertHeader/props/propTypes.js +20 -0
- package/es/v1/alert/AlertLookup/AlertLookup.js +6 -4
- package/es/v1/alert/AlertLookup/props/defaultProps.js +13 -0
- package/es/v1/alert/AlertLookup/props/propTypes.js +36 -0
- package/es/v1/avatar/AvatarClose/AvatarClose.js +32 -43
- package/es/v1/avatar/AvatarCollision/AvatarCollision.js +41 -52
- package/es/v1/avatar/AvatarIcon/AvatarIcon.js +38 -43
- package/es/v1/avatar/AvatarStatus/AvatarStatus.js +52 -63
- package/es/v1/avatar/AvatarThread/AvatarThread.js +62 -69
- package/es/v1/avatar/AvatarUser/AvatarUser.js +93 -100
- package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +81 -88
- package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +6 -6
- package/es/v1/form/fields/CurrencyField/CurrencyField.js +6 -6
- package/es/v1/form/fields/DateField/DateField.js +6 -6
- package/es/v1/form/fields/FieldContainer/FieldContainer.js +6 -6
- package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +6 -6
- package/es/v1/form/fields/PhoneField/PhoneField.js +6 -6
- package/es/v1/form/fields/RadioField/RadioField.js +89 -97
- package/es/v1/form/fields/SelectField/SelectField.js +139 -154
- package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +154 -197
- package/es/v1/layout/SubtabLayout/SubtabLayout.js +108 -124
- package/es/v1/list/SecondaryText/AccountName.js +61 -69
- package/es/v1/list/SecondaryText/ContactName.js +66 -74
- package/es/v1/list/SecondaryText/DepartmentText.js +15 -27
- package/es/v1/list/SecondaryText/Email.js +32 -40
- package/es/v1/list/SecondaryText/HappinessRating.js +17 -25
- package/es/v1/list/SecondaryText/PhoneNumber.js +36 -44
- package/es/v1/list/SecondaryText/PriorityText.js +16 -28
- package/es/v1/list/SecondaryText/SecondaryText.js +21 -33
- package/es/v1/list/SecondaryText/StatusText.js +17 -29
- package/es/v1/list/SecondaryText/TicketId.js +33 -45
- package/es/v1/list/SecondaryText/Website.js +22 -30
- package/es/v1/list/SecondryPanel/SecondryPanel.js +66 -83
- package/es/v1/list/SentimentStatus/SentimentStatus.js +18 -29
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
- package/es/v1/list/status/StatusListItem/StatusListItem.js +75 -100
- package/es/v1/lookup/EmptyPage/EmptyPage.js +15 -26
- package/es/v1/lookup/Section/Section.js +14 -20
- package/es/v1/svg/PlusIcon.js +20 -27
- package/es/v1/svg/SnippetIcon.js +22 -29
- package/es/v1/svg/TemplateIcon.js +23 -30
- package/lib/IconButton/__tests__/IconButton.spec.js +156 -0
- package/lib/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
- package/lib/form/fields/FieldContainer/props/propTypes.js +1 -1
- package/lib/v1/ActionButton/ActionButton.js +2 -2
- package/lib/v1/AlphabeticList/AlphabeticList.js +7 -3
- package/lib/v1/Attachment/Attachment.js +77 -112
- package/lib/v1/AttachmentViewer/AttachmentImage.js +61 -96
- package/lib/v1/Image/Image.js +26 -71
- package/lib/v1/Loader/Loader.js +12 -55
- package/lib/v1/Message/Message.js +23 -80
- package/lib/v1/PlusIcon/PlusIcon.js +25 -71
- package/lib/v1/Separator/Separator.js +44 -85
- package/lib/v1/Upload/Upload.js +58 -103
- package/lib/v1/alert/AlertHeader/AlertHeader.js +5 -4
- package/lib/v1/alert/AlertHeader/props/defaultProps.js +19 -0
- package/lib/v1/alert/AlertHeader/props/propTypes.js +31 -0
- package/lib/v1/alert/AlertLookup/AlertLookup.js +6 -4
- package/lib/v1/alert/AlertLookup/props/defaultProps.js +20 -0
- package/lib/v1/alert/AlertLookup/props/propTypes.js +47 -0
- package/lib/v1/avatar/AvatarClose/AvatarClose.js +32 -77
- package/lib/v1/avatar/AvatarCollision/AvatarCollision.js +41 -86
- package/lib/v1/avatar/AvatarIcon/AvatarIcon.js +37 -80
- package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +52 -97
- package/lib/v1/avatar/AvatarThread/AvatarThread.js +61 -106
- package/lib/v1/avatar/AvatarUser/AvatarUser.js +95 -140
- package/lib/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +85 -130
- package/lib/v1/form/fields/CheckBoxField/CheckBoxField.js +6 -6
- package/lib/v1/form/fields/CurrencyField/CurrencyField.js +6 -6
- package/lib/v1/form/fields/DateField/DateField.js +6 -6
- package/lib/v1/form/fields/FieldContainer/FieldContainer.js +6 -6
- package/lib/v1/form/fields/MultiSelectField/MultiSelectField.js +6 -6
- package/lib/v1/form/fields/PhoneField/PhoneField.js +6 -6
- package/lib/v1/form/fields/RadioField/RadioField.js +91 -137
- package/lib/v1/form/fields/SelectField/SelectField.js +149 -200
- package/lib/v1/layout/SetupDetailLayout/SetupDetailLayout.js +160 -253
- package/lib/v1/layout/SubtabLayout/SubtabLayout.js +107 -206
- package/lib/v1/list/SecondaryText/AccountName.js +63 -113
- package/lib/v1/list/SecondaryText/ContactName.js +67 -117
- package/lib/v1/list/SecondaryText/DepartmentText.js +16 -66
- package/lib/v1/list/SecondaryText/Email.js +32 -82
- package/lib/v1/list/SecondaryText/HappinessRating.js +21 -68
- package/lib/v1/list/SecondaryText/PhoneNumber.js +36 -86
- package/lib/v1/list/SecondaryText/PriorityText.js +16 -66
- package/lib/v1/list/SecondaryText/SecondaryText.js +19 -69
- package/lib/v1/list/SecondaryText/StatusText.js +17 -67
- package/lib/v1/list/SecondaryText/TicketId.js +33 -83
- package/lib/v1/list/SecondaryText/Website.js +29 -72
- package/lib/v1/list/SecondryPanel/SecondryPanel.js +69 -168
- package/lib/v1/list/SentimentStatus/SentimentStatus.js +19 -64
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +2 -2
- package/lib/v1/list/status/StatusListItem/StatusListItem.js +81 -137
- package/lib/v1/lookup/EmptyPage/EmptyPage.js +43 -93
- package/lib/v1/lookup/Section/Section.js +14 -58
- package/lib/v1/svg/PlusIcon.js +20 -65
- package/lib/v1/svg/SnippetIcon.js +22 -67
- package/lib/v1/svg/TemplateIcon.js +23 -68
- package/package.json +12 -12
- package/result.json +1 -1
- package/unittest/index.html +1 -1
|
@@ -23,102 +23,67 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
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; }
|
|
25
25
|
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
key: "componentDidMount",
|
|
67
|
-
value: function componentDidMount() {
|
|
68
|
-
var isImage = this.props.isImage;
|
|
69
|
-
|
|
70
|
-
if (isImage) {
|
|
71
|
-
var image = this.imageEle.current;
|
|
72
|
-
image.addEventListener('load', this.imgLoad);
|
|
73
|
-
} else {
|
|
74
|
-
this.setState({
|
|
75
|
-
isLoading: false
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}, {
|
|
80
|
-
key: "imgLoad",
|
|
81
|
-
value: function imgLoad() {
|
|
82
|
-
this.setState({
|
|
83
|
-
isLoading: false
|
|
84
|
-
});
|
|
85
|
-
var onLoad = this.props.onLoad;
|
|
86
|
-
onLoad && onLoad();
|
|
26
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
|
+
|
|
28
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
29
|
+
|
|
30
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
31
|
+
|
|
32
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
33
|
+
|
|
34
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
35
|
+
|
|
36
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
37
|
+
|
|
38
|
+
var AttachmentImage = function AttachmentImage(props) {
|
|
39
|
+
var isImage = props.isImage,
|
|
40
|
+
onLoad = props.onLoad,
|
|
41
|
+
src = props.src,
|
|
42
|
+
onClick = props.onClick,
|
|
43
|
+
alt = props.alt,
|
|
44
|
+
dataId = props.dataId,
|
|
45
|
+
id = props.id,
|
|
46
|
+
className = props.className,
|
|
47
|
+
isCover = props.isCover;
|
|
48
|
+
var imageEle = (0, _react.useRef)();
|
|
49
|
+
|
|
50
|
+
var _useState = (0, _react.useState)(true),
|
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
+
isLoading = _useState2[0],
|
|
53
|
+
setLoading = _useState2[1];
|
|
54
|
+
|
|
55
|
+
var imgLoad = function imgLoad() {
|
|
56
|
+
setLoading(false);
|
|
57
|
+
onLoad && onLoad();
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
(0, _react.useEffect)(function () {
|
|
61
|
+
if (isImage) {
|
|
62
|
+
var image = imageEle.current;
|
|
63
|
+
image.addEventListener('load', imgLoad);
|
|
64
|
+
} else {
|
|
65
|
+
setLoading(false);
|
|
87
66
|
}
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
})) : null, /*#__PURE__*/_react["default"].createElement(_Image["default"], {
|
|
107
|
-
htmlId: id,
|
|
108
|
-
eleRef: this.imageEle,
|
|
109
|
-
dataId: dataId,
|
|
110
|
-
src: src,
|
|
111
|
-
onClick: onClick,
|
|
112
|
-
className: "".concat(isLoading ? _AttachmentViewerModule["default"].hide : '', " ").concat(className),
|
|
113
|
-
alt: alt,
|
|
114
|
-
isCover: isCover
|
|
115
|
-
}));
|
|
116
|
-
}
|
|
117
|
-
}]);
|
|
118
|
-
|
|
119
|
-
return AttachmentImage;
|
|
120
|
-
}(_react.Component);
|
|
67
|
+
}, []);
|
|
68
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLoading ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
69
|
+
className: "".concat(_AttachmentViewerModule["default"].spinLoad),
|
|
70
|
+
"data-id": "".concat(dataId, "_loader"),
|
|
71
|
+
"data-test-id": "".concat(dataId, "_loader")
|
|
72
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
73
|
+
className: _AttachmentViewerModule["default"].loader
|
|
74
|
+
})) : null, /*#__PURE__*/_react["default"].createElement(_Image["default"], {
|
|
75
|
+
htmlId: id,
|
|
76
|
+
eleRef: imageEle,
|
|
77
|
+
dataId: dataId,
|
|
78
|
+
src: src,
|
|
79
|
+
onClick: onClick,
|
|
80
|
+
className: "".concat(isLoading ? _AttachmentViewerModule["default"].hide : '', " ").concat(className),
|
|
81
|
+
alt: alt,
|
|
82
|
+
isCover: isCover
|
|
83
|
+
}));
|
|
84
|
+
};
|
|
121
85
|
|
|
122
|
-
exports["default"] = AttachmentImage;
|
|
123
86
|
AttachmentImage.propTypes = _propTypes.AttachmentImage_propTypes;
|
|
124
|
-
AttachmentImage.defaultProps = _defaultProps.AttachmentImage_defaultProps;
|
|
87
|
+
AttachmentImage.defaultProps = _defaultProps.AttachmentImage_defaultProps;
|
|
88
|
+
var _default = AttachmentImage;
|
|
89
|
+
exports["default"] = _default;
|
package/lib/v1/Image/Image.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
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
|
-
exports["default"] =
|
|
6
|
+
exports["default"] = Image;
|
|
9
7
|
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
@@ -17,73 +15,30 @@ var _ImageModule = _interopRequireDefault(require("../../Image/Image.module.css"
|
|
|
17
15
|
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
17
|
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
function Image(props) {
|
|
19
|
+
var alt = props.alt,
|
|
20
|
+
src = props.src,
|
|
21
|
+
className = props.className,
|
|
22
|
+
isCover = props.isCover,
|
|
23
|
+
title = props.title,
|
|
24
|
+
onClick = props.onClick,
|
|
25
|
+
dataId = props.dataId,
|
|
26
|
+
htmlId = props.htmlId,
|
|
27
|
+
eleRef = props.eleRef,
|
|
28
|
+
original = props.original;
|
|
29
|
+
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
30
|
+
src: src,
|
|
31
|
+
alt: alt,
|
|
32
|
+
"data-title": title,
|
|
33
|
+
"data-id": dataId,
|
|
34
|
+
"data-test-id": dataId,
|
|
35
|
+
className: " ".concat(className, " ").concat(isCover ? _ImageModule["default"].imgFullSize : _ImageModule["default"].imgMaxFullSize, " "),
|
|
36
|
+
onClick: onClick,
|
|
37
|
+
id: htmlId,
|
|
38
|
+
ref: eleRef,
|
|
39
|
+
"data-original": original
|
|
40
|
+
});
|
|
41
|
+
}
|
|
35
42
|
|
|
36
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
|
-
|
|
38
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
-
|
|
40
|
-
var Image = /*#__PURE__*/function (_React$Component) {
|
|
41
|
-
_inherits(Image, _React$Component);
|
|
42
|
-
|
|
43
|
-
var _super = _createSuper(Image);
|
|
44
|
-
|
|
45
|
-
function Image() {
|
|
46
|
-
_classCallCheck(this, Image);
|
|
47
|
-
|
|
48
|
-
return _super.apply(this, arguments);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
_createClass(Image, [{
|
|
52
|
-
key: "render",
|
|
53
|
-
value: function render() {
|
|
54
|
-
var _this$props = this.props,
|
|
55
|
-
alt = _this$props.alt,
|
|
56
|
-
src = _this$props.src,
|
|
57
|
-
className = _this$props.className,
|
|
58
|
-
isCover = _this$props.isCover,
|
|
59
|
-
title = _this$props.title,
|
|
60
|
-
onClick = _this$props.onClick,
|
|
61
|
-
dataId = _this$props.dataId,
|
|
62
|
-
htmlId = _this$props.htmlId,
|
|
63
|
-
eleRef = _this$props.eleRef,
|
|
64
|
-
original = _this$props.original;
|
|
65
|
-
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
66
|
-
src: src,
|
|
67
|
-
alt: alt,
|
|
68
|
-
"data-title": title,
|
|
69
|
-
"data-id": dataId,
|
|
70
|
-
"data-test-id": dataId,
|
|
71
|
-
className: " ".concat(className, " ").concat(isCover ? _ImageModule["default"].imgFullSize : _ImageModule["default"].imgMaxFullSize, " "),
|
|
72
|
-
onClick: onClick,
|
|
73
|
-
id: htmlId,
|
|
74
|
-
ref: eleRef,
|
|
75
|
-
"data-original": original
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}]);
|
|
79
|
-
|
|
80
|
-
return Image;
|
|
81
|
-
}(_react["default"].Component);
|
|
82
|
-
|
|
83
|
-
exports["default"] = Image;
|
|
84
43
|
Image.propTypes = _propTypes.propTypes;
|
|
85
|
-
Image.defaultProps = _defaultProps.defaultProps;
|
|
86
|
-
// Image.docs = {
|
|
87
|
-
// componentGroup: 'Atom'
|
|
88
|
-
// };
|
|
89
|
-
// }
|
|
44
|
+
Image.defaultProps = _defaultProps.defaultProps;
|
package/lib/v1/Loader/Loader.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
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
|
-
exports["default"] =
|
|
6
|
+
exports["default"] = Loader;
|
|
9
7
|
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
@@ -15,56 +13,15 @@ var _LoaderModule = _interopRequireDefault(require("../../Loader/Loader.module.c
|
|
|
15
13
|
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
15
|
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
|
-
|
|
28
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
29
|
-
|
|
30
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
31
|
-
|
|
32
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
|
-
|
|
34
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
|
-
|
|
36
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
-
|
|
38
|
-
var Loader = /*#__PURE__*/function (_React$Component) {
|
|
39
|
-
_inherits(Loader, _React$Component);
|
|
40
|
-
|
|
41
|
-
var _super = _createSuper(Loader);
|
|
42
|
-
|
|
43
|
-
function Loader(props) {
|
|
44
|
-
var _this;
|
|
45
|
-
|
|
46
|
-
_classCallCheck(this, Loader);
|
|
47
|
-
|
|
48
|
-
_this = _super.call(this, props);
|
|
49
|
-
_this.getNextIndex = (0, _ZindexProvider.getZIndex)(_assertThisInitialized(_this));
|
|
50
|
-
return _this;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
_createClass(Loader, [{
|
|
54
|
-
key: "render",
|
|
55
|
-
value: function render() {
|
|
56
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
57
|
-
className: _LoaderModule["default"].ajaxLoader,
|
|
58
|
-
style: {
|
|
59
|
-
zIndex: "".concat(this.getNextIndex())
|
|
60
|
-
}
|
|
61
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
62
|
-
className: _LoaderModule["default"].loader
|
|
63
|
-
}));
|
|
16
|
+
function Loader() {
|
|
17
|
+
var getNextId = (0, _ZindexProvider.useZIndex)();
|
|
18
|
+
var Zindex = getNextId();
|
|
19
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
20
|
+
className: _LoaderModule["default"].ajaxLoader,
|
|
21
|
+
style: {
|
|
22
|
+
zIndex: "".concat(Zindex)
|
|
64
23
|
}
|
|
65
|
-
}]
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
exports["default"] = Loader;
|
|
24
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
25
|
+
className: _LoaderModule["default"].loader
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
@@ -7,9 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.MessageNew = MessageNew;
|
|
9
9
|
exports.MessageUI = MessageUI;
|
|
10
|
-
exports["default"] =
|
|
10
|
+
exports["default"] = Message;
|
|
11
11
|
|
|
12
|
-
var _react =
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
|
|
14
14
|
var _defaultProps = require("../../Message/props/defaultProps");
|
|
15
15
|
|
|
@@ -23,90 +23,33 @@ var _MessageModule = _interopRequireDefault(require("../../Message/Message.modul
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
25
|
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
|
-
|
|
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); } }
|
|
31
|
-
|
|
32
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
33
|
-
|
|
34
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
35
|
-
|
|
36
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
37
|
-
|
|
38
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
39
|
-
|
|
40
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
41
|
-
|
|
42
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
43
|
-
|
|
44
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
|
+
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); }
|
|
45
27
|
|
|
46
|
-
function
|
|
28
|
+
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; }
|
|
47
29
|
|
|
48
|
-
|
|
49
|
-
_inherits(Message, _React$Component);
|
|
50
|
-
|
|
51
|
-
var _super = _createSuper(Message);
|
|
52
|
-
|
|
53
|
-
function Message(props) {
|
|
54
|
-
var _this;
|
|
55
|
-
|
|
56
|
-
_classCallCheck(this, Message);
|
|
57
|
-
|
|
58
|
-
_this = _super.call(this, props);
|
|
59
|
-
_this.state = {
|
|
60
|
-
hideMessage: false
|
|
61
|
-
};
|
|
62
|
-
return _this;
|
|
63
|
-
}
|
|
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); }
|
|
64
31
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
32
|
+
function Message(props) {
|
|
33
|
+
// constructor(props) {
|
|
34
|
+
// super(props);
|
|
35
|
+
// this.state = { hideMessage: false };
|
|
36
|
+
// }
|
|
37
|
+
// const [hideMessage,setHideMessage] = useState(false)
|
|
38
|
+
var showMessage = props.showMessage,
|
|
39
|
+
hideMessage = props.hideMessage,
|
|
40
|
+
type = props.type;
|
|
41
|
+
(0, _react.useEffect)(function () {
|
|
42
|
+
if (type != 'alert') {
|
|
43
|
+
setTimeout(function () {
|
|
44
|
+
hideMessage();
|
|
45
|
+
}, 3000);
|
|
79
46
|
}
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
var _this$props2 = this.props,
|
|
84
|
-
type = _this$props2.type,
|
|
85
|
-
hideMessage = _this$props2.hideMessage;
|
|
86
|
-
|
|
87
|
-
if (type != 'alert') {
|
|
88
|
-
setTimeout(function () {
|
|
89
|
-
hideMessage();
|
|
90
|
-
}, 3000);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}, {
|
|
94
|
-
key: "render",
|
|
95
|
-
value: function render() {
|
|
96
|
-
return /*#__PURE__*/_react["default"].createElement(MessageUI, this.props);
|
|
97
|
-
}
|
|
98
|
-
}]);
|
|
99
|
-
|
|
100
|
-
return Message;
|
|
101
|
-
}(_react["default"].Component);
|
|
47
|
+
}, [showMessage]);
|
|
48
|
+
return /*#__PURE__*/_react["default"].createElement(MessageUI, props);
|
|
49
|
+
}
|
|
102
50
|
|
|
103
|
-
exports["default"] = Message;
|
|
104
51
|
Message.propTypes = _propTypes.propTypes;
|
|
105
|
-
Message.defaultProps = _defaultProps.defaultProps;
|
|
106
|
-
// Message.docs = {
|
|
107
|
-
// componentGroup: 'Atom'
|
|
108
|
-
// };
|
|
109
|
-
// }
|
|
52
|
+
Message.defaultProps = _defaultProps.defaultProps;
|
|
110
53
|
|
|
111
54
|
function MessageUI(props) {
|
|
112
55
|
function onClose(e) {
|
|
@@ -1,11 +1,9 @@
|
|
|
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
|
-
exports["default"] =
|
|
6
|
+
exports["default"] = PlusIcon;
|
|
9
7
|
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
9
|
|
|
@@ -19,73 +17,29 @@ var _AvatarIcon = _interopRequireDefault(require("../avatar/AvatarIcon/AvatarIco
|
|
|
19
17
|
|
|
20
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
19
|
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
20
|
+
function PlusIcon(props) {
|
|
21
|
+
var dataId = props.dataId,
|
|
22
|
+
iconName = props.iconName,
|
|
23
|
+
iconClass = props.iconClass,
|
|
24
|
+
iconSize = props.iconSize,
|
|
25
|
+
size = props.size,
|
|
26
|
+
onClick = props.onClick,
|
|
27
|
+
title = props.title,
|
|
28
|
+
customClass = props.customClass;
|
|
29
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
30
|
+
className: _PlusIconModule["default"].container,
|
|
31
|
+
onClick: onClick,
|
|
32
|
+
"data-id": dataId,
|
|
33
|
+
"data-test-id": dataId,
|
|
34
|
+
"data-title": title
|
|
35
|
+
}, /*#__PURE__*/_react["default"].createElement(_AvatarIcon["default"], {
|
|
36
|
+
name: iconName,
|
|
37
|
+
iconClass: "".concat(iconClass, " ").concat(_PlusIconModule["default"].icon),
|
|
38
|
+
iconSize: iconSize,
|
|
39
|
+
size: size,
|
|
40
|
+
className: "".concat(customClass, " ").concat(_PlusIconModule["default"].plusIcon)
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
37
43
|
|
|
38
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
-
|
|
40
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
|
-
|
|
42
|
-
var PlusIcon = /*#__PURE__*/function (_React$Component) {
|
|
43
|
-
_inherits(PlusIcon, _React$Component);
|
|
44
|
-
|
|
45
|
-
var _super = _createSuper(PlusIcon);
|
|
46
|
-
|
|
47
|
-
function PlusIcon(props) {
|
|
48
|
-
_classCallCheck(this, PlusIcon);
|
|
49
|
-
|
|
50
|
-
return _super.call(this, props);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
_createClass(PlusIcon, [{
|
|
54
|
-
key: "render",
|
|
55
|
-
value: function render() {
|
|
56
|
-
var _this$props = this.props,
|
|
57
|
-
dataId = _this$props.dataId,
|
|
58
|
-
iconName = _this$props.iconName,
|
|
59
|
-
iconClass = _this$props.iconClass,
|
|
60
|
-
iconSize = _this$props.iconSize,
|
|
61
|
-
size = _this$props.size,
|
|
62
|
-
onClick = _this$props.onClick,
|
|
63
|
-
title = _this$props.title,
|
|
64
|
-
customClass = _this$props.customClass;
|
|
65
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
66
|
-
className: _PlusIconModule["default"].container,
|
|
67
|
-
onClick: onClick,
|
|
68
|
-
"data-id": dataId,
|
|
69
|
-
"data-test-id": dataId,
|
|
70
|
-
"data-title": title
|
|
71
|
-
}, /*#__PURE__*/_react["default"].createElement(_AvatarIcon["default"], {
|
|
72
|
-
name: iconName,
|
|
73
|
-
iconClass: "".concat(iconClass, " ").concat(_PlusIconModule["default"].icon),
|
|
74
|
-
iconSize: iconSize,
|
|
75
|
-
size: size,
|
|
76
|
-
className: "".concat(customClass, " ").concat(_PlusIconModule["default"].plusIcon)
|
|
77
|
-
}));
|
|
78
|
-
}
|
|
79
|
-
}]);
|
|
80
|
-
|
|
81
|
-
return PlusIcon;
|
|
82
|
-
}(_react["default"].Component);
|
|
83
|
-
|
|
84
|
-
exports["default"] = PlusIcon;
|
|
85
44
|
PlusIcon.defaultProps = _defaultProps.defaultProps;
|
|
86
|
-
PlusIcon.propTypes = _propTypes.propTypes;
|
|
87
|
-
// PlusIcon.docs = {
|
|
88
|
-
// componentGroup: 'Common',
|
|
89
|
-
// folderName: 'Ticket DetailView'
|
|
90
|
-
// };
|
|
91
|
-
// }
|
|
45
|
+
PlusIcon.propTypes = _propTypes.propTypes;
|