@capillarytech/creatives-library 7.1.6 → 7.1.10
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/config/app.js +0 -2
- package/index.js +1 -15
- package/package.json +1 -2
- package/reducers.js +1 -4
- package/routes.js +1 -7
- package/services/api.js +0 -11
- package/utils/common.js +0 -178
- package/v2Components/TemplatePreview/_templatePreview.scss +2 -8
- package/v2Components/TemplatePreview/assets/images/mobile.svg +24 -0
- package/v2Components/TemplatePreview/index.js +18 -108
- package/v2Containers/App/constants.js +3 -5
- package/v2Containers/CreativesContainer/SlideBoxContent.js +3 -84
- package/v2Containers/CreativesContainer/SlideBoxHeader.js +0 -2
- package/v2Containers/CreativesContainer/constants.js +0 -4
- package/v2Containers/CreativesContainer/index.js +5 -48
- package/v2Containers/Email/index.js +0 -1
- 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 +1132 -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/Templates/_templates.scss +0 -57
- package/v2Containers/Templates/actions.js +110 -117
- package/v2Containers/Templates/constants.js +0 -2
- package/v2Containers/Templates/index.js +7 -88
- package/v2Containers/Templates/messages.js +0 -4
- package/v2Containers/Templates/reducer.js +0 -2
- package/v2Containers/TemplatesV2/index.js +1 -22
- package/v2Containers/TemplatesV2/messages.js +0 -8
- package/assets/viber.png +0 -0
- package/v2Components/TemplatePreview/assets/images/viberMobile.svg +0 -135
- package/v2Containers/FTP/_FTP.scss +0 -103
- package/v2Containers/FTP/actions.js +0 -7
- package/v2Containers/FTP/constants.js +0 -3
- package/v2Containers/FTP/index.js +0 -534
- package/v2Containers/FTP/messages.js +0 -60
- package/v2Containers/FTP/reducer.js +0 -32
- package/v2Containers/FTP/sagas.js +0 -26
- package/v2Containers/FTP/selectors.js +0 -20
- package/v2Containers/Viber/actions.js +0 -74
- package/v2Containers/Viber/constants.js +0 -30
- package/v2Containers/Viber/index.js +0 -727
- package/v2Containers/Viber/messages.js +0 -145
- package/v2Containers/Viber/reducer.js +0 -84
- package/v2Containers/Viber/sagas.js +0 -107
- package/v2Containers/Viber/selectors.js +0 -21
package/config/app.js
CHANGED
|
@@ -11,7 +11,6 @@ const config = {
|
|
|
11
11
|
dashboard_url: '/sms',
|
|
12
12
|
dashboard_url_v2: '/v2',
|
|
13
13
|
subscription_api_endpoint: '/arya/api/v1/org-settings/subscription',
|
|
14
|
-
exports_api_endpoint: '/arya/api/v1/export/data',
|
|
15
14
|
accountConfig: (strs, accountId) => `${window.location.origin}/org/config/AccountAdd?q=a&channelId=2&accountId=${accountId}&edit=1`,
|
|
16
15
|
},
|
|
17
16
|
development: {
|
|
@@ -20,7 +19,6 @@ const config = {
|
|
|
20
19
|
auth_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/auth',
|
|
21
20
|
arya_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1',
|
|
22
21
|
subscription_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/org-settings/subscription',
|
|
23
|
-
exports_api_endpoint: 'https://crm-nightly-new.cc.capillarytech.com/arya/api/v1/export/data',
|
|
24
22
|
login_url: '/auth/login',
|
|
25
23
|
dashboard_url: '/sms',
|
|
26
24
|
dashboard_url_v2: '/v2',
|
package/index.js
CHANGED
|
@@ -56,10 +56,6 @@ import MobilepushCreate from './v2Containers/MobilePush/Create';
|
|
|
56
56
|
import mobilepushCreateReducer from './v2Containers/MobilePush/Create/reducer';
|
|
57
57
|
import mobilepushCreateSaga from './v2Containers/MobilePush/Create/sagas';
|
|
58
58
|
|
|
59
|
-
import FTP from './v2Containers/FTP';
|
|
60
|
-
import FTPReducer from './v2Containers/FTP/reducer';
|
|
61
|
-
import FTPSagas from './v2Containers/FTP/sagas';
|
|
62
|
-
|
|
63
59
|
import MobilepushEdit from './v2Containers/MobilePush/Edit';
|
|
64
60
|
import mobilepushEditReducer from './v2Containers/MobilePush/Edit/reducer';
|
|
65
61
|
import mobilepushEditSaga from './v2Containers/MobilePush/Edit/sagas';
|
|
@@ -69,10 +65,6 @@ import LineCreate from './v2Containers/Line/Container';
|
|
|
69
65
|
import lineCreateReducer from './v2Containers/Line/Container/reducer';
|
|
70
66
|
import lineCreateSaga from './v2Containers/Line/Container/sagas';
|
|
71
67
|
|
|
72
|
-
import Viber from './v2Containers/Viber';
|
|
73
|
-
import viberReducer from './v2Containers/Viber/reducer';
|
|
74
|
-
import viberSaga from './v2Containers/Viber/sagas';
|
|
75
|
-
|
|
76
68
|
import TemplatesV2 from './v2Containers/TemplatesV2/index';
|
|
77
69
|
|
|
78
70
|
import CreativesContainer from './v2Containers/CreativesContainer';
|
|
@@ -90,7 +82,7 @@ const TemplatesContainer = {Templates, templateReducer, templateSaga};
|
|
|
90
82
|
const SmsCreateContainer = {SmsCreate, smsCreateReducer, smsCreateSaga};
|
|
91
83
|
const SmsEditContainer = {SmsEdit, smsEditReducer, smsEditSaga};
|
|
92
84
|
const EmailContainer = {Email, emailReducer, emailSaga};
|
|
93
|
-
const BeeContainer =
|
|
85
|
+
const BeeContainer ={ BeeEditor,beeReducer,beeSaga}
|
|
94
86
|
const CallTaskContainer = {CallTask, callTaskReducer, callTaskSaga};
|
|
95
87
|
const WeChatMapTemplateContainer = {WeChatMapTemplate, weChatMapTemplateReducer, weChatMapTemplateSaga};
|
|
96
88
|
const WeChatRichMediaCreateContainer = {WeChatRichMediaCreate, weChatRichMediaCreateReducer, weChatRichMediaCreateSaga};
|
|
@@ -100,10 +92,7 @@ const MobilePushEditContainer = {MobilepushEdit, mobilepushEditReducer, mobilepu
|
|
|
100
92
|
const LineCreateContainer = {LineCreate, lineCreateReducer, lineCreateSaga};
|
|
101
93
|
const TemplatesV2Container = {TemplatesV2, templateReducer, templateSaga};
|
|
102
94
|
const FacebookContainer = {Facebook, facebookReducer, facebookSaga};
|
|
103
|
-
const ViberContainer = {Viber, viberReducer, viberSaga};
|
|
104
|
-
|
|
105
95
|
const GalleryContainer = {Gallery, galleryReducer, gallerySagas};
|
|
106
|
-
const FTPContainer = {FTP, FTPReducer, FTPSagas};
|
|
107
96
|
|
|
108
97
|
export {default as TagList} from './v2Containers/TagList/index';
|
|
109
98
|
export {default as TagListSaga} from './v2Containers/TagList/sagas';
|
|
@@ -115,7 +104,6 @@ export {default as CallTaskPreview} from './v2Components/CallTaskPreview';
|
|
|
115
104
|
export {default as EmailMobilePreview} from './v2Components/EmailMobilePreview';
|
|
116
105
|
export {default as MobilePushPreview} from './v2Components/MobilePushPreviewV2';
|
|
117
106
|
export {default as WechatRichmediaTemplatePreview} from './v2Components/TemplatePreview/WechatRichmediaTemplatePreview';
|
|
118
|
-
export {default as FTP} from './v2Containers/FTP';
|
|
119
107
|
|
|
120
108
|
CreativesContainer.CreativesContainerReducer = CreativesContainerReducer;
|
|
121
109
|
|
|
@@ -143,6 +131,4 @@ export { CapContainer,
|
|
|
143
131
|
updateCharCount,
|
|
144
132
|
FacebookContainer,
|
|
145
133
|
GalleryContainer,
|
|
146
|
-
FTPContainer,
|
|
147
|
-
ViberContainer,
|
|
148
134
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capillarytech/creatives-library",
|
|
3
3
|
"author": "meharaj",
|
|
4
|
-
"version": "7.1.
|
|
4
|
+
"version": "7.1.10",
|
|
5
5
|
"description": "Capillary creatives ui",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.es.js",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"redux-beacon": "^0.4.0",
|
|
31
31
|
"redux-immutable": "3.0.8",
|
|
32
32
|
"reselect": "2.5.4",
|
|
33
|
-
"save": "^2.4.0",
|
|
34
33
|
"styled-components": "^3.2.1",
|
|
35
34
|
"webpack-bugsnag-plugins": "^1.4.3",
|
|
36
35
|
"whatwg-fetch": "2.0.1"
|
package/reducers.js
CHANGED
|
@@ -9,8 +9,6 @@ import { LOCATION_CHANGE } from 'react-router-redux';
|
|
|
9
9
|
|
|
10
10
|
import languageProviderReducer from 'v2Containers/LanguageProvider/reducer';
|
|
11
11
|
import beeEditorReducer from 'v2Containers/BeeEditor/reducer';
|
|
12
|
-
|
|
13
|
-
|
|
14
12
|
import capReducer from 'containers/Cap/reducer';
|
|
15
13
|
import appReducer from 'containers/App/reducer';
|
|
16
14
|
import createSmsReducer from 'containers/Sms/Create/reducer';
|
|
@@ -19,7 +17,7 @@ import templateReducer from 'containers/Templates/reducer';
|
|
|
19
17
|
import tagsReducer from 'containers/TagList/reducer';
|
|
20
18
|
import emailReducer from 'containers/Email/reducer';
|
|
21
19
|
import ebillReducer from 'containers/Ebill/reducer';
|
|
22
|
-
|
|
20
|
+
|
|
23
21
|
/*
|
|
24
22
|
* routeReducer
|
|
25
23
|
*
|
|
@@ -64,7 +62,6 @@ export default function createReducer(asyncReducers) {
|
|
|
64
62
|
email: emailReducer,
|
|
65
63
|
ebill: ebillReducer,
|
|
66
64
|
beeEditor: beeEditorReducer,
|
|
67
|
-
FTP: ftpReducer,
|
|
68
65
|
...asyncReducers,
|
|
69
66
|
});
|
|
70
67
|
}
|
package/routes.js
CHANGED
|
@@ -598,8 +598,7 @@ export default function createRoutes(store) {
|
|
|
598
598
|
|
|
599
599
|
importModules.catch(errorLoading);
|
|
600
600
|
},
|
|
601
|
-
},
|
|
602
|
-
{
|
|
601
|
+
}, {
|
|
603
602
|
path: '/v2(/:channel)',
|
|
604
603
|
name: 'templatesV2',
|
|
605
604
|
getComponent(nextState, cb) {
|
|
@@ -635,8 +634,6 @@ export default function createRoutes(store) {
|
|
|
635
634
|
import('v2Containers/Facebook/reducer'),
|
|
636
635
|
import('v2Containers/Line/Container/sagas'),
|
|
637
636
|
import('v2Containers/Line/Container/reducer'),
|
|
638
|
-
import('v2Containers/Viber/sagas'),
|
|
639
|
-
import('v2Containers/Viber/reducer'),
|
|
640
637
|
]);
|
|
641
638
|
|
|
642
639
|
const renderRoute = loadModule(cb);
|
|
@@ -657,7 +654,6 @@ export default function createRoutes(store) {
|
|
|
657
654
|
galleryReducer, gallerySagas,
|
|
658
655
|
facebookSagas, facebookReducer,
|
|
659
656
|
lineCreateSagas, lineCreateReducer,
|
|
660
|
-
viberSagas, viberReducer,
|
|
661
657
|
]) => {
|
|
662
658
|
injectReducer('templates', reducer.default);
|
|
663
659
|
injectReducer('cap', capReducer.default);
|
|
@@ -674,7 +670,6 @@ export default function createRoutes(store) {
|
|
|
674
670
|
injectReducer('gallery', galleryReducer.default);
|
|
675
671
|
injectReducer('facebook', facebookReducer.default);
|
|
676
672
|
injectReducer('lineCreate', lineCreateReducer.default);
|
|
677
|
-
injectReducer('viber', viberReducer.default);
|
|
678
673
|
injectSagas(gallerySagas.default);
|
|
679
674
|
injectSagas(sagas.default);
|
|
680
675
|
injectSagas(capSagas.default);
|
|
@@ -690,7 +685,6 @@ export default function createRoutes(store) {
|
|
|
690
685
|
injectSagas(weChatRichmediaTemplatesEditSagas.default);
|
|
691
686
|
injectSagas(facebookSagas.default);
|
|
692
687
|
injectSagas(lineCreateSagas.default);
|
|
693
|
-
injectSagas(viberSagas.default);
|
|
694
688
|
renderRoute(component);
|
|
695
689
|
});
|
|
696
690
|
importModules.catch(errorLoading);
|
package/services/api.js
CHANGED
|
@@ -9,7 +9,6 @@ import getSchema from './getSchema';
|
|
|
9
9
|
import * as API from '../utils/ApiCaller';
|
|
10
10
|
import { GA } from '@capillarytech/cap-ui-utils';
|
|
11
11
|
let API_ENDPOINT = config.development.api_endpoint;
|
|
12
|
-
let EXPORT_API_ENDPOINT = config.development.exports_api_endpoint;
|
|
13
12
|
let CAMPAIGNS_API_ENDPOINT = config.development.campaigns_api_endpoint;
|
|
14
13
|
let API_AUTH_ENDPOINT = config.development.auth_endpoint;
|
|
15
14
|
let ARYA_ENDPOINT = config.development.arya_endpoint;
|
|
@@ -214,11 +213,6 @@ export const duplicateTemplate = ({id, channel}) => {
|
|
|
214
213
|
return request(url, getAPICallObject('GET'));
|
|
215
214
|
};
|
|
216
215
|
|
|
217
|
-
export const getFTPServers = () => {
|
|
218
|
-
const url = `${EXPORT_API_ENDPOINT}/ftplist`;
|
|
219
|
-
return request(url, getAPICallObject('GET'));
|
|
220
|
-
};
|
|
221
|
-
|
|
222
216
|
export const editWeChatTemplate = ({template}) => {
|
|
223
217
|
console.log('in api.js', template);
|
|
224
218
|
const url = `${API_ENDPOINT}/templates/WECHAT`;
|
|
@@ -364,11 +358,6 @@ export const createLineTemplate = ({template}) => {
|
|
|
364
358
|
return request(url, getAPICallObject('POST', template));
|
|
365
359
|
};
|
|
366
360
|
|
|
367
|
-
export const createViberTemplate = ({template}) => {
|
|
368
|
-
const url = `${API_ENDPOINT}/templates/VIBER`;
|
|
369
|
-
return request(url, getAPICallObject('POST', template));
|
|
370
|
-
};
|
|
371
|
-
|
|
372
361
|
export const getLocizMessage = async (locale) => {
|
|
373
362
|
const appName = 'creatives_v2';
|
|
374
363
|
const url = `${ARYA_ENDPOINT}/translations/${appName}/${locale}`;
|
package/utils/common.js
CHANGED
|
@@ -37,181 +37,3 @@ export const hasStore2DoorFeature = Auth.hasFeatureAccess.bind(
|
|
|
37
37
|
null,
|
|
38
38
|
STORE2DOOR_PLUS_ENABLED,
|
|
39
39
|
);
|
|
40
|
-
|
|
41
|
-
export function getTreeStructuredTags({tagsList, userLocale = 'en', offerDetails = []}) {
|
|
42
|
-
console.log('populating tags', (tagsList || []).length);
|
|
43
|
-
const mainTags = {};
|
|
44
|
-
|
|
45
|
-
_.forEach(tagsList, (temp) => {
|
|
46
|
-
const tag = temp.definition;
|
|
47
|
-
if (!tag['tag-header']) { //if tag doesn't have subtag(s), which means this tag itself is tag and not a tag header.
|
|
48
|
-
mainTags[tag.value] = {
|
|
49
|
-
name: tag.label[userLocale] || tag.label.en,
|
|
50
|
-
value: tag.value,
|
|
51
|
-
};
|
|
52
|
-
} else if (tag['tag-header'] && mainTags[tag.value]) {
|
|
53
|
-
// to check it this tag header is already available in mainTags object,
|
|
54
|
-
//If yes, it will concat the subtag
|
|
55
|
-
mainTags[tag.value].subtags = _.concat(mainTags[tag.value].subtags, tag.subtags);
|
|
56
|
-
} else if (!mainTags[tag.value]) {
|
|
57
|
-
//If tag is not available in mainTag object, new maintag will be added.
|
|
58
|
-
mainTags[tag.value] = {
|
|
59
|
-
'tag-header': true,
|
|
60
|
-
"name": tag.label[userLocale] || tag.label.en,
|
|
61
|
-
"subtags": tag.subtags,
|
|
62
|
-
"value": tag.value,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
const mainTagsCloned = _.cloneDeep(mainTags);
|
|
68
|
-
//Insert subtags in tag headers and reomve them from top level
|
|
69
|
-
const result = {};
|
|
70
|
-
_.forEach(mainTagsCloned, (tag, key) => {
|
|
71
|
-
if (tag['tag-header']) {
|
|
72
|
-
const tagWithChildren = populateTagForChildren(tag, mainTagsCloned, key);
|
|
73
|
-
tagWithChildren.resolved = true;
|
|
74
|
-
result[key] = tagWithChildren;
|
|
75
|
-
} else {
|
|
76
|
-
result[key] = tag;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
//Delete extra tag headers
|
|
81
|
-
_.forEach(result, (tag) => {
|
|
82
|
-
if (tag['tag-header']) {
|
|
83
|
-
_.forEach(tag.subtags, (subtag, key) => {
|
|
84
|
-
if (result[key]) {
|
|
85
|
-
result[key].deleted = true;
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
//Actually delete them
|
|
91
|
-
_.forEach(result, (tag, key) => {
|
|
92
|
-
if (tag.deleted) {
|
|
93
|
-
delete result[key];
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
let combinedTags = result;
|
|
97
|
-
if (offerDetails.length) {
|
|
98
|
-
combinedTags = transformCouponTags(offerDetails, result);
|
|
99
|
-
}
|
|
100
|
-
return getTreeStructureData(combinedTags);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function transformCouponTags(offerDetails, allTags) {
|
|
104
|
-
const couponTags = {};
|
|
105
|
-
const couponTagsKeys = Object.keys(_.get(allTags, 'coupon.subtags', []));
|
|
106
|
-
const withCouponId = (obj, id) => {
|
|
107
|
-
const tempObj = {};
|
|
108
|
-
if (obj.subtags) {
|
|
109
|
-
tempObj.subtags = _.mapValues(obj.subtags, (tag) => {
|
|
110
|
-
let val = tag.value;
|
|
111
|
-
val = `${val}(${id})`;
|
|
112
|
-
const newObj = {
|
|
113
|
-
...tag,
|
|
114
|
-
value: val,
|
|
115
|
-
};
|
|
116
|
-
return {
|
|
117
|
-
...withCouponId(newObj, id),
|
|
118
|
-
};
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
...obj,
|
|
123
|
-
...tempObj,
|
|
124
|
-
couponSeriesId: id,
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
offerDetails.forEach((offer) => {
|
|
128
|
-
const { id, couponName, description, couponSeriesId } = offer;
|
|
129
|
-
const couponId = id || couponSeriesId;
|
|
130
|
-
const couponSubTags = {};
|
|
131
|
-
couponTagsKeys.forEach((couponTagKey) => {
|
|
132
|
-
let val = allTags.coupon.subtags[couponTagKey].value;
|
|
133
|
-
val = `${val}(${couponId})`;
|
|
134
|
-
const newObj = {
|
|
135
|
-
...allTags.coupon.subtags[couponTagKey],
|
|
136
|
-
value: val,
|
|
137
|
-
};
|
|
138
|
-
const couponSubTagsObj = withCouponId(newObj, couponId);
|
|
139
|
-
couponSubTags[couponTagKey] = couponSubTagsObj;
|
|
140
|
-
});
|
|
141
|
-
const couponNameFinal = couponName || description;
|
|
142
|
-
const key = couponNameFinal || couponId;
|
|
143
|
-
couponTags[key] = {
|
|
144
|
-
'tag-header': true,
|
|
145
|
-
'name': couponNameFinal || couponId,
|
|
146
|
-
'desc': couponNameFinal || couponId,
|
|
147
|
-
'couponSeriesId': couponId,
|
|
148
|
-
'subtags': couponSubTags,
|
|
149
|
-
'resolved': true,
|
|
150
|
-
'couponTags': true,
|
|
151
|
-
};
|
|
152
|
-
});
|
|
153
|
-
// eslint-disable-next-line no-param-reassign
|
|
154
|
-
allTags.coupon.subtags = couponTags;
|
|
155
|
-
return allTags;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function populateTagForChildren(targetTag, tagsObject, tagValue) {
|
|
159
|
-
const tag = targetTag;
|
|
160
|
-
if (tag && tag['tag-header'] && !tag.resolved) {
|
|
161
|
-
const tempSubTags = {};
|
|
162
|
-
_.forEach(tag.subtags, (subtag) => {
|
|
163
|
-
if (tagsObject[subtag]) {
|
|
164
|
-
const children = populateTagForChildren(tagsObject[subtag], tagsObject, subtag);
|
|
165
|
-
children.resolved = true;
|
|
166
|
-
tempSubTags[subtag] = children;
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
tag.subtags = tempSubTags;
|
|
170
|
-
return tag;
|
|
171
|
-
}
|
|
172
|
-
return tagsObject[tagValue];
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
function getTreeStructureData(data) {
|
|
176
|
-
const result = [];
|
|
177
|
-
_.forOwn(data, (mainTag) => {
|
|
178
|
-
const { name, value, subtags = [] } = mainTag;
|
|
179
|
-
if (!mainTag['tag-header']) {
|
|
180
|
-
result.push({
|
|
181
|
-
title: name,
|
|
182
|
-
value: `{{${value}}}`,
|
|
183
|
-
});
|
|
184
|
-
} else {
|
|
185
|
-
const obj = {
|
|
186
|
-
title: name,
|
|
187
|
-
value: `{{${value}}}`,
|
|
188
|
-
selectable: false,
|
|
189
|
-
};
|
|
190
|
-
obj.children = getSubTags(subtags);
|
|
191
|
-
result.push(obj);
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
return result;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
function getSubTags(subtagsParam) {
|
|
198
|
-
const result = [];
|
|
199
|
-
_.forOwn(subtagsParam, (subTag) => {
|
|
200
|
-
const { name, value, subtags = [] } = subTag;
|
|
201
|
-
if (_.isEmpty(subtags)) {
|
|
202
|
-
result.push({
|
|
203
|
-
title: name,
|
|
204
|
-
value: `{{${value}}}`,
|
|
205
|
-
});
|
|
206
|
-
} else {
|
|
207
|
-
const obj = {
|
|
208
|
-
title: name,
|
|
209
|
-
value: `{{${value}}}`,
|
|
210
|
-
selectable: false,
|
|
211
|
-
};
|
|
212
|
-
obj.children = getSubTags(subtags);
|
|
213
|
-
result.push(obj);
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
return result;
|
|
217
|
-
}
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
left: 23%;
|
|
22
22
|
width: 42%;
|
|
23
23
|
height: 336px;
|
|
24
|
+
display: -webkit-box;
|
|
25
|
+
display: -ms-flexbox;
|
|
24
26
|
display: flex;
|
|
25
27
|
|
|
26
28
|
.sms-icon{
|
|
@@ -49,14 +51,6 @@
|
|
|
49
51
|
left: 36px;
|
|
50
52
|
margin-top: -6px;
|
|
51
53
|
}
|
|
52
|
-
}
|
|
53
|
-
&.viber-preview{
|
|
54
|
-
width: 43%;
|
|
55
|
-
.message-pop {
|
|
56
|
-
width: 80%;
|
|
57
|
-
left: 36px;
|
|
58
|
-
margin-top: -6px;
|
|
59
|
-
}
|
|
60
54
|
}
|
|
61
55
|
|
|
62
56
|
.message-pop{
|