# presentation/views/methodology.view.ts

> 51 lines of code and 4 definitions.

Tree: Site tree
Language: typescript
Layer: product
Canonical: https://banes-lab.com/anatomy/tree#file-presentation-views-methodology-view-ts
Source text: https://banes-lab.com/assets/sources/source.739d0372829fd04f68962ff10c8de9b44f2662a138da9527b6c60e072b7ae49b.generated.txt

## Definitions

- `renderMethodology` (lexical_declaration, line 36)
- `METHODOLOGY_ENTITY` (lexical_declaration, line 16)
- `DEFINITION` (lexical_declaration, line 28)
- `PAGE` (lexical_declaration, line 42, exported)

## Uses

- [presentation/widgets/tab.widget.ts](https://banes-lab.com/source/tree/presentation/widgets/tab.widget.ts.md)

## Source

```typescript
import { CREATIVE_COMMONS, METHODOLOGY_REPOSITORY, SITE_URL, pagePath } from "#assets/link.assets";
import {
    CREATIVE_COMMONS_LICENSE,
    METHODOLOGY_DESCRIPTION,
    METHODOLOGY_TITLE,
} from "#configuration/strings/page.strings";
import { METHODOLOGY_AUTHOR, METHODOLOGY_META } from "#configuration/strings/methodology.strings";
import { mountTabSwitching, renderTabbedPage } from "#presentation/widgets/tab.widget";
import { METHODOLOGY_PAGE } from "#core/ids/page.ids";
import { METHODOLOGY_TABS } from "#configuration/strings/site.strings";
import { METHODOLOGY_TONE } from "#configuration/constants/tab.constants";
import type { PageDefinition } from "#types/page.types";
import type { SchemaEntity } from "#types/schema.types";
import type { TabbedPage } from "#types/tab.types";

const METHODOLOGY_ENTITY: SchemaEntity = {
    "@type": "CreativeWork",
    author: { "@type": "Person", name: METHODOLOGY_AUTHOR },
    codeRepository: METHODOLOGY_REPOSITORY,
    description: METHODOLOGY_DESCRIPTION,
    license: CREATIVE_COMMONS,
    name: METHODOLOGY_META.title,
    sameAs: METHODOLOGY_REPOSITORY,
    url: SITE_URL + pagePath(METHODOLOGY_PAGE),
    version: METHODOLOGY_META.version,
};

const DEFINITION: TabbedPage = {
    layout: "chapter",
    meta: METHODOLOGY_META,
    page: METHODOLOGY_PAGE,
    tabs: METHODOLOGY_TABS,
    tone: METHODOLOGY_TONE,
};

const renderMethodology = function renderMethodology(): Element {
    return renderTabbedPage(DEFINITION);
};

void mountTabSwitching(DEFINITION);

export const PAGE: PageDefinition = {
    content: {
        kind: "tabbed",
        layout: DEFINITION.layout,
        meta: METHODOLOGY_META,
        tabs: METHODOLOGY_TABS,
        tone: DEFINITION.tone,
    },
    description: METHODOLOGY_DESCRIPTION,
    entities: [METHODOLOGY_ENTITY],
    id: METHODOLOGY_PAGE,
    license: CREATIVE_COMMONS_LICENSE,
    render: renderMethodology,
    title: METHODOLOGY_TITLE,
};
```
