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

@utsav-makwana/ngx-cron-editor

v1.0.5

Published

A cron expression generator with translations

Downloads

4

Readme

@cardiosmircem/ngx-cron-editor

An angular component for building cron expressions graphically with i18n localization available 🥳. Other fixes are:

  • usage of solely reactive forms (got rid of template forms) 🤓
  • useful scripts are added in order to make future development easy 😌
  • code not needed removed 🚮

Demo

A demo can be found 👉 👉 👉 here 👈 👈 👈

Usage

  1. Install the npm package

    $ npm i @cardiosmircem/ngx-cron-editor
  2. import the module in your own module

    import { CronEditorModule } from '@cardiosmircem/ngx-cron-editor';
    
    @NgModule({
        imports: [..., CronEditorModule],
    ...
    })
    export class MyModule {
    }
  3. in your html code include

    <app-cron-editor
      [options]="cronOptions"
      [cronStartingValue]="cronValue"
      (cronChange)="seeCron($event)"
    >
    </app-cron-editor>
  4. While in your ts component you have

import { CronOptions } from '@cardiosmircem/ngx-cron-editor';

@Component({
    ...
})
export class MyComponent {
  cronValue = '0 0 1/1 * *';

  cronOptions: CronOptions = {
    hideMinutesTab: false,
    hideHourlyTab: false,
    hideDailyTab: false,
    hideWeeklyTab: false,
    hideMonthlyTab: false,
    hideYearlyTab: false,
    hideAdvancedTab: false,
    hideSpecificWeekDayTab: false,
    hideSpecificMonthWeekTab: false,
    use24HourTime: true,
    hideSeconds: false,
    cronFlavor: 'standard'
  };
  ...
}
  1. finally add these translations (in your en.json for example)
"cronEditor": {
    "lbl": {
      "advanced": "Advanced",
      "at": "at",
      "atTime": "at the hour",
      "every": "Every",
      "daily": "Daily",
      "day": "Day",
      "days": "Days",
      "expression": "Cron expression",
      "fromMonthday": "From month day",
      "daysAndFrom": "days from",
      "firstWeekDay": "first week",
      "flavor": "Flavor",
      "fromDate": "from",
      "hourly": "Hourly",
      "hours": "Hours",
      "language": "Language",
      "last": "last",
      "lastDay": "last day",
      "lastWeekDay": "last week",
      "minutes": "Minutes",
      "month": "Month",
      "monthPlural": "Months (from the month of january)",
      "months": {
        "january": "january",
        "february": "february",
        "march": "march",
        "april": "april",
        "may": "may",
        "june": "june",
        "july": "july",
        "august": "august",
        "september": "september",
        "october": "october",
        "november": "november",
        "december": "december"
      },
      "monthly": "Monthly",
      "of": "of",
      "ofEvery": "of every",
      "onThe": "On the",
      "onTheDouble": "On the",
      "onTheDoubleMale": "On the",
      "onTheTriple": "On the",
      "onTheFeminine": "On the",
      "seconds": "Seconds",
      "selectCronFlavor": "Select your cron flavor",
      "week": "Week",
      "weekDays": "From monday to friday at",
      "yearly": "Yearly",
      "first": "first",
      "second": "second",
      "third": "third",
      "fourth": "fourth",
      "fifth": "fifth",
      "MON": "monday",
      "TUE": "tuesday",
      "WED": "wednesday",
      "THU": "thursday",
      "FRI": "friday",
      "SAT": "saturday",
      "SUN": "sunday",
      "weekly": "Weekly"
    }
  }

API

| Name | Description | | :------------------------------------------------- | :-------------------------------------------------------------- | | @Input() options: CronOptions | Options for obtaining your desired UI | | @Input() cronStartingValue: string | Starting value for example | | @Output() cronChange: EventEmitter<string> | Event emitted when the selection on the cron expression changes |

Development

  1. Clone the repo

  2. npm install

  3. npm run pack-install

Enjoy developing 🏖️ 🌞 🍹

History

This package repository has been forked from ngx-cron-editor.

License

Licensed under the MIT license.