@capillarytech/creatives-library 7.18.0-beta.0 → 8.0.0
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/app.js +27 -54
- package/assets/Line_Preview_English.svg +24 -0
- package/assets/Line_Preview_Japanese.svg +24 -0
- package/components/CapTagList/index.js +2 -2
- package/components/CapTagList/messages.js +8 -0
- package/components/Ckeditor/index.js +4 -2
- package/components/Ckeditor/style.scss +3 -0
- package/components/FormBuilder/_formBuilder.scss +4 -16
- package/components/FormBuilder/index.js +4 -3
- package/components/FormBuilder/messages.js +4 -0
- package/components/Sidebar/index.js +4 -4
- package/config/path.js +1 -1
- package/containers/App/constants.js +95 -0
- package/containers/App/index.js +52 -0
- package/containers/App/sagas.js +8 -3
- package/containers/Assets/Gallery/index.js +17 -3
- package/containers/Assets/Gallery/messages.js +4 -0
- package/containers/Assets/Gallery/sagas.js +14 -14
- package/containers/Cap/index.js +84 -50
- package/containers/Cap/sagas.js +20 -12
- package/containers/Cap/selectors.js +13 -13
- package/containers/Cap/tests/__snapshots__/index.test.js.snap +1 -1
- package/containers/Cap/tests/saga.test.js +81 -1
- package/containers/Dashboard/index.js +34 -17
- package/containers/Dashboard/sagas.js +7 -1
- package/containers/Ebill/index.js +16 -3
- package/containers/Ebill/sagas.js +18 -11
- package/containers/Email/index.js +20 -3
- package/containers/Email/sagas.js +34 -23
- package/containers/LanguageProvider/index.js +49 -31
- package/containers/LanguageProvider/tests/index.test.js +5 -3
- package/containers/Line/Create/index.js +15 -2
- package/containers/Line/Create/sagas.js +26 -17
- package/containers/Line/Edit/sagas.js +12 -13
- package/containers/Login/index.js +36 -11
- package/containers/MobilePush/Create/index.js +17 -2
- package/containers/MobilePush/Create/sagas.js +18 -12
- package/containers/MobilePush/Edit/index.js +20 -3
- package/containers/MobilePush/Edit/sagas.js +30 -20
- package/containers/Sms/Create/index.js +15 -2
- package/containers/Sms/Create/sagas.js +8 -6
- package/containers/Sms/Edit/index.js +15 -3
- package/containers/Sms/Edit/sagas.js +14 -8
- package/containers/TagList/constants.js +23 -0
- package/containers/Templates/actions.js +0 -5
- package/containers/Templates/index.js +47 -14
- package/containers/Templates/sagas.js +20 -23
- package/containers/WeChat/MapTemplates/index.js +19 -2
- package/containers/WeChat/MapTemplates/sagas.js +17 -17
- package/containers/WeChat/RichmediaTemplates/Create/index.js +18 -2
- package/containers/WeChat/RichmediaTemplates/Create/sagas.js +11 -8
- package/containers/WeChat/RichmediaTemplates/Edit/index.js +21 -2
- package/containers/WeChat/RichmediaTemplates/Edit/sagas.js +9 -5
- package/entry.js +2 -0
- package/global-styles.js +2 -2
- package/gtm/eventDefinitionsMap.js +1 -1
- package/helpers/intl-enzym-test-helpers.js +1 -1
- package/hoc/withReactRouterV3Compatibility.js +66 -0
- package/index.js +12 -0
- package/initialReducer.js +32 -0
- package/initialState.js +1 -0
- package/mfe-exposed-components.js +8 -0
- package/package.json +16 -11
- package/routes.js +206 -749
- package/services/api.js +62 -17
- package/services/tests/api.test.js +248 -1
- package/styles/components/navigation/_leftnav.scss +13 -0
- package/styles/containers/layout/_layoutPage.scss +14 -0
- package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +21 -16
- package/tests/store.test.js +5 -3
- package/translations/en.json +1 -9
- package/translations/ja-JP.json +0 -8
- package/translations/zh.json +0 -8
- package/utils/authWrapper.js +43 -17
- package/utils/cdnTransformation.js +73 -44
- package/utils/checkStore.js +21 -0
- package/utils/common.js +198 -8
- package/utils/commonUtils.js +17 -1
- package/utils/customAuthWrapper.js +62 -0
- package/utils/customConnectedAuthWrapper.js +26 -0
- package/utils/history.js +8 -0
- package/utils/injectReducer.js +2 -0
- package/utils/injectSaga.js +2 -0
- package/utils/tagValidations.js +2 -2
- package/utils/tests/cdnTransformation.test.js +6 -4
- package/utils/tests/common.mockdata.js +623 -0
- package/utils/tests/common.test.js +273 -0
- package/utils/tests/commonUtil.test.js +79 -0
- package/v2Components/CapDeviceContent/index.js +330 -0
- package/v2Components/CapDeviceContent/index.scss +115 -0
- package/v2Components/CapDeviceContent/messages.js +94 -0
- package/v2Components/CapDeviceContent/tests/index.test.js +89 -0
- package/v2Components/CapImageUpload/constants.js +6 -0
- package/v2Components/CapImageUpload/index.js +23 -15
- package/v2Components/CapImageUpload/index.scss +6 -0
- package/v2Components/CapImageUpload/messages.js +7 -7
- package/v2Components/CapInAppCTA/constants.js +25 -0
- package/v2Components/CapInAppCTA/index.js +279 -0
- package/v2Components/CapInAppCTA/index.scss +99 -0
- package/v2Components/CapInAppCTA/messages.js +85 -0
- package/v2Components/CapTagList/index.js +149 -26
- package/v2Components/CapTagList/messages.js +12 -0
- package/v2Components/CapTagList/style.scss +26 -0
- package/v2Components/CapVideoUpload/constants.js +6 -0
- package/v2Components/CapVideoUpload/index.js +48 -22
- package/v2Components/CapVideoUpload/index.scss +4 -2
- package/v2Components/CapVideoUpload/messages.js +10 -6
- package/v2Components/CapWhatsappQuickReply/index.js +255 -0
- package/v2Components/CapWhatsappQuickReply/index.scss +54 -0
- package/v2Components/CapWhatsappQuickReply/messages.js +32 -0
- package/v2Components/Ckeditor/index.js +56 -22
- package/v2Components/Ckeditor/style.scss +3 -0
- package/v2Components/Ckeditor/tests/index.test.js +44 -0
- package/v2Components/CmsTemplatesComponent/index.js +1 -0
- package/v2Components/CmsTemplatesComponent/messages.js +4 -0
- package/v2Components/EmailMobilePreview/index.js +4 -2
- package/v2Components/EmailPreviewV2/index.js +6 -4
- package/v2Components/EmailPreviewV2/tests/__snapshots__/index.test.js.snap +0 -3
- package/v2Components/FormBuilder/_formBuilder.scss +1 -0
- package/v2Components/FormBuilder/constants.js +1 -1
- package/v2Components/FormBuilder/index.js +111 -29
- package/v2Components/FormBuilder/messages.js +4 -0
- package/v2Components/FormBuilder/tests/index.test.js +5 -2
- package/v2Components/MobilePushPreviewV2/index.js +57 -22
- package/v2Components/NavigationBar/constants.js +1 -0
- package/v2Components/NavigationBar/index.js +84 -113
- package/v2Components/NavigationBar/messages.js +8 -0
- package/v2Components/NavigationBar/style.js +9 -0
- package/v2Components/NavigationBar/tests/index.test.js +32 -9
- package/v2Components/NavigationBar/tests/mockData.js +1 -0
- package/v2Components/NewCallTask/tests/index.test.js +5 -3
- package/v2Components/Pagination/index.js +2 -1
- package/v2Components/RenderRoute/RenderRoute.js +11 -0
- package/v2Components/RenderRoute/index.js +1 -0
- package/v2Components/TemplatePreview/_templatePreview.scss +535 -0
- package/v2Components/TemplatePreview/assets/images/inapp_mobile_android_bottom.svg +11 -0
- package/v2Components/TemplatePreview/assets/images/inapp_mobile_android_full.svg +11 -0
- package/v2Components/TemplatePreview/assets/images/inapp_mobile_android_modal.svg +11 -0
- package/v2Components/TemplatePreview/assets/images/inapp_mobile_android_top.svg +11 -0
- package/v2Components/TemplatePreview/assets/images/inapp_mobile_ios_bottom.svg +6 -0
- package/v2Components/TemplatePreview/assets/images/inapp_mobile_ios_full.svg +18 -0
- package/v2Components/TemplatePreview/assets/images/inapp_mobile_ios_modal.svg +7 -0
- package/v2Components/TemplatePreview/assets/images/inapp_mobile_ios_top.svg +13 -0
- package/v2Components/TemplatePreview/index.js +745 -362
- package/v2Components/TemplatePreview/messages.js +8 -0
- package/v2Components/TemplatePreview/tests/__snapshots__/index.test.js.snap +47 -14
- package/v2Components/TemplatePreview/tests/index.test.js +9 -0
- package/v2Components/WhatsappStatusContainer/_whatsappStatusContainer.scss +8 -1
- package/v2Containers/App/constants.js +12 -6
- package/v2Containers/App/sagas.js +0 -1
- package/v2Containers/Assets/Gallery/index.js +1 -0
- package/v2Containers/Assets/Gallery/sagas.js +15 -14
- package/v2Containers/BeeEditor/index.js +3 -1
- package/v2Containers/BeeEditor/sagas.js +8 -5
- package/v2Containers/CallTask/sagas.js +7 -1
- package/v2Containers/Cap/actions.js +4 -0
- package/v2Containers/Cap/constants.js +20 -1
- package/v2Containers/Cap/index.js +116 -17
- package/v2Containers/Cap/messages.js +8 -0
- package/v2Containers/Cap/reducer.js +18 -3
- package/v2Containers/Cap/sagas.js +64 -9
- package/v2Containers/Cap/selectors.js +27 -13
- package/v2Containers/Cap/tests/Cap.test.js +164 -0
- package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +2 -1
- package/v2Containers/Cap/tests/actions.test.js +11 -0
- package/v2Containers/Cap/tests/reducer.test.js +59 -0
- package/v2Containers/Cap/tests/saga.test.js +181 -2
- package/v2Containers/Cap/tests/selectors.test.js +42 -18
- package/v2Containers/CapFacebookPreview/sagas.js +7 -5
- package/v2Containers/CreativesContainer/SlideBoxContent.js +86 -4
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +4 -3
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +30 -14
- package/v2Containers/CreativesContainer/constants.js +5 -0
- package/v2Containers/CreativesContainer/index.js +157 -38
- package/v2Containers/CreativesContainer/index.scss +12 -0
- package/v2Containers/CreativesContainer/messages.js +33 -1
- package/v2Containers/CreativesContainer/tests/SlideBoxContent.test.js +11 -0
- package/v2Containers/CreativesContainer/tests/SlideBoxFooter.test.js +5 -2
- package/v2Containers/CreativesContainer/tests/SlideBoxHeader.test.js +7 -1
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxContent.test.js.snap +227 -0
- package/v2Containers/CreativesContainer/tests/__snapshots__/SlideBoxHeader.test.js.snap +73 -0
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +80 -0
- package/v2Containers/CreativesContainer/tests/index.test.js +16 -0
- package/v2Containers/Ebill/sagas.js +3 -10
- package/v2Containers/Email/index.js +38 -19
- package/v2Containers/Email/initialSchema.js +1 -1
- package/v2Containers/Email/sagas.js +22 -26
- package/v2Containers/EmailWrapper/index.js +18 -8
- package/v2Containers/FTP/index.js +2 -2
- package/v2Containers/FTP/sagas.js +3 -4
- package/v2Containers/Facebook/sagas.js +26 -17
- package/v2Containers/InApp/actions.js +64 -0
- package/v2Containers/InApp/constants.js +160 -0
- package/v2Containers/InApp/index.js +792 -0
- package/v2Containers/InApp/index.scss +50 -0
- package/v2Containers/InApp/messages.js +114 -0
- package/v2Containers/InApp/reducer.js +109 -0
- package/v2Containers/InApp/sagas.js +151 -0
- package/v2Containers/InApp/selectors.js +12 -0
- package/v2Containers/InApp/tests/action.test.js +53 -0
- package/v2Containers/InApp/tests/index.test.js +165 -0
- package/v2Containers/InApp/tests/mockData.js +898 -0
- package/v2Containers/InApp/tests/reducer.test.js +177 -0
- package/v2Containers/InApp/tests/sagas.test.js +391 -0
- package/v2Containers/InApp/utils.js +12 -0
- package/v2Containers/LanguageProvider/index.js +17 -5
- package/v2Containers/LanguageProvider/reducer.js +3 -2
- package/v2Containers/LanguageProvider/sagas.js +7 -8
- package/v2Containers/LanguageProvider/selectors.js +2 -1
- package/v2Containers/LanguageProvider/tests/index.test.js +5 -2
- package/v2Containers/LanguageProvider/tests/reducer.test.js +6 -3
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/content.test.js.snap +28 -16
- package/v2Containers/Line/Container/ImageCarousel/tests/__snapshots__/index.test.js.snap +2 -2
- package/v2Containers/Line/Container/ImageCarousel/tests/content.test.js +5 -3
- package/v2Containers/Line/Container/ImageCarousel/tests/index.test.js +5 -3
- package/v2Containers/Line/Container/ImageMap/index.js +1 -1
- package/v2Containers/Line/Container/Text/index.js +16 -1
- package/v2Containers/Line/Container/Video/index.js +2 -1
- package/v2Containers/Line/Container/Wrapper/tests/__snapshots__/index.test.js.snap +18134 -107
- package/v2Containers/Line/Container/Wrapper/tests/index.test.js +5 -3
- package/v2Containers/Line/Container/Wrapper/utils.js +1 -1
- package/v2Containers/Line/Container/index.js +4 -0
- package/v2Containers/Line/Container/sagas.js +30 -20
- package/v2Containers/Line/Container/tests/__snapshots__/index.test.js.snap +123 -81
- package/v2Containers/Line/Container/tests/index.test.js +5 -2
- package/v2Containers/Login/index.js +1 -2
- package/v2Containers/MobilePush/Create/index.js +40 -17
- package/v2Containers/MobilePush/Create/sagas.js +18 -12
- package/v2Containers/MobilePush/Edit/index.js +16 -7
- package/v2Containers/MobilePush/Edit/sagas.js +30 -20
- package/v2Containers/MobilepushWrapper/index.js +3 -0
- package/v2Containers/Rcs/sagas.js +14 -14
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +123 -87
- package/v2Containers/Rcs/tests/index.test.js +5 -3
- package/v2Containers/Sms/Create/sagas.js +10 -6
- package/v2Containers/Sms/Edit/sagas.js +14 -8
- package/v2Containers/SmsTrai/Create/sagas.js +9 -10
- package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +4 -4
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +12 -8
- package/v2Containers/SmsTrai/Edit/tests/index.test.js +5 -3
- package/v2Containers/TagList/_tagList.scss +18 -0
- package/v2Containers/TagList/index.js +81 -42
- package/v2Containers/TagList/tests/TagList.test.js +6 -7
- package/v2Containers/TagList/tests/mockdata.js +10 -166
- package/v2Containers/TagList/tests/utils.test.js +17 -0
- package/v2Containers/TagList/utils.js +15 -0
- package/v2Containers/Templates/_templates.scss +60 -5
- package/v2Containers/Templates/actions.js +6 -5
- package/v2Containers/Templates/constants.js +2 -1
- package/v2Containers/Templates/index.js +576 -181
- package/v2Containers/Templates/messages.js +52 -8
- package/v2Containers/Templates/reducer.js +3 -1
- package/v2Containers/Templates/sagas.js +54 -38
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +669 -43
- package/v2Containers/Templates/tests/actions.test.js +19 -0
- package/v2Containers/Templates/tests/index.test.js +53 -1
- package/v2Containers/Templates/tests/mockData.js +45 -1
- package/v2Containers/Templates/tests/reducer.test.js +50 -0
- package/v2Containers/Templates/tests/sagas.test.js +116 -3
- package/v2Containers/Templates/tests/selector.test.js +17 -0
- package/v2Containers/TemplatesV2/index.js +180 -8
- package/v2Containers/TemplatesV2/messages.js +8 -0
- package/v2Containers/TemplatesV2/tests/index.test.js +104 -0
- package/v2Containers/TemplatesV2/tests/mockData.js +685 -0
- package/v2Containers/Viber/constants.js +58 -0
- package/v2Containers/Viber/index.js +404 -421
- package/v2Containers/Viber/index.scss +107 -0
- package/v2Containers/Viber/messages.js +70 -2
- package/v2Containers/Viber/sagas.js +22 -14
- package/v2Containers/Viber/style.js +20 -0
- package/v2Containers/Viber/tests/index.test.js +299 -0
- package/v2Containers/Viber/tests/mockData.js +134 -0
- package/v2Containers/WeChat/MapTemplates/sagas.js +22 -14
- package/v2Containers/WeChat/RichmediaTemplates/Create/sagas.js +12 -11
- package/v2Containers/WeChat/RichmediaTemplates/Edit/sagas.js +9 -5
- package/v2Containers/Whatsapp/actions.js +16 -0
- package/v2Containers/Whatsapp/constants.js +24 -0
- package/v2Containers/Whatsapp/index.js +892 -222
- package/v2Containers/Whatsapp/index.scss +91 -1
- package/v2Containers/Whatsapp/messages.js +98 -1
- package/v2Containers/Whatsapp/reducer.js +19 -0
- package/v2Containers/Whatsapp/sagas.js +67 -12
- package/v2Containers/Whatsapp/styles.scss +35 -0
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +34983 -24886
- package/v2Containers/Whatsapp/tests/__snapshots__/utils.test.js.snap +12 -0
- package/v2Containers/Whatsapp/tests/actions.test.js +21 -0
- package/v2Containers/Whatsapp/tests/index.test.js +17 -4
- package/v2Containers/Whatsapp/tests/mockData.js +77 -0
- package/v2Containers/Whatsapp/tests/reducer.test.js +67 -0
- package/v2Containers/Whatsapp/tests/saga.test.js +201 -0
- package/v2Containers/Whatsapp/tests/utils.test.js +18 -0
- package/v2Containers/Whatsapp/utils.js +65 -4
- package/v2Containers/Zalo/actions.js +24 -0
- package/v2Containers/Zalo/constants.js +59 -0
- package/v2Containers/Zalo/index.js +548 -0
- package/v2Containers/Zalo/index.scss +75 -0
- package/v2Containers/Zalo/messages.js +86 -0
- package/v2Containers/Zalo/reducer.js +63 -0
- package/v2Containers/Zalo/saga.js +45 -0
- package/v2Containers/Zalo/selectors.js +19 -0
- package/v2Containers/Zalo/tests/actions.test.js +26 -0
- package/v2Containers/Zalo/tests/index.test.js +149 -0
- package/v2Containers/Zalo/tests/mockData.js +11527 -0
- package/v2Containers/Zalo/tests/reducer.test.js +96 -0
- package/v2Containers/Zalo/tests/saga.test.js +118 -0
- package/v2Containers/Zalo/tests/selector.test.js +51 -0
- package/v2Containers/mockdata.js +1531 -680
- package/containers/TestPage/constants.js +0 -7
- package/containers/TestPage/index.js +0 -31
- package/containers/TestPage/messages.js +0 -13
- package/containers/TestPage/reducer.js +0 -21
- package/containers/TestPage/sagas.js +0 -11
- package/containers/Testv2/actions.js +0 -15
- package/containers/Testv2/constants.js +0 -7
- package/containers/Testv2/index.js +0 -47
- package/containers/Testv2/messages.js +0 -21
- package/containers/Testv2/reducer.js +0 -23
- package/containers/Testv2/sagas.js +0 -11
- package/containers/Testv2/selectors.js +0 -25
- package/reducers.js +0 -73
- package/store.js +0 -61
- package/utils/tests/asyncInjectors.test.js +0 -173
- package/v2Containers/TestPage/constants.js +0 -7
- package/v2Containers/TestPage/index.js +0 -31
- package/v2Containers/TestPage/messages.js +0 -13
- package/v2Containers/TestPage/reducer.js +0 -21
- package/v2Containers/TestPage/sagas.js +0 -11
- package/v2Containers/Testv2/actions.js +0 -15
- package/v2Containers/Testv2/constants.js +0 -7
- package/v2Containers/Testv2/index.js +0 -47
- package/v2Containers/Testv2/messages.js +0 -21
- package/v2Containers/Testv2/reducer.js +0 -23
- package/v2Containers/Testv2/sagas.js +0 -11
- package/v2Containers/Testv2/selectors.js +0 -25
|
@@ -7,16 +7,40 @@
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { connect } from 'react-redux';
|
|
10
|
+
import moment from 'moment';
|
|
11
|
+
import { FONT_COLOR_05 } from '@capillarytech/cap-ui-library/styled/variables';
|
|
10
12
|
// import styled from 'styled-components';
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
+
import {
|
|
14
|
+
CapSpin,
|
|
15
|
+
CapModal,
|
|
16
|
+
CapButton,
|
|
17
|
+
CapPopover,
|
|
18
|
+
CapInput,
|
|
19
|
+
CapTree,
|
|
20
|
+
CapSelect,
|
|
21
|
+
CapTooltip,
|
|
22
|
+
CapLink,
|
|
23
|
+
CapIcon,
|
|
24
|
+
CapRow,
|
|
25
|
+
CapLabel,
|
|
26
|
+
} from "@capillarytech/cap-ui-library";
|
|
27
|
+
import './style.scss';
|
|
13
28
|
import _ from 'lodash';
|
|
14
29
|
import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
|
|
15
30
|
import { createStructuredSelector } from 'reselect';
|
|
16
31
|
import messages from './messages';
|
|
17
32
|
import { makeSelectLoyaltyPromotionDisplay } from '../../v2Containers/Cap/selectors';
|
|
18
|
-
import { CARD_RELATED_TAGS } from '../../containers/App/constants';
|
|
19
|
-
import { hasCardBasedScope } from '../../utils/common';
|
|
33
|
+
import { CARD_RELATED_TAGS, HOSPITALITY_RELATED_TAGS, CUSTOMER_BARCODE_TAG } from '../../containers/App/constants';
|
|
34
|
+
import { hasCardBasedScope, hasCustomerBarcodeFeatureEnabled, hasHospitalityBasedScope } from '../../utils/common';
|
|
35
|
+
|
|
36
|
+
import {
|
|
37
|
+
GET_TRANSLATION_MAPPED,
|
|
38
|
+
JAPANESE_HELP_TEXT,
|
|
39
|
+
TAG_TRANSLATION_DOC,
|
|
40
|
+
} from "../../containers/TagList/constants";
|
|
41
|
+
import { EMAIL, JP_LOCALE_HIDE_FEATURE } from '../../v2Containers/App/constants';
|
|
42
|
+
import { hidingDateTagsForJpLocale } from '../../v2Containers/TagList/utils';
|
|
43
|
+
|
|
20
44
|
|
|
21
45
|
const {Search} = CapInput;
|
|
22
46
|
const {CapTreeNode} = CapTree;
|
|
@@ -32,10 +56,36 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
32
56
|
visible: false,
|
|
33
57
|
dynamicDateValue: '',
|
|
34
58
|
showModal: false,
|
|
59
|
+
translationLang: '',
|
|
60
|
+
tagsList: []
|
|
35
61
|
};
|
|
36
62
|
this.renderTags = this.renderTags.bind(this);
|
|
37
63
|
this.getSearchedExpandedKeys = this.getSearchedExpandedKeys.bind(this);
|
|
38
64
|
}
|
|
65
|
+
getTranslationMappedLocale(locale) {
|
|
66
|
+
return GET_TRANSLATION_MAPPED?.[locale];
|
|
67
|
+
}
|
|
68
|
+
componentDidMount() {
|
|
69
|
+
const user = localStorage.getItem('user');
|
|
70
|
+
let locale = 'en';
|
|
71
|
+
moment.locale(locale);
|
|
72
|
+
if (user) {
|
|
73
|
+
locale = JSON.parse(user).lang || locale;
|
|
74
|
+
}
|
|
75
|
+
locale = this.getTranslationMappedLocale(locale);
|
|
76
|
+
this.setState({
|
|
77
|
+
translationLang: locale,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
componentDidUpdate(prevProps, prevState){
|
|
82
|
+
if (this.props.tags !== prevProps.tags || this.state.searchValue !== prevState.searchValue) {
|
|
83
|
+
let temp = this.renderTags(this.props.tags, this.state.searchValue);
|
|
84
|
+
this.setState({
|
|
85
|
+
tagsList: temp
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
39
89
|
|
|
40
90
|
onChange = (e) => {
|
|
41
91
|
const value = e.target.value;
|
|
@@ -57,12 +107,12 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
57
107
|
let list = [];
|
|
58
108
|
_.forEach(tags, (val = {}, key) => {
|
|
59
109
|
if (_.has(val, 'subtags')) {
|
|
60
|
-
if ((val.name || '').toLowerCase().indexOf(value.toLowerCase()) !== -1) {
|
|
110
|
+
if (val.name && typeof val.name === 'string' && (val.name || '').toLowerCase().indexOf(value.toLowerCase()) !== -1) {
|
|
61
111
|
list.push(key);
|
|
62
112
|
}
|
|
63
113
|
const temp = this.getSearchedExpandedKeys(val.subtags, value);
|
|
64
114
|
list = list.concat(temp);
|
|
65
|
-
} else if ((val.name || '').toLowerCase().indexOf(value.toLowerCase()) !== -1) {
|
|
115
|
+
} else if (val.name && typeof val.name === 'string' && (val.name || '').toLowerCase().indexOf(value.toLowerCase()) !== -1) {
|
|
66
116
|
list.push(key);
|
|
67
117
|
}
|
|
68
118
|
});
|
|
@@ -136,54 +186,76 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
136
186
|
};
|
|
137
187
|
|
|
138
188
|
renderTags(tags, searchString = '') {
|
|
139
|
-
const { disableRelatedTags, childTagsToDisable, parentTagstoDisable, showCardsRelatedTags} = this
|
|
189
|
+
const { disableRelatedTags, childTagsToDisable, parentTagstoDisable, showCardsRelatedTags } = this?.props?.disableTagsDetails;
|
|
190
|
+
const { accessibleFeatures = [] } = this?.props?.currentOrgDetails || {};
|
|
191
|
+
const hideDateTagsForJpLocale = accessibleFeatures.includes(JP_LOCALE_HIDE_FEATURE);
|
|
140
192
|
const list = [];
|
|
141
193
|
const loyaltyAttrDisableText = <FormattedMessage {...messages.loyaltyAttributeDisable} />;
|
|
194
|
+
const customerBarcodeDisableText = <FormattedMessage {...messages.customerBarcodeDisable} />;
|
|
142
195
|
let clonedTags = _.cloneDeep(tags);
|
|
143
196
|
if (!hasCardBasedScope()) {
|
|
144
197
|
clonedTags = _.omit(clonedTags, CARD_RELATED_TAGS);
|
|
145
198
|
}
|
|
199
|
+
if (!hasHospitalityBasedScope()) {
|
|
200
|
+
//filtering HOSPITALITY_RELATED_TAGS if org does not have HOSPITALITY_BASED_SCOPE feature enabled
|
|
201
|
+
clonedTags = _.omit(clonedTags, HOSPITALITY_RELATED_TAGS);
|
|
202
|
+
}
|
|
203
|
+
if (!hasCustomerBarcodeFeatureEnabled()) {
|
|
204
|
+
//filtering CUSTOMER_BARCODE_TAG if org does not have CUSTOMER_BARCODE_TAG feature enabled
|
|
205
|
+
clonedTags = _.omit(clonedTags, CUSTOMER_BARCODE_TAG);
|
|
206
|
+
}
|
|
146
207
|
_.forEach(clonedTags, (val = '', key) => {
|
|
147
208
|
let supportedTagsString = '';
|
|
148
209
|
_.forEach(val.supportedTags, (supportedTag) => {
|
|
149
210
|
supportedTagsString += `${supportedTag} ,`;
|
|
150
211
|
});
|
|
151
212
|
supportedTagsString = supportedTagsString.replace(/,\s*$/, "");
|
|
213
|
+
const tagDescriptionOrName = _.toLower(String(_.get(val, 'desc', '') || _.get(val, 'name', '')));
|
|
214
|
+
const searchStringLower = _.toLower(searchString);
|
|
215
|
+
const tagContainsSearchedString = tagDescriptionOrName.includes(searchStringLower);
|
|
152
216
|
if (_.has(val, 'subtags')) {
|
|
153
217
|
const disabled = disableRelatedTags ? parentTagstoDisable.includes(key) : false;
|
|
154
218
|
const temp = this.renderTags(val.subtags, '', disabled);
|
|
155
|
-
|
|
219
|
+
const tagValue = (
|
|
156
220
|
<CapTreeNode
|
|
157
|
-
title={disabled ? <CapTooltip title={loyaltyAttrDisableText}>{val
|
|
221
|
+
title={disabled ? <CapTooltip title={loyaltyAttrDisableText}>{val?.name}</CapTooltip> : val?.name}
|
|
158
222
|
tag={val}
|
|
159
|
-
key={val
|
|
223
|
+
key={val?.incentiveSeriesId ? `${key}(${val?.incentiveSeriesId})` : `${key}`}
|
|
160
224
|
disabled={disabled}
|
|
161
225
|
>
|
|
162
226
|
{temp}
|
|
163
227
|
</CapTreeNode>
|
|
164
|
-
)
|
|
165
|
-
|
|
166
|
-
|
|
228
|
+
);
|
|
229
|
+
hidingDateTagsForJpLocale(hideDateTagsForJpLocale, val, list, tagValue);
|
|
230
|
+
} else if (searchString === '' || !searchString || tagContainsSearchedString) {
|
|
231
|
+
let childDisabled = true;
|
|
232
|
+
if (key === CUSTOMER_BARCODE_TAG && !hasCustomerBarcodeFeatureEnabled()) {
|
|
233
|
+
childDisabled = true;
|
|
234
|
+
} else {
|
|
235
|
+
childDisabled = disableRelatedTags ? childTagsToDisable.includes(key) : false;
|
|
236
|
+
}
|
|
167
237
|
const tempNode = (
|
|
168
238
|
<CapTreeNode
|
|
169
|
-
title={childDisabled ? <CapTooltip title={loyaltyAttrDisableText}>{val.desc || val.name}</CapTooltip> : (val.desc || val.name)}
|
|
239
|
+
title={childDisabled ? <CapTooltip title={key === CUSTOMER_BARCODE_TAG ? customerBarcodeDisableText : loyaltyAttrDisableText}>{val.desc || val.name}</CapTooltip> : (val.desc || val.name)}
|
|
170
240
|
tag={val}
|
|
171
241
|
isLeaf
|
|
172
|
-
key={val
|
|
242
|
+
key={val?.incentiveSeriesId ? `${key}(${val?.incentiveSeriesId})` : `${key}`}
|
|
173
243
|
disabled={childDisabled}
|
|
174
244
|
>
|
|
175
245
|
</CapTreeNode>);
|
|
176
|
-
list
|
|
246
|
+
hidingDateTagsForJpLocale(hideDateTagsForJpLocale, val, list, tempNode);
|
|
177
247
|
}
|
|
178
248
|
});
|
|
179
249
|
return list;
|
|
180
250
|
}
|
|
181
|
-
|
|
251
|
+
openTranslationLink = () => {
|
|
252
|
+
window.open(TAG_TRANSLATION_DOC, '_blank');
|
|
253
|
+
}
|
|
182
254
|
render() {
|
|
183
|
-
const { hidePopover = false, tags = {}, intl = {}, moduleFilterEnabled, label, modalProps } = this.props;
|
|
255
|
+
const { hidePopover = false, tags = {}, intl = {}, moduleFilterEnabled, label, modalProps, channel, fetchingSchemaError = false } = this.props;
|
|
184
256
|
const tg = tags;
|
|
185
257
|
const {formatMessage} = intl;
|
|
186
|
-
const { tagValue, expandedKeys, autoExpandParent, searchValue, visible } = this.state;
|
|
258
|
+
const { tagValue, expandedKeys, autoExpandParent, searchValue, visible, translationLang } = this.state;
|
|
187
259
|
const options = [
|
|
188
260
|
{
|
|
189
261
|
value: "All",
|
|
@@ -222,9 +294,31 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
222
294
|
expandedKeys={expandedKeys}
|
|
223
295
|
autoExpandParent={autoExpandParent}
|
|
224
296
|
onExpand={this.onExpand}
|
|
225
|
-
|
|
226
|
-
{this.renderTags(tg, searchValue)}
|
|
297
|
+
>
|
|
298
|
+
{/* {this.renderTags(tg, searchValue)} */}
|
|
299
|
+
{this.state.tagsList}
|
|
227
300
|
</CapTree>
|
|
301
|
+
{translationLang === "ja-JP" &&
|
|
302
|
+
<div className="tag-list-footer">
|
|
303
|
+
<CapIcon
|
|
304
|
+
type="help"
|
|
305
|
+
size="s"
|
|
306
|
+
/>
|
|
307
|
+
<CapLink>
|
|
308
|
+
<CapButton id="translationtagfooter" type="flat" onClick={this.openTranslationLink} >
|
|
309
|
+
<div className="tag-list-footer-icon">
|
|
310
|
+
<div>{JAPANESE_HELP_TEXT}</div>
|
|
311
|
+
<CapIcon
|
|
312
|
+
type="open-in-new-light"
|
|
313
|
+
size="s"
|
|
314
|
+
svgProps={{ color: FONT_COLOR_05 }}
|
|
315
|
+
/>
|
|
316
|
+
</div>
|
|
317
|
+
</CapButton>
|
|
318
|
+
</CapLink>
|
|
319
|
+
</div>
|
|
320
|
+
}
|
|
321
|
+
|
|
228
322
|
</CapSpin>
|
|
229
323
|
</div>);
|
|
230
324
|
return (
|
|
@@ -233,17 +327,43 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
233
327
|
visible={this.props.visibleTaglist}
|
|
234
328
|
footer={[]}
|
|
235
329
|
{...modalProps}
|
|
236
|
-
|
|
330
|
+
>
|
|
237
331
|
{contentSection}
|
|
238
332
|
</CapModal> :
|
|
239
333
|
<CapPopover
|
|
240
|
-
visible={visible}
|
|
334
|
+
visible={fetchingSchemaError ? false : visible}
|
|
241
335
|
onVisibleChange={this.togglePopoverVisibility}
|
|
242
336
|
content={contentSection}
|
|
243
337
|
trigger="click"
|
|
244
|
-
placement="rightTop"
|
|
338
|
+
placement={channel === EMAIL.toUpperCase() ? "leftTop" : "rightTop"}
|
|
339
|
+
>
|
|
340
|
+
<CapTooltip
|
|
341
|
+
title={
|
|
342
|
+
fetchingSchemaError && (
|
|
343
|
+
<CapRow className="tooltip-text-container">
|
|
344
|
+
<CapLabel className="tooltip-text1">
|
|
345
|
+
{formatMessage(messages.somethingWentWrong)}
|
|
346
|
+
</CapLabel>
|
|
347
|
+
<CapLabel className="tooltip-text2">
|
|
348
|
+
{formatMessage(messages.labelFetchErrorMsg)}
|
|
349
|
+
</CapLabel>
|
|
350
|
+
</CapRow>
|
|
351
|
+
)
|
|
352
|
+
}
|
|
353
|
+
placement="right"
|
|
245
354
|
>
|
|
246
|
-
|
|
355
|
+
<CapRow className="tooltip-add-label-container">
|
|
356
|
+
<CapButton
|
|
357
|
+
disabled={
|
|
358
|
+
this?.props?.disabled || fetchingSchemaError
|
|
359
|
+
}
|
|
360
|
+
isAddBtn
|
|
361
|
+
type="flat"
|
|
362
|
+
>
|
|
363
|
+
{label || ""}
|
|
364
|
+
</CapButton>
|
|
365
|
+
</CapRow>
|
|
366
|
+
</CapTooltip>
|
|
247
367
|
</CapPopover>
|
|
248
368
|
}
|
|
249
369
|
<CapModal
|
|
@@ -278,6 +398,10 @@ CapTagList.propTypes = {
|
|
|
278
398
|
hidePopover: PropTypes.bool,
|
|
279
399
|
modalProps: PropTypes.any,
|
|
280
400
|
disableTagsDetails: PropTypes.object,
|
|
401
|
+
currentOrgDetails: PropTypes.object,
|
|
402
|
+
channel: PropTypes.string,
|
|
403
|
+
disabled: PropTypes.bool,
|
|
404
|
+
fetchingSchemaError: PropTypes.bool,
|
|
281
405
|
};
|
|
282
406
|
|
|
283
407
|
CapTagList.defaultValue = {
|
|
@@ -295,4 +419,3 @@ const mapStateToProps = createStructuredSelector({
|
|
|
295
419
|
|
|
296
420
|
|
|
297
421
|
export default connect(mapStateToProps, mapDispatchToProps)(injectIntl(CapTagList));
|
|
298
|
-
|
|
@@ -46,4 +46,16 @@ export default defineMessages({
|
|
|
46
46
|
id: `creatives.componentsV2.CapTagList.loyaltyAttributeDisable`,
|
|
47
47
|
defaultMessage: 'You won’t be able to add loyalty related attributes since the loyalty program/ card series is None.',
|
|
48
48
|
},
|
|
49
|
+
"customerBarcodeDisable": {
|
|
50
|
+
id: `creatives.componentsV2.CapTagList.customerBarcodeDisable`,
|
|
51
|
+
defaultMessage: 'This label is not enabled for your organization. Please connect with your Capillary POC',
|
|
52
|
+
},
|
|
53
|
+
"somethingWentWrong": {
|
|
54
|
+
id: `creatives.componentsV2.CapTagList.somethingWentWrong`,
|
|
55
|
+
defaultMessage: 'Something went wrong',
|
|
56
|
+
},
|
|
57
|
+
'labelFetchErrorMsg': {
|
|
58
|
+
id: `creatives.componentsV2.CapTagList.labelFetchErrorMsg`,
|
|
59
|
+
defaultMessage: 'Unable to fetch the labels. Please try again later'
|
|
60
|
+
},
|
|
49
61
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@import "~@capillarytech/cap-ui-library/styles/_variables";
|
|
2
|
+
|
|
3
|
+
@media (max-height: 25rem) {
|
|
4
|
+
.ant-tree.cap-tree-v2.ant-tree-icon-hide {
|
|
5
|
+
height: 8.5714rem;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.tooltip-add-label-container {
|
|
10
|
+
float: right;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.tooltip-text-container {
|
|
14
|
+
margin: $CAP_SPACE_12 $CAP_SPACE_20;
|
|
15
|
+
.tooltip-text1 {
|
|
16
|
+
margin-bottom: $CAP_SPACE_08;
|
|
17
|
+
font-weight: $FONT_WEIGHT_MEDIUM;
|
|
18
|
+
color: $FONT_COLOR_06;
|
|
19
|
+
font-size: $FONT_SIZE_L;
|
|
20
|
+
}
|
|
21
|
+
.tooltip-text2 {
|
|
22
|
+
font-weight: $FONT_WEIGHT_REGULAR;
|
|
23
|
+
color: $FONT_COLOR_06;
|
|
24
|
+
font-size: $FONT_SIZE_M;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -18,9 +18,10 @@ import {
|
|
|
18
18
|
CapSpin,
|
|
19
19
|
} from '@capillarytech/cap-ui-library';
|
|
20
20
|
import messages from './messages';
|
|
21
|
-
import {bytes2Size} from '../../utils/common';
|
|
22
|
-
import { WHATSAPP } from './constants';
|
|
21
|
+
import {bytes2Size, getDecodedFileName} from '../../utils/common';
|
|
22
|
+
import { SUPPORTED_FILE_FORMATS, WHATSAPP, DEFAULT, VIBER_MAX_DURATION } from './constants';
|
|
23
23
|
import './index.scss';
|
|
24
|
+
import { VIBER } from '../../v2Containers/CreativesContainer/constants';
|
|
24
25
|
|
|
25
26
|
function CapVideoUpload(props) {
|
|
26
27
|
const {
|
|
@@ -41,7 +42,7 @@ function CapVideoUpload(props) {
|
|
|
41
42
|
} = props;
|
|
42
43
|
const [isVideoError, updateVideoErrorMessage] = useState(false);
|
|
43
44
|
const [isVideo, updateVideoStatus] = useState(false);
|
|
44
|
-
const [videoDuration, updateVideoDuration] = useState(
|
|
45
|
+
const [videoDuration, updateVideoDuration] = useState(null);
|
|
45
46
|
const [isPlaying, updateIsPlaying] = useState(false);
|
|
46
47
|
const [isSpinning, setSpinning] = useState(false);
|
|
47
48
|
|
|
@@ -99,6 +100,7 @@ function CapVideoUpload(props) {
|
|
|
99
100
|
videoName: metaVideoName,
|
|
100
101
|
videoId: metaVideoId,
|
|
101
102
|
fileHandle: karixFileHandle,
|
|
103
|
+
videoDuration: null,
|
|
102
104
|
},
|
|
103
105
|
);
|
|
104
106
|
}
|
|
@@ -199,6 +201,7 @@ function CapVideoUpload(props) {
|
|
|
199
201
|
}
|
|
200
202
|
const onReUpload = () => {
|
|
201
203
|
updateVideoStatus(false);
|
|
204
|
+
updateVideoDuration(null);
|
|
202
205
|
onVideoUploadUpdateAssestList(
|
|
203
206
|
index,
|
|
204
207
|
{
|
|
@@ -207,7 +210,7 @@ function CapVideoUpload(props) {
|
|
|
207
210
|
videoHeight: "",
|
|
208
211
|
videoWidth: "",
|
|
209
212
|
videoSrc: "",
|
|
210
|
-
videoDuration:
|
|
213
|
+
videoDuration: null,
|
|
211
214
|
videoId: "",
|
|
212
215
|
fileHandle: "",
|
|
213
216
|
}
|
|
@@ -217,12 +220,13 @@ function CapVideoUpload(props) {
|
|
|
217
220
|
const updateMetadataLoaded = () => {
|
|
218
221
|
const { current: { duration, videoHeight: metaVideoHeight, videoWidth: metaVideoWidth } = {} } = videoEl;
|
|
219
222
|
if (duration) {
|
|
220
|
-
|
|
221
|
-
updateVideoDuration(value);
|
|
223
|
+
updateVideoDuration(duration);
|
|
222
224
|
if (videoWidth === undefined && videoHeight === undefined) {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
225
|
+
if (
|
|
226
|
+
channel !== VIBER ||
|
|
227
|
+
(channel === VIBER && duration <= VIBER_MAX_DURATION)
|
|
228
|
+
) {
|
|
229
|
+
onVideoUploadUpdateAssestList(index, {
|
|
226
230
|
videoSrc,
|
|
227
231
|
videoId,
|
|
228
232
|
videoName,
|
|
@@ -230,12 +234,16 @@ function CapVideoUpload(props) {
|
|
|
230
234
|
videoWidth: metaVideoWidth,
|
|
231
235
|
previewUrl,
|
|
232
236
|
fileHandle,
|
|
233
|
-
|
|
234
|
-
|
|
237
|
+
videoDuration: duration,
|
|
238
|
+
});
|
|
239
|
+
} else {
|
|
240
|
+
onReUpload();
|
|
241
|
+
updateVideoErrorMessage(formatMessage(messages.videoDurationError));
|
|
242
|
+
}
|
|
235
243
|
}
|
|
236
244
|
}
|
|
237
245
|
};
|
|
238
|
-
|
|
246
|
+
const videoDurationValue = moment('1900-01-01 00:00:00').add(videoDuration, 'seconds').format("HH.mm.ss"); // to get the duration of video
|
|
239
247
|
return (
|
|
240
248
|
<Fragment key={videoSrc}>
|
|
241
249
|
<div style={{ overflow: 'hidden' }}>
|
|
@@ -264,11 +272,11 @@ function CapVideoUpload(props) {
|
|
|
264
272
|
</video>
|
|
265
273
|
{showVideoNameAndDuration &&
|
|
266
274
|
<div className="video-info">
|
|
267
|
-
<CapHeading type="
|
|
268
|
-
{videoName}
|
|
275
|
+
<CapHeading type="h4">
|
|
276
|
+
{getDecodedFileName(videoName)}
|
|
269
277
|
</CapHeading>
|
|
270
278
|
<CapHeading type="h6">
|
|
271
|
-
{
|
|
279
|
+
{videoDurationValue}
|
|
272
280
|
</CapHeading>
|
|
273
281
|
</div>
|
|
274
282
|
}
|
|
@@ -276,6 +284,16 @@ function CapVideoUpload(props) {
|
|
|
276
284
|
</Fragment>
|
|
277
285
|
);
|
|
278
286
|
};
|
|
287
|
+
|
|
288
|
+
const getVideoSizeDescription = () => (
|
|
289
|
+
<CapHeading.CapHeadingSpan type="label2">
|
|
290
|
+
<FormattedMessage
|
|
291
|
+
{...messages.videoSizeDescription}
|
|
292
|
+
values={{ size: bytes2Size(videoSize) }}
|
|
293
|
+
/>
|
|
294
|
+
</CapHeading.CapHeadingSpan>
|
|
295
|
+
);
|
|
296
|
+
|
|
279
297
|
return (
|
|
280
298
|
<CapSpin spinning={isSpinning}>
|
|
281
299
|
<div style={style} className="cap-custom-video-upload">
|
|
@@ -295,26 +313,34 @@ function CapVideoUpload(props) {
|
|
|
295
313
|
onClose={() => updateTemplateDrawerRequirement(false)}
|
|
296
314
|
/>
|
|
297
315
|
</form>
|
|
298
|
-
{channel
|
|
316
|
+
{![WHATSAPP, VIBER].includes(channel) &&
|
|
299
317
|
<>
|
|
300
318
|
<CapHeading.CapHeadingSpan type="h6" className="video-description">
|
|
301
319
|
<FormattedMessage {...messages.videoRatioDescription} />
|
|
302
320
|
</CapHeading.CapHeadingSpan>
|
|
303
321
|
{' '}
|
|
304
322
|
<CapHeading.CapHeadingSpan type="h6" className="video-description file-format">
|
|
305
|
-
<FormattedMessage {...messages.
|
|
306
|
-
|
|
323
|
+
<FormattedMessage {...messages.channelFileFormat} values={{ format: SUPPORTED_FILE_FORMATS[DEFAULT] }} />
|
|
307
324
|
</CapHeading.CapHeadingSpan>
|
|
308
325
|
<CapHeading.CapHeadingSpan type="h6" className="video-description video-details">
|
|
309
326
|
<FormattedMessage {...messages.videoSizeDescription} values={{size: bytes2Size(videoSize)}} />
|
|
310
327
|
</CapHeading.CapHeadingSpan>
|
|
311
|
-
</>
|
|
328
|
+
</>}
|
|
329
|
+
{channel === WHATSAPP &&
|
|
312
330
|
<>
|
|
313
|
-
|
|
314
|
-
|
|
331
|
+
{getVideoSizeDescription()}
|
|
332
|
+
<CapHeading.CapHeadingSpan type="label2" className="whatsapp-format">
|
|
333
|
+
<FormattedMessage {...messages.channelFileFormat} values={{ format: SUPPORTED_FILE_FORMATS[DEFAULT] }} />
|
|
315
334
|
</CapHeading.CapHeadingSpan>
|
|
335
|
+
</>}
|
|
336
|
+
{channel === VIBER &&
|
|
337
|
+
<>
|
|
338
|
+
{getVideoSizeDescription()}
|
|
316
339
|
<CapHeading.CapHeadingSpan type="label2" className="whatsapp-format">
|
|
317
|
-
<FormattedMessage {...messages.
|
|
340
|
+
<FormattedMessage {...messages.channelFileFormat} values={{ format: SUPPORTED_FILE_FORMATS.VIBER }} />
|
|
341
|
+
</CapHeading.CapHeadingSpan>
|
|
342
|
+
<CapHeading.CapHeadingSpan type="label2" className="video-duration">
|
|
343
|
+
<FormattedMessage {...messages.viberMaxDuration} />
|
|
318
344
|
</CapHeading.CapHeadingSpan>
|
|
319
345
|
</>}
|
|
320
346
|
</div>
|
|
@@ -12,7 +12,6 @@ $classPrefix: cap-custom-video-upload;
|
|
|
12
12
|
.video-reupload{
|
|
13
13
|
float: right;
|
|
14
14
|
color: $FONT_COLOR_05;
|
|
15
|
-
padding: 0px;
|
|
16
15
|
right: 40px;
|
|
17
16
|
}
|
|
18
17
|
.video-info{
|
|
@@ -46,4 +45,7 @@ $classPrefix: cap-custom-video-upload;
|
|
|
46
45
|
}
|
|
47
46
|
.video-panel {
|
|
48
47
|
display: flex;
|
|
49
|
-
}
|
|
48
|
+
}
|
|
49
|
+
.video-duration {
|
|
50
|
+
margin-left: 8rem;
|
|
51
|
+
}
|
|
@@ -55,12 +55,16 @@ export default defineMessages({
|
|
|
55
55
|
id: `${scope}.imageReUpload`,
|
|
56
56
|
defaultMessage: 'Re upload',
|
|
57
57
|
},
|
|
58
|
-
|
|
59
|
-
id: `${scope}.
|
|
60
|
-
defaultMessage: 'Format:
|
|
58
|
+
channelFileFormat: {
|
|
59
|
+
id: `${scope}.channelFileFormat`,
|
|
60
|
+
defaultMessage: 'Format: {format}',
|
|
61
61
|
},
|
|
62
|
-
|
|
63
|
-
id: `${scope}.
|
|
64
|
-
defaultMessage: '
|
|
62
|
+
viberMaxDuration: {
|
|
63
|
+
id: `${scope}.viberMaxDuration`,
|
|
64
|
+
defaultMessage: 'Max Duration: 600 seconds',
|
|
65
|
+
},
|
|
66
|
+
videoDurationError: {
|
|
67
|
+
id: `${scope}.videoDurationError`,
|
|
68
|
+
defaultMessage: 'Video duration should not exceed 600 seconds',
|
|
65
69
|
},
|
|
66
70
|
});
|