Setting the file. One moment.
Subchapter 2.23
references/auto-patterns-dashboard/pages-configuration.mdMarkdown3 KBView on GitHub
interface PageConfig {
id: string; // Unique ID
type: 'collectionPage' | 'entityPage';
appMainPage?: boolean; // EXACTLY ONE page must have true
}
interface CollectionPage extends PageConfig {
type: 'collectionPage';
collectionPage: {
route: { path: '/' };
components: [{
entityPageId: string; // REQUIRED: Links to entity page ID
// ... component config
}];
};
}
interface EntityPage extends PageConfig {
type: 'entityPage';
entityPage: {
parentPageId: string; // REQUIRED: Links to collection page ID
route: {
path: string; // MUST be '/[segment]/:entityId'
params: { id: 'entityId' };
};
};
}
interface StickyConfig {
stickyColumns?: number; // Count of columns to stick from left
columns: Array<{
reorderDisabled?: boolean; // Recommended for sticky cols
}>;
}pages array length != 2 THEN Invalid (Must be exactly 2).appMainPage: true count != 1 THEN Invalid (Must be exactly 1).type: 'entityPage' THEN route.path MUST match /[segment]/:entityId.route.path is /:entityId THEN Invalid (Conflict with root).stickyColumns is set THEN value must be > 0 AND <= total columns.collectionPage and one entityPage.collectionPage references entityPageId (in component).entityPage references parentPageId (in page config).entityId as the dynamic parameter name.reorderDisabled: true for sticky columns to prevent user breakage.[
{
id: 'product-list',
type: 'collectionPage',
appMainPage: true,
collectionPage: {
route: { path: '/' },
components: [{
type: 'collection',
entityPageId: 'product-details', // Link to Entity Page
layout: [{
type: 'Table',
table: {
stickyColumns: 1,
columns: [
{ id: 'name', name: 'Name', reorderDisabled: true }, // Sticky & Locked
{ id: 'price', name: 'Price' }
]
}
}]
}]
}
},
{
id: 'product-details',
type: 'entityPage',
entityPage: {
parentPageId: 'product-list', // Link to Collection Page
route: {
path: '/product/:entityId', // Correct format
params: { id: 'entityId' }
}
}
}
]