@capillarytech/creatives-library 6.8.7 → 6.9.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/components/CapTagList/index.js +1 -1
- package/components/Edmeditor/index.js +1 -1
- package/components/FormBuilder/index.js +0 -1
- package/config/app.js +1 -1
- package/containers/TagList/index.js +3 -3
- package/index.html +5 -0
- package/package.json +2 -1
- package/services/api.js +16 -1
- package/v2Components/BeeEditor/index.js +272 -0
- package/v2Components/BeeEditor/messages.js +47 -0
- package/v2Components/BeeEditor/tests/index.test.js +10 -0
- package/v2Components/CapTagList/index.js +55 -26
- package/v2Components/CmsTemplatesComponent/index.js +4 -4
- package/v2Components/Edmeditor/index.js +1 -1
- package/v2Components/FormBuilder/index.js +117 -43
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +151 -151
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +33 -33
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/tests/index.test.js +10 -10
- package/v2Components/TemplatePreview/_templatePreview.scss +380 -380
- package/v2Components/TemplatePreview/assets/images/androidPushMessage.svg +44 -44
- package/v2Components/TemplatePreview/assets/images/home-screen-android.svg +21 -21
- package/v2Components/TemplatePreview/assets/images/home-screen-ios.svg +16 -16
- package/v2Components/TemplatePreview/assets/images/iPhonePushMessage.svg +134 -134
- package/v2Components/TemplatePreview/assets/images/mobile.svg +23 -23
- package/v2Components/TemplatePreview/assets/images/sms_mobile_android.svg +22 -22
- package/v2Components/TemplatePreview/assets/images/user-icon.svg +18 -18
- package/v2Components/TemplatePreview/assets/images/wechat-home-screen-android.svg +21 -21
- package/v2Components/TemplatePreview/assets/images/wechat-mobile.svg +77 -77
- package/v2Components/TemplatePreview/assets/images/wechat_mobile_android.svg +20 -20
- package/v2Components/TemplatePreview/tests/index.test.js +10 -10
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +51 -51
- package/v2Containers/CreativesContainer/actions.js +27 -27
- package/v2Containers/CreativesContainer/constants.js +17 -17
- package/v2Containers/CreativesContainer/index.js +7 -2
- package/v2Containers/CreativesContainer/index.scss +44 -44
- package/v2Containers/CreativesContainer/messages.js +305 -305
- package/v2Containers/CreativesContainer/reducer.js +29 -29
- package/v2Containers/CreativesContainer/sagas.js +11 -11
- package/v2Containers/CreativesContainer/selectors.js +30 -30
- package/v2Containers/CreativesContainer/tests/actions.test.js +18 -18
- package/v2Containers/CreativesContainer/tests/index.test.js +10 -10
- package/v2Containers/CreativesContainer/tests/reducer.test.js +9 -9
- package/v2Containers/CreativesContainer/tests/sagas.test.js +15 -15
- package/v2Containers/CreativesContainer/tests/selectors.test.js +10 -10
- package/v2Containers/Email/constants.js +1 -0
- package/v2Containers/Email/index.js +209 -107
- package/v2Containers/Email/initialSchema.js +17 -2
- package/v2Containers/Email/sagas.js +2 -2
- package/v2Containers/Email/selectors.js +5 -0
- package/v2Containers/EmailWrapper/index.js +18 -3
- package/v2Containers/TagList/index.js +6 -0
- package/v2Containers/Templates/_templates.scss +405 -405
- package/v2Containers/Templates/actions.js +122 -117
- package/v2Containers/Templates/constants.js +49 -47
- package/v2Containers/Templates/index.js +2 -6
- package/v2Containers/Templates/reducer.js +153 -145
- package/v2Containers/Templates/sagas.js +179 -179
- package/v2Containers/Templates/selectors.js +19 -1
- package/v2Containers/Templates/tests/actions.test.js +18 -18
- package/v2Containers/Templates/tests/index.test.js +10 -10
- package/v2Containers/Templates/tests/reducer.test.js +9 -9
- package/v2Containers/Templates/tests/sagas.test.js +15 -15
- package/v2Containers/Templates/tests/selectors.test.js +10 -10
- package/v2Containers/TemplatesV2/TemplatesV2.style.js +29 -29
- package/v2Containers/TemplatesV2/actions.js +16 -16
- package/v2Containers/TemplatesV2/constants.js +10 -10
- package/v2Containers/TemplatesV2/messages.js +61 -61
- package/v2Containers/TemplatesV2/selectors.js +25 -25
- package/v2Containers/TemplatesV2/tests/actions.test.js +18 -18
- package/v2Containers/TemplatesV2/tests/index.test.js +10 -10
- package/v2Containers/TemplatesV2/tests/reducer.test.js +9 -9
- package/v2Containers/TemplatesV2/tests/sagas.test.js +15 -15
- package/v2Containers/TemplatesV2/tests/selectors.test.js +10 -10
|
@@ -199,9 +199,24 @@ export const response = {
|
|
|
199
199
|
"getEditorInstanse",
|
|
200
200
|
],
|
|
201
201
|
},
|
|
202
|
+
// will remove once bee gets tested end to end
|
|
203
|
+
// {
|
|
204
|
+
// id: "edmeditor",
|
|
205
|
+
// type: "edmeditor",
|
|
206
|
+
// metaType: "text",
|
|
207
|
+
// datatype: "string",
|
|
208
|
+
// required: true,
|
|
209
|
+
// onlyDisplay: true,
|
|
210
|
+
// standalone: false,
|
|
211
|
+
// width: 24,
|
|
212
|
+
// order: 2,
|
|
213
|
+
// customComponent: true,
|
|
214
|
+
// colStyle: { display: "none" },
|
|
215
|
+
// supportedEvents: [],
|
|
216
|
+
// },
|
|
202
217
|
{
|
|
203
|
-
id: "
|
|
204
|
-
type: "
|
|
218
|
+
id: "BEEeditor",
|
|
219
|
+
type: "BEEeditor",
|
|
205
220
|
metaType: "text",
|
|
206
221
|
datatype: "string",
|
|
207
222
|
required: true,
|
|
@@ -53,7 +53,7 @@ export function* getAllAssets(assetType, queryParams) {
|
|
|
53
53
|
|
|
54
54
|
export function* getCmsSetting({cmsType, projectId, cmsMode, langId, isEdmSupport}) {
|
|
55
55
|
try {
|
|
56
|
-
const result = yield call(Api.
|
|
56
|
+
const result = yield call(Api.getCmsTemplateSettingsV2, cmsType, projectId, cmsMode, langId, isEdmSupport);
|
|
57
57
|
|
|
58
58
|
yield put({ type: types.GET_CMS_EDITOR_DETAILS_SUCCESS, settings: result.data.response.cmsDetails });
|
|
59
59
|
} catch (error) {
|
|
@@ -63,7 +63,7 @@ export function* getCmsSetting({cmsType, projectId, cmsMode, langId, isEdmSuppor
|
|
|
63
63
|
|
|
64
64
|
export function* getCmsData({cmsType, projectId, langId}) {
|
|
65
65
|
try {
|
|
66
|
-
const result = yield call(Api.
|
|
66
|
+
const result = yield call(Api.getCmsTemplateDataV2, cmsType, projectId, langId);
|
|
67
67
|
|
|
68
68
|
yield put({ type: types.GET_CMS_EDITOR_DATA_SUCCESS, data: result.data.response.data, langId: result.data.response.langId });
|
|
69
69
|
} catch (error) {
|
|
@@ -26,9 +26,14 @@ const selectLoadingStatus = () => createSelector(
|
|
|
26
26
|
selectEmailDomain(), (email) => email.createTemplateInProgress || (email.assetUploading !== undefined && email.assetUploading)
|
|
27
27
|
);
|
|
28
28
|
|
|
29
|
+
const makeSelectFetchingCmsData = () => createSelector(
|
|
30
|
+
selectEmailDomain(), (state) => state.get('fetchingCmsData')
|
|
31
|
+
);
|
|
32
|
+
|
|
29
33
|
export default makeSelectEmail;
|
|
30
34
|
export {
|
|
31
35
|
makeSelectEmail,
|
|
32
36
|
makeSelectCreateResponse,
|
|
33
37
|
selectLoadingStatus,
|
|
38
|
+
makeSelectFetchingCmsData,
|
|
34
39
|
};
|
|
@@ -15,7 +15,13 @@ import styled from 'styled-components';
|
|
|
15
15
|
import { CapRadioCard, CapNotification, CapInput, CapUploader, CapSpin, CapButton } from '@capillarytech/cap-ui-library';
|
|
16
16
|
import ComponentWithLabelHOC from '@capillarytech/cap-ui-library/assets/HOCs/ComponentWithLabelHOC';
|
|
17
17
|
import { UserIsAuthenticated } from '../../utils/authWrapper';
|
|
18
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
selectEmailLayout,
|
|
20
|
+
selectCmsTemplates,
|
|
21
|
+
selectEdmEditor,
|
|
22
|
+
uploadSelector,
|
|
23
|
+
selectCmsTemplatesLoader,
|
|
24
|
+
} from '../Templates/selectors';
|
|
19
25
|
import * as templatesActionsCreators from '../Templates/actions';
|
|
20
26
|
import Email from '../Email';
|
|
21
27
|
import CmsTemplatesComponent from '../../v2Components/CmsTemplatesComponent';
|
|
@@ -76,7 +82,7 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
|
|
|
76
82
|
//document.getElementById('upload-email-template').click();
|
|
77
83
|
} else if (step === "templateSelection" && !this.state.selectedCreateMode) {
|
|
78
84
|
if (emailCreateMode === "editor" && !CmsTemplates) {
|
|
79
|
-
templatesActions.
|
|
85
|
+
templatesActions.getDefaultBeeTemplates();
|
|
80
86
|
}
|
|
81
87
|
} else if (step === "createTemplateContent" && !this.state.selectedCreateMode) {
|
|
82
88
|
if (emailCreateMode === 'upload' && !_.isEmpty(EmailLayout)) {
|
|
@@ -156,6 +162,7 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
|
|
|
156
162
|
const data = _.find(CmsTemplates, { _id: id });
|
|
157
163
|
|
|
158
164
|
templatesActions.setEdmTemplate(data);
|
|
165
|
+
templatesActions.setBEETemplate(data);
|
|
159
166
|
this.setState({
|
|
160
167
|
selectedCreateMode: 'editor',
|
|
161
168
|
});
|
|
@@ -188,6 +195,7 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
|
|
|
188
195
|
selectedOfferDetails,
|
|
189
196
|
onPreviewContentClicked,
|
|
190
197
|
onTestContentClicked,
|
|
198
|
+
cmsTemplatesLoader,
|
|
191
199
|
} = this.props;
|
|
192
200
|
const {
|
|
193
201
|
templateName,
|
|
@@ -251,7 +259,13 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
|
|
|
251
259
|
onPreviewContentClicked={onPreviewContentClicked}
|
|
252
260
|
onTestContentClicked={onTestContentClicked}
|
|
253
261
|
/>}
|
|
254
|
-
{
|
|
262
|
+
{!isShowEmailCreate && (
|
|
263
|
+
<CmsTemplatesComponent
|
|
264
|
+
cmsTemplates={CmsTemplates}
|
|
265
|
+
handleEdmDefaultTemplateSelection={this.useEditor}
|
|
266
|
+
cmsTemplatesLoader={cmsTemplatesLoader}
|
|
267
|
+
/>
|
|
268
|
+
)}
|
|
255
269
|
</div>
|
|
256
270
|
}
|
|
257
271
|
</CapSpin>
|
|
@@ -289,6 +303,7 @@ const mapStateToProps = createStructuredSelector({
|
|
|
289
303
|
CmsTemplates: selectCmsTemplates(),
|
|
290
304
|
SelectedEdmDefaultTemplate: selectEdmEditor(),
|
|
291
305
|
isUploading: uploadSelector(),
|
|
306
|
+
cmsTemplatesLoader: selectCmsTemplatesLoader(),
|
|
292
307
|
});
|
|
293
308
|
|
|
294
309
|
function mapDispatchToProps(dispatch) {
|
|
@@ -242,8 +242,11 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
|
|
|
242
242
|
tags={tags}
|
|
243
243
|
onSelect={this.onSelect}
|
|
244
244
|
label={this.props.label}
|
|
245
|
+
visibleTaglist={this.props.visibleTaglist}
|
|
246
|
+
hidePopover={this.props.hidePopover}
|
|
245
247
|
onContextChange={this.getTagsforContext}
|
|
246
248
|
moduleFilterEnabled={this.props.moduleFilterEnabled}
|
|
249
|
+
modalProps={this.props.modalProps}
|
|
247
250
|
/>
|
|
248
251
|
</div>
|
|
249
252
|
);
|
|
@@ -265,6 +268,9 @@ TagList.propTypes = {
|
|
|
265
268
|
className: PropTypes.string,
|
|
266
269
|
userLocale: PropTypes.string,
|
|
267
270
|
selectedOfferDetails: PropTypes.array,
|
|
271
|
+
visibleTaglist: PropTypes.bool,
|
|
272
|
+
hidePopover: PropTypes.bool,
|
|
273
|
+
modalProps: PropTypes.any,
|
|
268
274
|
};
|
|
269
275
|
|
|
270
276
|
const mapStateToProps = createStructuredSelector({
|