Updated: dependencies

+ small fixes
This commit is contained in:
RainLoop Team 2016-10-18 20:52:43 +03:00
parent 760d9e6243
commit ae996b75f1
16 changed files with 59 additions and 67 deletions

1
.cmds
View file

@ -4,7 +4,6 @@ tx pull -a
# dependencies checker # dependencies checker
npm-check --skip-unused --save-exact npm-check --skip-unused --save-exact
npm dedupe
# dependencies locker # dependencies locker
npm shrinkwrap --dev npm shrinkwrap --dev

View file

@ -1,8 +1,8 @@
### RainLoop version, browser, OS: **RainLoop version, browser, OS:**
### Expected behavior and actual behavior: **Expected behavior and actual behavior:**
### Steps to reproduce the problem: **Steps to reproduce the problem:**
### Logs or screenshots: **Logs or screenshots:**

View file

@ -25,33 +25,36 @@ const useJsNextBundle = (function() {
} }
/* eslint-disable */ /* eslint-disable */
try { // try {
//
eval(` // (function() {
// let + const // eval(`
const x = 5; let y = 4; var z = 4; // // let + const
//const x = 5; let y = 4; var z = 4;
// Arrow Function //
const f = () => 'rainloop'; // // Arrow Function
//const f = () => 'rainloop';
// Default + Rest + Spread //
const d = (test = 1, ...t) => 'rainloop'; // // Default + Rest + Spread
d(...[1, 2, 3]); //const d = (test = 1, ...t) => 'rainloop';
//d(...[1, 2, 3]);
// Destructuring //
let [a, b] = [1, 2]; //// Destructuring
({a, b} = {a: 1, b: 2}); //let [a, b] = [1, 2];
//({a, b} = {a: 1, b: 2});
// Class //
class Q1 { constructor() {} } //// Class
//class Q1 { constructor() {} }
// Class extends + super //
class Q2 extends Q1 { constructor() { super() } } //// Class extends + super
//class Q2 extends Q1 { constructor() { super() } }
`); //
return true; //`);
} // }());
catch (e) {} //
// return true;
// }
// catch (e) {}
return false; return false;
/* eslint-enable */ /* eslint-enable */
@ -65,7 +68,7 @@ class Q2 extends Q1 { constructor() { super() } }
function getComputedStyle(id, name) function getComputedStyle(id, name)
{ {
const element = window.document.getElementById(id); const element = window.document.getElementById(id);
return element.currentStyle ? element.currentStyle[name] : return element && element.currentStyle ? element.currentStyle[name] :
(window.getComputedStyle ? window.getComputedStyle(element, null).getPropertyValue(name) : null); (window.getComputedStyle ? window.getComputedStyle(element, null).getPropertyValue(name) : null);
} }
@ -106,7 +109,9 @@ function includeLayout()
} }
/** /**
* @param {mixed} data * @param {boolean} admin = false
* @param {boolean} mobile = false
* @param {boolean} mobileDevice = false
* @returns {void} * @returns {void}
*/ */
function includeAppScr({admin = false, mobile = false, mobileDevice = false}) function includeAppScr({admin = false, mobile = false, mobileDevice = false})

View file

@ -180,7 +180,7 @@ if (bAllowPdfPreview && window.navigator && window.navigator.mimeTypes)
export {bAllowPdfPreview}; export {bAllowPdfPreview};
export const aViewModels = { export const VIEW_MODELS = {
settings: [], settings: [],
'settings-removed': [], 'settings-removed': [],
'settings-disabled': [] 'settings-disabled': []

View file

@ -1,7 +1,9 @@
import $ from '$'; import $ from '$';
import ko from 'ko'; import ko from 'ko';
import {isUnd} from 'Common/Utils'; import {isUnd} from 'Common/Utils';
import {i18nToNodes} from 'Common/Translator';
class AbstractComponent class AbstractComponent
{ {
@ -35,7 +37,7 @@ const componentExportHelper = (ClassObject, templateID = '') => ({
params.component = componentInfo; params.component = componentInfo;
params.element = $(componentInfo.element); params.element = $(componentInfo.element);
require('Common/Translator').i18nToNodes(params.element); i18nToNodes(params.element);
if (!isUnd(params.inline) && ko.unwrap(params.inline)) if (!isUnd(params.inline) && ko.unwrap(params.inline))
{ {

View file

@ -1,7 +1,5 @@
class AbstractBoot export class AbstractBoot
{ {
bootstart() {/* no-empty */} bootstart() {/* no-empty */}
} }
export {AbstractBoot, AbstractBoot as default};

View file

@ -1,8 +1,7 @@
import _ from '_';
import {isArray, disposeObject} from 'Common/Utils'; import {isArray, disposeObject} from 'Common/Utils';
class AbstractModel export class AbstractModel
{ {
sModelName = ''; sModelName = '';
disposables = []; disposables = [];
@ -18,7 +17,7 @@ class AbstractModel
regDisposables(value) { regDisposables(value) {
if (isArray(value)) if (isArray(value))
{ {
_.each(value, (item) => { value.forEach((item) => {
this.disposables.push(item); this.disposables.push(item);
}); });
} }
@ -32,5 +31,3 @@ class AbstractModel
disposeObject(this); disposeObject(this);
} }
} }
export {AbstractModel, AbstractModel as default};

View file

@ -3,7 +3,7 @@ import _ from '_';
import crossroads from 'crossroads'; import crossroads from 'crossroads';
import {isArray, isNonEmptyArray, noop} from 'Common/Utils'; import {isArray, isNonEmptyArray, noop} from 'Common/Utils';
class AbstractScreen export class AbstractScreen
{ {
oCross = null; oCross = null;
sScreenName; sScreenName;
@ -57,7 +57,7 @@ class AbstractScreen
fMatcher = _.bind(this.onRoute || noop, this); fMatcher = _.bind(this.onRoute || noop, this);
route = crossroads.create(); route = crossroads.create();
_.each(routes, (item) => { routes.forEach((item) => {
if (item && route) if (item && route)
{ {
route.addRoute(item[0], fMatcher).rules = item[1]; route.addRoute(item[0], fMatcher).rules = item[1];
@ -68,5 +68,3 @@ class AbstractScreen
} }
} }
} }
export {AbstractScreen, AbstractScreen as default};

View file

@ -5,7 +5,7 @@ import {delegateRun, inFocus} from 'Common/Utils';
import {KeyState, EventKeyCode} from 'Common/Enums'; import {KeyState, EventKeyCode} from 'Common/Enums';
import {$win, keyScope} from 'Common/Globals'; import {$win, keyScope} from 'Common/Globals';
class AbstractViewNext export class AbstractViewNext
{ {
bDisabeCloseOnEsc = false; bDisabeCloseOnEsc = false;
sDefaultKeyScope = KeyState.None; sDefaultKeyScope = KeyState.None;
@ -58,5 +58,3 @@ class AbstractViewNext
cancelCommand() {} // eslint-disable-line no-empty-function cancelCommand() {} // eslint-disable-line no-empty-function
closeCommand() {} // eslint-disable-line no-empty-function closeCommand() {} // eslint-disable-line no-empty-function
} }
export {AbstractViewNext, AbstractViewNext as default};

View file

@ -6,7 +6,7 @@ import hasher from 'hasher';
import crossroads from 'crossroads'; import crossroads from 'crossroads';
import {runHook} from 'Common/Plugins'; import {runHook} from 'Common/Plugins';
import {$html, aViewModels as VIEW_MODELS, popupVisibilityNames} from 'Common/Globals'; import {$html, VIEW_MODELS, popupVisibilityNames} from 'Common/Globals';
import { import {
isArray, isUnd, pString, log, isFunc, isArray, isUnd, pString, log, isFunc,

View file

@ -1,9 +1,8 @@
import _ from '_';
import Promise from 'Promise'; import Promise from 'Promise';
import {isArray} from 'Common/Utils'; import {isArray} from 'Common/Utils';
class AbstractBasicPromises export class AbstractBasicPromises
{ {
oPromisesStack = {}; oPromisesStack = {};
@ -24,7 +23,7 @@ class AbstractBasicPromises
if (trigger) if (trigger)
{ {
value = !!value; value = !!value;
_.each(isArray(trigger) ? trigger : [trigger], (fTrigger) => { (isArray(trigger) ? trigger : [trigger]).forEach((fTrigger) => {
if (fTrigger) if (fTrigger)
{ {
fTrigger(value); fTrigger(value);
@ -33,5 +32,3 @@ class AbstractBasicPromises
} }
} }
} }
export {AbstractBasicPromises, AbstractBasicPromises as default};

View file

@ -3,7 +3,7 @@ import _ from '_';
import $ from '$'; import $ from '$';
import ko from 'ko'; import ko from 'ko';
import {aViewModels as VIEW_MODELS} from 'Common/Globals'; import {VIEW_MODELS} from 'Common/Globals';
import {delegateRun, windowResize, log, isUnd, pString} from 'Common/Utils'; import {delegateRun, windowResize, log, isUnd, pString} from 'Common/Utils';
import {settings} from 'Common/Links'; import {settings} from 'Common/Links';

View file

@ -409,7 +409,6 @@ gulp.task('js:es5:min', ['js:app', 'js:admin'], function() {
gulp.task('js:es6:min', ['js:app', 'js:admin'], function() { gulp.task('js:es6:min', ['js:app', 'js:admin'], function() {
return cfg.next ? gulp.src(cfg.paths.staticJS + '*.next.js') return cfg.next ? gulp.src(cfg.paths.staticJS + '*.next.js')
.pipe(replace(/"rainloop\/v\/([^\/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"')) .pipe(replace(/"rainloop\/v\/([^\/]+)\/static\/js\/"/g, '"rainloop/v/$1/static/js/min/"'))
// TODO
.pipe(eol('\n', true)) .pipe(eol('\n', true))
.pipe(rename({suffix: '.min'})) .pipe(rename({suffix: '.min'}))
.pipe(gulp.dest(cfg.paths.staticMinJS)) .pipe(gulp.dest(cfg.paths.staticMinJS))

View file

@ -49,8 +49,8 @@
}, },
"devDependencies": { "devDependencies": {
"Progress.js": "github:usablica/progress.js", "Progress.js": "github:usablica/progress.js",
"autolinker": "^1.1.0", "autolinker": "^1.2.0",
"babel-core": "^6.16.0", "babel-core": "^6.17.0",
"babel-eslint": "^7.0.0", "babel-eslint": "^7.0.0",
"babel-loader": "^6.2.5", "babel-loader": "^6.2.5",
"babel-plugin-transform-decorators-legacy": "^1.3.4", "babel-plugin-transform-decorators-legacy": "^1.3.4",
@ -102,7 +102,7 @@
"moment": "^2.15.1", "moment": "^2.15.1",
"node-fs": "^0.1.7", "node-fs": "^0.1.7",
"node-notifier": "4.6.1", "node-notifier": "4.6.1",
"normalize.css": "^4.2.0", "normalize.css": "^5.0.0",
"openpgp": "^2.3.3", "openpgp": "^2.3.3",
"opentip": "^2.4.3", "opentip": "^2.4.3",
"pikaday": "^1.4.0", "pikaday": "^1.4.0",
@ -114,7 +114,7 @@
"style-loader": "^0.13.1", "style-loader": "^0.13.1",
"tinycon": "github:tommoor/tinycon", "tinycon": "github:tommoor/tinycon",
"underscore": "^1.8.3", "underscore": "^1.8.3",
"webpack": "2.1.0-beta.22", "webpack": "^2.1.0-beta.25",
"webpack-notifier": "1.4.1" "webpack-notifier": "1.4.1"
} }
} }

View file

@ -1954,7 +1954,7 @@ NewThemeLink IncludeCss LoadingDescriptionEsc TemplatesLink LangLink IncludeBack
$aResult['StaticAppJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/'). $aResult['StaticAppJsLink'] = $this->StaticPath('js/'.($bAppJsDebug ? '' : 'min/').
($bAdmin ? 'admin' : 'app').($bAppJsDebug ? '' : '.min').'.js'); ($bAdmin ? 'admin' : 'app').($bAppJsDebug ? '' : '.min').'.js');
$aResult['StaticAppJsNextLink'] = $this->StaticPath('js/'.($bAdmin ? 'admin' : 'app').'.next.js'); // todo min $aResult['StaticAppJsNextLink'] = $this->StaticPath('js/'.($bAdmin ? 'admin' : 'app').'.next.js');
$aResult['StaticEditorJsLink'] = $this->StaticPath('ckeditor/ckeditor.js'); $aResult['StaticEditorJsLink'] = $this->StaticPath('ckeditor/ckeditor.js');
$aResult['EditorDefaultType'] = \in_array($aResult['EditorDefaultType'], array('Plain', 'Html', 'HtmlForced', 'PlainForced')) ? $aResult['EditorDefaultType'] = \in_array($aResult['EditorDefaultType'], array('Plain', 'Html', 'HtmlForced', 'PlainForced')) ?

View file

@ -40,7 +40,7 @@ module.exports = function(publicPath, pro, es6) {
], ],
resolve: { resolve: {
modules: [devPath, 'node_modules'], modules: [devPath, 'node_modules'],
extensions: ['', '.js'], extensions: ['.js'],
alias: { alias: {
'Opentip': __dirname + '/dev/External/Opentip.js', 'Opentip': __dirname + '/dev/External/Opentip.js',
'ko': __dirname + '/dev/External/ko.js' 'ko': __dirname + '/dev/External/ko.js'
@ -52,7 +52,7 @@ module.exports = function(publicPath, pro, es6) {
test: /\.js$/, test: /\.js$/,
loader: 'babel', loader: 'babel',
include: [devPath], include: [devPath],
query: !es6 ? { options: !es6 ? {
cacheDirectory: true, cacheDirectory: true,
presets: [['es2015', {loose: loose, modules: false}], 'es2016', 'stage-0'], presets: [['es2015', {loose: loose, modules: false}], 'es2016', 'stage-0'],
plugins: ['transform-runtime', 'transform-decorators-legacy'] plugins: ['transform-runtime', 'transform-decorators-legacy']
@ -120,7 +120,6 @@ module.exports = function(publicPath, pro, es6) {
} }
] ]
}, },
eslint: {},
externals: { externals: {
'window': 'window', 'window': 'window',
'progressJs': 'window.progressJs', 'progressJs': 'window.progressJs',