@capillarytech/creatives-library 7.10.12 → 7.10.14
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/package.json +1 -1
- package/translations/en.json +33 -0
- package/translations/zh.json +33 -0
- package/v2Containers/Facebook/Advertisement/index.js +14 -7
- package/v2Containers/Facebook/index.js +16 -17
- package/v2Containers/SmsTrai/Create/tests/__snapshots__/index.test.js.snap +171 -6
- package/v2Containers/SmsTrai/Edit/index.js +3 -1
- package/v2Containers/SmsTrai/Edit/tests/__snapshots__/index.test.js.snap +264 -224
package/package.json
CHANGED
package/translations/en.json
CHANGED
|
@@ -13,6 +13,33 @@
|
|
|
13
13
|
"app.components.CapVideoUpload.videoSizeDescription": "File size: Up to {size}",
|
|
14
14
|
"app.components.TemplatePreview.includesOptoutTag": "Includes optout tag",
|
|
15
15
|
"app.components.TemplatePreview.optoutCharactersTotal": "Includes optout tag ({optoutUrlLength} characters)",
|
|
16
|
+
"app.v2containers.SmsTrai.Create.doneButtonLabel": "Done",
|
|
17
|
+
"app.v2containers.SmsTrai.Create.downloadInstruction": "Download {link} file.",
|
|
18
|
+
"app.v2containers.SmsTrai.Create.downloadIssues": "Download issues",
|
|
19
|
+
"app.v2containers.SmsTrai.Create.dropCsvFile": "Drag and drop a CSV file here",
|
|
20
|
+
"app.v2containers.SmsTrai.Create.duplicateEntriesInstruction": "Duplicate entries will be overwritten.",
|
|
21
|
+
"app.v2containers.SmsTrai.Create.failedToUpload": "Failed to upload",
|
|
22
|
+
"app.v2containers.SmsTrai.Create.failedVal": "{number} failed",
|
|
23
|
+
"app.v2containers.SmsTrai.Create.fileMaxlengthError": "More then 500 records are not allowed for the selected file.",
|
|
24
|
+
"app.v2containers.SmsTrai.Create.fileMinlengthError": "Please select a CSV file with minimum 1 row of data and 1 row of headers.",
|
|
25
|
+
"app.v2containers.SmsTrai.Create.headerAliasErrorDescription": "Please include mandatory field header. It can be {headerAliases}.",
|
|
26
|
+
"app.v2containers.SmsTrai.Create.mandatoryColsErrorDescription": "Mandatory fields: Template name, Template ID, Type, Sender ID, Approval status, Status and Template message are required for templates.",
|
|
27
|
+
"app.v2containers.SmsTrai.Create.mandatoryColsInstruction": "Please ensure that each template has the following mandatory fields: Template name,Template ID, Type, Sender ID, Approval status, Status, Template message.",
|
|
28
|
+
"app.v2containers.SmsTrai.Create.nonCsvErrorDescription": "Please select a csv file.",
|
|
29
|
+
"app.v2containers.SmsTrai.Create.numberOfRecords": "{value, number} Record{value, plural, one {} other {s}}",
|
|
30
|
+
"app.v2containers.SmsTrai.Create.or": "OR",
|
|
31
|
+
"app.v2containers.SmsTrai.Create.passedVal": "{number} passed",
|
|
32
|
+
"app.v2containers.SmsTrai.Create.repetitiveColsErrorDescription": "Please remove repetitive fields ({repetitiveCols}) from the file.",
|
|
33
|
+
"app.v2containers.SmsTrai.Create.sampleCsv": "Sample CSV",
|
|
34
|
+
"app.v2containers.SmsTrai.Create.selectFileFromComputer": "Select a file from computer",
|
|
35
|
+
"app.v2containers.SmsTrai.Create.smsCreateNotification": "Sms templates created successfully",
|
|
36
|
+
"app.v2containers.SmsTrai.Create.statusAliasErrorDescription": "Please include mandatory field status. It can be {statusAliases}.",
|
|
37
|
+
"app.v2containers.SmsTrai.Create.statusInstruction": "Only the \"Approved\" and “Active” templates will be uploaded.",
|
|
38
|
+
"app.v2containers.SmsTrai.Create.templateIdAliasErrorDescription": "Please include mandatory field template id. It can be {templateIdAliases}.",
|
|
39
|
+
"app.v2containers.SmsTrai.Create.templateMessageAliasErrorDescription": "Please include mandatory field template message. It can be {templateMessageAliases}.",
|
|
40
|
+
"app.v2containers.SmsTrai.Create.uploadFile": "Upload file",
|
|
41
|
+
"app.v2containers.SmsTrai.Create.uploadInstructions": "Upload Instructions",
|
|
42
|
+
"app.v2containers.SmsTrai.Create.uploadLimitInstruction": "Upload a file of <= 500 rows.",
|
|
16
43
|
"creatives.components.AccessForbidden.forbiddenDesc": "This page access has not been provided to you.",
|
|
17
44
|
"creatives.components.AccessForbidden.forbiddenHeader": "Access Forbidden",
|
|
18
45
|
"creatives.components.BreadCrumbs.header": "This is the BreadCrumbs component !",
|
|
@@ -119,6 +146,7 @@
|
|
|
119
146
|
"creatives.componentsV2.CapTagList.dynamic_days_before_expiry": "Dynamic days before expiry",
|
|
120
147
|
"creatives.componentsV2.CapTagList.gettingTags": "Getting tags...",
|
|
121
148
|
"creatives.componentsV2.CapTagList.loyalty": "Loyalty",
|
|
149
|
+
"creatives.componentsV2.CapTagList.loyaltyAttributeDisable": "You won’t be able to add loyalty related attributes since the loyalty program/ card series is None.",
|
|
122
150
|
"creatives.componentsV2.CapTagList.numberOfDaysBeforeExpiry": "Number of days before expiry",
|
|
123
151
|
"creatives.componentsV2.CapTagList.outbound": "Outbound",
|
|
124
152
|
"creatives.componentsV2.CapTagList.search": "Search",
|
|
@@ -896,6 +924,7 @@
|
|
|
896
924
|
"creatives.containersV2.Create.unicodeLabel": "Allow unicode characters",
|
|
897
925
|
"creatives.containersV2.Create.validationError": "Validation error",
|
|
898
926
|
"creatives.containersV2.Create.versionLabel": "Version",
|
|
927
|
+
"creatives.containersV2.Creatives.UploadSMStemplates": "Upload SMS templates",
|
|
899
928
|
"creatives.containersV2.Creatives.addContent": "Add content",
|
|
900
929
|
"creatives.containersV2.Creatives.alphabeticallyOption": "Alphabetically",
|
|
901
930
|
"creatives.containersV2.Creatives.blankTemplate": "Blank template",
|
|
@@ -1589,6 +1618,7 @@
|
|
|
1589
1618
|
"creatives.containersV2.Templates.preview": "Preview",
|
|
1590
1619
|
"creatives.containersV2.Templates.previewButton": "Preview",
|
|
1591
1620
|
"creatives.containersV2.Templates.previewGenerateText": "Preview is being generated...",
|
|
1621
|
+
"creatives.containersV2.Templates.promotional": "Promotional",
|
|
1592
1622
|
"creatives.containersV2.Templates.pushTitleIllustartion": "Create a mobile push notification {template}",
|
|
1593
1623
|
"creatives.containersV2.Templates.richMediaTemplates": "Rich media templates",
|
|
1594
1624
|
"creatives.containersV2.Templates.searchText": "Search",
|
|
@@ -1597,6 +1627,8 @@
|
|
|
1597
1627
|
"creatives.containersV2.Templates.selectDefaultButton": "Select",
|
|
1598
1628
|
"creatives.containersV2.Templates.selectSmsHeader": "Select SMS template",
|
|
1599
1629
|
"creatives.containersV2.Templates.selectWechatHeader": "Select WECHAT template",
|
|
1630
|
+
"creatives.containersV2.Templates.serviceExplicit": "Service explicit",
|
|
1631
|
+
"creatives.containersV2.Templates.serviceImplicit": "Service implicit",
|
|
1600
1632
|
"creatives.containersV2.Templates.smsChannelTemplatesHeader": "SMS templates",
|
|
1601
1633
|
"creatives.containersV2.Templates.smsHeader": "SMS",
|
|
1602
1634
|
"creatives.containersV2.Templates.smsTitleIllustartion": "Create an SMS {template}",
|
|
@@ -1610,6 +1642,7 @@
|
|
|
1610
1642
|
"creatives.containersV2.Templates.textTemplate": "Text",
|
|
1611
1643
|
"creatives.containersV2.Templates.unMapButton": "Unmap",
|
|
1612
1644
|
"creatives.containersV2.Templates.uploadFile": "Upload file",
|
|
1645
|
+
"creatives.containersV2.Templates.uploadTemplate": "Upload template",
|
|
1613
1646
|
"creatives.containersV2.Templates.uploadedAt": "Modified",
|
|
1614
1647
|
"creatives.containersV2.Templates.uploadedBy": "Uploaded by",
|
|
1615
1648
|
"creatives.containersV2.Templates.uploadingFile": "Uploading file",
|
package/translations/zh.json
CHANGED
|
@@ -13,6 +13,33 @@
|
|
|
13
13
|
"app.components.CapVideoUpload.videoSizeDescription": "",
|
|
14
14
|
"app.components.TemplatePreview.includesOptoutTag": "",
|
|
15
15
|
"app.components.TemplatePreview.optoutCharactersTotal": "",
|
|
16
|
+
"app.v2containers.SmsTrai.Create.doneButtonLabel": "",
|
|
17
|
+
"app.v2containers.SmsTrai.Create.downloadInstruction": "",
|
|
18
|
+
"app.v2containers.SmsTrai.Create.downloadIssues": "",
|
|
19
|
+
"app.v2containers.SmsTrai.Create.dropCsvFile": "",
|
|
20
|
+
"app.v2containers.SmsTrai.Create.duplicateEntriesInstruction": "",
|
|
21
|
+
"app.v2containers.SmsTrai.Create.failedToUpload": "",
|
|
22
|
+
"app.v2containers.SmsTrai.Create.failedVal": "",
|
|
23
|
+
"app.v2containers.SmsTrai.Create.fileMaxlengthError": "",
|
|
24
|
+
"app.v2containers.SmsTrai.Create.fileMinlengthError": "",
|
|
25
|
+
"app.v2containers.SmsTrai.Create.headerAliasErrorDescription": "",
|
|
26
|
+
"app.v2containers.SmsTrai.Create.mandatoryColsErrorDescription": "",
|
|
27
|
+
"app.v2containers.SmsTrai.Create.mandatoryColsInstruction": "",
|
|
28
|
+
"app.v2containers.SmsTrai.Create.nonCsvErrorDescription": "",
|
|
29
|
+
"app.v2containers.SmsTrai.Create.numberOfRecords": "",
|
|
30
|
+
"app.v2containers.SmsTrai.Create.or": "",
|
|
31
|
+
"app.v2containers.SmsTrai.Create.passedVal": "",
|
|
32
|
+
"app.v2containers.SmsTrai.Create.repetitiveColsErrorDescription": "",
|
|
33
|
+
"app.v2containers.SmsTrai.Create.sampleCsv": "",
|
|
34
|
+
"app.v2containers.SmsTrai.Create.selectFileFromComputer": "",
|
|
35
|
+
"app.v2containers.SmsTrai.Create.smsCreateNotification": "",
|
|
36
|
+
"app.v2containers.SmsTrai.Create.statusAliasErrorDescription": "",
|
|
37
|
+
"app.v2containers.SmsTrai.Create.statusInstruction": "",
|
|
38
|
+
"app.v2containers.SmsTrai.Create.templateIdAliasErrorDescription": "",
|
|
39
|
+
"app.v2containers.SmsTrai.Create.templateMessageAliasErrorDescription": "",
|
|
40
|
+
"app.v2containers.SmsTrai.Create.uploadFile": "",
|
|
41
|
+
"app.v2containers.SmsTrai.Create.uploadInstructions": "",
|
|
42
|
+
"app.v2containers.SmsTrai.Create.uploadLimitInstruction": "",
|
|
16
43
|
"creatives.components.AccessForbidden.forbiddenDesc": "",
|
|
17
44
|
"creatives.components.AccessForbidden.forbiddenHeader": "",
|
|
18
45
|
"creatives.components.BreadCrumbs.header": "",
|
|
@@ -119,6 +146,7 @@
|
|
|
119
146
|
"creatives.componentsV2.CapTagList.dynamic_days_before_expiry": "",
|
|
120
147
|
"creatives.componentsV2.CapTagList.gettingTags": "",
|
|
121
148
|
"creatives.componentsV2.CapTagList.loyalty": "",
|
|
149
|
+
"creatives.componentsV2.CapTagList.loyaltyAttributeDisable": "",
|
|
122
150
|
"creatives.componentsV2.CapTagList.numberOfDaysBeforeExpiry": "",
|
|
123
151
|
"creatives.componentsV2.CapTagList.outbound": "",
|
|
124
152
|
"creatives.componentsV2.CapTagList.search": "",
|
|
@@ -896,6 +924,7 @@
|
|
|
896
924
|
"creatives.containersV2.Create.unicodeLabel": "",
|
|
897
925
|
"creatives.containersV2.Create.validationError": "",
|
|
898
926
|
"creatives.containersV2.Create.versionLabel": "",
|
|
927
|
+
"creatives.containersV2.Creatives.UploadSMStemplates": "",
|
|
899
928
|
"creatives.containersV2.Creatives.addContent": "",
|
|
900
929
|
"creatives.containersV2.Creatives.alphabeticallyOption": "",
|
|
901
930
|
"creatives.containersV2.Creatives.blankTemplate": "",
|
|
@@ -1589,6 +1618,7 @@
|
|
|
1589
1618
|
"creatives.containersV2.Templates.preview": "",
|
|
1590
1619
|
"creatives.containersV2.Templates.previewButton": "",
|
|
1591
1620
|
"creatives.containersV2.Templates.previewGenerateText": "",
|
|
1621
|
+
"creatives.containersV2.Templates.promotional": "",
|
|
1592
1622
|
"creatives.containersV2.Templates.pushTitleIllustartion": "",
|
|
1593
1623
|
"creatives.containersV2.Templates.richMediaTemplates": "",
|
|
1594
1624
|
"creatives.containersV2.Templates.searchText": "",
|
|
@@ -1597,6 +1627,8 @@
|
|
|
1597
1627
|
"creatives.containersV2.Templates.selectDefaultButton": "",
|
|
1598
1628
|
"creatives.containersV2.Templates.selectSmsHeader": "",
|
|
1599
1629
|
"creatives.containersV2.Templates.selectWechatHeader": "",
|
|
1630
|
+
"creatives.containersV2.Templates.serviceExplicit": "",
|
|
1631
|
+
"creatives.containersV2.Templates.serviceImplicit": "",
|
|
1600
1632
|
"creatives.containersV2.Templates.smsChannelTemplatesHeader": "",
|
|
1601
1633
|
"creatives.containersV2.Templates.smsHeader": "",
|
|
1602
1634
|
"creatives.containersV2.Templates.smsTitleIllustartion": "",
|
|
@@ -1610,6 +1642,7 @@
|
|
|
1610
1642
|
"creatives.containersV2.Templates.textTemplate": "",
|
|
1611
1643
|
"creatives.containersV2.Templates.unMapButton": "",
|
|
1612
1644
|
"creatives.containersV2.Templates.uploadFile": "",
|
|
1645
|
+
"creatives.containersV2.Templates.uploadTemplate": "",
|
|
1613
1646
|
"creatives.containersV2.Templates.uploadedAt": "",
|
|
1614
1647
|
"creatives.containersV2.Templates.uploadedBy": "",
|
|
1615
1648
|
"creatives.containersV2.Templates.uploadingFile": "",
|
|
@@ -4,6 +4,9 @@ import { injectIntl, FormattedMessage, intlShape } from 'react-intl';
|
|
|
4
4
|
import { isUrl } from '../../Line/Container/Wrapper/utils';
|
|
5
5
|
import get from 'lodash/get';
|
|
6
6
|
import isEmpty from 'lodash/isEmpty';
|
|
7
|
+
import { connect } from "react-redux";
|
|
8
|
+
import { createStructuredSelector } from "reselect";
|
|
9
|
+
import { selectCurrentOrgDetails } from "../../Cap/selectors";
|
|
7
10
|
|
|
8
11
|
import {
|
|
9
12
|
CapInput,
|
|
@@ -815,11 +818,8 @@ export const Advertisement = (props) => {
|
|
|
815
818
|
const {orgUnitFacebookPageSettingsMap = {}, employeeAccessToken: accessToken = "", accountId = "" } = selectedFacebookAccount || {};
|
|
816
819
|
|
|
817
820
|
const getOrgName =()=>{
|
|
818
|
-
const {
|
|
819
|
-
const
|
|
820
|
-
const orgName = (
|
|
821
|
-
proxyOrgList.find(({ orgID }) => orgID === Number(orgId)) || {}
|
|
822
|
-
).orgName;
|
|
821
|
+
const { currentOrgDetails } = props;
|
|
822
|
+
const { basic_details: { name: orgName } = {} } = currentOrgDetails || {};
|
|
823
823
|
return orgName;
|
|
824
824
|
}
|
|
825
825
|
const getPageAccessOrgs = useCallback(() => {
|
|
@@ -1021,7 +1021,14 @@ Advertisement.propTypes = {
|
|
|
1021
1021
|
templateData: PropTypes.object,
|
|
1022
1022
|
params: PropTypes.object,
|
|
1023
1023
|
selectedMarketingObjective: PropTypes.any,
|
|
1024
|
-
|
|
1024
|
+
currentOrgDetails: PropTypes.object,
|
|
1025
1025
|
};
|
|
1026
1026
|
|
|
1027
|
-
|
|
1027
|
+
const mapStateToProps = (state, props) =>
|
|
1028
|
+
createStructuredSelector({
|
|
1029
|
+
currentOrgDetails: props?.cap
|
|
1030
|
+
? () => props.cap.currentOrgDetails
|
|
1031
|
+
: selectCurrentOrgDetails(),
|
|
1032
|
+
});
|
|
1033
|
+
|
|
1034
|
+
export default connect(mapStateToProps, null)(injectIntl(Advertisement));
|
|
@@ -156,23 +156,7 @@ const Facebook = (props) => {
|
|
|
156
156
|
const {
|
|
157
157
|
className,
|
|
158
158
|
templateData,
|
|
159
|
-
cap
|
|
160
|
-
campaignDetails: {
|
|
161
|
-
name: fbCampaignValue,
|
|
162
|
-
socialRemoteCampaignId,
|
|
163
|
-
socialObjective,
|
|
164
|
-
} = {},
|
|
165
|
-
orgSettings: {
|
|
166
|
-
accountSettings: {
|
|
167
|
-
socialAccountSettings: {
|
|
168
|
-
facebookAccountSettings: [{
|
|
169
|
-
accountName,
|
|
170
|
-
accountId,
|
|
171
|
-
}] = [{}],
|
|
172
|
-
} = {},
|
|
173
|
-
} = {},
|
|
174
|
-
} = {},
|
|
175
|
-
} = {},
|
|
159
|
+
cap,
|
|
176
160
|
messageDetails: {
|
|
177
161
|
name: fbAdSetValue,
|
|
178
162
|
targetAudience: {
|
|
@@ -199,6 +183,20 @@ const Facebook = (props) => {
|
|
|
199
183
|
showDisabledFBInfo,
|
|
200
184
|
orgUnitId,
|
|
201
185
|
} = props;
|
|
186
|
+
const {
|
|
187
|
+
campaignDetails: {
|
|
188
|
+
name: fbCampaignValue,
|
|
189
|
+
socialRemoteCampaignId,
|
|
190
|
+
socialObjective,
|
|
191
|
+
} = {},
|
|
192
|
+
orgSettings: {
|
|
193
|
+
accountSettings: {
|
|
194
|
+
socialAccountSettings: {
|
|
195
|
+
facebookAccountSettings: [{ accountName, accountId }] = [{}],
|
|
196
|
+
} = {},
|
|
197
|
+
} = {},
|
|
198
|
+
} = {},
|
|
199
|
+
} = cap || {};
|
|
202
200
|
const {
|
|
203
201
|
selectedMarketingObjective: fbMarketingObjectiveValue = VALUE_REACH,
|
|
204
202
|
} = templateData || {};
|
|
@@ -422,6 +420,7 @@ const Facebook = (props) => {
|
|
|
422
420
|
) :
|
|
423
421
|
<div style={{height: '1200px'}}>
|
|
424
422
|
<Advertisement
|
|
423
|
+
cap={cap}
|
|
425
424
|
isFullMode={isFullMode}
|
|
426
425
|
actions={facebookActions}
|
|
427
426
|
fbADData={fbADData}
|