{"_id":"@adeteam/ngx-stepper","_rev":"10-8ce1ee0573b984f17cd49fc2cc433ab4","time":{"1.1.9":"2019-11-15T03:14:50.416Z","created":"2019-11-15T03:15:17.592Z","1.1.10":"2019-11-15T03:15:18.087Z","modified":"2022-04-04T11:29:02.556Z"},"name":"@adeteam/ngx-stepper","dist-tags":{"latest":"1.1.10"},"versions":{"1.1.10":{"name":"@adeteam/ngx-stepper","version":"1.1.10","description":"Angular Steppers directive for Angular Material","keywords":["angular2","angular4","angular-material","ngx-stepper"],"repository":{"type":"git","url":"git+https://github.com/adeteam/ngx-stepper.git"},"author":{"name":"Thong Huynh","email":"hvqthong.pns@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/adeteam/ngx-stepper/issues"},"homepage":"https://github.com/adeteam/ngx-stepper#readme","main":"./dist/index.js","module":"./dist/index.js","typings":"./dist/index.d.ts","angular-cli":{},"scripts":{"ng":"ng","start":"ng serve","lint":"tslint \"src/**/*.ts\"","test":"ng test","pree2e":"webdriver-manager update --standalone false --gecko false","e2e":"protractor","build:aot":"rimraf dist && ngc -p src/tsconfig-aot.json"},"devDependencies":{"@angular/animations":"~4.4.4","@angular/cdk":"^2.0.0-beta.12","@angular/cli":"^1.4.7","@angular/common":"~4.4.4","@angular/compiler":"~4.4.4","@angular/compiler-cli":"~4.4.4","@angular/core":"~4.4.4","@angular/forms":"~4.4.4","@angular/http":"~4.4.4","@angular/material":"^2.0.0-beta.12","@angular/platform-browser":"~4.4.4","@angular/platform-browser-dynamic":"~4.4.4","@angular/router":"^4.4.4","@types/jasmine":"2.5.38","@types/node":"^6.0.42","codelyzer":"~2.0.0-beta.1","core-js":"^2.4.1","jasmine-core":"2.5.2","jasmine-spec-reporter":"2.5.0","karma":"1.2.0","karma-chrome-launcher":"^2.0.0","karma-cli":"^1.0.1","karma-jasmine":"^1.0.2","karma-remap-istanbul":"^0.2.1","protractor":"~4.0.13","rimraf":"^2.6.1","rxjs":"^5.0.1","ts-helpers":"^1.1.1","ts-node":"1.2.1","tslint":"^4.0.2","typescript":"~2.2.2","zone.js":"^0.8.4"},"_id":"@adeteam/ngx-stepper@1.1.10","_nodeVersion":"10.17.0","_npmVersion":"6.13.0","dist":{"integrity":"sha512-0/zxykb4xJ+ohn6DRvadX3D+z71Ko6vHllDZn7aEakF+PzZuMWpTq59kCFdzDm7iDATsFHtYXqsz+6t+0nneOw==","shasum":"4d36d365b945399f374ce7876b8fc4ce6efb714d","tarball":"https://registry.npmjs.org/@adeteam/ngx-stepper/-/ngx-stepper-1.1.10.tgz","fileCount":44,"unpackedSize":4679627,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzhhGCRA9TVsSAnZWagAAmgMP/3eRzr/wZnYoXQhpOvKf\nb7ApskCW0GP9vz8J9HUrIr2HaA09uiIOtQ6a4xpSe98rmPVrd/+4x4WMjBRF\n5YDpFKxnHvbF5GnSrwdO/nnfsl6Ix8zdMZFiO9N9fILlng73gJO42DwvRH2E\niJH38HPC6hmpi3Z/QDO63DPncVGXG7Txgz54p0ZiRIsukvcCdHroNLZCUuF6\nu+Nw6K73BiEmHpqBm/8xNteIccnWaXCqi9saJQtU6Yo1pVy4vhEdXO/AVfuK\nbHpGX+AKvEN9M//kP5IRxc4pY+ZvU1yvKs+bizBOhRZNgpj+nnOrt1XJKuhE\nQV1wqPCNyjxFmEP4h7UVz81EsWpU2kG2XuGzWAPL/ZaQiTmYBAAOvrtIvyuj\njNAvivhgrKycV0MoIamBWATxhWUKE2zfBSqH2LdBzJ+URAk1E5Zq0uT4n6DA\nH+CDgt5NWNlNmzWQXocml0q5BofjlGTXLF3Ego8nONCjrfa6IIioTG/oPloT\nl4neeH3Xn28dE3ecnbYoOPCqpRK5eUjEU12YYs/p61f4DXwH3qpPh9Aptmnl\nkUqMZBVHo6FHKjzNSmmxdEPPm6Q/YfA/zf+q2ZP5ptIZ6lEm+afyhdNEh1aG\nxuuPyZ/Z2xRMqkixpYYbhdOZSG5mOfj117tD/YUrgF5MNhNx41YgEcVGQm/M\namfr\r\n=NFSc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGfVMx0qlTw/WSmyIbS9MKSIAP9CLZAglk1c8+kDBbk7AiANHWKxGnBlqbxl5HGFyED7+3CBm/NIEI9m5OJ+ARBO+Q=="}]},"maintainers":[{"name":"xangxiong","email":"xang.xiong.email@gmail.com"}],"_npmUser":{"name":"xangxiong","email":"xang.xiong.email@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-stepper_1.1.10_1573787717811_0.18408713705599422"},"_hasShrinkwrap":false}},"maintainers":[{"name":"xangxiong","email":"xang.xiong.email@gmail.com"}],"description":"Angular Steppers directive for Angular Material","homepage":"https://github.com/adeteam/ngx-stepper#readme","keywords":["angular2","angular4","angular-material","ngx-stepper"],"repository":{"type":"git","url":"git+https://github.com/adeteam/ngx-stepper.git"},"author":{"name":"Thong Huynh","email":"hvqthong.pns@gmail.com"},"bugs":{"url":"https://github.com/adeteam/ngx-stepper/issues"},"license":"MIT","readme":"# ngx-stepper\r\n\r\nAngular Steppers directive for Angular Material\r\n\r\nBased on Material Steppers: https://www.google.com/design/spec/components/steppers.html#steppers-types-of-steppers\r\n\r\n## Plunker Demo\r\n\r\n[http://embed.plnkr.co/n1Ye3pQY6dlMSoJizO6Y/](http://embed.plnkr.co/n1Ye3pQY6dlMSoJizO6Y/)\r\n\r\n## Run Demo App\r\nYou can try out the Angular Steppers in the demo app built with [Angular-CLI](https://github.com/angular/angular-cli). \r\n\r\n### #1 To start the demo app clone or download the repo.\r\n### #2 Install the latest version of Angular-CLI\r\n```bash\r\nnpm install -g angular-cli@latest\r\n```\r\n### #3 Install npm packages\r\n```bash\r\nnpm install\r\n```\r\n### #4 Run the app\r\n```bash\r\nng serve\r\n```\r\n### #5 Open the app\r\n[http://localhost:4200/](http://localhost:4200/)\r\n\r\n## Installation in package.json\r\n\r\n```bash\r\nnpm i -S ngx-stepper\r\n```\r\n\r\n**note**: works with angular 2 & 4\r\n\r\n### Import to app module\r\n\r\n```ts\r\nimport { NgxStepperModule } from 'ngx-stepper';\r\n\r\n@NgModule({\r\n  declarations: [\r\n    AppComponent\r\n  ],\r\n  imports: [\r\n    BrowserModule,\r\n    NgxStepperModule\r\n  ],\r\n  providers: [],\r\n  bootstrap: [AppComponent]\r\n})\r\nexport class AppModule { }\r\n```\r\n\r\n### Write your html\r\n\r\n```html      \r\n<ngx-stepper #stepperDemo=\"stepper\" [options]=\"options\">\r\n  <ngx-step [label]=\"'Select a campaign'\">\r\n    <ngx-step-body>\r\n      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur nobis saepe facere suscipit atque,\r\n        sapiente, natus mollitia ipsum odit accusamus repellendus deserunt. Odio sit similique, labore maxime\r\n        voluptatibus, eaque autem!</p>\r\n      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur nobis saepe facere suscipit atque,\r\n        sapiente, natus mollitia ipsum odit accusamus repellendus deserunt. Odio sit similique, labore maxime\r\n        voluptatibus, eaque autem!</p>\r\n      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur nobis saepe facere suscipit atque,\r\n        sapiente, natus mollitia ipsum odit accusamus repellendus deserunt. Odio sit similique, labore maxime\r\n        voluptatibus, eaque autem!</p>\r\n      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur nobis saepe facere suscipit atque,\r\n        sapiente, natus mollitia ipsum odit accusamus repellendus deserunt. Odio sit similique, labore maxime\r\n        voluptatibus, eaque autem!</p>\r\n    </ngx-step-body>\r\n    <ngx-step-actions>\r\n      <button md-button class=\"md-primary md-raised\" (click)=\"selectCampaign()\">Continue</button>\r\n      <button md-button class=\"md-primary\" (click)=\"stepper.back()\">Cancel</button>\r\n    </ngx-step-actions>\r\n  </ngx-step>\r\n  <ngx-step [label]=\"'Publish the ad'\">\r\n    <ngx-step-body>\r\n      <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Consectetur nobis saepe facere suscipit atque,\r\n        sapiente, natus mollitia ipsum odit accusamus repellendus deserunt. Odio sit similique, labore maxime\r\n        voluptatibus, eaque autem!</p>\r\n    </ngx-step-body>\r\n    <ngx-step-actions>\r\n      <button md-button class=\"md-primary md-raised\" (click)=\"stepper.next()\">Complete</button>\r\n      <button md-button class=\"md-primary\" (click)=\"stepper.back()\">Back</button>\r\n    </ngx-step-actions>\r\n  </ngx-step>\r\n```\r\n\r\n# Stepper Options\r\n\r\n**options attribute**\r\n\r\nValue of the options attribute is a type of StepperOptions. It can contain the following properties.\r\n\r\nDetailed property bellow:\r\n\r\n| Options | Default | Type | Description |\r\n| --- | --- | --- | -- |\r\n| **vertical** | false | boolean |  |\r\n| **linear** | true | boolean |  |\r\n| **alternative** | true | boolean |  |\r\n| **mobileStepText** | true | boolean |  |\r\n| **labelStep** | 'Step' | string |  |\r\n| **labelOf** | 'Of' | string |  |\r\n| **enableSvgIcon** | false | boolean |  |\r\n\r\n# Stepper Service\r\n\r\nUsed to control a stepper by it's id. Example:\r\n\r\n```ts\r\n@ViewChild('stepperDemo')\r\npublic steppers: NgxStepperComponent;\r\n\r\npublic selectCampaign(): void {\r\n  this.steppers.showFeedback('Checking, please wait ...');\r\n  this.steppers.next();\r\n}\r\n```\r\n\r\nDetailed service operations bellow:\r\n\r\n| Method | Description | Returns |\r\n| --- | --- | --- |\r\n| `next()` | Complete the current step and move one to the next. Using this method on editable steps (in linear stepper) it will search by the next step without \"completed\" state to move. When invoked it dispatch the event onstepcomplete to the step element. | boolean - True if move and false if not move (e.g. On the last step) | \r\n| `back()` | Move to the previous step without change the state of current step. Using this method in linear stepper it will check if previous step is editable to move. | boolean - True if move and false if not move (e.g. On the first step) |\r\n| `skip()` | Move to the next step without change the state of current step. This method works only in optional steps. | boolean - True if move and false if not move (e.g. On non-optional step) |\r\n| `goto(stepNumber: number)` | Move \"active\" to specified step id parameter. The id used as reference is the integer number shown on the label of each step (e.g. 2). | boolean - True if move and false if not move (e.g. On id not found) |\r\n| `error(message: string)` | Defines the current step state to \"error\" and shows the message parameter on title message element.When invoked it dispatch the event onsteperror to the step element. | {string} message The error message |\r\n| `clearError()` | Defines the current step state to \"normal\" and removes the message parameter on title message element. | void |\r\n| `showFeedback(message?: string)` | Shows a feedback message and a loading indicador. | void |\r\n| `clearFeedback()` | Removes the feedback. |  void |\r\n\r\n# Embed SVG Icon assets\r\n- Supported Namespace: 'step-done', 'step-warning'\r\n```ts\r\nimport {DomSanitizer} from '@angular/platform-browser';\r\nimport {MdIconRegistry} from '@angular/material';\r\n\r\npublic options: StepperOptions = {\r\n  enableSvgIcon: true\r\n};\r\n  \r\nconstructor(private _iconRegistry: MdIconRegistry,private _sanitizer: DomSanitizer) {}\r\n\r\npublic ngOnInit(): void {\r\n  this._iconRegistry\r\n    .addSvgIcon('step-done', this._sanitizer.bypassSecurityTrustResourceUrl('YOUR_ICON_URL'));\r\n  this._iconRegistry\r\n    .addSvgIcon('step-warning', this._sanitizer.bypassSecurityTrustResourceUrl('YOUR_ICON_URL'));\r\n}\r\n```\r\n- EX: 'YOUR_ICON_URL' = 'assets/icon/warning.svg'\r\n\r\n# TODO\r\n\r\n- [x] Horizontal steppers\r\n- [x] Vertical steppers\r\n- [x] Linear steppers\r\n- [x] Non-linear steppers\r\n- [x] Alternative labels\r\n- [x] Optional steps\r\n- [ ] Editable steps\r\n- [x] Stepper feedback\r\n- Mobile steppers\r\n    - [x] Mobile step text\r\n    - [ ] Mobile step dots\r\n    - [ ] Mobile step progress bar\r\n- [x] Correct apply styles (css) of the material design\r\n- [x] Embed SVG Icon assets\r\n- [ ] Create a better demo page with all options.\r\n\r\n## Remarks\r\n\r\n- Based on:\r\n - [Material Steppers](https://github.com/eberlitz/material-steppers)\r\n - [MDL Stepper](https://github.com/ahlechandre/mdl-stepper)\r\n - [MD Steppers](https://github.com/ipiz/md-steppers)\r\n - [Angular Material Steppers](https://github.com/marcosmoura/angular-material-steppers)\r\n\r\n- Thanks to all ;)\r\n","readmeFilename":"README.md"}