Skip to content

Commit

Permalink
feat: add VDataIterator to labs (#16839)
Browse files Browse the repository at this point in the history
closes #13478

Co-authored-by: John Leider <john@vuetifyjs.com>
Co-authored-by: Kael <kaelwd@gmail.com>
  • Loading branch information
3 people committed May 19, 2023
1 parent 9b88014 commit 31a8f4d
Show file tree
Hide file tree
Showing 55 changed files with 1,031 additions and 4,180 deletions.
22 changes: 16 additions & 6 deletions packages/api-generator/src/types.ts
Expand Up @@ -247,12 +247,22 @@ const allowedRefs = [
'ValidationRule',
'FormValidationResult',
'SortItem',
'InternalItem',
'InternalDataTableItem',
'ListItem',
'Group',
'DataTableItem',
'DataTableHeader',
'InternalDataTableHeader',
'FilterFunction',
'DataIteratorItem',
]
const plainRefs = [
'Component',
'ComponentPublicInstance',
'ComponentInternalInstance',
'FunctionalComponent',
'DataTableItem',
'Group',
'DataIteratorItem',
]

function formatDefinition (definition: Definition) {
Expand Down Expand Up @@ -290,7 +300,7 @@ function formatDefinition (definition: Definition) {
}, []).join('; ')} }`
break
case 'ref':
if (['Component', 'ComponentPublicInstance', 'ComponentInternalInstance', 'FunctionalComponent'].includes(definition.ref)) {
if (plainRefs.includes(definition.ref)) {
formatted = definition.ref
} else {
formatted = definition.text
Expand All @@ -308,8 +318,8 @@ function formatDefinition (definition: Definition) {

definition.formatted = formatted

if (allowedRefs.includes(definition.text)) {
definition.formatted = `<a href="https://github.com/vuetifyjs/vuetify/blob/master/packages/${definition.source}" target="_blank">${definition.text}</a>`
if (allowedRefs.includes(formatted)) {
definition.formatted = `<a href="https://github.com/vuetifyjs/vuetify/blob/master/packages/${definition.source}" target="_blank">${formatted}</a>`
}
}

Expand All @@ -336,7 +346,7 @@ function generateDefinition (node: Node<ts.Node>, recursed: string[], project: P

if (
count(recursed, type.getText()) > 1 ||
allowedRefs.includes(type.getAliasSymbol()?.getName()) ||
allowedRefs.includes(symbol?.getName()) ||
isExternalDeclaration(declaration, definition.text)
) {
definition = definition as RefDefinition
Expand Down
1 change: 0 additions & 1 deletion packages/docs/src/data/301.json
Expand Up @@ -118,7 +118,6 @@
"components/application": "/features/application-layout",
"components/simple-tables": "/components/tables",
"components/data-tables": "/labs/introduction",
"components/data-iterators": "/introduction/roadmap",
"components/date-pickers": "/introduction/roadmap",
"components/date-pickers-month": "/introduction/roadmap",
"components/time-pickers": "/introduction/roadmap",
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/src/data/nav.json
Expand Up @@ -191,6 +191,10 @@
"title": "bottom-sheets",
"subfolder": "components"
},
{
"title": "data-iterators",
"subfolder": "components"
},
{
"title": "data-tables",
"subfolder": "components",
Expand Down

0 comments on commit 31a8f4d

Please sign in to comment.