@capillarytech/creatives-library 6.9.7 → 6.9.8
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/TagList/index.js +2 -3
- package/package.json +1 -1
- package/v2Components/BeeEditor/index.js +7 -1
- package/v2Containers/App/constants.js +1 -0
- package/v2Containers/Email/index.js +10 -10
- package/v2Containers/Line/Container/ImageCarousel/Content.js +2 -2
- package/v2Containers/Line/Container/ImageCarousel/constants.js +1 -1
- package/v2Containers/Line/Container/ImageCarousel/index.js +6 -3
- package/v2Containers/Line/Container/_lineCreate.scss +6 -0
- package/v2Containers/TagList/index.js +3 -2
|
@@ -71,10 +71,9 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
|
|
|
71
71
|
//Form tags object with tag headers
|
|
72
72
|
_.forEach(tagsList, (temp) => {
|
|
73
73
|
const tag = temp.definition;
|
|
74
|
-
const userLocale = this.props.userLocale;
|
|
75
74
|
if (!tag['tag-header']) {
|
|
76
75
|
mainTags[tag.value] = {
|
|
77
|
-
name: tag.label[userLocale] ? tag.label[userLocale] : tag.label.en,
|
|
76
|
+
name: tag.label[this.props.userLocale] ? tag.label[this.props.userLocale] : tag.label.en,
|
|
78
77
|
desc: tag.desc ? tag.desc : tag.label.en,
|
|
79
78
|
};
|
|
80
79
|
} else if (tag['tag-header'] && mainTags[tag.value]) {
|
|
@@ -83,7 +82,7 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
|
|
|
83
82
|
console.log('Inside ', tag.label);
|
|
84
83
|
mainTags[tag.value] = {
|
|
85
84
|
'tag-header': true,
|
|
86
|
-
"name": tag.label[userLocale] ? tag.label[userLocale] : tag.label.en,
|
|
85
|
+
"name": tag.label[this.props.userLocale] ? tag.label[this.props.userLocale] : tag.label.en,
|
|
87
86
|
"desc": tag.desc ? tag.desc : tag.label.en,
|
|
88
87
|
"subtags": tag.subtags,
|
|
89
88
|
};
|
package/package.json
CHANGED
|
@@ -79,14 +79,19 @@ function BeeEditor(props) {
|
|
|
79
79
|
mergeTags: {
|
|
80
80
|
label: 'search',
|
|
81
81
|
handler: async (resolve, reject) => {
|
|
82
|
+
// this will open tag modal
|
|
82
83
|
await setVisibleTaglist(true);
|
|
84
|
+
// until tag modal will not open promise will not execute
|
|
85
|
+
// once tag modal is opened it will start 2 sec interval to wait use has selected any tag or cancel the tag selection
|
|
83
86
|
const promise = new Promise((resolveP) => {
|
|
84
87
|
intervalTimer = setInterval(() => {
|
|
88
|
+
// this will execute, if user cancel the tag selection
|
|
85
89
|
if ((savedCallback.current || {}).close === true) {
|
|
86
90
|
reject();
|
|
87
91
|
clearInterval(intervalTimer);
|
|
88
92
|
return;
|
|
89
93
|
}
|
|
94
|
+
// this block is checking use has selected any tag or not
|
|
90
95
|
if (Object.keys(savedCallback.current || {}).length > 0) {
|
|
91
96
|
resolveP(savedCallback.current);
|
|
92
97
|
setSelectedTag({});
|
|
@@ -94,8 +99,9 @@ function BeeEditor(props) {
|
|
|
94
99
|
}
|
|
95
100
|
}, 2000);
|
|
96
101
|
});
|
|
102
|
+
// once prmise will resolve , pass the resolve data to handler to show tags in bee edior
|
|
97
103
|
const result = await promise;
|
|
98
|
-
resolve(result);
|
|
104
|
+
resolve(result);
|
|
99
105
|
},
|
|
100
106
|
},
|
|
101
107
|
saveRow: {
|
|
@@ -31,7 +31,7 @@ import * as creativesContainerActions from '../CreativesContainer/actions';
|
|
|
31
31
|
import withCreatives from '../../hoc/withCreatives';
|
|
32
32
|
import { EMAIL } from '../CreativesContainer/constants';
|
|
33
33
|
import { GA } from '@capillarytech/cap-ui-utils';
|
|
34
|
-
import { TRACK_CREATE_EMAIL, TRACK_EDIT_EMAIL } from '../App/constants';
|
|
34
|
+
import { TRACK_CREATE_EMAIL, TRACK_EDIT_EMAIL, BEE_PLUGIN } from '../App/constants';
|
|
35
35
|
import { FONT_COLOR_05 } from '@capillarytech/cap-ui-library/styled/variables';
|
|
36
36
|
const {CapCustomCardList} = CapCustomCard;
|
|
37
37
|
export class Email extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
@@ -189,9 +189,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
189
189
|
this.setState({isDragDrop: true});
|
|
190
190
|
}
|
|
191
191
|
if (this.props.params.id) {
|
|
192
|
-
this.props.actions.getCmsSetting(
|
|
192
|
+
this.props.actions.getCmsSetting(BEE_PLUGIN, this.props.Templates.BEETemplate._id, 'open', undefined, isBEESupport);
|
|
193
193
|
} else if (this.props.location.query.module !== "library" || (this.props.location.query.module === "library" && !this.props.templateData)) {
|
|
194
|
-
this.props.actions.getCmsSetting(
|
|
194
|
+
this.props.actions.getCmsSetting(BEE_PLUGIN, this.props.Templates.BEETemplate._id, 'create', undefined, isBEESupport);
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
this.setState({ content: (this.props.Templates.selectedEmailLayout ? this.props.Templates.selectedEmailLayout : ''), formData});
|
|
@@ -706,7 +706,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
706
706
|
if (!isNaN(index)) {
|
|
707
707
|
_.forEach(val.selectedLanguages, (language) => {
|
|
708
708
|
if (val[language].is_drag_drop) {
|
|
709
|
-
that.props.actions.getCmsData(
|
|
709
|
+
that.props.actions.getCmsData(BEE_PLUGIN, id, language);
|
|
710
710
|
}
|
|
711
711
|
});
|
|
712
712
|
}
|
|
@@ -914,7 +914,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
914
914
|
// formData.base.activeTab = language;
|
|
915
915
|
// }
|
|
916
916
|
if (language && editData.versions.base[language].is_drag_drop) {
|
|
917
|
-
this.props.actions.getCmsSetting(
|
|
917
|
+
this.props.actions.getCmsSetting(BEE_PLUGIN, editData._id, 'open', language, isBEESupport);
|
|
918
918
|
}
|
|
919
919
|
});
|
|
920
920
|
|
|
@@ -1125,7 +1125,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1125
1125
|
const currentTab = this.state.currentTab - 1;
|
|
1126
1126
|
const baseLanguage = this.props.currentOrgDetails.basic_details.base_language ? this.props.currentOrgDetails.basic_details.base_language : 'en';
|
|
1127
1127
|
if (formData[currentTab][baseLanguage].is_drag_drop) {
|
|
1128
|
-
this.props.actions.getCmsSetting(
|
|
1128
|
+
this.props.actions.getCmsSetting(BEE_PLUGIN, formData[currentTab][baseLanguage].drag_drop_id, 'duplicate', baseLanguage, isEdmSupport);
|
|
1129
1129
|
}
|
|
1130
1130
|
});
|
|
1131
1131
|
}
|
|
@@ -1404,7 +1404,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1404
1404
|
if (!id) {
|
|
1405
1405
|
id = _.get(formData, `base[${formData.base.activeTab}].id`, '');
|
|
1406
1406
|
}
|
|
1407
|
-
this.props.actions.getCmsData(
|
|
1407
|
+
this.props.actions.getCmsData(BEE_PLUGIN, id);
|
|
1408
1408
|
if (this.state.mode === 'switchEditor') {
|
|
1409
1409
|
let schema = _.cloneDeep(this.state.schema);
|
|
1410
1410
|
_.forEach(schema.containers, (container, index) => {
|
|
@@ -2129,7 +2129,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2129
2129
|
};
|
|
2130
2130
|
if (templates.drag_drop_id) {
|
|
2131
2131
|
tempData.drag_drop_id = templates.drag_drop_id;
|
|
2132
|
-
this.props.actions.getCmsSetting(
|
|
2132
|
+
this.props.actions.getCmsSetting(BEE_PLUGIN, tempData._id, 'open', tempData.iso_code, isEdmSupport);
|
|
2133
2133
|
}
|
|
2134
2134
|
// formData.usingTabContainer = true;
|
|
2135
2135
|
// formData.tabCount = 1;
|
|
@@ -2155,7 +2155,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2155
2155
|
// this.setState({tabKey: ''});
|
|
2156
2156
|
_.forEach(formData[0].selectedLanguages, (language) => {
|
|
2157
2157
|
if (formData[0][language].is_drag_drop) {
|
|
2158
|
-
this.props.actions.getCmsSetting(
|
|
2158
|
+
this.props.actions.getCmsSetting(BEE_PLUGIN, formData[0][language].drag_drop_id, 'open', language, isEdmSupport);
|
|
2159
2159
|
}
|
|
2160
2160
|
});
|
|
2161
2161
|
});
|
|
@@ -2493,7 +2493,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2493
2493
|
// let getQuery = '';
|
|
2494
2494
|
const isEdmSupport = (this.props.location.query.isEdmSupport !== "false") || false;
|
|
2495
2495
|
|
|
2496
|
-
this.props.actions.getCmsSetting(
|
|
2496
|
+
this.props.actions.getCmsSetting(BEE_PLUGIN, data._id, 'create', this.state.formData[this.state.currentTab - 1].activeTab, isEdmSupport);
|
|
2497
2497
|
// this.props.templatesActions.setEdmTemplate(data);
|
|
2498
2498
|
this.toggleEdmEmailTemplateSelection();
|
|
2499
2499
|
// if (type && type.toLowerCase() === 'email') {
|
|
@@ -367,8 +367,8 @@ export const LineImageCarouselContent = ({
|
|
|
367
367
|
|
|
368
368
|
const updateActionLabelError = (value) => {
|
|
369
369
|
if (value.length > MAX_ACTION_LABEL_LENGTH) {
|
|
370
|
-
updateActionLabelErrorMessage(formatMessage(messages.
|
|
371
|
-
return formatMessage(messages.
|
|
370
|
+
updateActionLabelErrorMessage(formatMessage(messages.maxActionLabelErrorMessage));
|
|
371
|
+
return formatMessage(messages.maxActionLabelErrorMessage);
|
|
372
372
|
} else {
|
|
373
373
|
updateActionLabelErrorMessage();
|
|
374
374
|
}
|
|
@@ -12,7 +12,7 @@ import CapTooltip from '@capillarytech/cap-ui-library/CapTooltip';
|
|
|
12
12
|
import CapTooltipWithInfo from '@capillarytech/cap-ui-library/CapTooltipWithInfo';
|
|
13
13
|
import LineDrawer from '../Drawer';
|
|
14
14
|
import style from './style';
|
|
15
|
-
import { CAP_G06, FONT_COLOR_01, FONT_COLOR_02, CAP_SPACE_08, CAP_WHITE } from '@capillarytech/cap-ui-library/styled/variables';
|
|
15
|
+
import { CAP_G06, FONT_COLOR_01, FONT_COLOR_02, CAP_SPACE_08, CAP_WHITE, CAP_SPACE_24, CAP_SPACE_04 } from '@capillarytech/cap-ui-library/styled/variables';
|
|
16
16
|
import withStyles from '../../../../hoc/withStyles';
|
|
17
17
|
|
|
18
18
|
import LineImageCarouselContent from './Content';
|
|
@@ -122,7 +122,7 @@ export const LineImageCarousel = (props) => {
|
|
|
122
122
|
}) => {
|
|
123
123
|
isErrorIndex = (isErrorIndex !== undefined)
|
|
124
124
|
? isErrorIndex
|
|
125
|
-
: ((!originalContentUrl || !selectedActionType || actionContentErrorMessage || actionLabelErrorMessage) && activeIndex);
|
|
125
|
+
: ((!originalContentUrl || !selectedActionType || actionContentErrorMessage || actionLabelErrorMessage || !actionContent) && activeIndex);
|
|
126
126
|
columns.push({
|
|
127
127
|
imageUrl: originalContentUrl,
|
|
128
128
|
action: {
|
|
@@ -290,7 +290,10 @@ export const LineImageCarousel = (props) => {
|
|
|
290
290
|
borderRadius: '50%',
|
|
291
291
|
color: CAP_WHITE,
|
|
292
292
|
backgroundColor: !isSelected ? FONT_COLOR_02 : FONT_COLOR_01,
|
|
293
|
-
|
|
293
|
+
height: CAP_SPACE_24,
|
|
294
|
+
width: CAP_SPACE_24,
|
|
295
|
+
textAlign: 'center',
|
|
296
|
+
paddingTop: 4,
|
|
294
297
|
}}
|
|
295
298
|
>
|
|
296
299
|
{index + 1}
|
|
@@ -72,9 +72,10 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
|
|
|
72
72
|
//Form tags object with tag headers
|
|
73
73
|
_.forEach(tagsList, (temp) => {
|
|
74
74
|
const tag = temp.definition;
|
|
75
|
+
const { userLocale } = this.props;
|
|
75
76
|
if (!tag['tag-header']) {
|
|
76
77
|
mainTags[tag.value] = {
|
|
77
|
-
name: tag.label[
|
|
78
|
+
name: tag.label[userLocale] ? tag.label[userLocale] : tag.label.en,
|
|
78
79
|
desc: tag.desc ? tag.desc : tag.label.en,
|
|
79
80
|
};
|
|
80
81
|
} else if (tag['tag-header'] && mainTags[tag.value]) {
|
|
@@ -83,7 +84,7 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
|
|
|
83
84
|
console.log('Inside ', tag.label);
|
|
84
85
|
mainTags[tag.value] = {
|
|
85
86
|
'tag-header': true,
|
|
86
|
-
"name": tag.label[
|
|
87
|
+
"name": tag.label[userLocale] ? tag.label[userLocale] : tag.label.en,
|
|
87
88
|
"desc": tag.desc ? tag.desc : tag.label.en,
|
|
88
89
|
"subtags": tag.subtags,
|
|
89
90
|
};
|