Sr. Director
Follow these steps to refactor your code for Tecton 1.0. These deprecations have been around for more than a year so it is most likely that no action will be required on your part, but just in case here is each refactor step by step.
This requires no code change but if your extension still supports IE then it cannot upgrade. If you are ready to drop IE continue with the steps below.
//OLD showAlert({ styleType: 'danger' }); //NEW showAlert({ styleType: 'error });
//OLD showAlert({ msg: 'Warning your funds are low' }); //NEW showAlert({ message: 'Warning your funds are low' });
If you have been using sendOverpanel update the name to showOverpanel. The arguments and functionality remain the same.
//OLD sendOverpanel('myWorkflow'); //NEW showOverpanel('myWorkflow');
If you were using the params$ variable returned from the connect promise it is no longer available. Instead you must use the paramsChanged source providing it a call back. Tecton now handles this subscription teardown for you by taking a callback instead of exposing a RXJS BehaviorSubject.
//OLD connect().then(capabilities => { //At some point you would have to tear this down const paramSubscription = capabilities.params$.subscribe(params => { //do something with params }); }); //NEW connect().then(capabilities => { capabilities.sources.paramsChanged(params => { //do something with params }); });
//OLD capabilities.sources.t('_.t.my_localized_string'); //NEW capabilities.sources.loc('_.t.my_localized_string');
Thanks for upgrading to the latest and using this guide. Let us know if there is something we missed or anything you would like to see in the future by opening a ticket on the Q2 Developer Portal or emailing me at daniel.chappell@q2ebanking.com.