Example project of a WIWI type wizard
Clone the project
Installing all dependencies of project
This project use yarn: https://yarnpkg.com/en/docs/install
yarn
or
yarn install
Bundle with webpack
The project offers the following script that packages the project using webpack
npm run bundle
Installation and management wizard on the web OpenGate UX is done through the following commands:
Register
npm run register
Update
npm run update
Delete
npm run delete
Publish
npm run publish [register|update|delete] [url of api-web] [domain] [user name] [password]
They will ask for the following information:
- Type url of api-web (http://localhost:3977): default http://localhost:3977
- domain: domain of user that exists in the platform OpenGate
- user name: user that exists in the platform OpenGate
- password: password of user
This project offers the following script that version the project using npm
npm version [ major | minor | patch ]
0.1.0, 1.0.x
This version is compatible with opengate-web version >= 8.13.x
By default the web, when launching the wizard will use the following configuration:
{
template: 'modules/wizard/client/views/wizard.client.view.html',
controller: name_of_wizard + 'Controller',
windowClass: name_of_wizard + '-wizard'
}
Where name_of_wizard will be : meta-widget.json -> actions[name_of_action][name_of_wizard]
That is, the controller of the wizard must have the same name as the controller to be configured:
If the name_de_wizard
equals exampleWizard, the angular controller should be called exampleWizardController
You can configure all this by adding the configuration of the new wizard in the following way in the run block of the configured angular module: src/config/wizard.config.js
angular
.module('wiwi.wizard')
.run(function ($enabledWizards) {
$enabledWizards.wizards.exampleWizard = $enabledWizards.getCommonConfig({
template: 'modules/wizard/client/views/wizard.client.view.html',
controller: 'exampleWizardController',
windowClass: 'exampleWizard-wizard'
});
});
- template: optional parameter. If it is not added, the base html on which the wizard is based will be the one with the default website:
'modules/wizard/client/views/wizard.client.view.html'
- controller: mandatory parameter. Wizard's main controller
- windowClass: mandatory parameter. Class to add to the wizard