@capillarytech/creatives-library 7.17.33-alpha.9 → 7.17.34
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
CHANGED
package/utils/common.js
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
REGISTRATION_CUSTOM_FIELD,
|
|
14
14
|
JP_LOCALE_HIDE_FEATURE,
|
|
15
15
|
ENABLE_CUSTOMER_BARCODE_TAG,
|
|
16
|
+
CUSTOMER_BARCODE_TAG,
|
|
16
17
|
} from '../containers/App/constants';
|
|
17
18
|
import { apiMessageFormatHandler } from './commonUtils';
|
|
18
19
|
|
|
@@ -95,6 +96,10 @@ export function getTreeStructuredTags({tagsList, userLocale = 'en', offerDetails
|
|
|
95
96
|
//filtering HOSPITALITY_RELATED_TAGS if org does not have HOSPITALITY_BASED_SCOPE feature enabled
|
|
96
97
|
clonedTags = filterTags(HOSPITALITY_RELATED_TAGS, tagsList);
|
|
97
98
|
}
|
|
99
|
+
if (!hasCustomerBarcodeFeatureEnabled()) {
|
|
100
|
+
//filtering CUSTOMER_BARCODE_TAG if org does not have CUSTOMER_BARCODE_TAG feature enabled
|
|
101
|
+
clonedTags = _.omit(clonedTags, CUSTOMER_BARCODE_TAG);
|
|
102
|
+
}
|
|
98
103
|
_.forEach(clonedTags, (temp) => {
|
|
99
104
|
const tag = temp.definition;
|
|
100
105
|
if (!tag['tag-header']) { //if tag doesn't have subtag(s), which means this tag itself is tag and not a tag header.
|
|
@@ -17,7 +17,7 @@ import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
|
|
|
17
17
|
import { createStructuredSelector } from 'reselect';
|
|
18
18
|
import messages from './messages';
|
|
19
19
|
import { makeSelectLoyaltyPromotionDisplay } from '../../v2Containers/Cap/selectors';
|
|
20
|
-
import { CARD_RELATED_TAGS, HOSPITALITY_RELATED_TAGS,
|
|
20
|
+
import { CARD_RELATED_TAGS, HOSPITALITY_RELATED_TAGS, CUSTOMER_BARCODE_TAG } from '../../containers/App/constants';
|
|
21
21
|
import { hasCardBasedScope, hasCustomerBarcodeFeatureEnabled, hasHospitalityBasedScope } from '../../utils/common';
|
|
22
22
|
|
|
23
23
|
import {
|
|
@@ -209,14 +209,14 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
209
209
|
hidingDateTagsForJpLocale(hideDateTagsForJpLocale, val, list, tagValue);
|
|
210
210
|
} else if (searchString === '' || !searchString || ((val.name || '').toLowerCase().indexOf(searchString.toLowerCase()) !== -1)) {
|
|
211
211
|
let childDisabled = true;
|
|
212
|
-
if (key ===
|
|
212
|
+
if (key === CUSTOMER_BARCODE_TAG && !hasCustomerBarcodeFeatureEnabled()) {
|
|
213
213
|
childDisabled = true;
|
|
214
214
|
} else {
|
|
215
215
|
childDisabled = disableRelatedTags ? childTagsToDisable.includes(key) : false;
|
|
216
216
|
}
|
|
217
217
|
const tempNode = (
|
|
218
218
|
<CapTreeNode
|
|
219
|
-
title={childDisabled ? <CapTooltip title={key ===
|
|
219
|
+
title={childDisabled ? <CapTooltip title={key === CUSTOMER_BARCODE_TAG ? customerBarcodeDisableText : loyaltyAttrDisableText}>{val.desc || val.name}</CapTooltip> : (val.desc || val.name)}
|
|
220
220
|
tag={val}
|
|
221
221
|
isLeaf
|
|
222
222
|
key={val.couponSeriesId ? `${key}(${val.couponSeriesId})` : `${key}`}
|
|
@@ -54,6 +54,7 @@ import { convert } from 'html-to-text';
|
|
|
54
54
|
import { AI_SUGGESTION_API_URL } from './constants';
|
|
55
55
|
import { GET_TRANSLATION_MAPPED } from '../../containers/TagList/constants';
|
|
56
56
|
import moment from 'moment';
|
|
57
|
+
import { CUSTOMER_BARCODE_TAG } from '../../containers/App/constants';
|
|
57
58
|
const TabPane = Tabs.TabPane;
|
|
58
59
|
const {Column} = Table;
|
|
59
60
|
const {TextArea} = CapInput;
|
|
@@ -1150,7 +1151,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
1150
1151
|
if (tag.definition.value === tagValue) {
|
|
1151
1152
|
ifSupported = true;
|
|
1152
1153
|
}
|
|
1153
|
-
if(tagValue ===
|
|
1154
|
+
if(tagValue === CUSTOMER_BARCODE_TAG && (matchImg === null || matchCustomerBarcode !== null)){
|
|
1154
1155
|
ifSupported = false;
|
|
1155
1156
|
}
|
|
1156
1157
|
});
|
|
@@ -36,6 +36,7 @@ import { FONT_COLOR_05 } from '@capillarytech/cap-ui-library/styled/variables';
|
|
|
36
36
|
import { gtmPush } from '../../utils/gtmTrackers';
|
|
37
37
|
const {CapCustomCardList} = CapCustomCard;
|
|
38
38
|
import {transformEmailTemplates, storeS3FileSizeDetails, CREATIVES_S3_ASSET_FILESIZES} from '../../utils/cdnTransformation';
|
|
39
|
+
import { CUSTOMER_BARCODE_TAG } from '../../containers/App/constants';
|
|
39
40
|
|
|
40
41
|
export class Email extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
41
42
|
constructor(props) {
|
|
@@ -643,7 +644,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
643
644
|
} else if (data === "unsubscribe" && this.state.editorInstanse) {
|
|
644
645
|
const anchor = `<a href='{{${data}}}'>${data}</a>`;
|
|
645
646
|
this.state.editorInstanse.insertHtml(`${anchor}`);
|
|
646
|
-
} else if (data ===
|
|
647
|
+
} else if (data === CUSTOMER_BARCODE_TAG && this.state.editorInstanse) {
|
|
647
648
|
this.state.editorInstanse.insertHtml(`<img src="https://crm-nightly-new-fileservice.s3.amazonaws.com/intouch_creative_assets/8ebc8301-e262-45a6-bdab-ff0de91a.png?code={{${data}}}" />`);
|
|
648
649
|
} else if (this.state.editorInstanse){
|
|
649
650
|
this.state.editorInstanse.insertHtml(`{{${data}}}`);
|