npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@helvio/angular-inline-edit

v1.1.6

Published

Angular Inline Edit for Text and Images

Downloads

2

Readme

Build Status

angular-inline

A collection of Angular inline components. Today this collection is of 1. And it is a general purpose edit input.

Is it any good?

Yes

Install

npm install @helvio/angular-inline-edit

Import

In your app.moddule.ts:

import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { InlineEditModule } from '@helvio/angular-inline-edit'; // Add This Line
import { MatButtonModule, MatInputModule, MatFormFieldModule, MatIconModule, MatRippleModule, MatTabsModule } from '@angular/material';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserAnimationsModule,
    BrowserModule,
    InlineEditModule, // Add This Line
    MatButtonModule,
    MatFormFieldModule,
    MatIconModule,
    MatInputModule,
    MatRippleModule,
    MatTabsModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Use

<inline-edit [(value)]="values.answer" [options]="textOptions" placeholder="What is the meaning of life?"></inline-edit>

| Variable | Type | Default | Remarks | | ------------- | ------------------- | ----------- | ------------------------------------------------------- | | value | any | null | Bidirectional string, number or date to be edited | | valueChange | @Output<any> | | EventEmitter when saving | | options | InlineEditOptions | See Remarks | Complex Object described below | | placeholder | string | null | Input box placeholder text | | maxlength | number | null | Input box maximum length. Will display hint. | | save | @Output<null> | | EventEmitter when saving. Does not emit any value. | | cancel | @Output<null> | | EventEmitter when cancel. Does not emit any value. |

InlineEditOptions

Interface:

export interface InlineEditOptions {
  display?: 'image' | 'text';
  editType?: 'text' | 'number' | 'email' | 'url' | 'textarea' | 'date';
  image?: {
    width?: number;
    height?: number;
  };
  textarea?: {
    rows?: number;
  };
  date?: {
    format?: string;
    min?: Date;
    max?: Date;
  };
}

Default Values:

| Variable | Default Value | Description | | --------------- | ------------- | --------------------------------------------------------------------------------------- | | display | 'text' | Displays the object as text or image. For image, a URL is required. | | editType | 'text' | Type of data to edit. Options are 'text', 'number', 'email', 'url', 'textarea', 'date'. | | image.width | 64 | When using display = 'image', sets the image width. | | image.height | 64 | When using display = 'image', sets the image height. | | textarea.rows | 4 | When using editType = 'textarea', sets the number of rows (lines). | | date.format | 'short' | Date format to display when usingeditType = 'date'. See Angular Docs for details. | | date.min |null | Minimum date for Date Validation when usingeditType = 'date'. | | date.max |null | Maximum date for Date Validation when usingeditType = 'date'`. |

Hosted Demo

Firebase

Local Demo

git clone https://github.com/Helvio88/angular-inline
cd angular-inline
npm install
ng build @helvio/angular-inline-edit
ng serve --open