@capillarytech/creatives-library 9.0.16 → 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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "9.0.16",
4
+ "version": "9.0.17",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -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>
@@ -462,7 +462,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
462
462
  }
463
463
  }
464
464
 
465
- 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') {
466
466
  this.setState({editDataSet: true}, () => {
467
467
  this.setEditData(nextProps.Email.templateDetails);
468
468
  // Update template name in parent if available
@@ -473,7 +473,7 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
473
473
  }
474
474
  });
475
475
  }
476
- if (this.state.isEdit && nextProps.location.query.module === "library" && !_.isEmpty(nextProps.templateData) && (!this.props.params.id || nextProps.location.query.type === "embedded") && !nextProps.isGetFormData && _.isEmpty(_.get(this, `state.formData['template-subject']`))) {
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']`))) {
477
477
  this.startTemplateCreation(nextProps.templateData);
478
478
  }
479
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
  );