@capillarytech/creatives-library 8.0.340-0 → 8.0.340-beta.0

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.
Files changed (134) hide show
  1. package/app.js +8 -1
  2. package/global-styles.js +4 -0
  3. package/package.json +2 -2
  4. package/styles/components/navigation/_leftnav.scss +1 -1
  5. package/v2Components/AccessForbidden/index.js +1 -1
  6. package/v2Components/CapActionButton/index.js +5 -5
  7. package/v2Components/CapCustomSkeleton/index.js +1 -1
  8. package/v2Components/CapDeviceContent/index.js +5 -5
  9. package/v2Components/CapDocumentUpload/index.js +1 -1
  10. package/v2Components/CapImageUpload/index.js +1 -1
  11. package/v2Components/CapInAppCTA/index.js +118 -112
  12. package/v2Components/CapMpushCTA/index.js +72 -66
  13. package/v2Components/CapTagList/index.js +5 -5
  14. package/v2Components/CapVideoUpload/index.js +1 -1
  15. package/v2Components/CapWhatsappCTA/index.js +128 -124
  16. package/v2Components/CapWhatsappCarouselButton/index.js +27 -29
  17. package/v2Components/CapWhatsappQuickReply/index.js +7 -7
  18. package/v2Components/Carousel/index.js +1 -1
  19. package/v2Components/CommonTestAndPreview/AddTestCustomer.js +1 -1
  20. package/v2Components/CommonTestAndPreview/CustomValuesEditor.js +3 -3
  21. package/v2Components/CommonTestAndPreview/CustomerCreationModal.js +1 -1
  22. package/v2Components/CommonTestAndPreview/DeliverySettings/ModifyDeliverySettings.js +4 -4
  23. package/v2Components/CommonTestAndPreview/DeliverySettings/index.js +1 -1
  24. package/v2Components/CommonTestAndPreview/ExistingCustomerModal.js +6 -6
  25. package/v2Components/CommonTestAndPreview/LeftPanelContent.js +5 -5
  26. package/v2Components/CommonTestAndPreview/PreviewSection.js +1 -1
  27. package/v2Components/CommonTestAndPreview/UnifiedPreview/DeviceFrame.js +1 -1
  28. package/v2Components/CommonTestAndPreview/UnifiedPreview/EmailPreviewContent.js +8 -8
  29. package/v2Components/CommonTestAndPreview/UnifiedPreview/InAppPreviewContent.js +14 -13
  30. package/v2Components/CommonTestAndPreview/UnifiedPreview/MobilePushPreviewContent.js +22 -21
  31. package/v2Components/CommonTestAndPreview/UnifiedPreview/RcsPreviewContent.js +9 -9
  32. package/v2Components/CommonTestAndPreview/UnifiedPreview/SmsPreviewContent.js +8 -8
  33. package/v2Components/CommonTestAndPreview/UnifiedPreview/ViberPreviewContent.js +10 -10
  34. package/v2Components/CommonTestAndPreview/UnifiedPreview/WhatsAppPreviewContent.js +13 -12
  35. package/v2Components/CommonTestAndPreview/UnifiedPreview/ZaloPreviewContent.js +4 -3
  36. package/v2Components/CommonTestAndPreview/UnifiedPreview/_unifiedPreview.scss +10 -5
  37. package/v2Components/CommonTestAndPreview/UnifiedPreview/index.js +1 -1
  38. package/v2Components/CommonTestAndPreview/_commonTestAndPreview.scss +3 -4
  39. package/v2Components/CommonTestAndPreview/index.js +1 -1
  40. package/v2Components/CustomerSearchSection/_customerSearch.scss +2 -1
  41. package/v2Components/CustomerSearchSection/index.js +9 -9
  42. package/v2Components/EmailMobilePreview/index.js +1 -1
  43. package/v2Components/ErrorInfoNote/index.js +13 -11
  44. package/v2Components/ErrorInfoNote/style.scss +1 -1
  45. package/v2Components/FormBuilder/_formBuilder.scss +1 -0
  46. package/v2Components/FormBuilder/index.js +32 -40
  47. package/v2Components/HtmlEditor/HTMLEditor.js +4 -4
  48. package/v2Components/HtmlEditor/_htmlEditor.scss +2 -1
  49. package/v2Components/HtmlEditor/components/CodeEditorPane/index.js +1 -1
  50. package/v2Components/HtmlEditor/components/DeviceToggle/_deviceToggle.scss +2 -2
  51. package/v2Components/HtmlEditor/components/DeviceToggle/index.js +2 -2
  52. package/v2Components/HtmlEditor/components/EditorToolbar/PreviewModeGroup.js +2 -2
  53. package/v2Components/HtmlEditor/components/EditorToolbar/index.js +2 -2
  54. package/v2Components/HtmlEditor/components/InAppPreviewPane/index.js +1 -0
  55. package/v2Components/HtmlEditor/components/PreviewPane/index.js +2 -2
  56. package/v2Components/HtmlEditor/components/SplitContainer/SplitContainer.js +2 -2
  57. package/v2Components/HtmlEditor/components/SplitContainer/_splitContainer.scss +2 -1
  58. package/v2Components/HtmlEditor/components/ValidationPanel/index.js +6 -9
  59. package/v2Components/HtmlEditor/components/ValidationTabs/index.js +2 -2
  60. package/v2Components/NavigationBar/index.js +7 -1
  61. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +3 -4
  62. package/v2Components/TemplatePreview/_templatePreview.scss +5 -3
  63. package/v2Components/TemplatePreview/index.js +11 -9
  64. package/v2Components/TestAndPreviewSlidebox/CustomValuesEditor.js +3 -3
  65. package/v2Components/TestAndPreviewSlidebox/LeftPanelContent.js +5 -5
  66. package/v2Components/TestAndPreviewSlidebox/PreviewSection.js +3 -3
  67. package/v2Components/TestAndPreviewSlidebox/_testAndPreviewSlidebox.scss +4 -2
  68. package/v2Containers/BeePopupEditor/index.js +1 -1
  69. package/v2Containers/CommunicationFlow/CommunicationFlow.js +5 -5
  70. package/v2Containers/CommunicationFlow/steps/ChannelSelectionStep/ChannelSelectionStep.js +4 -3
  71. package/v2Containers/CommunicationFlow/steps/CommunicationStrategyStep/CommunicationStrategyStep.js +2 -2
  72. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/DeliverySettingsSection.js +3 -2
  73. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/SenderDetails.js +7 -7
  74. package/v2Containers/CommunicationFlow/steps/DeliverySettingsStep/SenderDetails.scss +0 -5
  75. package/v2Containers/CommunicationFlow/steps/DynamicControlsStep/DynamicControlsStep.js +2 -2
  76. package/v2Containers/CommunicationFlow/steps/MessageTypeStep/MessageTypeStep.js +2 -2
  77. package/v2Containers/CreativesContainer/SlideBoxFooter.js +1 -1
  78. package/v2Containers/CreativesContainer/index.js +1 -1
  79. package/v2Containers/Ebill/index.js +10 -9
  80. package/v2Containers/Email/index.js +7 -7
  81. package/v2Containers/Email/initialSchema.js +1 -1
  82. package/v2Containers/FTP/index.js +1 -1
  83. package/v2Containers/Facebook/Advertisement/index.js +4 -4
  84. package/v2Containers/Facebook/index.js +2 -2
  85. package/v2Containers/InApp/index.js +21 -16
  86. package/v2Containers/InApp/index.scss +0 -7
  87. package/v2Containers/InAppWrapper/components/InAppWrapperView.js +2 -2
  88. package/v2Containers/InappAdvance/index.js +4 -4
  89. package/v2Containers/LanguageProvider/index.js +3 -3
  90. package/v2Containers/LanguageProvider/tests/index.test.js +3 -3
  91. package/v2Containers/Line/Container/Image/index.js +1 -1
  92. package/v2Containers/Line/Container/ImageCarousel/Content.js +1 -1
  93. package/v2Containers/Line/Container/ImageCarousel/index.js +5 -5
  94. package/v2Containers/Line/Container/ImageMap/index.js +3 -3
  95. package/v2Containers/Line/Container/Sticker/index.js +2 -2
  96. package/v2Containers/Line/Container/Sticker/utils.js +1 -1
  97. package/v2Containers/Line/Container/Video/index.js +1 -1
  98. package/v2Containers/Line/Container/Wrapper/index.js +3 -3
  99. package/v2Containers/Line/Container/Wrapper/style.js +1 -5
  100. package/v2Containers/Line/Container/index.js +2 -2
  101. package/v2Containers/Login/components/LoginForm/index.js +34 -47
  102. package/v2Containers/Login/index.js +5 -5
  103. package/v2Containers/MobilePushNew/components/CtaButtons.js +2 -2
  104. package/v2Containers/MobilePushNew/components/MediaUploaders.js +9 -9
  105. package/v2Containers/MobilePushNew/components/PlatformContentFields.js +4 -4
  106. package/v2Containers/MobilePushNew/index.js +2 -2
  107. package/v2Containers/MobilePushNew/index.scss +6 -3
  108. package/v2Containers/Rcs/index.js +24 -19
  109. package/v2Containers/Rcs/index.scss +0 -7
  110. package/v2Containers/SmsTrai/Edit/index.js +3 -2
  111. package/v2Containers/Templates/index.js +16 -16
  112. package/v2Containers/Viber/constants.js +0 -8
  113. package/v2Containers/Viber/index.js +19 -19
  114. package/v2Containers/Viber/index.scss +0 -7
  115. package/v2Containers/Viber/reducer.js +21 -44
  116. package/v2Containers/Viber/sagas.js +21 -62
  117. package/v2Containers/Viber/tests/index.test.js +0 -80
  118. package/v2Containers/Viber/tests/saga.test.js +40 -365
  119. package/v2Containers/WeChat/RichmediaTemplates/Create/_createRichmedia.scss +1 -1
  120. package/v2Containers/WeChat/RichmediaTemplates/Create/index.js +2 -2
  121. package/v2Containers/WebPush/Create/components/BrandIconSection.js +1 -1
  122. package/v2Containers/WebPush/Create/components/ButtonForm.js +2 -2
  123. package/v2Containers/WebPush/Create/components/ButtonList.js +4 -4
  124. package/v2Containers/WebPush/Create/components/ButtonsLinksSection.js +4 -4
  125. package/v2Containers/WebPush/Create/components/FormActions.js +3 -3
  126. package/v2Containers/WebPush/Create/components/MessageSection.js +2 -2
  127. package/v2Containers/WebPush/Create/components/NotificationTitleSection.js +2 -2
  128. package/v2Containers/WebPush/Create/components/_buttons.scss +2 -2
  129. package/v2Containers/WebPush/Create/index.scss +6 -3
  130. package/v2Containers/WebPush/Create/preview/WebPushPreview.js +1 -1
  131. package/v2Containers/Whatsapp/index.js +28 -28
  132. package/v2Containers/Zalo/index.js +3 -3
  133. package/.npmrc copy +0 -2
  134. package/v2Containers/Viber/tests/reducer.test.js +0 -297
@@ -10,6 +10,7 @@ import { DAEMON } from '@capillarytech/vulcan-react-sdk/utils/sagaInjectorTypes'
10
10
  import CapHeading from "@capillarytech/cap-ui-library/CapHeading";
11
11
  import CapSpin from "@capillarytech/cap-ui-library/CapSpin";
12
12
  import CapRadioGroup from "@capillarytech/cap-ui-library/CapRadioGroup";
13
+ import ConfigProvider from 'antd/lib/config-provider';
13
14
  import CapRow from "@capillarytech/cap-ui-library/CapRow";
14
15
  import CapColumn from "@capillarytech/cap-ui-library/CapColumn";
15
16
  import CapButton from "@capillarytech/cap-ui-library/CapButton";
@@ -1434,7 +1435,7 @@ export const InApp = (props) => {
1434
1435
  {/* Creative layout type */}
1435
1436
  {shouldUseHTMLEditor && (
1436
1437
  <>
1437
- <CapRow>
1438
+ <CapRow useLegacy>
1438
1439
  <CapHeading type="h4">
1439
1440
  <FormattedMessage {...messages.creativeLayout} />
1440
1441
  </CapHeading>
@@ -1442,13 +1443,15 @@ export const InApp = (props) => {
1442
1443
  <FormattedMessage {...messages.creativeLayoutDesc} />
1443
1444
  </CapHeading>
1444
1445
  </CapRow>
1445
- <CapRadioGroup
1446
- id="inapp-layout-radio"
1447
- options={LAYOUT_RADIO_OPTIONS}
1448
- value={templateLayoutType}
1449
- onChange={onTemplateLayoutTypeChange}
1450
- className="inapp-layout-radio"
1451
- />
1446
+ <ConfigProvider theme={{ components: { Radio: { radioSize: 20, dotSize: 8 } } }}>
1447
+ <CapRadioGroup
1448
+ id="inapp-layout-radio"
1449
+ options={LAYOUT_RADIO_OPTIONS}
1450
+ value={templateLayoutType}
1451
+ onChange={onTemplateLayoutTypeChange}
1452
+ className="inapp-layout-radio"
1453
+ />
1454
+ </ConfigProvider>
1452
1455
  </>
1453
1456
  )}
1454
1457
  {shouldUseHTMLEditor && (
@@ -1510,7 +1513,7 @@ export const InApp = (props) => {
1510
1513
  labelPosition="top"
1511
1514
  size="default"
1512
1515
  />
1513
- <CapRow>
1516
+ <CapRow useLegacy>
1514
1517
  <CapHeading type="h4">
1515
1518
  <FormattedMessage {...messages.creativeLayout} />
1516
1519
  </CapHeading>
@@ -1518,13 +1521,15 @@ export const InApp = (props) => {
1518
1521
  <FormattedMessage {...messages.creativeLayoutDesc} />
1519
1522
  </CapHeading>
1520
1523
  </CapRow>
1521
- <CapRadioGroup
1522
- id="inapp-layout-radio"
1523
- options={LAYOUT_RADIO_OPTIONS}
1524
- value={templateLayoutType}
1525
- onChange={onTemplateLayoutTypeChange}
1526
- className="inapp-layout-radio"
1527
- />
1524
+ <ConfigProvider theme={{ components: { Radio: { radioSize: 20, dotSize: 8 } } }}>
1525
+ <CapRadioGroup
1526
+ id="inapp-layout-radio"
1527
+ options={LAYOUT_RADIO_OPTIONS}
1528
+ value={templateLayoutType}
1529
+ onChange={onTemplateLayoutTypeChange}
1530
+ className="inapp-layout-radio"
1531
+ />
1532
+ </ConfigProvider>
1528
1533
  <CapTab
1529
1534
  panes={DEVICE_PANES.filter((devicePane) => devicePane?.isSupported === true)}
1530
1535
  onChange={(value) => setPanes(value)}
@@ -36,13 +36,6 @@
36
36
  margin-right: $CAP_SPACE_24;
37
37
  }
38
38
 
39
- .ant-radio-inner::after{
40
- top: 3px;
41
- left: 3px;
42
- }
43
- .ant-radio-inner{
44
- border: 1px solid #d9d9d9;
45
- }
46
39
  .ant-radio-checked .ant-radio-inner{
47
40
  border: 1px solid #47af46;
48
41
  }
@@ -35,7 +35,7 @@ const ModeSelectionUI = ({
35
35
  labelPosition="top"
36
36
  size="default"
37
37
  />
38
- <CapRow className="inapp-wrapper__card-container">
38
+ <CapRow useLegacy className="inapp-wrapper__card-container">
39
39
  <CapRadioCardWithLabel
40
40
  panes={modes}
41
41
  onChange={onChange}
@@ -49,7 +49,7 @@ const ModeSelectionUI = ({
49
49
  </CapError>
50
50
  )}
51
51
  {inAppEditorType && !isTemplateNameEmpty && (
52
- <CapRow className="next-button-container">
52
+ <CapRow useLegacy className="next-button-container">
53
53
  <CapButton
54
54
  onClick={handleEditorTypeSelection}
55
55
  disabled={isFullMode && isTemplateNameEmpty}
@@ -885,10 +885,10 @@ export const InappAdvanced = (props) => {
885
885
 
886
886
  return (
887
887
  <CapSpin spinning={spin}>
888
- <CapRow className="cap-inapp-creatives">
888
+ <CapRow useLegacy className="cap-inapp-creatives">
889
889
  {/* Creative layout type*/}
890
890
  <>
891
- <CapRow className="inapp-creative-layout">
891
+ <CapRow useLegacy className="inapp-creative-layout">
892
892
  <CapHeading type="h4">
893
893
  <FormattedMessage {...messages.creativeLayout} />
894
894
  </CapHeading>
@@ -907,7 +907,7 @@ export const InappAdvanced = (props) => {
907
907
  <CapColumn span={24}>
908
908
  {/* Content Sync Checkbox - positioned after device tabs */}
909
909
  {isAndroidSupported && isIosSupported && (
910
- <CapRow>
910
+ <CapRow useLegacy>
911
911
  <CapCheckbox
912
912
  checked={keepContentSame}
913
913
  onChange={handleCheckboxChange}
@@ -917,7 +917,7 @@ export const InappAdvanced = (props) => {
917
917
  </CapCheckbox>
918
918
  </CapRow>
919
919
  )}
920
- <CapRow>
920
+ <CapRow useLegacy>
921
921
  {/* device tab */}
922
922
  <CapTab
923
923
  panes={PANES.filter(
@@ -10,9 +10,9 @@ import PropTypes from 'prop-types';
10
10
 
11
11
  import React from 'react';
12
12
  import { ConfigProvider } from 'antd';
13
- import enUS from 'antd/es/locale-provider/en_US';
14
- import zhCN from 'antd/es/locale-provider/zh_CN';
15
- import jaJP from 'antd/es/locale-provider/ja_JP';
13
+ import enUS from 'antd/es/locale/en_US';
14
+ import zhCN from 'antd/es/locale/zh_CN';
15
+ import jaJP from 'antd/es/locale/ja_JP';
16
16
  import { connect } from 'react-redux';
17
17
  import { createStructuredSelector } from 'reselect';
18
18
  import { IntlProvider } from 'react-intl';
@@ -17,9 +17,9 @@ const messages = defineMessages({
17
17
  },
18
18
  });
19
19
 
20
- jest.mock('antd/es/locale-provider/en_US', () => 'enUS');
21
- jest.mock('antd/es/locale-provider/zh_CN', () => 'zhCN');
22
- jest.mock('antd/es/locale-provider/ja_JP', () => 'jaJP');
20
+ jest.mock('antd/es/locale/en_US', () => 'enUS');
21
+ jest.mock('antd/es/locale/zh_CN', () => 'zhCN');
22
+ jest.mock('antd/es/locale/ja_JP', () => 'jaJP');
23
23
 
24
24
  describe('<LanguageProvider />', () => {
25
25
  it('should render its children', () => {
@@ -328,7 +328,7 @@ export const LineImage = ({
328
328
  return (
329
329
  <CapButton
330
330
  className="dragger-button"
331
- type="flat"
331
+ type="link"
332
332
  style={{
333
333
  top: isFullMode ? 105 : -8,
334
334
  position: 'absolute',
@@ -288,7 +288,7 @@ export const LineImageCarouselContent = ({
288
288
  return (
289
289
  <CapButton
290
290
  className="dragger-button"
291
- type="flat"
291
+ type="link"
292
292
  style={{
293
293
  top: 0,
294
294
  position: 'absolute',
@@ -253,7 +253,7 @@ export const LineImageCarousel = (props) => {
253
253
  <>
254
254
  <CapButton
255
255
  onClick={addContent}
256
- type="flat"
256
+ type="link"
257
257
  disabled={MAX_CAROUSEL_ALLOWED === carouselImages.length}
258
258
  isAddBtn
259
259
  style={{ padding: 0, marginTop: 12 }}
@@ -274,7 +274,7 @@ export const LineImageCarousel = (props) => {
274
274
  <CapButton
275
275
  onClick={duplicateContent}
276
276
  disabled={MAX_CAROUSEL_ALLOWED === carouselImages.length}
277
- type="flat"
277
+ type="link"
278
278
  >
279
279
  <CapIcon type="copy" size="s" />
280
280
  </CapButton>
@@ -285,7 +285,7 @@ export const LineImageCarousel = (props) => {
285
285
  <CapButton
286
286
  onClick={shiftLeftContent}
287
287
  disabled={defaultActiveIndex === Number(activeIndex)}
288
- type="flat"
288
+ type="link"
289
289
  >
290
290
  <CapIcon type="left" size="s" />
291
291
  </CapButton>
@@ -296,7 +296,7 @@ export const LineImageCarousel = (props) => {
296
296
  <CapButton
297
297
  onClick={shiftRightContent}
298
298
  disabled={carouselImages.length === (Number(activeIndex) + 1)}
299
- type="flat"
299
+ type="link"
300
300
  >
301
301
  <CapIcon type="right" size="s" />
302
302
  </CapButton>
@@ -307,7 +307,7 @@ export const LineImageCarousel = (props) => {
307
307
  <CapButton
308
308
  onClick={deleteContent}
309
309
  disabled={1 === carouselImages.length}
310
- type="flat"
310
+ type="link"
311
311
  >
312
312
  <CapIcon type="delete" size="s" />
313
313
  </CapButton>
@@ -284,7 +284,7 @@ export const LineImageMap = ({
284
284
  assetType === DEFAULT_ASSET_TYPE ? formatMessage(messages.squareAssetDesc) : formatMessage(messages.customAssetDesc)
285
285
  }
286
286
  </CapLabel>
287
- <CapRow>
287
+ <CapRow useLegacy>
288
288
  {getTemplatesSelection()}
289
289
  </CapRow>
290
290
  </>
@@ -301,7 +301,7 @@ export const LineImageMap = ({
301
301
  return (
302
302
  <CapColumn span={12} key={template}>
303
303
  <CapButton
304
- type="flat"
304
+ type="link"
305
305
  style={{ padding: 0, marginTop: CAP_SPACE_12, marginRight: CAP_SPACE_16, height: 'auto' }}
306
306
  onClick={() => changeImageMapTemplate(template)}
307
307
  >
@@ -537,7 +537,7 @@ export const LineImageMap = ({
537
537
  {isImage &&
538
538
  <CapButton
539
539
  className="dragger-button"
540
- type="flat"
540
+ type="link"
541
541
  style={{ top: 180 , position: 'absolute', right: 0, color: FONT_COLOR_05 }}
542
542
  onClick={onReUpload}
543
543
  >
@@ -114,7 +114,7 @@ export const LineSticker = ({
114
114
  }}
115
115
  />
116
116
  <CapButton
117
- type="flat"
117
+ type="link"
118
118
  style={{ padding: 0, top: -34, right: 8 }}
119
119
  onClick={removeSelectedSticker}
120
120
  >
@@ -192,7 +192,7 @@ export const LineSticker = ({
192
192
  ? (
193
193
  <CapButton
194
194
  onClick={removeSelectedSticker}
195
- type="flat"
195
+ type="link"
196
196
  style={{
197
197
  padding: 0,
198
198
  marginLeft: 400,
@@ -40,7 +40,7 @@ export const getContent = ({ lineStickers, onStickerSelect }) => (
40
40
  }) => (
41
41
  <CapColumn span={6} key={_id}>
42
42
  <CapButton
43
- type="flat"
43
+ type="link"
44
44
  style={{ padding: 0, margin: 10, height: 'auto' }}
45
45
  onClick={() => onStickerSelect(definition)}
46
46
  >
@@ -387,7 +387,7 @@ export const LineVideo = ({
387
387
  <div style={{ overflow: 'hidden' }}>
388
388
  <CapButton
389
389
  className="dragger-button"
390
- type="flat"
390
+ type="link"
391
391
  style={{
392
392
  float: 'right',
393
393
  color: FONT_COLOR_05,
@@ -101,7 +101,7 @@ export const LineWrapper = ({
101
101
  const operations = (
102
102
  <>
103
103
  <CapButton
104
- type="flat"
104
+ type="link"
105
105
  onClick={() => shiftUp(index)}
106
106
  disabled={index === 0 || rest.isFullMode}
107
107
  style={{ padding: 0 }}
@@ -109,7 +109,7 @@ export const LineWrapper = ({
109
109
  <CapIcon type="back" size="s" style={{ transform: 'rotate(90deg)'}}/>
110
110
  </CapButton>
111
111
  <CapButton
112
- type="flat"
112
+ type="link"
113
113
  onClick={() => shiftDown(index)}
114
114
  style={{ padding: `0 0 0 ${CAP_SPACE_08}` }}
115
115
  disabled={(index+1) === lineWrappers || rest.isFullMode}
@@ -117,7 +117,7 @@ export const LineWrapper = ({
117
117
  <CapIcon type="back" size="s" style={{ transform: 'rotate(270deg)'}}/>
118
118
  </CapButton>
119
119
  <CapButton
120
- type="flat"
120
+ type="link"
121
121
  onClick={() => deleteWrapper(index)}
122
122
  disabled={rest.isFullMode || lineWrappers === 1}
123
123
  style={{ padding: `0 ${CAP_SPACE_16} 0 ${CAP_SPACE_16}`, marginRight: -20 }}
@@ -27,15 +27,11 @@ export default css`
27
27
  `;
28
28
 
29
29
  export const CapModalStyles = css`
30
- .ant-modal.cap-modal-v2 {
31
- max-width: unset;
32
- }
33
-
34
30
  .modal-description {
35
31
  margin-top: ${CAP_SPACE_12};
36
32
  }
37
33
 
38
- .ant-modal.cap-modal-v2 .ant-modal-footer {
34
+ .ant-modal-footer {
39
35
  padding-bottom: ${CAP_SPACE_20};
40
36
  padding-left: ${CAP_SPACE_24};
41
37
  }
@@ -789,7 +789,7 @@ export const LineContainer = ({
789
789
  <span>{accountName}</span>
790
790
  <CapButton
791
791
  onClick={onShowTemplates}
792
- type="flat"
792
+ type="link"
793
793
  style={{ fontWeight: 500, color: FONT_COLOR_05 }}
794
794
  >
795
795
  <FormattedMessage {...messages.changeAccount} />
@@ -821,7 +821,7 @@ export const LineContainer = ({
821
821
  <CapButton
822
822
  onClick={addLineWrappers}
823
823
  disabled={lineWrapperContents.length === (isFullMode ? MAX_LINE_WRAPPER_LIMIT_FULL_MODE : MAX_LINE_WRAPPER_LIMIT)}
824
- type="flat"
824
+ type="link"
825
825
  isAddBtn
826
826
  className="add-msg"
827
827
  >
@@ -1,62 +1,49 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
- import { Form, Icon } from 'antd';
4
- import { CapInput, CapButton } from '@capillarytech/cap-ui-library';
3
+ import { Form } from 'antd';
4
+ import { CapInput, CapButton, CapIcon } from '@capillarytech/cap-ui-library';
5
5
  import { injectIntl, intlShape } from 'react-intl';
6
6
  import messages from './messages';
7
7
  const FormItem = Form.Item;
8
8
 
9
- class NormalLoginForm extends React.Component {
10
- handleSubmit = (e) => {
11
- e.preventDefault();
12
- this.props.form.validateFields((err, values) => {
13
- if (!err) {
14
- this.props.authenticate(values);
9
+ const NormalLoginForm = ({ authenticate, loginInProgress, isError, intl }) => {
10
+ const [form] = Form.useForm();
11
+ return (
12
+ <Form form={form} onFinish={(values) => authenticate(values)} className="login-form">
13
+ <FormItem
14
+ className="login-form-item"
15
+ name="username"
16
+ rules={[{ required: true, message: intl.formatMessage(messages.inputUsernameMandatory) }]}
17
+ >
18
+ <CapInput prefix={<CapIcon type="user" outlined style={{ fontSize: 13 }} />} placeholder={intl.formatMessage(messages.username)} />
19
+ </FormItem>
20
+ <FormItem
21
+ className="login-form-item"
22
+ name="password"
23
+ rules={[{ required: true, message: intl.formatMessage(messages.inputPasswordMandatory) }]}
24
+ >
25
+ <CapInput prefix={<CapIcon type="lock" outlined style={{ fontSize: 13 }} />} type="password" placeholder={intl.formatMessage(messages.password)} />
26
+ </FormItem>
27
+ {isError
28
+ ? <FormItem>
29
+ <span style={{color: "red"}}>{intl.formatMessage(messages.invalidCredentials)}</span>
30
+ </FormItem>
31
+ : null
15
32
  }
16
- });
17
- }
18
-
19
- render() {
20
- const { getFieldDecorator } = this.props.form;
21
- return (
22
- <Form onSubmit={this.handleSubmit} className="login-form">
23
- <FormItem className="login-form-item">
24
- {getFieldDecorator('username', {
25
- rules: [{ required: true, message: this.props.intl.formatMessage(messages.inputUsernameMandatory) }],
26
- })(
27
- <CapInput prefix={<Icon type="user" style={{ fontSize: 13 }} />} placeholder={this.props.intl.formatMessage(messages.username)} />
28
- )}
29
- </FormItem>
30
- <FormItem className="login-form-item">
31
- {getFieldDecorator('password', {
32
- rules: [{ required: true, message: this.props.intl.formatMessage(messages.inputPasswordMandatory) }],
33
- })(
34
- <CapInput prefix={<Icon type="lock" style={{ fontSize: 13 }} />} type="password" placeholder={this.props.intl.formatMessage(messages.password)} />
35
- )}
36
- </FormItem>
37
- {this.props.isError
38
- ? <FormItem>
39
- <span style={{color: "red"}}>{this.props.intl.formatMessage(messages.invalidCredentials)}</span>
40
- </FormItem>
41
- : null
42
- }
43
- <FormItem>
44
- <CapButton loading={this.props.loginInProgress} type="primary" htmlType="submit" className="login-form-button">
45
- Log in
46
- </CapButton>
47
- </FormItem>
48
- </Form>
49
- );
50
- }
51
- }
33
+ <FormItem>
34
+ <CapButton loading={loginInProgress} type="primary" htmlType="submit" className="login-form-button">
35
+ Log in
36
+ </CapButton>
37
+ </FormItem>
38
+ </Form>
39
+ );
40
+ };
52
41
 
53
42
  NormalLoginForm.propTypes = {
54
43
  authenticate: PropTypes.func.isRequired,
55
44
  loginInProgress: PropTypes.bool,
56
45
  isError: PropTypes.bool,
57
- form: PropTypes.object,
58
46
  intl: intlShape.isRequired,
59
47
  };
60
48
 
61
- const WrappedNormalLoginForm = Form.create()(NormalLoginForm);
62
- export default injectIntl(WrappedNormalLoginForm);
49
+ export default injectIntl(NormalLoginForm);
@@ -4,7 +4,7 @@ import { connect } from 'react-redux';
4
4
  import Helmet from 'react-helmet';
5
5
  import { FormattedMessage } from 'react-intl';
6
6
  import { routerActions } from 'connected-react-router';
7
- import { Row, Col } from 'antd';
7
+ import { CapRow, CapColumn } from '@capillarytech/cap-ui-library';
8
8
  import { bindActionCreators } from 'redux';
9
9
  import { createStructuredSelector } from 'reselect';
10
10
  import makeSelectLogin from './selectors';
@@ -60,7 +60,7 @@ export class Login extends React.Component { // eslint-disable-line react/prefer
60
60
  ]}
61
61
  />}
62
62
  </FormattedMessage>
63
- <Row align="middle" justify="center" type="flex" className="login-container">
63
+ <CapRow align="middle" justify="center" type="flex" className="login-container">
64
64
  {process.env.NODE_ENV === "production"
65
65
  ? <div className="cap-loader-box">
66
66
  <img
@@ -68,14 +68,14 @@ export class Login extends React.Component { // eslint-disable-line react/prefer
68
68
  src={"https://storage.crm.n.content-cdn.io/capillary/capillary_loading_logo.gif"}
69
69
  alt="Capillary"/>
70
70
  </div>
71
- : <Col className="login-box" style={{textAlign: 'center'}}>
71
+ : <CapColumn className="login-box" style={{textAlign: 'center'}}>
72
72
  <h2 className="ui image header">
73
73
  <img alt="" src={logo} className="login-logo" />
74
74
  </h2>
75
75
  <LoginForm isError={this.state.isLoginError} authenticate={this.props.actions.authenticate} loginInProgress={loginProgress} />
76
- </Col>
76
+ </CapColumn>
77
77
  }
78
- </Row>
78
+ </CapRow>
79
79
  </div>
80
80
  );
81
81
  }
@@ -117,7 +117,7 @@ const CtaButtons = ({
117
117
  </CapHeading>
118
118
  {!isPrimaryButtonSaved && !shouldShowPrimaryCTA && (
119
119
  <CapButton
120
- type="flat"
120
+ type="link"
121
121
  id="add-primary-button"
122
122
  onClick={handleAddPrimary}
123
123
  >
@@ -149,7 +149,7 @@ const CtaButtons = ({
149
149
  >
150
150
  <div style={{ display: 'inline-block' }}>
151
151
  <CapButton
152
- type="flat"
152
+ type="link"
153
153
  id="add-secondary-button"
154
154
  onClick={handleAddSecondary}
155
155
  disabled
@@ -591,8 +591,8 @@ const MediaUploaders = ({
591
591
  return (
592
592
  <>
593
593
  <CapDivider />
594
- <CapRow className="creatives-mpush-actions">
595
- <CapRow className="mpush-actions-main">
594
+ <CapRow useLegacy className="creatives-mpush-actions">
595
+ <CapRow useLegacy className="mpush-actions-main">
596
596
  <CapHeading type="h4" className="mpush-actions">
597
597
  <FormattedMessage {...messages.buttonsAndLinks} />
598
598
  </CapHeading>
@@ -607,7 +607,7 @@ const MediaUploaders = ({
607
607
  >
608
608
  <FormattedMessage {...messages.actionOnClickBody} />
609
609
  </CapCheckbox>
610
- <CapRow>
610
+ <CapRow useLegacy>
611
611
  <CapLabel className="action-description">
612
612
  <FormattedMessage {...messages.actionDescription} />
613
613
  </CapLabel>
@@ -772,7 +772,7 @@ const MediaUploaders = ({
772
772
  title={`${formatMessage(messages.card)} ${index + 1}`}
773
773
  extra={(
774
774
  <CapButton
775
- type="flat"
775
+ type="link"
776
776
  onClick={() => deleteCarouselCard(index)}
777
777
  disabled={currentData?.length === 1}
778
778
  >
@@ -781,16 +781,16 @@ const MediaUploaders = ({
781
781
  )}
782
782
  className="mobile-push-carousel-card"
783
783
  >
784
- <CapRow>
784
+ <CapRow useLegacy>
785
785
  {carouselMediaType === IMAGE.toLowerCase() ? (
786
- <CapRow>
786
+ <CapRow useLegacy>
787
787
  <CapHeading type="h4">
788
788
  {formatMessage(messages.mediaImage)}
789
789
  </CapHeading>
790
790
  {renderCarouselImageComponent(index)}
791
791
  </CapRow>
792
792
  ) : (
793
- <CapRow>
793
+ <CapRow useLegacy>
794
794
  <CapHeading type="h4">
795
795
  {formatMessage(messages.mediaVideo)}
796
796
  </CapHeading>
@@ -809,7 +809,7 @@ const MediaUploaders = ({
809
809
  <CapDivider type="vertical" />
810
810
  <CapButton
811
811
  onClick={addCarouselCard}
812
- type="flat"
812
+ type="link"
813
813
  className="add-carousel-content-button"
814
814
  disabled={getCurrentCarouselData()?.length >= MAX_CAROUSEL_ALLOWED}
815
815
  >
@@ -849,7 +849,7 @@ const MediaUploaders = ({
849
849
  </div>
850
850
  </CapColumn>
851
851
  </CapRow>
852
- <CapRow className="mobile-push-carousel-tab">
852
+ <CapRow useLegacy className="mobile-push-carousel-tab">
853
853
  <CapTab
854
854
  defaultActiveKey="0"
855
855
  activeKey={carouselActiveTabIndex.toString()}
@@ -227,7 +227,7 @@ const PlatformContentFields = ({
227
227
  />
228
228
  </CapRow>
229
229
  <CapDivider />
230
- <CapRow className="creatives-mpush-media">
230
+ <CapRow useLegacy className="creatives-mpush-media">
231
231
  <CapHeading type="h3" className="mpush-media-type">
232
232
  <FormattedMessage {...messages.mediaType} />
233
233
  </CapHeading>
@@ -252,8 +252,8 @@ const PlatformContentFields = ({
252
252
  {content?.mediaType !== CAROUSEL && (
253
253
  <>
254
254
  <CapDivider />
255
- <CapRow className="creatives-mpush-actions">
256
- <CapRow className="mpush-actions-main">
255
+ <CapRow useLegacy className="creatives-mpush-actions">
256
+ <CapRow useLegacy className="mpush-actions-main">
257
257
  <CapHeading type="h3" className="mpush-actions">
258
258
  <FormattedMessage {...messages.buttonsAndLinks} />
259
259
  </CapHeading>
@@ -268,7 +268,7 @@ const PlatformContentFields = ({
268
268
  >
269
269
  <FormattedMessage {...messages.actionOnClickBody} />
270
270
  </CapCheckbox>
271
- <CapRow>
271
+ <CapRow useLegacy>
272
272
  <CapLabel className="action-description">
273
273
  <FormattedMessage {...messages.actionDescription} />
274
274
  </CapLabel>
@@ -2152,7 +2152,7 @@ const MobilePushNew = ({
2152
2152
  panes.push({
2153
2153
  key: ANDROID,
2154
2154
  tab: (
2155
- <CapRow>
2155
+ <CapRow useLegacy>
2156
2156
  <CapIcon type="android" />
2157
2157
  {formatMessage(messages.android)}
2158
2158
  </CapRow>
@@ -2164,7 +2164,7 @@ const MobilePushNew = ({
2164
2164
  panes.push({
2165
2165
  key: IOS,
2166
2166
  tab: (
2167
- <CapRow>
2167
+ <CapRow useLegacy>
2168
2168
  <CapIcon type="ios" />
2169
2169
  {formatMessage(messages.ios)}
2170
2170
  </CapRow>