@capillarytech/creatives-library 3.9.21 → 3.10.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 (85) hide show
  1. package/components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +7 -7
  2. package/components/TemplatePreview/_templatePreview.scss +20 -287
  3. package/components/TemplatePreview/index.js +31 -203
  4. package/components/TemplatePreview/messages.js +0 -21
  5. package/containers/Assets/Gallery/index.js +59 -53
  6. package/containers/Cap/index.js +0 -1
  7. package/index.js +0 -6
  8. package/package.json +1 -1
  9. package/routes.js +0 -5
  10. package/services/getSchema.js +1 -4
  11. package/translations/en.json +1 -29
  12. package/translations/zh.json +1 -29
  13. package/v2Components/FormBuilder/index.js +37 -188
  14. package/v2Components/FormBuilder/messages.js +0 -16
  15. package/v2Components/MobilePushPreviewV2/index.js +36 -44
  16. package/v2Components/MobilePushPreviewV2/messages.js +8 -0
  17. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +0 -64
  18. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/index.js +18 -100
  19. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +0 -12
  20. package/v2Components/TemplatePreview/_templatePreview.scss +4 -24
  21. package/v2Components/TemplatePreview/index.js +23 -162
  22. package/v2Components/TemplatePreview/messages.js +0 -8
  23. package/v2Containers/Assets/Gallery/index.js +48 -54
  24. package/v2Containers/CreativesContainer/SlideBoxContent.js +4 -87
  25. package/v2Containers/CreativesContainer/SlideBoxHeader.js +1 -1
  26. package/v2Containers/CreativesContainer/index.js +2 -58
  27. package/v2Containers/CreativesContainer/messages.js +2 -2
  28. package/v2Containers/Email/_email.scss +1 -7
  29. package/v2Containers/Email/index.js +14 -40
  30. package/v2Containers/Email/messages.js +0 -4
  31. package/v2Containers/Email/reducer.js +0 -1
  32. package/v2Containers/EmailWrapper/index.js +5 -7
  33. package/v2Containers/Line/Create/_lineCreate.scss +19 -40
  34. package/v2Containers/Line/Create/actions.js +9 -13
  35. package/v2Containers/Line/Create/index.js +237 -498
  36. package/v2Containers/Line/Create/messages.js +2 -42
  37. package/v2Containers/Line/Create/sagas.js +4 -10
  38. package/v2Containers/Line/Create/selectors.js +9 -3
  39. package/v2Containers/MobilePush/Create/index.js +0 -5
  40. package/v2Containers/MobilePush/Edit/index.js +0 -5
  41. package/v2Containers/MobilepushWrapper/index.js +1 -4
  42. package/v2Containers/Sms/Create/index.js +1 -2
  43. package/v2Containers/Sms/Edit/index.js +0 -2
  44. package/v2Containers/Templates/_templates.scss +1 -24
  45. package/v2Containers/Templates/actions.js +0 -7
  46. package/v2Containers/Templates/constants.js +0 -2
  47. package/v2Containers/Templates/index.js +15 -118
  48. package/v2Containers/Templates/messages.js +0 -8
  49. package/v2Containers/Templates/reducer.js +0 -2
  50. package/v2Containers/TemplatesV2/index.js +4 -5
  51. package/v2Containers/TemplatesV2/messages.js +0 -4
  52. package/assets/IPad.js +0 -23
  53. package/assets/index.js +0 -1
  54. package/assets/lineImageTemplate.png +0 -0
  55. package/components/TemplatePreview/assets/images/HomeScreenAndroid.js +0 -53
  56. package/components/TemplatePreview/assets/images/SmsMobileAndroid.js +0 -52
  57. package/components/TemplatePreview/assets/images/SmsMobileIos.js +0 -71
  58. package/components/TemplatePreview/assets/images/UserIcon.js +0 -24
  59. package/components/TemplatePreview/assets/images/WechatMobileAndroid.js +0 -53
  60. package/components/TemplatePreview/assets/images/home-screen-android.svg +0 -21
  61. package/components/TemplatePreview/assets/images/home-screen-ios.svg +0 -16
  62. package/components/TemplatePreview/assets/images/sms_mobile_android.svg +0 -22
  63. package/components/TemplatePreview/assets/images/sms_mobile_ios.svg +0 -16
  64. package/components/TemplatePreview/assets/images/wechat_mobile_android.svg +0 -20
  65. package/v2Components/TemplatePreview/assets/images/HomeScreenAndroid.js +0 -53
  66. package/v2Components/TemplatePreview/assets/images/SmsMobileAndroid.js +0 -52
  67. package/v2Components/TemplatePreview/assets/images/UserIcon.js +0 -24
  68. package/v2Components/TemplatePreview/assets/images/WechatHomeScreenAndroid.js +0 -74
  69. package/v2Components/TemplatePreview/assets/images/WechatMobileAndroid.js +0 -53
  70. package/v2Components/TemplatePreview/assets/images/home-screen-android.svg +0 -21
  71. package/v2Components/TemplatePreview/assets/images/home-screen-ios.svg +0 -16
  72. package/v2Components/TemplatePreview/assets/images/sms_mobile_android.svg +0 -22
  73. package/v2Components/TemplatePreview/assets/images/wechat-home-screen-android.svg +0 -21
  74. package/v2Components/TemplatePreview/assets/images/wechat_mobile_android.svg +0 -20
  75. package/v2Containers/Assets/images/CalltaskIllustration.js +0 -71
  76. package/v2Containers/Assets/images/EmailIllustration.js +0 -87
  77. package/v2Containers/Assets/images/ImageGalleryIllustration.js +0 -60
  78. package/v2Containers/Assets/images/PushIllustration.js +0 -60
  79. package/v2Containers/Assets/images/SmsIllustration.js +0 -191
  80. package/v2Containers/Assets/images/WechatIllustration.js +0 -90
  81. package/v2Containers/Assets/images/index.js +0 -6
  82. package/v2Containers/Line/Create/initialSchema.js +0 -378
  83. package/v2Containers/Line/CreateWrapper/constants.js +0 -2
  84. package/v2Containers/Line/CreateWrapper/index.js +0 -117
  85. package/v2Containers/Line/CreateWrapper/messages.js +0 -55
@@ -1,117 +0,0 @@
1
- /*
2
- *
3
- * CreateLineWrapper
4
- *
5
- */
6
- import React, {useState} from 'react';
7
- import { injectIntl, FormattedMessage, intlShape } from 'react-intl';
8
- import PropTypes from 'prop-types';
9
- import { CapRadioCard, CapLabel, CapButton } from '@capillarytech/cap-ui-library';
10
- import ComponentWithLabelHOC from '@capillarytech/cap-ui-library/assets/HOCs/ComponentWithLabelHOC';
11
- import styled from 'styled-components';
12
- import { CAP_SPACE_04, CAP_SPACE_08, CAP_SPACE_16 } from '@capillarytech/cap-ui-library/styled/variables';
13
- import messages from './messages';
14
- import mapTemplateImage from "../../../assets/mapTemplate.png";
15
- import lineImageTemplate from "../../../assets/lineImageTemplate.png";
16
- import { TEXT, IMAGE } from './constants';
17
- import LineCreate from '../Create';
18
-
19
- const CapRadioCardWithLabel = ComponentWithLabelHOC(CapRadioCard);
20
- const CardContainer = styled.div`
21
- margin-top: ${CAP_SPACE_16};
22
- .component-with-label-label{
23
- margin-bottom: unset;
24
- }
25
- .ant-radio-group{
26
- .ant-radio-button-wrapper{
27
- &:first-child{
28
- margin-left: unset;
29
- margin-top: unset;
30
- }
31
- }
32
-
33
- }
34
- `;
35
-
36
- const CreateLineWrapper = (props) => {
37
- const { intl: { formatMessage }, selectedAccount } = props;
38
-
39
- const getModes = (modeList) => (
40
- modeList.map(({ label, imageSrc, type, title }) => ({
41
- title: <FormattedMessage {...messages[title]}/>,
42
- content: (
43
- <>
44
- <CapLabel type="label1" style={{ paddingTop: CAP_SPACE_04, paddingBottom: CAP_SPACE_08 }}>
45
- {formatMessage(messages[label])}
46
- </CapLabel>
47
- <img alt="" className="template-image" src={imageSrc} />
48
- </>
49
- ),
50
- value: type,
51
- }))
52
- );
53
-
54
- const modes = [
55
- {
56
- title: 'textTemplateTitle',
57
- label: 'textTemplateDescription',
58
- imageSrc: mapTemplateImage,
59
- type: TEXT,
60
- },
61
- {
62
- title: 'imageTemplateTitle',
63
- label: 'imageTemplateDescription',
64
- imageSrc: lineImageTemplate,
65
- type: IMAGE,
66
- },
67
- ];
68
-
69
- const [selectedLineTemplateOption, updateSelectedLineTemplateOption] = useState();
70
- const [showOptions, onSelectContinue] = useState(true);
71
-
72
- const onOptionSelect = (event) => updateSelectedLineTemplateOption(event.target.value);
73
-
74
- if (showOptions) {
75
- return (
76
- <>
77
- <CardContainer>
78
- <CapRadioCardWithLabel
79
- label={<FormattedMessage {...messages.templateType}/>}
80
- panes={getModes(modes)}
81
- cardHeight={"364px"}
82
- onChange={onOptionSelect}
83
- selected={selectedLineTemplateOption}
84
- />
85
- </CardContainer>
86
- {
87
- selectedLineTemplateOption && (
88
- <CapButton
89
- key="submit"
90
- type="primary"
91
- onClick={() => onSelectContinue(false)}
92
- style={{marginTop: 10}}
93
- >
94
- <FormattedMessage {...messages.continue} />
95
- </CapButton>
96
- )
97
- }
98
- </>
99
- );
100
- }
101
-
102
- return (
103
- <LineCreate
104
- {...props}
105
- params={{mode: selectedLineTemplateOption}}
106
- route={{name: selectedLineTemplateOption}}
107
- selectedAccount={selectedAccount}
108
- />
109
- );
110
- };
111
-
112
- CreateLineWrapper.propTypes = {
113
- intl: intlShape.isRequired,
114
- selectedAccount: PropTypes.object,
115
- };
116
-
117
- export default injectIntl(CreateLineWrapper);
@@ -1,55 +0,0 @@
1
- /*
2
- * Create Line Messages
3
- *
4
- * This contains all the text for the Create component.
5
- */
6
- import { defineMessages } from 'react-intl';
7
-
8
- const prefix = 'creatives.containersV2.Line.CreateWrapper';
9
-
10
- export default defineMessages({
11
- "textTemplateTitle": {
12
- id: `${prefix}.textTemplateTitle`,
13
- defaultMessage: 'Text template',
14
- },
15
- "textTemplateDescription": {
16
- id: `${prefix}.textTemplateDescription`,
17
- defaultMessage: 'Used for announcing offers and transaction related information',
18
- },
19
- "imageTemplateTitle": {
20
- id: `${prefix}.imageTemplateTitle`,
21
- defaultMessage: 'Image/video template',
22
- },
23
- "imageTemplateDescription": {
24
- id: `${prefix}.imageTemplateDescription`,
25
- defaultMessage: 'Used for creating image or video content',
26
- },
27
- "hybridTemplateTitle": {
28
- id: `${prefix}.hybridTemplateTitle`,
29
- defaultMessage: 'Hybrid',
30
- },
31
- "hybridTemplateDescription": {
32
- id: `${prefix}.hybridTemplateDescription`,
33
- defaultMessage: 'Used to create combined text & image or video content',
34
- },
35
- "templateType": {
36
- id: `${prefix}.templateType`,
37
- defaultMessage: 'Select the type of content',
38
- },
39
- "continue": {
40
- id: `${prefix}.continue`,
41
- defaultMessage: 'Continue',
42
- },
43
- "accountLineListTitle": {
44
- id: `${prefix}.accountLineListTitle`,
45
- defaultMessage: 'Line accounts',
46
- },
47
- "accountLineListDescription": {
48
- id: `${prefix}.accountLineListDescription`,
49
- defaultMessage: 'Choose the account to send content',
50
- },
51
- "accountLineNoListTitle": {
52
- id: `${prefix}.accountLineNoListTitle`,
53
- defaultMessage: 'No line accounts present',
54
- },
55
- });