@capillarytech/creatives-library 7.12.43 → 7.12.44

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.12.43",
4
+ "version": "7.12.44",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -44,7 +44,7 @@ export const LineImageCarousel = (props) => {
44
44
  getAllTemplates,
45
45
  } = props;
46
46
 
47
- if (activeKey !== 'template') {
47
+ if (activeKey !== 'flex') {
48
48
  return null;
49
49
  }
50
50
 
@@ -70,7 +70,7 @@ export const LineImageCarousel = (props) => {
70
70
 
71
71
  useEffect(() => {
72
72
  const { messageTitle = '', type, template, altText } = content;
73
- if (type === 'template') {
73
+ if (type === 'template' || type === 'flex') {
74
74
  updateCreateNew(!isFullMode ? !!template : true);
75
75
  if (messageTitle) {
76
76
  updateTextMessageTitle(messageTitle);
@@ -176,7 +176,7 @@ export const LineImageCarousel = (props) => {
176
176
  isError: isErrorIndex !== undefined && isErrorIndex !== false,
177
177
  messageTitle: existingMessageTitle,
178
178
  altText: existingTitle,
179
- type: 'template',
179
+ type: 'flex',
180
180
  index,
181
181
  }
182
182
 
@@ -6,7 +6,7 @@ import CapIcon from '@capillarytech/cap-ui-library/CapIcon';
6
6
  import CapModal from '@capillarytech/cap-ui-library/CapModal';
7
7
  import style, { CapModalStyles } from './style';
8
8
  import withStyles from '../../../../hoc/withStyles';
9
- import { TEXT, IMAGE, IMAGE_MAP, STICKER, MAX_LINE_WRAPPER_LIMIT, MAX_LINE_WRAPPER_LIMIT_FULL_MODE } from '../constants';
9
+ import { TEXT, TEMPLATE } from '../constants';
10
10
  import { getTabPanes } from './utils';
11
11
  import messages from './messages';
12
12
  import { CAP_SPACE_16, CAP_SPACE_08 } from '@capillarytech/cap-ui-library/styled/variables';
@@ -30,7 +30,7 @@ export const LineWrapper = ({
30
30
  const [isConfirmModalVisible, togglePopup] = useState(false);
31
31
 
32
32
  useEffect(() => {
33
- updateActiveKey(selectedType);
33
+ updateActiveKey(selectedType === 'template' ? TEMPLATE : selectedType);
34
34
  }, [selectedType]);
35
35
 
36
36
  const onTabChange = (type) => {
@@ -43,8 +43,8 @@ export default defineMessages({
43
43
  id: `${scope}.imagemapLabel`,
44
44
  defaultMessage: 'Rich message',
45
45
  },
46
- "templateLabel": {
47
- id: `${scope}.templateLabel`,
46
+ "flexLabel": {
47
+ id: `${scope}.flexLabel`,
48
48
  defaultMessage: 'Card message',
49
49
  },
50
50
  "videoLabel": {
@@ -3,7 +3,7 @@ export const STICKER = 'sticker';
3
3
  export const IMAGE = 'image';
4
4
  export const IMAGE_MAP = 'imagemap';
5
5
  export const IMAGE_CAROUSEL = 'image_carousel';
6
- export const TEMPLATE = 'template';
6
+ export const TEMPLATE = 'flex';
7
7
  export const VIDEO = 'video';
8
8
  export const MAX_LINE_WRAPPER_LIMIT = 5;
9
9
  export const MAX_LINE_WRAPPER_LIMIT_FULL_MODE = 1;