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

ng-jhipster

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-jhipster - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

5

package.json

@@ -58,2 +58,3 @@ {

"rxjs": "5.0.2",
"shx": "0.2.2",
"source-map-loader": "0.1.5",

@@ -67,3 +68,3 @@ "ts-helpers": "1.1.2",

},
"version": "0.1.1",
"version": "0.1.2",
"scripts": {

@@ -74,3 +75,3 @@ "lint": "tslint --project tslint.json",

"ngc": "ngc",
"build": "webpack && cp bundles/ng-jhipster.umd.js bundles/index.js",
"build": "webpack && shx cp bundles/ng-jhipster.umd.js bundles/index.js",
"prepublish": "ngc && npm run build && npm test",

@@ -77,0 +78,0 @@ "release": "git push && git push --tags && npm publish",

@@ -25,1 +25,31 @@ [![Logo][jhipster-image]][jhipster-url]

[feature-template]: https://github.com/jhipster/generator-jhipster/issues/new?body=*%20**Overview%20of%20the%20request**%0A%0A%3C!--%20what%20is%20the%20query%20or%20request%20--%3E%0A%0A*%20**Motivation%20for%20or%20Use%20Case**%20%0A%0A%3C!--%20explain%20why%20this%20is%20a%20required%20for%20you%20--%3E%0A%0A%0A*%20**Browsers%20and%20Operating%20System**%20%0A%0A%3C!--%20is%20this%20a%20problem%20with%20all%20browsers%20or%20only%20IE8%3F%20--%3E%0A%0A%0A*%20**Related%20issues**%20%0A%0A%3C!--%20has%20a%20similar%20issue%20been%20reported%20before%3F%20--%3E%0A%0A*%20**Suggest%20a%20Fix**%20%0A%0A%3C!--%20if%20you%20can%27t%20fix%20this%20yourself%2C%20perhaps%20you%20can%20point%20to%20what%20might%20be%0A%20%20causing%20the%20problem%20(line%20of%20code%20or%20commit)%20--%3E
## Development setup
You need NodeJS and yarn.
### Fork the ng-jhipster project
Go to the [ng-jhipster project](https://github.com/jhipster/ng-jhipster) and click on the "fork" button. You can then clone your own fork of the project, and start working on it.
[Please read the Github forking documentation for more information](https://help.github.com/articles/fork-a-repo)
### Build
Run `yarn install` to install all dependencies.
Make some changes, run `yarn run test` to run both tslint and karma tests.
Package the library with `yarn run build`.
### Set NPM to use the cloned project
In your cloned `ng-jhipster` project, type `yarn link`.
This will do a symbolic link from the global `node_modules` version to point to this folder.
For testing, you will want to integrate your version of `ng-jhipster` into an application generated by JHipster.
Go to your application folder, run `yarn link ng-jhipster` so that the local version has a symbolic link to the development version of `ng-jhipster`.
You should see your changes reflected in the application.

11

src/directive/sort.directive.js

@@ -32,6 +32,9 @@ import { Directive, Input, Output, Renderer, EventEmitter, ElementRef } from '@angular/core';

JhiSortDirective.prototype.resetClasses = function () {
var allThIcons = this.element.querySelectorAll(this.sortIconSelector)[0];
allThIcons.classList.remove(this.sortAscIcon);
allThIcons.classList.remove(this.sortDescIcon);
allThIcons.classList.add(this.sortIcon);
var _this = this;
var allThIcons = this.element.querySelectorAll(this.sortIconSelector);
allThIcons.forEach(function (value) {
value.classList.remove(_this.sortAscIcon);
value.classList.remove(_this.sortDescIcon);
value.classList.add(_this.sortIcon);
});
};

@@ -38,0 +41,0 @@ ;

import { MissingTranslationHandler, MissingTranslationHandlerParams } from 'ng2-translate';
export declare class JhiMissingTranslationHandler implements MissingTranslationHandler {
handle(key: MissingTranslationHandlerParams): string;
handle(params: MissingTranslationHandlerParams): string;
}

@@ -5,3 +5,4 @@ import { ConfigHelper } from '../helper';

}
JhiMissingTranslationHandler.prototype.handle = function (key) {
JhiMissingTranslationHandler.prototype.handle = function (params) {
var key = params.key;
return ConfigHelper.getConfig().noi18nMessage + "[" + key + "]";

@@ -8,0 +9,0 @@ };

import { Sanitizer } from '@angular/core';
import { TranslateService } from 'ng2-translate';
export declare type AlertType = 'success' | 'danger' | 'warning' | 'info';
export interface Alert {
id?: number;
type: AlertType;
msg: string;
params?: any;
timeout?: number;
toast?: boolean;
position?: string;
scoped?: boolean;
close?: (alerts: Alert[]) => void;
}
export declare class AlertService {

@@ -13,12 +25,12 @@ private sanitizer;

clear(): void;
get(): any;
success(msg: any, params?: any, position?: any): any;
error(msg: any, params?: any, position?: any): any;
warning(msg: any, params?: any, position?: any): any;
info(msg: any, params?: any, position?: any): any;
factory(alertOptions: any): any;
addAlert(alertOptions: any, extAlerts: any): any;
closeAlert(id: any, extAlerts?: any): any;
closeAlertByIndex(index: any, thisAlerts: any): any;
get(): Alert[];
success(msg: string, params?: any, position?: string): Alert;
error(msg: string, params?: any, position?: string): Alert;
warning(msg: string, params?: any, position?: string): Alert;
info(msg: string, params?: any, position?: string): Alert;
private factory(alertOptions);
addAlert(alertOptions: Alert, extAlerts: Alert[]): Alert;
closeAlert(id: number, extAlerts?: Alert[]): any;
closeAlertByIndex(index: number, thisAlerts: Alert[]): Alert[];
isToast(): boolean;
}

@@ -11,3 +11,3 @@ import { Injectable, Sanitizer, SecurityContext } from '@angular/core';

this.alerts = [];
this.timeout = 5000; // default timeout
this.timeout = 5000; // default timeout in milliseconds
if (this.i18nEnabled) {

@@ -68,3 +68,3 @@ this.translateService = translateService;

msg: this.sanitizer.sanitize(SecurityContext.HTML, alertOptions.msg),
id: alertOptions.alertId,
id: alertOptions.id,
timeout: alertOptions.timeout,

@@ -75,3 +75,3 @@ toast: alertOptions.toast,

close: function (alerts) {
return _this.closeAlert(alertOptions.alertId, alerts);
return _this.closeAlert(alertOptions.id, alerts);
}

@@ -86,3 +86,3 @@ };

var _this = this;
alertOptions.alertId = this.alertId++;
alertOptions.id = this.alertId++;
if (this.i18nEnabled && alertOptions.msg) {

@@ -94,3 +94,3 @@ alertOptions.msg = this.translateService.instant(alertOptions.msg, alertOptions.params);

setTimeout(function () {
_this.closeAlert(alertOptions.alertId, extAlerts);
_this.closeAlert(alertOptions.id, extAlerts);
}, alertOptions.timeout);

@@ -102,5 +102,3 @@ }

var thisAlerts = extAlerts ? extAlerts : this.alerts;
return this.closeAlertByIndex(thisAlerts.map(function (e) {
return e.id;
}).indexOf(id), thisAlerts);
return this.closeAlertByIndex(thisAlerts.map(function (e) { return e.id; }).indexOf(id), thisAlerts);
};

@@ -107,0 +105,0 @@ AlertService.prototype.closeAlertByIndex = function (index, thisAlerts) {

@@ -18,5 +18,5 @@ import { Observable, Observer, Subscription } from 'rxjs/Rx';

/**
* Method to unsubscribe the subscribion
* Method to unsubscribe the subscription
*/
destroy(subscriber: Subscription): void;
}

@@ -32,3 +32,5 @@ /*

EventManager.prototype.broadcast = function (event) {
this.observer.next(event);
if (this.observer != null) {
this.observer.next(event);
}
};

@@ -45,3 +47,3 @@ /**

/**
* Method to unsubscribe the subscribion
* Method to unsubscribe the subscription
*/

@@ -48,0 +50,0 @@ EventManager.prototype.destroy = function (subscriber) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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