{"id":18685785,"url":"https://github.com/grapesjs/components-countdown","last_synced_at":"2025-04-12T04:51:43.461Z","repository":{"id":57253114,"uuid":"99156801","full_name":"GrapesJS/components-countdown","owner":"GrapesJS","description":"Simple countdown component for the GrapesJS Editor","archived":false,"fork":false,"pushed_at":"2023-06-06T13:09:55.000Z","size":189,"stargazers_count":22,"open_issues_count":1,"forks_count":38,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T18:09:09.459Z","etag":null,"topics":["countdown","counter","grapesjs"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GrapesJS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-08-02T20:11:48.000Z","updated_at":"2024-08-02T02:18:36.000Z","dependencies_parsed_at":"2024-01-29T19:30:38.845Z","dependency_job_id":"647a44d4-1a32-497f-8ee3-43daecbf9e41","html_url":"https://github.com/GrapesJS/components-countdown","commit_stats":null,"previous_names":["artf/grapesjs-component-countdown"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fcomponents-countdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fcomponents-countdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fcomponents-countdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GrapesJS%2Fcomponents-countdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GrapesJS","download_url":"https://codeload.github.com/GrapesJS/components-countdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248519473,"owners_count":21117757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["countdown","counter","grapesjs"],"created_at":"2024-11-07T10:24:16.720Z","updated_at":"2025-04-12T04:51:43.432Z","avatar_url":"https://github.com/GrapesJS.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GrapesJS Countdown\n\nSimple countdown component for GrapesJS Editor\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://artf.github.io/grapesjs/img/countdown.gif\" alt=\"GrapesJS\" align=\"center\"/\u003e\u003c/p\u003e\n\u003cbr/\u003e\n\n# [Demo](http://grapesjs.com/demo.html)\n\n\n\n\n\n## Summary\n\n* Plugin name: `grapesjs-component-countdown`\n* Components: `countdown`\n* Blocks: `countdown`\n\n\n## Options\n\n| Option | Description | Default |\n|-|-|-\n| `id` | The ID used to create the block and component. | `countdown` |\n| `label` | The label used for the block and the component. | `Countdown` |\n| `block` | Object to extend the default block, eg. `{ label: 'Countdown', category: 'Extra', ... }`. Pass a falsy value to avoid adding the block. | `{}` |\n| `props` | Object to extend the default component properties., eg. `{ name: 'Countdown', droppable: false, ... }`. | `{}` |\n| `style` | Custom CSS styles for the component. This will replace the default one. | `''` |\n| `styleAdditional` | Additional CSS styles for the component. These will be appended to the default one. | `''` |\n| `startTime` | Default start time, eg. `2030-01-25 00:00`. | `''` |\n| `endText` | Text to show when the countdown is ended. | `'EXPIRED'` |\n| `dateInputType` | Date input type, eg. `date`, `datetime-local` | `'date'` |\n| `labelDays` | Days label text used in component. | `'days'` |\n| `labelHours` | Hours label text used in component. | `'hours'` |\n| `labelMinutes` | Minutes label text used in component. | `'minutes'` |\n| `labelSeconds` | Seconds label text used in component. | `'seconds'` |\n| `classPrefix` | Countdown component class prefix. | `'countdown'` |\n\n\n\n\n\n## Download\n\n* CDN\n  * `https://unpkg.com/grapesjs-component-countdown`\n* NPM\n  * `npm i grapesjs-component-countdown`\n* GIT\n  * `git clone https://github.com/artf/grapesjs-component-countdown.git`\n\n\n\n\n\n\n## Usage\n\nDirectly in the browser\n```html\n\u003clink href=\"https://unpkg.com/grapesjs/dist/css/grapes.min.css\" rel=\"stylesheet\"/\u003e\n\u003cscript src=\"https://unpkg.com/grapesjs\"\u003e\u003c/script\u003e\n\u003cscript src=\"path/to/grapesjs-component-countdown.min.js\"\u003e\u003c/script\u003e\n\n\u003cdiv id=\"gjs\"\u003e\u003c/div\u003e\n\n\u003cscript type=\"text/javascript\"\u003e\n  var editor = grapesjs.init({\n      container : '#gjs',\n      // ...\n      plugins: ['grapesjs-component-countdown'],\n      pluginsOpts: {\n        'grapesjs-component-countdown': { /* options */ }\n      }\n  });\n\u003c/script\u003e\n```\n\nModern javascript\n```js\nimport grapesjs from 'grapesjs';\nimport pluginCountdown from 'grapesjs-component-countdown';\n\nconst editor = grapesjs.init({\n  container : '#gjs',\n  // ...\n  plugins: [pluginCountdown],\n  pluginsOpts: {\n    [pluginCountdown]: { /* options */ }\n  }\n  // or\n  plugins: [\n    editor =\u003e pluginCountdown(editor, { /* options */ }),\n  ],\n});\n```\n\n\n\n\n\n## Development\n\nClone the repository\n\n```sh\n$ git clone https://github.com/artf/grapesjs-component-countdown.git\n$ cd grapesjs-component-countdown\n```\n\nInstall it\n\n```sh\n$ npm i\n```\n\nStart the dev server\n\n```sh\n$ npm start\n```\n\nBuild before the commit. This will also increase the patch level version of the package\n\n```sh\n$ npm run build\n```\n\n\n\n\n\n## License\n\nBSD 3-Clause\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrapesjs%2Fcomponents-countdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrapesjs%2Fcomponents-countdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrapesjs%2Fcomponents-countdown/lists"}