Comparing version 4.0.0 to 5.0.0
/*! | ||
* OOjs v4.0.0 optimised for jQuery | ||
* OOjs v5.0.0 optimised for jQuery | ||
* https://www.mediawiki.org/wiki/OOjs | ||
@@ -9,3 +9,3 @@ * | ||
* | ||
* Date: 2020-04-30T23:48:50Z | ||
* Date: 2020-05-05T19:28:30Z | ||
*/ | ||
@@ -12,0 +12,0 @@ ( function ( global ) { |
@@ -1,3 +0,3 @@ | ||
/*! OOjs v4.0.0 | https://oojs.mit-license.org */ | ||
/*! OOjs v5.0.0 | https://oojs.mit-license.org */ | ||
!function(t){"use strict";var c={},a=c.hasOwnProperty,h=Array.prototype.slice;c.toString;function i(t,e,i){var r,n,o={},s=[];for(r=0,n=e.length;r<n;r++)o[e[r]]=!0;for(r=0,n=t.length;r<n;r++)!!o[t[r]]===i&&s.push(t[r]);return s}c.initClass=function(t){t.static=t.static||{}},c.inheritClass=function(t,e){var i;if(!e)throw new Error("inheritClass: Origin is not a function (actually "+e+")");if(t.prototype instanceof e)throw new Error("inheritClass: Target already inherits from origin");i=t.prototype.constructor,t.super=t.parent=e,t.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),c.initClass(e),t.static=Object.create(e.static)},c.mixinClass=function(t,e){var i;if(!e)throw new Error("mixinClass: Origin is not a function (actually "+e+")");for(i in e.prototype)"constructor"!==i&&a.call(e.prototype,i)&&(t.prototype[i]=e.prototype[i]);if(c.initClass(t),e.static)for(i in e.static)a.call(e.static,i)&&(t.static[i]=e.static[i]);else c.initClass(e)},c.isSubclass=function(t,e){return t===e||t.prototype instanceof e},c.getProp=function(t){var e,i=t;for(e=1;e<arguments.length;e++){if(null==i)return;i=i[arguments[e]]}return i},c.setProp=function(t){var e,i=t;if(!(Object(t)!==t||arguments.length<2)){for(e=1;e<arguments.length-2;e++){if(void 0===i[arguments[e]]&&(i[arguments[e]]={}),Object(i[arguments[e]])!==i[arguments[e]])return;i=i[arguments[e]]}i[arguments[arguments.length-2]]=arguments[arguments.length-1]}},c.deleteProp=function(t){var e,i=t,r=[i];if(!(Object(t)!==t||arguments.length<2)){for(e=1;e<arguments.length-1;e++){if(void 0===i[arguments[e]]||Object(i[arguments[e]])!==i[arguments[e]])return;i=i[arguments[e]],r.push(i)}for(delete i[arguments[e]];1<r.length&&(i=r.pop())&&c.isPlainObject(i)&&!Object.keys(i).length;)delete r[r.length-1][arguments[r.length]]}},c.cloneObject=function(t){var e,i;for(e in i=Object.create(t.constructor.prototype),t)a.call(t,e)&&(i[e]=t[e]);return i},c.getObjectValues=function(t){var e,i;if(t!==Object(t))throw new TypeError("Called on non-object");for(e in i=[],t)a.call(t,e)&&(i[i.length]=t[e]);return i},c.binarySearch=function(t,e,i){for(var r,n,o=0,s=t.length;o<s;)if((n=e(t[r=o+s>>1]))<0)s=r;else{if(!(0<n))return r;o=r+1}return i?s:null},c.compare=function(t,e,i){var r,n,o,s;if(t===e)return!0;if(e=e||{},"number"==typeof(t=t||{}).nodeType&&"function"==typeof t.isEqualNode)return t.isEqualNode(e);for(s in t)if(a.call(t,s)&&void 0!==t[s]&&t[s]!==e[s]&&((o=typeof(r=t[s]))!==typeof(n=e[s])||("string"===o||"number"===o||"boolean"===o)&&r!==n||r===Object(r)&&!c.compare(r,n,!0)))return!1;return!!i||c.compare(e,t,!0)},c.copy=function(t,e,i){var r,n;if(i&&void 0!==(n=i(t)))return n;if(Array.isArray(t))n=new Array(t.length);else{if(t&&"function"==typeof t.clone)return e?e(t.clone()):t.clone();if(t&&"function"==typeof t.cloneNode)return e?e(t.cloneNode(!0)):t.cloneNode(!0);if(!c.isPlainObject(t))return e?e(t):t;n={}}for(r in t)n[r]=c.copy(t[r],e,i);return n},c.getHash=function(t){return JSON.stringify(t,c.getHash.keySortReplacer)},c.getHash.keySortReplacer=function(t,e){var i,r,n,o;if(e&&"function"==typeof e.getHashObject&&(e=e.getHashObject()),Array.isArray(e)||Object(e)!==e)return e;for(i={},n=0,o=(r=Object.keys(e).sort()).length;n<o;n+=1)i[r[n]]=e[r[n]];return i},c.unique=function(t){return t.reduce(function(t,e){return-1===t.indexOf(e)&&t.push(e),t},[])},c.simpleArrayUnion=function(){var t,e,i,r,n,o={},s=[];for(t=0,e=arguments.length;t<e;t++)for(r=0,n=(i=arguments[t]).length;r<n;r++)o[i[r]]||(o[i[r]]=!0,s.push(i[r]));return s},c.simpleArrayIntersection=function(t,e){return i(t,e,!0)},c.simpleArrayDifference=function(t,e){return i(t,e,!1)},c.isPlainObject=$.isPlainObject,function(){function o(t,e){if("string"==typeof t){if(null==e)throw new Error('Method name "'+t+'" has no context.');if("function"!=typeof e[t])throw new Error('Property "'+t+'" is not a function')}else if("function"!=typeof t)throw new Error("Invalid callback. Function or method name expected.")}function n(t,e,i){(a.call(t.bindings,e)?t.bindings[e]:t.bindings[e]=[]).push(i)}c.EventEmitter=function(){this.bindings={}},c.initClass(c.EventEmitter),c.EventEmitter.prototype.on=function(t,e,i,r){return o(e,r),n(this,t,{method:e,args:i,context:arguments.length<4?null:r,once:!1}),this},c.EventEmitter.prototype.once=function(t,e){return o(e),n(this,t,{method:e,args:void 0,context:null,once:!0}),this},c.EventEmitter.prototype.off=function(t,e,i){var r,n;if(1===arguments.length)return delete this.bindings[t],this;if(o(e,i),!a.call(this.bindings,t)||!this.bindings[t].length)return this;for(arguments.length<3&&(i=null),r=(n=this.bindings[t]).length;r--;)n[r].method===e&&n[r].context===i&&n.splice(r,1);return 0===n.length&&delete this.bindings[t],this},c.EventEmitter.prototype.emit=function(t){var e,i,r,n,o;if(!a.call(this.bindings,t))return!1;for(e=this.bindings[t].slice(),i=h.call(arguments,1),r=0;r<e.length;r++){o="string"==typeof(n=e[r]).method?n.context[n.method]:n.method,n.once&&this.off(t,o);try{o.apply(n.context,n.args?n.args.concat(i):i)}catch(t){setTimeout(function(t){throw t}.bind(null,t))}}return!0},c.EventEmitter.prototype.emitThrow=function(t){var e,i,r,n,o,s;if(!a.call(this.bindings,t))return!1;for(e=this.bindings[t].slice(),i=h.call(arguments,1),r=0;r<e.length;r++){o="string"==typeof(n=e[r]).method?n.context[n.method]:n.method,n.once&&this.off(t,o);try{o.apply(n.context,n.args?n.args.concat(i):i)}catch(t){void 0===s?s=t:setTimeout(function(t){throw t}.bind(null,t))}}if(void 0!==s)throw s;return!0},c.EventEmitter.prototype.connect=function(t,e){var i,r,n;for(n in e)i=e[n],Array.isArray(i)?(r=i.slice(1),i=i[0]):r=[],this.on(n,i,r,t);return this},c.EventEmitter.prototype.disconnect=function(t,e){var i,r,n,o;if(e)for(r in e)n=e[r],Array.isArray(n)&&(n=n[0]),this.off(r,n,t);else for(r in this.bindings)for(i=(o=this.bindings[r]).length;i--;)o[i]&&o[i].context===t&&this.off(r,o[i].method,t);return this}}(),function(){function n(t,e){return void 0===e||e<0||e>=t.length?t.length:e}c.EmitterList=function(){this.items=[],this.aggregateItemEvents={}},c.initClass(c.EmitterList),c.EmitterList.prototype.getItems=function(){return this.items.slice(0)},c.EmitterList.prototype.getItemIndex=function(t){return this.items.indexOf(t)},c.EmitterList.prototype.getItemCount=function(){return this.items.length},c.EmitterList.prototype.isEmpty=function(){return!this.items.length},c.EmitterList.prototype.aggregate=function(t){var e,i,r,n,o,s;for(o in t){if(s=t[o],Object.prototype.hasOwnProperty.call(this.aggregateItemEvents,o)){if(s)throw new Error("Duplicate item event aggregation for "+o);for(e=0;e<this.items.length;e++)(i=this.items[e]).connect&&i.disconnect&&((n={})[o]=["emit",this.aggregateItemEvents[o],i],i.disconnect(this,n));delete this.aggregateItemEvents[o]}if(s)for(this.aggregateItemEvents[o]=s,e=0;e<this.items.length;e++)(i=this.items[e]).connect&&i.disconnect&&((r={})[o]=["emit",s,i],i.connect(this,r))}},c.EmitterList.prototype.addItems=function(t,e){var i,r;if(Array.isArray(t)||(t=[t]),0===t.length)return this;for(e=n(this.items,e),i=0;i<t.length;i++)-1!==(r=this.items.indexOf(t[i]))?(e=this.moveItem(t[i],e),this.emit("move",t[i],e,r)):(e=this.insertItem(t[i],e),this.emit("add",t[i],e)),e++;return this},c.EmitterList.prototype.moveItem=function(t,e){var i=this.items.indexOf(t);if(-1===i)throw new Error("Item cannot be moved, because it is not in the list.");return e=n(this.items,e),this.items.splice(i,1),i<e&&e--,this.items.splice(e,0,t),e},c.EmitterList.prototype.insertItem=function(t,e){var i,r;if(null===t||"object"!=typeof t)throw new Error("Expected object, but item is "+typeof t);if(t.connect&&t.disconnect){for(r in i={},this.aggregateItemEvents)i[r]=["emit",this.aggregateItemEvents[r],t];t.connect(this,i)}return e=n(this.items,e),this.items.splice(e,0,t),e},c.EmitterList.prototype.removeItems=function(t){var e,i,r;if(Array.isArray(t)||(t=[t]),0===t.length)return this;for(e=0;e<t.length;e++)i=t[e],-1!==(r=this.items.indexOf(i))&&(i.connect&&i.disconnect&&i.disconnect(this),this.items.splice(r,1),this.emit("remove",i,r));return this},c.EmitterList.prototype.clearItems=function(){var t,e,i=this.items.splice(0,this.items.length);for(t=0;t<i.length;t++)(e=i[t]).connect&&e.disconnect&&e.disconnect(this);return this.emit("clear"),this}}(),c.SortedEmitterList=function(t){c.EmitterList.call(this),this.sortingCallback=t,this.aggregate({sortChange:"itemSortChange"}),this.connect(this,{itemSortChange:"onItemSortChange"})},c.mixinClass(c.SortedEmitterList,c.EmitterList),c.SortedEmitterList.prototype.onItemSortChange=function(t){this.removeItems(t),this.addItems(t)},c.SortedEmitterList.prototype.setSortingCallback=function(t){var e=this.getItems();this.sortingCallback=t,this.clearItems(),this.addItems(e)},c.SortedEmitterList.prototype.addItems=function(t){var e,i,r;if(Array.isArray(t)||(t=[t]),0===t.length)return this;for(i=0;i<t.length;i++)(r=this.findInsertionIndex(t[i]))<=this.items.length&&this.items[r]&&0===this.sortingCallback(this.items[r],t[i])&&this.removeItems(this.items[r]),e=this.insertItem(t[i],r),this.emit("add",t[i],e);return this},c.SortedEmitterList.prototype.findInsertionIndex=function(e){var i=this;return c.binarySearch(this.items,function(t){return i.sortingCallback(e,t)},!0)},c.Registry=function(){c.EventEmitter.call(this),this.registry={}},c.mixinClass(c.Registry,c.EventEmitter),c.Registry.prototype.register=function(t,e){var i,r;if("string"==typeof t)this.registry[t]=e,this.emit("register",t,e);else{if(!Array.isArray(t))throw new Error("Name must be a string or array, cannot be a "+typeof t);for(i=0,r=t.length;i<r;i++)this.register(t[i],e)}},c.Registry.prototype.unregister=function(t){var e,i,r;if("string"==typeof t)void 0!==(r=this.lookup(t))&&(delete this.registry[t],this.emit("unregister",t,r));else{if(!Array.isArray(t))throw new Error("Name must be a string or array, cannot be a "+typeof t);for(e=0,i=t.length;e<i;e++)this.unregister(t[e])}},c.Registry.prototype.lookup=function(t){if(a.call(this.registry,t))return this.registry[t]},c.Factory=function(){c.Factory.super.call(this)},c.inheritClass(c.Factory,c.Registry),c.Factory.prototype.register=function(t,e){if("function"!=typeof t)throw new Error("constructor must be a function, got "+typeof t);if(arguments.length<=1&&(e=t.static&&t.static.name),"string"!=typeof e||""===e)throw new Error("name must be a non-empty string");c.Factory.super.prototype.register.call(this,e,t)},c.Factory.prototype.unregister=function(t){if("function"==typeof t&&(t=t.static&&t.static.name),"string"!=typeof t||""===t)throw new Error("name must be a non-empty string");c.Factory.super.prototype.unregister.call(this,t)},c.Factory.prototype.create=function(t){var e,i,r=[],n=this.lookup(t);if(!n)throw new Error("No class registered by that name: "+t);for(i=1;i<arguments.length;i++)r.push(arguments[i]);return e=Object.create(n.prototype),n.apply(e,r),e},"undefined"!=typeof module&&module.exports?module.exports=c:t.OO=c}(this); | ||
//# sourceMappingURL=oojs.jquery.min.js.map |
/*! | ||
* OOjs v4.0.0 | ||
* OOjs v5.0.0 | ||
* https://www.mediawiki.org/wiki/OOjs | ||
@@ -9,3 +9,3 @@ * | ||
* | ||
* Date: 2020-04-30T23:48:50Z | ||
* Date: 2020-05-05T19:28:30Z | ||
*/ | ||
@@ -12,0 +12,0 @@ ( function ( global ) { |
@@ -1,3 +0,3 @@ | ||
/*! OOjs v4.0.0 | https://oojs.mit-license.org */ | ||
/*! OOjs v5.0.0 | https://oojs.mit-license.org */ | ||
!function(t){"use strict";var c={},a=c.hasOwnProperty,h=Array.prototype.slice,i=c.toString;function r(t,e,i){var r,n,o={},s=[];for(r=0,n=e.length;r<n;r++)o[e[r]]=!0;for(r=0,n=t.length;r<n;r++)!!o[t[r]]===i&&s.push(t[r]);return s}c.initClass=function(t){t.static=t.static||{}},c.inheritClass=function(t,e){var i;if(!e)throw new Error("inheritClass: Origin is not a function (actually "+e+")");if(t.prototype instanceof e)throw new Error("inheritClass: Target already inherits from origin");i=t.prototype.constructor,t.super=t.parent=e,t.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),c.initClass(e),t.static=Object.create(e.static)},c.mixinClass=function(t,e){var i;if(!e)throw new Error("mixinClass: Origin is not a function (actually "+e+")");for(i in e.prototype)"constructor"!==i&&a.call(e.prototype,i)&&(t.prototype[i]=e.prototype[i]);if(c.initClass(t),e.static)for(i in e.static)a.call(e.static,i)&&(t.static[i]=e.static[i]);else c.initClass(e)},c.isSubclass=function(t,e){return t===e||t.prototype instanceof e},c.getProp=function(t){var e,i=t;for(e=1;e<arguments.length;e++){if(null==i)return;i=i[arguments[e]]}return i},c.setProp=function(t){var e,i=t;if(!(Object(t)!==t||arguments.length<2)){for(e=1;e<arguments.length-2;e++){if(void 0===i[arguments[e]]&&(i[arguments[e]]={}),Object(i[arguments[e]])!==i[arguments[e]])return;i=i[arguments[e]]}i[arguments[arguments.length-2]]=arguments[arguments.length-1]}},c.deleteProp=function(t){var e,i=t,r=[i];if(!(Object(t)!==t||arguments.length<2)){for(e=1;e<arguments.length-1;e++){if(void 0===i[arguments[e]]||Object(i[arguments[e]])!==i[arguments[e]])return;i=i[arguments[e]],r.push(i)}for(delete i[arguments[e]];1<r.length&&(i=r.pop())&&c.isPlainObject(i)&&!Object.keys(i).length;)delete r[r.length-1][arguments[r.length]]}},c.cloneObject=function(t){var e,i;for(e in i=Object.create(t.constructor.prototype),t)a.call(t,e)&&(i[e]=t[e]);return i},c.getObjectValues=function(t){var e,i;if(t!==Object(t))throw new TypeError("Called on non-object");for(e in i=[],t)a.call(t,e)&&(i[i.length]=t[e]);return i},c.binarySearch=function(t,e,i){for(var r,n,o=0,s=t.length;o<s;)if((n=e(t[r=o+s>>1]))<0)s=r;else{if(!(0<n))return r;o=r+1}return i?s:null},c.compare=function(t,e,i){var r,n,o,s;if(t===e)return!0;if(e=e||{},"number"==typeof(t=t||{}).nodeType&&"function"==typeof t.isEqualNode)return t.isEqualNode(e);for(s in t)if(a.call(t,s)&&void 0!==t[s]&&t[s]!==e[s]&&((o=typeof(r=t[s]))!==typeof(n=e[s])||("string"===o||"number"===o||"boolean"===o)&&r!==n||r===Object(r)&&!c.compare(r,n,!0)))return!1;return!!i||c.compare(e,t,!0)},c.copy=function(t,e,i){var r,n;if(i&&void 0!==(n=i(t)))return n;if(Array.isArray(t))n=new Array(t.length);else{if(t&&"function"==typeof t.clone)return e?e(t.clone()):t.clone();if(t&&"function"==typeof t.cloneNode)return e?e(t.cloneNode(!0)):t.cloneNode(!0);if(!c.isPlainObject(t))return e?e(t):t;n={}}for(r in t)n[r]=c.copy(t[r],e,i);return n},c.getHash=function(t){return JSON.stringify(t,c.getHash.keySortReplacer)},c.getHash.keySortReplacer=function(t,e){var i,r,n,o;if(e&&"function"==typeof e.getHashObject&&(e=e.getHashObject()),Array.isArray(e)||Object(e)!==e)return e;for(i={},n=0,o=(r=Object.keys(e).sort()).length;n<o;n+=1)i[r[n]]=e[r[n]];return i},c.unique=function(t){return t.reduce(function(t,e){return-1===t.indexOf(e)&&t.push(e),t},[])},c.simpleArrayUnion=function(){var t,e,i,r,n,o={},s=[];for(t=0,e=arguments.length;t<e;t++)for(r=0,n=(i=arguments[t]).length;r<n;r++)o[i[r]]||(o[i[r]]=!0,s.push(i[r]));return s},c.simpleArrayIntersection=function(t,e){return r(t,e,!0)},c.simpleArrayDifference=function(t,e){return r(t,e,!1)},c.isPlainObject=function(t){var e;return!(!t||"[object Object]"!==i.call(t))&&(!(e=Object.getPrototypeOf(t))||a.call(e,"isPrototypeOf"))},function(){function o(t,e){if("string"==typeof t){if(null==e)throw new Error('Method name "'+t+'" has no context.');if("function"!=typeof e[t])throw new Error('Property "'+t+'" is not a function')}else if("function"!=typeof t)throw new Error("Invalid callback. Function or method name expected.")}function n(t,e,i){(a.call(t.bindings,e)?t.bindings[e]:t.bindings[e]=[]).push(i)}c.EventEmitter=function(){this.bindings={}},c.initClass(c.EventEmitter),c.EventEmitter.prototype.on=function(t,e,i,r){return o(e,r),n(this,t,{method:e,args:i,context:arguments.length<4?null:r,once:!1}),this},c.EventEmitter.prototype.once=function(t,e){return o(e),n(this,t,{method:e,args:void 0,context:null,once:!0}),this},c.EventEmitter.prototype.off=function(t,e,i){var r,n;if(1===arguments.length)return delete this.bindings[t],this;if(o(e,i),!a.call(this.bindings,t)||!this.bindings[t].length)return this;for(arguments.length<3&&(i=null),r=(n=this.bindings[t]).length;r--;)n[r].method===e&&n[r].context===i&&n.splice(r,1);return 0===n.length&&delete this.bindings[t],this},c.EventEmitter.prototype.emit=function(t){var e,i,r,n,o;if(!a.call(this.bindings,t))return!1;for(e=this.bindings[t].slice(),i=h.call(arguments,1),r=0;r<e.length;r++){o="string"==typeof(n=e[r]).method?n.context[n.method]:n.method,n.once&&this.off(t,o);try{o.apply(n.context,n.args?n.args.concat(i):i)}catch(t){setTimeout(function(t){throw t}.bind(null,t))}}return!0},c.EventEmitter.prototype.emitThrow=function(t){var e,i,r,n,o,s;if(!a.call(this.bindings,t))return!1;for(e=this.bindings[t].slice(),i=h.call(arguments,1),r=0;r<e.length;r++){o="string"==typeof(n=e[r]).method?n.context[n.method]:n.method,n.once&&this.off(t,o);try{o.apply(n.context,n.args?n.args.concat(i):i)}catch(t){void 0===s?s=t:setTimeout(function(t){throw t}.bind(null,t))}}if(void 0!==s)throw s;return!0},c.EventEmitter.prototype.connect=function(t,e){var i,r,n;for(n in e)i=e[n],Array.isArray(i)?(r=i.slice(1),i=i[0]):r=[],this.on(n,i,r,t);return this},c.EventEmitter.prototype.disconnect=function(t,e){var i,r,n,o;if(e)for(r in e)n=e[r],Array.isArray(n)&&(n=n[0]),this.off(r,n,t);else for(r in this.bindings)for(i=(o=this.bindings[r]).length;i--;)o[i]&&o[i].context===t&&this.off(r,o[i].method,t);return this}}(),function(){function n(t,e){return void 0===e||e<0||e>=t.length?t.length:e}c.EmitterList=function(){this.items=[],this.aggregateItemEvents={}},c.initClass(c.EmitterList),c.EmitterList.prototype.getItems=function(){return this.items.slice(0)},c.EmitterList.prototype.getItemIndex=function(t){return this.items.indexOf(t)},c.EmitterList.prototype.getItemCount=function(){return this.items.length},c.EmitterList.prototype.isEmpty=function(){return!this.items.length},c.EmitterList.prototype.aggregate=function(t){var e,i,r,n,o,s;for(o in t){if(s=t[o],Object.prototype.hasOwnProperty.call(this.aggregateItemEvents,o)){if(s)throw new Error("Duplicate item event aggregation for "+o);for(e=0;e<this.items.length;e++)(i=this.items[e]).connect&&i.disconnect&&((n={})[o]=["emit",this.aggregateItemEvents[o],i],i.disconnect(this,n));delete this.aggregateItemEvents[o]}if(s)for(this.aggregateItemEvents[o]=s,e=0;e<this.items.length;e++)(i=this.items[e]).connect&&i.disconnect&&((r={})[o]=["emit",s,i],i.connect(this,r))}},c.EmitterList.prototype.addItems=function(t,e){var i,r;if(Array.isArray(t)||(t=[t]),0===t.length)return this;for(e=n(this.items,e),i=0;i<t.length;i++)-1!==(r=this.items.indexOf(t[i]))?(e=this.moveItem(t[i],e),this.emit("move",t[i],e,r)):(e=this.insertItem(t[i],e),this.emit("add",t[i],e)),e++;return this},c.EmitterList.prototype.moveItem=function(t,e){var i=this.items.indexOf(t);if(-1===i)throw new Error("Item cannot be moved, because it is not in the list.");return e=n(this.items,e),this.items.splice(i,1),i<e&&e--,this.items.splice(e,0,t),e},c.EmitterList.prototype.insertItem=function(t,e){var i,r;if(null===t||"object"!=typeof t)throw new Error("Expected object, but item is "+typeof t);if(t.connect&&t.disconnect){for(r in i={},this.aggregateItemEvents)i[r]=["emit",this.aggregateItemEvents[r],t];t.connect(this,i)}return e=n(this.items,e),this.items.splice(e,0,t),e},c.EmitterList.prototype.removeItems=function(t){var e,i,r;if(Array.isArray(t)||(t=[t]),0===t.length)return this;for(e=0;e<t.length;e++)i=t[e],-1!==(r=this.items.indexOf(i))&&(i.connect&&i.disconnect&&i.disconnect(this),this.items.splice(r,1),this.emit("remove",i,r));return this},c.EmitterList.prototype.clearItems=function(){var t,e,i=this.items.splice(0,this.items.length);for(t=0;t<i.length;t++)(e=i[t]).connect&&e.disconnect&&e.disconnect(this);return this.emit("clear"),this}}(),c.SortedEmitterList=function(t){c.EmitterList.call(this),this.sortingCallback=t,this.aggregate({sortChange:"itemSortChange"}),this.connect(this,{itemSortChange:"onItemSortChange"})},c.mixinClass(c.SortedEmitterList,c.EmitterList),c.SortedEmitterList.prototype.onItemSortChange=function(t){this.removeItems(t),this.addItems(t)},c.SortedEmitterList.prototype.setSortingCallback=function(t){var e=this.getItems();this.sortingCallback=t,this.clearItems(),this.addItems(e)},c.SortedEmitterList.prototype.addItems=function(t){var e,i,r;if(Array.isArray(t)||(t=[t]),0===t.length)return this;for(i=0;i<t.length;i++)(r=this.findInsertionIndex(t[i]))<=this.items.length&&this.items[r]&&0===this.sortingCallback(this.items[r],t[i])&&this.removeItems(this.items[r]),e=this.insertItem(t[i],r),this.emit("add",t[i],e);return this},c.SortedEmitterList.prototype.findInsertionIndex=function(e){var i=this;return c.binarySearch(this.items,function(t){return i.sortingCallback(e,t)},!0)},c.Registry=function(){c.EventEmitter.call(this),this.registry={}},c.mixinClass(c.Registry,c.EventEmitter),c.Registry.prototype.register=function(t,e){var i,r;if("string"==typeof t)this.registry[t]=e,this.emit("register",t,e);else{if(!Array.isArray(t))throw new Error("Name must be a string or array, cannot be a "+typeof t);for(i=0,r=t.length;i<r;i++)this.register(t[i],e)}},c.Registry.prototype.unregister=function(t){var e,i,r;if("string"==typeof t)void 0!==(r=this.lookup(t))&&(delete this.registry[t],this.emit("unregister",t,r));else{if(!Array.isArray(t))throw new Error("Name must be a string or array, cannot be a "+typeof t);for(e=0,i=t.length;e<i;e++)this.unregister(t[e])}},c.Registry.prototype.lookup=function(t){if(a.call(this.registry,t))return this.registry[t]},c.Factory=function(){c.Factory.super.call(this)},c.inheritClass(c.Factory,c.Registry),c.Factory.prototype.register=function(t,e){if("function"!=typeof t)throw new Error("constructor must be a function, got "+typeof t);if(arguments.length<=1&&(e=t.static&&t.static.name),"string"!=typeof e||""===e)throw new Error("name must be a non-empty string");c.Factory.super.prototype.register.call(this,e,t)},c.Factory.prototype.unregister=function(t){if("function"==typeof t&&(t=t.static&&t.static.name),"string"!=typeof t||""===t)throw new Error("name must be a non-empty string");c.Factory.super.prototype.unregister.call(this,t)},c.Factory.prototype.create=function(t){var e,i,r=[],n=this.lookup(t);if(!n)throw new Error("No class registered by that name: "+t);for(i=1;i<arguments.length;i++)r.push(arguments[i]);return e=Object.create(n.prototype),n.apply(e,r),e},"undefined"!=typeof module&&module.exports?module.exports=c:t.OO=c}(this); | ||
//# sourceMappingURL=oojs.min.js.map |
# OOjs Release History | ||
## v5.0.0 / 2020-05-05 | ||
* [BREAKING CHANGE] Use jQuery v3.5.1, up from v3.5.0 (James D. Forrester) | ||
* build: Remove concurrency limit from SauceLabs jobs (James D. Forrester) | ||
* build: Upgrade karma-related devDependencies to latest (James D. Forrester) | ||
## v4.0.0 / 2020-04-30 | ||
@@ -4,0 +9,0 @@ * [BREAKING CHANGE] Use jQuery v3.5.0, up from v3.4.1 (James D. Forrester) |
{ | ||
"name": "oojs", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "Power for object oriented JavaScript libraries.", | ||
@@ -40,15 +40,15 @@ "keywords": [ | ||
"grunt-jsdoc": "2.4.0", | ||
"grunt-karma": "3.0.2", | ||
"jquery": "3.5.0", | ||
"grunt-karma": "4.0.0", | ||
"jquery": "3.5.1", | ||
"jsdoc-class-hierarchy": "1.1.2", | ||
"jsdoc-wmf-theme": "0.0.3", | ||
"karma": "4.4.1", | ||
"karma": "5.0.4", | ||
"karma-chrome-launcher": "3.1.0", | ||
"karma-coverage": "2.0.1", | ||
"karma-coverage": "2.0.2", | ||
"karma-firefox-launcher": "1.3.0", | ||
"karma-qunit": "4.0.0", | ||
"karma-qunit": "4.1.0", | ||
"karma-remap-istanbul": "0.6.0", | ||
"karma-sauce-launcher": "2.0.2", | ||
"qunit": "2.9.3" | ||
"karma-sauce-launcher": "4.1.4", | ||
"qunit": "2.10.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171158