@openfin/workspace-platform 4.26.0 → 4.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Workspace
|
|
1
|
+
# Workspace Platform API
|
|
2
2
|
|
|
3
3
|
The Workspace Platform Client APIs allow integrators to create their own Workspace platforms.
|
|
4
4
|
|
|
@@ -10,13 +10,40 @@ Run `npm i -E @openfin/workspace-platform`.
|
|
|
10
10
|
|
|
11
11
|
## Workspace Platform API documentation
|
|
12
12
|
|
|
13
|
-
- [Overview](https://developers.openfin.co/of-docs/
|
|
14
|
-
- [API Reference](https://cdn.openfin.co/workspace/api/platform/docs/)
|
|
13
|
+
- [Overview](https://developers.openfin.co/of-docs/docs/workspace-sdk)
|
|
14
|
+
- [API Reference](https://cdn.openfin.co/workspace/api/platform/docs/latest/index.html)
|
|
15
|
+
- [Example projects using Workspace Platform](https://github.com/built-on-openfin/workspace-starter)
|
|
15
16
|
|
|
16
17
|
## Code examples
|
|
17
18
|
|
|
19
|
+
### Initilaize a Workspace Platform
|
|
20
|
+
|
|
18
21
|
```typescript
|
|
19
22
|
import * as WorkspacePlatform from '@openfin/workspace-platform';
|
|
20
23
|
|
|
21
|
-
WorkspacePlatform.
|
|
24
|
+
const customThemes: WorkspacePlatform.CustomThemes = [
|
|
25
|
+
{
|
|
26
|
+
label: "OpenFin's Custom Theme",
|
|
27
|
+
palette: {
|
|
28
|
+
brandPrimary: ‘#F51F63, // required
|
|
29
|
+
brandSecondary: ‘#1FF58A’, // required
|
|
30
|
+
backgroundPrimary: ‘#F8E71C’, // required - hex, rgb/rgba, hsl/hsla only - no string colors: ‘red’
|
|
31
|
+
background2: ‘#7D808A’ // any of the optional colors
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
const overrideCallback: WorkspacePlatform.BrowserOverrideCallback = async (WorkspacePlatformProvider) => {
|
|
37
|
+
class Override extends WorkspacePlatformProvider {
|
|
38
|
+
async quit(payload, callerIdentity) {
|
|
39
|
+
return super.quit(payload, callerIdentity);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return new Override();
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
await WorkspacePlatform.init({
|
|
46
|
+
browser: { overrideCallback },
|
|
47
|
+
theme: customThemes
|
|
48
|
+
});
|
|
22
49
|
```
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@openfin/workspace-platform","description":"An API for creating your own Workspace platform.","contributors":[],"version":"4.
|
|
1
|
+
{"name":"@openfin/workspace-platform","description":"An API for creating your own Workspace platform.","contributors":[],"version":"4.27.0","main":"index.ts","scripts":{"deploy":"npm run deploy:npm && npm run deploy:docs","deploy:npm":"cd out && npm publish","deploy:docs":"aws s3 cp --recursive ./docs/ s3://cdn.openfin.co/workspace/api/platform/docs/","deploy:next":"npm run deploy:next:npm && npm run deploy:next:docs","deploy:next:npm":"cd out && npm publish --tag next","deploy:next:docs":"aws s3 cp --recursive ./docs/ s3://cdn.openfin.co/workspace/api/platform/docs/next/","cp:readme":"copyfiles README.md out","cp:package":"node ../common/scripts/cp-package.js","cp:next:package":"node ../common/scripts/cp-package-next.js","create:rootIndex":"node ../common/scripts/cp-root-index.js","package":"npm run cp:readme && npm run cp:package && npm run create:rootIndex","package:next":"npm run cp:readme && npm run cp:next:package && npm run create:rootIndex","clean":"rimraf ./out && rimraf ./docs","build:common":"cross-env ENV=prod webpack --mode=production --config ./webpack.common.config.js","build":"npm run clean && npm run build:common && npm run build:docs","build:docs":"typedoc --tsconfig ./tsconfig.json --readme none --disableSources ./src/index.ts","test":"jest --watch --colors","test:ci":"jest"},"keywords":["client","api","workspace","platform"],"license":"MIT"}
|