mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -05:00
Merge remote-tracking branch 'upstream/devel' into devel
This commit is contained in:
commit
a92fdc7520
36 changed files with 273 additions and 137 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Vulcan",
|
||||
"version": "1.12.14",
|
||||
"version": "1.12.16",
|
||||
"engines": {
|
||||
"npm": "^3.0"
|
||||
},
|
||||
|
@ -8,7 +8,7 @@
|
|||
"start": "meteor --settings settings.json",
|
||||
"visualizer": "meteor --extra-packages bundle-visualizer --production --settings settings.json",
|
||||
"lint": "eslint --cache --ext .jsx,js packages",
|
||||
"lintfix": "eslint --cache --ext .jsx,js packages --fix",
|
||||
"lintfix": "eslint --cache --fix --ext .jsx,js packages",
|
||||
"test-unit": "TEST_WATCH=1 meteor test-packages ./packages/* --port 3002 --driver-package meteortesting:mocha --raw-logs",
|
||||
"test": "npm run test-unit",
|
||||
"prettier": "node ./.vulcan/prettier/index.js write-changed",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:accounts',
|
||||
version: '1.12.14',
|
||||
version: '1.12.16',
|
||||
summary: 'Accounts UI for React in Meteor 1.3+',
|
||||
git: 'https://github.com/studiointeract/accounts-ui',
|
||||
documentation: 'README.md',
|
||||
|
@ -8,8 +8,8 @@ Package.describe({
|
|||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use('vulcan:core@1.12.14');
|
||||
|
||||
api.use('vulcan:core@1.12.16');
|
||||
|
||||
api.use('ecmascript');
|
||||
api.use('tracker');
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:admin',
|
||||
summary: 'Vulcan components package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
|
@ -12,7 +12,8 @@ Package.onUse(function(api) {
|
|||
'fourseven:scss@4.10.0',
|
||||
'dynamic-import@0.1.1',
|
||||
// Vulcan packages
|
||||
'vulcan:core@1.12.14',
|
||||
'vulcan:core@1.12.16',
|
||||
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:cloudinary',
|
||||
summary: 'Vulcan file upload package.',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14']);
|
||||
api.use([
|
||||
'vulcan:core@1.12.16'
|
||||
]);
|
||||
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:core',
|
||||
summary: 'Vulcan core package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use([
|
||||
'vulcan:lib@1.12.14',
|
||||
'vulcan:i18n@1.12.14',
|
||||
'vulcan:users@1.12.14',
|
||||
'vulcan:routing@1.12.14',
|
||||
'vulcan:debug@1.12.14',
|
||||
'vulcan:lib@1.12.16',
|
||||
'vulcan:i18n@1.12.16',
|
||||
'vulcan:users@1.12.16',
|
||||
'vulcan:routing@1.12.16',
|
||||
'vulcan:debug@1.12.16'
|
||||
]);
|
||||
|
||||
api.imply(['vulcan:lib@1.12.14']);
|
||||
api.imply(['vulcan:lib@1.12.16']);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
|
@ -54,6 +54,13 @@ describe('vulcan-core/components', function () {
|
|||
const context = {
|
||||
intl: {
|
||||
formatMessage: () => { },
|
||||
formatDate: () => { },
|
||||
formatTime: () => { },
|
||||
formatRelative: () => { },
|
||||
formatNumber: () => { },
|
||||
formatPlural: () => { },
|
||||
formatHTMLMessage: () => { },
|
||||
now: () => { }
|
||||
}
|
||||
};
|
||||
it('mounts a static version', function () {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:debug',
|
||||
summary: 'Vulcan debug package',
|
||||
version: '1.12.14',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
debugOnly: true,
|
||||
});
|
||||
|
@ -15,8 +15,9 @@ Package.onUse(function(api) {
|
|||
|
||||
// Vulcan packages
|
||||
|
||||
'vulcan:lib@1.12.14',
|
||||
'vulcan:email@1.12.14',
|
||||
'vulcan:lib@1.12.16',
|
||||
'vulcan:email@1.12.16',
|
||||
|
||||
]);
|
||||
|
||||
api.addFiles(['lib/stylesheets/debug.scss'], ['client']);
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:email',
|
||||
summary: 'Vulcan email package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:lib@1.12.14']);
|
||||
api.use([
|
||||
'vulcan:lib@1.12.16'
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server.js', 'server');
|
||||
api.mainModule('lib/client.js', 'client');
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:embed',
|
||||
summary: 'Vulcan Embed package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['http', 'vulcan:core@1.12.14', 'fourseven:scss@4.10.0']);
|
||||
api.use([
|
||||
'http',
|
||||
'vulcan:core@1.12.16',
|
||||
'fourseven:scss@4.10.0'
|
||||
]);
|
||||
|
||||
|
||||
api.addFiles(['lib/stylesheets/embedly.scss'], ['client']);
|
||||
|
||||
|
|
|
@ -1,15 +1,20 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:errors-sentry',
|
||||
summary: 'Vulcan Sentry error tracking package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['ecmascript', 'vulcan:core@1.12.14', 'vulcan:users@1.12.14', 'vulcan:errors@1.12.14']);
|
||||
|
||||
|
||||
api.use([
|
||||
'ecmascript',
|
||||
'vulcan:core@1.12.16',
|
||||
'vulcan:users@1.12.16',
|
||||
'vulcan:errors@1.12.16',
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
});
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:errors',
|
||||
summary: 'Vulcan error tracking package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['ecmascript', 'vulcan:core@1.12.14']);
|
||||
|
||||
api.use([
|
||||
'ecmascript',
|
||||
'vulcan:core@1.12.16',
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:events-ga',
|
||||
summary: 'Vulcan Google Analytics event tracking package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14', 'vulcan:events@1.12.14']);
|
||||
|
||||
api.use([
|
||||
'vulcan:core@1.12.16',
|
||||
'vulcan:events@1.12.16',
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:events-intercom',
|
||||
summary: 'Vulcan Intercom integration package.',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14', 'vulcan:events@1.12.14']);
|
||||
api.use([
|
||||
'vulcan:core@1.12.16',
|
||||
'vulcan:events@1.12.16'
|
||||
]);
|
||||
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:events-internal',
|
||||
summary: 'Vulcan internal event tracking package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14', 'vulcan:events@1.12.14']);
|
||||
|
||||
api.use([
|
||||
'vulcan:core@1.12.16',
|
||||
'vulcan:events@1.12.16',
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:events-segment',
|
||||
summary: 'Vulcan Segment',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14', 'vulcan:events@1.12.14']);
|
||||
api.use([
|
||||
'vulcan:core@1.12.16',
|
||||
'vulcan:events@1.12.16',
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:events',
|
||||
summary: 'Vulcan event tracking package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14']);
|
||||
|
||||
api.use([
|
||||
'vulcan:core@1.12.16',
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:forms-tags',
|
||||
summary: 'Vulcan tag input package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14', 'vulcan:forms@1.12.14']);
|
||||
api.use([
|
||||
'vulcan:core@1.12.16',
|
||||
'vulcan:forms@1.12.16'
|
||||
]);
|
||||
|
||||
api.mainModule('lib/export.js', ['client', 'server']);
|
||||
});
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:forms-upload',
|
||||
summary: 'Vulcan package extending vulcan:forms to upload images to Cloudinary from a drop zone.',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/xavcz/nova-forms-upload.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/xavcz/nova-forms-upload.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14', 'vulcan:forms@1.12.14', 'fourseven:scss@4.10.0']);
|
||||
api.use([
|
||||
'vulcan:core@1.12.16',
|
||||
'vulcan:forms@1.12.16',
|
||||
'fourseven:scss@4.10.0'
|
||||
]);
|
||||
|
||||
api.addFiles(['lib/Upload.scss'], 'client');
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ class FormNestedArray extends PureComponent {
|
|||
removeItem={() => {
|
||||
this.removeItem(i);
|
||||
}}
|
||||
hideRemove={minCount && arrayLength <= minCount}
|
||||
hideRemove={!!minCount && arrayLength <= minCount}
|
||||
/>
|
||||
<FormComponents.FormNestedDivider
|
||||
label={this.props.label}
|
||||
|
@ -120,6 +120,14 @@ FormNestedArray.propTypes = {
|
|||
currentValues: PropTypes.object,
|
||||
path: PropTypes.string,
|
||||
label: PropTypes.string,
|
||||
minCount: PropTypes.oneOfType([
|
||||
PropTypes.number,
|
||||
PropTypes.func
|
||||
]),
|
||||
maxCount: PropTypes.oneOfType([
|
||||
PropTypes.number,
|
||||
PropTypes.func
|
||||
]),
|
||||
errors: PropTypes.array.isRequired,
|
||||
deletedValues: PropTypes.array.isRequired,
|
||||
formComponents: PropTypes.object.isRequired
|
||||
|
|
|
@ -73,7 +73,8 @@ const FormNestedItem = (
|
|||
FormNestedItem.propTypes = {
|
||||
path: PropTypes.string.isRequired,
|
||||
itemIndex: PropTypes.number,
|
||||
formComponents: PropTypes.object
|
||||
formComponents: PropTypes.object,
|
||||
hideRemove: PropTypes.bool
|
||||
};
|
||||
|
||||
FormNestedItem.contextTypes = {
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:forms',
|
||||
summary: 'Form containers for React',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/meteor-utilities/react-form-containers.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/meteor-utilities/react-form-containers.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14']);
|
||||
api.use(['vulcan:core@1.12.16']);
|
||||
|
||||
api.mainModule('lib/client/main.js', ['client']);
|
||||
api.mainModule('lib/server/main.js', ['server']);
|
||||
|
|
|
@ -4,7 +4,7 @@ import React from 'react';
|
|||
// TODO: should be loaded from Components instead?
|
||||
import Form from '../lib/components/Form';
|
||||
import FormComponent from '../lib/components/FormComponent';
|
||||
import '../lib/components/FormNestedArray';
|
||||
import FormNestedArray from '../lib/components/FormNestedArray';
|
||||
import expect from 'expect';
|
||||
|
||||
import { mount, shallow } from 'enzyme';
|
||||
|
@ -395,37 +395,87 @@ describe('vulcan-forms/components', function() {
|
|||
});
|
||||
});
|
||||
|
||||
describe('FormNestedArray - Display the input n times', function() {
|
||||
describe('FormNestedArray', function() {
|
||||
const defaultProps = {
|
||||
errors: [],
|
||||
deletedValues: [],
|
||||
path: 'foobar',
|
||||
formComponents: Components
|
||||
formComponents: Components,
|
||||
//nestedFields: []
|
||||
};
|
||||
it('shallow render', function() {
|
||||
const wrapper = shallow(<Components.FormNestedArray {...defaultProps} currentValues={{}} />);
|
||||
expect(wrapper).toBeDefined();
|
||||
|
||||
describe('Display the input n times', function() {
|
||||
it('shallow render', function() {
|
||||
const wrapper = shallow(<FormNestedArray {...defaultProps} currentValues={{}} />);
|
||||
expect(wrapper).toBeDefined();
|
||||
});
|
||||
// TODO: broken now we use a layout...
|
||||
it.skip('shows an add button when empty', function() {
|
||||
const wrapper = mount(<FormNestedArray {...defaultProps} currentValues={{}} />);
|
||||
const addButton = wrapper.find('IconAdd');
|
||||
expect(addButton).toHaveLength(1);
|
||||
});
|
||||
it.skip('shows 3 items', function() {
|
||||
const wrapper = mount(<FormNestedArray {...defaultProps} currentValues={{}} value={[1, 2, 3]} />);
|
||||
const nestedItem = wrapper.find('FormNestedItem');
|
||||
expect(nestedItem).toHaveLength(3);
|
||||
});
|
||||
it.skip('pass the correct path and itemIndex to each form', function() {
|
||||
const wrapper = mount(<FormNestedArray {...defaultProps} currentValues={{}} value={[1, 2]} />);
|
||||
const nestedItem = wrapper.find('FormNestedItem');
|
||||
const item0 = nestedItem.at(0);
|
||||
const item1 = nestedItem.at(1);
|
||||
expect(item0.prop('itemIndex')).toEqual(0);
|
||||
expect(item1.prop('itemIndex')).toEqual(1);
|
||||
expect(item0.prop('path')).toEqual('foobar.0');
|
||||
expect(item1.prop('path')).toEqual('foobar.1');
|
||||
});
|
||||
});
|
||||
// TODO: broken now we use a layout...
|
||||
it.skip('shows an add button when empty', function() {
|
||||
const wrapper = mount(<Components.FormNestedArray {...defaultProps} currentValues={{}} />);
|
||||
const addButton = wrapper.find('IconAdd');
|
||||
expect(addButton).toHaveLength(1);
|
||||
describe('maxCount', function() {
|
||||
const props = {
|
||||
...defaultProps,
|
||||
maxCount: 2
|
||||
}
|
||||
it('should display add button if items < maxCount', function(){
|
||||
const wrapper = shallow(<FormNestedArray {...props} currentValues={{}} value={[1]} />);
|
||||
const layout = wrapper.find('FormNestedArrayLayout').first();
|
||||
const formFooter = !!layout.prop('content')[1];
|
||||
expect(formFooter).toEqual(true);
|
||||
});
|
||||
it('should not display add button if items >= maxCount', function(){
|
||||
const wrapper = shallow(<FormNestedArray {...props} currentValues={{}} value={[1, 2]} />);
|
||||
const layout = wrapper.find('FormNestedArrayLayout').first();
|
||||
const formFooter = !!layout.prop('content')[1];
|
||||
expect(formFooter).toEqual(false);
|
||||
});
|
||||
});
|
||||
it.skip('shows 3 items', function() {
|
||||
const wrapper = mount(<Components.FormNestedArray {...defaultProps} currentValues={{}} value={[1, 2, 3]} />);
|
||||
const nestedItem = wrapper.find('FormNestedItem');
|
||||
expect(nestedItem).toHaveLength(3);
|
||||
});
|
||||
it.skip('pass the correct path and itemIndex to each form', function() {
|
||||
const wrapper = mount(<Components.FormNestedArray {...defaultProps} currentValues={{}} value={[1, 2]} />);
|
||||
const nestedItem = wrapper.find('FormNestedItem');
|
||||
const item0 = nestedItem.at(0);
|
||||
const item1 = nestedItem.at(1);
|
||||
expect(item0.prop('itemIndex')).toEqual(0);
|
||||
expect(item1.prop('itemIndex')).toEqual(1);
|
||||
expect(item0.prop('path')).toEqual('foobar.0');
|
||||
expect(item1.prop('path')).toEqual('foobar.1');
|
||||
describe('minCount', function(){
|
||||
const props = {
|
||||
...defaultProps,
|
||||
minCount: 2
|
||||
}
|
||||
it('should display remove item button when array length > minCount', function() {
|
||||
const wrapper = shallow(<FormNestedArray {...props} currentValues={{}} value={[1, 2, 3]} />);
|
||||
const layout = wrapper.find('FormNestedArrayLayout').first();
|
||||
const formNestedItems = layout.prop('content')[0];
|
||||
formNestedItems.forEach((formNestedItem, idx) => {
|
||||
const nestedWrapper = shallow(<div>{formNestedItem}</div>);
|
||||
const nestedItem = nestedWrapper.find('FormNestedItem');
|
||||
const hideRemove = nestedItem.prop('hideRemove');
|
||||
expect({ res: hideRemove, idx }).toEqual({ res: false, idx });
|
||||
});
|
||||
});
|
||||
it('should not display remove button if items <= minCount', function() {
|
||||
const wrapper = shallow(<FormNestedArray {...props} currentValues={{}} value={[1, 2]} />);
|
||||
const layout = wrapper.find('FormNestedArrayLayout').first();
|
||||
const formNestedItems = layout.prop('content')[0];
|
||||
formNestedItems.forEach((formNestedItem, idx) => {
|
||||
const nestedWrapper = shallow(<div>{formNestedItem}</div>);
|
||||
const nestedItem = nestedWrapper.find('FormNestedItem');
|
||||
const hideRemove = nestedItem.prop('hideRemove');
|
||||
expect({ res: hideRemove, idx }).toEqual({ res: true, idx });
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
describe('FormNestedObject', function() {
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:i18n-en-us',
|
||||
summary: 'Vulcan i18n package (en_US)',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14']);
|
||||
api.use([
|
||||
'vulcan:core@1.12.16'
|
||||
]);
|
||||
|
||||
api.addFiles(['lib/en_US.js'], ['client', 'server']);
|
||||
});
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:i18n-es-es',
|
||||
summary: 'Vulcan i18n package (es_ES)',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14']);
|
||||
api.use([
|
||||
'vulcan:core@1.12.16'
|
||||
]);
|
||||
|
||||
api.addFiles(['lib/es_ES.js'], ['client', 'server']);
|
||||
});
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:i18n-fr-fr',
|
||||
summary: 'Vulcan i18n package (fr_FR)',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14']);
|
||||
api.use([
|
||||
'vulcan:core@1.12.16'
|
||||
]);
|
||||
|
||||
api.addFiles(['lib/fr_FR.js'], ['client', 'server']);
|
||||
});
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:i18n',
|
||||
summary: 'i18n client polyfill',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:lib@1.12.14']);
|
||||
api.use([
|
||||
'vulcan:lib@1.12.16',
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
|
@ -9,7 +9,7 @@ import SimpleSchema from 'simpl-schema';
|
|||
Vulcan = {};
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
Vulcan.VERSION = '1.12.14';
|
||||
Vulcan.VERSION = '1.12.16';
|
||||
|
||||
// ------------------------------------- Schemas -------------------------------- //
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:lib',
|
||||
summary: 'Vulcan libraries.',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:newsletter',
|
||||
summary: 'Vulcan email newsletter package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:core@1.12.14', 'vulcan:email@1.12.14']);
|
||||
api.use([
|
||||
'vulcan:core@1.12.16',
|
||||
'vulcan:email@1.12.16'
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:payments',
|
||||
summary: 'Vulcan payments package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['promise', 'vulcan:core@1.12.14', 'fourseven:scss@4.5.4']);
|
||||
api.use([
|
||||
'promise',
|
||||
'vulcan:core@1.12.16',
|
||||
|
||||
'fourseven:scss@4.5.4',
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:routing',
|
||||
summary: 'Vulcan router package',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:lib@1.12.14']);
|
||||
api.use([
|
||||
'vulcan:lib@1.12.16',
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
|
@ -1,21 +1,23 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:subscribe',
|
||||
summary: 'Subscribe to posts, users, etc. to be notified of new activity',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use([
|
||||
'vulcan:core@1.12.14',
|
||||
'vulcan:core@1.12.16',
|
||||
// dependencies on posts, categories are done with nested imports to reduce explicit dependencies
|
||||
]);
|
||||
|
||||
api.use(['vulcan:posts@1.12.14', 'vulcan:comments@1.12.14', 'vulcan:categories@1.12.14'], {
|
||||
weak: true,
|
||||
});
|
||||
|
||||
api.use([
|
||||
'vulcan:posts@1.12.16',
|
||||
'vulcan:comments@1.12.16',
|
||||
'vulcan:categories@1.12.16',
|
||||
], {weak: true});
|
||||
|
||||
api.mainModule('lib/modules.js', ['client']);
|
||||
api.mainModule('lib/modules.js', ['server']);
|
||||
|
|
|
@ -1,16 +1,22 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:ui-bootstrap',
|
||||
summary: 'Vulcan Bootstrap UI components.',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:lib@1.12.14', 'fourseven:scss@4.10.0']);
|
||||
|
||||
api.addFiles(['lib/stylesheets/style.scss', 'lib/stylesheets/datetime.scss'], 'client');
|
||||
api.use([
|
||||
'vulcan:lib@1.12.16',
|
||||
'fourseven:scss@4.10.0',
|
||||
]);
|
||||
|
||||
api.addFiles([
|
||||
'lib/stylesheets/style.scss',
|
||||
'lib/stylesheets/datetime.scss'
|
||||
], 'client');
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
|
@ -41,8 +41,9 @@ function onCreateUserCallback(options, user) {
|
|||
for (let fieldName of Object.keys(schema)) {
|
||||
let autoValue;
|
||||
if (schema[fieldName].onCreate) {
|
||||
const document = clone(user);
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
autoValue = schema[fieldName].onCreate({ newDocument: clone(user) });
|
||||
autoValue = schema[fieldName].onCreate({ document });
|
||||
} else if (schema[fieldName].onInsert) {
|
||||
// OpenCRUD backwards compatibility
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:users',
|
||||
summary: 'Vulcan permissions.',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(['vulcan:lib@1.12.14']);
|
||||
api.use([
|
||||
'vulcan:lib@1.12.16'
|
||||
]);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
Package.describe({
|
||||
name: 'vulcan:voting',
|
||||
summary: 'Vulcan scoring package.',
|
||||
version: '1.12.14',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git',
|
||||
version: '1.12.16',
|
||||
git: 'https://github.com/VulcanJS/Vulcan.git'
|
||||
});
|
||||
|
||||
Package.onUse(function(api) {
|
||||
api.versionsFrom('1.6.1');
|
||||
|
||||
api.use(
|
||||
['fourseven:scss@4.10.0', 'vulcan:core@1.12.14', 'vulcan:i18n@1.12.14'],
|
||||
['client', 'server'],
|
||||
);
|
||||
api.use([
|
||||
'fourseven:scss@4.10.0',
|
||||
'vulcan:core@1.12.16',
|
||||
'vulcan:i18n@1.12.16',
|
||||
], ['client', 'server']);
|
||||
|
||||
api.mainModule('lib/server/main.js', 'server');
|
||||
api.mainModule('lib/client/main.js', 'client');
|
||||
|
|
Loading…
Add table
Reference in a new issue