@capillarytech/creatives-library 7.14.4 → 7.14.6

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": "7.14.4",
4
+ "version": "7.14.6",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -147,7 +147,8 @@ export function SlideBoxContent(props) {
147
147
  orgUnitId,
148
148
  smsRegister,
149
149
  enableNewChannels,
150
- hideTestAndPreviewBtn
150
+ hideTestAndPreviewBtn,
151
+ getCmsTemplatesInProgress = false,
151
152
  } = props;
152
153
  const type = (messageDetails.type || '').toLowerCase(); // type is context in get tags values : outbound | dvs | referral | loyalty | coupons
153
154
  const query = { type: !isFullMode && 'embedded', module: isFullMode ? 'default' : 'library', isEditFromCampaigns: (templateData || {}).isEditFromCampaigns};
@@ -555,6 +556,7 @@ export function SlideBoxContent(props) {
555
556
  selectedOfferDetails={selectedOfferDetails}
556
557
  onPreviewContentClicked={onPreviewContentClicked}
557
558
  onTestContentClicked={onTestContentClicked}
559
+ getCmsTemplatesInProgress={getCmsTemplatesInProgress}
558
560
  />
559
561
  )}
560
562
  {(isEditEmailWithId || isEmailEditWithContent) && (
@@ -830,5 +832,6 @@ SlideBoxContent.propTypes = {
830
832
  showDisabledFBInfo: PropTypes.boolean,
831
833
  orgUnitId: PropTypes.any,
832
834
  smsRegister: PropTypes.any,
835
+ getCmsTemplatesInProgress: PropTypes.bool,
833
836
  };
834
837
  export default SlideBoxContent;
@@ -249,6 +249,7 @@ export class Creatives extends React.Component {
249
249
  },
250
250
  },
251
251
  definition: {accountId: templateData.accountId, mode: mode.toLowerCase()},
252
+ _id: templateData.templateId,
252
253
  };
253
254
  break;
254
255
  }
@@ -1115,6 +1116,7 @@ export class Creatives extends React.Component {
1115
1116
  orgUnitId={this.props.orgUnitId}
1116
1117
  enableNewChannels={enableNewChannels}
1117
1118
  hideTestAndPreviewBtn={this.props.hideTestAndPreviewBtn}
1119
+ getCmsTemplatesInProgress={this.props.Templates?.getCmsTemplatesInProgress}
1118
1120
  />
1119
1121
  }
1120
1122
  footer={this.shouldShowFooter() &&
@@ -120,7 +120,7 @@ describe('Test SlideBoxContent container', () => {
120
120
  const componentInstance = renderedComponent.instance()
121
121
  expect(componentInstance.state.templateData).toBeDefined();
122
122
  expect(componentInstance.onChannelChange("MOBILEPUSH"));
123
- expect(componentInstance.state.templateData).not.toBeDefined();
123
+ expect(componentInstance.state.templateData).toBeNull();
124
124
  });
125
125
 
126
126
  it('campaign message, add creative click rcs', () => {
@@ -79,11 +79,11 @@ export class EmailWrapper extends React.Component { // eslint-disable-line react
79
79
  componentDidUpdate() {
80
80
  const { modeContent } = this.state;
81
81
  // const isValid = this.isValid();
82
- const { emailCreateMode, EmailLayout, CmsTemplates, step, SelectedEdmDefaultTemplate, templatesActions } = this.props;
82
+ const { emailCreateMode, EmailLayout, CmsTemplates, step, SelectedEdmDefaultTemplate, templatesActions, getCmsTemplatesInProgress = false } = this.props;
83
83
  if (step === "modeSelection" && !this.state.selectedCreateMode && emailCreateMode === 'upload' && !EmailLayout) {
84
84
  //document.getElementById('upload-email-template').click();
85
85
  } else if (step === "templateSelection" && !this.state.selectedCreateMode) {
86
- if (emailCreateMode === "editor" && !CmsTemplates) {
86
+ if (emailCreateMode === "editor" && !CmsTemplates && !getCmsTemplatesInProgress) {
87
87
  templatesActions.getDefaultBeeTemplates();
88
88
  }
89
89
  } else if (step === "createTemplateContent" && !this.state.selectedCreateMode) {
@@ -314,6 +314,7 @@ EmailWrapper.propTypes = {
314
314
  onValidationFail: PropTypes.func,
315
315
  forwardedTags: PropTypes.object,
316
316
  selectedOfferDetails: PropTypes.array,
317
+ getCmsTemplatesInProgress: PropTypes.bool,
317
318
  };
318
319
 
319
320
  const mapStateToProps = createStructuredSelector({