@capillarytech/creatives-library 7.12.32 → 7.12.33
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/components/Card/tests/index.test.js +10 -12
- package/components/FormBuilder/_formBuilder.scss +1 -1
- package/components/SlideBox/index.js +0 -1
- package/components/SlideBox/tests/index.test.js +2 -2
- package/containers/Assets/Gallery/tests/reducer.test.js +2 -1
- package/containers/Cap/tests/__snapshots__/index.test.js.snap +1876 -0
- package/containers/Cap/tests/index.test.js +16 -10
- package/containers/LanguageProvider/tests/index.test.js +5 -1
- package/i18n.js +6 -4
- package/package.json +4 -1
- package/translations/en.json +42 -119
- package/translations/zh.json +38 -115
- package/utils/test-utils.js +63 -0
- package/v2Components/CapActionButton/index.js +54 -48
- package/v2Components/CapActionButton/tests/index.test.js +33 -24
- package/v2Components/CapWhatsappCTA/constants.js +34 -0
- package/v2Components/CapWhatsappCTA/index.js +321 -0
- package/v2Components/CapWhatsappCTA/index.scss +64 -0
- package/v2Components/CapWhatsappCTA/messages.js +56 -0
- package/v2Components/EmailPreviewV2/index.js +1 -1
- package/v2Components/EmailPreviewV2/tests/__snapshots__/index.test.js.snap +135 -0
- package/v2Components/EmailPreviewV2/tests/index.test.js +8 -2
- package/v2Components/FormBuilder/_formBuilder.scss +1 -1
- package/v2Components/MarketingObjective/index.js +2 -2
- package/v2Components/MarketingObjective/test/index.test.js +33 -0
- package/v2Components/SlideBox/tests/index.test.js +2 -2
- package/v2Components/TemplatePreview/_templatePreview.scss +8 -0
- package/v2Components/TemplatePreview/index.js +29 -2
- package/v2Components/TemplatePreview/tests/__snapshots__/index.test.js.snap +1 -1
- package/v2Containers/Assets/Gallery/tests/reducer.test.js +2 -1
- package/v2Containers/Cap/messages.js +4 -0
- package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +1930 -0
- package/v2Containers/Cap/tests/index.test.js +56 -10
- package/v2Containers/LanguageProvider/tests/index.test.js +9 -2
- package/v2Containers/LanguageProvider/tests/reducer.test.js +5 -1
- package/v2Containers/Line/Container/Video/index.js +1 -0
- package/v2Containers/Line/Container/Video/tests/index.test.js +62 -0
- package/v2Containers/Rcs/index.js +71 -67
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +2004 -16874
- package/v2Containers/Rcs/tests/index.test.js +7 -12
- package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +176 -476
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +336 -952
- package/v2Containers/Templates/index.js +10 -5
- package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +499 -419
- package/v2Containers/Templates/tests/index.test.js +8 -4
- package/v2Containers/Whatsapp/constants.js +22 -5
- package/v2Containers/Whatsapp/index.js +199 -9
- package/v2Containers/Whatsapp/index.scss +42 -1
- package/v2Containers/Whatsapp/messages.js +39 -2
- package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +37677 -5915
- package/v2Containers/Whatsapp/utils.js +37 -0
- package/v2Containers/mockdata.js +47 -0
- package/components/BreadCrumbs/tests/index.test.js +0 -10
- package/components/CapTagList/tests/index.test.js +0 -10
- package/components/CardGrid/tests/index.test.js +0 -10
- package/components/Ckeditor/tests/index.test.js +0 -10
- package/components/Component/tests/index.test.js +0 -10
- package/components/CustomPopOver/tests/index.test.js +0 -10
- package/components/DateFilter/tests/index.test.js +0 -15
- package/components/DateRange/tests/index.test.js +0 -10
- package/components/Edmeditor/tests/index.test.js +0 -10
- package/components/EmailPreview/tests/index.test.js +0 -10
- package/components/Footer/tests/index.test.js +0 -10
- package/components/FormBuilder/tests/index.test.js +0 -10
- package/components/Header/tests/index.test.js +0 -10
- package/components/ImagePreview/tests/index.test.js +0 -10
- package/components/PageHeader/tests/index.test.js +0 -10
- package/components/Pagination/tests/index.test.js +0 -10
- package/components/PreviewSideBar/tests/index.test.js +0 -10
- package/components/Sidebar/tests/index.test.js +0 -10
- package/components/SmsEditor/tests/index.test.js +0 -10
- package/components/SmsTest/tests/index.test.js +0 -10
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/tests/index.test.js +0 -10
- package/components/TemplatePreview/tests/index.test.js +0 -10
- package/components/Toastr/tests/index.test.js +0 -10
- package/components/ToastrMessage/tests/index.test.js +0 -10
- package/components/TopBar/tests/index.test.js +0 -10
- package/containers/App/tests/actions.test.js +0 -18
- package/containers/App/tests/reducer.test.js +0 -9
- package/containers/App/tests/sagas.test.js +0 -15
- package/containers/App/tests/selectors.test.js +0 -10
- package/containers/Assets/Gallery/tests/index.test.js +0 -10
- package/containers/Assets/Gallery/tests/sagas.test.js +0 -15
- package/containers/Assets/Gallery/tests/selectors.test.js +0 -10
- package/containers/Dashboard/tests/actions.test.js +0 -18
- package/containers/Dashboard/tests/index.test.js +0 -10
- package/containers/Dashboard/tests/reducer.test.js +0 -9
- package/containers/Dashboard/tests/sagas.test.js +0 -15
- package/containers/Dashboard/tests/selectors.test.js +0 -10
- package/containers/Ebill/tests/actions.test.js +0 -18
- package/containers/Ebill/tests/index.test.js +0 -10
- package/containers/Ebill/tests/reducer.test.js +0 -9
- package/containers/Ebill/tests/sagas.test.js +0 -15
- package/containers/Ebill/tests/selectors.test.js +0 -10
- package/containers/Email/tests/actions.test.js +0 -18
- package/containers/Email/tests/index.test.js +0 -10
- package/containers/Email/tests/reducer.test.js +0 -9
- package/containers/Email/tests/sagas.test.js +0 -15
- package/containers/Email/tests/selectors.test.js +0 -10
- package/containers/Line/Edit/tests/actions.test.js +0 -18
- package/containers/Line/Edit/tests/index.test.js +0 -10
- package/containers/Line/Edit/tests/reducer.test.js +0 -9
- package/containers/Line/Edit/tests/sagas.test.js +0 -15
- package/containers/Line/Edit/tests/selectors.test.js +0 -10
- package/containers/Login/components/LoginForm/tests/index.test.js +0 -10
- package/containers/Login/tests/index.test.js +0 -10
- package/containers/Login/tests/sagas.test.js +0 -15
- package/containers/Login/tests/selectors.test.js +0 -10
- package/containers/MobilePush/Create/tests/actions.test.js +0 -18
- package/containers/MobilePush/Create/tests/index.test.js +0 -10
- package/containers/MobilePush/Create/tests/reducer.test.js +0 -9
- package/containers/MobilePush/Create/tests/sagas.test.js +0 -15
- package/containers/MobilePush/Create/tests/selectors.test.js +0 -10
- package/containers/MobilePush/Edit/tests/actions.test.js +0 -18
- package/containers/MobilePush/Edit/tests/index.test.js +0 -10
- package/containers/MobilePush/Edit/tests/reducer.test.js +0 -9
- package/containers/MobilePush/Edit/tests/sagas.test.js +0 -15
- package/containers/MobilePush/Edit/tests/selectors.test.js +0 -10
- package/containers/Sms/Create/tests/actions.test.js +0 -18
- package/containers/Sms/Create/tests/index.test.js +0 -10
- package/containers/Sms/Create/tests/reducer.test.js +0 -9
- package/containers/Sms/Create/tests/sagas.test.js +0 -15
- package/containers/Sms/Create/tests/selectors.test.js +0 -10
- package/containers/Sms/Edit/tests/actions.test.js +0 -18
- package/containers/Sms/Edit/tests/index.test.js +0 -10
- package/containers/Sms/Edit/tests/reducer.test.js +0 -9
- package/containers/Sms/Edit/tests/sagas.test.js +0 -15
- package/containers/Sms/Edit/tests/selectors.test.js +0 -10
- package/containers/TagList/tests/actions.test.js +0 -18
- package/containers/TagList/tests/index.test.js +0 -10
- package/containers/TagList/tests/reducer.test.js +0 -9
- package/containers/TagList/tests/sagas.test.js +0 -15
- package/containers/TagList/tests/selectors.test.js +0 -10
- package/containers/Templates/tests/actions.test.js +0 -18
- package/containers/Templates/tests/index.test.js +0 -10
- package/containers/Templates/tests/reducer.test.js +0 -9
- package/containers/Templates/tests/sagas.test.js +0 -15
- package/containers/Templates/tests/selectors.test.js +0 -10
- package/containers/Testv2/tests/actions.test.js +0 -18
- package/containers/Testv2/tests/index.test.js +0 -10
- package/containers/Testv2/tests/reducer.test.js +0 -9
- package/containers/Testv2/tests/sagas.test.js +0 -15
- package/containers/Testv2/tests/selectors.test.js +0 -10
- package/containers/WeChat/MapTemplates/tests/actions.test.js +0 -18
- package/containers/WeChat/MapTemplates/tests/index.test.js +0 -10
- package/containers/WeChat/MapTemplates/tests/reducer.test.js +0 -9
- package/containers/WeChat/MapTemplates/tests/sagas.test.js +0 -15
- package/containers/WeChat/MapTemplates/tests/selectors.test.js +0 -10
- package/containers/WeChat/RichmediaTemplates/Create/tests/actions.test.js +0 -18
- package/containers/WeChat/RichmediaTemplates/Create/tests/index.test.js +0 -10
- package/containers/WeChat/RichmediaTemplates/Create/tests/reducer.test.js +0 -9
- package/containers/WeChat/RichmediaTemplates/Create/tests/sagas.test.js +0 -15
- package/containers/WeChat/RichmediaTemplates/Create/tests/selectors.test.js +0 -10
- package/containers/WeChat/RichmediaTemplates/Edit/tests/actions.test.js +0 -18
- package/containers/WeChat/RichmediaTemplates/Edit/tests/index.test.js +0 -10
- package/containers/WeChat/RichmediaTemplates/Edit/tests/reducer.test.js +0 -9
- package/containers/WeChat/RichmediaTemplates/Edit/tests/sagas.test.js +0 -15
- package/containers/WeChat/RichmediaTemplates/Edit/tests/selectors.test.js +0 -10
- package/containers/WeChat/RichmediaTemplates/View/tests/actions.test.js +0 -18
- package/containers/WeChat/RichmediaTemplates/View/tests/index.test.js +0 -10
- package/containers/WeChat/RichmediaTemplates/View/tests/reducer.test.js +0 -9
- package/containers/WeChat/RichmediaTemplates/View/tests/sagas.test.js +0 -15
- package/containers/WeChat/RichmediaTemplates/View/tests/selectors.test.js +0 -10
- package/gtm/tests/events.test.js +0 -3
- package/v2Components/BreadCrumbs/tests/index.test.js +0 -10
- package/v2Components/CapActionButton/tests/__snapshots__/index.test.js.snap +0 -151
- package/v2Components/CapTagList/tests/index.test.js +0 -10
- package/v2Components/Card/tests/index.test.js +0 -10
- package/v2Components/CardGrid/tests/index.test.js +0 -10
- package/v2Components/Ckeditor/tests/index.test.js +0 -10
- package/v2Components/CmsTemplatesComponent/tests/index.test.js +0 -10
- package/v2Components/Component/tests/index.test.js +0 -10
- package/v2Components/CustomPopOver/tests/index.test.js +0 -10
- package/v2Components/Edmeditor/tests/index.test.js +0 -10
- package/v2Components/EmailPreview/tests/index.test.js +0 -10
- package/v2Components/Footer/tests/index.test.js +0 -10
- package/v2Components/FormBuilder/tests/index.test.js +0 -10
- package/v2Components/ImagePreview/tests/index.test.js +0 -10
- package/v2Components/MobilePushPreviewV2/tests/index.test.js +0 -10
- package/v2Components/NavigationBar/tests/index.test.js +0 -11
- package/v2Components/NewCallTask/tests/index.test.js +0 -10
- package/v2Components/Pagination/tests/index.test.js +0 -10
- package/v2Components/PreviewSideBar/tests/index.test.js +0 -10
- package/v2Components/SmsTest/tests/index.test.js +0 -10
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/tests/index.test.js +0 -10
- package/v2Components/Toastr/tests/index.test.js +0 -10
- package/v2Components/ToastrMessage/tests/index.test.js +0 -10
- package/v2Components/TopBar/tests/index.test.js +0 -10
- package/v2Containers/App/tests/actions.test.js +0 -18
- package/v2Containers/App/tests/reducer.test.js +0 -9
- package/v2Containers/App/tests/sagas.test.js +0 -15
- package/v2Containers/App/tests/selectors.test.js +0 -10
- package/v2Containers/Assets/Gallery/tests/index.test.js +0 -10
- package/v2Containers/Assets/Gallery/tests/sagas.test.js +0 -15
- package/v2Containers/Assets/Gallery/tests/selectors.test.js +0 -10
- package/v2Containers/BeeEditor/tests/index.test.js +0 -10
- package/v2Containers/CallTask/tests/actions.test.js +0 -18
- package/v2Containers/CallTask/tests/index.test.js +0 -10
- package/v2Containers/CallTask/tests/reducer.test.js +0 -9
- package/v2Containers/CallTask/tests/sagas.test.js +0 -15
- package/v2Containers/CallTask/tests/selectors.test.js +0 -10
- package/v2Containers/ChannelTemplates/tests/actions.test.js +0 -18
- package/v2Containers/ChannelTemplates/tests/index.test.js +0 -10
- package/v2Containers/ChannelTemplates/tests/reducer.test.js +0 -9
- package/v2Containers/ChannelTemplates/tests/sagas.test.js +0 -15
- package/v2Containers/ChannelTemplates/tests/selectors.test.js +0 -10
- package/v2Containers/CreativesContainer/tests/actions.test.js +0 -18
- package/v2Containers/CreativesContainer/tests/reducer.test.js +0 -9
- package/v2Containers/CreativesContainer/tests/sagas.test.js +0 -15
- package/v2Containers/CreativesContainer/tests/selectors.test.js +0 -10
- package/v2Containers/Dashboard/tests/actions.test.js +0 -18
- package/v2Containers/Dashboard/tests/index.test.js +0 -10
- package/v2Containers/Dashboard/tests/reducer.test.js +0 -9
- package/v2Containers/Dashboard/tests/sagas.test.js +0 -15
- package/v2Containers/Dashboard/tests/selectors.test.js +0 -10
- package/v2Containers/Ebill/tests/actions.test.js +0 -18
- package/v2Containers/Ebill/tests/index.test.js +0 -10
- package/v2Containers/Ebill/tests/reducer.test.js +0 -9
- package/v2Containers/Ebill/tests/sagas.test.js +0 -15
- package/v2Containers/Ebill/tests/selectors.test.js +0 -10
- package/v2Containers/Email/tests/actions.test.js +0 -18
- package/v2Containers/Email/tests/index.test.js +0 -10
- package/v2Containers/Email/tests/reducer.test.js +0 -9
- package/v2Containers/Email/tests/sagas.test.js +0 -15
- package/v2Containers/Email/tests/selectors.test.js +0 -10
- package/v2Containers/EmailWrapper/tests/actions.test.js +0 -18
- package/v2Containers/EmailWrapper/tests/index.test.js +0 -10
- package/v2Containers/EmailWrapper/tests/reducer.test.js +0 -9
- package/v2Containers/EmailWrapper/tests/sagas.test.js +0 -15
- package/v2Containers/EmailWrapper/tests/selectors.test.js +0 -10
- package/v2Containers/Login/components/LoginForm/tests/index.test.js +0 -10
- package/v2Containers/Login/tests/index.test.js +0 -10
- package/v2Containers/Login/tests/sagas.test.js +0 -15
- package/v2Containers/Login/tests/selectors.test.js +0 -10
- package/v2Containers/MobilePush/Create/tests/actions.test.js +0 -18
- package/v2Containers/MobilePush/Create/tests/index.test.js +0 -10
- package/v2Containers/MobilePush/Create/tests/reducer.test.js +0 -9
- package/v2Containers/MobilePush/Create/tests/sagas.test.js +0 -15
- package/v2Containers/MobilePush/Create/tests/selectors.test.js +0 -10
- package/v2Containers/MobilePush/Edit/tests/actions.test.js +0 -18
- package/v2Containers/MobilePush/Edit/tests/index.test.js +0 -10
- package/v2Containers/MobilePush/Edit/tests/reducer.test.js +0 -9
- package/v2Containers/MobilePush/Edit/tests/sagas.test.js +0 -15
- package/v2Containers/MobilePush/Edit/tests/selectors.test.js +0 -10
- package/v2Containers/MobilepushWrapper/tests/index.test.js +0 -10
- package/v2Containers/Sms/Create/tests/actions.test.js +0 -18
- package/v2Containers/Sms/Create/tests/index.test.js +0 -10
- package/v2Containers/Sms/Create/tests/reducer.test.js +0 -9
- package/v2Containers/Sms/Create/tests/sagas.test.js +0 -15
- package/v2Containers/Sms/Create/tests/selectors.test.js +0 -10
- package/v2Containers/Sms/Edit/tests/actions.test.js +0 -18
- package/v2Containers/Sms/Edit/tests/index.test.js +0 -10
- package/v2Containers/Sms/Edit/tests/reducer.test.js +0 -9
- package/v2Containers/Sms/Edit/tests/sagas.test.js +0 -15
- package/v2Containers/Sms/Edit/tests/selectors.test.js +0 -10
- package/v2Containers/SmsWrapper/tests/index.test.js +0 -10
- package/v2Containers/TagList/tests/actions.test.js +0 -18
- package/v2Containers/TagList/tests/index.test.js +0 -10
- package/v2Containers/TagList/tests/reducer.test.js +0 -9
- package/v2Containers/TagList/tests/sagas.test.js +0 -15
- package/v2Containers/TagList/tests/selectors.test.js +0 -10
- package/v2Containers/Templates/tests/actions.test.js +0 -18
- package/v2Containers/Templates/tests/reducer.test.js +0 -9
- package/v2Containers/Templates/tests/sagas.test.js +0 -15
- package/v2Containers/Templates/tests/selectors.test.js +0 -10
- package/v2Containers/TemplatesV2/tests/actions.test.js +0 -18
- package/v2Containers/TemplatesV2/tests/index.test.js +0 -10
- package/v2Containers/TemplatesV2/tests/reducer.test.js +0 -9
- package/v2Containers/TemplatesV2/tests/sagas.test.js +0 -15
- package/v2Containers/TemplatesV2/tests/selectors.test.js +0 -10
- package/v2Containers/Testv2/tests/actions.test.js +0 -18
- package/v2Containers/Testv2/tests/index.test.js +0 -10
- package/v2Containers/Testv2/tests/reducer.test.js +0 -9
- package/v2Containers/Testv2/tests/sagas.test.js +0 -15
- package/v2Containers/Testv2/tests/selectors.test.js +0 -10
- package/v2Containers/WeChat/MapTemplates/tests/actions.test.js +0 -18
- package/v2Containers/WeChat/MapTemplates/tests/index.test.js +0 -10
- package/v2Containers/WeChat/MapTemplates/tests/reducer.test.js +0 -9
- package/v2Containers/WeChat/MapTemplates/tests/sagas.test.js +0 -15
- package/v2Containers/WeChat/MapTemplates/tests/selectors.test.js +0 -10
- package/v2Containers/WeChat/RichmediaTemplates/Create/tests/actions.test.js +0 -18
- package/v2Containers/WeChat/RichmediaTemplates/Create/tests/index.test.js +0 -10
- package/v2Containers/WeChat/RichmediaTemplates/Create/tests/reducer.test.js +0 -9
- package/v2Containers/WeChat/RichmediaTemplates/Create/tests/sagas.test.js +0 -15
- package/v2Containers/WeChat/RichmediaTemplates/Create/tests/selectors.test.js +0 -10
- package/v2Containers/WeChat/RichmediaTemplates/Edit/tests/actions.test.js +0 -18
- package/v2Containers/WeChat/RichmediaTemplates/Edit/tests/index.test.js +0 -10
- package/v2Containers/WeChat/RichmediaTemplates/Edit/tests/reducer.test.js +0 -9
- package/v2Containers/WeChat/RichmediaTemplates/Edit/tests/sagas.test.js +0 -15
- package/v2Containers/WeChat/RichmediaTemplates/Edit/tests/selectors.test.js +0 -10
- package/v2Containers/WeChat/RichmediaTemplates/View/tests/actions.test.js +0 -18
- package/v2Containers/WeChat/RichmediaTemplates/View/tests/index.test.js +0 -10
- package/v2Containers/WeChat/RichmediaTemplates/View/tests/reducer.test.js +0 -9
- package/v2Containers/WeChat/RichmediaTemplates/View/tests/sagas.test.js +0 -15
- package/v2Containers/WeChat/RichmediaTemplates/View/tests/selectors.test.js +0 -10
|
@@ -4,7 +4,7 @@ import { shallowWithIntl } from '../../../helpers/intl-enzym-test-helpers';
|
|
|
4
4
|
import { Templates } from '../index';
|
|
5
5
|
import mockdata from '../../mockdata';
|
|
6
6
|
|
|
7
|
-
const {
|
|
7
|
+
const { whatsappTemplates: TemplatesProp, getCreativesParamsOutput } = mockdata;
|
|
8
8
|
|
|
9
9
|
jest.mock("../../CreativesContainer", () => ({
|
|
10
10
|
__esModule: true,
|
|
@@ -16,6 +16,7 @@ describe('Test Templates container', () => {
|
|
|
16
16
|
const getWeCrmAccounts = jest.fn();
|
|
17
17
|
const setChannelAccount = jest.fn();
|
|
18
18
|
const getAllTemplates = jest.fn();
|
|
19
|
+
const getUserList = jest.fn();
|
|
19
20
|
let renderedComponent;
|
|
20
21
|
|
|
21
22
|
beforeEach(() => {
|
|
@@ -33,6 +34,7 @@ describe('Test Templates container', () => {
|
|
|
33
34
|
getWeCrmAccounts,
|
|
34
35
|
setChannelAccount,
|
|
35
36
|
getAllTemplates,
|
|
37
|
+
getUserList,
|
|
36
38
|
}}
|
|
37
39
|
location={{
|
|
38
40
|
pathname: "/whatsapp",
|
|
@@ -43,6 +45,9 @@ describe('Test Templates container', () => {
|
|
|
43
45
|
duplicateTemplateInProgress: false,
|
|
44
46
|
}}
|
|
45
47
|
isFullMode={isFullMode}
|
|
48
|
+
intl={{
|
|
49
|
+
formatMessage: () => {},
|
|
50
|
+
}}
|
|
46
51
|
/>
|
|
47
52
|
);
|
|
48
53
|
};
|
|
@@ -92,16 +97,15 @@ describe('Test Templates container', () => {
|
|
|
92
97
|
renderFunction();
|
|
93
98
|
renderedComponent.setProps({TemplatesList: TemplatesProp.templates});
|
|
94
99
|
renderedComponent.setState({selectedWhatsappStatus: 'approved'});
|
|
95
|
-
//remove status filter
|
|
96
|
-
|
|
97
100
|
getFilterContainer().find('CapTag').props().onClose();
|
|
98
101
|
expect(renderedComponent).toMatchSnapshot();
|
|
99
102
|
});
|
|
100
103
|
|
|
101
104
|
|
|
102
|
-
it('Test removing all whatsapp
|
|
105
|
+
it('Test removing all whatsapp filterss', () => {
|
|
103
106
|
renderFunction();
|
|
104
107
|
renderedComponent.setProps({TemplatesList: TemplatesProp.templates});
|
|
108
|
+
|
|
105
109
|
renderedComponent.setState({selectedWhatsappStatus: 'approved'});
|
|
106
110
|
renderedComponent.setState({selectedWhatsappCategory: 'ALERT_UPDATE'});
|
|
107
111
|
expect(renderedComponent).toMatchSnapshot();
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormattedMessage } from 'react-intl';
|
|
3
|
-
import messages from './messages';
|
|
4
3
|
import {
|
|
5
4
|
CAP_ORANGE,
|
|
6
5
|
CAP_PURPLE02,
|
|
@@ -9,7 +8,7 @@ import {
|
|
|
9
8
|
CAP_GREEN01,
|
|
10
9
|
CAP_GREEN02,
|
|
11
10
|
} from '@capillarytech/cap-ui-library/styled/variables';
|
|
12
|
-
|
|
11
|
+
import messages from './messages';
|
|
13
12
|
export const UNSUBSCRIBE_TEXT_LENGTH = 36;
|
|
14
13
|
export const TEMPLATE_MESSAGE_MAX_LENGTH = 1024;
|
|
15
14
|
export const WHATSAPP = 'WHATSAPP';
|
|
@@ -130,6 +129,24 @@ export const WHATSAPP_MEDIA_TYPES = {
|
|
|
130
129
|
VIDEO: 'VIDEO',
|
|
131
130
|
};
|
|
132
131
|
|
|
132
|
+
export const WHATSAPP_BUTTON_TYPES = {
|
|
133
|
+
NONE: 'NONE',
|
|
134
|
+
CTA: 'CTA',
|
|
135
|
+
QUICK_REPLY: 'QUICK_REPLY',
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export const INITIAL_CTA_DATA = [
|
|
139
|
+
{
|
|
140
|
+
index: 0,
|
|
141
|
+
ctaType: 'PHONE_NUMBER',
|
|
142
|
+
text: '',
|
|
143
|
+
phone_number: '',
|
|
144
|
+
urlType: 'STATIC_URL',
|
|
145
|
+
url: '',
|
|
146
|
+
isSaved: false,
|
|
147
|
+
},
|
|
148
|
+
];
|
|
149
|
+
|
|
133
150
|
export const LANGUAGE_OPTIONS = [
|
|
134
151
|
{
|
|
135
152
|
value: 'af',
|
|
@@ -273,7 +290,7 @@ export const LANGUAGE_OPTIONS = [
|
|
|
273
290
|
value: 'kk',
|
|
274
291
|
label: <FormattedMessage {...messages.kazakh} />,
|
|
275
292
|
},
|
|
276
|
-
|
|
293
|
+
// commenting this as twilio api is throwing some error on this lang
|
|
277
294
|
// will uncomment once this issue will be resolved by twilio api
|
|
278
295
|
// {
|
|
279
296
|
// value: 'rw_RW',
|
|
@@ -283,7 +300,7 @@ export const LANGUAGE_OPTIONS = [
|
|
|
283
300
|
value: 'ko',
|
|
284
301
|
label: <FormattedMessage {...messages.korean} />,
|
|
285
302
|
},
|
|
286
|
-
|
|
303
|
+
// commenting this as twilio api is throwing some error on this lang
|
|
287
304
|
// will uncomment once this issue will be resolved by twilio api
|
|
288
305
|
// {
|
|
289
306
|
// value: 'ky_KG',
|
|
@@ -309,7 +326,7 @@ export const LANGUAGE_OPTIONS = [
|
|
|
309
326
|
value: 'ms',
|
|
310
327
|
label: <FormattedMessage {...messages.malay} />,
|
|
311
328
|
},
|
|
312
|
-
|
|
329
|
+
// commenting this as twilio api is throwing some error on this lang
|
|
313
330
|
// will uncomment once this issue will be resolved by twilio api
|
|
314
331
|
// {
|
|
315
332
|
// value: 'ml',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable camelcase */
|
|
1
2
|
/* eslint-disable no-undef */
|
|
2
3
|
import React, { useState, useEffect } from 'react';
|
|
3
4
|
import { bindActionCreators } from 'redux';
|
|
@@ -50,6 +51,8 @@ import {
|
|
|
50
51
|
ALL,
|
|
51
52
|
LIBRARY,
|
|
52
53
|
WHATSAPP_MEDIA_TYPES,
|
|
54
|
+
WHATSAPP_BUTTON_TYPES,
|
|
55
|
+
INITIAL_CTA_DATA,
|
|
53
56
|
} from './constants';
|
|
54
57
|
import { DATE_DISPLAY_FORMAT, TIME_DISPLAY_FORMAT } from '../App/constants';
|
|
55
58
|
import messages from './messages';
|
|
@@ -58,7 +61,12 @@ import withCreatives from '../../hoc/withCreatives';
|
|
|
58
61
|
import TemplatePreview from '../../v2Components/TemplatePreview';
|
|
59
62
|
import TagList from '../TagList';
|
|
60
63
|
import { validateTags } from '../../utils/tagValidations';
|
|
61
|
-
|
|
64
|
+
import CapWhatsappCTA from '../../v2Components/CapWhatsappCTA';
|
|
65
|
+
import {
|
|
66
|
+
PHONE_NUMBER,
|
|
67
|
+
STATIC_URL,
|
|
68
|
+
WEBSITE,
|
|
69
|
+
} from '../../v2Components/CapWhatsappCTA/constants';
|
|
62
70
|
let varMap = {};
|
|
63
71
|
let editContent = {};
|
|
64
72
|
let tagValidationResponse = {};
|
|
@@ -112,6 +120,9 @@ export const Whatsapp = (props) => {
|
|
|
112
120
|
const [tags, updateTags] = useState([]);
|
|
113
121
|
const [textAreaId, updateTextAreaId] = useState();
|
|
114
122
|
const [isTagValidationError, updateIsTagValidationError] = useState(false);
|
|
123
|
+
//buttons
|
|
124
|
+
const [buttonType, setButtonType] = useState(WHATSAPP_BUTTON_TYPES.NONE);
|
|
125
|
+
const [ctaData, setCtadata] = useState(INITIAL_CTA_DATA);
|
|
115
126
|
|
|
116
127
|
const validVarRegex = /{{([1-9]|1[0-9])}}/g;
|
|
117
128
|
|
|
@@ -178,11 +189,46 @@ export const Whatsapp = (props) => {
|
|
|
178
189
|
status = WHATSAPP_STATUSES.unsubmitted,
|
|
179
190
|
rejection_reason = null,
|
|
180
191
|
languages = [],
|
|
192
|
+
buttonType: btnType = WHATSAPP_BUTTON_TYPES.NONE,
|
|
193
|
+
buttons = [],
|
|
181
194
|
} = editContent;
|
|
182
195
|
setTemplateCategory(category);
|
|
183
196
|
setTemplateStatus(status);
|
|
184
197
|
setTemplateRejectionReason(rejection_reason);
|
|
185
198
|
setTemplateLanguage(languages[0]?.language);
|
|
199
|
+
setButtonType(btnType);
|
|
200
|
+
if (btnType === WHATSAPP_BUTTON_TYPES.CTA && buttons.length > 0) {
|
|
201
|
+
setCtadata(
|
|
202
|
+
buttons.map((cta) => {
|
|
203
|
+
const {
|
|
204
|
+
index,
|
|
205
|
+
type,
|
|
206
|
+
text,
|
|
207
|
+
phone_number = '',
|
|
208
|
+
url = '',
|
|
209
|
+
} = cta || {};
|
|
210
|
+
const obj = {
|
|
211
|
+
index,
|
|
212
|
+
text,
|
|
213
|
+
phone_number,
|
|
214
|
+
url,
|
|
215
|
+
urlType: STATIC_URL,
|
|
216
|
+
isSaved: true,
|
|
217
|
+
};
|
|
218
|
+
obj.phone_number = obj.phone_number.replace('+', '');
|
|
219
|
+
if (type === PHONE_NUMBER) {
|
|
220
|
+
return {
|
|
221
|
+
...obj,
|
|
222
|
+
ctaType: type,
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
return {
|
|
226
|
+
...obj,
|
|
227
|
+
ctaType: WEBSITE,
|
|
228
|
+
};
|
|
229
|
+
}),
|
|
230
|
+
);
|
|
231
|
+
}
|
|
186
232
|
computeTempMsgArray();
|
|
187
233
|
}
|
|
188
234
|
}, [editData.templateDetails || templateData]);
|
|
@@ -367,7 +413,7 @@ export const Whatsapp = (props) => {
|
|
|
367
413
|
{
|
|
368
414
|
value: WHATSAPP_MEDIA_TYPES.IMAGE,
|
|
369
415
|
label: (
|
|
370
|
-
<CapTooltip title={formatMessage(messages.
|
|
416
|
+
<CapTooltip title={formatMessage(messages.disabledFeatureTooltip)}>
|
|
371
417
|
{formatMessage(messages.mediaImage)}
|
|
372
418
|
</CapTooltip>
|
|
373
419
|
),
|
|
@@ -376,7 +422,7 @@ export const Whatsapp = (props) => {
|
|
|
376
422
|
{
|
|
377
423
|
value: WHATSAPP_MEDIA_TYPES.VIDEO,
|
|
378
424
|
label: (
|
|
379
|
-
<CapTooltip title={formatMessage(messages.
|
|
425
|
+
<CapTooltip title={formatMessage(messages.disabledFeatureTooltip)}>
|
|
380
426
|
{formatMessage(messages.mediaVideo)}
|
|
381
427
|
</CapTooltip>
|
|
382
428
|
),
|
|
@@ -384,6 +430,80 @@ export const Whatsapp = (props) => {
|
|
|
384
430
|
},
|
|
385
431
|
];
|
|
386
432
|
|
|
433
|
+
const onChangeButtonType = ({ target: { value } }) => {
|
|
434
|
+
setButtonType(value);
|
|
435
|
+
setCtadata(INITIAL_CTA_DATA);
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
const updateHandler = (data, index, full) => {
|
|
439
|
+
if (full) {
|
|
440
|
+
setCtadata(data);
|
|
441
|
+
} else {
|
|
442
|
+
setCtadata((prevState) => {
|
|
443
|
+
const clonedCta = cloneDeep(prevState);
|
|
444
|
+
clonedCta[index] = data;
|
|
445
|
+
return clonedCta;
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
const deleteHandler = (index) => {
|
|
451
|
+
setCtadata((prevState) => {
|
|
452
|
+
const clonedCta = cloneDeep(prevState);
|
|
453
|
+
const filteredCta = clonedCta.filter((i) => i.index !== index);
|
|
454
|
+
if(filteredCta.length === 1){
|
|
455
|
+
filteredCta[0].index = 0;
|
|
456
|
+
}
|
|
457
|
+
return filteredCta;
|
|
458
|
+
});
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
const buttonRadioOptions = [
|
|
462
|
+
{
|
|
463
|
+
value: WHATSAPP_BUTTON_TYPES.NONE,
|
|
464
|
+
label: formatMessage(messages.btnTypeNone),
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
value: WHATSAPP_BUTTON_TYPES.CTA,
|
|
468
|
+
label: (
|
|
469
|
+
<>
|
|
470
|
+
<div className="whatsapp-button">
|
|
471
|
+
<CapHeading type="h4">
|
|
472
|
+
{formatMessage(messages.btnTypeCTA)}
|
|
473
|
+
</CapHeading>
|
|
474
|
+
<CapLabel className="whatsapp-cta-desc">
|
|
475
|
+
{formatMessage(messages.ctaDesc)}
|
|
476
|
+
</CapLabel>
|
|
477
|
+
</div>
|
|
478
|
+
{buttonType === WHATSAPP_BUTTON_TYPES.CTA && (
|
|
479
|
+
<CapWhatsappCTA
|
|
480
|
+
ctaData={ctaData}
|
|
481
|
+
updateHandler={updateHandler}
|
|
482
|
+
deleteHandler={deleteHandler}
|
|
483
|
+
/>
|
|
484
|
+
)}
|
|
485
|
+
</>
|
|
486
|
+
),
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
value: WHATSAPP_BUTTON_TYPES.QUICK_REPLY,
|
|
490
|
+
label: (
|
|
491
|
+
<CapTooltip
|
|
492
|
+
placement="bottom"
|
|
493
|
+
title={!isEditFlow && formatMessage(messages.disabledFeatureTooltip)}
|
|
494
|
+
>
|
|
495
|
+
<div className="whatsapp-button">
|
|
496
|
+
<CapHeading type="h4">
|
|
497
|
+
{formatMessage(messages.btnTypeQuickReply)}
|
|
498
|
+
</CapHeading>
|
|
499
|
+
<CapLabel>{formatMessage(messages.quickReplyDesc)}</CapLabel>
|
|
500
|
+
</div>
|
|
501
|
+
</CapTooltip>
|
|
502
|
+
),
|
|
503
|
+
disabled: true,
|
|
504
|
+
},
|
|
505
|
+
];
|
|
506
|
+
|
|
387
507
|
const renderLabel = (value) => (
|
|
388
508
|
<CapHeading type="h4" className="whatsapp-render-heading">
|
|
389
509
|
{formatMessage(messages[value])}
|
|
@@ -414,7 +534,7 @@ export const Whatsapp = (props) => {
|
|
|
414
534
|
|
|
415
535
|
//used by create and edit
|
|
416
536
|
const renderMessageLength = () => (
|
|
417
|
-
<CapHeading type="
|
|
537
|
+
<CapHeading type="label1" className="whatsapp-render-message-length">
|
|
418
538
|
{formatMessage(messages.templateMessageLength, {
|
|
419
539
|
currentLength: isEditFlow
|
|
420
540
|
? updatedSmsEditor?.join('')?.length + UNSUBSCRIBE_TEXT_LENGTH
|
|
@@ -424,6 +544,35 @@ export const Whatsapp = (props) => {
|
|
|
424
544
|
</CapHeading>
|
|
425
545
|
);
|
|
426
546
|
|
|
547
|
+
const renderButtonsSection = () => (
|
|
548
|
+
<>
|
|
549
|
+
<CapHeader
|
|
550
|
+
className="whatsapp-render-heading"
|
|
551
|
+
title={
|
|
552
|
+
<CapRow type="flex">
|
|
553
|
+
<CapHeading type="h4">
|
|
554
|
+
{formatMessage(messages.btnLabel)}
|
|
555
|
+
</CapHeading>
|
|
556
|
+
<CapHeading className="whatsapp-optional-label">
|
|
557
|
+
{formatMessage(messages.optional)}
|
|
558
|
+
</CapHeading>
|
|
559
|
+
</CapRow>
|
|
560
|
+
}
|
|
561
|
+
description={
|
|
562
|
+
<CapLabel type="label3">{formatMessage(messages.btnDesc)}</CapLabel>
|
|
563
|
+
}
|
|
564
|
+
/>
|
|
565
|
+
<CapRadioGroup
|
|
566
|
+
options={buttonRadioOptions || []}
|
|
567
|
+
value={buttonType}
|
|
568
|
+
onChange={onChangeButtonType}
|
|
569
|
+
className={`whatsapp-btn-radio-group ${
|
|
570
|
+
isEditFlow ? 'whatsapp-btn-radio-edit' : ''
|
|
571
|
+
}`}
|
|
572
|
+
/>
|
|
573
|
+
</>
|
|
574
|
+
);
|
|
575
|
+
|
|
427
576
|
const onTemplateNameChange = ({ target: { value } }) => {
|
|
428
577
|
setTemplateName(value);
|
|
429
578
|
templateNameErrorHandler(value);
|
|
@@ -513,15 +662,34 @@ export const Whatsapp = (props) => {
|
|
|
513
662
|
}
|
|
514
663
|
return errorMessage;
|
|
515
664
|
};
|
|
516
|
-
|
|
665
|
+
// prettier-ignore
|
|
517
666
|
const getPayloadContent = () =>
|
|
518
667
|
isEditFlow && !isFullMode
|
|
519
668
|
? `${updatedSmsEditor.join('')}\n${formatMessage(
|
|
520
669
|
messages.templateMessageUnsubscribeText,
|
|
521
670
|
)}`
|
|
522
671
|
: `${templateMessage}\n${formatMessage(messages.modifiedUnsubscribeText, {
|
|
523
|
-
|
|
524
|
-
|
|
672
|
+
value: `{{${addedVarCount + 1}}}`,
|
|
673
|
+
})}`;
|
|
674
|
+
|
|
675
|
+
const getCtaPayload = () =>
|
|
676
|
+
ctaData.map((cta) => {
|
|
677
|
+
const { index, ctaType, text, phone_number, urlType, url } = cta || {};
|
|
678
|
+
if (ctaType === PHONE_NUMBER) {
|
|
679
|
+
return {
|
|
680
|
+
index,
|
|
681
|
+
type: ctaType,
|
|
682
|
+
text,
|
|
683
|
+
phone_number: `+${phone_number}`,
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
return {
|
|
687
|
+
index,
|
|
688
|
+
type: urlType,
|
|
689
|
+
text,
|
|
690
|
+
url,
|
|
691
|
+
};
|
|
692
|
+
});
|
|
525
693
|
|
|
526
694
|
const createPayload = () => ({
|
|
527
695
|
name: templateName,
|
|
@@ -536,6 +704,10 @@ export const Whatsapp = (props) => {
|
|
|
536
704
|
content: getPayloadContent(),
|
|
537
705
|
},
|
|
538
706
|
],
|
|
707
|
+
...(buttonType === WHATSAPP_BUTTON_TYPES.CTA && {
|
|
708
|
+
buttonType,
|
|
709
|
+
buttons: getCtaPayload(),
|
|
710
|
+
}),
|
|
539
711
|
mediaType: WHATSAPP_MEDIA_TYPES.TEXT,
|
|
540
712
|
varMapped: !isFullMode ? varMap : {},
|
|
541
713
|
templateEditor: !isFullMode && tempMsgArray.join(''),
|
|
@@ -609,6 +781,9 @@ export const Whatsapp = (props) => {
|
|
|
609
781
|
if (templateMessage.trim() === '' || templateMessageError) {
|
|
610
782
|
return true;
|
|
611
783
|
}
|
|
784
|
+
if (buttonType === WHATSAPP_BUTTON_TYPES.CTA) {
|
|
785
|
+
return !ctaData.every((i) => i.isSaved === true);
|
|
786
|
+
}
|
|
612
787
|
return false;
|
|
613
788
|
};
|
|
614
789
|
|
|
@@ -659,7 +834,7 @@ export const Whatsapp = (props) => {
|
|
|
659
834
|
onChange={onTemplateLanguageChange}
|
|
660
835
|
value={templateLanguage}
|
|
661
836
|
/>
|
|
662
|
-
{/* template
|
|
837
|
+
{/* template media type */}
|
|
663
838
|
{renderLabel('mediaLabel')}
|
|
664
839
|
<CapRadioGroup
|
|
665
840
|
options={mediaRadioOptions || []}
|
|
@@ -719,6 +894,7 @@ export const Whatsapp = (props) => {
|
|
|
719
894
|
{renderUnsubscribeText()}
|
|
720
895
|
</CapRow>
|
|
721
896
|
{renderMessageLength()}
|
|
897
|
+
{renderButtonsSection()}
|
|
722
898
|
</>
|
|
723
899
|
);
|
|
724
900
|
//create methods end
|
|
@@ -923,6 +1099,15 @@ export const Whatsapp = (props) => {
|
|
|
923
1099
|
|
|
924
1100
|
{renderMessageLength()}
|
|
925
1101
|
{isTagValidationError && tagValidationErrorMessage()}
|
|
1102
|
+
|
|
1103
|
+
<CapTooltip
|
|
1104
|
+
placement="bottom"
|
|
1105
|
+
title={formatMessage(messages.disabledButtonsSection)}
|
|
1106
|
+
>
|
|
1107
|
+
<CapRow className="whatsapp-edit-disabled">
|
|
1108
|
+
{renderButtonsSection()}
|
|
1109
|
+
</CapRow>
|
|
1110
|
+
</CapTooltip>
|
|
926
1111
|
</>
|
|
927
1112
|
);
|
|
928
1113
|
//edit methods end
|
|
@@ -942,7 +1127,12 @@ export const Whatsapp = (props) => {
|
|
|
942
1127
|
return (
|
|
943
1128
|
<TemplatePreview
|
|
944
1129
|
channel={WHATSAPP}
|
|
945
|
-
content={{
|
|
1130
|
+
content={{
|
|
1131
|
+
templateMsg,
|
|
1132
|
+
...(buttonType === WHATSAPP_BUTTON_TYPES.CTA && {
|
|
1133
|
+
ctaData,
|
|
1134
|
+
}),
|
|
1135
|
+
}}
|
|
946
1136
|
whatsappContentLen={
|
|
947
1137
|
isEditFlow ? updatedSmsEditor.join('').length : templateMessage.length
|
|
948
1138
|
}
|
|
@@ -5,53 +5,66 @@
|
|
|
5
5
|
margin-top: $CAP_SPACE_16;
|
|
6
6
|
margin-bottom: 6px;
|
|
7
7
|
}
|
|
8
|
+
|
|
8
9
|
.whatsapp-template-name-desc {
|
|
9
10
|
margin-bottom: 6px;
|
|
10
11
|
}
|
|
12
|
+
|
|
11
13
|
.whatsapp-create-render-unsubscribe-text {
|
|
12
14
|
color: $FONT_COLOR_02;
|
|
13
15
|
margin: $CAP_SPACE_08 0px $CAP_SPACE_08 16px;
|
|
14
16
|
}
|
|
17
|
+
|
|
15
18
|
.whatsapp-edit-render-unsubscribe-text {
|
|
16
19
|
color: $FONT_COLOR_02;
|
|
17
20
|
}
|
|
21
|
+
|
|
18
22
|
.whatsapp-render-message-length {
|
|
19
23
|
text-align: right;
|
|
20
24
|
}
|
|
25
|
+
|
|
21
26
|
.whatsapp-create-template-message-input {
|
|
22
27
|
background-color: $CAP_G10;
|
|
23
28
|
padding-top: $CAP_SPACE_16;
|
|
24
29
|
}
|
|
30
|
+
|
|
25
31
|
.whatsapp-template-message-error {
|
|
26
32
|
margin-left: $CAP_SPACE_16;
|
|
27
33
|
margin-right: $CAP_SPACE_16;
|
|
28
34
|
}
|
|
35
|
+
|
|
29
36
|
.whatsapp-scroll-div {
|
|
30
37
|
margin-bottom: 250px;
|
|
31
38
|
}
|
|
39
|
+
|
|
32
40
|
.whatsapp-edit-alert-margin {
|
|
33
41
|
margin-top: 46px;
|
|
34
42
|
}
|
|
43
|
+
|
|
35
44
|
.whatsapp-edit-template-message-input {
|
|
36
45
|
background-color: $CAP_G10;
|
|
37
46
|
padding: 0 $CAP_SPACE_16;
|
|
38
47
|
}
|
|
48
|
+
|
|
39
49
|
.whatsapp-edit-template-message-heading {
|
|
40
50
|
margin-top: $CAP_SPACE_16;
|
|
41
51
|
margin-bottom: $CAP_SPACE_08;
|
|
42
52
|
overflow: hidden;
|
|
43
53
|
text-overflow: ellipsis;
|
|
44
54
|
}
|
|
55
|
+
|
|
45
56
|
.whatsapp-edit-disabled {
|
|
46
57
|
cursor: not-allowed;
|
|
47
58
|
opacity: 0.4;
|
|
48
59
|
overflow-wrap: anywhere;
|
|
49
60
|
}
|
|
61
|
+
|
|
50
62
|
#whatsapp-create-template-message-input {
|
|
51
63
|
margin-left: $CAP_SPACE_16;
|
|
52
64
|
margin-right: $CAP_SPACE_16;
|
|
53
65
|
width: 95%;
|
|
54
66
|
}
|
|
67
|
+
|
|
55
68
|
#select-whatsapp-category,
|
|
56
69
|
#select-whatsapp-language {
|
|
57
70
|
width: 100%;
|
|
@@ -62,4 +75,32 @@
|
|
|
62
75
|
position: fixed;
|
|
63
76
|
}
|
|
64
77
|
}
|
|
65
|
-
|
|
78
|
+
|
|
79
|
+
.whatsapp-btn-radio-group {
|
|
80
|
+
display: grid;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.whatsapp-btn-radio-group>.ant-radio-wrapper {
|
|
84
|
+
line-height: 45px;
|
|
85
|
+
font-weight: 500;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.whatsapp-btn-radio-edit>label.ant-radio-wrapper.ant-radio-wrapper-disabled {
|
|
89
|
+
margin-top: -32px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.whatsapp-optional-label {
|
|
93
|
+
margin-left: 8px;
|
|
94
|
+
color: $FONT_COLOR_03;
|
|
95
|
+
font-weight: normal;
|
|
96
|
+
font-size: 12px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.whatsapp-button {
|
|
100
|
+
display: inline-grid;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.whatsapp-cta-desc {
|
|
104
|
+
margin-bottom: 17px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -90,8 +90,8 @@ export default defineMessages({
|
|
|
90
90
|
id: `${prefix}.mediaVideo`,
|
|
91
91
|
defaultMessage: 'Video',
|
|
92
92
|
},
|
|
93
|
-
|
|
94
|
-
id: `${prefix}.
|
|
93
|
+
disabledFeatureTooltip: {
|
|
94
|
+
id: `${prefix}.disabledFeatureTooltip`,
|
|
95
95
|
defaultMessage: 'Not yet enabled. Coming soon!',
|
|
96
96
|
},
|
|
97
97
|
templateMessageLabel: {
|
|
@@ -228,6 +228,43 @@ export default defineMessages({
|
|
|
228
228
|
id: `${prefix}.useTwoBracketsOnly`,
|
|
229
229
|
defaultMessage: 'Use two brackets on each side to declare a variable',
|
|
230
230
|
},
|
|
231
|
+
btnLabel: {
|
|
232
|
+
id: `${prefix}.btnLabel`,
|
|
233
|
+
defaultMessage: 'Buttons',
|
|
234
|
+
},
|
|
235
|
+
btnDesc: {
|
|
236
|
+
id: `${prefix}.btnDesc`,
|
|
237
|
+
defaultMessage: 'These will be show clickable buttons below your message.',
|
|
238
|
+
},
|
|
239
|
+
btnTypeNone: {
|
|
240
|
+
id: `${prefix}.btnTypeNone`,
|
|
241
|
+
defaultMessage: 'None',
|
|
242
|
+
},
|
|
243
|
+
btnTypeCTA: {
|
|
244
|
+
id: `${prefix}.btnTypeCTA`,
|
|
245
|
+
defaultMessage: 'Call to action',
|
|
246
|
+
},
|
|
247
|
+
ctaDesc: {
|
|
248
|
+
id: `${prefix}.ctaDesc`,
|
|
249
|
+
defaultMessage: 'Create up to 2 buttons that let customers respond to your messages or take action.',
|
|
250
|
+
},
|
|
251
|
+
btnTypeQuickReply: {
|
|
252
|
+
id: `${prefix}.btnTypeQuickReply`,
|
|
253
|
+
defaultMessage: 'Quik reply',
|
|
254
|
+
},
|
|
255
|
+
quickReplyDesc: {
|
|
256
|
+
id: `${prefix}.quickReplyDesc`,
|
|
257
|
+
defaultMessage: 'Create up to 3 buttons that let customers respond to your messages or take action.',
|
|
258
|
+
},
|
|
259
|
+
optional: {
|
|
260
|
+
id: `${prefix}.optional`,
|
|
261
|
+
defaultMessage: '(Optional)',
|
|
262
|
+
},
|
|
263
|
+
disabledButtonsSection: {
|
|
264
|
+
id: `${prefix}.disabledButtonsSection`,
|
|
265
|
+
defaultMessage: 'Buttons are not editable once template is sent for approval',
|
|
266
|
+
},
|
|
267
|
+
|
|
231
268
|
afrikaans: {
|
|
232
269
|
id: `${prefix}.afrikaans`,
|
|
233
270
|
defaultMessage: 'Afrikaans',
|