From 39165196404f72f1434fbcb3de59835d22ce1677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ars=C3=A8ne=20von=20Wyss?= Date: Tue, 12 Sep 2017 00:55:04 +0200 Subject: [PATCH 1/2] mfiles: Added missing CLSID constants --- types/mfiles/index.d.ts | 10 ++++++++-- types/mfiles/mfiles-tests.ts | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/types/mfiles/index.d.ts b/types/mfiles/index.d.ts index d500086598..db31565309 100644 --- a/types/mfiles/index.d.ts +++ b/types/mfiles/index.d.ts @@ -309,6 +309,11 @@ interface IClassGroups { Item(Index: number): IClassGroup; } +interface ICLSIDs { + readonly PreviewerCtrl: string; + readonly ShellListingCtrl: string; +} + interface ICollection { readonly Count: number; readonly Events: IEvents; @@ -393,9 +398,9 @@ interface IDailyTrigger { DaysInterval: number; } -interface IDashboard { +interface IDashboard { AutoStopWithParent: boolean; - readonly CustomData: any; + readonly CustomData: T; readonly Events: IDashboardEvents; readonly IsPopupDashboard: boolean; readonly Parent: (IShellPaneContainer | IShellFrame | IVaultUI | IShellUI); @@ -6169,6 +6174,7 @@ declare namespace MFiles { const XMLSearchResult: { new(): IXMLSearchResult; }; const ApplicationPath: string; + const CLSID: ICLSIDs; function CreateInstance(name: string): any; function CreateObjectCLR(assemblyFile: string, className: string): any; diff --git a/types/mfiles/mfiles-tests.ts b/types/mfiles/mfiles-tests.ts index ff9d09a482..4271042137 100644 --- a/types/mfiles/mfiles-tests.ts +++ b/types/mfiles/mfiles-tests.ts @@ -72,6 +72,7 @@ function setTheme(shellFrame: IShellFrame) { function OnNewShellUI(shellUI: IShellUI) { shellUI.Events.Register(MFiles.Event.NewShellFrame, newShellFrameHandler); shellUI.Events.Register(MFiles.Event.NewNormalShellFrame, newShellFrameHandler); + const html = ` `; } function newShellFrameHandler(shellFrame: IShellFrame) { From c5479ceab49a14f592b16883f912bccc371e2e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ars=C3=A8ne=20von=20Wyss?= Date: Tue, 12 Sep 2017 17:13:34 +0200 Subject: [PATCH 2/2] mfiles: Added support for application platform property --- types/mfiles/index.d.ts | 3 +++ types/mfiles/mfiles-tests.ts | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/types/mfiles/index.d.ts b/types/mfiles/index.d.ts index db31565309..c82377d1fe 100644 --- a/types/mfiles/index.d.ts +++ b/types/mfiles/index.d.ts @@ -3,6 +3,8 @@ // Definitions by: Arsène von Wyss // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +declare const MFExtApplicationPlatformWeb: any; + interface IAccessControlEntry { ChangePermissionsPermission: MFiles.MFPermission; EditPermission: MFiles.MFPermission; @@ -6175,6 +6177,7 @@ declare namespace MFiles { const ApplicationPath: string; const CLSID: ICLSIDs; + const CurrentApplicationPlatform: any; function CreateInstance(name: string): any; function CreateObjectCLR(assemblyFile: string, className: string): any; diff --git a/types/mfiles/mfiles-tests.ts b/types/mfiles/mfiles-tests.ts index 4271042137..8c0dcd45aa 100644 --- a/types/mfiles/mfiles-tests.ts +++ b/types/mfiles/mfiles-tests.ts @@ -72,7 +72,10 @@ function setTheme(shellFrame: IShellFrame) { function OnNewShellUI(shellUI: IShellUI) { shellUI.Events.Register(MFiles.Event.NewShellFrame, newShellFrameHandler); shellUI.Events.Register(MFiles.Event.NewNormalShellFrame, newShellFrameHandler); - const html = ` `; + if (MFiles.CurrentApplicationPlatform !== MFExtApplicationPlatformWeb) { + // We are not executing on the web, AxtiveX is available + const html = ` `; + } } function newShellFrameHandler(shellFrame: IShellFrame) {