sebgroup / ng-wizard Goto Github PK
View Code? Open in Web Editor NEWWizard component built for angular 12+
Home Page: https://sebgroup.github.io/ng-wizard/
License: Apache License 2.0
Wizard component built for angular 12+
Home Page: https://sebgroup.github.io/ng-wizard/
License: Apache License 2.0
requires history state to be updated when navigating between steps
After installing and implementing the wizard I kept getting this error (and similar for each property in the model):
Error: node_modules/@sebgroup/ng-wizard/lib/models/wizard-texts.d.ts:2:5 - error TS2411: Property 'wiz_next_action' of type 'string | undefined' is not assignable to string index type 'string'.
2 wiz_next_action?: string;
~~~~~~~~~~~~~~~
The package itself has the strict
property set to false in tsconfig, which is the reason why the package itself won't complain about this error. But as soon as the main project has strict
set to true the error pasted above will appear.
Fix wizard-texts.ts model by correctly setting the types:
export interface WizardTexts {
wiz_next_action?: string;
wiz_prev_action?: string;
wiz_close_action?: string;
wiz_save_action?: string;
wiz_header_title?: string;
wiz_step_description?: string;
[key: string]: string | undefined;
}
and set strict
to true in tsconfig, since this is the default behavior of Angular projects.
If this is not fixed every project that wants to use the wizard won't be able to have strict typing enabled.
When injecting WizardSteps service to an NgRx effect a warning occurs that breaks further WizardSteps usage:
sebgroup-ng-wizard.js:424 No valid route config found for current route: "".
Make sure route guards provide a fallback if a access to a step is restricted and that inactive sub steps are handled too, using a wildcard route.
In our case, routes are configured correctly as described in the documentation. What is more, this doesn't happen when injecting WizardSteps to a regular Angular service.
This issue can be reproduced in a sample seb-ng-wizard project (e.g. https://github.com/sebgroup/ng-wizard/tree/master/projects/seb-ng-wizard-lazy-demo):
After playing around with it a little, we discovered that by extracting WizardSteps constructor code into a method and placing it in a timeout, the issue is resolved:
constructor(private router: Router, private _location: Location) {
setTimeout(() => {
this.init();
}, 0);
}
Uppon further investigation we saw that the error occurs because of undefined access to routes
(line 43). In essence, this._config.config['_loadedConfig'].routes[0].children
can't find _loadedConfig
initially but works just fine with setTimeout(...)
. Perhaps a race condition occurs somewhere?
We have a use case where we need to disable a whole step. Refactoring it to sub-steps is not a good solution. In the documentation a disabled step state is shown. However, it is either not supported or not clear how to implement:
For our use case, we created a specific CanActivate guard to skip disabled steps. However, it would be nice to have a visual indication for this (e.g. like in the picture above).
It shouldn't be possible to navigate to a step unless route guard returns true.
Current solution using pure css to prevent navigation has some issues and doesn't prevent user from using keyboard or by typing the url in the browser.
Notes from meeting with CX DM 20200826:
Notes from meeting with CX DM 20200902:
Notes from meeting with CX Component Review 20200910:
The wizard should have a fixed footer on desktop and tabled view (the content should scroll) while it should flow with content on mobile devices (small screens).
3.x.x
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the 3.x.x
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
2.0.0
on branch 3.x.x
cannot be published as it is out of range.Based on the releases published on other branches, only versions within the range >=3.0.0 <1.4.1
can be published from branch 3.x.x
.
The following commits are responsible for the invalid release:
useFullWidth
(907d473)activeStep
(40de7ce)updateSubSteps
method (10bfd89)getPreviousStep(path: string)
method (5f15c26)getStepByUrl
(c04dbf5)Those commits should be moved to a valid branch with git merge or git cherry-pick and removed from branch 3.x.x
with git revert or git reset.
A valid branch could be master
or next-major
.
See the workflow configuration documentation for more details.
Good luck with your project ✨
Your semantic-release bot 📦🚀
we have an issue that everything works fine we run applications directly from the browser but since we have to load applications in MPS or another shell we are loading them inside an iframe.
but when we load them from iframe in iPhone, Android, iPad, and Android tablet, some parts in ng-wizard and also some other packages like ng-modal are not working properly. height of ng-wizard is more than the whole page, you can't see the buttons. and then the z-index of the page is not working properly. like ng-modal is going behind the ng-wizard top-nav and footer and playing with z-index is not helping.
Next and previous action should have default text.
Next/Nästa
Previous/Tillbaka (or Föregående?)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.