This is only for development purposes, and it could be used as a basis for own vis-2 widgets' development.
This example consists of two projects: JavaScript (src-widgets-js) and TypeScript (src-widgets-ts).
** The typescript project is not yet finished! If someone can fix it. You are welcome. **
After all entries with vis-widgets-react-template
are replaced to your adapter name in package.json
, io-package.json
and file admin/vis-widgets-react-template.png
renamed too, you can start with renaming of widgets.
Some important places:
io-package.json
=>common.visWidgets
src-widgets-js/modulefederation.config.js
from line 4- File
DemoWidget.jsx
Files in directory src-widgets-js
(App.tsx
, bootstrap.jsx
, index.js
) are only for development mode and will not be used in production.
By development, you can start the script from src-widgets-js
folder with npm run start
command,
and then on port 4173 you will see the demo widget.
For faster development, you can:
- start in src-widgets-js:
npm run start
- write in object
system.adapter.vis-widgets-react-template.0
=>common.visWidgets.vis2DemoWidget.url
tohttp://localhost:4173/customWidgets.js
- Press F5 in
iobroker.vis
web page
- (oweitman) changed the node version from 16 to 20 in test and release workflow
- (bluefox) updated packages
- (bluefox) updated packages
- (bluefox) update packages
- (bluefox) Added CI tests
- (bluefox) update packages
- (bluefox) Packages were updated
- (bluefox) Initial commit
The MIT License (MIT)
Copyright (c) 2022-2024 bluefox dogafox@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.