';
- const selectedClass = group.class.hash === currentHash ? ' selected' : '';
- const highlightedName = highlightMatch( group.class.name, highlightRegExp );
- html += `
`;
+ bySubCategory[ subCat ] = {};
+
+ }
+
+ bySubCategory[ subCat ][ className ] = group;
}
- if ( group.members.length > 0 ) {
+ // Sort sub-categories and render them
+ const sortedSubCategories = Object.keys( bySubCategory ).sort();
+
+ for ( const subCat of sortedSubCategories ) {
+
+ const highlightedSubCat = highlightMatch( subCat, highlightRegExp );
+ html += `
`;
+
+ for ( const className in bySubCategory[ subCat ] ) {
+
+ const group = bySubCategory[ subCat ][ className ];
+
+ if ( group.class ) {
+
+ html += '
';
+ const selectedClass = group.class.hash === currentHash ? ' selected' : '';
+ const highlightedName = highlightMatch( group.class.name, highlightRegExp );
+ html += `
${highlightedName}`;
+
+ }
+
+ if ( group.members.length > 0 ) {
+
+ if ( ! group.class ) {
+
+ html += '
';
+ html += `
${className}`;
+
+ }
+
+ group.members.forEach( member => {
+
+ const selectedClass = member.hash === currentHash ? ' selected' : '';
+ const highlightedName = highlightMatch( member.name, highlightRegExp );
+ const suffix = member.kind === 'function' ? '()' : '';
+ html += `
.${highlightedName}${suffix}`;
+
+ } );
- if ( ! group.class ) {
+ }
+
+ if ( group.class || group.members.length > 0 ) {
+
+ html += '
';
+
+ }
+
+ }
+
+ }
+
+ } else {
+
+ // Regular category rendering (Core, Addons, Global)
+
+ for ( const className in byCategory[ category ] ) {
+
+ const group = byCategory[ category ][ className ];
+
+ if ( group.class ) {
html += '
';
- html += `
${className}`;
+ const selectedClass = group.class.hash === currentHash ? ' selected' : '';
+ const highlightedName = highlightMatch( group.class.name, highlightRegExp );
+ html += `
${highlightedName}`;
}
- group.members.forEach( member => {
+ if ( group.members.length > 0 ) {
- const selectedClass = member.hash === currentHash ? ' selected' : '';
- const highlightedName = highlightMatch( member.name, highlightRegExp );
- const suffix = member.kind === 'function' ? '()' : '';
- html += `
.${highlightedName}${suffix}`;
+ if ( ! group.class ) {
- } );
+ html += '
';
+ html += `
${className}`;
- }
+ }
+
+ group.members.forEach( member => {
+
+ const selectedClass = member.hash === currentHash ? ' selected' : '';
+ const highlightedName = highlightMatch( member.name, highlightRegExp );
+ const suffix = member.kind === 'function' ? '()' : '';
+ html += `
.${highlightedName}${suffix}`;
- if ( group.class || group.members.length > 0 ) {
+ } );
- html += '
';
+ }
+
+ if ( group.class || group.members.length > 0 ) {
+
+ html += '
';
+
+ }
}
diff --git a/utils/docs/template/tmpl/container.tmpl b/utils/docs/template/tmpl/container.tmpl
index 1b921c164cfc7a..d43772559568dd 100644
--- a/utils/docs/template/tmpl/container.tmpl
+++ b/utils/docs/template/tmpl/container.tmpl
@@ -92,14 +92,7 @@
return isTSLPage ? hasTslTag : !hasTslTag;
});
}
- if (members && members.length && members.forEach) {
- ?>
-
Properties
-
-
-
-
-
+
TSL Functions
+
+
+
+
+
+
+
+
+
+
Properties
+
+
+
Methods
-
+
-
-
-
+
Static Methods
-
+
-
-
+
-
.
+
diff --git a/utils/docs/template/tmpl/method.tmpl b/utils/docs/template/tmpl/method.tmpl
index 24308fe8f15e6f..f70a7048068d81 100644
--- a/utils/docs/template/tmpl/method.tmpl
+++ b/utils/docs/template/tmpl/method.tmpl
@@ -1,12 +1,13 @@
Constructor
-
+