New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

amp-dash

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amp-dash - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

lib/amp-dash.component.metadata.json

0

lib/amp-dash.component.d.ts

@@ -0,0 +0,0 @@ import { EventEmitter, OnChanges, OnDestroy } from '@angular/core';

271

lib/amp-dash.component.js

@@ -1,15 +0,4 @@

"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var AmpDashComponent = (function () {
function AmpDashComponent() {
import { Component, EventEmitter, Input, Output } from '@angular/core';
export class AmpDashComponent {
constructor() {
this.typeText = [''];

@@ -21,4 +10,4 @@ this.typeDelay = 100;

this.cursorChar = '_';
this.captionTyped = new core_1.EventEmitter();
this.captionErased = new core_1.EventEmitter();
this.captionTyped = new EventEmitter();
this.captionErased = new EventEmitter();
this.captionText = '';

@@ -30,8 +19,14 @@ this.captionLength = 0;

}
AmpDashComponent.prototype.ngOnDestroy = function () {
/**
* @return {?}
*/
ngOnDestroy() {
// Cleanup
this.clearTimeouts();
};
AmpDashComponent.prototype.ngOnChanges = function (changes) {
var _this = this;
}
/**
* @param {?} changes
* @return {?}
*/
ngOnChanges(changes) {
if (changes) {

@@ -47,3 +42,3 @@ // If Text already exisits then delete it gracefully

this.setTypeText();
this.eraseDelayTimeout = setTimeout(function () { return _this.erasewrite(); }, this.eraseDelay);
this.eraseDelayTimeout = setTimeout(() => this.erasewrite(), this.eraseDelay);
}

@@ -57,4 +52,8 @@ }

}
};
AmpDashComponent.prototype.setTypeText = function (textArr) {
}
/**
* @param {?=} textArr
* @return {?}
*/
setTypeText(textArr) {
// Check for passed in params

@@ -74,4 +73,7 @@ if (textArr) {

return;
};
AmpDashComponent.prototype.typewrite = function () {
}
/**
* @return {?}
*/
typewrite() {
this.clearTimeouts();

@@ -83,4 +85,7 @@ this.setTypeText();

}
};
AmpDashComponent.prototype.erasewrite = function () {
}
/**
* @return {?}
*/
erasewrite() {
this.clearTimeouts();

@@ -93,9 +98,11 @@ this.captionText = this.displayText;

}
};
AmpDashComponent.prototype.type = function () {
var _this = this;
}
/**
* @return {?}
*/
type() {
this.displayText = this.captionText.substr(0, this.captionLength++);
this.clearTimeouts();
if (this.captionLength < this.captionText.length + 1) {
this.typeTimeout = setTimeout(function () { return _this.type(); }, this.typeDelay);
this.typeTimeout = setTimeout(() => this.type(), this.typeDelay);
}

@@ -108,3 +115,3 @@ else {

// Erase after timeout
this.eraseDelayTimeout = setTimeout(function () { return _this.erasewrite(); }, this.eraseDelay);
this.eraseDelayTimeout = setTimeout(() => this.erasewrite(), this.eraseDelay);
}

@@ -114,13 +121,15 @@ else {

this.captionIndex = 0;
this.eraseDelayTimeout = setTimeout(function () { return _this.erasewrite(); }, this.eraseDelay);
this.eraseDelayTimeout = setTimeout(() => this.erasewrite(), this.eraseDelay);
}
}
}
};
AmpDashComponent.prototype.erase = function () {
var _this = this;
}
/**
* @return {?}
*/
erase() {
this.displayText = this.captionText.substr(0, this.captionLength--);
this.clearTimeouts();
if (this.captionLength >= 0) {
this.eraseTimeout = setTimeout(function () { return _this.erase(); }, this.typeDelay);
this.eraseTimeout = setTimeout(() => this.erase(), this.typeDelay);
}

@@ -136,12 +145,21 @@ else {

}
};
AmpDashComponent.prototype.setCaptionText = function () {
}
/**
* @return {?}
*/
setCaptionText() {
this.captionText = this.typeTextClone[this.captionIndex++].trim();
};
AmpDashComponent.prototype.cancelTypeTimeout = function () {
}
/**
* @return {?}
*/
cancelTypeTimeout() {
if (this.typeTimeout) {
clearTimeout(this.typeTimeout);
}
};
AmpDashComponent.prototype.cancelEraseTimeout = function () {
}
/**
* @return {?}
*/
cancelEraseTimeout() {
if (this.eraseTimeout) {

@@ -153,52 +171,123 @@ clearTimeout(this.eraseTimeout);

}
};
AmpDashComponent.prototype.clearTimeouts = function () {
}
/**
* @return {?}
*/
clearTimeouts() {
this.cancelTypeTimeout();
this.cancelEraseTimeout();
};
return AmpDashComponent;
}());
__decorate([
core_1.Input(),
__metadata("design:type", Object)
], AmpDashComponent.prototype, "typeText", void 0);
__decorate([
core_1.Input(),
__metadata("design:type", Object)
], AmpDashComponent.prototype, "typeDelay", void 0);
__decorate([
core_1.Input(),
__metadata("design:type", Object)
], AmpDashComponent.prototype, "typeLoop", void 0);
__decorate([
core_1.Input(),
__metadata("design:type", Object)
], AmpDashComponent.prototype, "eraseDelay", void 0);
__decorate([
core_1.Input(),
__metadata("design:type", Object)
], AmpDashComponent.prototype, "cursorClass", void 0);
__decorate([
core_1.Input(),
__metadata("design:type", Object)
], AmpDashComponent.prototype, "cursorChar", void 0);
__decorate([
core_1.Output(),
__metadata("design:type", Object)
], AmpDashComponent.prototype, "captionTyped", void 0);
__decorate([
core_1.Output(),
__metadata("design:type", Object)
], AmpDashComponent.prototype, "captionErased", void 0);
AmpDashComponent = __decorate([
core_1.Component({
selector: 'amp-dash',
template: "\n <pre>{{displayText}}<span [ngClass]=\"cursorClass\">{{cursorChar}}</span></pre>\n <ng-content></ng-content>\n ",
styles: [
"\n pre{\n font-family: inherit;\n font-size: inherit;\n display: inline;\n }\n\n :host(){\n display: inline;\n }\n .cursor {\n font-weight: inherit;\n font-size: inherit;\n color: #0030FF;\n -webkit-animation: 1s flash step-end infinite;\n -moz-animation: 1s flash step-end infinite;\n -ms-animation: 1s flash step-end infinite;\n -o-animation: 1s flash step-end infinite;\n animation: 1s flash step-end infinite;\n }\n\n @-webkit-keyframes flash {\n from, 50%, to {\n opacity: 1;\n }\n\n 25%, 75% {\n opacity: 0;\n }\n }\n\n @keyframes flash {\n from, 50%, to {\n opacity: 1;\n }\n\n 25%, 75% {\n opacity: 0;\n }\n }\n\n .flash {\n animation-name: flash;\n }\n "
]
}),
__metadata("design:paramtypes", [])
], AmpDashComponent);
exports.AmpDashComponent = AmpDashComponent;
}
}
AmpDashComponent.decorators = [
{ type: Component, args: [{
selector: 'amp-dash',
template: `
<pre>{{displayText}}<span [ngClass]="cursorClass">{{cursorChar}}</span></pre>
<ng-content></ng-content>
`,
styles: [`
pre{
font-family: inherit;
font-size: inherit;
display: inline;
}
:host(){
display: inline;
}
.cursor {
font-weight: inherit;
font-size: inherit;
color: #0030FF;
-webkit-animation: 1s flash step-end infinite;
-moz-animation: 1s flash step-end infinite;
-ms-animation: 1s flash step-end infinite;
-o-animation: 1s flash step-end infinite;
animation: 1s flash step-end infinite;
}
@-webkit-keyframes flash {
from, 50%, to {
opacity: 1;
}
25%, 75% {
opacity: 0;
}
}
@keyframes flash {
from, 50%, to {
opacity: 1;
}
25%, 75% {
opacity: 0;
}
}
.flash {
animation-name: flash;
}
`]
},] },
];
/**
* @nocollapse
*/
AmpDashComponent.ctorParameters = () => [];
AmpDashComponent.propDecorators = {
'typeText': [{ type: Input },],
'typeDelay': [{ type: Input },],
'typeLoop': [{ type: Input },],
'eraseDelay': [{ type: Input },],
'cursorClass': [{ type: Input },],
'cursorChar': [{ type: Input },],
'captionTyped': [{ type: Output },],
'captionErased': [{ type: Output },],
};
function AmpDashComponent_tsickle_Closure_declarations() {
/** @type {?} */
AmpDashComponent.decorators;
/**
* @nocollapse
* @type {?}
*/
AmpDashComponent.ctorParameters;
/** @type {?} */
AmpDashComponent.propDecorators;
/** @type {?} */
AmpDashComponent.prototype.typeText;
/** @type {?} */
AmpDashComponent.prototype.typeDelay;
/** @type {?} */
AmpDashComponent.prototype.typeLoop;
/** @type {?} */
AmpDashComponent.prototype.eraseDelay;
/** @type {?} */
AmpDashComponent.prototype.cursorClass;
/** @type {?} */
AmpDashComponent.prototype.cursorChar;
/** @type {?} */
AmpDashComponent.prototype.captionTyped;
/** @type {?} */
AmpDashComponent.prototype.captionErased;
/** @type {?} */
AmpDashComponent.prototype.captionText;
/** @type {?} */
AmpDashComponent.prototype.captionLength;
/** @type {?} */
AmpDashComponent.prototype.displayText;
/** @type {?} */
AmpDashComponent.prototype.typeTimeout;
/** @type {?} */
AmpDashComponent.prototype.eraseTimeout;
/** @type {?} */
AmpDashComponent.prototype.eraseDelayTimeout;
/** @type {?} */
AmpDashComponent.prototype.captionIndex;
/** @type {?} */
AmpDashComponent.prototype.typeTextClone;
}
//# sourceMappingURL=amp-dash.component.js.map
export declare class AmpDashModule {
}

@@ -1,28 +0,29 @@

"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var common_1 = require("@angular/common");
var amp_dash_component_1 = require("./amp-dash.component");
var AmpDashModule = (function () {
function AmpDashModule() {
}
return AmpDashModule;
}());
AmpDashModule = __decorate([
core_1.NgModule({
imports: [
common_1.CommonModule,
],
declarations: [amp_dash_component_1.AmpDashComponent],
exports: [amp_dash_component_1.AmpDashComponent],
entryComponents: [amp_dash_component_1.AmpDashComponent]
})
], AmpDashModule);
exports.AmpDashModule = AmpDashModule;
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AmpDashComponent } from './amp-dash.component';
export class AmpDashModule {
}
AmpDashModule.decorators = [
{ type: NgModule, args: [{
imports: [
CommonModule,
],
declarations: [AmpDashComponent],
exports: [AmpDashComponent],
entryComponents: [AmpDashComponent]
},] },
];
/**
* @nocollapse
*/
AmpDashModule.ctorParameters = () => [];
function AmpDashModule_tsickle_Closure_declarations() {
/** @type {?} */
AmpDashModule.decorators;
/**
* @nocollapse
* @type {?}
*/
AmpDashModule.ctorParameters;
}
//# sourceMappingURL=amp-dash.module.js.map
{
"name": "amp-dash",
"description": "An Angular2 typing component",
"version": "1.1.1",
"main": "index.ts",
"version": "1.1.2",
"main": "lib/index.umd.js",
"module": "lib/index.js",
"license": "MIT",

@@ -14,3 +15,6 @@ "angular-cli": {},

"lint": "ng lint",
"prepublish": "tsc -p src/amp-dash/"
"compile": "ngc -p src/amp-dash/tsconfig.json",
"rollup": "rollup -c src/amp-dash/rollup.config.js",
"amp-up": "npm run compile && npm run rollup",
"prepublish": "npm run amp-up"
},

@@ -32,2 +36,3 @@ "author": {

"@angular/animations": "^4.1.0",
"@angular/cli": "^1.0.1",
"@angular/compiler": "^4.1.0",

@@ -41,6 +46,6 @@ "@angular/compiler-cli": "^4.1.0",

"@angular/router": "^4.1.0",
"@types/core-js": "^0.9.41",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0-beta.4",
"core-js": "^2.4.1",
"jasmine-core": "~2.5.2",

@@ -54,9 +59,8 @@ "jasmine-spec-reporter": "~3.2.0",

"karma-jasmine-html-reporter": "^0.2.2",
"rollup": "^0.41.6",
"ts-node": "~2.0.0",
"tslint": "~4.4.2",
"typescript": "^2.3.1",
"typings": "^2.1.1",
"core-js": "^2.4.1",
"typescript": "^2.3.2",
"zone.js": "^0.8.4"
}
}

@@ -0,0 +0,0 @@ # ![AMP DASH](src/assets/images/amp-dash.gif)

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