wechat-mini-program-extend
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -1,1 +0,1 @@ | ||
"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _OptionInstaller2=_interopRequireDefault(require("./OptionInstaller")),_EventEmitter=_interopRequireDefault(require("../libs/EventEmitter"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(n){var r=_isNativeReflectConstruct();return function(){var e,t=_getPrototypeOf(n);return _possibleConstructorReturn(this,r?(e=_getPrototypeOf(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var EVTSign=Symbol("__wxEVT__"),OriginalSourceSign=Symbol("_originalSource"),SourceSign=Symbol("_source"),EventSign=Symbol("_event"),DataSign=Symbol("_data"),HandledSign=Symbol("_handled"),EventArgs=function(){function r(e,t,n){_classCallCheck(this,r),Object.defineProperty(this,OriginalSourceSign,{enumerable:!1,configurable:!1,value:e}),Object.defineProperty(this,SourceSign,{enumerable:!1,configurable:!1,value:null}),Object.defineProperty(this,EventSign,{enumerable:!1,configurable:!1,value:t}),Object.defineProperty(this,DataSign,{enumerable:!1,configurable:!1,value:n})}return _createClass(r,[{key:"originalSource",get:function(){return Reflect.get(this,OriginalSourceSign)}},{key:"event",get:function(){return Reflect.get(this,EventSign)}},{key:"data",get:function(){return Reflect.get(this,DataSign)}},{key:"source",get:function(){return Reflect.get(this,SourceSign)},set:function(e){Reflect.set(this,SourceSign,e)}}]),r}(),RoutedEventArgs=function(){_inherits(o,EventArgs);var r=_createSuper(o);function o(e,t,n){return _classCallCheck(this,o),n=r.call(this,e,t,n),Object.defineProperty(_assertThisInitialized(n),HandledSign,{enumerable:!1,configurable:!0,value:!1}),n}return _createClass(o,[{key:"handled",get:function(){return Reflect.get(this,HandledSign)},set:function(e){Reflect.set(this,HandledSign,e)}}]),o}(),EventBusInstaller=function(){_inherits(t,_OptionInstaller2["default"]);var e=_createSuper(t);function t(){return _classCallCheck(this,t),e.apply(this,arguments)}return _createClass(t,[{key:"definitionFilter",value:function(e,t,n,r,o){r.behaviors=[Behavior({created:function(){var e,t,n,r,o,i,a=this;Object.defineProperty(this,EVTSign,{configurable:!1,enumerable:!1,value:new _EventEmitter.default}),Object.hasOwnProperty.call(this,"$emit")||(e=function(e,t){for(var n=new RoutedEventArgs(a,e,t),r=a;r;){var o=Reflect.get(r,EVTSign);if(o&&(o.emit(n.event,n),!0===n.handled))break;r=r.$parent}},Object.defineProperty(this,"$emit",{configurable:!1,enumerable:!1,get:function(){return e}})),Object.hasOwnProperty.call(this,"$on")||(t=function(e,t){Reflect.get(a,EVTSign).on(e,t)},Object.defineProperty(this,"$on",{configurable:!1,enumerable:!1,get:function(){return t}})),Object.hasOwnProperty.call(this,"$off")||(n=function(e,t){Reflect.get(a,EVTSign).off(e,t)},Object.defineProperty(this,"$off",{configurable:!1,enumerable:!1,get:function(){return n}})),Object.hasOwnProperty.call(this,"$once")||(r=function(e,t){Reflect.get(a,EVTSign).once(e,t)},Object.defineProperty(this,"$once",{configurable:!1,enumerable:!1,get:function(){return r}})),Object.hasOwnProperty.call(this,"$dispatch")||(o=function(e,t){for(var n=[],r=new RoutedEventArgs(a,e,t),o=a;o;)n.push(o),o=o.$parent;n.reverse();for(var i=0,c=n;i<c.length;i++){var u=c[i],u=Reflect.get(u,EVTSign);if(u&&(u.emit(r.event,r),!0===r.handled))break}},Object.defineProperty(this,"$dispatch",{configurable:!1,enumerable:!1,get:function(){return o}})),Object.hasOwnProperty.call(this,"$broadcast")||(i=function(e,t){for(var n=new EventArgs(a,e,t),r=a;r.$parent;)r=r.$parent;for(var o=[r],i=[];o.length;){var c=o.pop();c!==a&&i.push(c),Array.isArray(c.$children)&&c.$children.length&&Array.prototype.push.apply(o,c.$children)}i.forEach(function(e){Reflect.get(e,EVTSign).emit(n.event,n)})},Object.defineProperty(this,"$broadcast",{configurable:!1,enumerable:!1,get:function(){return i}}))},detached:function(){var e=Reflect.get(this,EVTSign);e&&e.off(),Reflect.deleteProperty(this,EVTSign)}})].concat(r.behaviors||[])}}]),t}();exports.default=EventBusInstaller; | ||
"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _OptionInstaller2=_interopRequireDefault(require("./OptionInstaller")),_EventEmitter=_interopRequireDefault(require("../libs/EventEmitter"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(n){var r=_isNativeReflectConstruct();return function(){var e,t=_getPrototypeOf(n);return _possibleConstructorReturn(this,r?(e=_getPrototypeOf(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var EVTSign=Symbol("__wxEVT__"),OriginalSourceSign=Symbol("_originalSource"),SourceSign=Symbol("_source"),EventSign=Symbol("_event"),DataSign=Symbol("_data"),HandledSign=Symbol("_handled"),EventArgs=function(){function r(e,t,n){_classCallCheck(this,r),Object.defineProperty(this,OriginalSourceSign,{enumerable:!1,configurable:!1,value:e}),Object.defineProperty(this,SourceSign,{enumerable:!1,configurable:!1,writable:!0,value:null}),Object.defineProperty(this,EventSign,{enumerable:!1,configurable:!1,value:t}),Object.defineProperty(this,DataSign,{enumerable:!1,configurable:!1,value:n})}return _createClass(r,[{key:"originalSource",get:function(){return Reflect.get(this,OriginalSourceSign)}},{key:"event",get:function(){return Reflect.get(this,EventSign)}},{key:"data",get:function(){return Reflect.get(this,DataSign)}},{key:"source",get:function(){return Reflect.get(this,SourceSign)},set:function(e){Reflect.set(this,SourceSign,e)}}]),r}(),RoutedEventArgs=function(){_inherits(o,EventArgs);var r=_createSuper(o);function o(e,t,n){return _classCallCheck(this,o),n=r.call(this,e,t,n),Object.defineProperty(_assertThisInitialized(n),HandledSign,{enumerable:!1,configurable:!0,value:!1,writable:!0}),n}return _createClass(o,[{key:"handled",get:function(){return Reflect.get(this,HandledSign)},set:function(e){Reflect.set(this,HandledSign,e)}}]),o}(),EventBusInstaller=function(){_inherits(t,_OptionInstaller2["default"]);var e=_createSuper(t);function t(){return _classCallCheck(this,t),e.apply(this,arguments)}return _createClass(t,[{key:"definitionFilter",value:function(e,t,n,r,o){r.behaviors=[Behavior({created:function(){var e,t,n,r,o,i,a=this;Object.defineProperty(this,EVTSign,{configurable:!1,enumerable:!1,value:new _EventEmitter.default}),Object.hasOwnProperty.call(this,"$emit")||(e=function(e,t){for(var n=new RoutedEventArgs(a,e,t),r=a;r;){var o=Reflect.get(r,EVTSign);if(o&&(o.emit(n.event,n),!0===n.handled))break;r=r.$parent}},Object.defineProperty(this,"$emit",{configurable:!1,enumerable:!1,get:function(){return e}})),Object.hasOwnProperty.call(this,"$on")||(t=function(e,t){Reflect.get(a,EVTSign).on(e,t)},Object.defineProperty(this,"$on",{configurable:!1,enumerable:!1,get:function(){return t}})),Object.hasOwnProperty.call(this,"$off")||(n=function(e,t){Reflect.get(a,EVTSign).off(e,t)},Object.defineProperty(this,"$off",{configurable:!1,enumerable:!1,get:function(){return n}})),Object.hasOwnProperty.call(this,"$once")||(r=function(e,t){Reflect.get(a,EVTSign).once(e,t)},Object.defineProperty(this,"$once",{configurable:!1,enumerable:!1,get:function(){return r}})),Object.hasOwnProperty.call(this,"$dispatch")||(o=function(e,t){for(var n=[],r=new RoutedEventArgs(a,e,t),o=a;o;)n.push(o),o=o.$parent;n.reverse();for(var i=0,c=n;i<c.length;i++){var u=c[i],u=Reflect.get(u,EVTSign);if(u&&(u.emit(r.event,r),!0===r.handled))break}},Object.defineProperty(this,"$dispatch",{configurable:!1,enumerable:!1,get:function(){return o}})),Object.hasOwnProperty.call(this,"$broadcast")||(i=function(e,t){for(var n=new EventArgs(a,e,t),r=a;r.$parent;)r=r.$parent;for(var o=[r],i=[];o.length;){var c=o.pop();c!==a&&i.push(c),Array.isArray(c.$children)&&c.$children.length&&Array.prototype.push.apply(o,c.$children)}i.forEach(function(e){Reflect.get(e,EVTSign).emit(n.event,n)})},Object.defineProperty(this,"$broadcast",{configurable:!1,enumerable:!1,get:function(){return i}}))},detached:function(){var e=Reflect.get(this,EVTSign);e&&e.off(),Reflect.deleteProperty(this,EVTSign)}})].concat(r.behaviors||[])}}]),t}();exports.default=EventBusInstaller; |
@@ -169,2 +169,4 @@ declare namespace extend { | ||
$nextTick: (callback: () => void) => void; | ||
$emit: (event: string, data: any) => void; | ||
@@ -176,7 +178,7 @@ | ||
$once: (event: string, listener: (event: string, data: RoutedEventArgs | EventArgs) => void) => void; | ||
$once: (event: string, listener: (event: RoutedEventArgs | EventArgs) => void) => void; | ||
$on: (event: string, listener: (event: string, data: RoutedEventArgs | EventArgs) => void) => void; | ||
$on: (event: string, listener: (event: RoutedEventArgs | EventArgs) => void) => void; | ||
$off: (event?: string, listener?: (event: string, data: RoutedEventArgs | EventArgs) => void) => void; | ||
$off: (event?: string, listener?: (event: RoutedEventArgs | EventArgs) => void) => void; | ||
} | ||
@@ -183,0 +185,0 @@ } |
@@ -169,2 +169,4 @@ declare namespace extend { | ||
$nextTick: (callback: () => void) => void; | ||
$emit: (event: string, data: any) => void; | ||
@@ -176,7 +178,7 @@ | ||
$once: (event: string, listener: (event: string, data: RoutedEventArgs | EventArgs) => void) => void; | ||
$once: (event: string, listener: (event: RoutedEventArgs | EventArgs) => void) => void; | ||
$on: (event: string, listener: (event: string, data: RoutedEventArgs | EventArgs) => void) => void; | ||
$on: (event: string, listener: (event: RoutedEventArgs | EventArgs) => void) => void; | ||
$off: (event?: string, listener?: (event: string, data: RoutedEventArgs | EventArgs) => void) => void; | ||
$off: (event?: string, listener?: (event: RoutedEventArgs | EventArgs) => void) => void; | ||
} | ||
@@ -183,0 +185,0 @@ } |
{ | ||
"name": "wechat-mini-program-extend", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"repository": "git@github.com:sitorhy/wechat-mini-program-extend.git", | ||
@@ -5,0 +5,0 @@ "author": "sitorhy <sitorhy>", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
178517
317
0