@capillarytech/creatives-library 6.8.2 → 6.8.3

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 (60) hide show
  1. package/package.json +1 -1
  2. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +151 -151
  3. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +33 -33
  4. package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/tests/index.test.js +10 -10
  5. package/v2Components/TemplatePreview/_templatePreview.scss +380 -380
  6. package/v2Components/TemplatePreview/assets/images/androidPushMessage.svg +44 -44
  7. package/v2Components/TemplatePreview/assets/images/home-screen-android.svg +21 -21
  8. package/v2Components/TemplatePreview/assets/images/home-screen-ios.svg +16 -16
  9. package/v2Components/TemplatePreview/assets/images/iPhonePushMessage.svg +134 -134
  10. package/v2Components/TemplatePreview/assets/images/mobile.svg +23 -23
  11. package/v2Components/TemplatePreview/assets/images/sms_mobile_android.svg +22 -22
  12. package/v2Components/TemplatePreview/assets/images/user-icon.svg +18 -18
  13. package/v2Components/TemplatePreview/assets/images/wechat-home-screen-android.svg +21 -21
  14. package/v2Components/TemplatePreview/assets/images/wechat-mobile.svg +77 -77
  15. package/v2Components/TemplatePreview/assets/images/wechat_mobile_android.svg +20 -20
  16. package/v2Components/TemplatePreview/index.js +1 -1
  17. package/v2Components/TemplatePreview/tests/index.test.js +10 -10
  18. package/v2Containers/Assets/Gallery/index.js +3 -0
  19. package/v2Containers/Assets/Gallery/selectors.js +9 -4
  20. package/v2Containers/CreativesContainer/SlideBoxFooter.js +51 -51
  21. package/v2Containers/CreativesContainer/actions.js +27 -27
  22. package/v2Containers/CreativesContainer/constants.js +17 -17
  23. package/v2Containers/CreativesContainer/index.scss +44 -44
  24. package/v2Containers/CreativesContainer/messages.js +305 -305
  25. package/v2Containers/CreativesContainer/reducer.js +29 -29
  26. package/v2Containers/CreativesContainer/sagas.js +11 -11
  27. package/v2Containers/CreativesContainer/selectors.js +30 -30
  28. package/v2Containers/CreativesContainer/tests/actions.test.js +18 -18
  29. package/v2Containers/CreativesContainer/tests/index.test.js +10 -10
  30. package/v2Containers/CreativesContainer/tests/reducer.test.js +9 -9
  31. package/v2Containers/CreativesContainer/tests/sagas.test.js +15 -15
  32. package/v2Containers/CreativesContainer/tests/selectors.test.js +10 -10
  33. package/v2Containers/Line/Container/Drawer/index.js +3 -31
  34. package/v2Containers/Line/Container/Image/index.js +6 -35
  35. package/v2Containers/Line/Container/ImageMap/constants.js +1 -1
  36. package/v2Containers/Line/Container/ImageMap/index.js +8 -9
  37. package/v2Containers/Line/Container/Text/index.js +0 -1
  38. package/v2Containers/Line/Container/Wrapper/index.js +0 -1
  39. package/v2Containers/Line/Container/index.js +1 -33
  40. package/v2Containers/Templates/_templates.scss +405 -405
  41. package/v2Containers/Templates/actions.js +117 -117
  42. package/v2Containers/Templates/constants.js +47 -47
  43. package/v2Containers/Templates/reducer.js +145 -145
  44. package/v2Containers/Templates/sagas.js +179 -179
  45. package/v2Containers/Templates/tests/actions.test.js +18 -18
  46. package/v2Containers/Templates/tests/index.test.js +10 -10
  47. package/v2Containers/Templates/tests/reducer.test.js +9 -9
  48. package/v2Containers/Templates/tests/sagas.test.js +15 -15
  49. package/v2Containers/Templates/tests/selectors.test.js +10 -10
  50. package/v2Containers/TemplatesV2/TemplatesV2.style.js +29 -29
  51. package/v2Containers/TemplatesV2/actions.js +16 -16
  52. package/v2Containers/TemplatesV2/constants.js +10 -10
  53. package/v2Containers/TemplatesV2/messages.js +61 -61
  54. package/v2Containers/TemplatesV2/selectors.js +25 -25
  55. package/v2Containers/TemplatesV2/tests/actions.test.js +18 -18
  56. package/v2Containers/TemplatesV2/tests/index.test.js +10 -10
  57. package/v2Containers/TemplatesV2/tests/reducer.test.js +9 -9
  58. package/v2Containers/TemplatesV2/tests/sagas.test.js +15 -15
  59. package/v2Containers/TemplatesV2/tests/selectors.test.js +10 -10
  60. package/v2Containers/Line/Container/Drawer/messages.js +0 -20
@@ -1,20 +1,20 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="220" height="472" viewBox="0 0 220 472">
2
- <g fill="none" fill-rule="evenodd">
3
- <rect width="220" height="472" fill="#101211" rx="26"/>
4
- <rect width="202" height="404" x="9" y="36" fill="#F4F5F7" rx="9"/>
5
- <rect width="182" height="136" x="19" y="112" fill="#F4F5F7" rx="17.5"/>
6
- <path fill="#F4F5F7" d="M18 36h184c4.97 0 9 4.03 9 9v6H9v-6c0-4.97 4.03-9 9-9z"/>
7
- <path fill="#F4F5F7" d="M9 51H211V82H9z" transform="matrix(1 0 0 -1 0 133)"/>
8
- <rect width="52" height="5" x="84" y="14" fill="#2E2E2E" rx="2.5"/>
9
- <rect width="52" height="5" x="84" y="455" fill="#2E2E2E" rx="2.5"/>
10
- <circle cx="45.5" cy="19.5" r="5.5" fill="#2E2E2E"/>
11
- <circle cx="65.5" cy="19.5" r="3.5" fill="#2E2E2E"/>
12
- <text fill="#000" font-family="Roboto-Regular, Roboto" font-size="12" letter-spacing=".175">
13
- <tspan x="49.5" y="71">Muji India</tspan>
14
- </text>
15
- <circle cx="199" cy="63" r="1" fill="#000"/>
16
- <circle cx="199" cy="70" r="1" fill="#000"/>
17
- <circle cx="199" cy="66.5" r="1" fill="#000"/>
18
- <path fill="#000" d="M28 66c0 .279-.226.505-.505.505h-5.556l2.42 2.42c.198.197.198.518 0 .716-.198.198-.52.198-.718 0l-2.934-2.934c-.39-.39-.39-1.024 0-1.414l2.934-2.934c.198-.198.52-.198.718 0 .198.198.198.519 0 .717l-2.42 2.419h5.556c.279 0 .505.226.505.505z"/>
19
- </g>
20
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="220" height="472" viewBox="0 0 220 472">
2
+ <g fill="none" fill-rule="evenodd">
3
+ <rect width="220" height="472" fill="#101211" rx="26"/>
4
+ <rect width="202" height="404" x="9" y="36" fill="#F4F5F7" rx="9"/>
5
+ <rect width="182" height="136" x="19" y="112" fill="#F4F5F7" rx="17.5"/>
6
+ <path fill="#F4F5F7" d="M18 36h184c4.97 0 9 4.03 9 9v6H9v-6c0-4.97 4.03-9 9-9z"/>
7
+ <path fill="#F4F5F7" d="M9 51H211V82H9z" transform="matrix(1 0 0 -1 0 133)"/>
8
+ <rect width="52" height="5" x="84" y="14" fill="#2E2E2E" rx="2.5"/>
9
+ <rect width="52" height="5" x="84" y="455" fill="#2E2E2E" rx="2.5"/>
10
+ <circle cx="45.5" cy="19.5" r="5.5" fill="#2E2E2E"/>
11
+ <circle cx="65.5" cy="19.5" r="3.5" fill="#2E2E2E"/>
12
+ <text fill="#000" font-family="Roboto-Regular, Roboto" font-size="12" letter-spacing=".175">
13
+ <tspan x="49.5" y="71">Muji India</tspan>
14
+ </text>
15
+ <circle cx="199" cy="63" r="1" fill="#000"/>
16
+ <circle cx="199" cy="70" r="1" fill="#000"/>
17
+ <circle cx="199" cy="66.5" r="1" fill="#000"/>
18
+ <path fill="#000" d="M28 66c0 .279-.226.505-.505.505h-5.556l2.42 2.42c.198.197.198.518 0 .716-.198.198-.52.198-.718 0l-2.934-2.934c-.39-.39-.39-1.024 0-1.414l2.934-2.934c.198-.198.52-.198.718 0 .198.198.198.519 0 .717l-2.42 2.419h5.556c.279 0 .505.226.505.505z"/>
19
+ </g>
20
+ </svg>
@@ -308,7 +308,7 @@ class TemplatePreview extends React.Component { // eslint-disable-line react/pre
308
308
  }
309
309
  {
310
310
  channel && channel.toLowerCase() === 'line' ? (
311
- <div className="shell-v2 align-center" id="sms-preview">
311
+ <div className="shell-v2 align-center" id="sms-preview" style={{ marginLeft: 12 }}>
312
312
  <CapImage className="preview-image" src={lineMobileAndroid} alt={this.props.intl.formatMessage(messages.previewGenerated)}/>
313
313
  <div
314
314
  className="msgContainer line-preview"
@@ -1,10 +1,10 @@
1
- // import React from 'react';
2
- // import { shallow } from 'enzyme';
3
-
4
- // import TemplatePreview from '../index';
5
-
6
- describe('<TemplatePreview />', () => {
7
- it('Expect to have unit tests specified', () => {
8
- expect(true).toEqual(false);
9
- });
10
- });
1
+ // import React from 'react';
2
+ // import { shallow } from 'enzyme';
3
+
4
+ // import TemplatePreview from '../index';
5
+
6
+ describe('<TemplatePreview />', () => {
7
+ it('Expect to have unit tests specified', () => {
8
+ expect(true).toEqual(false);
9
+ });
10
+ });
@@ -339,6 +339,9 @@ export class Gallery extends React.Component { // eslint-disable-line react/pref
339
339
  if (this.props.isLineAsset) {
340
340
  templateData.hoverOption = <CapButton onClick={() => this.props.onGalleryImageSelect(template)}><FormattedMessage {...messages.select} /></CapButton>;
341
341
  }
342
+ if (this.props.isLibraryAsset) {
343
+ templateData.hoverOption = <CapButton onClick={() => this.props.onGalleryImageSelect(template)}><FormattedMessage {...messages.select} /></CapButton>;
344
+ }
342
345
  const secureFilePath = _.get(template, 'metaInfo.secure_file_path');
343
346
  templateData.url = secureFilePath || _.get(template, 'metaInfo.public_url');
344
347
  return templateData;
@@ -13,11 +13,16 @@ const selectGalleryDomain = () => (state) => state.get('gallery');
13
13
  /**
14
14
  * Default selector used by Gallery
15
15
  */
16
-
16
+ const initialState = {
17
+ assetList: [],
18
+ assetUploading: false,
19
+ fetchingAllAssets: false,
20
+ };
17
21
  const makeSelectGallery = () => createSelector(
18
- selectGalleryDomain(),
19
- (substate) => substate.toJS()
20
- );
22
+ selectGalleryDomain(),
23
+ (substate) => substate ? substate.toJS() : initialState
24
+ );
25
+
21
26
 
22
27
  export default makeSelectGallery;
23
28
  export {
@@ -1,51 +1,51 @@
1
- import React from 'react';
2
- import { FormattedMessage } from 'react-intl';
3
- import { CapButton } from '@capillarytech/cap-ui-library';
4
- import PropTypes from 'prop-types';
5
- import messages from './messages';
6
- function getFullModeSaveBtn(slidBoxContent) {
7
- return slidBoxContent === "editTemplate" ?
8
- <FormattedMessage {...messages.creativesTemplatesUpdate}/>
9
- :
10
- <FormattedMessage {...messages.creativesTemplatesSaveFullMode}/>;
11
- }
12
- function SlideBoxFooter(props) {
13
- const { slidBoxContent, onSave, onEditTemplate, onCreateNextStep, isFullMode} = props;
14
- return (
15
- <div>
16
- <div>
17
- {props.shouldShowDoneFooter() && (
18
- <div>
19
- <CapButton onClick={onSave}>
20
- {isFullMode ?
21
- getFullModeSaveBtn(slidBoxContent)
22
- :
23
- <FormattedMessage {...messages.creativesTemplatesSave} />
24
- }
25
- </CapButton>
26
- {/* {isFullMode && <CapButton type="secondary" onClick={onDiscard}><FormattedMessage {...messages.creativesTemplatesDiscard}/></CapButton>} */}
27
- </div>)}
28
- {props.shouldShowContinueFooter() &&
29
- <CapButton onClick={onCreateNextStep}>
30
- <FormattedMessage {...messages.continue} />
31
- </CapButton>
32
- }
33
- {slidBoxContent === 'preview' && (
34
- <CapButton onClick={onEditTemplate} type="secondary">
35
- <FormattedMessage {...messages.creativesTemplatesEdit} />
36
- </CapButton>
37
- )}
38
- </div>
39
- </div>
40
- );
41
- }
42
- SlideBoxFooter.propTypes = {
43
- slidBoxContent: PropTypes.node,
44
- onSave: PropTypes.func,
45
- onEditTemplate: PropTypes.func,
46
- onCreateNextStep: PropTypes.func,
47
- shouldShowContinueFooter: PropTypes.func,
48
- shouldShowDoneFooter: PropTypes.func,
49
- isFullMode: PropTypes.bool,
50
- };
51
- export default SlideBoxFooter;
1
+ import React from 'react';
2
+ import { FormattedMessage } from 'react-intl';
3
+ import { CapButton } from '@capillarytech/cap-ui-library';
4
+ import PropTypes from 'prop-types';
5
+ import messages from './messages';
6
+ function getFullModeSaveBtn(slidBoxContent) {
7
+ return slidBoxContent === "editTemplate" ?
8
+ <FormattedMessage {...messages.creativesTemplatesUpdate}/>
9
+ :
10
+ <FormattedMessage {...messages.creativesTemplatesSaveFullMode}/>;
11
+ }
12
+ function SlideBoxFooter(props) {
13
+ const { slidBoxContent, onSave, onEditTemplate, onCreateNextStep, isFullMode} = props;
14
+ return (
15
+ <div>
16
+ <div>
17
+ {props.shouldShowDoneFooter() && (
18
+ <div>
19
+ <CapButton onClick={onSave}>
20
+ {isFullMode ?
21
+ getFullModeSaveBtn(slidBoxContent)
22
+ :
23
+ <FormattedMessage {...messages.creativesTemplatesSave} />
24
+ }
25
+ </CapButton>
26
+ {/* {isFullMode && <CapButton type="secondary" onClick={onDiscard}><FormattedMessage {...messages.creativesTemplatesDiscard}/></CapButton>} */}
27
+ </div>)}
28
+ {props.shouldShowContinueFooter() &&
29
+ <CapButton onClick={onCreateNextStep}>
30
+ <FormattedMessage {...messages.continue} />
31
+ </CapButton>
32
+ }
33
+ {slidBoxContent === 'preview' && (
34
+ <CapButton onClick={onEditTemplate} type="secondary">
35
+ <FormattedMessage {...messages.creativesTemplatesEdit} />
36
+ </CapButton>
37
+ )}
38
+ </div>
39
+ </div>
40
+ );
41
+ }
42
+ SlideBoxFooter.propTypes = {
43
+ slidBoxContent: PropTypes.node,
44
+ onSave: PropTypes.func,
45
+ onEditTemplate: PropTypes.func,
46
+ onCreateNextStep: PropTypes.func,
47
+ shouldShowContinueFooter: PropTypes.func,
48
+ shouldShowDoneFooter: PropTypes.func,
49
+ isFullMode: PropTypes.bool,
50
+ };
51
+ export default SlideBoxFooter;
@@ -1,27 +1,27 @@
1
- /*
2
- *
3
- * CreativesContainer actions
4
- *
5
- */
6
-
7
- import {
8
- DEFAULT_ACTION,
9
- HIDE_CONTAINER_LOADER,
10
- SHOW_CONTANER_LOADER,
11
- } from './constants';
12
-
13
- export function defaultAction() {
14
- return {
15
- type: DEFAULT_ACTION,
16
- };
17
- }
18
- export function showCreativesContainerLoader() {
19
- return {
20
- type: SHOW_CONTANER_LOADER,
21
- };
22
- }
23
- export function hideCreativesContanerLoader() {
24
- return {
25
- type: HIDE_CONTAINER_LOADER,
26
- };
27
- }
1
+ /*
2
+ *
3
+ * CreativesContainer actions
4
+ *
5
+ */
6
+
7
+ import {
8
+ DEFAULT_ACTION,
9
+ HIDE_CONTAINER_LOADER,
10
+ SHOW_CONTANER_LOADER,
11
+ } from './constants';
12
+
13
+ export function defaultAction() {
14
+ return {
15
+ type: DEFAULT_ACTION,
16
+ };
17
+ }
18
+ export function showCreativesContainerLoader() {
19
+ return {
20
+ type: SHOW_CONTANER_LOADER,
21
+ };
22
+ }
23
+ export function hideCreativesContanerLoader() {
24
+ return {
25
+ type: HIDE_CONTAINER_LOADER,
26
+ };
27
+ }
@@ -1,17 +1,17 @@
1
- /*
2
- *
3
- * CreativesContainer constants
4
- *
5
- */
6
-
7
- export const DEFAULT_ACTION = 'app/CreativesContainer/DEFAULT_ACTION';
8
- export const EMAIL = "EMAIL";
9
- export const SMS = "SMS";
10
- export const EBILL = "EBILL";
11
- export const LINE = "LINE";
12
- export const CALL_TASK = "CALL_TASK";
13
- export const MOBILE_PUSH = "MOBILEPUSH";
14
- export const WECHAT = "WECHAT";
15
- export const FACEBOOK = "FACEBOOK";
16
- export const SHOW_CONTANER_LOADER = "app/CreativesContainer/SHOW_CONTANER_LOADER";
17
- export const HIDE_CONTAINER_LOADER = "app/CreativesContainer/HIDE_CONTAINER_LOADER";
1
+ /*
2
+ *
3
+ * CreativesContainer constants
4
+ *
5
+ */
6
+
7
+ export const DEFAULT_ACTION = 'app/CreativesContainer/DEFAULT_ACTION';
8
+ export const EMAIL = "EMAIL";
9
+ export const SMS = "SMS";
10
+ export const EBILL = "EBILL";
11
+ export const LINE = "LINE";
12
+ export const CALL_TASK = "CALL_TASK";
13
+ export const MOBILE_PUSH = "MOBILEPUSH";
14
+ export const WECHAT = "WECHAT";
15
+ export const FACEBOOK = "FACEBOOK";
16
+ export const SHOW_CONTANER_LOADER = "app/CreativesContainer/SHOW_CONTANER_LOADER";
17
+ export const HIDE_CONTAINER_LOADER = "app/CreativesContainer/HIDE_CONTAINER_LOADER";
@@ -1,45 +1,45 @@
1
- @import '~@capillarytech/cap-ui-library/styles/_variables.scss';
2
-
3
- $classPrefix: add-creatives-section;
4
-
5
- .#{$classPrefix} {
6
- &.creatives-library-mode{
7
- .sms-create-container, .sms-email-container{
8
- .ant-tabs-top-bar{
9
- display: none;
10
- }
11
- }
12
- }
13
- .#{$classPrefix}-footer {
14
- position: absolute;
15
- bottom: 0;
16
- left: 1px;
17
- padding: 0 12px;
18
- display: flex;
19
- align-items: center;
20
- height: 48px;
21
- border-top: 1px solid $CAP_G07;
22
-
23
- &.with-creative {
24
- width: 100%;
25
- }
26
- }
27
- .wechat-steps {
28
- width: 40% !important;
29
- left: 20%;
30
- position: relative;
31
- .ant-steps-item-title::after {
32
- top: 8px;
33
- }
34
- .ant-steps-item-content {
35
- vertical-align: middle;
36
- padding-top: 4px;
37
- }
38
- }
39
- }
40
-
41
- .map-template-create {
42
- .slidebox-header div:first-child {
43
- width: 100%;
44
- }
1
+ @import '~@capillarytech/cap-ui-library/styles/_variables.scss';
2
+
3
+ $classPrefix: add-creatives-section;
4
+
5
+ .#{$classPrefix} {
6
+ &.creatives-library-mode{
7
+ .sms-create-container, .sms-email-container{
8
+ .ant-tabs-top-bar{
9
+ display: none;
10
+ }
11
+ }
12
+ }
13
+ .#{$classPrefix}-footer {
14
+ position: absolute;
15
+ bottom: 0;
16
+ left: 1px;
17
+ padding: 0 12px;
18
+ display: flex;
19
+ align-items: center;
20
+ height: 48px;
21
+ border-top: 1px solid $CAP_G07;
22
+
23
+ &.with-creative {
24
+ width: 100%;
25
+ }
26
+ }
27
+ .wechat-steps {
28
+ width: 40% !important;
29
+ left: 20%;
30
+ position: relative;
31
+ .ant-steps-item-title::after {
32
+ top: 8px;
33
+ }
34
+ .ant-steps-item-content {
35
+ vertical-align: middle;
36
+ padding-top: 4px;
37
+ }
38
+ }
39
+ }
40
+
41
+ .map-template-create {
42
+ .slidebox-header div:first-child {
43
+ width: 100%;
44
+ }
45
45
  }