@capillarytech/creatives-library 3.1.49 → 3.2.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/app.js +1 -1
- package/components/FormBuilder/index.js +1 -1
- package/components/Header/index.js +3 -4
- package/components/Header/messages.js +0 -4
- package/config/app.js +2 -4
- package/containers/Assets/Gallery/index.js +1 -1
- package/containers/Cap/index.js +5 -4
- package/containers/Email/index.js +2 -2
- package/containers/Email/messages.js +0 -8
- package/containers/LanguageProvider/index.js +4 -28
- package/containers/Templates/index.js +2 -2
- package/containers/Templates/messages.js +4 -24
- package/containers/WeChat/MapTemplates/messages.js +0 -4
- package/containers/WeChat/RichmediaTemplates/Create/messages.js +0 -24
- package/i18n.js +9 -16
- package/index.js +0 -6
- package/package.json +4 -1
- package/reducers.js +1 -1
- package/routes.js +1 -2
- package/services/api.js +2 -11
- package/translations/en.json +56 -119
- package/translations/zh.json +53 -116
- package/utils/smsCharCountV2.js +1 -1
- package/v2Components/CapTagList/index.js +2 -2
- package/v2Components/FormBuilder/index.js +4 -7
- package/v2Components/NavigationBar/index.js +17 -11
- package/v2Components/NavigationBar/messages.js +0 -28
- package/v2Components/NewCallTask/index.js +1 -3
- package/v2Components/TopBar/index.js +0 -3
- package/v2Components/TopBar/messages.js +0 -8
- package/v2Containers/Assets/Gallery/index.js +6 -12
- package/v2Containers/Assets/Gallery/messages.js +0 -4
- package/v2Containers/CallTask/index.js +1 -3
- package/v2Containers/Cap/index.js +2 -3
- package/v2Containers/CreativesContainer/SlideBoxContent.js +1 -14
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +1 -2
- package/v2Containers/CreativesContainer/index.js +2 -10
- package/v2Containers/CreativesContainer/index.scss +3 -6
- package/v2Containers/Email/index.js +7 -10
- package/v2Containers/Email/messages.js +0 -16
- package/v2Containers/EmailWrapper/index.js +9 -12
- package/v2Containers/LanguageProvider/actions.js +4 -9
- package/v2Containers/LanguageProvider/constants.js +1 -7
- package/v2Containers/LanguageProvider/index.js +12 -49
- package/v2Containers/LanguageProvider/reducer.js +9 -11
- package/v2Containers/LanguageProvider/selectors.js +1 -1
- package/v2Containers/MobilePush/Create/index.js +1 -2
- package/v2Containers/MobilePush/Create/messages.js +0 -4
- package/v2Containers/MobilePush/Edit/index.js +1 -2
- package/v2Containers/MobilePush/Edit/messages.js +0 -4
- package/v2Containers/Sms/Create/index.js +1 -3
- package/v2Containers/Sms/Create/messages.js +0 -16
- package/v2Containers/Sms/Edit/index.js +1 -3
- package/v2Containers/Sms/Edit/messages.js +0 -16
- package/v2Containers/TagList/index.js +0 -43
- package/v2Containers/Templates/_templates.scss +1 -9
- package/v2Containers/Templates/index.js +53 -66
- package/v2Containers/TemplatesV2/_templatesV2.scss +5 -0
- package/v2Containers/TemplatesV2/index.js +54 -54
- package/v2Containers/WeChat/MapTemplates/index.js +7 -2
- package/v2Containers/WeChat/MapTemplates/messages.js +5 -9
- package/v2Containers/WeChat/RichmediaTemplates/Create/_createRichmedia.scss +0 -10
- package/v2Containers/WeChat/RichmediaTemplates/Create/actions.js +0 -9
- package/v2Containers/WeChat/RichmediaTemplates/Create/constants.js +0 -3
- package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +21 -154
- package/v2Containers/WeChat/RichmediaTemplates/Create/messages.js +46 -119
- package/v2Containers/WeChat/RichmediaTemplates/Create/reducer.js +1 -24
- package/v2Containers/WeChat/RichmediaTemplates/Create/sagas.js +1 -46
- package/v2Containers/WeChat/RichmediaTemplates/Edit/constants.js +0 -4
- package/v2Containers/WeChat/RichmediaTemplates/Edit/index.js +1 -8
- package/v2Containers/WeChat/RichmediaTemplates/View/index.js +7 -0
- package/v2Containers/WeChat/Wrapper/_wrapper.scss +1 -9
- package/v2Containers/WeChat/Wrapper/messages.js +5 -5
- package/hoc/withStyles.js +0 -12
- package/v2Containers/LanguageProvider/sagas.js +0 -39
- package/v2Containers/TemplatesV2/TemplatesV2.style.js +0 -29
package/app.js
CHANGED
|
@@ -10,7 +10,7 @@ import CapV2 from 'v2Containers/Cap';
|
|
|
10
10
|
import Cap from 'containers/Cap';
|
|
11
11
|
import { LocaleProvider } from 'antd';
|
|
12
12
|
import { makeSelectLocationState } from 'containers/Cap/selectors';
|
|
13
|
-
import LanguageProvider from '
|
|
13
|
+
import LanguageProvider from 'containers/LanguageProvider';
|
|
14
14
|
import FontFaceObserver from 'fontfaceobserver';
|
|
15
15
|
/* eslint-disable import/no-unresolved, import/extensions */
|
|
16
16
|
import '!file-loader?name=[name].[ext]!./favicon.ico';
|
|
@@ -3191,7 +3191,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3191
3191
|
|
|
3192
3192
|
FormBuilder.defaultProps = {
|
|
3193
3193
|
isNewVersionFlow: false,
|
|
3194
|
-
userLocale:
|
|
3194
|
+
userLocale: 'en',
|
|
3195
3195
|
};
|
|
3196
3196
|
|
|
3197
3197
|
FormBuilder.propTypes = {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
8
|
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import { FormattedMessage
|
|
10
|
+
import { FormattedMessage } from 'react-intl';
|
|
11
11
|
import { CapRow, CapColumn, CapInput, CapButton } from '@capillarytech/cap-react-ui-library';
|
|
12
12
|
import messages from './messages';
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ function Header(props) {
|
|
|
16
16
|
<div>
|
|
17
17
|
<CapRow className="template-form-header">
|
|
18
18
|
<CapColumn span={10}>
|
|
19
|
-
<CapInput id="template-name" placeholder=
|
|
19
|
+
<CapInput id="template-name" placeholder="Enter template name*" defaultValue={props.templateName} type="input" onChange={props.templateNameHandler}/>
|
|
20
20
|
</CapColumn>
|
|
21
21
|
<CapColumn span={2} offset={8}>
|
|
22
22
|
<CapButton id="preview-button" type="cancel" onClick={props.previewHandler}> <FormattedMessage {...messages.preview} /> </CapButton>
|
|
@@ -38,7 +38,6 @@ Header.propTypes = {
|
|
|
38
38
|
cancelHandler: PropTypes.func,
|
|
39
39
|
saveHandler: PropTypes.func,
|
|
40
40
|
templateName: PropTypes.string,
|
|
41
|
-
intl: intlShape.isRequired,
|
|
42
41
|
};
|
|
43
42
|
|
|
44
|
-
export default
|
|
43
|
+
export default Header;
|
package/config/app.js
CHANGED
|
@@ -5,18 +5,16 @@ const config = {
|
|
|
5
5
|
production: {
|
|
6
6
|
api_endpoint: '/arya/api/v1/creatives',
|
|
7
7
|
auth_endpoint: '/arya/api/v1/auth',
|
|
8
|
-
arya_endpoint: '/arya/api/v1',
|
|
9
8
|
login_url: 'auth/login',
|
|
10
9
|
dashboard_url: '/sms',
|
|
11
10
|
dashboard_url_v2: '/v2',
|
|
12
|
-
subscription_api_endpoint: '/arya/api/v1/
|
|
11
|
+
subscription_api_endpoint: '/arya/api/v1/subscription',
|
|
13
12
|
accountConfig: (strs, accountId) => `${window.location.origin}/org/config/AccountAdd?q=a&channelId=2&accountId=${accountId}&edit=1`,
|
|
14
13
|
},
|
|
15
14
|
development: {
|
|
16
15
|
api_endpoint: 'https://nightly.capillary.in/arya/api/v1/creatives',
|
|
17
16
|
auth_endpoint: 'https://nightly.capillary.in/arya/api/v1/auth',
|
|
18
|
-
|
|
19
|
-
subscription_api_endpoint: 'https://nightly.capillary.in/arya/api/v1/org-settings/subscription',
|
|
17
|
+
subscription_api_endpoint: 'https://nightly.capillary.in/arya/api/v1/subscription',
|
|
20
18
|
login_url: 'auth/login',
|
|
21
19
|
dashboard_url: '/sms',
|
|
22
20
|
dashboard_url_v2: '/v2',
|
|
@@ -382,7 +382,7 @@ export class Gallery extends React.Component { // eslint-disable-line react/pref
|
|
|
382
382
|
<div>
|
|
383
383
|
{/*<Spin spinning={this.props.Gallery.assetUploading || this.props.Gallery.fetchingAllAssets}>*/}
|
|
384
384
|
<Helmet
|
|
385
|
-
title=
|
|
385
|
+
title="Gallery"
|
|
386
386
|
/>
|
|
387
387
|
{/* this.props.location.query.type !== 'embedded' && <Row style={{marginBottom: '16px'}}>
|
|
388
388
|
<Col>
|
package/containers/Cap/index.js
CHANGED
|
@@ -164,10 +164,8 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
164
164
|
|
|
165
165
|
getMappedLocale(locale) {
|
|
166
166
|
const map = {
|
|
167
|
-
'en': 'en
|
|
167
|
+
'en': 'en',
|
|
168
168
|
'zh-cn': 'zh',
|
|
169
|
-
'en-US': 'en-US',
|
|
170
|
-
'zh': 'zh',
|
|
171
169
|
};
|
|
172
170
|
return map[locale];
|
|
173
171
|
}
|
|
@@ -209,7 +207,10 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
209
207
|
if (!_.isEmpty(orgList)) {
|
|
210
208
|
_.forEach(orgList, (item) => {
|
|
211
209
|
const id = item.orgID;
|
|
212
|
-
|
|
210
|
+
let name = item.orgName;
|
|
211
|
+
if (id === 486) {
|
|
212
|
+
name = 'Demo Org';
|
|
213
|
+
}
|
|
213
214
|
proxyOrgList.push({ key: id, text: name, value: id });
|
|
214
215
|
});
|
|
215
216
|
}
|
|
@@ -3109,8 +3109,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
3109
3109
|
);
|
|
3110
3110
|
const schema = this.state.schema;
|
|
3111
3111
|
const spinning = this.state.loading || (this.props.Email && "createTemplateInProgress" in this.props.Email && this.props.Email.createTemplateInProgress) || (this.props.Email.assetUploading !== undefined && this.props.Email.assetUploading);
|
|
3112
|
-
const previewHeader = (<h3>
|
|
3113
|
-
const imagePreviewHeader = (<h3>
|
|
3112
|
+
const previewHeader = (<h3>Email Preview</h3>);
|
|
3113
|
+
const imagePreviewHeader = (<h3>Image Selection</h3>);
|
|
3114
3114
|
const imagePreviewContent = (
|
|
3115
3115
|
<div>
|
|
3116
3116
|
<div>
|
|
@@ -278,12 +278,4 @@ export default defineMessages({
|
|
|
278
278
|
id: 'creatives.containers.Email.Create.creatives',
|
|
279
279
|
defaultMessage: "Creatives",
|
|
280
280
|
},
|
|
281
|
-
"h3emailPreview": {
|
|
282
|
-
id: 'creatives.containers.Email.Create.h3emailPreview',
|
|
283
|
-
defaultMessage: "Email preview",
|
|
284
|
-
},
|
|
285
|
-
"h3imageSelection": {
|
|
286
|
-
id: 'creatives.containers.Email.Create.h3imageSelection',
|
|
287
|
-
defaultMessage: "Image selection",
|
|
288
|
-
},
|
|
289
281
|
});
|
|
@@ -9,42 +9,18 @@
|
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import { ConfigProvider } from 'antd';
|
|
13
|
-
import enUS from 'antd/es/locale-provider/en_US';
|
|
14
|
-
import zhCN from 'antd/es/locale-provider/zh_CN';
|
|
15
12
|
import { connect } from 'react-redux';
|
|
16
13
|
import { createSelector } from 'reselect';
|
|
17
14
|
import { IntlProvider } from 'react-intl';
|
|
18
|
-
|
|
15
|
+
|
|
19
16
|
import { makeSelectLocale } from './selectors';
|
|
20
17
|
|
|
21
18
|
export class LanguageProvider extends React.PureComponent { // eslint-disable-line react/prefer-stateless-function
|
|
22
|
-
getMappedLocale = (locale) => {
|
|
23
|
-
const map = {
|
|
24
|
-
'en': 'en-US',
|
|
25
|
-
'zh-cn': 'zh',
|
|
26
|
-
'en-US': 'en-US',
|
|
27
|
-
'zh': 'zh',
|
|
28
|
-
};
|
|
29
|
-
return map[locale];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
19
|
render() {
|
|
33
|
-
const mappedLocale = {
|
|
34
|
-
'en': enUS,
|
|
35
|
-
'zh-cn': zhCN,
|
|
36
|
-
'en-US': enUS,
|
|
37
|
-
zh: zhCN,
|
|
38
|
-
};
|
|
39
|
-
const jLocale = localStorage.getItem('jlocale') || 'en';
|
|
40
|
-
moment.locale(jLocale);
|
|
41
|
-
const file = mappedLocale[jLocale];
|
|
42
20
|
return (
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</IntlProvider>
|
|
47
|
-
</ConfigProvider>
|
|
21
|
+
<IntlProvider locale={this.props.locale} key={this.props.locale} messages={this.props.messages[this.props.locale]}>
|
|
22
|
+
{React.Children.only(this.props.children)}
|
|
23
|
+
</IntlProvider>
|
|
48
24
|
);
|
|
49
25
|
}
|
|
50
26
|
}
|
|
@@ -1344,7 +1344,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1344
1344
|
className="search-text"
|
|
1345
1345
|
style={{width: '210px'}}
|
|
1346
1346
|
placeholder={this.props.intl.formatMessage(messages.searchText)}
|
|
1347
|
-
prefix={<i className="material-icons" style={{ margin: '0', fontSize: '16px'}}>search</i>}
|
|
1347
|
+
prefix={<i className="material-icons" style={{ margin: '0', fontSize: '16px'}}>{this.props.intl.formatMessage(messages.search)}</i>}
|
|
1348
1348
|
value={this.state.searchText}
|
|
1349
1349
|
onChange={(e) => this.searchTemplate(e.target.value)}
|
|
1350
1350
|
/>
|
|
@@ -1555,7 +1555,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
1555
1555
|
<Breadcrumb>
|
|
1556
1556
|
<BreadcrumbItem>{this.props.intl.formatMessage(messages.campaigns)}</BreadcrumbItem>
|
|
1557
1557
|
<BreadcrumbItem>{this.props.intl.formatMessage(messages.creatives)}</BreadcrumbItem>
|
|
1558
|
-
<BreadcrumbItem>{this.
|
|
1558
|
+
<BreadcrumbItem>{ this.state.channel }</BreadcrumbItem>
|
|
1559
1559
|
</Breadcrumb>
|
|
1560
1560
|
}
|
|
1561
1561
|
</Col>
|
|
@@ -118,6 +118,10 @@ export default defineMessages({
|
|
|
118
118
|
id: 'creatives.containers.Templates.useEditor',
|
|
119
119
|
defaultMessage: "Use Editor",
|
|
120
120
|
},
|
|
121
|
+
"search": {
|
|
122
|
+
id: 'creatives.containers.Templates.search',
|
|
123
|
+
defaultMessage: "Search",
|
|
124
|
+
},
|
|
121
125
|
"blankTemplate": {
|
|
122
126
|
id: 'creatives.containers.Templates.blankTemplate',
|
|
123
127
|
defaultMessage: "Blank template",
|
|
@@ -306,28 +310,4 @@ export default defineMessages({
|
|
|
306
310
|
id: 'creatives.containers.Templates.descriptionTemplates',
|
|
307
311
|
defaultMessage: 'Description of templates',
|
|
308
312
|
},
|
|
309
|
-
"Sms": {
|
|
310
|
-
id: 'creatives.containers.Templates.Sms',
|
|
311
|
-
defaultMessage: 'Sms',
|
|
312
|
-
},
|
|
313
|
-
"mobilepush": {
|
|
314
|
-
id: 'creatives.containers.Templates.mobilepush',
|
|
315
|
-
defaultMessage: 'mobilepush',
|
|
316
|
-
},
|
|
317
|
-
"Gallery": {
|
|
318
|
-
id: 'creatives.containers.Templates.Gallery',
|
|
319
|
-
defaultMessage: 'Gallery',
|
|
320
|
-
},
|
|
321
|
-
"Email": {
|
|
322
|
-
id: 'creatives.containers.Templates.Email',
|
|
323
|
-
defaultMessage: 'Email',
|
|
324
|
-
},
|
|
325
|
-
"Ebill": {
|
|
326
|
-
id: 'creatives.containers.Templates.Ebill',
|
|
327
|
-
defaultMessage: 'Ebill',
|
|
328
|
-
},
|
|
329
|
-
"Line": {
|
|
330
|
-
id: 'creatives.containers.Templates.Line',
|
|
331
|
-
defaultMessage: 'Line',
|
|
332
|
-
},
|
|
333
313
|
});
|
|
@@ -102,8 +102,4 @@ export default defineMessages({
|
|
|
102
102
|
id: 'creatives.containers.WeChat.linkCantEmpty',
|
|
103
103
|
defaultMessage: "Link cannot be empty",
|
|
104
104
|
},
|
|
105
|
-
"loadingEDMTemplates": {
|
|
106
|
-
id: 'creatives.containers.WeChat.loadingEDMTemplates',
|
|
107
|
-
defaultMessage: "loading EDM Templates",
|
|
108
|
-
},
|
|
109
105
|
});
|
|
@@ -138,28 +138,4 @@ export default defineMessages({
|
|
|
138
138
|
id: 'creatives.containers.Create.Only_followers',
|
|
139
139
|
defaultMessage: 'Only followers',
|
|
140
140
|
},
|
|
141
|
-
'Upload Image': {
|
|
142
|
-
id: 'creatives.containers.Create.Upload_Image',
|
|
143
|
-
defaultMessage: 'Upload Image',
|
|
144
|
-
},
|
|
145
|
-
'Whether to display the graphic cover on the graphic details page': {
|
|
146
|
-
id: 'creatives.containers.Create.graphic_details_page',
|
|
147
|
-
defaultMessage: 'Whether to display the graphic cover on the graphic details page',
|
|
148
|
-
},
|
|
149
|
-
'Source link*': {
|
|
150
|
-
id: 'creatives.containers.Create.Source_link',
|
|
151
|
-
defaultMessage: 'Source link*',
|
|
152
|
-
},
|
|
153
|
-
'to be displayed on the graphic details page': {
|
|
154
|
-
id: 'creatives.containers.Create.to_be_displayed_on_the_graphic_details_page',
|
|
155
|
-
defaultMessage: 'to be displayed on the graphic details page',
|
|
156
|
-
},
|
|
157
|
-
'Insert Image': {
|
|
158
|
-
id: 'creatives.containers.Create.Insert_Image',
|
|
159
|
-
defaultMessage: 'Insert Image',
|
|
160
|
-
},
|
|
161
|
-
'Example: http://example.com': {
|
|
162
|
-
id: 'creatives.containers.Create.http_example',
|
|
163
|
-
defaultMessage: 'Example: http://example.com',
|
|
164
|
-
},
|
|
165
141
|
});
|
package/i18n.js
CHANGED
|
@@ -4,16 +4,15 @@
|
|
|
4
4
|
* This will setup the i18n language files and locale data for your app.
|
|
5
5
|
*
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { addLocaleData } from 'react-intl';
|
|
8
|
+
import enLocaleData from 'react-intl/locale-data/en';
|
|
9
|
+
import zhLocaleData from 'react-intl/locale-data/zh';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
import { DEFAULT_LOCALE } from './containers/Cap/constants'; // eslint-disable-line
|
|
12
|
+
import enTranslationMessages from './translations/en.json';
|
|
13
|
+
import zhTranslationMessages from './translations/zh.json';
|
|
13
14
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const appLocales = [
|
|
15
|
+
export const appLocales = [
|
|
17
16
|
'en',
|
|
18
17
|
'zh',
|
|
19
18
|
];
|
|
@@ -21,7 +20,7 @@ const appLocales = [
|
|
|
21
20
|
addLocaleData(enLocaleData);
|
|
22
21
|
addLocaleData(zhLocaleData);
|
|
23
22
|
|
|
24
|
-
const formatTranslationMessages = (locale, messages) => {
|
|
23
|
+
export const formatTranslationMessages = (locale, messages) => {
|
|
25
24
|
const defaultFormattedMessages = locale !== DEFAULT_LOCALE
|
|
26
25
|
? formatTranslationMessages(DEFAULT_LOCALE, enTranslationMessages)
|
|
27
26
|
: {};
|
|
@@ -34,13 +33,7 @@ const formatTranslationMessages = (locale, messages) => {
|
|
|
34
33
|
}, {});
|
|
35
34
|
};
|
|
36
35
|
|
|
37
|
-
const translationMessages = {
|
|
36
|
+
export const translationMessages = {
|
|
38
37
|
en: formatTranslationMessages('en', enTranslationMessages),
|
|
39
38
|
zh: formatTranslationMessages('zh', zhTranslationMessages),
|
|
40
39
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
exports.appLocales = appLocales;
|
|
44
|
-
exports.formatTranslationMessages = formatTranslationMessages;
|
|
45
|
-
exports.translationMessages = translationMessages;
|
|
46
|
-
exports.DEFAULT_LOCALE = DEFAULT_LOCALE;
|
package/index.js
CHANGED
|
@@ -3,10 +3,6 @@ import capReducer from './v2Containers/Cap/reducer';
|
|
|
3
3
|
import capSaga from './v2Containers/Cap/sagas';
|
|
4
4
|
import Cap from './v2Containers/Cap/index';
|
|
5
5
|
|
|
6
|
-
import LanguageProvider from './v2Containers/LanguageProvider';
|
|
7
|
-
import LanguageProviderReducer from './v2Containers/LanguageProvider/reducer';
|
|
8
|
-
import LanguageProviderSaga from './v2Containers/LanguageProvider/sagas';
|
|
9
|
-
|
|
10
6
|
import templateReducer from './v2Containers/Templates/reducer';
|
|
11
7
|
import templateSaga from './v2Containers/Templates/sagas';
|
|
12
8
|
import Templates from './v2Containers/Templates/index';
|
|
@@ -67,7 +63,6 @@ export {default as EbillSaga} from './v2Containers/Ebill/sagas';
|
|
|
67
63
|
|
|
68
64
|
|
|
69
65
|
const CapContainer = {Cap, capReducer, capSaga};
|
|
70
|
-
const LanguageProviderContainer = {LanguageProvider, LanguageProviderReducer, LanguageProviderSaga};
|
|
71
66
|
const TemplatesContainer = {Templates, templateReducer, templateSaga};
|
|
72
67
|
const SmsCreateContainer = {SmsCreate, smsCreateReducer, smsCreateSaga};
|
|
73
68
|
const SmsEditContainer = {SmsEdit, smsEditReducer, smsEditSaga};
|
|
@@ -96,7 +91,6 @@ export {default as WechatRichmediaTemplatePreview} from './v2Components/Template
|
|
|
96
91
|
CreativesContainer.CreativesContainerReducer = CreativesContainerReducer;
|
|
97
92
|
|
|
98
93
|
export { CapContainer,
|
|
99
|
-
LanguageProviderContainer,
|
|
100
94
|
TemplatesContainer,
|
|
101
95
|
SmsCreateContainer,
|
|
102
96
|
SmsEditContainer,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capillarytech/creatives-library",
|
|
3
3
|
"author": "meharaj",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.2.0",
|
|
5
5
|
"description": "Capillary creatives ui",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.es.js",
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
"jquery": "^3.3.1",
|
|
19
19
|
"load-script": "^1.0.0",
|
|
20
20
|
"normalizr": "^3.2.3",
|
|
21
|
+
"perfect-scrollbar": "^0.7.0",
|
|
21
22
|
"react-datepicker": "^0.46.0",
|
|
23
|
+
"react-grid-layout": "^0.14.6",
|
|
22
24
|
"react-router": "^3.2.0",
|
|
23
25
|
"react-router-dom": "^4.2.2",
|
|
24
26
|
"redux": "3.6.0",
|
|
@@ -27,6 +29,7 @@
|
|
|
27
29
|
"redux-immutable": "3.0.8",
|
|
28
30
|
"reselect": "2.5.4",
|
|
29
31
|
"styled-components": "^3.2.1",
|
|
32
|
+
"warning": "3.0.0",
|
|
30
33
|
"whatwg-fetch": "2.0.1"
|
|
31
34
|
}
|
|
32
35
|
}
|
package/reducers.js
CHANGED
|
@@ -7,7 +7,7 @@ import { combineReducers } from 'redux-immutable';
|
|
|
7
7
|
import { fromJS } from 'immutable';
|
|
8
8
|
import { LOCATION_CHANGE } from 'react-router-redux';
|
|
9
9
|
|
|
10
|
-
import languageProviderReducer from '
|
|
10
|
+
import languageProviderReducer from 'containers/LanguageProvider/reducer';
|
|
11
11
|
import capReducer from 'containers/Cap/reducer';
|
|
12
12
|
import appReducer from 'containers/App/reducer';
|
|
13
13
|
import createSmsReducer from 'containers/Sms/Create/reducer';
|
package/routes.js
CHANGED
|
@@ -11,8 +11,8 @@ import * as ebillSagas from 'containers/Ebill/sagas';
|
|
|
11
11
|
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
|
-
import * as languageSaga from './v2Containers/LanguageProvider/sagas';
|
|
15
14
|
import {updateCharCount} from './utils/smsCharCountV2';
|
|
15
|
+
|
|
16
16
|
const errorLoading = (err) => {
|
|
17
17
|
console.error('Dynamic page loading failed', err); // eslint-disable-line no-console
|
|
18
18
|
};
|
|
@@ -26,7 +26,6 @@ export default function createRoutes(store) {
|
|
|
26
26
|
updateCharCount("", false); // calling here to get unsubscribeurl from api.
|
|
27
27
|
const { injectReducer, injectSagas } = getAsyncInjectors(store); // eslint-disable-line no-unused-vars
|
|
28
28
|
injectSagas(rootSaga.default);
|
|
29
|
-
injectSagas(languageSaga.default);
|
|
30
29
|
return [
|
|
31
30
|
{
|
|
32
31
|
path: '/',
|
package/services/api.js
CHANGED
|
@@ -9,12 +9,10 @@ import getSchema from './getSchema';
|
|
|
9
9
|
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
|
-
let ARYA_ENDPOINT = config.development.arya_endpoint;
|
|
13
12
|
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
|
-
ARYA_ENDPOINT = config.production.arya_endpoint;
|
|
18
16
|
SUBSCRIPTION_API_ENDPOINT = config.production.subscription_api_endpoint;
|
|
19
17
|
}
|
|
20
18
|
|
|
@@ -60,8 +58,8 @@ function checkStatus(response) {
|
|
|
60
58
|
if ((response.status >= 200 && response.status < 300) || response.status === 500) {
|
|
61
59
|
return response;
|
|
62
60
|
}
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
|
|
62
|
+
redirectIfUnauthenticated(response);
|
|
65
63
|
|
|
66
64
|
const error = new Error(response.statusText);
|
|
67
65
|
error.response = response;
|
|
@@ -321,13 +319,6 @@ export const createLineTemplate = ({template}) => {
|
|
|
321
319
|
return request(url, getAPICallObject('POST', template));
|
|
322
320
|
};
|
|
323
321
|
|
|
324
|
-
export const getLocizMessage = async (locale) => {
|
|
325
|
-
const appName = 'creatives_v2';
|
|
326
|
-
const url = `${ARYA_ENDPOINT}/translations/${appName}/${locale}`;
|
|
327
|
-
const response = await request(url, getAPICallObject('GET'));
|
|
328
|
-
return response;
|
|
329
|
-
};
|
|
330
|
-
|
|
331
322
|
export const getUnsubscribeUrl = () => {
|
|
332
323
|
const body = {
|
|
333
324
|
orgUnitId: -1,
|