@zohodesk/dot 1.0.0-temp-198.3.3 → 1.0.0-temp-199
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/propValidation_report.html +1 -1
- package/README.md +39 -0
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +1 -0
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +1 -0
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +1 -0
- package/es/ActionButton/ActionButton.module.css +192 -192
- package/es/AlphabeticList/AlphabeticList.module.css +57 -57
- package/es/AttachmentViewer/AttachmentImage.js +68 -32
- package/es/AttachmentViewer/AttachmentViewer.js +120 -41
- package/es/AttachmentViewer/AttachmentViewer.module.css +364 -352
- package/es/AttachmentViewer/__tests__/AttachmentImage.spec.js +63 -13
- package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentImage.spec.js.snap +9 -5
- package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +16 -117
- package/es/AttachmentViewer/props/defaultProps.js +5 -1
- package/es/AttachmentViewer/props/propTypes.js +7 -3
- package/es/AttachmentViewer/utils.js +49 -0
- package/es/ChannelIcon/ChannelIcon.module.css +225 -225
- package/es/FormAction/FormAction.module.css +100 -100
- package/es/IconButton/IconButton.module.css +22 -22
- package/es/Image/Image.js +6 -2
- package/es/Image/props/propTypes.js +3 -1
- package/es/TagWithIcon/TagWithIcon.module.css +66 -66
- package/es/avatar/AvatarIcon/AvatarIcon.module.css +58 -58
- package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +92 -92
- package/es/form/fields/CurrencyField/CurrencyField.js +2 -1
- package/es/form/fields/TextEditor/TextEditor.js +64 -64
- package/es/form/fields/TextEditor/TextEditor.module.css +73 -61
- package/es/form/fields/TextEditor/__tests__/__snapshots__/TextEditor.spec.js.snap +1 -1
- package/es/form/fields/TextEditor/props/defaultProps.js +4 -1
- package/es/form/fields/TextEditor/props/propTypes.js +10 -3
- package/es/form/fields/ValidationMessage/ValidationMessage.module.css +27 -27
- package/es/layout/SubtabLayout/SubtabLayout.module.css +164 -164
- package/es/list/Comment/Comment.module.css +29 -29
- package/es/list/Dot/Dot.module.css +15 -15
- package/es/list/ListLayout/ListLayout.module.css +79 -79
- package/es/list/Subject/Subject.module.css +34 -34
- package/es/list/Thread/Thread.module.css +42 -42
- package/es/list/status/StatusDropdown/StatusDropdown.js +8 -2
- package/es/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +16 -0
- package/es/list/status/StatusDropdown/__tests__/__snapshots__/StatusDropdown.spec.js.snap +14 -0
- package/es/list/status/StatusDropdown/props/propTypes.js +2 -0
- package/es/lookup/header/Search/LookupSearch.module.css +26 -26
- package/es/lookup/header/Search/Search.js +55 -38
- package/es/lookup/header/Search/props/defaultProps.js +2 -1
- package/es/lookup/header/Search/props/propTypes.js +5 -1
- package/es/utils/editorUtils.js +6 -6
- package/es/v1/AttachmentViewer/AttachmentImage.js +44 -23
- package/es/v1/AttachmentViewer/AttachmentViewer.js +120 -41
- package/es/v1/AttachmentViewer/props/propTypes.js +7 -3
- package/es/v1/Image/Image.js +6 -2
- package/es/v1/Image/props/propTypes.js +3 -1
- package/es/v1/form/fields/CurrencyField/CurrencyField.js +2 -1
- package/es/v1/form/fields/TextEditor/TextEditor.js +63 -64
- package/es/v1/form/fields/TextEditor/props/defaultProps.js +4 -1
- package/es/v1/form/fields/TextEditor/props/propTypes.js +10 -3
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +8 -2
- package/es/v1/list/status/StatusDropdown/props/propTypes.js +2 -0
- package/es/v1/utils/editorUtils.js +6 -6
- package/es/version2/GlobalNotification/GlobalNotification.module.css +177 -177
- package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +87 -87
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +132 -132
- package/lib/ActionButton/ActionButton.module.css +192 -192
- package/lib/AlphabeticList/AlphabeticList.module.css +57 -57
- package/lib/AttachmentViewer/AttachmentImage.js +74 -36
- package/lib/AttachmentViewer/AttachmentViewer.js +151 -70
- package/lib/AttachmentViewer/AttachmentViewer.module.css +364 -352
- package/lib/AttachmentViewer/__tests__/AttachmentImage.spec.js +64 -13
- package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentImage.spec.js.snap +9 -5
- package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +16 -117
- package/lib/AttachmentViewer/props/defaultProps.js +5 -1
- package/lib/AttachmentViewer/props/propTypes.js +7 -3
- package/lib/AttachmentViewer/utils.js +60 -1
- package/lib/ChannelIcon/ChannelIcon.module.css +225 -225
- package/lib/FormAction/FormAction.module.css +100 -100
- package/lib/IconButton/IconButton.module.css +22 -22
- package/lib/Image/Image.js +6 -2
- package/lib/Image/props/propTypes.js +3 -1
- package/lib/TagWithIcon/TagWithIcon.module.css +66 -66
- package/lib/avatar/AvatarIcon/AvatarIcon.module.css +58 -58
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +92 -92
- package/lib/form/fields/CurrencyField/CurrencyField.js +2 -1
- package/lib/form/fields/TextEditor/TextEditor.js +74 -74
- package/lib/form/fields/TextEditor/TextEditor.module.css +73 -61
- package/lib/form/fields/TextEditor/__tests__/__snapshots__/TextEditor.spec.js.snap +1 -1
- package/lib/form/fields/TextEditor/props/defaultProps.js +4 -1
- package/lib/form/fields/TextEditor/props/propTypes.js +10 -3
- package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +27 -27
- package/lib/layout/SubtabLayout/SubtabLayout.module.css +164 -164
- package/lib/list/Comment/Comment.module.css +29 -29
- package/lib/list/Dot/Dot.module.css +15 -15
- package/lib/list/ListLayout/ListLayout.module.css +79 -79
- package/lib/list/Subject/Subject.module.css +34 -34
- package/lib/list/Thread/Thread.module.css +42 -42
- package/lib/list/status/StatusDropdown/StatusDropdown.js +8 -2
- package/lib/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +14 -0
- package/lib/list/status/StatusDropdown/__tests__/__snapshots__/StatusDropdown.spec.js.snap +14 -0
- package/lib/list/status/StatusDropdown/props/propTypes.js +1 -1
- package/lib/lookup/header/Search/LookupSearch.module.css +26 -26
- package/lib/lookup/header/Search/Search.js +73 -64
- package/lib/lookup/header/Search/props/defaultProps.js +2 -1
- package/lib/lookup/header/Search/props/propTypes.js +9 -3
- package/lib/utils/editorUtils.js +6 -5
- package/lib/v1/AttachmentViewer/AttachmentImage.js +52 -24
- package/lib/v1/AttachmentViewer/AttachmentViewer.js +151 -70
- package/lib/v1/AttachmentViewer/props/propTypes.js +7 -3
- package/lib/v1/Image/Image.js +6 -2
- package/lib/v1/Image/props/propTypes.js +3 -1
- package/lib/v1/form/fields/CurrencyField/CurrencyField.js +2 -1
- package/lib/v1/form/fields/TextEditor/TextEditor.js +73 -74
- package/lib/v1/form/fields/TextEditor/props/defaultProps.js +4 -1
- package/lib/v1/form/fields/TextEditor/props/propTypes.js +10 -3
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +8 -2
- package/lib/v1/list/status/StatusDropdown/props/propTypes.js +1 -1
- package/lib/v1/utils/editorUtils.js +6 -5
- package/lib/version2/GlobalNotification/GlobalNotification.module.css +177 -177
- package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +87 -87
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +132 -132
- package/package.json +6 -6
- package/result.json +1 -1
- package/unittest/index.html +6 -2
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
/* $Id$ */
|
|
2
|
-
.varClass {
|
|
3
|
-
--textColor: var(--zdt_alphabeticList_text);
|
|
4
|
-
--textHoverColor: var(--zdt_alphabeticList_hover_text);
|
|
5
|
-
}
|
|
6
|
-
.container {
|
|
7
|
-
composes: varClass;
|
|
8
|
-
composes: h100 from '~@zohodesk/components/lib/common/common.module.css';
|
|
9
|
-
list-style: none;
|
|
10
|
-
pointer-events: initial;
|
|
11
|
-
margin: 0 ;
|
|
12
|
-
padding: 0 ;
|
|
13
|
-
}
|
|
14
|
-
.column .title {
|
|
15
|
-
margin-bottom: var(--zd_size3) ;
|
|
16
|
-
}
|
|
17
|
-
[dir=ltr] .row .title {
|
|
18
|
-
margin-right: var(--zd_size3) ;
|
|
19
|
-
}
|
|
20
|
-
[dir=rtl] .row .title {
|
|
21
|
-
margin-left: var(--zd_size3) ;
|
|
22
|
-
}
|
|
23
|
-
.row .letter {
|
|
24
|
-
padding: 0 var(--zd_size3) ;
|
|
25
|
-
}
|
|
26
|
-
.column .letter {
|
|
27
|
-
padding: var(--zd_size3) 0 ;
|
|
28
|
-
}
|
|
29
|
-
.heading {
|
|
30
|
-
composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
|
|
31
|
-
max-width: 100% ;
|
|
32
|
-
}
|
|
33
|
-
.list {
|
|
34
|
-
font-size: var(--zd_font_size11) ;
|
|
35
|
-
flex-basis: var(--zd_size12) ;
|
|
36
|
-
color: var(--textColor);
|
|
37
|
-
text-align: center;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
}
|
|
40
|
-
.title {
|
|
41
|
-
flex-basis: var(--zd_size15) ;
|
|
42
|
-
}
|
|
43
|
-
.letter {
|
|
44
|
-
text-transform: uppercase;
|
|
45
|
-
display: inline-block;
|
|
46
|
-
}
|
|
47
|
-
.numbers .list {
|
|
48
|
-
max-height: var(--zd_size35) ;
|
|
49
|
-
}
|
|
50
|
-
.list :hover,
|
|
51
|
-
.selected {
|
|
52
|
-
color: var(--textHoverColor);
|
|
53
|
-
}
|
|
54
|
-
.title {
|
|
55
|
-
font-size: var(--zd_font_size11) ;
|
|
56
|
-
font-family: var(--zd_semibold);
|
|
57
|
-
}
|
|
1
|
+
/* $Id$ */
|
|
2
|
+
.varClass {
|
|
3
|
+
--textColor: var(--zdt_alphabeticList_text);
|
|
4
|
+
--textHoverColor: var(--zdt_alphabeticList_hover_text);
|
|
5
|
+
}
|
|
6
|
+
.container {
|
|
7
|
+
composes: varClass;
|
|
8
|
+
composes: h100 from '~@zohodesk/components/lib/common/common.module.css';
|
|
9
|
+
list-style: none;
|
|
10
|
+
pointer-events: initial;
|
|
11
|
+
margin: 0 ;
|
|
12
|
+
padding: 0 ;
|
|
13
|
+
}
|
|
14
|
+
.column .title {
|
|
15
|
+
margin-bottom: var(--zd_size3) ;
|
|
16
|
+
}
|
|
17
|
+
[dir=ltr] .row .title {
|
|
18
|
+
margin-right: var(--zd_size3) ;
|
|
19
|
+
}
|
|
20
|
+
[dir=rtl] .row .title {
|
|
21
|
+
margin-left: var(--zd_size3) ;
|
|
22
|
+
}
|
|
23
|
+
.row .letter {
|
|
24
|
+
padding: 0 var(--zd_size3) ;
|
|
25
|
+
}
|
|
26
|
+
.column .letter {
|
|
27
|
+
padding: var(--zd_size3) 0 ;
|
|
28
|
+
}
|
|
29
|
+
.heading {
|
|
30
|
+
composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
|
|
31
|
+
max-width: 100% ;
|
|
32
|
+
}
|
|
33
|
+
.list {
|
|
34
|
+
font-size: var(--zd_font_size11) ;
|
|
35
|
+
flex-basis: var(--zd_size12) ;
|
|
36
|
+
color: var(--textColor);
|
|
37
|
+
text-align: center;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
.title {
|
|
41
|
+
flex-basis: var(--zd_size15) ;
|
|
42
|
+
}
|
|
43
|
+
.letter {
|
|
44
|
+
text-transform: uppercase;
|
|
45
|
+
display: inline-block;
|
|
46
|
+
}
|
|
47
|
+
.numbers .list {
|
|
48
|
+
max-height: var(--zd_size35) ;
|
|
49
|
+
}
|
|
50
|
+
.list :hover,
|
|
51
|
+
.selected {
|
|
52
|
+
color: var(--textHoverColor);
|
|
53
|
+
}
|
|
54
|
+
.title {
|
|
55
|
+
font-size: var(--zd_font_size11) ;
|
|
56
|
+
font-family: var(--zd_semibold);
|
|
57
|
+
}
|
|
@@ -9,10 +9,14 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _Layout = require("@zohodesk/components/es/Layout");
|
|
13
|
+
|
|
12
14
|
var _defaultProps = require("./props/defaultProps");
|
|
13
15
|
|
|
14
16
|
var _propTypes = require("./props/propTypes");
|
|
15
17
|
|
|
18
|
+
var _utils = require("./utils");
|
|
19
|
+
|
|
16
20
|
var _Image = _interopRequireDefault(require("../Image/Image"));
|
|
17
21
|
|
|
18
22
|
var _AttachmentViewerModule = _interopRequireDefault(require("./AttachmentViewer.module.css"));
|
|
@@ -54,65 +58,99 @@ var AttachmentImage = /*#__PURE__*/function (_Component) {
|
|
|
54
58
|
_classCallCheck(this, AttachmentImage);
|
|
55
59
|
|
|
56
60
|
_this = _super.call(this, props);
|
|
57
|
-
_this.imageEle = /*#__PURE__*/_react["default"].createRef();
|
|
58
61
|
_this.state = {
|
|
59
|
-
isLoading: true
|
|
62
|
+
isLoading: true,
|
|
63
|
+
isImageValid: false
|
|
60
64
|
};
|
|
61
|
-
_this.
|
|
65
|
+
_this.handleImageValidation = _this.handleImageValidation.bind(_assertThisInitialized(_this));
|
|
66
|
+
_this.renderImage = _this.renderImage.bind(_assertThisInitialized(_this));
|
|
62
67
|
return _this;
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
_createClass(AttachmentImage, [{
|
|
71
|
+
key: "handleImageValidation",
|
|
72
|
+
value: function handleImageValidation() {
|
|
73
|
+
var _this2 = this;
|
|
74
|
+
|
|
75
|
+
var src = this.props.src;
|
|
76
|
+
(0, _utils.checkImageValidity)(src).then(function (isValid) {
|
|
77
|
+
_this2.setState({
|
|
78
|
+
isLoading: false,
|
|
79
|
+
isImageValid: isValid
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}, {
|
|
84
|
+
key: "renderImage",
|
|
85
|
+
value: function renderImage() {
|
|
86
|
+
var _this$props = this.props,
|
|
87
|
+
src = _this$props.src,
|
|
88
|
+
onClick = _this$props.onClick,
|
|
89
|
+
alt = _this$props.alt,
|
|
90
|
+
id = _this$props.id,
|
|
91
|
+
dataId = _this$props.dataId,
|
|
92
|
+
isCover = _this$props.isCover,
|
|
93
|
+
customClass = _this$props.customClass,
|
|
94
|
+
onLoad = _this$props.onLoad,
|
|
95
|
+
onError = _this$props.onError;
|
|
96
|
+
var isImageValid = this.state.isImageValid;
|
|
97
|
+
var _customClass$customIm = customClass.customImageClass,
|
|
98
|
+
customImageClass = _customClass$customIm === void 0 ? '' : _customClass$customIm;
|
|
99
|
+
return /*#__PURE__*/_react["default"].createElement(_Image["default"], {
|
|
100
|
+
htmlId: id,
|
|
101
|
+
dataId: isImageValid ? dataId : "".concat(dataId, "_alt"),
|
|
102
|
+
src: src,
|
|
103
|
+
onClick: onClick,
|
|
104
|
+
className: customImageClass,
|
|
105
|
+
alt: alt,
|
|
106
|
+
isCover: isCover,
|
|
107
|
+
onLoad: onLoad,
|
|
108
|
+
onError: onError
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}, {
|
|
66
112
|
key: "componentDidMount",
|
|
67
113
|
value: function componentDidMount() {
|
|
68
|
-
|
|
114
|
+
this.handleImageValidation();
|
|
115
|
+
}
|
|
116
|
+
}, {
|
|
117
|
+
key: "componentDidUpdate",
|
|
118
|
+
value: function componentDidUpdate(prevProps) {
|
|
119
|
+
var src = this.props.src;
|
|
69
120
|
|
|
70
|
-
if (
|
|
71
|
-
var image = this.imageEle.current;
|
|
72
|
-
image.addEventListener('load', this.imgLoad);
|
|
73
|
-
} else {
|
|
121
|
+
if (prevProps.src !== src) {
|
|
74
122
|
this.setState({
|
|
75
|
-
isLoading:
|
|
123
|
+
isLoading: true
|
|
76
124
|
});
|
|
125
|
+
this.handleImageValidation();
|
|
77
126
|
}
|
|
78
127
|
}
|
|
79
|
-
}, {
|
|
80
|
-
key: "imgLoad",
|
|
81
|
-
value: function imgLoad() {
|
|
82
|
-
this.setState({
|
|
83
|
-
isLoading: false
|
|
84
|
-
});
|
|
85
|
-
var onLoad = this.props.onLoad;
|
|
86
|
-
onLoad && onLoad();
|
|
87
|
-
}
|
|
88
128
|
}, {
|
|
89
129
|
key: "render",
|
|
90
130
|
value: function render() {
|
|
91
|
-
var _this$
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
var
|
|
131
|
+
var _this$props2 = this.props,
|
|
132
|
+
dataId = _this$props2.dataId,
|
|
133
|
+
id = _this$props2.id,
|
|
134
|
+
customClass = _this$props2.customClass,
|
|
135
|
+
children = _this$props2.children;
|
|
136
|
+
var _this$state = this.state,
|
|
137
|
+
isLoading = _this$state.isLoading,
|
|
138
|
+
isImageValid = _this$state.isImageValid;
|
|
139
|
+
var _customClass$customCh = customClass.customChildrenClass,
|
|
140
|
+
customChildrenClass = _customClass$customCh === void 0 ? '' : _customClass$customCh;
|
|
100
141
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLoading ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
101
142
|
className: "".concat(_AttachmentViewerModule["default"].spinLoad),
|
|
102
143
|
"data-id": "".concat(dataId, "_loader"),
|
|
103
144
|
"data-test-id": "".concat(dataId, "_loader")
|
|
104
145
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
105
146
|
className: _AttachmentViewerModule["default"].loader
|
|
106
|
-
})) :
|
|
147
|
+
})) : isImageValid ? this.renderImage() : children ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
148
|
+
align: "both",
|
|
107
149
|
htmlId: id,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
className: "".concat(isLoading ? _AttachmentViewerModule["default"].hide : '', " ").concat(className),
|
|
113
|
-
alt: alt,
|
|
114
|
-
isCover: isCover
|
|
115
|
-
}));
|
|
150
|
+
dataId: "".concat(dataId, "_custom"),
|
|
151
|
+
className: customChildrenClass
|
|
152
|
+
}, children) : this.renderImage() //alt ui
|
|
153
|
+
);
|
|
116
154
|
}
|
|
117
155
|
}]);
|
|
118
156
|
|