@capillarytech/creatives-library 8.0.136-alpha.4 → 8.0.136-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/BreadCrumbs/index.js +65 -0
- package/components/BreadCrumbs/messages.js +13 -0
- package/components/CapTagList/index.js +235 -0
- package/components/CapTagList/messages.js +45 -0
- package/components/Card/_customCard.scss +40 -0
- package/components/Card/index.js +78 -0
- package/components/Card/tests/__snapshots__/index.test.js.snap +22 -0
- package/components/Card/tests/index.test.js +20 -0
- package/components/CardGrid/index.js +71 -0
- package/components/Ckeditor/index.js +238 -0
- package/components/Ckeditor/messages.js +13 -0
- package/components/Ckeditor/style.scss +3 -0
- package/components/Component/index.js +29 -0
- package/components/CustomPopOver/index.js +81 -0
- package/components/CustomPopOver/messages.js +17 -0
- package/components/DateFilter/index.js +349 -0
- package/components/DateFilter/messages.js +57 -0
- package/components/DateRange/index.js +114 -0
- package/components/DateRange/messages.js +25 -0
- package/components/Edmeditor/index.js +65 -0
- package/components/Edmeditor/messages.js +13 -0
- package/components/EmailPreview/_emailPreview.scss +119 -0
- package/components/EmailPreview/assets/images/iPad.svg +10 -0
- package/components/EmailPreview/assets/images/mobile.png +0 -0
- package/components/EmailPreview/index.js +107 -0
- package/components/EmailPreview/messages.js +33 -0
- package/components/Footer/index.js +27 -0
- package/components/Footer/messages.js +13 -0
- package/components/FormBuilder/_formBuilder.scss +83 -0
- package/components/FormBuilder/index.js +3279 -0
- package/components/FormBuilder/messages.js +61 -0
- package/components/Header/index.js +44 -0
- package/components/Header/messages.js +29 -0
- package/components/ImagePreview/_imagePreview.scss +63 -0
- package/components/ImagePreview/index.js +52 -0
- package/components/ImagePreview/messages.js +17 -0
- package/components/PageHeader/_pageHeader.scss +22 -0
- package/components/PageHeader/index.js +37 -0
- package/components/PageHeader/messages.js +13 -0
- package/components/Pagination/_pagination.scss +5 -0
- package/components/Pagination/index.js +49 -0
- package/components/PreviewSideBar/_previewsidebar.scss +28 -0
- package/components/PreviewSideBar/index.js +152 -0
- package/components/PreviewSideBar/messages.js +41 -0
- package/components/Sidebar/_sidebar.scss +115 -0
- package/components/Sidebar/index.js +214 -0
- package/components/Sidebar/messages.js +21 -0
- package/components/SlideBox/_slideBox.scss +63 -0
- package/components/SlideBox/index.js +47 -0
- package/components/SlideBox/tests/index.test.js +103 -0
- package/components/SmsEditor/index.js +55 -0
- package/components/SmsTest/index.js +117 -0
- package/components/SmsTest/messages.js +21 -0
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +42 -0
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +141 -0
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +21 -0
- package/components/TemplatePreview/_templatePreview.scss +642 -0
- package/components/TemplatePreview/assets/images/WECHAT_5x.png +0 -0
- package/components/TemplatePreview/assets/images/androidPushMessage.svg +45 -0
- package/components/TemplatePreview/assets/images/home-screen-android.svg +21 -0
- package/components/TemplatePreview/assets/images/home-screen-ios.svg +16 -0
- package/components/TemplatePreview/assets/images/iPhonePushMessage.svg +135 -0
- package/components/TemplatePreview/assets/images/mobile.svg +24 -0
- package/components/TemplatePreview/assets/images/sms-body.png +0 -0
- package/components/TemplatePreview/assets/images/sms-icon.png +0 -0
- package/components/TemplatePreview/assets/images/sms_mobile.png +0 -0
- package/components/TemplatePreview/assets/images/sms_mobile_android.svg +22 -0
- package/components/TemplatePreview/assets/images/sms_mobile_ios.svg +16 -0
- package/components/TemplatePreview/assets/images/user-icon.svg +19 -0
- package/components/TemplatePreview/assets/images/wechat-mobile.svg +78 -0
- package/components/TemplatePreview/assets/images/wechat_mobile_android.svg +20 -0
- package/components/TemplatePreview/index.js +617 -0
- package/components/TemplatePreview/messages.js +78 -0
- package/components/Toastr/index.js +60 -0
- package/components/Toastr/messages.js +13 -0
- package/components/ToastrMessage/index.js +113 -0
- package/components/ToastrMessage/messages.js +17 -0
- package/components/TopBar/_topbar.scss +46 -0
- package/components/TopBar/assets/images/capillary_logo.png +0 -0
- package/components/TopBar/assets/images/old_capillary_logo.png +0 -0
- package/components/TopBar/index.js +113 -0
- package/components/TopBar/messages.js +29 -0
- package/containers/App/actions.js +7 -0
- package/containers/App/constants.js +114 -0
- package/containers/App/index.js +52 -0
- package/containers/App/reducer.js +19 -0
- package/containers/App/sagas.js +31 -0
- package/containers/App/selectors.js +25 -0
- package/containers/App/test/saga.test.js +11 -0
- package/containers/Assets/Gallery/_gallery.scss +126 -0
- package/containers/Assets/Gallery/actions.js +37 -0
- package/containers/Assets/Gallery/constants.js +23 -0
- package/containers/Assets/Gallery/index.js +473 -0
- package/containers/Assets/Gallery/messages.js +93 -0
- package/containers/Assets/Gallery/reducer.js +81 -0
- package/containers/Assets/Gallery/sagas.js +80 -0
- package/containers/Assets/Gallery/selectors.js +25 -0
- package/containers/Assets/Gallery/tests/__snapshots__/reducer.test.js.snap +9 -0
- package/containers/Assets/Gallery/tests/actions.test.js +25 -0
- package/containers/Assets/Gallery/tests/reducer.test.js +96 -0
- package/containers/Assets/Gallery/tests/saga.test.js +157 -0
- package/containers/Cap/actions.js +66 -0
- package/containers/Cap/constants.js +25 -0
- package/containers/Cap/index.js +402 -0
- package/containers/Cap/messages.js +75 -0
- package/containers/Cap/reducer.js +113 -0
- package/containers/Cap/sagas.js +159 -0
- package/containers/Cap/selectors.js +75 -0
- package/containers/Cap/tests/__snapshots__/index.test.js.snap +2269 -0
- package/containers/Cap/tests/index.test.js +22 -0
- package/containers/Cap/tests/saga.test.js +284 -0
- package/containers/Dashboard/actions.js +15 -0
- package/containers/Dashboard/constants.js +7 -0
- package/containers/Dashboard/index.js +76 -0
- package/containers/Dashboard/messages.js +13 -0
- package/containers/Dashboard/reducer.js +21 -0
- package/containers/Dashboard/sagas.js +17 -0
- package/containers/Dashboard/selectors.js +25 -0
- package/containers/Dashboard/test/saga.test.js +9 -0
- package/containers/Ebill/_ebill.scss +5 -0
- package/containers/Ebill/actions.js +43 -0
- package/containers/Ebill/constants.js +20 -0
- package/containers/Ebill/index.js +1278 -0
- package/containers/Ebill/messages.js +77 -0
- package/containers/Ebill/reducer.js +72 -0
- package/containers/Ebill/sagas.js +74 -0
- package/containers/Ebill/selectors.js +25 -0
- package/containers/Ebill/test/saga.test.js +11 -0
- package/containers/Email/_email.scss +141 -0
- package/containers/Email/actions.js +81 -0
- package/containers/Email/constants.js +36 -0
- package/containers/Email/index.js +3325 -0
- package/containers/Email/messages.js +289 -0
- package/containers/Email/reducer.js +142 -0
- package/containers/Email/sagas.js +135 -0
- package/containers/Email/selectors.js +31 -0
- package/containers/Email/test/saga.test.js +671 -0
- package/containers/LanguageProvider/actions.js +17 -0
- package/containers/LanguageProvider/constants.js +8 -0
- package/containers/LanguageProvider/index.js +80 -0
- package/containers/LanguageProvider/reducer.js +30 -0
- package/containers/LanguageProvider/selectors.js +20 -0
- package/containers/LanguageProvider/tests/actions.test.js +19 -0
- package/containers/LanguageProvider/tests/index.test.js +78 -0
- package/containers/LanguageProvider/tests/reducer.test.js +20 -0
- package/containers/LanguageProvider/tests/selectors.test.js +15 -0
- package/containers/Line/Create/_lineCreate.scss +54 -0
- package/containers/Line/Create/actions.js +90 -0
- package/containers/Line/Create/constants.js +39 -0
- package/containers/Line/Create/index.js +836 -0
- package/containers/Line/Create/messages.js +189 -0
- package/containers/Line/Create/reducer.js +99 -0
- package/containers/Line/Create/sagas.js +121 -0
- package/containers/Line/Create/selectors.js +36 -0
- package/containers/Line/Create/tests/saga.test.js +202 -0
- package/containers/Line/Edit/_lineEdit.scss +35 -0
- package/containers/Line/Edit/actions.js +79 -0
- package/containers/Line/Edit/constants.js +27 -0
- package/containers/Line/Edit/index.js +1050 -0
- package/containers/Line/Edit/messages.js +177 -0
- package/containers/Line/Edit/reducer.js +83 -0
- package/containers/Line/Edit/sagas.js +80 -0
- package/containers/Line/Edit/selectors.js +29 -0
- package/containers/Line/Edit/test/saga.test.js +160 -0
- package/containers/Login/assets/images/capillary_logo.png +0 -0
- package/containers/Login/components/LoginForm/index.js +62 -0
- package/containers/Login/components/LoginForm/messages.js +33 -0
- package/containers/Login/index.js +130 -0
- package/containers/Login/messages.js +25 -0
- package/containers/Login/selectors.js +25 -0
- package/containers/MobilePush/Create/_mobilePushCreate.scss +39 -0
- package/containers/MobilePush/Create/actions.js +46 -0
- package/containers/MobilePush/Create/constants.js +23 -0
- package/containers/MobilePush/Create/index.js +2303 -0
- package/containers/MobilePush/Create/messages.js +269 -0
- package/containers/MobilePush/Create/reducer.js +70 -0
- package/containers/MobilePush/Create/sagas.js +74 -0
- package/containers/MobilePush/Create/selectors.js +28 -0
- package/containers/MobilePush/Create/test/saga.test.js +19 -0
- package/containers/MobilePush/Edit/_mobilePushCreate.scss +39 -0
- package/containers/MobilePush/Edit/actions.js +91 -0
- package/containers/MobilePush/Edit/constants.js +35 -0
- package/containers/MobilePush/Edit/index.js +2601 -0
- package/containers/MobilePush/Edit/messages.js +266 -0
- package/containers/MobilePush/Edit/reducer.js +112 -0
- package/containers/MobilePush/Edit/sagas.js +126 -0
- package/containers/MobilePush/Edit/selectors.js +29 -0
- package/containers/MobilePush/Edit/tests/saga.test.js +255 -0
- package/containers/NotFoundPage/index.js +25 -0
- package/containers/NotFoundPage/messages.js +13 -0
- package/containers/NotFoundPage/tests/index.test.js +17 -0
- package/containers/Sms/Create/_smsCreate.scss +42 -0
- package/containers/Sms/Create/actions.js +27 -0
- package/containers/Sms/Create/constants.js +16 -0
- package/containers/Sms/Create/index.js +1488 -0
- package/containers/Sms/Create/messages.js +109 -0
- package/containers/Sms/Create/reducer.js +41 -0
- package/containers/Sms/Create/sagas.js +40 -0
- package/containers/Sms/Create/selectors.js +28 -0
- package/containers/Sms/Create/test/saga.test.js +11 -0
- package/containers/Sms/Edit/actions.js +40 -0
- package/containers/Sms/Edit/constants.js +17 -0
- package/containers/Sms/Edit/index.js +1472 -0
- package/containers/Sms/Edit/messages.js +105 -0
- package/containers/Sms/Edit/reducer.js +50 -0
- package/containers/Sms/Edit/sagas.js +60 -0
- package/containers/Sms/Edit/selectors.js +32 -0
- package/containers/Sms/Edit/test/saga.test.js +13 -0
- package/containers/TagList/_tagList.scss +8 -0
- package/containers/TagList/actions.js +15 -0
- package/containers/TagList/constants.js +32 -0
- package/containers/TagList/index.js +236 -0
- package/containers/TagList/messages.js +13 -0
- package/containers/TagList/reducer.js +23 -0
- package/containers/TagList/sagas.js +11 -0
- package/containers/TagList/selectors.js +25 -0
- package/containers/Templates/_templates.scss +333 -0
- package/containers/Templates/actions.js +103 -0
- package/containers/Templates/constants.js +60 -0
- package/containers/Templates/index.js +1756 -0
- package/containers/Templates/messages.js +337 -0
- package/containers/Templates/reducer.js +142 -0
- package/containers/Templates/sagas.js +163 -0
- package/containers/Templates/selectors.js +28 -0
- package/containers/Templates/test/saga.test.js +241 -0
- package/containers/WeChat/MapTemplates/_mapTemplates.scss +8 -0
- package/containers/WeChat/MapTemplates/actions.js +52 -0
- package/containers/WeChat/MapTemplates/constants.js +28 -0
- package/containers/WeChat/MapTemplates/index.js +1610 -0
- package/containers/WeChat/MapTemplates/messages.js +157 -0
- package/containers/WeChat/MapTemplates/reducer.js +74 -0
- package/containers/WeChat/MapTemplates/sagas.js +84 -0
- package/containers/WeChat/MapTemplates/selectors.js +25 -0
- package/containers/WeChat/MapTemplates/test/saga.test.js +155 -0
- package/containers/WeChat/RichmediaTemplates/Create/_createRichmedia.scss +57 -0
- package/containers/WeChat/RichmediaTemplates/Create/actions.js +36 -0
- package/containers/WeChat/RichmediaTemplates/Create/constants.js +15 -0
- package/containers/WeChat/RichmediaTemplates/Create/index.js +1071 -0
- package/containers/WeChat/RichmediaTemplates/Create/messages.js +165 -0
- package/containers/WeChat/RichmediaTemplates/Create/reducer.js +60 -0
- package/containers/WeChat/RichmediaTemplates/Create/richmediaschema.js +497 -0
- package/containers/WeChat/RichmediaTemplates/Create/sagas.js +51 -0
- package/containers/WeChat/RichmediaTemplates/Create/selectors.js +37 -0
- package/containers/WeChat/RichmediaTemplates/Create/test/saga.test.js +13 -0
- package/containers/WeChat/RichmediaTemplates/Edit/actions.js +20 -0
- package/containers/WeChat/RichmediaTemplates/Edit/constants.js +10 -0
- package/containers/WeChat/RichmediaTemplates/Edit/index.js +136 -0
- package/containers/WeChat/RichmediaTemplates/Edit/messages.js +13 -0
- package/containers/WeChat/RichmediaTemplates/Edit/reducer.js +28 -0
- package/containers/WeChat/RichmediaTemplates/Edit/sagas.js +36 -0
- package/containers/WeChat/RichmediaTemplates/Edit/selectors.js +30 -0
- package/containers/WeChat/RichmediaTemplates/Edit/test/saga.test.js +12 -0
- package/containers/WeChat/RichmediaTemplates/View/actions.js +15 -0
- package/containers/WeChat/RichmediaTemplates/View/constants.js +7 -0
- package/containers/WeChat/RichmediaTemplates/View/index.js +47 -0
- package/containers/WeChat/RichmediaTemplates/View/messages.js +21 -0
- package/containers/WeChat/RichmediaTemplates/View/reducer.js +23 -0
- package/containers/WeChat/RichmediaTemplates/View/sagas.js +11 -0
- package/containers/WeChat/RichmediaTemplates/View/selectors.js +25 -0
- package/index.js +2 -4
- package/package.json +1 -1
- package/routes.js +202 -136
- package/services/getSchema.js +1 -1
- package/services/localStorageApi.js +0 -1
- package/tests/i18n.test.js +1 -1
- package/utils/asyncInjectors.js +78 -0
- package/utils/authWrapper.js +1 -1
- package/utils/callNativeEvent.js +16 -0
- package/utils/checkStore.js +21 -0
- package/utils/common.js +2 -2
- package/utils/customAuthWrapper.js +62 -0
- package/utils/customConnectedAuthWrapper.js +26 -0
- package/utils/tagValidations.js +1 -1
- package/utils/tests/checkStore.test.js +1 -1
- package/utils/tests/customAuth.test.js +1 -1
- package/utils/transformerUtils.js +195 -1
- package/v2Components/CapTagList/index.js +14 -9
- package/v2Components/Carousel/style.scss +1 -1
- package/v2Components/EmailMobilePreview/index.js +2 -2
- package/v2Components/FormBuilder/index.js +2 -2
- package/v2Components/TemplatePreview/index.js +1 -2
- package/v2Containers/Cap/tests/saga.test.js +1 -1
- package/v2Containers/Email/index.js +1 -1
- package/v2Containers/FTP/index.js +1 -1
- package/v2Containers/Line/Container/Text/index.js +6 -6
- package/v2Containers/Sms/Create/index.js +2 -2
- package/v2Containers/Sms/Edit/index.js +1 -1
- package/v2Containers/TagList/index.js +1 -1
- package/v2Containers/TagList/utils.js +1 -1
- package/v2Containers/Templates/index.js +1 -1
- package/v2Containers/Templates/sagas.js +1 -1
- package/constants/unified.js +0 -189
|
@@ -7,13 +7,16 @@ import {
|
|
|
7
7
|
WHATSAPP,
|
|
8
8
|
PUSH,
|
|
9
9
|
ZALO,
|
|
10
|
+
RCS,
|
|
11
|
+
LINE,
|
|
12
|
+
VIBER,
|
|
10
13
|
EMF,
|
|
11
14
|
VENENO,
|
|
12
15
|
TEXT,
|
|
13
16
|
IOS,
|
|
14
17
|
ANDROID,
|
|
15
18
|
EXTERNAL_URL,
|
|
16
|
-
BIG_TEXT
|
|
19
|
+
BIG_TEXT
|
|
17
20
|
} from "../v2Containers/CreativesContainer/constants";
|
|
18
21
|
|
|
19
22
|
// Creates a base payload structure common to all channels
|
|
@@ -54,6 +57,12 @@ export const transformChannelPayload = (data, options = {}) => {
|
|
|
54
57
|
return transformWhatsappPayload(data, options);
|
|
55
58
|
case ZALO:
|
|
56
59
|
return transformZaloPayload(data, options);
|
|
60
|
+
case RCS:
|
|
61
|
+
return transformRcsPayload(data, options);
|
|
62
|
+
case LINE:
|
|
63
|
+
return transformLinePayload(data, options);
|
|
64
|
+
case VIBER:
|
|
65
|
+
return transformViberPayload(data, options);
|
|
57
66
|
default:
|
|
58
67
|
return data; // Return unchanged for unsupported channels
|
|
59
68
|
}
|
|
@@ -231,6 +240,90 @@ const transformZaloPayload = (zaloData, options = {}) => {
|
|
|
231
240
|
return payload;
|
|
232
241
|
};
|
|
233
242
|
|
|
243
|
+
/**
|
|
244
|
+
* Transforms RCS data to the required payload format
|
|
245
|
+
* @param {Object} rcsData - Current RCS data
|
|
246
|
+
* @param {Object} options - Additional options (ouId, sourceEntityId, etc.)
|
|
247
|
+
* @returns {Object} - Transformed RCS payload
|
|
248
|
+
*/
|
|
249
|
+
// TODO: RCS is currently not supported by the CCS - BE. We need to make changes in future as per the BE changes.
|
|
250
|
+
const transformRcsPayload = (rcsData, options = {}) => {
|
|
251
|
+
const { loyaltyMetaData = {} } = options;
|
|
252
|
+
const { transformedMessageDetails = {} } = loyaltyMetaData;
|
|
253
|
+
const { rcsDeliverySettings = {} } = transformedMessageDetails;
|
|
254
|
+
|
|
255
|
+
// Get base payload structure
|
|
256
|
+
const payload = createBasePayload(RCS, loyaltyMetaData);
|
|
257
|
+
|
|
258
|
+
// Add RCS-specific properties
|
|
259
|
+
payload.centralCommsPayload.rcsMessageContent = {
|
|
260
|
+
channel: RCS,
|
|
261
|
+
messageBody: "",
|
|
262
|
+
accountId: rcsData?.accountId || "",
|
|
263
|
+
accountName: rcsData?.accountName || "",
|
|
264
|
+
...rcsData,
|
|
265
|
+
// Ensure templateConfigs is preserved (it might contain complex nested objects)
|
|
266
|
+
templateConfigs: rcsData?.templateConfigs || {},
|
|
267
|
+
};
|
|
268
|
+
payload.centralCommsPayload.rcsDeliverySettings = rcsDeliverySettings || {};
|
|
269
|
+
|
|
270
|
+
return payload;
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Transforms LINE data to the required payload format
|
|
275
|
+
* @param {Object} lineData - Current LINE data
|
|
276
|
+
* @param {Object} options - Additional options (ouId, sourceEntityId, etc.)
|
|
277
|
+
* @returns {Object} - Transformed LINE payload
|
|
278
|
+
*/
|
|
279
|
+
const transformLinePayload = (lineData, options = {}) => {
|
|
280
|
+
const { loyaltyMetaData = {} } = options;
|
|
281
|
+
const { transformedMessageDetails = {} } = loyaltyMetaData;
|
|
282
|
+
const { lineDeliverySettings = {} } = transformedMessageDetails;
|
|
283
|
+
|
|
284
|
+
// Get base payload structure
|
|
285
|
+
const payload = createBasePayload(LINE, loyaltyMetaData);
|
|
286
|
+
|
|
287
|
+
// Add LINE-specific properties
|
|
288
|
+
payload.centralCommsPayload.lineMessageContent = {
|
|
289
|
+
channel: LINE,
|
|
290
|
+
accountId: lineData?.accountId || 0,
|
|
291
|
+
accountDetails: lineData?.accountDetails || "",
|
|
292
|
+
messageBody: lineData?.messageBody || "",
|
|
293
|
+
...lineData,
|
|
294
|
+
};
|
|
295
|
+
payload.centralCommsPayload.lineDeliverySettings = lineDeliverySettings || {};
|
|
296
|
+
|
|
297
|
+
return payload;
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Transforms VIBER data to the required payload format
|
|
302
|
+
* @param {Object} viberData - Current VIBER data
|
|
303
|
+
* @param {Object} options - Additional options (ouId, sourceEntityId, etc.)
|
|
304
|
+
* @returns {Object} - Transformed VIBER payload
|
|
305
|
+
*/
|
|
306
|
+
const transformViberPayload = (viberData, options = {}) => {
|
|
307
|
+
const { loyaltyMetaData = {} } = options;
|
|
308
|
+
const { transformedMessageDetails = {} } = loyaltyMetaData;
|
|
309
|
+
const { viberDeliverySettings = {} } = transformedMessageDetails;
|
|
310
|
+
|
|
311
|
+
// Get base payload structure
|
|
312
|
+
const payload = createBasePayload(VIBER, loyaltyMetaData);
|
|
313
|
+
|
|
314
|
+
// Add VIBER-specific properties
|
|
315
|
+
payload.centralCommsPayload.viberMessageContent = {
|
|
316
|
+
channel: VIBER,
|
|
317
|
+
accountId: viberData?.accountId || 0,
|
|
318
|
+
accountDetails: viberData?.accountDetails || "",
|
|
319
|
+
messageBody: viberData?.messageBody || "",
|
|
320
|
+
...viberData,
|
|
321
|
+
};
|
|
322
|
+
payload.centralCommsPayload.viberDeliverySettings = viberDeliverySettings || {};
|
|
323
|
+
|
|
324
|
+
return payload;
|
|
325
|
+
};
|
|
326
|
+
|
|
234
327
|
// Checks if the template has changed
|
|
235
328
|
export const getTemplateDiffState = (channel, oldData, newData) => {
|
|
236
329
|
switch (channel.toUpperCase()) {
|
|
@@ -245,6 +338,13 @@ export const getTemplateDiffState = (channel, oldData, newData) => {
|
|
|
245
338
|
return checkWhatsappDiff(oldData, newData);
|
|
246
339
|
case ZALO:
|
|
247
340
|
return checkZaloDiff(oldData, newData);
|
|
341
|
+
case LINE:
|
|
342
|
+
return checkLineDiff(oldData, newData);
|
|
343
|
+
case VIBER:
|
|
344
|
+
return checkViberDiff(oldData, newData);
|
|
345
|
+
// TODO: RCS is currently not supported by the CCS - BE. We need to make changes in future as per the BE changes.
|
|
346
|
+
// case RCS:
|
|
347
|
+
// return checkRcsDiff(oldData, newData);
|
|
248
348
|
default:
|
|
249
349
|
return false;
|
|
250
350
|
}
|
|
@@ -418,3 +518,97 @@ const checkZaloDiff = (oldData, newData) => {
|
|
|
418
518
|
// Use deep comparison for template configs
|
|
419
519
|
return !isEqual(oldTemplateConfigs, newTemplateConfigs);
|
|
420
520
|
};
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Checks differences between old and new RCS data
|
|
524
|
+
* @param {Object} oldData - Previous RCS template data
|
|
525
|
+
* @param {Object} newData - Updated RCS template data
|
|
526
|
+
* @returns {Boolean} - Whether the template has changed
|
|
527
|
+
*/
|
|
528
|
+
// TODO: RCS is currently not supported by the CCS - BE. We need to make changes in future as per the BE changes.
|
|
529
|
+
const checkRcsDiff = (oldData, newData) => {
|
|
530
|
+
// Extract old RCS content
|
|
531
|
+
const oldTemplateConfigs =
|
|
532
|
+
oldData?.transformedMessageDetails?.rcsMessageContent?.templateConfigs ||
|
|
533
|
+
{};
|
|
534
|
+
const oldAccountId =
|
|
535
|
+
oldData?.transformedMessageDetails?.rcsMessageContent?.accountId || "";
|
|
536
|
+
const oldAccountName =
|
|
537
|
+
oldData?.transformedMessageDetails?.rcsMessageContent?.accountName || "";
|
|
538
|
+
|
|
539
|
+
// Extract new RCS content
|
|
540
|
+
const newTemplateConfigs = newData?.templateConfigs || {};
|
|
541
|
+
const newAccountId = newData?.accountId || "";
|
|
542
|
+
const newAccountName = newData?.accountName || "";
|
|
543
|
+
|
|
544
|
+
// Compare simple properties for quick rejection
|
|
545
|
+
if (oldAccountId !== newAccountId) return true;
|
|
546
|
+
if (oldAccountName !== newAccountName) return true;
|
|
547
|
+
|
|
548
|
+
// If template configs have different structures, they've changed
|
|
549
|
+
if (
|
|
550
|
+
Object.keys(newTemplateConfigs).length !==
|
|
551
|
+
Object.keys(oldTemplateConfigs).length
|
|
552
|
+
) {
|
|
553
|
+
return true;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
// Use deep comparison for template configs
|
|
557
|
+
return !isEqual(oldTemplateConfigs, newTemplateConfigs);
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Checks differences between old and new LINE data
|
|
562
|
+
* @param {Object} oldData - Previous LINE template data
|
|
563
|
+
* @param {Object} newData - Updated LINE template data
|
|
564
|
+
* @returns {Boolean} - Whether the template has changed
|
|
565
|
+
*/
|
|
566
|
+
const checkLineDiff = (oldData, newData) => {
|
|
567
|
+
// Extract old LINE content
|
|
568
|
+
const oldMessageBody =
|
|
569
|
+
oldData?.transformedMessageDetails?.lineMessageContent?.messageBody || "";
|
|
570
|
+
const oldAccountId =
|
|
571
|
+
oldData?.transformedMessageDetails?.lineMessageContent?.accountId || "";
|
|
572
|
+
const oldAccountDetails =
|
|
573
|
+
oldData?.transformedMessageDetails?.lineMessageContent?.accountDetails || "";
|
|
574
|
+
|
|
575
|
+
// Extract new LINE content
|
|
576
|
+
const newMessageBody = newData?.messageBody || "";
|
|
577
|
+
const newAccountId = newData?.accountId || "";
|
|
578
|
+
const newAccountDetails = newData?.accountDetails || "";
|
|
579
|
+
|
|
580
|
+
// Compare simple properties for quick rejection
|
|
581
|
+
if (oldMessageBody !== newMessageBody) return true;
|
|
582
|
+
if (oldAccountId !== newAccountId) return true;
|
|
583
|
+
if (oldAccountDetails !== newAccountDetails) return true;
|
|
584
|
+
|
|
585
|
+
return false;
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Checks differences between old and new VIBER data
|
|
590
|
+
* @param {Object} oldData - Previous VIBER template data
|
|
591
|
+
* @param {Object} newData - Updated VIBER template data
|
|
592
|
+
* @returns {Boolean} - Whether the template has changed
|
|
593
|
+
*/
|
|
594
|
+
const checkViberDiff = (oldData, newData) => {
|
|
595
|
+
// Extract old VIBER content
|
|
596
|
+
const oldMessageBody =
|
|
597
|
+
oldData?.transformedMessageDetails?.viberMessageContent?.messageBody || "";
|
|
598
|
+
const oldAccountId =
|
|
599
|
+
oldData?.transformedMessageDetails?.viberMessageContent?.accountId || "";
|
|
600
|
+
const oldAccountDetails =
|
|
601
|
+
oldData?.transformedMessageDetails?.viberMessageContent?.accountDetails || "";
|
|
602
|
+
|
|
603
|
+
// Extract new VIBER content
|
|
604
|
+
const newMessageBody = newData?.messageBody || "";
|
|
605
|
+
const newAccountId = newData?.accountId || "";
|
|
606
|
+
const newAccountDetails = newData?.accountDetails || "";
|
|
607
|
+
|
|
608
|
+
// Compare simple properties for quick rejection
|
|
609
|
+
if (oldMessageBody !== newMessageBody) return true;
|
|
610
|
+
if (oldAccountId !== newAccountId) return true;
|
|
611
|
+
if (oldAccountDetails !== newAccountDetails) return true;
|
|
612
|
+
|
|
613
|
+
return false;
|
|
614
|
+
};
|
|
@@ -30,8 +30,15 @@ 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
|
|
33
|
+
import { CARD_RELATED_TAGS, HOSPITALITY_RELATED_TAGS, CUSTOMER_BARCODE_TAG } from '../../containers/App/constants';
|
|
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";
|
|
35
42
|
import { EMAIL, JP_LOCALE_HIDE_FEATURE, LOYALTY } from '../../v2Containers/App/constants';
|
|
36
43
|
import { hidingDateTagsForJpLocale } from '../../v2Containers/TagList/utils';
|
|
37
44
|
|
|
@@ -125,10 +132,9 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
125
132
|
getSearchedExpandedKeys(tags, value = '') {
|
|
126
133
|
let list = [];
|
|
127
134
|
_.forEach(tags, (val = {}, key) => {
|
|
128
|
-
const tagName =
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
: _.toLower(_.get(val, "name.props.defaultMessage", ""));
|
|
135
|
+
const tagName = typeof val?.name === STRING
|
|
136
|
+
? _.toLower(_.get(val, "name", ""))
|
|
137
|
+
: _.toLower(_.get(val, "name.props.defaultMessage", ""));
|
|
132
138
|
const tagNameWithoutUnderscore = tagName.replace(/_/g, " ");
|
|
133
139
|
const searchStringLower = _.toLower(value);
|
|
134
140
|
if (_.has(val, "subtags")) {
|
|
@@ -261,10 +267,9 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
261
267
|
supportedTagsString += `${supportedTag} ,`;
|
|
262
268
|
});
|
|
263
269
|
supportedTagsString = supportedTagsString.replace(/,\s*$/, "");
|
|
264
|
-
const tagName =
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
: _.toLower(_.get(val, "name.props.defaultMessage", ""));
|
|
270
|
+
const tagName = typeof val?.name === STRING
|
|
271
|
+
? _.toLower(_.get(val, "name", ""))
|
|
272
|
+
: _.toLower(_.get(val, "name.props.defaultMessage", ""));
|
|
268
273
|
const tagNameWithoutUnderscore = tagName.replace(/_/g, " ");
|
|
269
274
|
const searchStringLower = _.toLower(searchString);
|
|
270
275
|
const tagContainsSearchedString = searchStringLower
|
|
@@ -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 '../../
|
|
23
|
-
import * as templateActions from '../../
|
|
22
|
+
import {selectTemplateContent} from '../../containers/Templates/selectors';
|
|
23
|
+
import * as templateActions from '../../containers/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 '../../constants
|
|
56
|
+
import { GET_TRANSLATION_MAPPED } from '../../containers/TagList/constants';
|
|
57
57
|
import moment from 'moment';
|
|
58
|
-
import { CUSTOMER_BARCODE_TAG , COPY_OF, ENTRY_TRIGGER_TAG_REGEX} from '../../constants
|
|
58
|
+
import { CUSTOMER_BARCODE_TAG , COPY_OF, ENTRY_TRIGGER_TAG_REGEX} from '../../containers/App/constants';
|
|
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,11 +32,10 @@ import {
|
|
|
32
32
|
RCS,
|
|
33
33
|
ZALO,
|
|
34
34
|
INAPP,
|
|
35
|
-
VIBER,
|
|
36
|
-
FACEBOOK,
|
|
37
35
|
MOBILE_PUSH
|
|
38
36
|
} from '../../v2Containers/CreativesContainer/constants';
|
|
39
37
|
import Carousel from '../Carousel';
|
|
38
|
+
import { VIBER, FACEBOOK } from '../../v2Containers/App/constants';
|
|
40
39
|
import whatsappMobileAndroid from './assets/images/whatsapp_mobile_android.svg';
|
|
41
40
|
import inAppMobileAndroidModal from './assets/images/inapp_mobile_android_modal.svg';
|
|
42
41
|
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_SUCCESS } from '../../../constants
|
|
39
|
+
import { LOGOUT_FAILURE, LOGOUT_REQUEST, LOGOUT_SUCCESS } from '../../../containers/Cap/constants';
|
|
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 '../../constants
|
|
40
|
+
import { CUSTOMER_BARCODE_TAG } from '../../containers/App/constants';
|
|
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 '
|
|
32
|
+
import * as globalActions from '../../containers/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 '../../../../constants
|
|
20
|
+
import { GET_TRANSLATION_MAPPED } from '../../../../containers/TagList/constants';
|
|
21
21
|
|
|
22
22
|
const { TextArea } = CapInput;
|
|
23
23
|
const {CapCustomCardList} = CapCustomCard;
|
|
@@ -59,7 +59,7 @@ export const LineText = ({
|
|
|
59
59
|
const [translationLang, updateTranslationLang] = useState('en');
|
|
60
60
|
|
|
61
61
|
useEffect(() => {
|
|
62
|
-
const { messageTitle = '', messageContent = '', type, isInit } = content;
|
|
62
|
+
const { messageTitle = '', messageContent = '', type, isInit } = content || {};
|
|
63
63
|
if (type === 'text') {
|
|
64
64
|
if (messageContent) {
|
|
65
65
|
updateCreateNew(true);
|
|
@@ -104,11 +104,11 @@ export const LineText = ({
|
|
|
104
104
|
layout: 'LINE',
|
|
105
105
|
type: 'TAG',
|
|
106
106
|
context:
|
|
107
|
-
location
|
|
107
|
+
location?.query?.type === 'embedded'
|
|
108
108
|
? 'outbound'
|
|
109
109
|
: 'default',
|
|
110
110
|
embedded:
|
|
111
|
-
location
|
|
111
|
+
location?.query?.type === 'embedded'
|
|
112
112
|
? location.query.type
|
|
113
113
|
: 'full',
|
|
114
114
|
};
|
|
@@ -125,7 +125,7 @@ export const LineText = ({
|
|
|
125
125
|
context:
|
|
126
126
|
(data || '').toLowerCase() === 'all' ? 'default' : (data || '').toLowerCase(),
|
|
127
127
|
embedded:
|
|
128
|
-
location
|
|
128
|
+
location?.query?.type === 'embedded'
|
|
129
129
|
? location.query.type
|
|
130
130
|
: 'full',
|
|
131
131
|
};
|
|
@@ -266,7 +266,7 @@ export const LineText = ({
|
|
|
266
266
|
/>
|
|
267
267
|
<TagList
|
|
268
268
|
key={`${id}_tags`}
|
|
269
|
-
moduleFilterEnabled={location && location
|
|
269
|
+
moduleFilterEnabled={location && location?.query && location?.query?.type !== 'embedded'}
|
|
270
270
|
label={formatMessage(messages.addLabels)}
|
|
271
271
|
onTagSelect={onTagSelect}
|
|
272
272
|
onContextChange={handleOnTagsContextChange}
|
|
@@ -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 '../../../utils/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 '../../../
|
|
27
|
+
// import callNativeEvent from '../../../utils/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 '../../../
|
|
27
|
+
// import callNativeEvent from '../../../utils/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 '../../constants
|
|
31
|
+
} from '../../containers/App/constants';
|
|
32
32
|
|
|
33
33
|
const {TreeNode} = Tree;
|
|
34
34
|
|
|
@@ -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 '../../constants
|
|
107
|
+
import { COPY_OF } from '../../containers/App/constants';
|
|
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 '../../constants
|
|
9
|
+
import { COPY_OF } from '../../containers/App/constants';
|
|
10
10
|
import { ZALO_TEMPLATE_INFO_REQUEST } from '../Zalo/constants';
|
|
11
11
|
import { getTemplateInfoById } from '../Zalo/saga';
|
|
12
12
|
import { watchCreateTemplate } from '../MobilePushNew/sagas';
|
package/constants/unified.js
DELETED
|
@@ -1,189 +0,0 @@
|
|
|
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';
|