@@ -1129,12 +1129,35 @@ class DataHarmonizer {
1129
1129
row_html += `<td>${ slot_dict . examples } </td>` ;
1130
1130
}
1131
1131
if ( this . columnHelpEntries . includes ( 'menus' ) ) {
1132
- row_html += ` <td>${ slot_dict . sources || '' } </td>` ;
1132
+ row_html += ` <td>${ slot_dict . menus || '' } </td>` ;
1133
1133
}
1134
1134
row_html += '</tr>' ;
1135
1135
}
1136
1136
}
1137
1137
1138
+ // Note this may include more enumerations than exist in a given template.
1139
+ let enum_html = `` ;
1140
+ for ( const key of Object . keys ( this . schema . enums ) . sort ( ) ) {
1141
+ const enumeration = this . schema . enums [ key ] ;
1142
+ let title = enumeration . title != enumeration . name ? enumeration . title : '' ;
1143
+ enum_html += `<tr class="section">
1144
+ <td colspan="2" id="${ enumeration . name } ">${ enumeration . name } </td>
1145
+ <td colspan="2">(${ title } )<br/>${ this . renderSemanticID ( enumeration . enum_uri ) } </td>
1146
+ </tr>` ;
1147
+
1148
+ for ( const item_key in enumeration . permissible_values ) {
1149
+ const item = enumeration . permissible_values [ item_key ] ;
1150
+ let text = item . text != item_key ? item . text : '' ;
1151
+ enum_html += `<tr>
1152
+ <td>${ this . renderSemanticID ( item . meaning ) } </td>
1153
+ <td>${ item_key } </td>
1154
+ <td>${ text } </td>
1155
+ <td></td>
1156
+ </tr>` ;
1157
+ }
1158
+ }
1159
+
1160
+
1138
1161
var win = window . open (
1139
1162
'' ,
1140
1163
'Reference' ,
@@ -1195,7 +1218,19 @@ class DataHarmonizer {
1195
1218
</tbody>
1196
1219
</table>
1197
1220
</div>
1198
- </body>
1221
+
1222
+ <div>
1223
+ <table>
1224
+ <thead>
1225
+ <tr class="section">
1226
+ <td colspan="4"><h3>${ i18next . t ( 'help-picklists' ) } </h3>
1227
+ </td>
1228
+ </tr>
1229
+ </thead>
1230
+ <tbody>${ enum_html } </tbody>
1231
+ </table>
1232
+ </div>
1233
+ </body>
1199
1234
</html>
1200
1235
` ;
1201
1236
return false ;
@@ -1948,6 +1983,7 @@ class DataHarmonizer {
1948
1983
guidance : '' ,
1949
1984
examples : '' ,
1950
1985
sources : '' ,
1986
+ menus : ''
1951
1987
} ;
1952
1988
1953
1989
let guidance = [ ] ;
@@ -1992,7 +2028,13 @@ class DataHarmonizer {
1992
2028
guidance . push ( i18next . t ( 'reference_guide_msg_unique_record' ) ) ;
1993
2029
}
1994
2030
if ( field . sources && field . sources . length ) {
1995
- let sources = [ ] ;
2031
+ let menus = [ ] ;
2032
+ for ( const item of field . sources ) {
2033
+ menus . push ( '<a href="#' + item + '" target="_self">' + item + '</a>' ) ;
2034
+ }
2035
+ guide . menus = '<ul><li>' + menus . join ( '</li><li>' ) + '</li></ul>' ;
2036
+ /*
2037
+ // List null value menu items directly
1996
2038
for (const [, item] of Object.entries(field.sources)) {
1997
2039
// List null value menu items directly
1998
2040
if (item === 'NullValueMenu') {
@@ -2004,7 +2046,8 @@ class DataHarmonizer {
2004
2046
sources.push(item);
2005
2047
}
2006
2048
}
2007
- guide . sources = '<ul><li>' + sources . join ( '</li>\n<li>' ) + '</li></ul>' ;
2049
+ */
2050
+ guide . sources = '<ul><li>' + field . sources . join ( '</li><li>' ) + '</li></ul>' ;
2008
2051
}
2009
2052
if ( field . multivalued ) {
2010
2053
guidance . push ( i18next . t ( 'reference_guide_msg_more_than_one_selection' ) ) ;
@@ -2035,9 +2078,9 @@ class DataHarmonizer {
2035
2078
2036
2079
if ( first_item === true ) {
2037
2080
first_item = false ;
2038
- examples += '<ul><li>' + i18next . t ( item . value ) + '</li>\n ' ;
2081
+ examples += '<ul><li>' + i18next . t ( item . value ) + '</li>' ;
2039
2082
} else {
2040
- examples += '<li>' + i18next . t ( item . value ) + '</li>\n ' ;
2083
+ examples += '<li>' + i18next . t ( item . value ) + '</li>' ;
2041
2084
}
2042
2085
}
2043
2086
guide . examples = examples + '</ul>' ;
0 commit comments