@capillarytech/creatives-library 8.0.159-alpha.1 → 8.0.159

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 (305) hide show
  1. package/constants/unified.js +189 -0
  2. package/index.js +4 -2
  3. package/package.json +1 -1
  4. package/routes.js +136 -202
  5. package/services/getSchema.js +1 -1
  6. package/services/localStorageApi.js +1 -0
  7. package/tests/i18n.test.js +1 -1
  8. package/utils/authWrapper.js +1 -1
  9. package/utils/common.js +2 -2
  10. package/utils/tagValidations.js +1 -1
  11. package/utils/tests/authWrapper.test.js +1 -1
  12. package/utils/tests/checkStore.test.js +1 -1
  13. package/utils/tests/customAuth.test.js +1 -1
  14. package/utils/transformerUtils.js +1 -1
  15. package/v2Components/CapTagList/index.js +9 -14
  16. package/v2Components/Carousel/style.scss +1 -1
  17. package/v2Components/CustomerSearchSection/index.js +79 -83
  18. package/v2Components/EmailMobilePreview/index.js +2 -2
  19. package/v2Components/EmailPreview/_emailPreview.scss +0 -1
  20. package/v2Components/EmailPreviewV2/_emailPreviewV2.scss +0 -1
  21. package/v2Components/FormBuilder/index.js +55 -80
  22. package/v2Components/TemplatePreview/index.js +2 -1
  23. package/v2Components/TestAndPreviewSlidebox/PreviewSection.js +1 -1
  24. package/v2Components/TestAndPreviewSlidebox/_testAndPreviewSlidebox.scss +1 -2
  25. package/v2Components/TestAndPreviewSlidebox/index.js +14 -187
  26. package/v2Components/TestAndPreviewSlidebox/tests/PreviewSection.test.js +1 -1
  27. package/v2Containers/Cap/tests/saga.test.js +1 -1
  28. package/v2Containers/CreativesContainer/SlideBoxContent.js +3 -11
  29. package/v2Containers/CreativesContainer/index.js +15 -30
  30. package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +0 -5
  31. package/v2Containers/Email/index.js +29 -151
  32. package/v2Containers/EmailWrapper/hooks/useEmailWrapper.js +0 -3
  33. package/v2Containers/EmailWrapper/index.js +0 -6
  34. package/v2Containers/FTP/index.js +1 -1
  35. package/v2Containers/Line/Container/Text/index.js +1 -1
  36. package/v2Containers/Sms/Create/index.js +1 -1
  37. package/v2Containers/Sms/Edit/index.js +1 -1
  38. package/v2Containers/TagList/index.js +1 -1
  39. package/v2Containers/TagList/utils.js +1 -1
  40. package/v2Containers/Templates/index.js +1 -1
  41. package/v2Containers/Templates/sagas.js +1 -1
  42. package/components/BreadCrumbs/index.js +0 -65
  43. package/components/BreadCrumbs/messages.js +0 -13
  44. package/components/CapTagList/index.js +0 -235
  45. package/components/CapTagList/messages.js +0 -45
  46. package/components/Card/_customCard.scss +0 -40
  47. package/components/Card/index.js +0 -78
  48. package/components/Card/tests/__snapshots__/index.test.js.snap +0 -22
  49. package/components/Card/tests/index.test.js +0 -20
  50. package/components/CardGrid/index.js +0 -71
  51. package/components/Ckeditor/index.js +0 -238
  52. package/components/Ckeditor/messages.js +0 -13
  53. package/components/Ckeditor/style.scss +0 -3
  54. package/components/Component/index.js +0 -29
  55. package/components/CustomPopOver/index.js +0 -81
  56. package/components/CustomPopOver/messages.js +0 -17
  57. package/components/DateFilter/index.js +0 -349
  58. package/components/DateFilter/messages.js +0 -57
  59. package/components/DateRange/index.js +0 -114
  60. package/components/DateRange/messages.js +0 -25
  61. package/components/Edmeditor/index.js +0 -65
  62. package/components/Edmeditor/messages.js +0 -13
  63. package/components/EmailPreview/_emailPreview.scss +0 -119
  64. package/components/EmailPreview/assets/images/iPad.svg +0 -10
  65. package/components/EmailPreview/assets/images/mobile.png +0 -0
  66. package/components/EmailPreview/index.js +0 -107
  67. package/components/EmailPreview/messages.js +0 -33
  68. package/components/Footer/index.js +0 -27
  69. package/components/Footer/messages.js +0 -13
  70. package/components/FormBuilder/_formBuilder.scss +0 -83
  71. package/components/FormBuilder/index.js +0 -3279
  72. package/components/FormBuilder/messages.js +0 -61
  73. package/components/Header/index.js +0 -44
  74. package/components/Header/messages.js +0 -29
  75. package/components/ImagePreview/_imagePreview.scss +0 -63
  76. package/components/ImagePreview/index.js +0 -52
  77. package/components/ImagePreview/messages.js +0 -17
  78. package/components/PageHeader/_pageHeader.scss +0 -22
  79. package/components/PageHeader/index.js +0 -37
  80. package/components/PageHeader/messages.js +0 -13
  81. package/components/Pagination/_pagination.scss +0 -5
  82. package/components/Pagination/index.js +0 -49
  83. package/components/PreviewSideBar/_previewsidebar.scss +0 -28
  84. package/components/PreviewSideBar/index.js +0 -152
  85. package/components/PreviewSideBar/messages.js +0 -41
  86. package/components/Sidebar/_sidebar.scss +0 -115
  87. package/components/Sidebar/index.js +0 -214
  88. package/components/Sidebar/messages.js +0 -21
  89. package/components/SlideBox/_slideBox.scss +0 -63
  90. package/components/SlideBox/index.js +0 -47
  91. package/components/SlideBox/tests/index.test.js +0 -103
  92. package/components/SmsEditor/index.js +0 -55
  93. package/components/SmsTest/index.js +0 -117
  94. package/components/SmsTest/messages.js +0 -21
  95. package/components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +0 -42
  96. package/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +0 -141
  97. package/components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +0 -21
  98. package/components/TemplatePreview/_templatePreview.scss +0 -642
  99. package/components/TemplatePreview/assets/images/WECHAT_5x.png +0 -0
  100. package/components/TemplatePreview/assets/images/androidPushMessage.svg +0 -45
  101. package/components/TemplatePreview/assets/images/home-screen-android.svg +0 -21
  102. package/components/TemplatePreview/assets/images/home-screen-ios.svg +0 -16
  103. package/components/TemplatePreview/assets/images/iPhonePushMessage.svg +0 -135
  104. package/components/TemplatePreview/assets/images/mobile.svg +0 -24
  105. package/components/TemplatePreview/assets/images/sms-body.png +0 -0
  106. package/components/TemplatePreview/assets/images/sms-icon.png +0 -0
  107. package/components/TemplatePreview/assets/images/sms_mobile.png +0 -0
  108. package/components/TemplatePreview/assets/images/sms_mobile_android.svg +0 -22
  109. package/components/TemplatePreview/assets/images/sms_mobile_ios.svg +0 -16
  110. package/components/TemplatePreview/assets/images/user-icon.svg +0 -19
  111. package/components/TemplatePreview/assets/images/wechat-mobile.svg +0 -78
  112. package/components/TemplatePreview/assets/images/wechat_mobile_android.svg +0 -20
  113. package/components/TemplatePreview/index.js +0 -617
  114. package/components/TemplatePreview/messages.js +0 -78
  115. package/components/Toastr/index.js +0 -60
  116. package/components/Toastr/messages.js +0 -13
  117. package/components/ToastrMessage/index.js +0 -113
  118. package/components/ToastrMessage/messages.js +0 -17
  119. package/components/TopBar/_topbar.scss +0 -46
  120. package/components/TopBar/assets/images/capillary_logo.png +0 -0
  121. package/components/TopBar/assets/images/old_capillary_logo.png +0 -0
  122. package/components/TopBar/index.js +0 -113
  123. package/components/TopBar/messages.js +0 -29
  124. package/containers/App/actions.js +0 -7
  125. package/containers/App/constants.js +0 -114
  126. package/containers/App/index.js +0 -52
  127. package/containers/App/reducer.js +0 -19
  128. package/containers/App/sagas.js +0 -31
  129. package/containers/App/selectors.js +0 -25
  130. package/containers/App/test/saga.test.js +0 -11
  131. package/containers/Assets/Gallery/_gallery.scss +0 -126
  132. package/containers/Assets/Gallery/actions.js +0 -37
  133. package/containers/Assets/Gallery/constants.js +0 -23
  134. package/containers/Assets/Gallery/index.js +0 -473
  135. package/containers/Assets/Gallery/messages.js +0 -93
  136. package/containers/Assets/Gallery/reducer.js +0 -81
  137. package/containers/Assets/Gallery/sagas.js +0 -80
  138. package/containers/Assets/Gallery/selectors.js +0 -25
  139. package/containers/Assets/Gallery/tests/__snapshots__/reducer.test.js.snap +0 -9
  140. package/containers/Assets/Gallery/tests/actions.test.js +0 -25
  141. package/containers/Assets/Gallery/tests/reducer.test.js +0 -96
  142. package/containers/Assets/Gallery/tests/saga.test.js +0 -157
  143. package/containers/Cap/actions.js +0 -66
  144. package/containers/Cap/constants.js +0 -25
  145. package/containers/Cap/index.js +0 -402
  146. package/containers/Cap/messages.js +0 -75
  147. package/containers/Cap/reducer.js +0 -113
  148. package/containers/Cap/sagas.js +0 -159
  149. package/containers/Cap/selectors.js +0 -75
  150. package/containers/Cap/tests/__snapshots__/index.test.js.snap +0 -2270
  151. package/containers/Cap/tests/index.test.js +0 -22
  152. package/containers/Cap/tests/saga.test.js +0 -284
  153. package/containers/Dashboard/actions.js +0 -15
  154. package/containers/Dashboard/constants.js +0 -7
  155. package/containers/Dashboard/index.js +0 -76
  156. package/containers/Dashboard/messages.js +0 -13
  157. package/containers/Dashboard/reducer.js +0 -21
  158. package/containers/Dashboard/sagas.js +0 -17
  159. package/containers/Dashboard/selectors.js +0 -25
  160. package/containers/Dashboard/test/saga.test.js +0 -9
  161. package/containers/Ebill/_ebill.scss +0 -5
  162. package/containers/Ebill/actions.js +0 -43
  163. package/containers/Ebill/constants.js +0 -20
  164. package/containers/Ebill/index.js +0 -1278
  165. package/containers/Ebill/messages.js +0 -77
  166. package/containers/Ebill/reducer.js +0 -72
  167. package/containers/Ebill/sagas.js +0 -74
  168. package/containers/Ebill/selectors.js +0 -25
  169. package/containers/Ebill/test/saga.test.js +0 -11
  170. package/containers/Email/_email.scss +0 -141
  171. package/containers/Email/actions.js +0 -81
  172. package/containers/Email/constants.js +0 -36
  173. package/containers/Email/index.js +0 -3325
  174. package/containers/Email/messages.js +0 -289
  175. package/containers/Email/reducer.js +0 -142
  176. package/containers/Email/sagas.js +0 -135
  177. package/containers/Email/selectors.js +0 -31
  178. package/containers/Email/test/saga.test.js +0 -671
  179. package/containers/LanguageProvider/actions.js +0 -17
  180. package/containers/LanguageProvider/constants.js +0 -8
  181. package/containers/LanguageProvider/index.js +0 -80
  182. package/containers/LanguageProvider/reducer.js +0 -30
  183. package/containers/LanguageProvider/selectors.js +0 -20
  184. package/containers/LanguageProvider/tests/actions.test.js +0 -19
  185. package/containers/LanguageProvider/tests/index.test.js +0 -78
  186. package/containers/LanguageProvider/tests/reducer.test.js +0 -20
  187. package/containers/LanguageProvider/tests/selectors.test.js +0 -15
  188. package/containers/Line/Create/_lineCreate.scss +0 -54
  189. package/containers/Line/Create/actions.js +0 -90
  190. package/containers/Line/Create/constants.js +0 -39
  191. package/containers/Line/Create/index.js +0 -836
  192. package/containers/Line/Create/messages.js +0 -189
  193. package/containers/Line/Create/reducer.js +0 -99
  194. package/containers/Line/Create/sagas.js +0 -121
  195. package/containers/Line/Create/selectors.js +0 -36
  196. package/containers/Line/Create/tests/saga.test.js +0 -202
  197. package/containers/Line/Edit/_lineEdit.scss +0 -35
  198. package/containers/Line/Edit/actions.js +0 -79
  199. package/containers/Line/Edit/constants.js +0 -27
  200. package/containers/Line/Edit/index.js +0 -1050
  201. package/containers/Line/Edit/messages.js +0 -177
  202. package/containers/Line/Edit/reducer.js +0 -83
  203. package/containers/Line/Edit/sagas.js +0 -80
  204. package/containers/Line/Edit/selectors.js +0 -29
  205. package/containers/Line/Edit/test/saga.test.js +0 -160
  206. package/containers/Login/assets/images/capillary_logo.png +0 -0
  207. package/containers/Login/components/LoginForm/index.js +0 -62
  208. package/containers/Login/components/LoginForm/messages.js +0 -33
  209. package/containers/Login/index.js +0 -130
  210. package/containers/Login/messages.js +0 -25
  211. package/containers/Login/selectors.js +0 -25
  212. package/containers/MobilePush/Create/_mobilePushCreate.scss +0 -39
  213. package/containers/MobilePush/Create/actions.js +0 -46
  214. package/containers/MobilePush/Create/constants.js +0 -23
  215. package/containers/MobilePush/Create/index.js +0 -2303
  216. package/containers/MobilePush/Create/messages.js +0 -269
  217. package/containers/MobilePush/Create/reducer.js +0 -70
  218. package/containers/MobilePush/Create/sagas.js +0 -74
  219. package/containers/MobilePush/Create/selectors.js +0 -28
  220. package/containers/MobilePush/Create/test/saga.test.js +0 -19
  221. package/containers/MobilePush/Edit/_mobilePushCreate.scss +0 -39
  222. package/containers/MobilePush/Edit/actions.js +0 -91
  223. package/containers/MobilePush/Edit/constants.js +0 -35
  224. package/containers/MobilePush/Edit/index.js +0 -2601
  225. package/containers/MobilePush/Edit/messages.js +0 -266
  226. package/containers/MobilePush/Edit/reducer.js +0 -112
  227. package/containers/MobilePush/Edit/sagas.js +0 -126
  228. package/containers/MobilePush/Edit/selectors.js +0 -29
  229. package/containers/MobilePush/Edit/tests/saga.test.js +0 -255
  230. package/containers/NotFoundPage/index.js +0 -25
  231. package/containers/NotFoundPage/messages.js +0 -13
  232. package/containers/NotFoundPage/tests/index.test.js +0 -17
  233. package/containers/Sms/Create/_smsCreate.scss +0 -42
  234. package/containers/Sms/Create/actions.js +0 -27
  235. package/containers/Sms/Create/constants.js +0 -16
  236. package/containers/Sms/Create/index.js +0 -1488
  237. package/containers/Sms/Create/messages.js +0 -109
  238. package/containers/Sms/Create/reducer.js +0 -41
  239. package/containers/Sms/Create/sagas.js +0 -40
  240. package/containers/Sms/Create/selectors.js +0 -28
  241. package/containers/Sms/Create/test/saga.test.js +0 -11
  242. package/containers/Sms/Edit/actions.js +0 -40
  243. package/containers/Sms/Edit/constants.js +0 -17
  244. package/containers/Sms/Edit/index.js +0 -1472
  245. package/containers/Sms/Edit/messages.js +0 -105
  246. package/containers/Sms/Edit/reducer.js +0 -50
  247. package/containers/Sms/Edit/sagas.js +0 -60
  248. package/containers/Sms/Edit/selectors.js +0 -32
  249. package/containers/Sms/Edit/test/saga.test.js +0 -13
  250. package/containers/TagList/_tagList.scss +0 -8
  251. package/containers/TagList/actions.js +0 -15
  252. package/containers/TagList/constants.js +0 -32
  253. package/containers/TagList/index.js +0 -236
  254. package/containers/TagList/messages.js +0 -13
  255. package/containers/TagList/reducer.js +0 -23
  256. package/containers/TagList/sagas.js +0 -11
  257. package/containers/TagList/selectors.js +0 -25
  258. package/containers/Templates/_templates.scss +0 -333
  259. package/containers/Templates/actions.js +0 -103
  260. package/containers/Templates/constants.js +0 -60
  261. package/containers/Templates/index.js +0 -1756
  262. package/containers/Templates/messages.js +0 -337
  263. package/containers/Templates/reducer.js +0 -142
  264. package/containers/Templates/sagas.js +0 -163
  265. package/containers/Templates/selectors.js +0 -28
  266. package/containers/Templates/test/saga.test.js +0 -241
  267. package/containers/WeChat/MapTemplates/_mapTemplates.scss +0 -8
  268. package/containers/WeChat/MapTemplates/actions.js +0 -52
  269. package/containers/WeChat/MapTemplates/constants.js +0 -28
  270. package/containers/WeChat/MapTemplates/index.js +0 -1610
  271. package/containers/WeChat/MapTemplates/messages.js +0 -157
  272. package/containers/WeChat/MapTemplates/reducer.js +0 -74
  273. package/containers/WeChat/MapTemplates/sagas.js +0 -84
  274. package/containers/WeChat/MapTemplates/selectors.js +0 -25
  275. package/containers/WeChat/MapTemplates/test/saga.test.js +0 -155
  276. package/containers/WeChat/RichmediaTemplates/Create/_createRichmedia.scss +0 -57
  277. package/containers/WeChat/RichmediaTemplates/Create/actions.js +0 -36
  278. package/containers/WeChat/RichmediaTemplates/Create/constants.js +0 -15
  279. package/containers/WeChat/RichmediaTemplates/Create/index.js +0 -1071
  280. package/containers/WeChat/RichmediaTemplates/Create/messages.js +0 -165
  281. package/containers/WeChat/RichmediaTemplates/Create/reducer.js +0 -60
  282. package/containers/WeChat/RichmediaTemplates/Create/richmediaschema.js +0 -497
  283. package/containers/WeChat/RichmediaTemplates/Create/sagas.js +0 -51
  284. package/containers/WeChat/RichmediaTemplates/Create/selectors.js +0 -37
  285. package/containers/WeChat/RichmediaTemplates/Create/test/saga.test.js +0 -13
  286. package/containers/WeChat/RichmediaTemplates/Edit/actions.js +0 -20
  287. package/containers/WeChat/RichmediaTemplates/Edit/constants.js +0 -10
  288. package/containers/WeChat/RichmediaTemplates/Edit/index.js +0 -136
  289. package/containers/WeChat/RichmediaTemplates/Edit/messages.js +0 -13
  290. package/containers/WeChat/RichmediaTemplates/Edit/reducer.js +0 -28
  291. package/containers/WeChat/RichmediaTemplates/Edit/sagas.js +0 -36
  292. package/containers/WeChat/RichmediaTemplates/Edit/selectors.js +0 -30
  293. package/containers/WeChat/RichmediaTemplates/Edit/test/saga.test.js +0 -12
  294. package/containers/WeChat/RichmediaTemplates/View/actions.js +0 -15
  295. package/containers/WeChat/RichmediaTemplates/View/constants.js +0 -7
  296. package/containers/WeChat/RichmediaTemplates/View/index.js +0 -47
  297. package/containers/WeChat/RichmediaTemplates/View/messages.js +0 -21
  298. package/containers/WeChat/RichmediaTemplates/View/reducer.js +0 -23
  299. package/containers/WeChat/RichmediaTemplates/View/sagas.js +0 -11
  300. package/containers/WeChat/RichmediaTemplates/View/selectors.js +0 -25
  301. package/utils/asyncInjectors.js +0 -78
  302. package/utils/callNativeEvent.js +0 -16
  303. package/utils/checkStore.js +0 -21
  304. package/utils/customAuthWrapper.js +0 -62
  305. package/utils/customConnectedAuthWrapper.js +0 -26
@@ -1,157 +0,0 @@
1
- /*
2
- * WeChat Messages
3
- *
4
- * This contains all the text for the WeChat component.
5
- */
6
- import { defineMessages } from 'react-intl';
7
-
8
- export default defineMessages({
9
- "header": {
10
- id: 'creatives.containers.WeChat.header',
11
- defaultMessage: 'WeChat',
12
- },
13
- 'Template mapping': {
14
- id: 'creatives.containers.WeChat.templateMapping',
15
- defaultMessage: 'Template mapping',
16
- },
17
- 'Discard': {
18
- id: 'creatives.containers.WeChat.discard',
19
- defaultMessage: 'Discard',
20
- },
21
- 'Cancel': {
22
- id: 'creatives.containers.WeChat.cancel',
23
- defaultMessage: 'Cancel',
24
- },
25
- 'Save': {
26
- id: 'creatives.containers.WeChat.save',
27
- defaultMessage: 'Save',
28
- },
29
- 'Account Id': {
30
- id: 'creatives.containers.WeChat.accountId',
31
- defaultMessage: 'Account id',
32
- },
33
- 'Select Wechat Account': {
34
- id: 'creatives.containers.WeChat.selectWechatAccount',
35
- defaultMessage: 'Select wechat account',
36
- },
37
- 'Template': {
38
- id: 'creatives.containers.WeChat.template',
39
- defaultMessage: 'Template',
40
- },
41
- 'Select Wechat Template': {
42
- id: 'creatives.containers.WeChat.selectWechatTemplate',
43
- defaultMessage: 'Select wechat template',
44
- },
45
- 'Link': {
46
- id: 'creatives.containers.WeChat.link',
47
- defaultMessage: 'Link',
48
- },
49
- 'isInternalUrl': {
50
- id: 'creatives.containers.WeChat.isInternalUrl',
51
- defaultMessage: 'Is this internal url',
52
- },
53
- "Tags": {
54
- id: 'creatives.containers.WeChat.tagsLabel',
55
- defaultMessage: "Tags",
56
- },
57
- "gettingTemplateData": {
58
- id: 'creatives.containers.WeChat.gettingTemplateData',
59
- defaultMessage: "Getting template data..",
60
- },
61
- "wechatEditSuccess": {
62
- id: 'creatives.containers.WeChat.wechatEditSuccess',
63
- defaultMessage: "WeChat template edited successfully",
64
- },
65
- "wechatCreateSuccess": {
66
- id: 'creatives.containers.WeChat.wechatCreateSuccess',
67
- defaultMessage: "WeChat template mapped successfully",
68
- },
69
- "somethingWentWrong": {
70
- id: 'creatives.containers.WeChat.somethingWentWrong',
71
- defaultMessage: "Something went wrong!!",
72
- },
73
- "goBackConfirmation": {
74
- id: 'creatives.containers.WeChat.goBackConfirmation',
75
- defaultMessage: "Going back will discard all the changes you've made. Continue?",
76
- },
77
- "alertMessage": {
78
- id: 'creatives.containers.WeChat.alertMessage',
79
- defaultMessage: "Alert",
80
- },
81
- "goBackTemporaryConfirmation": {
82
- id: 'creatives.containers.WeChat.goBackTemporaryConfirmation',
83
- defaultMessage: "Do you really want to go back? All your temporary changes will be lost!",
84
- },
85
- "mapTemplateHeader": {
86
- id: 'creatives.containers.WeChat.mapTemplateHeader',
87
- defaultMessage: "Header",
88
- },
89
- "mapTemplateFooter": {
90
- id: 'creatives.containers.WeChat.mapTemplateFooter',
91
- defaultMessage: "Footer",
92
- },
93
- "invalidContent": {
94
- id: 'creatives.containers.WeChat.invalidContent',
95
- defaultMessage: "has invalid content.",
96
- },
97
- "link": {
98
- id: 'creatives.containers.WeChat.link',
99
- defaultMessage: "Link",
100
- },
101
- "linkCantEmpty": {
102
- id: 'creatives.containers.WeChat.linkCantEmpty',
103
- defaultMessage: "Link cannot be empty",
104
- },
105
- "loadingEDMTemplates": {
106
- id: 'creatives.containers.WeChat.loadingEDMTemplates',
107
- defaultMessage: "loading EDM Templates",
108
- },
109
- "redirectOptionsHeadingValue": {
110
- id: 'creatives.containers.WeChat.redirectOptionsHeadingValue',
111
- defaultMessage: 'URL or Mini-Program',
112
- },
113
- "redirectOptionURL": {
114
- id: 'creatives.containers.WeChat.redirectOptionURL',
115
- defaultMessage: 'URL',
116
- },
117
- "redirectOptionMiniProgram": {
118
- id: 'creatives.containers.WeChat.redirectOptionMiniProgram',
119
- defaultMessage: 'Mini-Program',
120
- },
121
- "redirectionOptionError": {
122
- id: 'creatives.containers.WeChat.redirectionOptionError',
123
- defaultMessage: 'Please select a redirect option',
124
- },
125
- "miniWechatIdLabel": {
126
- id: 'creatives.containers.WeChat.miniWechatIdLabel',
127
- defaultMessage: 'Mini-Program ID',
128
- },
129
- "miniWeChatPlaceholder": {
130
- id: 'creatives.containers.WeChat.miniWeChatPlaceholder',
131
- defaultMessage: 'E.g. ab4892njkl4l2op',
132
- },
133
- "miniWechatIdInductive": {
134
- id: 'creatives.containers.WeChat.miniWechatIdInductive',
135
- defaultMessage: 'Unique alpha numeric code for this specific app',
136
- },
137
- "miniWechatIdError": {
138
- id: 'creatives.containers.WeChat.miniWechatIdError',
139
- defaultMessage: 'Mini-Program ID cannot be empty',
140
- },
141
- "pagePathLabel": {
142
- id: 'creatives.containers.WeChat.pagePathLabel',
143
- defaultMessage: 'Page path',
144
- },
145
- "pagePathError": {
146
- id: 'creatives.containers.WeChat.pagePathError',
147
- defaultMessage: 'Page path cannot be empty.',
148
- },
149
- "pagePathPlaceholder": {
150
- id: 'creatives.containers.WeChat.pagePathPlaceholder',
151
- defaultMessage: 'E.g. pages/user/profile',
152
- },
153
- "pagePathInductive": {
154
- id: 'creatives.containers.WeChat.pagePathInductive',
155
- defaultMessage: 'User will be redirected to the Mini-Program path provided here',
156
- },
157
- });
@@ -1,74 +0,0 @@
1
- /*
2
- *
3
- * WeChat reducer
4
- *
5
- */
6
-
7
- import { fromJS } from 'immutable';
8
- import * as types from './constants';
9
-
10
- const initialState = fromJS({
11
- weChatDefaultTemplate: fromJS({}),
12
- fetchingDefaultTemplates: false,
13
- errorFetchingDefaultTempalte: false,
14
- });
15
-
16
- function weChatReducer(state = initialState, action) {
17
- switch (action.type) {
18
- case types.GET_WECHAT_DEFAULT_TEMPLATES_REQUEST:
19
- return state
20
- .set('fetchingDefaultTemplates', true)
21
- .set('weChatDefaultTemplate', fromJS({}))
22
- .set('weChatTemplates', fromJS({}))
23
- .set('errorFetchingDefaultTempalte', false);
24
- case types.GET_WECHAT_DEFAULT_TEMPLATES_SUCCESS:
25
- return state
26
- .set('fetchingDefaultTemplates', false)
27
- .set('weChatDefaultTemplate', fromJS(action.data))
28
- .set('weChatTemplates', fromJS(action.templateData));
29
- case types.GET_WECHAT_DEFAULT_TEMPLATES_FAILURE:
30
- return state
31
- .set('fetchingDefaultTemplates', false)
32
- .set('errorFetchingDefaultTempalte', true);
33
- case types.CREATE_TEMPLATE_REQUEST:
34
- return state
35
- .set('createTemplateInProgress', true)
36
- .set('createTemplateError', false);
37
- case types.CREATE_TEMPLATE_SUCCESS:
38
- return state.set('createTemplateInProgress', false)
39
- .set('createResponse', action.data)
40
- .set('createTemplateError', (action.statusCode !== undefined && action.statusCode > 300));
41
- case types.CREATE_TEMPLATE_FAILURE:
42
- return state
43
- .set('createTemplateInProgress', false)
44
- .set('createTemplateError', true);
45
- case types.CLEAR_CREATE_RESPONSE_REQUEST:
46
- return state.set('createResponse', {});
47
- case types.GET_WECRM_ACCOUNTS_REQUEST:
48
- return state
49
- .set('fetchingWeCrmAccounts', true)
50
- .set('weCrmAccountFetchingError', false);
51
- case types.GET_WECRM_ACCOUNTS_SUCCESS:
52
- return state
53
- .set('fetchingWeCrmAccounts', false)
54
- .set('weCrmAccounts', fromJS(action.data));
55
- case types.GET_WECRM_ACCOUNTS_FAILURE:
56
- return state
57
- .set('fetchingWeCrmAccounts', false)
58
- .set('weCrmAccountFetchingError', true);
59
- case types.GET_TEMPLATE_DETAILS_REQUEST:
60
- return state.set('getTemplateDetailsInProgress', true);
61
- case types.GET_TEMPLATE_DETAILS_SUCCESS:
62
- return state.set('getTemplateDetailsInProgress', false)
63
- .set('templateDetails', action.data);
64
- case types.GET_TEMPLATE_DETAILS_FAILURE:
65
- return state.set('getTemplateDetailsInProgress', false);
66
- case types.SET_WECHAT_ACCOUNT:
67
- return state
68
- .set('selectedWeChatAccount', fromJS(action.weChatAccount));
69
- default:
70
- return state;
71
- }
72
- }
73
-
74
- export default weChatReducer;
@@ -1,84 +0,0 @@
1
- import {
2
- call, put, takeLatest, all,
3
- } from 'redux-saga/effects';
4
- import * as Api from '../../../services/api';
5
- import * as types from './constants';
6
-
7
- export function* getDefaultWeChatTemplates(params) {
8
- try {
9
-
10
- const result = yield call(Api.getAllTemplates, { channel: params.channel, queryParams: params.queryParams });
11
- yield put({ type: types.GET_WECHAT_DEFAULT_TEMPLATES_SUCCESS, data: result.response.unMapped, templateData: result.response.mapped });
12
- } catch (error) {
13
- yield put({ type: types.GET_WECHAT_DEFAULT_TEMPLATES_FAILURE, error });
14
- }
15
- }
16
-
17
- export function* createTemplate(template) {
18
- try {
19
- const result = yield call(Api.createWeChatTemplate, template);
20
- // const sidebar = result.response.sidebar;
21
- yield put({ type: types.CREATE_TEMPLATE_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '' });
22
- } catch (error) {
23
- yield put({ type: types.CREATE_TEMPLATE_FAILURE, error });
24
- }
25
- }
26
-
27
- export function* fetchWeCrmAccounts() {
28
- try {
29
- const result = yield call(Api.fetchWeCrmAccounts);
30
- yield put({
31
- type: types.GET_WECRM_ACCOUNTS_SUCCESS,
32
- data: result.response,
33
- });
34
- } catch (error) {
35
- yield put({
36
- type: types.GET_WECRM_ACCOUNTS_FAILURE,
37
- data: error,
38
- });
39
- }
40
- }
41
-
42
- export function* getTemplateDetails(id) {
43
- try {
44
-
45
- const result = yield call(Api.getTemplateDetails, id);
46
- // const sidebar = result.response.sidebar;
47
- yield put({ type: types.GET_TEMPLATE_DETAILS_SUCCESS, data: result.response });
48
- } catch (error) {
49
- yield put({ type: types.GET_TEMPLATE_DETAILS_FAILURE, error });
50
- }
51
- }
52
-
53
- function* watchGetDefaultWechatTemplates() {
54
- yield takeLatest(types.GET_WECHAT_DEFAULT_TEMPLATES_REQUEST, getDefaultWeChatTemplates);
55
- }
56
-
57
- function* watchCreateTemplate() {
58
- yield takeLatest(types.CREATE_TEMPLATE_REQUEST, createTemplate);
59
- }
60
-
61
- function* watchFetchWeCrmAccounts() {
62
- yield takeLatest(types.GET_WECRM_ACCOUNTS_REQUEST, fetchWeCrmAccounts);
63
- }
64
-
65
- function* watchGetTemplateDetails() {
66
- yield takeLatest(types.GET_TEMPLATE_DETAILS_REQUEST, getTemplateDetails);
67
- }
68
-
69
- // All sagas to be loaded
70
- export default [
71
- watchGetDefaultWechatTemplates,
72
- watchCreateTemplate,
73
- watchFetchWeCrmAccounts,
74
- watchGetTemplateDetails,
75
- ];
76
-
77
- export function* mapTemplatesSaga() {
78
- yield all([
79
- watchGetDefaultWechatTemplates(),
80
- watchCreateTemplate(),
81
- watchFetchWeCrmAccounts(),
82
- watchGetTemplateDetails(),
83
- ]);
84
- }
@@ -1,25 +0,0 @@
1
- import { createSelector } from 'reselect';
2
-
3
- /**
4
- * Direct selector to the weChat state domain
5
- */
6
- const selectWeChatDomain = () => (state) => state.get('weChat');
7
-
8
- /**
9
- * Other specific selectors
10
- */
11
-
12
-
13
- /**
14
- * Default selector used by WeChat
15
- */
16
-
17
- const makeSelectWeChat = () => createSelector(
18
- selectWeChatDomain(),
19
- (substate) => substate.toJS()
20
- );
21
-
22
- export default makeSelectWeChat;
23
- export {
24
- selectWeChatDomain,
25
- };
@@ -1,155 +0,0 @@
1
- import { expectSaga } from 'redux-saga-test-plan';
2
- import { call, put } from 'redux-saga/effects';
3
- import { throwError } from 'redux-saga-test-plan/providers';
4
- import * as Api from '../../../../services/api';
5
- import * as types from '../constants';
6
- import * as sagas from '../sagas';
7
- import { mapTemplatesSaga } from '../sagas';
8
-
9
- describe('WeChat Template Management Sagas', () => {
10
- describe('getDefaultWeChatTemplates Saga', () => {
11
- const params = { channel: 'WeChat', queryParams: { type: 'default' } };
12
-
13
- it.concurrent('handles fetching default WeChat templates successfully', () => {
14
- const fakeResponse = {
15
- response: {
16
- unMapped: [{ id: 1, name: 'Template One' }],
17
- mapped: [{ id: 2, name: 'Mapped Template' }]
18
- }
19
- };
20
-
21
- return expectSaga(sagas.getDefaultWeChatTemplates, params)
22
- .provide([
23
- [call(Api.getAllTemplates, { channel: params.channel, queryParams: params.queryParams }), fakeResponse]
24
- ])
25
- .put({
26
- type: types.GET_WECHAT_DEFAULT_TEMPLATES_SUCCESS,
27
- data: fakeResponse.response.unMapped,
28
- templateData: fakeResponse.response.mapped
29
- })
30
- .run();
31
- });
32
-
33
- it.concurrent('handles failure in fetching default WeChat templates', () => {
34
- const error = new Error('Fetch failed');
35
-
36
- return expectSaga(sagas.getDefaultWeChatTemplates, params)
37
- .provide([
38
- [call(Api.getAllTemplates, { channel: params.channel, queryParams: params.queryParams }), throwError(error)]
39
- ])
40
- .put({
41
- type: types.GET_WECHAT_DEFAULT_TEMPLATES_FAILURE,
42
- error
43
- })
44
- .run();
45
- });
46
- });
47
-
48
- describe('createTemplate Saga', () => {
49
- const template = { name: 'New WeChat Template' };
50
- test.concurrent('handles creating a WeChat template successfully', () => {
51
- const fakeResponse = {
52
- response: template,
53
- status: { code: 200 }
54
- };
55
- return expectSaga(sagas.createTemplate, template)
56
- .provide([
57
- [call(Api.createWeChatTemplate, template), fakeResponse]
58
- ])
59
- .put({
60
- type: types.CREATE_TEMPLATE_SUCCESS,
61
- data: fakeResponse.response,
62
- statusCode: 200
63
- })
64
- .run();
65
- });
66
- test.concurrent('handles failure when creating a WeChat template', () => {
67
- const error = new Error('Creation failed');
68
- return expectSaga(sagas.createTemplate, template)
69
- .provide([
70
- [call(Api.createWeChatTemplate, template), throwError(error)]
71
- ])
72
- .put({
73
- type: types.CREATE_TEMPLATE_FAILURE,
74
- error
75
- })
76
- .run();
77
- });
78
- });
79
-
80
- describe('fetchWeCrmAccounts Saga', () => {
81
- it.concurrent('handles fetching WeCrm accounts successfully', () => {
82
- const fakeResponse = {
83
- response: [{ id: 1, name: 'Account One' }]
84
- };
85
-
86
- return expectSaga(sagas.fetchWeCrmAccounts)
87
- .provide([
88
- [call(Api.fetchWeCrmAccounts), fakeResponse]
89
- ])
90
- .put({
91
- type: types.GET_WECRM_ACCOUNTS_SUCCESS,
92
- data: fakeResponse.response
93
- })
94
- .run();
95
- });
96
-
97
- it.concurrent('handles failure in fetching WeCrm accounts', () => {
98
- const error = new Error('Fetch failed');
99
-
100
- return expectSaga(sagas.fetchWeCrmAccounts)
101
- .provide([
102
- [call(Api.fetchWeCrmAccounts), throwError(error)]
103
- ])
104
- .put({
105
- type: types.GET_WECRM_ACCOUNTS_FAILURE,
106
- data: error
107
- })
108
- .run();
109
- });
110
- });
111
-
112
- describe('getTemplateDetails Saga', () => {
113
- const id = '123';
114
-
115
- it.concurrent('handles fetching template details successfully', () => {
116
- const fakeResponse = {
117
- response: { id: 123, name: 'Detailed Template' }
118
- };
119
-
120
- return expectSaga(sagas.getTemplateDetails, id)
121
- .provide([
122
- [call(Api.getTemplateDetails, id), fakeResponse]
123
- ])
124
- .put({
125
- type: types.GET_TEMPLATE_DETAILS_SUCCESS,
126
- data: fakeResponse.response
127
- })
128
- .run();
129
- });
130
-
131
- it.concurrent('handles failure in fetching template details', () => {
132
- const error = new Error('Fetch failed');
133
-
134
- return expectSaga(sagas.getTemplateDetails, id)
135
- .provide([
136
- [call(Api.getTemplateDetails, id), throwError(error)]
137
- ])
138
- .put({
139
- type: types.GET_TEMPLATE_DETAILS_FAILURE,
140
- error
141
- })
142
- .run();
143
- });
144
- });
145
-
146
-
147
-
148
- // Test combined saga
149
- describe('Combined mapTemplatesSaga', () => {
150
- it.concurrent('should initialize all WeChat-related watcher sagas without error', () => {
151
- return expectSaga(mapTemplatesSaga)
152
- .run();
153
- });
154
- });
155
- });
@@ -1,57 +0,0 @@
1
- .hover-container {
2
- position: relative;
3
- }
4
- .richmedia-icons {
5
- display: none;
6
- position: absolute;
7
- top: 50%;
8
- }
9
- .hover-container:hover {
10
- .richmedia-card {
11
- opacity: 0.2;
12
- border: 2px solid #1D5B96!important;
13
- }
14
- .richmedia-card-rectangle {
15
- opacity: 0.2;
16
- border: 2px solid #1D5B96!important;
17
- }
18
- .richmedia-icons {
19
- opacity: 1 !important;
20
- display: inline-flex!important;
21
- }
22
-
23
- }
24
- .richmedia-card-clicked {
25
- border: 2px solid #1D5B96!important;
26
- }
27
- .richmedia-card-rectangle-clicked {
28
- border: 2px solid #1D5B96!important;
29
- }
30
- .hover-container .richmedia-card, .hover-container .richmedia-card-rectangle {
31
- border: 1px solid #707070;
32
- }
33
- .hover-icons {
34
- font-size: 20px;
35
- }
36
- .richmedia-container {
37
- height: 100%;
38
- overflow-y: auto;
39
- }
40
- .template-form-header {
41
- margin-bottom: 2.5rem;
42
- }
43
- .wechat-form-container {
44
- margin-right: 2.5rem;
45
- }
46
- .wechat-richmedia-row {
47
- margin-bottom: 1.5rem;
48
- width: 50rem;
49
- }
50
- .overflow-wrap-fields {
51
- text-overflow: ellipsis;
52
- overflow: hidden;
53
- overflow-wrap: break-word;
54
- display: -webkit-box !important;
55
- -webkit-box-orient: vertical;
56
- -webkit-line-clamp: 2;
57
- }
@@ -1,36 +0,0 @@
1
- /*
2
- *
3
- * Create actions
4
- *
5
- */
6
- import * as types from './constants';
7
-
8
- export function defaultAction() {
9
- return {
10
- type: types.DEFAULT_ACTION,
11
- };
12
- }
13
- export function uploadAsset(file, assetType, fileParams, mode, wechatParams, contentId, uploadId) {
14
- return {
15
- type: types.UPLOAD_ASSET_REQUEST,
16
- file,
17
- assetType,
18
- fileParams,
19
- mode,
20
- wechatParams,
21
- contentId,
22
- uploadId,
23
- };
24
- }
25
- export function saveTemplate(template) {
26
- return {
27
- type: types.SAVE_TEMPLATE_REQUEST,
28
- template,
29
- };
30
- }
31
- export function clearContentImageStore() {
32
- return {
33
- type: types.CLEAR_CONTENT_ASSET,
34
- };
35
- }
36
-
@@ -1,15 +0,0 @@
1
- /*
2
- *
3
- * Create constants
4
- *
5
- */
6
-
7
- export const DEFAULT_ACTION = 'app/containers/Wechat/RichmediaTemplates/Create/DEFAULT_ACTION';
8
- export const UPLOAD_ASSET_REQUEST = 'app/containers/Wechat/RichmediaTemplates/Create/UPLOAD_ASSET_REQUEST';
9
- export const UPLOAD_ASSET_SUCCESS = 'app/containers/Wechat/RichmediaTemplates/Create/UPLOAD_ASSET_SUCCESS';
10
- export const UPLOAD_ASSET_FAILURE = 'app/containers/Wechat/RichmediaTemplates/Create/UPLOAD_ASSET_FAILURE';
11
- export const CLEAR_ASSET = 'app/containers/Wechat/RichmediaTemplates/Create/CLEAR_ASSET';
12
- export const SAVE_TEMPLATE_REQUEST = 'app/containers/Wechat/RichmediaTemplates/Create/SAVE_TEMPLATE_REQUEST';
13
- export const SAVE_TEMPLATE_SUCCESS = 'app/containers/Wechat/RichmediaTemplates/Create/SAVE_TEMPLATE_SUCCESS';
14
- export const SAVE_TEMPLATE_FAILURE = 'app/containers/Wechat/RichmediaTemplates/Create/SAVE_TEMPLATE_FAILURE';
15
- export const CLEAR_CONTENT_ASSET = 'app/containers/Wechat/RichmediaTemplates/Create/CLEAR_CONTENT_ASSET';