@capillarytech/creatives-library 6.11.5 → 6.11.7
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/app.js +3 -3
- package/assets/rich-video-placeholder.svg +20 -0
- package/components/TemplatePreview/_templatePreview.scss +14 -0
- package/components/TemplatePreview/index.js +83 -3
- package/components/TemplatePreview/messages.js +8 -0
- package/config/app.js +2 -2
- package/containers/Cap/sagas.js +2 -3
- package/index.js +0 -5
- package/package.json +4 -4
- package/services/getSchema.js +0 -3
- package/translations/en.json +14 -15
- package/translations/zh.json +14 -15
- package/v2Components/BeeEditor/index.js +263 -0
- package/v2Components/BeeEditor/index.scss +11 -0
- package/v2Components/BeeEditor/messages.js +71 -0
- package/v2Components/BeeEditor/tests/index.test.js +10 -0
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/_wechatRichmediaTemplatePrev.scss +151 -151
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/messages.js +33 -33
- package/v2Components/TemplatePreview/WechatRichmediaTemplatePreview/tests/index.test.js +10 -10
- package/v2Components/TemplatePreview/_templatePreview.scss +14 -0
- package/v2Components/TemplatePreview/assets/images/androidPushMessage.svg +44 -44
- package/v2Components/TemplatePreview/assets/images/home-screen-android.svg +21 -21
- package/v2Components/TemplatePreview/assets/images/home-screen-ios.svg +16 -16
- package/v2Components/TemplatePreview/assets/images/iPhonePushMessage.svg +134 -134
- package/v2Components/TemplatePreview/assets/images/mobile.svg +23 -23
- package/v2Components/TemplatePreview/assets/images/sms_mobile_android.svg +22 -22
- package/v2Components/TemplatePreview/assets/images/user-icon.svg +18 -18
- package/v2Components/TemplatePreview/assets/images/wechat-home-screen-android.svg +21 -21
- package/v2Components/TemplatePreview/assets/images/wechat-mobile.svg +77 -77
- package/v2Components/TemplatePreview/assets/images/wechat_mobile_android.svg +20 -20
- package/v2Components/TemplatePreview/index.js +81 -2
- package/v2Components/TemplatePreview/messages.js +8 -0
- package/v2Components/TemplatePreview/tests/index.test.js +10 -10
- package/v2Containers/BeeEditor/index.js +1 -1
- package/v2Containers/Cap/actions.js +1 -1
- package/v2Containers/Cap/constants.js +3 -3
- package/v2Containers/Cap/reducer.js +3 -3
- package/v2Containers/Cap/sagas.js +8 -8
- package/v2Containers/CreativesContainer/SlideBoxContent.js +11 -0
- package/v2Containers/CreativesContainer/actions.js +27 -27
- package/v2Containers/CreativesContainer/constants.js +17 -17
- package/v2Containers/CreativesContainer/index.scss +44 -44
- package/v2Containers/CreativesContainer/messages.js +305 -305
- package/v2Containers/CreativesContainer/reducer.js +29 -29
- package/v2Containers/CreativesContainer/sagas.js +11 -11
- package/v2Containers/CreativesContainer/selectors.js +30 -30
- package/v2Containers/CreativesContainer/tests/actions.test.js +18 -18
- package/v2Containers/CreativesContainer/tests/index.test.js +10 -10
- package/v2Containers/CreativesContainer/tests/reducer.test.js +9 -9
- package/v2Containers/CreativesContainer/tests/sagas.test.js +15 -15
- package/v2Containers/CreativesContainer/tests/selectors.test.js +10 -10
- package/v2Containers/LanguageProvider/index.js +1 -1
- package/v2Containers/Line/Container/ImageMap/index.js +2 -1
- package/v2Containers/Line/Container/Video/constants.js +10 -0
- package/v2Containers/Line/Container/Video/index.js +767 -0
- package/v2Containers/Line/Container/Video/messages.js +142 -0
- package/v2Containers/Line/Container/Video/style.js +61 -0
- package/v2Containers/Line/Container/Wrapper/index.js +2 -0
- package/v2Containers/Line/Container/Wrapper/messages.js +4 -0
- package/v2Containers/Line/Container/Wrapper/utils.js +8 -3
- package/v2Containers/Line/Container/constants.js +2 -0
- package/v2Containers/Line/Container/index.js +109 -2
- package/v2Containers/Line/Container/messages.js +4 -0
- package/v2Containers/Templates/index.js +15 -1
- package/v2Containers/Templates/messages.js +4 -0
- package/v2Containers/Templates/tests/actions.test.js +18 -18
- package/v2Containers/Templates/tests/index.test.js +10 -10
- package/v2Containers/Templates/tests/reducer.test.js +9 -9
- package/v2Containers/Templates/tests/sagas.test.js +15 -15
- package/v2Containers/Templates/tests/selectors.test.js +10 -10
- package/v2Containers/TemplatesV2/TemplatesV2.style.js +29 -29
- package/v2Containers/TemplatesV2/actions.js +16 -16
- package/v2Containers/TemplatesV2/constants.js +10 -10
- package/v2Containers/TemplatesV2/messages.js +61 -61
- package/v2Containers/TemplatesV2/selectors.js +25 -25
- package/v2Containers/TemplatesV2/tests/actions.test.js +18 -18
- package/v2Containers/TemplatesV2/tests/index.test.js +10 -10
- package/v2Containers/TemplatesV2/tests/reducer.test.js +9 -9
- package/v2Containers/TemplatesV2/tests/sagas.test.js +15 -15
- package/v2Containers/TemplatesV2/tests/selectors.test.js +10 -10
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// import { take, call, put, select } from 'redux-saga/effects';
|
|
2
|
-
|
|
3
|
-
// Individual exports for testing
|
|
4
|
-
export function* defaultSaga() {
|
|
5
|
-
// See example in v2Containers/HomePage/sagas.js
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
// All sagas to be loaded
|
|
9
|
-
export default [
|
|
10
|
-
defaultSaga,
|
|
11
|
-
];
|
|
1
|
+
// import { take, call, put, select } from 'redux-saga/effects';
|
|
2
|
+
|
|
3
|
+
// Individual exports for testing
|
|
4
|
+
export function* defaultSaga() {
|
|
5
|
+
// See example in v2Containers/HomePage/sagas.js
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// All sagas to be loaded
|
|
9
|
+
export default [
|
|
10
|
+
defaultSaga,
|
|
11
|
+
];
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { createSelector } from 'reselect';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Direct selector to the creativesContainer state domain
|
|
5
|
-
*/
|
|
6
|
-
const selectCreativesContainerDomain = () => (state) => state.get('creativesContainer');
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Other specific selectors
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Default selector used by CreativesContainer
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
const makeSelectCreativesContainer = () => createSelector(
|
|
18
|
-
selectCreativesContainerDomain(),
|
|
19
|
-
(substate) => substate.toJS()
|
|
20
|
-
);
|
|
21
|
-
const isLoading = () => createSelector(
|
|
22
|
-
makeSelectCreativesContainer(),
|
|
23
|
-
(substate) => substate.containerLoader
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
export default makeSelectCreativesContainer;
|
|
27
|
-
export {
|
|
28
|
-
selectCreativesContainerDomain,
|
|
29
|
-
isLoading,
|
|
30
|
-
};
|
|
1
|
+
import { createSelector } from 'reselect';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Direct selector to the creativesContainer state domain
|
|
5
|
+
*/
|
|
6
|
+
const selectCreativesContainerDomain = () => (state) => state.get('creativesContainer');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Other specific selectors
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Default selector used by CreativesContainer
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const makeSelectCreativesContainer = () => createSelector(
|
|
18
|
+
selectCreativesContainerDomain(),
|
|
19
|
+
(substate) => substate.toJS()
|
|
20
|
+
);
|
|
21
|
+
const isLoading = () => createSelector(
|
|
22
|
+
makeSelectCreativesContainer(),
|
|
23
|
+
(substate) => substate.containerLoader
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export default makeSelectCreativesContainer;
|
|
27
|
+
export {
|
|
28
|
+
selectCreativesContainerDomain,
|
|
29
|
+
isLoading,
|
|
30
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
defaultAction,
|
|
4
|
-
} from '../actions';
|
|
5
|
-
import {
|
|
6
|
-
DEFAULT_ACTION,
|
|
7
|
-
} from '../constants';
|
|
8
|
-
|
|
9
|
-
describe('CreativesContainer actions', () => {
|
|
10
|
-
describe('Default Action', () => {
|
|
11
|
-
it('has a type of DEFAULT_ACTION', () => {
|
|
12
|
-
const expected = {
|
|
13
|
-
type: DEFAULT_ACTION,
|
|
14
|
-
};
|
|
15
|
-
expect(defaultAction()).toEqual(expected);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
});
|
|
1
|
+
|
|
2
|
+
import {
|
|
3
|
+
defaultAction,
|
|
4
|
+
} from '../actions';
|
|
5
|
+
import {
|
|
6
|
+
DEFAULT_ACTION,
|
|
7
|
+
} from '../constants';
|
|
8
|
+
|
|
9
|
+
describe('CreativesContainer actions', () => {
|
|
10
|
+
describe('Default Action', () => {
|
|
11
|
+
it('has a type of DEFAULT_ACTION', () => {
|
|
12
|
+
const expected = {
|
|
13
|
+
type: DEFAULT_ACTION,
|
|
14
|
+
};
|
|
15
|
+
expect(defaultAction()).toEqual(expected);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// import React from 'react';
|
|
2
|
-
// import { shallow } from 'enzyme';
|
|
3
|
-
|
|
4
|
-
// import { CreativesContainer } from '../index';
|
|
5
|
-
|
|
6
|
-
describe('<CreativesContainer />', () => {
|
|
7
|
-
it('Expect to have unit tests specified', () => {
|
|
8
|
-
expect(true).toEqual(true);
|
|
9
|
-
});
|
|
10
|
-
});
|
|
1
|
+
// import React from 'react';
|
|
2
|
+
// import { shallow } from 'enzyme';
|
|
3
|
+
|
|
4
|
+
// import { CreativesContainer } from '../index';
|
|
5
|
+
|
|
6
|
+
describe('<CreativesContainer />', () => {
|
|
7
|
+
it('Expect to have unit tests specified', () => {
|
|
8
|
+
expect(true).toEqual(true);
|
|
9
|
+
});
|
|
10
|
+
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import { fromJS } from 'immutable';
|
|
3
|
-
import creativesContainerReducer from '../reducer';
|
|
4
|
-
|
|
5
|
-
describe('creativesContainerReducer', () => {
|
|
6
|
-
it('returns the initial state', () => {
|
|
7
|
-
expect(creativesContainerReducer(undefined, {})).toEqual(fromJS({}));
|
|
8
|
-
});
|
|
9
|
-
});
|
|
1
|
+
|
|
2
|
+
import { fromJS } from 'immutable';
|
|
3
|
+
import creativesContainerReducer from '../reducer';
|
|
4
|
+
|
|
5
|
+
describe('creativesContainerReducer', () => {
|
|
6
|
+
it('returns the initial state', () => {
|
|
7
|
+
expect(creativesContainerReducer(undefined, {})).toEqual(fromJS({}));
|
|
8
|
+
});
|
|
9
|
+
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test sagas
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/* eslint-disable redux-saga/yield-effects */
|
|
6
|
-
// import { take, call, put, select } from 'redux-saga/effects';
|
|
7
|
-
// import { defaultSaga } from '../sagas';
|
|
8
|
-
|
|
9
|
-
// const generator = defaultSaga();
|
|
10
|
-
|
|
11
|
-
describe('defaultSaga Saga', () => {
|
|
12
|
-
it('Expect to have unit tests specified', () => {
|
|
13
|
-
expect(true).toEqual(true);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
1
|
+
/**
|
|
2
|
+
* Test sagas
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* eslint-disable redux-saga/yield-effects */
|
|
6
|
+
// import { take, call, put, select } from 'redux-saga/effects';
|
|
7
|
+
// import { defaultSaga } from '../sagas';
|
|
8
|
+
|
|
9
|
+
// const generator = defaultSaga();
|
|
10
|
+
|
|
11
|
+
describe('defaultSaga Saga', () => {
|
|
12
|
+
it('Expect to have unit tests specified', () => {
|
|
13
|
+
expect(true).toEqual(true);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
// import { fromJS } from 'immutable';
|
|
2
|
-
// import { makeSelectCreativesContainerDomain } from '../selectors';
|
|
3
|
-
|
|
4
|
-
// const selector = makeSelectCreativesContainerDomain();
|
|
5
|
-
|
|
6
|
-
describe('makeSelectCreativesContainerDomain', () => {
|
|
7
|
-
it('Expect to have unit tests specified', () => {
|
|
8
|
-
expect(true).toEqual(true);
|
|
9
|
-
});
|
|
10
|
-
});
|
|
1
|
+
// import { fromJS } from 'immutable';
|
|
2
|
+
// import { makeSelectCreativesContainerDomain } from '../selectors';
|
|
3
|
+
|
|
4
|
+
// const selector = makeSelectCreativesContainerDomain();
|
|
5
|
+
|
|
6
|
+
describe('makeSelectCreativesContainerDomain', () => {
|
|
7
|
+
it('Expect to have unit tests specified', () => {
|
|
8
|
+
expect(true).toEqual(true);
|
|
9
|
+
});
|
|
10
|
+
});
|
|
@@ -45,7 +45,7 @@ export class LanguageProvider extends React.PureComponent { // eslint-disable-li
|
|
|
45
45
|
let locale = localStorage.getItem('jlocale') || 'en';
|
|
46
46
|
moment.locale(locale);
|
|
47
47
|
if (user) {
|
|
48
|
-
locale = JSON.parse(user).lang;
|
|
48
|
+
locale = JSON.parse(user).lang || locale;
|
|
49
49
|
}
|
|
50
50
|
locale = this.getMappedLocale(locale);
|
|
51
51
|
this.props.actions.getLocizMessage(locale);
|
|
@@ -464,6 +464,7 @@ export const LineImageMap = ({
|
|
|
464
464
|
content: {
|
|
465
465
|
messages: [{
|
|
466
466
|
baseUrl = '',
|
|
467
|
+
video,
|
|
467
468
|
}] = [{}],
|
|
468
469
|
} = {},
|
|
469
470
|
} = template.versions.base;
|
|
@@ -475,7 +476,7 @@ export const LineImageMap = ({
|
|
|
475
476
|
<FormattedMessage {...messages.select} />
|
|
476
477
|
</CapButton>
|
|
477
478
|
);
|
|
478
|
-
if (baseUrl) {
|
|
479
|
+
if (baseUrl && !video) {
|
|
479
480
|
cardDataList.push(templateData);
|
|
480
481
|
}
|
|
481
482
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const LINE_IMG_HEIGHT = 400;
|
|
2
|
+
export const LINE_IMG_WIDTH = 300;
|
|
3
|
+
|
|
4
|
+
export const ALLOWED_EXTENSIONS_REGEX = (/\.(mp4)$/i);
|
|
5
|
+
export const LINE_VIDEO_SIZE = 200000000;
|
|
6
|
+
export const MAX_ALLOWED_TITLE_LENGTH = 100;
|
|
7
|
+
|
|
8
|
+
export const HIDE_ACTION_BUTTON = 'Hide';
|
|
9
|
+
export const DISPLAY_ACTION_BUTTON = 'Display';
|
|
10
|
+
export const MAX_ACTION_LABEL_LENGTH = 20;
|