1+ const ProtectionSchema = ( ) => ( {
2+ title : 'Data Protection' ,
3+
4+ fieldsets : [
5+ {
6+ id : 'default' ,
7+ title : 'Default' ,
8+ fields : [
9+ 'privacy_statement' ,
10+ 'privacy_cookie_key' ,
11+ 'enabled' ,
12+ 'background_image' ,
13+ ] ,
14+ } ,
15+ ] ,
16+
17+ properties : {
18+ privacy_statement : {
19+ title : 'Privacy statement' ,
20+ description : 'Defined in template. Change only if necessary' ,
21+ widget : 'slate_richtext' ,
22+ className : 'slate-Widget' ,
23+ } ,
24+ privacy_cookie_key : {
25+ title : 'Privacy cookie key' ,
26+ description : 'Use default for Tableau, otherwise change' ,
27+ defaultValue : 'tableau' ,
28+ } ,
29+ enabled : {
30+ title : 'Data protection disclaimer enabled' ,
31+ description : 'Enable/disable the privacy protection' ,
32+ type : 'boolean' ,
33+ } ,
34+ background_image : {
35+ title : 'Tableau preview image' ,
36+ widget : 'file' ,
37+ } ,
38+ } ,
39+
40+ required : [ ] ,
41+ } ) ;
42+
143const Schema = ( props ) => {
244 return {
345 title : 'Embed EEA Tableau' ,
446 fieldsets : [
547 {
648 id : 'default' ,
749 title : 'Default' ,
8- fields : [ 'vis_url' , 'height' , 'show_sources' ] ,
50+ fields : [ 'vis_url' , 'height' , 'show_sources' , 'dataprotection' ] ,
951 } ,
1052 ] ,
1153 properties : {
@@ -22,6 +64,10 @@ const Schema = (props) => {
2264 title : 'Toggle sources' ,
2365 type : 'boolean' ,
2466 } ,
67+ dataprotection : {
68+ widget : 'object' ,
69+ schema : ProtectionSchema ( ) ,
70+ } ,
2571 } ,
2672
2773 required : [ 'vis_url' ] ,
0 commit comments