Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ftrackhq/ftrack-web-widget
A small library which encapsulates some logic which can be used to build custom dashboard widgets for ftrack
https://github.com/ftrackhq/ftrack-web-widget
frontend ftrack widgets
Last synced: 7 days ago
JSON representation
A small library which encapsulates some logic which can be used to build custom dashboard widgets for ftrack
- Host: GitHub
- URL: https://github.com/ftrackhq/ftrack-web-widget
- Owner: ftrackhq
- License: apache-2.0
- Created: 2022-09-21T08:21:22.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T00:49:54.000Z (19 days ago)
- Last Synced: 2024-10-29T01:31:07.500Z (19 days ago)
- Topics: frontend, ftrack, widgets
- Language: TypeScript
- Size: 5.39 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# ftrack web widget
This small library encapsulates some logic which can be used to build custom dashboard widgets for ftrack.
## Installation
We recommend installing and bundling with NPM:
```javascript
npm install @ftrack/web-widget
```## Usage
To use the library, define two functions `onWidgetLoad` and `onWidgetUpdate`
and initialize the library once the document is ready:```javascript
import { initialize } from "@ftrack/web-widget";/** Initialize widget once DOM has loaded. */
window.addEventListener("DOMContentLoaded", function onDomContentLoaded() {
initialize({
onWidgetLoad: onWidgetLoad,
onWidgetUpdate: onWidgetUpdate,
});
});
```If used as an UMD module, the library exposes `ftrackWidget` on the global (`window`) object.
For a more complete example, see [ftrack JavaScript API: Basic Widget Example](https://bitbucket.org/ftrack/ftrack-javascript-api-example-basic-widget)
More information on the API used is available in the documentation [Creating a custom widget with React](https://help.ftrack.com/en/articles/4490918-creating-a-custom-widget-with-react).