@zohodesk/dot 1.0.0-temp-198.3.3 → 1.0.0-temp-187.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/UnValidatedFiles.html +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +28 -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/common/dot_boxShadow.module.css +2 -0
- package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +92 -92
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +4 -2
- 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/DepartmentDropDown/DepartmentDropDown.js +7 -2
- package/es/list/DepartmentDropDown/props/defaultProps.js +2 -1
- package/es/list/DepartmentDropDown/props/propTypes.js +2 -1
- 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/StatusListItem/StatusListItem.module.css +35 -5
- 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/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/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/common/dot_boxShadow.module.css +2 -0
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +92 -92
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -3
- 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/DepartmentDropDown/DepartmentDropDown.js +8 -3
- package/lib/list/DepartmentDropDown/props/defaultProps.js +2 -1
- package/lib/list/DepartmentDropDown/props/propTypes.js +1 -1
- 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/StatusListItem/StatusListItem.module.css +35 -5
- 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/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/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 +3 -3
- package/result.json +1 -1
- package/unittest/index.html +1 -1
- package/es/DotProvider/DotProvider.js +0 -60
- package/es/DotProvider/hooks/useDotProvider.js +0 -55
- package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +0 -97
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +0 -3
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/blue/Blue_Dark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/blue/Blue_Light_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/blue/Blue_PureDark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/green/Green_Dark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/green/Green_Light_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/green/Green_PureDark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/orange/Orange_Dark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/orange/Orange_Light_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/orange/Orange_PureDark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/red/Red_Dark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/red/Red_Light_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/red/Red_PureDark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Dark_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Light_SVG.js +0 -1
- package/es/DotProvider/libraryChunks/themes/svg/yellow/Yellow_PureDark_SVG.js +0 -1
- package/es/DotProvider/props/defaultProps.js +0 -11
- package/es/DotProvider/props/propTypes.js +0 -16
- package/es/DotProvider/utils/assetPromiseHandlers/fontSizeAssetPromise.js +0 -4
- package/es/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +0 -28
- package/es/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +0 -29
- package/es/DotProvider/utils/assetPromiseHandlers/zoomSizeAssetPromise.js +0 -4
- package/es/DotProvider/utils/constants.js +0 -14
- package/es/DotProvider/utils/errorValidation.js +0 -17
- package/es/DotProvider/utils/getAssetsImportPromises.js +0 -17
- package/es/DotProvider/utils/sizeAssetsConfig.js +0 -12
- package/es/DotProvider/utils/themeAppearanceAssetsConfig.js +0 -47
- package/es/DotProvider/utils/themeColorAssetsConfig.js +0 -221
- package/lib/DotProvider/DotProvider.js +0 -88
- package/lib/DotProvider/hooks/useDotProvider.js +0 -83
- package/lib/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +0 -119
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +0 -7
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/blue/Blue_Dark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/blue/Blue_Light_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/blue/Blue_PureDark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/green/Green_Dark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/green/Green_Light_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/green/Green_PureDark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/orange/Orange_Dark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/orange/Orange_Light_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/orange/Orange_PureDark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/red/Red_Dark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/red/Red_Light_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/red/Red_PureDark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Dark_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Light_SVG.js +0 -3
- package/lib/DotProvider/libraryChunks/themes/svg/yellow/Yellow_PureDark_SVG.js +0 -3
- package/lib/DotProvider/props/defaultProps.js +0 -20
- package/lib/DotProvider/props/propTypes.js +0 -28
- package/lib/DotProvider/utils/assetPromiseHandlers/fontSizeAssetPromise.js +0 -12
- package/lib/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +0 -39
- package/lib/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +0 -40
- package/lib/DotProvider/utils/assetPromiseHandlers/zoomSizeAssetPromise.js +0 -12
- package/lib/DotProvider/utils/constants.js +0 -34
- package/lib/DotProvider/utils/errorValidation.js +0 -25
- package/lib/DotProvider/utils/getAssetsImportPromises.js +0 -22
- package/lib/DotProvider/utils/sizeAssetsConfig.js +0 -31
- package/lib/DotProvider/utils/themeAppearanceAssetsConfig.js +0 -69
- package/lib/DotProvider/utils/themeColorAssetsConfig.js +0 -249
|
@@ -6,11 +6,17 @@ var _react2 = require("@testing-library/react");
|
|
|
6
6
|
|
|
7
7
|
var _AttachmentImage = _interopRequireDefault(require("../AttachmentImage"));
|
|
8
8
|
|
|
9
|
+
var _Avatar = _interopRequireDefault(require("@zohodesk/components/es/Avatar/Avatar"));
|
|
10
|
+
|
|
9
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
12
|
|
|
11
13
|
describe('AttachmentImage', function () {
|
|
12
14
|
test('rendering the defult props', function () {
|
|
13
15
|
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_AttachmentImage["default"], {
|
|
16
|
+
customClass: {
|
|
17
|
+
customImageClass: 'customImageClass',
|
|
18
|
+
customChildrenClass: 'customChildrenClass'
|
|
19
|
+
},
|
|
14
20
|
previewObj: {
|
|
15
21
|
previewData: [{
|
|
16
22
|
id: '1',
|
|
@@ -18,49 +24,94 @@ describe('AttachmentImage', function () {
|
|
|
18
24
|
size: '100412',
|
|
19
25
|
href: 'https://2.bp.blogspot.com/_H-PCzW2K720/SlXXLLMOzsI/AAAAAAAAAFE/efv7GBth9cQ/s280/Elva+Hill+04.JPG',
|
|
20
26
|
viewUrl: 'https://2.bp.blogspot.com/_H-PCzW2K720/SlXXLLMOzsI/AAAAAAAAAFE/efv7GBth9cQ/s280/Elva+Hill+04.JPG',
|
|
21
|
-
downloadUrl: 'https://2.bp.blogspot.com/_H-PCzW2K720/SlXXLLMOzsI/AAAAAAAAAFE/efv7GBth9cQ/s280/Elva+Hill+04.JPG'
|
|
27
|
+
downloadUrl: 'https://2.bp.blogspot.com/_H-PCzW2K720/SlXXLLMOzsI/AAAAAAAAAFE/efv7GBth9cQ/s280/Elva+Hill+04.JPG',
|
|
28
|
+
children: /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
29
|
+
name: "User Image"
|
|
30
|
+
})
|
|
22
31
|
}, {
|
|
23
32
|
id: '2',
|
|
24
33
|
name: 'slack1.jpg',
|
|
25
34
|
size: '100412',
|
|
26
35
|
href: 'https://p.bigstockphoto.com/GeFvQkBbSLaMdpKXF1Zv_bigstock-Aerial-View-Of-Blue-Lakes-And--227291596.jpg',
|
|
27
36
|
viewUrl: 'https://p.bigstockphoto.com/GeFvQkBbSLaMdpKXF1Zv_bigstock-Aerial-View-Of-Blue-Lakes-And--227291596.jpg',
|
|
28
|
-
downloadUrl: 'https://p.bigstockphoto.com/GeFvQkBbSLaMdpKXF1Zv_bigstock-Aerial-View-Of-Blue-Lakes-And--227291596.jpg'
|
|
37
|
+
downloadUrl: 'https://p.bigstockphoto.com/GeFvQkBbSLaMdpKXF1Zv_bigstock-Aerial-View-Of-Blue-Lakes-And--227291596.jpg',
|
|
38
|
+
children: /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
39
|
+
name: "User Image"
|
|
40
|
+
})
|
|
29
41
|
}, {
|
|
30
42
|
id: '3',
|
|
31
43
|
name: 'slack2.jpg',
|
|
32
44
|
size: '100412',
|
|
33
45
|
href: 'https://wallpapercave.com/wp/wp3913900.jpg',
|
|
34
46
|
viewUrl: 'https://wallpapercave.com/wp/wp3913900.jpg',
|
|
35
|
-
downloadUrl: 'https://wallpapercave.com/wp/wp3913900.jpg'
|
|
47
|
+
downloadUrl: 'https://wallpapercave.com/wp/wp3913900.jpg',
|
|
48
|
+
children: /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
49
|
+
name: "User Image"
|
|
50
|
+
})
|
|
36
51
|
}, {
|
|
37
52
|
id: '4',
|
|
38
53
|
name: 'slack3.jpg',
|
|
39
54
|
size: '100412',
|
|
40
|
-
href: '
|
|
41
|
-
viewUrl: '
|
|
42
|
-
downloadUrl: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Giraffe_2019-07-28.jpg/682px-Giraffe_2019-07-28.jpg'
|
|
55
|
+
href: '',
|
|
56
|
+
viewUrl: '',
|
|
57
|
+
downloadUrl: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Giraffe_2019-07-28.jpg/682px-Giraffe_2019-07-28.jpg',
|
|
58
|
+
thumbnail: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Giraffe_2019-07-28.jpg/682px-Giraffe_2019-07-28.jpg' // children: <Avatar name='User Image' />
|
|
59
|
+
|
|
43
60
|
}, {
|
|
44
61
|
id: '5',
|
|
62
|
+
name: 'slack3.jpg',
|
|
63
|
+
size: '100412',
|
|
64
|
+
href: '',
|
|
65
|
+
viewUrl: '',
|
|
66
|
+
downloadUrl: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Giraffe_2019-07-28.jpg/682px-Giraffe_2019-07-28.jpg',
|
|
67
|
+
children: /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
68
|
+
name: "User Image"
|
|
69
|
+
})
|
|
70
|
+
}, {
|
|
71
|
+
id: '6',
|
|
45
72
|
name: 'slack4.jpg',
|
|
46
73
|
size: '100412',
|
|
47
74
|
href: 'https://wallpapercave.com/wp/wp3913900.jpg',
|
|
48
75
|
viewUrl: 'https://wallpapercave.com/wp/wp3913900.jpg',
|
|
49
|
-
downloadUrl: 'https://wallpapercave.com/wp/wp3913900.jpg'
|
|
76
|
+
downloadUrl: 'https://wallpapercave.com/wp/wp3913900.jpg',
|
|
77
|
+
children: /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
78
|
+
name: "User Image"
|
|
79
|
+
})
|
|
50
80
|
}, {
|
|
51
|
-
id: '
|
|
81
|
+
id: '7',
|
|
52
82
|
name: 'slack5.jpg',
|
|
53
83
|
size: '100412',
|
|
54
84
|
href: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Giraffe_2019-07-28.jpg/682px-Giraffe_2019-07-28.jpg',
|
|
55
85
|
viewUrl: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Giraffe_2019-07-28.jpg/682px-Giraffe_2019-07-28.jpg',
|
|
56
|
-
downloadUrl: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Giraffe_2019-07-28.jpg/682px-Giraffe_2019-07-28.jpg'
|
|
86
|
+
downloadUrl: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Giraffe_2019-07-28.jpg/682px-Giraffe_2019-07-28.jpg',
|
|
87
|
+
children: /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
88
|
+
name: "User Image"
|
|
89
|
+
})
|
|
57
90
|
}, {
|
|
58
|
-
id: '
|
|
91
|
+
id: '8',
|
|
59
92
|
name: 'slack5.mp3',
|
|
60
93
|
size: '100412',
|
|
61
|
-
href: 'https://
|
|
62
|
-
viewUrl: 'https://
|
|
63
|
-
downloadUrl: 'https://
|
|
94
|
+
href: 'https://samplelib.com/lib/preview/mp3/sample-3s.mp3',
|
|
95
|
+
viewUrl: 'https://samplelib.com/lib/preview/mp3/sample-3s.mp3',
|
|
96
|
+
downloadUrl: 'https://samplelib.com/lib/preview/mp3/sample-3s.mp3',
|
|
97
|
+
thumbnail: 'https://images.sftcdn.net/images/t_app-icon-m/p/7c80bdc6-a206-40b2-91fd-951c244f3672/3180901960/mp3-tag-editor-edit-music-tags-cover-art-changer-icon.png',
|
|
98
|
+
children: 'MP3'
|
|
99
|
+
}, {
|
|
100
|
+
id: '9',
|
|
101
|
+
name: 'slack5.mp3',
|
|
102
|
+
size: '100412',
|
|
103
|
+
href: 'https://samplelib.com/lib/preview/mp3/sample-3s.mp3',
|
|
104
|
+
viewUrl: 'https://samplelib.com/lib/preview/mp3/sample-3s.mp3',
|
|
105
|
+
downloadUrl: 'https://samplelib.com/lib/preview/mp3/sample-3s.mp3',
|
|
106
|
+
children: 'MP3'
|
|
107
|
+
}, {
|
|
108
|
+
id: '10',
|
|
109
|
+
children: 'custom Text'
|
|
110
|
+
}, {
|
|
111
|
+
id: '11',
|
|
112
|
+
children: /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
113
|
+
name: "custom children"
|
|
114
|
+
})
|
|
64
115
|
}],
|
|
65
116
|
selectedIndex: 0
|
|
66
117
|
}
|
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`AttachmentImage rendering the defult props 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
|
-
<
|
|
6
|
-
class="
|
|
7
|
-
data-id="
|
|
8
|
-
data-test-id="
|
|
9
|
-
|
|
5
|
+
<div
|
|
6
|
+
class="spinLoad"
|
|
7
|
+
data-id="AttachmentImage_loader"
|
|
8
|
+
data-test-id="AttachmentImage_loader"
|
|
9
|
+
>
|
|
10
|
+
<div
|
|
11
|
+
class="loader"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
10
14
|
</DocumentFragment>
|
|
11
15
|
`;
|
|
@@ -65,59 +65,6 @@ exports[`AttachmentViewer rendering the when isActive is true 1`] = `
|
|
|
65
65
|
data-selector-id="container"
|
|
66
66
|
data-test-id="containerComponent"
|
|
67
67
|
>
|
|
68
|
-
<div
|
|
69
|
-
class="menu"
|
|
70
|
-
data-id="zoomIn"
|
|
71
|
-
data-test-id="zoomIn"
|
|
72
|
-
>
|
|
73
|
-
<button
|
|
74
|
-
aria-pressed="false"
|
|
75
|
-
class="buttonReset wrapper menuIcon undefined effect default border borderHover hoverEffect inflex coldir both"
|
|
76
|
-
data-id="iconContainer"
|
|
77
|
-
data-ishtml="false"
|
|
78
|
-
data-selector-id="iconButton"
|
|
79
|
-
data-test-id="iconContainer"
|
|
80
|
-
>
|
|
81
|
-
<i
|
|
82
|
-
aria-hidden="true"
|
|
83
|
-
class="zd_font_icons basic icon-zoomIn "
|
|
84
|
-
data-id="fontIcon"
|
|
85
|
-
data-selector-id="fontIcon"
|
|
86
|
-
data-test-id="fontIcon"
|
|
87
|
-
style="--zd-iconfont-size: var(--zd_font_size16);"
|
|
88
|
-
/>
|
|
89
|
-
</button>
|
|
90
|
-
</div>
|
|
91
|
-
<div
|
|
92
|
-
class="menu"
|
|
93
|
-
>
|
|
94
|
-
<a
|
|
95
|
-
class="container "
|
|
96
|
-
data-id="newTabAttach"
|
|
97
|
-
data-test-id="newTabAttach"
|
|
98
|
-
href="https://2.bp.blogspot.com/_H-PCzW2K720/SlXXLLMOzsI/AAAAAAAAAFE/efv7GBth9cQ/s280/Elva+Hill+04.JPG"
|
|
99
|
-
rel="noopener noreferrer"
|
|
100
|
-
target="_blank"
|
|
101
|
-
>
|
|
102
|
-
<div
|
|
103
|
-
aria-pressed="false"
|
|
104
|
-
class="false wrapper menuIcon undefined effect default border borderHover hoverEffect inflex coldir both"
|
|
105
|
-
data-id="iconContainer"
|
|
106
|
-
data-ishtml="false"
|
|
107
|
-
data-selector-id="iconButton"
|
|
108
|
-
data-test-id="iconContainer"
|
|
109
|
-
>
|
|
110
|
-
<i
|
|
111
|
-
aria-hidden="true"
|
|
112
|
-
class="zd_font_icons basic icon-newLink "
|
|
113
|
-
data-id="fontIcon"
|
|
114
|
-
data-selector-id="fontIcon"
|
|
115
|
-
data-test-id="fontIcon"
|
|
116
|
-
style="--zd-iconfont-size: var(--zd_font_size16);"
|
|
117
|
-
/>
|
|
118
|
-
</div>
|
|
119
|
-
</a>
|
|
120
|
-
</div>
|
|
121
68
|
<div
|
|
122
69
|
class="menu"
|
|
123
70
|
>
|
|
@@ -241,14 +188,6 @@ exports[`AttachmentViewer rendering the when isActive is true 1`] = `
|
|
|
241
188
|
class="loader"
|
|
242
189
|
/>
|
|
243
190
|
</div>
|
|
244
|
-
<img
|
|
245
|
-
alt="Preview"
|
|
246
|
-
class=" hide img imgMaxFullSize "
|
|
247
|
-
data-id="attachViewer"
|
|
248
|
-
data-test-id="attachViewer"
|
|
249
|
-
id="img0"
|
|
250
|
-
src="https://2.bp.blogspot.com/_H-PCzW2K720/SlXXLLMOzsI/AAAAAAAAAFE/efv7GBth9cQ/s280/Elva+Hill+04.JPG"
|
|
251
|
-
/>
|
|
252
191
|
</div>
|
|
253
192
|
</div>
|
|
254
193
|
</div>
|
|
@@ -298,7 +237,7 @@ exports[`AttachmentViewer rendering the when isActive is true 1`] = `
|
|
|
298
237
|
data-test-id="containerComponent"
|
|
299
238
|
>
|
|
300
239
|
<div
|
|
301
|
-
class="imgItem selected
|
|
240
|
+
class="imgItem selected shrinkOff"
|
|
302
241
|
data-id="attachPreviewList"
|
|
303
242
|
data-selector-id="box"
|
|
304
243
|
data-test-id="attachPreviewList"
|
|
@@ -313,16 +252,9 @@ exports[`AttachmentViewer rendering the when isActive is true 1`] = `
|
|
|
313
252
|
class="loader"
|
|
314
253
|
/>
|
|
315
254
|
</div>
|
|
316
|
-
<img
|
|
317
|
-
alt="slack0.jpg"
|
|
318
|
-
class=" hide image imgMaxFullSize "
|
|
319
|
-
data-id="AttachmentImage"
|
|
320
|
-
data-test-id="AttachmentImage"
|
|
321
|
-
src="https://2.bp.blogspot.com/_H-PCzW2K720/SlXXLLMOzsI/AAAAAAAAAFE/efv7GBth9cQ/s280/Elva+Hill+04.JPG"
|
|
322
|
-
/>
|
|
323
255
|
</div>
|
|
324
256
|
<div
|
|
325
|
-
class="imgItem
|
|
257
|
+
class="imgItem shrinkOff"
|
|
326
258
|
data-id="attachPreviewList"
|
|
327
259
|
data-selector-id="box"
|
|
328
260
|
data-test-id="attachPreviewList"
|
|
@@ -337,16 +269,9 @@ exports[`AttachmentViewer rendering the when isActive is true 1`] = `
|
|
|
337
269
|
class="loader"
|
|
338
270
|
/>
|
|
339
271
|
</div>
|
|
340
|
-
<img
|
|
341
|
-
alt="slack1.jpg"
|
|
342
|
-
class=" hide image imgMaxFullSize "
|
|
343
|
-
data-id="AttachmentImage"
|
|
344
|
-
data-test-id="AttachmentImage"
|
|
345
|
-
src="https://p.bigstockphoto.com/GeFvQkBbSLaMdpKXF1Zv_bigstock-Aerial-View-Of-Blue-Lakes-And--227291596.jpg"
|
|
346
|
-
/>
|
|
347
272
|
</div>
|
|
348
273
|
<div
|
|
349
|
-
class="imgItem
|
|
274
|
+
class="imgItem shrinkOff"
|
|
350
275
|
data-id="attachPreviewList"
|
|
351
276
|
data-selector-id="box"
|
|
352
277
|
data-test-id="attachPreviewList"
|
|
@@ -361,16 +286,9 @@ exports[`AttachmentViewer rendering the when isActive is true 1`] = `
|
|
|
361
286
|
class="loader"
|
|
362
287
|
/>
|
|
363
288
|
</div>
|
|
364
|
-
<img
|
|
365
|
-
alt="slack2.jpg"
|
|
366
|
-
class=" hide image imgMaxFullSize "
|
|
367
|
-
data-id="AttachmentImage"
|
|
368
|
-
data-test-id="AttachmentImage"
|
|
369
|
-
src="https://wallpapercave.com/wp/wp3913900.jpg"
|
|
370
|
-
/>
|
|
371
289
|
</div>
|
|
372
290
|
<div
|
|
373
|
-
class="imgItem
|
|
291
|
+
class="imgItem shrinkOff"
|
|
374
292
|
data-id="attachPreviewList"
|
|
375
293
|
data-selector-id="box"
|
|
376
294
|
data-test-id="attachPreviewList"
|
|
@@ -385,16 +303,9 @@ exports[`AttachmentViewer rendering the when isActive is true 1`] = `
|
|
|
385
303
|
class="loader"
|
|
386
304
|
/>
|
|
387
305
|
</div>
|
|
388
|
-
<img
|
|
389
|
-
alt="slack3.jpg"
|
|
390
|
-
class=" hide image imgMaxFullSize "
|
|
391
|
-
data-id="AttachmentImage"
|
|
392
|
-
data-test-id="AttachmentImage"
|
|
393
|
-
src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Giraffe_2019-07-28.jpg/682px-Giraffe_2019-07-28.jpg"
|
|
394
|
-
/>
|
|
395
306
|
</div>
|
|
396
307
|
<div
|
|
397
|
-
class="imgItem
|
|
308
|
+
class="imgItem shrinkOff"
|
|
398
309
|
data-id="attachPreviewList"
|
|
399
310
|
data-selector-id="box"
|
|
400
311
|
data-test-id="attachPreviewList"
|
|
@@ -409,16 +320,9 @@ exports[`AttachmentViewer rendering the when isActive is true 1`] = `
|
|
|
409
320
|
class="loader"
|
|
410
321
|
/>
|
|
411
322
|
</div>
|
|
412
|
-
<img
|
|
413
|
-
alt="slack4.jpg"
|
|
414
|
-
class=" hide image imgMaxFullSize "
|
|
415
|
-
data-id="AttachmentImage"
|
|
416
|
-
data-test-id="AttachmentImage"
|
|
417
|
-
src="https://wallpapercave.com/wp/wp3913900.jpg"
|
|
418
|
-
/>
|
|
419
323
|
</div>
|
|
420
324
|
<div
|
|
421
|
-
class="imgItem
|
|
325
|
+
class="imgItem shrinkOff"
|
|
422
326
|
data-id="attachPreviewList"
|
|
423
327
|
data-selector-id="box"
|
|
424
328
|
data-test-id="attachPreviewList"
|
|
@@ -433,28 +337,23 @@ exports[`AttachmentViewer rendering the when isActive is true 1`] = `
|
|
|
433
337
|
class="loader"
|
|
434
338
|
/>
|
|
435
339
|
</div>
|
|
436
|
-
<img
|
|
437
|
-
alt="slack5.jpg"
|
|
438
|
-
class=" hide image imgMaxFullSize "
|
|
439
|
-
data-id="AttachmentImage"
|
|
440
|
-
data-test-id="AttachmentImage"
|
|
441
|
-
src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/09/Giraffe_2019-07-28.jpg/682px-Giraffe_2019-07-28.jpg"
|
|
442
|
-
/>
|
|
443
340
|
</div>
|
|
444
341
|
<div
|
|
445
|
-
class="imgItem
|
|
342
|
+
class="imgItem shrinkOff"
|
|
446
343
|
data-id="attachPreviewList"
|
|
447
344
|
data-selector-id="box"
|
|
448
345
|
data-test-id="attachPreviewList"
|
|
449
346
|
data-title="slack5.mp3"
|
|
450
347
|
>
|
|
451
|
-
<
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
data-id="
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
348
|
+
<div
|
|
349
|
+
class="spinLoad"
|
|
350
|
+
data-id="AttachmentImage_loader"
|
|
351
|
+
data-test-id="AttachmentImage_loader"
|
|
352
|
+
>
|
|
353
|
+
<div
|
|
354
|
+
class="loader"
|
|
355
|
+
/>
|
|
356
|
+
</div>
|
|
458
357
|
</div>
|
|
459
358
|
</div>
|
|
460
359
|
</div>
|
|
@@ -5,7 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.AttachmentViewer_defaultProps = exports.AttachmentImage_defaultProps = void 0;
|
|
7
7
|
var AttachmentImage_defaultProps = {
|
|
8
|
-
dataId: 'AttachmentImage'
|
|
8
|
+
dataId: 'AttachmentImage',
|
|
9
|
+
customClass: {
|
|
10
|
+
customImageClass: '',
|
|
11
|
+
customChildrenClass: ''
|
|
12
|
+
}
|
|
9
13
|
};
|
|
10
14
|
exports.AttachmentImage_defaultProps = AttachmentImage_defaultProps;
|
|
11
15
|
var AttachmentViewer_defaultProps = {
|
|
@@ -11,14 +11,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
11
11
|
|
|
12
12
|
var AttachmentImage_propTypes = {
|
|
13
13
|
alt: _propTypes["default"].string,
|
|
14
|
-
|
|
14
|
+
customClass: _propTypes["default"].shape({
|
|
15
|
+
customImageClass: _propTypes["default"].string,
|
|
16
|
+
customChildrenClass: _propTypes["default"].string
|
|
17
|
+
}),
|
|
15
18
|
dataId: _propTypes["default"].string,
|
|
16
19
|
id: _propTypes["default"].string,
|
|
17
20
|
isCover: _propTypes["default"].bool,
|
|
18
|
-
isImage: _propTypes["default"].string,
|
|
19
21
|
onClick: _propTypes["default"].func,
|
|
20
22
|
onLoad: _propTypes["default"].func,
|
|
21
|
-
|
|
23
|
+
onError: _propTypes["default"].func,
|
|
24
|
+
src: _propTypes["default"].string,
|
|
25
|
+
children: _propTypes["default"].node
|
|
22
26
|
};
|
|
23
27
|
exports.AttachmentImage_propTypes = AttachmentImage_propTypes;
|
|
24
28
|
var AttachmentViewer_propTypes = {
|
|
@@ -4,6 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ZoomEvent = exports.Zoom = void 0;
|
|
7
|
+
exports.checkAudioUrlValidity = checkAudioUrlValidity;
|
|
8
|
+
exports.checkFileSourcesValidation = checkFileSourcesValidation;
|
|
9
|
+
exports.checkImageValidity = checkImageValidity;
|
|
10
|
+
|
|
11
|
+
var _Attachment = require("./Attachment");
|
|
7
12
|
|
|
8
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
9
14
|
|
|
@@ -131,4 +136,58 @@ var ZoomEvent = /*#__PURE__*/function () {
|
|
|
131
136
|
return ZoomEvent;
|
|
132
137
|
}();
|
|
133
138
|
|
|
134
|
-
exports.ZoomEvent = ZoomEvent;
|
|
139
|
+
exports.ZoomEvent = ZoomEvent;
|
|
140
|
+
|
|
141
|
+
function checkImageValidity(src) {
|
|
142
|
+
return new Promise(function (resolve) {
|
|
143
|
+
var img = new Image();
|
|
144
|
+
img.src = src;
|
|
145
|
+
|
|
146
|
+
img.onload = function () {
|
|
147
|
+
resolve(true);
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
img.onerror = function () {
|
|
151
|
+
resolve(false);
|
|
152
|
+
};
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function checkAudioUrlValidity(url) {
|
|
157
|
+
return new Promise(function (resolve) {
|
|
158
|
+
var audio = new Audio(url);
|
|
159
|
+
|
|
160
|
+
audio.oncanplaythrough = function () {
|
|
161
|
+
resolve(true);
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
audio.onerror = function () {
|
|
165
|
+
resolve(false);
|
|
166
|
+
};
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
;
|
|
171
|
+
|
|
172
|
+
function checkFileSourcesValidation(_ref) {
|
|
173
|
+
var fileName = _ref.fileName,
|
|
174
|
+
viewURL = _ref.viewURL;
|
|
175
|
+
|
|
176
|
+
if ((0, _Attachment.isAudioFile)(fileName)) {
|
|
177
|
+
var audioValidityPromise = checkAudioUrlValidity(viewURL);
|
|
178
|
+
return audioValidityPromise.then(function (isURLValid) {
|
|
179
|
+
return {
|
|
180
|
+
isViewURLValid: isURLValid,
|
|
181
|
+
canZoom: false
|
|
182
|
+
};
|
|
183
|
+
});
|
|
184
|
+
} else {
|
|
185
|
+
var imageValidityPromise = checkImageValidity(viewURL);
|
|
186
|
+
return imageValidityPromise.then(function (isURLValid) {
|
|
187
|
+
return {
|
|
188
|
+
isViewURLValid: isURLValid,
|
|
189
|
+
canZoom: isURLValid
|
|
190
|
+
};
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
}
|