From d0ec30dfca5e6d5291ff1ba953e09417044fae4c Mon Sep 17 00:00:00 2001 From: Kevin Yu <kevinwcyu@users.noreply.github.com> Date: Thu, 4 Jul 2024 09:02:18 -0700 Subject: [PATCH] fix types --- .config/jest/mocks/react-inlinesvg.tsx | 4 +- package.json | 3 +- src/DataSource.ts | 24 +- src/SiteWiseQueryPaginator.ts | 25 +- src/components/ConfigEditor.test.tsx | 75 +++--- .../browser/hierarchy/AssetHierarchyList.tsx | 2 +- src/components/query/PropertyQueryEditor.tsx | 4 +- src/components/query/QueryEditor.test.tsx | 2 +- src/getNextQueries.ts | 9 +- src/sitewiseCache.ts | 25 +- yarn.lock | 232 ++++++++++-------- 11 files changed, 225 insertions(+), 180 deletions(-) diff --git a/.config/jest/mocks/react-inlinesvg.tsx b/.config/jest/mocks/react-inlinesvg.tsx index d540f3aa..081a90a1 100644 --- a/.config/jest/mocks/react-inlinesvg.tsx +++ b/.config/jest/mocks/react-inlinesvg.tsx @@ -16,10 +16,10 @@ export const cacheStore: { [key: string]: StorageItem } = Object.create(null); const SVG_FILE_NAME_REGEX = /(.+)\/(.+)\.svg$/; -const InlineSVG = ({ src }: { src: string }) => { +const InlineSVG = ({ src, innerRef, ...rest }: { src: string; innerRef: React.ForwardedRef<SVGElement> }) => { // testId will be the file name without extension (e.g. `public/img/icons/angle-double-down.svg` -> `angle-double-down`) const testId = src.replace(SVG_FILE_NAME_REGEX, '$2'); - return <svg xmlns="http://www.w3.org/2000/svg" data-testid={testId} viewBox="0 0 24 24" />; + return <svg xmlns="http://www.w3.org/2000/svg" data-testid={testId} {...rest} viewBox="0 0 24 24" />; }; export default InlineSVG; diff --git a/package.json b/package.json index b7047e7d..a5138e0f 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,10 @@ "@grafana/plugin-e2e": "^1.6.0", "@grafana/tsconfig": "^1.3.0-rc1", "@playwright/test": "^1.45.1", - "@swc/core": "^1.3.90", + "@swc/core": "^1.6.7", "@swc/helpers": "^0.5.11", "@swc/jest": "^0.2.26", + "@testing-library/dom": "^10.3.0", "@testing-library/jest-dom": "6.4.6", "@testing-library/react": "16.0.0", "@testing-library/user-event": "^14.5.2", diff --git a/src/DataSource.ts b/src/DataSource.ts index 72e6601c..7ba7a3df 100644 --- a/src/DataSource.ts +++ b/src/DataSource.ts @@ -60,7 +60,7 @@ export class DataSource extends DataSourceWithBackend<SitewiseQuery, SitewiseOpt rangeRaw: options.rangeRaw, } as DataQueryRequest<SitewiseQuery>; - let res: DataQueryResponse; + let res: DataQueryResponse | undefined; try { res = await this.query(request).toPromise(); @@ -153,16 +153,18 @@ export class DataSource extends DataSourceWithBackend<SitewiseQuery, SitewiseOpt return super.query(request).toPromise(); }, cachedResponse: cachedInfo?.cachedResponse, - }).toObservable().pipe( - // Cache the last (done) response - tap({ - next: (response) => { - if (response.state === LoadingState.Done) { - this.relativeRangeCache.set(request, response); - } - }, - },) - ); + }) + .toObservable() + .pipe( + // Cache the last (done) response + tap({ + next: (response) => { + if (response.state === LoadingState.Done) { + this.relativeRangeCache.set(request, response); + } + }, + }) + ); } } diff --git a/src/SiteWiseQueryPaginator.ts b/src/SiteWiseQueryPaginator.ts index 6bb643bf..7b562fb8 100644 --- a/src/SiteWiseQueryPaginator.ts +++ b/src/SiteWiseQueryPaginator.ts @@ -9,14 +9,14 @@ import { SitewiseNextQuery, SitewiseQuery } from 'types'; */ export interface SitewiseQueryPaginatorOptions { // The initial query request. - request: DataQueryRequest<SitewiseQuery>, + request: DataQueryRequest<SitewiseQuery>; // The function to call to execute the query. - queryFn: (request: DataQueryRequest<SitewiseQuery>) => Promise<DataQueryResponse>; + queryFn: (request: DataQueryRequest<SitewiseQuery>) => Promise<DataQueryResponse | undefined>; // The cached response to set as the initial response. cachedResponse?: { - start?: DataQueryResponse, - end?: DataQueryResponse, - }, + start?: DataQueryResponse; + end?: DataQueryResponse; + }; } /** @@ -39,7 +39,10 @@ export class SitewiseQueryPaginator { * @returns An observable that emits the paginated query responses. */ toObservable() { - const { request: { requestId }, cachedResponse } = this.options; + const { + request: { requestId }, + cachedResponse, + } = this.options; const subject = new Subject<DataQueryResponse>(); if (cachedResponse?.start) { @@ -63,7 +66,7 @@ export class SitewiseQueryPaginator { try { let retrievedData = cachedResponse?.start?.data; let nextQueries: SitewiseNextQuery[] | undefined; - const errorEncountered = false; // whether there's a error response + const errorEncountered = false; // whether there's a error response let count = 1; do { @@ -77,12 +80,12 @@ export class SitewiseQueryPaginator { const response = await queryFn(paginatingRequest); if (retrievedData == null) { - retrievedData = response.data; + retrievedData = response?.data || []; } else { - retrievedData = appendMatchingFrames(retrievedData, response.data); + retrievedData = appendMatchingFrames(retrievedData, response?.data || []); } - if (response.state === LoadingState.Error) { + if (response?.state === LoadingState.Error) { subject.next({ ...response, data: retrievedData, state: LoadingState.Error, key: requestId }); break; } @@ -95,7 +98,7 @@ export class SitewiseQueryPaginator { if (cachedResponse?.end != null && !errorEncountered) { retrievedData = appendMatchingFrames(retrievedData, cachedResponse.end.data); - subject.next({ ...cachedResponse.end, data: retrievedData , state: LoadingState.Done, key: requestId }); + subject.next({ ...cachedResponse.end, data: retrievedData, state: LoadingState.Done, key: requestId }); } subject.complete(); diff --git a/src/components/ConfigEditor.test.tsx b/src/components/ConfigEditor.test.tsx index 4ac9f894..9283f578 100644 --- a/src/components/ConfigEditor.test.tsx +++ b/src/components/ConfigEditor.test.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { DataSourcePluginOptionsEditorProps } from '@grafana/data'; import { ConfigEditor } from './ConfigEditor'; +import '@testing-library/jest-dom'; import { render, screen } from '@testing-library/react'; import { SitewiseOptions, SitewiseSecureJsonData } from 'types'; const datasourceOptions = { @@ -27,42 +28,40 @@ const defaultProps: DataSourcePluginOptionsEditorProps<SitewiseOptions, Sitewise options: datasourceOptions, onOptionsChange: jest.fn(), }; - describe('edge configuration', () => { - it('should show correct fields if Standard authentication', () => { - render( - <ConfigEditor {...defaultProps} options={{ ...datasourceOptions, jsonData: { defaultRegion: 'Edge' } }} /> - ); - expect(screen.getByText('Edge settings')).toBeInTheDocument(); - expect(screen.getByText('Authentication Provider')).toBeInTheDocument(); - }); - it('should show correct fields if linux authentication', () => { - render( - <ConfigEditor - {...defaultProps} - options={{ ...datasourceOptions, jsonData: { defaultRegion: 'Edge', edgeAuthMode: 'linux' } }} - /> - ); - expect(screen.getByText('Edge settings')).toBeInTheDocument(); - expect(screen.getByText('Username')).toBeInTheDocument(); - expect(screen.getByText('Password')).toBeInTheDocument(); - }); - it('should display warning if region is Edge but no endpoint is specified', () => { - render( - <ConfigEditor - {...defaultProps} - options={{ ...datasourceOptions, jsonData: { defaultRegion: 'Edge', endpoint: '' } }} - /> - ); - expect(screen.getByText('Edge settings')).toBeInTheDocument(); - expect(screen.getByTestId('endpoint-warning')).toBeInTheDocument(); - }); +describe('edge configuration', () => { + it('should show correct fields if Standard authentication', () => { + render(<ConfigEditor {...defaultProps} options={{ ...datasourceOptions, jsonData: { defaultRegion: 'Edge' } }} />); + expect(screen.getByText('Edge settings')).toBeInTheDocument(); + expect(screen.getByText('Authentication Provider')).toBeInTheDocument(); }); - describe('non-edge configuration', () => { - it('should show correct fields if region is not edge', () => { - render( - <ConfigEditor {...defaultProps} options={{ ...datasourceOptions, jsonData: { defaultRegion: 'us-east-2' } }} /> - ); - expect(screen.queryByText('Edge settings')).not.toBeInTheDocument(); - expect(screen.getByText('Authentication Provider')).toBeInTheDocument(); - }); - }); \ No newline at end of file + it('should show correct fields if linux authentication', () => { + render( + <ConfigEditor + {...defaultProps} + options={{ ...datasourceOptions, jsonData: { defaultRegion: 'Edge', edgeAuthMode: 'linux' } }} + /> + ); + expect(screen.getByText('Edge settings')).toBeInTheDocument(); + expect(screen.getByText('Username')).toBeInTheDocument(); + expect(screen.getByText('Password')).toBeInTheDocument(); + }); + it('should display warning if region is Edge but no endpoint is specified', () => { + render( + <ConfigEditor + {...defaultProps} + options={{ ...datasourceOptions, jsonData: { defaultRegion: 'Edge', endpoint: '' } }} + /> + ); + expect(screen.getByText('Edge settings')).toBeInTheDocument(); + expect(screen.getByTestId('endpoint-warning')).toBeInTheDocument(); + }); +}); +describe('non-edge configuration', () => { + it('should show correct fields if region is not edge', () => { + render( + <ConfigEditor {...defaultProps} options={{ ...datasourceOptions, jsonData: { defaultRegion: 'us-east-2' } }} /> + ); + expect(screen.queryByText('Edge settings')).not.toBeInTheDocument(); + expect(screen.getByText('Authentication Provider')).toBeInTheDocument(); + }); +}); diff --git a/src/components/browser/hierarchy/AssetHierarchyList.tsx b/src/components/browser/hierarchy/AssetHierarchyList.tsx index 0020e172..6c665786 100644 --- a/src/components/browser/hierarchy/AssetHierarchyList.tsx +++ b/src/components/browser/hierarchy/AssetHierarchyList.tsx @@ -55,7 +55,7 @@ export const AssetHierarchyList: FunctionComponent<Props> = ({ // try to load children if none passed in if (!children && asset && cache) { const fetchData = async () => { - const results = await cache.getAssociatedAssets(asset.id, hierarchy.id); + const results = (await cache.getAssociatedAssets(asset.id, hierarchy.id)) || []; setChildren(results.toArray()); }; fetchData(); diff --git a/src/components/query/PropertyQueryEditor.tsx b/src/components/query/PropertyQueryEditor.tsx index 3ba60c57..9ad057f1 100644 --- a/src/components/query/PropertyQueryEditor.tsx +++ b/src/components/query/PropertyQueryEditor.tsx @@ -69,7 +69,7 @@ export class PropertyQueryEditor extends PureComponent<Props, State> { try { update.asset = await cache.getAssetInfo(query.assetIds![0]); const ps = await cache.listAssetProperties(query.assetIds[0]); - update.assetProperties = ps.map(({ id, name }) => ({ id, name })); + update.assetProperties = ps?.map(({ id, name }) => ({ id, name })) || []; } catch (err) { console.warn('error reading asset info', err); update.property = undefined; @@ -362,6 +362,7 @@ export class PropertyQueryEditor extends PureComponent<Props, State> { <EditorField label="Asset" htmlFor="asset" width={30}> <Select id="asset" + inputId="asset" aria-label="Asset" isMulti={true} key={query.region ? query.region : 'default'} @@ -396,6 +397,7 @@ export class PropertyQueryEditor extends PureComponent<Props, State> { <EditorField label="Property" htmlFor="property" width={30}> <Select id="property" + inputId="property" aria-label="Property" isLoading={loading} options={assetPropertyOptions} diff --git a/src/components/query/QueryEditor.test.tsx b/src/components/query/QueryEditor.test.tsx index cddcab1b..e25e1238 100644 --- a/src/components/query/QueryEditor.test.tsx +++ b/src/components/query/QueryEditor.test.tsx @@ -300,7 +300,7 @@ describe('QueryEditor', () => { }); async function openOptionsCollapse() { - const collapseLabel = await screen.queryByTestId('collapse-title'); + const collapseLabel = screen.queryByTestId('collapse-title'); if (collapseLabel) { return userEvent.click(collapseLabel); } diff --git a/src/getNextQueries.ts b/src/getNextQueries.ts index 49fc9f7f..cb3e250c 100644 --- a/src/getNextQueries.ts +++ b/src/getNextQueries.ts @@ -1,9 +1,8 @@ -import { DataFrame, DataQueryRequest, DataQueryResponse } from "@grafana/data"; -import { SitewiseCustomMeta, SitewiseNextQuery, SitewiseQuery } from "types"; +import { DataFrame, DataQueryRequest, DataQueryResponse } from '@grafana/data'; +import { SitewiseCustomMeta, SitewiseNextQuery, SitewiseQuery } from 'types'; - -export function getNextQueries(request: DataQueryRequest<SitewiseQuery>, rsp: DataQueryResponse) { - if (rsp.data?.length) { +export function getNextQueries(request: DataQueryRequest<SitewiseQuery>, rsp?: DataQueryResponse) { + if (rsp?.data?.length) { const next: SitewiseNextQuery[] = []; for (const frame of rsp.data as DataFrame[]) { const meta = frame.meta?.custom as SitewiseCustomMeta; diff --git a/src/sitewiseCache.ts b/src/sitewiseCache.ts index f4abefc9..5ffc0143 100644 --- a/src/sitewiseCache.ts +++ b/src/sitewiseCache.ts @@ -15,9 +15,12 @@ export class SitewiseCache { private topLevelAssets?: DataFrameView<AssetSummary>; private assetPropertiesByAssetId = new Map<string, DataFrameView<{ id: string; name: string }>>(); - constructor(private ds: DataSource, private region: string) {} + constructor( + private ds: DataSource, + private region: string + ) {} - async getAssetInfo(id: string): Promise<AssetInfo> { + async getAssetInfo(id: string): Promise<AssetInfo | undefined> { const v = this.assetsById.get(id); if (v) { return Promise.resolve(v); @@ -60,7 +63,7 @@ export class SitewiseCache { return this.assetsById.get(id); } - async listAssetProperties(assetId: string): Promise<DataFrameView<{ id: string; name: string }>> { + async listAssetProperties(assetId: string): Promise<DataFrameView<{ id: string; name: string }> | undefined> { const ap = this.assetPropertiesByAssetId.get(assetId); if (ap) { @@ -90,7 +93,7 @@ export class SitewiseCache { .toPromise(); } - async getModels(): Promise<DataFrameView<AssetModelSummary>> { + async getModels(): Promise<DataFrameView<AssetModelSummary> | undefined> { if (this.models) { return Promise.resolve(this.models); } @@ -114,7 +117,7 @@ export class SitewiseCache { } // No cache for now - async getAssetsOfType(modelId: string): Promise<DataFrameView<AssetSummary>> { + async getAssetsOfType(modelId: string): Promise<DataFrameView<AssetSummary> | undefined> { const query: ListAssetsQuery = { refId: 'getAssetsOfType', queryType: QueryType.ListAssets, @@ -136,7 +139,7 @@ export class SitewiseCache { .toPromise(); } - async getAssociatedAssets(assetId: string, hierarchyId?: string): Promise<DataFrameView<AssetSummary>> { + async getAssociatedAssets(assetId: string, hierarchyId?: string): Promise<DataFrameView<AssetSummary> | undefined> { const query: ListAssociatedAssetsQuery = { queryType: QueryType.ListAssociatedAssets, refId: 'associatedAssets', @@ -159,7 +162,7 @@ export class SitewiseCache { .toPromise(); } - async getTopLevelAssets(): Promise<DataFrameView<AssetSummary>> { + async getTopLevelAssets(): Promise<DataFrameView<AssetSummary> | undefined> { if (this.topLevelAssets) { return Promise.resolve(this.topLevelAssets); } @@ -192,7 +195,7 @@ export class SitewiseCache { icon: 'arrow-right', })); try { - const topLevel = await this.getTopLevelAssets(); + const topLevel = (await this.getTopLevelAssets()) || []; for (const asset of topLevel) { options.push({ label: asset.name, @@ -260,9 +263,13 @@ export function frameToAssetInfo(res: DescribeAssetResult): AssetInfo { }; } -export function assetSummaryToAssetInfo(res: DataFrameView<AssetSummary>): AssetInfo[] { +export function assetSummaryToAssetInfo(res?: DataFrameView<AssetSummary>): AssetInfo[] { const results: AssetInfo[] = []; + if (!res) { + return results; + } + for (const info of res.toArray()) { const hierarchy: AssetPropertyInfo[] = JSON.parse(info.hierarchies); // has Id, Name const properties: AssetPropertyInfo[] = []; diff --git a/yarn.lock b/yarn.lock index 87559f1e..8b57e6b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,7 +15,7 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.24.7": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== @@ -1021,20 +1021,20 @@ semver "^7.5.4" uuid "^8.3.2" -"@grafana/faro-core@^1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@grafana/faro-core/-/faro-core-1.8.0.tgz#416c34672d1aa846fcb74af88d25c6cd344e9f68" - integrity sha512-bZ3g+YNEmpkKMbBtTa27SX6ZGSdnW+j0FpnrLk3YgcUNJ7vJIpOCr9+DvruTwLfw1HUP9ftW7vvpS7WgRaksuw== +"@grafana/faro-core@^1.8.1": + version "1.8.1" + resolved "https://registry.yarnpkg.com/@grafana/faro-core/-/faro-core-1.8.1.tgz#6bf665ddf56637ea221dc9b8bd843c134e1aa4b5" + integrity sha512-q5308oRifyEDK8ixExd6rBGtogtKYvEHrvXcROvRGxG69+6G5/3S8IFYNGvuEsCMGVVtHcB+cDxZeHLdQseIUQ== dependencies: "@opentelemetry/api" "^1.9.0" "@opentelemetry/otlp-transformer" "^0.52.0" "@grafana/faro-web-sdk@^1.3.6": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@grafana/faro-web-sdk/-/faro-web-sdk-1.8.0.tgz#641260b2066721c5e7bdfa3654d8500c26a85645" - integrity sha512-tIVbX+L8K0W53U0siaZUEJYzIdTN4fmENQbZKGh+QI+NG1GP8gMOaqGD3l8RC2LmDMpooIQX4VA8ZItrptInHQ== + version "1.8.1" + resolved "https://registry.yarnpkg.com/@grafana/faro-web-sdk/-/faro-web-sdk-1.8.1.tgz#aeb354ae8c8cf95d2bab938aaf1d294a11b56796" + integrity sha512-oI+Na7SpZt04CGQ2b/8VEI7NlRblATXYPm+Hh5iEvM1+RhqizVuihb3TXyLoYD4ju5vVowHthA0qFgpaFZckiQ== dependencies: - "@grafana/faro-core" "^1.8.0" + "@grafana/faro-core" "^1.8.1" ua-parser-js "^1.0.32" web-vitals "^4.0.1" @@ -1911,74 +1911,74 @@ dependencies: "@sinonjs/commons" "^3.0.0" -"@swc/core-darwin-arm64@1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.6.6.tgz#9488d50394cb08713c4321a940b48599c1c5e153" - integrity sha512-5DA8NUGECcbcK1YLKJwNDKqdtTYDVnkfDU1WvQSXq/rU+bjYCLtn5gCe8/yzL7ISXA6rwqPU1RDejhbNt4ARLQ== - -"@swc/core-darwin-x64@1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.6.6.tgz#0b13ae43e1821fd447acfb789979c59bec2d0081" - integrity sha512-2nbh/RHpweNRsJiYDFk1KcX7UtaKgzzTNUjwtvK5cp0wWrpbXmPvdlWOx3yzwoiSASDFx78242JHHXCIOlEdsw== - -"@swc/core-linux-arm-gnueabihf@1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.6.6.tgz#8dd3e76b887478cedd38d34f1de3c0b8f853d1b8" - integrity sha512-YgytuyUfR7b0z0SRHKV+ylr83HmgnROgeT7xryEkth6JGpAEHooCspQ4RrWTU8+WKJ7aXiZlGXPgybQ4TiS+TA== - -"@swc/core-linux-arm64-gnu@1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.6.6.tgz#4d6369975d8a077f01cf9f6cee60402529ef67a6" - integrity sha512-yGwx9fddzEE0iURqRVwKBQ4IwRHE6hNhl15WliHpi/PcYhzmYkUIpcbRXjr0dssubXAVPVnx6+jZVDSbutvnfg== - -"@swc/core-linux-arm64-musl@1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.6.6.tgz#5f0ec779e465242796277d07a3100bd5ccaec6ef" - integrity sha512-a6fMbqzSAsS5KCxFJyg1mD5kwN3ZFO8qQLyJ75R/htZP/eCt05jrhmOI7h2n+1HjiG332jLnZ9S8lkVE5O8Nqw== - -"@swc/core-linux-x64-gnu@1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.6.6.tgz#30a92064e016f29b8fe85500fa4e71050c60ae74" - integrity sha512-hRGsUKNzzZle28YF0dYIpN0bt9PceR9LaVBq7x8+l9TAaDLFbgksSxcnU/ubTtsy+WsYSYGn+A83w3xWC0O8CQ== - -"@swc/core-linux-x64-musl@1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.6.6.tgz#59a14e4a90644142b8c90972f5d29cfdde88de78" - integrity sha512-NokIUtFxJDVv3LzGeEtYMTV3j2dnGKLac59luTeq36DQLZdJQawQIdTbzzWl2jE7lxxTZme+dhsVOH9LxE3ceg== - -"@swc/core-win32-arm64-msvc@1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.6.6.tgz#c81f6e9be1df76273100a422ceec887781244b5d" - integrity sha512-lzYdI4qb4k1dFG26yv+9Jaq/bUMAhgs/2JsrLncGjLof86+uj74wKYCQnbzKAsq2hDtS5DqnHnl+//J+miZfGA== - -"@swc/core-win32-ia32-msvc@1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.6.6.tgz#0381e95282fdcf5f5f9731b56dad5c5e4da870ce" - integrity sha512-bvl7FMaXIJQ76WZU0ER4+RyfKIMGb6S2MgRkBhJOOp0i7VFx4WLOnrmMzaeoPJaJSkityVKAftfNh7NBzTIydQ== - -"@swc/core-win32-x64-msvc@1.6.6": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.6.6.tgz#e511013aa3f71125d6385123469cdd30db141070" - integrity sha512-WAP0JoCTfgeYKgOeYJoJV4ZS0sQUmU3OwvXa2dYYtMLF7zsNqOiW4niU7QlThBHgUv/qNZm2p6ITEgh3w1cltw== - -"@swc/core@^1.3.90": - version "1.6.6" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.6.6.tgz#fefaa3a6bdd1c6991a9ed67648bc058a0d29d4b8" - integrity sha512-sHfmIUPUXNrQTwFMVCY5V5Ena2GTOeaWjS2GFUpjLhAgVfP90OP67DWow7+cYrfFtqBdILHuWnjkTcd0+uPKlg== +"@swc/core-darwin-arm64@1.6.7": + version "1.6.7" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.6.7.tgz#e98a0da9635297728a97faf7f4e11c46f8dfbb46" + integrity sha512-sNb+ghP2OhZyUjS7E5Mf3PqSvoXJ5gY6GBaH2qp8WQxx9VL7ozC4HVo6vkeFJBN5cmYqUCLnhrM3HU4W+7yMSA== + +"@swc/core-darwin-x64@1.6.7": + version "1.6.7" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.6.7.tgz#fccd389046a8fe0d8b294f9657b3861046fcd3bb" + integrity sha512-LQwYm/ATYN5fYSYVPMfComPiFo5i8jh75h1ASvNWhXtS+/+k1dq1zXTJWZRuojd5NXgW3bb6mJtJ2evwYIgYbA== + +"@swc/core-linux-arm-gnueabihf@1.6.7": + version "1.6.7" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.6.7.tgz#f384235e5f14870646157017eb06dfbaed0894c0" + integrity sha512-kEDzVhNci38LX3kdY99t68P2CDf+2QFDk5LawVamXH0iN5DRAO/+wjOhxL8KOHa6wQVqKEt5WrhD+Rrvk/34Yw== + +"@swc/core-linux-arm64-gnu@1.6.7": + version "1.6.7" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.6.7.tgz#d2b8c0c6045eecb96bc3f3dfa7fb31b5ab708cdf" + integrity sha512-SyOBUGfl31xLGpIJ/Jd6GKHtkfZyHBXSwFlK7FmPN//MBQLtTBm4ZaWTnWnGo4aRsJwQdXWDKPyqlMBtnIl1nQ== + +"@swc/core-linux-arm64-musl@1.6.7": + version "1.6.7" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.6.7.tgz#6ae2a160ba535b1f4747d35a124f410545092abe" + integrity sha512-1fOAXkDFbRfItEdMZPxT3du1QWYhgToa4YsnqTujjE8EqJW8K27hIcHRIkVuzp7PNhq8nLBg0JpJM4g27EWD7g== + +"@swc/core-linux-x64-gnu@1.6.7": + version "1.6.7" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.6.7.tgz#6ebcf76fa868321c3b079e5c668c137b9b91df49" + integrity sha512-Gp7uCwPsNO5ATxbyvfTyeNCHUGD9oA+xKMm43G1tWCy+l07gLqWMKp7DIr3L3qPD05TfAVo3OuiOn2abpzOFbw== + +"@swc/core-linux-x64-musl@1.6.7": + version "1.6.7" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.6.7.tgz#41531ef3e1c7123d87b7a7a1b984fa2689032621" + integrity sha512-QeruGBZJ15tadqEMQ77ixT/CYGk20MtlS8wmvJiV+Wsb8gPW5LgCjtupzcLLnoQzDG54JGNCeeZ0l/T8NYsOvA== + +"@swc/core-win32-arm64-msvc@1.6.7": + version "1.6.7" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.6.7.tgz#af0b84a54d01bc3aad12acffa98ebb13fc03c3e6" + integrity sha512-ouRqgSnT95lTCiU/6kJRNS5b1o+p8I/V9jxtL21WUj/JOVhsFmBErqQ0MZyCu514noWiR5BIqOrZXR8C1Knx6Q== + +"@swc/core-win32-ia32-msvc@1.6.7": + version "1.6.7" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.6.7.tgz#c454851c05c26f67d2edc399e1cde9d074744ce4" + integrity sha512-eZAP/EmJ0IcfgAx6B4/SpSjq3aT8gr0ooktfMqw/w0/5lnNrbMl2v+2kvxcneNcF7bp8VNcYZnoHlsP+LvmVbA== + +"@swc/core-win32-x64-msvc@1.6.7": + version "1.6.7" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.6.7.tgz#6ee4a3caf3466971e6b5fb2fba4674924507a2de" + integrity sha512-QOdE+7GQg1UQPS6p0KxzJOh/8GLbJ5zI1vqKArCCB0unFqUfKIjYb2TaH0geEBy3w9qtXxe3ZW6hzxtZSS9lDg== + +"@swc/core@^1.6.7": + version "1.6.7" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.6.7.tgz#5d113df161fd8ec29ab8837f385240f41315735e" + integrity sha512-BBzORL9qWz5hZqAZ83yn+WNaD54RH5eludjqIOboolFOK/Pw+2l00/H77H4CEBJnzCIBQszsyqtITmrn4evp0g== dependencies: "@swc/counter" "^0.1.3" "@swc/types" "^0.1.9" optionalDependencies: - "@swc/core-darwin-arm64" "1.6.6" - "@swc/core-darwin-x64" "1.6.6" - "@swc/core-linux-arm-gnueabihf" "1.6.6" - "@swc/core-linux-arm64-gnu" "1.6.6" - "@swc/core-linux-arm64-musl" "1.6.6" - "@swc/core-linux-x64-gnu" "1.6.6" - "@swc/core-linux-x64-musl" "1.6.6" - "@swc/core-win32-arm64-msvc" "1.6.6" - "@swc/core-win32-ia32-msvc" "1.6.6" - "@swc/core-win32-x64-msvc" "1.6.6" + "@swc/core-darwin-arm64" "1.6.7" + "@swc/core-darwin-x64" "1.6.7" + "@swc/core-linux-arm-gnueabihf" "1.6.7" + "@swc/core-linux-arm64-gnu" "1.6.7" + "@swc/core-linux-arm64-musl" "1.6.7" + "@swc/core-linux-x64-gnu" "1.6.7" + "@swc/core-linux-x64-musl" "1.6.7" + "@swc/core-win32-arm64-msvc" "1.6.7" + "@swc/core-win32-ia32-msvc" "1.6.7" + "@swc/core-win32-x64-msvc" "1.6.7" "@swc/counter@^0.1.3": version "0.1.3" @@ -2008,6 +2008,20 @@ dependencies: "@swc/counter" "^0.1.3" +"@testing-library/dom@^10.3.0": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-10.3.0.tgz#f871a4776432c1bf196e643945800ea65c277aae" + integrity sha512-pT/TYB2+IyMYkkB6lqpkzD7VFbsR0JBJtflK3cS68sCNWxmOhWwRm1XvVHlseNEorsNcxkYsb4sRDV3aNIpttg== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/runtime" "^7.12.5" + "@types/aria-query" "^5.0.1" + aria-query "5.3.0" + chalk "^4.1.0" + dom-accessibility-api "^0.5.9" + lz-string "^1.5.0" + pretty-format "^27.0.2" + "@testing-library/jest-dom@6.4.6": version "6.4.6" resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-6.4.6.tgz#ec1df8108651bed5475534955565bed88c6732ce" @@ -2059,6 +2073,11 @@ resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== +"@types/aria-query@^5.0.1": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.4.tgz#1a31c3d378850d2778dabb6374d036dcba4ba708" + integrity sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw== + "@types/babel__core@^7.1.14": version "7.20.5" resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" @@ -2623,9 +2642,9 @@ acorn-walk@^8.0.2, acorn-walk@^8.1.1: acorn "^8.11.0" acorn@^8.1.0, acorn@^8.11.0, acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.1, acorn@^8.8.2, acorn@^8.9.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.0.tgz#1627bfa2e058148036133b8d9b51a700663c294c" - integrity sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw== + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== add-dom-event-listener@^1.1.0: version "1.1.0" @@ -2761,7 +2780,7 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -aria-query@^5.0.0: +aria-query@5.3.0, aria-query@^5.0.0: version "5.3.0" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e" integrity sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A== @@ -3055,9 +3074,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001629: - version "1.0.30001639" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001639.tgz#972b3a6adeacdd8f46af5fc7f771e9639f6c1521" - integrity sha512-eFHflNTBIlFwP2AIKaYuBQN/apnUoKNhBdza8ZnW/h2di4LCZ4xFqYlxUxo+LQ76KFI1PGcC1QDxMbxTZpSCAg== + version "1.0.30001640" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001640.tgz#32c467d4bf1f1a0faa63fc793c2ba81169e7652f" + integrity sha512-lA4VMpW0PSUrFnkmVuEKBUovSWKhj7puyCg8StBChgu298N1AtuF1sKWEvfDuimSEDbhlb/KqPKC3fs1HbuQUA== chalk-template@^1.1.0: version "1.1.0" @@ -3083,7 +3102,7 @@ chalk@^3.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^4.0.0, chalk@^4.1.2: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -3234,9 +3253,9 @@ commander@^2.20.0, commander@^2.20.3: integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== comment-json@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/comment-json/-/comment-json-4.2.3.tgz#50b487ebbf43abe44431f575ebda07d30d015365" - integrity sha512-SsxdiOf064DWoZLH799Ata6u7iV658A11PlWtZATDlXPpKGJnbJZ5Z24ybixAi+LUUqJ/GKowAejtC5GFUG7Tw== + version "4.2.4" + resolved "https://registry.yarnpkg.com/comment-json/-/comment-json-4.2.4.tgz#7d1cfe2e934f0c55ae3c2c2cc0436ba4e8901083" + integrity sha512-E5AjpSW+O+N5T2GsOQMHLLsJvrYw6G/AFt9GvU6NguEAfzKShh7hRiLtVo6S9KbRpFMGqE5ojo0/hE+sdteWvQ== dependencies: array-timsort "^1.0.3" core-util-is "^1.0.3" @@ -3944,6 +3963,11 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-accessibility-api@^0.5.9: + version "0.5.16" + resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz#5a7429e6066eb3664d911e33fb0e45de8eb08453" + integrity sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg== + dom-accessibility-api@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz#993e925cc1d73f2c662e7d75dd5a5445259a8fd8" @@ -4479,11 +4503,6 @@ fast-levenshtein@^2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== -fast-loops@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/fast-loops/-/fast-loops-1.1.3.tgz#ce96adb86d07e7bf9b4822ab9c6fac9964981f75" - integrity sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g== - fast-shallow-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fast-shallow-equal/-/fast-shallow-equal-1.0.0.tgz#d4dcaf6472440dcefa6f88b98e3251e27f25628b" @@ -5125,12 +5144,11 @@ ini@4.1.1: integrity sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g== inline-style-prefixer@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-7.0.0.tgz#991d550735d42069f528ac1bcdacd378d1305442" - integrity sha512-I7GEdScunP1dQ6IM2mQWh6v0mOYdYmH3Bp31UecKdrcUgcURTcctSe1IECdUznSHKSmsHtjrT3CwCPI1pyxfUQ== + version "7.0.1" + resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-7.0.1.tgz#9310f3cfa2c6f3901d1480f373981c02691781e8" + integrity sha512-lhYo5qNTQp3EvSSp3sRvXMbVQTLrvGV6DycRMJ5dm2BLMiJ30wpXKdDdgX+GmJZ5uQMucwRKHamXSst3Sj/Giw== dependencies: css-in-js-utils "^3.1.0" - fast-loops "^1.1.3" internal-slot@^1.0.7: version "1.0.7" @@ -6112,6 +6130,11 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" +lz-string@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" + integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== + make-dir@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" @@ -6760,6 +6783,15 @@ prettier@^3.3.2: resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA== +pretty-format@^27.0.2: + version "27.5.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" + integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== + dependencies: + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^17.0.1" + pretty-format@^29.0.0, pretty-format@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" @@ -7168,7 +7200,7 @@ react-is@^16.12.0, react-is@^16.13.1, react-is@^16.6.0, react-is@^16.7.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-is@^17.0.2: +react-is@^17.0.1, react-is@^17.0.2: version "17.0.2" resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== @@ -8415,9 +8447,9 @@ universalify@^2.0.0: integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== update-browserslist-db@^1.0.16: - version "1.0.16" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356" - integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ== + version "1.1.0" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" + integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== dependencies: escalade "^3.1.2" picocolors "^1.0.1" @@ -8760,9 +8792,9 @@ write-file-atomic@^4.0.2: signal-exit "^3.0.7" ws@^8.11.0: - version "8.17.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" - integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== xdg-basedir@^5.1.0: version "5.1.0"