@capillarytech/creatives-library 2.0.79 → 2.0.81
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/components/CardGrid/index.js +1 -0
- package/components/EmailPreview/assets/images/iPad.svg +10 -0
- package/components/EmailPreview/assets/images/mobile.png +0 -0
- package/components/FormBuilder/index.js +3 -2
- package/components/FormBuilder/test +1845 -0
- package/containers/CallTask/_callTask.scss +5 -0
- package/containers/CallTask/actions.js +15 -0
- package/containers/CallTask/constants.js +7 -0
- package/containers/CallTask/index.js +141 -0
- package/containers/CallTask/messages.js +21 -0
- package/containers/CallTask/reducer.js +23 -0
- package/containers/CallTask/sagas.js +11 -0
- package/containers/CallTask/selectors.js +25 -0
- package/containers/CallTask/tests/actions.test.js +18 -0
- package/containers/CallTask/tests/index.test.js +10 -0
- package/containers/CallTask/tests/reducer.test.js +9 -0
- package/containers/CallTask/tests/sagas.test.js +15 -0
- package/containers/CallTask/tests/selectors.test.js +10 -0
- package/containers/ChannelTemplates/actions.js +20 -0
- package/containers/ChannelTemplates/constants.js +8 -0
- package/containers/ChannelTemplates/index.js +48 -0
- package/containers/ChannelTemplates/messages.js +13 -0
- package/containers/ChannelTemplates/reducer.js +34 -0
- package/containers/ChannelTemplates/sagas.js +32 -0
- package/containers/ChannelTemplates/selectors.js +25 -0
- package/containers/ChannelTemplates/tests/actions.test.js +18 -0
- package/containers/ChannelTemplates/tests/index.test.js +10 -0
- package/containers/ChannelTemplates/tests/reducer.test.js +9 -0
- package/containers/ChannelTemplates/tests/sagas.test.js +15 -0
- package/containers/ChannelTemplates/tests/selectors.test.js +10 -0
- package/containers/CreativesContainer/SlideBoxContent.js +248 -0
- package/containers/CreativesContainer/SlideBoxFooter.js +38 -0
- package/containers/CreativesContainer/SlideBoxHeader.js +65 -0
- package/containers/CreativesContainer/actions.js +27 -0
- package/containers/CreativesContainer/constants.js +13 -0
- package/containers/CreativesContainer/index.js +418 -0
- package/containers/CreativesContainer/index.scss +27 -0
- package/containers/CreativesContainer/messages.js +17 -0
- package/containers/CreativesContainer/reducer.js +29 -0
- package/containers/CreativesContainer/sagas.js +11 -0
- package/containers/CreativesContainer/selectors.js +30 -0
- package/containers/CreativesContainer/tests/actions.test.js +18 -0
- package/containers/CreativesContainer/tests/index.test.js +10 -0
- package/containers/CreativesContainer/tests/reducer.test.js +9 -0
- package/containers/CreativesContainer/tests/sagas.test.js +15 -0
- package/containers/CreativesContainer/tests/selectors.test.js +10 -0
- package/containers/EmailWrapper/actions.js +15 -0
- package/containers/EmailWrapper/constants.js +7 -0
- package/containers/EmailWrapper/index.js +238 -0
- package/containers/EmailWrapper/messages.js +57 -0
- package/containers/EmailWrapper/reducer.js +23 -0
- package/containers/EmailWrapper/sagas.js +11 -0
- package/containers/EmailWrapper/selectors.js +25 -0
- package/containers/EmailWrapper/tests/actions.test.js +18 -0
- package/containers/EmailWrapper/tests/index.test.js +10 -0
- package/containers/EmailWrapper/tests/reducer.test.js +9 -0
- package/containers/EmailWrapper/tests/sagas.test.js +15 -0
- package/containers/EmailWrapper/tests/selectors.test.js +10 -0
- package/containers/Line/Create/index.js +1 -1
- package/containers/MobilePush/Create/selectors.js +1 -1
- package/containers/MobilePush/Edit/selectors.js +1 -1
- package/containers/MobilePush/commonMethods.js +249 -0
- package/containers/MobilePush/eventsMap.js +127 -0
- package/containers/MobilePush/initialSchema.js +1739 -0
- package/containers/MobilepushWrapper/_mobilepushWrapper.scss +18 -0
- package/containers/MobilepushWrapper/index.js +97 -0
- package/containers/MobilepushWrapper/messages.js +25 -0
- package/containers/MobilepushWrapper/tests/index.test.js +10 -0
- package/containers/Templates/index.js +18 -14
- package/containers/TemplatesV2/_templatesV2.scss +5 -0
- package/containers/TemplatesV2/actions.js +16 -0
- package/containers/TemplatesV2/constants.js +10 -0
- package/containers/TemplatesV2/index.js +207 -0
- package/containers/TemplatesV2/messages.js +29 -0
- package/containers/TemplatesV2/selectors.js +25 -0
- package/containers/TemplatesV2/tests/actions.test.js +18 -0
- package/containers/TemplatesV2/tests/index.test.js +10 -0
- package/containers/TemplatesV2/tests/reducer.test.js +9 -0
- package/containers/TemplatesV2/tests/sagas.test.js +15 -0
- package/containers/TemplatesV2/tests/selectors.test.js +10 -0
- package/containers/WeChat/RichmediaTemplates/Create/testschema.js +379 -0
- package/containers/WeChat/_wechat.scss +8 -0
- package/containers/WeChat/actions.js +52 -0
- package/containers/WeChat/constants.js +28 -0
- package/containers/WeChat/index.js +1635 -0
- package/containers/WeChat/messages.js +73 -0
- package/containers/WeChat/reducer.js +74 -0
- package/containers/WeChat/sagas.js +86 -0
- package/containers/WeChat/selectors.js +25 -0
- package/containers/WeChat/tests/actions.test.js +18 -0
- package/{components/SmsPreviewV2 → containers/WeChat}/tests/index.test.js +2 -2
- package/containers/WeChat/tests/reducer.test.js +9 -0
- package/containers/WeChat/tests/sagas.test.js +15 -0
- package/containers/WeChat/tests/selectors.test.js +10 -0
- package/index.js +4 -3
- package/package.json +1 -1
- package/v2Containers/MobilePush/Create/index.js +43 -9
- package/v2Containers/MobilePush/Create/messages.js +16 -0
- package/v2Containers/MobilePush/Create/selectors.js +2 -1
- package/v2Containers/MobilePush/Edit/index.js +54 -22
- package/v2Containers/MobilePush/Edit/messages.js +17 -1
- package/v2Containers/MobilePush/Edit/selectors.js +2 -1
- package/v2Containers/MobilePush/commonMethods.js +9 -7
- package/v2Containers/WeChat/MapTemplates/index.js +5 -5
- package/assets/android-message-gui-2.svg +0 -55
- package/components/SmsPreviewV2/_smsPreviewV2.scss +0 -353
- package/components/SmsPreviewV2/index.js +0 -69
- package/components/SmsPreviewV2/messages.js +0 -13
|
@@ -247,7 +247,23 @@ export default defineMessages({
|
|
|
247
247
|
defaultMessage: 'IOS template is not configured, Save without IOS template',
|
|
248
248
|
},
|
|
249
249
|
"selectActionButton": {
|
|
250
|
-
id: 'app.containers.MobilePush.
|
|
250
|
+
id: 'app.containers.MobilePush.Edit.mobilePush',
|
|
251
251
|
defaultMessage: 'Select action buttons',
|
|
252
252
|
},
|
|
253
|
+
"validationError": {
|
|
254
|
+
id: 'app.containers.MobilePush.Edit.validationError',
|
|
255
|
+
defaultMessage: 'Validation error',
|
|
256
|
+
},
|
|
257
|
+
"invalidIosMessage": {
|
|
258
|
+
id: 'app.containers.MobilePush.Edit.invalidIosMessage',
|
|
259
|
+
defaultMessage: 'Validation failed for IOS',
|
|
260
|
+
},
|
|
261
|
+
"invalidAndroidMessage": {
|
|
262
|
+
id: 'app.containers.MobilePush.Edit.invalidAndroidMessage',
|
|
263
|
+
defaultMessage: 'Validation failed for Android',
|
|
264
|
+
},
|
|
265
|
+
"invalidTags": {
|
|
266
|
+
id: 'app.containers.MobilePush.Create.invalidTags',
|
|
267
|
+
defaultMessage: 'Invalid tags',
|
|
268
|
+
},
|
|
253
269
|
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { createSelector } from 'reselect';
|
|
2
|
+
import { fromJS } from 'immutable';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Direct selector to the create state domain
|
|
5
6
|
*/
|
|
6
|
-
const selectMobilePushEditDomain = () => (state) => state.get('mobileEdit'); // reducer injected as mobileEdit in library mode.
|
|
7
|
+
const selectMobilePushEditDomain = () => (state) => state.get('mobileEdit') || fromJS({}); // reducer injected as mobileEdit in library mode.
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -2,15 +2,16 @@ import {get, filter, cloneDeep} from 'lodash';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import {FormattedMessage} from 'react-intl';
|
|
4
4
|
import messages from './Create/messages';
|
|
5
|
-
function getPrimaryCtaFields({inputFields, fieldIndex, deepLinkOptions}) {
|
|
5
|
+
function getPrimaryCtaFields({inputFields, fieldIndex, deepLinkOptions, tab}) {
|
|
6
|
+
const currentTab = tab || this.state.currentTab;
|
|
6
7
|
const newInputFields = cloneDeep(inputFields);
|
|
7
8
|
newInputFields.splice(fieldIndex + 1, 0, {
|
|
8
9
|
rowClassName: 'mobile-push-row',
|
|
9
|
-
identifier: `cta-deeplink${
|
|
10
|
+
identifier: `cta-deeplink${currentTab > 1 ? currentTab : ''}`,
|
|
10
11
|
|
|
11
12
|
cols: [
|
|
12
13
|
{
|
|
13
|
-
id: `cta-deeplink${
|
|
14
|
+
id: `cta-deeplink${currentTab > 1 ? currentTab : ''}`,
|
|
14
15
|
type: "radioGroup", //Resembles component to be used
|
|
15
16
|
metaType: "text",
|
|
16
17
|
datatype: "string",
|
|
@@ -33,12 +34,12 @@ function getPrimaryCtaFields({inputFields, fieldIndex, deepLinkOptions}) {
|
|
|
33
34
|
newInputFields.splice(fieldIndex + 2, 0, {
|
|
34
35
|
rowClassName: 'mobile-push-row',
|
|
35
36
|
id: 'cta-deeplink-select-section',
|
|
36
|
-
identifier: `cta-deeplink${
|
|
37
|
+
identifier: `cta-deeplink${currentTab > 1 ? currentTab : ''}-select`,
|
|
37
38
|
|
|
38
39
|
cols: [
|
|
39
40
|
|
|
40
41
|
{
|
|
41
|
-
id: `cta-deeplink${
|
|
42
|
+
id: `cta-deeplink${currentTab > 1 ? currentTab : ''}-select`,
|
|
42
43
|
placeholder: "Select DeepLink",
|
|
43
44
|
type: "select", //Resembles component to be used
|
|
44
45
|
options: deepLinkOptions,
|
|
@@ -153,10 +154,11 @@ function getSecondaryCtaFields({inputFields, fieldIndex, deepLinkOptions}) {
|
|
|
153
154
|
});
|
|
154
155
|
return newInputFields;
|
|
155
156
|
}
|
|
156
|
-
function getLinkTypeFields({inputFieldsArgs, fieldIndex, deepLinkOptions, formData, field}) {
|
|
157
|
+
function getLinkTypeFields({inputFieldsArgs, fieldIndex, deepLinkOptions, formData, field, tab}) {
|
|
158
|
+
const currentTab = tab || this.state.currentTab;
|
|
157
159
|
const inputFields = cloneDeep(inputFieldsArgs);
|
|
158
160
|
const deeplinks = this.props.Templates.selectedWeChatAccount && this.props.Templates.selectedWeChatAccount.configs && !!this.props.Templates.selectedWeChatAccount.configs.deeplink ? this.props.Templates.selectedWeChatAccount.configs.deeplink : '[]';
|
|
159
|
-
const deeplinkValue = formData[
|
|
161
|
+
const deeplinkValue = formData[currentTab - 1][field.id];
|
|
160
162
|
const componentIndex = fieldIndex + 1;
|
|
161
163
|
const inputId = deeplinkValue && deeplinkValue.toLowerCase() === "deeplink" ? `${field.id}-select` : `${field.id}-text`;
|
|
162
164
|
if ( deeplinkValue && deeplinkValue.toLowerCase() === "deeplink" && (fieldIndex === inputFields.length - 1 || inputFields[componentIndex].id !== "cta-deeplink-select-section")) {
|
|
@@ -20,15 +20,15 @@ import makeSelectWeChat from './selectors';
|
|
|
20
20
|
import messages from './messages';
|
|
21
21
|
import * as actions from './actions';
|
|
22
22
|
import FormBuilder from '../../../components/FormBuilder';
|
|
23
|
-
import { UserIsAuthenticated } from '
|
|
23
|
+
import { UserIsAuthenticated } from '../../../utils/authWrapper';
|
|
24
24
|
import * as globalActions from '../../../containers/Cap/actions';
|
|
25
|
-
import {getMessageObject} from '
|
|
25
|
+
import {getMessageObject} from '../../../utils/messageUtils';
|
|
26
26
|
import * as templateActions from '../../Templates/actions';
|
|
27
27
|
// import SlideBox from '../../components/SlideBox';
|
|
28
28
|
// import PageHeader from '../../components/PageHeader';
|
|
29
29
|
import './_mapTemplates.scss';
|
|
30
30
|
|
|
31
|
-
import callNativeEvent from '
|
|
31
|
+
import callNativeEvent from '../../../utils/callNativeEvent';
|
|
32
32
|
|
|
33
33
|
// const Option = Select.Option;
|
|
34
34
|
|
|
@@ -1141,14 +1141,14 @@ export class MapTemplates extends React.Component { // eslint-disable-line react
|
|
|
1141
1141
|
return false;
|
|
1142
1142
|
}
|
|
1143
1143
|
const temp = schema;
|
|
1144
|
-
let newSchema = _.cloneDeep(schema);
|
|
1145
1144
|
temp.standalone.sections = this.injectSections(temp.standalone.sections);
|
|
1146
1145
|
_.forEach(temp.containers, (container) => {
|
|
1147
1146
|
let tempContainer = container;
|
|
1148
1147
|
tempContainer = this.injectContainer(tempContainer);
|
|
1149
1148
|
return tempContainer;
|
|
1150
1149
|
});
|
|
1151
|
-
newSchema =
|
|
1150
|
+
let newSchema = _.cloneDeep(schema);
|
|
1151
|
+
newSchema = this.hideSchemaElementsByModule(newSchema);
|
|
1152
1152
|
this.setState({schema: newSchema});
|
|
1153
1153
|
return schema;
|
|
1154
1154
|
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="360px" height="725px" viewBox="0 0 360 725" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<!-- Generator: Sketch 55.2 (78181) - https://sketchapp.com -->
|
|
4
|
-
<title>Artboard Copy 3</title>
|
|
5
|
-
<desc>Created with Sketch.</desc>
|
|
6
|
-
<g id="Artboard-Copy-3" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
7
|
-
<rect id="Rectangle" fill="#FFFFFF" x="0" y="660" width="360" height="65"></rect>
|
|
8
|
-
<g id="Organisms/ui/android/screenshots/wallpaper" transform="translate(120.000000, 0.000000)"></g>
|
|
9
|
-
<g id="Group-5" transform="translate(16.000000, 680.000000)">
|
|
10
|
-
<polygon id="Stroke-1" stroke-opacity="0.0117647061" stroke="#000000" stroke-width="1.33333336e-11" points="0 0 23.999999 0 23.999999 23.999999 0 23.999999"></polygon>
|
|
11
|
-
<polygon id="Fill-3" fill="#7F7F7F" points="18.9999989 12.9999992 12.9999992 12.9999992 12.9999992 18.9999989 10.9999993 18.9999989 10.9999993 12.9999992 4.9999997 12.9999992 4.9999997 10.9999993 10.9999993 10.9999993 10.9999993 4.9999997 12.9999992 4.9999997 12.9999992 10.9999993 18.9999989 10.9999993"></polygon>
|
|
12
|
-
</g>
|
|
13
|
-
<text id="Add-text-to-this-mes" font-family="Roboto-Regular, Roboto" font-size="15" font-weight="normal" letter-spacing="0.3" fill="#959595">
|
|
14
|
-
<tspan x="53" y="697">Add text to this message</tspan>
|
|
15
|
-
</text>
|
|
16
|
-
<g id="Group-5" transform="translate(320.000000, 679.000000)">
|
|
17
|
-
<polygon id="Stroke-1" stroke-opacity="0.0117647061" stroke="#000000" stroke-width="1.33333336e-11" points="0 0 23.999999 0 23.999999 23.999999 0 23.999999"></polygon>
|
|
18
|
-
<polygon id="Fill-3" fill="#757575" points="2.00999988 20.9999987 22.9999986 11.9999993 2.00999988 2.99999982 1.99999988 9.9999994 16.999999 11.9999993 1.99999988 13.9999992"></polygon>
|
|
19
|
-
</g>
|
|
20
|
-
<rect id="Rectangle" stroke="#E6E6E6" fill="#F4F5F7" x="0.5" y="86.5" width="359" height="573"></rect>
|
|
21
|
-
<g id="Group">
|
|
22
|
-
<g id="Toolbar">
|
|
23
|
-
<polygon id="Toolbar-bg" fill="#E51FA3" points="360 0 0 0 0 86 360 86"></polygon>
|
|
24
|
-
<g id="Toolbar-contents" transform="translate(16.000000, 40.000000)">
|
|
25
|
-
<g id="Back">
|
|
26
|
-
<rect id="Bounds" x="0" y="0" width="24" height="24"></rect>
|
|
27
|
-
<polygon id="Shape" fill="#FFFFFF" points="20 11 7.8 11 13.4 5.4 12 4 4 12 12 20 13.4 18.6 7.8 13 20 13"></polygon>
|
|
28
|
-
</g>
|
|
29
|
-
</g>
|
|
30
|
-
</g>
|
|
31
|
-
<g id="Status-bar">
|
|
32
|
-
<rect id="Status-bar-bg" fill="#CF0E8F" x="0" y="0" width="360" height="24"></rect>
|
|
33
|
-
<rect id="bounds" x="242" y="0" width="118" height="24"></rect>
|
|
34
|
-
<g id="battery" transform="translate(337.000000, 4.000000)">
|
|
35
|
-
<polygon id="bounds" points="0 0 16 0 16 16 0 16"></polygon>
|
|
36
|
-
<polygon id="Shape" fill="#FFFFFF" points="9 1.875 9 1 6 1 6 1.875 3 1.875 3 15 12 15 12 1.875"></polygon>
|
|
37
|
-
</g>
|
|
38
|
-
<g id="cellular" transform="translate(317.000000, 4.000000)">
|
|
39
|
-
<polygon id="bounds" points="0 0 16 0 16 16 0 16"></polygon>
|
|
40
|
-
<polygon id="Shape" fill="#FFFFFF" points="0 15 14 15 14 1"></polygon>
|
|
41
|
-
</g>
|
|
42
|
-
<g id="wifi" transform="translate(296.000000, 4.000000)">
|
|
43
|
-
<polygon id="bounds" points="2 0 18 0 18 16 2 16"></polygon>
|
|
44
|
-
<path d="M0.977372085,4.01593123 C3.48821908,2.12256382 6.61301513,1 10,1 C13.3869849,1 16.5117809,2.12256382 19.0226279,4.01593123 L10,15 L0.977372085,4.01593123 Z" id="Shape" fill="#FFFFFF"></path>
|
|
45
|
-
</g>
|
|
46
|
-
</g>
|
|
47
|
-
<g id="Icons-/-Navigation-24px-/-White-/-More" transform="translate(332.000000, 42.000000)">
|
|
48
|
-
<g id="More">
|
|
49
|
-
<rect id="Bounds" x="0" y="0" width="12" height="24"></rect>
|
|
50
|
-
<path d="M6,8 C7.1,8 8,7.1 8,6 C8,4.9 7.1,4 6,4 C4.9,4 4,4.9 4,6 C4,7.1 4.9,8 6,8 L6,8 Z M6,10 C4.9,10 4,10.9 4,12 C4,13.1 4.9,14 6,14 C7.1,14 8,13.1 8,12 C8,10.9 7.1,10 6,10 L6,10 Z M6,16 C4.9,16 4,16.9 4,18 C4,19.1 4.9,20 6,20 C7.1,20 8,19.1 8,18 C8,16.9 7.1,16 6,16 L6,16 Z" id="Shape" fill="#FFFFFF"></path>
|
|
51
|
-
</g>
|
|
52
|
-
</g>
|
|
53
|
-
</g>
|
|
54
|
-
</g>
|
|
55
|
-
</svg>
|
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
.shell {
|
|
2
|
-
position: relative;
|
|
3
|
-
-webkit-transform: translate(-50%);
|
|
4
|
-
transform: translate(-50%);
|
|
5
|
-
left: 50%;
|
|
6
|
-
padding: 0 10px;
|
|
7
|
-
width: 450px;
|
|
8
|
-
|
|
9
|
-
.preview-image {
|
|
10
|
-
width: 51%;
|
|
11
|
-
&.sms {
|
|
12
|
-
width: 45%;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.msgContainer {
|
|
17
|
-
position: absolute;
|
|
18
|
-
top: 18%;
|
|
19
|
-
left: 28.8%;
|
|
20
|
-
width: 42%;
|
|
21
|
-
height: 336px;
|
|
22
|
-
display: -webkit-box;
|
|
23
|
-
display: -ms-flexbox;
|
|
24
|
-
display: flex;
|
|
25
|
-
|
|
26
|
-
.sms-icon{
|
|
27
|
-
top: 0;
|
|
28
|
-
left: 2px;
|
|
29
|
-
width: 25px;
|
|
30
|
-
position: absolute;
|
|
31
|
-
}
|
|
32
|
-
&.sms{
|
|
33
|
-
height: 290px;
|
|
34
|
-
width: 40%;
|
|
35
|
-
.sms-icon{
|
|
36
|
-
width: 20px;
|
|
37
|
-
left: 14px;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.message-pop{
|
|
42
|
-
.unicode-disabled{
|
|
43
|
-
font-size: 16px;
|
|
44
|
-
}
|
|
45
|
-
&.sms {
|
|
46
|
-
max-height: 100%;
|
|
47
|
-
position: absolute;
|
|
48
|
-
// width: initial;
|
|
49
|
-
overflow: auto;
|
|
50
|
-
top: 0;
|
|
51
|
-
left: 17%;
|
|
52
|
-
white-space: pre-wrap;
|
|
53
|
-
word-break: break-word;
|
|
54
|
-
line-height: 14px;
|
|
55
|
-
padding: 0 8px 8px 8px;
|
|
56
|
-
font-size: 10px;
|
|
57
|
-
width: 80%;
|
|
58
|
-
font-family: 'open-sans';
|
|
59
|
-
.message-pop-item{
|
|
60
|
-
padding: 4px;
|
|
61
|
-
background: #3F51B5;
|
|
62
|
-
color: #FFFFFF;
|
|
63
|
-
margin-top: 8px;
|
|
64
|
-
border-radius: 4px;
|
|
65
|
-
min-height: 26px;
|
|
66
|
-
&:first-child{
|
|
67
|
-
margin-top: 0;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
&:not(.sms){
|
|
72
|
-
padding: 4px;
|
|
73
|
-
background: #3F51B5;
|
|
74
|
-
position: absolute;
|
|
75
|
-
// width: initial;
|
|
76
|
-
overflow: auto;
|
|
77
|
-
top: 0;
|
|
78
|
-
left: 17%;
|
|
79
|
-
white-space: pre-wrap;
|
|
80
|
-
word-break: break-word;
|
|
81
|
-
border-radius: 4px;
|
|
82
|
-
max-height: 100%;
|
|
83
|
-
color: #FFFFFF;
|
|
84
|
-
width: 70%;
|
|
85
|
-
min-height: 26px;
|
|
86
|
-
line-height: 14px;
|
|
87
|
-
padding: 8px;
|
|
88
|
-
font-size: 10px;
|
|
89
|
-
font-family: 'open-sans';
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
.android-push-message-Container, .iphone-push-message-Container{
|
|
94
|
-
position: absolute;
|
|
95
|
-
top: 11%;
|
|
96
|
-
left: 28.8%;
|
|
97
|
-
width: 42%;
|
|
98
|
-
height: 336px;
|
|
99
|
-
overflow: auto;
|
|
100
|
-
display: -webkit-box;
|
|
101
|
-
display: -ms-flexbox;
|
|
102
|
-
display: flex;
|
|
103
|
-
.message-pop{
|
|
104
|
-
position: absolute;
|
|
105
|
-
// width: initial;
|
|
106
|
-
overflow: auto;
|
|
107
|
-
word-wrap: break-word;
|
|
108
|
-
white-space: pre-wrap;
|
|
109
|
-
border-top-left-radius: 4px;
|
|
110
|
-
border-top-right-radius: 4px;
|
|
111
|
-
max-height: 100%;
|
|
112
|
-
width: 100%;
|
|
113
|
-
min-height: 26px;
|
|
114
|
-
line-height: 15px;
|
|
115
|
-
font-size: 10px;
|
|
116
|
-
.body-image{
|
|
117
|
-
img{
|
|
118
|
-
max-width: 100%;
|
|
119
|
-
max-height: 90px;
|
|
120
|
-
margin: auto;
|
|
121
|
-
display: block;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
.android-push-message-Container{
|
|
127
|
-
.title, .body-text, .body-image, .app-name{
|
|
128
|
-
background-color: #FFFFFF;
|
|
129
|
-
color: #333333;
|
|
130
|
-
}
|
|
131
|
-
.app-name{
|
|
132
|
-
color: #5D5D5D;
|
|
133
|
-
font-weight: 600;
|
|
134
|
-
padding: 8px 8px 4px 8px;
|
|
135
|
-
}
|
|
136
|
-
.title, .body-image{
|
|
137
|
-
padding: 0 8px 0 8px;
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
.body-text{
|
|
141
|
-
padding: 0 8px 4px 8px;
|
|
142
|
-
color: #5a5959;
|
|
143
|
-
}
|
|
144
|
-
.title{
|
|
145
|
-
overflow: hidden;
|
|
146
|
-
white-space: nowrap;
|
|
147
|
-
text-overflow: ellipsis;
|
|
148
|
-
}
|
|
149
|
-
.actions{
|
|
150
|
-
background-color: #EEEEEE;
|
|
151
|
-
height: 32px;
|
|
152
|
-
padding: 4px;
|
|
153
|
-
.action{
|
|
154
|
-
line-height: 24px;
|
|
155
|
-
font-size: 10px;
|
|
156
|
-
font-weight: 600;
|
|
157
|
-
color: #1970DA;
|
|
158
|
-
height: 12px;
|
|
159
|
-
margin-left: 8px;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
.iphone-push-message-Container{
|
|
164
|
-
top: 8%;
|
|
165
|
-
.message-pop{
|
|
166
|
-
border-radius: 4px;
|
|
167
|
-
word-wrap: break-word;
|
|
168
|
-
}
|
|
169
|
-
.title, .body-text, .body-image, .app-name{
|
|
170
|
-
background-color: #FFFFFF;
|
|
171
|
-
color: #333333;
|
|
172
|
-
}
|
|
173
|
-
.body-image{
|
|
174
|
-
padding-top: 8px;
|
|
175
|
-
}
|
|
176
|
-
.title{
|
|
177
|
-
overflow: hidden;
|
|
178
|
-
white-space: nowrap;
|
|
179
|
-
text-overflow: ellipsis;
|
|
180
|
-
}
|
|
181
|
-
.app-name{
|
|
182
|
-
padding: 8px;
|
|
183
|
-
color: #5D5D5D;
|
|
184
|
-
border-bottom: solid 1px #D6D6D6;
|
|
185
|
-
.material-icons{
|
|
186
|
-
font-size: 12px;
|
|
187
|
-
float: right;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
.title, .body-text{
|
|
191
|
-
padding: 4px;
|
|
192
|
-
}
|
|
193
|
-
.title{
|
|
194
|
-
overflow: hidden;
|
|
195
|
-
white-space: nowrap;
|
|
196
|
-
text-overflow: ellipsis;
|
|
197
|
-
}
|
|
198
|
-
.body-text{
|
|
199
|
-
border-bottom-left-radius: 4px;
|
|
200
|
-
border-bottom-right-radius: 4px;
|
|
201
|
-
}
|
|
202
|
-
.actions{
|
|
203
|
-
background-color: #FFFFFF;
|
|
204
|
-
opacity: 0.8;
|
|
205
|
-
height: 32px;
|
|
206
|
-
line-height: 26px;
|
|
207
|
-
margin-top: 4px;
|
|
208
|
-
border-radius: 6px;
|
|
209
|
-
text-align: center;
|
|
210
|
-
padding: 4px;
|
|
211
|
-
.action{
|
|
212
|
-
font-size: 12px;
|
|
213
|
-
font-weight: 600;
|
|
214
|
-
color: #000000;
|
|
215
|
-
text-align: center;
|
|
216
|
-
margin-left: 8px;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.align-center {
|
|
223
|
-
text-align: center;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.align-left {
|
|
227
|
-
text-align: left;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
.preview-container{
|
|
231
|
-
.preview-info {
|
|
232
|
-
// font-family: 'proxima-nova';
|
|
233
|
-
font-weight: 600;
|
|
234
|
-
font-size: 16px;
|
|
235
|
-
text-align: center;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.preview-container.embedded-preview{
|
|
240
|
-
.preview-image {
|
|
241
|
-
width: 38% !important;
|
|
242
|
-
}
|
|
243
|
-
.message-pop{
|
|
244
|
-
left: 21% !important;
|
|
245
|
-
width: 67% !important;
|
|
246
|
-
}
|
|
247
|
-
.sms-icon{
|
|
248
|
-
left: 12% !important;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
#slidebox-container {
|
|
255
|
-
left: 60vw;
|
|
256
|
-
width: 40vw;
|
|
257
|
-
|
|
258
|
-
.shell {
|
|
259
|
-
position: relative;
|
|
260
|
-
-webkit-transform: translate(-50%);
|
|
261
|
-
transform: translate(-50%);
|
|
262
|
-
left: 50%;
|
|
263
|
-
padding: 0 10px;
|
|
264
|
-
width: initial;
|
|
265
|
-
|
|
266
|
-
.preview-image {
|
|
267
|
-
&.sms{
|
|
268
|
-
width: 45%;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
.msgContainer {
|
|
274
|
-
position: absolute;
|
|
275
|
-
top: 14%;
|
|
276
|
-
left: 29%;
|
|
277
|
-
width: 42%;
|
|
278
|
-
height: 275px;
|
|
279
|
-
display: -webkit-box;
|
|
280
|
-
display: -ms-flexbox;
|
|
281
|
-
display: flex;
|
|
282
|
-
|
|
283
|
-
.sms-icon{
|
|
284
|
-
top: 6%;
|
|
285
|
-
left: 2%;
|
|
286
|
-
width: 12%;
|
|
287
|
-
position: absolute;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
&.sms{
|
|
291
|
-
height: 290px;
|
|
292
|
-
width: 40%;
|
|
293
|
-
top: 16%;
|
|
294
|
-
.sms-icon{
|
|
295
|
-
left: 7%;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
.message-pop{
|
|
299
|
-
&.sms {
|
|
300
|
-
max-height: 100%;
|
|
301
|
-
position: absolute;
|
|
302
|
-
// width: initial;
|
|
303
|
-
overflow: auto;
|
|
304
|
-
top: 6%;
|
|
305
|
-
left: 17%;
|
|
306
|
-
width: 80%;
|
|
307
|
-
white-space: pre-wrap;
|
|
308
|
-
word-break: break-word;
|
|
309
|
-
line-height: 14px;
|
|
310
|
-
padding: 0 8px 8px 8px;
|
|
311
|
-
font-size: 10px;
|
|
312
|
-
font-family: 'open-sans';
|
|
313
|
-
.message-pop-item{
|
|
314
|
-
padding: 8px;
|
|
315
|
-
background: #3F51B5;
|
|
316
|
-
color: #FFFFFF;
|
|
317
|
-
margin-top: 8px;
|
|
318
|
-
border-radius: 4px;
|
|
319
|
-
min-height: 26px;
|
|
320
|
-
&:first-child{
|
|
321
|
-
margin-top: 0;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
&:not(.sms){
|
|
326
|
-
padding: 8px 8px;
|
|
327
|
-
background: #3F51B5;
|
|
328
|
-
position: absolute;
|
|
329
|
-
width: 65%;
|
|
330
|
-
top: 15%;
|
|
331
|
-
left: 19%;
|
|
332
|
-
word-break: break-all;
|
|
333
|
-
border-radius: 6px;
|
|
334
|
-
max-height: 100%;
|
|
335
|
-
overflow: auto;
|
|
336
|
-
color: #FFFFFF;
|
|
337
|
-
line-height: 14px;
|
|
338
|
-
font-family: "open-sans";
|
|
339
|
-
font-size: 10px;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
.app-icon{
|
|
346
|
-
width: 10px;
|
|
347
|
-
height: 10px;
|
|
348
|
-
opacity: 1;
|
|
349
|
-
display: inline-block;
|
|
350
|
-
background-color: #333333;
|
|
351
|
-
margin-right: 4px;
|
|
352
|
-
}
|
|
353
|
-
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* SmsPreviewV2
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import React from 'react';
|
|
8
|
-
// import styled from 'styled-components';
|
|
9
|
-
|
|
10
|
-
import { FormattedMessage } from 'react-intl';
|
|
11
|
-
import messages from './messages';
|
|
12
|
-
import {CapColumn, CapRow, CapHeading} from '@capillarytech/cap-ui-library';
|
|
13
|
-
import androidPhoneImage from '../../assets/android-message-gui-2.svg';
|
|
14
|
-
|
|
15
|
-
class SmsPreviewV2 extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
16
|
-
render() {
|
|
17
|
-
let content = [this.props.content];
|
|
18
|
-
const channel = this.props.channel;
|
|
19
|
-
let smsDetails = {};
|
|
20
|
-
if (this.props.content && this.props.charCounterEnabled) {
|
|
21
|
-
smsDetails = updateCharCount(this.props.content, this.props.unicodeEnabled);
|
|
22
|
-
content = [];
|
|
23
|
-
for (let i = 0, limit = 0; i < smsDetails.parts; i += 1, limit += smsDetails.chars_sms) {
|
|
24
|
-
content.push(smsDetails.char_list.slice(limit, smsDetails.chars_sms * (i + 1)));
|
|
25
|
-
}
|
|
26
|
-
if (document.getElementById("msg_count") && this.props.showCount) {
|
|
27
|
-
document.getElementById("msg_count").val = smsDetails.parts;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
const type = this.props.location && this.props.location.query.type ? this.props.location.query.type : '';
|
|
31
|
-
return (
|
|
32
|
-
<CapRow>
|
|
33
|
-
{this.props.showCount && <CapColumn span={16}>
|
|
34
|
-
{channel && channel.toLowerCase() === 'sms' && <CapHeading type="h3">
|
|
35
|
-
<FormattedMessage {...messages.charactersTotal} values={{smsCount: smsDetails.parts, charCount: smsDetails.chars_used}}/>
|
|
36
|
-
{smsDetails.unicode &&
|
|
37
|
-
<FormattedMessage {...messages.smsFormatType}/>
|
|
38
|
-
}
|
|
39
|
-
</CapHeading>}
|
|
40
|
-
</CapColumn>}
|
|
41
|
-
<CapColumn span={this.props.showCount ? 8 : 24}>
|
|
42
|
-
<div className={`preview-container ${type === 'embedded' ? 'embedded-preview' : ''}`}>
|
|
43
|
-
{ channel && channel.toLowerCase() === 'sms' &&
|
|
44
|
-
<div className="shell align-center" id="sms-preview">
|
|
45
|
-
<img className="preview-image sms" src={smsBody} alt="Preview is being generated"/>
|
|
46
|
-
<div className="msgContainer sms">
|
|
47
|
-
<img className="sms-icon" src={smsIcon} alt="Sms icon" />
|
|
48
|
-
<div className={"message-pop sms"}>
|
|
49
|
-
{content && content.length && content.map((msg, index) =>
|
|
50
|
-
<CapColumn key={`"message-pop-content-${index}`} className="message-pop-item align-left" style={{ background: '#3F51B5', color: '#ffffff'}}>
|
|
51
|
-
{msg}
|
|
52
|
-
</CapColumn>)
|
|
53
|
-
}
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
}
|
|
58
|
-
</div>
|
|
59
|
-
</CapColumn>
|
|
60
|
-
</CapRow>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
SmsPreviewV2.propTypes = {
|
|
66
|
-
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export default SmsPreviewV2;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* SmsPreviewV2 Messages
|
|
3
|
-
*
|
|
4
|
-
* This contains all the text for the SmsPreviewV2 component.
|
|
5
|
-
*/
|
|
6
|
-
import { defineMessages } from 'react-intl';
|
|
7
|
-
|
|
8
|
-
export default defineMessages({
|
|
9
|
-
header: {
|
|
10
|
-
id: 'app.components.SmsPreviewV2.header',
|
|
11
|
-
defaultMessage: 'This is the SmsPreviewV2 component !',
|
|
12
|
-
},
|
|
13
|
-
});
|