@openfin/workspace-platform 4.22.0 → 4.26.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.
@@ -581,15 +581,50 @@ export interface WorkspacePlatformInitConfig {
581
581
  theme?: CustomThemes;
582
582
  }
583
583
  /**
584
- * Callback for overriding a Workspace Platform Provider.
584
+ * Extend or replace default functionality in order to customize behavior of a Workspace Platform Provider.
585
+ *
586
+ * To implement your own handlers for Workspace Platform behavior, extend the provided class and override any methods you'd like to alter.
587
+ *
588
+ * ```ts
589
+ * import * as WorkspacePlatform from '@openfin/workspace-platform';
590
+ * import { UpdateSavedPageRequest } from '../../client-api-platform/src/shapes';
591
+ *
592
+ * const overrideCallback: WorkspacePlatform.BrowserOverrideCallback = async (
593
+ * WorkspacePlatformProvider
594
+ * ) => {
595
+ * class Override extends WorkspacePlatformProvider {
596
+ * updateSavedPage = async (req: UpdateSavedPageRequest): Promise<void> => {
597
+ * console.log(`saving page ${req.page.pageId}`);
598
+ * // calling custom function to the save page here
599
+ * };
600
+ * }
601
+ * return new Override();
602
+ * };
603
+ *
604
+ * await WorkspacePlatform.init({
605
+ * browser: { overrideCallback },
606
+ * });
585
607
  */
586
608
  export declare type BrowserOverrideCallback = OpenFin.OverrideCallback<WorkspacePlatformProvider>;
587
609
  /**
588
610
  * Configuration for initializing a Browser.
589
611
  */
590
612
  export interface BrowserInitConfig {
613
+ /**
614
+ * Default options for creating a new browser window. Any option not included in WorkspacePlatform.getCurrentSync().Browser.createWindow(options) call will default to the value provided in this field.
615
+ */
591
616
  defaultWindowOptions?: BrowserCreateWindowRequest;
617
+ /**
618
+ * The default options when creating a new browser window. Any option not included in WorkspacePlatform.getCurrentSync().Browser.createView(options) call will default to the value provided in this field.
619
+ */
592
620
  defaultViewOptions?: OpenFin.ViewOptions;
621
+ /**
622
+ * Override workspace platform behavior
623
+ */
593
624
  overrideCallback?: BrowserOverrideCallback;
625
+ /**
626
+ * Override workspace platform interop behavior
627
+ * https://cdn.openfin.co/docs/javascript/stable/InteropBroker.html
628
+ */
594
629
  interopOverride?: OpenFin.OverrideCallback<InteropBroker, InteropBroker>;
595
630
  }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@openfin/workspace-platform","description":"An API for creating your own Workspace platform.","contributors":[],"version":"4.22.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"}
1
+ {"name":"@openfin/workspace-platform","description":"An API for creating your own Workspace platform.","contributors":[],"version":"4.26.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"}