@zohodesk/dot 1.0.0-temp-203.5 → 1.0.0-temp-203.6
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/PropUnificationExcludeFilesArray.js +0 -3
- package/.cli/UnValidatedFiles.html +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +15 -0
- package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +0 -3
- package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +3 -0
- package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +3 -0
- package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +3 -0
- package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +3 -0
- package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +3 -0
- package/assets/Appearance/light/mode/Dot_LightMode.module.css +0 -3
- package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +3 -0
- package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +3 -0
- package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +3 -0
- package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +3 -0
- package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +3 -0
- package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +0 -3
- package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +3 -0
- package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +3 -0
- package/es/AttachmentViewer/AttachmentViewer.js +7 -2
- package/es/AttachmentViewer/props/defaultProps.js +2 -1
- package/es/AttachmentViewer/props/propTypes.js +5 -1
- package/es/ChannelIcon/ChannelIcon.js +15 -5
- package/es/ChannelIcon/props/defaultProps.js +2 -1
- package/es/ChannelIcon/props/propTypes.js +9 -1
- package/es/Loader/Loader.module.css +8 -7
- package/es/PlusIcon/PlusIcon.js +4 -2
- package/es/PlusIcon/props/defaultProps.js +2 -1
- package/es/PlusIcon/props/propTypes.js +3 -1
- package/es/utils/getCurrentTime.js +10 -0
- package/es/version2/GlobalNotification/GlobalNotification.js +48 -8
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +1 -1
- package/lib/AttachmentViewer/AttachmentViewer.js +6 -3
- package/lib/AttachmentViewer/props/defaultProps.js +2 -1
- package/lib/AttachmentViewer/props/propTypes.js +6 -1
- package/lib/ChannelIcon/ChannelIcon.js +15 -6
- package/lib/ChannelIcon/props/defaultProps.js +2 -1
- package/lib/ChannelIcon/props/propTypes.js +12 -1
- package/lib/Loader/Loader.module.css +8 -7
- package/lib/PlusIcon/PlusIcon.js +4 -2
- package/lib/PlusIcon/props/defaultProps.js +2 -1
- package/lib/PlusIcon/props/propTypes.js +4 -1
- package/lib/utils/getCurrentTime.js +17 -0
- package/lib/version2/GlobalNotification/GlobalNotification.js +75 -24
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +1 -1
- package/package.json +6 -9
- package/propValidationArg.json +1 -1
- package/result.json +1 -1
- package/unittest/index.html +1 -1
- package/es/services/components/Attachment/AttachmentViewer.js +0 -24
- package/es/services/components/Attachment/AttachmentViewerWrapper.js +0 -114
- package/es/services/components/Attachment/props/defaultProps.js +0 -4
- package/es/services/components/Attachment/props/propTypes.js +0 -9
- package/es/services/components/ToastNotification/ToastNotification.js +0 -43
- package/es/services/components/ToastNotification/ToastNotificationWrapper.js +0 -156
- package/es/services/components/ToastNotification/ToastNotificationWrapper.module.css +0 -193
- package/es/services/components/ToastNotification/props/defaultProps.js +0 -12
- package/es/services/components/ToastNotification/props/propTypes.js +0 -17
- package/es/services/context/DOTAttachmentService.js +0 -15
- package/es/services/context/DOTToastNotificationService.js +0 -16
- package/es/services/helpers/utils.js +0 -60
- package/es/utils/constants.js +0 -3
- package/lib/services/components/Attachment/AttachmentViewer.js +0 -41
- package/lib/services/components/Attachment/AttachmentViewerWrapper.js +0 -137
- package/lib/services/components/Attachment/props/defaultProps.js +0 -11
- package/lib/services/components/Attachment/props/propTypes.js +0 -20
- package/lib/services/components/ToastNotification/ToastNotification.js +0 -55
- package/lib/services/components/ToastNotification/ToastNotificationWrapper.js +0 -207
- package/lib/services/components/ToastNotification/ToastNotificationWrapper.module.css +0 -193
- package/lib/services/components/ToastNotification/props/defaultProps.js +0 -19
- package/lib/services/components/ToastNotification/props/propTypes.js +0 -28
- package/lib/services/context/DOTAttachmentService.js +0 -32
- package/lib/services/context/DOTToastNotificationService.js +0 -33
- package/lib/services/helpers/utils.js +0 -67
- package/lib/utils/constants.js +0 -14
- /package/es/version2/GlobalNotification/{v2GlobalNotification.module.css → GlobalNotification.module.css} +0 -0
- /package/lib/version2/GlobalNotification/{v2GlobalNotification.module.css → GlobalNotification.module.css} +0 -0
package/README.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
In this Library, we Provide Some Basic Components to Build Your Application
|
|
4
4
|
|
|
5
|
+
# 1.7.5 (yet to publish)
|
|
6
|
+
|
|
7
|
+
- **AttachmentViewer**
|
|
8
|
+
- `avatarProps` prop has been added under the `customProps` group.
|
|
9
|
+
|
|
10
|
+
- **ChannelIcon**
|
|
11
|
+
- `avatarProps`, `avatarIconProps` and `iconProps` prop has been added under the `customProps` group.
|
|
12
|
+
|
|
13
|
+
- **PlusIcon**
|
|
14
|
+
- `customProps` prop has been added.
|
|
15
|
+
|
|
16
|
+
# 1.7.4
|
|
17
|
+
|
|
18
|
+
- **Loader** - Theme-based adaptation in loader, removed existing multi-color gradient loader.
|
|
19
|
+
|
|
5
20
|
# 1.7.3
|
|
6
21
|
|
|
7
22
|
- **RadioField**
|
|
@@ -276,9 +276,6 @@
|
|
|
276
276
|
--zdt_thread_iconText: hsla(217, 13.73%, calc(70.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
277
277
|
--zdt_thread_hover_iconText: hsla(0, 0.00%, calc(100.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
278
278
|
|
|
279
|
-
/* loader */
|
|
280
|
-
--zdt_loader_gradient_bg: linear-gradient(to right, rgb(206, 34, 50) 0%, rgb(96, 128, 64) 20%, rgb(144, 178, 71) 40%, rgb(249, 221, 75) 60%, rgb(9, 116, 176) 80%, rgb(206, 34, 50) 100%);
|
|
281
|
-
|
|
282
279
|
/* lookup header common */
|
|
283
280
|
--zdt_lookupheader_default_bg: var(--zdt_cta_grey_10_bg);
|
|
284
281
|
--zdt_lookupheader_white_bg: hsla(217, 23.08%, calc(17.84% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(218, 23.08%, calc(22.94% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(218, 22.86%, calc(13.73% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(218, 22.86%, calc(13.73% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(71,157,255);
|
|
16
19
|
}
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(218, 23.08%, calc(22.94% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(218, 22.86%, calc(13.73% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(218, 22.86%, calc(13.73% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(69,161,89);
|
|
16
19
|
}
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(218, 23.08%, calc(22.94% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(218, 22.86%, calc(13.73% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(218, 22.86%, calc(13.73% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(255,128,31);
|
|
16
19
|
}
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(218, 23.08%, calc(22.94% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(218, 22.86%, calc(13.73% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(218, 22.86%, calc(13.73% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(233,79,79);
|
|
16
19
|
}
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(218, 23.08%, calc(22.94% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(218, 22.86%, calc(13.73% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(218, 22.86%, calc(13.73% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(215,152,53);
|
|
16
19
|
}
|
|
@@ -276,9 +276,6 @@
|
|
|
276
276
|
--zdt_thread_iconText: hsla(220, 10.45%, calc(39.41% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
277
277
|
--zdt_thread_hover_iconText: hsla(0, 0.00%, calc(0.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
278
278
|
|
|
279
|
-
/* loader */
|
|
280
|
-
--zdt_loader_gradient_bg: linear-gradient(to right, rgb(206, 34, 50) 0%, rgb(96, 128, 64) 20%, rgb(144, 178, 71) 40%, rgb(249, 221, 75) 60%, rgb(9, 116, 176) 80%, rgb(206, 34, 50) 100%);
|
|
281
|
-
|
|
282
279
|
/* lookup header common */
|
|
283
280
|
--zdt_lookupheader_default_bg: var(--zdt_cta_grey_10_bg);
|
|
284
281
|
--zdt_lookupheader_white_bg: hsla(0, 0.00%, calc(100.00% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(228, 18.01%, calc(31.57% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(227, 27.27%, calc(23.73% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(227, 27.27%, calc(23.73% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(71,157,255);
|
|
16
19
|
}
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(190, 37.35%, calc(16.27% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(190, 43.40%, calc(10.39% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(190, 43.40%, calc(10.39% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(69,161,89);
|
|
16
19
|
}
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(54, 46.03%, calc(12.35% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(39, 30.91%, calc(10.78% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(39, 30.91%, calc(10.78% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(255,128,31);
|
|
16
19
|
}
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(351, 23.46%, calc(15.88% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(322, 38.78%, calc(9.61% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(322, 38.78%, calc(9.61% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(233,79,79);
|
|
16
19
|
}
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(0, 0.00%, calc(100.00% + var(--zdc_lighter)), calc( 0.08 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(67, 33.33%, calc(10.59% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(67, 33.33%, calc(10.59% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(215,152,53);
|
|
16
19
|
}
|
|
@@ -276,9 +276,6 @@
|
|
|
276
276
|
--zdt_thread_iconText: hsla(0, 0.00%, calc(60.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
277
277
|
--zdt_thread_hover_iconText: hsla(0, 0.00%, calc(100.00% + var(--zdc_default_inverse)), calc(1 + var(--zdc_alpha_high)));
|
|
278
278
|
|
|
279
|
-
/* loader */
|
|
280
|
-
--zdt_loader_gradient_bg: linear-gradient(to right, rgb(206, 34, 50) 0%, rgb(96, 128, 64) 20%, rgb(144, 178, 71) 40%, rgb(249, 221, 75) 60%, rgb(9, 116, 176) 80%, rgb(206, 34, 50) 100%);
|
|
281
|
-
|
|
282
279
|
/* lookup header common */
|
|
283
280
|
--zdt_lookupheader_default_bg: var(--zdt_cta_grey_10_bg);
|
|
284
281
|
--zdt_lookupheader_white_bg: hsla(0, 0.00%, calc(12.94% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(0, 0.00%, calc(13.33% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(0, 0.00%, calc(9.02% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(0, 0.00%, calc(6.27% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(71,157,255);
|
|
16
19
|
}
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(0, 0.00%, calc(13.33% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(0, 0.00%, calc(9.02% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(0, 0.00%, calc(6.27% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(69,161,89);
|
|
16
19
|
}
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(0, 0.00%, calc(13.33% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(0, 0.00%, calc(9.02% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(0, 0.00%, calc(6.27% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(255,128,31);
|
|
16
19
|
}
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(0, 0.00%, calc(13.33% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(0, 0.00%, calc(9.02% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(0, 0.00%, calc(6.27% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(233,79,79);
|
|
16
19
|
}
|
|
@@ -13,4 +13,7 @@
|
|
|
13
13
|
--zdt_attachmentviewer_header_border: hsla(0, 0.00%, calc(13.33% + var(--zdc_lighter)), calc(1 + var(--zdc_alpha_high)));
|
|
14
14
|
--zdt_attachmentviewer_footer_bg: hsla(0, 0.00%, calc(9.02% + var(--zdc_default)), calc(1 + var(--zdc_alpha_high)));
|
|
15
15
|
--zdt_attachmentviewer_arrow_bg_hover: hsla(0, 0.00%, calc(6.27% + var(--zdc_default)), calc( 0.4 + var(--zdc_alpha_high)));
|
|
16
|
+
|
|
17
|
+
/* loader */
|
|
18
|
+
--zdt_loader_bg: rgb(215,152,53);
|
|
16
19
|
}
|
|
@@ -363,8 +363,12 @@ export default class AttachmentViewer extends Component {
|
|
|
363
363
|
needDownload,
|
|
364
364
|
i18nKeys,
|
|
365
365
|
isActive,
|
|
366
|
-
dataId
|
|
366
|
+
dataId,
|
|
367
|
+
customProps
|
|
367
368
|
} = this.props;
|
|
369
|
+
const {
|
|
370
|
+
avatarProps = {}
|
|
371
|
+
} = customProps;
|
|
368
372
|
const totalLen = data.length;
|
|
369
373
|
const selectedAttachment = data[selectedIndex] || {};
|
|
370
374
|
const selectedImgUrl = selectedAttachment.viewUrl;
|
|
@@ -552,7 +556,8 @@ export default class AttachmentViewer extends Component {
|
|
|
552
556
|
name: authorName,
|
|
553
557
|
size: "xmedium",
|
|
554
558
|
src: authorHref,
|
|
555
|
-
palette: "info"
|
|
559
|
+
palette: "info",
|
|
560
|
+
...avatarProps
|
|
556
561
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
557
562
|
flexible: true,
|
|
558
563
|
className: style.authorName,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import { propTypes as AvatarProps } from '@zohodesk/components/es/Avatar/props/propTypes';
|
|
2
3
|
export const AttachmentImage_propTypes = {
|
|
3
4
|
alt: PropTypes.string,
|
|
4
5
|
customClass: PropTypes.shape({
|
|
@@ -32,5 +33,8 @@ export const AttachmentViewer_propTypes = {
|
|
|
32
33
|
responsiveId: PropTypes.string,
|
|
33
34
|
maintainZoom: PropTypes.bool,
|
|
34
35
|
isActive: PropTypes.bool,
|
|
35
|
-
dataId: PropTypes.string
|
|
36
|
+
dataId: PropTypes.string,
|
|
37
|
+
customProps: PropTypes.shape({
|
|
38
|
+
avatarProps: PropTypes.exact(AvatarProps)
|
|
39
|
+
})
|
|
36
40
|
};
|
|
@@ -34,8 +34,14 @@ export default class ChannelIcon extends Component {
|
|
|
34
34
|
renderIconOnly,
|
|
35
35
|
iconName,
|
|
36
36
|
title,
|
|
37
|
-
dataSelectorId
|
|
37
|
+
dataSelectorId,
|
|
38
|
+
customProps
|
|
38
39
|
} = this.props;
|
|
40
|
+
const {
|
|
41
|
+
avatarProps = {},
|
|
42
|
+
avatarIconProps = {},
|
|
43
|
+
iconProps = {}
|
|
44
|
+
} = customProps;
|
|
39
45
|
let defaultChannelObj = name && !iconName && getChannelMappingObj()[name.toUpperCase()];
|
|
40
46
|
let customizedChannelName = null;
|
|
41
47
|
|
|
@@ -56,7 +62,8 @@ export default class ChannelIcon extends Component {
|
|
|
56
62
|
customClass: customTextClass,
|
|
57
63
|
dataId: dataId,
|
|
58
64
|
needTitle: title,
|
|
59
|
-
title: title
|
|
65
|
+
title: title,
|
|
66
|
+
...avatarProps
|
|
60
67
|
}) : !renderIconOnly ? iconName ? /*#__PURE__*/React.createElement(AvatarIcon, {
|
|
61
68
|
name: iconName,
|
|
62
69
|
iconSize: iconSize,
|
|
@@ -65,7 +72,8 @@ export default class ChannelIcon extends Component {
|
|
|
65
72
|
dataId: dataId,
|
|
66
73
|
className: className,
|
|
67
74
|
iconColor: iconColor,
|
|
68
|
-
title: iconTitle
|
|
75
|
+
title: iconTitle,
|
|
76
|
+
...avatarIconProps
|
|
69
77
|
}) : /*#__PURE__*/React.createElement(Avatar, {
|
|
70
78
|
name: name,
|
|
71
79
|
size: size,
|
|
@@ -74,13 +82,15 @@ export default class ChannelIcon extends Component {
|
|
|
74
82
|
customClass: customTextClass,
|
|
75
83
|
dataId: dataId,
|
|
76
84
|
needTitle: title,
|
|
77
|
-
title: title
|
|
85
|
+
title: title,
|
|
86
|
+
...avatarProps
|
|
78
87
|
}) : /*#__PURE__*/React.createElement(Icon, {
|
|
79
88
|
name: iconName,
|
|
80
89
|
size: iconSize,
|
|
81
90
|
iconClass: `${iconClass ? iconClass : ''} ${style.iconStyle} ${name && action ? style[`${name.toLowerCase()}_${action.toLowerCase()}`] : ''}`,
|
|
82
91
|
title: iconTitle,
|
|
83
|
-
dataId: dataId
|
|
92
|
+
dataId: dataId,
|
|
93
|
+
...iconProps
|
|
84
94
|
}), topicIcon ? /*#__PURE__*/React.createElement("span", {
|
|
85
95
|
className: `${style.thread} ${needTopicBorder ? style.threadBorder : ''} ${topicClass ? topicClass : ''}`,
|
|
86
96
|
"data-title": topicIconTitle
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import { propTypes as AvatarProps } from '@zohodesk/components/es/Avatar/props/propTypes';
|
|
3
|
+
import { propTypes as AvatarIconProps } from '../../avatar/AvatarIcon/props/propTypes';
|
|
4
|
+
import { IconProps as IconPropTypes } from '@zohodesk/icons/es/Icon/props/propTypes';
|
|
2
5
|
export const propTypes = {
|
|
3
6
|
action: PropTypes.string,
|
|
4
7
|
className: PropTypes.string,
|
|
@@ -21,5 +24,10 @@ export const propTypes = {
|
|
|
21
24
|
topicIconColor: PropTypes.string,
|
|
22
25
|
topicIconSize: PropTypes.string,
|
|
23
26
|
topicIconTitle: PropTypes.string,
|
|
24
|
-
dataSelectorId: PropTypes.string
|
|
27
|
+
dataSelectorId: PropTypes.string,
|
|
28
|
+
customProps: PropTypes.shape({
|
|
29
|
+
avatarProps: PropTypes.exact(AvatarProps),
|
|
30
|
+
avatarIconProps: PropTypes.exact(AvatarIconProps),
|
|
31
|
+
iconProps: PropTypes.exact(IconPropTypes)
|
|
32
|
+
})
|
|
25
33
|
};
|
|
@@ -11,19 +11,20 @@
|
|
|
11
11
|
.loader {
|
|
12
12
|
width: 100% ;
|
|
13
13
|
/* Variable:Ignore */
|
|
14
|
-
height:
|
|
15
|
-
background-
|
|
16
|
-
background-size: 200% auto;
|
|
14
|
+
height: 5px;
|
|
15
|
+
background-size: 50% auto;
|
|
17
16
|
}
|
|
18
17
|
[dir=ltr] .loader {
|
|
18
|
+
background-image: linear-gradient(to right, var(--zdt_loader_bg) 30%, var(--dot_solitude) 50%, var(--zdt_loader_bg) 90%);
|
|
19
19
|
background-position: 0 100%;
|
|
20
|
-
animation: loading-ltr
|
|
20
|
+
animation: loading-ltr 2s infinite;
|
|
21
21
|
animation-fill-mode: forwards;
|
|
22
22
|
animation-timing-function: linear;
|
|
23
23
|
}
|
|
24
24
|
[dir=rtl] .loader {
|
|
25
|
+
background-image: linear-gradient(to left, var(--zdt_loader_bg) 30%, var(--dot_solitude) 50%, var(--zdt_loader_bg) 90%);
|
|
25
26
|
background-position: 100% 100%;
|
|
26
|
-
animation: loading-rtl
|
|
27
|
+
animation: loading-rtl 2s infinite;
|
|
27
28
|
animation-fill-mode: forwards;
|
|
28
29
|
animation-timing-function: linear;
|
|
29
30
|
}
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
background-position: 0 0;
|
|
34
35
|
}
|
|
35
36
|
100% {
|
|
36
|
-
background-position:
|
|
37
|
+
background-position: 200% 0;
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
|
|
@@ -42,6 +43,6 @@
|
|
|
42
43
|
background-position: 100% 0;
|
|
43
44
|
}
|
|
44
45
|
100% {
|
|
45
|
-
background-position:
|
|
46
|
+
background-position: -100% 0;
|
|
46
47
|
}
|
|
47
48
|
}
|
package/es/PlusIcon/PlusIcon.js
CHANGED
|
@@ -17,7 +17,8 @@ export default class PlusIcon extends React.Component {
|
|
|
17
17
|
size,
|
|
18
18
|
onClick,
|
|
19
19
|
title,
|
|
20
|
-
customClass
|
|
20
|
+
customClass,
|
|
21
|
+
customProps
|
|
21
22
|
} = this.props;
|
|
22
23
|
return /*#__PURE__*/React.createElement("span", {
|
|
23
24
|
className: style.container,
|
|
@@ -30,7 +31,8 @@ export default class PlusIcon extends React.Component {
|
|
|
30
31
|
iconClass: `${iconClass} ${style.icon}`,
|
|
31
32
|
iconSize: iconSize,
|
|
32
33
|
size: size,
|
|
33
|
-
className: `${customClass} ${style.plusIcon}
|
|
34
|
+
className: `${customClass} ${style.plusIcon}`,
|
|
35
|
+
customProps: customProps
|
|
34
36
|
}));
|
|
35
37
|
}
|
|
36
38
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
|
+
import { propTypes as AvatarIconProps } from '../../avatar/AvatarIcon/props/propTypes.js';
|
|
2
3
|
export const propTypes = {
|
|
3
4
|
dataId: PropTypes.string,
|
|
4
5
|
iconClass: PropTypes.string,
|
|
@@ -7,5 +8,6 @@ export const propTypes = {
|
|
|
7
8
|
onClick: PropTypes.func,
|
|
8
9
|
size: PropTypes.oneOf(['small', 'xsmall', 'xxsmall', 'medium', 'xmedium', 'xlarge']),
|
|
9
10
|
title: PropTypes.string,
|
|
10
|
-
customClass: PropTypes.string
|
|
11
|
+
customClass: PropTypes.string,
|
|
12
|
+
customProps: PropTypes.exact(AvatarIconProps)
|
|
11
13
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function getCurrentTime() {
|
|
2
|
+
const now = new Date();
|
|
3
|
+
const hours = now.getHours();
|
|
4
|
+
const minutes = now.getMinutes().toString().padStart(2, '0');
|
|
5
|
+
const seconds = now.getSeconds().toString().padStart(2, '0');
|
|
6
|
+
const ampm = hours >= 12 ? 'PM' : 'AM';
|
|
7
|
+
const formattedHours = hours % 12 || 12; // Convert 24-hour time to 12-hour format
|
|
8
|
+
|
|
9
|
+
return `${formattedHours}:${minutes}:${seconds} ${ampm}`;
|
|
10
|
+
}
|
|
@@ -4,9 +4,10 @@ import { propTypes, UI_propTypes, new_propTypes } from './props/propTypes';
|
|
|
4
4
|
import AutoClose from '../../actions/AutoClose';
|
|
5
5
|
import AlertIcons from '../alertIcons/AlertIcons';
|
|
6
6
|
import AlertClose from '../AlertClose/AlertClose';
|
|
7
|
-
import style from './
|
|
7
|
+
import style from './GlobalNotification.module.css';
|
|
8
8
|
import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
9
9
|
import { cancelBubblingEffect } from '@zohodesk/components/es/utils/Common';
|
|
10
|
+
import getCurrentTime from '../../utils/getCurrentTime';
|
|
10
11
|
export default class GlobalNotification extends React.Component {
|
|
11
12
|
constructor(props) {
|
|
12
13
|
super(props);
|
|
@@ -15,6 +16,8 @@ export default class GlobalNotification extends React.Component {
|
|
|
15
16
|
shadowClose: true
|
|
16
17
|
};
|
|
17
18
|
this.onClose = this.onClose.bind(this);
|
|
19
|
+
this.getNotiifcationData = this.getNotiifcationData.bind(this);
|
|
20
|
+
this.handleStatusChange = this.handleStatusChange.bind(this);
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
componentDidMount() {
|
|
@@ -24,20 +27,48 @@ export default class GlobalNotification extends React.Component {
|
|
|
24
27
|
id,
|
|
25
28
|
needAutoClose
|
|
26
29
|
} = this.props;
|
|
30
|
+
this.handleStatusChange('mounted');
|
|
27
31
|
|
|
28
32
|
if (needAutoClose) {
|
|
29
33
|
this.hideMessageTimer = setTimeout(() => {
|
|
30
34
|
hideMessage(id);
|
|
35
|
+
this.handleStatusChange('dismissing');
|
|
31
36
|
}, hideTime);
|
|
32
37
|
}
|
|
33
38
|
}
|
|
34
39
|
|
|
40
|
+
componentDidUpdate(prevProps) {
|
|
41
|
+
if (prevProps.id !== this.props.id && (prevProps.message !== this.props.message || prevProps.type !== this.props.type)) {
|
|
42
|
+
this.handleStatusChange('updated');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
35
46
|
componentWillUnmount() {
|
|
36
47
|
if (this.hideMessageTimer) {
|
|
37
48
|
clearTimeout(this.hideMessageTimer);
|
|
38
49
|
}
|
|
50
|
+
|
|
51
|
+
this.handleStatusChange('unmounted');
|
|
39
52
|
}
|
|
40
53
|
|
|
54
|
+
handleStatusChange(status) {
|
|
55
|
+
const {
|
|
56
|
+
onStatusChange
|
|
57
|
+
} = this.props;
|
|
58
|
+
const notificationData = this.getNotiifcationData();
|
|
59
|
+
const currentTime = getCurrentTime();
|
|
60
|
+
|
|
61
|
+
if (typeof onStatusChange == 'function') {
|
|
62
|
+
onStatusChange({
|
|
63
|
+
status,
|
|
64
|
+
...notificationData,
|
|
65
|
+
time: currentTime
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
handleNotificationClose() {}
|
|
71
|
+
|
|
41
72
|
onClose(e) {
|
|
42
73
|
const {
|
|
43
74
|
onClose,
|
|
@@ -47,20 +78,31 @@ export default class GlobalNotification extends React.Component {
|
|
|
47
78
|
this.setState({
|
|
48
79
|
shadowClose: false
|
|
49
80
|
});
|
|
81
|
+
this.handleStatusChange('dismissing');
|
|
50
82
|
hideMessage && hideMessage(id);
|
|
51
83
|
onClose && onClose(e);
|
|
52
84
|
}
|
|
53
85
|
|
|
86
|
+
getNotiifcationData() {
|
|
87
|
+
const {
|
|
88
|
+
id,
|
|
89
|
+
type,
|
|
90
|
+
message
|
|
91
|
+
} = this.props;
|
|
92
|
+
return {
|
|
93
|
+
id,
|
|
94
|
+
type,
|
|
95
|
+
message
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
54
99
|
render() {
|
|
55
100
|
let {
|
|
56
|
-
type,
|
|
57
|
-
message,
|
|
58
101
|
hideMessage,
|
|
59
102
|
onClick,
|
|
60
103
|
i18nKeys = {},
|
|
61
104
|
customProps,
|
|
62
105
|
dataSelectorId,
|
|
63
|
-
id,
|
|
64
106
|
needShadow,
|
|
65
107
|
shadowCount,
|
|
66
108
|
eleRef
|
|
@@ -71,15 +113,13 @@ export default class GlobalNotification extends React.Component {
|
|
|
71
113
|
let {
|
|
72
114
|
closeTitle = 'Close'
|
|
73
115
|
} = i18nKeys;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
message: message,
|
|
116
|
+
const notificationData = this.getNotiifcationData();
|
|
117
|
+
return /*#__PURE__*/React.createElement(GlobalNotificationUI, { ...notificationData,
|
|
77
118
|
hideMessage: hideMessage,
|
|
78
119
|
onClick: onClick,
|
|
79
120
|
closeTitle: closeTitle,
|
|
80
121
|
customProps: customProps,
|
|
81
122
|
dataSelectorId: dataSelectorId,
|
|
82
|
-
id: id,
|
|
83
123
|
shadowCount: shadowCount,
|
|
84
124
|
onClose: this.onClose,
|
|
85
125
|
needShadow: shadowClose && needShadow,
|
|
@@ -5,7 +5,7 @@ import { Container, Box } from '@zohodesk/components/lib/Layout';
|
|
|
5
5
|
import AlertClose from '../../AlertClose/AlertClose';
|
|
6
6
|
import AlertIcons from '../../alertIcons/AlertIcons';
|
|
7
7
|
import { ResponsiveReceiver } from '@zohodesk/components/lib/Responsive/CustomResponsive';
|
|
8
|
-
import Typography from '@zohodesk/components/es/
|
|
8
|
+
import Typography from '@zohodesk/components/es/Typography/Typography';
|
|
9
9
|
import style from './DesktopNotificationHeader.module.css';
|
|
10
10
|
export default class DesktopNotificationHeader extends Component {
|
|
11
11
|
constructor(props) {
|
|
@@ -445,7 +445,10 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
445
445
|
needDownload = _this$props2.needDownload,
|
|
446
446
|
i18nKeys = _this$props2.i18nKeys,
|
|
447
447
|
isActive = _this$props2.isActive,
|
|
448
|
-
dataId = _this$props2.dataId
|
|
448
|
+
dataId = _this$props2.dataId,
|
|
449
|
+
customProps = _this$props2.customProps;
|
|
450
|
+
var _customProps$avatarPr = customProps.avatarProps,
|
|
451
|
+
avatarProps = _customProps$avatarPr === void 0 ? {} : _customProps$avatarPr;
|
|
449
452
|
var totalLen = data.length;
|
|
450
453
|
var selectedAttachment = data[selectedIndex] || {};
|
|
451
454
|
var selectedImgUrl = selectedAttachment.viewUrl;
|
|
@@ -629,12 +632,12 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
629
632
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
630
633
|
alignBox: "row",
|
|
631
634
|
align: "both"
|
|
632
|
-
}, /*#__PURE__*/_react["default"].createElement(_Avatar["default"], {
|
|
635
|
+
}, /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
|
|
633
636
|
name: authorName,
|
|
634
637
|
size: "xmedium",
|
|
635
638
|
src: authorHref,
|
|
636
639
|
palette: "info"
|
|
637
|
-
}), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
640
|
+
}, avatarProps)), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
638
641
|
flexible: true,
|
|
639
642
|
className: _AttachmentViewerModule["default"].authorName,
|
|
640
643
|
"data-title": authorName
|
|
@@ -7,6 +7,8 @@ exports.AttachmentViewer_propTypes = exports.AttachmentImage_propTypes = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
+
var _propTypes2 = require("@zohodesk/components/es/Avatar/props/propTypes");
|
|
11
|
+
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
13
|
|
|
12
14
|
var AttachmentImage_propTypes = {
|
|
@@ -43,6 +45,9 @@ var AttachmentViewer_propTypes = {
|
|
|
43
45
|
responsiveId: _propTypes["default"].string,
|
|
44
46
|
maintainZoom: _propTypes["default"].bool,
|
|
45
47
|
isActive: _propTypes["default"].bool,
|
|
46
|
-
dataId: _propTypes["default"].string
|
|
48
|
+
dataId: _propTypes["default"].string,
|
|
49
|
+
customProps: _propTypes["default"].shape({
|
|
50
|
+
avatarProps: _propTypes["default"].exact(_propTypes2.propTypes)
|
|
51
|
+
})
|
|
47
52
|
};
|
|
48
53
|
exports.AttachmentViewer_propTypes = AttachmentViewer_propTypes;
|