You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* This method activates the resize button that gives you the provision to resize the window size of your Dashboard Widget.
19
20
* @return {external:Promise} A promise object which will resolve when a resize button is visible on the Dashboard Widget.
20
21
*/
21
-
enableResizing(): any;
22
+
enableResizing(): Promise<any>;
22
23
/**
23
24
* This function executes the callback function whenever a Dashboard Widget extension is maximized or minimized. Only applicable on Dashboard Widget extensions.
24
25
* @param {function} callback Function to be called when a Dashboard Widget extension is maximized or minimized
@@ -31,7 +32,7 @@ declare class Window {
31
32
* @param {string|number} height Desired height of the iframe window
32
33
* @return {external:Promise} A promise object which will be resolved when Contentstack UI sends an acknowledgement stating that the height has been updated.
33
34
*/
34
-
updateHeight(height?: number): any;
35
+
updateHeight(height?: number): Promise<any>;
35
36
/**
36
37
* This method enables auto resizing of the extension height.
* This method activates the resize button that gives you the provision to resize the window size of your Dashboard Widget.
39
+
* @return {external:Promise} A promise object which will resolve when a resize button is visible on the Dashboard Widget.
40
+
*/
41
+
enableResizing(): Promise<any>{
42
+
if(this.type!=="DASHBOARD"){
43
+
returnPromise.resolve();
44
+
}
45
+
this._resizingEnabled=true;
46
+
returnthis._connection.sendToParent("window",{
47
+
action: "enableResizing",
48
+
});
49
+
}
42
50
43
-
/**
44
-
* This function executes the callback function whenever a Dashboard Widget extension is maximized or minimized. Only applicable on Dashboard Widget extensions.
45
-
* @param {function} callback Function to be called when a Dashboard Widget extension is maximized or minimized
46
-
* @return {boolean} Will return true
47
-
*/
51
+
/**
52
+
* This function executes the callback function whenever a Dashboard Widget extension is maximized or minimized. Only applicable on Dashboard Widget extensions.
53
+
* @param {function} callback Function to be called when a Dashboard Widget extension is maximized or minimized
* This method updates the extension height on Contentstack UI.
68
-
* If the ‘height’ argument is not passed, it will calculate the scroll height and set the height of extension window accordingly.
69
-
* @param {string|number} height Desired height of the iframe window
70
-
* @return {external:Promise} A promise object which will be resolved when Contentstack UI sends an acknowledgement stating that the height has been updated.
* This method updates the extension height on Contentstack UI.
78
+
* If the ‘height’ argument is not passed, it will calculate the scroll height and set the height of extension window accordingly.
79
+
* @param {string|number} height Desired height of the iframe window
80
+
* @return {external:Promise} A promise object which will be resolved when Contentstack UI sends an acknowledgement stating that the height has been updated.
0 commit comments