@capillarytech/creatives-library 7.17.108 → 7.17.109

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.17.108",
4
+ "version": "7.17.109",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -17,7 +17,7 @@ import { formatString } from '../../utils/Formatter';
17
17
  import {
18
18
  CAP_SPACE_12,
19
19
  } from '@capillarytech/cap-ui-library/styled/variables';
20
- import { WHATSAPP_HELP_DOC_LINK } from './constants';
20
+ import { WHATSAPP_HELP_DOC_LINK, JOURNEY } from './constants';
21
21
 
22
22
  const { CapLabelInline } = CapLabel;
23
23
  const StyledLabel = styled(CapLabelInline)`
@@ -33,7 +33,7 @@ const renderData = (type, value, channel) => (
33
33
  );
34
34
 
35
35
  export function SlideBoxHeader(props) {
36
- const { slidBoxContent, templateData, onShowTemplates, creativesMode, isFullMode, showPrefix, shouldShowTemplateName, channel, templateNameRenderProp, weChatTemplateType, onWeChatMaptemplateStepChange, weChatMaptemplateStep, templateStep, smsRegister } = props;
36
+ const { slidBoxContent, templateData, onShowTemplates, creativesMode, isFullMode, showPrefix, shouldShowTemplateName, channel, templateNameRenderProp, weChatTemplateType, onWeChatMaptemplateStepChange, weChatMaptemplateStep, templateStep, smsRegister, handleClose, moduleType } = props;
37
37
  const showTemplateNameHeader = isFullMode && shouldShowTemplateName;
38
38
  const mapTemplateCreate = !showTemplateNameHeader && slidBoxContent === 'createTemplate' && weChatTemplateType === MAP_TEMPLATE && templateStep !== 'modeSelection';
39
39
  const isTraiDlt = isTraiDLTEnable(isFullMode, smsRegister);
@@ -86,6 +86,11 @@ export function SlideBoxHeader(props) {
86
86
  description={![NO_COMMUNICATION, FTP].includes(channel) &&
87
87
  <FormattedMessage {...messages.creativeTemplatesDesc} />
88
88
  }
89
+ prefix={!isFullMode && moduleType === JOURNEY &&
90
+ <PrefixWrapper>
91
+ <CapIcons.backIcon onClick={handleClose} />
92
+ </PrefixWrapper>
93
+ }
89
94
  />
90
95
  )}
91
96
  {showTemplateNameHeader && templateNameRenderProp()}
@@ -22,6 +22,7 @@ export const ZALO = "ZALO";
22
22
  export const INAPP = "INAPP";
23
23
  export const PREVIEW = "preview";
24
24
  export const EDIT_TEMPLATE = "editTemplate";
25
+ export const JOURNEY = "journey";
25
26
 
26
27
  export const SHOW_CONTANER_LOADER = "app/CreativesContainer/SHOW_CONTANER_LOADER";
27
28
  export const HIDE_CONTAINER_LOADER = "app/CreativesContainer/HIDE_CONTAINER_LOADER";
@@ -1199,6 +1199,8 @@ export class Creatives extends React.Component {
1199
1199
  showPrefix={!isUploading} // not show back button when email template is being uploaded
1200
1200
  templateStep={this.creativesTemplateSteps[templateStep]}
1201
1201
  smsRegister={smsRegister}
1202
+ handleClose={this.handleCloseSlideBox}
1203
+ moduleType={this.props.messageDetails?.type}
1202
1204
  />}
1203
1205
  content={
1204
1206
  <SlideBoxContent
@@ -23,6 +23,7 @@ describe('Test SlideBoxHeader container', () => {
23
23
  templateData={templateData}
24
24
  onCreateComplete={onCreateComplete}
25
25
  isFullMode={isFullMode}
26
+ moduleType="journey"
26
27
  />
27
28
  );
28
29
  };
@@ -98,6 +98,11 @@ exports[`Test SlideBoxHeader container Should render correct component for rcs c
98
98
  }
99
99
  descriptionClass=""
100
100
  inline={false}
101
+ prefix={
102
+ <SlideBoxHeader__PrefixWrapper>
103
+ <SvgBack />
104
+ </SlideBoxHeader__PrefixWrapper>
105
+ }
101
106
  size="large"
102
107
  title={
103
108
  <FormattedMessage
@@ -303,6 +308,11 @@ exports[`Test SlideBoxHeader container Should render correct component for whats
303
308
  }
304
309
  descriptionClass=""
305
310
  inline={false}
311
+ prefix={
312
+ <SlideBoxHeader__PrefixWrapper>
313
+ <SvgBack />
314
+ </SlideBoxHeader__PrefixWrapper>
315
+ }
306
316
  size="large"
307
317
  title={
308
318
  <FormattedMessage
@@ -50,6 +50,7 @@ exports[`Test SlideBoxContent container campaign message, add creative click rcs
50
50
  header={
51
51
  <SlideBoxHeader
52
52
  channel="RCS"
53
+ handleClose={[Function]}
53
54
  isLoadingContent={true}
54
55
  onShowTemplates={[Function]}
55
56
  onWeChatMaptemplateStepChange={[Function]}
@@ -123,6 +124,7 @@ exports[`Test SlideBoxContent container campaign message, add creative click wha
123
124
  header={
124
125
  <SlideBoxHeader
125
126
  channel="WHATSAPP"
127
+ handleClose={[Function]}
126
128
  isLoadingContent={true}
127
129
  onShowTemplates={[Function]}
128
130
  onWeChatMaptemplateStepChange={[Function]}
@@ -203,6 +205,7 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit all data
203
205
  header={
204
206
  <SlideBoxHeader
205
207
  channel="WHATSAPP"
208
+ handleClose={[Function]}
206
209
  isLoadingContent={true}
207
210
  onShowTemplates={[Function]}
208
211
  onWeChatMaptemplateStepChange={[Function]}
@@ -278,6 +281,7 @@ exports[`Test SlideBoxContent container campaign message, whatsapp edit min data
278
281
  header={
279
282
  <SlideBoxHeader
280
283
  channel="WHATSAPP"
284
+ handleClose={[Function]}
281
285
  isLoadingContent={true}
282
286
  onShowTemplates={[Function]}
283
287
  onWeChatMaptemplateStepChange={[Function]}
@@ -353,6 +357,7 @@ exports[`Test SlideBoxContent container it should clear the url, on channel chan
353
357
  header={
354
358
  <SlideBoxHeader
355
359
  channel="WHATSAPP"
360
+ handleClose={[Function]}
356
361
  isLoadingContent={true}
357
362
  onShowTemplates={[Function]}
358
363
  onWeChatMaptemplateStepChange={[Function]}