Widget item extension, that provides a webComponent with the modal, that can include any given content.
Prepare the bootstrap of the extension
To install the package from NPM registry you should run
yarn add @capsulajs/capsulahub-widget-modalor
npm install @capsulajs/capsulahub-widget-modalYou can get the default export from the link
https://capsulajs.s3.amazonaws.com/develop/capsulahub-widget-modal/index.js{
"components": {
"layouts": {},
"items": {
"web-modal": {
"componentName": "web-modal",
"path": "https://capsulajs.s3.amazonaws.com/develop/capsulahub-widget-modal/index.js",
"config": {}
}
}
}
}
Bootstrap function of the extension.
The public API of the extension.
The documentation about public API.
Run
yarn doc
And open doc/index.html in browser.
Internally example prepares the widget almost in the same way as Workspace does it.
yarn start
It will use the local version of extension from local src.
The bundle is being loaded statically in order to provide watch mode.
1) yarn test
2) yarn test:debug
New commands have to be typed correctly in typescript.
For example:
Cypress.Commands.add('getHeading', () => {
return cy.get('h1');
});
declare namespace Cypress {
interface Chainable {
getHeading: () => Chainable;
}
}
CapsulaHub and related services are released under MIT Licence.