Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-feature-toggle

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-feature-toggle - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

esm2015/public-api.js

157

bundles/ngx-feature-toggle.umd.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('feature-toggle-service'), require('@angular/core'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('ngx-feature-toggle', ['exports', 'feature-toggle-service', '@angular/core', '@angular/common'], factory) :
(factory((global['ngx-feature-toggle'] = {}),global.FeatureToggleService,global.ng.core,global.ng.common));
}(this, (function (exports,featureToggleService,core,common) { 'use strict';
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('feature-toggle-service'), require('@angular/common')) :
typeof define === 'function' && define.amd ? define('ngx-feature-toggle', ['exports', '@angular/core', 'feature-toggle-service', '@angular/common'], factory) :
(global = global || self, factory(global['ngx-feature-toggle'] = {}, global.ng.core, global.FeatureToggleService, global.ng.common));
}(this, function (exports, core, featureToggleService, common) { 'use strict';

@@ -23,8 +23,8 @@ /**

*/
function () {
if (!this.featureToggle) {
throw new Error('Attribute `featureToggle` should not be null or empty');
}
this.shouldRender();
};
function () {
if (!this.featureToggle) {
throw new Error('Attribute `featureToggle` should not be null or empty');
}
this.shouldRender();
};
/**

@@ -36,7 +36,7 @@ * @return {?}

*/
function () {
if (this.isOn !== featureToggleService.isOn(this.featureToggle)) {
this.shouldRender();
}
};
function () {
if (this.isOn !== featureToggleService.isOn(this.featureToggle)) {
this.shouldRender();
}
};
/**

@@ -50,11 +50,11 @@ * @private

*/
function () {
this.isOn = featureToggleService.isOn(this.featureToggle);
if (this.isOn) {
this.viewContainer.createEmbeddedView(this.templateRef);
}
else {
this.viewContainer.clear();
}
};
function () {
this.isOn = featureToggleService.isOn(this.featureToggle);
if (this.isOn) {
this.viewContainer.createEmbeddedView(this.templateRef);
}
else {
this.viewContainer.clear();
}
};
FeatureToggleDirective.decorators = [

@@ -67,8 +67,6 @@ { type: core.Directive, args: [{

/** @nocollapse */
FeatureToggleDirective.ctorParameters = function () {
return [
{ type: core.TemplateRef },
{ type: core.ViewContainerRef }
];
};
FeatureToggleDirective.ctorParameters = function () { return [
{ type: core.TemplateRef },
{ type: core.ViewContainerRef }
]; };
FeatureToggleDirective.propDecorators = {

@@ -96,8 +94,8 @@ featureToggle: [{ type: core.Input }]

*/
function () {
if (!this.featureToggleWhenDisabled) {
throw new Error('Attribute `featureToggleWhenDisabled` should not be null or empty');
}
this.shouldRender();
};
function () {
if (!this.featureToggleWhenDisabled) {
throw new Error('Attribute `featureToggleWhenDisabled` should not be null or empty');
}
this.shouldRender();
};
/**

@@ -109,7 +107,7 @@ * @return {?}

*/
function () {
if (this.isOn !== featureToggleService.isOn(this.featureToggleWhenDisabled)) {
this.shouldRender();
}
};
function () {
if (this.isOn !== featureToggleService.isOn(this.featureToggleWhenDisabled)) {
this.shouldRender();
}
};
/**

@@ -121,11 +119,11 @@ * @return {?}

*/
function () {
this.isOn = featureToggleService.isOn(this.featureToggleWhenDisabled);
if (!this.isOn) {
this.viewContainer.createEmbeddedView(this.templateRef);
}
else {
this.viewContainer.clear();
}
};
function () {
this.isOn = featureToggleService.isOn(this.featureToggleWhenDisabled);
if (!this.isOn) {
this.viewContainer.createEmbeddedView(this.templateRef);
}
else {
this.viewContainer.clear();
}
};
FeatureToggleWhenDisabledDirective.decorators = [

@@ -138,8 +136,6 @@ { type: core.Directive, args: [{

/** @nocollapse */
FeatureToggleWhenDisabledDirective.ctorParameters = function () {
return [
{ type: core.TemplateRef },
{ type: core.ViewContainerRef }
];
};
FeatureToggleWhenDisabledDirective.ctorParameters = function () { return [
{ type: core.TemplateRef },
{ type: core.ViewContainerRef }
]; };
FeatureToggleWhenDisabledDirective.propDecorators = {

@@ -166,8 +162,8 @@ featureToggleWhenDisabled: [{ type: core.Input }]

*/
function () {
if (typeof this.features !== 'object') {
throw new Error('Attribute `features` should not be null or empty');
}
this.setFeatureToggles();
};
function () {
if (typeof this.features !== 'object') {
throw new Error('Attribute `features` should not be null or empty');
}
this.setFeatureToggles();
};
/**

@@ -179,5 +175,5 @@ * @return {?}

*/
function () {
this.setFeatureToggles();
};
function () {
this.setFeatureToggles();
};
/**

@@ -191,8 +187,8 @@ * @private

*/
function () {
if (this.currentConfig !== this.features) {
this.currentConfig = this.features;
featureToggleService.set(this.features);
}
};
function () {
if (this.currentConfig !== this.features) {
this.currentConfig = this.features;
featureToggleService.set(this.features);
}
};
FeatureToggleProviderComponent.decorators = [

@@ -227,21 +223,10 @@ { type: core.Component, args: [{

/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
exports.FeatureToggleDirective = FeatureToggleDirective;
exports.FeatureToggleModule = FeatureToggleModule;
exports.FeatureToggleProviderComponent = FeatureToggleProviderComponent;
exports.FeatureToggleWhenDisabledDirective = FeatureToggleWhenDisabledDirective;
exports.FeatureToggleProviderComponent = FeatureToggleProviderComponent;
exports.FeatureToggleModule = FeatureToggleModule;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=ngx-feature-toggle.umd.js.map
}));
//# sourceMappingURL=ngx-feature-toggle.umd.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("feature-toggle-service"),require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-feature-toggle",["exports","feature-toggle-service","@angular/core","@angular/common"],t):t(e["ngx-feature-toggle"]={},e.FeatureToggleService,e.ng.core,e.ng.common)}(this,function(e,t,o,r){"use strict";var n=function(){function e(e,t){this.templateRef=e,this.viewContainer=t,this.isOn=!1}return e.prototype.ngOnInit=function(){if(!this.featureToggle)throw new Error("Attribute `featureToggle` should not be null or empty");this.shouldRender()},e.prototype.ngDoCheck=function(){this.isOn!==t.isOn(this.featureToggle)&&this.shouldRender()},e.prototype.shouldRender=function(){this.isOn=t.isOn(this.featureToggle),this.isOn?this.viewContainer.createEmbeddedView(this.templateRef):this.viewContainer.clear()},e.decorators=[{type:o.Directive,args:[{selector:"[featureToggle]"}]}],e.ctorParameters=function(){return[{type:o.TemplateRef},{type:o.ViewContainerRef}]},e.propDecorators={featureToggle:[{type:o.Input}]},e}(),i=function(){function e(e,t){this.templateRef=e,this.viewContainer=t,this.isOn=!1}return e.prototype.ngOnInit=function(){if(!this.featureToggleWhenDisabled)throw new Error("Attribute `featureToggleWhenDisabled` should not be null or empty");this.shouldRender()},e.prototype.ngDoCheck=function(){this.isOn!==t.isOn(this.featureToggleWhenDisabled)&&this.shouldRender()},e.prototype.shouldRender=function(){this.isOn=t.isOn(this.featureToggleWhenDisabled),this.isOn?this.viewContainer.clear():this.viewContainer.createEmbeddedView(this.templateRef)},e.decorators=[{type:o.Directive,args:[{selector:"[featureToggleWhenDisabled]"}]}],e.ctorParameters=function(){return[{type:o.TemplateRef},{type:o.ViewContainerRef}]},e.propDecorators={featureToggleWhenDisabled:[{type:o.Input}]},e}(),s=function(){function e(){this.features={},this.currentConfig={}}return e.prototype.ngOnInit=function(){if("object"!=typeof this.features)throw new Error("Attribute `features` should not be null or empty");this.setFeatureToggles()},e.prototype.ngDoCheck=function(){this.setFeatureToggles()},e.prototype.setFeatureToggles=function(){this.currentConfig!==this.features&&(this.currentConfig=this.features,t.set(this.features))},e.decorators=[{type:o.Component,args:[{selector:"feature-toggle-provider",template:"\n <ng-content></ng-content>\n "}]}],e.propDecorators={features:[{type:o.Input}]},e}(),u=function(){function e(){}return e.decorators=[{type:o.NgModule,args:[{declarations:[s,n,i],exports:[s,n,i],imports:[r.CommonModule]}]}],e}();e.FeatureToggleDirective=n,e.FeatureToggleWhenDisabledDirective=i,e.FeatureToggleProviderComponent=s,e.FeatureToggleModule=u,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("feature-toggle-service"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-feature-toggle",["exports","@angular/core","feature-toggle-service","@angular/common"],t):t((e=e||self)["ngx-feature-toggle"]={},e.ng.core,e.FeatureToggleService,e.ng.common)}(this,function(e,t,o,r){"use strict";var n=function(){function e(e,t){this.templateRef=e,this.viewContainer=t,this.isOn=!1}return e.prototype.ngOnInit=function(){if(!this.featureToggle)throw new Error("Attribute `featureToggle` should not be null or empty");this.shouldRender()},e.prototype.ngDoCheck=function(){this.isOn!==o.isOn(this.featureToggle)&&this.shouldRender()},e.prototype.shouldRender=function(){this.isOn=o.isOn(this.featureToggle),this.isOn?this.viewContainer.createEmbeddedView(this.templateRef):this.viewContainer.clear()},e.decorators=[{type:t.Directive,args:[{selector:"[featureToggle]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef},{type:t.ViewContainerRef}]},e.propDecorators={featureToggle:[{type:t.Input}]},e}(),i=function(){function e(e,t){this.templateRef=e,this.viewContainer=t,this.isOn=!1}return e.prototype.ngOnInit=function(){if(!this.featureToggleWhenDisabled)throw new Error("Attribute `featureToggleWhenDisabled` should not be null or empty");this.shouldRender()},e.prototype.ngDoCheck=function(){this.isOn!==o.isOn(this.featureToggleWhenDisabled)&&this.shouldRender()},e.prototype.shouldRender=function(){this.isOn=o.isOn(this.featureToggleWhenDisabled),this.isOn?this.viewContainer.clear():this.viewContainer.createEmbeddedView(this.templateRef)},e.decorators=[{type:t.Directive,args:[{selector:"[featureToggleWhenDisabled]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef},{type:t.ViewContainerRef}]},e.propDecorators={featureToggleWhenDisabled:[{type:t.Input}]},e}(),s=function(){function e(){this.features={},this.currentConfig={}}return e.prototype.ngOnInit=function(){if("object"!=typeof this.features)throw new Error("Attribute `features` should not be null or empty");this.setFeatureToggles()},e.prototype.ngDoCheck=function(){this.setFeatureToggles()},e.prototype.setFeatureToggles=function(){this.currentConfig!==this.features&&(this.currentConfig=this.features,o.set(this.features))},e.decorators=[{type:t.Component,args:[{selector:"feature-toggle-provider",template:"\n <ng-content></ng-content>\n "}]}],e.propDecorators={features:[{type:t.Input}]},e}(),u=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[s,n,i],exports:[s,n,i],imports:[r.CommonModule]}]}],e}();e.FeatureToggleDirective=n,e.FeatureToggleModule=u,e.FeatureToggleProviderComponent=s,e.FeatureToggleWhenDisabledDirective=i,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ngx-feature-toggle.umd.min.js.map

@@ -10,2 +10,8 @@ # Change Log

## [7.0.1][] - 2019-06-09
### Updated
- Updating Angular CLI to v8
## [7.0.0][] - 2019-04-09

@@ -178,3 +184,4 @@

[Unreleased]: https://github.com/willmendesneto/ngx-feature-toggle/compare/v7.0.0...HEAD
[7.0.0]: https://github.com/willmendesneto/ngx-feature-toggle/tree/v7.0.0
[Unreleased]: https://github.com/willmendesneto/ngx-feature-toggle/compare/v7.0.1...HEAD
[7.0.1]: https://github.com/willmendesneto/ngx-feature-toggle/compare/v7.0.0...v7.0.1
[7.0.0]: https://github.com/willmendesneto/ngx-feature-toggle/tree/v7.0.0

@@ -8,3 +8,3 @@ /**

*/
export { FeatureToggleDirective, FeatureToggleWhenDisabledDirective, FeatureToggleProviderComponent, FeatureToggleModule } from './public_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZlYXR1cmUtdG9nZ2xlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWZlYXR1cmUtdG9nZ2xlLyIsInNvdXJjZXMiOlsibmd4LWZlYXR1cmUtdG9nZ2xlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxnSUFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0=
export { FeatureToggleDirective, FeatureToggleWhenDisabledDirective, FeatureToggleProviderComponent, FeatureToggleModule } from './public-api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZlYXR1cmUtdG9nZ2xlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWZlYXR1cmUtdG9nZ2xlLyIsInNvdXJjZXMiOlsibmd4LWZlYXR1cmUtdG9nZ2xlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxnSUFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG4iXX0=

@@ -8,3 +8,3 @@ /**

*/
export { FeatureToggleDirective, FeatureToggleWhenDisabledDirective, FeatureToggleProviderComponent, FeatureToggleModule } from './public_api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZlYXR1cmUtdG9nZ2xlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWZlYXR1cmUtdG9nZ2xlLyIsInNvdXJjZXMiOlsibmd4LWZlYXR1cmUtdG9nZ2xlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxnSUFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG4iXX0=
export { FeatureToggleDirective, FeatureToggleWhenDisabledDirective, FeatureToggleProviderComponent, FeatureToggleModule } from './public-api';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWZlYXR1cmUtdG9nZ2xlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vbmd4LWZlYXR1cmUtdG9nZ2xlLyIsInNvdXJjZXMiOlsibmd4LWZlYXR1cmUtdG9nZ2xlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFJQSxnSUFBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG4iXX0=

@@ -0,3 +1,3 @@

import { Directive, TemplateRef, ViewContainerRef, Input, Component, NgModule } from '@angular/core';
import { isOn, set } from 'feature-toggle-service';
import { Directive, Input, TemplateRef, ViewContainerRef, Component, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

@@ -195,4 +195,3 @@

export { FeatureToggleDirective, FeatureToggleWhenDisabledDirective, FeatureToggleProviderComponent, FeatureToggleModule };
//# sourceMappingURL=ngx-feature-toggle.js.map
export { FeatureToggleDirective, FeatureToggleModule, FeatureToggleProviderComponent, FeatureToggleWhenDisabledDirective };
//# sourceMappingURL=ngx-feature-toggle.js.map

@@ -0,3 +1,3 @@

import { Directive, TemplateRef, ViewContainerRef, Input, Component, NgModule } from '@angular/core';
import { isOn, set } from 'feature-toggle-service';
import { Directive, Input, TemplateRef, ViewContainerRef, Component, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

@@ -220,4 +220,3 @@

export { FeatureToggleDirective, FeatureToggleWhenDisabledDirective, FeatureToggleProviderComponent, FeatureToggleModule };
//# sourceMappingURL=ngx-feature-toggle.js.map
export { FeatureToggleDirective, FeatureToggleModule, FeatureToggleProviderComponent, FeatureToggleWhenDisabledDirective };
//# sourceMappingURL=ngx-feature-toggle.js.map
/**
* Generated bundle index. Do not edit.
*/
export * from './public_api';
export * from './public-api';

@@ -5,3 +5,3 @@ {

"author": "Will Mendes <willmendesneto@gmail.com>",
"version": "7.0.0",
"version": "7.0.1",
"keywords": [

@@ -27,4 +27,4 @@ "angular",

"peerDependencies": {
"@angular/common": "^7.1.0",
"@angular/core": "^7.1.0"
"@angular/common": "^8.0.0",
"@angular/core": "^8.0.0"
},

@@ -31,0 +31,0 @@ "dependencies": {

@@ -139,4 +139,3 @@ # NGX Feature Toggle

- <https://plus.google.com/+WilsonMendes>
- <https://twitter.com/willmendesneto>
- <http://github.com/willmendesneto>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc