@capillarytech/creatives-library 8.0.135 → 8.0.136-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/constants/unified.js +189 -0
  2. package/package.json +1 -1
  3. package/services/getSchema.js +1 -1
  4. package/services/localStorageApi.js +1 -0
  5. package/tests/i18n.test.js +1 -1
  6. package/utils/common.js +2 -2
  7. package/utils/tagValidations.js +1 -1
  8. package/utils/tests/checkStore.test.js +1 -1
  9. package/utils/tests/customAuth.test.js +1 -1
  10. package/utils/transformerUtils.js +1 -1
  11. package/v2Components/CapTagList/index.js +9 -14
  12. package/v2Components/Carousel/style.scss +1 -1
  13. package/v2Components/EmailMobilePreview/index.js +2 -2
  14. package/v2Components/FormBuilder/index.js +2 -2
  15. package/v2Components/TemplatePreview/index.js +2 -1
  16. package/v2Containers/Cap/tests/saga.test.js +1 -1
  17. package/v2Containers/Email/index.js +1 -1
  18. package/v2Containers/FTP/index.js +1 -1
  19. package/v2Containers/Line/Container/Text/index.js +1 -1
  20. package/v2Containers/Sms/Create/index.js +2 -2
  21. package/v2Containers/Sms/Edit/index.js +1 -1
  22. package/v2Containers/TagList/index.js +1 -1
  23. package/v2Containers/TagList/utils.js +1 -1
  24. package/v2Containers/Templates/index.js +1 -1
  25. package/v2Containers/Templates/sagas.js +1 -1
  26. package/components/BreadCrumbs/index.js +0 -65
  27. package/components/BreadCrumbs/messages.js +0 -13
  28. package/components/CapTagList/index.js +0 -235
  29. package/components/CapTagList/messages.js +0 -45
  30. package/components/Card/_customCard.scss +0 -40
  31. package/components/Card/index.js +0 -78
  32. package/components/Card/tests/__snapshots__/index.test.js.snap +0 -22
  33. package/components/Card/tests/index.test.js +0 -20
  34. package/components/CardGrid/index.js +0 -71
  35. package/components/Ckeditor/index.js +0 -238
  36. package/components/Ckeditor/messages.js +0 -13
  37. package/components/Ckeditor/style.scss +0 -3
  38. package/components/Component/index.js +0 -29
  39. package/components/CustomPopOver/index.js +0 -81
  40. package/components/CustomPopOver/messages.js +0 -17
  41. package/components/DateFilter/index.js +0 -349
  42. package/components/DateFilter/messages.js +0 -57
  43. package/components/DateRange/index.js +0 -114
  44. package/components/DateRange/messages.js +0 -25
  45. package/components/Edmeditor/index.js +0 -65
  46. package/components/Edmeditor/messages.js +0 -13
  47. package/components/EmailPreview/_emailPreview.scss +0 -119
  48. package/components/EmailPreview/assets/images/iPad.svg +0 -10
  49. package/components/EmailPreview/assets/images/mobile.png +0 -0
  50. package/components/EmailPreview/index.js +0 -107
  51. package/components/EmailPreview/messages.js +0 -33
  52. package/components/Footer/index.js +0 -27
  53. package/components/Footer/messages.js +0 -13
  54. package/components/FormBuilder/_formBuilder.scss +0 -83
  55. package/components/FormBuilder/index.js +0 -3279
  56. package/components/FormBuilder/messages.js +0 -61
  57. package/components/Header/index.js +0 -44
  58. package/components/Header/messages.js +0 -29
  59. package/components/ImagePreview/_imagePreview.scss +0 -63
  60. package/components/ImagePreview/index.js +0 -52
  61. package/components/ImagePreview/messages.js +0 -17
  62. package/components/PageHeader/_pageHeader.scss +0 -22
  63. package/components/PageHeader/index.js +0 -37
  64. package/components/PageHeader/messages.js +0 -13
  65. package/components/Pagination/_pagination.scss +0 -5
  66. package/components/Pagination/index.js +0 -49
  67. package/components/PreviewSideBar/_previewsidebar.scss +0 -28
  68. package/components/PreviewSideBar/index.js +0 -152
  69. package/components/PreviewSideBar/messages.js +0 -41
  70. package/components/Sidebar/_sidebar.scss +0 -115
  71. package/components/Sidebar/index.js +0 -214
  72. package/components/Sidebar/messages.js +0 -21
  73. package/components/SlideBox/_slideBox.scss +0 -63
  74. package/components/SlideBox/index.js +0 -47
  75. package/components/SlideBox/tests/index.test.js +0 -103
  76. package/components/SmsEditor/index.js +0 -55
  77. package/components/SmsTest/index.js +0 -117
  78. package/components/SmsTest/messages.js +0 -21
  79. package/components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +0 -42
  80. package/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +0 -141
  81. package/components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +0 -21
  82. package/components/TemplatePreview/_templatePreview.scss +0 -642
  83. package/components/TemplatePreview/assets/images/WECHAT_5x.png +0 -0
  84. package/components/TemplatePreview/assets/images/androidPushMessage.svg +0 -45
  85. package/components/TemplatePreview/assets/images/home-screen-android.svg +0 -21
  86. package/components/TemplatePreview/assets/images/home-screen-ios.svg +0 -16
  87. package/components/TemplatePreview/assets/images/iPhonePushMessage.svg +0 -135
  88. package/components/TemplatePreview/assets/images/mobile.svg +0 -24
  89. package/components/TemplatePreview/assets/images/sms-body.png +0 -0
  90. package/components/TemplatePreview/assets/images/sms-icon.png +0 -0
  91. package/components/TemplatePreview/assets/images/sms_mobile.png +0 -0
  92. package/components/TemplatePreview/assets/images/sms_mobile_android.svg +0 -22
  93. package/components/TemplatePreview/assets/images/sms_mobile_ios.svg +0 -16
  94. package/components/TemplatePreview/assets/images/user-icon.svg +0 -19
  95. package/components/TemplatePreview/assets/images/wechat-mobile.svg +0 -78
  96. package/components/TemplatePreview/assets/images/wechat_mobile_android.svg +0 -20
  97. package/components/TemplatePreview/index.js +0 -617
  98. package/components/TemplatePreview/messages.js +0 -78
  99. package/components/Toastr/index.js +0 -60
  100. package/components/Toastr/messages.js +0 -13
  101. package/components/ToastrMessage/index.js +0 -113
  102. package/components/ToastrMessage/messages.js +0 -17
  103. package/components/TopBar/_topbar.scss +0 -46
  104. package/components/TopBar/assets/images/capillary_logo.png +0 -0
  105. package/components/TopBar/assets/images/old_capillary_logo.png +0 -0
  106. package/components/TopBar/index.js +0 -113
  107. package/components/TopBar/messages.js +0 -29
  108. package/containers/App/actions.js +0 -7
  109. package/containers/App/constants.js +0 -114
  110. package/containers/App/index.js +0 -52
  111. package/containers/App/reducer.js +0 -19
  112. package/containers/App/sagas.js +0 -31
  113. package/containers/App/selectors.js +0 -25
  114. package/containers/App/test/saga.test.js +0 -11
  115. package/containers/Assets/Gallery/_gallery.scss +0 -126
  116. package/containers/Assets/Gallery/actions.js +0 -37
  117. package/containers/Assets/Gallery/constants.js +0 -23
  118. package/containers/Assets/Gallery/index.js +0 -473
  119. package/containers/Assets/Gallery/messages.js +0 -93
  120. package/containers/Assets/Gallery/reducer.js +0 -81
  121. package/containers/Assets/Gallery/sagas.js +0 -80
  122. package/containers/Assets/Gallery/selectors.js +0 -25
  123. package/containers/Assets/Gallery/tests/__snapshots__/reducer.test.js.snap +0 -9
  124. package/containers/Assets/Gallery/tests/actions.test.js +0 -25
  125. package/containers/Assets/Gallery/tests/reducer.test.js +0 -96
  126. package/containers/Assets/Gallery/tests/saga.test.js +0 -157
  127. package/containers/Cap/actions.js +0 -66
  128. package/containers/Cap/constants.js +0 -25
  129. package/containers/Cap/index.js +0 -402
  130. package/containers/Cap/messages.js +0 -75
  131. package/containers/Cap/reducer.js +0 -113
  132. package/containers/Cap/sagas.js +0 -159
  133. package/containers/Cap/selectors.js +0 -75
  134. package/containers/Cap/tests/__snapshots__/index.test.js.snap +0 -2269
  135. package/containers/Cap/tests/index.test.js +0 -22
  136. package/containers/Cap/tests/saga.test.js +0 -284
  137. package/containers/Dashboard/actions.js +0 -15
  138. package/containers/Dashboard/constants.js +0 -7
  139. package/containers/Dashboard/index.js +0 -76
  140. package/containers/Dashboard/messages.js +0 -13
  141. package/containers/Dashboard/reducer.js +0 -21
  142. package/containers/Dashboard/sagas.js +0 -17
  143. package/containers/Dashboard/selectors.js +0 -25
  144. package/containers/Dashboard/test/saga.test.js +0 -9
  145. package/containers/Ebill/_ebill.scss +0 -5
  146. package/containers/Ebill/actions.js +0 -43
  147. package/containers/Ebill/constants.js +0 -20
  148. package/containers/Ebill/index.js +0 -1278
  149. package/containers/Ebill/messages.js +0 -77
  150. package/containers/Ebill/reducer.js +0 -72
  151. package/containers/Ebill/sagas.js +0 -74
  152. package/containers/Ebill/selectors.js +0 -25
  153. package/containers/Ebill/test/saga.test.js +0 -11
  154. package/containers/Email/_email.scss +0 -141
  155. package/containers/Email/actions.js +0 -81
  156. package/containers/Email/constants.js +0 -36
  157. package/containers/Email/index.js +0 -3325
  158. package/containers/Email/messages.js +0 -289
  159. package/containers/Email/reducer.js +0 -142
  160. package/containers/Email/sagas.js +0 -135
  161. package/containers/Email/selectors.js +0 -31
  162. package/containers/Email/test/saga.test.js +0 -671
  163. package/containers/LanguageProvider/actions.js +0 -17
  164. package/containers/LanguageProvider/constants.js +0 -8
  165. package/containers/LanguageProvider/index.js +0 -80
  166. package/containers/LanguageProvider/reducer.js +0 -30
  167. package/containers/LanguageProvider/selectors.js +0 -20
  168. package/containers/LanguageProvider/tests/actions.test.js +0 -19
  169. package/containers/LanguageProvider/tests/index.test.js +0 -78
  170. package/containers/LanguageProvider/tests/reducer.test.js +0 -20
  171. package/containers/LanguageProvider/tests/selectors.test.js +0 -15
  172. package/containers/Line/Create/_lineCreate.scss +0 -54
  173. package/containers/Line/Create/actions.js +0 -90
  174. package/containers/Line/Create/constants.js +0 -39
  175. package/containers/Line/Create/index.js +0 -836
  176. package/containers/Line/Create/messages.js +0 -189
  177. package/containers/Line/Create/reducer.js +0 -99
  178. package/containers/Line/Create/sagas.js +0 -121
  179. package/containers/Line/Create/selectors.js +0 -36
  180. package/containers/Line/Create/tests/saga.test.js +0 -202
  181. package/containers/Line/Edit/_lineEdit.scss +0 -35
  182. package/containers/Line/Edit/actions.js +0 -79
  183. package/containers/Line/Edit/constants.js +0 -27
  184. package/containers/Line/Edit/index.js +0 -1050
  185. package/containers/Line/Edit/messages.js +0 -177
  186. package/containers/Line/Edit/reducer.js +0 -83
  187. package/containers/Line/Edit/sagas.js +0 -80
  188. package/containers/Line/Edit/selectors.js +0 -29
  189. package/containers/Line/Edit/test/saga.test.js +0 -160
  190. package/containers/Login/assets/images/capillary_logo.png +0 -0
  191. package/containers/Login/components/LoginForm/index.js +0 -62
  192. package/containers/Login/components/LoginForm/messages.js +0 -33
  193. package/containers/Login/index.js +0 -130
  194. package/containers/Login/messages.js +0 -25
  195. package/containers/Login/selectors.js +0 -25
  196. package/containers/MobilePush/Create/_mobilePushCreate.scss +0 -39
  197. package/containers/MobilePush/Create/actions.js +0 -46
  198. package/containers/MobilePush/Create/constants.js +0 -23
  199. package/containers/MobilePush/Create/index.js +0 -2303
  200. package/containers/MobilePush/Create/messages.js +0 -269
  201. package/containers/MobilePush/Create/reducer.js +0 -70
  202. package/containers/MobilePush/Create/sagas.js +0 -74
  203. package/containers/MobilePush/Create/selectors.js +0 -28
  204. package/containers/MobilePush/Create/test/saga.test.js +0 -19
  205. package/containers/MobilePush/Edit/_mobilePushCreate.scss +0 -39
  206. package/containers/MobilePush/Edit/actions.js +0 -91
  207. package/containers/MobilePush/Edit/constants.js +0 -35
  208. package/containers/MobilePush/Edit/index.js +0 -2601
  209. package/containers/MobilePush/Edit/messages.js +0 -266
  210. package/containers/MobilePush/Edit/reducer.js +0 -112
  211. package/containers/MobilePush/Edit/sagas.js +0 -126
  212. package/containers/MobilePush/Edit/selectors.js +0 -29
  213. package/containers/MobilePush/Edit/tests/saga.test.js +0 -255
  214. package/containers/NotFoundPage/index.js +0 -25
  215. package/containers/NotFoundPage/messages.js +0 -13
  216. package/containers/NotFoundPage/tests/index.test.js +0 -17
  217. package/containers/Sms/Create/_smsCreate.scss +0 -42
  218. package/containers/Sms/Create/actions.js +0 -27
  219. package/containers/Sms/Create/constants.js +0 -16
  220. package/containers/Sms/Create/index.js +0 -1488
  221. package/containers/Sms/Create/messages.js +0 -109
  222. package/containers/Sms/Create/reducer.js +0 -41
  223. package/containers/Sms/Create/sagas.js +0 -40
  224. package/containers/Sms/Create/selectors.js +0 -28
  225. package/containers/Sms/Create/test/saga.test.js +0 -11
  226. package/containers/Sms/Edit/actions.js +0 -40
  227. package/containers/Sms/Edit/constants.js +0 -17
  228. package/containers/Sms/Edit/index.js +0 -1472
  229. package/containers/Sms/Edit/messages.js +0 -105
  230. package/containers/Sms/Edit/reducer.js +0 -50
  231. package/containers/Sms/Edit/sagas.js +0 -60
  232. package/containers/Sms/Edit/selectors.js +0 -32
  233. package/containers/Sms/Edit/test/saga.test.js +0 -13
  234. package/containers/TagList/_tagList.scss +0 -8
  235. package/containers/TagList/actions.js +0 -15
  236. package/containers/TagList/constants.js +0 -32
  237. package/containers/TagList/index.js +0 -236
  238. package/containers/TagList/messages.js +0 -13
  239. package/containers/TagList/reducer.js +0 -23
  240. package/containers/TagList/sagas.js +0 -11
  241. package/containers/TagList/selectors.js +0 -25
  242. package/containers/Templates/_templates.scss +0 -333
  243. package/containers/Templates/actions.js +0 -103
  244. package/containers/Templates/constants.js +0 -60
  245. package/containers/Templates/index.js +0 -1756
  246. package/containers/Templates/messages.js +0 -337
  247. package/containers/Templates/reducer.js +0 -142
  248. package/containers/Templates/sagas.js +0 -163
  249. package/containers/Templates/selectors.js +0 -28
  250. package/containers/Templates/test/saga.test.js +0 -241
  251. package/containers/WeChat/MapTemplates/_mapTemplates.scss +0 -8
  252. package/containers/WeChat/MapTemplates/actions.js +0 -52
  253. package/containers/WeChat/MapTemplates/constants.js +0 -28
  254. package/containers/WeChat/MapTemplates/index.js +0 -1610
  255. package/containers/WeChat/MapTemplates/messages.js +0 -157
  256. package/containers/WeChat/MapTemplates/reducer.js +0 -74
  257. package/containers/WeChat/MapTemplates/sagas.js +0 -84
  258. package/containers/WeChat/MapTemplates/selectors.js +0 -25
  259. package/containers/WeChat/MapTemplates/test/saga.test.js +0 -155
  260. package/containers/WeChat/RichmediaTemplates/Create/_createRichmedia.scss +0 -57
  261. package/containers/WeChat/RichmediaTemplates/Create/actions.js +0 -36
  262. package/containers/WeChat/RichmediaTemplates/Create/constants.js +0 -15
  263. package/containers/WeChat/RichmediaTemplates/Create/index.js +0 -1071
  264. package/containers/WeChat/RichmediaTemplates/Create/messages.js +0 -165
  265. package/containers/WeChat/RichmediaTemplates/Create/reducer.js +0 -60
  266. package/containers/WeChat/RichmediaTemplates/Create/richmediaschema.js +0 -497
  267. package/containers/WeChat/RichmediaTemplates/Create/sagas.js +0 -51
  268. package/containers/WeChat/RichmediaTemplates/Create/selectors.js +0 -37
  269. package/containers/WeChat/RichmediaTemplates/Create/test/saga.test.js +0 -13
  270. package/containers/WeChat/RichmediaTemplates/Edit/actions.js +0 -20
  271. package/containers/WeChat/RichmediaTemplates/Edit/constants.js +0 -10
  272. package/containers/WeChat/RichmediaTemplates/Edit/index.js +0 -136
  273. package/containers/WeChat/RichmediaTemplates/Edit/messages.js +0 -13
  274. package/containers/WeChat/RichmediaTemplates/Edit/reducer.js +0 -28
  275. package/containers/WeChat/RichmediaTemplates/Edit/sagas.js +0 -36
  276. package/containers/WeChat/RichmediaTemplates/Edit/selectors.js +0 -30
  277. package/containers/WeChat/RichmediaTemplates/Edit/test/saga.test.js +0 -12
  278. package/containers/WeChat/RichmediaTemplates/View/actions.js +0 -15
  279. package/containers/WeChat/RichmediaTemplates/View/constants.js +0 -7
  280. package/containers/WeChat/RichmediaTemplates/View/index.js +0 -47
  281. package/containers/WeChat/RichmediaTemplates/View/messages.js +0 -21
  282. package/containers/WeChat/RichmediaTemplates/View/reducer.js +0 -23
  283. package/containers/WeChat/RichmediaTemplates/View/sagas.js +0 -11
  284. package/containers/WeChat/RichmediaTemplates/View/selectors.js +0 -25
  285. package/utils/asyncInjectors.js +0 -78
  286. package/utils/callNativeEvent.js +0 -16
  287. package/utils/checkStore.js +0 -21
  288. package/utils/customAuthWrapper.js +0 -62
  289. package/utils/customConnectedAuthWrapper.js +0 -26
  290. package/utils/jed.js +0 -1497
  291. package/utils/smsCharCount.js +0 -351
@@ -0,0 +1,189 @@
1
+ // Unified constants for cap-creatives-ui
2
+ // Consolidated from legacy and v2 constants files
3
+
4
+ // --- Channel Constants ---
5
+ export const EMAIL = 'email';
6
+ export const SMS = 'sms';
7
+ export const MOBILE_PUSH = 'mobilepush';
8
+ export const WECHAT = 'wechat';
9
+ export const LINE = 'line';
10
+ export const WHATSAPP = 'whatsapp';
11
+ export const VIBER = 'viber';
12
+ export const FACEBOOK = 'facebook';
13
+ export const RCS = 'rcs';
14
+ export const ZALO = 'zalo';
15
+ export const INAPP = 'inapp';
16
+ export const ASSETS = 'assets';
17
+ export const TRANSACTION = 'transaction';
18
+ export const PUSH = 'push';
19
+ export const EMF = 'emf';
20
+ export const VENENO = 'veneno';
21
+ export const TEXT = 'text';
22
+ export const IOS = 'ios';
23
+ export const ANDROID = 'android';
24
+ export const EXTERNAL_URL = 'external_url';
25
+ export const BIG_TEXT = 'big_text';
26
+
27
+ // --- App State Constants ---
28
+ export const CREATE = 'create';
29
+ export const EDIT = 'edit';
30
+ export const PREVIEW = 'preview';
31
+ export const CREATIVES = 'creatives';
32
+ export const LOYALTY = 'loyalty';
33
+ export const CREATIVES_UI_VIEW = 'CREATIVES_UI_VIEW';
34
+ export const DEFAULT = 'default';
35
+ export const DEFAULT_MODULE = 'creatives';
36
+ export const DEFAULT_LOCALE = 'en';
37
+
38
+ // --- Feature Flags & Validation ---
39
+ export const STORE2DOOR_PLUS_ENABLED = 'STORE2DOOR_PLUS_ENABLED';
40
+ export const TRAI_DLT = 'TRAI_DLT';
41
+ export const CARD_BASED_SCOPE = 'CARD_BASED_SCOPE';
42
+ export const HOSPITALITY_BASED_SCOPE = 'HOSPITALITY_BASED_SCOPE';
43
+ export const REGISTRATION_CUSTOM_FIELD = 'Registration custom fields';
44
+ export const GIFT_CARDS = 'GIFT_CARDS';
45
+ export const PROMO_ENGINE = 'PROMO_ENGINE';
46
+ export const LIQUID_SUPPORT = 'ENABLE_LIQUID_SUPPORT';
47
+ export const ENABLE_NEW_MPUSH = 'ENABLE_NEW_MPUSH';
48
+ export const CUSTOM_TAG = 'CustomTagMessage';
49
+ export const CUSTOMER_EXTENDED_FIELD = 'Customer extended fields';
50
+ export const EXTENDED_TAG = 'ExtendedTagMessage';
51
+ export const BADGES_UI_ENABLED = 'BADGES_UI_ENABLED';
52
+ export const JP_LOCALE_HIDE_FEATURE = 'JP_LOCALE_HIDE_FEATURE';
53
+ export const ENABLE_WECHAT = 'ENABLE_WECHAT';
54
+ export const ENABLE_CUSTOMER_BARCODE_TAG = 'ENABLE_CUSTOMER_BARCODE_TAG';
55
+ export const EMAIL_UNSUBSCRIBE_TAG_MANDATORY = 'EMAIL_UNSUBSCRIBE_TAG_MANDATORY';
56
+ export const ENABLE_AI_SUGGESTIONS = 'ENABLE_AI_SUGGESTIONS';
57
+ export const AI_CONTENT_BOT_DISABLED = 'AI_CONTENT_BOT_DISABLED';
58
+ export const AI_DOCUMENTATION_BOT_ENABLED = 'AI_DOCUMENTATION_BOT_ENABLED';
59
+ export const ENABLE_NEW_LEFT_NAVIGATION = 'ENABLE_NEW_LEFT_NAVIGATION';
60
+ export const ENABLE_PRODUCT_SUPPORT_VIDEOS = 'ENABLE_PRODUCT_SUPPORT_VIDEOS';
61
+ export const EMBEDDED = 'embedded';
62
+ // --- Tag/Validation Constants ---
63
+ export const CARD_RELATED_TAGS = [
64
+ 'card_series',
65
+ 'card_number',
66
+ 'card_issue_date',
67
+ 'card_status',
68
+ 'card_series_name',
69
+ 'card_name',
70
+ ];
71
+ export const HOSPITALITY_RELATED_TAGS = [
72
+ 'hospitality_series',
73
+ 'tax_Code',
74
+ 'roomTypeCode',
75
+ 'bookingChannel',
76
+ 'hotelReservationID_ResID_Type',
77
+ 'lastModifyDateTime',
78
+ 'guestCounts_IsPerRoom',
79
+ 'ratePlan_RatePlanCode',
80
+ 'resID_Value',
81
+ 'numberOfUnits',
82
+ 'rateTimeUnit',
83
+ 'resStatus',
84
+ 'timeSpan_End',
85
+ 'roomStay_MarketCode',
86
+ 'createDateTime',
87
+ 'amount',
88
+ 'timeSpan_Start',
89
+ 'email',
90
+ 'resID_Source',
91
+ ];
92
+ export const GIFT_VOUCHER_RELATED_TAGS = [
93
+ 'gift_voucher',
94
+ 'gift_voucher_expiry_date.FORMAT_1',
95
+ 'gift_voucher_expiry_date.FORMAT_2',
96
+ 'gift_voucher_expiry_date.FORMAT_3',
97
+ 'gift_voucher_expiry_date.FORMAT_4',
98
+ 'gift_voucher_expiry_date.FORMAT_5',
99
+ 'gift_voucher_expiry_date.FORMAT_6',
100
+ 'gift_voucher_expiry_date.FORMAT_7',
101
+ 'gift_voucher_expiry_date.FORMAT_8',
102
+ 'gift_voucher_expiry_date',
103
+ ];
104
+ export const PROMO_ENGINE_RELATED_TAGS = [
105
+ 'promotion',
106
+ 'promotion_expiry_date.FORMAT_1',
107
+ 'promotion_expiry_date.FORMAT_2',
108
+ 'promotion_expiry_date.FORMAT_3',
109
+ 'promotion_expiry_date.FORMAT_4',
110
+ 'promotion_expiry_date.FORMAT_5',
111
+ 'promotion_expiry_date.FORMAT_6',
112
+ 'promotion_expiry_date.FORMAT_7',
113
+ 'promotion_expiry_date.FORMAT_8',
114
+ 'promotion_expiry_date',
115
+ ];
116
+ export const BADGES_RELATED_TAGS = [
117
+ 'Badge_expiry_date',
118
+ 'badges_issue_expiry_date',
119
+ 'badge_expiry_mm_slash_dd_slash_yyyy',
120
+ 'badge_expiry_dd_slash_mm_slash_yyyy',
121
+ 'badge_expiry_yyyy_hyphen_mm_hyphen_dd',
122
+ 'badge_expiry_mm_slash_dd_slash_yy',
123
+ 'badge_expiry_dd_space_Mon_space_yyyy',
124
+ 'badge_expiry_Day_comma_space_Mon_space_dd_comma_space_yy',
125
+ 'badge_expiry_Dd_dot_mm_dot_yy',
126
+ 'badge_expiry_dd_space_Mon',
127
+ 'Days_until_expiry',
128
+ 'badges_enroll_expiry_date.FORMAT_1',
129
+ 'badges_enroll_expiry_date.FORMAT_2',
130
+ 'badges_enroll_expiry_date.FORMAT_3',
131
+ 'badges_enroll_expiry_date.FORMAT_4',
132
+ 'badges_enroll_expiry_date.FORMAT_5',
133
+ 'badges_enroll_expiry_date.FORMAT_6',
134
+ 'badges_enroll_expiry_date.FORMAT_7',
135
+ 'badges_enroll_expiry_date.FORMAT_8',
136
+ 'badges_enroll_expiring_in_days',
137
+ 'badges_issue_expiry_date.FORMAT_1',
138
+ 'badges_issue_expiry_date.FORMAT_2',
139
+ 'badges_issue_expiry_date.FORMAT_3',
140
+ 'badges_issue_expiry_date.FORMAT_4',
141
+ 'badges_issue_expiry_date.FORMAT_5',
142
+ 'badges_issue_expiry_date.FORMAT_6',
143
+ 'badges_issue_expiry_date.FORMAT_7',
144
+ 'badges_issue_expiry_date.FORMAT_8',
145
+ 'badges_issue_expiring_in_days',
146
+ ];
147
+ export const BADGES_ENROLL = 'BADGES_ENROLL';
148
+ export const BADGES_ISSUE = 'BADGES_ISSUE';
149
+ export const CUSTOMER_BARCODE_TAG = 'customer_barcode';
150
+ export const COPY_OF = 'Copy of';
151
+ export const ENTRY_TRIGGER_TAG_REGEX = /\bentryTrigger\.\w+(?:\.\w+)?(?:\(\w+\))?/g;
152
+
153
+ export const GET_TRANSLATION_MAPPED = {
154
+ 'en': 'en-US',
155
+ 'zh-cn': 'zh',
156
+ 'zh': 'zh',
157
+ 'en-US': 'en-US',
158
+ 'ja-JP': 'ja-JP',
159
+ };
160
+
161
+ export const JAPANESE_HIDE_DATE_TAGS = [
162
+ "mm/dd/yyyy",
163
+ "dd/mm/yyyy",
164
+ "mm/dd/yy",
165
+ "dd Mon yyyy",
166
+ "Day, Mon dd, yy",
167
+ "dd.mm.yy",
168
+ "dd Mon",
169
+ "dd/m/yyyy",
170
+ ];
171
+
172
+ export const LIQUID_SUPPORTED_CHANNELS = [EMAIL, SMS, MOBILE_PUSH, INAPP];
173
+
174
+ // --- Line Constants ---
175
+ export const STICKER = 'sticker';
176
+ export const IMAGE = 'image';
177
+ export const IMAGE_MAP = 'imagemap';
178
+ export const IMAGE_CAROUSEL = 'image_carousel';
179
+ export const TEMPLATE = 'flex';
180
+ export const VIDEO = 'video';
181
+
182
+
183
+ export const LOGOUT_REQUEST = 'cap/LOGOUT_REQUEST';
184
+ export const LOGOUT_SUCCESS = 'cap/LOGOUT_SUCCESS';
185
+ export const LOGOUT_FAILURE = 'cap/LOGOUT_FAILURE';
186
+
187
+ export const JAPANESE_HELP_TEXT = 'ヘルプ :トークンの定義';
188
+
189
+ export const TAG_TRANSLATION_DOC = 'https://docs.capillarytech.com/docs/tags-translation';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.135",
4
+ "version": "8.0.136-alpha.0",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -1,4 +1,4 @@
1
- import {SMS, EMAIL, MOBILE_PUSH, WECHAT, LINE} from '../v2Containers/CreativesContainer/constants';
1
+ import { SMS, EMAIL, MOBILE_PUSH, WECHAT } from '../v2Containers/CreativesContainer/constants';
2
2
  export default function getSchema(channel) {
3
3
  let schemaPath = '../containers/';
4
4
  switch (channel.toUpperCase()) {
@@ -2,6 +2,7 @@
2
2
  * Created by vivek on 17/2/17.
3
3
  */
4
4
 
5
+ //This is being used in the v2 containers and legacy flow aswell, please make sure to validate the DVS flow.
5
6
  export const loadItem = (key) => {
6
7
  try {
7
8
  const serializedState = localStorage.getItem(key);
@@ -1,4 +1,4 @@
1
- import { DEFAULT_LOCALE } from '../containers/App/constants';
1
+ import { DEFAULT_LOCALE } from '../constants/unified';
2
2
  import { formatTranslationMessages } from '../i18n';
3
3
 
4
4
  jest.mock('../translations/en.json', () => (
package/utils/common.js CHANGED
@@ -22,8 +22,8 @@ import {
22
22
  BADGES_ISSUE,
23
23
  ENABLE_WECHAT,
24
24
  LIQUID_SUPPORT,
25
- ENABLE_NEW_MPUSH,
26
- } from '../containers/App/constants';
25
+ ENABLE_NEW_MPUSH
26
+ } from '../constants/unified';
27
27
  import { apiMessageFormatHandler } from './commonUtils';
28
28
 
29
29
  export function getUserNameById(userId, allUserList) {
@@ -8,7 +8,7 @@
8
8
 
9
9
  import lodashForEach from 'lodash/forEach';
10
10
  import lodashCloneDeep from 'lodash/cloneDeep';
11
- import { ENTRY_TRIGGER_TAG_REGEX } from '../containers/App/constants';
11
+ import { ENTRY_TRIGGER_TAG_REGEX } from '../constants/unified';
12
12
 
13
13
  const DEFAULT = 'default';
14
14
  const SUBTAGS = 'subtags';
@@ -1,4 +1,4 @@
1
- import checkStore from '../checkStore';
1
+ import checkStore from '../../legacy/checkStore';
2
2
 
3
3
  describe('checkStore', () => {
4
4
  it('should not throw if the store is valid', () => {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { render } from '@testing-library/react';
3
- import UserAuthWrapper from '../customAuthWrapper';
3
+ import UserAuthWrapper from '../../legacy/customAuthWrapper';
4
4
 
5
5
  const MockComponent = React.forwardRef((props, ref) => <div ref={ref} {...props}>Mock Component</div>);
6
6
 
@@ -13,7 +13,7 @@ import {
13
13
  IOS,
14
14
  ANDROID,
15
15
  EXTERNAL_URL,
16
- BIG_TEXT
16
+ BIG_TEXT,
17
17
  } from "../v2Containers/CreativesContainer/constants";
18
18
 
19
19
  // Creates a base payload structure common to all channels
@@ -30,15 +30,8 @@ import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
30
30
  import { createStructuredSelector } from 'reselect';
31
31
  import messages from './messages';
32
32
  import { makeSelectLoyaltyPromotionDisplay } from '../../v2Containers/Cap/selectors';
33
- import { CARD_RELATED_TAGS, HOSPITALITY_RELATED_TAGS, CUSTOMER_BARCODE_TAG } from '../../containers/App/constants';
33
+ import { CARD_RELATED_TAGS, HOSPITALITY_RELATED_TAGS, CUSTOMER_BARCODE_TAG, GET_TRANSLATION_MAPPED ,JAPANESE_HELP_TEXT, TAG_TRANSLATION_DOC} from '../../constants/unified';
34
34
  import { hasCardBasedScope, hasCustomerBarcodeFeatureEnabled, hasHospitalityBasedScope } from '../../utils/common';
35
-
36
- import {
37
- GET_TRANSLATION_MAPPED,
38
- JAPANESE_HELP_TEXT,
39
- TAG_TRANSLATION_DOC,
40
- STRING,
41
- } from "../../containers/TagList/constants";
42
35
  import { EMAIL, JP_LOCALE_HIDE_FEATURE, LOYALTY } from '../../v2Containers/App/constants';
43
36
  import { hidingDateTagsForJpLocale } from '../../v2Containers/TagList/utils';
44
37
 
@@ -132,9 +125,10 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
132
125
  getSearchedExpandedKeys(tags, value = '') {
133
126
  let list = [];
134
127
  _.forEach(tags, (val = {}, key) => {
135
- const tagName = typeof val?.name === STRING
136
- ? _.toLower(_.get(val, "name", ""))
137
- : _.toLower(_.get(val, "name.props.defaultMessage", ""));
128
+ const tagName =
129
+ typeof val?.name === 'string'
130
+ ? _.toLower(_.get(val, "name", ""))
131
+ : _.toLower(_.get(val, "name.props.defaultMessage", ""));
138
132
  const tagNameWithoutUnderscore = tagName.replace(/_/g, " ");
139
133
  const searchStringLower = _.toLower(value);
140
134
  if (_.has(val, "subtags")) {
@@ -267,9 +261,10 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
267
261
  supportedTagsString += `${supportedTag} ,`;
268
262
  });
269
263
  supportedTagsString = supportedTagsString.replace(/,\s*$/, "");
270
- const tagName = typeof val?.name === STRING
271
- ? _.toLower(_.get(val, "name", ""))
272
- : _.toLower(_.get(val, "name.props.defaultMessage", ""));
264
+ const tagName =
265
+ typeof val?.name === 'string'
266
+ ? _.toLower(_.get(val, "name", ""))
267
+ : _.toLower(_.get(val, "name.props.defaultMessage", ""));
273
268
  const tagNameWithoutUnderscore = tagName.replace(/_/g, " ");
274
269
  const searchStringLower = _.toLower(searchString);
275
270
  const tagContainsSearchedString = searchStringLower
@@ -26,7 +26,7 @@
26
26
  text-align: center;
27
27
  width: 120px !important;
28
28
  border-radius: 12px;
29
- background-color: $CAP_G09,
29
+ background-color: $CAP_G09;
30
30
  }
31
31
 
32
32
  .ant-carousel .slick-slide {
@@ -19,8 +19,8 @@ import messages from '../EmailPreviewV2/messages';
19
19
  import './index.scss';
20
20
  import mobileBody from '../../assets/DeviceForEmail.png';
21
21
  import { iframePreviewAdjustWidth, removeLinksFromHtmlContent } from './../../utils/common';
22
- import {selectTemplateContent} from '../../containers/Templates/selectors';
23
- import * as templateActions from '../../containers/Templates/actions';
22
+ import {selectTemplateContent} from '../../v2Containers/Templates/selectors';
23
+ import * as templateActions from '../../v2Containers/Templates/actions';
24
24
 
25
25
  const deviceAspectRatio = {
26
26
  mobile: {
@@ -53,9 +53,9 @@ import { SMS, MOBILE_PUSH, LINE, ENABLE_AI_SUGGESTIONS,AI_CONTENT_BOT_DISABLED,
53
53
  import globalMessages from '../../v2Containers/Cap/messages';
54
54
  import { convert } from 'html-to-text';
55
55
  import { OUTBOUND } from './constants';
56
- import { GET_TRANSLATION_MAPPED } from '../../containers/TagList/constants';
56
+ import { GET_TRANSLATION_MAPPED } from '../../constants/unified';
57
57
  import moment from 'moment';
58
- import { CUSTOMER_BARCODE_TAG , COPY_OF, ENTRY_TRIGGER_TAG_REGEX} from '../../containers/App/constants';
58
+ import { CUSTOMER_BARCODE_TAG , COPY_OF, ENTRY_TRIGGER_TAG_REGEX} from '../../constants/unified';
59
59
  import { REQUEST } from '../../v2Containers/Cap/constants'
60
60
  import { hasLiquidSupportFeature, isEmailUnsubscribeTagMandatory } from '../../utils/common';
61
61
  import { isUrl } from '../../v2Containers/Line/Container/Wrapper/utils';
@@ -32,10 +32,11 @@ import {
32
32
  RCS,
33
33
  ZALO,
34
34
  INAPP,
35
+ VIBER,
36
+ FACEBOOK,
35
37
  MOBILE_PUSH
36
38
  } from '../../v2Containers/CreativesContainer/constants';
37
39
  import Carousel from '../Carousel';
38
- import { VIBER, FACEBOOK } from '../../v2Containers/App/constants';
39
40
  import whatsappMobileAndroid from './assets/images/whatsapp_mobile_android.svg';
40
41
  import inAppMobileAndroidModal from './assets/images/inapp_mobile_android_modal.svg';
41
42
  import inAppMobileAndroidTop from './assets/images/inapp_mobile_android_top.svg';
@@ -36,7 +36,7 @@ import {
36
36
  CREATE_CENTRAL_COMMS_META_ID_REQUEST,
37
37
  } from '../constants';
38
38
  import { callback, error, error2, videoConfigData } from '../../mockdata';
39
- import { LOGOUT_FAILURE, LOGOUT_REQUEST, LOGOUT_SUCCESS } from '../../../containers/Cap/constants';
39
+ import { LOGOUT_FAILURE, LOGOUT_SUCCESS } from '../../../constants/unified';
40
40
 
41
41
 
42
42
 
@@ -37,7 +37,7 @@ import { FONT_COLOR_05 } from '@capillarytech/cap-ui-library/styled/variables';
37
37
  import { gtmPush } from '../../utils/gtmTrackers';
38
38
  const {CapCustomCardList} = CapCustomCard;
39
39
  import {storeS3FileSizeDetails, CREATIVES_S3_ASSET_FILESIZES} from '../../utils/cdnTransformation';
40
- import { CUSTOMER_BARCODE_TAG } from '../../containers/App/constants';
40
+ import { CUSTOMER_BARCODE_TAG } from '../../constants/unified';
41
41
  import injectReducer from '../../utils/injectReducer';
42
42
  import v2EmailReducer from './reducer';
43
43
  import { v2EmailSagas } from './sagas';
@@ -29,7 +29,7 @@ import { makeSelectLoyaltyPromotionDisplay, setInjectedTags } from '../Cap/selec
29
29
  import withCreatives from '../../hoc/withCreatives';
30
30
  import messages from './messages';
31
31
  import './_FTP.scss';
32
- import * as globalActions from '../../containers/Cap/actions';
32
+ import * as globalActions from '../Cap/actions';
33
33
  import { TagList } from '../TagList';
34
34
  import { NO_COMMUNICATION, CREATE, EDIT, PREVIEW } from '../App/constants';
35
35
  import { getTreeStructuredTags } from '../../utils/common';
@@ -17,7 +17,7 @@ import withStyles from '../../../../hoc/withStyles';
17
17
  import globalMessages from '../../../Cap/messages';
18
18
  import { validateTags } from '../../../../utils/tagValidations';
19
19
  import moment from 'moment';
20
- import { GET_TRANSLATION_MAPPED } from '../../../../containers/TagList/constants';
20
+ import { GET_TRANSLATION_MAPPED } from '../../../../constants/unified';
21
21
 
22
22
  const { TextArea } = CapInput;
23
23
  const {CapCustomCardList} = CapCustomCard;
@@ -18,13 +18,13 @@ import './_smsCreate.scss';
18
18
  import FormBuilder from '../../../v2Components/FormBuilder';
19
19
  import * as actions from './actions';
20
20
  import messages from './messages';
21
- import * as charCount from '../../../utils/smsCharCount';
21
+ import * as charCount from '../../../legacy/smsCharCount';
22
22
  import {checkUnicode, updateCharCount} from '../../../utils/smsCharCountV2';
23
23
  import {getMessageObject} from '../../../utils/messageUtils';
24
24
  import { gtmPush } from '../../../utils/gtmTrackers';
25
25
  import * as creativesContainerActions from '../../CreativesContainer/actions';
26
26
  import {SMS} from '../../CreativesContainer/constants';
27
- // import callNativeEvent from '../../../utils/callNativeEvent';
27
+ // import callNativeEvent from '../../../legacy/callNativeEvent';
28
28
  import {showError} from '../commonMethods';
29
29
  import withCreatives from '../../../hoc/withCreatives';
30
30
  import { GA } from '@capillarytech/cap-ui-utils';
@@ -24,7 +24,7 @@ import messages from './messages';
24
24
  import {getMessageObject} from '../../../utils/messageUtils';
25
25
  import { gtmPush } from '../../../utils/gtmTrackers';
26
26
  import * as creativesContainerActions from '../../CreativesContainer/actions';
27
- // import callNativeEvent from '../../../utils/callNativeEvent';
27
+ // import callNativeEvent from '../../../legacy/callNativeEvent';
28
28
  import {showError} from '../commonMethods';
29
29
  import withCreatives from '../../../hoc/withCreatives';
30
30
  import { EDIT, TRACK_EDIT_SMS } from '../../App/constants';
@@ -28,7 +28,7 @@ import {
28
28
  } from '../../utils/common';
29
29
  import {
30
30
  GIFT_VOUCHER_RELATED_TAGS, PROMO_ENGINE_RELATED_TAGS, BADGES_RELATED_TAGS, BADGES_ENROLL, BADGES_ISSUE,
31
- } from '../../containers/App/constants';
31
+ } from '../../constants/unified';
32
32
 
33
33
  const {TreeNode} = Tree;
34
34
 
@@ -1,4 +1,4 @@
1
- import { JAPANESE_HIDE_DATE_TAGS } from "../../containers/TagList/constants";
1
+ import { JAPANESE_HIDE_DATE_TAGS } from "../../constants/unified";
2
2
 
3
3
 
4
4
  export const hidingDateTagsForJpLocale = (hideDateTagsForJpLocale, val, list, value) => {
@@ -104,7 +104,7 @@ import {
104
104
  CREATE,
105
105
  } from '../App/constants';
106
106
  import {MAX_WHATSAPP_TEMPLATES, WARNING_WHATSAPP_TEMPLATES , ACCOUNT_MAPPING_ON_CHANNEL} from './constants';
107
- import { COPY_OF } from '../../containers/App/constants';
107
+ import { COPY_OF } from '../../constants/unified';
108
108
  import {
109
109
  STATUS_OPTIONS,
110
110
  CATEGORY,
@@ -6,7 +6,7 @@ import get from 'lodash/get';
6
6
  import * as Api from '../../services/api';
7
7
  import * as types from './constants';
8
8
  import { saveCdnConfigs, removeAllCdnLocalStorageItems } from '../../utils/cdnTransformation';
9
- import { COPY_OF } from '../../containers/App/constants';
9
+ import { COPY_OF } from '../../constants/unified';
10
10
  import { ZALO_TEMPLATE_INFO_REQUEST } from '../Zalo/constants';
11
11
  import { getTemplateInfoById } from '../Zalo/saga';
12
12
  import { watchCreateTemplate } from '../MobilePushNew/sagas';
@@ -1,65 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import React from 'react';
3
- // import styled from 'styled-components';
4
- import { Link } from 'react-router';
5
- import _ from 'lodash';
6
-
7
- class BreadCrumbs extends React.Component { // eslint-disable-line react/prefer-stateless-function
8
- constructor(props) {
9
- super(props);
10
- this.prepareBreadcrumbElement = this.prepareBreadcrumbElement.bind(this);
11
- this.disabledBreadcrumb = this.disabledBreadcrumb.bind(this);
12
- }
13
-
14
- disabledBreadcrumb(e, location) {
15
- if (location.disabled) {
16
- e.preventDefault();
17
- }
18
- }
19
-
20
- prepareBreadcrumbElement() {
21
- const breadcrumbs = [];
22
- _.forEach(this.props.locations, (location) => {
23
- const titleText = (typeof location.text === 'string') ? location.text : location.text.props.defaultMessage;
24
- const element = (
25
- <Link
26
- to={location.url}
27
- key={titleText}
28
- title={titleText}
29
- onClick={(e) => this.disabledBreadcrumb(e, location)}
30
- >
31
- <span
32
- className={location.disabled ? 'disabled-breadcrumb' : 'active-breadcrumb'}
33
- disabled={location.disabled}
34
- > {location.text}
35
- </span>
36
- </Link>
37
- );
38
- if (breadcrumbs.length !== 0) {
39
- breadcrumbs.push(
40
- <span
41
- key={`${titleText}separator`}
42
- > {this.props.separator ? this.props.separator : ' / '}
43
- </span>
44
- );
45
- }
46
- breadcrumbs.push(element);
47
- });
48
- return breadcrumbs;
49
- }
50
-
51
- render() {
52
- return (
53
- <div className="breadcrumbs-wrapper">
54
- {this.prepareBreadcrumbElement()}
55
- </div>
56
- );
57
- }
58
- }
59
-
60
- BreadCrumbs.propTypes = {
61
- locations: PropTypes.array.isRequired,
62
- separator: PropTypes.string,
63
- };
64
-
65
- export default BreadCrumbs;
@@ -1,13 +0,0 @@
1
- /*
2
- * BreadCrumbs Messages
3
- *
4
- * This contains all the text for the BreadCrumbs component.
5
- */
6
- import { defineMessages } from 'react-intl';
7
-
8
- export default defineMessages({
9
- header: {
10
- id: 'creatives.components.BreadCrumbs.header',
11
- defaultMessage: 'This is the BreadCrumbs component !',
12
- },
13
- });