Skip to content

Commit c7bcf47

Browse files
author
Shahak Yosef
committed
Merged PR 74083: Update playground samples with the new panes
This is will be checked-in when we release a new version. Tell me if I missed any sample
1 parent 2ef3b1e commit c7bcf47

File tree

1 file changed

+69
-17
lines changed

1 file changed

+69
-17
lines changed

demo/v2-demo/scripts/codesamples.js

Lines changed: 69 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,14 @@ function _Embed_BasicEmbed() {
3737
id: txtEmbedReportId,
3838
permissions: permissions,
3939
settings: {
40-
filterPaneEnabled: true,
41-
navContentPaneEnabled: true
40+
panes: {
41+
filters: {
42+
visible: true
43+
},
44+
pageNavigation: {
45+
visible: true
46+
}
47+
}
4248
}
4349
};
4450

@@ -111,8 +117,12 @@ function _Embed_BasicEmbed_Mobile() {
111117
permissions: permissions,
112118
pageName: "ReportSectioneb8c865100f8508cc533",
113119
settings: {
114-
filterPaneEnabled: false,
115-
layoutType: models.LayoutType.MobilePortrait
120+
panes: {
121+
filters: {
122+
visible: false
123+
}
124+
},
125+
layoutType: models.LayoutType.MobilePortrait
116126
}
117127
};
118128

@@ -401,8 +411,14 @@ function _Mock_Embed_BasicEmbed(isEdit) {
401411
permissions: permissions,
402412
viewMode: viewMode,
403413
settings: {
404-
filterPaneEnabled: true,
405-
navContentPaneEnabled: true,
414+
panes: {
415+
filters: {
416+
visible: true
417+
},
418+
pageNavigation: {
419+
visible: true
420+
}
421+
},
406422
useCustomSaveAsDialog: true
407423
}
408424
};
@@ -485,8 +501,14 @@ function _Embed_BasicEmbed_EditMode() {
485501
permissions: models.Permissions.All /*gives maximum permissions*/,
486502
viewMode: models.ViewMode.Edit,
487503
settings: {
488-
filterPaneEnabled: true,
489-
navContentPaneEnabled: true
504+
panes: {
505+
filters: {
506+
visible: true
507+
},
508+
pageNavigation: {
509+
visible: true
510+
}
511+
}
490512
}
491513
};
492514

@@ -559,8 +581,14 @@ function _Embed_EmbedWithDefaultFilter() {
559581
embedUrl: txtEmbedUrl,
560582
id: txtEmbedReportId,
561583
settings: {
562-
filterPaneEnabled: false,
563-
navContentPaneEnabled: false
584+
panes: {
585+
filters: {
586+
visible: false
587+
},
588+
pageNavigation: {
589+
visible: false
590+
}
591+
}
564592
},
565593
filters: [filter]
566594
};
@@ -841,8 +869,14 @@ function _Report_GetId() {
841869
function _Report_UpdateSettings() {
842870
// The new settings that you want to apply to the report.
843871
const newSettings = {
844-
navContentPaneEnabled: true,
845-
filterPaneEnabled: false
872+
panes: {
873+
filters: {
874+
visible: false
875+
},
876+
pageNavigation: {
877+
visible: true
878+
}
879+
}
846880
};
847881

848882
// Get a reference to the embedded report HTML element
@@ -1281,15 +1315,21 @@ function _Report_ApplyCustomLayout() {
12811315
};
12821316

12831317
let settings = {
1284-
filterPaneEnabled: false,
1285-
navContentPaneEnabled: false,
12861318
layoutType: models.LayoutType.Custom,
12871319
customLayout: {
12881320
pageSize: pageSize,
12891321
displayOption: models.DisplayOption.FitToPage,
12901322
pagesLayout: {
12911323
"ReportSection600dd9293d71ade01765": pageLayout
12921324
}
1325+
},
1326+
panes: {
1327+
filters: {
1328+
visible: false
1329+
},
1330+
pageNavigation: {
1331+
visible: false
1332+
}
12931333
}
12941334
}
12951335

@@ -2175,7 +2215,11 @@ function _Visual_DataSelected() {
21752215
function _Bookmarks_Enable() {
21762216
// The new settings that you want to apply to the report.
21772217
const newSettings = {
2178-
bookmarksPaneEnabled: true
2218+
panes: {
2219+
bookmarks: {
2220+
visible: true
2221+
}
2222+
}
21792223
};
21802224

21812225
// Get a reference to the embedded report HTML element
@@ -2194,7 +2238,11 @@ function _Bookmarks_Enable() {
21942238
function _Bookmarks_Disable() {
21952239
// The new settings that you want to apply to the report.
21962240
const newSettings = {
2197-
bookmarksPaneEnabled: false
2241+
panes: {
2242+
bookmarks: {
2243+
visible: false
2244+
}
2245+
}
21982246
};
21992247

22002248
// Get a reference to the embedded report HTML element
@@ -2659,7 +2707,11 @@ function _Visual_ExportData_Underlying() {
26592707
function _ReportVisual_UpdateSettings() {
26602708
// The new settings that you want to apply to the report.
26612709
const newSettings = {
2662-
filterPaneEnabled: true
2710+
panes: {
2711+
filters: {
2712+
visible: true
2713+
}
2714+
}
26632715
};
26642716

26652717
// Get a reference to the embedded report HTML element

0 commit comments

Comments
 (0)