@capillarytech/creatives-library 7.18.0-beta.0 → 8.0.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/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
|
@@ -5,7 +5,9 @@ import { Provider } from 'react-redux';
|
|
|
5
5
|
import { browserHistory } from 'react-router';
|
|
6
6
|
import enUS from 'antd/es/locale-provider/en_US';
|
|
7
7
|
import ConnectedLanguageProvider, { LanguageProvider } from '../index';
|
|
8
|
-
import configureStore from '
|
|
8
|
+
import { configureStore } from '@capillarytech/vulcan-react-sdk/utils';
|
|
9
|
+
import { createBrowserHistory } from 'history';
|
|
10
|
+
import { initialReducer } from '../../../initialReducer';
|
|
9
11
|
|
|
10
12
|
import { translationMessages } from '../../../i18n';
|
|
11
13
|
|
|
@@ -39,9 +41,10 @@ describe('<LanguageProvider />', () => {
|
|
|
39
41
|
|
|
40
42
|
describe('<ConnectedLanguageProvider />', () => {
|
|
41
43
|
let store;
|
|
44
|
+
let browserHistory = createBrowserHistory();
|
|
42
45
|
|
|
43
46
|
beforeAll(() => {
|
|
44
|
-
store = configureStore({}, browserHistory);
|
|
47
|
+
store = configureStore({}, initialReducer, browserHistory);
|
|
45
48
|
});
|
|
46
49
|
|
|
47
50
|
it('should render the default language messages', () => {
|
|
@@ -10,22 +10,25 @@ describe('languageProviderReducer', () => {
|
|
|
10
10
|
it('returns the initial state', () => {
|
|
11
11
|
expect(languageProviderReducer(undefined, {})).toEqual(fromJS({
|
|
12
12
|
locale: 'en',
|
|
13
|
+
languageLocale: 'en',
|
|
13
14
|
messages: {},
|
|
14
15
|
localeLoading: false,
|
|
15
16
|
}));
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
it('changes the locale', () => {
|
|
19
|
-
expect(languageProviderReducer(undefined, { type: CHANGE_LOCALE, locale: '
|
|
20
|
+
expect(languageProviderReducer(undefined, { type: CHANGE_LOCALE, locale: 'en', languageLocale: 'en' }).toJS()).toEqual({
|
|
20
21
|
locale: "en",
|
|
22
|
+
languageLocale: "en",
|
|
21
23
|
localeLoading: false,
|
|
22
24
|
messages: {},
|
|
23
25
|
});
|
|
24
26
|
});
|
|
25
27
|
|
|
26
28
|
it('make locize message request', () => {
|
|
27
|
-
expect(languageProviderReducer(undefined, { type: GET_LOCIZ_MESSAGE_REQUEST, locale: '
|
|
28
|
-
locale: "
|
|
29
|
+
expect(languageProviderReducer(undefined, { type: GET_LOCIZ_MESSAGE_REQUEST, locale: 'en', languageLocale: 'en' }).toJS()).toEqual({
|
|
30
|
+
locale: "en",
|
|
31
|
+
languageLocale: 'en',
|
|
29
32
|
localeLoading: true,
|
|
30
33
|
messages: {},
|
|
31
34
|
});
|
|
@@ -1922,7 +1922,7 @@ new message content.",
|
|
|
1922
1922
|
"creatives.containersV2.Whatsapp.awaitingStatusMsg": "This template is awaiting approval",
|
|
1923
1923
|
"creatives.containersV2.Whatsapp.azerbaijani": "Azerbaijani",
|
|
1924
1924
|
"creatives.containersV2.Whatsapp.bengali": "Bengali",
|
|
1925
|
-
"creatives.containersV2.Whatsapp.btnDesc": "These will be
|
|
1925
|
+
"creatives.containersV2.Whatsapp.btnDesc": "These will be clickable buttons below your message.",
|
|
1926
1926
|
"creatives.containersV2.Whatsapp.btnDisabledTooltip": "Please add all mandatory fields to proceed further",
|
|
1927
1927
|
"creatives.containersV2.Whatsapp.btnLabel": "Buttons",
|
|
1928
1928
|
"creatives.containersV2.Whatsapp.btnTypeCTA": "Call to action",
|
|
@@ -2672,13 +2672,16 @@ new message content.",
|
|
|
2672
2672
|
<img
|
|
2673
2673
|
alt="line-image-src"
|
|
2674
2674
|
className="cap-image-v2 undefined"
|
|
2675
|
-
|
|
2676
|
-
|
|
2675
|
+
height="40"
|
|
2676
|
+
rest={
|
|
2677
2677
|
Object {
|
|
2678
|
-
"
|
|
2679
|
-
|
|
2678
|
+
"style": Object {
|
|
2679
|
+
"marginBottom": 5,
|
|
2680
|
+
"maxWidth": "100%",
|
|
2681
|
+
},
|
|
2680
2682
|
}
|
|
2681
2683
|
}
|
|
2684
|
+
src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/78a2074d-bb5f-4be7-b025-5c506be9.jpg"
|
|
2682
2685
|
/>
|
|
2683
2686
|
</CapImage>
|
|
2684
2687
|
<span
|
|
@@ -2784,6 +2787,7 @@ new message content.",
|
|
|
2784
2787
|
<img
|
|
2785
2788
|
alt="line-image-src"
|
|
2786
2789
|
className="cap-image-v2 undefined"
|
|
2790
|
+
height="400"
|
|
2787
2791
|
src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/78a2074d-bb5f-4be7-b025-5c506be9.jpg"
|
|
2788
2792
|
/>
|
|
2789
2793
|
</CapImage>
|
|
@@ -5519,7 +5523,7 @@ new message content.",
|
|
|
5519
5523
|
"creatives.containersV2.Whatsapp.awaitingStatusMsg": "This template is awaiting approval",
|
|
5520
5524
|
"creatives.containersV2.Whatsapp.azerbaijani": "Azerbaijani",
|
|
5521
5525
|
"creatives.containersV2.Whatsapp.bengali": "Bengali",
|
|
5522
|
-
"creatives.containersV2.Whatsapp.btnDesc": "These will be
|
|
5526
|
+
"creatives.containersV2.Whatsapp.btnDesc": "These will be clickable buttons below your message.",
|
|
5523
5527
|
"creatives.containersV2.Whatsapp.btnDisabledTooltip": "Please add all mandatory fields to proceed further",
|
|
5524
5528
|
"creatives.containersV2.Whatsapp.btnLabel": "Buttons",
|
|
5525
5529
|
"creatives.containersV2.Whatsapp.btnTypeCTA": "Call to action",
|
|
@@ -6408,13 +6412,16 @@ new message content.",
|
|
|
6408
6412
|
<img
|
|
6409
6413
|
alt="line-image-src"
|
|
6410
6414
|
className="cap-image-v2 undefined"
|
|
6411
|
-
|
|
6412
|
-
|
|
6415
|
+
height="40"
|
|
6416
|
+
rest={
|
|
6413
6417
|
Object {
|
|
6414
|
-
"
|
|
6415
|
-
|
|
6418
|
+
"style": Object {
|
|
6419
|
+
"marginBottom": 5,
|
|
6420
|
+
"maxWidth": "100%",
|
|
6421
|
+
},
|
|
6416
6422
|
}
|
|
6417
6423
|
}
|
|
6424
|
+
src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/78a2074d-bb5f-4be7-b025-5c506be9.jpg"
|
|
6418
6425
|
/>
|
|
6419
6426
|
</CapImage>
|
|
6420
6427
|
<span
|
|
@@ -6520,6 +6527,7 @@ new message content.",
|
|
|
6520
6527
|
<img
|
|
6521
6528
|
alt="line-image-src"
|
|
6522
6529
|
className="cap-image-v2 undefined"
|
|
6530
|
+
height="400"
|
|
6523
6531
|
src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/78a2074d-bb5f-4be7-b025-5c506be9.jpg"
|
|
6524
6532
|
/>
|
|
6525
6533
|
</CapImage>
|
|
@@ -9255,7 +9263,7 @@ new message content.",
|
|
|
9255
9263
|
"creatives.containersV2.Whatsapp.awaitingStatusMsg": "This template is awaiting approval",
|
|
9256
9264
|
"creatives.containersV2.Whatsapp.azerbaijani": "Azerbaijani",
|
|
9257
9265
|
"creatives.containersV2.Whatsapp.bengali": "Bengali",
|
|
9258
|
-
"creatives.containersV2.Whatsapp.btnDesc": "These will be
|
|
9266
|
+
"creatives.containersV2.Whatsapp.btnDesc": "These will be clickable buttons below your message.",
|
|
9259
9267
|
"creatives.containersV2.Whatsapp.btnDisabledTooltip": "Please add all mandatory fields to proceed further",
|
|
9260
9268
|
"creatives.containersV2.Whatsapp.btnLabel": "Buttons",
|
|
9261
9269
|
"creatives.containersV2.Whatsapp.btnTypeCTA": "Call to action",
|
|
@@ -10128,13 +10136,16 @@ new message content.",
|
|
|
10128
10136
|
<img
|
|
10129
10137
|
alt="line-image-src"
|
|
10130
10138
|
className="cap-image-v2 undefined"
|
|
10131
|
-
|
|
10132
|
-
|
|
10139
|
+
height="40"
|
|
10140
|
+
rest={
|
|
10133
10141
|
Object {
|
|
10134
|
-
"
|
|
10135
|
-
|
|
10142
|
+
"style": Object {
|
|
10143
|
+
"marginBottom": 5,
|
|
10144
|
+
"maxWidth": "100%",
|
|
10145
|
+
},
|
|
10136
10146
|
}
|
|
10137
10147
|
}
|
|
10148
|
+
src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/78a2074d-bb5f-4be7-b025-5c506be9.jpg"
|
|
10138
10149
|
/>
|
|
10139
10150
|
</CapImage>
|
|
10140
10151
|
<span
|
|
@@ -10240,6 +10251,7 @@ new message content.",
|
|
|
10240
10251
|
<img
|
|
10241
10252
|
alt="line-image-src"
|
|
10242
10253
|
className="cap-image-v2 undefined"
|
|
10254
|
+
height="400"
|
|
10243
10255
|
src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/78a2074d-bb5f-4be7-b025-5c506be9.jpg"
|
|
10244
10256
|
/>
|
|
10245
10257
|
</CapImage>
|
|
@@ -11051,4 +11063,4 @@ new message content.",
|
|
|
11051
11063
|
</div>
|
|
11052
11064
|
</LineImageCarouselContent>
|
|
11053
11065
|
</Provider>
|
|
11054
|
-
`;
|
|
11066
|
+
`;
|
|
@@ -1922,7 +1922,7 @@ new message content.",
|
|
|
1922
1922
|
"creatives.containersV2.Whatsapp.awaitingStatusMsg": "This template is awaiting approval",
|
|
1923
1923
|
"creatives.containersV2.Whatsapp.azerbaijani": "Azerbaijani",
|
|
1924
1924
|
"creatives.containersV2.Whatsapp.bengali": "Bengali",
|
|
1925
|
-
"creatives.containersV2.Whatsapp.btnDesc": "These will be
|
|
1925
|
+
"creatives.containersV2.Whatsapp.btnDesc": "These will be clickable buttons below your message.",
|
|
1926
1926
|
"creatives.containersV2.Whatsapp.btnDisabledTooltip": "Please add all mandatory fields to proceed further",
|
|
1927
1927
|
"creatives.containersV2.Whatsapp.btnLabel": "Buttons",
|
|
1928
1928
|
"creatives.containersV2.Whatsapp.btnTypeCTA": "Call to action",
|
|
@@ -21162,7 +21162,7 @@ new message content.",
|
|
|
21162
21162
|
"creatives.containersV2.Whatsapp.awaitingStatusMsg": "This template is awaiting approval",
|
|
21163
21163
|
"creatives.containersV2.Whatsapp.azerbaijani": "Azerbaijani",
|
|
21164
21164
|
"creatives.containersV2.Whatsapp.bengali": "Bengali",
|
|
21165
|
-
"creatives.containersV2.Whatsapp.btnDesc": "These will be
|
|
21165
|
+
"creatives.containersV2.Whatsapp.btnDesc": "These will be clickable buttons below your message.",
|
|
21166
21166
|
"creatives.containersV2.Whatsapp.btnDisabledTooltip": "Please add all mandatory fields to proceed further",
|
|
21167
21167
|
"creatives.containersV2.Whatsapp.btnLabel": "Buttons",
|
|
21168
21168
|
"creatives.containersV2.Whatsapp.btnTypeCTA": "Call to action",
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { browserHistory } from 'react-router';
|
|
3
2
|
import { act } from 'react-dom/test-utils';
|
|
4
3
|
import { Provider } from 'react-redux';
|
|
5
|
-
import configureStore from '
|
|
4
|
+
import { configureStore } from '@capillarytech/vulcan-react-sdk/utils';
|
|
5
|
+
import { createBrowserHistory } from 'history';
|
|
6
|
+
import { initialReducer } from '../../../../../initialReducer';
|
|
6
7
|
import { mountWithIntl } from '../../../../../../app/helpers/intl-enzym-test-helpers';
|
|
7
8
|
import { LineImageCarouselContent } from '../Content';
|
|
8
9
|
import { mockData } from './mockData';
|
|
9
10
|
|
|
10
11
|
let store;
|
|
12
|
+
let browserHistory = createBrowserHistory();
|
|
11
13
|
beforeAll(() => {
|
|
12
|
-
store = configureStore({}, browserHistory);
|
|
14
|
+
store = configureStore({}, initialReducer, browserHistory);
|
|
13
15
|
});
|
|
14
16
|
|
|
15
17
|
describe('Creatives line image carousel test/>', () => {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { browserHistory } from 'react-router';
|
|
3
2
|
import { Provider } from 'react-redux';
|
|
4
|
-
import configureStore from '
|
|
3
|
+
import { configureStore } from '@capillarytech/vulcan-react-sdk/utils';
|
|
4
|
+
import { createBrowserHistory } from 'history';
|
|
5
|
+
import { initialReducer } from '../../../../../initialReducer';
|
|
5
6
|
import { mountWithIntl } from '../../../../../helpers/intl-enzym-test-helpers';
|
|
6
7
|
import { LineImageCarousel } from '../index';
|
|
7
8
|
import { mockData } from './mockData';
|
|
8
9
|
|
|
9
10
|
let store;
|
|
11
|
+
let browserHistory = createBrowserHistory();
|
|
10
12
|
beforeAll(() => {
|
|
11
|
-
store = configureStore({}, browserHistory);
|
|
13
|
+
store = configureStore({}, initialReducer, browserHistory);
|
|
12
14
|
});
|
|
13
15
|
|
|
14
16
|
jest.mock('../Content', () => ({
|
|
@@ -235,7 +235,7 @@ export const LineImageMap = ({
|
|
|
235
235
|
let incorrectFile = false;
|
|
236
236
|
const file = files[0];
|
|
237
237
|
if (supportedExtensions) {
|
|
238
|
-
const allowedExtensions = /(\.bmp|\.jpeg|\.png|\.gif|\.jpg)$/i;
|
|
238
|
+
const allowedExtensions = /(\.bmp|\.jpeg|\.png|\.gif|\.avif|\.jpg)$/i;
|
|
239
239
|
if (!allowedExtensions.exec(file.name)) {
|
|
240
240
|
incorrectFile = true;
|
|
241
241
|
}
|
|
@@ -16,6 +16,8 @@ import style from './style';
|
|
|
16
16
|
import withStyles from '../../../../hoc/withStyles';
|
|
17
17
|
import globalMessages from '../../../Cap/messages';
|
|
18
18
|
import { validateTags } from '../../../../utils/tagValidations';
|
|
19
|
+
import moment from 'moment';
|
|
20
|
+
import { GET_TRANSLATION_MAPPED } from '../../../../containers/TagList/constants';
|
|
19
21
|
|
|
20
22
|
const { TextArea } = CapInput;
|
|
21
23
|
const {CapCustomCardList} = CapCustomCard;
|
|
@@ -54,6 +56,7 @@ export const LineText = ({
|
|
|
54
56
|
const [messageTitle, updateTextMessageTitle] = useState('');
|
|
55
57
|
const [isDrawerRequired, updateDrawerRequirement] = useState(false);
|
|
56
58
|
const [selectedTemplate, updateSelectedTemplate] = useState();
|
|
59
|
+
const [translationLang, updateTranslationLang] = useState('en');
|
|
57
60
|
|
|
58
61
|
useEffect(() => {
|
|
59
62
|
const { messageTitle = '', messageContent = '', type, isInit } = content;
|
|
@@ -71,6 +74,18 @@ export const LineText = ({
|
|
|
71
74
|
}
|
|
72
75
|
}, [content]);
|
|
73
76
|
|
|
77
|
+
//To Find from which locale user is loggedin
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
const user = localStorage.getItem("user");
|
|
80
|
+
let locale = "en";
|
|
81
|
+
if (user) {
|
|
82
|
+
locale = JSON.parse(user)?.lang || locale;
|
|
83
|
+
}
|
|
84
|
+
locale = GET_TRANSLATION_MAPPED?.[locale];
|
|
85
|
+
moment.locale(locale);
|
|
86
|
+
updateTranslationLang(locale);
|
|
87
|
+
}, []);
|
|
88
|
+
|
|
74
89
|
useEffect(() => {
|
|
75
90
|
if (messageContent && (isFullMode ? messageTitle : true)) {
|
|
76
91
|
updateMessageState({
|
|
@@ -260,7 +275,7 @@ export const LineText = ({
|
|
|
260
275
|
injectedTags={injectedTags || {}}
|
|
261
276
|
// className={val.className ? val.className : ''}
|
|
262
277
|
id={`${id}_tags`}
|
|
263
|
-
userLocale={
|
|
278
|
+
userLocale={translationLang}
|
|
264
279
|
selectedOfferDetails={selectedOfferDetails}
|
|
265
280
|
/>
|
|
266
281
|
</>
|
|
@@ -11,6 +11,7 @@ import CapHeader from '@capillarytech/cap-ui-library/CapHeader';
|
|
|
11
11
|
import CapError from '@capillarytech/cap-ui-library/CapError';
|
|
12
12
|
import CapRadioGroup from '@capillarytech/cap-ui-library/CapRadioGroup';
|
|
13
13
|
import { isUrl } from '../Wrapper/utils';
|
|
14
|
+
import { getDecodedFileName } from '../../../../utils/common';
|
|
14
15
|
import LineDrawer from '../Drawer';
|
|
15
16
|
import { CAP_SPACE_12, CAP_SPACE_08, FONT_COLOR_05, CAP_SPACE_24, CAP_SPACE_04 } from '@capillarytech/cap-ui-library/styled/variables';
|
|
16
17
|
import style from './style';
|
|
@@ -414,7 +415,7 @@ export const LineVideo = ({
|
|
|
414
415
|
</video>
|
|
415
416
|
<div style={{ marginLeft: CAP_SPACE_24 }}>
|
|
416
417
|
<CapHeading type="h6">
|
|
417
|
-
{videoName}
|
|
418
|
+
{getDecodedFileName(videoName)}
|
|
418
419
|
</CapHeading>
|
|
419
420
|
<CapHeading type="h6">
|
|
420
421
|
{videoDuration}
|