From 6eaa73e37ee5f795d8b96c9abe274403dfa62753 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Mon, 11 Dec 2017 10:59:19 -0500 Subject: [PATCH 01/15] Swap to vue via node_module; no staging. --- client/galaxy/scripts/apps/admin.js | 2 +- client/galaxy/scripts/apps/analysis.js | 2 +- client/galaxy/scripts/mvc/tool/tool-form-base.js | 2 +- client/gulpfile.js | 3 +-- client/webpack.config.js | 2 +- static/scripts/libs/vue.js | 1 - 6 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 static/scripts/libs/vue.js diff --git a/client/galaxy/scripts/apps/admin.js b/client/galaxy/scripts/apps/admin.js index 6d6f745e0f4..569dffc330f 100644 --- a/client/galaxy/scripts/apps/admin.js +++ b/client/galaxy/scripts/apps/admin.js @@ -10,7 +10,7 @@ import QueryStringParsing from "utils/query-string-parsing"; import Router from "layout/router"; import Utils from "utils/utils"; import Page from "layout/page"; -import Vue from "libs/vue"; +import Vue from "vue"; import UserAPIKeys from "components/UserAPIKeys.vue"; window.app = function app(options, bootstrapped) { diff --git a/client/galaxy/scripts/apps/analysis.js b/client/galaxy/scripts/apps/analysis.js index 08d3d12f16c..2be9e2a39c5 100644 --- a/client/galaxy/scripts/apps/analysis.js +++ b/client/galaxy/scripts/apps/analysis.js @@ -22,7 +22,7 @@ import Ui from "mvc/ui/ui-misc"; import DatasetError from "mvc/dataset/dataset-error"; import DatasetEditAttributes from "mvc/dataset/dataset-edit-attributes"; import Citations from "components/Citations.vue"; -import Vue from "libs/vue"; +import Vue from "vue"; /** define the 'Analyze Data'/analysis/main/home page for Galaxy * * has a masthead diff --git a/client/galaxy/scripts/mvc/tool/tool-form-base.js b/client/galaxy/scripts/mvc/tool/tool-form-base.js index 1d4a92693f7..058ba302c4e 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-base.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-base.js @@ -7,7 +7,7 @@ import Deferred from "utils/deferred"; import Ui from "mvc/ui/ui-misc"; import FormBase from "mvc/form/form-view"; import Citations from "components/Citations.vue"; -import Vue from "libs/vue"; +import Vue from "vue"; export default FormBase.extend({ initialize: function(options) { var self = this; diff --git a/client/gulpfile.js b/client/gulpfile.js index 06eebf5605a..6dc0d36af96 100644 --- a/client/gulpfile.js +++ b/client/gulpfile.js @@ -34,8 +34,7 @@ var paths = { 'jquery-mousewheel': [ 'jquery.mousewheel.js', 'jquery/jquery.mousewheel.js' ], 'raven-js': ['dist/raven.js', 'raven.js'], 'requirejs': [ 'require.js', 'require.js' ], - 'underscore': [ 'underscore.js', 'underscore.js' ], - 'vue': [ 'dist/vue.js', 'vue.js' ] + 'underscore': [ 'underscore.js', 'underscore.js' ] }, libs: ['galaxy/scripts/libs/**/*.js'] }; diff --git a/client/webpack.config.js b/client/webpack.config.js index 4d7431bcb03..8b44ab7d12c 100644 --- a/client/webpack.config.js +++ b/client/webpack.config.js @@ -25,7 +25,7 @@ var commonLibs = [ "libs/farbtastic", "libs/bootstrap", "libs/bootstrap-tour", - "libs/vue", + "vue", // mvc "libs/underscore", "libs/backbone", diff --git a/static/scripts/libs/vue.js b/static/scripts/libs/vue.js deleted file mode 100644 index 77b2ff52d01..00000000000 --- a/static/scripts/libs/vue.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";function e(e){return void 0===e||null===e}function t(e){return void 0!==e&&null!==e}function n(e){return!0===e}function r(e){return!1===e}function i(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function o(e){return null!==e&&"object"==typeof e}function a(e){return Hi.call(e).slice(8,-1)}function s(e){return"[object Object]"===Hi.call(e)}function c(e){return"[object RegExp]"===Hi.call(e)}function l(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function u(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function f(e){var t=parseFloat(e);return isNaN(t)?e:t}function d(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}function v(e,t){return Bi.call(e,t)}function h(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function m(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function y(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function g(e,t){for(var n in t)e[n]=t[n];return e}function _(e){for(var t={},n=0;n0&&(me((s=ye(s,(o||"")+"_"+a))[0])&&me(l)&&(u[c]=j(l.text+s[0].text),s.shift()),u.push.apply(u,s)):i(s)?me(l)?u[c]=j(l.text+s):""!==s&&u.push(j(s)):me(s)&&me(l)?u[c]=j(l.text+s.text):(n(r._isVList)&&t(s.tag)&&e(s.key)&&t(o)&&(s.key="__vlist"+o+"_"+a+"__"),u.push(s)));return u}function ge(e,t){return(e.__esModule||bo&&"Module"===e[Symbol.toStringTag])&&(e=e.default),o(e)?t.extend(e):e}function _e(e,t,n,r,i){var o=No();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}function be(r,i,a){if(n(r.error)&&t(r.errorComp))return r.errorComp;if(t(r.resolved))return r.resolved;if(n(r.loading)&&t(r.loadingComp))return r.loadingComp;if(!t(r.contexts)){var s=r.contexts=[a],c=!0,l=function(){for(var e=0,t=s.length;efa)){wo("You may have an infinite update loop "+(e.user?'in watcher with expression "'+e.expression+'"':"in a component render function."),e.vm);break}var n=pa.slice(),r=da.slice();De(),Ue(n),Re(r),_o&&eo.devtools&&_o.emit("flush")}function Re(e){for(var t=e.length;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&Pe(r,"updated")}}function He(e){e._inactive=!1,pa.push(e)}function Ue(e){for(var t=0;tga&&da[n].id>e.id;)n--;da.splice(n+1,0,e)}else da.push(e);ma||(ma=!0,ce(Fe))}}function Be(e){wa.clear(),ze(e,wa)}function ze(e,t){var n,r,i=Array.isArray(e);if((i||o(e))&&Object.isExtensible(e)){if(e.__ob__){var a=e.__ob__.dep.id;if(t.has(a))return;t.add(a)}if(i)for(n=e.length;n--;)ze(e[n],t);else for(n=(r=Object.keys(e)).length;n--;)ze(e[r[n]],t)}}function qe(e,t,n){$a.get=function(){return this[t][n]},$a.set=function(e){this[t][n]=e},Object.defineProperty(e,n,$a)}function Je(e){e._watchers=[];var t=e.$options;t.props&&Ke(e,t.props),t.methods&&Xe(e,t.methods),t.data?We(e):L(e._data={},!0),t.computed&&Ze(e,t.computed),t.watch&&t.watch!==po&&et(e,t.watch)}function Ke(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[],o=!e.$parent;Fo.shouldConvert=o;for(var a in t)!function(o){i.push(o);var a=G(o,t,n,e),s=Wi(o);(Vi(s)||eo.isReservedAttr(s))&&wo('"'+s+'" is a reserved attribute and cannot be used as component prop.',e),P(r,o,a,function(){e.$parent&&!ua&&wo("Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: \""+o+'"',e)}),o in e||qe(e,"_props",o)}(a);Fo.shouldConvert=!0}function We(e){var t=e.$options.data;s(t=e._data="function"==typeof t?Ye(t,e):t||{})||(t={},wo("data functions should return an object:\nhttps://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function",e));for(var n=Object.keys(t),r=e.$options.props,i=e.$options.methods,o=n.length;o--;){var a=n[o];i&&v(i,a)&&wo('Method "'+a+'" has already been defined as a data property.',e),r&&v(r,a)?wo('The data property "'+a+'" is already declared as a prop. Use prop default value instead.',e):C(a)||qe(e,"_data",a)}L(t,!0)}function Ye(e,t){try{return e.call(t,t)}catch(e){return re(e,t,"data()"),{}}}function Ze(e,t){var n=e._computedWatchers=Object.create(null),r=go();for(var i in t){var o=t[i],a="function"==typeof o?o:o.get;null==a&&wo('Getter is missing for computed property "'+i+'".',e),r||(n[i]=new ba(e,a||b,b,xa)),i in e?i in e.$data?wo('The computed property "'+i+'" is already defined in data.',e):e.$options.props&&i in e.$options.props&&wo('The computed property "'+i+'" is already defined as a prop.',e):Ge(e,i,o)}}function Ge(e,t,n){var r=!go();"function"==typeof n?($a.get=r?Qe(t):n,$a.set=b):($a.get=n.get?r&&!1!==n.cache?Qe(t):n.get:b,$a.set=n.set?n.set:b),$a.set===b&&($a.set=function(){wo('Computed property "'+t+'" was assigned to but it has no setter.',this)}),Object.defineProperty(e,t,$a)}function Qe(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),jo.target&&t.depend(),t.value}}function Xe(e,t){var n=e.$options.props;for(var r in t)null==t[r]&&wo('Method "'+r+'" has an undefined value in the component definition. Did you reference the function correctly?',e),n&&v(n,r)&&wo('Method "'+r+'" has already been defined as a prop.',e),r in e&&C(r)&&wo('Method "'+r+'" conflicts with an existing Vue instance method. Avoid defining component methods that start with _ or $.'),e[r]=null==t[r]?b:m(t[r],e)}function et(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i=0||n.indexOf(e[i])<0)&&r.push(e[i]);return r}return e}function It(e){this instanceof It||wo("Vue is a constructor and should be called with the `new` keyword"),this._init(e)}function Mt(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=y(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}function Nt(e){e.mixin=function(e){return this.options=Y(this.options,e),this}}function Lt(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name;/^[a-zA-Z][\w-]*$/.test(o)||wo('Invalid component name: "'+o+'". Component names can only contain alphanumeric characters and the hyphen, and must start with a letter.');var a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=Y(n.options,e),a.super=n,a.options.props&&Pt(a),a.options.computed&&Dt(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Qi.forEach(function(e){a[e]=n[e]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=g({},a.options),i[r]=a,a}}function Pt(e){var t=e.options.props;for(var n in t)qe(e.prototype,"_props",n)}function Dt(e){var t=e.options.computed;for(var n in t)Ge(e.prototype,n,t[n])}function Ft(e){Qi.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&eo.isReservedTag(e)&&wo("Do not use built-in or reserved HTML elements as component id: "+e),"component"===t&&s(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function Rt(e){return e&&(e.Ctor.options.name||e.tag)}function Ht(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!c(e)&&e.test(t)}function Ut(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var a=n[o];if(a){var s=Rt(a.componentOptions);s&&!t(s)&&Vt(n,o,r,i)}}}function Vt(e,t,n,r){var i=e[t];i&&i!==r&&i.componentInstance.$destroy(),e[t]=null,p(n,t)}function Bt(e){for(var n=e.data,r=e,i=e;t(i.componentInstance);)(i=i.componentInstance._vnode).data&&(n=zt(i.data,n));for(;t(r=r.parent);)r.data&&(n=zt(n,r.data));return qt(n.staticClass,n.class)}function zt(e,n){return{staticClass:Jt(e.staticClass,n.staticClass),class:t(e.class)?[e.class,n.class]:n.class}}function qt(e,n){return t(e)||t(n)?Jt(e,Kt(n)):""}function Jt(e,t){return e?t?e+" "+t:e:t||""}function Kt(e){return Array.isArray(e)?Wt(e):o(e)?Yt(e):"string"==typeof e?e:""}function Wt(e){for(var n,r="",i=0,o=e.length;i=0&&" "===(m=e.charAt(h));h--);m&&us.test(m)||(u=!0)}}else void 0===o?(v=i+1,o=e.slice(0,i).trim()):t();if(void 0===o?o=e.slice(0,i).trim():0!==v&&t(),a)for(i=0;i-1?{exp:e.slice(0,Na),key:'"'+e.slice(Na+1)+'"'}:{exp:e,key:null};for(Ia=e,Na=La=Pa=0;!kn();)An(Ma=Cn())?Sn(Ma):91===Ma&&On(Ma);return{exp:e.slice(0,La),key:e.slice(La+1,Pa)}}function Cn(){return Ia.charCodeAt(++Na)}function kn(){return Na>=Ea}function An(e){return 34===e||39===e}function On(e){var t=1;for(La=Na;!kn();)if(e=Cn(),An(e))Sn(e);else if(91===e&&t++,93===e&&t--,0===t){Pa=Na;break}}function Sn(e){for(var t=e;!kn()&&(e=Cn())!==t;);}function Tn(e,t,n){var r=n&&n.number,i=_n(e,"value")||"null",o=_n(e,"true-value")||"true",a=_n(e,"false-value")||"false";hn(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1"+("true"===o?":("+t+")":":_q("+t+","+o+")")),gn(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+t+"=$$a.concat([$$v]))}else{$$i>-1&&("+t+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+$n(t,"$$c")+"}",null,!0)}function jn(e,t,n){var r=n&&n.number,i=_n(e,"value")||"null";hn(e,"checked","_q("+t+","+(i=r?"_n("+i+")":i)+")"),gn(e,"change",$n(t,i),null,!0)}function En(e,t,n){var r="var $$selectedVal = "+('Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(n&&n.number?"_n(val)":"val")+"})")+";";gn(e,"change",r=r+" "+$n(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),null,!0)}function In(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,l=o?"change":"range"===r?fs:"input",u="$event.target.value";s&&(u="$event.target.value.trim()"),a&&(u="_n("+u+")");var f=$n(t,u);c&&(f="if($event.target.composing)return;"+f),hn(e,"value","("+t+")"),gn(e,l,f,null,!0),(s||a)&&gn(e,"blur","$forceUpdate()")}function Mn(e){if(t(e[fs])){var n=ao?"change":"input";e[n]=[].concat(e[fs],e[n]||[]),delete e[fs]}t(e[ds])&&(e.change=[].concat(e[ds],e.change||[]),delete e[ds])}function Nn(e,t,n){var r=Fa;return function i(){null!==e.apply(null,arguments)&&Pn(t,i,n,r)}}function Ln(e,t,n,r,i){t=se(t),n&&(t=Nn(t,e,r)),Fa.addEventListener(e,t,vo?{capture:r,passive:i}:r)}function Pn(e,t,n,r){(r||Fa).removeEventListener(e,t._withTask||t,n)}function Dn(t,n){if(!e(t.data.on)||!e(n.data.on)){var r=n.data.on||{},i=t.data.on||{};Fa=n.elm,Mn(r),ue(r,i,Ln,Pn,n.context),Fa=void 0}}function Fn(n,r){if(!e(n.data.domProps)||!e(r.data.domProps)){var i,o,a=r.elm,s=n.data.domProps||{},c=r.data.domProps||{};t(c.__ob__)&&(c=r.data.domProps=g({},c));for(i in s)e(c[i])&&(a[i]="");for(i in c){if(o=c[i],"textContent"===i||"innerHTML"===i){if(r.children&&(r.children.length=0),o===s[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i){a._value=o;var l=e(o)?"":String(o);Rn(a,l)&&(a.value=l)}else a[i]=o}}}function Rn(e,t){return!e.composing&&("OPTION"===e.tagName||Hn(e,t)||Un(e,t))}function Hn(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}function Un(e,n){var r=e.value,i=e._vModifiers;return t(i)&&i.number?f(r)!==f(n):t(i)&&i.trim?r.trim()!==n.trim():r!==n}function Vn(e){var t=Bn(e.style);return e.staticStyle?g(e.staticStyle,t):t}function Bn(e){return Array.isArray(e)?_(e):"string"==typeof e?hs(e):e}function zn(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode).data&&(n=Vn(i.data))&&g(r,n);(n=Vn(e.data))&&g(r,n);for(var o=e;o=o.parent;)o.data&&(n=Vn(o.data))&&g(r,n);return r}function qn(n,r){var i=r.data,o=n.data;if(!(e(i.staticStyle)&&e(i.style)&&e(o.staticStyle)&&e(o.style))){var a,s,c=r.elm,l=o.staticStyle,u=o.normalizedStyle||o.style||{},f=l||u,d=Bn(r.data.style)||{};r.data.normalizedStyle=t(d.__ob__)?g({},d):d;var p=zn(r,!0);for(s in f)e(p[s])&&gs(c,s,"");for(s in p)(a=p[s])!==f[s]&&gs(c,s,null==a?"":a)}}function Jn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Kn(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Wn(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&g(t,$s(e.name||"v")),g(t,e),t}return"string"==typeof e?$s(e):void 0}}function Yn(e){js(function(){js(e)})}function Zn(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Jn(e,t))}function Gn(e,t){e._transitionClasses&&p(e._transitionClasses,t),Kn(e,t)}function Qn(e,t,n){var r=Xn(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===Cs?Os:Ts,c=0,l=function(){e.removeEventListener(s,u),n()},u=function(t){t.target===e&&++c>=a&&l()};setTimeout(function(){c0&&(n=Cs,u=a,f=o.length):t===ks?l>0&&(n=ks,u=l,f=c.length):f=(n=(u=Math.max(a,l))>0?a>l?Cs:ks:null)?n===Cs?o.length:c.length:0,{type:n,timeout:u,propCount:f,hasTransform:n===Cs&&Es.test(r[As+"Property"])}}function er(e,t){for(;e.length explicit "+t+" duration is not a valid number - got "+JSON.stringify(e)+".",n.context):isNaN(e)&&wo(" explicit "+t+" duration is NaN - the duration expression might be incorrect.",n.context)}function or(e){return"number"==typeof e&&!isNaN(e)}function ar(n){if(e(n))return!1;var r=n.fns;return t(r)?ar(Array.isArray(r)?r[0]:r):(n._length||n.length)>1}function sr(e,t){!0!==t.data.show&&nr(t)}function cr(e,t,n){lr(e,t,n),(ao||co)&&setTimeout(function(){lr(e,t,n)},0)}function lr(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s-1,a.selected!==o&&(a.selected=o);else if(w(fr(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}else wo('