diff --git a/package.json b/package.json index f9d89b1f..b65c4cad 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,7 @@ "tsconfig-paths": "^3.10.1", "typedoc": "^0.25.0", "typedoc-plugin-coverage": "^3.2.0", + "typedoc-plugin-rename-defaults": "^0.7.1", "typescript": "^4.3.5" }, "scripts": { diff --git a/packages/react-auth-provider/src/index.tsx b/packages/react-auth-provider/src/index.tsx index 42581a35..b46544bd 100644 --- a/packages/react-auth-provider/src/index.tsx +++ b/packages/react-auth-provider/src/index.tsx @@ -18,6 +18,9 @@ import { const AuthContext = createContext(null); +/** + * Custom hook that wraps the implementation of the Auth context. + */ const useAuth = () => useContext(AuthContext); const AuthProvider = ({ @@ -67,8 +70,6 @@ const AuthProvider = ({ const doLogout = async () => { localStorage.removeItem('accessToken'); localStorage.removeItem('refreshToken'); - localStorage.removeItem('filterSettings'); - localStorage.removeItem('tableSettings'); }; return ( @@ -88,4 +89,10 @@ const AuthProvider = ({ ); }; -export { LoginParams, useAuth, AuthProvider }; +export { + LoginParams, + useAuth, + AuthProvider, + AuthProviderTypes, + AuthProviderProps, +}; diff --git a/packages/react-auth-provider/src/interfaces/index.ts b/packages/react-auth-provider/src/interfaces/index.ts index dd2cf90e..6a0efd61 100644 --- a/packages/react-auth-provider/src/interfaces/index.ts +++ b/packages/react-auth-provider/src/interfaces/index.ts @@ -1,12 +1,34 @@ export interface LoginParams { + /** + * API path where the login request will be sent to. + */ loginPath?: string; + /** + * Parameter username that belongs to user credentials. + */ username?: string; + /** + * Parameter password that belongs to user credentials. + */ password?: string; + /** + * Custom credentials passed to the login request. + */ [key: string]: string | number | boolean; } export type AuthProviderProps = { + /** + * Callback for when the login request performs successfully. + * + * @param accessToken - The JWT token of the signed user. + */ onSuccess?: (accessToken?: string) => void; + /** + * Callback for when there's an error on the login request. + * + * @param accessToken - The error returned from the API. + */ onError?: (error?: Error) => void; }; @@ -15,16 +37,43 @@ export type DoLogin = ( ) => void; export type AuthProviderTypes = { + /** + * User data returned from a successfully performed login request. + */ user: unknown; + /** + * Callback for management of the login user data. + */ setUser: React.Dispatch; + /** + * Callback for performing a login request. + */ doLogin: DoLogin; + /** + * Callback for performing a logout request. + */ doLogout: () => void; + /** + * Login request loading state indicator. + */ isPending: unknown; + /** + * JWT token assigned to the logged user. + */ accessToken: string; + /** + * JWT token used for refreshing an user token. + */ refreshToken: string; }; export interface AuthReponse { + /** + * JWT token assigned to the logged user. + */ accessToken: string; + /** + * JWT token used for refreshing an user token. + */ refreshToken: string; } diff --git a/packages/react-material-ui/src/components/AppBar/AppBarDrawer.tsx b/packages/react-material-ui/src/components/AppBar/AppBarDrawer.tsx index 8c03703f..96b5d748 100644 --- a/packages/react-material-ui/src/components/AppBar/AppBarDrawer.tsx +++ b/packages/react-material-ui/src/components/AppBar/AppBarDrawer.tsx @@ -4,7 +4,7 @@ import { useAppBarRoot } from './hooks/useAppBarRoot'; /** * The list of the app routes rendered as a vertical navigation list on the Drawer component. - * + * * @see {@link AppBar} * @see {@link Drawer} * @param props - {@link DrawerProps} diff --git a/packages/react-material-ui/src/components/AppBar/AppBarNav.tsx b/packages/react-material-ui/src/components/AppBar/AppBarNav.tsx index 65d7873b..c81bc0b7 100644 --- a/packages/react-material-ui/src/components/AppBar/AppBarNav.tsx +++ b/packages/react-material-ui/src/components/AppBar/AppBarNav.tsx @@ -5,7 +5,7 @@ import { useAppBarRoot } from './hooks/useAppBarRoot'; /** * The AppBarNav component renders the user info ({@link Avatar} and Name) and * a list of actions related to user and auth, such as Logout. - * + * * @see {@link AppBar} * @see {@link Navbar} * @param props - {@link NavbarProps} diff --git a/packages/react-material-ui/src/components/AppBar/hooks/index.ts b/packages/react-material-ui/src/components/AppBar/hooks/index.ts new file mode 100644 index 00000000..863c257e --- /dev/null +++ b/packages/react-material-ui/src/components/AppBar/hooks/index.ts @@ -0,0 +1,3 @@ +import { useAppBarRoot, AppBarContextProps } from './useAppBarRoot'; + +export { useAppBarRoot, AppBarContextProps }; diff --git a/packages/react-material-ui/src/components/AppBar/hooks/useAppBarRoot.tsx b/packages/react-material-ui/src/components/AppBar/hooks/useAppBarRoot.tsx index 586891c4..35ec1506 100644 --- a/packages/react-material-ui/src/components/AppBar/hooks/useAppBarRoot.tsx +++ b/packages/react-material-ui/src/components/AppBar/hooks/useAppBarRoot.tsx @@ -2,8 +2,14 @@ import { createContext, useContext } from 'react'; -type AppBarContextProps = { +export type AppBarContextProps = { + /** + * Boolean that indicates if the AppBar Drawer is open on a mobile screen. + */ isMobileOpen: boolean; + /** + * Callback for changing the open state of the AppBar Drawer dinamically. + */ toggleMobileOpen: () => void; }; @@ -11,6 +17,9 @@ export const AppBarContext = createContext( {} as AppBarContextProps, ); +/** + * Custom hook that wraps the implementation of the App Bar Root context. + */ export const useAppBarRoot = () => { const appBarContext = useContext(AppBarContext); diff --git a/packages/react-material-ui/src/components/Table/hooks/index.ts b/packages/react-material-ui/src/components/Table/hooks/index.ts new file mode 100644 index 00000000..0c3d70c4 --- /dev/null +++ b/packages/react-material-ui/src/components/Table/hooks/index.ts @@ -0,0 +1,9 @@ +import { useTableQueryState, getTableQueryState } from './useTableQueryState'; +import { useTableRoot, TableContextProps } from './useTableRoot'; + +export { + useTableQueryState, + getTableQueryState, + useTableRoot, + TableContextProps, +}; diff --git a/packages/react-material-ui/src/components/Table/hooks/useTableRoot.tsx b/packages/react-material-ui/src/components/Table/hooks/useTableRoot.tsx index 45bc55d5..56d0a25d 100644 --- a/packages/react-material-ui/src/components/Table/hooks/useTableRoot.tsx +++ b/packages/react-material-ui/src/components/Table/hooks/useTableRoot.tsx @@ -3,22 +3,80 @@ import React, { createContext, useContext } from 'react'; import { HeaderProps, RowProps, TableQueryStateProps } from '../types'; -type TableContextProps = { +export type TableContextProps = { + /** + * Array of objects, where each contain the data displayed in Table rows. + */ rows: RowProps[]; + /** + * Array of objects that represent the Table columns. + */ headers: HeaderProps[]; + /** + * Total of items displayed in the Table. + */ total: number; + /** + * Boolean value that indicates if the Table state can be controlled by external sources. + */ isControlled: boolean; + /** + * Total of pages rendered by the Table. + */ pageCount: number; + /** + * Table state containing page, order and search properties. + */ tableQuery: TableQueryStateProps; + /** + * Array of selected rows when checkboxes are available. + */ selected: RowProps[]; + /** + * Callback for changing Table columns dinamically. + */ setHeaders: React.Dispatch>; + /** + * Cllback for checking whether a row with the given ID is selected. + * + * @param id - The ID of the row to check. + * @returns `true` if the row is selected, `false` otherwise. + */ isSelected: (id: string) => boolean; + /** + * Callback for changing the current page in the Table pagination. + * + * @param event - The event representing the page change. + * @param newPage - The new page number. + */ handleChangePage: (event: unknown, newPage: number) => void; + /** + * Callback for changing the quantity of rows per page in the Table pagination. + * + * @param event - The event representing the value change. + */ handleChangeRowsPerPage: (event: React.ChangeEvent) => void; + /** + * Callback for changing the current Table sort by a specific column. + * + * @param event - The mouse event triggering the sorting request. + * @param property - The property by which to sort the table. + */ handleSort: (event: React.MouseEvent, property: string) => void; + /** + * Callback for selecting all checkboxes for rows in the Table. + * + * @param event - The event representing the checkbox selection change. + */ handleSelectAllCheckboxes: ( event: React.ChangeEvent, ) => void; + /** + * Callback for selecting a checkbox for a specific row in the table. + * + * @param event - The mouse event triggering the checkbox selection. + * @param row - The row for which the checkbox is being selected. + */ handleSelectCheckboxItem: ( event: React.MouseEvent, row: RowProps, @@ -29,6 +87,9 @@ export const TableContext = createContext( {} as TableContextProps, ); +/** + * Custom hook that wraps the implementation of the Table Root context. + */ export const useTableRoot = () => { const tableRootContext = useContext(TableContext); diff --git a/packages/react-material-ui/src/components/Table/index.ts b/packages/react-material-ui/src/components/Table/index.ts index be27c6d7..fab21e08 100644 --- a/packages/react-material-ui/src/components/Table/index.ts +++ b/packages/react-material-ui/src/components/Table/index.ts @@ -17,6 +17,13 @@ import { TableRowSkeleton } from './TableRowSkeleton'; import { TableCellSkeleton } from './TableCellSkeleton'; import { TableColumnOrderable } from './TableColumnOrderable'; +import useTable, { + UseTableProps, + UseTableResult, + UseTableOptions, + UpdateSearch, +} from './useTable'; + const TableComponent = { Table, BodyCell: TableBodyCells, @@ -36,4 +43,12 @@ const TableComponent = { ColumnOrderable: TableColumnOrderable, }; +export { + useTable, + UseTableProps, + UseTableResult, + UseTableOptions, + UpdateSearch, +}; + export default TableComponent; diff --git a/packages/react-material-ui/src/components/Table/useTable.ts b/packages/react-material-ui/src/components/Table/useTable.ts index 4f74edc0..f236407f 100644 --- a/packages/react-material-ui/src/components/Table/useTable.ts +++ b/packages/react-material-ui/src/components/Table/useTable.ts @@ -18,41 +18,119 @@ import { import { getSearchParams } from '../../utils/http'; import { DataProviderRequestOptions } from '@concepta/react-data-provider/dist/interfaces'; -interface UseTableOptions { +export interface UseTableOptions { + /** + * Quantity of items displayed in a Table page. + */ rowsPerPage?: number; + /** + * Current page number. + */ page?: number; + /** + * String that indicates which Table column will be the sorting parameter. + */ orderBy?: string; + /** + * String that indicates Ascending or Descending order of Tbale rows. + */ order?: Order; + /** + * Object that represents filters for Table data. + */ simpleFilter?: SimpleFilter; + /** + * Object for filtering Table data in a more intricate way, including contain and equal operators. + */ search?: Search; + /** + * Object where each field is a callback: onSuccess, onError, onFinish and formatData. + */ callbacks?: DataProviderRequestOptions; + /** + * Boolean that indicates if Table pagination should be displayed. + */ noPagination?: boolean; } export interface UpdateSearch { + /** + * Callback for updating Table filtering based on URL params. + * + * @param search - The new value for the search attribute. + * @param resetPage - Boolean that indicates if the current page should be set to one. + */ (search: Search | null, resetPage?: boolean): void; } export interface UseTableResult { + /** + * Array of objects returned form the API where each contain the data displayed in Table rows. + */ data: unknown[]; + /** + * Boolean that indicates loading state for Table rows. + */ isPending: boolean; + /** + * Error returned from the Table API call. + */ error: unknown; + /** + * Total of items displayed in the Table. + */ total: number; + /** + * Total of pages rendered by the Table. + */ pageCount: number; + /** + * Callback for performing an API call for the Table API resource. + */ execute: () => void; + /** + * Callback for performing an API call for the Table API resource and refreshing Table data. + */ refresh: () => void; + /** + * Callback for updating the Table filter object. + */ updateSimpleFilter: UpdateSimpleFilter; - updateSearch: (search: Search | null, resetPage?: boolean) => void; + /** + * Callback for updating Table filtering based on URL params. + * + * @param search - The new value for the search attribute. + * @param resetPage - Boolean that indicates if the current page should be set to one. + */ + updateSearch: UpdateSearch; + /** + * Object that represents filters for Table data. + */ simpleFilter: SimpleFilter; + /** + * Object for filtering Table data in a more intricate way, including contain and equal operators. + */ search: Search; + /** + * Table state containing page, order and search properties. + */ tableQueryState: TableQueryStateProps; + /** + * Callback for changing Table state dinamically. + */ setTableQueryState: React.Dispatch< React.SetStateAction >; } export type UseTableProps = ( + /** + * API resource that will be used for fetching and updating Table data. + */ resource: string, + /** + * Custom parameters for the Table data, sorting and pagination. + */ options?: UseTableOptions, ) => UseTableResult; @@ -128,7 +206,7 @@ const useTable: UseTableProps = (resource, options) => { useQuery(getResource, false, options?.callbacks); // TODO: This will be refactored with Query Builder - // For now it works even though not optmized + // For now it works even though not optimized const updateSimpleFilter = ( simpleFilter: SimpleFilter | null, resetPage = true, @@ -180,7 +258,7 @@ const useTable: UseTableProps = (resource, options) => { }; // TODO: This will be refactored with Query Builder - // For now it works even though not optmized + // For now it works even though not optimized const updateSearch: UpdateSearch = ( search: Search | null, resetPage = true, diff --git a/packages/react-material-ui/src/hooks/index.ts b/packages/react-material-ui/src/hooks/index.ts new file mode 100644 index 00000000..f8a8a680 --- /dev/null +++ b/packages/react-material-ui/src/hooks/index.ts @@ -0,0 +1,3 @@ +import { useSettingsStorage } from './useSettingsStorage'; + +export { useSettingsStorage }; diff --git a/packages/react-material-ui/src/index.ts b/packages/react-material-ui/src/index.ts index f02d6d7d..c936eae2 100644 --- a/packages/react-material-ui/src/index.ts +++ b/packages/react-material-ui/src/index.ts @@ -6,6 +6,7 @@ export { AppBarRoot, AppBarRootProps } from './components/AppBar/AppBarRoot'; export { AppBarDrawer } from './components/AppBar/AppBarDrawer'; export { AppBarMain } from './components/AppBar/AppBarMain'; export { AppBarNav } from './components/AppBar/AppBarNav'; +export * from './components/AppBar/hooks'; export { Dialog, DialogProps } from './components/Dialog'; @@ -32,9 +33,23 @@ export { SideModal, SideModalProps } from './components/SideModal'; export { default as Select } from './components/Select'; export { default as Switch } from './components/Switch'; -import Table from './components/Table'; +import Table, { + useTable, + UseTableOptions, + UseTableResult, + UseTableProps, + UpdateSearch, +} from './components/Table'; export * from './components/Table/utils'; -export { Table }; +export * from './components/Table/hooks'; +export { + Table, + useTable, + UseTableOptions, + UseTableResult, + UseTableProps, + UpdateSearch, +}; export { default as Text } from './components/Text'; export { TextField, TextFieldProps } from './components/TextField'; diff --git a/packages/react-material-ui/src/modules/crud/index.tsx b/packages/react-material-ui/src/modules/crud/index.tsx index 26f04475..2cc8f323 100644 --- a/packages/react-material-ui/src/modules/crud/index.tsx +++ b/packages/react-material-ui/src/modules/crud/index.tsx @@ -20,6 +20,13 @@ import CrudRoot from './CrudRoot'; import { FilterDetails } from '../../components/submodules/Filter'; import Breadcrumbs from '../../components/Breadcrumbs/Breadcrumbs'; +import { + useCrudRoot, + CrudContext, + CrudContextProps, + FilterValues, +} from './useCrudRoot'; + type Action = 'creation' | 'edit' | 'details' | null; type SelectedRow = Record | null; @@ -192,4 +199,6 @@ const CrudModule = (props: ModuleProps) => { ); }; +export { useCrudRoot, CrudContext, CrudContextProps, FilterValues }; + export default CrudModule; diff --git a/packages/react-material-ui/src/modules/crud/useCrudRoot.tsx b/packages/react-material-ui/src/modules/crud/useCrudRoot.tsx index f51f20ba..04e6b6fa 100644 --- a/packages/react-material-ui/src/modules/crud/useCrudRoot.tsx +++ b/packages/react-material-ui/src/modules/crud/useCrudRoot.tsx @@ -8,13 +8,40 @@ import { FilterDetails } from '../../components/submodules/Filter'; export type FilterValues = Record; export type CrudContextProps = { + /** + * Array of objects, where each contain details regarding filter inputs. + */ filters: FilterDetails[]; + /** + * Object for filtering Table data in a more intricate way, including contain and equal operators. + */ search: UseTableResult['search']; + /** + * Callback for updating Table filtering based on URL params. + * + * @param search - The new value for the search attribute. + * @param resetPage - Boolean that indicates if the current page should be set to one. + */ updateSearch: UseTableResult['updateSearch']; + /** + * Object that represents filters for Table data. + */ simpleFilter: UseTableResult['simpleFilter']; + /** + * Callback for updating the Table filter object. + */ updateSimpleFilter: UseTableResult['updateSimpleFilter']; + /** + * Complement for the default Table search. + */ externalSearch: Search; + /** + * Object containing values of filter inputs. + */ filterValues: FilterValues; + /** + * Callback for managing filter values dinamically. + */ setFilterValues: React.Dispatch>; }; @@ -22,6 +49,9 @@ export const CrudContext = createContext( {} as CrudContextProps, ); +/** + * Custom hook that wraps the implementation of the Crud Root context. + */ export const useCrudRoot = () => { const tableRootContext = useContext(CrudContext); diff --git a/public/mockServiceWorker.js b/public/mockServiceWorker.js new file mode 100644 index 00000000..24fe3a25 --- /dev/null +++ b/public/mockServiceWorker.js @@ -0,0 +1,284 @@ +/* eslint-disable */ +/* tslint:disable */ + +/** + * Mock Service Worker. + * @see https://github.com/mswjs/msw + * - Please do NOT modify this file. + * - Please do NOT serve this file on production. + */ + +const PACKAGE_VERSION = '2.3.1' +const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423' +const IS_MOCKED_RESPONSE = Symbol('isMockedResponse') +const activeClientIds = new Set() + +self.addEventListener('install', function () { + self.skipWaiting() +}) + +self.addEventListener('activate', function (event) { + event.waitUntil(self.clients.claim()) +}) + +self.addEventListener('message', async function (event) { + const clientId = event.source.id + + if (!clientId || !self.clients) { + return + } + + const client = await self.clients.get(clientId) + + if (!client) { + return + } + + const allClients = await self.clients.matchAll({ + type: 'window', + }) + + switch (event.data) { + case 'KEEPALIVE_REQUEST': { + sendToClient(client, { + type: 'KEEPALIVE_RESPONSE', + }) + break + } + + case 'INTEGRITY_CHECK_REQUEST': { + sendToClient(client, { + type: 'INTEGRITY_CHECK_RESPONSE', + payload: { + packageVersion: PACKAGE_VERSION, + checksum: INTEGRITY_CHECKSUM, + }, + }) + break + } + + case 'MOCK_ACTIVATE': { + activeClientIds.add(clientId) + + sendToClient(client, { + type: 'MOCKING_ENABLED', + payload: true, + }) + break + } + + case 'MOCK_DEACTIVATE': { + activeClientIds.delete(clientId) + break + } + + case 'CLIENT_CLOSED': { + activeClientIds.delete(clientId) + + const remainingClients = allClients.filter((client) => { + return client.id !== clientId + }) + + // Unregister itself when there are no more clients + if (remainingClients.length === 0) { + self.registration.unregister() + } + + break + } + } +}) + +self.addEventListener('fetch', function (event) { + const { request } = event + + // Bypass navigation requests. + if (request.mode === 'navigate') { + return + } + + // Opening the DevTools triggers the "only-if-cached" request + // that cannot be handled by the worker. Bypass such requests. + if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { + return + } + + // Bypass all requests when there are no active clients. + // Prevents the self-unregistered worked from handling requests + // after it's been deleted (still remains active until the next reload). + if (activeClientIds.size === 0) { + return + } + + // Generate unique request ID. + const requestId = crypto.randomUUID() + event.respondWith(handleRequest(event, requestId)) +}) + +async function handleRequest(event, requestId) { + const client = await resolveMainClient(event) + const response = await getResponse(event, client, requestId) + + // Send back the response clone for the "response:*" life-cycle events. + // Ensure MSW is active and ready to handle the message, otherwise + // this message will pend indefinitely. + if (client && activeClientIds.has(client.id)) { + ;(async function () { + const responseClone = response.clone() + + sendToClient( + client, + { + type: 'RESPONSE', + payload: { + requestId, + isMockedResponse: IS_MOCKED_RESPONSE in response, + type: responseClone.type, + status: responseClone.status, + statusText: responseClone.statusText, + body: responseClone.body, + headers: Object.fromEntries(responseClone.headers.entries()), + }, + }, + [responseClone.body], + ) + })() + } + + return response +} + +// Resolve the main client for the given event. +// Client that issues a request doesn't necessarily equal the client +// that registered the worker. It's with the latter the worker should +// communicate with during the response resolving phase. +async function resolveMainClient(event) { + const client = await self.clients.get(event.clientId) + + if (client?.frameType === 'top-level') { + return client + } + + const allClients = await self.clients.matchAll({ + type: 'window', + }) + + return allClients + .filter((client) => { + // Get only those clients that are currently visible. + return client.visibilityState === 'visible' + }) + .find((client) => { + // Find the client ID that's recorded in the + // set of clients that have registered the worker. + return activeClientIds.has(client.id) + }) +} + +async function getResponse(event, client, requestId) { + const { request } = event + + // Clone the request because it might've been already used + // (i.e. its body has been read and sent to the client). + const requestClone = request.clone() + + function passthrough() { + const headers = Object.fromEntries(requestClone.headers.entries()) + + // Remove internal MSW request header so the passthrough request + // complies with any potential CORS preflight checks on the server. + // Some servers forbid unknown request headers. + delete headers['x-msw-intention'] + + return fetch(requestClone, { headers }) + } + + // Bypass mocking when the client is not active. + if (!client) { + return passthrough() + } + + // Bypass initial page load requests (i.e. static assets). + // The absence of the immediate/parent client in the map of the active clients + // means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet + // and is not ready to handle requests. + if (!activeClientIds.has(client.id)) { + return passthrough() + } + + // Notify the client that a request has been intercepted. + const requestBuffer = await request.arrayBuffer() + const clientMessage = await sendToClient( + client, + { + type: 'REQUEST', + payload: { + id: requestId, + url: request.url, + mode: request.mode, + method: request.method, + headers: Object.fromEntries(request.headers.entries()), + cache: request.cache, + credentials: request.credentials, + destination: request.destination, + integrity: request.integrity, + redirect: request.redirect, + referrer: request.referrer, + referrerPolicy: request.referrerPolicy, + body: requestBuffer, + keepalive: request.keepalive, + }, + }, + [requestBuffer], + ) + + switch (clientMessage.type) { + case 'MOCK_RESPONSE': { + return respondWithMock(clientMessage.data) + } + + case 'PASSTHROUGH': { + return passthrough() + } + } + + return passthrough() +} + +function sendToClient(client, message, transferrables = []) { + return new Promise((resolve, reject) => { + const channel = new MessageChannel() + + channel.port1.onmessage = (event) => { + if (event.data && event.data.error) { + return reject(event.data.error) + } + + resolve(event.data) + } + + client.postMessage( + message, + [channel.port2].concat(transferrables.filter(Boolean)), + ) + }) +} + +async function respondWithMock(response) { + // Setting response status code to 0 is a no-op. + // However, when responding with a "Response.error()", the produced Response + // instance will have status code set to 0. Since it's not possible to create + // a Response instance with status code 0, handle that use-case separately. + if (response.status === 0) { + return Response.error() + } + + const mockedResponse = new Response(response.body, response) + + Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, { + value: true, + enumerable: true, + }) + + return mockedResponse +} diff --git a/typedoc.json b/typedoc.json index ff170ddd..128174ae 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,6 +1,6 @@ { "entryPoints": ["packages/*"], - "plugin": ["typedoc-plugin-coverage"], + "plugin": ["typedoc-plugin-coverage", "typedoc-plugin-rename-defaults"], "exclude": [ "packages/react-common", "packages/react-notification-provider", diff --git a/yarn.lock b/yarn.lock index cabfeb04..d782b021 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7649,6 +7649,13 @@ __metadata: languageName: node linkType: hard +"camelcase@npm:^8.0.0": + version: 8.0.0 + resolution: "camelcase@npm:8.0.0" + checksum: 10c0/56c5fe072f0523c9908cdaac21d4a3b3fb0f608fb2e9ba90a60e792b95dd3bb3d1f3523873ab17d86d146e94171305f73ef619e2f538bd759675bc4a14b4bff3 + languageName: node + linkType: hard + "caniuse-lite@npm:^1.0.30001406, caniuse-lite@npm:^1.0.30001565": version: 1.0.30001579 resolution: "caniuse-lite@npm:1.0.30001579" @@ -17155,6 +17162,7 @@ __metadata: tsconfig-paths: "npm:^3.10.1" typedoc: "npm:^0.25.0" typedoc-plugin-coverage: "npm:^3.2.0" + typedoc-plugin-rename-defaults: "npm:^0.7.1" typescript: "npm:^4.3.5" languageName: unknown linkType: soft @@ -19172,6 +19180,17 @@ __metadata: languageName: node linkType: hard +"typedoc-plugin-rename-defaults@npm:^0.7.1": + version: 0.7.1 + resolution: "typedoc-plugin-rename-defaults@npm:0.7.1" + dependencies: + camelcase: "npm:^8.0.0" + peerDependencies: + typedoc: ">=0.22.x <0.27.x" + checksum: 10c0/8a76aeb66528b4162f0be1ad0e2aedea6f511d725530eeeea1c9da86fb989b525b7c45bc9070a2b1675822ec4096e113b5e6542829cc47dbdb3ab781511f998d + languageName: node + linkType: hard + "typedoc@npm:^0.25.0": version: 0.25.13 resolution: "typedoc@npm:0.25.13"