@capillarytech/creatives-library 3.0.35 → 3.1.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/assets/noImage.png +0 -0
- package/components/BreadCrumbs/messages.js +1 -1
- package/components/CapTagList/index.js +3 -3
- package/components/CapTagList/messages.js +4 -16
- package/components/Ckeditor/messages.js +1 -1
- package/components/CustomPopOver/index.js +4 -3
- package/components/CustomPopOver/messages.js +1 -5
- package/components/DateFilter/index.js +12 -12
- package/components/DateFilter/messages.js +0 -40
- package/components/DateRange/index.js +4 -5
- package/components/DateRange/messages.js +1 -13
- package/components/Edmeditor/messages.js +1 -1
- package/components/EmailPreview/index.js +4 -4
- package/components/EmailPreview/messages.js +2 -18
- package/components/Footer/messages.js +1 -1
- package/components/FormBuilder/index.js +19 -15
- package/components/FormBuilder/messages.js +1 -33
- package/components/Header/messages.js +4 -4
- package/components/ImagePreview/index.js +1 -1
- package/components/ImagePreview/messages.js +1 -5
- package/components/PageHeader/messages.js +1 -1
- package/components/PreviewSideBar/index.js +2 -2
- package/components/PreviewSideBar/messages.js +6 -14
- package/components/Sidebar/messages.js +3 -3
- package/components/SmsTest/index.js +4 -6
- package/components/SmsTest/messages.js +1 -9
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +3 -3
- package/components/TemplatePreview/index.js +10 -11
- package/components/TemplatePreview/messages.js +7 -23
- package/components/Toastr/messages.js +1 -1
- package/components/ToastrMessage/index.js +1 -4
- package/components/ToastrMessage/messages.js +1 -5
- package/components/TopBar/messages.js +1 -1
- package/config/app.js +0 -2
- package/containers/Assets/Gallery/messages.js +20 -20
- package/containers/Cap/index.js +5 -5
- package/containers/Dashboard/index.js +2 -2
- package/containers/Dashboard/messages.js +1 -1
- package/containers/Ebill/index.js +1 -1
- package/containers/Ebill/messages.js +16 -20
- package/containers/Email/index.js +24 -24
- package/containers/Email/messages.js +59 -107
- package/containers/Line/Create/index.js +7 -7
- package/containers/Line/Create/messages.js +42 -58
- package/containers/Line/Edit/index.js +14 -14
- package/containers/Line/Edit/messages.js +38 -58
- package/containers/Login/components/LoginForm/index.js +7 -10
- package/containers/Login/components/LoginForm/messages.js +3 -15
- package/containers/Login/index.js +1 -1
- package/containers/Login/messages.js +3 -7
- package/containers/MobilePush/Create/index.js +45 -45
- package/containers/MobilePush/Create/messages.js +75 -111
- package/containers/MobilePush/Edit/index.js +45 -45
- package/containers/MobilePush/Edit/messages.js +83 -100
- package/containers/NotFoundPage/messages.js +1 -1
- package/containers/Sms/Create/index.js +8 -7
- package/containers/Sms/Create/messages.js +19 -43
- package/containers/Sms/Edit/index.js +4 -4
- package/containers/Sms/Edit/messages.js +20 -36
- package/containers/TagList/messages.js +1 -1
- package/containers/Templates/index.js +19 -20
- package/containers/Templates/messages.js +64 -136
- package/containers/TestPage/messages.js +1 -1
- package/containers/Testv2/index.js +2 -2
- package/containers/Testv2/messages.js +1 -9
- package/containers/WeChat/MapTemplates/index.js +10 -10
- package/containers/WeChat/MapTemplates/messages.js +17 -49
- package/containers/WeChat/RichmediaTemplates/Create/messages.js +33 -33
- package/containers/WeChat/RichmediaTemplates/Edit/messages.js +1 -1
- package/containers/WeChat/RichmediaTemplates/View/index.js +2 -2
- package/containers/WeChat/RichmediaTemplates/View/messages.js +1 -9
- package/index.js +20 -8
- package/package.json +4 -1
- package/routes.js +16 -2
- package/services/api.js +2 -17
- package/services/getSchema.js +4 -1
- package/translations/en.json +360 -1396
- package/translations/zh.json +381 -1417
- package/utils/smsCharCountV2.js +10 -26
- package/v2Components/BreadCrumbs/messages.js +1 -1
- package/v2Components/CallTaskPreview/messages.js +1 -1
- package/v2Components/CapTagList/index.js +5 -6
- package/v2Components/CapTagList/messages.js +4 -24
- package/v2Components/Ckeditor/index.js +0 -1
- package/v2Components/Ckeditor/messages.js +1 -1
- package/v2Components/CmsTemplatesComponent/messages.js +2 -2
- package/v2Components/CustomPopOver/index.js +2 -4
- package/v2Components/CustomPopOver/messages.js +1 -5
- package/v2Components/DateFilter/index.js +349 -0
- package/v2Components/DateFilter/messages.js +17 -0
- package/v2Components/DateFilter/tests/index.test.js +15 -0
- package/v2Components/DateRange/index.js +113 -0
- package/v2Components/DateRange/messages.js +13 -0
- package/v2Components/DateRange/tests/index.test.js +10 -0
- package/v2Components/Edmeditor/messages.js +1 -1
- package/v2Components/EmailPreview/index.js +2 -2
- package/v2Components/EmailPreview/messages.js +3 -11
- package/v2Components/EmailPreviewV2/index.js +1 -1
- package/v2Components/EmailPreviewV2/messages.js +9 -13
- package/v2Components/Footer/messages.js +1 -1
- package/v2Components/FormBuilder/_formBuilder.scss +19 -0
- package/v2Components/FormBuilder/index.js +58 -27
- package/v2Components/FormBuilder/messages.js +1 -49
- package/v2Components/Header/index.js +2 -2
- package/v2Components/Header/messages.js +4 -4
- package/v2Components/ImagePreview/index.js +2 -3
- package/v2Components/ImagePreview/messages.js +1 -5
- package/v2Components/MobilePushPreviewV2/index.js +5 -2
- package/v2Components/MobilePushPreviewV2/messages.js +1 -9
- package/v2Components/NavigationBar/messages.js +1 -1
- package/v2Components/NewCallTask/messages.js +5 -5
- package/v2Components/PageHeader/_pageHeader.scss +22 -0
- package/v2Components/PageHeader/index.js +37 -0
- package/v2Components/PageHeader/messages.js +13 -0
- package/v2Components/PageHeader/tests/index.test.js +10 -0
- package/v2Components/PreviewSideBar/messages.js +6 -6
- package/v2Components/Sidebar/_sidebar.scss +115 -0
- package/v2Components/Sidebar/index.js +208 -0
- package/v2Components/Sidebar/messages.js +21 -0
- package/v2Components/Sidebar/tests/index.test.js +10 -0
- package/v2Components/SmsEditor/index.js +55 -0
- package/v2Components/SmsEditor/tests/index.test.js +10 -0
- package/v2Components/SmsTest/index.js +4 -6
- package/v2Components/SmsTest/messages.js +1 -9
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +2 -0
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +18 -28
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +3 -3
- package/v2Components/TemplatePreview/_templatePreview.scss +0 -9
- package/v2Components/TemplatePreview/index.js +16 -35
- package/v2Components/TemplatePreview/messages.js +7 -23
- package/v2Components/Toastr/messages.js +1 -1
- package/v2Components/ToastrMessage/index.js +2 -3
- package/v2Components/ToastrMessage/messages.js +1 -5
- package/v2Components/TopBar/_topbar.scss +46 -0
- package/v2Components/TopBar/messages.js +7 -7
- package/v2Containers/App/constants.js +0 -11
- package/v2Containers/Assets/Gallery/messages.js +24 -24
- package/v2Containers/CallTask/messages.js +6 -6
- package/v2Containers/Cap/actions.js +0 -1
- package/v2Containers/Cap/index.js +9 -6
- package/v2Containers/Cap/messsages.js +15 -19
- package/v2Containers/Cap/sagas.js +8 -1
- package/v2Containers/ChannelTemplates/messages.js +1 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +39 -1
- package/v2Containers/CreativesContainer/SlideBoxFooter.js +7 -1
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +21 -3
- package/v2Containers/CreativesContainer/index.js +95 -50
- package/v2Containers/CreativesContainer/index.scss +15 -0
- package/v2Containers/CreativesContainer/messages.js +12 -16
- package/v2Containers/Dashboard/index.js +1 -2
- package/v2Containers/Dashboard/messages.js +1 -1
- package/v2Containers/Ebill/index.js +1 -1
- package/v2Containers/Ebill/messages.js +16 -20
- package/v2Containers/Email/index.js +20 -20
- package/v2Containers/Email/messages.js +61 -101
- package/v2Containers/EmailWrapper/index.js +44 -64
- package/v2Containers/EmailWrapper/messages.js +12 -12
- package/v2Containers/Line/Create/index.js +3 -3
- package/v2Containers/Line/Create/messages.js +41 -53
- package/v2Containers/Line/Edit/index.js +10 -10
- package/v2Containers/Line/Edit/messages.js +39 -55
- package/v2Containers/Login/components/LoginForm/index.js +6 -9
- package/v2Containers/Login/components/LoginForm/messages.js +3 -15
- package/v2Containers/Login/index.js +1 -1
- package/v2Containers/Login/messages.js +3 -7
- package/v2Containers/MobilePush/Create/_mobilePushCreate.scss +3 -0
- package/v2Containers/MobilePush/Create/index.js +33 -33
- package/v2Containers/MobilePush/Create/messages.js +81 -109
- package/v2Containers/MobilePush/Edit/_mobilePushCreate.scss +3 -0
- package/v2Containers/MobilePush/Edit/index.js +22 -22
- package/v2Containers/MobilePush/Edit/messages.js +79 -95
- package/v2Containers/MobilePush/initialSchema.js +1 -2
- package/v2Containers/MobilepushWrapper/messages.js +5 -5
- package/v2Containers/NotFoundPage/messages.js +1 -1
- package/v2Containers/Sms/Create/index.js +6 -6
- package/v2Containers/Sms/Create/messages.js +21 -41
- package/v2Containers/Sms/Edit/index.js +6 -6
- package/v2Containers/Sms/Edit/messages.js +20 -36
- package/v2Containers/TagList/messages.js +1 -1
- package/v2Containers/Templates/_templates.scss +31 -5
- package/v2Containers/Templates/index.js +243 -248
- package/v2Containers/Templates/messages.js +7 -15
- package/v2Containers/Templates/sagas.js +0 -1
- package/v2Containers/TemplatesV2/_templatesV2.scss +5 -0
- package/v2Containers/TemplatesV2/index.js +4 -1
- package/v2Containers/TemplatesV2/messages.js +5 -29
- package/v2Containers/TestPage/messages.js +1 -1
- package/v2Containers/Testv2/index.js +2 -2
- package/v2Containers/Testv2/messages.js +1 -9
- package/v2Containers/WeChat/MapTemplates/_mapTemplates.scss +16 -0
- package/v2Containers/WeChat/MapTemplates/actions.js +4 -2
- package/v2Containers/WeChat/MapTemplates/index.js +800 -872
- package/v2Containers/WeChat/MapTemplates/initialSchema.js +184 -0
- package/v2Containers/WeChat/MapTemplates/messages.js +19 -43
- package/v2Containers/WeChat/MapTemplates/sagas.js +6 -2
- package/v2Containers/WeChat/MapTemplates/selectors.js +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/Create/_createRichmedia.scss +118 -28
- package/v2Containers/WeChat/RichmediaTemplates/Create/actions.js +3 -1
- package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +262 -306
- package/v2Containers/WeChat/RichmediaTemplates/Create/messages.js +43 -95
- package/v2Containers/WeChat/RichmediaTemplates/Create/reducer.js +2 -1
- package/v2Containers/WeChat/RichmediaTemplates/Create/richmediaschema.js +113 -246
- package/v2Containers/WeChat/RichmediaTemplates/Create/sagas.js +5 -2
- package/v2Containers/WeChat/RichmediaTemplates/Create/selectors.js +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/Edit/actions.js +2 -2
- package/v2Containers/WeChat/RichmediaTemplates/Edit/index.js +11 -10
- package/v2Containers/WeChat/RichmediaTemplates/Edit/messages.js +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/Edit/reducer.js +1 -0
- package/v2Containers/WeChat/RichmediaTemplates/Edit/sagas.js +4 -2
- package/v2Containers/WeChat/RichmediaTemplates/Edit/selectors.js +1 -1
- package/v2Containers/WeChat/RichmediaTemplates/View/messages.js +1 -9
- package/v2Containers/WeChat/Wrapper/_wrapper.scss +0 -0
- package/v2Containers/WeChat/Wrapper/constants.js +5 -0
- package/v2Containers/WeChat/Wrapper/index.js +194 -0
- package/v2Containers/WeChat/Wrapper/messages.js +21 -0
- package/v2Containers/WeChat/helper.js +12 -0
- package/containers/Cap/messages.js +0 -75
- package/v2Containers/Cap/messages.js +0 -75
|
@@ -69,8 +69,8 @@ export class MapTemplates extends React.Component { // eslint-disable-line react
|
|
|
69
69
|
isLoading: true,
|
|
70
70
|
showModal: false,
|
|
71
71
|
modalContent: {
|
|
72
|
-
title:
|
|
73
|
-
body:
|
|
72
|
+
title: "Alert",
|
|
73
|
+
body: "Do you really want to go back? All your temporary changes will be lost!",
|
|
74
74
|
type: 'confirm',
|
|
75
75
|
id: 'template-back-confirm-modal',
|
|
76
76
|
},
|
|
@@ -559,8 +559,8 @@ export class MapTemplates extends React.Component { // eslint-disable-line react
|
|
|
559
559
|
moveToTemplates() {
|
|
560
560
|
console.log('in move to Templates');
|
|
561
561
|
const modalContent = {
|
|
562
|
-
title:
|
|
563
|
-
body:
|
|
562
|
+
title: "Alert",
|
|
563
|
+
body: "Do you really want to go back? All your temporary changes will be lost!",
|
|
564
564
|
type: 'confirm',
|
|
565
565
|
id: 'template-back-confirm-modal',
|
|
566
566
|
show: true,
|
|
@@ -605,10 +605,10 @@ export class MapTemplates extends React.Component { // eslint-disable-line react
|
|
|
605
605
|
let title = tagTitle;
|
|
606
606
|
|
|
607
607
|
if (tagTitle.match(/first/i)) {
|
|
608
|
-
title =
|
|
608
|
+
title = "Header";
|
|
609
609
|
}
|
|
610
610
|
if (tagTitle.match(/remark/i)) {
|
|
611
|
-
title =
|
|
611
|
+
title = "Footer";
|
|
612
612
|
}
|
|
613
613
|
|
|
614
614
|
const colsData = {
|
|
@@ -641,7 +641,7 @@ export class MapTemplates extends React.Component { // eslint-disable-line react
|
|
|
641
641
|
type: "input", //Resembles component to be used
|
|
642
642
|
metaType: "text",
|
|
643
643
|
datatype: "string",
|
|
644
|
-
errorMessage: `${title}
|
|
644
|
+
errorMessage: `${title} has invalid content.`,
|
|
645
645
|
required: true,
|
|
646
646
|
fluid: true,
|
|
647
647
|
disabled: (this.props.location.query.type === 'embedded'),
|
|
@@ -725,7 +725,7 @@ export class MapTemplates extends React.Component { // eslint-disable-line react
|
|
|
725
725
|
{
|
|
726
726
|
id: "template-label-link",
|
|
727
727
|
metaType: "label",
|
|
728
|
-
value:
|
|
728
|
+
value: 'Link',
|
|
729
729
|
primitive: true,
|
|
730
730
|
type: "div",
|
|
731
731
|
width: 4,
|
|
@@ -750,7 +750,7 @@ export class MapTemplates extends React.Component { // eslint-disable-line react
|
|
|
750
750
|
type: "input", //Resembles component to be used
|
|
751
751
|
metaType: "text",
|
|
752
752
|
datatype: "string",
|
|
753
|
-
errorMessage:
|
|
753
|
+
errorMessage: `Link cannot be empty.`,
|
|
754
754
|
required: true,
|
|
755
755
|
fluid: true,
|
|
756
756
|
disabled: (this.props.location.query.type === 'embedded'),
|
|
@@ -777,7 +777,7 @@ export class MapTemplates extends React.Component { // eslint-disable-line react
|
|
|
777
777
|
cols: [
|
|
778
778
|
{
|
|
779
779
|
id: "is-internal-url",
|
|
780
|
-
label: this
|
|
780
|
+
label: 'Is this internal url',
|
|
781
781
|
standalone: true,
|
|
782
782
|
labelStyle: {
|
|
783
783
|
backgroundColor: "white",
|
|
@@ -7,99 +7,67 @@ import { defineMessages } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
export default defineMessages({
|
|
9
9
|
"header": {
|
|
10
|
-
id: '
|
|
10
|
+
id: 'app.containers.WeChat.header',
|
|
11
11
|
defaultMessage: 'WeChat',
|
|
12
12
|
},
|
|
13
13
|
'Template mapping': {
|
|
14
|
-
id: '
|
|
14
|
+
id: 'app.containers.WeChat.templateMapping',
|
|
15
15
|
defaultMessage: 'Template mapping',
|
|
16
16
|
},
|
|
17
17
|
'Discard': {
|
|
18
|
-
id: '
|
|
18
|
+
id: 'app.containers.WeChat.discard',
|
|
19
19
|
defaultMessage: 'Discard',
|
|
20
20
|
},
|
|
21
21
|
'Cancel': {
|
|
22
|
-
id: '
|
|
22
|
+
id: 'app.containers.WeChat.cancel',
|
|
23
23
|
defaultMessage: 'Cancel',
|
|
24
24
|
},
|
|
25
25
|
'Save': {
|
|
26
|
-
id: '
|
|
26
|
+
id: 'app.containers.WeChat.save',
|
|
27
27
|
defaultMessage: 'Save',
|
|
28
28
|
},
|
|
29
29
|
'Account Id': {
|
|
30
|
-
id: '
|
|
30
|
+
id: 'app.containers.WeChat.accountId',
|
|
31
31
|
defaultMessage: 'Account id',
|
|
32
32
|
},
|
|
33
33
|
'Select Wechat Account': {
|
|
34
|
-
id: '
|
|
34
|
+
id: 'app.containers.WeChat.selectWechatAccount',
|
|
35
35
|
defaultMessage: 'Select wechat account',
|
|
36
36
|
},
|
|
37
37
|
'Template': {
|
|
38
|
-
id: '
|
|
38
|
+
id: 'app.containers.WeChat.template',
|
|
39
39
|
defaultMessage: 'Template',
|
|
40
40
|
},
|
|
41
41
|
'Select Wechat Template': {
|
|
42
|
-
id: '
|
|
42
|
+
id: 'app.containers.WeChat.selectWechatTemplate',
|
|
43
43
|
defaultMessage: 'Select wechat template',
|
|
44
44
|
},
|
|
45
45
|
'Link': {
|
|
46
|
-
id: '
|
|
46
|
+
id: 'app.containers.WeChat.link',
|
|
47
47
|
defaultMessage: 'Link',
|
|
48
48
|
},
|
|
49
|
-
'
|
|
50
|
-
id: '
|
|
49
|
+
'Is this internal url': {
|
|
50
|
+
id: 'app.containers.WeChat.isInternalUrl',
|
|
51
51
|
defaultMessage: 'Is this internal url',
|
|
52
52
|
},
|
|
53
53
|
"Tags": {
|
|
54
|
-
id: '
|
|
54
|
+
id: 'app.containers.WeChat.tagsLabel',
|
|
55
55
|
defaultMessage: "Tags",
|
|
56
56
|
},
|
|
57
57
|
"gettingTemplateData": {
|
|
58
|
-
id: '
|
|
58
|
+
id: 'app.containers.WeChat.gettingTemplateData',
|
|
59
59
|
defaultMessage: "Getting template data..",
|
|
60
60
|
},
|
|
61
61
|
"wechatEditSuccess": {
|
|
62
|
-
id: '
|
|
62
|
+
id: 'app.containers.WeChat.wechatEditSuccess',
|
|
63
63
|
defaultMessage: "WeChat template unmapped successfully",
|
|
64
64
|
},
|
|
65
65
|
"wechatCreateSuccess": {
|
|
66
|
-
id: '
|
|
66
|
+
id: 'app.containers.WeChat.wechatCreateSuccess',
|
|
67
67
|
defaultMessage: "WeChat template mapped successfully",
|
|
68
68
|
},
|
|
69
69
|
"somethingWentWrong": {
|
|
70
|
-
id: '
|
|
70
|
+
id: 'app.containers.WeChat.somethingWentWrong',
|
|
71
71
|
defaultMessage: "Something went wrong!!",
|
|
72
72
|
},
|
|
73
|
-
"goBackConfirmation": {
|
|
74
|
-
id: 'creatives.containers.WeChat.goBackConfirmation',
|
|
75
|
-
defaultMessage: "Going back will discard all the changes you've made. Continue?",
|
|
76
|
-
},
|
|
77
|
-
"alertMessage": {
|
|
78
|
-
id: 'creatives.containers.WeChat.alertMessage',
|
|
79
|
-
defaultMessage: "Alert",
|
|
80
|
-
},
|
|
81
|
-
"goBackTemporaryConfirmation": {
|
|
82
|
-
id: 'creatives.containers.WeChat.goBackTemporaryConfirmation',
|
|
83
|
-
defaultMessage: "Do you really want to go back? All your temporary changes will be lost!",
|
|
84
|
-
},
|
|
85
|
-
"mapTemplateHeader": {
|
|
86
|
-
id: 'creatives.containers.WeChat.mapTemplateHeader',
|
|
87
|
-
defaultMessage: "Header",
|
|
88
|
-
},
|
|
89
|
-
"mapTemplateFooter": {
|
|
90
|
-
id: 'creatives.containers.WeChat.mapTemplateFooter',
|
|
91
|
-
defaultMessage: "Footer",
|
|
92
|
-
},
|
|
93
|
-
"invalidContent": {
|
|
94
|
-
id: 'creatives.containers.WeChat.invalidContent',
|
|
95
|
-
defaultMessage: "has invalid content.",
|
|
96
|
-
},
|
|
97
|
-
"link": {
|
|
98
|
-
id: 'creatives.containers.WeChat.link',
|
|
99
|
-
defaultMessage: "Link",
|
|
100
|
-
},
|
|
101
|
-
"linkCantEmpty": {
|
|
102
|
-
id: 'creatives.containers.WeChat.linkCantEmpty',
|
|
103
|
-
defaultMessage: "Link cannot be empty",
|
|
104
|
-
},
|
|
105
73
|
});
|
|
@@ -7,135 +7,135 @@ import { defineMessages } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
export default defineMessages({
|
|
9
9
|
"header": {
|
|
10
|
-
id: '
|
|
10
|
+
id: 'app.containers.Create.header',
|
|
11
11
|
defaultMessage: 'This is Create container !',
|
|
12
12
|
},
|
|
13
13
|
"titleCharacterCount": {
|
|
14
|
-
id: '
|
|
14
|
+
id: 'app.containers.Create.titleCharacterCount',
|
|
15
15
|
defaultMessage: 'Title exceeds character count limit by',
|
|
16
16
|
},
|
|
17
17
|
"authorCharacterCount": {
|
|
18
|
-
id: '
|
|
18
|
+
id: 'app.containers.Create.authorCharacterCount',
|
|
19
19
|
defaultMessage: 'Author exceeds character count limit by',
|
|
20
20
|
},
|
|
21
21
|
"coverAbstractCharacterCount": {
|
|
22
|
-
id: '
|
|
22
|
+
id: 'app.containers.Create.coverAbstractCharacterCount',
|
|
23
23
|
defaultMessage: 'Cover abstract exceeds character count limit by',
|
|
24
24
|
},
|
|
25
25
|
"saveSuccess": {
|
|
26
|
-
id: '
|
|
26
|
+
id: 'app.containers.Create.saveSuccess',
|
|
27
27
|
defaultMessage: 'Template saved successfully',
|
|
28
28
|
},
|
|
29
29
|
"modalTitle": {
|
|
30
|
-
id: '
|
|
30
|
+
id: 'app.containers.Create.modalTitle',
|
|
31
31
|
defaultMessage: 'Alert',
|
|
32
32
|
},
|
|
33
33
|
"modalBody": {
|
|
34
|
-
id: '
|
|
34
|
+
id: 'app.containers.Create.modalBody',
|
|
35
35
|
defaultMessage: 'Do you really want to go back? All your temporary changes will be lost!',
|
|
36
36
|
},
|
|
37
37
|
"deleteContent": {
|
|
38
|
-
id: '
|
|
38
|
+
id: 'app.containers.Create.deleteContent',
|
|
39
39
|
defaultMessage: 'Do you really want to delete? All your temporary changes will be lost!',
|
|
40
40
|
},
|
|
41
41
|
"emptyTemplateName": {
|
|
42
|
-
id: '
|
|
42
|
+
id: 'app.containers.Create.emptyTemplateName',
|
|
43
43
|
defaultMessage: 'Cannot leave template name empty',
|
|
44
44
|
},
|
|
45
45
|
"wrongFormatFile": {
|
|
46
|
-
id: '
|
|
46
|
+
id: 'app.containers.Create.wrongFormatFile',
|
|
47
47
|
defaultMessage: 'Wrong file upoaded. Please upload image file',
|
|
48
48
|
},
|
|
49
49
|
"formEmpty": {
|
|
50
|
-
id: '
|
|
50
|
+
id: 'app.containers.Create.formEmpty',
|
|
51
51
|
defaultMessage: 'Cannot leave form empty',
|
|
52
52
|
},
|
|
53
53
|
"titleEmpty": {
|
|
54
|
-
id: '
|
|
54
|
+
id: 'app.containers.Create.titleEmpty',
|
|
55
55
|
defaultMessage: 'Cannot leave title field empty',
|
|
56
56
|
},
|
|
57
57
|
"noImage": {
|
|
58
|
-
id: '
|
|
58
|
+
id: 'app.containers.Create.noImage',
|
|
59
59
|
defaultMessage: 'Please upload an image',
|
|
60
60
|
},
|
|
61
61
|
"sourceLinkEmpty": {
|
|
62
|
-
id: '
|
|
62
|
+
id: 'app.containers.Create.sourceLinkEmpty',
|
|
63
63
|
defaultMessage: 'Cannot leave source link field empty',
|
|
64
64
|
},
|
|
65
65
|
"contentEmpty": {
|
|
66
|
-
id: '
|
|
66
|
+
id: 'app.containers.Create.contentEmpty',
|
|
67
67
|
defaultMessage: 'Cannot leave content field empty',
|
|
68
68
|
},
|
|
69
69
|
"titleNameRepeated": {
|
|
70
|
-
id: '
|
|
70
|
+
id: 'app.containers.Create.titleNameRepeated',
|
|
71
71
|
defaultMessage: 'Title name cannot be repeated',
|
|
72
72
|
},
|
|
73
73
|
"wrongUrl": {
|
|
74
|
-
id: '
|
|
74
|
+
id: 'app.containers.Create.wrongUrl',
|
|
75
75
|
defaultMessage: 'Enter correct URL',
|
|
76
76
|
},
|
|
77
77
|
"maxContentCount": {
|
|
78
|
-
id: '
|
|
78
|
+
id: 'app.containers.Create.maxContentCount',
|
|
79
79
|
defaultMessage: 'You have reached the maximum template size',
|
|
80
80
|
},
|
|
81
81
|
"addNewRichmedia": {
|
|
82
|
-
id: '
|
|
82
|
+
id: 'app.containers.Create.addNewRichmedia',
|
|
83
83
|
defaultMessage: 'Add richmedia content',
|
|
84
84
|
},
|
|
85
85
|
'Title*': {
|
|
86
|
-
id: '
|
|
86
|
+
id: 'app.containers.Create.Title*',
|
|
87
87
|
defaultMessage: 'Title*',
|
|
88
88
|
},
|
|
89
89
|
'Please input title': {
|
|
90
|
-
id: '
|
|
90
|
+
id: 'app.containers.Create.Please_input_title',
|
|
91
91
|
defaultMessage: 'Please input title',
|
|
92
92
|
},
|
|
93
93
|
'Author': {
|
|
94
|
-
id: '
|
|
94
|
+
id: 'app.containers.Create.Author',
|
|
95
95
|
defaultMessage: 'Author',
|
|
96
96
|
},
|
|
97
97
|
'Please input author': {
|
|
98
|
-
id: '
|
|
98
|
+
id: 'app.containers.Create.Please_input_author',
|
|
99
99
|
defaultMessage: 'Please input author',
|
|
100
100
|
},
|
|
101
101
|
'Cover image*': {
|
|
102
|
-
id: '
|
|
102
|
+
id: 'app.containers.Create.Cover_image*',
|
|
103
103
|
defaultMessage: 'Cover image*',
|
|
104
104
|
},
|
|
105
105
|
'Cover abstract': {
|
|
106
|
-
id: '
|
|
106
|
+
id: 'app.containers.Create.Cover_abstract',
|
|
107
107
|
defaultMessage: 'Cover abstract',
|
|
108
108
|
},
|
|
109
109
|
'Please input cover abstract': {
|
|
110
|
-
id: '
|
|
110
|
+
id: 'app.containers.Create.Please_input_cover_abstract',
|
|
111
111
|
defaultMessage: 'Please input cover abstract',
|
|
112
112
|
},
|
|
113
113
|
'Content*': {
|
|
114
|
-
id: '
|
|
114
|
+
id: 'app.containers.Create.Content*',
|
|
115
115
|
defaultMessage: 'Content*',
|
|
116
116
|
},
|
|
117
117
|
'Please input content': {
|
|
118
|
-
id: '
|
|
118
|
+
id: 'app.containers.Create.Please_input_content',
|
|
119
119
|
defaultMessage: 'Please input content',
|
|
120
120
|
},
|
|
121
121
|
'Show cover picture': {
|
|
122
|
-
id: '
|
|
122
|
+
id: 'app.containers.Create.Show_cover_picture',
|
|
123
123
|
defaultMessage: 'Show cover picture',
|
|
124
124
|
},
|
|
125
125
|
'Who can post comments on this content': {
|
|
126
|
-
id: '
|
|
126
|
+
id: 'app.containers.Create.Who_can_post_comments_on_this_content',
|
|
127
127
|
defaultMessage: 'Who can post comments on this content',
|
|
128
128
|
},
|
|
129
129
|
'No one': {
|
|
130
|
-
id: '
|
|
130
|
+
id: 'app.containers.Create.No_one',
|
|
131
131
|
defaultMessage: 'No one',
|
|
132
132
|
},
|
|
133
133
|
'Anyone': {
|
|
134
|
-
id: '
|
|
134
|
+
id: 'app.containers.Create.Anyone',
|
|
135
135
|
defaultMessage: 'Anyone',
|
|
136
136
|
},
|
|
137
137
|
'Only followers': {
|
|
138
|
-
id: '
|
|
138
|
+
id: 'app.containers.Create.Only_followers',
|
|
139
139
|
defaultMessage: 'Only followers',
|
|
140
140
|
},
|
|
141
141
|
});
|
|
@@ -19,9 +19,9 @@ export class View extends React.PureComponent { // eslint-disable-line react/pre
|
|
|
19
19
|
return (
|
|
20
20
|
<div>
|
|
21
21
|
<Helmet
|
|
22
|
-
title=
|
|
22
|
+
title="View"
|
|
23
23
|
meta={[
|
|
24
|
-
{ name: 'description', content:
|
|
24
|
+
{ name: 'description', content: 'Description of View' },
|
|
25
25
|
]}
|
|
26
26
|
/>
|
|
27
27
|
<FormattedMessage {...messages.header} />
|
|
@@ -7,15 +7,7 @@ import { defineMessages } from 'react-intl';
|
|
|
7
7
|
|
|
8
8
|
export default defineMessages({
|
|
9
9
|
header: {
|
|
10
|
-
id: '
|
|
10
|
+
id: 'app.containers.View.header',
|
|
11
11
|
defaultMessage: 'This is View container !',
|
|
12
12
|
},
|
|
13
|
-
view: {
|
|
14
|
-
id: 'creatives.containers.View.view',
|
|
15
|
-
defaultMessage: 'View',
|
|
16
|
-
},
|
|
17
|
-
descriptionView: {
|
|
18
|
-
id: 'creatives.containers.View.descriptionView',
|
|
19
|
-
defaultMessage: 'Description of View',
|
|
20
|
-
},
|
|
21
13
|
});
|
package/index.js
CHANGED
|
@@ -27,9 +27,17 @@ import CallTask from './v2Containers/CallTask/index';
|
|
|
27
27
|
import callTaskReducer from './v2Containers/CallTask/reducer';
|
|
28
28
|
import callTaskSaga from './v2Containers/CallTask/sagas';
|
|
29
29
|
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
30
|
+
import WeChatMapTemplate from './v2Containers/WeChat/MapTemplates';
|
|
31
|
+
import weChatMapTemplateReducer from './v2Containers/WeChat/MapTemplates/reducer';
|
|
32
|
+
import weChatMapTemplateSaga from './v2Containers/WeChat/MapTemplates/sagas';
|
|
33
|
+
|
|
34
|
+
import WeChatRichMediaCreate from './v2Containers/WeChat/RichmediaTemplates/Create';
|
|
35
|
+
import weChatRichMediaCreateReducer from './v2Containers/WeChat/RichmediaTemplates/Create/reducer';
|
|
36
|
+
import weChatRichMediaCreateSaga from './v2Containers/WeChat/RichmediaTemplates/Create/sagas';
|
|
37
|
+
|
|
38
|
+
import WeChatRichMediaEdit from './v2Containers/WeChat/RichmediaTemplates/Edit';
|
|
39
|
+
import weChatRichMediaEditReducer from './v2Containers/WeChat/RichmediaTemplates/Edit/reducer';
|
|
40
|
+
import weChatRichMediaEditSaga from './v2Containers/WeChat/RichmediaTemplates/Edit/sagas';
|
|
33
41
|
|
|
34
42
|
import MobilepushCreate from './v2Containers/MobilePush/Create';
|
|
35
43
|
import mobilepushCreateReducer from './v2Containers/MobilePush/Create/reducer';
|
|
@@ -51,7 +59,7 @@ import TemplatesV2 from './v2Containers/TemplatesV2/index';
|
|
|
51
59
|
|
|
52
60
|
import CreativesContainer from './v2Containers/CreativesContainer';
|
|
53
61
|
import CreativesContainerReducer from './v2Containers/CreativesContainer/reducer';
|
|
54
|
-
|
|
62
|
+
|
|
55
63
|
|
|
56
64
|
export {default as Ebill} from './v2Containers/Ebill';
|
|
57
65
|
export {default as EbillReducer} from './v2Containers/Ebill/reducer';
|
|
@@ -65,7 +73,9 @@ const SmsCreateContainer = {SmsCreate, smsCreateReducer, smsCreateSaga};
|
|
|
65
73
|
const SmsEditContainer = {SmsEdit, smsEditReducer, smsEditSaga};
|
|
66
74
|
const EmailContainer = {Email, emailReducer, emailSaga};
|
|
67
75
|
const CallTaskContainer = {CallTask, callTaskReducer, callTaskSaga};
|
|
68
|
-
const
|
|
76
|
+
const WeChatMapTemplateContainer = {WeChatMapTemplate, weChatMapTemplateReducer, weChatMapTemplateSaga};
|
|
77
|
+
const WeChatRichMediaCreateContainer = {WeChatRichMediaCreate, weChatRichMediaCreateReducer, weChatRichMediaCreateSaga};
|
|
78
|
+
const WeChatRichMediaEditContainer = {WeChatRichMediaEdit, weChatRichMediaEditReducer, weChatRichMediaEditSaga};
|
|
69
79
|
const MobilePushCreateContainer = {MobilepushCreate, mobilepushCreateReducer, mobilepushCreateSaga};
|
|
70
80
|
const MobilePushEditContainer = {MobilepushEdit, mobilepushEditReducer, mobilepushEditSaga};
|
|
71
81
|
const LineCreateContainer = {LineCreate, lineCreateReducer, lineCreateSaga};
|
|
@@ -81,6 +91,8 @@ export {default as EmailPreviewV2} from './v2Components/EmailPreviewV2';
|
|
|
81
91
|
export {default as CallTaskPreview} from './v2Components/CallTaskPreview';
|
|
82
92
|
export {default as EmailMobilePreview} from './v2Components/EmailMobilePreview';
|
|
83
93
|
export {default as MobilePushPreview} from './v2Components/MobilePushPreviewV2';
|
|
94
|
+
export {default as WechatRichmediaTemplatePreview} from './v2Components/TemplatePreview/WechatRichmediaTemplatePreview';
|
|
95
|
+
|
|
84
96
|
CreativesContainer.CreativesContainerReducer = CreativesContainerReducer;
|
|
85
97
|
|
|
86
98
|
export { CapContainer,
|
|
@@ -90,7 +102,9 @@ export { CapContainer,
|
|
|
90
102
|
SmsEditContainer,
|
|
91
103
|
EmailContainer,
|
|
92
104
|
CallTaskContainer,
|
|
93
|
-
|
|
105
|
+
WeChatMapTemplateContainer,
|
|
106
|
+
WeChatRichMediaCreateContainer,
|
|
107
|
+
WeChatRichMediaEditContainer,
|
|
94
108
|
Cap,
|
|
95
109
|
Templates,
|
|
96
110
|
SmsCreate,
|
|
@@ -102,6 +116,4 @@ export { CapContainer,
|
|
|
102
116
|
MobilePushEditContainer,
|
|
103
117
|
TemplatesV2Container,
|
|
104
118
|
CreativesContainer,
|
|
105
|
-
WeChat,
|
|
106
|
-
updateCharCount,
|
|
107
119
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capillarytech/creatives-library",
|
|
3
3
|
"author": "meharaj",
|
|
4
|
-
"version": "3.0
|
|
4
|
+
"version": "3.1.0",
|
|
5
5
|
"description": "Capillary creatives ui",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.es.js",
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "LicenseRef-LICENSE",
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"@babel/node": "^7.7.7",
|
|
16
|
+
"@babel/polyfill": "7.4.3",
|
|
17
|
+
"babel-cli": "^6.26.0",
|
|
15
18
|
"chalk": "1.1.3",
|
|
16
19
|
"jquery": "^3.3.1",
|
|
17
20
|
"load-script": "^1.0.0",
|
package/routes.js
CHANGED
|
@@ -12,7 +12,7 @@ import * as emailSagas from 'containers/Email/sagas';
|
|
|
12
12
|
import * as templateSagas from 'containers/Templates/sagas';
|
|
13
13
|
import * as lineSagas from 'containers/Line/Create/sagas';
|
|
14
14
|
import * as languageSaga from './v2Containers/LanguageProvider/sagas';
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
const errorLoading = (err) => {
|
|
17
17
|
console.error('Dynamic page loading failed', err); // eslint-disable-line no-console
|
|
18
18
|
};
|
|
@@ -23,7 +23,6 @@ const loadModule = (cb) => (componentModule) => {
|
|
|
23
23
|
|
|
24
24
|
export default function createRoutes(store) {
|
|
25
25
|
// Create reusable async injectors using getAsyncInjectors factory
|
|
26
|
-
updateCharCount("", false); // calling here to get unsubscribeurl from api.
|
|
27
26
|
const { injectReducer, injectSagas } = getAsyncInjectors(store); // eslint-disable-line no-unused-vars
|
|
28
27
|
injectSagas(rootSaga.default);
|
|
29
28
|
injectSagas(languageSaga.default);
|
|
@@ -620,6 +619,12 @@ export default function createRoutes(store) {
|
|
|
620
619
|
import('v2Containers/MobilePush/Create/reducer'),
|
|
621
620
|
import('v2Containers/MobilePush/Edit/sagas'),
|
|
622
621
|
import('v2Containers/MobilePush/Edit/reducer'),
|
|
622
|
+
import('v2Containers/WeChat/MapTemplates/sagas'),
|
|
623
|
+
import('v2Containers/WeChat/MapTemplates/reducer'),
|
|
624
|
+
import('v2Containers/WeChat/RichmediaTemplates/Create/sagas'),
|
|
625
|
+
import('v2Containers/WeChat/RichmediaTemplates/Create/reducer'),
|
|
626
|
+
import('v2Containers/WeChat/RichmediaTemplates/Edit/sagas'),
|
|
627
|
+
import('v2Containers/WeChat/RichmediaTemplates/Edit/reducer'),
|
|
623
628
|
import('v2Containers/Assets/Gallery/reducer'),
|
|
624
629
|
import('v2Containers/Assets/Gallery/sagas'),
|
|
625
630
|
]);
|
|
@@ -635,6 +640,9 @@ export default function createRoutes(store) {
|
|
|
635
640
|
callTaskReducer, callTaskSagas,
|
|
636
641
|
mpushCreateSagas, mpushCreateReducer,
|
|
637
642
|
mpushEditSagas, mpushEditReducer,
|
|
643
|
+
weChatMapTemplatesSagas, weChatMapTemplatesReducer,
|
|
644
|
+
weChatRichmediaTemplatesCreateSagas, weChatRichmediaTemplatesCreateReducer,
|
|
645
|
+
weChatRichmediaTemplatesEditSagas, weChatRichmediaTemplatesEditReducer,
|
|
638
646
|
galleryReducer, gallerySagas,
|
|
639
647
|
]) => {
|
|
640
648
|
injectReducer('templates', reducer.default);
|
|
@@ -646,6 +654,9 @@ export default function createRoutes(store) {
|
|
|
646
654
|
injectReducer('callTask', callTaskReducer.default);
|
|
647
655
|
injectReducer('mobileCreate', mpushCreateReducer.default);
|
|
648
656
|
injectReducer('mobileEdit', mpushEditReducer.default);
|
|
657
|
+
injectReducer('weChatMapTemplate', weChatMapTemplatesReducer.default);
|
|
658
|
+
injectReducer('weChatRichmediaCreate', weChatRichmediaTemplatesCreateReducer.default);
|
|
659
|
+
injectReducer('weChatRichmediaEdit', weChatRichmediaTemplatesEditReducer.default);
|
|
649
660
|
injectReducer('gallery', galleryReducer.default);
|
|
650
661
|
injectSagas(gallerySagas.default);
|
|
651
662
|
injectSagas(sagas.default);
|
|
@@ -656,6 +667,9 @@ export default function createRoutes(store) {
|
|
|
656
667
|
injectSagas(callTaskSagas.default);
|
|
657
668
|
injectSagas(mpushCreateSagas.default);
|
|
658
669
|
injectSagas(mpushEditSagas.default);
|
|
670
|
+
injectSagas(weChatMapTemplatesSagas.default);
|
|
671
|
+
injectSagas(weChatRichmediaTemplatesCreateSagas.default);
|
|
672
|
+
injectSagas(weChatRichmediaTemplatesEditSagas.default);
|
|
659
673
|
renderRoute(component);
|
|
660
674
|
});
|
|
661
675
|
importModules.catch(errorLoading);
|
package/services/api.js
CHANGED
|
@@ -10,12 +10,10 @@ import * as API from '../utils/ApiCaller';
|
|
|
10
10
|
let API_ENDPOINT = config.development.api_endpoint;
|
|
11
11
|
let API_AUTH_ENDPOINT = config.development.auth_endpoint;
|
|
12
12
|
let ARYA_ENDPOINT = config.development.arya_endpoint;
|
|
13
|
-
let SUBSCRIPTION_API_ENDPOINT = config.development.subscription_api_endpoint;
|
|
14
13
|
if (process.env.NODE_ENV === 'production') {
|
|
15
14
|
API_ENDPOINT = config.production.api_endpoint;
|
|
16
15
|
API_AUTH_ENDPOINT = config.production.auth_endpoint;
|
|
17
16
|
ARYA_ENDPOINT = config.production.arya_endpoint;
|
|
18
|
-
SUBSCRIPTION_API_ENDPOINT = config.production.subscription_api_endpoint;
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
const isProd = process.env.NODE_ENV === 'production';
|
|
@@ -321,21 +319,8 @@ export const createLineTemplate = ({template}) => {
|
|
|
321
319
|
return request(url, getAPICallObject('POST', template));
|
|
322
320
|
};
|
|
323
321
|
|
|
324
|
-
export const getLocizMessage =
|
|
322
|
+
export const getLocizMessage = (locale) => {
|
|
325
323
|
const appName = 'creatives_v2';
|
|
326
324
|
const url = `${ARYA_ENDPOINT}/translations/${appName}/${locale}`;
|
|
327
|
-
|
|
328
|
-
return response;
|
|
329
|
-
};
|
|
330
|
-
|
|
331
|
-
export const getUnsubscribeUrl = () => {
|
|
332
|
-
const body = {
|
|
333
|
-
orgUnitId: -1,
|
|
334
|
-
source: 'INSTORE',
|
|
335
|
-
accountId: '',
|
|
336
|
-
priority: 'BULK',
|
|
337
|
-
channel: 'mobile',
|
|
338
|
-
};
|
|
339
|
-
const url = `${SUBSCRIPTION_API_ENDPOINT}/unsubscribeUrl`;
|
|
340
|
-
return request(url, getAPICallObject('POST', body));
|
|
325
|
+
return request(url, getAPICallObject('GET'));
|
|
341
326
|
};
|
package/services/getSchema.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {SMS, EMAIL, MOBILE_PUSH} from '../v2Containers/CreativesContainer/constants';
|
|
1
|
+
import {SMS, EMAIL, MOBILE_PUSH, WECHAT} from '../v2Containers/CreativesContainer/constants';
|
|
2
2
|
export default function getSchema(channel) {
|
|
3
3
|
let schemaPath = '../containers/';
|
|
4
4
|
switch (channel.toUpperCase()) {
|
|
@@ -11,6 +11,9 @@ export default function getSchema(channel) {
|
|
|
11
11
|
case MOBILE_PUSH:
|
|
12
12
|
schemaPath = import(`../v2Containers/MobilePush/initialSchema`);
|
|
13
13
|
break;
|
|
14
|
+
case WECHAT:
|
|
15
|
+
schemaPath = import(`../v2Containers/WeChat/MapTemplates/initialSchema`);
|
|
16
|
+
break;
|
|
14
17
|
default:
|
|
15
18
|
schemaPath = import(`../v2Containers/Sms/initialSchema`);
|
|
16
19
|
}
|