@capillarytech/creatives-library 9.0.15 → 9.0.17
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
|
@@ -345,7 +345,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
345
345
|
|
|
346
346
|
render() {
|
|
347
347
|
const {
|
|
348
|
-
hidePopover = false, intl = {}, moduleFilterEnabled, label, modalProps, channel, fetchingSchemaError = false,
|
|
348
|
+
hidePopover = false, intl = {}, moduleFilterEnabled, label, modalProps, channel, fetchingSchemaError = false, getPopupContainer,
|
|
349
349
|
} = this.props;
|
|
350
350
|
const {formatMessage} = intl;
|
|
351
351
|
const {
|
|
@@ -436,6 +436,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
|
|
|
436
436
|
content={contentSection}
|
|
437
437
|
trigger="click"
|
|
438
438
|
placement={this.props.popoverPlacement || (channel === EMAIL.toUpperCase() ? "leftTop" : "rightTop")}
|
|
439
|
+
getPopupContainer={getPopupContainer}
|
|
439
440
|
classNames={{
|
|
440
441
|
container: 'tag-list-popover-container'
|
|
441
442
|
}}
|
|
@@ -67,6 +67,7 @@ const CodeEditorPaneComponent = ({
|
|
|
67
67
|
onTagContextChange,
|
|
68
68
|
// Validation props
|
|
69
69
|
onErrorClick,
|
|
70
|
+
isFullscreenMode = false,
|
|
70
71
|
}) => {
|
|
71
72
|
const context = useEditorContext();
|
|
72
73
|
const {
|
|
@@ -292,6 +293,16 @@ const CodeEditorPaneComponent = ({
|
|
|
292
293
|
eventContextTags={eventContextTags}
|
|
293
294
|
waitEventContextTags={waitEventContextTags}
|
|
294
295
|
popoverPlacement="rightTop"
|
|
296
|
+
// In fullscreen the editor lives inside a high z-index CapModal;
|
|
297
|
+
// mount the label popover inside that modal so it isn't rendered
|
|
298
|
+
// behind it (body-mounted popovers sit below the modal's z-index).
|
|
299
|
+
getPopupContainer={
|
|
300
|
+
isFullscreenMode
|
|
301
|
+
? triggerNode =>
|
|
302
|
+
triggerNode.closest('.ant-modal-content') ||
|
|
303
|
+
document.body
|
|
304
|
+
: undefined
|
|
305
|
+
}
|
|
295
306
|
/>
|
|
296
307
|
</CapRow>
|
|
297
308
|
</div>
|
|
@@ -194,7 +194,10 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
194
194
|
// const formData = _.cloneDeep(this.state.formData);
|
|
195
195
|
if (this.props.params.id || (this.props.location.query.module === "library" && this.props.templateData && !_.isEmpty(this.props.templateData))) {
|
|
196
196
|
this.setState({isEdit: true}, () => {
|
|
197
|
-
|
|
197
|
+
// Embedded campaign content is authoritative via the inline templateData
|
|
198
|
+
// prop; fetching by id would pull reusable-template data and drop the
|
|
199
|
+
// inline BEE json_content. Only fetch for real reusable-template edits.
|
|
200
|
+
if (this.props.params.id && this.props.location.query.type !== 'embedded') {
|
|
198
201
|
this.props.actions.getTemplateDetails(this.props.params.id, 'email');
|
|
199
202
|
}
|
|
200
203
|
});
|
|
@@ -459,7 +462,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
459
462
|
}
|
|
460
463
|
}
|
|
461
464
|
|
|
462
|
-
if (this.state.isEdit && !this.state.editDataSet && !_.isEmpty(nextProps.Email.templateDetails) && !_.isEmpty(this.state.schema)) {
|
|
465
|
+
if (this.state.isEdit && !this.state.editDataSet && !_.isEmpty(nextProps.Email.templateDetails) && !_.isEmpty(this.state.schema) && nextProps.location.query.type !== 'embedded') {
|
|
463
466
|
this.setState({editDataSet: true}, () => {
|
|
464
467
|
this.setEditData(nextProps.Email.templateDetails);
|
|
465
468
|
// Update template name in parent if available
|
|
@@ -470,7 +473,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
|
|
|
470
473
|
}
|
|
471
474
|
});
|
|
472
475
|
}
|
|
473
|
-
if (this.state.isEdit && nextProps.location.query.module === "library" && !_.isEmpty(nextProps.templateData) && !
|
|
476
|
+
if (this.state.isEdit && nextProps.location.query.module === "library" && !_.isEmpty(nextProps.templateData) && (!nextProps.params.id || nextProps.location.query.type === "embedded") && !nextProps.isGetFormData && _.isEmpty(_.get(this, `state.formData['template-subject']`))) {
|
|
474
477
|
this.startTemplateCreation(nextProps.templateData);
|
|
475
478
|
}
|
|
476
479
|
if (nextProps.location.query.module === 'library' && nextProps.isGetFormData && (this.props.isGetFormData !== nextProps.isGetFormData)) {
|
|
@@ -477,6 +477,7 @@ export class TagList extends React.Component { // eslint-disable-line react/pref
|
|
|
477
477
|
disableTooltipMsg={tooltipMsg}
|
|
478
478
|
fetchingSchemaError={this?.state?.tagsError}
|
|
479
479
|
popoverPlacement={this.props.popoverPlacement}
|
|
480
|
+
getPopupContainer={this.props.getPopupContainer}
|
|
480
481
|
/>
|
|
481
482
|
</div>
|
|
482
483
|
);
|