@capillarytech/creatives-library 7.12.31 → 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.
Files changed (295) hide show
  1. package/components/Card/tests/index.test.js +10 -12
  2. package/components/FormBuilder/_formBuilder.scss +1 -1
  3. package/components/SlideBox/index.js +0 -1
  4. package/components/SlideBox/tests/index.test.js +2 -2
  5. package/containers/Assets/Gallery/tests/reducer.test.js +2 -1
  6. package/containers/Cap/tests/__snapshots__/index.test.js.snap +1876 -0
  7. package/containers/Cap/tests/index.test.js +16 -10
  8. package/containers/LanguageProvider/tests/index.test.js +5 -1
  9. package/i18n.js +6 -4
  10. package/package.json +4 -1
  11. package/translations/en.json +42 -119
  12. package/translations/zh.json +38 -115
  13. package/utils/test-utils.js +63 -0
  14. package/v2Components/CapActionButton/index.js +54 -48
  15. package/v2Components/CapActionButton/tests/index.test.js +33 -24
  16. package/v2Components/CapWhatsappCTA/constants.js +34 -0
  17. package/v2Components/CapWhatsappCTA/index.js +321 -0
  18. package/v2Components/CapWhatsappCTA/index.scss +64 -0
  19. package/v2Components/CapWhatsappCTA/messages.js +56 -0
  20. package/v2Components/EmailPreviewV2/index.js +1 -1
  21. package/v2Components/EmailPreviewV2/tests/__snapshots__/index.test.js.snap +135 -0
  22. package/v2Components/EmailPreviewV2/tests/index.test.js +8 -2
  23. package/v2Components/FormBuilder/_formBuilder.scss +1 -1
  24. package/v2Components/MarketingObjective/index.js +2 -2
  25. package/v2Components/MarketingObjective/test/index.test.js +33 -0
  26. package/v2Components/SlideBox/tests/index.test.js +2 -2
  27. package/v2Components/TemplatePreview/_templatePreview.scss +8 -0
  28. package/v2Components/TemplatePreview/index.js +29 -2
  29. package/v2Components/TemplatePreview/tests/__snapshots__/index.test.js.snap +1 -1
  30. package/v2Containers/Assets/Gallery/tests/reducer.test.js +2 -1
  31. package/v2Containers/Cap/messages.js +4 -0
  32. package/v2Containers/Cap/tests/__snapshots__/index.test.js.snap +1930 -0
  33. package/v2Containers/Cap/tests/index.test.js +56 -10
  34. package/v2Containers/LanguageProvider/tests/index.test.js +9 -2
  35. package/v2Containers/LanguageProvider/tests/reducer.test.js +5 -1
  36. package/v2Containers/Line/Container/Video/index.js +1 -0
  37. package/v2Containers/Line/Container/Video/tests/index.test.js +62 -0
  38. package/v2Containers/Rcs/index.js +72 -66
  39. package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +2004 -16874
  40. package/v2Containers/Rcs/tests/index.test.js +7 -12
  41. package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +176 -476
  42. package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +336 -952
  43. package/v2Containers/Templates/index.js +10 -5
  44. package/v2Containers/Templates/tests/__snapshots__/index.test.js.snap +499 -419
  45. package/v2Containers/Templates/tests/index.test.js +8 -4
  46. package/v2Containers/Whatsapp/constants.js +22 -5
  47. package/v2Containers/Whatsapp/index.js +199 -9
  48. package/v2Containers/Whatsapp/index.scss +42 -1
  49. package/v2Containers/Whatsapp/messages.js +39 -2
  50. package/v2Containers/Whatsapp/tests/__snapshots__/index.test.js.snap +37677 -5915
  51. package/v2Containers/Whatsapp/utils.js +37 -0
  52. package/v2Containers/mockdata.js +47 -0
  53. package/components/BreadCrumbs/tests/index.test.js +0 -10
  54. package/components/CapTagList/tests/index.test.js +0 -10
  55. package/components/CardGrid/tests/index.test.js +0 -10
  56. package/components/Ckeditor/tests/index.test.js +0 -10
  57. package/components/Component/tests/index.test.js +0 -10
  58. package/components/CustomPopOver/tests/index.test.js +0 -10
  59. package/components/DateFilter/tests/index.test.js +0 -15
  60. package/components/DateRange/tests/index.test.js +0 -10
  61. package/components/Edmeditor/tests/index.test.js +0 -10
  62. package/components/EmailPreview/tests/index.test.js +0 -10
  63. package/components/Footer/tests/index.test.js +0 -10
  64. package/components/FormBuilder/tests/index.test.js +0 -10
  65. package/components/Header/tests/index.test.js +0 -10
  66. package/components/ImagePreview/tests/index.test.js +0 -10
  67. package/components/PageHeader/tests/index.test.js +0 -10
  68. package/components/Pagination/tests/index.test.js +0 -10
  69. package/components/PreviewSideBar/tests/index.test.js +0 -10
  70. package/components/Sidebar/tests/index.test.js +0 -10
  71. package/components/SmsEditor/tests/index.test.js +0 -10
  72. package/components/SmsTest/tests/index.test.js +0 -10
  73. package/components/TemplatePreview/WechatRichmediaTemplatePreview/tests/index.test.js +0 -10
  74. package/components/TemplatePreview/tests/index.test.js +0 -10
  75. package/components/Toastr/tests/index.test.js +0 -10
  76. package/components/ToastrMessage/tests/index.test.js +0 -10
  77. package/components/TopBar/tests/index.test.js +0 -10
  78. package/containers/App/tests/actions.test.js +0 -18
  79. package/containers/App/tests/reducer.test.js +0 -9
  80. package/containers/App/tests/sagas.test.js +0 -15
  81. package/containers/App/tests/selectors.test.js +0 -10
  82. package/containers/Assets/Gallery/tests/index.test.js +0 -10
  83. package/containers/Assets/Gallery/tests/sagas.test.js +0 -15
  84. package/containers/Assets/Gallery/tests/selectors.test.js +0 -10
  85. package/containers/Dashboard/tests/actions.test.js +0 -18
  86. package/containers/Dashboard/tests/index.test.js +0 -10
  87. package/containers/Dashboard/tests/reducer.test.js +0 -9
  88. package/containers/Dashboard/tests/sagas.test.js +0 -15
  89. package/containers/Dashboard/tests/selectors.test.js +0 -10
  90. package/containers/Ebill/tests/actions.test.js +0 -18
  91. package/containers/Ebill/tests/index.test.js +0 -10
  92. package/containers/Ebill/tests/reducer.test.js +0 -9
  93. package/containers/Ebill/tests/sagas.test.js +0 -15
  94. package/containers/Ebill/tests/selectors.test.js +0 -10
  95. package/containers/Email/tests/actions.test.js +0 -18
  96. package/containers/Email/tests/index.test.js +0 -10
  97. package/containers/Email/tests/reducer.test.js +0 -9
  98. package/containers/Email/tests/sagas.test.js +0 -15
  99. package/containers/Email/tests/selectors.test.js +0 -10
  100. package/containers/Line/Edit/tests/actions.test.js +0 -18
  101. package/containers/Line/Edit/tests/index.test.js +0 -10
  102. package/containers/Line/Edit/tests/reducer.test.js +0 -9
  103. package/containers/Line/Edit/tests/sagas.test.js +0 -15
  104. package/containers/Line/Edit/tests/selectors.test.js +0 -10
  105. package/containers/Login/components/LoginForm/tests/index.test.js +0 -10
  106. package/containers/Login/tests/index.test.js +0 -10
  107. package/containers/Login/tests/sagas.test.js +0 -15
  108. package/containers/Login/tests/selectors.test.js +0 -10
  109. package/containers/MobilePush/Create/tests/actions.test.js +0 -18
  110. package/containers/MobilePush/Create/tests/index.test.js +0 -10
  111. package/containers/MobilePush/Create/tests/reducer.test.js +0 -9
  112. package/containers/MobilePush/Create/tests/sagas.test.js +0 -15
  113. package/containers/MobilePush/Create/tests/selectors.test.js +0 -10
  114. package/containers/MobilePush/Edit/tests/actions.test.js +0 -18
  115. package/containers/MobilePush/Edit/tests/index.test.js +0 -10
  116. package/containers/MobilePush/Edit/tests/reducer.test.js +0 -9
  117. package/containers/MobilePush/Edit/tests/sagas.test.js +0 -15
  118. package/containers/MobilePush/Edit/tests/selectors.test.js +0 -10
  119. package/containers/Sms/Create/tests/actions.test.js +0 -18
  120. package/containers/Sms/Create/tests/index.test.js +0 -10
  121. package/containers/Sms/Create/tests/reducer.test.js +0 -9
  122. package/containers/Sms/Create/tests/sagas.test.js +0 -15
  123. package/containers/Sms/Create/tests/selectors.test.js +0 -10
  124. package/containers/Sms/Edit/tests/actions.test.js +0 -18
  125. package/containers/Sms/Edit/tests/index.test.js +0 -10
  126. package/containers/Sms/Edit/tests/reducer.test.js +0 -9
  127. package/containers/Sms/Edit/tests/sagas.test.js +0 -15
  128. package/containers/Sms/Edit/tests/selectors.test.js +0 -10
  129. package/containers/TagList/tests/actions.test.js +0 -18
  130. package/containers/TagList/tests/index.test.js +0 -10
  131. package/containers/TagList/tests/reducer.test.js +0 -9
  132. package/containers/TagList/tests/sagas.test.js +0 -15
  133. package/containers/TagList/tests/selectors.test.js +0 -10
  134. package/containers/Templates/tests/actions.test.js +0 -18
  135. package/containers/Templates/tests/index.test.js +0 -10
  136. package/containers/Templates/tests/reducer.test.js +0 -9
  137. package/containers/Templates/tests/sagas.test.js +0 -15
  138. package/containers/Templates/tests/selectors.test.js +0 -10
  139. package/containers/Testv2/tests/actions.test.js +0 -18
  140. package/containers/Testv2/tests/index.test.js +0 -10
  141. package/containers/Testv2/tests/reducer.test.js +0 -9
  142. package/containers/Testv2/tests/sagas.test.js +0 -15
  143. package/containers/Testv2/tests/selectors.test.js +0 -10
  144. package/containers/WeChat/MapTemplates/tests/actions.test.js +0 -18
  145. package/containers/WeChat/MapTemplates/tests/index.test.js +0 -10
  146. package/containers/WeChat/MapTemplates/tests/reducer.test.js +0 -9
  147. package/containers/WeChat/MapTemplates/tests/sagas.test.js +0 -15
  148. package/containers/WeChat/MapTemplates/tests/selectors.test.js +0 -10
  149. package/containers/WeChat/RichmediaTemplates/Create/tests/actions.test.js +0 -18
  150. package/containers/WeChat/RichmediaTemplates/Create/tests/index.test.js +0 -10
  151. package/containers/WeChat/RichmediaTemplates/Create/tests/reducer.test.js +0 -9
  152. package/containers/WeChat/RichmediaTemplates/Create/tests/sagas.test.js +0 -15
  153. package/containers/WeChat/RichmediaTemplates/Create/tests/selectors.test.js +0 -10
  154. package/containers/WeChat/RichmediaTemplates/Edit/tests/actions.test.js +0 -18
  155. package/containers/WeChat/RichmediaTemplates/Edit/tests/index.test.js +0 -10
  156. package/containers/WeChat/RichmediaTemplates/Edit/tests/reducer.test.js +0 -9
  157. package/containers/WeChat/RichmediaTemplates/Edit/tests/sagas.test.js +0 -15
  158. package/containers/WeChat/RichmediaTemplates/Edit/tests/selectors.test.js +0 -10
  159. package/containers/WeChat/RichmediaTemplates/View/tests/actions.test.js +0 -18
  160. package/containers/WeChat/RichmediaTemplates/View/tests/index.test.js +0 -10
  161. package/containers/WeChat/RichmediaTemplates/View/tests/reducer.test.js +0 -9
  162. package/containers/WeChat/RichmediaTemplates/View/tests/sagas.test.js +0 -15
  163. package/containers/WeChat/RichmediaTemplates/View/tests/selectors.test.js +0 -10
  164. package/gtm/tests/events.test.js +0 -3
  165. package/v2Components/BreadCrumbs/tests/index.test.js +0 -10
  166. package/v2Components/CapActionButton/tests/__snapshots__/index.test.js.snap +0 -151
  167. package/v2Components/CapTagList/tests/index.test.js +0 -10
  168. package/v2Components/Card/tests/index.test.js +0 -10
  169. package/v2Components/CardGrid/tests/index.test.js +0 -10
  170. package/v2Components/Ckeditor/tests/index.test.js +0 -10
  171. package/v2Components/CmsTemplatesComponent/tests/index.test.js +0 -10
  172. package/v2Components/Component/tests/index.test.js +0 -10
  173. package/v2Components/CustomPopOver/tests/index.test.js +0 -10
  174. package/v2Components/Edmeditor/tests/index.test.js +0 -10
  175. package/v2Components/EmailPreview/tests/index.test.js +0 -10
  176. package/v2Components/Footer/tests/index.test.js +0 -10
  177. package/v2Components/FormBuilder/tests/index.test.js +0 -10
  178. package/v2Components/ImagePreview/tests/index.test.js +0 -10
  179. package/v2Components/MobilePushPreviewV2/tests/index.test.js +0 -10
  180. package/v2Components/NavigationBar/tests/index.test.js +0 -11
  181. package/v2Components/NewCallTask/tests/index.test.js +0 -10
  182. package/v2Components/Pagination/tests/index.test.js +0 -10
  183. package/v2Components/PreviewSideBar/tests/index.test.js +0 -10
  184. package/v2Components/SmsTest/tests/index.test.js +0 -10
  185. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/tests/index.test.js +0 -10
  186. package/v2Components/Toastr/tests/index.test.js +0 -10
  187. package/v2Components/ToastrMessage/tests/index.test.js +0 -10
  188. package/v2Components/TopBar/tests/index.test.js +0 -10
  189. package/v2Containers/App/tests/actions.test.js +0 -18
  190. package/v2Containers/App/tests/reducer.test.js +0 -9
  191. package/v2Containers/App/tests/sagas.test.js +0 -15
  192. package/v2Containers/App/tests/selectors.test.js +0 -10
  193. package/v2Containers/Assets/Gallery/tests/index.test.js +0 -10
  194. package/v2Containers/Assets/Gallery/tests/sagas.test.js +0 -15
  195. package/v2Containers/Assets/Gallery/tests/selectors.test.js +0 -10
  196. package/v2Containers/BeeEditor/tests/index.test.js +0 -10
  197. package/v2Containers/CallTask/tests/actions.test.js +0 -18
  198. package/v2Containers/CallTask/tests/index.test.js +0 -10
  199. package/v2Containers/CallTask/tests/reducer.test.js +0 -9
  200. package/v2Containers/CallTask/tests/sagas.test.js +0 -15
  201. package/v2Containers/CallTask/tests/selectors.test.js +0 -10
  202. package/v2Containers/ChannelTemplates/tests/actions.test.js +0 -18
  203. package/v2Containers/ChannelTemplates/tests/index.test.js +0 -10
  204. package/v2Containers/ChannelTemplates/tests/reducer.test.js +0 -9
  205. package/v2Containers/ChannelTemplates/tests/sagas.test.js +0 -15
  206. package/v2Containers/ChannelTemplates/tests/selectors.test.js +0 -10
  207. package/v2Containers/CreativesContainer/tests/actions.test.js +0 -18
  208. package/v2Containers/CreativesContainer/tests/reducer.test.js +0 -9
  209. package/v2Containers/CreativesContainer/tests/sagas.test.js +0 -15
  210. package/v2Containers/CreativesContainer/tests/selectors.test.js +0 -10
  211. package/v2Containers/Dashboard/tests/actions.test.js +0 -18
  212. package/v2Containers/Dashboard/tests/index.test.js +0 -10
  213. package/v2Containers/Dashboard/tests/reducer.test.js +0 -9
  214. package/v2Containers/Dashboard/tests/sagas.test.js +0 -15
  215. package/v2Containers/Dashboard/tests/selectors.test.js +0 -10
  216. package/v2Containers/Ebill/tests/actions.test.js +0 -18
  217. package/v2Containers/Ebill/tests/index.test.js +0 -10
  218. package/v2Containers/Ebill/tests/reducer.test.js +0 -9
  219. package/v2Containers/Ebill/tests/sagas.test.js +0 -15
  220. package/v2Containers/Ebill/tests/selectors.test.js +0 -10
  221. package/v2Containers/Email/tests/actions.test.js +0 -18
  222. package/v2Containers/Email/tests/index.test.js +0 -10
  223. package/v2Containers/Email/tests/reducer.test.js +0 -9
  224. package/v2Containers/Email/tests/sagas.test.js +0 -15
  225. package/v2Containers/Email/tests/selectors.test.js +0 -10
  226. package/v2Containers/EmailWrapper/tests/actions.test.js +0 -18
  227. package/v2Containers/EmailWrapper/tests/index.test.js +0 -10
  228. package/v2Containers/EmailWrapper/tests/reducer.test.js +0 -9
  229. package/v2Containers/EmailWrapper/tests/sagas.test.js +0 -15
  230. package/v2Containers/EmailWrapper/tests/selectors.test.js +0 -10
  231. package/v2Containers/Login/components/LoginForm/tests/index.test.js +0 -10
  232. package/v2Containers/Login/tests/index.test.js +0 -10
  233. package/v2Containers/Login/tests/sagas.test.js +0 -15
  234. package/v2Containers/Login/tests/selectors.test.js +0 -10
  235. package/v2Containers/MobilePush/Create/tests/actions.test.js +0 -18
  236. package/v2Containers/MobilePush/Create/tests/index.test.js +0 -10
  237. package/v2Containers/MobilePush/Create/tests/reducer.test.js +0 -9
  238. package/v2Containers/MobilePush/Create/tests/sagas.test.js +0 -15
  239. package/v2Containers/MobilePush/Create/tests/selectors.test.js +0 -10
  240. package/v2Containers/MobilePush/Edit/tests/actions.test.js +0 -18
  241. package/v2Containers/MobilePush/Edit/tests/index.test.js +0 -10
  242. package/v2Containers/MobilePush/Edit/tests/reducer.test.js +0 -9
  243. package/v2Containers/MobilePush/Edit/tests/sagas.test.js +0 -15
  244. package/v2Containers/MobilePush/Edit/tests/selectors.test.js +0 -10
  245. package/v2Containers/MobilepushWrapper/tests/index.test.js +0 -10
  246. package/v2Containers/Sms/Create/tests/actions.test.js +0 -18
  247. package/v2Containers/Sms/Create/tests/index.test.js +0 -10
  248. package/v2Containers/Sms/Create/tests/reducer.test.js +0 -9
  249. package/v2Containers/Sms/Create/tests/sagas.test.js +0 -15
  250. package/v2Containers/Sms/Create/tests/selectors.test.js +0 -10
  251. package/v2Containers/Sms/Edit/tests/actions.test.js +0 -18
  252. package/v2Containers/Sms/Edit/tests/index.test.js +0 -10
  253. package/v2Containers/Sms/Edit/tests/reducer.test.js +0 -9
  254. package/v2Containers/Sms/Edit/tests/sagas.test.js +0 -15
  255. package/v2Containers/Sms/Edit/tests/selectors.test.js +0 -10
  256. package/v2Containers/SmsWrapper/tests/index.test.js +0 -10
  257. package/v2Containers/TagList/tests/actions.test.js +0 -18
  258. package/v2Containers/TagList/tests/index.test.js +0 -10
  259. package/v2Containers/TagList/tests/reducer.test.js +0 -9
  260. package/v2Containers/TagList/tests/sagas.test.js +0 -15
  261. package/v2Containers/TagList/tests/selectors.test.js +0 -10
  262. package/v2Containers/Templates/tests/actions.test.js +0 -18
  263. package/v2Containers/Templates/tests/reducer.test.js +0 -9
  264. package/v2Containers/Templates/tests/sagas.test.js +0 -15
  265. package/v2Containers/Templates/tests/selectors.test.js +0 -10
  266. package/v2Containers/TemplatesV2/tests/actions.test.js +0 -18
  267. package/v2Containers/TemplatesV2/tests/index.test.js +0 -10
  268. package/v2Containers/TemplatesV2/tests/reducer.test.js +0 -9
  269. package/v2Containers/TemplatesV2/tests/sagas.test.js +0 -15
  270. package/v2Containers/TemplatesV2/tests/selectors.test.js +0 -10
  271. package/v2Containers/Testv2/tests/actions.test.js +0 -18
  272. package/v2Containers/Testv2/tests/index.test.js +0 -10
  273. package/v2Containers/Testv2/tests/reducer.test.js +0 -9
  274. package/v2Containers/Testv2/tests/sagas.test.js +0 -15
  275. package/v2Containers/Testv2/tests/selectors.test.js +0 -10
  276. package/v2Containers/WeChat/MapTemplates/tests/actions.test.js +0 -18
  277. package/v2Containers/WeChat/MapTemplates/tests/index.test.js +0 -10
  278. package/v2Containers/WeChat/MapTemplates/tests/reducer.test.js +0 -9
  279. package/v2Containers/WeChat/MapTemplates/tests/sagas.test.js +0 -15
  280. package/v2Containers/WeChat/MapTemplates/tests/selectors.test.js +0 -10
  281. package/v2Containers/WeChat/RichmediaTemplates/Create/tests/actions.test.js +0 -18
  282. package/v2Containers/WeChat/RichmediaTemplates/Create/tests/index.test.js +0 -10
  283. package/v2Containers/WeChat/RichmediaTemplates/Create/tests/reducer.test.js +0 -9
  284. package/v2Containers/WeChat/RichmediaTemplates/Create/tests/sagas.test.js +0 -15
  285. package/v2Containers/WeChat/RichmediaTemplates/Create/tests/selectors.test.js +0 -10
  286. package/v2Containers/WeChat/RichmediaTemplates/Edit/tests/actions.test.js +0 -18
  287. package/v2Containers/WeChat/RichmediaTemplates/Edit/tests/index.test.js +0 -10
  288. package/v2Containers/WeChat/RichmediaTemplates/Edit/tests/reducer.test.js +0 -9
  289. package/v2Containers/WeChat/RichmediaTemplates/Edit/tests/sagas.test.js +0 -15
  290. package/v2Containers/WeChat/RichmediaTemplates/Edit/tests/selectors.test.js +0 -10
  291. package/v2Containers/WeChat/RichmediaTemplates/View/tests/actions.test.js +0 -18
  292. package/v2Containers/WeChat/RichmediaTemplates/View/tests/index.test.js +0 -10
  293. package/v2Containers/WeChat/RichmediaTemplates/View/tests/reducer.test.js +0 -9
  294. package/v2Containers/WeChat/RichmediaTemplates/View/tests/sagas.test.js +0 -15
  295. package/v2Containers/WeChat/RichmediaTemplates/View/tests/selectors.test.js +0 -10
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  import CapLabel from '@capillarytech/cap-ui-library/CapLabel';
3
+ import CapIcon from '@capillarytech/cap-ui-library/CapIcon';
4
+ import { get } from 'lodash';
3
5
  import { WHATSAPP } from '../CreativesContainer/constants';
4
6
  import {
5
7
  STATUS_OPTIONS,
@@ -15,6 +17,8 @@ export const getWhatsappContent = (template, isPreview) => {
15
17
  content: {
16
18
  [WHATSAPP.toLowerCase()]: {
17
19
  languages = [{}],
20
+ buttonType = 'NONE',
21
+ buttons : ctaData = [],
18
22
  } = {},
19
23
  } = {},
20
24
  } = {},
@@ -41,9 +45,42 @@ export const getWhatsappContent = (template, isPreview) => {
41
45
  </>
42
46
  ),
43
47
  charCount: text?.length - 1,
48
+ ...(buttonType === 'CTA' && {
49
+ ctaData,
50
+ }),
44
51
  };
45
52
  }
46
53
 
54
+ export const getWhatsappCta = (template) => {
55
+ const { buttonType = 'NONE', buttons = [] } = get(
56
+ template,
57
+ `versions.base.content.whatsapp`,
58
+ {},
59
+ );
60
+ const renderArray = [];
61
+ if (buttonType === 'CTA' && buttons?.length) {
62
+ buttons.forEach((cta) => {
63
+ const { type, text } = cta || {};
64
+ if (text) {
65
+ renderArray.push(
66
+ <CapLabel
67
+ type="label21"
68
+ style={{ textAlign: 'center', marginTop: '12px' }}
69
+ >
70
+ <CapIcon
71
+ type={type === 'PHONE_NUMBER' ? 'call' : 'launch'}
72
+ size="xs"
73
+ svgProps={{ style: { marginRight: '4px' } }}
74
+ />
75
+ {text}
76
+ </CapLabel>,
77
+ );
78
+ }
79
+ });
80
+ }
81
+ return renderArray;
82
+ };
83
+
47
84
  export const getWhatsappCategory = (category) => {
48
85
  return CATEGORY_OPTIONS.find((obj) => obj.value === category);
49
86
  }
@@ -1201,6 +1201,53 @@ export default {
1201
1201
  modeType: undefined,
1202
1202
  type: 'WHATSAPP',
1203
1203
  whatsappTemplateCategory: '',
1204
+ whatsappTemplateLanguageCode: "",
1204
1205
  whatsappTemplateName: '',
1205
1206
  },
1207
+ location: {
1208
+ pathname:
1209
+ '/creatives/ui/v2',
1210
+ search: '',
1211
+ hash: '',
1212
+ key: 'm54f43',
1213
+ },
1214
+ match: {
1215
+ path: '/creatives/ui/v2',
1216
+ url: '/creatives/ui/v2',
1217
+ isExact: true,
1218
+ params: {
1219
+ },
1220
+ },
1221
+ capGlobal: {
1222
+ fetching_userdata: false,
1223
+ orgID: 1001,
1224
+ user: {
1225
+ proxyOrgList: [
1226
+ {
1227
+ orgID: 1001,
1228
+ orgName: 'org1',
1229
+ },
1230
+ {
1231
+ orgID: 1002,
1232
+ orgName: 'org2',
1233
+ },
1234
+ ],
1235
+ attributes: {
1236
+ USERNAME: {
1237
+ value: 'capUser',
1238
+ },
1239
+ EMAIL: {
1240
+ value: 'capUser@capillary.com',
1241
+ },
1242
+ },
1243
+ refID: 101,
1244
+ orgName: 'org1',
1245
+ orgID: '1001',
1246
+ },
1247
+ isLoggedIn: true,
1248
+ currentOrgDetails: {},
1249
+ },
1250
+ language: {
1251
+ localeLoading: false,
1252
+ },
1206
1253
  };
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import BreadCrumbs from '../index';
5
-
6
- // describe('<BreadCrumbs />', () => {
7
- // it('Expect to have unit tests specified', () => {
8
- // expect(true).toEqual(false);
9
- // });
10
- // });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import CapTagList from '../index';
5
-
6
- describe('<CapTagList />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import CardGrid from '../index';
5
-
6
- describe('<CardGrid />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import Ckeditor from '../index';
5
-
6
- describe('<Ckeditor />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import Component from '../index';
5
-
6
- // describe('<Component />', () => {
7
- // it('Expect to have unit tests specified', () => {
8
- // expect(true).toEqual(false);
9
- // });
10
- // });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import CustomPopOver from '../index';
5
-
6
- describe('<CustomPopOver />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,15 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
- //
4
- // import moment from 'moment';
5
- // import DateFilter from '../index';
6
-
7
- // describe('<DateFilter />', () => {
8
- // it('Expect to have unit tests specified', () => {
9
- // expect(true).toEqual(false);
10
- // });
11
- // it('Expect to have selectDateRange Prop', () => {
12
- // const wrapper = shallow(<DateFilter selectedDateRange={moment()} />);
13
- // expect(wrapper.props().selectedDateRange).toEqual(moment());
14
- // });
15
- // });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import DateRange from '../index';
5
-
6
- // describe('<DateRange />', () => {
7
- // it('Expect to have unit tests specified', () => {
8
- // expect(true).toEqual(false);
9
- // });
10
- // });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import Edmeditor from '../index';
5
-
6
- describe('<Edmeditor />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import EmailPreview from '../index';
5
-
6
- describe('<EmailPreview />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import Footer from '../index';
5
-
6
- // describe('<Footer />', () => {
7
- // it('Expect to have unit tests specified', () => {
8
- // expect(true).toEqual(false);
9
- // });
10
- // });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import FormBuilder from '../index';
5
-
6
- // describe('<FormBuilder />', () => {
7
- // it('Expect to have unit tests specified', () => {
8
- // expect(true).toEqual(false);
9
- // });
10
- // });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import Header from '../index';
5
-
6
- describe('<Header />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import ImagePreview from '../index';
5
-
6
- describe('<ImagePreview />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import PageHeader from '../index';
5
-
6
- // describe('<PageHeader />', () => {
7
- // it('Expect to have unit tests specified', () => {
8
- // expect(true).toEqual(false);
9
- // });
10
- // });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import Pagination from '../index';
5
-
6
- describe('<Pagination />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import PreviewSideBar from '../index';
5
-
6
- describe('<PreviewSideBar />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import Sidebar from '../index';
5
-
6
- // describe('<Sidebar />', () => {
7
- // it('Expect to have unit tests specified', () => {
8
- // expect(true).toEqual(false);
9
- // });
10
- // });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import SmsEditor from '../index';
5
-
6
- // describe('<SmsEditor />', () => {
7
- // it('Expect to have unit tests specified', () => {
8
- // expect(true).toEqual(false);
9
- // });
10
- // });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import SmsTest from '../index';
5
-
6
- // describe('<SmsTest />', () => {
7
- // it('Expect to have unit tests specified', () => {
8
- // expect(true).toEqual(false);
9
- // });
10
- // });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import WechatRichmediaTemplatePreview from '../index';
5
-
6
- describe('<WechatRichmediaTemplatePreview />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import TemplatePreview from '../index';
5
-
6
- describe('<TemplatePreview />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import Toastr from '../index';
5
-
6
- // describe('<Toastr />', () => {
7
- // it('Expect to have unit tests specified', () => {
8
- // expect(true).toEqual(false);
9
- // });
10
- // });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import ToastrMessage from '../index';
5
-
6
- // describe('<ToastrMessage />', () => {
7
- // it('Expect to have unit tests specified', () => {
8
- // expect(true).toEqual(false);
9
- // });
10
- // });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import TopBar from '../index';
5
-
6
- // describe('<TopBar />', () => {
7
- // it('Expect to have unit tests specified', () => {
8
- // expect(true).toEqual(false);
9
- // });
10
- // });
@@ -1,18 +0,0 @@
1
-
2
- import {
3
- defaultAction,
4
- } from '../actions';
5
- import {
6
- DEFAULT_ACTION,
7
- } from '../constants';
8
-
9
- describe('Cap actions', () => {
10
- describe('Default Action', () => {
11
- it('has a type of DEFAULT_ACTION', () => {
12
- const expected = {
13
- type: DEFAULT_ACTION,
14
- };
15
- expect(defaultAction()).toEqual(expected);
16
- });
17
- });
18
- });
@@ -1,9 +0,0 @@
1
-
2
- import { fromJS } from 'immutable';
3
- import capReducer from '../reducer';
4
-
5
- describe('capReducer', () => {
6
- it('returns the initial state', () => {
7
- expect(capReducer(undefined, {})).toEqual(fromJS({}));
8
- });
9
- });
@@ -1,15 +0,0 @@
1
- /**
2
- * Test sagas
3
- */
4
-
5
- /* eslint-disable redux-saga/yield-effects */
6
- // import { take, call, put, select } from 'redux-saga/effects';
7
- // import { defaultSaga } from '../sagas';
8
-
9
- // const generator = defaultSaga();
10
-
11
- describe('defaultSaga Saga', () => {
12
- it('Expect to have unit tests specified', () => {
13
- expect(true).toEqual(false);
14
- });
15
- });
@@ -1,10 +0,0 @@
1
- // import { fromJS } from 'immutable';
2
- // import { makeSelectCapDomain } from '../selectors';
3
-
4
- // const selector = makeSelectCapDomain();
5
-
6
- describe('makeSelectCapDomain', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import { Gallery } from '../index';
5
-
6
- describe('<Gallery />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,15 +0,0 @@
1
- /**
2
- * Test sagas
3
- */
4
-
5
- /* eslint-disable redux-saga/yield-effects */
6
- // import { take, call, put, select } from 'redux-saga/effects';
7
- // import { defaultSaga } from '../sagas';
8
-
9
- // const generator = defaultSaga();
10
-
11
- describe('defaultSaga Saga', () => {
12
- it('Expect to have unit tests specified', () => {
13
- expect(true).toEqual(false);
14
- });
15
- });
@@ -1,10 +0,0 @@
1
- // import { fromJS } from 'immutable';
2
- // import { makeSelectGalleryDomain } from '../selectors';
3
-
4
- // const selector = makeSelectGalleryDomain();
5
-
6
- describe('makeSelectGalleryDomain', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,18 +0,0 @@
1
-
2
- import {
3
- defaultAction,
4
- } from '../actions';
5
- import {
6
- DEFAULT_ACTION,
7
- } from '../constants';
8
-
9
- describe('Dashboard actions', () => {
10
- describe('Default Action', () => {
11
- it('has a type of DEFAULT_ACTION', () => {
12
- const expected = {
13
- type: DEFAULT_ACTION,
14
- };
15
- expect(defaultAction()).toEqual(expected);
16
- });
17
- });
18
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import { Dashboard } from '../index';
5
-
6
- describe('<Dashboard />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,9 +0,0 @@
1
-
2
- import { fromJS } from 'immutable';
3
- import dashboardReducer from '../reducer';
4
-
5
- describe('dashboardReducer', () => {
6
- it('returns the initial state', () => {
7
- expect(dashboardReducer(undefined, {})).toEqual(fromJS({}));
8
- });
9
- });
@@ -1,15 +0,0 @@
1
- /**
2
- * Test sagas
3
- */
4
-
5
- /* eslint-disable redux-saga/yield-effects */
6
- // import { take, call, put, select } from 'redux-saga/effects';
7
- // import { defaultSaga } from '../sagas';
8
-
9
- // const generator = defaultSaga();
10
-
11
- describe('defaultSaga Saga', () => {
12
- it('Expect to have unit tests specified', () => {
13
- expect(true).toEqual(false);
14
- });
15
- });
@@ -1,10 +0,0 @@
1
- // import { fromJS } from 'immutable';
2
- // import { makeSelectDashboardDomain } from '../selectors';
3
-
4
- // const selector = makeSelectDashboardDomain();
5
-
6
- describe('makeSelectDashboardDomain', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,18 +0,0 @@
1
-
2
- import {
3
- defaultAction,
4
- } from '../actions';
5
- import {
6
- DEFAULT_ACTION,
7
- } from '../constants';
8
-
9
- describe('Ebill actions', () => {
10
- describe('Default Action', () => {
11
- it('has a type of DEFAULT_ACTION', () => {
12
- const expected = {
13
- type: DEFAULT_ACTION,
14
- };
15
- expect(defaultAction()).toEqual(expected);
16
- });
17
- });
18
- });
@@ -1,10 +0,0 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import { Ebill } from '../index';
5
-
6
- describe('<Ebill />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
@@ -1,9 +0,0 @@
1
-
2
- import { fromJS } from 'immutable';
3
- import ebillReducer from '../reducer';
4
-
5
- describe('ebillReducer', () => {
6
- it('returns the initial state', () => {
7
- expect(ebillReducer(undefined, {})).toEqual(fromJS({}));
8
- });
9
- });
@@ -1,15 +0,0 @@
1
- /**
2
- * Test sagas
3
- */
4
-
5
- /* eslint-disable redux-saga/yield-effects */
6
- // import { take, call, put, select } from 'redux-saga/effects';
7
- // import { defaultSaga } from '../sagas';
8
-
9
- // const generator = defaultSaga();
10
-
11
- describe('defaultSaga Saga', () => {
12
- it('Expect to have unit tests specified', () => {
13
- expect(true).toEqual(false);
14
- });
15
- });
@@ -1,10 +0,0 @@
1
- // import { fromJS } from 'immutable';
2
- // import { makeSelectEbillDomain } from '../selectors';
3
-
4
- // const selector = makeSelectEbillDomain();
5
-
6
- describe('makeSelectEbillDomain', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });