@capillarytech/creatives-library 8.0.136 → 8.0.137-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/constants/unified.js +189 -0
- package/package.json +1 -1
- package/services/getSchema.js +1 -1
- package/services/localStorageApi.js +1 -0
- package/tests/i18n.test.js +1 -1
- package/utils/common.js +2 -2
- package/utils/tagValidations.js +1 -1
- package/utils/tests/checkStore.test.js +1 -1
- package/utils/tests/customAuth.test.js +1 -1
- package/utils/transformerUtils.js +1 -1
- package/v2Components/CapTagList/index.js +9 -14
- package/v2Components/Carousel/style.scss +1 -1
- package/v2Components/EmailMobilePreview/index.js +2 -2
- package/v2Components/FormBuilder/index.js +2 -2
- package/v2Components/TemplatePreview/index.js +2 -1
- package/v2Containers/Cap/tests/saga.test.js +1 -1
- package/v2Containers/Email/index.js +1 -1
- package/v2Containers/FTP/index.js +1 -1
- package/v2Containers/Line/Container/Text/index.js +1 -1
- package/v2Containers/MobilePushNew/components/MediaUploaders.js +0 -1
- package/v2Containers/MobilePushNew/components/tests/MediaUploaders.test.js +271 -0
- package/v2Containers/MobilePushNew/components/tests/PlatformContentFields.test.js +189 -0
- package/v2Containers/MobilePushNew/index.scss +0 -7
- package/v2Containers/Sms/Create/index.js +2 -2
- package/v2Containers/Sms/Edit/index.js +1 -1
- package/v2Containers/TagList/index.js +1 -1
- package/v2Containers/TagList/utils.js +1 -1
- package/v2Containers/Templates/index.js +1 -1
- package/v2Containers/Templates/sagas.js +1 -1
- package/components/BreadCrumbs/index.js +0 -65
- package/components/BreadCrumbs/messages.js +0 -13
- package/components/CapTagList/index.js +0 -235
- package/components/CapTagList/messages.js +0 -45
- package/components/Card/_customCard.scss +0 -40
- package/components/Card/index.js +0 -78
- package/components/Card/tests/__snapshots__/index.test.js.snap +0 -22
- package/components/Card/tests/index.test.js +0 -20
- package/components/CardGrid/index.js +0 -71
- package/components/Ckeditor/index.js +0 -238
- package/components/Ckeditor/messages.js +0 -13
- package/components/Ckeditor/style.scss +0 -3
- package/components/Component/index.js +0 -29
- package/components/CustomPopOver/index.js +0 -81
- package/components/CustomPopOver/messages.js +0 -17
- package/components/DateFilter/index.js +0 -349
- package/components/DateFilter/messages.js +0 -57
- package/components/DateRange/index.js +0 -114
- package/components/DateRange/messages.js +0 -25
- package/components/Edmeditor/index.js +0 -65
- package/components/Edmeditor/messages.js +0 -13
- package/components/EmailPreview/_emailPreview.scss +0 -119
- package/components/EmailPreview/assets/images/iPad.svg +0 -10
- package/components/EmailPreview/assets/images/mobile.png +0 -0
- package/components/EmailPreview/index.js +0 -107
- package/components/EmailPreview/messages.js +0 -33
- package/components/Footer/index.js +0 -27
- package/components/Footer/messages.js +0 -13
- package/components/FormBuilder/_formBuilder.scss +0 -83
- package/components/FormBuilder/index.js +0 -3279
- package/components/FormBuilder/messages.js +0 -61
- package/components/Header/index.js +0 -44
- package/components/Header/messages.js +0 -29
- package/components/ImagePreview/_imagePreview.scss +0 -63
- package/components/ImagePreview/index.js +0 -52
- package/components/ImagePreview/messages.js +0 -17
- package/components/PageHeader/_pageHeader.scss +0 -22
- package/components/PageHeader/index.js +0 -37
- package/components/PageHeader/messages.js +0 -13
- package/components/Pagination/_pagination.scss +0 -5
- package/components/Pagination/index.js +0 -49
- package/components/PreviewSideBar/_previewsidebar.scss +0 -28
- package/components/PreviewSideBar/index.js +0 -152
- package/components/PreviewSideBar/messages.js +0 -41
- package/components/Sidebar/_sidebar.scss +0 -115
- package/components/Sidebar/index.js +0 -214
- package/components/Sidebar/messages.js +0 -21
- package/components/SlideBox/_slideBox.scss +0 -63
- package/components/SlideBox/index.js +0 -47
- package/components/SlideBox/tests/index.test.js +0 -103
- package/components/SmsEditor/index.js +0 -55
- package/components/SmsTest/index.js +0 -117
- package/components/SmsTest/messages.js +0 -21
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +0 -42
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +0 -141
- package/components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +0 -21
- package/components/TemplatePreview/_templatePreview.scss +0 -642
- package/components/TemplatePreview/assets/images/WECHAT_5x.png +0 -0
- package/components/TemplatePreview/assets/images/androidPushMessage.svg +0 -45
- package/components/TemplatePreview/assets/images/home-screen-android.svg +0 -21
- package/components/TemplatePreview/assets/images/home-screen-ios.svg +0 -16
- package/components/TemplatePreview/assets/images/iPhonePushMessage.svg +0 -135
- package/components/TemplatePreview/assets/images/mobile.svg +0 -24
- package/components/TemplatePreview/assets/images/sms-body.png +0 -0
- package/components/TemplatePreview/assets/images/sms-icon.png +0 -0
- package/components/TemplatePreview/assets/images/sms_mobile.png +0 -0
- package/components/TemplatePreview/assets/images/sms_mobile_android.svg +0 -22
- package/components/TemplatePreview/assets/images/sms_mobile_ios.svg +0 -16
- package/components/TemplatePreview/assets/images/user-icon.svg +0 -19
- package/components/TemplatePreview/assets/images/wechat-mobile.svg +0 -78
- package/components/TemplatePreview/assets/images/wechat_mobile_android.svg +0 -20
- package/components/TemplatePreview/index.js +0 -617
- package/components/TemplatePreview/messages.js +0 -78
- package/components/Toastr/index.js +0 -60
- package/components/Toastr/messages.js +0 -13
- package/components/ToastrMessage/index.js +0 -113
- package/components/ToastrMessage/messages.js +0 -17
- package/components/TopBar/_topbar.scss +0 -46
- package/components/TopBar/assets/images/capillary_logo.png +0 -0
- package/components/TopBar/assets/images/old_capillary_logo.png +0 -0
- package/components/TopBar/index.js +0 -113
- package/components/TopBar/messages.js +0 -29
- package/containers/App/actions.js +0 -7
- package/containers/App/constants.js +0 -114
- package/containers/App/index.js +0 -52
- package/containers/App/reducer.js +0 -19
- package/containers/App/sagas.js +0 -31
- package/containers/App/selectors.js +0 -25
- package/containers/App/test/saga.test.js +0 -11
- package/containers/Assets/Gallery/_gallery.scss +0 -126
- package/containers/Assets/Gallery/actions.js +0 -37
- package/containers/Assets/Gallery/constants.js +0 -23
- package/containers/Assets/Gallery/index.js +0 -473
- package/containers/Assets/Gallery/messages.js +0 -93
- package/containers/Assets/Gallery/reducer.js +0 -81
- package/containers/Assets/Gallery/sagas.js +0 -80
- package/containers/Assets/Gallery/selectors.js +0 -25
- package/containers/Assets/Gallery/tests/__snapshots__/reducer.test.js.snap +0 -9
- package/containers/Assets/Gallery/tests/actions.test.js +0 -25
- package/containers/Assets/Gallery/tests/reducer.test.js +0 -96
- package/containers/Assets/Gallery/tests/saga.test.js +0 -157
- package/containers/Cap/actions.js +0 -66
- package/containers/Cap/constants.js +0 -25
- package/containers/Cap/index.js +0 -402
- package/containers/Cap/messages.js +0 -75
- package/containers/Cap/reducer.js +0 -113
- package/containers/Cap/sagas.js +0 -159
- package/containers/Cap/selectors.js +0 -75
- package/containers/Cap/tests/__snapshots__/index.test.js.snap +0 -2269
- package/containers/Cap/tests/index.test.js +0 -22
- package/containers/Cap/tests/saga.test.js +0 -284
- package/containers/Dashboard/actions.js +0 -15
- package/containers/Dashboard/constants.js +0 -7
- package/containers/Dashboard/index.js +0 -76
- package/containers/Dashboard/messages.js +0 -13
- package/containers/Dashboard/reducer.js +0 -21
- package/containers/Dashboard/sagas.js +0 -17
- package/containers/Dashboard/selectors.js +0 -25
- package/containers/Dashboard/test/saga.test.js +0 -9
- package/containers/Ebill/_ebill.scss +0 -5
- package/containers/Ebill/actions.js +0 -43
- package/containers/Ebill/constants.js +0 -20
- package/containers/Ebill/index.js +0 -1278
- package/containers/Ebill/messages.js +0 -77
- package/containers/Ebill/reducer.js +0 -72
- package/containers/Ebill/sagas.js +0 -74
- package/containers/Ebill/selectors.js +0 -25
- package/containers/Ebill/test/saga.test.js +0 -11
- package/containers/Email/_email.scss +0 -141
- package/containers/Email/actions.js +0 -81
- package/containers/Email/constants.js +0 -36
- package/containers/Email/index.js +0 -3325
- package/containers/Email/messages.js +0 -289
- package/containers/Email/reducer.js +0 -142
- package/containers/Email/sagas.js +0 -135
- package/containers/Email/selectors.js +0 -31
- package/containers/Email/test/saga.test.js +0 -671
- package/containers/LanguageProvider/actions.js +0 -17
- package/containers/LanguageProvider/constants.js +0 -8
- package/containers/LanguageProvider/index.js +0 -80
- package/containers/LanguageProvider/reducer.js +0 -30
- package/containers/LanguageProvider/selectors.js +0 -20
- package/containers/LanguageProvider/tests/actions.test.js +0 -19
- package/containers/LanguageProvider/tests/index.test.js +0 -78
- package/containers/LanguageProvider/tests/reducer.test.js +0 -20
- package/containers/LanguageProvider/tests/selectors.test.js +0 -15
- package/containers/Line/Create/_lineCreate.scss +0 -54
- package/containers/Line/Create/actions.js +0 -90
- package/containers/Line/Create/constants.js +0 -39
- package/containers/Line/Create/index.js +0 -836
- package/containers/Line/Create/messages.js +0 -189
- package/containers/Line/Create/reducer.js +0 -99
- package/containers/Line/Create/sagas.js +0 -121
- package/containers/Line/Create/selectors.js +0 -36
- package/containers/Line/Create/tests/saga.test.js +0 -202
- package/containers/Line/Edit/_lineEdit.scss +0 -35
- package/containers/Line/Edit/actions.js +0 -79
- package/containers/Line/Edit/constants.js +0 -27
- package/containers/Line/Edit/index.js +0 -1050
- package/containers/Line/Edit/messages.js +0 -177
- package/containers/Line/Edit/reducer.js +0 -83
- package/containers/Line/Edit/sagas.js +0 -80
- package/containers/Line/Edit/selectors.js +0 -29
- package/containers/Line/Edit/test/saga.test.js +0 -160
- package/containers/Login/assets/images/capillary_logo.png +0 -0
- package/containers/Login/components/LoginForm/index.js +0 -62
- package/containers/Login/components/LoginForm/messages.js +0 -33
- package/containers/Login/index.js +0 -130
- package/containers/Login/messages.js +0 -25
- package/containers/Login/selectors.js +0 -25
- package/containers/MobilePush/Create/_mobilePushCreate.scss +0 -39
- package/containers/MobilePush/Create/actions.js +0 -46
- package/containers/MobilePush/Create/constants.js +0 -23
- package/containers/MobilePush/Create/index.js +0 -2303
- package/containers/MobilePush/Create/messages.js +0 -269
- package/containers/MobilePush/Create/reducer.js +0 -70
- package/containers/MobilePush/Create/sagas.js +0 -74
- package/containers/MobilePush/Create/selectors.js +0 -28
- package/containers/MobilePush/Create/test/saga.test.js +0 -19
- package/containers/MobilePush/Edit/_mobilePushCreate.scss +0 -39
- package/containers/MobilePush/Edit/actions.js +0 -91
- package/containers/MobilePush/Edit/constants.js +0 -35
- package/containers/MobilePush/Edit/index.js +0 -2601
- package/containers/MobilePush/Edit/messages.js +0 -266
- package/containers/MobilePush/Edit/reducer.js +0 -112
- package/containers/MobilePush/Edit/sagas.js +0 -126
- package/containers/MobilePush/Edit/selectors.js +0 -29
- package/containers/MobilePush/Edit/tests/saga.test.js +0 -255
- package/containers/NotFoundPage/index.js +0 -25
- package/containers/NotFoundPage/messages.js +0 -13
- package/containers/NotFoundPage/tests/index.test.js +0 -17
- package/containers/Sms/Create/_smsCreate.scss +0 -42
- package/containers/Sms/Create/actions.js +0 -27
- package/containers/Sms/Create/constants.js +0 -16
- package/containers/Sms/Create/index.js +0 -1488
- package/containers/Sms/Create/messages.js +0 -109
- package/containers/Sms/Create/reducer.js +0 -41
- package/containers/Sms/Create/sagas.js +0 -40
- package/containers/Sms/Create/selectors.js +0 -28
- package/containers/Sms/Create/test/saga.test.js +0 -11
- package/containers/Sms/Edit/actions.js +0 -40
- package/containers/Sms/Edit/constants.js +0 -17
- package/containers/Sms/Edit/index.js +0 -1472
- package/containers/Sms/Edit/messages.js +0 -105
- package/containers/Sms/Edit/reducer.js +0 -50
- package/containers/Sms/Edit/sagas.js +0 -60
- package/containers/Sms/Edit/selectors.js +0 -32
- package/containers/Sms/Edit/test/saga.test.js +0 -13
- package/containers/TagList/_tagList.scss +0 -8
- package/containers/TagList/actions.js +0 -15
- package/containers/TagList/constants.js +0 -32
- package/containers/TagList/index.js +0 -236
- package/containers/TagList/messages.js +0 -13
- package/containers/TagList/reducer.js +0 -23
- package/containers/TagList/sagas.js +0 -11
- package/containers/TagList/selectors.js +0 -25
- package/containers/Templates/_templates.scss +0 -333
- package/containers/Templates/actions.js +0 -103
- package/containers/Templates/constants.js +0 -60
- package/containers/Templates/index.js +0 -1756
- package/containers/Templates/messages.js +0 -337
- package/containers/Templates/reducer.js +0 -142
- package/containers/Templates/sagas.js +0 -163
- package/containers/Templates/selectors.js +0 -28
- package/containers/Templates/test/saga.test.js +0 -241
- package/containers/WeChat/MapTemplates/_mapTemplates.scss +0 -8
- package/containers/WeChat/MapTemplates/actions.js +0 -52
- package/containers/WeChat/MapTemplates/constants.js +0 -28
- package/containers/WeChat/MapTemplates/index.js +0 -1610
- package/containers/WeChat/MapTemplates/messages.js +0 -157
- package/containers/WeChat/MapTemplates/reducer.js +0 -74
- package/containers/WeChat/MapTemplates/sagas.js +0 -84
- package/containers/WeChat/MapTemplates/selectors.js +0 -25
- package/containers/WeChat/MapTemplates/test/saga.test.js +0 -155
- package/containers/WeChat/RichmediaTemplates/Create/_createRichmedia.scss +0 -57
- package/containers/WeChat/RichmediaTemplates/Create/actions.js +0 -36
- package/containers/WeChat/RichmediaTemplates/Create/constants.js +0 -15
- package/containers/WeChat/RichmediaTemplates/Create/index.js +0 -1071
- package/containers/WeChat/RichmediaTemplates/Create/messages.js +0 -165
- package/containers/WeChat/RichmediaTemplates/Create/reducer.js +0 -60
- package/containers/WeChat/RichmediaTemplates/Create/richmediaschema.js +0 -497
- package/containers/WeChat/RichmediaTemplates/Create/sagas.js +0 -51
- package/containers/WeChat/RichmediaTemplates/Create/selectors.js +0 -37
- package/containers/WeChat/RichmediaTemplates/Create/test/saga.test.js +0 -13
- package/containers/WeChat/RichmediaTemplates/Edit/actions.js +0 -20
- package/containers/WeChat/RichmediaTemplates/Edit/constants.js +0 -10
- package/containers/WeChat/RichmediaTemplates/Edit/index.js +0 -136
- package/containers/WeChat/RichmediaTemplates/Edit/messages.js +0 -13
- package/containers/WeChat/RichmediaTemplates/Edit/reducer.js +0 -28
- package/containers/WeChat/RichmediaTemplates/Edit/sagas.js +0 -36
- package/containers/WeChat/RichmediaTemplates/Edit/selectors.js +0 -30
- package/containers/WeChat/RichmediaTemplates/Edit/test/saga.test.js +0 -12
- package/containers/WeChat/RichmediaTemplates/View/actions.js +0 -15
- package/containers/WeChat/RichmediaTemplates/View/constants.js +0 -7
- package/containers/WeChat/RichmediaTemplates/View/index.js +0 -47
- package/containers/WeChat/RichmediaTemplates/View/messages.js +0 -21
- package/containers/WeChat/RichmediaTemplates/View/reducer.js +0 -23
- package/containers/WeChat/RichmediaTemplates/View/sagas.js +0 -11
- package/containers/WeChat/RichmediaTemplates/View/selectors.js +0 -25
- package/utils/asyncInjectors.js +0 -78
- package/utils/callNativeEvent.js +0 -16
- package/utils/checkStore.js +0 -21
- package/utils/customAuthWrapper.js +0 -62
- package/utils/customConnectedAuthWrapper.js +0 -26
- package/utils/jed.js +0 -1497
- package/utils/smsCharCount.js +0 -351
|
@@ -1,497 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
standalone: {
|
|
3
|
-
sections: [
|
|
4
|
-
{
|
|
5
|
-
type: "parent",
|
|
6
|
-
childSections: [
|
|
7
|
-
{
|
|
8
|
-
type: "multicols",
|
|
9
|
-
inputFields: [
|
|
10
|
-
{
|
|
11
|
-
rowClassName: "wechat-richmedia-row",
|
|
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
|
-
{
|
|
36
|
-
id: "title-value",
|
|
37
|
-
label: "Title",
|
|
38
|
-
type: "input",
|
|
39
|
-
metaType: "text",
|
|
40
|
-
datatype: "string",
|
|
41
|
-
required: true,
|
|
42
|
-
width: 16,
|
|
43
|
-
placeholder: "Please input title",
|
|
44
|
-
fluid: true,
|
|
45
|
-
styling: "semantic",
|
|
46
|
-
order: 1,
|
|
47
|
-
disabled: false,
|
|
48
|
-
customComponent: false,
|
|
49
|
-
onlyDisplay: false,
|
|
50
|
-
supportedEvents: [
|
|
51
|
-
"onChange",
|
|
52
|
-
],
|
|
53
|
-
errorMessage: "This field is required!",
|
|
54
|
-
}],
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
rowClassName: "wechat-richmedia-row",
|
|
58
|
-
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
|
-
{
|
|
82
|
-
id: "author-value",
|
|
83
|
-
label: "Author",
|
|
84
|
-
type: "input",
|
|
85
|
-
metaType: "text",
|
|
86
|
-
datatype: "string",
|
|
87
|
-
required: true,
|
|
88
|
-
width: 16,
|
|
89
|
-
placeholder: "Please input author",
|
|
90
|
-
fluid: true,
|
|
91
|
-
styling: "semantic",
|
|
92
|
-
order: 1,
|
|
93
|
-
disabled: false,
|
|
94
|
-
customComponent: false,
|
|
95
|
-
supportedEvents: [
|
|
96
|
-
"onChange",
|
|
97
|
-
],
|
|
98
|
-
errorMessage: "This field is required!",
|
|
99
|
-
}],
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
rowClassName: "wechat-richmedia-row",
|
|
103
|
-
cols: [
|
|
104
|
-
{
|
|
105
|
-
id: "image-label",
|
|
106
|
-
metaType: "label",
|
|
107
|
-
value: "Cover image*",
|
|
108
|
-
primitive: true,
|
|
109
|
-
dynamicTab: false,
|
|
110
|
-
type: "div",
|
|
111
|
-
width: 4,
|
|
112
|
-
style: {
|
|
113
|
-
backgroundColor: "white",
|
|
114
|
-
textAlign: "left",
|
|
115
|
-
color: "#333333",
|
|
116
|
-
lineHeight: "24px",
|
|
117
|
-
fontSize: "14px",
|
|
118
|
-
fontFamily: "open-sans",
|
|
119
|
-
fontStyle: "normal",
|
|
120
|
-
},
|
|
121
|
-
offset: 0,
|
|
122
|
-
onlyDisplay: true,
|
|
123
|
-
colStyle: {
|
|
124
|
-
flex: 1,
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
id: "image-value",
|
|
129
|
-
label: "Upload Image",
|
|
130
|
-
type: "upload",
|
|
131
|
-
width: 4,
|
|
132
|
-
supportedExtensions: ".bmp, .png, .jpeg, .gif .jpg",
|
|
133
|
-
metaType: "text",
|
|
134
|
-
datatype: "string",
|
|
135
|
-
required: true,
|
|
136
|
-
fluid: true,
|
|
137
|
-
styling: "semantic",
|
|
138
|
-
order: 1,
|
|
139
|
-
disabled: false,
|
|
140
|
-
customComponent: true,
|
|
141
|
-
submitAction: "onUpload",
|
|
142
|
-
supportedEvents: [
|
|
143
|
-
"onUpload",
|
|
144
|
-
],
|
|
145
|
-
}],
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
rowClassName: "wechat-richmedia-row",
|
|
149
|
-
rowStyle: {
|
|
150
|
-
'margin-bottom': "0",
|
|
151
|
-
},
|
|
152
|
-
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
|
-
{
|
|
176
|
-
id: "cover-abstract-value",
|
|
177
|
-
label: "Cover abstract",
|
|
178
|
-
type: "textarea",
|
|
179
|
-
metaType: "text",
|
|
180
|
-
datatype: "string",
|
|
181
|
-
required: true,
|
|
182
|
-
width: 16,
|
|
183
|
-
placeholder: "Please input cover abstract",
|
|
184
|
-
fluid: false,
|
|
185
|
-
styling: "semantic",
|
|
186
|
-
order: 2,
|
|
187
|
-
disabled: false,
|
|
188
|
-
customComponent: false,
|
|
189
|
-
supportedEvents: [
|
|
190
|
-
"onChange",
|
|
191
|
-
],
|
|
192
|
-
errorMessage: "This field is required!",
|
|
193
|
-
autosize: true,
|
|
194
|
-
autosizeParams: {
|
|
195
|
-
maxRows: 18,
|
|
196
|
-
minRows: 3,
|
|
197
|
-
},
|
|
198
|
-
style: {
|
|
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!",
|
|
301
|
-
}],
|
|
302
|
-
}],
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
type: "parent",
|
|
306
|
-
rowStyle: {
|
|
307
|
-
display: "inline-flex",
|
|
308
|
-
},
|
|
309
|
-
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
|
-
{
|
|
340
|
-
type: "parent",
|
|
341
|
-
childSections: [
|
|
342
|
-
{
|
|
343
|
-
type: "multicols",
|
|
344
|
-
inputFields: [
|
|
345
|
-
{
|
|
346
|
-
cols: [
|
|
347
|
-
{
|
|
348
|
-
id: "content-label-2",
|
|
349
|
-
metaType: "label",
|
|
350
|
-
value: "to be displayed on the graphic details page",
|
|
351
|
-
primitive: true,
|
|
352
|
-
dynamicTab: false,
|
|
353
|
-
type: "div",
|
|
354
|
-
width: 11,
|
|
355
|
-
style: {
|
|
356
|
-
backgroundColor: "white",
|
|
357
|
-
textAlign: "left",
|
|
358
|
-
color: "#333333",
|
|
359
|
-
lineHeight: "24px",
|
|
360
|
-
fontSize: "14px",
|
|
361
|
-
fontFamily: "open-sans",
|
|
362
|
-
fontStyle: "normal",
|
|
363
|
-
},
|
|
364
|
-
onlyDisplay: true,
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
id: "content-image-value",
|
|
368
|
-
label: "Insert Image",
|
|
369
|
-
type: "upload",
|
|
370
|
-
width: 11,
|
|
371
|
-
supportedExtensions: ".bmp, .png, .jpeg, .gif .jpg",
|
|
372
|
-
metaType: "text",
|
|
373
|
-
datatype: "string",
|
|
374
|
-
required: true,
|
|
375
|
-
fluid: true,
|
|
376
|
-
styling: "semantic",
|
|
377
|
-
order: 1,
|
|
378
|
-
disabled: true,
|
|
379
|
-
customComponent: true,
|
|
380
|
-
submitAction: "onUpload",
|
|
381
|
-
supportedEvents: [
|
|
382
|
-
"onUpload",
|
|
383
|
-
],
|
|
384
|
-
style: {
|
|
385
|
-
"margin-bottom": "5px",
|
|
386
|
-
},
|
|
387
|
-
},
|
|
388
|
-
],
|
|
389
|
-
},
|
|
390
|
-
],
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
type: "multicols",
|
|
394
|
-
inputFields: [
|
|
395
|
-
{
|
|
396
|
-
rowClassName: "wechat-richmedia-row",
|
|
397
|
-
cols: [
|
|
398
|
-
{
|
|
399
|
-
id: "content-value",
|
|
400
|
-
label: "Content",
|
|
401
|
-
type: "ckeditor",
|
|
402
|
-
metaType: "text",
|
|
403
|
-
datatype: "string",
|
|
404
|
-
required: true,
|
|
405
|
-
errorMessage: "This field is required!",
|
|
406
|
-
placeholder: "Please input content",
|
|
407
|
-
fluid: false,
|
|
408
|
-
styling: "semantic",
|
|
409
|
-
onlyDisplay: false,
|
|
410
|
-
disabled: false,
|
|
411
|
-
autosize: true,
|
|
412
|
-
autosizeParams: {
|
|
413
|
-
maxRows: 18,
|
|
414
|
-
minRows: 3,
|
|
415
|
-
},
|
|
416
|
-
style: {
|
|
417
|
-
"backgroundColor": "white",
|
|
418
|
-
"textAlign": "left",
|
|
419
|
-
"color": "#333333",
|
|
420
|
-
"lineHeight": "24px",
|
|
421
|
-
"fontSize": "14px",
|
|
422
|
-
"fontFamily": "proxima-nova",
|
|
423
|
-
"fontStyle": "normal",
|
|
424
|
-
"max-width": "670px",
|
|
425
|
-
},
|
|
426
|
-
order: 2,
|
|
427
|
-
customComponent: true,
|
|
428
|
-
supportedEvents: [
|
|
429
|
-
"onContentChange",
|
|
430
|
-
"getEditorInstanse",
|
|
431
|
-
"onFocusOut",
|
|
432
|
-
"onFocusIn",
|
|
433
|
-
],
|
|
434
|
-
},
|
|
435
|
-
],
|
|
436
|
-
},
|
|
437
|
-
],
|
|
438
|
-
},
|
|
439
|
-
],
|
|
440
|
-
},
|
|
441
|
-
],
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
type: "multicols",
|
|
445
|
-
inputFields: [
|
|
446
|
-
{
|
|
447
|
-
rowClassName: "wechat-richmedia-row",
|
|
448
|
-
cols: [
|
|
449
|
-
{
|
|
450
|
-
id: "post-comments-label",
|
|
451
|
-
metaType: "label",
|
|
452
|
-
value: "Who can post comments on this content",
|
|
453
|
-
primitive: true,
|
|
454
|
-
dynamicTab: false,
|
|
455
|
-
type: "div",
|
|
456
|
-
width: 4,
|
|
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,
|
|
467
|
-
onlyDisplay: true,
|
|
468
|
-
colStyle: {
|
|
469
|
-
flex: 1,
|
|
470
|
-
},
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
id: "post-comments-value",
|
|
474
|
-
type: "radioGroup",
|
|
475
|
-
metaType: "text",
|
|
476
|
-
datatype: "string",
|
|
477
|
-
options: ["No one", "Anyone", "Only followers"],
|
|
478
|
-
value: "No one",
|
|
479
|
-
required: true,
|
|
480
|
-
width: 18,
|
|
481
|
-
errorMessage: "Please select",
|
|
482
|
-
fluid: true,
|
|
483
|
-
styling: "semantic",
|
|
484
|
-
order: 1,
|
|
485
|
-
disabled: false,
|
|
486
|
-
customComponent: false,
|
|
487
|
-
supportedEvents: ["onChange"],
|
|
488
|
-
}],
|
|
489
|
-
}],
|
|
490
|
-
},
|
|
491
|
-
],
|
|
492
|
-
}],
|
|
493
|
-
},
|
|
494
|
-
|
|
495
|
-
channel: "WECHAT",
|
|
496
|
-
module: "Campaigns",
|
|
497
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { call, put, takeLatest, all } from 'redux-saga/effects';
|
|
2
|
-
import * as Api from '../../../../services/api';
|
|
3
|
-
import * as types from './constants';
|
|
4
|
-
// import testschema from './testschema';
|
|
5
|
-
// Individual exports for testing
|
|
6
|
-
export function* defaultSaga() {
|
|
7
|
-
// See example in containers/HomePage/sagas.js
|
|
8
|
-
}
|
|
9
|
-
export function* uploadAsset({file, assetType, fileParams, mode, wechatParams, contentId, uploadId}) {
|
|
10
|
-
try {
|
|
11
|
-
const params = {
|
|
12
|
-
file, assetType, fileParams, mode, wechatParams,
|
|
13
|
-
};
|
|
14
|
-
const result = yield call(Api.uploadFile, params);
|
|
15
|
-
yield put({ type: types.UPLOAD_ASSET_SUCCESS, data: result.response.asset, statusCode: result.status ? result.status.code : '', contentId, uploadId});
|
|
16
|
-
} catch (error) {
|
|
17
|
-
yield put({ type: types.UPLOAD_ASSET_FAILURE, error });
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export function* saveTemplate(template) {
|
|
21
|
-
try {
|
|
22
|
-
let errorMsg;
|
|
23
|
-
const result = yield call(Api.createWeChatTemplate, template);
|
|
24
|
-
if (!result.success || result.status.code === 500) {
|
|
25
|
-
errorMsg = result.message;
|
|
26
|
-
}
|
|
27
|
-
yield put({ type: types.SAVE_TEMPLATE_SUCCESS, data: result.response, statusCode: result.status ? result.status.code : '', errorMsg});
|
|
28
|
-
} catch (error) {
|
|
29
|
-
yield put({ type: types.SAVE_TEMPLATE_FAILURE, error });
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function* watchUploadAsset() {
|
|
33
|
-
yield takeLatest(types.UPLOAD_ASSET_REQUEST, uploadAsset);
|
|
34
|
-
}
|
|
35
|
-
function* watchSaveTemplate() {
|
|
36
|
-
yield takeLatest(types.SAVE_TEMPLATE_REQUEST, saveTemplate);
|
|
37
|
-
}
|
|
38
|
-
// All sagas to be loaded
|
|
39
|
-
export default [
|
|
40
|
-
defaultSaga,
|
|
41
|
-
watchUploadAsset,
|
|
42
|
-
watchSaveTemplate,
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
export function* richMediaTemplatesSaga() {
|
|
46
|
-
yield all([
|
|
47
|
-
defaultSaga(),
|
|
48
|
-
watchUploadAsset(),
|
|
49
|
-
watchSaveTemplate(),
|
|
50
|
-
]);
|
|
51
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { createSelector } from 'reselect';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Direct selector to the create state domain
|
|
5
|
-
*/
|
|
6
|
-
const selectCreateDomain = () => (state) => state.get('create');
|
|
7
|
-
const selectTemplatesDomain = (state) => state.get('templates');
|
|
8
|
-
/**
|
|
9
|
-
* Other specific selectors
|
|
10
|
-
*/
|
|
11
|
-
const makeSelectTemplates = () => createSelector(
|
|
12
|
-
selectTemplatesDomain,
|
|
13
|
-
(globalState) => globalState.toJS()
|
|
14
|
-
);
|
|
15
|
-
const getAssetDetails = () => createSelector(
|
|
16
|
-
makeSelectCreate(),
|
|
17
|
-
(substate) => substate.uploadedAssetData || null,
|
|
18
|
-
);
|
|
19
|
-
const getContentAssetDetails = () => createSelector(
|
|
20
|
-
makeSelectCreate(),
|
|
21
|
-
(substate) => substate.uploadedContentAssetData || null,
|
|
22
|
-
);
|
|
23
|
-
/**
|
|
24
|
-
* Default selector used by Create
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
const makeSelectCreate = () => createSelector(
|
|
28
|
-
selectCreateDomain(),
|
|
29
|
-
(substate) => substate.toJS()
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
export default makeSelectCreate;
|
|
33
|
-
export {
|
|
34
|
-
makeSelectTemplates,
|
|
35
|
-
getAssetDetails,
|
|
36
|
-
getContentAssetDetails,
|
|
37
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { expectSaga } from "redux-saga-test-plan";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
richMediaTemplatesSaga,
|
|
5
|
-
} from "../sagas";
|
|
6
|
-
|
|
7
|
-
describe("RichMedia Template Sagas", () => {
|
|
8
|
-
describe("richMediaTemplatesSaga Combined", () => {
|
|
9
|
-
it.concurrent("should initialize all RichMedia-related watcher sagas without error", () => {
|
|
10
|
-
return expectSaga(richMediaTemplatesSaga).run();
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*
|
|
3
|
-
* Edit actions
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import * as types from './constants';
|
|
8
|
-
|
|
9
|
-
export function defaultAction() {
|
|
10
|
-
return {
|
|
11
|
-
type: types.DEFAULT_ACTION,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function getTemplateDetails(id, channel) {
|
|
16
|
-
|
|
17
|
-
return {
|
|
18
|
-
type: types.GET_TEMPLATE_DETAILS_REQUEST, id, channel,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*
|
|
3
|
-
* Edit constants
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export const DEFAULT_ACTION = 'app/Edit/DEFAULT_ACTION';
|
|
8
|
-
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/containers/WeChat/RichmediaTemplates/Edit/GET_TEMPLATE_DETAILS_REQUEST';
|
|
9
|
-
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/containers/WeChat/RichmediaTemplates/Edit/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
10
|
-
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/containers/WeChat/RichmediaTemplates/Edit/GET_TEMPLATE_DETAILS_FAILURE';
|