@capillarytech/creatives-library 8.0.123 → 8.0.125-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.
- package/containers/App/constants.js +1 -0
- package/package.json +1 -1
- package/services/api.js +1 -1
- package/tests/integration/TemplateCreation/TemplateCreation.integration.test.js +8 -3
- package/tests/integration/TemplateCreation/api-response.js +5 -0
- package/tests/integration/TemplateCreation/msw-handler.js +42 -63
- package/utils/common.js +7 -0
- package/utils/commonUtils.js +2 -6
- package/utils/createPayload.js +240 -0
- package/utils/tests/createPayload.test.js +761 -0
- package/v2Components/CapDeviceContent/index.js +1 -0
- package/v2Components/CapImageUpload/index.js +51 -45
- package/v2Components/CapInAppCTA/index.js +1 -0
- package/v2Components/CapMpushCTA/constants.js +25 -0
- package/v2Components/CapMpushCTA/index.js +332 -0
- package/v2Components/CapMpushCTA/index.scss +95 -0
- package/v2Components/CapMpushCTA/messages.js +89 -0
- package/v2Components/CapTagList/index.js +177 -120
- package/v2Components/CapVideoUpload/constants.js +3 -0
- package/v2Components/CapVideoUpload/index.js +167 -110
- package/v2Components/CapVideoUpload/messages.js +16 -0
- package/v2Components/Carousel/index.js +15 -13
- package/v2Components/ErrorInfoNote/style.scss +1 -0
- package/v2Components/MobilePushPreviewV2/index.js +37 -5
- package/v2Components/TemplatePreview/_templatePreview.scss +114 -72
- package/v2Components/TemplatePreview/assets/images/Android _ With date and time.svg +29 -0
- package/v2Components/TemplatePreview/assets/images/android.svg +9 -0
- package/v2Components/TemplatePreview/assets/images/iOS _ With date and time.svg +26 -0
- package/v2Components/TemplatePreview/assets/images/ios.svg +9 -0
- package/v2Components/TemplatePreview/index.js +178 -50
- package/v2Components/TemplatePreview/messages.js +4 -0
- package/v2Containers/CreativesContainer/SlideBoxContent.js +7 -8
- package/v2Containers/CreativesContainer/index.js +194 -138
- package/v2Containers/InApp/constants.js +1 -1
- package/v2Containers/InApp/index.js +13 -13
- package/v2Containers/MobilePush/Create/index.js +1 -0
- package/v2Containers/MobilePushNew/actions.js +116 -0
- package/v2Containers/MobilePushNew/components/CtaButtons.js +170 -0
- package/v2Containers/MobilePushNew/components/MediaUploaders.js +686 -0
- package/v2Containers/MobilePushNew/components/PlatformContentFields.js +279 -0
- package/v2Containers/MobilePushNew/components/index.js +5 -0
- package/v2Containers/MobilePushNew/components/tests/CtaButtons.test.js +779 -0
- package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +2114 -0
- package/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +343 -0
- package/v2Containers/MobilePushNew/constants.js +115 -0
- package/v2Containers/MobilePushNew/hooks/tests/usePlatformSync.test.js +1299 -0
- package/v2Containers/MobilePushNew/hooks/tests/useUpload.test.js +1223 -0
- package/v2Containers/MobilePushNew/hooks/usePlatformSync.js +246 -0
- package/v2Containers/MobilePushNew/hooks/useUpload.js +709 -0
- package/v2Containers/MobilePushNew/index.js +1937 -0
- package/v2Containers/MobilePushNew/index.scss +308 -0
- package/v2Containers/MobilePushNew/messages.js +226 -0
- package/v2Containers/MobilePushNew/reducer.js +160 -0
- package/v2Containers/MobilePushNew/sagas.js +198 -0
- package/v2Containers/MobilePushNew/selectors.js +55 -0
- package/v2Containers/MobilePushNew/tests/reducer.test.js +741 -0
- package/v2Containers/MobilePushNew/tests/sagas.test.js +863 -0
- package/v2Containers/MobilePushNew/tests/selectors.test.js +425 -0
- package/v2Containers/MobilePushNew/tests/utils.test.js +322 -0
- package/v2Containers/MobilePushNew/utils.js +33 -0
- package/v2Containers/Rcs/tests/__snapshots__/index.test.js.snap +5 -5
- package/v2Containers/TagList/index.js +56 -10
- package/v2Containers/Templates/_templates.scss +101 -1
- package/v2Containers/Templates/index.js +147 -35
- package/v2Containers/Templates/messages.js +8 -0
- package/v2Containers/Templates/sagas.js +2 -0
- package/v2Containers/Whatsapp/constants.js +1 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
const prefix = `creatives.componentsV2.CapMpushCTA`;
|
|
3
|
+
export default defineMessages({
|
|
4
|
+
ctaType: {
|
|
5
|
+
id: `${prefix}.ctaType`,
|
|
6
|
+
defaultMessage: 'Type of link',
|
|
7
|
+
},
|
|
8
|
+
urlDeepLink: {
|
|
9
|
+
id: `${prefix}.urlDeepLink`,
|
|
10
|
+
defaultMessage: 'Deep link',
|
|
11
|
+
},
|
|
12
|
+
urlExternalLink: {
|
|
13
|
+
id: `${prefix}.urlExternalLink`,
|
|
14
|
+
defaultMessage: 'External link',
|
|
15
|
+
},
|
|
16
|
+
ctaButtonText: {
|
|
17
|
+
id: `${prefix}.ctaButtonText`,
|
|
18
|
+
defaultMessage: 'Primary button text',
|
|
19
|
+
},
|
|
20
|
+
ctaButtonTextSecondary: {
|
|
21
|
+
id: `${prefix}.ctaButtonTextSecondary`,
|
|
22
|
+
defaultMessage: 'Secondary button text',
|
|
23
|
+
},
|
|
24
|
+
ctaDeepLinkOptionsPlaceholder: {
|
|
25
|
+
id: `${prefix}.ctaDeepLinkOptionsPlaceholder`,
|
|
26
|
+
defaultMessage: 'Select deep link',
|
|
27
|
+
},
|
|
28
|
+
ctaExternalLinkPlaceholder: {
|
|
29
|
+
id: `${prefix}.ctaExternalLinkPlaceholder`,
|
|
30
|
+
defaultMessage: 'Enter the external link',
|
|
31
|
+
},
|
|
32
|
+
ctaButtonTextPlaceholder: {
|
|
33
|
+
id: `${prefix}.ctaButtonTextPlaceholder`,
|
|
34
|
+
defaultMessage: 'Enter button text',
|
|
35
|
+
},
|
|
36
|
+
ctaWebsiteType: {
|
|
37
|
+
id: `${prefix}.ctaWebsiteType`,
|
|
38
|
+
defaultMessage: 'URL Type',
|
|
39
|
+
},
|
|
40
|
+
ctaLinkTypeDeep: {
|
|
41
|
+
id: `${prefix}.ctaLinkTypeDeep`,
|
|
42
|
+
defaultMessage: 'Deep link',
|
|
43
|
+
},
|
|
44
|
+
ctaLinkTypeExternal: {
|
|
45
|
+
id: `${prefix}.ctaLinkTypeExternal`,
|
|
46
|
+
defaultMessage: 'External link',
|
|
47
|
+
},
|
|
48
|
+
ctaWebsiteUrl: {
|
|
49
|
+
id: `${prefix}.ctaWebsiteUrl`,
|
|
50
|
+
defaultMessage: 'Website URL',
|
|
51
|
+
},
|
|
52
|
+
ctaStaticPlaceholder: {
|
|
53
|
+
id: `${prefix}.ctaStaticPlaceholder`,
|
|
54
|
+
defaultMessage: 'Enter website URL',
|
|
55
|
+
},
|
|
56
|
+
ctaWebsiteUrlErrorMessage: {
|
|
57
|
+
id: `${prefix}.ctaWebsiteUrlErrorMessage`,
|
|
58
|
+
defaultMessage: 'URL is not valid',
|
|
59
|
+
},
|
|
60
|
+
ctaButtonErrorMessage: {
|
|
61
|
+
id: `${prefix}.ctaButtonErrorMessage`,
|
|
62
|
+
defaultMessage: "Newlines, Emojis, or Special characters are not allowed",
|
|
63
|
+
},
|
|
64
|
+
ctaSaveDisabled: {
|
|
65
|
+
id: `${prefix}.ctaSaveDisabled`,
|
|
66
|
+
defaultMessage: 'Please complete the above fields to enable button',
|
|
67
|
+
},
|
|
68
|
+
ctaButtonTextTooltip: {
|
|
69
|
+
id: `${prefix}.ctaButtonTextTooltip`,
|
|
70
|
+
defaultMessage:
|
|
71
|
+
'Use this to name the button. We would recommend not to use special characters for the button text.',
|
|
72
|
+
},
|
|
73
|
+
ctaOptionDisabledTooltipDeepLink: {
|
|
74
|
+
id: `${prefix}.ctaOptionDisabledTooltipDeepLink`,
|
|
75
|
+
defaultMessage: 'A page within the mobile app',
|
|
76
|
+
},
|
|
77
|
+
ctaOptionDisabledTooltipExternalLink: {
|
|
78
|
+
id: `${prefix}.ctaOptionDisabledTooltipExternalLink`,
|
|
79
|
+
defaultMessage: 'An external web page',
|
|
80
|
+
},
|
|
81
|
+
staticUrlWithVarErrorMessage: {
|
|
82
|
+
id: `${prefix}.staticUrlWithVarErrorMessage`,
|
|
83
|
+
defaultMessage: 'Button with url type as static cannot contain variables',
|
|
84
|
+
},
|
|
85
|
+
useTwoBracketsOnly: {
|
|
86
|
+
id: `${prefix}.useTwoBracketsOnly`,
|
|
87
|
+
defaultMessage: 'Use two brackets on each side to declare a variable',
|
|
88
|
+
},
|
|
89
|
+
});
|
|
@@ -58,14 +58,19 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
58
58
|
dynamicDateValue: '',
|
|
59
59
|
showModal: false,
|
|
60
60
|
translationLang: '',
|
|
61
|
-
tagsList: []
|
|
61
|
+
tagsList: [],
|
|
62
|
+
selectedContext: 'Outbound',
|
|
63
|
+
isLoadingLoyaltyTags: false,
|
|
64
|
+
isLoadingContextChange: false,
|
|
62
65
|
};
|
|
63
66
|
this.renderTags = this.renderTags.bind(this);
|
|
64
67
|
this.getSearchedExpandedKeys = this.getSearchedExpandedKeys.bind(this);
|
|
65
68
|
}
|
|
69
|
+
|
|
66
70
|
getTranslationMappedLocale(locale) {
|
|
67
71
|
return GET_TRANSLATION_MAPPED?.[locale];
|
|
68
72
|
}
|
|
73
|
+
|
|
69
74
|
componentDidMount() {
|
|
70
75
|
const user = localStorage.getItem('user');
|
|
71
76
|
let locale = 'en';
|
|
@@ -79,17 +84,36 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
79
84
|
});
|
|
80
85
|
}
|
|
81
86
|
|
|
82
|
-
componentDidUpdate(prevProps, prevState){
|
|
87
|
+
componentDidUpdate(prevProps, prevState) {
|
|
83
88
|
if (this.props.tags !== prevProps.tags || this.state.searchValue !== prevState.searchValue) {
|
|
84
|
-
|
|
89
|
+
const temp = this.renderTags(this.props.tags, this.state.searchValue);
|
|
90
|
+
this.setState({
|
|
91
|
+
tagsList: temp,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Reset loading states when tags are received after context change
|
|
96
|
+
if ((this.state.isLoadingLoyaltyTags || this.state.isLoadingContextChange)
|
|
97
|
+
&& this.props.tags !== prevProps.tags) {
|
|
85
98
|
this.setState({
|
|
86
|
-
|
|
99
|
+
isLoadingLoyaltyTags: false,
|
|
100
|
+
isLoadingContextChange: false,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Backup: Reset loading states if props.loading changed from true to false
|
|
105
|
+
// This handles cases where the API doesn't return different tags but injectedTags change
|
|
106
|
+
if (prevProps.loading === true && this.props.loading === false
|
|
107
|
+
&& (this.state.isLoadingLoyaltyTags || this.state.isLoadingContextChange)) {
|
|
108
|
+
this.setState({
|
|
109
|
+
isLoadingLoyaltyTags: false,
|
|
110
|
+
isLoadingContextChange: false,
|
|
87
111
|
});
|
|
88
112
|
}
|
|
89
113
|
}
|
|
90
114
|
|
|
91
115
|
onChange = (e) => {
|
|
92
|
-
const value = e.target
|
|
116
|
+
const {value} = e.target;
|
|
93
117
|
let expandedKeys = this.getSearchedExpandedKeys(this.props.tags, value);
|
|
94
118
|
if (value === '') {
|
|
95
119
|
expandedKeys = [];
|
|
@@ -100,6 +124,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
100
124
|
autoExpandParent: true,
|
|
101
125
|
});
|
|
102
126
|
};
|
|
127
|
+
|
|
103
128
|
onExpand = (expandedKeys, info) => {
|
|
104
129
|
this.handleOnExpand(info.node.props.eventKey);
|
|
105
130
|
};
|
|
@@ -107,26 +132,25 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
107
132
|
getSearchedExpandedKeys(tags, value = '') {
|
|
108
133
|
let list = [];
|
|
109
134
|
_.forEach(tags, (val = {}, key) => {
|
|
110
|
-
const tagName =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
: _.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", ""));
|
|
114
138
|
const tagNameWithoutUnderscore = tagName.replace(/_/g, " ");
|
|
115
139
|
const searchStringLower = _.toLower(value);
|
|
116
140
|
if (_.has(val, "subtags")) {
|
|
117
141
|
if (
|
|
118
|
-
val?.name
|
|
119
|
-
(tagName.includes(searchStringLower)
|
|
120
|
-
tagNameWithoutUnderscore.includes(searchStringLower))
|
|
142
|
+
val?.name
|
|
143
|
+
&& (tagName.includes(searchStringLower)
|
|
144
|
+
|| tagNameWithoutUnderscore.includes(searchStringLower))
|
|
121
145
|
) {
|
|
122
146
|
list.push(key);
|
|
123
147
|
}
|
|
124
148
|
const temp = this.getSearchedExpandedKeys(val?.subtags, value);
|
|
125
149
|
list = list.concat(temp);
|
|
126
150
|
} else if (
|
|
127
|
-
val?.name
|
|
128
|
-
(tagName.includes(searchStringLower)
|
|
129
|
-
tagNameWithoutUnderscore.includes(searchStringLower))
|
|
151
|
+
val?.name
|
|
152
|
+
&& (tagName.includes(searchStringLower)
|
|
153
|
+
|| tagNameWithoutUnderscore.includes(searchStringLower))
|
|
130
154
|
) {
|
|
131
155
|
list.push(key);
|
|
132
156
|
}
|
|
@@ -135,7 +159,21 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
135
159
|
}
|
|
136
160
|
|
|
137
161
|
handleOnChange = (data) => {
|
|
138
|
-
this.
|
|
162
|
+
const { selectedContext } = this.state;
|
|
163
|
+
|
|
164
|
+
// Only proceed if the context has actually changed
|
|
165
|
+
if (selectedContext !== data) {
|
|
166
|
+
// Set loading state for any context change
|
|
167
|
+
this.setState({
|
|
168
|
+
isLoadingContextChange: true,
|
|
169
|
+
selectedContext: data,
|
|
170
|
+
// Keep loyalty-specific loading for backward compatibility
|
|
171
|
+
isLoadingLoyaltyTags: data === 'Loyalty',
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// Call the parent's context change handler
|
|
175
|
+
this.props.onContextChange(data);
|
|
176
|
+
}
|
|
139
177
|
};
|
|
140
178
|
|
|
141
179
|
handleDynamicDateChange = (data) => {
|
|
@@ -192,6 +230,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
192
230
|
}
|
|
193
231
|
this.setState({expandedKeys, autoExpandParent: false});
|
|
194
232
|
};
|
|
233
|
+
|
|
195
234
|
togglePopoverVisibility = (visible) => {
|
|
196
235
|
this.setState({visible});
|
|
197
236
|
};
|
|
@@ -200,9 +239,11 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
200
239
|
this.setState({showModal: true, visible: false});
|
|
201
240
|
};
|
|
202
241
|
|
|
203
|
-
renderTags(tags) {
|
|
242
|
+
renderTags = (tags) => {
|
|
204
243
|
const searchString = this.state.searchValue || '';
|
|
205
|
-
const {
|
|
244
|
+
const {
|
|
245
|
+
disableRelatedTags, childTagsToDisable, parentTagstoDisable,
|
|
246
|
+
} = this?.props?.disableTagsDetails;
|
|
206
247
|
const { accessibleFeatures = [] } = this?.props?.currentOrgDetails || {};
|
|
207
248
|
const hideDateTagsForJpLocale = accessibleFeatures.includes(JP_LOCALE_HIDE_FEATURE);
|
|
208
249
|
const list = [];
|
|
@@ -226,16 +267,14 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
226
267
|
supportedTagsString += `${supportedTag} ,`;
|
|
227
268
|
});
|
|
228
269
|
supportedTagsString = supportedTagsString.replace(/,\s*$/, "");
|
|
229
|
-
const tagName =
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
: _.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", ""));
|
|
233
273
|
const tagNameWithoutUnderscore = tagName.replace(/_/g, " ");
|
|
234
274
|
const searchStringLower = _.toLower(searchString);
|
|
235
|
-
const tagContainsSearchedString =
|
|
236
|
-
searchStringLower
|
|
237
|
-
|
|
238
|
-
tagNameWithoutUnderscore.includes(searchStringLower));
|
|
275
|
+
const tagContainsSearchedString = searchStringLower
|
|
276
|
+
&& (tagName.includes(searchStringLower)
|
|
277
|
+
|| tagNameWithoutUnderscore.includes(searchStringLower));
|
|
239
278
|
if (_.has(val, 'subtags')) {
|
|
240
279
|
const disabled = disableRelatedTags ? parentTagstoDisable.includes(key) : false;
|
|
241
280
|
const temp = this.renderTags(val?.subtags);
|
|
@@ -286,7 +325,8 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
286
325
|
: `${key}`
|
|
287
326
|
}
|
|
288
327
|
disabled={childDisabled}
|
|
289
|
-
|
|
328
|
+
>
|
|
329
|
+
</CapTreeNode>
|
|
290
330
|
);
|
|
291
331
|
hidingDateTagsForJpLocale(
|
|
292
332
|
hideDateTagsForJpLocale,
|
|
@@ -321,7 +361,8 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
321
361
|
: `${key}`
|
|
322
362
|
}
|
|
323
363
|
disabled={childDisabled}
|
|
324
|
-
|
|
364
|
+
>
|
|
365
|
+
</CapTreeNode>
|
|
325
366
|
);
|
|
326
367
|
hidingDateTagsForJpLocale(
|
|
327
368
|
hideDateTagsForJpLocale,
|
|
@@ -334,14 +375,23 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
334
375
|
});
|
|
335
376
|
return list;
|
|
336
377
|
}
|
|
378
|
+
|
|
337
379
|
openTranslationLink = () => {
|
|
338
380
|
window.open(TAG_TRANSLATION_DOC, '_blank');
|
|
339
381
|
}
|
|
382
|
+
|
|
340
383
|
render() {
|
|
341
|
-
const {
|
|
342
|
-
|
|
384
|
+
const {
|
|
385
|
+
hidePopover = false, intl = {}, moduleFilterEnabled, label, modalProps, channel, fetchingSchemaError = false,
|
|
386
|
+
} = this.props;
|
|
343
387
|
const {formatMessage} = intl;
|
|
344
|
-
const {
|
|
388
|
+
const {
|
|
389
|
+
tagValue, expandedKeys, autoExpandParent, visible, translationLang, selectedContext, isLoadingLoyaltyTags, isLoadingContextChange,
|
|
390
|
+
} = this.state;
|
|
391
|
+
|
|
392
|
+
// Show loading spinner if general loading OR if specifically loading loyalty tags OR if context change is in progress
|
|
393
|
+
const shouldShowLoading = this.props.loading || (selectedContext === 'Loyalty' && isLoadingLoyaltyTags) || isLoadingContextChange;
|
|
394
|
+
|
|
345
395
|
const options = [
|
|
346
396
|
{
|
|
347
397
|
value: "Outbound",
|
|
@@ -354,99 +404,106 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
354
404
|
key: 'loyalty',
|
|
355
405
|
},
|
|
356
406
|
];
|
|
357
|
-
const contentSection = (
|
|
358
|
-
<
|
|
359
|
-
<
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
407
|
+
const contentSection = (
|
|
408
|
+
<div>
|
|
409
|
+
<CapSpin tip={formatMessage(messages.gettingTags)} spinning={shouldShowLoading}>
|
|
410
|
+
<Search
|
|
411
|
+
style={{ marginBottom: 8, width: '250px'}}
|
|
412
|
+
placeholder={formatMessage(messages.search)}
|
|
413
|
+
onChange={this.onChange} />
|
|
414
|
+
{moduleFilterEnabled ? (
|
|
415
|
+
<CapSelect
|
|
416
|
+
getPopupContainer={(triggerNode) => triggerNode.parentNode}
|
|
417
|
+
style={{
|
|
418
|
+
width: '250px', marginBottom: '16px', minWidth: 'initial', display: 'inherit',
|
|
419
|
+
}}
|
|
420
|
+
onChange={this.handleOnChange}
|
|
421
|
+
value={selectedContext}
|
|
422
|
+
options={options}>
|
|
423
|
+
</CapSelect>
|
|
424
|
+
) : ''}
|
|
425
|
+
<CapTree
|
|
426
|
+
styling={{height: '350px', overflow: 'auto'}}
|
|
427
|
+
onSelect={this.handleOnSelect}
|
|
428
|
+
selectedKeys={tagValue}
|
|
429
|
+
expandedKeys={expandedKeys}
|
|
430
|
+
autoExpandParent={autoExpandParent}
|
|
431
|
+
onExpand={this.onExpand}
|
|
432
|
+
>
|
|
433
|
+
{/* {this.renderTags(tg, searchValue)} */}
|
|
434
|
+
{this.state.tagsList}
|
|
435
|
+
</CapTree>
|
|
436
|
+
{translationLang === "ja-JP" && (
|
|
437
|
+
<div className="tag-list-footer">
|
|
438
|
+
<CapIcon
|
|
439
|
+
type="help"
|
|
440
|
+
size="s"
|
|
441
|
+
/>
|
|
442
|
+
<CapLink>
|
|
443
|
+
<CapButton id="translationtagfooter" type="flat" onClick={this.openTranslationLink}>
|
|
444
|
+
<div className="tag-list-footer-icon">
|
|
445
|
+
<div>{JAPANESE_HELP_TEXT}</div>
|
|
446
|
+
<CapIcon
|
|
447
|
+
type="open-in-new-light"
|
|
448
|
+
size="s"
|
|
449
|
+
svgProps={{ color: FONT_COLOR_05 }}
|
|
450
|
+
/>
|
|
451
|
+
</div>
|
|
452
|
+
</CapButton>
|
|
453
|
+
</CapLink>
|
|
454
|
+
</div>
|
|
455
|
+
)}
|
|
402
456
|
|
|
403
|
-
|
|
404
|
-
|
|
457
|
+
</CapSpin>
|
|
458
|
+
</div>
|
|
459
|
+
);
|
|
405
460
|
return (
|
|
406
461
|
<>
|
|
407
|
-
{hidePopover ?
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
{contentSection}
|
|
413
|
-
</CapModal> :
|
|
414
|
-
<CapPopover
|
|
415
|
-
visible={fetchingSchemaError ? false : visible}
|
|
416
|
-
onVisibleChange={this.togglePopoverVisibility}
|
|
417
|
-
content={contentSection}
|
|
418
|
-
trigger="click"
|
|
419
|
-
placement={channel === EMAIL.toUpperCase() ? "leftTop" : "rightTop"}
|
|
420
|
-
>
|
|
421
|
-
<CapTooltip
|
|
422
|
-
title={
|
|
423
|
-
fetchingSchemaError && (
|
|
424
|
-
<CapRow className="tooltip-text-container">
|
|
425
|
-
<CapLabel className="tooltip-text1">
|
|
426
|
-
{formatMessage(messages.somethingWentWrong)}
|
|
427
|
-
</CapLabel>
|
|
428
|
-
<CapLabel className="tooltip-text2">
|
|
429
|
-
{formatMessage(messages.labelFetchErrorMsg)}
|
|
430
|
-
</CapLabel>
|
|
431
|
-
</CapRow>
|
|
432
|
-
)
|
|
433
|
-
}
|
|
434
|
-
placement="right"
|
|
462
|
+
{hidePopover ? (
|
|
463
|
+
<CapModal
|
|
464
|
+
visible={this.props.visibleTaglist}
|
|
465
|
+
footer={[]}
|
|
466
|
+
{...modalProps}
|
|
435
467
|
>
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
468
|
+
{contentSection}
|
|
469
|
+
</CapModal>
|
|
470
|
+
) : (
|
|
471
|
+
<CapPopover
|
|
472
|
+
visible={fetchingSchemaError ? false : visible}
|
|
473
|
+
onVisibleChange={this.togglePopoverVisibility}
|
|
474
|
+
content={contentSection}
|
|
475
|
+
trigger="click"
|
|
476
|
+
placement={channel === EMAIL.toUpperCase() ? "leftTop" : "rightTop"}
|
|
477
|
+
>
|
|
478
|
+
<CapTooltip
|
|
479
|
+
title={
|
|
480
|
+
fetchingSchemaError && (
|
|
481
|
+
<CapRow className="tooltip-text-container">
|
|
482
|
+
<CapLabel className="tooltip-text1">
|
|
483
|
+
{formatMessage(messages.somethingWentWrong)}
|
|
484
|
+
</CapLabel>
|
|
485
|
+
<CapLabel className="tooltip-text2">
|
|
486
|
+
{formatMessage(messages.labelFetchErrorMsg)}
|
|
487
|
+
</CapLabel>
|
|
488
|
+
</CapRow>
|
|
489
|
+
)
|
|
490
|
+
}
|
|
491
|
+
placement="right"
|
|
492
|
+
>
|
|
493
|
+
<CapRow className="tooltip-add-label-container">
|
|
494
|
+
<CapButton
|
|
495
|
+
disabled={
|
|
496
|
+
this?.props?.disabled || fetchingSchemaError
|
|
497
|
+
}
|
|
498
|
+
isAddBtn
|
|
499
|
+
type="flat"
|
|
500
|
+
>
|
|
501
|
+
{label || ""}
|
|
502
|
+
</CapButton>
|
|
503
|
+
</CapRow>
|
|
504
|
+
</CapTooltip>
|
|
505
|
+
</CapPopover>
|
|
506
|
+
)}
|
|
450
507
|
<CapModal
|
|
451
508
|
visible={this.state.showModal}
|
|
452
509
|
title={this.props.intl.formatMessage(messages["Dynamic Days before Expiry"])}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export const WHATSAPP = 'WHATSAPP';
|
|
2
2
|
export const DEFAULT = 'DEFAULT';
|
|
3
|
+
export const MOBILEPUSH = 'MOBILEPUSH';
|
|
3
4
|
export const SUPPORTED_FILE_FORMATS = {
|
|
4
5
|
VIBER: '3GP, MP4, MOV, M4V',
|
|
5
6
|
DEFAULT: 'MP4',
|
|
7
|
+
MOBILEPUSH: '3GP, MP4, MOV, M4V',
|
|
6
8
|
};
|
|
7
9
|
export const VIBER_MAX_DURATION = 600; // seconds
|
|
10
|
+
export const MAX_DURATION = 600; // seconds for all channels
|