frint-component-handlers
Advanced tools
Comparing version 4.1.0 to 4.2.0
@@ -9,3 +9,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
else | ||
root["FrintComponentHandlers"] = factory(root["_"]["isEqual"], root["_"]["zipWith"], root["Rx"], root["Rx"]["operators"]); | ||
root["FrintComponentHandlers"] = factory(root["_"]["isEqual"], root["_"]["zipWith"], root["Rx"], root["Rx"]); | ||
})(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__, __WEBPACK_EXTERNAL_MODULE_6__, __WEBPACK_EXTERNAL_MODULE_7__) { | ||
@@ -12,0 +12,0 @@ return /******/ (function(modules) { // webpackBootstrap |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash/isEqual"),require("lodash/zipWith"),require("rxjs/BehaviorSubject"),require("rxjs/operators/map")):"function"==typeof define&&define.amd?define(["lodash/isEqual","lodash/zipWith","rxjs/BehaviorSubject","rxjs/operators/map"],t):"object"==typeof exports?exports.FrintComponentHandlers=t(require("lodash/isEqual"),require("lodash/zipWith"),require("rxjs/BehaviorSubject"),require("rxjs/operators/map")):e.FrintComponentHandlers=t(e._.isEqual,e._.zipWith,e.Rx,e.Rx.operators)}(this,function(e,t,n,r){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),u=n(2),a=r(u),s=n(5),p=r(s);t.default={ObserveHandler:i.default,RegionHandler:a.default,RegionService:p.default},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={getProps$:null,getInitialData:function(){return{computedProps:{}}},beforeMount:function(){var e=this;"function"==typeof this.getProps$&&(this._subscription=this.getProps$(this.app).subscribe(function(t){e.setData("computedProps",t)}))},beforeDestroy:function(){this._subscription&&this._subscription.unsubscribe()}},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=r(o),u=n(4),a=r(u);t.default={getInitialData:function(){return{list:[],listForRendering:[]}},sendProps:function(e,t){var n=e.get(e.options.providerNames.region);n&&n.emit(t)},beforeMount:function(){var e=this,t=this.app?this.app.getRootApp():window.app;if(t){this.rootApp=t;var n=t.getApps$(this.getProp("name"),this.getProp("uniqueKey"));this._subscription=n.subscribe({next:function(n){e.setDataWithCallback("list",n,function(){e.getData("list").forEach(function(n){var r=n.name,o=n.weight,i=n.multi;if(!e.getData("listForRendering").some(function(e){return e.name===r})){var u=e.getProp("uniqueKey")?[e.getProp("name"),e.getProp("uniqueKey")]:[e.getProp("name")];e.getProp("uniqueKey")&&!t.hasAppInstance.apply(t,[r].concat(u))&&t.instantiateApp.apply(t,[r].concat(u));var a=t.getAppInstance.apply(t,[r].concat(u));a&&e.sendProps(a,{name:e.getProp("name"),uniqueKey:e.getProp("uniqueKey"),data:e.getProp("data")}),e.setData("listForRendering",e.getData("listForRendering").concat({name:r,weight:o,instance:a,multi:i,Component:e.getMountableComponent(a)}).sort(function(e,t){return e.weight-t.weight}))}})})},error:function(t){console.warn('Subscription error for <Region name="'+e.name+'" />:',t)}})}},shouldUpdate:function(e,t){var n=!(0,i.default)(this.getProps(),e);if(!n){var r=t.listForRendering;n=n||this.getData("listForRendering").length!==r.length,n=n||(0,a.default)(this.getData("listForRendering"),r,function(e,t){return e.name===t.name}).some(function(e){return!e})}return n},afterUpdate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=t||{},r=n.name,o=void 0===r?this.getProp("name"):r,i=n.uniqueKey,u=void 0===i?this.getProp("uniqueKey"):i,a=n.data,s=void 0===a?this.getProp("data"):a;this.getData("listForRendering").filter(function(e){return e.instance}).forEach(function(t){return e.sendProps(t.instance,{name:o,uniqueKey:u,data:s})})},beforeDestroy:function(){var e=this;this._subscription&&this._subscription.unsubscribe(),this.rootApp&&this.getData("listForRendering").filter(function(e){return e.multi}).forEach(function(t){e.rootApp.destroyApp(t.name,e.getProp("name"),e.getProp("uniqueKey"))})}},e.exports=t.default},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(6),u=n(7),a=function(){function e(){r(this,e),this.props$=new i.BehaviorSubject({})}return o(e,[{key:"emit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.props$.next(e)}},{key:"getProps$",value:function(){return this.props$}},{key:"getData$",value:function(){return this.props$.pipe((0,u.map)(function(e){return e.data}))}}]),e}();t.default=a,e.exports=t.default},function(e,t){e.exports=n},function(e,t){e.exports=r}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash/isEqual"),require("lodash/zipWith"),require("rxjs/BehaviorSubject"),require("rxjs/operators/map")):"function"==typeof define&&define.amd?define(["lodash/isEqual","lodash/zipWith","rxjs/BehaviorSubject","rxjs/operators/map"],t):"object"==typeof exports?exports.FrintComponentHandlers=t(require("lodash/isEqual"),require("lodash/zipWith"),require("rxjs/BehaviorSubject"),require("rxjs/operators/map")):e.FrintComponentHandlers=t(e._.isEqual,e._.zipWith,e.Rx,e.Rx)}(this,function(e,t,n,r){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),u=n(2),a=r(u),s=n(5),p=r(s);t.default={ObserveHandler:i.default,RegionHandler:a.default,RegionService:p.default},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={getProps$:null,getInitialData:function(){return{computedProps:{}}},beforeMount:function(){var e=this;"function"==typeof this.getProps$&&(this._subscription=this.getProps$(this.app).subscribe(function(t){e.setData("computedProps",t)}))},beforeDestroy:function(){this._subscription&&this._subscription.unsubscribe()}},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(3),i=r(o),u=n(4),a=r(u);t.default={getInitialData:function(){return{list:[],listForRendering:[]}},sendProps:function(e,t){var n=e.get(e.options.providerNames.region);n&&n.emit(t)},beforeMount:function(){var e=this,t=this.app?this.app.getRootApp():window.app;if(t){this.rootApp=t;var n=t.getApps$(this.getProp("name"),this.getProp("uniqueKey"));this._subscription=n.subscribe({next:function(n){e.setDataWithCallback("list",n,function(){e.getData("list").forEach(function(n){var r=n.name,o=n.weight,i=n.multi;if(!e.getData("listForRendering").some(function(e){return e.name===r})){var u=e.getProp("uniqueKey")?[e.getProp("name"),e.getProp("uniqueKey")]:[e.getProp("name")];e.getProp("uniqueKey")&&!t.hasAppInstance.apply(t,[r].concat(u))&&t.instantiateApp.apply(t,[r].concat(u));var a=t.getAppInstance.apply(t,[r].concat(u));a&&e.sendProps(a,{name:e.getProp("name"),uniqueKey:e.getProp("uniqueKey"),data:e.getProp("data")}),e.setData("listForRendering",e.getData("listForRendering").concat({name:r,weight:o,instance:a,multi:i,Component:e.getMountableComponent(a)}).sort(function(e,t){return e.weight-t.weight}))}})})},error:function(t){console.warn('Subscription error for <Region name="'+e.name+'" />:',t)}})}},shouldUpdate:function(e,t){var n=!(0,i.default)(this.getProps(),e);if(!n){var r=t.listForRendering;n=n||this.getData("listForRendering").length!==r.length,n=n||(0,a.default)(this.getData("listForRendering"),r,function(e,t){return e.name===t.name}).some(function(e){return!e})}return n},afterUpdate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=t||{},r=n.name,o=void 0===r?this.getProp("name"):r,i=n.uniqueKey,u=void 0===i?this.getProp("uniqueKey"):i,a=n.data,s=void 0===a?this.getProp("data"):a;this.getData("listForRendering").filter(function(e){return e.instance}).forEach(function(t){return e.sendProps(t.instance,{name:o,uniqueKey:u,data:s})})},beforeDestroy:function(){var e=this;this._subscription&&this._subscription.unsubscribe(),this.rootApp&&this.getData("listForRendering").filter(function(e){return e.multi}).forEach(function(t){e.rootApp.destroyApp(t.name,e.getProp("name"),e.getProp("uniqueKey"))})}},e.exports=t.default},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(6),u=n(7),a=function(){function e(){r(this,e),this.props$=new i.BehaviorSubject({})}return o(e,[{key:"emit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.props$.next(e)}},{key:"getProps$",value:function(){return this.props$}},{key:"getData$",value:function(){return this.props$.pipe((0,u.map)(function(e){return e.data}))}}]),e}();t.default=a,e.exports=t.default},function(e,t){e.exports=n},function(e,t){e.exports=r}])}); |
{ | ||
"name": "frint-component-handlers", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "Component handlers package for Frint", | ||
"main": "lib/index.js", | ||
"homepage": "https://github.com/Travix-International/frint/tree/master/packages/frint-component-handlers", | ||
"homepage": "https://github.com/frintjs/frint/tree/master/packages/frint-component-handlers", | ||
"scripts": { | ||
@@ -21,8 +21,5 @@ "lint": "cross-env ../../node_modules/.bin/eslint --color '{src,test}/**/*.js'", | ||
"type": "git", | ||
"url": "git+https://github.com/Travix-International/frint.git" | ||
"url": "git+https://github.com/frintjs/frint.git" | ||
}, | ||
"author": { | ||
"name": "Travix International B.V.", | ||
"url": "https://travix.com" | ||
}, | ||
"author": "FrintJS Authors (https://github.com/frintjs/frint/graphs/contributors)", | ||
"keywords": [ | ||
@@ -37,10 +34,10 @@ "frint" | ||
"cross-env": "^5.0.5", | ||
"frint": "^4.1.0", | ||
"frint-component-utils": "^4.1.0", | ||
"frint-config": "^4.1.0" | ||
"frint": "^4.2.0", | ||
"frint-component-utils": "^4.2.0", | ||
"frint-config": "^4.2.0" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Travix-International/frint/issues" | ||
"url": "https://github.com/frintjs/frint/issues" | ||
}, | ||
"license": "MIT" | ||
} |
36219