@capillarytech/creatives-library 8.0.140 → 8.0.141

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/initialReducer.js CHANGED
@@ -15,7 +15,6 @@ import galleryReducer from './v2Containers/Assets/Gallery/reducer';
15
15
  import CapCollapsibleLeftNavigationReducer from '@capillarytech/cap-ui-library/CapCollapsibleLeftNavigation/reducer';
16
16
  import { AIRA_REDUCER_DOMAIN, askAiraReducer } from '@capillarytech/cap-ui-library/CapAskAira';
17
17
  import previewAndTestReducer from './v2Components/TestAndPreviewSlidebox/reducer';
18
- import inAppReducer from './v2Containers/InApp/reducer';
19
18
 
20
19
  export const initialReducer = {
21
20
  language: languageProviderReducer,
@@ -34,5 +33,4 @@ export const initialReducer = {
34
33
  gallery: galleryReducer,
35
34
  navigationConfig: CapCollapsibleLeftNavigationReducer,
36
35
  previewAndTest: previewAndTestReducer,
37
- inapp: inAppReducer,
38
36
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.140",
4
+ "version": "8.0.141",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -55,4 +55,4 @@
55
55
  "webpack-bugsnag-plugins": "^1.4.3",
56
56
  "whatwg-fetch": "3.0.0"
57
57
  }
58
- }
58
+ }
package/services/api.js CHANGED
@@ -684,9 +684,4 @@ export const updateTestMessageMeta = (payload) => {
684
684
  return request(url, getAPICallObject('POST', payload?.data, false, true));
685
685
  };
686
686
 
687
- export const getBeePopupBuilderToken = () => {
688
- const url = `${API_ENDPOINT}/common/getInappTokenData`;
689
- return request(url, getAPICallObject('GET'));
690
- };
691
-
692
687
  export {request, getAPICallObject};
@@ -3575,7 +3575,6 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
3575
3575
  }
3576
3576
  }
3577
3577
  const { currentTab, formData } = this.state;
3578
- console.log('3363 currentTab', currentTab, formData);
3579
3578
  const supportedLanguages = (formData[currentTab - 1] || {}).selectedLanguages || {};
3580
3579
  const currentLang = supportedLanguages[langTab - 1];
3581
3580
 
@@ -45,14 +45,6 @@ class MobilePushPreviewV2 extends React.Component { // eslint-disable-line react
45
45
  if (channel === INAPP.toUpperCase()) {
46
46
  const androidContent = get(templateData, 'versions.base.content.ANDROID') || get(templateData, 'androidContent');
47
47
  const iosContent = get(templateData, 'versions.base.content.IOS') || get(templateData, 'iosContent');
48
- const isBeeFreeTemplate = get(androidContent, 'isBEEeditor') || get(iosContent, 'isBEEeditor');
49
- if (isBeeFreeTemplate) {
50
- content = {
51
- inAppPreviewContent: device === ANDROID.toLowerCase() ? androidContent?.beeHtml : iosContent?.beeHtml,
52
- isBeeFreeTemplate: true,
53
- };
54
- return content;
55
- }
56
48
  const androidPreviewContent = {
57
49
  templateTitle: androidContent?.title,
58
50
  templateMsg: androidContent?.message,
@@ -236,7 +236,7 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
236
236
  } = this.props;
237
237
  let content = channel && channel.toLowerCase() === 'sms' ? [this.props.content] : this.props.content;
238
238
  const { formatMessage } = intl;
239
- const { rcsPreviewContent, inAppPreviewContent, viberPreviewContent, isBeeFreeTemplate } = content || {};
239
+ const { rcsPreviewContent, inAppPreviewContent, viberPreviewContent } = content || {};
240
240
  const { rcsImageSrc, rcsTitle, rcsDesc, buttonText: rcsButtonText } = rcsPreviewContent || {};
241
241
  const {
242
242
  videoParams,
@@ -1326,31 +1326,6 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
1326
1326
  </div>
1327
1327
  )}
1328
1328
  {channel?.toUpperCase() === INAPP && (
1329
- isBeeFreeTemplate ? (
1330
- <div className="shell-v2 align-center">
1331
- <div style={{ position: 'relative', display: 'inline-block', width: '100%', height: '100%' }}>
1332
- <CapImage
1333
- className="preview-image"
1334
- src={this.props.device === ANDROID ? inAppMobileAndroidFull : inAppMobileIOSFull}
1335
- alt={formatMessage(messages.previewGenerated)}
1336
- />
1337
- <iframe
1338
- srcDoc={inAppPreviewContent?.value}
1339
- title="Inapp Preview"
1340
- style={{
1341
- position: 'absolute',
1342
- top: '3rem',
1343
- left: '5rem',
1344
- width: '60%',
1345
- height: '100%',
1346
- zIndex: 1,
1347
- pointerEvents: 'none'
1348
- }}
1349
- frameBorder="0"
1350
- />
1351
- </div>
1352
- </div>
1353
- ) : (
1354
1329
  <div className="shell-v2 align-center">
1355
1330
  <CapImage
1356
1331
  className="preview-image"
@@ -1427,9 +1402,8 @@ export class TemplatePreview extends React.Component { // eslint-disable-line re
1427
1402
  )}
1428
1403
  </div>
1429
1404
  </div>
1430
- </div>
1431
1405
  </div>
1432
- )
1406
+ </div>
1433
1407
  )}
1434
1408
  </CapRow>
1435
1409
  </CapColumn>
@@ -56,7 +56,6 @@ function BeeEditor(props) {
56
56
  currentOrgDetails,
57
57
  eventContextTags,
58
58
  } = props;
59
- console.log('BEE editor props', props);
60
59
  const { saveRowRequest } = BEESelect;
61
60
  const {formatMessage} = intl;
62
61
  const UNSUBSCRIBE = 'unsubscribe';
@@ -27,7 +27,6 @@ import Rcs from '../Rcs';
27
27
  import { getWhatsappContent } from '../Whatsapp/utils';
28
28
  import * as commonUtil from '../../utils/common';
29
29
  import Zalo from '../Zalo';
30
- import InappWrapper from '../InappWrapper';
31
30
  import MobilePushNew from '../MobilePushNew';
32
31
  const CreativesWrapper = styled.div`
33
32
  .ant-popover,
@@ -116,8 +115,6 @@ export function SlideBoxContent(props) {
116
115
  emailCreateMode,
117
116
  onMobilepushModeChange,
118
117
  mobilePushCreateMode,
119
- inAppCreateMode,
120
- onInAppModeChange,
121
118
  templateStep,
122
119
  onEnterTemplateName,
123
120
  onRemoveTemplateName,
@@ -938,32 +935,25 @@ export function SlideBoxContent(props) {
938
935
  />
939
936
  )}
940
937
 
941
- {isCreateInApp && (<InappWrapper
942
- key="creatives-email-wrapper"
943
- date={new Date().getMilliseconds()}
938
+ {isCreateInApp && (<InApp
944
939
  isFullMode={isFullMode}
945
940
  onCreateComplete={onCreateComplete}
946
941
  handleClose={handleClose}
942
+ location={{
943
+ pathname: `/inapp/create`,
944
+ query,
945
+ search: '',
946
+ }}
947
947
  getFormData={getFormData}
948
948
  isGetFormData={isGetFormData}
949
949
  templateData={templateData}
950
950
  getDefaultTags={type}
951
- step={templateStep}
952
- onResetStep={onResetStep}
953
- onInAppModeChange={onInAppModeChange}
954
- onEnterTemplateName={onEnterTemplateName}
955
- onRemoveTemplateName={onRemoveTemplateName}
956
- inAppCreateMode={inAppCreateMode}
957
- forwardedTags={forwardedTags}
958
- type={type}
959
- query={query}
960
- selectedOfferDetails={selectedOfferDetails}
961
- onValidationFail={onValidationFail}
951
+ eventContextTags={eventContextTags}
952
+ showLiquidErrorInFooter={showLiquidErrorInFooter}
962
953
  />
963
954
  )}
964
955
 
965
956
  {isEditInApp && (<InApp
966
- isEditInApp={true}
967
957
  isFullMode={isFullMode}
968
958
  templateData={templateData}
969
959
  getFormData={getFormData}
@@ -981,14 +971,6 @@ export function SlideBoxContent(props) {
981
971
  search: '',
982
972
  }}
983
973
  showLiquidErrorInFooter={showLiquidErrorInFooter}
984
- setIsLoadingContent={setIsLoadingContent}
985
- onInAppModeChange={onInAppModeChange}
986
- inAppCreateMode={inAppCreateMode}
987
- isGetFormData={isGetFormData}
988
- showTemplateName={showTemplateName}
989
- onValidationFail={onValidationFail}
990
- type={type}
991
- query={query}
992
974
  />
993
975
  )}
994
976
 
@@ -1267,7 +1267,7 @@ export class Creatives extends React.Component {
1267
1267
  shouldShowFooter = () => {
1268
1268
  const { isFullMode } = this.props;
1269
1269
  const {
1270
- slidBoxContent, currentChannel, emailCreateMode, templateNameExists, templateStep, mobilePushCreateMode, weChatTemplateType, templateData, inAppCreateMode,
1270
+ slidBoxContent, currentChannel, emailCreateMode, templateNameExists, templateStep, mobilePushCreateMode, weChatTemplateType, templateData,
1271
1271
  } = this.state;
1272
1272
  const channel = currentChannel.toUpperCase();
1273
1273
  const currentStep = this.creativesTemplateSteps[templateStep];
@@ -1310,13 +1310,6 @@ export class Creatives extends React.Component {
1310
1310
  showFooter = true;
1311
1311
  }
1312
1312
 
1313
- if (channel === constants.INAPP &&
1314
- ((slidBoxContent === 'createTemplate' && !isEmpty(inAppCreateMode))
1315
- || (slidBoxContent === 'editTemplate' && currentStep === 'modeSelection')) &&
1316
- templateNameExists) {
1317
- showFooter = true;
1318
- }
1319
-
1320
1313
  if (showFooter) {
1321
1314
  if (slidBoxContent === "createTemplate" && ((channel === constants.EMAIL && currentStep === 'createTemplateContent') ||
1322
1315
  ([constants.SMS, constants.WECHAT].includes(channel) && currentStep === 'modeSelection'))) {
@@ -1437,7 +1430,7 @@ export class Creatives extends React.Component {
1437
1430
  } else if (currentChannel.toUpperCase() === constants.WECHAT) {
1438
1431
  isShowContinueFooter = !isEmpty(weChatTemplateType) && currentStep === "modeSelection";
1439
1432
  } else if (currentChannel.toUpperCase() === constants.INAPP) {
1440
- isShowContinueFooter = !isEmpty(inAppCreateMode) && currentStep === "modeSelection";
1433
+ isShowContinueFooter = !isEmpty(inAppCreateMode) && currentChannel === "modeSelection";
1441
1434
  }
1442
1435
 
1443
1436
  return isShowContinueFooter;
@@ -1474,7 +1467,6 @@ export class Creatives extends React.Component {
1474
1467
  templateStep,
1475
1468
  isLoadingContent,
1476
1469
  mobilePushCreateMode,
1477
- inAppCreateMode,
1478
1470
  isDiscardMessage,
1479
1471
  weChatTemplateType,
1480
1472
  weChatMaptemplateStep,
@@ -1577,8 +1569,6 @@ export class Creatives extends React.Component {
1577
1569
  setIsLoadingContent={this.setIsLoadingContent}
1578
1570
  onMobilepushModeChange={this.onMobilepushModeChange}
1579
1571
  mobilePushCreateMode={mobilePushCreateMode}
1580
- inAppCreateMode={inAppCreateMode}
1581
- onInAppModeChange={this.onInAppModeChange}
1582
1572
  showTemplateName={this.showTemplateName}
1583
1573
  onValidationFail={this.onValidationFail}
1584
1574
  channelsToHide={channelsToHide}
@@ -195,15 +195,9 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
195
195
  if (this.props.location.query.module === "library" && this.props.templateData) {
196
196
  this.props.templatesActions.resetTemplateData();
197
197
  }
198
- console.log('190 props location query', this.props.location.query.isBEESupport !== "false");
199
198
  const isBEESupport = (this.props.location.query.isBEESupport !== "false") || false;
200
199
  const isBEEAppEnable = this.checkBeeEditorAllowedForLibrary();
201
- console.log('props location query', this.props.location.query);
202
- console.log('this.props.templateData', this.props.templateData);
203
- console.log('isBEESupport isBEEAppEnable', {isBEESupport, isBEEAppEnable});
204
- console.log('196 params', this.props.params);
205
200
  if (!_.isEmpty(this.props.Templates.BEETemplate)) {
206
- console.log('this.props.Templates.BEETemplate', this.props.Templates.BEETemplate);
207
201
  if (this.props.Templates.BEETemplate.versions.base.is_drag_drop && isBEEAppEnable ) {
208
202
  this.setState({isDragDrop: true});
209
203
  }
@@ -238,7 +232,6 @@ export class Email extends React.Component { // eslint-disable-line react/prefer
238
232
 
239
233
  checkBeeEditorAllowedForLibrary = () => {
240
234
  const { isFullMode = false, editor } = this.props || {};
241
- console.log('231 isFullMode', isFullMode, editor);
242
235
  if ((editor === "BEE" && !isFullMode) || isFullMode) {
243
236
  return true;
244
237
  }
@@ -7,7 +7,6 @@ import {
7
7
  UPLOAD_INAPP_ASSET_REQUEST,
8
8
  CLEAR_INAPP_ASSET,
9
9
  INAPP_EDIT_TEMPLATE_REQUEST,
10
- GET_BEE_POPUP_BUILDER_TOKEN_REQUEST,
11
10
  } from "./constants";
12
11
 
13
12
  export function createInAppTemplate(payload, callback) {
@@ -63,9 +62,3 @@ export const clearInAppAsset = (templateType) => ({
63
62
  type: CLEAR_INAPP_ASSET,
64
63
  templateType,
65
64
  });
66
-
67
- export function getBeePopupBuilderToken() {
68
- return {
69
- type: GET_BEE_POPUP_BUILDER_TOKEN_REQUEST,
70
- };
71
- }
@@ -34,10 +34,6 @@ export const UPLOAD_INAPP_ASSET_SUCCESS = `${prefix}/UPLOAD_INAPP_ASSET_SUCCESS`
34
34
  export const UPLOAD_INAPP_ASSET_FAILURE = `${prefix}/UPLOAD_INAPP_ASSET_FAILURE`;
35
35
  export const CLEAR_INAPP_ASSET = `${prefix}/CLEAR_INAPP_ASSET`;
36
36
 
37
- export const GET_BEE_POPUP_BUILDER_TOKEN_REQUEST = `${prefix}/GET_BEE_POPUP_BUILDER_TOKEN_REQUEST`;
38
- export const GET_BEE_POPUP_BUILDER_TOKEN_SUCCESS = `${prefix}/GET_BEE_POPUP_BUILDER_TOKEN_SUCCESS`;
39
- export const GET_BEE_POPUP_BUILDER_TOKEN_FAILURE = `${prefix}/GET_BEE_POPUP_BUILDER_TOKEN_FAILURE`;
40
-
41
37
  export const INAPP_MEDIA_TYPES = {
42
38
  TEXT: "TEXT",
43
39
  IMAGE: "IMAGE",
@@ -163,4 +159,4 @@ export const INAPP_LAYOUT_DETAILS = {
163
159
  };
164
160
 
165
161
  export const DEVICE_SUPPORTED = '1';
166
- export const AI_CONTENT_BOT_DISABLED = "AI_CONTENT_BOT_DISABLED";
162
+ export const AI_CONTENT_BOT_DISABLED = "AI_CONTENT_BOT_DISABLED";
@@ -7,20 +7,21 @@ import { injectIntl, FormattedMessage } from "react-intl";
7
7
  import { DAEMON } from '@capillarytech/vulcan-react-sdk/utils/sagaInjectorTypes';
8
8
  import CapHeading from "@capillarytech/cap-ui-library/CapHeading";
9
9
  import CapSpin from "@capillarytech/cap-ui-library/CapSpin";
10
+ import CapInput from "@capillarytech/cap-ui-library/CapInput";
10
11
  import CapRadioGroup from "@capillarytech/cap-ui-library/CapRadioGroup";
11
12
  import CapRow from "@capillarytech/cap-ui-library/CapRow";
12
13
  import CapColumn from "@capillarytech/cap-ui-library/CapColumn";
13
14
  import CapButton from "@capillarytech/cap-ui-library/CapButton";
14
15
  import CapTab from "@capillarytech/cap-ui-library/CapTab";
15
16
  import CapNotification from "@capillarytech/cap-ui-library/CapNotification";
16
- import { makeSelectInApp, makeSelectAccount, makeSelectGetTemplateDetailsInProgress } from "./selectors";
17
+ import { makeSelectInApp, makeSelectAccount } from "./selectors";
17
18
  import * as globalActions from '../Cap/actions';
18
19
  import {
19
20
  isLoadingMetaEntities,
20
21
  makeSelectMetaEntities,
21
22
  setInjectedTags,
22
23
  selectCurrentOrgDetails,
23
- selectLiquidStateDetails,
24
+ selectLiquidStateDetails
24
25
  } from "../Cap/selectors";
25
26
  import * as inAppActions from "./actions";
26
27
  import './index.scss';
@@ -58,7 +59,6 @@ import { validateInAppContent } from "../../utils/commonUtils";
58
59
  import ErrorInfoNote from "../../v2Components/ErrorInfoNote";
59
60
  import { hasLiquidSupportFeature } from "../../utils/common";
60
61
  import formBuilderMessages from "../../v2Components/FormBuilder/messages";
61
- import InappAdvanced from "../InappAdvanced/index";
62
62
 
63
63
  let editContent = {};
64
64
 
@@ -82,18 +82,6 @@ export const InApp = (props) => {
82
82
  selectedOfferDetails,
83
83
  currentOrgDetails,
84
84
  fetchingLiquidValidation,
85
- templateName,
86
- setTemplateName,
87
- getTemplateDetailsInProgress,
88
- isEditInApp,
89
- setIsLoadingContent,
90
- query,
91
- inAppCreateMode,
92
- isGetFormData,
93
- showTemplateName,
94
- onValidationFail,
95
- type,
96
- forwardedTags,
97
85
  } = props || {};
98
86
 
99
87
  const { formatMessage } = intl;
@@ -102,7 +90,7 @@ export const InApp = (props) => {
102
90
  const [templateMediaType, setTemplateMediaType] = useState(
103
91
  INAPP_MEDIA_TYPES.TEXT
104
92
  );
105
-
93
+ const [templateName, setTemplateName] = useState("");
106
94
  const [templateLayoutType, setTemplateLayoutType] = useState(
107
95
  INAPP_MESSAGE_LAYOUT_TYPES.MODAL
108
96
  );
@@ -128,7 +116,6 @@ export const InApp = (props) => {
128
116
  const [tags, updateTags] = useState([]);
129
117
  //for edit only
130
118
  const [isEditFlow, setEditFlow] = useState(false);
131
- const [tempName, setTempName] = useState("");
132
119
  const [templateDate, setTemplateDate] = useState("");
133
120
 
134
121
  //buttons
@@ -204,8 +191,8 @@ export const InApp = (props) => {
204
191
  } = isFullMode ? editData?.templateDetails || {} : templateData || {};
205
192
  editContent = get(versions, `base.content`, {});
206
193
  if (editContent && !isEmpty(editContent)) {
207
- setTempName(name);
208
194
  setEditFlow(true);
195
+ setTemplateName(name);
209
196
  setTemplateDate(createdAt);
210
197
  setTemplateLayoutType(editContent?.ANDROID?.bodyType);
211
198
  const androidContent = editContent?.ANDROID;
@@ -357,6 +344,10 @@ export const InApp = (props) => {
357
344
  };
358
345
  // tag Code end
359
346
 
347
+ const onTemplateNameChange = ({ target: { value } }) => {
348
+ setTemplateName(value);
349
+ };
350
+
360
351
  const onTemplateLayoutTypeChange = ({ target: { value } }) => {
361
352
  setTemplateLayoutType(value);
362
353
  };
@@ -469,6 +460,22 @@ export const InApp = (props) => {
469
460
  },
470
461
  ];
471
462
 
463
+ const createModeContent = (
464
+ <CapRow>
465
+ {/* template name */}
466
+ <CapHeading type="h4">
467
+ <FormattedMessage {...messages.creativeName} />
468
+ </CapHeading>
469
+ <CapInput
470
+ id="inapp-template-name-input"
471
+ className="inapp-template-name-input"
472
+ onChange={onTemplateNameChange}
473
+ placeholder={formatMessage(globalMessages.templateNamePlaceholder)}
474
+ value={templateName}
475
+ size="default"
476
+ />
477
+ </CapRow>
478
+ );
472
479
  //create methods end
473
480
 
474
481
  //used by create and edit
@@ -519,6 +526,10 @@ export const InApp = (props) => {
519
526
  const isDisableDone = (device) => {
520
527
  const isIosDevice = device === IOS;
521
528
  const isAndroidDevice = device === ANDROID;
529
+ //if template name is not entered
530
+ if (isFullMode && templateName.trim() === '') {
531
+ return true;
532
+ }
522
533
  //if template message is not entered
523
534
  //for android
524
535
  if (isAndroidDevice && (templateMessageAndroid.trim() === '' || templateMessageErrorAndroid)) {
@@ -608,7 +619,7 @@ export const InApp = (props) => {
608
619
  sourceAccountIdentifier = "",
609
620
  id,
610
621
  } = accountObj;
611
-
622
+
612
623
  // Construct Android content if not disabled
613
624
  const androidContent = !isDisableDone(ANDROID) ? {
614
625
  ...commonDevicePayload,
@@ -628,7 +639,7 @@ export const InApp = (props) => {
628
639
  ctas: [{type: DEEP_LINK, actionLink: deepLinkValueAndroid}],
629
640
  }),
630
641
  } : {};
631
-
642
+
632
643
  // Construct iOS content if not disabled
633
644
  const iosContent = !isDisableDone(IOS) ? {
634
645
  ...commonDevicePayload,
@@ -648,9 +659,9 @@ export const InApp = (props) => {
648
659
  ctas: [{type: DEEP_LINK, actionLink: deepLinkValueIos}],
649
660
  }),
650
661
  } : {};
651
-
662
+
652
663
  const data = {
653
- name: isEditFlow ? tempName : templateName,
664
+ name: templateName,
654
665
  versions: {
655
666
  base: {
656
667
  content: {
@@ -673,7 +684,7 @@ export const InApp = (props) => {
673
684
  if (!errorMessage) {
674
685
  CapNotification.success({
675
686
  message: isEditFlow ? formatMessage(messages.inAppEditNotification, {
676
- name: tempName,
687
+ name: templateName,
677
688
  }) : formatMessage(messages.inAppCreateNotification, {
678
689
  name: templateName,
679
690
  }),
@@ -774,63 +785,30 @@ export const InApp = (props) => {
774
785
  };
775
786
 
776
787
  const isLiquidFlow = hasLiquidSupportFeature();
777
- const isBEEeditor = get(editData, 'templateDetails.versions.base.content.ANDROID.isBEEeditor', false);
778
- // Early returns to avoid nested ternary
779
- if (isEditInApp && getTemplateDetailsInProgress) {
780
- return <CapSpin spinning={getTemplateDetailsInProgress} />;
781
- }
782
-
783
- if (isEditInApp && isBEEeditor) {
784
- return (
785
- <InappAdvanced
786
- getFormData={getFormData}
787
- setIsLoadingContent={setIsLoadingContent}
788
- defaultData={{ "template-name": tempName }}
789
- location={{
790
- pathname: `/inapp/create`,
791
- query,
792
- search: '',
793
- }}
794
- params={{ mode: inAppCreateMode, id: params.id }}
795
- isFullMode={isFullMode}
796
- isGetFormData={isGetFormData}
797
- showTemplateName={showTemplateName}
798
- route={{ name: "inapp" }}
799
- getDefaultTags={type}
800
- onValidationFail={onValidationFail}
801
- templateData={templateData}
802
- templateName={tempName}
803
- setTemplateName={setTempName}
804
- forwardedTags={forwardedTags}
805
- selectedOfferDetails={selectedOfferDetails}
806
- onCreateComplete={onCreateComplete}
807
- />
808
- );
809
- }
810
-
811
788
  return (
812
789
  <CapSpin spinning={spin || fetchingLiquidValidation} tip={fetchingLiquidValidation ? <FormattedMessage {...formBuilderMessages.liquidSpinText} /> : ""}>
813
790
  <CapRow className="cap-inapp-creatives">
814
791
  <CapColumn span={14}>
792
+ {isFullMode && createModeContent}
815
793
  {/* Creative layout type*/}
816
794
  {(isFullMode || !isEditFlow) && (
817
- <>
818
- <CapRow className="inapp-creative-layout">
819
- <CapHeading type="h4">
820
- <FormattedMessage {...messages.creativeLayout} />
821
- </CapHeading>
822
- <CapHeading type="h6" className="inapp-creative-layout-desc">
823
- <FormattedMessage {...messages.creativeLayoutDesc} />
824
- </CapHeading>
825
- </CapRow>
826
- <CapRadioGroup
827
- id="inapp-layout-radio"
828
- options={LAYOUT_RADIO_OPTIONS}
829
- value={templateLayoutType}
830
- onChange={onTemplateLayoutTypeChange}
831
- className="inapp-layout-radio"
832
- />
833
- </>
795
+ <>
796
+ <CapRow className="inapp-creative-layout">
797
+ <CapHeading type="h4">
798
+ <FormattedMessage {...messages.creativeLayout} />
799
+ </CapHeading>
800
+ <CapHeading type="h6" className="inapp-creative-layout-desc">
801
+ <FormattedMessage {...messages.creativeLayoutDesc} />
802
+ </CapHeading>
803
+ </CapRow>
804
+ <CapRadioGroup
805
+ id="inapp-layout-radio"
806
+ options={LAYOUT_RADIO_OPTIONS}
807
+ value={templateLayoutType}
808
+ onChange={onTemplateLayoutTypeChange}
809
+ className="inapp-layout-radio"
810
+ />
811
+ </>
834
812
  )}
835
813
  {/* device tab */}
836
814
  <CapTab
@@ -890,8 +868,7 @@ const mapStateToProps = createStructuredSelector({
890
868
  loadingTags: isLoadingMetaEntities(),
891
869
  injectedTags: setInjectedTags(),
892
870
  currentOrgDetails: selectCurrentOrgDetails(),
893
- fetchingLiquidValidation: selectLiquidStateDetails(),
894
- getTemplateDetailsInProgress: makeSelectGetTemplateDetailsInProgress(),
871
+ fetchingLiquidValidation: selectLiquidStateDetails()
895
872
  });
896
873
 
897
874
  const mapDispatchToProps = (dispatch) => ({
@@ -15,19 +15,12 @@ import {
15
15
  INAPP_EDIT_TEMPLATE_REQUEST,
16
16
  INAPP_EDIT_TEMPLATE_SUCCESS,
17
17
  INAPP_EDIT_TEMPLATE_FAILURE,
18
- GET_BEE_POPUP_BUILDER_TOKEN_REQUEST,
19
- GET_BEE_POPUP_BUILDER_TOKEN_SUCCESS,
20
- GET_BEE_POPUP_BUILDER_TOKEN_FAILURE,
21
18
  } from './constants';
22
19
 
23
20
  const initialState = fromJS({
24
21
  uploadedAssetData: {},
25
22
  createTemplateInProgress: false,
26
23
  editTemplateInProgress: false,
27
- beePopupBuilderTokenFetching: false,
28
- beePopupBuilderToken: {},
29
- beePopupBuilderTokenError: false,
30
- beePopupBuilderTokenErrorMessage: '',
31
24
  });
32
25
 
33
26
  function inAppReducer(state = initialState, action) {
@@ -108,16 +101,6 @@ function inAppReducer(state = initialState, action) {
108
101
  ? `uploadedAssetData${action.templateType}`
109
102
  : 'uploadedAssetData',
110
103
  );
111
- case GET_BEE_POPUP_BUILDER_TOKEN_REQUEST:
112
- return state.set('beePopupBuilderTokenFetching', true);
113
- case GET_BEE_POPUP_BUILDER_TOKEN_SUCCESS:
114
- return state
115
- .set('beePopupBuilderTokenFetching', false)
116
- .set('beePopupBuilderToken', action.data);
117
- case GET_BEE_POPUP_BUILDER_TOKEN_FAILURE:
118
- return state
119
- .set('beePopupBuilderTokenFetching', false)
120
- .set('beePopupBuilderTokenError', fromJS(action.errorMsg));
121
104
  default:
122
105
  return state;
123
106
  }
@@ -15,9 +15,6 @@ import {
15
15
  GET_INAPP_TEMPLATE_DETAILS_SUCCESS,
16
16
  GET_INAPP_TEMPLATE_DETAILS_FAILURE,
17
17
  GET_INAPP_TEMPLATE_DETAILS_REQUEST,
18
- GET_BEE_POPUP_BUILDER_TOKEN_REQUEST,
19
- GET_BEE_POPUP_BUILDER_TOKEN_SUCCESS,
20
- GET_BEE_POPUP_BUILDER_TOKEN_FAILURE,
21
18
  } from './constants';
22
19
  import { INAPP } from '../CreativesContainer/constants';
23
20
 
@@ -139,34 +136,11 @@ export function* watchGetTemplateDetails() {
139
136
 
140
137
  }
141
138
 
142
- export function* getBeePopupBuilderToken() {
143
- try {
144
- const result = yield call(Api.getBeePopupBuilderToken);
145
- if (result.success) {
146
- yield put({
147
- type: GET_BEE_POPUP_BUILDER_TOKEN_SUCCESS,
148
- data: result.response,
149
- });
150
- } else {
151
- yield put({ type: GET_BEE_POPUP_BUILDER_TOKEN_FAILURE, error: result.message });
152
- }
153
- } catch (error) {
154
- yield put({ type: GET_BEE_POPUP_BUILDER_TOKEN_FAILURE, error });
155
- }
156
- }
157
- export function* watchGetBeePopupBuilderToken() {
158
- yield takeLatest(
159
- GET_BEE_POPUP_BUILDER_TOKEN_REQUEST,
160
- getBeePopupBuilderToken,
161
- );
162
- }
163
-
164
139
  export default [
165
140
  watchCreateTemplate,
166
141
  watchGetTemplateDetails,
167
142
  watchUploadInAppAsset,
168
143
  watchEditTemplate,
169
- watchGetBeePopupBuilderToken,
170
144
  ];
171
145
 
172
146
  export function* v2InAppSagas() {
@@ -175,6 +149,5 @@ export function* v2InAppSagas() {
175
149
  watchGetTemplateDetails(),
176
150
  watchUploadInAppAsset(),
177
151
  watchEditTemplate(),
178
- watchGetBeePopupBuilderToken(),
179
152
  ]);
180
153
  }
@@ -9,26 +9,4 @@ const makeSelectInApp = () =>
9
9
  const makeSelectAccount = () =>
10
10
  createSelector(selectAccountDomain(), (substate) => substate.toJS());
11
11
 
12
- const makeSelectBeePopupBuilderTokenFetching = () => createSelector(
13
- selectInAppDomain(),
14
- (substate) => substate.get('beePopupBuilderTokenFetching'),
15
- );
16
-
17
- const makeSelectBeePopupBuilderToken = () => createSelector(
18
- selectInAppDomain(),
19
- (substate) => substate.get('beePopupBuilderToken'),
20
- );
21
-
22
- const makeSelectGetTemplateDetailsInProgress = () => createSelector(
23
- selectInAppDomain(),
24
- (substate) => substate.get('getTemplateDetailsInProgress'),
25
- );
26
-
27
-
28
- export {
29
- makeSelectInApp,
30
- makeSelectAccount,
31
- makeSelectBeePopupBuilderTokenFetching,
32
- makeSelectBeePopupBuilderToken,
33
- makeSelectGetTemplateDetailsInProgress,
34
- };
12
+ export { makeSelectInApp, makeSelectAccount };