@capillarytech/creatives-library 8.0.21 → 8.0.23
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/v2Components/FormBuilder/index.js +1 -1
- package/v2Containers/CreativesContainer/SlideBoxContent.js +3 -0
- package/v2Containers/CreativesContainer/index.js +2 -0
- package/v2Containers/CreativesContainer/tests/__snapshots__/index.test.js.snap +5 -0
- package/v2Containers/Zalo/index.js +2 -1
package/package.json
CHANGED
|
@@ -134,7 +134,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
|
|
|
134
134
|
this.handleSetRadioValue = this.handleSetRadioValue.bind(this);
|
|
135
135
|
this.formElements = [];
|
|
136
136
|
// Check if the liquid flow feature is supported and the channel is in the supported list.
|
|
137
|
-
this.liquidFlow =
|
|
137
|
+
this.liquidFlow = LIQUID_SUPPORTED_CHANNELS.includes(props?.schema?.channel?.toUpperCase()) && hasLiquidSupportFeature();
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
componentWillMount() {
|
|
@@ -155,6 +155,7 @@ export function SlideBoxContent(props) {
|
|
|
155
155
|
moduleType,
|
|
156
156
|
showLiquidErrorInFooter,
|
|
157
157
|
creativesMode,
|
|
158
|
+
hostName = '',
|
|
158
159
|
} = props;
|
|
159
160
|
const type = (messageDetails.type || '').toLowerCase(); // type is context in get tags values : outbound | dvs | referral | loyalty | coupons
|
|
160
161
|
const query = { type: !isFullMode && 'embedded', module: isFullMode ? 'default' : 'library', isEditFromCampaigns: (templateData || {}).isEditFromCampaigns};
|
|
@@ -543,6 +544,7 @@ export function SlideBoxContent(props) {
|
|
|
543
544
|
query,
|
|
544
545
|
search: '',
|
|
545
546
|
}}
|
|
547
|
+
hostName={hostName}
|
|
546
548
|
/>
|
|
547
549
|
}
|
|
548
550
|
{
|
|
@@ -924,5 +926,6 @@ SlideBoxContent.propTypes = {
|
|
|
924
926
|
moduleType: PropTypes.string,
|
|
925
927
|
showLiquidErrorInFooter: PropTypes.bool,
|
|
926
928
|
creativesMode: PropTypes.string,
|
|
929
|
+
hostName: PropTypes.string,
|
|
927
930
|
};
|
|
928
931
|
export default SlideBoxContent;
|
|
@@ -1319,6 +1319,7 @@ export class Creatives extends React.Component {
|
|
|
1319
1319
|
moduleType={this.props.messageDetails?.type}
|
|
1320
1320
|
showLiquidErrorInFooter={this.showLiquidErrorInFooter}
|
|
1321
1321
|
creativesMode={creativesMode} // An existing prop that we're using here. Required to ensure correct account details in Edit or Preview in case of Embedded mode.
|
|
1322
|
+
hostName={this.props?.hostName || ''}
|
|
1322
1323
|
/>
|
|
1323
1324
|
}
|
|
1324
1325
|
footer={this.shouldShowFooter() &&
|
|
@@ -1377,6 +1378,7 @@ Creatives.propTypes = {
|
|
|
1377
1378
|
selectedAccount: PropTypes.object,
|
|
1378
1379
|
strategy: PropTypes.string,
|
|
1379
1380
|
orgUnitId: PropTypes.number,
|
|
1381
|
+
hostName: PropTypes.string,
|
|
1380
1382
|
};
|
|
1381
1383
|
const mapStatesToProps = () => createStructuredSelector({
|
|
1382
1384
|
isLoading: isLoadingSelector(),
|
|
@@ -14,6 +14,7 @@ exports[`Test SlideBoxContent container campaign message, add creative click rcs
|
|
|
14
14
|
currentChannel="RCS"
|
|
15
15
|
getFormData={[Function]}
|
|
16
16
|
handleClose={[Function]}
|
|
17
|
+
hostName=""
|
|
17
18
|
onCallTaskSubmit={[Function]}
|
|
18
19
|
onChannelChange={[Function]}
|
|
19
20
|
onCreateComplete={[MockFunction]}
|
|
@@ -90,6 +91,7 @@ exports[`Test SlideBoxContent container campaign message, add creative click wha
|
|
|
90
91
|
currentChannel="WHATSAPP"
|
|
91
92
|
getFormData={[Function]}
|
|
92
93
|
handleClose={[Function]}
|
|
94
|
+
hostName=""
|
|
93
95
|
onCallTaskSubmit={[Function]}
|
|
94
96
|
onChannelChange={[Function]}
|
|
95
97
|
onCreateComplete={[MockFunction]}
|
|
@@ -166,6 +168,7 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit all data
|
|
|
166
168
|
currentChannel="WHATSAPP"
|
|
167
169
|
getFormData={[Function]}
|
|
168
170
|
handleClose={[Function]}
|
|
171
|
+
hostName=""
|
|
169
172
|
onCallTaskSubmit={[Function]}
|
|
170
173
|
onChannelChange={[Function]}
|
|
171
174
|
onCreateComplete={[MockFunction]}
|
|
@@ -246,6 +249,7 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit min data
|
|
|
246
249
|
currentChannel="WHATSAPP"
|
|
247
250
|
getFormData={[Function]}
|
|
248
251
|
handleClose={[Function]}
|
|
252
|
+
hostName=""
|
|
249
253
|
onCallTaskSubmit={[Function]}
|
|
250
254
|
onChannelChange={[Function]}
|
|
251
255
|
onCreateComplete={[MockFunction]}
|
|
@@ -326,6 +330,7 @@ exports[`Test SlideBoxContent container it should clear the url, on channel chan
|
|
|
326
330
|
currentChannel="WHATSAPP"
|
|
327
331
|
getFormData={[Function]}
|
|
328
332
|
handleClose={[Function]}
|
|
333
|
+
hostName=""
|
|
329
334
|
onCallTaskSubmit={[Function]}
|
|
330
335
|
onChannelChange={[Function]}
|
|
331
336
|
onCreateComplete={[MockFunction]}
|
|
@@ -69,8 +69,9 @@ export const Zalo = (props) => {
|
|
|
69
69
|
injectedTags,
|
|
70
70
|
getFormData,
|
|
71
71
|
selectedOfferDetails,
|
|
72
|
+
hostName: zaloHostName = '',
|
|
72
73
|
} = props || {};
|
|
73
|
-
const {hostName = ''} = senderDetails;
|
|
74
|
+
const {hostName = zaloHostName || ''} = senderDetails;
|
|
74
75
|
const { formatMessage } = intl;
|
|
75
76
|
const [oa_id, setOaId] = useState('');
|
|
76
77
|
const [token, setToken] = useState('');
|