@@ -301,6 +301,92 @@ const collections = {
301301 uiSchema : { } ,
302302 } ,
303303 } ,
304+ TableArrayFieldTemplate : {
305+ title : "Table" ,
306+ icon : < UnorderedListOutlined /> ,
307+ description : "List of fields supporting addition, deletion and reordering" ,
308+ className : "tour-list-field" ,
309+ child : { } ,
310+ optionsSchema : {
311+ type : "object" ,
312+ title : "Array Schema" ,
313+ properties : {
314+ ...common . optionsSchema ,
315+ } ,
316+ } ,
317+ optionsSchemaUiSchema : {
318+ ...common . optionsSchemaUiSchema ,
319+ } ,
320+ optionsUiSchema : {
321+ type : "object" ,
322+ title : "UI Schema" ,
323+ properties : {
324+ "ui:options" : {
325+ type : "object" ,
326+ title : "UI Options" ,
327+ properties : {
328+ ...common . optionsUiSchema . properties [ "ui:options" ] . properties ,
329+ itemsDisplayTitle : {
330+ type : "string" ,
331+ title : "Items Display Title" ,
332+ description :
333+ "You can set a fixed value or you can reference child fields by id between `{{` and `}}`" ,
334+ tooltip :
335+ "You can easily copy the field id by right-clicking the desired field in the tree" ,
336+ } ,
337+ } ,
338+ } ,
339+ "ui:label" : common . optionsUiSchema . properties [ "ui:label" ] ,
340+ } ,
341+ } ,
342+ optionsUiSchemaUiSchema : {
343+ ...common . optionsUiSchemaUiSchema ,
344+ "ui:options" : {
345+ ...common . optionsUiSchemaUiSchema [ "ui:options" ] ,
346+ itemsDisplayTitle : {
347+ "ui:options" : {
348+ descriptionIsMarkdown : true ,
349+ showAsModal : true ,
350+ modal : {
351+ buttonInNewLine : true ,
352+ } ,
353+ codeEditor : {
354+ minimal : true ,
355+ language : "jinja" ,
356+ extraExtensions : [
357+ placeholder ( "Path: {{item_123}} - Type: {{item_456}}" ) ,
358+ ] ,
359+ height : "200px" ,
360+ } ,
361+ } ,
362+ "ui:field" : "codeEditor" ,
363+ } ,
364+ } ,
365+ } ,
366+
367+ default : {
368+ schema : {
369+ type : "array" ,
370+ items : {
371+ type : "object" ,
372+ properties : {
373+ col1 : {
374+ type : "string" ,
375+ title : "Column 1" ,
376+ } ,
377+ col2 : {
378+ type : "number" ,
379+ title : "Number Col" ,
380+ } ,
381+ } ,
382+ } ,
383+ } ,
384+ uiSchema : {
385+ "ui:widget" : "table" ,
386+ } ,
387+ } ,
388+ } ,
389+
304390 accordion : {
305391 title : "Accordion" ,
306392 icon : < BorderTopOutlined /> ,
0 commit comments