From 16c5952ccbd39bca18abfca130bd85cac548de37 Mon Sep 17 00:00:00 2001 From: Bago Date: Fri, 23 Feb 2018 13:58:04 +0100 Subject: [PATCH] Depdendencies update (ko 3.4.2, reactor 1.4.0, ko-sortable 1.0.0) Support for ko 3.4.2 and ko 3.5.0-beta (both in our code and by upgrading ko-reactor to latest 1.4.0 release). Update to jquery ui 1.12 includes even if we stick to jquery ui 1.11 for compatibility reasons so we can easily bundle the latest ko-sortable version (that moved to the newest release) Another attempt to fix #379 --- package-lock.json | 17 ++++++++++++----- package.json | 20 ++++++++++---------- src/js/bindings/extsortables.js | 4 ++-- src/js/bindings/if-subs.js | 5 ++++- src/js/bindings/jqueryui-spinner.js | 2 +- src/js/bindings/jqueryui-tabs.js | 2 +- 6 files changed, 30 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8fea7a3f5..b48198005 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3545,18 +3545,25 @@ } }, "knockout": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/knockout/-/knockout-3.4.1.tgz", - "integrity": "sha1-i9BXvej30KArk92kM8Ko2ULYqaA=" + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/knockout/-/knockout-3.4.2.tgz", + "integrity": "sha1-6HlY3netHpNvfOZFuri118RW2Tc=" }, "knockout-jqueryui": { "version": "github:gvas/knockout-jqueryui#4fa7a60e2d9ce54d52a0897607eeacd023181476" }, "knockout-sortable": { - "version": "github:rniemeyer/knockout-sortable#e84cd73cb85277a6db0b3cb98ecde8f81922df35" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/knockout-sortable/-/knockout-sortable-1.0.0.tgz", + "integrity": "sha1-U4nm5D7pedmYzJSNq0HXG476QiM=" }, "ko-reactor": { - "version": "github:ZiadJ/knockoutjs-reactor#afe14eece0b95fb076620e56e4c8a8fd90a65a03" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ko-reactor/-/ko-reactor-1.4.0.tgz", + "integrity": "sha512-dbcYQ2st0O4XdrPNeqSqWEbqnPGHadIW4joMqBa09/+C6UXQ1sRGve7lS9G74xUR9skU5CN/f+SXrUJA5vD6HQ==", + "requires": { + "knockout": "3.4.2" + } }, "labeled-stream-splicer": { "version": "2.0.0", diff --git a/package.json b/package.json index 707c574e8..0cba724c7 100644 --- a/package.json +++ b/package.json @@ -26,10 +26,10 @@ }, "browserify-shim": { "jquery": "global:jQuery", - "jquery-ui/sortable": "global:jQuery.ui.sortable", - "jquery-ui/draggable": "global:jQuery.ui.draggable", - "jquery-ui/spinner": "global:jQuery.ui.spinner", - "jquery-ui/tabs": "global:jQuery.ui.tabs", + "jquery-ui/ui/widgets/sortable": "global:jQuery.ui.sortable", + "jquery-ui/ui/widgets/draggable": "global:jQuery.ui.draggable", + "jquery-ui/ui/widgets/spinner": "global:jQuery.ui.spinner", + "jquery-ui/ui/widgets/tabs": "global:jQuery.ui.tabs", "knockout": "global:ko", "knockout-jqueryui": "global:kojqui", "tinymce": "global:tinymce" @@ -48,13 +48,13 @@ "jquery.iframe-transport": "^1.0.0", "jsep": "^0.3.3", "juice": "^4.2.2", - "knockout": "3.4.1", - "knockout-jqueryui": "github:gvas/knockout-jqueryui#v2.2.3", - "knockout-sortable": "github:rniemeyer/knockout-sortable#v0.15.0", - "ko-reactor": "github:ZiadJ/knockoutjs-reactor#v1.3.9", + "knockout": "3.4.2", + "knockout-jqueryui": "2.2.3", + "knockout-sortable": "1.0.0", + "ko-reactor": "^1.4.0", "mensch": "^0.3.3", - "slick": "github:kamicane/slick#v1.12.2", - "tinycolor2": "github:bgrins/TinyColor#1.4.1", + "slick": "1.12.2", + "tinycolor2": "1.4.1", "tinymce": "^4.7.7", "toastr": "^2.1.4" }, diff --git a/src/js/bindings/extsortables.js b/src/js/bindings/extsortables.js index 5a852a48d..d62509661 100644 --- a/src/js/bindings/extsortables.js +++ b/src/js/bindings/extsortables.js @@ -3,8 +3,8 @@ var $ = require("jquery"); var ko = require("knockout"); -var sortable = require("jquery-ui/sortable"); -var draggable = require("jquery-ui/draggable"); +var sortable = require("jquery-ui/ui/widgets/sortable"); +var draggable = require("jquery-ui/ui/widgets/draggable"); var console = require("console"); require("knockout-sortable"); diff --git a/src/js/bindings/if-subs.js b/src/js/bindings/if-subs.js index 6c1636a18..a25f6a3ef 100644 --- a/src/js/bindings/if-subs.js +++ b/src/js/bindings/if-subs.js @@ -84,8 +84,11 @@ if (typeof ko.subscription == 'function' && typeof ko.isWritableObservable !== ' } else if (ko.version == "3.4.2") { beforeSubscriptionProp = 'ua'; afterSubscriptionProp = 'Ka'; +} else if (ko.version == "3.5.0-beta") { + beforeSubscriptionProp = 'Pa'; + afterSubscriptionProp = 'ab'; } -else throw "Unsupported minimized Knockout version " + ko.version + " (supported DEBUG or minimized 3.2.0 ... 3.4.2)"; +else throw "Unsupported minimized Knockout version " + ko.version + " (supported DEBUG or minimized 3.2.0 ... 3.5.0-beta)"; // internally used by ifsubs binding. // WARNING this break when used with pureComputed or deferredEvaluated diff --git a/src/js/bindings/jqueryui-spinner.js b/src/js/bindings/jqueryui-spinner.js index f467e2eb3..7b64f4fe1 100644 --- a/src/js/bindings/jqueryui-spinner.js +++ b/src/js/bindings/jqueryui-spinner.js @@ -4,7 +4,7 @@ // We wants to use the step but also wants to leave the user the ability to select specific values. var $ = require('jquery'); -var spinner = require("jquery-ui/spinner"); +var spinner = require("jquery-ui/ui/widgets/spinner"); var console = require('console'); if (typeof spinner == 'undefined') throw "Cannot find jquery-ui spinner widget dependency!"; diff --git a/src/js/bindings/jqueryui-tabs.js b/src/js/bindings/jqueryui-tabs.js index 6bb4790c2..a70b81e2f 100644 --- a/src/js/bindings/jqueryui-tabs.js +++ b/src/js/bindings/jqueryui-tabs.js @@ -5,7 +5,7 @@ var $ = require('jquery'); var console = require('console'); -var tabs = require("jquery-ui/tabs"); +var tabs = require("jquery-ui/ui/widgets/tabs"); if (typeof tabs == 'undefined') throw "Cannot find jquery-ui tabs widget dependency!";