@capillarytech/creatives-library 6.13.1 → 6.13.3
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 +5 -2
- package/components/FormBuilder/index.js +6 -2
- package/containers/Ebill/index.js +3 -0
- package/containers/Email/index.js +16 -8
- package/containers/Sms/Create/index.js +2 -1
- package/package.json +2 -2
- package/utils/ignoredErrorMessages.js +4 -0
- package/v2Components/FormBuilder/index.js +5 -3
- package/v2Containers/Cap/index.js +30 -9
- package/v2Containers/Line/Create/_lineCreate.scss +64 -0
- package/v2Containers/Line/Create/actions.js +94 -0
- package/v2Containers/Line/Create/constants.js +43 -0
- package/v2Containers/Line/Create/index.js +1112 -0
- package/v2Containers/Line/Create/initialSchema.js +378 -0
- package/v2Containers/Line/Create/messages.js +229 -0
- package/v2Containers/Line/Create/reducer.js +99 -0
- package/v2Containers/Line/Create/sagas.js +113 -0
- package/v2Containers/Line/Create/selectors.js +30 -0
- package/v2Containers/Line/CreateWrapper/constants.js +2 -0
- package/v2Containers/Line/CreateWrapper/index.js +117 -0
- package/v2Containers/Line/CreateWrapper/messages.js +55 -0
- package/v2Containers/Line/Edit/_lineEdit.scss +23 -0
- package/v2Containers/Line/Edit/actions.js +79 -0
- package/v2Containers/Line/Edit/constants.js +27 -0
- package/v2Containers/Line/Edit/index.js +1051 -0
- package/v2Containers/Line/Edit/messages.js +173 -0
- package/v2Containers/Line/Edit/reducer.js +83 -0
- package/v2Containers/Line/Edit/sagas.js +81 -0
- package/v2Containers/Line/Edit/selectors.js +29 -0
- package/v2Containers/Line/Edit/tests/actions.test.js +18 -0
- package/v2Containers/Line/Edit/tests/index.test.js +10 -0
- package/v2Containers/Line/Edit/tests/reducer.test.js +9 -0
- package/v2Containers/Line/Edit/tests/sagas.test.js +15 -0
- package/v2Containers/Line/Edit/tests/selectors.test.js +10 -0
- package/v2Containers/WeChat/MapTemplates/index.js +1 -1
package/app.js
CHANGED
|
@@ -25,6 +25,7 @@ import initialState from './initialState';
|
|
|
25
25
|
import './styles/vendor/semantic/dist/semantic.min.css';
|
|
26
26
|
import './styles/main.scss';
|
|
27
27
|
import pathConfig from './config/path';
|
|
28
|
+
import ignoredErrorMessages from './utils/ignoredErrorMessages';
|
|
28
29
|
// addLocaleData([...en, ...es, ...fr, ...it, ...zh]);
|
|
29
30
|
|
|
30
31
|
const browserHistory = useRouterHistory(createHistory)({
|
|
@@ -38,10 +39,12 @@ const history = syncHistoryWithStore(browserHistory, store, {
|
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
const bugSnagErrorCallback = (event) => {
|
|
41
|
-
const { app: { releaseStage } = {} } = event || {};
|
|
42
|
+
const { app: { releaseStage } = {}, error } = event || {};
|
|
43
|
+
const errorMessage = error && error.message;
|
|
42
44
|
if (
|
|
43
45
|
(releaseStage || '').includes('nightly') ||
|
|
44
|
-
process.env.NODE_ENV !== 'production'
|
|
46
|
+
process.env.NODE_ENV !== 'production' ||
|
|
47
|
+
ignoredErrorMessages.include[errorMessage]
|
|
45
48
|
) {
|
|
46
49
|
return false;
|
|
47
50
|
}
|
|
@@ -204,7 +204,9 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
204
204
|
|
|
205
205
|
if (!_.isEmpty(nextProps.formData) && !_.isEqual(this.state.formData, nextProps.formData)) {
|
|
206
206
|
if (nextProps.isNewVersionFlow) {
|
|
207
|
-
const
|
|
207
|
+
const nextPropsFormData = nextProps.formData[nextProps.currentTab - 1];
|
|
208
|
+
const nextPropsTabKey = nextPropsFormData && nextPropsFormData.tabKey;
|
|
209
|
+
const tabKey = (this.state.tabKey !== nextPropsTabKey) ? nextPropsTabKey: this.state.tabKey;
|
|
208
210
|
|
|
209
211
|
this.setState({tabKey});
|
|
210
212
|
}
|
|
@@ -1841,7 +1843,9 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1841
1843
|
formData.base.tabKey = `${data}`;
|
|
1842
1844
|
}
|
|
1843
1845
|
|
|
1844
|
-
|
|
1846
|
+
const formDataActiveKey = formData[(this.state.currentTab - 1)][formData[(this.state.currentTab - 1)].activeTab];
|
|
1847
|
+
const formDataTabKey = formDataActiveKey && formDataActiveKey.tabKey;
|
|
1848
|
+
that.setState({formData, currentLangTab: formData[(this.state.currentTab - 1)].activeTab, tabKey: formDataTabKey}, () => {
|
|
1845
1849
|
val.injectedEvents[event].call(that.props.parent, this.state.currentTab, formData);
|
|
1846
1850
|
});
|
|
1847
1851
|
} else {
|
|
@@ -908,6 +908,9 @@ export class Ebill extends React.Component { // eslint-disable-line react/prefer
|
|
|
908
908
|
injectEvents(schema) {
|
|
909
909
|
console.log('now injecting events', schema);
|
|
910
910
|
const temp = schema;
|
|
911
|
+
if (!temp.standalone) {
|
|
912
|
+
temp.standalone = {};
|
|
913
|
+
}
|
|
911
914
|
temp.standalone.sections = this.injectSections(temp.standalone.sections);
|
|
912
915
|
_.forEach(temp.containers, (container) => {
|
|
913
916
|
let tempContainer = container;
|
|
@@ -1155,8 +1155,11 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1155
1155
|
const msgString = JSON.stringify(msg);
|
|
1156
1156
|
const langId = formData[this.state.currentTab - 1].activeTab;
|
|
1157
1157
|
const langIndex = formData[this.state.currentTab - 1].selectedLanguages.indexOf(langId);
|
|
1158
|
-
const
|
|
1159
|
-
|
|
1158
|
+
const elementToSelect = document.getElementById(`edmeditor${(langIndex + 1) > 1 ? (langIndex + 1) : ''}`);
|
|
1159
|
+
if (elementToSelect) {
|
|
1160
|
+
const win = elementToSelect.contentWindow;
|
|
1161
|
+
win.postMessage(msgString, '*');
|
|
1162
|
+
}
|
|
1160
1163
|
} else {
|
|
1161
1164
|
console.log('tag', this.state, this.state.editorInstanse);
|
|
1162
1165
|
if (this.state.editorInstanse) {
|
|
@@ -1415,7 +1418,8 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1415
1418
|
|
|
1416
1419
|
getMappedEvent = (id, event) => {
|
|
1417
1420
|
console.log('Map ', this.map, id, event);
|
|
1418
|
-
|
|
1421
|
+
const mapIdObject = this.map[id];
|
|
1422
|
+
return mapIdObject && mapIdObject[event] ? mapIdObject[event] : () => {};
|
|
1419
1423
|
}
|
|
1420
1424
|
|
|
1421
1425
|
getCurrentWindow = (e) => {
|
|
@@ -1511,8 +1515,11 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
1511
1515
|
_.forEach(data.selectedLanguages, (language, langIndex) => {
|
|
1512
1516
|
if (data[language].is_drag_drop) {
|
|
1513
1517
|
console.log('saving edm template', document.getElementById("edmeditor"), `edmeditor${(langIndex + 1) > 1 ? (langIndex + 1) : ''}`);
|
|
1514
|
-
const
|
|
1515
|
-
|
|
1518
|
+
const elementToSelect = document.getElementById(`edmeditor${(langIndex + 1) > 1 ? (langIndex + 1) : ''}`);
|
|
1519
|
+
if (elementToSelect) {
|
|
1520
|
+
const win = elementToSelect.contentWindow;
|
|
1521
|
+
win.postMessage("saveProject", '*');
|
|
1522
|
+
}
|
|
1516
1523
|
}
|
|
1517
1524
|
});
|
|
1518
1525
|
});
|
|
@@ -2501,7 +2508,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2501
2508
|
const tempEl = containerInputFieldCol;
|
|
2502
2509
|
if (containerInputFieldCol.id === "tab-header") {
|
|
2503
2510
|
const baseLanguage = this.props.Global.currentOrgDetails && this.props.Global.currentOrgDetails.basic_details && this.props.Global.currentOrgDetails.basic_details.base_language && this.props.Global.currentOrgDetails.basic_details.base_language !== "" ? this.props.Global.currentOrgDetails.basic_details.base_language : 'en';
|
|
2504
|
-
const supportedLanguages = this.props.Global.currentOrgDetails.basic_details.supported_languages;
|
|
2511
|
+
const supportedLanguages = this.props.Global.currentOrgDetails && this.props.Global.currentOrgDetails.basic_details && this.props.Global.currentOrgDetails.basic_details.supported_languages;
|
|
2505
2512
|
if (!supportedLanguages) {
|
|
2506
2513
|
tempEl.value = baseLanguage || 'English';
|
|
2507
2514
|
return;
|
|
@@ -2655,12 +2662,13 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
2655
2662
|
if (languageIndex === -1) {
|
|
2656
2663
|
languageIndex = 0;
|
|
2657
2664
|
}
|
|
2665
|
+
const dataBase = data.base;
|
|
2658
2666
|
const tempData = {
|
|
2659
|
-
"is_drag_drop":
|
|
2667
|
+
"is_drag_drop": dataBase && dataBase.is_drag_drop,
|
|
2660
2668
|
"lang_id": this.supportedLanguages[languageIndex].lang_id,
|
|
2661
2669
|
"iso_code": this.supportedLanguages[languageIndex].iso_code,
|
|
2662
2670
|
"language": this.supportedLanguages[languageIndex].language,
|
|
2663
|
-
"template-content": !
|
|
2671
|
+
"template-content": dataBase && !dataBase.is_drag_drop && dataBase.is_drag_drop !== 1 ? dataBase.html_content : "",
|
|
2664
2672
|
};
|
|
2665
2673
|
formData[0].base = true;
|
|
2666
2674
|
formData[0].selectedLanguages.push(this.supportedLanguages[languageIndex].iso_code);
|
|
@@ -297,7 +297,8 @@ export class Create extends React.Component { // eslint-disable-line react/prefe
|
|
|
297
297
|
onTabChange: this.onTabChange,
|
|
298
298
|
},
|
|
299
299
|
};
|
|
300
|
-
|
|
300
|
+
const mappedIdObject = map[id];
|
|
301
|
+
return mappedIdObject && mappedIdObject[event] ? mappedIdObject[event] : () => {};
|
|
301
302
|
}
|
|
302
303
|
|
|
303
304
|
setFormValidity(isFormValid) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capillarytech/creatives-library",
|
|
3
3
|
"author": "meharaj",
|
|
4
|
-
"version": "6.13.
|
|
4
|
+
"version": "6.13.3",
|
|
5
5
|
"description": "Capillary creatives ui",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.es.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@babel/polyfill": "7.4.3",
|
|
16
16
|
"@bugsnag/js": "^7.2.1",
|
|
17
17
|
"@bugsnag/plugin-react": "^7.2.1",
|
|
18
|
-
"@capillarytech/cap-ui-utils": "1.3.
|
|
18
|
+
"@capillarytech/cap-ui-utils": "1.3.3",
|
|
19
19
|
"@mailupinc/bee-plugin": "^1.2.0",
|
|
20
20
|
"babel-cli": "^6.26.0",
|
|
21
21
|
"chalk": "1.1.3",
|
|
@@ -2362,7 +2362,9 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2362
2362
|
this.renderTextAreaContent(styling, columns, val, isVersionEnable, rows, cols, val.offset);
|
|
2363
2363
|
break;
|
|
2364
2364
|
case "contentPreview":
|
|
2365
|
-
|
|
2365
|
+
const { formData , currentTab } = this.state || {};
|
|
2366
|
+
const tab = formData && formData[currentTab - 1];
|
|
2367
|
+
content = isVersionEnable ? tab && tab['sms-editor'] : formData && formData['sms-editor'];
|
|
2366
2368
|
charList = updateCharCount(content).char_list;
|
|
2367
2369
|
columns.push(<CapColumn id={val.id} className={"preview-chars"} span={val.width}>
|
|
2368
2370
|
{charList.map((char) => char)}
|
|
@@ -3175,7 +3177,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3175
3177
|
}
|
|
3176
3178
|
console.log('CKEditor Data 2', this.state.formData, this.state.formData[`${this.state.currentTab - 1}`], val, this.state.currentTab, this.state.currentLangTab, langIndex);
|
|
3177
3179
|
const currentLang = ((!_.isEmpty(this.state.formData) && !_.isEmpty(this.state.formData[`${this.state.currentTab - 1}`]) && !_.isEmpty(this.state.formData[`${this.state.currentTab - 1}`].selectedLanguages) && this.state.formData[`${this.state.currentTab - 1}`].selectedLanguages[langIndex]) ? this.state.formData[`${this.state.currentTab - 1}`].selectedLanguages[langIndex] : this.props.baseLanguage) || 'en';
|
|
3178
|
-
const content = (!_.isEmpty(this.state.formData) && this.state.formData[`${this.state.currentTab - 1}`][
|
|
3180
|
+
const content = (!_.isEmpty(this.state.formData) && this.state.formData[`${this.state.currentTab - 1}`] && this.state.formData[`${this.state.currentTab - 1}`][currentLang] && this.state.formData[`${this.state.currentTab - 1}`][currentLang]['template-content'] || '');
|
|
3179
3181
|
columns.push(
|
|
3180
3182
|
<CapColumn style={val.colStyle ? val.colStyle : {}} span={val.width}>
|
|
3181
3183
|
<CKEditor
|
|
@@ -3198,7 +3200,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
3198
3200
|
}
|
|
3199
3201
|
}
|
|
3200
3202
|
const { currentTab, formData } = this.state;
|
|
3201
|
-
const supportedLanguages = formData[currentTab - 1].selectedLanguages;
|
|
3203
|
+
const supportedLanguages = (formData[currentTab - 1] || {}).selectedLanguages || {};
|
|
3202
3204
|
const currentLang = supportedLanguages[langTab - 1];
|
|
3203
3205
|
|
|
3204
3206
|
let beeJson = '',
|
|
@@ -33,7 +33,7 @@ import './_cap.scss';
|
|
|
33
33
|
const gtm = window.dataLayer || [];
|
|
34
34
|
const {
|
|
35
35
|
logNewTab,
|
|
36
|
-
|
|
36
|
+
utilsGetOrgNameFromId,
|
|
37
37
|
tabBeforeUnloadEventHandler,
|
|
38
38
|
utilsHandleStorageChange,
|
|
39
39
|
isMultipleTabsOpen,
|
|
@@ -297,18 +297,36 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
297
297
|
}
|
|
298
298
|
};
|
|
299
299
|
|
|
300
|
+
getOrgNameFromId = orgId => {
|
|
301
|
+
const {
|
|
302
|
+
Global: {
|
|
303
|
+
user: {
|
|
304
|
+
proxyOrgList,
|
|
305
|
+
orgName: defaultOrgName,
|
|
306
|
+
orgID: defaultOrgID,
|
|
307
|
+
} = {},
|
|
308
|
+
} = {},
|
|
309
|
+
} = this.props;
|
|
310
|
+
return utilsGetOrgNameFromId(
|
|
311
|
+
orgId,
|
|
312
|
+
proxyOrgList,
|
|
313
|
+
defaultOrgID,
|
|
314
|
+
defaultOrgName,
|
|
315
|
+
);
|
|
316
|
+
};
|
|
317
|
+
|
|
300
318
|
renderOrgRefreshModal = () => {
|
|
301
319
|
const {
|
|
302
320
|
localStorageOrgInfo: { oldValue: oldOrgId, newValue: newOrgId } = {},
|
|
303
321
|
showRefreshModal,
|
|
304
322
|
refreshSeconds,
|
|
305
323
|
} = this.state;
|
|
306
|
-
const {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
324
|
+
const { intl: { formatMessage } = {} } = this.props;
|
|
325
|
+
const oldOrgName = this.getOrgNameFromId(Number(oldOrgId));
|
|
326
|
+
const newOrgName = this.getOrgNameFromId(Number(newOrgId));
|
|
327
|
+
// some users do not have entry for their default org in proxyOrgList.
|
|
328
|
+
// getOrgNameFromId returns back orgID if no matching entry is present in proxyOrgList
|
|
329
|
+
// so replacing with defaultOrgName if defaultOrgID is returned
|
|
312
330
|
const modalData = (
|
|
313
331
|
<CapModal
|
|
314
332
|
title={formatMessage(messages.orgRefreshHeading)}
|
|
@@ -339,12 +357,15 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
339
357
|
renderOrgChangeModal = () => {
|
|
340
358
|
const { selectedOrgId, showOrgChangeModal } = this.state;
|
|
341
359
|
const {
|
|
342
|
-
Global: {
|
|
360
|
+
Global: {
|
|
343
361
|
currentOrgDetails: { basic_details: { name: oldOrgName } = {} } = {},
|
|
344
362
|
},
|
|
345
363
|
intl: { formatMessage } = {},
|
|
346
364
|
} = this.props;
|
|
347
|
-
const newOrgName = getOrgNameFromId(selectedOrgId
|
|
365
|
+
const newOrgName = this.getOrgNameFromId(selectedOrgId);
|
|
366
|
+
// some users do not have entry for their default org in proxyOrgList.
|
|
367
|
+
// getOrgNameFromId returns back orgID if no matching entry is present in proxyOrgList
|
|
368
|
+
// so replacing with defaultOrgName if defaultOrgID is returned
|
|
348
369
|
return (
|
|
349
370
|
<CapModal
|
|
350
371
|
className="change-org-confirm"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@import '~@capillarytech/cap-ui-library/styles/_variables.scss';
|
|
2
|
+
|
|
3
|
+
.line-row{
|
|
4
|
+
margin-bottom: 16px;
|
|
5
|
+
}
|
|
6
|
+
.slidebox-content-container {
|
|
7
|
+
overflow-x: hidden;
|
|
8
|
+
}
|
|
9
|
+
.line-image {
|
|
10
|
+
position: relative;
|
|
11
|
+
}
|
|
12
|
+
.image-container {
|
|
13
|
+
display: flex;
|
|
14
|
+
& > div {
|
|
15
|
+
min-width: 516px;
|
|
16
|
+
}
|
|
17
|
+
border-radius: 5px;
|
|
18
|
+
.image-placeholder{
|
|
19
|
+
line-height: 150px;
|
|
20
|
+
}
|
|
21
|
+
img {
|
|
22
|
+
object-fit: cover;
|
|
23
|
+
max-width: 100%;
|
|
24
|
+
max-height: 100%;
|
|
25
|
+
height: auto !important;
|
|
26
|
+
width: auto !important;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.pagination-container.gallery-upload {
|
|
31
|
+
height: calc(100vh - 60px);
|
|
32
|
+
|
|
33
|
+
.cap-custom-card-list-col {
|
|
34
|
+
max-width: 156px;
|
|
35
|
+
max-height: 156px;
|
|
36
|
+
display: inline-block;
|
|
37
|
+
margin-left: $CAP_SPACE_04;
|
|
38
|
+
margin-right: $CAP_SPACE_04;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ant-card-body {
|
|
42
|
+
padding-top: 0;
|
|
43
|
+
|
|
44
|
+
.ant-card-meta-description img {
|
|
45
|
+
height: 80px;
|
|
46
|
+
width: auto;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.gallery-image {
|
|
52
|
+
height: 156px;
|
|
53
|
+
width: 156px;
|
|
54
|
+
border-radius: 4px;
|
|
55
|
+
margin: 3px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.sms-text {
|
|
59
|
+
img {
|
|
60
|
+
display: block;
|
|
61
|
+
max-width: 100%;
|
|
62
|
+
object-fit: cover;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Create actions
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as types from './constants';
|
|
8
|
+
|
|
9
|
+
export function createTemplate(template, callback) {
|
|
10
|
+
console.log('action trigereed createtemplate');
|
|
11
|
+
return {
|
|
12
|
+
type: types.CREATE_TEMPLATE_REQUEST,
|
|
13
|
+
template,
|
|
14
|
+
callback,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function clearCreateResponse() {
|
|
19
|
+
console.log('clearCreateResponse');
|
|
20
|
+
return {
|
|
21
|
+
type: types.CLEAR_CREATE_RESPONSE_REQUEST,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function defaultAction() {
|
|
26
|
+
return {
|
|
27
|
+
type: types.DEFAULT_ACTION,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function uploadAsset(file, assetType, fileParams) {
|
|
32
|
+
return {
|
|
33
|
+
type: types.UPLOAD_ASSET_REQUEST,
|
|
34
|
+
file,
|
|
35
|
+
assetType,
|
|
36
|
+
fileParams,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function clearAsset() {
|
|
41
|
+
return {
|
|
42
|
+
type: types.CLEAR_ASSET,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
// FOR EDIT
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export function editTemplate(template, callback) {
|
|
51
|
+
console.log('action trigereed editTemplate line @@@');
|
|
52
|
+
return {
|
|
53
|
+
type: types.EDIT_TEMPLATE_REQUEST,
|
|
54
|
+
template,
|
|
55
|
+
callback,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function getTemplateDetails(id) {
|
|
60
|
+
console.log('getting template line @@@', id);
|
|
61
|
+
return {
|
|
62
|
+
type: types.GET_TEMPLATE_DETAILS_REQUEST,
|
|
63
|
+
id,
|
|
64
|
+
channel: 'LINE',
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function clearEditResponse() {
|
|
69
|
+
console.log('clearEditResponse');
|
|
70
|
+
return {
|
|
71
|
+
type: types.CLEAR_EDIT_RESPONSE_REQUEST,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function clearData() {
|
|
76
|
+
return {
|
|
77
|
+
type: types.CLEAR_DATA,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function getLineTemplatesList(channel, queryParams) {
|
|
82
|
+
return {
|
|
83
|
+
type: types.GET_LINE_TEMPLATES_LIST_REQUEST,
|
|
84
|
+
channel,
|
|
85
|
+
queryParams,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function setSelectedTemplate(templateData) {
|
|
90
|
+
return {
|
|
91
|
+
type: types.SET_SELECTED_TEMPLATE,
|
|
92
|
+
data: templateData,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* Create constants
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export const DEFAULT_ACTION = 'app/Create/DEFAULT_ACTION';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export const CREATE_TEMPLATE_REQUEST = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_REQUEST';
|
|
11
|
+
export const CREATE_TEMPLATE_SUCCESS = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_SUCCESS';
|
|
12
|
+
export const CREATE_TEMPLATE_FAILURE = 'app/v2Containers/Line/Create/CREATE_TEMPLATE_FAILURE';
|
|
13
|
+
export const UPLOAD_ASSET_REQUEST = 'app/v2Containers/Line/Create/UPLOAD_ASSET_REQUEST';
|
|
14
|
+
export const UPLOAD_ASSET_SUCCESS = 'app/v2Containers/Line/Create/UPLOAD_ASSET_SUCCESS';
|
|
15
|
+
export const UPLOAD_ASSET_FAILURE = 'app/v2Containers/Line/Create/UPLOAD_ASSET_FAILURE';
|
|
16
|
+
export const CLEAR_ASSET = 'app/v2Containers/Line/Create/CLEAR_ASSET';
|
|
17
|
+
|
|
18
|
+
export const CLEAR_CREATE_RESPONSE_REQUEST = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_REQUEST';
|
|
19
|
+
export const CLEAR_CREATE_RESPONSE_SUCCESS = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_SUCCESS';
|
|
20
|
+
export const CLEAR_CREATE_RESPONSE_FAILURE = 'app/v2Containers/Line/Create/CLEAR_CREATE_RESPONSE_FAILURE';
|
|
21
|
+
|
|
22
|
+
export const LINE_IMG_HEIGHT = 400;
|
|
23
|
+
export const LINE_IMG_WIDTH = 300;
|
|
24
|
+
export const LINE_IMG_SIZE = 30000000;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
// edit
|
|
28
|
+
|
|
29
|
+
export const GET_TEMPLATE_DETAILS_REQUEST = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_REQUEST';
|
|
30
|
+
export const GET_TEMPLATE_DETAILS_SUCCESS = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_SUCCESS';
|
|
31
|
+
export const GET_TEMPLATE_DETAILS_FAILURE = 'app/v2Containers/line/Edit/GET_TEMPLATE_DETAILS_FAILURE';
|
|
32
|
+
|
|
33
|
+
export const EDIT_TEMPLATE_REQUEST = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_REQUEST';
|
|
34
|
+
export const EDIT_TEMPLATE_SUCCESS = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_SUCCESS';
|
|
35
|
+
export const EDIT_TEMPLATE_FAILURE = 'app/v2Containers/line/Edit/EDIT_TEMPLATE_FAILURE';
|
|
36
|
+
|
|
37
|
+
export const CLEAR_EDIT_RESPONSE_REQUEST = 'app/v2Containers/line/Edit/CLEAR_EDIT_RESPONSE_REQUEST';
|
|
38
|
+
export const CLEAR_DATA = 'app/v2Containers/Line/Edit/CLEAR_DATA';
|
|
39
|
+
export const SET_SELECTED_TEMPLATE = 'app/v2Containers/Line/Edit/SET_SELECTED_TEMPLATE';
|
|
40
|
+
|
|
41
|
+
export const GET_LINE_TEMPLATES_LIST_REQUEST = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_REQUEST';
|
|
42
|
+
export const GET_LINE_TEMPLATES_LIST_SUCCESS = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_SUCCESS';
|
|
43
|
+
export const GET_LINE_TEMPLATES_LIST_FAILURE = 'app/v2Containers/Line/GET_LINE_TEMPLATES_LIST_FAILURE';
|