@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
|
@@ -10,37 +10,15 @@ export default {
|
|
|
10
10
|
{
|
|
11
11
|
rowClassName: "wechat-richmedia-row",
|
|
12
12
|
cols: [
|
|
13
|
-
{
|
|
14
|
-
id: "title-label",
|
|
15
|
-
metaType: "label",
|
|
16
|
-
value: "Title*",
|
|
17
|
-
primitive: true,
|
|
18
|
-
dynamicTab: false,
|
|
19
|
-
type: "div",
|
|
20
|
-
width: 4,
|
|
21
|
-
style: {
|
|
22
|
-
backgroundColor: "white",
|
|
23
|
-
textAlign: "left",
|
|
24
|
-
color: "#333333",
|
|
25
|
-
lineHeight: "24px",
|
|
26
|
-
fontSize: "14px",
|
|
27
|
-
fontFamily: "open-sans",
|
|
28
|
-
fontStyle: "normal",
|
|
29
|
-
},
|
|
30
|
-
onlyDisplay: true,
|
|
31
|
-
colStyle: {
|
|
32
|
-
flex: 1,
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
13
|
{
|
|
36
14
|
id: "title-value",
|
|
37
15
|
label: "Title",
|
|
16
|
+
inductiveText: "Write a brief headline to draw customer's attention",
|
|
38
17
|
type: "input",
|
|
39
18
|
metaType: "text",
|
|
40
19
|
datatype: "string",
|
|
41
20
|
required: true,
|
|
42
|
-
width:
|
|
43
|
-
placeholder: "Please input title",
|
|
21
|
+
width: 24,
|
|
44
22
|
fluid: true,
|
|
45
23
|
styling: "semantic",
|
|
46
24
|
order: 1,
|
|
@@ -51,42 +29,21 @@ export default {
|
|
|
51
29
|
"onChange",
|
|
52
30
|
],
|
|
53
31
|
errorMessage: "This field is required!",
|
|
32
|
+
size: "large",
|
|
54
33
|
}],
|
|
55
34
|
},
|
|
56
35
|
{
|
|
57
36
|
rowClassName: "wechat-richmedia-row",
|
|
58
37
|
cols: [
|
|
59
|
-
{
|
|
60
|
-
id: "author-label",
|
|
61
|
-
metaType: "label",
|
|
62
|
-
value: "Author",
|
|
63
|
-
primitive: true,
|
|
64
|
-
dynamicTab: false,
|
|
65
|
-
type: "div",
|
|
66
|
-
width: 4,
|
|
67
|
-
style: {
|
|
68
|
-
backgroundColor: "white",
|
|
69
|
-
textAlign: "left",
|
|
70
|
-
color: "#333333",
|
|
71
|
-
lineHeight: "24px",
|
|
72
|
-
fontSize: "14px",
|
|
73
|
-
fontFamily: "open-sans",
|
|
74
|
-
fontStyle: "normal",
|
|
75
|
-
},
|
|
76
|
-
onlyDisplay: true,
|
|
77
|
-
colStyle: {
|
|
78
|
-
flex: 1,
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
38
|
{
|
|
82
39
|
id: "author-value",
|
|
83
40
|
label: "Author",
|
|
41
|
+
inductiveText: "Brand/name that your customer will recognise",
|
|
84
42
|
type: "input",
|
|
85
43
|
metaType: "text",
|
|
86
44
|
datatype: "string",
|
|
87
45
|
required: true,
|
|
88
|
-
width:
|
|
89
|
-
placeholder: "Please input author",
|
|
46
|
+
width: 24,
|
|
90
47
|
fluid: true,
|
|
91
48
|
styling: "semantic",
|
|
92
49
|
order: 1,
|
|
@@ -96,38 +53,69 @@ export default {
|
|
|
96
53
|
"onChange",
|
|
97
54
|
],
|
|
98
55
|
errorMessage: "This field is required!",
|
|
56
|
+
size: "large",
|
|
99
57
|
}],
|
|
100
58
|
},
|
|
101
59
|
{
|
|
102
|
-
rowClassName: "wechat-richmedia-row",
|
|
103
60
|
cols: [
|
|
104
61
|
{
|
|
105
|
-
id: "image-label",
|
|
62
|
+
id: "upload-image-label",
|
|
106
63
|
metaType: "label",
|
|
107
|
-
value: "Cover image
|
|
64
|
+
value: "Cover image",
|
|
108
65
|
primitive: true,
|
|
109
66
|
dynamicTab: false,
|
|
110
67
|
type: "div",
|
|
111
68
|
width: 4,
|
|
69
|
+
onlyDisplay: true,
|
|
112
70
|
style: {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
color: "#333333",
|
|
116
|
-
lineHeight: "24px",
|
|
71
|
+
color: "#091e42",
|
|
72
|
+
lineHeight: "20px",
|
|
117
73
|
fontSize: "14px",
|
|
118
|
-
|
|
119
|
-
fontStyle: "normal",
|
|
74
|
+
fontWeight: "500",
|
|
120
75
|
},
|
|
121
|
-
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "upload-image-label-resolution",
|
|
79
|
+
metaType: "label",
|
|
80
|
+
value: "Resolution 360 x 200",
|
|
81
|
+
primitive: true,
|
|
82
|
+
dynamicTab: false,
|
|
83
|
+
type: "div",
|
|
84
|
+
width: 11,
|
|
122
85
|
onlyDisplay: true,
|
|
123
|
-
|
|
124
|
-
|
|
86
|
+
style: {
|
|
87
|
+
color: "#5e6c84",
|
|
88
|
+
lineHeight: "20px",
|
|
89
|
+
fontSize: "12px",
|
|
125
90
|
},
|
|
126
|
-
},
|
|
91
|
+
}],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
cols: [
|
|
95
|
+
{
|
|
96
|
+
id: "upload-image-inductive-text",
|
|
97
|
+
metaType: "label",
|
|
98
|
+
value: "The relevant image that complements title.",
|
|
99
|
+
primitive: true,
|
|
100
|
+
dynamicTab: false,
|
|
101
|
+
type: "div",
|
|
102
|
+
width: 24,
|
|
103
|
+
onlyDisplay: true,
|
|
104
|
+
style: {
|
|
105
|
+
color: "#5e6c84",
|
|
106
|
+
lineHeight: "16px",
|
|
107
|
+
fontSize: "12px",
|
|
108
|
+
marginBottom: "8px",
|
|
109
|
+
},
|
|
110
|
+
}],
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
rowClassName: "wechat-richmedia-row",
|
|
114
|
+
cols: [
|
|
127
115
|
{
|
|
128
116
|
id: "image-value",
|
|
129
117
|
label: "Upload Image",
|
|
130
|
-
type: "
|
|
118
|
+
type: "capDragger",
|
|
131
119
|
width: 4,
|
|
132
120
|
supportedExtensions: ".bmp, .png, .jpeg, .gif .jpg",
|
|
133
121
|
metaType: "text",
|
|
@@ -142,6 +130,9 @@ export default {
|
|
|
142
130
|
supportedEvents: [
|
|
143
131
|
"onUpload",
|
|
144
132
|
],
|
|
133
|
+
componentProps: {
|
|
134
|
+
showUploadList: false,
|
|
135
|
+
},
|
|
145
136
|
}],
|
|
146
137
|
},
|
|
147
138
|
{
|
|
@@ -150,37 +141,15 @@ export default {
|
|
|
150
141
|
'margin-bottom': "0",
|
|
151
142
|
},
|
|
152
143
|
cols: [
|
|
153
|
-
{
|
|
154
|
-
id: "cover-abstract-label",
|
|
155
|
-
metaType: "label",
|
|
156
|
-
value: "Cover abstract",
|
|
157
|
-
primitive: true,
|
|
158
|
-
dynamicTab: false,
|
|
159
|
-
type: "div",
|
|
160
|
-
width: 4,
|
|
161
|
-
style: {
|
|
162
|
-
backgroundColor: "white",
|
|
163
|
-
textAlign: "left",
|
|
164
|
-
color: "#333333",
|
|
165
|
-
lineHeight: "24px",
|
|
166
|
-
fontSize: "14px",
|
|
167
|
-
fontFamily: "open-sans",
|
|
168
|
-
fontStyle: "normal",
|
|
169
|
-
},
|
|
170
|
-
onlyDisplay: true,
|
|
171
|
-
colStyle: {
|
|
172
|
-
flex: 1,
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
144
|
{
|
|
176
145
|
id: "cover-abstract-value",
|
|
177
146
|
label: "Cover abstract",
|
|
178
|
-
|
|
147
|
+
inductiveText: "A short description help customers learn more",
|
|
148
|
+
type: "input",
|
|
179
149
|
metaType: "text",
|
|
180
150
|
datatype: "string",
|
|
181
151
|
required: true,
|
|
182
|
-
width:
|
|
183
|
-
placeholder: "Please input cover abstract",
|
|
152
|
+
width: 24,
|
|
184
153
|
fluid: false,
|
|
185
154
|
styling: "semantic",
|
|
186
155
|
order: 2,
|
|
@@ -195,109 +164,7 @@ export default {
|
|
|
195
164
|
maxRows: 18,
|
|
196
165
|
minRows: 3,
|
|
197
166
|
},
|
|
198
|
-
|
|
199
|
-
backgroundColor: "white",
|
|
200
|
-
textAlign: "left",
|
|
201
|
-
color: "#333333",
|
|
202
|
-
lineHeight: "24px",
|
|
203
|
-
fontSize: "14px",
|
|
204
|
-
fontFamily: "proxima-nova",
|
|
205
|
-
fontStyle: "normal",
|
|
206
|
-
},
|
|
207
|
-
}],
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
rowClassName: "wechat-richmedia-row",
|
|
211
|
-
rowStyle: {
|
|
212
|
-
display: "inline-flex",
|
|
213
|
-
},
|
|
214
|
-
cols: [
|
|
215
|
-
{
|
|
216
|
-
id: "show-cover-pic-value",
|
|
217
|
-
supportedEvents: [
|
|
218
|
-
"onChange",
|
|
219
|
-
],
|
|
220
|
-
type: "checkbox",
|
|
221
|
-
metaType: "text",
|
|
222
|
-
datatype: "boolean",
|
|
223
|
-
required: true,
|
|
224
|
-
fluid: true,
|
|
225
|
-
styling: "semantic",
|
|
226
|
-
order: 1,
|
|
227
|
-
offset: 4,
|
|
228
|
-
value: 0,
|
|
229
|
-
onlyDisplay: false,
|
|
230
|
-
disabled: false,
|
|
231
|
-
errorMessage: "Please check if you intend to use unicode characters.",
|
|
232
|
-
customComponent: false,
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
id: "show-cover-pic-label",
|
|
236
|
-
metaType: "label",
|
|
237
|
-
value: "Whether to display the graphic cover on the graphic details page",
|
|
238
|
-
primitive: true,
|
|
239
|
-
dynamicTab: false,
|
|
240
|
-
type: "div",
|
|
241
|
-
style: {
|
|
242
|
-
backgroundColor: "white",
|
|
243
|
-
textAlign: "left",
|
|
244
|
-
color: "#333333",
|
|
245
|
-
lineHeight: "24px",
|
|
246
|
-
fontSize: "14px",
|
|
247
|
-
fontFamily: "open-sans",
|
|
248
|
-
fontStyle: "normal",
|
|
249
|
-
},
|
|
250
|
-
offset: 0,
|
|
251
|
-
onlyDisplay: true,
|
|
252
|
-
colStyle: {
|
|
253
|
-
flex: 1,
|
|
254
|
-
},
|
|
255
|
-
},
|
|
256
|
-
],
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
rowClassName: "wechat-richmedia-row",
|
|
260
|
-
cols: [
|
|
261
|
-
{
|
|
262
|
-
id: "source-link-label",
|
|
263
|
-
metaType: "label",
|
|
264
|
-
value: "Source link*",
|
|
265
|
-
primitive: true,
|
|
266
|
-
dynamicTab: false,
|
|
267
|
-
type: "div",
|
|
268
|
-
width: 4,
|
|
269
|
-
style: {
|
|
270
|
-
backgroundColor: "white",
|
|
271
|
-
textAlign: "left",
|
|
272
|
-
color: "#333333",
|
|
273
|
-
lineHeight: "24px",
|
|
274
|
-
fontSize: "14px",
|
|
275
|
-
fontFamily: "open-sans",
|
|
276
|
-
fontStyle: "normal",
|
|
277
|
-
},
|
|
278
|
-
onlyDisplay: true,
|
|
279
|
-
colStyle: {
|
|
280
|
-
flex: 1,
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
id: "source-link-value",
|
|
285
|
-
label: "Cover abstract",
|
|
286
|
-
type: "input",
|
|
287
|
-
metaType: "text",
|
|
288
|
-
datatype: "string",
|
|
289
|
-
required: true,
|
|
290
|
-
width: 16,
|
|
291
|
-
placeholder: "Example: http://example.com",
|
|
292
|
-
fluid: true,
|
|
293
|
-
styling: "semantic",
|
|
294
|
-
order: 1,
|
|
295
|
-
disabled: false,
|
|
296
|
-
customComponent: false,
|
|
297
|
-
supportedEvents: [
|
|
298
|
-
"onChange",
|
|
299
|
-
],
|
|
300
|
-
errorMessage: "This field is required!",
|
|
167
|
+
size: "large",
|
|
301
168
|
}],
|
|
302
169
|
}],
|
|
303
170
|
},
|
|
@@ -307,35 +174,6 @@ export default {
|
|
|
307
174
|
display: "inline-flex",
|
|
308
175
|
},
|
|
309
176
|
childSections: [
|
|
310
|
-
{
|
|
311
|
-
type: "multicols",
|
|
312
|
-
inputFields: [
|
|
313
|
-
{
|
|
314
|
-
cols: [
|
|
315
|
-
{
|
|
316
|
-
id: "content-label",
|
|
317
|
-
metaType: "label",
|
|
318
|
-
value: "Content*",
|
|
319
|
-
primitive: true,
|
|
320
|
-
dynamicTab: false,
|
|
321
|
-
type: "div",
|
|
322
|
-
width: 4,
|
|
323
|
-
style: {
|
|
324
|
-
backgroundColor: "white",
|
|
325
|
-
textAlign: "left",
|
|
326
|
-
color: "#333333",
|
|
327
|
-
lineHeight: "24px",
|
|
328
|
-
fontSize: "14px",
|
|
329
|
-
fontFamily: "open-sans",
|
|
330
|
-
fontStyle: "normal",
|
|
331
|
-
width: "8.3rem",
|
|
332
|
-
},
|
|
333
|
-
onlyDisplay: true,
|
|
334
|
-
},
|
|
335
|
-
],
|
|
336
|
-
},
|
|
337
|
-
],
|
|
338
|
-
},
|
|
339
177
|
{
|
|
340
178
|
type: "parent",
|
|
341
179
|
childSections: [
|
|
@@ -345,29 +183,26 @@ export default {
|
|
|
345
183
|
{
|
|
346
184
|
cols: [
|
|
347
185
|
{
|
|
348
|
-
id: "content-label
|
|
186
|
+
id: "content-label",
|
|
349
187
|
metaType: "label",
|
|
350
|
-
value: "
|
|
188
|
+
value: "Article content",
|
|
351
189
|
primitive: true,
|
|
352
190
|
dynamicTab: false,
|
|
353
191
|
type: "div",
|
|
354
|
-
width:
|
|
192
|
+
width: 20,
|
|
193
|
+
onlyDisplay: true,
|
|
355
194
|
style: {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
color: "#333333",
|
|
359
|
-
lineHeight: "24px",
|
|
195
|
+
color: "#091e42",
|
|
196
|
+
lineHeight: "20px",
|
|
360
197
|
fontSize: "14px",
|
|
361
|
-
|
|
362
|
-
fontStyle: "normal",
|
|
198
|
+
fontWeight: "500",
|
|
363
199
|
},
|
|
364
|
-
onlyDisplay: true,
|
|
365
200
|
},
|
|
366
201
|
{
|
|
367
202
|
id: "content-image-value",
|
|
368
203
|
label: "Insert Image",
|
|
369
204
|
type: "upload",
|
|
370
|
-
width:
|
|
205
|
+
width: 4,
|
|
371
206
|
supportedExtensions: ".bmp, .png, .jpeg, .gif .jpg",
|
|
372
207
|
metaType: "text",
|
|
373
208
|
datatype: "string",
|
|
@@ -385,6 +220,24 @@ export default {
|
|
|
385
220
|
"margin-bottom": "5px",
|
|
386
221
|
},
|
|
387
222
|
},
|
|
223
|
+
{
|
|
224
|
+
id: "content-inductive-text",
|
|
225
|
+
metaType: "label",
|
|
226
|
+
value: "A short description help customers learn more",
|
|
227
|
+
primitive: true,
|
|
228
|
+
dynamicTab: false,
|
|
229
|
+
type: "div",
|
|
230
|
+
width: 24,
|
|
231
|
+
onlyDisplay: true,
|
|
232
|
+
style: {
|
|
233
|
+
color: "#5e6c84",
|
|
234
|
+
lineHeight: "16px",
|
|
235
|
+
fontSize: "12px",
|
|
236
|
+
marginBottom: "8px",
|
|
237
|
+
position: "absolute",
|
|
238
|
+
top: "-24px",
|
|
239
|
+
},
|
|
240
|
+
},
|
|
388
241
|
],
|
|
389
242
|
},
|
|
390
243
|
],
|
|
@@ -403,7 +256,6 @@ export default {
|
|
|
403
256
|
datatype: "string",
|
|
404
257
|
required: true,
|
|
405
258
|
errorMessage: "This field is required!",
|
|
406
|
-
placeholder: "Please input content",
|
|
407
259
|
fluid: false,
|
|
408
260
|
styling: "semantic",
|
|
409
261
|
onlyDisplay: false,
|
|
@@ -445,6 +297,29 @@ export default {
|
|
|
445
297
|
inputFields: [
|
|
446
298
|
{
|
|
447
299
|
rowClassName: "wechat-richmedia-row",
|
|
300
|
+
cols: [
|
|
301
|
+
{
|
|
302
|
+
id: "source-link-value",
|
|
303
|
+
label: "Read more link",
|
|
304
|
+
inductiveText: "Link to help customers discover more about the brand.",
|
|
305
|
+
type: "input",
|
|
306
|
+
metaType: "text",
|
|
307
|
+
datatype: "string",
|
|
308
|
+
required: true,
|
|
309
|
+
width: 24,
|
|
310
|
+
fluid: true,
|
|
311
|
+
styling: "semantic",
|
|
312
|
+
order: 1,
|
|
313
|
+
disabled: false,
|
|
314
|
+
customComponent: false,
|
|
315
|
+
supportedEvents: [
|
|
316
|
+
"onChange",
|
|
317
|
+
],
|
|
318
|
+
size: "large",
|
|
319
|
+
errorMessage: "This field is required!",
|
|
320
|
+
}],
|
|
321
|
+
},
|
|
322
|
+
{
|
|
448
323
|
cols: [
|
|
449
324
|
{
|
|
450
325
|
id: "post-comments-label",
|
|
@@ -453,24 +328,16 @@ export default {
|
|
|
453
328
|
primitive: true,
|
|
454
329
|
dynamicTab: false,
|
|
455
330
|
type: "div",
|
|
456
|
-
width:
|
|
457
|
-
style: {
|
|
458
|
-
backgroundColor: "white",
|
|
459
|
-
textAlign: "left",
|
|
460
|
-
color: "#333333",
|
|
461
|
-
lineHeight: "24px",
|
|
462
|
-
fontSize: "14px",
|
|
463
|
-
fontFamily: "open-sans",
|
|
464
|
-
fontStyle: "normal",
|
|
465
|
-
},
|
|
466
|
-
offset: 0,
|
|
331
|
+
width: 11,
|
|
467
332
|
onlyDisplay: true,
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
333
|
+
}],
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
rowClassName: "wechat-richmedia-row",
|
|
337
|
+
cols: [
|
|
472
338
|
{
|
|
473
339
|
id: "post-comments-value",
|
|
340
|
+
label: "Who can post comments on this content",
|
|
474
341
|
type: "radioGroup",
|
|
475
342
|
metaType: "text",
|
|
476
343
|
datatype: "string",
|
|
@@ -18,13 +18,16 @@ export function* uploadAsset({file, assetType, fileParams, mode, wechatParams, c
|
|
|
18
18
|
yield put({ type: types.UPLOAD_ASSET_FAILURE, error });
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
export function* saveTemplate(template) {
|
|
21
|
+
export function* saveTemplate({template, callback}) {
|
|
22
22
|
try {
|
|
23
23
|
let errorMsg;
|
|
24
|
-
const result = yield call(Api.createWeChatTemplate, template);
|
|
24
|
+
const result = yield call(Api.createWeChatTemplate, {template});
|
|
25
25
|
if (!result.success || result.status.code === 500) {
|
|
26
26
|
errorMsg = result.message;
|
|
27
27
|
}
|
|
28
|
+
if (callback) {
|
|
29
|
+
yield call(callback, result.response);
|
|
30
|
+
}
|
|
28
31
|
yield put({ type: types.SAVE_TEMPLATE_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', errorMsg});
|
|
29
32
|
} catch (error) {
|
|
30
33
|
yield put({ type: types.SAVE_TEMPLATE_FAILURE, error });
|
|
@@ -3,7 +3,7 @@ import { createSelector } from 'reselect';
|
|
|
3
3
|
/**
|
|
4
4
|
* Direct selector to the create state domain
|
|
5
5
|
*/
|
|
6
|
-
const selectCreateDomain = () => (state) => state.get('
|
|
6
|
+
const selectCreateDomain = () => (state) => state.get('weChatRichmediaCreate');
|
|
7
7
|
const selectTemplatesDomain = (state) => state.get('templates');
|
|
8
8
|
/**
|
|
9
9
|
* Other specific selectors
|
|
@@ -12,9 +12,9 @@ export function defaultAction() {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export function getTemplateDetails(id, channel) {
|
|
15
|
+
export function getTemplateDetails(id, channel, callback) {
|
|
16
16
|
console.log('getting template', id);
|
|
17
17
|
return {
|
|
18
|
-
type: types.GET_TEMPLATE_DETAILS_REQUEST, id, channel,
|
|
18
|
+
type: types.GET_TEMPLATE_DETAILS_REQUEST, id, channel, callback,
|
|
19
19
|
};
|
|
20
20
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-undef */
|
|
1
2
|
/*
|
|
2
3
|
*
|
|
3
4
|
* Edit
|
|
@@ -10,10 +11,12 @@ import React from 'react';
|
|
|
10
11
|
import { connect } from 'react-redux';
|
|
11
12
|
import { bindActionCreators } from 'redux';
|
|
12
13
|
import _ from 'lodash';
|
|
14
|
+
import { CapSpin } from '@capillarytech/cap-ui-library';
|
|
13
15
|
import { createStructuredSelector } from 'reselect';
|
|
14
16
|
import makeSelectEdit, { makeSelectTemplates } from './selectors';
|
|
15
17
|
import * as actions from './actions';
|
|
16
18
|
import Create from '../Create';
|
|
19
|
+
import { getCommonProps } from '../../helper';
|
|
17
20
|
|
|
18
21
|
export class Edit extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function
|
|
19
22
|
constructor(props) {
|
|
@@ -24,7 +27,7 @@ export class Edit extends React.PureComponent { // eslint-disable-line react/pre
|
|
|
24
27
|
};
|
|
25
28
|
this.setTemplateData = this.setTemplateData.bind(this);
|
|
26
29
|
}
|
|
27
|
-
componentWillMount
|
|
30
|
+
componentWillMount() {
|
|
28
31
|
if (_.isEmpty(this.props.Templates.selectedWeChatAccount)) {
|
|
29
32
|
const module = this.props.location.query.module ? this.props.location.query.module : 'default';
|
|
30
33
|
const type = this.props.location.query.type;
|
|
@@ -34,14 +37,11 @@ export class Edit extends React.PureComponent { // eslint-disable-line react/pre
|
|
|
34
37
|
});
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
|
-
componentDidMount
|
|
38
|
-
this.props.actions.getTemplateDetails(this.props.params.id, "wechat")
|
|
39
|
-
|
|
40
|
-
componentWillReceiveProps = (nextProps) => {
|
|
41
|
-
if (nextProps.Edit.templateDetails && !_.isEmpty(nextProps.Edit.templateDetails) && !_.isEqual(this.props.Edit.templateDetails, nextProps.Edit.templateDetails)) {
|
|
42
|
-
const templateData = this.setTemplateData(nextProps.Edit.templateDetails);
|
|
40
|
+
componentDidMount() {
|
|
41
|
+
this.props.actions.getTemplateDetails(this.props.params.id, "wechat", (templateDetails) => {
|
|
42
|
+
const templateData = this.setTemplateData(templateDetails);
|
|
43
43
|
this.setState({templateData});
|
|
44
|
-
}
|
|
44
|
+
});
|
|
45
45
|
}
|
|
46
46
|
setTemplateData = (templateDetails) => {
|
|
47
47
|
const templateData = {};
|
|
@@ -63,7 +63,7 @@ export class Edit extends React.PureComponent { // eslint-disable-line react/pre
|
|
|
63
63
|
};
|
|
64
64
|
contentId += 1;
|
|
65
65
|
});
|
|
66
|
-
if (this.props.location.query.type === "embedded"
|
|
66
|
+
if (this.props.location.query.type === "embedded") {
|
|
67
67
|
templateData.templateDetails = templateDetails;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -83,12 +83,13 @@ export class Edit extends React.PureComponent { // eslint-disable-line react/pre
|
|
|
83
83
|
templateId={this.props.Edit && this.props.Edit.templateDetails && this.props.Edit.templateDetails._id ? this.props.Edit.templateDetails._id : ""}
|
|
84
84
|
router={this.props.router}
|
|
85
85
|
location={this.props.location}
|
|
86
|
+
{...getCommonProps(this.props)}
|
|
86
87
|
/>
|
|
87
88
|
</div>
|
|
88
89
|
);
|
|
89
90
|
}
|
|
90
91
|
return (
|
|
91
|
-
<
|
|
92
|
+
<CapSpin spinning></CapSpin>
|
|
92
93
|
);
|
|
93
94
|
}
|
|
94
95
|
}
|
|
@@ -7,14 +7,16 @@ import * as types from './constants';
|
|
|
7
7
|
export function* defaultSaga() {
|
|
8
8
|
// See example in v2Containers/HomePage/sagas.js
|
|
9
9
|
}
|
|
10
|
-
export function* getTemplateDetails({id, channel}) {
|
|
10
|
+
export function* getTemplateDetails({id, channel, callback}) {
|
|
11
11
|
try {
|
|
12
12
|
const params = {
|
|
13
13
|
id, channel,
|
|
14
14
|
};
|
|
15
15
|
console.log('saga get Template details', id);
|
|
16
16
|
const result = yield call(Api.getTemplateDetails, params);
|
|
17
|
-
|
|
17
|
+
if (callback) {
|
|
18
|
+
yield call(callback, result.response);
|
|
19
|
+
}
|
|
18
20
|
yield put({ type: types.GET_TEMPLATE_DETAILS_SUCCESS, data: result.response });
|
|
19
21
|
} catch (error) {
|
|
20
22
|
yield put({ type: types.GET_TEMPLATE_DETAILS_FAILURE, error });
|
|
@@ -3,7 +3,7 @@ import { createSelector } from 'reselect';
|
|
|
3
3
|
/**
|
|
4
4
|
* Direct selector to the edit state domain
|
|
5
5
|
*/
|
|
6
|
-
const selectEditDomain = () => (state) => state.get('
|
|
6
|
+
const selectEditDomain = () => (state) => state.get('weChatRichmediaEdit');
|
|
7
7
|
const selectTemplatesDomain = (state) => state.get('templates');
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -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.containersV2.View.view',
|
|
15
|
-
defaultMessage: 'View',
|
|
16
|
-
},
|
|
17
|
-
descriptionView: {
|
|
18
|
-
id: 'creatives.containersV2.View.descriptionView',
|
|
19
|
-
defaultMessage: 'Description of View',
|
|
20
|
-
},
|
|
21
13
|
});
|
|
File without changes
|