Skip to content

Commit 9aa1093

Browse files
side pane
1 parent 8f7cd1e commit 9aa1093

1 file changed

Lines changed: 52 additions & 50 deletions

File tree

src/XrmDefinitelyTyped/Resources/Extensions/xrm_ext_9.1-.d.ts

Lines changed: 52 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -73,46 +73,8 @@ declare namespace Xrm {
7373
Warning = 3,
7474
Information = 4,
7575
}
76-
//TODO figure out how to implement the app side pane https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-app-appsidepane
77-
// should the methods take an input like paneID?
78-
interface AppSidePane {
79-
/**
80-
* Closes the side pane and removes it from the side bar.
81-
*/
82-
close(): any;
83-
84-
/**
85-
* Specify whether the pane should be selected or expanded.
86-
*/
87-
select(): any;
88-
89-
/**
90-
* Opens a page within the selected pane. This is similar to the navigateTo method.
91-
*/
92-
navigate(): any;
93-
}
94-
interface SidePanes {
95-
/**
96-
* Provides all the information to create side panes.
97-
*/
98-
createPane(paneOptions?: SidePaneOptions): any;
99-
100-
/**
101-
* returns the appSidePane object
102-
*/
103-
getAllPanes(): Object;
104-
105-
/**
106-
* returns the appSidePane object
107-
*/
108-
getPane(paneId: string): Object;
109-
/**
110-
* returns the appSidePane object
111-
*/
112-
getSelectedPane(): Object;
113-
}
114-
interface SidePaneOptions {
11576

77+
interface SidePaneProperties {
11678
/**
11779
* The title of the pane. Used in pane header and for tooltip.
11880
*/
@@ -133,17 +95,6 @@ declare namespace Xrm {
13395
*/
13496
imageSrc?: string;
13597

136-
/**
137-
* Hides the header pane, including the title and close button. Default value is false.
138-
*/
139-
hideHeader?: boolean;
140-
141-
/**
142-
* When set to false, the created pane is not selected and leaves the existing pane selected.
143-
* It also does not expand the pane if collapsed.
144-
*/
145-
isSelected?: boolean;
146-
14798
/**
14899
* The width of the pane in pixels.
149100
*/
@@ -165,6 +116,57 @@ declare namespace Xrm {
165116
keepBadgeOnSelect?: boolean;
166117
}
167118

119+
interface AppSidePane extends SidePaneProperties {
120+
/**
121+
* Closes the side pane and removes it from the side bar.
122+
*/
123+
close(): Promise<undefined>;
124+
125+
/**
126+
* Specify whether the pane should be selected or expanded.
127+
*/
128+
select(): void;
129+
130+
/**
131+
* Opens a page within the selected pane. This is similar to the navigateTo method.
132+
*/
133+
navigate(pageInput: EntityRecord | EntityList | WebResource | Dashboard): Promise<undefined>;
134+
}
135+
136+
interface SidePanes {
137+
/**
138+
* Provides all the information to create side panes.
139+
*/
140+
createPane(paneOptions?: SidePaneOptions): Promise<AppSidePane>;
141+
142+
/**
143+
* returns the appSidePane object
144+
*/
145+
getAllPanes(): Collection<AppSidePane>;
146+
147+
/**
148+
* returns the appSidePane object
149+
*/
150+
getPane(paneId: string): AppSidePane;
151+
/**
152+
* returns the appSidePane object
153+
*/
154+
getSelectedPane(): AppSidePane;
155+
}
156+
157+
interface SidePaneOptions extends SidePaneProperties {
158+
/**
159+
* Hides the header pane, including the title and close button. Default value is false.
160+
*/
161+
hideHeader?: boolean;
162+
163+
/**
164+
* When set to false, the created pane is not selected and leaves the existing pane selected.
165+
* It also does not expand the pane if collapsed.
166+
*/
167+
isSelected?: boolean;
168+
}
169+
168170
/**
169171
* Provides a method to display a web page in the side pane of model-driven apps form.
170172
*/

0 commit comments

Comments
 (0)