33 * AUTH: Brent Ely (https://github.com/gitbrent/) 
44 * DESC: Common test/demo slides for all library features 
55 * DEPS: Used by various demos (./demos/browser, ./demos/node, etc.) 
6-  * VER.: 3.12.0  
7-  * BLD.: 20230207  
6+  * VER.: 4.0.1  
7+  * BLD.: 20250530  
88 */ 
99
1010import  { 
@@ -36,8 +36,13 @@ export function genSlides_Table(pptx) {
3636	pptx . addSection ( {  title : "Tables: Auto-Paging Calc"  } ) ; 
3737	genSlide09 ( pptx ) ; 
3838	if  ( TESTMODE )  { 
39- 		pptx . addSection ( {  title : "Tables: QA"  } ) ; 
39+ 		pptx . addSection ( {  title : "Tables: QA 01"  } ) ; 
40+ 		pptx . addSection ( {  title : "Tables: QA 02"  } ) ; 
41+ 		pptx . addSection ( {  title : "Tables: QA 03"  } ) ; 
42+ 		pptx . addSection ( {  title : "Tables: QA 04"  } ) ; 
4043		genSlide10 ( pptx ) ; 
44+ 		pptx . addSection ( {  title : "Tables: QA 05"  } ) ; 
45+ 		genSlide11 ( pptx ) ; 
4146	} 
4247} 
4348
@@ -80,7 +85,7 @@ function genSlide01(pptx) {
8085		fill : {  color : "F7F7F7"  } , 
8186		fontSize : 14 , 
8287		color : "363636" , 
83- 		border : {  pt : "1" ,  color : "BBCCDD"  } , 
88+ 		border : {  pt : 1 ,  color : "BBCCDD"  } , 
8489	} ) ; 
8590	// Pass default cell style as tabOpts, then just style/override individual cells as needed 
8691
@@ -90,9 +95,9 @@ function genSlide01(pptx) {
9095
9196	let  arrTabRows2  =  [ 
9297		[ 
93- 			{  text : "White " ,  options : {  fill : {  color : "6699CC"  } ,  color : "FFFFFF"  }  } , 
94- 			{  text : "Yellow " ,  options : {  fill : {  color : "99AACC"  } ,  color : "FFFFAA"  }  } , 
95- 			{  text : "Pink " ,  options : {  fill : {  color : "AACCFF"  } ,  color :  "E140FE"  }  } , 
98+ 			{  text : "white " ,  options : {  fill : {  color : "6699CC"  } ,  color : "FFFFFF"  }  } , 
99+ 			{  text : "yellow " ,  options : {  fill : {  color : "99AACC"  } ,  color : "FFFFAA"  }  } , 
100+ 			{  text : "hyperlink " ,  options : {  fill : {  color : "AACCFF"  } ,  hyperlink :  {   slide :  2   }  }  } , 
96101		] , 
97102		[ 
98103			{  text : "12pt" ,  options : {  fill : {  color : "FF0000"  } ,  fontSize : 12  }  } , 
@@ -115,7 +120,7 @@ function genSlide01(pptx) {
115120		fontSize : 16 , 
116121		valign : "center" , 
117122		align : "center" , 
118- 		border : {  pt : "1" ,  color : "FFFFFF"  } , 
123+ 		border : {  pt : 5 ,  color : "FFFFFF"  } , 
119124	} ) ; 
120125
121126	// DEMO: Row/Col Width/Heights 
@@ -136,7 +141,7 @@ function genSlide01(pptx) {
136141		fontSize : 14 , 
137142		valign : "center" , 
138143		align : "center" , 
139- 		border : {  pt : "1" ,  color : "BBCCDD"  } , 
144+ 		border : {  pt : 2 ,  color : "BBCCDD"  } , 
140145	} ) ; 
141146} 
142147
@@ -192,7 +197,7 @@ function genSlide02(pptx) {
192197		align : "center" , 
193198		valign : "middle" , 
194199		fill : {  color : "F9F9F9"  } , 
195- 		border : {  pt : "1" ,  color : "c7c7c7"  } , 
200+ 		border : {  pt : 1 ,  color : "c7c7c7"  } , 
196201	} ; 
197202	let  arrTabRows2  =  [ 
198203		[ 
@@ -216,7 +221,7 @@ function genSlide02(pptx) {
216221		align : "center" , 
217222		valign : "middle" , 
218223		fontSize : 16 , 
219- 		border : {  pt : "2" ,  color : pptx . colors . TEXT2  } , 
224+ 		border : {  pt : 2 ,  color : pptx . colors . TEXT2  } , 
220225		fill : {  color : "F1F1F1"  } , 
221226	} ; 
222227	let  arrTabRows3  =  [ 
@@ -240,7 +245,7 @@ function genSlide02(pptx) {
240245		align : "center" , 
241246		valign : "middle" , 
242247		fontSize : 16 , 
243- 		border : {  pt : "1" ,  color : pptx . colors . TEXT2  } , 
248+ 		border : {  pt : 1 ,  color : pptx . colors . TEXT2  } , 
244249		fill : {  color : "f2f9fc"  } , 
245250	} ; 
246251	let  arrTabRows4  =  [ 
@@ -315,7 +320,7 @@ function genSlide03(pptx) {
315320		[ "C5" ,  "D5" ,  "E5" ,  "F5" ,  {  text : "G5 -> H5" ,  options : {  colspan : 2 ,  fill : {  color : "9999FF"  }  }  } ,  "J5" ,  "K5" ,  "L5" ] , 
316321	] ; 
317322
318- 	let  taboptions5  =  {  x : 0.6 ,  y : 1.3 ,  w : "90%" ,  h : 5.5 ,  margin : 0 ,  fontSize : 14 ,  align : "center" ,  valign : "middle" ,  border : {  pt : "1"  }  } ; 
323+ 	let  taboptions5  =  {  x : 0.6 ,  y : 1.3 ,  w : "90%" ,  h : 5.5 ,  margin : 0 ,  fontSize : 14 ,  align : "center" ,  valign : "middle" ,  border : {  pt : 1  }  } ; 
319324
320325	slide . addTable ( arrTabRows5 ,  taboptions5 ) ; 
321326} 
@@ -450,7 +455,7 @@ function genSlide05(pptx) {
450455	// Table cell: Use the exact same code from addText to do the same word-level formatting within a cell 
451456	slide . addText ( "Table:" ,  {  x : 1 ,  y : 5 ,  w : 3 ,  h : 2 ,  fontSize : 18 ,  fontFace : "Arial" ,  color : "0088CC"  } ) ; 
452457
453- 	let  opts2  =  {  x : 2.5 ,  y : 5 ,  h : 2 ,  align : "center" ,  valign : "middle" ,  colW : [ 1.5 ,  1.5 ,  6.5 ] ,  border : {  pt : "1"  } ,  fill : {  color : "F1F1F1"  }  } ; 
458+ 	let  opts2  =  {  x : 2.5 ,  y : 5 ,  h : 2 ,  align : "center" ,  valign : "middle" ,  colW : [ 1.5 ,  1.5 ,  6.5 ] ,  border : {  pt : 1  } ,  fill : {  color : "F1F1F1"  }  } ; 
454459	let  arrTabRows  =  [ 
455460		[ 
456461			{  text : "Cell 1A" ,  options : {  fontFace : "Arial"  }  } , 
@@ -493,7 +498,7 @@ function genSlide06(pptx) {
493498				{  text : arrCell4 ,  options : {  valign : "bottom"  }  } , 
494499			] , 
495500		] , 
496- 		{  x : 0.6 ,  y : 1.25 ,  w : 12 ,  h : 3 ,  fontSize : 24 ,  border : {  pt : "1"  } ,  fill : {  color : "F1F1F1"  }  } 
501+ 		{  x : 0.6 ,  y : 1.25 ,  w : 12 ,  h : 3 ,  fontSize : 24 ,  border : {  pt : 1  } ,  fill : {  color : "F1F1F1"  }  } 
497502	) ; 
498503
499504	// EX 2: 
@@ -522,7 +527,7 @@ function genSlide06(pptx) {
522527				} , 
523528			] , 
524529		] , 
525- 		{  x : 0.6 ,  y : 4.75 ,  h : 2 ,  fontSize : 24 ,  colW : [ 8 ,  2 ,  2 ] ,  valign : "middle" ,  border : {  pt : "1"  } ,  fill : {  color : "F1F1F1"  }  } 
530+ 		{  x : 0.6 ,  y : 4.75 ,  h : 2 ,  fontSize : 24 ,  colW : [ 8 ,  2 ,  2 ] ,  valign : "middle" ,  border : {  pt : 1  } ,  fill : {  color : "F1F1F1"  }  } 
526531	) ; 
527532} 
528533
@@ -892,7 +897,7 @@ function genSlide10(pptx) {
892897
893898	// SLIDE 1: 
894899	{ 
895- 		slide  =  pptx . addSlide ( {  sectionTitle : "Tables: QA"  } ) ; 
900+ 		slide  =  pptx . addSlide ( {  sectionTitle : "Tables: QA 01 "  } ) ; 
896901
897902		let  projRows  =  [ 
898903			[ 
@@ -937,7 +942,7 @@ function genSlide10(pptx) {
937942
938943	// SLIDE 2: 
939944	{ 
940- 		slide  =  pptx . addSlide ( {  sectionTitle : "Tables: QA"  } ) ; 
945+ 		slide  =  pptx . addSlide ( {  sectionTitle : "Tables: QA 02 "  } ) ; 
941946
942947		let  projRows2  =  [ 
943948			[ 
@@ -982,7 +987,7 @@ function genSlide10(pptx) {
982987
983988	// SLIDE 3: 
984989	{ 
985- 		slide  =  pptx . addSlide ( {  sectionTitle : "Tables: QA"  } ) ; 
990+ 		slide  =  pptx . addSlide ( {  sectionTitle : "Tables: QA 03 "  } ) ; 
986991
987992		let  projRows  =  [ 
988993			[ 
@@ -1029,7 +1034,7 @@ function genSlide10(pptx) {
10291034
10301035	// SLIDE 4: status report style 
10311036	{ 
1032- 		slide  =  pptx . addSlide ( {  sectionTitle : "Tables: QA"  } ) ; 
1037+ 		slide  =  pptx . addSlide ( {  sectionTitle : "Tables: QA 04 "  } ) ; 
10331038
10341039		let  projRows  =  [ 
10351040			[ 
@@ -1066,3 +1071,35 @@ function genSlide10(pptx) {
10661071		} ) ; 
10671072	} 
10681073} 
1074+ 
1075+ /** 
1076+  * SLIDE 11[...]: Test paging with hyperlinks 
1077+  * @param  {PptxGenJS } pptx 
1078+  * @since  4.0.1 
1079+  */ 
1080+ function  genSlide11 ( pptx )  { 
1081+ 	let  slide  =  null ; 
1082+ 
1083+ 	slide  =  pptx . addSlide ( {  sectionTitle : "Tables: QA 05"  } ) ; 
1084+ 	slide . addText ( [ {  text : "Table Examples: Auto-Paging with Hyperlinks" ,  options : DEMO_TITLE_TEXTBK  } ] ,  { 
1085+ 		x : 0.23 , 
1086+ 		y : 0.13 , 
1087+ 		w : 8 , 
1088+ 		h : 0.4 , 
1089+ 	} ) ; 
1090+ 
1091+ 	const  baseTabRows  =  [ 
1092+ 		[ 
1093+ 			{  text : "white color" ,  options : {  fill : {  color : "6699CC"  } ,  align : "left" ,  color : "FFFFFF"  }  } , 
1094+ 			{  text : "yellow color" ,  options : {  fill : {  color : "99AACC"  } ,  color : "FFFFAA"  }  } , 
1095+ 			{  text : "hyperlink here" ,  options : {  fill : {  color : "AACCFF"  } ,  hyperlink : {  slide : 1  }  }  } , 
1096+ 		] 
1097+ 	] ; 
1098+ 
1099+ 	const  arrTabRows  =  [ ] ; 
1100+ 	for  ( let  i  =  0 ;  i  <  36 ;  i ++ )  { 
1101+ 		arrTabRows . push ( ...baseTabRows ) ; 
1102+ 	} ; 
1103+ 
1104+ 	slide . addTable ( arrTabRows ,  {  x : 0.5 ,  y : 1.0 ,  w :10 ,  autoPage : true  } ) ; 
1105+ } 
0 commit comments