@openfin/workspace-platform 4.10.0 → 4.11.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.
|
@@ -124,14 +124,65 @@ export interface BrowserWindowFactory {
|
|
|
124
124
|
wrapSync: (identity: OpenFin.Identity) => BrowserWindowModule;
|
|
125
125
|
/**
|
|
126
126
|
* Get a list of all pages that are attached to any running browser window.
|
|
127
|
+
*
|
|
128
|
+
* ```ts
|
|
129
|
+
* import * as WorkspacePlatform from '@client-platform/index';
|
|
130
|
+
*
|
|
131
|
+
* const workspacePlatform = WorkspacePlatform.getCurrentSync();
|
|
132
|
+
* const attachedPages = await workspacePlatform.Browser.getAllAttachedPages();
|
|
133
|
+
* ```
|
|
127
134
|
*/
|
|
128
135
|
getAllAttachedPages(): Promise<AttachedPage[]>;
|
|
129
136
|
/**
|
|
130
137
|
* Get all the Browser Windows that are running in the Workspace Platform.
|
|
138
|
+
*
|
|
139
|
+
* ```ts
|
|
140
|
+
* import * as WorkspacePlatform from '@client-platform/index';
|
|
141
|
+
*
|
|
142
|
+
* const workspacePlatform = WorkspacePlatform.getCurrentSync();
|
|
143
|
+
* const windows = await workspacePlatform.Browser.getAllWindows();
|
|
144
|
+
* ```
|
|
131
145
|
*/
|
|
132
146
|
getAllWindows(): Promise<BrowserWindowModule[]>;
|
|
133
147
|
/**
|
|
134
148
|
* Create a new browser window.
|
|
149
|
+
*
|
|
150
|
+
* ```ts
|
|
151
|
+
* import * as WorkspacePlatform from '@client-platform/index';
|
|
152
|
+
*
|
|
153
|
+
* const workspacePlatform = WorkspacePlatform.getCurrentSync();
|
|
154
|
+
* const layout = {
|
|
155
|
+
* content: [
|
|
156
|
+
* {
|
|
157
|
+
* type: 'stack',
|
|
158
|
+
* content: [
|
|
159
|
+
* {
|
|
160
|
+
* type: 'component',
|
|
161
|
+
* componentName: 'view',
|
|
162
|
+
* componentState: {
|
|
163
|
+
* name: 'myViewName',
|
|
164
|
+
* url: 'http://google.com'
|
|
165
|
+
* }
|
|
166
|
+
* }
|
|
167
|
+
* ]
|
|
168
|
+
* }
|
|
169
|
+
* ]
|
|
170
|
+
* };
|
|
171
|
+
* const page = {
|
|
172
|
+
* title: 'myPageTitle',
|
|
173
|
+
* pageId: 'myPageId',
|
|
174
|
+
* layout
|
|
175
|
+
* };
|
|
176
|
+
* const options: BrowserCreateWindowRequest = {
|
|
177
|
+
* workspacePlatform {
|
|
178
|
+
* pages: [page],
|
|
179
|
+
* title: 'My Window Title',
|
|
180
|
+
* favicon: 'https://google.com/favicon.ico'
|
|
181
|
+
* }
|
|
182
|
+
* };
|
|
183
|
+
* const window = await workspacePlatform.Browser.createWindow(options);
|
|
184
|
+
* ```
|
|
185
|
+
*
|
|
135
186
|
* @param options the browser window creation options
|
|
136
187
|
*/
|
|
137
188
|
createWindow(options: BrowserCreateWindowRequest): Promise<BrowserWindowModule>;
|
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.11.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"}
|