Set up comprehensive frontend testing infrastructure
- Install Jest for unit testing with React Testing Library - Install Playwright for end-to-end testing - Configure Jest with proper TypeScript support and module mapping - Create test setup files and utilities for both unit and e2e tests Components: * Jest configuration with coverage thresholds * Playwright configuration with browser automation * Unit tests for LoginForm, AuthContext, and useSocketIO hook * E2E tests for authentication, dashboard, and agents workflows * GitHub Actions workflow for automated testing * Mock data and API utilities for consistent testing * Test documentation with best practices Testing features: - Unit tests with 70% coverage threshold - E2E tests with API mocking and user journey testing - CI/CD integration for automated test runs - Cross-browser testing support with Playwright - Authentication system testing end-to-end 🚀 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
5
frontend/node_modules/@testing-library/jest-dom/CHANGELOG.md
generated
vendored
Normal file
5
frontend/node_modules/@testing-library/jest-dom/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# CHANGELOG
|
||||
|
||||
The changelog is automatically updated using
|
||||
[semantic-release](https://github.com/semantic-release/semantic-release). You
|
||||
can see it on the [releases page](../../releases).
|
||||
20
frontend/node_modules/@testing-library/jest-dom/LICENSE
generated
vendored
Normal file
20
frontend/node_modules/@testing-library/jest-dom/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
Copyright (c) 2017 Kent C. Dodds
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
1706
frontend/node_modules/@testing-library/jest-dom/README.md
generated
vendored
Normal file
1706
frontend/node_modules/@testing-library/jest-dom/README.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
12
frontend/node_modules/@testing-library/jest-dom/dist/index.js
generated
vendored
Normal file
12
frontend/node_modules/@testing-library/jest-dom/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
var matchers = require('./matchers-7fb38cd4.js');
|
||||
require('redent');
|
||||
require('@adobe/css-tools');
|
||||
require('dom-accessibility-api');
|
||||
require('aria-query');
|
||||
require('chalk');
|
||||
require('lodash/isEqualWith.js');
|
||||
require('css.escape');
|
||||
|
||||
expect.extend(matchers.extensions);
|
||||
10
frontend/node_modules/@testing-library/jest-dom/dist/index.mjs
generated
vendored
Normal file
10
frontend/node_modules/@testing-library/jest-dom/dist/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { e as extensions } from './matchers-c85aadf8.mjs';
|
||||
import 'redent';
|
||||
import '@adobe/css-tools';
|
||||
import 'dom-accessibility-api';
|
||||
import 'aria-query';
|
||||
import 'chalk';
|
||||
import 'lodash/isEqualWith.js';
|
||||
import 'css.escape';
|
||||
|
||||
expect.extend(extensions);
|
||||
16
frontend/node_modules/@testing-library/jest-dom/dist/jest-globals.js
generated
vendored
Normal file
16
frontend/node_modules/@testing-library/jest-dom/dist/jest-globals.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
var globals = require('@jest/globals');
|
||||
var matchers = require('./matchers-7fb38cd4.js');
|
||||
require('redent');
|
||||
require('@adobe/css-tools');
|
||||
require('dom-accessibility-api');
|
||||
require('aria-query');
|
||||
require('chalk');
|
||||
require('lodash/isEqualWith.js');
|
||||
require('css.escape');
|
||||
|
||||
/* istanbul ignore file */
|
||||
|
||||
|
||||
globals.expect.extend(matchers.extensions);
|
||||
14
frontend/node_modules/@testing-library/jest-dom/dist/jest-globals.mjs
generated
vendored
Normal file
14
frontend/node_modules/@testing-library/jest-dom/dist/jest-globals.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { expect } from '@jest/globals';
|
||||
import { e as extensions } from './matchers-c85aadf8.mjs';
|
||||
import 'redent';
|
||||
import '@adobe/css-tools';
|
||||
import 'dom-accessibility-api';
|
||||
import 'aria-query';
|
||||
import 'chalk';
|
||||
import 'lodash/isEqualWith.js';
|
||||
import 'css.escape';
|
||||
|
||||
/* istanbul ignore file */
|
||||
|
||||
|
||||
expect.extend(extensions);
|
||||
1945
frontend/node_modules/@testing-library/jest-dom/dist/matchers-7fb38cd4.js
generated
vendored
Normal file
1945
frontend/node_modules/@testing-library/jest-dom/dist/matchers-7fb38cd4.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1914
frontend/node_modules/@testing-library/jest-dom/dist/matchers-c85aadf8.mjs
generated
vendored
Normal file
1914
frontend/node_modules/@testing-library/jest-dom/dist/matchers-c85aadf8.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
42
frontend/node_modules/@testing-library/jest-dom/dist/matchers.js
generated
vendored
Normal file
42
frontend/node_modules/@testing-library/jest-dom/dist/matchers.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
'use strict';
|
||||
|
||||
var matchers = require('./matchers-7fb38cd4.js');
|
||||
require('redent');
|
||||
require('@adobe/css-tools');
|
||||
require('dom-accessibility-api');
|
||||
require('aria-query');
|
||||
require('chalk');
|
||||
require('lodash/isEqualWith.js');
|
||||
require('css.escape');
|
||||
|
||||
|
||||
|
||||
exports.toBeChecked = matchers.toBeChecked;
|
||||
exports.toBeDisabled = matchers.toBeDisabled;
|
||||
exports.toBeEmpty = matchers.toBeEmpty;
|
||||
exports.toBeEmptyDOMElement = matchers.toBeEmptyDOMElement;
|
||||
exports.toBeEnabled = matchers.toBeEnabled;
|
||||
exports.toBeInTheDOM = matchers.toBeInTheDOM;
|
||||
exports.toBeInTheDocument = matchers.toBeInTheDocument;
|
||||
exports.toBeInvalid = matchers.toBeInvalid;
|
||||
exports.toBePartiallyChecked = matchers.toBePartiallyChecked;
|
||||
exports.toBeRequired = matchers.toBeRequired;
|
||||
exports.toBeValid = matchers.toBeValid;
|
||||
exports.toBeVisible = matchers.toBeVisible;
|
||||
exports.toContainElement = matchers.toContainElement;
|
||||
exports.toContainHTML = matchers.toContainHTML;
|
||||
exports.toHaveAccessibleDescription = matchers.toHaveAccessibleDescription;
|
||||
exports.toHaveAccessibleErrorMessage = matchers.toHaveAccessibleErrorMessage;
|
||||
exports.toHaveAccessibleName = matchers.toHaveAccessibleName;
|
||||
exports.toHaveAttribute = matchers.toHaveAttribute;
|
||||
exports.toHaveClass = matchers.toHaveClass;
|
||||
exports.toHaveDescription = matchers.toHaveDescription;
|
||||
exports.toHaveDisplayValue = matchers.toHaveDisplayValue;
|
||||
exports.toHaveErrorMessage = matchers.toHaveErrorMessage;
|
||||
exports.toHaveFocus = matchers.toHaveFocus;
|
||||
exports.toHaveFormValues = matchers.toHaveFormValues;
|
||||
exports.toHaveRole = matchers.toHaveRole;
|
||||
exports.toHaveSelection = matchers.toHaveSelection;
|
||||
exports.toHaveStyle = matchers.toHaveStyle;
|
||||
exports.toHaveTextContent = matchers.toHaveTextContent;
|
||||
exports.toHaveValue = matchers.toHaveValue;
|
||||
8
frontend/node_modules/@testing-library/jest-dom/dist/matchers.mjs
generated
vendored
Normal file
8
frontend/node_modules/@testing-library/jest-dom/dist/matchers.mjs
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export { z as toBeChecked, r as toBeDisabled, b as toBeEmpty, c as toBeEmptyDOMElement, s as toBeEnabled, t as toBeInTheDOM, a as toBeInTheDocument, v as toBeInvalid, A as toBePartiallyChecked, u as toBeRequired, w as toBeValid, q as toBeVisible, d as toContainElement, f as toContainHTML, h as toHaveAccessibleDescription, i as toHaveAccessibleErrorMessage, k as toHaveAccessibleName, l as toHaveAttribute, m as toHaveClass, B as toHaveDescription, y as toHaveDisplayValue, C as toHaveErrorMessage, o as toHaveFocus, p as toHaveFormValues, j as toHaveRole, D as toHaveSelection, n as toHaveStyle, g as toHaveTextContent, x as toHaveValue } from './matchers-c85aadf8.mjs';
|
||||
import 'redent';
|
||||
import '@adobe/css-tools';
|
||||
import 'dom-accessibility-api';
|
||||
import 'aria-query';
|
||||
import 'chalk';
|
||||
import 'lodash/isEqualWith.js';
|
||||
import 'css.escape';
|
||||
16
frontend/node_modules/@testing-library/jest-dom/dist/vitest.js
generated
vendored
Normal file
16
frontend/node_modules/@testing-library/jest-dom/dist/vitest.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
var vitest = require('vitest');
|
||||
var matchers = require('./matchers-7fb38cd4.js');
|
||||
require('redent');
|
||||
require('@adobe/css-tools');
|
||||
require('dom-accessibility-api');
|
||||
require('aria-query');
|
||||
require('chalk');
|
||||
require('lodash/isEqualWith.js');
|
||||
require('css.escape');
|
||||
|
||||
/* istanbul ignore file */
|
||||
|
||||
|
||||
vitest.expect.extend(matchers.extensions);
|
||||
14
frontend/node_modules/@testing-library/jest-dom/dist/vitest.mjs
generated
vendored
Normal file
14
frontend/node_modules/@testing-library/jest-dom/dist/vitest.mjs
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { expect } from 'vitest';
|
||||
import { e as extensions } from './matchers-c85aadf8.mjs';
|
||||
import 'redent';
|
||||
import '@adobe/css-tools';
|
||||
import 'dom-accessibility-api';
|
||||
import 'aria-query';
|
||||
import 'chalk';
|
||||
import 'lodash/isEqualWith.js';
|
||||
import 'css.escape';
|
||||
|
||||
/* istanbul ignore file */
|
||||
|
||||
|
||||
expect.extend(extensions);
|
||||
1
frontend/node_modules/@testing-library/jest-dom/jest-globals.d.ts
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/jest-globals.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/// <reference path="types/jest-globals.d.ts" />
|
||||
4
frontend/node_modules/@testing-library/jest-dom/jest-globals.js
generated
vendored
Normal file
4
frontend/node_modules/@testing-library/jest-dom/jest-globals.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
const globals = require('@jest/globals')
|
||||
const extensions = require('./dist/matchers')
|
||||
|
||||
globals.expect.extend(extensions)
|
||||
3
frontend/node_modules/@testing-library/jest-dom/matchers.d.ts
generated
vendored
Normal file
3
frontend/node_modules/@testing-library/jest-dom/matchers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import * as matchers from './types/matchers'
|
||||
|
||||
export = matchers
|
||||
2
frontend/node_modules/@testing-library/jest-dom/matchers.js
generated
vendored
Normal file
2
frontend/node_modules/@testing-library/jest-dom/matchers.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
const matchers = require('./dist/matchers')
|
||||
module.exports = matchers
|
||||
411
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/index.d.ts
generated
vendored
Normal file
411
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,411 @@
|
||||
declare const enum LevelEnum {
|
||||
/**
|
||||
All colors disabled.
|
||||
*/
|
||||
None = 0,
|
||||
|
||||
/**
|
||||
Basic 16 colors support.
|
||||
*/
|
||||
Basic = 1,
|
||||
|
||||
/**
|
||||
ANSI 256 colors support.
|
||||
*/
|
||||
Ansi256 = 2,
|
||||
|
||||
/**
|
||||
Truecolor 16 million colors support.
|
||||
*/
|
||||
TrueColor = 3
|
||||
}
|
||||
|
||||
/**
|
||||
Basic foreground colors.
|
||||
|
||||
[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
|
||||
*/
|
||||
declare type ForegroundColor =
|
||||
| 'black'
|
||||
| 'red'
|
||||
| 'green'
|
||||
| 'yellow'
|
||||
| 'blue'
|
||||
| 'magenta'
|
||||
| 'cyan'
|
||||
| 'white'
|
||||
| 'gray'
|
||||
| 'grey'
|
||||
| 'blackBright'
|
||||
| 'redBright'
|
||||
| 'greenBright'
|
||||
| 'yellowBright'
|
||||
| 'blueBright'
|
||||
| 'magentaBright'
|
||||
| 'cyanBright'
|
||||
| 'whiteBright';
|
||||
|
||||
/**
|
||||
Basic background colors.
|
||||
|
||||
[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
|
||||
*/
|
||||
declare type BackgroundColor =
|
||||
| 'bgBlack'
|
||||
| 'bgRed'
|
||||
| 'bgGreen'
|
||||
| 'bgYellow'
|
||||
| 'bgBlue'
|
||||
| 'bgMagenta'
|
||||
| 'bgCyan'
|
||||
| 'bgWhite'
|
||||
| 'bgGray'
|
||||
| 'bgGrey'
|
||||
| 'bgBlackBright'
|
||||
| 'bgRedBright'
|
||||
| 'bgGreenBright'
|
||||
| 'bgYellowBright'
|
||||
| 'bgBlueBright'
|
||||
| 'bgMagentaBright'
|
||||
| 'bgCyanBright'
|
||||
| 'bgWhiteBright';
|
||||
|
||||
/**
|
||||
Basic colors.
|
||||
|
||||
[More colors here.](https://github.com/chalk/chalk/blob/master/readme.md#256-and-truecolor-color-support)
|
||||
*/
|
||||
declare type Color = ForegroundColor | BackgroundColor;
|
||||
|
||||
declare type Modifiers =
|
||||
| 'reset'
|
||||
| 'bold'
|
||||
| 'dim'
|
||||
| 'italic'
|
||||
| 'underline'
|
||||
| 'inverse'
|
||||
| 'hidden'
|
||||
| 'strikethrough'
|
||||
| 'visible';
|
||||
|
||||
declare namespace chalk {
|
||||
type Level = LevelEnum;
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
Specify the color support for Chalk.
|
||||
By default, color support is automatically detected based on the environment.
|
||||
*/
|
||||
level?: Level;
|
||||
}
|
||||
|
||||
interface Instance {
|
||||
/**
|
||||
Return a new Chalk instance.
|
||||
*/
|
||||
new (options?: Options): Chalk;
|
||||
}
|
||||
|
||||
/**
|
||||
Detect whether the terminal supports color.
|
||||
*/
|
||||
interface ColorSupport {
|
||||
/**
|
||||
The color level used by Chalk.
|
||||
*/
|
||||
level: Level;
|
||||
|
||||
/**
|
||||
Return whether Chalk supports basic 16 colors.
|
||||
*/
|
||||
hasBasic: boolean;
|
||||
|
||||
/**
|
||||
Return whether Chalk supports ANSI 256 colors.
|
||||
*/
|
||||
has256: boolean;
|
||||
|
||||
/**
|
||||
Return whether Chalk supports Truecolor 16 million colors.
|
||||
*/
|
||||
has16m: boolean;
|
||||
}
|
||||
|
||||
interface ChalkFunction {
|
||||
/**
|
||||
Use a template string.
|
||||
|
||||
@remarks Template literals are unsupported for nested calls (see [issue #341](https://github.com/chalk/chalk/issues/341))
|
||||
|
||||
@example
|
||||
```
|
||||
import chalk = require('chalk');
|
||||
|
||||
log(chalk`
|
||||
CPU: {red ${cpu.totalPercent}%}
|
||||
RAM: {green ${ram.used / ram.total * 100}%}
|
||||
DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
|
||||
`);
|
||||
```
|
||||
*/
|
||||
(text: TemplateStringsArray, ...placeholders: unknown[]): string;
|
||||
|
||||
(...text: unknown[]): string;
|
||||
}
|
||||
|
||||
interface Chalk extends ChalkFunction {
|
||||
/**
|
||||
Return a new Chalk instance.
|
||||
*/
|
||||
Instance: Instance;
|
||||
|
||||
/**
|
||||
The color support for Chalk.
|
||||
By default, color support is automatically detected based on the environment.
|
||||
*/
|
||||
level: Level;
|
||||
|
||||
/**
|
||||
Use HEX value to set text color.
|
||||
|
||||
@param color - Hexadecimal value representing the desired color.
|
||||
|
||||
@example
|
||||
```
|
||||
import chalk = require('chalk');
|
||||
|
||||
chalk.hex('#DEADED');
|
||||
```
|
||||
*/
|
||||
hex(color: string): Chalk;
|
||||
|
||||
/**
|
||||
Use keyword color value to set text color.
|
||||
|
||||
@param color - Keyword value representing the desired color.
|
||||
|
||||
@example
|
||||
```
|
||||
import chalk = require('chalk');
|
||||
|
||||
chalk.keyword('orange');
|
||||
```
|
||||
*/
|
||||
keyword(color: string): Chalk;
|
||||
|
||||
/**
|
||||
Use RGB values to set text color.
|
||||
*/
|
||||
rgb(red: number, green: number, blue: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HSL values to set text color.
|
||||
*/
|
||||
hsl(hue: number, saturation: number, lightness: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HSV values to set text color.
|
||||
*/
|
||||
hsv(hue: number, saturation: number, value: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HWB values to set text color.
|
||||
*/
|
||||
hwb(hue: number, whiteness: number, blackness: number): Chalk;
|
||||
|
||||
/**
|
||||
Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set text color.
|
||||
|
||||
30 <= code && code < 38 || 90 <= code && code < 98
|
||||
For example, 31 for red, 91 for redBright.
|
||||
*/
|
||||
ansi(code: number): Chalk;
|
||||
|
||||
/**
|
||||
Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
|
||||
*/
|
||||
ansi256(index: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HEX value to set background color.
|
||||
|
||||
@param color - Hexadecimal value representing the desired color.
|
||||
|
||||
@example
|
||||
```
|
||||
import chalk = require('chalk');
|
||||
|
||||
chalk.bgHex('#DEADED');
|
||||
```
|
||||
*/
|
||||
bgHex(color: string): Chalk;
|
||||
|
||||
/**
|
||||
Use keyword color value to set background color.
|
||||
|
||||
@param color - Keyword value representing the desired color.
|
||||
|
||||
@example
|
||||
```
|
||||
import chalk = require('chalk');
|
||||
|
||||
chalk.bgKeyword('orange');
|
||||
```
|
||||
*/
|
||||
bgKeyword(color: string): Chalk;
|
||||
|
||||
/**
|
||||
Use RGB values to set background color.
|
||||
*/
|
||||
bgRgb(red: number, green: number, blue: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HSL values to set background color.
|
||||
*/
|
||||
bgHsl(hue: number, saturation: number, lightness: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HSV values to set background color.
|
||||
*/
|
||||
bgHsv(hue: number, saturation: number, value: number): Chalk;
|
||||
|
||||
/**
|
||||
Use HWB values to set background color.
|
||||
*/
|
||||
bgHwb(hue: number, whiteness: number, blackness: number): Chalk;
|
||||
|
||||
/**
|
||||
Use a [Select/Set Graphic Rendition](https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_parameters) (SGR) [color code number](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) to set background color.
|
||||
|
||||
30 <= code && code < 38 || 90 <= code && code < 98
|
||||
For example, 31 for red, 91 for redBright.
|
||||
Use the foreground code, not the background code (for example, not 41, nor 101).
|
||||
*/
|
||||
bgAnsi(code: number): Chalk;
|
||||
|
||||
/**
|
||||
Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color.
|
||||
*/
|
||||
bgAnsi256(index: number): Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Resets the current color chain.
|
||||
*/
|
||||
readonly reset: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Make text bold.
|
||||
*/
|
||||
readonly bold: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Emitting only a small amount of light.
|
||||
*/
|
||||
readonly dim: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Make text italic. (Not widely supported)
|
||||
*/
|
||||
readonly italic: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Make text underline. (Not widely supported)
|
||||
*/
|
||||
readonly underline: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Inverse background and foreground colors.
|
||||
*/
|
||||
readonly inverse: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Prints the text, but makes it invisible.
|
||||
*/
|
||||
readonly hidden: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Puts a horizontal line through the center of the text. (Not widely supported)
|
||||
*/
|
||||
readonly strikethrough: Chalk;
|
||||
|
||||
/**
|
||||
Modifier: Prints the text only when Chalk has a color support level > 0.
|
||||
Can be useful for things that are purely cosmetic.
|
||||
*/
|
||||
readonly visible: Chalk;
|
||||
|
||||
readonly black: Chalk;
|
||||
readonly red: Chalk;
|
||||
readonly green: Chalk;
|
||||
readonly yellow: Chalk;
|
||||
readonly blue: Chalk;
|
||||
readonly magenta: Chalk;
|
||||
readonly cyan: Chalk;
|
||||
readonly white: Chalk;
|
||||
|
||||
/*
|
||||
Alias for `blackBright`.
|
||||
*/
|
||||
readonly gray: Chalk;
|
||||
|
||||
/*
|
||||
Alias for `blackBright`.
|
||||
*/
|
||||
readonly grey: Chalk;
|
||||
|
||||
readonly blackBright: Chalk;
|
||||
readonly redBright: Chalk;
|
||||
readonly greenBright: Chalk;
|
||||
readonly yellowBright: Chalk;
|
||||
readonly blueBright: Chalk;
|
||||
readonly magentaBright: Chalk;
|
||||
readonly cyanBright: Chalk;
|
||||
readonly whiteBright: Chalk;
|
||||
|
||||
readonly bgBlack: Chalk;
|
||||
readonly bgRed: Chalk;
|
||||
readonly bgGreen: Chalk;
|
||||
readonly bgYellow: Chalk;
|
||||
readonly bgBlue: Chalk;
|
||||
readonly bgMagenta: Chalk;
|
||||
readonly bgCyan: Chalk;
|
||||
readonly bgWhite: Chalk;
|
||||
|
||||
/*
|
||||
Alias for `bgBlackBright`.
|
||||
*/
|
||||
readonly bgGray: Chalk;
|
||||
|
||||
/*
|
||||
Alias for `bgBlackBright`.
|
||||
*/
|
||||
readonly bgGrey: Chalk;
|
||||
|
||||
readonly bgBlackBright: Chalk;
|
||||
readonly bgRedBright: Chalk;
|
||||
readonly bgGreenBright: Chalk;
|
||||
readonly bgYellowBright: Chalk;
|
||||
readonly bgBlueBright: Chalk;
|
||||
readonly bgMagentaBright: Chalk;
|
||||
readonly bgCyanBright: Chalk;
|
||||
readonly bgWhiteBright: Chalk;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Main Chalk object that allows to chain styles together.
|
||||
Call the last one as a method with a string argument.
|
||||
Order doesn't matter, and later styles take precedent in case of a conflict.
|
||||
This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
|
||||
*/
|
||||
declare const chalk: chalk.Chalk & chalk.ChalkFunction & {
|
||||
supportsColor: chalk.ColorSupport | false;
|
||||
Level: typeof LevelEnum;
|
||||
Color: Color;
|
||||
ForegroundColor: ForegroundColor;
|
||||
BackgroundColor: BackgroundColor;
|
||||
Modifiers: Modifiers;
|
||||
stderr: chalk.Chalk & {supportsColor: chalk.ColorSupport | false};
|
||||
};
|
||||
|
||||
export = chalk;
|
||||
9
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/license
generated
vendored
Normal file
9
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
63
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/package.json
generated
vendored
Normal file
63
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/package.json
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"name": "chalk",
|
||||
"version": "3.0.0",
|
||||
"description": "Terminal string styling done right",
|
||||
"license": "MIT",
|
||||
"repository": "chalk/chalk",
|
||||
"main": "source",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && nyc ava && tsd",
|
||||
"bench": "matcha benchmark.js"
|
||||
},
|
||||
"files": [
|
||||
"source",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"color",
|
||||
"colour",
|
||||
"colors",
|
||||
"terminal",
|
||||
"console",
|
||||
"cli",
|
||||
"string",
|
||||
"str",
|
||||
"ansi",
|
||||
"style",
|
||||
"styles",
|
||||
"tty",
|
||||
"formatting",
|
||||
"rgb",
|
||||
"256",
|
||||
"shell",
|
||||
"xterm",
|
||||
"log",
|
||||
"logging",
|
||||
"command-line",
|
||||
"text"
|
||||
],
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^2.4.0",
|
||||
"coveralls": "^3.0.7",
|
||||
"execa": "^3.2.0",
|
||||
"import-fresh": "^3.1.0",
|
||||
"matcha": "^0.7.0",
|
||||
"nyc": "^14.1.1",
|
||||
"resolve-from": "^5.0.0",
|
||||
"tsd": "^0.7.4",
|
||||
"xo": "^0.25.3"
|
||||
},
|
||||
"xo": {
|
||||
"rules": {
|
||||
"unicorn/prefer-string-slice": "off",
|
||||
"unicorn/prefer-includes": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
304
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/readme.md
generated
vendored
Normal file
304
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/readme.md
generated
vendored
Normal file
@@ -0,0 +1,304 @@
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<br>
|
||||
<img width="320" src="media/logo.svg" alt="Chalk">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
</h1>
|
||||
|
||||
> Terminal string styling done right
|
||||
|
||||
[](https://travis-ci.org/chalk/chalk) [](https://coveralls.io/github/chalk/chalk?branch=master) [](https://www.npmjs.com/package/chalk?activeTab=dependents) [](https://www.npmjs.com/package/chalk) [](https://www.youtube.com/watch?v=9auOCbH5Ns4) [](https://github.com/xojs/xo) 
|
||||
|
||||
<img src="https://cdn.jsdelivr.net/gh/chalk/ansi-styles@8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
|
||||
|
||||
|
||||
## Highlights
|
||||
|
||||
- Expressive API
|
||||
- Highly performant
|
||||
- Ability to nest styles
|
||||
- [256/Truecolor color support](#256-and-truecolor-color-support)
|
||||
- Auto-detects color support
|
||||
- Doesn't extend `String.prototype`
|
||||
- Clean and focused
|
||||
- Actively maintained
|
||||
- [Used by ~46,000 packages](https://www.npmjs.com/browse/depended/chalk) as of October 1, 2019
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```console
|
||||
$ npm install chalk
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
|
||||
console.log(chalk.blue('Hello world!'));
|
||||
```
|
||||
|
||||
Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
const log = console.log;
|
||||
|
||||
// Combine styled and normal strings
|
||||
log(chalk.blue('Hello') + ' World' + chalk.red('!'));
|
||||
|
||||
// Compose multiple styles using the chainable API
|
||||
log(chalk.blue.bgRed.bold('Hello world!'));
|
||||
|
||||
// Pass in multiple arguments
|
||||
log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));
|
||||
|
||||
// Nest styles
|
||||
log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));
|
||||
|
||||
// Nest styles of the same type even (color, underline, background)
|
||||
log(chalk.green(
|
||||
'I am a green line ' +
|
||||
chalk.blue.underline.bold('with a blue substring') +
|
||||
' that becomes green again!'
|
||||
));
|
||||
|
||||
// ES2015 template literal
|
||||
log(`
|
||||
CPU: ${chalk.red('90%')}
|
||||
RAM: ${chalk.green('40%')}
|
||||
DISK: ${chalk.yellow('70%')}
|
||||
`);
|
||||
|
||||
// ES2015 tagged template literal
|
||||
log(chalk`
|
||||
CPU: {red ${cpu.totalPercent}%}
|
||||
RAM: {green ${ram.used / ram.total * 100}%}
|
||||
DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
|
||||
`);
|
||||
|
||||
// Use RGB colors in terminal emulators that support it.
|
||||
log(chalk.keyword('orange')('Yay for orange colored text!'));
|
||||
log(chalk.rgb(123, 45, 67).underline('Underlined reddish color'));
|
||||
log(chalk.hex('#DEADED').bold('Bold gray!'));
|
||||
```
|
||||
|
||||
Easily define your own themes:
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
|
||||
const error = chalk.bold.red;
|
||||
const warning = chalk.keyword('orange');
|
||||
|
||||
console.log(error('Error!'));
|
||||
console.log(warning('Warning!'));
|
||||
```
|
||||
|
||||
Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args):
|
||||
|
||||
```js
|
||||
const name = 'Sindre';
|
||||
console.log(chalk.green('Hello %s'), name);
|
||||
//=> 'Hello Sindre'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### chalk.`<style>[.<style>...](string, [string...])`
|
||||
|
||||
Example: `chalk.red.bold.underline('Hello', 'world');`
|
||||
|
||||
Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
|
||||
|
||||
Multiple arguments will be separated by space.
|
||||
|
||||
### chalk.level
|
||||
|
||||
Specifies the level of color support.
|
||||
|
||||
Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
|
||||
|
||||
If you need to change this in a reusable module, create a new instance:
|
||||
|
||||
```js
|
||||
const ctx = new chalk.Instance({level: 0});
|
||||
```
|
||||
|
||||
| Level | Description |
|
||||
| :---: | :--- |
|
||||
| `0` | All colors disabled |
|
||||
| `1` | Basic color support (16 colors) |
|
||||
| `2` | 256 color support |
|
||||
| `3` | Truecolor support (16 million colors) |
|
||||
|
||||
### chalk.supportsColor
|
||||
|
||||
Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
|
||||
|
||||
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, use the environment variable `FORCE_COLOR=1` (level 1), `FORCE_COLOR=2` (level 2), or `FORCE_COLOR=3` (level 3) to forcefully enable color, or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
|
||||
|
||||
Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
|
||||
|
||||
### chalk.stderr and chalk.stderr.supportsColor
|
||||
|
||||
`chalk.stderr` contains a separate instance configured with color support detected for `stderr` stream instead of `stdout`. Override rules from `chalk.supportsColor` apply to this too. `chalk.stderr.supportsColor` is exposed for convenience.
|
||||
|
||||
|
||||
## Styles
|
||||
|
||||
### Modifiers
|
||||
|
||||
- `reset` - Resets the current color chain.
|
||||
- `bold` - Make text bold.
|
||||
- `dim` - Emitting only a small amount of light.
|
||||
- `italic` - Make text italic. *(Not widely supported)*
|
||||
- `underline` - Make text underline. *(Not widely supported)*
|
||||
- `inverse`- Inverse background and foreground colors.
|
||||
- `hidden` - Prints the text, but makes it invisible.
|
||||
- `strikethrough` - Puts a horizontal line through the center of the text. *(Not widely supported)*
|
||||
- `visible`- Prints the text only when Chalk has a color level > 0. Can be useful for things that are purely cosmetic.
|
||||
|
||||
### Colors
|
||||
|
||||
- `black`
|
||||
- `red`
|
||||
- `green`
|
||||
- `yellow`
|
||||
- `blue`
|
||||
- `magenta`
|
||||
- `cyan`
|
||||
- `white`
|
||||
- `blackBright` (alias: `gray`, `grey`)
|
||||
- `redBright`
|
||||
- `greenBright`
|
||||
- `yellowBright`
|
||||
- `blueBright`
|
||||
- `magentaBright`
|
||||
- `cyanBright`
|
||||
- `whiteBright`
|
||||
|
||||
### Background colors
|
||||
|
||||
- `bgBlack`
|
||||
- `bgRed`
|
||||
- `bgGreen`
|
||||
- `bgYellow`
|
||||
- `bgBlue`
|
||||
- `bgMagenta`
|
||||
- `bgCyan`
|
||||
- `bgWhite`
|
||||
- `bgBlackBright` (alias: `bgGray`, `bgGrey`)
|
||||
- `bgRedBright`
|
||||
- `bgGreenBright`
|
||||
- `bgYellowBright`
|
||||
- `bgBlueBright`
|
||||
- `bgMagentaBright`
|
||||
- `bgCyanBright`
|
||||
- `bgWhiteBright`
|
||||
|
||||
|
||||
## Tagged template literal
|
||||
|
||||
Chalk can be used as a [tagged template literal](http://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals).
|
||||
|
||||
```js
|
||||
const chalk = require('chalk');
|
||||
|
||||
const miles = 18;
|
||||
const calculateFeet = miles => miles * 5280;
|
||||
|
||||
console.log(chalk`
|
||||
There are {bold 5280 feet} in a mile.
|
||||
In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}.
|
||||
`);
|
||||
```
|
||||
|
||||
Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`).
|
||||
|
||||
Template styles are chained exactly like normal Chalk styles. The following two statements are equivalent:
|
||||
|
||||
```js
|
||||
console.log(chalk.bold.rgb(10, 100, 200)('Hello!'));
|
||||
console.log(chalk`{bold.rgb(10,100,200) Hello!}`);
|
||||
```
|
||||
|
||||
Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters.
|
||||
|
||||
All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped.
|
||||
|
||||
|
||||
## 256 and Truecolor color support
|
||||
|
||||
Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps.
|
||||
|
||||
Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red).
|
||||
|
||||
Examples:
|
||||
|
||||
- `chalk.hex('#DEADED').underline('Hello, world!')`
|
||||
- `chalk.keyword('orange')('Some orange text')`
|
||||
- `chalk.rgb(15, 100, 204).inverse('Hello!')`
|
||||
|
||||
Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors).
|
||||
|
||||
- `chalk.bgHex('#DEADED').underline('Hello, world!')`
|
||||
- `chalk.bgKeyword('orange')('Some orange text')`
|
||||
- `chalk.bgRgb(15, 100, 204).inverse('Hello!')`
|
||||
|
||||
The following color models can be used:
|
||||
|
||||
- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')`
|
||||
- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')`
|
||||
- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')`
|
||||
- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')`
|
||||
- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')`
|
||||
- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')`
|
||||
- [`ansi`](https://en.wikipedia.org/wiki/ANSI_escape_code#3/4_bit) - Example: `chalk.ansi(31).bgAnsi(93)('red on yellowBright')`
|
||||
- [`ansi256`](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) - Example: `chalk.bgAnsi256(194)('Honeydew, more or less')`
|
||||
|
||||
|
||||
## Windows
|
||||
|
||||
If you're on Windows, do yourself a favor and use [Windows Terminal](https://github.com/microsoft/terminal) instead of `cmd.exe`.
|
||||
|
||||
|
||||
## Origin story
|
||||
|
||||
[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
|
||||
|
||||
|
||||
## chalk for enterprise
|
||||
|
||||
Available as part of the Tidelift Subscription.
|
||||
|
||||
The maintainers of chalk and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-chalk?utm_source=npm-chalk&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
|
||||
- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal
|
||||
- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
|
||||
- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
|
||||
- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream
|
||||
- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
|
||||
- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
|
||||
- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
|
||||
- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes
|
||||
- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models
|
||||
- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal
|
||||
- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings
|
||||
- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
|
||||
- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
- [Sindre Sorhus](https://github.com/sindresorhus)
|
||||
- [Josh Junon](https://github.com/qix-)
|
||||
233
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/source/index.js
generated
vendored
Normal file
233
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/source/index.js
generated
vendored
Normal file
@@ -0,0 +1,233 @@
|
||||
'use strict';
|
||||
const ansiStyles = require('ansi-styles');
|
||||
const {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');
|
||||
const {
|
||||
stringReplaceAll,
|
||||
stringEncaseCRLFWithFirstIndex
|
||||
} = require('./util');
|
||||
|
||||
// `supportsColor.level` → `ansiStyles.color[name]` mapping
|
||||
const levelMapping = [
|
||||
'ansi',
|
||||
'ansi',
|
||||
'ansi256',
|
||||
'ansi16m'
|
||||
];
|
||||
|
||||
const styles = Object.create(null);
|
||||
|
||||
const applyOptions = (object, options = {}) => {
|
||||
if (options.level > 3 || options.level < 0) {
|
||||
throw new Error('The `level` option should be an integer from 0 to 3');
|
||||
}
|
||||
|
||||
// Detect level if not set manually
|
||||
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
||||
object.level = options.level === undefined ? colorLevel : options.level;
|
||||
};
|
||||
|
||||
class ChalkClass {
|
||||
constructor(options) {
|
||||
return chalkFactory(options);
|
||||
}
|
||||
}
|
||||
|
||||
const chalkFactory = options => {
|
||||
const chalk = {};
|
||||
applyOptions(chalk, options);
|
||||
|
||||
chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
|
||||
|
||||
Object.setPrototypeOf(chalk, Chalk.prototype);
|
||||
Object.setPrototypeOf(chalk.template, chalk);
|
||||
|
||||
chalk.template.constructor = () => {
|
||||
throw new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');
|
||||
};
|
||||
|
||||
chalk.template.Instance = ChalkClass;
|
||||
|
||||
return chalk.template;
|
||||
};
|
||||
|
||||
function Chalk(options) {
|
||||
return chalkFactory(options);
|
||||
}
|
||||
|
||||
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
||||
styles[styleName] = {
|
||||
get() {
|
||||
const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
|
||||
Object.defineProperty(this, styleName, {value: builder});
|
||||
return builder;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
styles.visible = {
|
||||
get() {
|
||||
const builder = createBuilder(this, this._styler, true);
|
||||
Object.defineProperty(this, 'visible', {value: builder});
|
||||
return builder;
|
||||
}
|
||||
};
|
||||
|
||||
const usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];
|
||||
|
||||
for (const model of usedModels) {
|
||||
styles[model] = {
|
||||
get() {
|
||||
const {level} = this;
|
||||
return function (...arguments_) {
|
||||
const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
|
||||
return createBuilder(this, styler, this._isEmpty);
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
for (const model of usedModels) {
|
||||
const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
|
||||
styles[bgModel] = {
|
||||
get() {
|
||||
const {level} = this;
|
||||
return function (...arguments_) {
|
||||
const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
|
||||
return createBuilder(this, styler, this._isEmpty);
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const proto = Object.defineProperties(() => {}, {
|
||||
...styles,
|
||||
level: {
|
||||
enumerable: true,
|
||||
get() {
|
||||
return this._generator.level;
|
||||
},
|
||||
set(level) {
|
||||
this._generator.level = level;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const createStyler = (open, close, parent) => {
|
||||
let openAll;
|
||||
let closeAll;
|
||||
if (parent === undefined) {
|
||||
openAll = open;
|
||||
closeAll = close;
|
||||
} else {
|
||||
openAll = parent.openAll + open;
|
||||
closeAll = close + parent.closeAll;
|
||||
}
|
||||
|
||||
return {
|
||||
open,
|
||||
close,
|
||||
openAll,
|
||||
closeAll,
|
||||
parent
|
||||
};
|
||||
};
|
||||
|
||||
const createBuilder = (self, _styler, _isEmpty) => {
|
||||
const builder = (...arguments_) => {
|
||||
// Single argument is hot path, implicit coercion is faster than anything
|
||||
// eslint-disable-next-line no-implicit-coercion
|
||||
return applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));
|
||||
};
|
||||
|
||||
// `__proto__` is used because we must return a function, but there is
|
||||
// no way to create a function with a different prototype
|
||||
builder.__proto__ = proto; // eslint-disable-line no-proto
|
||||
|
||||
builder._generator = self;
|
||||
builder._styler = _styler;
|
||||
builder._isEmpty = _isEmpty;
|
||||
|
||||
return builder;
|
||||
};
|
||||
|
||||
const applyStyle = (self, string) => {
|
||||
if (self.level <= 0 || !string) {
|
||||
return self._isEmpty ? '' : string;
|
||||
}
|
||||
|
||||
let styler = self._styler;
|
||||
|
||||
if (styler === undefined) {
|
||||
return string;
|
||||
}
|
||||
|
||||
const {openAll, closeAll} = styler;
|
||||
if (string.indexOf('\u001B') !== -1) {
|
||||
while (styler !== undefined) {
|
||||
// Replace any instances already present with a re-opening code
|
||||
// otherwise only the part of the string until said closing code
|
||||
// will be colored, and the rest will simply be 'plain'.
|
||||
string = stringReplaceAll(string, styler.close, styler.open);
|
||||
|
||||
styler = styler.parent;
|
||||
}
|
||||
}
|
||||
|
||||
// We can move both next actions out of loop, because remaining actions in loop won't have
|
||||
// any/visible effect on parts we add here. Close the styling before a linebreak and reopen
|
||||
// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92
|
||||
const lfIndex = string.indexOf('\n');
|
||||
if (lfIndex !== -1) {
|
||||
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
||||
}
|
||||
|
||||
return openAll + string + closeAll;
|
||||
};
|
||||
|
||||
let template;
|
||||
const chalkTag = (chalk, ...strings) => {
|
||||
const [firstString] = strings;
|
||||
|
||||
if (!Array.isArray(firstString)) {
|
||||
// If chalk() was called by itself or with a string,
|
||||
// return the string itself as a string.
|
||||
return strings.join(' ');
|
||||
}
|
||||
|
||||
const arguments_ = strings.slice(1);
|
||||
const parts = [firstString.raw[0]];
|
||||
|
||||
for (let i = 1; i < firstString.length; i++) {
|
||||
parts.push(
|
||||
String(arguments_[i - 1]).replace(/[{}\\]/g, '\\$&'),
|
||||
String(firstString.raw[i])
|
||||
);
|
||||
}
|
||||
|
||||
if (template === undefined) {
|
||||
template = require('./templates');
|
||||
}
|
||||
|
||||
return template(chalk, parts.join(''));
|
||||
};
|
||||
|
||||
Object.defineProperties(Chalk.prototype, styles);
|
||||
|
||||
const chalk = Chalk(); // eslint-disable-line new-cap
|
||||
chalk.supportsColor = stdoutColor;
|
||||
chalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap
|
||||
chalk.stderr.supportsColor = stderrColor;
|
||||
|
||||
// For TypeScript
|
||||
chalk.Level = {
|
||||
None: 0,
|
||||
Basic: 1,
|
||||
Ansi256: 2,
|
||||
TrueColor: 3,
|
||||
0: 'None',
|
||||
1: 'Basic',
|
||||
2: 'Ansi256',
|
||||
3: 'TrueColor'
|
||||
};
|
||||
|
||||
module.exports = chalk;
|
||||
134
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/source/templates.js
generated
vendored
Normal file
134
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/source/templates.js
generated
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
'use strict';
|
||||
const TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
||||
const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
||||
const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
||||
const ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi;
|
||||
|
||||
const ESCAPES = new Map([
|
||||
['n', '\n'],
|
||||
['r', '\r'],
|
||||
['t', '\t'],
|
||||
['b', '\b'],
|
||||
['f', '\f'],
|
||||
['v', '\v'],
|
||||
['0', '\0'],
|
||||
['\\', '\\'],
|
||||
['e', '\u001B'],
|
||||
['a', '\u0007']
|
||||
]);
|
||||
|
||||
function unescape(c) {
|
||||
const u = c[0] === 'u';
|
||||
const bracket = c[1] === '{';
|
||||
|
||||
if ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
|
||||
return String.fromCharCode(parseInt(c.slice(1), 16));
|
||||
}
|
||||
|
||||
if (u && bracket) {
|
||||
return String.fromCodePoint(parseInt(c.slice(2, -1), 16));
|
||||
}
|
||||
|
||||
return ESCAPES.get(c) || c;
|
||||
}
|
||||
|
||||
function parseArguments(name, arguments_) {
|
||||
const results = [];
|
||||
const chunks = arguments_.trim().split(/\s*,\s*/g);
|
||||
let matches;
|
||||
|
||||
for (const chunk of chunks) {
|
||||
const number = Number(chunk);
|
||||
if (!Number.isNaN(number)) {
|
||||
results.push(number);
|
||||
} else if ((matches = chunk.match(STRING_REGEX))) {
|
||||
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));
|
||||
} else {
|
||||
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
function parseStyle(style) {
|
||||
STYLE_REGEX.lastIndex = 0;
|
||||
|
||||
const results = [];
|
||||
let matches;
|
||||
|
||||
while ((matches = STYLE_REGEX.exec(style)) !== null) {
|
||||
const name = matches[1];
|
||||
|
||||
if (matches[2]) {
|
||||
const args = parseArguments(name, matches[2]);
|
||||
results.push([name].concat(args));
|
||||
} else {
|
||||
results.push([name]);
|
||||
}
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
function buildStyle(chalk, styles) {
|
||||
const enabled = {};
|
||||
|
||||
for (const layer of styles) {
|
||||
for (const style of layer.styles) {
|
||||
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
||||
}
|
||||
}
|
||||
|
||||
let current = chalk;
|
||||
for (const [styleName, styles] of Object.entries(enabled)) {
|
||||
if (!Array.isArray(styles)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(styleName in current)) {
|
||||
throw new Error(`Unknown Chalk style: ${styleName}`);
|
||||
}
|
||||
|
||||
current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
|
||||
}
|
||||
|
||||
return current;
|
||||
}
|
||||
|
||||
module.exports = (chalk, temporary) => {
|
||||
const styles = [];
|
||||
const chunks = [];
|
||||
let chunk = [];
|
||||
|
||||
// eslint-disable-next-line max-params
|
||||
temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
|
||||
if (escapeCharacter) {
|
||||
chunk.push(unescape(escapeCharacter));
|
||||
} else if (style) {
|
||||
const string = chunk.join('');
|
||||
chunk = [];
|
||||
chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
|
||||
styles.push({inverse, styles: parseStyle(style)});
|
||||
} else if (close) {
|
||||
if (styles.length === 0) {
|
||||
throw new Error('Found extraneous } in Chalk template literal');
|
||||
}
|
||||
|
||||
chunks.push(buildStyle(chalk, styles)(chunk.join('')));
|
||||
chunk = [];
|
||||
styles.pop();
|
||||
} else {
|
||||
chunk.push(character);
|
||||
}
|
||||
});
|
||||
|
||||
chunks.push(chunk.join(''));
|
||||
|
||||
if (styles.length > 0) {
|
||||
const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
|
||||
throw new Error(errMsg);
|
||||
}
|
||||
|
||||
return chunks.join('');
|
||||
};
|
||||
39
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/source/util.js
generated
vendored
Normal file
39
frontend/node_modules/@testing-library/jest-dom/node_modules/chalk/source/util.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
|
||||
const stringReplaceAll = (string, substring, replacer) => {
|
||||
let index = string.indexOf(substring);
|
||||
if (index === -1) {
|
||||
return string;
|
||||
}
|
||||
|
||||
const substringLength = substring.length;
|
||||
let endIndex = 0;
|
||||
let returnValue = '';
|
||||
do {
|
||||
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
|
||||
endIndex = index + substringLength;
|
||||
index = string.indexOf(substring, endIndex);
|
||||
} while (index !== -1);
|
||||
|
||||
returnValue += string.substr(endIndex);
|
||||
return returnValue;
|
||||
};
|
||||
|
||||
const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
|
||||
let endIndex = 0;
|
||||
let returnValue = '';
|
||||
do {
|
||||
const gotCR = string[index - 1] === '\r';
|
||||
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\r\n' : '\n') + postfix;
|
||||
endIndex = index + 1;
|
||||
index = string.indexOf('\n', endIndex);
|
||||
} while (index !== -1);
|
||||
|
||||
returnValue += string.substr(endIndex);
|
||||
return returnValue;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
stringReplaceAll,
|
||||
stringEncaseCRLFWithFirstIndex
|
||||
};
|
||||
21
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/LICENSE.md
generated
vendored
Normal file
21
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Sebastian Silbermann
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
220
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/README.md
generated
vendored
Normal file
220
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/README.md
generated
vendored
Normal file
@@ -0,0 +1,220 @@
|
||||
# dom-accessibility-api
|
||||
|
||||
[](https://badge.fury.io/js/dom-accessibility-api)
|
||||
[](https://dev.azure.com/silbermannsebastian/dom-accessibility-api/_build/latest?definitionId=6&branchName=main)
|
||||

|
||||
|
||||
Computes the accessible name or description of a given DOM Element.
|
||||
https://w3c.github.io/accname/ implemented in JavaScript for testing.
|
||||
|
||||
```bash
|
||||
$ yarn add dom-accessibility-api
|
||||
```
|
||||
|
||||
```js
|
||||
import {
|
||||
computeAccessibleName,
|
||||
computeAccessibleDescription,
|
||||
} from "dom-accessibility-api";
|
||||
```
|
||||
|
||||
I'm not an editor of any of the referenced specs (nor very experience with using them) so if you got any insights, something catches
|
||||
your eye please open an issue.
|
||||
|
||||
## Supported environments
|
||||
|
||||
**WARNING**: Only [active node versions](https://nodejs.org/en/about/releases/) are supported.
|
||||
Inactive node versions can stop working in a SemVer MINOR release.
|
||||
|
||||
```bash
|
||||
ie 11
|
||||
edge >= 14
|
||||
firefox >= 52
|
||||
chrome >= 49
|
||||
safari >= 10
|
||||
node 10.0
|
||||
```
|
||||
|
||||
## progress
|
||||
|
||||
Using https://github.com/web-platform-tests/wpt. Be sure to init submodules when
|
||||
cloning. See [the test readme](/tests/README.md) for more info about the test setup.
|
||||
|
||||
### browser (Chrome)
|
||||
|
||||
153/159
|
||||
|
||||
### jsdom
|
||||
|
||||
<details>
|
||||
<summary>report 138/159 passing of which 15 are due `::before { content }`, one might be a wrong test, 5 are pathological </summary>
|
||||
|
||||
```bash
|
||||
web-platform-tests
|
||||
accname
|
||||
✓ [expected fail] description_1.0_combobox-focusable-manual.html
|
||||
✓ [expected fail] description_from_content_of_describedby_element-manual.html
|
||||
✓ description_link-with-label-manual.html
|
||||
✓ description_test_case_557-manual.html
|
||||
✓ description_test_case_664-manual.html
|
||||
✓ description_test_case_665-manual.html
|
||||
✓ description_test_case_666-manual.html
|
||||
✓ description_test_case_772-manual.html
|
||||
✓ description_test_case_773-manual.html
|
||||
✓ description_test_case_774-manual.html
|
||||
✓ description_test_case_838-manual.html
|
||||
✓ description_test_case_broken_reference-manual.html
|
||||
✓ description_test_case_one_valid_reference-manual.html
|
||||
✓ description_title-same-element-manual.html
|
||||
✓ name_1.0_combobox-focusable-alternative-manual.html
|
||||
✓ name_1.0_combobox-focusable-manual.html
|
||||
✓ name_checkbox-label-embedded-combobox-manual.html
|
||||
✓ name_checkbox-label-embedded-listbox-manual.html
|
||||
✓ name_checkbox-label-embedded-menu-manual.html
|
||||
✓ name_checkbox-label-embedded-select-manual.html
|
||||
✓ name_checkbox-label-embedded-slider-manual.html
|
||||
✓ name_checkbox-label-embedded-spinbutton-manual.html
|
||||
✓ name_checkbox-label-embedded-textbox-manual.html
|
||||
✓ name_checkbox-label-multiple-label-alternative-manual.html
|
||||
✓ name_checkbox-label-multiple-label-manual.html
|
||||
✓ name_checkbox-title-manual.html
|
||||
✓ name_file-label-embedded-combobox-manual.html
|
||||
✓ name_file-label-embedded-menu-manual.html
|
||||
✓ name_file-label-embedded-select-manual.html
|
||||
✓ name_file-label-embedded-slider-manual.html
|
||||
✓ name_file-label-embedded-spinbutton-manual.html
|
||||
✓ [expected fail] name_file-label-inline-block-elements-manual.html
|
||||
✓ [expected fail] name_file-label-inline-block-styles-manual.html
|
||||
✓ name_file-label-inline-hidden-elements-manual.html
|
||||
✓ name_file-label-owned-combobox-manual.html
|
||||
✓ name_file-label-owned-combobox-owned-listbox-manual.html
|
||||
✓ name_file-title-manual.html
|
||||
✓ name_from_content-manual.html
|
||||
✓ name_from_content_of_label-manual.html
|
||||
✓ name_from_content_of_labelledby_element-manual.html
|
||||
✓ name_from_content_of_labelledby_elements_one_of_which_is_hidden-manual.html
|
||||
✓ name_heading-combobox-focusable-alternative-manual.html
|
||||
✓ name_image-title-manual.html
|
||||
✓ name_link-mixed-content-manual.html
|
||||
✓ name_link-with-label-manual.html
|
||||
✓ name_password-label-embedded-combobox-manual.html
|
||||
✓ name_password-label-embedded-menu-manual.html
|
||||
✓ name_password-label-embedded-select-manual.html
|
||||
✓ name_password-label-embedded-slider-manual.html
|
||||
✓ name_password-label-embedded-spinbutton-manual.html
|
||||
✓ name_password-title-manual.html
|
||||
✓ name_radio-label-embedded-combobox-manual.html
|
||||
✓ name_radio-label-embedded-menu-manual.html
|
||||
✓ name_radio-label-embedded-select-manual.html
|
||||
✓ name_radio-label-embedded-slider-manual.html
|
||||
✓ name_radio-label-embedded-spinbutton-manual.html
|
||||
✓ name_radio-title-manual.html
|
||||
✓ name_test_case_539-manual.html
|
||||
✓ name_test_case_540-manual.html
|
||||
✓ name_test_case_541-manual.html
|
||||
✓ name_test_case_543-manual.html
|
||||
✓ name_test_case_544-manual.html
|
||||
✓ name_test_case_545-manual.html
|
||||
✓ name_test_case_546-manual.html
|
||||
✓ name_test_case_547-manual.html
|
||||
✓ name_test_case_548-manual.html
|
||||
✓ name_test_case_549-manual.html
|
||||
✓ name_test_case_550-manual.html
|
||||
✓ name_test_case_551-manual.html
|
||||
✓ [expected fail] name_test_case_552-manual.html
|
||||
✓ [expected fail] name_test_case_553-manual.html
|
||||
✓ name_test_case_556-manual.html
|
||||
✓ name_test_case_557-manual.html
|
||||
✓ name_test_case_558-manual.html
|
||||
✓ name_test_case_559-manual.html
|
||||
✓ name_test_case_560-manual.html
|
||||
✓ name_test_case_561-manual.html
|
||||
✓ name_test_case_562-manual.html
|
||||
✓ name_test_case_563-manual.html
|
||||
✓ name_test_case_564-manual.html
|
||||
✓ name_test_case_565-manual.html
|
||||
✓ name_test_case_566-manual.html
|
||||
✓ name_test_case_596-manual.html
|
||||
✓ name_test_case_597-manual.html
|
||||
✓ name_test_case_598-manual.html
|
||||
✓ name_test_case_599-manual.html
|
||||
✓ name_test_case_600-manual.html
|
||||
✓ name_test_case_601-manual.html
|
||||
✓ name_test_case_602-manual.html
|
||||
✓ name_test_case_603-manual.html
|
||||
✓ name_test_case_604-manual.html
|
||||
✓ name_test_case_605-manual.html
|
||||
✓ name_test_case_606-manual.html
|
||||
✓ name_test_case_607-manual.html
|
||||
✓ name_test_case_608-manual.html
|
||||
✓ name_test_case_609-manual.html
|
||||
✓ name_test_case_610-manual.html
|
||||
✓ name_test_case_611-manual.html
|
||||
✓ name_test_case_612-manual.html
|
||||
✓ name_test_case_613-manual.html
|
||||
✓ name_test_case_614-manual.html
|
||||
✓ name_test_case_615-manual.html
|
||||
✓ name_test_case_616-manual.html
|
||||
✓ name_test_case_617-manual.html
|
||||
✓ name_test_case_618-manual.html
|
||||
✓ name_test_case_619-manual.html
|
||||
✓ name_test_case_620-manual.html
|
||||
✓ name_test_case_621-manual.html
|
||||
✓ [expected fail] name_test_case_659-manual.html
|
||||
✓ [expected fail] name_test_case_660-manual.html
|
||||
✓ [expected fail] name_test_case_661-manual.html
|
||||
✓ [expected fail] name_test_case_662-manual.html
|
||||
✓ [expected fail] name_test_case_663a-manual.html
|
||||
✓ name_test_case_721-manual.html
|
||||
✓ name_test_case_723-manual.html
|
||||
✓ name_test_case_724-manual.html
|
||||
✓ name_test_case_725-manual.html
|
||||
✓ name_test_case_726-manual.html
|
||||
✓ name_test_case_727-manual.html
|
||||
✓ name_test_case_728-manual.html
|
||||
✓ name_test_case_729-manual.html
|
||||
✓ name_test_case_730-manual.html
|
||||
✓ name_test_case_731-manual.html
|
||||
✓ name_test_case_733-manual.html
|
||||
✓ name_test_case_734-manual.html
|
||||
✓ name_test_case_735-manual.html
|
||||
✓ name_test_case_736-manual.html
|
||||
✓ name_test_case_737-manual.html
|
||||
✓ name_test_case_738-manual.html
|
||||
✓ name_test_case_739-manual.html
|
||||
✓ name_test_case_740-manual.html
|
||||
✓ name_test_case_741-manual.html
|
||||
✓ name_test_case_742-manual.html
|
||||
✓ name_test_case_743-manual.html
|
||||
✓ name_test_case_744-manual.html
|
||||
✓ name_test_case_745-manual.html
|
||||
✓ name_test_case_746-manual.html
|
||||
✓ name_test_case_747-manual.html
|
||||
✓ name_test_case_748-manual.html
|
||||
✓ name_test_case_749-manual.html
|
||||
✓ name_test_case_750-manual.html
|
||||
✓ name_test_case_751-manual.html
|
||||
✓ name_test_case_752-manual.html
|
||||
✓ [expected fail] name_test_case_753-manual.html
|
||||
✓ [expected fail] name_test_case_754-manual.html
|
||||
✓ [expected fail] name_test_case_755-manual.html
|
||||
✓ [expected fail] name_test_case_756-manual.html
|
||||
✓ [expected fail] name_test_case_757-manual.html
|
||||
✓ [expected fail] name_test_case_758-manual.html
|
||||
✓ [expected fail] name_test_case_759-manual.html
|
||||
✓ [expected fail] name_test_case_760-manual.html
|
||||
✓ [expected fail] name_test_case_761-manual.html
|
||||
✓ [expected fail] name_test_case_762-manual.html
|
||||
✓ name_text-label-embedded-combobox-manual.html
|
||||
✓ name_text-label-embedded-menu-manual.html
|
||||
✓ name_text-label-embedded-select-manual.html
|
||||
✓ name_text-label-embedded-slider-manual.html
|
||||
✓ name_text-label-embedded-spinbutton-manual.html
|
||||
✓ name_text-title-manual.html
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## missing
|
||||
|
||||
- visibility context (inherited but can reappear; currently reappearing wont't work)
|
||||
8
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.d.ts
generated
vendored
Normal file
8
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { ComputeTextAlternativeOptions } from "./accessible-name-and-description";
|
||||
/**
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export declare function computeAccessibleDescription(root: Element, options?: ComputeTextAlternativeOptions): string;
|
||||
//# sourceMappingURL=accessible-description.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-description.d.ts","sourceRoot":"","sources":["../sources/accessible-description.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,6BAA6B,EAC7B,MAAM,mCAAmC,CAAC;AAG3C;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC3C,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,6BAAkC,GACzC,MAAM,CA6BR"}
|
||||
45
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.js
generated
vendored
Normal file
45
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.computeAccessibleDescription = computeAccessibleDescription;
|
||||
var _accessibleNameAndDescription = require("./accessible-name-and-description");
|
||||
var _util = require("./util");
|
||||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
/**
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
function computeAccessibleDescription(root) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var description = (0, _util.queryIdRefs)(root, "aria-describedby").map(function (element) {
|
||||
return (0, _accessibleNameAndDescription.computeTextAlternative)(element, _objectSpread(_objectSpread({}, options), {}, {
|
||||
compute: "description"
|
||||
}));
|
||||
}).join(" ");
|
||||
|
||||
// TODO: Technically we need to make sure that node wasn't used for the accessible name
|
||||
// This causes `description_1.0_combobox-focusable-manual` to fail
|
||||
|
||||
// https://w3c.github.io/aria/#aria-description
|
||||
// mentions that aria-description should only be calculated if aria-describedby didn't provide
|
||||
// a description
|
||||
if (description === "") {
|
||||
var ariaDescription = root.getAttribute("aria-description");
|
||||
description = ariaDescription === null ? "" : ariaDescription;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/html-aam-1.0/#accessible-name-and-description-computation
|
||||
// says for so many elements to use the `title` that we assume all elements are considered
|
||||
if (description === "") {
|
||||
var title = root.getAttribute("title");
|
||||
description = title === null ? "" : title;
|
||||
}
|
||||
return description;
|
||||
}
|
||||
//# sourceMappingURL=accessible-description.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-description.js","names":["_accessibleNameAndDescription","require","_util","_typeof","o","Symbol","iterator","constructor","prototype","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","key","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","call","TypeError","Number","computeAccessibleDescription","root","options","description","queryIdRefs","map","element","computeTextAlternative","compute","join","ariaDescription","getAttribute","title"],"sources":["../sources/accessible-description.ts"],"sourcesContent":["import {\n\tcomputeTextAlternative,\n\tComputeTextAlternativeOptions,\n} from \"./accessible-name-and-description\";\nimport { queryIdRefs } from \"./util\";\n\n/**\n * @param root\n * @param options\n * @returns\n */\nexport function computeAccessibleDescription(\n\troot: Element,\n\toptions: ComputeTextAlternativeOptions = {},\n): string {\n\tlet description = queryIdRefs(root, \"aria-describedby\")\n\t\t.map((element) => {\n\t\t\treturn computeTextAlternative(element, {\n\t\t\t\t...options,\n\t\t\t\tcompute: \"description\",\n\t\t\t});\n\t\t})\n\t\t.join(\" \");\n\n\t// TODO: Technically we need to make sure that node wasn't used for the accessible name\n\t// This causes `description_1.0_combobox-focusable-manual` to fail\n\n\t// https://w3c.github.io/aria/#aria-description\n\t// mentions that aria-description should only be calculated if aria-describedby didn't provide\n\t// a description\n\tif (description === \"\") {\n\t\tconst ariaDescription = root.getAttribute(\"aria-description\");\n\t\tdescription = ariaDescription === null ? \"\" : ariaDescription;\n\t}\n\n\t// https://www.w3.org/TR/html-aam-1.0/#accessible-name-and-description-computation\n\t// says for so many elements to use the `title` that we assume all elements are considered\n\tif (description === \"\") {\n\t\tconst title = root.getAttribute(\"title\");\n\t\tdescription = title === null ? \"\" : title;\n\t}\n\n\treturn description;\n}\n"],"mappings":";;;;AAAA,IAAAA,6BAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AAAqC,SAAAE,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,CAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,CAAA,KAAAD,OAAA,CAAAC,CAAA;AAAA,SAAAK,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAX,CAAA,GAAAS,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAP,CAAA,GAAAA,CAAA,CAAAY,MAAA,WAAAL,CAAA,WAAAE,MAAA,CAAAI,wBAAA,CAAAP,CAAA,EAAAC,CAAA,EAAAO,UAAA,OAAAN,CAAA,CAAAO,IAAA,CAAAC,KAAA,CAAAR,CAAA,EAAAR,CAAA,YAAAQ,CAAA;AAAA,SAAAS,cAAAX,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAW,SAAA,CAAAC,MAAA,EAAAZ,CAAA,UAAAC,CAAA,WAAAU,SAAA,CAAAX,CAAA,IAAAW,SAAA,CAAAX,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAY,OAAA,WAAAb,CAAA,IAAAc,eAAA,CAAAf,CAAA,EAAAC,CAAA,EAAAC,CAAA,CAAAD,CAAA,SAAAE,MAAA,CAAAa,yBAAA,GAAAb,MAAA,CAAAc,gBAAA,CAAAjB,CAAA,EAAAG,MAAA,CAAAa,yBAAA,CAAAd,CAAA,KAAAH,OAAA,CAAAI,MAAA,CAAAD,CAAA,GAAAY,OAAA,WAAAb,CAAA,IAAAE,MAAA,CAAAe,cAAA,CAAAlB,CAAA,EAAAC,CAAA,EAAAE,MAAA,CAAAI,wBAAA,CAAAL,CAAA,EAAAD,CAAA,iBAAAD,CAAA;AAAA,SAAAe,gBAAAI,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAhB,MAAA,CAAAe,cAAA,CAAAC,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAb,UAAA,QAAAe,YAAA,QAAAC,QAAA,oBAAAL,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAG,GAAA,QAAAL,GAAA,GAAAM,YAAA,CAAAD,GAAA,oBAAAhC,OAAA,CAAA2B,GAAA,iBAAAA,GAAA,GAAAO,MAAA,CAAAP,GAAA;AAAA,SAAAM,aAAAE,KAAA,EAAAC,IAAA,QAAApC,OAAA,CAAAmC,KAAA,kBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAjC,MAAA,CAAAoC,WAAA,OAAAD,IAAA,KAAAE,SAAA,QAAAC,GAAA,GAAAH,IAAA,CAAAI,IAAA,CAAAN,KAAA,EAAAC,IAAA,oBAAApC,OAAA,CAAAwC,GAAA,uBAAAA,GAAA,YAAAE,SAAA,4DAAAN,IAAA,gBAAAF,MAAA,GAAAS,MAAA,EAAAR,KAAA;AAErC;AACA;AACA;AACA;AACA;AACO,SAASS,4BAA4BA,CAC3CC,IAAa,EAEJ;EAAA,IADTC,OAAsC,GAAA3B,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAoB,SAAA,GAAApB,SAAA,MAAG,CAAC,CAAC;EAE3C,IAAI4B,WAAW,GAAG,IAAAC,iBAAW,EAACH,IAAI,EAAE,kBAAkB,CAAC,CACrDI,GAAG,CAAC,UAACC,OAAO,EAAK;IACjB,OAAO,IAAAC,oDAAsB,EAACD,OAAO,EAAAhC,aAAA,CAAAA,aAAA,KACjC4B,OAAO;MACVM,OAAO,EAAE;IAAa,EACtB,CAAC;EACH,CAAC,CAAC,CACDC,IAAI,CAAC,GAAG,CAAC;;EAEX;EACA;;EAEA;EACA;EACA;EACA,IAAIN,WAAW,KAAK,EAAE,EAAE;IACvB,IAAMO,eAAe,GAAGT,IAAI,CAACU,YAAY,CAAC,kBAAkB,CAAC;IAC7DR,WAAW,GAAGO,eAAe,KAAK,IAAI,GAAG,EAAE,GAAGA,eAAe;EAC9D;;EAEA;EACA;EACA,IAAIP,WAAW,KAAK,EAAE,EAAE;IACvB,IAAMS,KAAK,GAAGX,IAAI,CAACU,YAAY,CAAC,OAAO,CAAC;IACxCR,WAAW,GAAGS,KAAK,KAAK,IAAI,GAAG,EAAE,GAAGA,KAAK;EAC1C;EAEA,OAAOT,WAAW;AACnB"}
|
||||
42
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.mjs
generated
vendored
Normal file
42
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.mjs
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
import { computeTextAlternative } from "./accessible-name-and-description.mjs";
|
||||
import { queryIdRefs } from "./util.mjs";
|
||||
|
||||
/**
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export function computeAccessibleDescription(root) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var description = queryIdRefs(root, "aria-describedby").map(function (element) {
|
||||
return computeTextAlternative(element, _objectSpread(_objectSpread({}, options), {}, {
|
||||
compute: "description"
|
||||
}));
|
||||
}).join(" ");
|
||||
|
||||
// TODO: Technically we need to make sure that node wasn't used for the accessible name
|
||||
// This causes `description_1.0_combobox-focusable-manual` to fail
|
||||
|
||||
// https://w3c.github.io/aria/#aria-description
|
||||
// mentions that aria-description should only be calculated if aria-describedby didn't provide
|
||||
// a description
|
||||
if (description === "") {
|
||||
var ariaDescription = root.getAttribute("aria-description");
|
||||
description = ariaDescription === null ? "" : ariaDescription;
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/html-aam-1.0/#accessible-name-and-description-computation
|
||||
// says for so many elements to use the `title` that we assume all elements are considered
|
||||
if (description === "") {
|
||||
var title = root.getAttribute("title");
|
||||
description = title === null ? "" : title;
|
||||
}
|
||||
return description;
|
||||
}
|
||||
//# sourceMappingURL=accessible-description.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-description.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-description.mjs","names":["computeTextAlternative","queryIdRefs","computeAccessibleDescription","root","options","arguments","length","undefined","description","map","element","_objectSpread","compute","join","ariaDescription","getAttribute","title"],"sources":["../sources/accessible-description.ts"],"sourcesContent":["import {\n\tcomputeTextAlternative,\n\tComputeTextAlternativeOptions,\n} from \"./accessible-name-and-description\";\nimport { queryIdRefs } from \"./util\";\n\n/**\n * @param root\n * @param options\n * @returns\n */\nexport function computeAccessibleDescription(\n\troot: Element,\n\toptions: ComputeTextAlternativeOptions = {},\n): string {\n\tlet description = queryIdRefs(root, \"aria-describedby\")\n\t\t.map((element) => {\n\t\t\treturn computeTextAlternative(element, {\n\t\t\t\t...options,\n\t\t\t\tcompute: \"description\",\n\t\t\t});\n\t\t})\n\t\t.join(\" \");\n\n\t// TODO: Technically we need to make sure that node wasn't used for the accessible name\n\t// This causes `description_1.0_combobox-focusable-manual` to fail\n\n\t// https://w3c.github.io/aria/#aria-description\n\t// mentions that aria-description should only be calculated if aria-describedby didn't provide\n\t// a description\n\tif (description === \"\") {\n\t\tconst ariaDescription = root.getAttribute(\"aria-description\");\n\t\tdescription = ariaDescription === null ? \"\" : ariaDescription;\n\t}\n\n\t// https://www.w3.org/TR/html-aam-1.0/#accessible-name-and-description-computation\n\t// says for so many elements to use the `title` that we assume all elements are considered\n\tif (description === \"\") {\n\t\tconst title = root.getAttribute(\"title\");\n\t\tdescription = title === null ? \"\" : title;\n\t}\n\n\treturn description;\n}\n"],"mappings":";;;;;;AAAA,SACCA,sBAAsB,QAEhB,uCAAmC;AAC1C,SAASC,WAAW,QAAQ,YAAQ;;AAEpC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,4BAA4BA,CAC3CC,IAAa,EAEJ;EAAA,IADTC,OAAsC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE3C,IAAIG,WAAW,GAAGP,WAAW,CAACE,IAAI,EAAE,kBAAkB,CAAC,CACrDM,GAAG,CAAC,UAACC,OAAO,EAAK;IACjB,OAAOV,sBAAsB,CAACU,OAAO,EAAAC,aAAA,CAAAA,aAAA,KACjCP,OAAO;MACVQ,OAAO,EAAE;IAAa,EACtB,CAAC;EACH,CAAC,CAAC,CACDC,IAAI,CAAC,GAAG,CAAC;;EAEX;EACA;;EAEA;EACA;EACA;EACA,IAAIL,WAAW,KAAK,EAAE,EAAE;IACvB,IAAMM,eAAe,GAAGX,IAAI,CAACY,YAAY,CAAC,kBAAkB,CAAC;IAC7DP,WAAW,GAAGM,eAAe,KAAK,IAAI,GAAG,EAAE,GAAGA,eAAe;EAC9D;;EAEA;EACA;EACA,IAAIN,WAAW,KAAK,EAAE,EAAE;IACvB,IAAMQ,KAAK,GAAGb,IAAI,CAACY,YAAY,CAAC,OAAO,CAAC;IACxCP,WAAW,GAAGQ,KAAK,KAAK,IAAI,GAAG,EAAE,GAAGA,KAAK;EAC1C;EAEA,OAAOR,WAAW;AACnB"}
|
||||
29
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.d.ts
generated
vendored
Normal file
29
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.d.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* interface for an options-bag where `window.getComputedStyle` can be mocked
|
||||
*/
|
||||
export interface ComputeTextAlternativeOptions {
|
||||
compute?: "description" | "name";
|
||||
/**
|
||||
* Set to true if window.computedStyle supports the second argument.
|
||||
* This should be false in JSDOM. Otherwise JSDOM will log console errors.
|
||||
*/
|
||||
computedStyleSupportsPseudoElements?: boolean;
|
||||
/**
|
||||
* mock window.getComputedStyle. Needs `content`, `display` and `visibility`
|
||||
*/
|
||||
getComputedStyle?: typeof window.getComputedStyle;
|
||||
/**
|
||||
* Set to `true` if you want to include hidden elements in the accessible name and description computation.
|
||||
* Skips 2A in https://w3c.github.io/accname/#computation-steps.
|
||||
* @default false
|
||||
*/
|
||||
hidden?: boolean;
|
||||
}
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/#mapping_additional_nd_te
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export declare function computeTextAlternative(root: Element, options?: ComputeTextAlternativeOptions): string;
|
||||
//# sourceMappingURL=accessible-name-and-description.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-name-and-description.d.ts","sourceRoot":"","sources":["../sources/accessible-name-and-description.ts"],"names":[],"mappings":"AAgCA;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC7C,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;IACjC;;;OAGG;IACH,mCAAmC,CAAC,EAAE,OAAO,CAAC;IAC9C;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,MAAM,CAAC,gBAAgB,CAAC;IAClD;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAqRD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,6BAAkC,GACzC,MAAM,CAsYR"}
|
||||
542
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.js
generated
vendored
Normal file
542
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.js
generated
vendored
Normal file
@@ -0,0 +1,542 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.computeTextAlternative = computeTextAlternative;
|
||||
var _array = _interopRequireDefault(require("./polyfills/array.from"));
|
||||
var _SetLike = _interopRequireDefault(require("./polyfills/SetLike"));
|
||||
var _util = require("./util");
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/
|
||||
*/
|
||||
|
||||
/**
|
||||
* A string of characters where all carriage returns, newlines, tabs, and form-feeds are replaced with a single space, and multiple spaces are reduced to a single space. The string contains only character data; it does not contain any markup.
|
||||
*/
|
||||
|
||||
/**
|
||||
* interface for an options-bag where `window.getComputedStyle` can be mocked
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} string -
|
||||
* @returns {FlatString} -
|
||||
*/
|
||||
function asFlatString(s) {
|
||||
return s.trim().replace(/\s\s+/g, " ");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param node -
|
||||
* @param options - These are not optional to prevent accidentally calling it without options in `computeAccessibleName`
|
||||
* @returns {boolean} -
|
||||
*/
|
||||
function isHidden(node, getComputedStyleImplementation) {
|
||||
if (!(0, _util.isElement)(node)) {
|
||||
return false;
|
||||
}
|
||||
if (node.hasAttribute("hidden") || node.getAttribute("aria-hidden") === "true") {
|
||||
return true;
|
||||
}
|
||||
var style = getComputedStyleImplementation(node);
|
||||
return style.getPropertyValue("display") === "none" || style.getPropertyValue("visibility") === "hidden";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Node} node -
|
||||
* @returns {boolean} - As defined in step 2E of https://w3c.github.io/accname/#mapping_additional_nd_te
|
||||
*/
|
||||
function isControl(node) {
|
||||
return (0, _util.hasAnyConcreteRoles)(node, ["button", "combobox", "listbox", "textbox"]) || hasAbstractRole(node, "range");
|
||||
}
|
||||
function hasAbstractRole(node, role) {
|
||||
if (!(0, _util.isElement)(node)) {
|
||||
return false;
|
||||
}
|
||||
switch (role) {
|
||||
case "range":
|
||||
return (0, _util.hasAnyConcreteRoles)(node, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
|
||||
default:
|
||||
throw new TypeError("No knowledge about abstract role '".concat(role, "'. This is likely a bug :("));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* element.querySelectorAll but also considers owned tree
|
||||
* @param element
|
||||
* @param selectors
|
||||
*/
|
||||
function querySelectorAllSubtree(element, selectors) {
|
||||
var elements = (0, _array.default)(element.querySelectorAll(selectors));
|
||||
(0, _util.queryIdRefs)(element, "aria-owns").forEach(function (root) {
|
||||
// babel transpiles this assuming an iterator
|
||||
elements.push.apply(elements, (0, _array.default)(root.querySelectorAll(selectors)));
|
||||
});
|
||||
return elements;
|
||||
}
|
||||
function querySelectedOptions(listbox) {
|
||||
if ((0, _util.isHTMLSelectElement)(listbox)) {
|
||||
// IE11 polyfill
|
||||
return listbox.selectedOptions || querySelectorAllSubtree(listbox, "[selected]");
|
||||
}
|
||||
return querySelectorAllSubtree(listbox, '[aria-selected="true"]');
|
||||
}
|
||||
function isMarkedPresentational(node) {
|
||||
return (0, _util.hasAnyConcreteRoles)(node, _util.presentationRoles);
|
||||
}
|
||||
|
||||
/**
|
||||
* Elements specifically listed in html-aam
|
||||
*
|
||||
* We don't need this for `label` or `legend` elements.
|
||||
* Their implicit roles already allow "naming from content".
|
||||
*
|
||||
* sources:
|
||||
*
|
||||
* - https://w3c.github.io/html-aam/#table-element
|
||||
*/
|
||||
function isNativeHostLanguageTextAlternativeElement(node) {
|
||||
return (0, _util.isHTMLTableCaptionElement)(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* https://w3c.github.io/aria/#namefromcontent
|
||||
*/
|
||||
function allowsNameFromContent(node) {
|
||||
return (0, _util.hasAnyConcreteRoles)(node, ["button", "cell", "checkbox", "columnheader", "gridcell", "heading", "label", "legend", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "row", "rowheader", "switch", "tab", "tooltip", "treeitem"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO https://github.com/eps1lon/dom-accessibility-api/issues/100
|
||||
*/
|
||||
function isDescendantOfNativeHostLanguageTextAlternativeElement(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- not implemented yet
|
||||
node) {
|
||||
return false;
|
||||
}
|
||||
function getValueOfTextbox(element) {
|
||||
if ((0, _util.isHTMLInputElement)(element) || (0, _util.isHTMLTextAreaElement)(element)) {
|
||||
return element.value;
|
||||
}
|
||||
// https://github.com/eps1lon/dom-accessibility-api/issues/4
|
||||
return element.textContent || "";
|
||||
}
|
||||
function getTextualContent(declaration) {
|
||||
var content = declaration.getPropertyValue("content");
|
||||
if (/^["'].*["']$/.test(content)) {
|
||||
return content.slice(1, -1);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* https://html.spec.whatwg.org/multipage/forms.html#category-label
|
||||
* TODO: form-associated custom elements
|
||||
* @param element
|
||||
*/
|
||||
function isLabelableElement(element) {
|
||||
var localName = (0, _util.getLocalName)(element);
|
||||
return localName === "button" || localName === "input" && element.getAttribute("type") !== "hidden" || localName === "meter" || localName === "output" || localName === "progress" || localName === "select" || localName === "textarea";
|
||||
}
|
||||
|
||||
/**
|
||||
* > [...], then the first such descendant in tree order is the label element's labeled control.
|
||||
* -- https://html.spec.whatwg.org/multipage/forms.html#labeled-control
|
||||
* @param element
|
||||
*/
|
||||
function findLabelableElement(element) {
|
||||
if (isLabelableElement(element)) {
|
||||
return element;
|
||||
}
|
||||
var labelableElement = null;
|
||||
element.childNodes.forEach(function (childNode) {
|
||||
if (labelableElement === null && (0, _util.isElement)(childNode)) {
|
||||
var descendantLabelableElement = findLabelableElement(childNode);
|
||||
if (descendantLabelableElement !== null) {
|
||||
labelableElement = descendantLabelableElement;
|
||||
}
|
||||
}
|
||||
});
|
||||
return labelableElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill of HTMLLabelElement.control
|
||||
* https://html.spec.whatwg.org/multipage/forms.html#labeled-control
|
||||
* @param label
|
||||
*/
|
||||
function getControlOfLabel(label) {
|
||||
if (label.control !== undefined) {
|
||||
return label.control;
|
||||
}
|
||||
var htmlFor = label.getAttribute("for");
|
||||
if (htmlFor !== null) {
|
||||
return label.ownerDocument.getElementById(htmlFor);
|
||||
}
|
||||
return findLabelableElement(label);
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill of HTMLInputElement.labels
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/labels
|
||||
* @param element
|
||||
*/
|
||||
function getLabels(element) {
|
||||
var labelsProperty = element.labels;
|
||||
if (labelsProperty === null) {
|
||||
return labelsProperty;
|
||||
}
|
||||
if (labelsProperty !== undefined) {
|
||||
return (0, _array.default)(labelsProperty);
|
||||
}
|
||||
|
||||
// polyfill
|
||||
if (!isLabelableElement(element)) {
|
||||
return null;
|
||||
}
|
||||
var document = element.ownerDocument;
|
||||
return (0, _array.default)(document.querySelectorAll("label")).filter(function (label) {
|
||||
return getControlOfLabel(label) === element;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the contents of a slot used for computing the accname
|
||||
* @param slot
|
||||
*/
|
||||
function getSlotContents(slot) {
|
||||
// Computing the accessible name for elements containing slots is not
|
||||
// currently defined in the spec. This implementation reflects the
|
||||
// behavior of NVDA 2020.2/Firefox 81 and iOS VoiceOver/Safari 13.6.
|
||||
var assignedNodes = slot.assignedNodes();
|
||||
if (assignedNodes.length === 0) {
|
||||
// if no nodes are assigned to the slot, it displays the default content
|
||||
return (0, _array.default)(slot.childNodes);
|
||||
}
|
||||
return assignedNodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/#mapping_additional_nd_te
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
function computeTextAlternative(root) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var consultedNodes = new _SetLike.default();
|
||||
var window = (0, _util.safeWindow)(root);
|
||||
var _options$compute = options.compute,
|
||||
compute = _options$compute === void 0 ? "name" : _options$compute,
|
||||
_options$computedStyl = options.computedStyleSupportsPseudoElements,
|
||||
computedStyleSupportsPseudoElements = _options$computedStyl === void 0 ? options.getComputedStyle !== undefined : _options$computedStyl,
|
||||
_options$getComputedS = options.getComputedStyle,
|
||||
getComputedStyle = _options$getComputedS === void 0 ? window.getComputedStyle.bind(window) : _options$getComputedS,
|
||||
_options$hidden = options.hidden,
|
||||
hidden = _options$hidden === void 0 ? false : _options$hidden;
|
||||
|
||||
// 2F.i
|
||||
function computeMiscTextAlternative(node, context) {
|
||||
var accumulatedText = "";
|
||||
if ((0, _util.isElement)(node) && computedStyleSupportsPseudoElements) {
|
||||
var pseudoBefore = getComputedStyle(node, "::before");
|
||||
var beforeContent = getTextualContent(pseudoBefore);
|
||||
accumulatedText = "".concat(beforeContent, " ").concat(accumulatedText);
|
||||
}
|
||||
|
||||
// FIXME: Including aria-owns is not defined in the spec
|
||||
// But it is required in the web-platform-test
|
||||
var childNodes = (0, _util.isHTMLSlotElement)(node) ? getSlotContents(node) : (0, _array.default)(node.childNodes).concat((0, _util.queryIdRefs)(node, "aria-owns"));
|
||||
childNodes.forEach(function (child) {
|
||||
var result = computeTextAlternative(child, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false,
|
||||
recursion: true
|
||||
});
|
||||
// TODO: Unclear why display affects delimiter
|
||||
// see https://github.com/w3c/accname/issues/3
|
||||
var display = (0, _util.isElement)(child) ? getComputedStyle(child).getPropertyValue("display") : "inline";
|
||||
var separator = display !== "inline" ? " " : "";
|
||||
// trailing separator for wpt tests
|
||||
accumulatedText += "".concat(separator).concat(result).concat(separator);
|
||||
});
|
||||
if ((0, _util.isElement)(node) && computedStyleSupportsPseudoElements) {
|
||||
var pseudoAfter = getComputedStyle(node, "::after");
|
||||
var afterContent = getTextualContent(pseudoAfter);
|
||||
accumulatedText = "".concat(accumulatedText, " ").concat(afterContent);
|
||||
}
|
||||
return accumulatedText.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param element
|
||||
* @param attributeName
|
||||
* @returns A string non-empty string or `null`
|
||||
*/
|
||||
function useAttribute(element, attributeName) {
|
||||
var attribute = element.getAttributeNode(attributeName);
|
||||
if (attribute !== null && !consultedNodes.has(attribute) && attribute.value.trim() !== "") {
|
||||
consultedNodes.add(attribute);
|
||||
return attribute.value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function computeTooltipAttributeValue(node) {
|
||||
if (!(0, _util.isElement)(node)) {
|
||||
return null;
|
||||
}
|
||||
return useAttribute(node, "title");
|
||||
}
|
||||
function computeElementTextAlternative(node) {
|
||||
if (!(0, _util.isElement)(node)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// https://w3c.github.io/html-aam/#fieldset-and-legend-elements
|
||||
if ((0, _util.isHTMLFieldSetElement)(node)) {
|
||||
consultedNodes.add(node);
|
||||
var children = (0, _array.default)(node.childNodes);
|
||||
for (var i = 0; i < children.length; i += 1) {
|
||||
var child = children[i];
|
||||
if ((0, _util.isHTMLLegendElement)(child)) {
|
||||
return computeTextAlternative(child, {
|
||||
isEmbeddedInLabel: false,
|
||||
isReferenced: false,
|
||||
recursion: false
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if ((0, _util.isHTMLTableElement)(node)) {
|
||||
// https://w3c.github.io/html-aam/#table-element
|
||||
consultedNodes.add(node);
|
||||
var _children = (0, _array.default)(node.childNodes);
|
||||
for (var _i = 0; _i < _children.length; _i += 1) {
|
||||
var _child = _children[_i];
|
||||
if ((0, _util.isHTMLTableCaptionElement)(_child)) {
|
||||
return computeTextAlternative(_child, {
|
||||
isEmbeddedInLabel: false,
|
||||
isReferenced: false,
|
||||
recursion: false
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if ((0, _util.isSVGSVGElement)(node)) {
|
||||
// https://www.w3.org/TR/svg-aam-1.0/
|
||||
consultedNodes.add(node);
|
||||
var _children2 = (0, _array.default)(node.childNodes);
|
||||
for (var _i2 = 0; _i2 < _children2.length; _i2 += 1) {
|
||||
var _child2 = _children2[_i2];
|
||||
if ((0, _util.isSVGTitleElement)(_child2)) {
|
||||
return _child2.textContent;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} else if ((0, _util.getLocalName)(node) === "img" || (0, _util.getLocalName)(node) === "area") {
|
||||
// https://w3c.github.io/html-aam/#area-element
|
||||
// https://w3c.github.io/html-aam/#img-element
|
||||
var nameFromAlt = useAttribute(node, "alt");
|
||||
if (nameFromAlt !== null) {
|
||||
return nameFromAlt;
|
||||
}
|
||||
} else if ((0, _util.isHTMLOptGroupElement)(node)) {
|
||||
var nameFromLabel = useAttribute(node, "label");
|
||||
if (nameFromLabel !== null) {
|
||||
return nameFromLabel;
|
||||
}
|
||||
}
|
||||
if ((0, _util.isHTMLInputElement)(node) && (node.type === "button" || node.type === "submit" || node.type === "reset")) {
|
||||
// https://w3c.github.io/html-aam/#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-email-input-type-url-and-textarea-element-accessible-description-computation
|
||||
var nameFromValue = useAttribute(node, "value");
|
||||
if (nameFromValue !== null) {
|
||||
return nameFromValue;
|
||||
}
|
||||
|
||||
// TODO: l10n
|
||||
if (node.type === "submit") {
|
||||
return "Submit";
|
||||
}
|
||||
// TODO: l10n
|
||||
if (node.type === "reset") {
|
||||
return "Reset";
|
||||
}
|
||||
}
|
||||
var labels = getLabels(node);
|
||||
if (labels !== null && labels.length !== 0) {
|
||||
consultedNodes.add(node);
|
||||
return (0, _array.default)(labels).map(function (element) {
|
||||
return computeTextAlternative(element, {
|
||||
isEmbeddedInLabel: true,
|
||||
isReferenced: false,
|
||||
recursion: true
|
||||
});
|
||||
}).filter(function (label) {
|
||||
return label.length > 0;
|
||||
}).join(" ");
|
||||
}
|
||||
|
||||
// https://w3c.github.io/html-aam/#input-type-image-accessible-name-computation
|
||||
// TODO: wpt test consider label elements but html-aam does not mention them
|
||||
// We follow existing implementations over spec
|
||||
if ((0, _util.isHTMLInputElement)(node) && node.type === "image") {
|
||||
var _nameFromAlt = useAttribute(node, "alt");
|
||||
if (_nameFromAlt !== null) {
|
||||
return _nameFromAlt;
|
||||
}
|
||||
var nameFromTitle = useAttribute(node, "title");
|
||||
if (nameFromTitle !== null) {
|
||||
return nameFromTitle;
|
||||
}
|
||||
|
||||
// TODO: l10n
|
||||
return "Submit Query";
|
||||
}
|
||||
if ((0, _util.hasAnyConcreteRoles)(node, ["button"])) {
|
||||
// https://www.w3.org/TR/html-aam-1.0/#button-element
|
||||
var nameFromSubTree = computeMiscTextAlternative(node, {
|
||||
isEmbeddedInLabel: false,
|
||||
isReferenced: false
|
||||
});
|
||||
if (nameFromSubTree !== "") {
|
||||
return nameFromSubTree;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function computeTextAlternative(current, context) {
|
||||
if (consultedNodes.has(current)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
// 2A
|
||||
if (!hidden && isHidden(current, getComputedStyle) && !context.isReferenced) {
|
||||
consultedNodes.add(current);
|
||||
return "";
|
||||
}
|
||||
|
||||
// 2B
|
||||
var labelAttributeNode = (0, _util.isElement)(current) ? current.getAttributeNode("aria-labelledby") : null;
|
||||
// TODO: Do we generally need to block query IdRefs of attributes we have already consulted?
|
||||
var labelElements = labelAttributeNode !== null && !consultedNodes.has(labelAttributeNode) ? (0, _util.queryIdRefs)(current, "aria-labelledby") : [];
|
||||
if (compute === "name" && !context.isReferenced && labelElements.length > 0) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- Can't be null here otherwise labelElements would be empty
|
||||
consultedNodes.add(labelAttributeNode);
|
||||
return labelElements.map(function (element) {
|
||||
// TODO: Chrome will consider repeated values i.e. use a node multiple times while we'll bail out in computeTextAlternative.
|
||||
return computeTextAlternative(element, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: true,
|
||||
// this isn't recursion as specified, otherwise we would skip
|
||||
// `aria-label` in
|
||||
// <input id="myself" aria-label="foo" aria-labelledby="myself"
|
||||
recursion: false
|
||||
});
|
||||
}).join(" ");
|
||||
}
|
||||
|
||||
// 2C
|
||||
// Changed from the spec in anticipation of https://github.com/w3c/accname/issues/64
|
||||
// spec says we should only consider skipping if we have a non-empty label
|
||||
var skipToStep2E = context.recursion && isControl(current) && compute === "name";
|
||||
if (!skipToStep2E) {
|
||||
var ariaLabel = ((0, _util.isElement)(current) && current.getAttribute("aria-label") || "").trim();
|
||||
if (ariaLabel !== "" && compute === "name") {
|
||||
consultedNodes.add(current);
|
||||
return ariaLabel;
|
||||
}
|
||||
|
||||
// 2D
|
||||
if (!isMarkedPresentational(current)) {
|
||||
var elementTextAlternative = computeElementTextAlternative(current);
|
||||
if (elementTextAlternative !== null) {
|
||||
consultedNodes.add(current);
|
||||
return elementTextAlternative;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// special casing, cheating to make tests pass
|
||||
// https://github.com/w3c/accname/issues/67
|
||||
if ((0, _util.hasAnyConcreteRoles)(current, ["menu"])) {
|
||||
consultedNodes.add(current);
|
||||
return "";
|
||||
}
|
||||
|
||||
// 2E
|
||||
if (skipToStep2E || context.isEmbeddedInLabel || context.isReferenced) {
|
||||
if ((0, _util.hasAnyConcreteRoles)(current, ["combobox", "listbox"])) {
|
||||
consultedNodes.add(current);
|
||||
var selectedOptions = querySelectedOptions(current);
|
||||
if (selectedOptions.length === 0) {
|
||||
// defined per test `name_heading_combobox`
|
||||
return (0, _util.isHTMLInputElement)(current) ? current.value : "";
|
||||
}
|
||||
return (0, _array.default)(selectedOptions).map(function (selectedOption) {
|
||||
return computeTextAlternative(selectedOption, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false,
|
||||
recursion: true
|
||||
});
|
||||
}).join(" ");
|
||||
}
|
||||
if (hasAbstractRole(current, "range")) {
|
||||
consultedNodes.add(current);
|
||||
if (current.hasAttribute("aria-valuetext")) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard
|
||||
return current.getAttribute("aria-valuetext");
|
||||
}
|
||||
if (current.hasAttribute("aria-valuenow")) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard
|
||||
return current.getAttribute("aria-valuenow");
|
||||
}
|
||||
// Otherwise, use the value as specified by a host language attribute.
|
||||
return current.getAttribute("value") || "";
|
||||
}
|
||||
if ((0, _util.hasAnyConcreteRoles)(current, ["textbox"])) {
|
||||
consultedNodes.add(current);
|
||||
return getValueOfTextbox(current);
|
||||
}
|
||||
}
|
||||
|
||||
// 2F: https://w3c.github.io/accname/#step2F
|
||||
if (allowsNameFromContent(current) || (0, _util.isElement)(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement(current) || isDescendantOfNativeHostLanguageTextAlternativeElement(current)) {
|
||||
var accumulatedText2F = computeMiscTextAlternative(current, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false
|
||||
});
|
||||
if (accumulatedText2F !== "") {
|
||||
consultedNodes.add(current);
|
||||
return accumulatedText2F;
|
||||
}
|
||||
}
|
||||
if (current.nodeType === current.TEXT_NODE) {
|
||||
consultedNodes.add(current);
|
||||
return current.textContent || "";
|
||||
}
|
||||
if (context.recursion) {
|
||||
consultedNodes.add(current);
|
||||
return computeMiscTextAlternative(current, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false
|
||||
});
|
||||
}
|
||||
var tooltipAttributeValue = computeTooltipAttributeValue(current);
|
||||
if (tooltipAttributeValue !== null) {
|
||||
consultedNodes.add(current);
|
||||
return tooltipAttributeValue;
|
||||
}
|
||||
|
||||
// TODO should this be reachable?
|
||||
consultedNodes.add(current);
|
||||
return "";
|
||||
}
|
||||
return asFlatString(computeTextAlternative(root, {
|
||||
isEmbeddedInLabel: false,
|
||||
// by spec computeAccessibleDescription starts with the referenced elements as roots
|
||||
isReferenced: compute === "description",
|
||||
recursion: false
|
||||
}));
|
||||
}
|
||||
//# sourceMappingURL=accessible-name-and-description.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
537
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs
generated
vendored
Normal file
537
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs
generated
vendored
Normal file
@@ -0,0 +1,537 @@
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/
|
||||
*/
|
||||
import ArrayFrom from "./polyfills/array.from.mjs";
|
||||
import SetLike from "./polyfills/SetLike.mjs";
|
||||
import { hasAnyConcreteRoles, isElement, isHTMLTableCaptionElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, safeWindow, isHTMLFieldSetElement, isHTMLLegendElement, isHTMLOptGroupElement, isHTMLTableElement, isHTMLSlotElement, isSVGSVGElement, isSVGTitleElement, queryIdRefs, getLocalName, presentationRoles } from "./util.mjs";
|
||||
|
||||
/**
|
||||
* A string of characters where all carriage returns, newlines, tabs, and form-feeds are replaced with a single space, and multiple spaces are reduced to a single space. The string contains only character data; it does not contain any markup.
|
||||
*/
|
||||
|
||||
/**
|
||||
* interface for an options-bag where `window.getComputedStyle` can be mocked
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} string -
|
||||
* @returns {FlatString} -
|
||||
*/
|
||||
function asFlatString(s) {
|
||||
return s.trim().replace(/\s\s+/g, " ");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param node -
|
||||
* @param options - These are not optional to prevent accidentally calling it without options in `computeAccessibleName`
|
||||
* @returns {boolean} -
|
||||
*/
|
||||
function isHidden(node, getComputedStyleImplementation) {
|
||||
if (!isElement(node)) {
|
||||
return false;
|
||||
}
|
||||
if (node.hasAttribute("hidden") || node.getAttribute("aria-hidden") === "true") {
|
||||
return true;
|
||||
}
|
||||
var style = getComputedStyleImplementation(node);
|
||||
return style.getPropertyValue("display") === "none" || style.getPropertyValue("visibility") === "hidden";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Node} node -
|
||||
* @returns {boolean} - As defined in step 2E of https://w3c.github.io/accname/#mapping_additional_nd_te
|
||||
*/
|
||||
function isControl(node) {
|
||||
return hasAnyConcreteRoles(node, ["button", "combobox", "listbox", "textbox"]) || hasAbstractRole(node, "range");
|
||||
}
|
||||
function hasAbstractRole(node, role) {
|
||||
if (!isElement(node)) {
|
||||
return false;
|
||||
}
|
||||
switch (role) {
|
||||
case "range":
|
||||
return hasAnyConcreteRoles(node, ["meter", "progressbar", "scrollbar", "slider", "spinbutton"]);
|
||||
default:
|
||||
throw new TypeError("No knowledge about abstract role '".concat(role, "'. This is likely a bug :("));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* element.querySelectorAll but also considers owned tree
|
||||
* @param element
|
||||
* @param selectors
|
||||
*/
|
||||
function querySelectorAllSubtree(element, selectors) {
|
||||
var elements = ArrayFrom(element.querySelectorAll(selectors));
|
||||
queryIdRefs(element, "aria-owns").forEach(function (root) {
|
||||
// babel transpiles this assuming an iterator
|
||||
elements.push.apply(elements, ArrayFrom(root.querySelectorAll(selectors)));
|
||||
});
|
||||
return elements;
|
||||
}
|
||||
function querySelectedOptions(listbox) {
|
||||
if (isHTMLSelectElement(listbox)) {
|
||||
// IE11 polyfill
|
||||
return listbox.selectedOptions || querySelectorAllSubtree(listbox, "[selected]");
|
||||
}
|
||||
return querySelectorAllSubtree(listbox, '[aria-selected="true"]');
|
||||
}
|
||||
function isMarkedPresentational(node) {
|
||||
return hasAnyConcreteRoles(node, presentationRoles);
|
||||
}
|
||||
|
||||
/**
|
||||
* Elements specifically listed in html-aam
|
||||
*
|
||||
* We don't need this for `label` or `legend` elements.
|
||||
* Their implicit roles already allow "naming from content".
|
||||
*
|
||||
* sources:
|
||||
*
|
||||
* - https://w3c.github.io/html-aam/#table-element
|
||||
*/
|
||||
function isNativeHostLanguageTextAlternativeElement(node) {
|
||||
return isHTMLTableCaptionElement(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* https://w3c.github.io/aria/#namefromcontent
|
||||
*/
|
||||
function allowsNameFromContent(node) {
|
||||
return hasAnyConcreteRoles(node, ["button", "cell", "checkbox", "columnheader", "gridcell", "heading", "label", "legend", "link", "menuitem", "menuitemcheckbox", "menuitemradio", "option", "radio", "row", "rowheader", "switch", "tab", "tooltip", "treeitem"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO https://github.com/eps1lon/dom-accessibility-api/issues/100
|
||||
*/
|
||||
function isDescendantOfNativeHostLanguageTextAlternativeElement(
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars -- not implemented yet
|
||||
node) {
|
||||
return false;
|
||||
}
|
||||
function getValueOfTextbox(element) {
|
||||
if (isHTMLInputElement(element) || isHTMLTextAreaElement(element)) {
|
||||
return element.value;
|
||||
}
|
||||
// https://github.com/eps1lon/dom-accessibility-api/issues/4
|
||||
return element.textContent || "";
|
||||
}
|
||||
function getTextualContent(declaration) {
|
||||
var content = declaration.getPropertyValue("content");
|
||||
if (/^["'].*["']$/.test(content)) {
|
||||
return content.slice(1, -1);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* https://html.spec.whatwg.org/multipage/forms.html#category-label
|
||||
* TODO: form-associated custom elements
|
||||
* @param element
|
||||
*/
|
||||
function isLabelableElement(element) {
|
||||
var localName = getLocalName(element);
|
||||
return localName === "button" || localName === "input" && element.getAttribute("type") !== "hidden" || localName === "meter" || localName === "output" || localName === "progress" || localName === "select" || localName === "textarea";
|
||||
}
|
||||
|
||||
/**
|
||||
* > [...], then the first such descendant in tree order is the label element's labeled control.
|
||||
* -- https://html.spec.whatwg.org/multipage/forms.html#labeled-control
|
||||
* @param element
|
||||
*/
|
||||
function findLabelableElement(element) {
|
||||
if (isLabelableElement(element)) {
|
||||
return element;
|
||||
}
|
||||
var labelableElement = null;
|
||||
element.childNodes.forEach(function (childNode) {
|
||||
if (labelableElement === null && isElement(childNode)) {
|
||||
var descendantLabelableElement = findLabelableElement(childNode);
|
||||
if (descendantLabelableElement !== null) {
|
||||
labelableElement = descendantLabelableElement;
|
||||
}
|
||||
}
|
||||
});
|
||||
return labelableElement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill of HTMLLabelElement.control
|
||||
* https://html.spec.whatwg.org/multipage/forms.html#labeled-control
|
||||
* @param label
|
||||
*/
|
||||
function getControlOfLabel(label) {
|
||||
if (label.control !== undefined) {
|
||||
return label.control;
|
||||
}
|
||||
var htmlFor = label.getAttribute("for");
|
||||
if (htmlFor !== null) {
|
||||
return label.ownerDocument.getElementById(htmlFor);
|
||||
}
|
||||
return findLabelableElement(label);
|
||||
}
|
||||
|
||||
/**
|
||||
* Polyfill of HTMLInputElement.labels
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/labels
|
||||
* @param element
|
||||
*/
|
||||
function getLabels(element) {
|
||||
var labelsProperty = element.labels;
|
||||
if (labelsProperty === null) {
|
||||
return labelsProperty;
|
||||
}
|
||||
if (labelsProperty !== undefined) {
|
||||
return ArrayFrom(labelsProperty);
|
||||
}
|
||||
|
||||
// polyfill
|
||||
if (!isLabelableElement(element)) {
|
||||
return null;
|
||||
}
|
||||
var document = element.ownerDocument;
|
||||
return ArrayFrom(document.querySelectorAll("label")).filter(function (label) {
|
||||
return getControlOfLabel(label) === element;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the contents of a slot used for computing the accname
|
||||
* @param slot
|
||||
*/
|
||||
function getSlotContents(slot) {
|
||||
// Computing the accessible name for elements containing slots is not
|
||||
// currently defined in the spec. This implementation reflects the
|
||||
// behavior of NVDA 2020.2/Firefox 81 and iOS VoiceOver/Safari 13.6.
|
||||
var assignedNodes = slot.assignedNodes();
|
||||
if (assignedNodes.length === 0) {
|
||||
// if no nodes are assigned to the slot, it displays the default content
|
||||
return ArrayFrom(slot.childNodes);
|
||||
}
|
||||
return assignedNodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/#mapping_additional_nd_te
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export function computeTextAlternative(root) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var consultedNodes = new SetLike();
|
||||
var window = safeWindow(root);
|
||||
var _options$compute = options.compute,
|
||||
compute = _options$compute === void 0 ? "name" : _options$compute,
|
||||
_options$computedStyl = options.computedStyleSupportsPseudoElements,
|
||||
computedStyleSupportsPseudoElements = _options$computedStyl === void 0 ? options.getComputedStyle !== undefined : _options$computedStyl,
|
||||
_options$getComputedS = options.getComputedStyle,
|
||||
getComputedStyle = _options$getComputedS === void 0 ? window.getComputedStyle.bind(window) : _options$getComputedS,
|
||||
_options$hidden = options.hidden,
|
||||
hidden = _options$hidden === void 0 ? false : _options$hidden;
|
||||
|
||||
// 2F.i
|
||||
function computeMiscTextAlternative(node, context) {
|
||||
var accumulatedText = "";
|
||||
if (isElement(node) && computedStyleSupportsPseudoElements) {
|
||||
var pseudoBefore = getComputedStyle(node, "::before");
|
||||
var beforeContent = getTextualContent(pseudoBefore);
|
||||
accumulatedText = "".concat(beforeContent, " ").concat(accumulatedText);
|
||||
}
|
||||
|
||||
// FIXME: Including aria-owns is not defined in the spec
|
||||
// But it is required in the web-platform-test
|
||||
var childNodes = isHTMLSlotElement(node) ? getSlotContents(node) : ArrayFrom(node.childNodes).concat(queryIdRefs(node, "aria-owns"));
|
||||
childNodes.forEach(function (child) {
|
||||
var result = computeTextAlternative(child, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false,
|
||||
recursion: true
|
||||
});
|
||||
// TODO: Unclear why display affects delimiter
|
||||
// see https://github.com/w3c/accname/issues/3
|
||||
var display = isElement(child) ? getComputedStyle(child).getPropertyValue("display") : "inline";
|
||||
var separator = display !== "inline" ? " " : "";
|
||||
// trailing separator for wpt tests
|
||||
accumulatedText += "".concat(separator).concat(result).concat(separator);
|
||||
});
|
||||
if (isElement(node) && computedStyleSupportsPseudoElements) {
|
||||
var pseudoAfter = getComputedStyle(node, "::after");
|
||||
var afterContent = getTextualContent(pseudoAfter);
|
||||
accumulatedText = "".concat(accumulatedText, " ").concat(afterContent);
|
||||
}
|
||||
return accumulatedText.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param element
|
||||
* @param attributeName
|
||||
* @returns A string non-empty string or `null`
|
||||
*/
|
||||
function useAttribute(element, attributeName) {
|
||||
var attribute = element.getAttributeNode(attributeName);
|
||||
if (attribute !== null && !consultedNodes.has(attribute) && attribute.value.trim() !== "") {
|
||||
consultedNodes.add(attribute);
|
||||
return attribute.value;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function computeTooltipAttributeValue(node) {
|
||||
if (!isElement(node)) {
|
||||
return null;
|
||||
}
|
||||
return useAttribute(node, "title");
|
||||
}
|
||||
function computeElementTextAlternative(node) {
|
||||
if (!isElement(node)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// https://w3c.github.io/html-aam/#fieldset-and-legend-elements
|
||||
if (isHTMLFieldSetElement(node)) {
|
||||
consultedNodes.add(node);
|
||||
var children = ArrayFrom(node.childNodes);
|
||||
for (var i = 0; i < children.length; i += 1) {
|
||||
var child = children[i];
|
||||
if (isHTMLLegendElement(child)) {
|
||||
return computeTextAlternative(child, {
|
||||
isEmbeddedInLabel: false,
|
||||
isReferenced: false,
|
||||
recursion: false
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (isHTMLTableElement(node)) {
|
||||
// https://w3c.github.io/html-aam/#table-element
|
||||
consultedNodes.add(node);
|
||||
var _children = ArrayFrom(node.childNodes);
|
||||
for (var _i = 0; _i < _children.length; _i += 1) {
|
||||
var _child = _children[_i];
|
||||
if (isHTMLTableCaptionElement(_child)) {
|
||||
return computeTextAlternative(_child, {
|
||||
isEmbeddedInLabel: false,
|
||||
isReferenced: false,
|
||||
recursion: false
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (isSVGSVGElement(node)) {
|
||||
// https://www.w3.org/TR/svg-aam-1.0/
|
||||
consultedNodes.add(node);
|
||||
var _children2 = ArrayFrom(node.childNodes);
|
||||
for (var _i2 = 0; _i2 < _children2.length; _i2 += 1) {
|
||||
var _child2 = _children2[_i2];
|
||||
if (isSVGTitleElement(_child2)) {
|
||||
return _child2.textContent;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} else if (getLocalName(node) === "img" || getLocalName(node) === "area") {
|
||||
// https://w3c.github.io/html-aam/#area-element
|
||||
// https://w3c.github.io/html-aam/#img-element
|
||||
var nameFromAlt = useAttribute(node, "alt");
|
||||
if (nameFromAlt !== null) {
|
||||
return nameFromAlt;
|
||||
}
|
||||
} else if (isHTMLOptGroupElement(node)) {
|
||||
var nameFromLabel = useAttribute(node, "label");
|
||||
if (nameFromLabel !== null) {
|
||||
return nameFromLabel;
|
||||
}
|
||||
}
|
||||
if (isHTMLInputElement(node) && (node.type === "button" || node.type === "submit" || node.type === "reset")) {
|
||||
// https://w3c.github.io/html-aam/#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-email-input-type-url-and-textarea-element-accessible-description-computation
|
||||
var nameFromValue = useAttribute(node, "value");
|
||||
if (nameFromValue !== null) {
|
||||
return nameFromValue;
|
||||
}
|
||||
|
||||
// TODO: l10n
|
||||
if (node.type === "submit") {
|
||||
return "Submit";
|
||||
}
|
||||
// TODO: l10n
|
||||
if (node.type === "reset") {
|
||||
return "Reset";
|
||||
}
|
||||
}
|
||||
var labels = getLabels(node);
|
||||
if (labels !== null && labels.length !== 0) {
|
||||
consultedNodes.add(node);
|
||||
return ArrayFrom(labels).map(function (element) {
|
||||
return computeTextAlternative(element, {
|
||||
isEmbeddedInLabel: true,
|
||||
isReferenced: false,
|
||||
recursion: true
|
||||
});
|
||||
}).filter(function (label) {
|
||||
return label.length > 0;
|
||||
}).join(" ");
|
||||
}
|
||||
|
||||
// https://w3c.github.io/html-aam/#input-type-image-accessible-name-computation
|
||||
// TODO: wpt test consider label elements but html-aam does not mention them
|
||||
// We follow existing implementations over spec
|
||||
if (isHTMLInputElement(node) && node.type === "image") {
|
||||
var _nameFromAlt = useAttribute(node, "alt");
|
||||
if (_nameFromAlt !== null) {
|
||||
return _nameFromAlt;
|
||||
}
|
||||
var nameFromTitle = useAttribute(node, "title");
|
||||
if (nameFromTitle !== null) {
|
||||
return nameFromTitle;
|
||||
}
|
||||
|
||||
// TODO: l10n
|
||||
return "Submit Query";
|
||||
}
|
||||
if (hasAnyConcreteRoles(node, ["button"])) {
|
||||
// https://www.w3.org/TR/html-aam-1.0/#button-element
|
||||
var nameFromSubTree = computeMiscTextAlternative(node, {
|
||||
isEmbeddedInLabel: false,
|
||||
isReferenced: false
|
||||
});
|
||||
if (nameFromSubTree !== "") {
|
||||
return nameFromSubTree;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function computeTextAlternative(current, context) {
|
||||
if (consultedNodes.has(current)) {
|
||||
return "";
|
||||
}
|
||||
|
||||
// 2A
|
||||
if (!hidden && isHidden(current, getComputedStyle) && !context.isReferenced) {
|
||||
consultedNodes.add(current);
|
||||
return "";
|
||||
}
|
||||
|
||||
// 2B
|
||||
var labelAttributeNode = isElement(current) ? current.getAttributeNode("aria-labelledby") : null;
|
||||
// TODO: Do we generally need to block query IdRefs of attributes we have already consulted?
|
||||
var labelElements = labelAttributeNode !== null && !consultedNodes.has(labelAttributeNode) ? queryIdRefs(current, "aria-labelledby") : [];
|
||||
if (compute === "name" && !context.isReferenced && labelElements.length > 0) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- Can't be null here otherwise labelElements would be empty
|
||||
consultedNodes.add(labelAttributeNode);
|
||||
return labelElements.map(function (element) {
|
||||
// TODO: Chrome will consider repeated values i.e. use a node multiple times while we'll bail out in computeTextAlternative.
|
||||
return computeTextAlternative(element, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: true,
|
||||
// this isn't recursion as specified, otherwise we would skip
|
||||
// `aria-label` in
|
||||
// <input id="myself" aria-label="foo" aria-labelledby="myself"
|
||||
recursion: false
|
||||
});
|
||||
}).join(" ");
|
||||
}
|
||||
|
||||
// 2C
|
||||
// Changed from the spec in anticipation of https://github.com/w3c/accname/issues/64
|
||||
// spec says we should only consider skipping if we have a non-empty label
|
||||
var skipToStep2E = context.recursion && isControl(current) && compute === "name";
|
||||
if (!skipToStep2E) {
|
||||
var ariaLabel = (isElement(current) && current.getAttribute("aria-label") || "").trim();
|
||||
if (ariaLabel !== "" && compute === "name") {
|
||||
consultedNodes.add(current);
|
||||
return ariaLabel;
|
||||
}
|
||||
|
||||
// 2D
|
||||
if (!isMarkedPresentational(current)) {
|
||||
var elementTextAlternative = computeElementTextAlternative(current);
|
||||
if (elementTextAlternative !== null) {
|
||||
consultedNodes.add(current);
|
||||
return elementTextAlternative;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// special casing, cheating to make tests pass
|
||||
// https://github.com/w3c/accname/issues/67
|
||||
if (hasAnyConcreteRoles(current, ["menu"])) {
|
||||
consultedNodes.add(current);
|
||||
return "";
|
||||
}
|
||||
|
||||
// 2E
|
||||
if (skipToStep2E || context.isEmbeddedInLabel || context.isReferenced) {
|
||||
if (hasAnyConcreteRoles(current, ["combobox", "listbox"])) {
|
||||
consultedNodes.add(current);
|
||||
var selectedOptions = querySelectedOptions(current);
|
||||
if (selectedOptions.length === 0) {
|
||||
// defined per test `name_heading_combobox`
|
||||
return isHTMLInputElement(current) ? current.value : "";
|
||||
}
|
||||
return ArrayFrom(selectedOptions).map(function (selectedOption) {
|
||||
return computeTextAlternative(selectedOption, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false,
|
||||
recursion: true
|
||||
});
|
||||
}).join(" ");
|
||||
}
|
||||
if (hasAbstractRole(current, "range")) {
|
||||
consultedNodes.add(current);
|
||||
if (current.hasAttribute("aria-valuetext")) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard
|
||||
return current.getAttribute("aria-valuetext");
|
||||
}
|
||||
if (current.hasAttribute("aria-valuenow")) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard
|
||||
return current.getAttribute("aria-valuenow");
|
||||
}
|
||||
// Otherwise, use the value as specified by a host language attribute.
|
||||
return current.getAttribute("value") || "";
|
||||
}
|
||||
if (hasAnyConcreteRoles(current, ["textbox"])) {
|
||||
consultedNodes.add(current);
|
||||
return getValueOfTextbox(current);
|
||||
}
|
||||
}
|
||||
|
||||
// 2F: https://w3c.github.io/accname/#step2F
|
||||
if (allowsNameFromContent(current) || isElement(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement(current) || isDescendantOfNativeHostLanguageTextAlternativeElement(current)) {
|
||||
var accumulatedText2F = computeMiscTextAlternative(current, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false
|
||||
});
|
||||
if (accumulatedText2F !== "") {
|
||||
consultedNodes.add(current);
|
||||
return accumulatedText2F;
|
||||
}
|
||||
}
|
||||
if (current.nodeType === current.TEXT_NODE) {
|
||||
consultedNodes.add(current);
|
||||
return current.textContent || "";
|
||||
}
|
||||
if (context.recursion) {
|
||||
consultedNodes.add(current);
|
||||
return computeMiscTextAlternative(current, {
|
||||
isEmbeddedInLabel: context.isEmbeddedInLabel,
|
||||
isReferenced: false
|
||||
});
|
||||
}
|
||||
var tooltipAttributeValue = computeTooltipAttributeValue(current);
|
||||
if (tooltipAttributeValue !== null) {
|
||||
consultedNodes.add(current);
|
||||
return tooltipAttributeValue;
|
||||
}
|
||||
|
||||
// TODO should this be reachable?
|
||||
consultedNodes.add(current);
|
||||
return "";
|
||||
}
|
||||
return asFlatString(computeTextAlternative(root, {
|
||||
isEmbeddedInLabel: false,
|
||||
// by spec computeAccessibleDescription starts with the referenced elements as roots
|
||||
isReferenced: compute === "description",
|
||||
recursion: false
|
||||
}));
|
||||
}
|
||||
//# sourceMappingURL=accessible-name-and-description.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
9
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.d.ts
generated
vendored
Normal file
9
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { ComputeTextAlternativeOptions } from "./accessible-name-and-description";
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/#mapping_additional_nd_name
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export declare function computeAccessibleName(root: Element, options?: ComputeTextAlternativeOptions): string;
|
||||
//# sourceMappingURL=accessible-name.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-name.d.ts","sourceRoot":"","sources":["../sources/accessible-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,6BAA6B,EAC7B,MAAM,mCAAmC,CAAC;AAuB3C;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,6BAAkC,GACzC,MAAM,CAMR"}
|
||||
27
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.js
generated
vendored
Normal file
27
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.computeAccessibleName = computeAccessibleName;
|
||||
var _accessibleNameAndDescription = require("./accessible-name-and-description");
|
||||
var _util = require("./util");
|
||||
/**
|
||||
* https://w3c.github.io/aria/#namefromprohibited
|
||||
*/
|
||||
function prohibitsNaming(node) {
|
||||
return (0, _util.hasAnyConcreteRoles)(node, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "none", "paragraph", "presentation", "strong", "subscript", "superscript"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/#mapping_additional_nd_name
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
function computeAccessibleName(root) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
if (prohibitsNaming(root)) {
|
||||
return "";
|
||||
}
|
||||
return (0, _accessibleNameAndDescription.computeTextAlternative)(root, options);
|
||||
}
|
||||
//# sourceMappingURL=accessible-name.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-name.js","names":["_accessibleNameAndDescription","require","_util","prohibitsNaming","node","hasAnyConcreteRoles","computeAccessibleName","root","options","arguments","length","undefined","computeTextAlternative"],"sources":["../sources/accessible-name.ts"],"sourcesContent":["import {\n\tcomputeTextAlternative,\n\tComputeTextAlternativeOptions,\n} from \"./accessible-name-and-description\";\nimport { hasAnyConcreteRoles } from \"./util\";\n\n/**\n * https://w3c.github.io/aria/#namefromprohibited\n */\nfunction prohibitsNaming(node: Node): boolean {\n\treturn hasAnyConcreteRoles(node, [\n\t\t\"caption\",\n\t\t\"code\",\n\t\t\"deletion\",\n\t\t\"emphasis\",\n\t\t\"generic\",\n\t\t\"insertion\",\n\t\t\"none\",\n\t\t\"paragraph\",\n\t\t\"presentation\",\n\t\t\"strong\",\n\t\t\"subscript\",\n\t\t\"superscript\",\n\t]);\n}\n\n/**\n * implements https://w3c.github.io/accname/#mapping_additional_nd_name\n * @param root\n * @param options\n * @returns\n */\nexport function computeAccessibleName(\n\troot: Element,\n\toptions: ComputeTextAlternativeOptions = {},\n): string {\n\tif (prohibitsNaming(root)) {\n\t\treturn \"\";\n\t}\n\n\treturn computeTextAlternative(root, options);\n}\n"],"mappings":";;;;AAAA,IAAAA,6BAAA,GAAAC,OAAA;AAIA,IAAAC,KAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA,SAASE,eAAeA,CAACC,IAAU,EAAW;EAC7C,OAAO,IAAAC,yBAAmB,EAACD,IAAI,EAAE,CAChC,SAAS,EACT,MAAM,EACN,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,MAAM,EACN,WAAW,EACX,cAAc,EACd,QAAQ,EACR,WAAW,EACX,aAAa,CACb,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,qBAAqBA,CACpCC,IAAa,EAEJ;EAAA,IADTC,OAAsC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE3C,IAAIN,eAAe,CAACI,IAAI,CAAC,EAAE;IAC1B,OAAO,EAAE;EACV;EAEA,OAAO,IAAAK,oDAAsB,EAACL,IAAI,EAAEC,OAAO,CAAC;AAC7C"}
|
||||
24
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.mjs
generated
vendored
Normal file
24
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.mjs
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import { computeTextAlternative } from "./accessible-name-and-description.mjs";
|
||||
import { hasAnyConcreteRoles } from "./util.mjs";
|
||||
|
||||
/**
|
||||
* https://w3c.github.io/aria/#namefromprohibited
|
||||
*/
|
||||
function prohibitsNaming(node) {
|
||||
return hasAnyConcreteRoles(node, ["caption", "code", "deletion", "emphasis", "generic", "insertion", "none", "paragraph", "presentation", "strong", "subscript", "superscript"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* implements https://w3c.github.io/accname/#mapping_additional_nd_name
|
||||
* @param root
|
||||
* @param options
|
||||
* @returns
|
||||
*/
|
||||
export function computeAccessibleName(root) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
if (prohibitsNaming(root)) {
|
||||
return "";
|
||||
}
|
||||
return computeTextAlternative(root, options);
|
||||
}
|
||||
//# sourceMappingURL=accessible-name.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/accessible-name.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"accessible-name.mjs","names":["computeTextAlternative","hasAnyConcreteRoles","prohibitsNaming","node","computeAccessibleName","root","options","arguments","length","undefined"],"sources":["../sources/accessible-name.ts"],"sourcesContent":["import {\n\tcomputeTextAlternative,\n\tComputeTextAlternativeOptions,\n} from \"./accessible-name-and-description\";\nimport { hasAnyConcreteRoles } from \"./util\";\n\n/**\n * https://w3c.github.io/aria/#namefromprohibited\n */\nfunction prohibitsNaming(node: Node): boolean {\n\treturn hasAnyConcreteRoles(node, [\n\t\t\"caption\",\n\t\t\"code\",\n\t\t\"deletion\",\n\t\t\"emphasis\",\n\t\t\"generic\",\n\t\t\"insertion\",\n\t\t\"none\",\n\t\t\"paragraph\",\n\t\t\"presentation\",\n\t\t\"strong\",\n\t\t\"subscript\",\n\t\t\"superscript\",\n\t]);\n}\n\n/**\n * implements https://w3c.github.io/accname/#mapping_additional_nd_name\n * @param root\n * @param options\n * @returns\n */\nexport function computeAccessibleName(\n\troot: Element,\n\toptions: ComputeTextAlternativeOptions = {},\n): string {\n\tif (prohibitsNaming(root)) {\n\t\treturn \"\";\n\t}\n\n\treturn computeTextAlternative(root, options);\n}\n"],"mappings":"AAAA,SACCA,sBAAsB,QAEhB,uCAAmC;AAC1C,SAASC,mBAAmB,QAAQ,YAAQ;;AAE5C;AACA;AACA;AACA,SAASC,eAAeA,CAACC,IAAU,EAAW;EAC7C,OAAOF,mBAAmB,CAACE,IAAI,EAAE,CAChC,SAAS,EACT,MAAM,EACN,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,MAAM,EACN,WAAW,EACX,cAAc,EACd,QAAQ,EACR,WAAW,EACX,aAAa,CACb,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CACpCC,IAAa,EAEJ;EAAA,IADTC,OAAsC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE3C,IAAIL,eAAe,CAACG,IAAI,CAAC,EAAE;IAC1B,OAAO,EAAE;EACV;EAEA,OAAOL,sBAAsB,CAACK,IAAI,EAAEC,OAAO,CAAC;AAC7C"}
|
||||
7
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.d.ts
generated
vendored
Normal file
7
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Safe Element.localName for all supported environments
|
||||
* @param element
|
||||
*/
|
||||
export declare function getLocalName(element: Element): string;
|
||||
export default function getRole(element: Element): string | null;
|
||||
//# sourceMappingURL=getRole.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getRole.d.ts","sourceRoot":"","sources":["../sources/getRole.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAOrD;AAkHD,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAa/D"}
|
||||
192
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.js
generated
vendored
Normal file
192
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.js
generated
vendored
Normal file
@@ -0,0 +1,192 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = getRole;
|
||||
exports.getLocalName = getLocalName;
|
||||
var _util = require("./util");
|
||||
// https://w3c.github.io/html-aria/#document-conformance-requirements-for-use-of-aria-attributes-in-html
|
||||
|
||||
/**
|
||||
* Safe Element.localName for all supported environments
|
||||
* @param element
|
||||
*/
|
||||
function getLocalName(element) {
|
||||
var _element$localName;
|
||||
return (// eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName
|
||||
(_element$localName = element.localName) !== null && _element$localName !== void 0 ? _element$localName :
|
||||
// eslint-disable-next-line no-restricted-properties -- required for the fallback
|
||||
element.tagName.toLowerCase()
|
||||
);
|
||||
}
|
||||
var localNameToRoleMappings = {
|
||||
article: "article",
|
||||
aside: "complementary",
|
||||
button: "button",
|
||||
datalist: "listbox",
|
||||
dd: "definition",
|
||||
details: "group",
|
||||
dialog: "dialog",
|
||||
dt: "term",
|
||||
fieldset: "group",
|
||||
figure: "figure",
|
||||
// WARNING: Only with an accessible name
|
||||
form: "form",
|
||||
footer: "contentinfo",
|
||||
h1: "heading",
|
||||
h2: "heading",
|
||||
h3: "heading",
|
||||
h4: "heading",
|
||||
h5: "heading",
|
||||
h6: "heading",
|
||||
header: "banner",
|
||||
hr: "separator",
|
||||
html: "document",
|
||||
legend: "legend",
|
||||
li: "listitem",
|
||||
math: "math",
|
||||
main: "main",
|
||||
menu: "list",
|
||||
nav: "navigation",
|
||||
ol: "list",
|
||||
optgroup: "group",
|
||||
// WARNING: Only in certain context
|
||||
option: "option",
|
||||
output: "status",
|
||||
progress: "progressbar",
|
||||
// WARNING: Only with an accessible name
|
||||
section: "region",
|
||||
summary: "button",
|
||||
table: "table",
|
||||
tbody: "rowgroup",
|
||||
textarea: "textbox",
|
||||
tfoot: "rowgroup",
|
||||
// WARNING: Only in certain context
|
||||
td: "cell",
|
||||
th: "columnheader",
|
||||
thead: "rowgroup",
|
||||
tr: "row",
|
||||
ul: "list"
|
||||
};
|
||||
var prohibitedAttributes = {
|
||||
caption: new Set(["aria-label", "aria-labelledby"]),
|
||||
code: new Set(["aria-label", "aria-labelledby"]),
|
||||
deletion: new Set(["aria-label", "aria-labelledby"]),
|
||||
emphasis: new Set(["aria-label", "aria-labelledby"]),
|
||||
generic: new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),
|
||||
insertion: new Set(["aria-label", "aria-labelledby"]),
|
||||
none: new Set(["aria-label", "aria-labelledby"]),
|
||||
paragraph: new Set(["aria-label", "aria-labelledby"]),
|
||||
presentation: new Set(["aria-label", "aria-labelledby"]),
|
||||
strong: new Set(["aria-label", "aria-labelledby"]),
|
||||
subscript: new Set(["aria-label", "aria-labelledby"]),
|
||||
superscript: new Set(["aria-label", "aria-labelledby"])
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param element
|
||||
* @param role The role used for this element. This is specified to control whether you want to use the implicit or explicit role.
|
||||
*/
|
||||
function hasGlobalAriaAttributes(element, role) {
|
||||
// https://rawgit.com/w3c/aria/stable/#global_states
|
||||
// commented attributes are deprecated
|
||||
return ["aria-atomic", "aria-busy", "aria-controls", "aria-current", "aria-description", "aria-describedby", "aria-details",
|
||||
// "disabled",
|
||||
"aria-dropeffect",
|
||||
// "errormessage",
|
||||
"aria-flowto", "aria-grabbed",
|
||||
// "haspopup",
|
||||
"aria-hidden",
|
||||
// "invalid",
|
||||
"aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-relevant", "aria-roledescription"].some(function (attributeName) {
|
||||
var _prohibitedAttributes;
|
||||
return element.hasAttribute(attributeName) && !((_prohibitedAttributes = prohibitedAttributes[role]) !== null && _prohibitedAttributes !== void 0 && _prohibitedAttributes.has(attributeName));
|
||||
});
|
||||
}
|
||||
function ignorePresentationalRole(element, implicitRole) {
|
||||
// https://rawgit.com/w3c/aria/stable/#conflict_resolution_presentation_none
|
||||
return hasGlobalAriaAttributes(element, implicitRole);
|
||||
}
|
||||
function getRole(element) {
|
||||
var explicitRole = getExplicitRole(element);
|
||||
if (explicitRole === null || _util.presentationRoles.indexOf(explicitRole) !== -1) {
|
||||
var implicitRole = getImplicitRole(element);
|
||||
if (_util.presentationRoles.indexOf(explicitRole || "") === -1 || ignorePresentationalRole(element, implicitRole || "")) {
|
||||
return implicitRole;
|
||||
}
|
||||
}
|
||||
return explicitRole;
|
||||
}
|
||||
function getImplicitRole(element) {
|
||||
var mappedByTag = localNameToRoleMappings[getLocalName(element)];
|
||||
if (mappedByTag !== undefined) {
|
||||
return mappedByTag;
|
||||
}
|
||||
switch (getLocalName(element)) {
|
||||
case "a":
|
||||
case "area":
|
||||
case "link":
|
||||
if (element.hasAttribute("href")) {
|
||||
return "link";
|
||||
}
|
||||
break;
|
||||
case "img":
|
||||
if (element.getAttribute("alt") === "" && !ignorePresentationalRole(element, "img")) {
|
||||
return "presentation";
|
||||
}
|
||||
return "img";
|
||||
case "input":
|
||||
{
|
||||
var _ref = element,
|
||||
type = _ref.type;
|
||||
switch (type) {
|
||||
case "button":
|
||||
case "image":
|
||||
case "reset":
|
||||
case "submit":
|
||||
return "button";
|
||||
case "checkbox":
|
||||
case "radio":
|
||||
return type;
|
||||
case "range":
|
||||
return "slider";
|
||||
case "email":
|
||||
case "tel":
|
||||
case "text":
|
||||
case "url":
|
||||
if (element.hasAttribute("list")) {
|
||||
return "combobox";
|
||||
}
|
||||
return "textbox";
|
||||
case "search":
|
||||
if (element.hasAttribute("list")) {
|
||||
return "combobox";
|
||||
}
|
||||
return "searchbox";
|
||||
case "number":
|
||||
return "spinbutton";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
case "select":
|
||||
if (element.hasAttribute("multiple") || element.size > 1) {
|
||||
return "listbox";
|
||||
}
|
||||
return "combobox";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function getExplicitRole(element) {
|
||||
var role = element.getAttribute("role");
|
||||
if (role !== null) {
|
||||
var explicitRole = role.trim().split(" ")[0];
|
||||
// String.prototype.split(sep, limit) will always return an array with at least one member
|
||||
// as long as limit is either undefined or > 0
|
||||
if (explicitRole.length > 0) {
|
||||
return explicitRole;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//# sourceMappingURL=getRole.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
188
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.mjs
generated
vendored
Normal file
188
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.mjs
generated
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
// https://w3c.github.io/html-aria/#document-conformance-requirements-for-use-of-aria-attributes-in-html
|
||||
|
||||
import { presentationRoles } from "./util.mjs";
|
||||
|
||||
/**
|
||||
* Safe Element.localName for all supported environments
|
||||
* @param element
|
||||
*/
|
||||
export function getLocalName(element) {
|
||||
var _element$localName;
|
||||
return (// eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName
|
||||
(_element$localName = element.localName) !== null && _element$localName !== void 0 ? _element$localName :
|
||||
// eslint-disable-next-line no-restricted-properties -- required for the fallback
|
||||
element.tagName.toLowerCase()
|
||||
);
|
||||
}
|
||||
var localNameToRoleMappings = {
|
||||
article: "article",
|
||||
aside: "complementary",
|
||||
button: "button",
|
||||
datalist: "listbox",
|
||||
dd: "definition",
|
||||
details: "group",
|
||||
dialog: "dialog",
|
||||
dt: "term",
|
||||
fieldset: "group",
|
||||
figure: "figure",
|
||||
// WARNING: Only with an accessible name
|
||||
form: "form",
|
||||
footer: "contentinfo",
|
||||
h1: "heading",
|
||||
h2: "heading",
|
||||
h3: "heading",
|
||||
h4: "heading",
|
||||
h5: "heading",
|
||||
h6: "heading",
|
||||
header: "banner",
|
||||
hr: "separator",
|
||||
html: "document",
|
||||
legend: "legend",
|
||||
li: "listitem",
|
||||
math: "math",
|
||||
main: "main",
|
||||
menu: "list",
|
||||
nav: "navigation",
|
||||
ol: "list",
|
||||
optgroup: "group",
|
||||
// WARNING: Only in certain context
|
||||
option: "option",
|
||||
output: "status",
|
||||
progress: "progressbar",
|
||||
// WARNING: Only with an accessible name
|
||||
section: "region",
|
||||
summary: "button",
|
||||
table: "table",
|
||||
tbody: "rowgroup",
|
||||
textarea: "textbox",
|
||||
tfoot: "rowgroup",
|
||||
// WARNING: Only in certain context
|
||||
td: "cell",
|
||||
th: "columnheader",
|
||||
thead: "rowgroup",
|
||||
tr: "row",
|
||||
ul: "list"
|
||||
};
|
||||
var prohibitedAttributes = {
|
||||
caption: new Set(["aria-label", "aria-labelledby"]),
|
||||
code: new Set(["aria-label", "aria-labelledby"]),
|
||||
deletion: new Set(["aria-label", "aria-labelledby"]),
|
||||
emphasis: new Set(["aria-label", "aria-labelledby"]),
|
||||
generic: new Set(["aria-label", "aria-labelledby", "aria-roledescription"]),
|
||||
insertion: new Set(["aria-label", "aria-labelledby"]),
|
||||
none: new Set(["aria-label", "aria-labelledby"]),
|
||||
paragraph: new Set(["aria-label", "aria-labelledby"]),
|
||||
presentation: new Set(["aria-label", "aria-labelledby"]),
|
||||
strong: new Set(["aria-label", "aria-labelledby"]),
|
||||
subscript: new Set(["aria-label", "aria-labelledby"]),
|
||||
superscript: new Set(["aria-label", "aria-labelledby"])
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param element
|
||||
* @param role The role used for this element. This is specified to control whether you want to use the implicit or explicit role.
|
||||
*/
|
||||
function hasGlobalAriaAttributes(element, role) {
|
||||
// https://rawgit.com/w3c/aria/stable/#global_states
|
||||
// commented attributes are deprecated
|
||||
return ["aria-atomic", "aria-busy", "aria-controls", "aria-current", "aria-description", "aria-describedby", "aria-details",
|
||||
// "disabled",
|
||||
"aria-dropeffect",
|
||||
// "errormessage",
|
||||
"aria-flowto", "aria-grabbed",
|
||||
// "haspopup",
|
||||
"aria-hidden",
|
||||
// "invalid",
|
||||
"aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-relevant", "aria-roledescription"].some(function (attributeName) {
|
||||
var _prohibitedAttributes;
|
||||
return element.hasAttribute(attributeName) && !((_prohibitedAttributes = prohibitedAttributes[role]) !== null && _prohibitedAttributes !== void 0 && _prohibitedAttributes.has(attributeName));
|
||||
});
|
||||
}
|
||||
function ignorePresentationalRole(element, implicitRole) {
|
||||
// https://rawgit.com/w3c/aria/stable/#conflict_resolution_presentation_none
|
||||
return hasGlobalAriaAttributes(element, implicitRole);
|
||||
}
|
||||
export default function getRole(element) {
|
||||
var explicitRole = getExplicitRole(element);
|
||||
if (explicitRole === null || presentationRoles.indexOf(explicitRole) !== -1) {
|
||||
var implicitRole = getImplicitRole(element);
|
||||
if (presentationRoles.indexOf(explicitRole || "") === -1 || ignorePresentationalRole(element, implicitRole || "")) {
|
||||
return implicitRole;
|
||||
}
|
||||
}
|
||||
return explicitRole;
|
||||
}
|
||||
function getImplicitRole(element) {
|
||||
var mappedByTag = localNameToRoleMappings[getLocalName(element)];
|
||||
if (mappedByTag !== undefined) {
|
||||
return mappedByTag;
|
||||
}
|
||||
switch (getLocalName(element)) {
|
||||
case "a":
|
||||
case "area":
|
||||
case "link":
|
||||
if (element.hasAttribute("href")) {
|
||||
return "link";
|
||||
}
|
||||
break;
|
||||
case "img":
|
||||
if (element.getAttribute("alt") === "" && !ignorePresentationalRole(element, "img")) {
|
||||
return "presentation";
|
||||
}
|
||||
return "img";
|
||||
case "input":
|
||||
{
|
||||
var _ref = element,
|
||||
type = _ref.type;
|
||||
switch (type) {
|
||||
case "button":
|
||||
case "image":
|
||||
case "reset":
|
||||
case "submit":
|
||||
return "button";
|
||||
case "checkbox":
|
||||
case "radio":
|
||||
return type;
|
||||
case "range":
|
||||
return "slider";
|
||||
case "email":
|
||||
case "tel":
|
||||
case "text":
|
||||
case "url":
|
||||
if (element.hasAttribute("list")) {
|
||||
return "combobox";
|
||||
}
|
||||
return "textbox";
|
||||
case "search":
|
||||
if (element.hasAttribute("list")) {
|
||||
return "combobox";
|
||||
}
|
||||
return "searchbox";
|
||||
case "number":
|
||||
return "spinbutton";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
case "select":
|
||||
if (element.hasAttribute("multiple") || element.size > 1) {
|
||||
return "listbox";
|
||||
}
|
||||
return "combobox";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function getExplicitRole(element) {
|
||||
var role = element.getAttribute("role");
|
||||
if (role !== null) {
|
||||
var explicitRole = role.trim().split(" ")[0];
|
||||
// String.prototype.split(sep, limit) will always return an array with at least one member
|
||||
// as long as limit is either undefined or > 0
|
||||
if (explicitRole.length > 0) {
|
||||
return explicitRole;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//# sourceMappingURL=getRole.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/getRole.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/index.d.ts
generated
vendored
Normal file
6
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export { computeAccessibleDescription } from "./accessible-description";
|
||||
export { computeAccessibleName } from "./accessible-name";
|
||||
export { default as getRole } from "./getRole";
|
||||
export * from "./is-inaccessible";
|
||||
export { isDisabled } from "./is-disabled";
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/index.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
||||
27
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/index.js
generated
vendored
Normal file
27
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
var _exportNames = {
|
||||
computeAccessibleDescription: true,
|
||||
computeAccessibleName: true,
|
||||
getRole: true,
|
||||
isDisabled: true
|
||||
};
|
||||
exports.isDisabled = exports.getRole = exports.computeAccessibleName = exports.computeAccessibleDescription = void 0;
|
||||
var _accessibleDescription = require("./accessible-description");
|
||||
exports.computeAccessibleDescription = _accessibleDescription.computeAccessibleDescription;
|
||||
var _accessibleName = require("./accessible-name");
|
||||
exports.computeAccessibleName = _accessibleName.computeAccessibleName;
|
||||
var _getRole = _interopRequireDefault(require("./getRole"));
|
||||
exports.getRole = _getRole.default;
|
||||
var _isInaccessible = require("./is-inaccessible");
|
||||
Object.keys(_isInaccessible).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
if (key in exports && exports[key] === _isInaccessible[key]) return;
|
||||
exports[key] = _isInaccessible[key];
|
||||
});
|
||||
var _isDisabled = require("./is-disabled");
|
||||
exports.isDisabled = _isDisabled.isDisabled;
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/index.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","names":["_accessibleDescription","require","exports","computeAccessibleDescription","_accessibleName","computeAccessibleName","_getRole","_interopRequireDefault","getRole","default","_isInaccessible","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","_isDisabled","isDisabled","obj","__esModule"],"sources":["../sources/index.ts"],"sourcesContent":["export { computeAccessibleDescription } from \"./accessible-description\";\nexport { computeAccessibleName } from \"./accessible-name\";\nexport { default as getRole } from \"./getRole\";\nexport * from \"./is-inaccessible\";\nexport { isDisabled } from \"./is-disabled\";\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAAwEC,OAAA,CAAAC,4BAAA,GAAAH,sBAAA,CAAAG,4BAAA;AACxE,IAAAC,eAAA,GAAAH,OAAA;AAA0DC,OAAA,CAAAG,qBAAA,GAAAD,eAAA,CAAAC,qBAAA;AAC1D,IAAAC,QAAA,GAAAC,sBAAA,CAAAN,OAAA;AAA+CC,OAAA,CAAAM,OAAA,GAAAF,QAAA,CAAAG,OAAA;AAC/C,IAAAC,eAAA,GAAAT,OAAA;AAAAU,MAAA,CAAAC,IAAA,CAAAF,eAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAZ,OAAA,IAAAA,OAAA,CAAAY,GAAA,MAAAJ,eAAA,CAAAI,GAAA;EAAAZ,OAAA,CAAAY,GAAA,IAAAJ,eAAA,CAAAI,GAAA;AAAA;AACA,IAAAK,WAAA,GAAAlB,OAAA;AAA2CC,OAAA,CAAAkB,UAAA,GAAAD,WAAA,CAAAC,UAAA;AAAA,SAAAb,uBAAAc,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAZ,OAAA,EAAAY,GAAA"}
|
||||
6
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/index.mjs
generated
vendored
Normal file
6
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export { computeAccessibleDescription } from "./accessible-description.mjs";
|
||||
export { computeAccessibleName } from "./accessible-name.mjs";
|
||||
export { default as getRole } from "./getRole.mjs";
|
||||
export * from "./is-inaccessible.mjs";
|
||||
export { isDisabled } from "./is-disabled.mjs";
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/index.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/index.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.mjs","names":["computeAccessibleDescription","computeAccessibleName","default","getRole","isDisabled"],"sources":["../sources/index.ts"],"sourcesContent":["export { computeAccessibleDescription } from \"./accessible-description\";\nexport { computeAccessibleName } from \"./accessible-name\";\nexport { default as getRole } from \"./getRole\";\nexport * from \"./is-inaccessible\";\nexport { isDisabled } from \"./is-disabled\";\n"],"mappings":"AAAA,SAASA,4BAA4B,QAAQ,8BAA0B;AACvE,SAASC,qBAAqB,QAAQ,uBAAmB;AACzD,SAASC,OAAO,IAAIC,OAAO,QAAQ,eAAW;AAC9C,cAAc,uBAAmB;AACjC,SAASC,UAAU,QAAQ,mBAAe"}
|
||||
10
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-disabled.d.ts
generated
vendored
Normal file
10
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-disabled.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Check if an element is disabled
|
||||
* https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings
|
||||
* https://www.w3.org/TR/wai-aria-1.1/#aria-disabled
|
||||
*
|
||||
* @param element
|
||||
* @returns {boolean} true if disabled, otherwise false
|
||||
*/
|
||||
export declare function isDisabled(element: Element): boolean;
|
||||
//# sourceMappingURL=is-disabled.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-disabled.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-disabled.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-disabled.d.ts","sourceRoot":"","sources":["../sources/is-disabled.ts"],"names":[],"mappings":"AAYA;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAMpD"}
|
||||
20
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-disabled.js
generated
vendored
Normal file
20
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-disabled.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.isDisabled = isDisabled;
|
||||
var _getRole = require("./getRole");
|
||||
var elementsSupportingDisabledAttribute = new Set(["button", "fieldset", "input", "optgroup", "option", "select", "textarea"]);
|
||||
|
||||
/**
|
||||
* Check if an element is disabled
|
||||
* https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings
|
||||
* https://www.w3.org/TR/wai-aria-1.1/#aria-disabled
|
||||
*
|
||||
* @param element
|
||||
* @returns {boolean} true if disabled, otherwise false
|
||||
*/
|
||||
function isDisabled(element) {
|
||||
var localName = (0, _getRole.getLocalName)(element);
|
||||
return elementsSupportingDisabledAttribute.has(localName) && element.hasAttribute("disabled") ? true : element.getAttribute("aria-disabled") === "true";
|
||||
}
|
||||
//# sourceMappingURL=is-disabled.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-disabled.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-disabled.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-disabled.js","names":["_getRole","require","elementsSupportingDisabledAttribute","Set","isDisabled","element","localName","getLocalName","has","hasAttribute","getAttribute"],"sources":["../sources/is-disabled.ts"],"sourcesContent":["import { getLocalName } from \"./getRole\";\n\nconst elementsSupportingDisabledAttribute = new Set([\n\t\"button\",\n\t\"fieldset\",\n\t\"input\",\n\t\"optgroup\",\n\t\"option\",\n\t\"select\",\n\t\"textarea\",\n]);\n\n/**\n * Check if an element is disabled\n * https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings\n * https://www.w3.org/TR/wai-aria-1.1/#aria-disabled\n *\n * @param element\n * @returns {boolean} true if disabled, otherwise false\n */\nexport function isDisabled(element: Element): boolean {\n\tconst localName = getLocalName(element);\n\treturn elementsSupportingDisabledAttribute.has(localName) &&\n\t\telement.hasAttribute(\"disabled\")\n\t\t? true\n\t\t: element.getAttribute(\"aria-disabled\") === \"true\";\n}\n"],"mappings":";;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAMC,mCAAmC,GAAG,IAAIC,GAAG,CAAC,CACnD,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,CACV,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAACC,OAAgB,EAAW;EACrD,IAAMC,SAAS,GAAG,IAAAC,qBAAY,EAACF,OAAO,CAAC;EACvC,OAAOH,mCAAmC,CAACM,GAAG,CAACF,SAAS,CAAC,IACxDD,OAAO,CAACI,YAAY,CAAC,UAAU,CAAC,GAC9B,IAAI,GACJJ,OAAO,CAACK,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM;AACpD"}
|
||||
16
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-disabled.mjs
generated
vendored
Normal file
16
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-disabled.mjs
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { getLocalName } from "./getRole.mjs";
|
||||
var elementsSupportingDisabledAttribute = new Set(["button", "fieldset", "input", "optgroup", "option", "select", "textarea"]);
|
||||
|
||||
/**
|
||||
* Check if an element is disabled
|
||||
* https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings
|
||||
* https://www.w3.org/TR/wai-aria-1.1/#aria-disabled
|
||||
*
|
||||
* @param element
|
||||
* @returns {boolean} true if disabled, otherwise false
|
||||
*/
|
||||
export function isDisabled(element) {
|
||||
var localName = getLocalName(element);
|
||||
return elementsSupportingDisabledAttribute.has(localName) && element.hasAttribute("disabled") ? true : element.getAttribute("aria-disabled") === "true";
|
||||
}
|
||||
//# sourceMappingURL=is-disabled.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-disabled.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-disabled.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-disabled.mjs","names":["getLocalName","elementsSupportingDisabledAttribute","Set","isDisabled","element","localName","has","hasAttribute","getAttribute"],"sources":["../sources/is-disabled.ts"],"sourcesContent":["import { getLocalName } from \"./getRole\";\n\nconst elementsSupportingDisabledAttribute = new Set([\n\t\"button\",\n\t\"fieldset\",\n\t\"input\",\n\t\"optgroup\",\n\t\"option\",\n\t\"select\",\n\t\"textarea\",\n]);\n\n/**\n * Check if an element is disabled\n * https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings\n * https://www.w3.org/TR/wai-aria-1.1/#aria-disabled\n *\n * @param element\n * @returns {boolean} true if disabled, otherwise false\n */\nexport function isDisabled(element: Element): boolean {\n\tconst localName = getLocalName(element);\n\treturn elementsSupportingDisabledAttribute.has(localName) &&\n\t\telement.hasAttribute(\"disabled\")\n\t\t? true\n\t\t: element.getAttribute(\"aria-disabled\") === \"true\";\n}\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,eAAW;AAExC,IAAMC,mCAAmC,GAAG,IAAIC,GAAG,CAAC,CACnD,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,CACV,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAACC,OAAgB,EAAW;EACrD,IAAMC,SAAS,GAAGL,YAAY,CAACI,OAAO,CAAC;EACvC,OAAOH,mCAAmC,CAACK,GAAG,CAACD,SAAS,CAAC,IACxDD,OAAO,CAACG,YAAY,CAAC,UAAU,CAAC,GAC9B,IAAI,GACJH,OAAO,CAACI,YAAY,CAAC,eAAe,CAAC,KAAK,MAAM;AACpD"}
|
||||
31
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-inaccessible.d.ts
generated
vendored
Normal file
31
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-inaccessible.d.ts
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
export interface IsInaccessibleOptions {
|
||||
getComputedStyle?: typeof window.getComputedStyle;
|
||||
/**
|
||||
* Can be used to return cached results from previous isSubtreeInaccessible calls.
|
||||
*/
|
||||
isSubtreeInaccessible?: (element: Element) => boolean;
|
||||
}
|
||||
/**
|
||||
* Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion
|
||||
* which should only be used for elements with a non-presentational role i.e.
|
||||
* `role="none"` and `role="presentation"` will not be excluded.
|
||||
*
|
||||
* Implements aria-hidden semantics (i.e. parent overrides child)
|
||||
* Ignores "Child Presentational: True" characteristics
|
||||
*
|
||||
* @param element
|
||||
* @param options
|
||||
* @returns {boolean} true if excluded, otherwise false
|
||||
*/
|
||||
export declare function isInaccessible(element: Element, options?: IsInaccessibleOptions): boolean;
|
||||
export interface IsSubtreeInaccessibleOptions {
|
||||
getComputedStyle?: typeof window.getComputedStyle;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param element
|
||||
* @param options
|
||||
* @returns {boolean} - `true` if every child of the element is inaccessible
|
||||
*/
|
||||
export declare function isSubtreeInaccessible(element: Element, options?: IsSubtreeInaccessibleOptions): boolean;
|
||||
//# sourceMappingURL=is-inaccessible.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-inaccessible.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-inaccessible.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-inaccessible.d.ts","sourceRoot":"","sources":["../sources/is-inaccessible.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACrC,gBAAgB,CAAC,EAAE,OAAO,MAAM,CAAC,gBAAgB,CAAC;IAClD;;OAEG;IACH,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;CACtD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC7B,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE,qBAA0B,GACjC,OAAO,CAyBT;AAED,MAAM,WAAW,4BAA4B;IAC5C,gBAAgB,CAAC,EAAE,OAAO,MAAM,CAAC,gBAAgB,CAAC;CAClD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,OAAO,EAChB,OAAO,GAAE,4BAAiC,GACxC,OAAO,CAuBT"}
|
||||
68
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-inaccessible.js
generated
vendored
Normal file
68
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-inaccessible.js
generated
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.isInaccessible = isInaccessible;
|
||||
exports.isSubtreeInaccessible = isSubtreeInaccessible;
|
||||
/**
|
||||
* Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion
|
||||
* which should only be used for elements with a non-presentational role i.e.
|
||||
* `role="none"` and `role="presentation"` will not be excluded.
|
||||
*
|
||||
* Implements aria-hidden semantics (i.e. parent overrides child)
|
||||
* Ignores "Child Presentational: True" characteristics
|
||||
*
|
||||
* @param element
|
||||
* @param options
|
||||
* @returns {boolean} true if excluded, otherwise false
|
||||
*/
|
||||
function isInaccessible(element) {
|
||||
var _element$ownerDocumen;
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var _options$getComputedS = options.getComputedStyle,
|
||||
getComputedStyle = _options$getComputedS === void 0 ? (_element$ownerDocumen = element.ownerDocument.defaultView) === null || _element$ownerDocumen === void 0 ? void 0 : _element$ownerDocumen.getComputedStyle : _options$getComputedS,
|
||||
_options$isSubtreeIna = options.isSubtreeInaccessible,
|
||||
isSubtreeInaccessibleImpl = _options$isSubtreeIna === void 0 ? isSubtreeInaccessible : _options$isSubtreeIna;
|
||||
if (typeof getComputedStyle !== "function") {
|
||||
throw new TypeError("Owner document of the element needs to have an associated window.");
|
||||
}
|
||||
// since visibility is inherited we can exit early
|
||||
if (getComputedStyle(element).visibility === "hidden") {
|
||||
return true;
|
||||
}
|
||||
var currentElement = element;
|
||||
while (currentElement) {
|
||||
if (isSubtreeInaccessibleImpl(currentElement, {
|
||||
getComputedStyle: getComputedStyle
|
||||
})) {
|
||||
return true;
|
||||
}
|
||||
currentElement = currentElement.parentElement;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param element
|
||||
* @param options
|
||||
* @returns {boolean} - `true` if every child of the element is inaccessible
|
||||
*/
|
||||
function isSubtreeInaccessible(element) {
|
||||
var _element$ownerDocumen2;
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var _options$getComputedS2 = options.getComputedStyle,
|
||||
getComputedStyle = _options$getComputedS2 === void 0 ? (_element$ownerDocumen2 = element.ownerDocument.defaultView) === null || _element$ownerDocumen2 === void 0 ? void 0 : _element$ownerDocumen2.getComputedStyle : _options$getComputedS2;
|
||||
if (typeof getComputedStyle !== "function") {
|
||||
throw new TypeError("Owner document of the element needs to have an associated window.");
|
||||
}
|
||||
if (element.hidden === true) {
|
||||
return true;
|
||||
}
|
||||
if (element.getAttribute("aria-hidden") === "true") {
|
||||
return true;
|
||||
}
|
||||
if (getComputedStyle(element).display === "none") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//# sourceMappingURL=is-inaccessible.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-inaccessible.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-inaccessible.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-inaccessible.js","names":["isInaccessible","element","_element$ownerDocumen","options","arguments","length","undefined","_options$getComputedS","getComputedStyle","ownerDocument","defaultView","_options$isSubtreeIna","isSubtreeInaccessible","isSubtreeInaccessibleImpl","TypeError","visibility","currentElement","parentElement","_element$ownerDocumen2","_options$getComputedS2","hidden","getAttribute","display"],"sources":["../sources/is-inaccessible.ts"],"sourcesContent":["export interface IsInaccessibleOptions {\n\tgetComputedStyle?: typeof window.getComputedStyle;\n\t/**\n\t * Can be used to return cached results from previous isSubtreeInaccessible calls.\n\t */\n\tisSubtreeInaccessible?: (element: Element) => boolean;\n}\n\n/**\n * Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion\n * which should only be used for elements with a non-presentational role i.e.\n * `role=\"none\"` and `role=\"presentation\"` will not be excluded.\n *\n * Implements aria-hidden semantics (i.e. parent overrides child)\n * Ignores \"Child Presentational: True\" characteristics\n *\n * @param element\n * @param options\n * @returns {boolean} true if excluded, otherwise false\n */\nexport function isInaccessible(\n\telement: Element,\n\toptions: IsInaccessibleOptions = {},\n): boolean {\n\tconst {\n\t\tgetComputedStyle = element.ownerDocument.defaultView?.getComputedStyle,\n\t\tisSubtreeInaccessible: isSubtreeInaccessibleImpl = isSubtreeInaccessible,\n\t} = options;\n\tif (typeof getComputedStyle !== \"function\") {\n\t\tthrow new TypeError(\n\t\t\t\"Owner document of the element needs to have an associated window.\",\n\t\t);\n\t}\n\t// since visibility is inherited we can exit early\n\tif (getComputedStyle(element).visibility === \"hidden\") {\n\t\treturn true;\n\t}\n\n\tlet currentElement: Element | null = element;\n\twhile (currentElement) {\n\t\tif (isSubtreeInaccessibleImpl(currentElement, { getComputedStyle })) {\n\t\t\treturn true;\n\t\t}\n\n\t\tcurrentElement = currentElement.parentElement;\n\t}\n\n\treturn false;\n}\n\nexport interface IsSubtreeInaccessibleOptions {\n\tgetComputedStyle?: typeof window.getComputedStyle;\n}\n\n/**\n *\n * @param element\n * @param options\n * @returns {boolean} - `true` if every child of the element is inaccessible\n */\nexport function isSubtreeInaccessible(\n\telement: Element,\n\toptions: IsSubtreeInaccessibleOptions = {},\n): boolean {\n\tconst {\n\t\tgetComputedStyle = element.ownerDocument.defaultView?.getComputedStyle,\n\t} = options;\n\tif (typeof getComputedStyle !== \"function\") {\n\t\tthrow new TypeError(\n\t\t\t\"Owner document of the element needs to have an associated window.\",\n\t\t);\n\t}\n\n\tif ((element as HTMLElement).hidden === true) {\n\t\treturn true;\n\t}\n\n\tif (element.getAttribute(\"aria-hidden\") === \"true\") {\n\t\treturn true;\n\t}\n\n\tif (getComputedStyle(element).display === \"none\") {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n"],"mappings":";;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,cAAcA,CAC7BC,OAAgB,EAEN;EAAA,IAAAC,qBAAA;EAAA,IADVC,OAA8B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAEnC,IAAAG,qBAAA,GAGIJ,OAAO,CAFVK,gBAAgB;IAAhBA,gBAAgB,GAAAD,qBAAA,eAAAL,qBAAA,GAAGD,OAAO,CAACQ,aAAa,CAACC,WAAW,cAAAR,qBAAA,uBAAjCA,qBAAA,CAAmCM,gBAAgB,GAAAD,qBAAA;IAAAI,qBAAA,GAEnER,OAAO,CADVS,qBAAqB;IAAEC,yBAAyB,GAAAF,qBAAA,cAAGC,qBAAqB,GAAAD,qBAAA;EAEzE,IAAI,OAAOH,gBAAgB,KAAK,UAAU,EAAE;IAC3C,MAAM,IAAIM,SAAS,CAClB,mEACD,CAAC;EACF;EACA;EACA,IAAIN,gBAAgB,CAACP,OAAO,CAAC,CAACc,UAAU,KAAK,QAAQ,EAAE;IACtD,OAAO,IAAI;EACZ;EAEA,IAAIC,cAA8B,GAAGf,OAAO;EAC5C,OAAOe,cAAc,EAAE;IACtB,IAAIH,yBAAyB,CAACG,cAAc,EAAE;MAAER,gBAAgB,EAAhBA;IAAiB,CAAC,CAAC,EAAE;MACpE,OAAO,IAAI;IACZ;IAEAQ,cAAc,GAAGA,cAAc,CAACC,aAAa;EAC9C;EAEA,OAAO,KAAK;AACb;AAMA;AACA;AACA;AACA;AACA;AACA;AACO,SAASL,qBAAqBA,CACpCX,OAAgB,EAEN;EAAA,IAAAiB,sBAAA;EAAA,IADVf,OAAqC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE1C,IAAAe,sBAAA,GAEIhB,OAAO,CADVK,gBAAgB;IAAhBA,gBAAgB,GAAAW,sBAAA,eAAAD,sBAAA,GAAGjB,OAAO,CAACQ,aAAa,CAACC,WAAW,cAAAQ,sBAAA,uBAAjCA,sBAAA,CAAmCV,gBAAgB,GAAAW,sBAAA;EAEvE,IAAI,OAAOX,gBAAgB,KAAK,UAAU,EAAE;IAC3C,MAAM,IAAIM,SAAS,CAClB,mEACD,CAAC;EACF;EAEA,IAAKb,OAAO,CAAiBmB,MAAM,KAAK,IAAI,EAAE;IAC7C,OAAO,IAAI;EACZ;EAEA,IAAInB,OAAO,CAACoB,YAAY,CAAC,aAAa,CAAC,KAAK,MAAM,EAAE;IACnD,OAAO,IAAI;EACZ;EAEA,IAAIb,gBAAgB,CAACP,OAAO,CAAC,CAACqB,OAAO,KAAK,MAAM,EAAE;IACjD,OAAO,IAAI;EACZ;EAEA,OAAO,KAAK;AACb"}
|
||||
63
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-inaccessible.mjs
generated
vendored
Normal file
63
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-inaccessible.mjs
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion
|
||||
* which should only be used for elements with a non-presentational role i.e.
|
||||
* `role="none"` and `role="presentation"` will not be excluded.
|
||||
*
|
||||
* Implements aria-hidden semantics (i.e. parent overrides child)
|
||||
* Ignores "Child Presentational: True" characteristics
|
||||
*
|
||||
* @param element
|
||||
* @param options
|
||||
* @returns {boolean} true if excluded, otherwise false
|
||||
*/
|
||||
export function isInaccessible(element) {
|
||||
var _element$ownerDocumen;
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var _options$getComputedS = options.getComputedStyle,
|
||||
getComputedStyle = _options$getComputedS === void 0 ? (_element$ownerDocumen = element.ownerDocument.defaultView) === null || _element$ownerDocumen === void 0 ? void 0 : _element$ownerDocumen.getComputedStyle : _options$getComputedS,
|
||||
_options$isSubtreeIna = options.isSubtreeInaccessible,
|
||||
isSubtreeInaccessibleImpl = _options$isSubtreeIna === void 0 ? isSubtreeInaccessible : _options$isSubtreeIna;
|
||||
if (typeof getComputedStyle !== "function") {
|
||||
throw new TypeError("Owner document of the element needs to have an associated window.");
|
||||
}
|
||||
// since visibility is inherited we can exit early
|
||||
if (getComputedStyle(element).visibility === "hidden") {
|
||||
return true;
|
||||
}
|
||||
var currentElement = element;
|
||||
while (currentElement) {
|
||||
if (isSubtreeInaccessibleImpl(currentElement, {
|
||||
getComputedStyle: getComputedStyle
|
||||
})) {
|
||||
return true;
|
||||
}
|
||||
currentElement = currentElement.parentElement;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param element
|
||||
* @param options
|
||||
* @returns {boolean} - `true` if every child of the element is inaccessible
|
||||
*/
|
||||
export function isSubtreeInaccessible(element) {
|
||||
var _element$ownerDocumen2;
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
var _options$getComputedS2 = options.getComputedStyle,
|
||||
getComputedStyle = _options$getComputedS2 === void 0 ? (_element$ownerDocumen2 = element.ownerDocument.defaultView) === null || _element$ownerDocumen2 === void 0 ? void 0 : _element$ownerDocumen2.getComputedStyle : _options$getComputedS2;
|
||||
if (typeof getComputedStyle !== "function") {
|
||||
throw new TypeError("Owner document of the element needs to have an associated window.");
|
||||
}
|
||||
if (element.hidden === true) {
|
||||
return true;
|
||||
}
|
||||
if (element.getAttribute("aria-hidden") === "true") {
|
||||
return true;
|
||||
}
|
||||
if (getComputedStyle(element).display === "none") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//# sourceMappingURL=is-inaccessible.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-inaccessible.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/is-inaccessible.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"is-inaccessible.mjs","names":["isInaccessible","element","_element$ownerDocumen","options","arguments","length","undefined","_options$getComputedS","getComputedStyle","ownerDocument","defaultView","_options$isSubtreeIna","isSubtreeInaccessible","isSubtreeInaccessibleImpl","TypeError","visibility","currentElement","parentElement","_element$ownerDocumen2","_options$getComputedS2","hidden","getAttribute","display"],"sources":["../sources/is-inaccessible.ts"],"sourcesContent":["export interface IsInaccessibleOptions {\n\tgetComputedStyle?: typeof window.getComputedStyle;\n\t/**\n\t * Can be used to return cached results from previous isSubtreeInaccessible calls.\n\t */\n\tisSubtreeInaccessible?: (element: Element) => boolean;\n}\n\n/**\n * Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion\n * which should only be used for elements with a non-presentational role i.e.\n * `role=\"none\"` and `role=\"presentation\"` will not be excluded.\n *\n * Implements aria-hidden semantics (i.e. parent overrides child)\n * Ignores \"Child Presentational: True\" characteristics\n *\n * @param element\n * @param options\n * @returns {boolean} true if excluded, otherwise false\n */\nexport function isInaccessible(\n\telement: Element,\n\toptions: IsInaccessibleOptions = {},\n): boolean {\n\tconst {\n\t\tgetComputedStyle = element.ownerDocument.defaultView?.getComputedStyle,\n\t\tisSubtreeInaccessible: isSubtreeInaccessibleImpl = isSubtreeInaccessible,\n\t} = options;\n\tif (typeof getComputedStyle !== \"function\") {\n\t\tthrow new TypeError(\n\t\t\t\"Owner document of the element needs to have an associated window.\",\n\t\t);\n\t}\n\t// since visibility is inherited we can exit early\n\tif (getComputedStyle(element).visibility === \"hidden\") {\n\t\treturn true;\n\t}\n\n\tlet currentElement: Element | null = element;\n\twhile (currentElement) {\n\t\tif (isSubtreeInaccessibleImpl(currentElement, { getComputedStyle })) {\n\t\t\treturn true;\n\t\t}\n\n\t\tcurrentElement = currentElement.parentElement;\n\t}\n\n\treturn false;\n}\n\nexport interface IsSubtreeInaccessibleOptions {\n\tgetComputedStyle?: typeof window.getComputedStyle;\n}\n\n/**\n *\n * @param element\n * @param options\n * @returns {boolean} - `true` if every child of the element is inaccessible\n */\nexport function isSubtreeInaccessible(\n\telement: Element,\n\toptions: IsSubtreeInaccessibleOptions = {},\n): boolean {\n\tconst {\n\t\tgetComputedStyle = element.ownerDocument.defaultView?.getComputedStyle,\n\t} = options;\n\tif (typeof getComputedStyle !== \"function\") {\n\t\tthrow new TypeError(\n\t\t\t\"Owner document of the element needs to have an associated window.\",\n\t\t);\n\t}\n\n\tif ((element as HTMLElement).hidden === true) {\n\t\treturn true;\n\t}\n\n\tif (element.getAttribute(\"aria-hidden\") === \"true\") {\n\t\treturn true;\n\t}\n\n\tif (getComputedStyle(element).display === \"none\") {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n"],"mappings":"AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,cAAcA,CAC7BC,OAAgB,EAEN;EAAA,IAAAC,qBAAA;EAAA,IADVC,OAA8B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAEnC,IAAAG,qBAAA,GAGIJ,OAAO,CAFVK,gBAAgB;IAAhBA,gBAAgB,GAAAD,qBAAA,eAAAL,qBAAA,GAAGD,OAAO,CAACQ,aAAa,CAACC,WAAW,cAAAR,qBAAA,uBAAjCA,qBAAA,CAAmCM,gBAAgB,GAAAD,qBAAA;IAAAI,qBAAA,GAEnER,OAAO,CADVS,qBAAqB;IAAEC,yBAAyB,GAAAF,qBAAA,cAAGC,qBAAqB,GAAAD,qBAAA;EAEzE,IAAI,OAAOH,gBAAgB,KAAK,UAAU,EAAE;IAC3C,MAAM,IAAIM,SAAS,CAClB,mEACD,CAAC;EACF;EACA;EACA,IAAIN,gBAAgB,CAACP,OAAO,CAAC,CAACc,UAAU,KAAK,QAAQ,EAAE;IACtD,OAAO,IAAI;EACZ;EAEA,IAAIC,cAA8B,GAAGf,OAAO;EAC5C,OAAOe,cAAc,EAAE;IACtB,IAAIH,yBAAyB,CAACG,cAAc,EAAE;MAAER,gBAAgB,EAAhBA;IAAiB,CAAC,CAAC,EAAE;MACpE,OAAO,IAAI;IACZ;IAEAQ,cAAc,GAAGA,cAAc,CAACC,aAAa;EAC9C;EAEA,OAAO,KAAK;AACb;AAMA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASL,qBAAqBA,CACpCX,OAAgB,EAEN;EAAA,IAAAiB,sBAAA;EAAA,IADVf,OAAqC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAE1C,IAAAe,sBAAA,GAEIhB,OAAO,CADVK,gBAAgB;IAAhBA,gBAAgB,GAAAW,sBAAA,eAAAD,sBAAA,GAAGjB,OAAO,CAACQ,aAAa,CAACC,WAAW,cAAAQ,sBAAA,uBAAjCA,sBAAA,CAAmCV,gBAAgB,GAAAW,sBAAA;EAEvE,IAAI,OAAOX,gBAAgB,KAAK,UAAU,EAAE;IAC3C,MAAM,IAAIM,SAAS,CAClB,mEACD,CAAC;EACF;EAEA,IAAKb,OAAO,CAAiBmB,MAAM,KAAK,IAAI,EAAE;IAC7C,OAAO,IAAI;EACZ;EAEA,IAAInB,OAAO,CAACoB,YAAY,CAAC,aAAa,CAAC,KAAK,MAAM,EAAE;IACnD,OAAO,IAAI;EACZ;EAEA,IAAIb,gBAAgB,CAACP,OAAO,CAAC,CAACqB,OAAO,KAAK,MAAM,EAAE;IACjD,OAAO,IAAI;EACZ;EAEA,OAAO,KAAK;AACb"}
|
||||
14
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.d.ts
generated
vendored
Normal file
14
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
declare global {
|
||||
class Set<T> {
|
||||
constructor(items?: T[]);
|
||||
add(value: T): this;
|
||||
clear(): void;
|
||||
delete(value: T): boolean;
|
||||
forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: unknown): void;
|
||||
has(value: T): boolean;
|
||||
readonly size: number;
|
||||
}
|
||||
}
|
||||
declare const _default: typeof Set;
|
||||
export default _default;
|
||||
//# sourceMappingURL=SetLike.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SetLike.d.ts","sourceRoot":"","sources":["../../sources/polyfills/SetLike.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,CAAC;IACd,MAAM,GAAG,CAAC,CAAC;oBAEE,KAAK,CAAC,EAAE,CAAC,EAAE;QACvB,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;QACnB,KAAK,IAAI,IAAI;QACb,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO;QACzB,OAAO,CACN,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,EACtD,OAAO,CAAC,EAAE,OAAO,GACf,IAAI;QACP,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO;QACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;KAItB;CACD;;AAuCD,wBAA0D"}
|
||||
65
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.js
generated
vendored
Normal file
65
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.js
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = void 0;
|
||||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
// for environments without Set we fallback to arrays with unique members
|
||||
var SetLike = /*#__PURE__*/function () {
|
||||
function SetLike() {
|
||||
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
||||
_classCallCheck(this, SetLike);
|
||||
_defineProperty(this, "items", void 0);
|
||||
this.items = items;
|
||||
}
|
||||
_createClass(SetLike, [{
|
||||
key: "add",
|
||||
value: function add(value) {
|
||||
if (this.has(value) === false) {
|
||||
this.items.push(value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
}, {
|
||||
key: "clear",
|
||||
value: function clear() {
|
||||
this.items = [];
|
||||
}
|
||||
}, {
|
||||
key: "delete",
|
||||
value: function _delete(value) {
|
||||
var previousLength = this.items.length;
|
||||
this.items = this.items.filter(function (item) {
|
||||
return item !== value;
|
||||
});
|
||||
return previousLength !== this.items.length;
|
||||
}
|
||||
}, {
|
||||
key: "forEach",
|
||||
value: function forEach(callbackfn) {
|
||||
var _this = this;
|
||||
this.items.forEach(function (item) {
|
||||
callbackfn(item, item, _this);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "has",
|
||||
value: function has(value) {
|
||||
return this.items.indexOf(value) !== -1;
|
||||
}
|
||||
}, {
|
||||
key: "size",
|
||||
get: function get() {
|
||||
return this.items.length;
|
||||
}
|
||||
}]);
|
||||
return SetLike;
|
||||
}();
|
||||
var _default = typeof Set === "undefined" ? Set : SetLike;
|
||||
exports.default = _default;
|
||||
//# sourceMappingURL=SetLike.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SetLike.js","names":["SetLike","items","arguments","length","undefined","_classCallCheck","_defineProperty","_createClass","key","value","add","has","push","clear","_delete","previousLength","filter","item","forEach","callbackfn","_this","indexOf","get","_default","Set","exports","default"],"sources":["../../sources/polyfills/SetLike.ts"],"sourcesContent":["declare global {\n\tclass Set<T> {\n\t\t// es2015.collection.d.ts\n\t\tconstructor(items?: T[]);\n\t\tadd(value: T): this;\n\t\tclear(): void;\n\t\tdelete(value: T): boolean;\n\t\tforEach(\n\t\t\tcallbackfn: (value: T, value2: T, set: Set<T>) => void,\n\t\t\tthisArg?: unknown,\n\t\t): void;\n\t\thas(value: T): boolean;\n\t\treadonly size: number;\n\n\t\t// es2015.iterable.d.ts\n\t\t// no implemennted\n\t}\n}\n\n// for environments without Set we fallback to arrays with unique members\nclass SetLike<T> implements Set<T> {\n\tprivate items: T[];\n\n\tconstructor(items: T[] = []) {\n\t\tthis.items = items;\n\t}\n\n\tadd(value: T): this {\n\t\tif (this.has(value) === false) {\n\t\t\tthis.items.push(value);\n\t\t}\n\t\treturn this;\n\t}\n\tclear(): void {\n\t\tthis.items = [];\n\t}\n\tdelete(value: T): boolean {\n\t\tconst previousLength = this.items.length;\n\t\tthis.items = this.items.filter((item) => item !== value);\n\n\t\treturn previousLength !== this.items.length;\n\t}\n\tforEach(callbackfn: (value: T, value2: T, set: Set<T>) => void): void {\n\t\tthis.items.forEach((item) => {\n\t\t\tcallbackfn(item, item, this);\n\t\t});\n\t}\n\thas(value: T): boolean {\n\t\treturn this.items.indexOf(value) !== -1;\n\t}\n\n\tget size(): number {\n\t\treturn this.items.length;\n\t}\n}\n\nexport default typeof Set === \"undefined\" ? Set : SetLike;\n"],"mappings":";;;;;;;;;;;AAmBA;AAAA,IACMA,OAAO;EAGZ,SAAAA,QAAA,EAA6B;IAAA,IAAjBC,KAAU,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IAAAG,eAAA,OAAAL,OAAA;IAAAM,eAAA;IAC1B,IAAI,CAACL,KAAK,GAAGA,KAAK;EACnB;EAACM,YAAA,CAAAP,OAAA;IAAAQ,GAAA;IAAAC,KAAA,EAED,SAAAC,IAAID,KAAQ,EAAQ;MACnB,IAAI,IAAI,CAACE,GAAG,CAACF,KAAK,CAAC,KAAK,KAAK,EAAE;QAC9B,IAAI,CAACR,KAAK,CAACW,IAAI,CAACH,KAAK,CAAC;MACvB;MACA,OAAO,IAAI;IACZ;EAAC;IAAAD,GAAA;IAAAC,KAAA,EACD,SAAAI,MAAA,EAAc;MACb,IAAI,CAACZ,KAAK,GAAG,EAAE;IAChB;EAAC;IAAAO,GAAA;IAAAC,KAAA,EACD,SAAAK,QAAOL,KAAQ,EAAW;MACzB,IAAMM,cAAc,GAAG,IAAI,CAACd,KAAK,CAACE,MAAM;MACxC,IAAI,CAACF,KAAK,GAAG,IAAI,CAACA,KAAK,CAACe,MAAM,CAAC,UAACC,IAAI;QAAA,OAAKA,IAAI,KAAKR,KAAK;MAAA,EAAC;MAExD,OAAOM,cAAc,KAAK,IAAI,CAACd,KAAK,CAACE,MAAM;IAC5C;EAAC;IAAAK,GAAA;IAAAC,KAAA,EACD,SAAAS,QAAQC,UAAsD,EAAQ;MAAA,IAAAC,KAAA;MACrE,IAAI,CAACnB,KAAK,CAACiB,OAAO,CAAC,UAACD,IAAI,EAAK;QAC5BE,UAAU,CAACF,IAAI,EAAEA,IAAI,EAAEG,KAAI,CAAC;MAC7B,CAAC,CAAC;IACH;EAAC;IAAAZ,GAAA;IAAAC,KAAA,EACD,SAAAE,IAAIF,KAAQ,EAAW;MACtB,OAAO,IAAI,CAACR,KAAK,CAACoB,OAAO,CAACZ,KAAK,CAAC,KAAK,CAAC,CAAC;IACxC;EAAC;IAAAD,GAAA;IAAAc,GAAA,EAED,SAAAA,IAAA,EAAmB;MAClB,OAAO,IAAI,CAACrB,KAAK,CAACE,MAAM;IACzB;EAAC;EAAA,OAAAH,OAAA;AAAA;AAAA,IAAAuB,QAAA,GAGa,OAAOC,GAAG,KAAK,WAAW,GAAGA,GAAG,GAAGxB,OAAO;AAAAyB,OAAA,CAAAC,OAAA,GAAAH,QAAA"}
|
||||
60
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs
generated
vendored
Normal file
60
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
||||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
||||
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
||||
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
||||
// for environments without Set we fallback to arrays with unique members
|
||||
var SetLike = /*#__PURE__*/function () {
|
||||
function SetLike() {
|
||||
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
||||
_classCallCheck(this, SetLike);
|
||||
_defineProperty(this, "items", void 0);
|
||||
this.items = items;
|
||||
}
|
||||
_createClass(SetLike, [{
|
||||
key: "add",
|
||||
value: function add(value) {
|
||||
if (this.has(value) === false) {
|
||||
this.items.push(value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
}, {
|
||||
key: "clear",
|
||||
value: function clear() {
|
||||
this.items = [];
|
||||
}
|
||||
}, {
|
||||
key: "delete",
|
||||
value: function _delete(value) {
|
||||
var previousLength = this.items.length;
|
||||
this.items = this.items.filter(function (item) {
|
||||
return item !== value;
|
||||
});
|
||||
return previousLength !== this.items.length;
|
||||
}
|
||||
}, {
|
||||
key: "forEach",
|
||||
value: function forEach(callbackfn) {
|
||||
var _this = this;
|
||||
this.items.forEach(function (item) {
|
||||
callbackfn(item, item, _this);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "has",
|
||||
value: function has(value) {
|
||||
return this.items.indexOf(value) !== -1;
|
||||
}
|
||||
}, {
|
||||
key: "size",
|
||||
get: function get() {
|
||||
return this.items.length;
|
||||
}
|
||||
}]);
|
||||
return SetLike;
|
||||
}();
|
||||
export default typeof Set === "undefined" ? Set : SetLike;
|
||||
//# sourceMappingURL=SetLike.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"SetLike.mjs","names":["SetLike","items","arguments","length","undefined","_classCallCheck","_defineProperty","_createClass","key","value","add","has","push","clear","_delete","previousLength","filter","item","forEach","callbackfn","_this","indexOf","get","Set"],"sources":["../../sources/polyfills/SetLike.ts"],"sourcesContent":["declare global {\n\tclass Set<T> {\n\t\t// es2015.collection.d.ts\n\t\tconstructor(items?: T[]);\n\t\tadd(value: T): this;\n\t\tclear(): void;\n\t\tdelete(value: T): boolean;\n\t\tforEach(\n\t\t\tcallbackfn: (value: T, value2: T, set: Set<T>) => void,\n\t\t\tthisArg?: unknown,\n\t\t): void;\n\t\thas(value: T): boolean;\n\t\treadonly size: number;\n\n\t\t// es2015.iterable.d.ts\n\t\t// no implemennted\n\t}\n}\n\n// for environments without Set we fallback to arrays with unique members\nclass SetLike<T> implements Set<T> {\n\tprivate items: T[];\n\n\tconstructor(items: T[] = []) {\n\t\tthis.items = items;\n\t}\n\n\tadd(value: T): this {\n\t\tif (this.has(value) === false) {\n\t\t\tthis.items.push(value);\n\t\t}\n\t\treturn this;\n\t}\n\tclear(): void {\n\t\tthis.items = [];\n\t}\n\tdelete(value: T): boolean {\n\t\tconst previousLength = this.items.length;\n\t\tthis.items = this.items.filter((item) => item !== value);\n\n\t\treturn previousLength !== this.items.length;\n\t}\n\tforEach(callbackfn: (value: T, value2: T, set: Set<T>) => void): void {\n\t\tthis.items.forEach((item) => {\n\t\t\tcallbackfn(item, item, this);\n\t\t});\n\t}\n\thas(value: T): boolean {\n\t\treturn this.items.indexOf(value) !== -1;\n\t}\n\n\tget size(): number {\n\t\treturn this.items.length;\n\t}\n}\n\nexport default typeof Set === \"undefined\" ? Set : SetLike;\n"],"mappings":";;;;;;;AAmBA;AAAA,IACMA,OAAO;EAGZ,SAAAA,QAAA,EAA6B;IAAA,IAAjBC,KAAU,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;IAAAG,eAAA,OAAAL,OAAA;IAAAM,eAAA;IAC1B,IAAI,CAACL,KAAK,GAAGA,KAAK;EACnB;EAACM,YAAA,CAAAP,OAAA;IAAAQ,GAAA;IAAAC,KAAA,EAED,SAAAC,IAAID,KAAQ,EAAQ;MACnB,IAAI,IAAI,CAACE,GAAG,CAACF,KAAK,CAAC,KAAK,KAAK,EAAE;QAC9B,IAAI,CAACR,KAAK,CAACW,IAAI,CAACH,KAAK,CAAC;MACvB;MACA,OAAO,IAAI;IACZ;EAAC;IAAAD,GAAA;IAAAC,KAAA,EACD,SAAAI,MAAA,EAAc;MACb,IAAI,CAACZ,KAAK,GAAG,EAAE;IAChB;EAAC;IAAAO,GAAA;IAAAC,KAAA,EACD,SAAAK,QAAOL,KAAQ,EAAW;MACzB,IAAMM,cAAc,GAAG,IAAI,CAACd,KAAK,CAACE,MAAM;MACxC,IAAI,CAACF,KAAK,GAAG,IAAI,CAACA,KAAK,CAACe,MAAM,CAAC,UAACC,IAAI;QAAA,OAAKA,IAAI,KAAKR,KAAK;MAAA,EAAC;MAExD,OAAOM,cAAc,KAAK,IAAI,CAACd,KAAK,CAACE,MAAM;IAC5C;EAAC;IAAAK,GAAA;IAAAC,KAAA,EACD,SAAAS,QAAQC,UAAsD,EAAQ;MAAA,IAAAC,KAAA;MACrE,IAAI,CAACnB,KAAK,CAACiB,OAAO,CAAC,UAACD,IAAI,EAAK;QAC5BE,UAAU,CAACF,IAAI,EAAEA,IAAI,EAAEG,KAAI,CAAC;MAC7B,CAAC,CAAC;IACH;EAAC;IAAAZ,GAAA;IAAAC,KAAA,EACD,SAAAE,IAAIF,KAAQ,EAAW;MACtB,OAAO,IAAI,CAACR,KAAK,CAACoB,OAAO,CAACZ,KAAK,CAAC,KAAK,CAAC,CAAC;IACxC;EAAC;IAAAD,GAAA;IAAAc,GAAA,EAED,SAAAA,IAAA,EAAmB;MAClB,OAAO,IAAI,CAACrB,KAAK,CAACE,MAAM;IACzB;EAAC;EAAA,OAAAH,OAAA;AAAA;AAGF,eAAe,OAAOuB,GAAG,KAAK,WAAW,GAAGA,GAAG,GAAGvB,OAAO"}
|
||||
6
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.d.ts
generated
vendored
Normal file
6
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Creates an array from an iterable object.
|
||||
* @param iterable An iterable object to convert to an array.
|
||||
*/
|
||||
export default function arrayFrom<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
||||
//# sourceMappingURL=array.from.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"array.from.d.ts","sourceRoot":"","sources":["../../sources/polyfills/array.from.ts"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC"}
|
||||
91
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.js
generated
vendored
Normal file
91
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.js
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
"use strict";
|
||||
|
||||
exports.__esModule = true;
|
||||
exports.default = arrayFrom;
|
||||
/**
|
||||
* @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill}
|
||||
* but without thisArg (too hard to type, no need to `this`)
|
||||
*/
|
||||
var toStr = Object.prototype.toString;
|
||||
function isCallable(fn) {
|
||||
return typeof fn === "function" || toStr.call(fn) === "[object Function]";
|
||||
}
|
||||
function toInteger(value) {
|
||||
var number = Number(value);
|
||||
if (isNaN(number)) {
|
||||
return 0;
|
||||
}
|
||||
if (number === 0 || !isFinite(number)) {
|
||||
return number;
|
||||
}
|
||||
return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
|
||||
}
|
||||
var maxSafeInteger = Math.pow(2, 53) - 1;
|
||||
function toLength(value) {
|
||||
var len = toInteger(value);
|
||||
return Math.min(Math.max(len, 0), maxSafeInteger);
|
||||
}
|
||||
/**
|
||||
* Creates an array from an iterable object.
|
||||
* @param iterable An iterable object to convert to an array.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates an array from an iterable object.
|
||||
* @param iterable An iterable object to convert to an array.
|
||||
* @param mapfn A mapping function to call on every element of the array.
|
||||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
function arrayFrom(arrayLike, mapFn) {
|
||||
// 1. Let C be the this value.
|
||||
// edit(@eps1lon): we're not calling it as Array.from
|
||||
var C = Array;
|
||||
|
||||
// 2. Let items be ToObject(arrayLike).
|
||||
var items = Object(arrayLike);
|
||||
|
||||
// 3. ReturnIfAbrupt(items).
|
||||
if (arrayLike == null) {
|
||||
throw new TypeError("Array.from requires an array-like object - not null or undefined");
|
||||
}
|
||||
|
||||
// 4. If mapfn is undefined, then let mapping be false.
|
||||
// const mapFn = arguments.length > 1 ? arguments[1] : void undefined;
|
||||
|
||||
if (typeof mapFn !== "undefined") {
|
||||
// 5. else
|
||||
// 5. a If IsCallable(mapfn) is false, throw a TypeError exception.
|
||||
if (!isCallable(mapFn)) {
|
||||
throw new TypeError("Array.from: when provided, the second argument must be a function");
|
||||
}
|
||||
}
|
||||
|
||||
// 10. Let lenValue be Get(items, "length").
|
||||
// 11. Let len be ToLength(lenValue).
|
||||
var len = toLength(items.length);
|
||||
|
||||
// 13. If IsConstructor(C) is true, then
|
||||
// 13. a. Let A be the result of calling the [[Construct]] internal method
|
||||
// of C with an argument list containing the single item len.
|
||||
// 14. a. Else, Let A be ArrayCreate(len).
|
||||
var A = isCallable(C) ? Object(new C(len)) : new Array(len);
|
||||
|
||||
// 16. Let k be 0.
|
||||
var k = 0;
|
||||
// 17. Repeat, while k < len… (also steps a - h)
|
||||
var kValue;
|
||||
while (k < len) {
|
||||
kValue = items[k];
|
||||
if (mapFn) {
|
||||
A[k] = mapFn(kValue, k);
|
||||
} else {
|
||||
A[k] = kValue;
|
||||
}
|
||||
k += 1;
|
||||
}
|
||||
// 18. Let putStatus be Put(A, "length", len, true).
|
||||
A.length = len;
|
||||
// 20. Return A.
|
||||
return A;
|
||||
}
|
||||
//# sourceMappingURL=array.from.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
87
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs
generated
vendored
Normal file
87
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill}
|
||||
* but without thisArg (too hard to type, no need to `this`)
|
||||
*/
|
||||
var toStr = Object.prototype.toString;
|
||||
function isCallable(fn) {
|
||||
return typeof fn === "function" || toStr.call(fn) === "[object Function]";
|
||||
}
|
||||
function toInteger(value) {
|
||||
var number = Number(value);
|
||||
if (isNaN(number)) {
|
||||
return 0;
|
||||
}
|
||||
if (number === 0 || !isFinite(number)) {
|
||||
return number;
|
||||
}
|
||||
return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
|
||||
}
|
||||
var maxSafeInteger = Math.pow(2, 53) - 1;
|
||||
function toLength(value) {
|
||||
var len = toInteger(value);
|
||||
return Math.min(Math.max(len, 0), maxSafeInteger);
|
||||
}
|
||||
/**
|
||||
* Creates an array from an iterable object.
|
||||
* @param iterable An iterable object to convert to an array.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates an array from an iterable object.
|
||||
* @param iterable An iterable object to convert to an array.
|
||||
* @param mapfn A mapping function to call on every element of the array.
|
||||
* @param thisArg Value of 'this' used to invoke the mapfn.
|
||||
*/
|
||||
export default function arrayFrom(arrayLike, mapFn) {
|
||||
// 1. Let C be the this value.
|
||||
// edit(@eps1lon): we're not calling it as Array.from
|
||||
var C = Array;
|
||||
|
||||
// 2. Let items be ToObject(arrayLike).
|
||||
var items = Object(arrayLike);
|
||||
|
||||
// 3. ReturnIfAbrupt(items).
|
||||
if (arrayLike == null) {
|
||||
throw new TypeError("Array.from requires an array-like object - not null or undefined");
|
||||
}
|
||||
|
||||
// 4. If mapfn is undefined, then let mapping be false.
|
||||
// const mapFn = arguments.length > 1 ? arguments[1] : void undefined;
|
||||
|
||||
if (typeof mapFn !== "undefined") {
|
||||
// 5. else
|
||||
// 5. a If IsCallable(mapfn) is false, throw a TypeError exception.
|
||||
if (!isCallable(mapFn)) {
|
||||
throw new TypeError("Array.from: when provided, the second argument must be a function");
|
||||
}
|
||||
}
|
||||
|
||||
// 10. Let lenValue be Get(items, "length").
|
||||
// 11. Let len be ToLength(lenValue).
|
||||
var len = toLength(items.length);
|
||||
|
||||
// 13. If IsConstructor(C) is true, then
|
||||
// 13. a. Let A be the result of calling the [[Construct]] internal method
|
||||
// of C with an argument list containing the single item len.
|
||||
// 14. a. Else, Let A be ArrayCreate(len).
|
||||
var A = isCallable(C) ? Object(new C(len)) : new Array(len);
|
||||
|
||||
// 16. Let k be 0.
|
||||
var k = 0;
|
||||
// 17. Repeat, while k < len… (also steps a - h)
|
||||
var kValue;
|
||||
while (k < len) {
|
||||
kValue = items[k];
|
||||
if (mapFn) {
|
||||
A[k] = mapFn(kValue, k);
|
||||
} else {
|
||||
A[k] = kValue;
|
||||
}
|
||||
k += 1;
|
||||
}
|
||||
// 18. Let putStatus be Put(A, "length", len, true).
|
||||
A.length = len;
|
||||
// 20. Return A.
|
||||
return A;
|
||||
}
|
||||
//# sourceMappingURL=array.from.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.js
generated
vendored
Normal file
2
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
//# sourceMappingURL=iterator.d.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"iterator.d.js","names":[],"sources":["../../sources/polyfills/iterator.d.ts"],"sourcesContent":["// copied from https://github.com/microsoft/TypeScript/blob/eaeee9cc31bdc3a16f982a2e7b784573c977fdfa/lib/\n// but with `unknown` instead of `any`\ninterface IteratorYieldResult<TYield> {\n\tdone?: false;\n\tvalue: TYield;\n}\n\ninterface IteratorReturnResult<TReturn> {\n\tdone: true;\n\tvalue: TReturn;\n}\n\ntype IteratorResult<T, TReturn = unknown> =\n\t| IteratorYieldResult<T>\n\t| IteratorReturnResult<TReturn>;\n\ninterface Iterator<T, TReturn = unknown, TNext = undefined> {\n\t// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.\n\tnext(...args: [] | [TNext]): IteratorResult<T, TReturn>;\n\treturn?(value?: TReturn): IteratorResult<T, TReturn>;\n\tthrow?(e?: unknown): IteratorResult<T, TReturn>;\n}\n\ninterface Iterable<T> {\n\t[Symbol.iterator](): Iterator<T>;\n}\n\ninterface IterableIterator<T> extends Iterator<T> {\n\t[Symbol.iterator](): IterableIterator<T>;\n}\ninterface SymbolConstructor {\n\t/**\n\t * A method that returns the default iterator for an object. Called by the semantics of the\n\t * for-of statement.\n\t */\n\treadonly iterator: symbol;\n}\n\ndeclare const Symbol: SymbolConstructor;\n"],"mappings":""}
|
||||
2
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.mjs
generated
vendored
Normal file
2
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
//# sourceMappingURL=iterator.d.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/iterator.d.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"iterator.d.mjs","names":[],"sources":["../../sources/polyfills/iterator.d.ts"],"sourcesContent":["// copied from https://github.com/microsoft/TypeScript/blob/eaeee9cc31bdc3a16f982a2e7b784573c977fdfa/lib/\n// but with `unknown` instead of `any`\ninterface IteratorYieldResult<TYield> {\n\tdone?: false;\n\tvalue: TYield;\n}\n\ninterface IteratorReturnResult<TReturn> {\n\tdone: true;\n\tvalue: TReturn;\n}\n\ntype IteratorResult<T, TReturn = unknown> =\n\t| IteratorYieldResult<T>\n\t| IteratorReturnResult<TReturn>;\n\ninterface Iterator<T, TReturn = unknown, TNext = undefined> {\n\t// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.\n\tnext(...args: [] | [TNext]): IteratorResult<T, TReturn>;\n\treturn?(value?: TReturn): IteratorResult<T, TReturn>;\n\tthrow?(e?: unknown): IteratorResult<T, TReturn>;\n}\n\ninterface Iterable<T> {\n\t[Symbol.iterator](): Iterator<T>;\n}\n\ninterface IterableIterator<T> extends Iterator<T> {\n\t[Symbol.iterator](): IterableIterator<T>;\n}\ninterface SymbolConstructor {\n\t/**\n\t * A method that returns the default iterator for an object. Called by the semantics of the\n\t * for-of statement.\n\t */\n\treadonly iterator: symbol;\n}\n\ndeclare const Symbol: SymbolConstructor;\n"],"mappings":""}
|
||||
25
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.d.ts
generated
vendored
Normal file
25
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
export { getLocalName } from "./getRole";
|
||||
export declare const presentationRoles: string[];
|
||||
export declare function isElement(node: Node | null): node is Element;
|
||||
export declare function isHTMLTableCaptionElement(node: Node | null): node is HTMLTableCaptionElement;
|
||||
export declare function isHTMLInputElement(node: Node | null): node is HTMLInputElement;
|
||||
export declare function isHTMLOptGroupElement(node: Node | null): node is HTMLOptGroupElement;
|
||||
export declare function isHTMLSelectElement(node: Node | null): node is HTMLSelectElement;
|
||||
export declare function isHTMLTableElement(node: Node | null): node is HTMLTableElement;
|
||||
export declare function isHTMLTextAreaElement(node: Node | null): node is HTMLTextAreaElement;
|
||||
export declare function safeWindow(node: Node): Window;
|
||||
export declare function isHTMLFieldSetElement(node: Node | null): node is HTMLFieldSetElement;
|
||||
export declare function isHTMLLegendElement(node: Node | null): node is HTMLLegendElement;
|
||||
export declare function isHTMLSlotElement(node: Node | null): node is HTMLSlotElement;
|
||||
export declare function isSVGElement(node: Node | null): node is SVGElement;
|
||||
export declare function isSVGSVGElement(node: Node | null): node is SVGSVGElement;
|
||||
export declare function isSVGTitleElement(node: Node | null): node is SVGTitleElement;
|
||||
/**
|
||||
*
|
||||
* @param {Node} node -
|
||||
* @param {string} attributeName -
|
||||
* @returns {Element[]} -
|
||||
*/
|
||||
export declare function queryIdRefs(node: Node, attributeName: string): Element[];
|
||||
export declare function hasAnyConcreteRoles(node: Node, roles: Array<string | null>): node is Element;
|
||||
//# sourceMappingURL=util.d.ts.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.d.ts.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../sources/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,eAAO,MAAM,iBAAiB,UAA2B,CAAC;AAE1D,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,OAAO,CAE5D;AAED,wBAAgB,yBAAyB,CACxC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,uBAAuB,CAEjC;AAED,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,gBAAgB,CAE1B;AAED,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,mBAAmB,CAE7B;AAED,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,iBAAiB,CAE3B;AAED,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,gBAAgB,CAE1B;AAED,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,mBAAmB,CAE7B;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAQ7C;AAED,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,mBAAmB,CAE7B;AAED,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,IAAI,GAAG,IAAI,GACf,IAAI,IAAI,iBAAiB,CAE3B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,eAAe,CAE5E;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,UAAU,CAElE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,aAAa,CAExE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,IAAI,eAAe,CAE5E;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,EAAE,CAmBxE;AAED,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,GACzB,IAAI,IAAI,OAAO,CAKjB"}
|
||||
106
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.js
generated
vendored
Normal file
106
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.js
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
"use strict";
|
||||
|
||||
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
||||
exports.__esModule = true;
|
||||
exports.hasAnyConcreteRoles = hasAnyConcreteRoles;
|
||||
exports.isElement = isElement;
|
||||
exports.isHTMLFieldSetElement = isHTMLFieldSetElement;
|
||||
exports.isHTMLInputElement = isHTMLInputElement;
|
||||
exports.isHTMLLegendElement = isHTMLLegendElement;
|
||||
exports.isHTMLOptGroupElement = isHTMLOptGroupElement;
|
||||
exports.isHTMLSelectElement = isHTMLSelectElement;
|
||||
exports.isHTMLSlotElement = isHTMLSlotElement;
|
||||
exports.isHTMLTableCaptionElement = isHTMLTableCaptionElement;
|
||||
exports.isHTMLTableElement = isHTMLTableElement;
|
||||
exports.isHTMLTextAreaElement = isHTMLTextAreaElement;
|
||||
exports.isSVGElement = isSVGElement;
|
||||
exports.isSVGSVGElement = isSVGSVGElement;
|
||||
exports.isSVGTitleElement = isSVGTitleElement;
|
||||
exports.presentationRoles = void 0;
|
||||
exports.queryIdRefs = queryIdRefs;
|
||||
exports.safeWindow = safeWindow;
|
||||
var _getRole = _interopRequireWildcard(require("./getRole"));
|
||||
exports.getLocalName = _getRole.getLocalName;
|
||||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
||||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
||||
var presentationRoles = ["presentation", "none"];
|
||||
exports.presentationRoles = presentationRoles;
|
||||
function isElement(node) {
|
||||
return node !== null && node.nodeType === node.ELEMENT_NODE;
|
||||
}
|
||||
function isHTMLTableCaptionElement(node) {
|
||||
return isElement(node) && (0, _getRole.getLocalName)(node) === "caption";
|
||||
}
|
||||
function isHTMLInputElement(node) {
|
||||
return isElement(node) && (0, _getRole.getLocalName)(node) === "input";
|
||||
}
|
||||
function isHTMLOptGroupElement(node) {
|
||||
return isElement(node) && (0, _getRole.getLocalName)(node) === "optgroup";
|
||||
}
|
||||
function isHTMLSelectElement(node) {
|
||||
return isElement(node) && (0, _getRole.getLocalName)(node) === "select";
|
||||
}
|
||||
function isHTMLTableElement(node) {
|
||||
return isElement(node) && (0, _getRole.getLocalName)(node) === "table";
|
||||
}
|
||||
function isHTMLTextAreaElement(node) {
|
||||
return isElement(node) && (0, _getRole.getLocalName)(node) === "textarea";
|
||||
}
|
||||
function safeWindow(node) {
|
||||
var _ref = node.ownerDocument === null ? node : node.ownerDocument,
|
||||
defaultView = _ref.defaultView;
|
||||
if (defaultView === null) {
|
||||
throw new TypeError("no window available");
|
||||
}
|
||||
return defaultView;
|
||||
}
|
||||
function isHTMLFieldSetElement(node) {
|
||||
return isElement(node) && (0, _getRole.getLocalName)(node) === "fieldset";
|
||||
}
|
||||
function isHTMLLegendElement(node) {
|
||||
return isElement(node) && (0, _getRole.getLocalName)(node) === "legend";
|
||||
}
|
||||
function isHTMLSlotElement(node) {
|
||||
return isElement(node) && (0, _getRole.getLocalName)(node) === "slot";
|
||||
}
|
||||
function isSVGElement(node) {
|
||||
return isElement(node) && node.ownerSVGElement !== undefined;
|
||||
}
|
||||
function isSVGSVGElement(node) {
|
||||
return isElement(node) && (0, _getRole.getLocalName)(node) === "svg";
|
||||
}
|
||||
function isSVGTitleElement(node) {
|
||||
return isSVGElement(node) && (0, _getRole.getLocalName)(node) === "title";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Node} node -
|
||||
* @param {string} attributeName -
|
||||
* @returns {Element[]} -
|
||||
*/
|
||||
function queryIdRefs(node, attributeName) {
|
||||
if (isElement(node) && node.hasAttribute(attributeName)) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute check
|
||||
var ids = node.getAttribute(attributeName).split(" ");
|
||||
|
||||
// Browsers that don't support shadow DOM won't have getRootNode
|
||||
var root = node.getRootNode ? node.getRootNode() : node.ownerDocument;
|
||||
return ids.map(function (id) {
|
||||
return root.getElementById(id);
|
||||
}).filter(function (element) {
|
||||
return element !== null;
|
||||
}
|
||||
// TODO: why does this not narrow?
|
||||
);
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
function hasAnyConcreteRoles(node, roles) {
|
||||
if (isElement(node)) {
|
||||
return roles.indexOf((0, _getRole.default)(node)) !== -1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//# sourceMappingURL=util.js.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.js.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
82
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.mjs
generated
vendored
Normal file
82
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.mjs
generated
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
export { getLocalName } from "./getRole.mjs";
|
||||
import getRole, { getLocalName } from "./getRole.mjs";
|
||||
export var presentationRoles = ["presentation", "none"];
|
||||
export function isElement(node) {
|
||||
return node !== null && node.nodeType === node.ELEMENT_NODE;
|
||||
}
|
||||
export function isHTMLTableCaptionElement(node) {
|
||||
return isElement(node) && getLocalName(node) === "caption";
|
||||
}
|
||||
export function isHTMLInputElement(node) {
|
||||
return isElement(node) && getLocalName(node) === "input";
|
||||
}
|
||||
export function isHTMLOptGroupElement(node) {
|
||||
return isElement(node) && getLocalName(node) === "optgroup";
|
||||
}
|
||||
export function isHTMLSelectElement(node) {
|
||||
return isElement(node) && getLocalName(node) === "select";
|
||||
}
|
||||
export function isHTMLTableElement(node) {
|
||||
return isElement(node) && getLocalName(node) === "table";
|
||||
}
|
||||
export function isHTMLTextAreaElement(node) {
|
||||
return isElement(node) && getLocalName(node) === "textarea";
|
||||
}
|
||||
export function safeWindow(node) {
|
||||
var _ref = node.ownerDocument === null ? node : node.ownerDocument,
|
||||
defaultView = _ref.defaultView;
|
||||
if (defaultView === null) {
|
||||
throw new TypeError("no window available");
|
||||
}
|
||||
return defaultView;
|
||||
}
|
||||
export function isHTMLFieldSetElement(node) {
|
||||
return isElement(node) && getLocalName(node) === "fieldset";
|
||||
}
|
||||
export function isHTMLLegendElement(node) {
|
||||
return isElement(node) && getLocalName(node) === "legend";
|
||||
}
|
||||
export function isHTMLSlotElement(node) {
|
||||
return isElement(node) && getLocalName(node) === "slot";
|
||||
}
|
||||
export function isSVGElement(node) {
|
||||
return isElement(node) && node.ownerSVGElement !== undefined;
|
||||
}
|
||||
export function isSVGSVGElement(node) {
|
||||
return isElement(node) && getLocalName(node) === "svg";
|
||||
}
|
||||
export function isSVGTitleElement(node) {
|
||||
return isSVGElement(node) && getLocalName(node) === "title";
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Node} node -
|
||||
* @param {string} attributeName -
|
||||
* @returns {Element[]} -
|
||||
*/
|
||||
export function queryIdRefs(node, attributeName) {
|
||||
if (isElement(node) && node.hasAttribute(attributeName)) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute check
|
||||
var ids = node.getAttribute(attributeName).split(" ");
|
||||
|
||||
// Browsers that don't support shadow DOM won't have getRootNode
|
||||
var root = node.getRootNode ? node.getRootNode() : node.ownerDocument;
|
||||
return ids.map(function (id) {
|
||||
return root.getElementById(id);
|
||||
}).filter(function (element) {
|
||||
return element !== null;
|
||||
}
|
||||
// TODO: why does this not narrow?
|
||||
);
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
export function hasAnyConcreteRoles(node, roles) {
|
||||
if (isElement(node)) {
|
||||
return roles.indexOf(getRole(node)) !== -1;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//# sourceMappingURL=util.mjs.map
|
||||
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.mjs.map
generated
vendored
Normal file
1
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
92
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/package.json
generated
vendored
Normal file
92
frontend/node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/package.json
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"name": "dom-accessibility-api",
|
||||
"description": "Implements https://w3c.github.io/accname/",
|
||||
"version": "0.6.3",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"type": "commonjs",
|
||||
"exports": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.mjs",
|
||||
"require": "./dist/index.js"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/eps1lon/dom-accessibility-api.git"
|
||||
},
|
||||
"files": [
|
||||
"dist/"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "yarn build:clean && yarn build:source && yarn build:source:cjs && yarn build:types",
|
||||
"build:clean": "rimraf dist",
|
||||
"build:source": "cross-env BABEL_ENV=esm babel sources --extensions \".ts\" --ignore \"**/__tests__/**/*\" --out-dir dist/ --out-file-extension=.mjs --source-maps",
|
||||
"build:source:cjs": "cross-env BABEL_ENV=cjs babel sources --extensions \".ts\" --ignore \"**/__tests__/**/*\" --out-dir dist/ --out-file-extension=.js --source-maps",
|
||||
"build:types": "tsc -p tsconfig.json --emitDeclarationOnly",
|
||||
"format": "prettier \"**/*.{json,js,md,ts,yml}\" --write --ignore-path .prettierignore",
|
||||
"lint": "eslint --report-unused-disable-directives \"{scripts,sources}/**/*.{js,ts}\"",
|
||||
"release": "yarn build && yarn changeset publish",
|
||||
"test": "jest --config scripts/jest/jest.config.js",
|
||||
"test:ci": "jest --ci --config scripts/jest/jest.ci.config.js --runInBand",
|
||||
"test:coverage": "jest --config scripts/jest/jest.coverage.config.js",
|
||||
"test:types": "tsc -p tsconfig.json --noEmit",
|
||||
"test:wpt:jsdom": "mocha tests/wpt-jsdom/run-wpts.js",
|
||||
"test:wpt:browser": "concurrently --success first --kill-others \"yarn test:wpt:browser:run\" \"yarn test:wpt:browser:server\"",
|
||||
"test:wpt:browser:run": "cypress run --project tests",
|
||||
"test:wpt:browser:server": "serve tests/wpt",
|
||||
"test:wpt:browser:open": "cypress open --project tests",
|
||||
"wpt:init": "git submodule update --init --recursive",
|
||||
"wpt:reset": "rimraf ./tests/wpt && yarn wpt:init",
|
||||
"wpt:update": "git submodule update --recursive --remote && cd tests/wpt && python wpt.py manifest --path ../wpt-jsdom/wpt-manifest.json"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.14.3",
|
||||
"@babel/core": "^7.14.3",
|
||||
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
||||
"@babel/preset-env": "^7.14.4",
|
||||
"@babel/preset-typescript": "^7.13.0",
|
||||
"@changesets/changelog-github": "^0.4.0",
|
||||
"@changesets/cli": "^2.16.0",
|
||||
"@testing-library/dom": "^9.0.0",
|
||||
"@types/jest": "^29.0.0",
|
||||
"@types/node": "18.17.17",
|
||||
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
||||
"@typescript-eslint/parser": "^6.0.0",
|
||||
"concurrently": "^8.0.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"cypress": "^12.0.0",
|
||||
"eslint": "^7.27.0",
|
||||
"eslint-plugin-jest": "^27.0.0",
|
||||
"jest": "^29.0.0",
|
||||
"jest-diff": "^29.0.0",
|
||||
"jest-environment-jsdom": "^29.0.0",
|
||||
"jest-junit": "^16.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsdom": "^20.0.0",
|
||||
"minimatch": "^9.0.0",
|
||||
"mocha": "^10.0.0",
|
||||
"mocha-sugar-free": "^1.4.0",
|
||||
"prettier": "^3.0.0",
|
||||
"q": "^1.5.1",
|
||||
"request": "^2.88",
|
||||
"request-promise-native": "^1.0.9",
|
||||
"rimraf": "^5.0.0",
|
||||
"serve": "^14.0.0",
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/node": "18.17.17"
|
||||
},
|
||||
"prettier": {
|
||||
"useTabs": true
|
||||
},
|
||||
"keywords": [
|
||||
"accessibility",
|
||||
"ARIA",
|
||||
"accname"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
||||
153
frontend/node_modules/@testing-library/jest-dom/package.json
generated
vendored
Normal file
153
frontend/node_modules/@testing-library/jest-dom/package.json
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
{
|
||||
"name": "@testing-library/jest-dom",
|
||||
"version": "6.6.3",
|
||||
"description": "Custom jest matchers to test the state of the DOM",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.mjs",
|
||||
"exports": {
|
||||
".": {
|
||||
"require": {
|
||||
"types": "./types/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"import": {
|
||||
"types": "./types/index.d.ts",
|
||||
"default": "./dist/index.mjs"
|
||||
}
|
||||
},
|
||||
"./jest-globals": {
|
||||
"require": {
|
||||
"types": "./types/jest-globals.d.ts",
|
||||
"default": "./dist/jest-globals.js"
|
||||
},
|
||||
"import": {
|
||||
"types": "./types/jest-globals.d.ts",
|
||||
"default": "./dist/jest-globals.mjs"
|
||||
}
|
||||
},
|
||||
"./matchers": {
|
||||
"require": {
|
||||
"types": "./types/matchers-standalone.d.ts",
|
||||
"default": "./dist/matchers.js"
|
||||
},
|
||||
"import": {
|
||||
"types": "./types/matchers-standalone.d.ts",
|
||||
"default": "./dist/matchers.mjs"
|
||||
}
|
||||
},
|
||||
"./vitest": {
|
||||
"require": {
|
||||
"types": "./types/vitest.d.ts",
|
||||
"default": "./dist/vitest.js"
|
||||
},
|
||||
"import": {
|
||||
"types": "./types/vitest.d.ts",
|
||||
"default": "./dist/vitest.mjs"
|
||||
}
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"types": "types/index.d.ts",
|
||||
"engines": {
|
||||
"node": ">=14",
|
||||
"npm": ">=6",
|
||||
"yarn": ">=1"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"format": "kcd-scripts format",
|
||||
"lint": "kcd-scripts lint",
|
||||
"setup": "npm install && npm run validate -s",
|
||||
"test": "kcd-scripts test",
|
||||
"test:update": "npm test -- --updateSnapshot --coverage",
|
||||
"test:types": "tsc -p types/__tests__/jest && tsc -p types/__tests__/jest-globals && tsc -p types/__tests__/vitest && tsc -p types/__tests__/bun",
|
||||
"validate": "kcd-scripts validate && npm run test:types"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"types",
|
||||
"*.d.ts",
|
||||
"jest-globals.js",
|
||||
"matchers.js",
|
||||
"vitest.js"
|
||||
],
|
||||
"keywords": [
|
||||
"testing",
|
||||
"dom",
|
||||
"jest",
|
||||
"jsdom"
|
||||
],
|
||||
"author": "Ernesto Garcia <gnapse@gmail.com> (http://gnapse.github.io)",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@adobe/css-tools": "^4.4.0",
|
||||
"aria-query": "^5.0.0",
|
||||
"chalk": "^3.0.0",
|
||||
"css.escape": "^1.5.1",
|
||||
"dom-accessibility-api": "^0.6.3",
|
||||
"lodash": "^4.17.21",
|
||||
"redent": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@jest/globals": "^29.6.2",
|
||||
"@rollup/plugin-commonjs": "^25.0.4",
|
||||
"@types/bun": "latest",
|
||||
"@types/web": "latest",
|
||||
"expect": "^29.6.2",
|
||||
"jest-environment-jsdom-sixteen": "^1.0.3",
|
||||
"jest-watch-select-projects": "^2.0.0",
|
||||
"jsdom": "^16.2.1",
|
||||
"kcd-scripts": "^14.0.0",
|
||||
"pretty-format": "^25.1.0",
|
||||
"rollup": "^3.28.1",
|
||||
"rollup-plugin-delete": "^2.0.0",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.34.1"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "./node_modules/kcd-scripts/eslint.js",
|
||||
"parserOptions": {
|
||||
"sourceType": "module",
|
||||
"ecmaVersion": 2020
|
||||
},
|
||||
"rules": {
|
||||
"no-invalid-this": "off"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"src/__tests__/*.js"
|
||||
],
|
||||
"rules": {
|
||||
"max-lines-per-function": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"**/*.d.ts"
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-empty-interface": "off",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-invalid-void-type": "off",
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"@typescript-eslint/triple-slash-reference": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"eslintIgnore": [
|
||||
"node_modules",
|
||||
"coverage",
|
||||
"dist",
|
||||
"types/__tests__"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/testing-library/jest-dom"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/testing-library/jest-dom/issues"
|
||||
},
|
||||
"homepage": "https://github.com/testing-library/jest-dom#readme"
|
||||
}
|
||||
100
frontend/node_modules/@testing-library/jest-dom/types/__tests__/bun/bun-custom-expect-types.test.ts
generated
vendored
Normal file
100
frontend/node_modules/@testing-library/jest-dom/types/__tests__/bun/bun-custom-expect-types.test.ts
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
* File that tests whether the TypeScript typings work as expected.
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-floating-promises */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
|
||||
import {expect} from 'bun:test'
|
||||
import * as matchersStandalone from '../../matchers-standalone'
|
||||
import * as originalMatchers from '../../matchers'
|
||||
|
||||
expect.extend(matchersStandalone)
|
||||
|
||||
const element: HTMLElement = document.body
|
||||
|
||||
function customExpect(
|
||||
_actual: HTMLElement,
|
||||
):
|
||||
| originalMatchers.TestingLibraryMatchers<unknown, void>
|
||||
| originalMatchers.TestingLibraryMatchers<unknown, Promise<void>> {
|
||||
throw new Error('Method not implemented.')
|
||||
}
|
||||
|
||||
customExpect(element).toBeInTheDOM()
|
||||
customExpect(element).toBeInTheDOM(document.body)
|
||||
customExpect(element).toBeInTheDocument()
|
||||
customExpect(element).toBeVisible()
|
||||
customExpect(element).toBeEmpty()
|
||||
customExpect(element).toBeDisabled()
|
||||
customExpect(element).toBeEnabled()
|
||||
customExpect(element).toBeInvalid()
|
||||
customExpect(element).toBeRequired()
|
||||
customExpect(element).toBeValid()
|
||||
customExpect(element).toContainElement(document.body)
|
||||
customExpect(element).toContainElement(null)
|
||||
customExpect(element).toContainHTML('body')
|
||||
customExpect(element).toHaveAttribute('attr')
|
||||
customExpect(element).toHaveAttribute('attr', true)
|
||||
customExpect(element).toHaveAttribute('attr', 'yes')
|
||||
customExpect(element).toHaveClass()
|
||||
customExpect(element).toHaveClass('cls1')
|
||||
customExpect(element).toHaveClass('cls1', 'cls2', 'cls3', 'cls4')
|
||||
customExpect(element).toHaveClass('cls1', {exact: true})
|
||||
customExpect(element).toHaveDisplayValue('str')
|
||||
customExpect(element).toHaveDisplayValue(['str1', 'str2'])
|
||||
customExpect(element).toHaveDisplayValue(/str/)
|
||||
customExpect(element).toHaveDisplayValue([/str1/, 'str2'])
|
||||
customExpect(element).toHaveFocus()
|
||||
customExpect(element).toHaveFormValues({foo: 'bar', baz: 1})
|
||||
customExpect(element).toHaveStyle('display: block')
|
||||
customExpect(element).toHaveStyle({display: 'block', width: 100})
|
||||
customExpect(element).toHaveTextContent('Text')
|
||||
customExpect(element).toHaveTextContent(/Text/)
|
||||
customExpect(element).toHaveTextContent('Text', {normalizeWhitespace: true})
|
||||
customExpect(element).toHaveTextContent(/Text/, {normalizeWhitespace: true})
|
||||
customExpect(element).toHaveValue()
|
||||
customExpect(element).toHaveValue('str')
|
||||
customExpect(element).toHaveValue(['str1', 'str2'])
|
||||
customExpect(element).toHaveValue(1)
|
||||
customExpect(element).toHaveValue(null)
|
||||
customExpect(element).toBeChecked()
|
||||
customExpect(element).toHaveDescription('some description')
|
||||
customExpect(element).toHaveDescription(/some description/)
|
||||
customExpect(element).toHaveDescription(expect.stringContaining('partial'))
|
||||
customExpect(element).toHaveDescription()
|
||||
customExpect(element).toHaveAccessibleDescription('some description')
|
||||
customExpect(element).toHaveAccessibleDescription(/some description/)
|
||||
customExpect(element).toHaveAccessibleDescription(
|
||||
expect.stringContaining('partial'),
|
||||
)
|
||||
customExpect(element).toHaveAccessibleDescription()
|
||||
|
||||
customExpect(element).toHaveAccessibleErrorMessage()
|
||||
customExpect(element).toHaveAccessibleErrorMessage(
|
||||
'Invalid time: the time must be between 9:00 AM and 5:00 PM',
|
||||
)
|
||||
customExpect(element).toHaveAccessibleErrorMessage(/invalid time/i)
|
||||
customExpect(element).toHaveAccessibleErrorMessage(
|
||||
expect.stringContaining('Invalid time'),
|
||||
)
|
||||
|
||||
customExpect(element).toHaveAccessibleName('a label')
|
||||
customExpect(element).toHaveAccessibleName(/a label/)
|
||||
customExpect(element).toHaveAccessibleName(
|
||||
expect.stringContaining('partial label'),
|
||||
)
|
||||
customExpect(element).toHaveAccessibleName()
|
||||
customExpect(element).toHaveErrorMessage(
|
||||
'Invalid time: the time must be between 9:00 AM and 5:00 PM',
|
||||
)
|
||||
customExpect(element).toHaveErrorMessage(/invalid time/i)
|
||||
customExpect(element).toHaveErrorMessage(
|
||||
expect.stringContaining('Invalid time'),
|
||||
)
|
||||
|
||||
customExpect(element).toHaveRole('button')
|
||||
|
||||
// @ts-expect-error The types accidentally allowed any property by falling back to "any"
|
||||
customExpect(element).nonExistentProperty()
|
||||
120
frontend/node_modules/@testing-library/jest-dom/types/__tests__/bun/bun-types.test.ts
generated
vendored
Normal file
120
frontend/node_modules/@testing-library/jest-dom/types/__tests__/bun/bun-types.test.ts
generated
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* File that tests whether the TypeScript typings for @types/jest work as expected.
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-floating-promises */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
|
||||
import {expect} from 'bun:test'
|
||||
import '../../bun'
|
||||
|
||||
const element: HTMLElement = document.body
|
||||
|
||||
expect(element).toBeInTheDOM()
|
||||
expect(element).toBeInTheDOM(document.body)
|
||||
expect(element).toBeInTheDocument()
|
||||
expect(element).toBeVisible()
|
||||
expect(element).toBeEmpty()
|
||||
expect(element).toBeDisabled()
|
||||
expect(element).toBeEnabled()
|
||||
expect(element).toBeInvalid()
|
||||
expect(element).toBeRequired()
|
||||
expect(element).toBeValid()
|
||||
expect(element).toContainElement(document.body)
|
||||
expect(element).toContainElement(null)
|
||||
expect(element).toContainHTML('body')
|
||||
expect(element).toHaveAttribute('attr')
|
||||
expect(element).toHaveAttribute('attr', true)
|
||||
expect(element).toHaveAttribute('attr', 'yes')
|
||||
expect(element).toHaveClass()
|
||||
expect(element).toHaveClass('cls1')
|
||||
expect(element).toHaveClass('cls1', 'cls2', 'cls3', 'cls4')
|
||||
expect(element).toHaveClass('cls1', {exact: true})
|
||||
expect(element).toHaveDisplayValue('str')
|
||||
expect(element).toHaveDisplayValue(['str1', 'str2'])
|
||||
expect(element).toHaveDisplayValue(/str/)
|
||||
expect(element).toHaveDisplayValue([/str1/, 'str2'])
|
||||
expect(element).toHaveFocus()
|
||||
expect(element).toHaveFormValues({foo: 'bar', baz: 1})
|
||||
expect(element).toHaveStyle('display: block')
|
||||
expect(element).toHaveStyle({display: 'block', width: 100})
|
||||
expect(element).toHaveTextContent('Text')
|
||||
expect(element).toHaveTextContent(/Text/)
|
||||
expect(element).toHaveTextContent('Text', {normalizeWhitespace: true})
|
||||
expect(element).toHaveTextContent(/Text/, {normalizeWhitespace: true})
|
||||
expect(element).toHaveValue()
|
||||
expect(element).toHaveValue('str')
|
||||
expect(element).toHaveValue(['str1', 'str2'])
|
||||
expect(element).toHaveValue(1)
|
||||
expect(element).toHaveValue(null)
|
||||
expect(element).toBeChecked()
|
||||
expect(element).toHaveDescription('some description')
|
||||
expect(element).toHaveDescription(/some description/)
|
||||
expect(element).toHaveDescription(expect.stringContaining('partial'))
|
||||
expect(element).toHaveDescription()
|
||||
expect(element).toHaveAccessibleDescription('some description')
|
||||
expect(element).toHaveAccessibleDescription(/some description/)
|
||||
expect(element).toHaveAccessibleDescription(expect.stringContaining('partial'))
|
||||
expect(element).toHaveAccessibleDescription()
|
||||
expect(element).toHaveAccessibleName('a label')
|
||||
expect(element).toHaveAccessibleName(/a label/)
|
||||
expect(element).toHaveAccessibleName(expect.stringContaining('partial label'))
|
||||
expect(element).toHaveAccessibleName()
|
||||
expect(element).toHaveErrorMessage(
|
||||
'Invalid time: the time must be between 9:00 AM and 5:00 PM',
|
||||
)
|
||||
expect(element).toHaveErrorMessage(/invalid time/i)
|
||||
expect(element).toHaveErrorMessage(expect.stringContaining('Invalid time'))
|
||||
expect(element).toHaveRole('button')
|
||||
|
||||
expect(element).not.toBeInTheDOM()
|
||||
expect(element).not.toBeInTheDOM(document.body)
|
||||
expect(element).not.toBeInTheDocument()
|
||||
expect(element).not.toBeVisible()
|
||||
expect(element).not.toBeEmpty()
|
||||
expect(element).not.toBeEmptyDOMElement()
|
||||
expect(element).not.toBeDisabled()
|
||||
expect(element).not.toBeEnabled()
|
||||
expect(element).not.toBeInvalid()
|
||||
expect(element).not.toBeRequired()
|
||||
expect(element).not.toBeValid()
|
||||
expect(element).not.toContainElement(document.body)
|
||||
expect(element).not.toContainElement(null)
|
||||
expect(element).not.toContainHTML('body')
|
||||
expect(element).not.toHaveAttribute('attr')
|
||||
expect(element).not.toHaveAttribute('attr', true)
|
||||
expect(element).not.toHaveAttribute('attr', 'yes')
|
||||
expect(element).not.toHaveClass()
|
||||
expect(element).not.toHaveClass('cls1')
|
||||
expect(element).not.toHaveClass('cls1', 'cls2', 'cls3', 'cls4')
|
||||
expect(element).not.toHaveClass('cls1', {exact: true})
|
||||
expect(element).not.toHaveDisplayValue('str')
|
||||
expect(element).not.toHaveDisplayValue(['str1', 'str2'])
|
||||
expect(element).not.toHaveDisplayValue(/str/)
|
||||
expect(element).not.toHaveDisplayValue([/str1/, 'str2'])
|
||||
expect(element).not.toHaveFocus()
|
||||
expect(element).not.toHaveFormValues({foo: 'bar', baz: 1})
|
||||
expect(element).not.toHaveStyle('display: block')
|
||||
expect(element).not.toHaveTextContent('Text')
|
||||
expect(element).not.toHaveTextContent(/Text/)
|
||||
expect(element).not.toHaveTextContent('Text', {normalizeWhitespace: true})
|
||||
expect(element).not.toHaveTextContent(/Text/, {normalizeWhitespace: true})
|
||||
expect(element).not.toHaveValue()
|
||||
expect(element).not.toHaveValue('str')
|
||||
expect(element).not.toHaveValue(['str1', 'str2'])
|
||||
expect(element).not.toHaveValue(1)
|
||||
expect(element).not.toBeChecked()
|
||||
expect(element).not.toHaveDescription('some description')
|
||||
expect(element).not.toHaveDescription()
|
||||
expect(element).not.toHaveAccessibleDescription('some description')
|
||||
expect(element).not.toHaveAccessibleDescription()
|
||||
expect(element).not.toHaveAccessibleName('a label')
|
||||
expect(element).not.toHaveAccessibleName()
|
||||
expect(element).not.toBePartiallyChecked()
|
||||
expect(element).not.toHaveErrorMessage()
|
||||
expect(element).not.toHaveErrorMessage('Pikachu!')
|
||||
expect(element).not.toHaveRole('button')
|
||||
|
||||
// @ts-expect-error The types accidentally allowed any property by falling back to "any"
|
||||
expect(element).nonExistentProperty()
|
||||
9
frontend/node_modules/@testing-library/jest-dom/types/__tests__/bun/tsconfig.json
generated
vendored
Normal file
9
frontend/node_modules/@testing-library/jest-dom/types/__tests__/bun/tsconfig.json
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"types": ["bun", "web"]
|
||||
},
|
||||
"include": ["*.ts"]
|
||||
}
|
||||
97
frontend/node_modules/@testing-library/jest-dom/types/__tests__/jest-globals/jest-globals-custom-expect-types.test.ts
generated
vendored
Normal file
97
frontend/node_modules/@testing-library/jest-dom/types/__tests__/jest-globals/jest-globals-custom-expect-types.test.ts
generated
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
/**
|
||||
* File that tests whether the TypeScript typings work as expected.
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-floating-promises */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
|
||||
import {expect} from '@jest/globals'
|
||||
import * as matchers from '../../matchers'
|
||||
|
||||
expect.extend(matchers)
|
||||
|
||||
const element: HTMLElement = document.body
|
||||
|
||||
function customExpect(
|
||||
_actual: HTMLElement,
|
||||
):
|
||||
| matchers.TestingLibraryMatchers<unknown, void>
|
||||
| matchers.TestingLibraryMatchers<unknown, Promise<void>> {
|
||||
throw new Error('Method not implemented.')
|
||||
}
|
||||
|
||||
customExpect(element).toBeInTheDOM()
|
||||
customExpect(element).toBeInTheDOM(document.body)
|
||||
customExpect(element).toBeInTheDocument()
|
||||
customExpect(element).toBeVisible()
|
||||
customExpect(element).toBeEmpty()
|
||||
customExpect(element).toBeDisabled()
|
||||
customExpect(element).toBeEnabled()
|
||||
customExpect(element).toBeInvalid()
|
||||
customExpect(element).toBeRequired()
|
||||
customExpect(element).toBeValid()
|
||||
customExpect(element).toContainElement(document.body)
|
||||
customExpect(element).toContainElement(null)
|
||||
customExpect(element).toContainHTML('body')
|
||||
customExpect(element).toHaveAttribute('attr')
|
||||
customExpect(element).toHaveAttribute('attr', true)
|
||||
customExpect(element).toHaveAttribute('attr', 'yes')
|
||||
customExpect(element).toHaveClass()
|
||||
customExpect(element).toHaveClass('cls1')
|
||||
customExpect(element).toHaveClass('cls1', 'cls2', 'cls3', 'cls4')
|
||||
customExpect(element).toHaveClass('cls1', {exact: true})
|
||||
customExpect(element).toHaveDisplayValue('str')
|
||||
customExpect(element).toHaveDisplayValue(['str1', 'str2'])
|
||||
customExpect(element).toHaveDisplayValue(/str/)
|
||||
customExpect(element).toHaveDisplayValue([/str1/, 'str2'])
|
||||
customExpect(element).toHaveFocus()
|
||||
customExpect(element).toHaveFormValues({foo: 'bar', baz: 1})
|
||||
customExpect(element).toHaveStyle('display: block')
|
||||
customExpect(element).toHaveStyle({display: 'block', width: 100})
|
||||
customExpect(element).toHaveTextContent('Text')
|
||||
customExpect(element).toHaveTextContent(/Text/)
|
||||
customExpect(element).toHaveTextContent('Text', {normalizeWhitespace: true})
|
||||
customExpect(element).toHaveTextContent(/Text/, {normalizeWhitespace: true})
|
||||
customExpect(element).toHaveValue()
|
||||
customExpect(element).toHaveValue('str')
|
||||
customExpect(element).toHaveValue(['str1', 'str2'])
|
||||
customExpect(element).toHaveValue(1)
|
||||
customExpect(element).toHaveValue(null)
|
||||
customExpect(element).toBeChecked()
|
||||
customExpect(element).toHaveDescription('some description')
|
||||
customExpect(element).toHaveDescription(/some description/)
|
||||
customExpect(element).toHaveDescription(expect.stringContaining('partial'))
|
||||
customExpect(element).toHaveDescription()
|
||||
customExpect(element).toHaveAccessibleDescription('some description')
|
||||
customExpect(element).toHaveAccessibleDescription(/some description/)
|
||||
customExpect(element).toHaveAccessibleDescription(
|
||||
expect.stringContaining('partial'),
|
||||
)
|
||||
customExpect(element).toHaveAccessibleDescription()
|
||||
|
||||
customExpect(element).toHaveAccessibleErrorMessage()
|
||||
customExpect(element).toHaveAccessibleErrorMessage(
|
||||
'Invalid time: the time must be between 9:00 AM and 5:00 PM',
|
||||
)
|
||||
customExpect(element).toHaveAccessibleErrorMessage(/invalid time/i)
|
||||
customExpect(element).toHaveAccessibleErrorMessage(
|
||||
expect.stringContaining('Invalid time'),
|
||||
)
|
||||
|
||||
customExpect(element).toHaveAccessibleName('a label')
|
||||
customExpect(element).toHaveAccessibleName(/a label/)
|
||||
customExpect(element).toHaveAccessibleName(
|
||||
expect.stringContaining('partial label'),
|
||||
)
|
||||
customExpect(element).toHaveAccessibleName()
|
||||
customExpect(element).toHaveErrorMessage(
|
||||
'Invalid time: the time must be between 9:00 AM and 5:00 PM',
|
||||
)
|
||||
customExpect(element).toHaveErrorMessage(/invalid time/i)
|
||||
customExpect(element).toHaveErrorMessage(
|
||||
expect.stringContaining('Invalid time'),
|
||||
)
|
||||
|
||||
// @ts-expect-error The types accidentally allowed any property by falling back to "any"
|
||||
customExpect(element).nonExistentProperty()
|
||||
120
frontend/node_modules/@testing-library/jest-dom/types/__tests__/jest-globals/jest-globals-types.test.ts
generated
vendored
Normal file
120
frontend/node_modules/@testing-library/jest-dom/types/__tests__/jest-globals/jest-globals-types.test.ts
generated
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
/**
|
||||
* File that tests whether the TypeScript typings for @types/jest work as expected.
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-floating-promises */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
|
||||
import {expect} from '@jest/globals'
|
||||
import '../../jest-globals'
|
||||
|
||||
const element: HTMLElement = document.body
|
||||
|
||||
expect(element).toBeInTheDOM()
|
||||
expect(element).toBeInTheDOM(document.body)
|
||||
expect(element).toBeInTheDocument()
|
||||
expect(element).toBeVisible()
|
||||
expect(element).toBeEmpty()
|
||||
expect(element).toBeDisabled()
|
||||
expect(element).toBeEnabled()
|
||||
expect(element).toBeInvalid()
|
||||
expect(element).toBeRequired()
|
||||
expect(element).toBeValid()
|
||||
expect(element).toContainElement(document.body)
|
||||
expect(element).toContainElement(null)
|
||||
expect(element).toContainHTML('body')
|
||||
expect(element).toHaveAttribute('attr')
|
||||
expect(element).toHaveAttribute('attr', true)
|
||||
expect(element).toHaveAttribute('attr', 'yes')
|
||||
expect(element).toHaveClass()
|
||||
expect(element).toHaveClass('cls1')
|
||||
expect(element).toHaveClass('cls1', 'cls2', 'cls3', 'cls4')
|
||||
expect(element).toHaveClass('cls1', {exact: true})
|
||||
expect(element).toHaveDisplayValue('str')
|
||||
expect(element).toHaveDisplayValue(['str1', 'str2'])
|
||||
expect(element).toHaveDisplayValue(/str/)
|
||||
expect(element).toHaveDisplayValue([/str1/, 'str2'])
|
||||
expect(element).toHaveFocus()
|
||||
expect(element).toHaveFormValues({foo: 'bar', baz: 1})
|
||||
expect(element).toHaveStyle('display: block')
|
||||
expect(element).toHaveStyle({display: 'block', width: 100})
|
||||
expect(element).toHaveTextContent('Text')
|
||||
expect(element).toHaveTextContent(/Text/)
|
||||
expect(element).toHaveTextContent('Text', {normalizeWhitespace: true})
|
||||
expect(element).toHaveTextContent(/Text/, {normalizeWhitespace: true})
|
||||
expect(element).toHaveValue()
|
||||
expect(element).toHaveValue('str')
|
||||
expect(element).toHaveValue(['str1', 'str2'])
|
||||
expect(element).toHaveValue(1)
|
||||
expect(element).toHaveValue(null)
|
||||
expect(element).toBeChecked()
|
||||
expect(element).toHaveDescription('some description')
|
||||
expect(element).toHaveDescription(/some description/)
|
||||
expect(element).toHaveDescription(expect.stringContaining('partial'))
|
||||
expect(element).toHaveDescription()
|
||||
expect(element).toHaveAccessibleDescription('some description')
|
||||
expect(element).toHaveAccessibleDescription(/some description/)
|
||||
expect(element).toHaveAccessibleDescription(expect.stringContaining('partial'))
|
||||
expect(element).toHaveAccessibleDescription()
|
||||
expect(element).toHaveAccessibleName('a label')
|
||||
expect(element).toHaveAccessibleName(/a label/)
|
||||
expect(element).toHaveAccessibleName(expect.stringContaining('partial label'))
|
||||
expect(element).toHaveAccessibleName()
|
||||
expect(element).toHaveErrorMessage(
|
||||
'Invalid time: the time must be between 9:00 AM and 5:00 PM',
|
||||
)
|
||||
expect(element).toHaveErrorMessage(/invalid time/i)
|
||||
expect(element).toHaveErrorMessage(expect.stringContaining('Invalid time'))
|
||||
expect(element).toHaveRole('button')
|
||||
|
||||
expect(element).not.toBeInTheDOM()
|
||||
expect(element).not.toBeInTheDOM(document.body)
|
||||
expect(element).not.toBeInTheDocument()
|
||||
expect(element).not.toBeVisible()
|
||||
expect(element).not.toBeEmpty()
|
||||
expect(element).not.toBeEmptyDOMElement()
|
||||
expect(element).not.toBeDisabled()
|
||||
expect(element).not.toBeEnabled()
|
||||
expect(element).not.toBeInvalid()
|
||||
expect(element).not.toBeRequired()
|
||||
expect(element).not.toBeValid()
|
||||
expect(element).not.toContainElement(document.body)
|
||||
expect(element).not.toContainElement(null)
|
||||
expect(element).not.toContainHTML('body')
|
||||
expect(element).not.toHaveAttribute('attr')
|
||||
expect(element).not.toHaveAttribute('attr', true)
|
||||
expect(element).not.toHaveAttribute('attr', 'yes')
|
||||
expect(element).not.toHaveClass()
|
||||
expect(element).not.toHaveClass('cls1')
|
||||
expect(element).not.toHaveClass('cls1', 'cls2', 'cls3', 'cls4')
|
||||
expect(element).not.toHaveClass('cls1', {exact: true})
|
||||
expect(element).not.toHaveDisplayValue('str')
|
||||
expect(element).not.toHaveDisplayValue(['str1', 'str2'])
|
||||
expect(element).not.toHaveDisplayValue(/str/)
|
||||
expect(element).not.toHaveDisplayValue([/str1/, 'str2'])
|
||||
expect(element).not.toHaveFocus()
|
||||
expect(element).not.toHaveFormValues({foo: 'bar', baz: 1})
|
||||
expect(element).not.toHaveStyle('display: block')
|
||||
expect(element).not.toHaveTextContent('Text')
|
||||
expect(element).not.toHaveTextContent(/Text/)
|
||||
expect(element).not.toHaveTextContent('Text', {normalizeWhitespace: true})
|
||||
expect(element).not.toHaveTextContent(/Text/, {normalizeWhitespace: true})
|
||||
expect(element).not.toHaveValue()
|
||||
expect(element).not.toHaveValue('str')
|
||||
expect(element).not.toHaveValue(['str1', 'str2'])
|
||||
expect(element).not.toHaveValue(1)
|
||||
expect(element).not.toBeChecked()
|
||||
expect(element).not.toHaveDescription('some description')
|
||||
expect(element).not.toHaveDescription()
|
||||
expect(element).not.toHaveAccessibleDescription('some description')
|
||||
expect(element).not.toHaveAccessibleDescription()
|
||||
expect(element).not.toHaveAccessibleName('a label')
|
||||
expect(element).not.toHaveAccessibleName()
|
||||
expect(element).not.toBePartiallyChecked()
|
||||
expect(element).not.toHaveErrorMessage()
|
||||
expect(element).not.toHaveErrorMessage('Pikachu!')
|
||||
expect(element).not.toHaveRole('button')
|
||||
|
||||
// @ts-expect-error The types accidentally allowed any property by falling back to "any"
|
||||
expect(element).nonExistentProperty()
|
||||
9
frontend/node_modules/@testing-library/jest-dom/types/__tests__/jest-globals/tsconfig.json
generated
vendored
Normal file
9
frontend/node_modules/@testing-library/jest-dom/types/__tests__/jest-globals/tsconfig.json
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"types": []
|
||||
},
|
||||
"include": ["*.ts"]
|
||||
}
|
||||
100
frontend/node_modules/@testing-library/jest-dom/types/__tests__/jest/jest-custom-expect-types.test.ts
generated
vendored
Normal file
100
frontend/node_modules/@testing-library/jest-dom/types/__tests__/jest/jest-custom-expect-types.test.ts
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
* File that tests whether the TypeScript typings work as expected.
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-floating-promises */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
|
||||
import * as matchers from '../../matchers'
|
||||
|
||||
expect.extend(matchers)
|
||||
|
||||
const element: HTMLElement = document.body
|
||||
|
||||
function customExpect(
|
||||
_actual: HTMLElement,
|
||||
):
|
||||
| matchers.TestingLibraryMatchers<unknown, void>
|
||||
| matchers.TestingLibraryMatchers<unknown, Promise<void>> {
|
||||
throw new Error('Method not implemented.')
|
||||
}
|
||||
|
||||
customExpect(element).toBeInTheDOM()
|
||||
customExpect(element).toBeInTheDOM(document.body)
|
||||
customExpect(element).toBeInTheDocument()
|
||||
customExpect(element).toBeVisible()
|
||||
customExpect(element).toBeEmpty()
|
||||
customExpect(element).toBeDisabled()
|
||||
customExpect(element).toBeEnabled()
|
||||
customExpect(element).toBeInvalid()
|
||||
customExpect(element).toBeRequired()
|
||||
customExpect(element).toBeValid()
|
||||
customExpect(element).toContainElement(document.body)
|
||||
customExpect(element).toContainElement(null)
|
||||
customExpect(element).toContainHTML('body')
|
||||
customExpect(element).toHaveAttribute('attr')
|
||||
customExpect(element).toHaveAttribute('attr', true)
|
||||
customExpect(element).toHaveAttribute('attr', 'yes')
|
||||
customExpect(element).toHaveClass()
|
||||
customExpect(element).toHaveClass('cls1')
|
||||
customExpect(element).toHaveClass(/cls/)
|
||||
customExpect(element).toHaveClass('cls1', 'cls2', /cls(3|4)/)
|
||||
customExpect(element).toHaveClass('cls1', {exact: true})
|
||||
customExpect(element).toHaveDisplayValue('str')
|
||||
customExpect(element).toHaveDisplayValue(['str1', 'str2'])
|
||||
customExpect(element).toHaveDisplayValue(/str/)
|
||||
customExpect(element).toHaveDisplayValue([/str1/, 'str2'])
|
||||
customExpect(element).toHaveFocus()
|
||||
customExpect(element).toHaveFormValues({foo: 'bar', baz: 1})
|
||||
customExpect(element).toHaveStyle('display: block')
|
||||
customExpect(element).toHaveStyle({display: 'block', width: 100})
|
||||
customExpect(element).toHaveTextContent('Text')
|
||||
customExpect(element).toHaveTextContent(/Text/)
|
||||
customExpect(element).toHaveTextContent('Text', {normalizeWhitespace: true})
|
||||
customExpect(element).toHaveTextContent(/Text/, {normalizeWhitespace: true})
|
||||
customExpect(element).toHaveValue()
|
||||
customExpect(element).toHaveValue('str')
|
||||
customExpect(element).toHaveValue(['str1', 'str2'])
|
||||
customExpect(element).toHaveValue(1)
|
||||
customExpect(element).toHaveValue(null)
|
||||
customExpect(element).toBeChecked()
|
||||
customExpect(element).toHaveDescription('some description')
|
||||
customExpect(element).toHaveDescription(/some description/)
|
||||
customExpect(element).toHaveDescription(expect.stringContaining('partial'))
|
||||
customExpect(element).toHaveDescription()
|
||||
customExpect(element).toHaveAccessibleDescription('some description')
|
||||
customExpect(element).toHaveAccessibleDescription(/some description/)
|
||||
customExpect(element).toHaveAccessibleDescription(
|
||||
expect.stringContaining('partial'),
|
||||
)
|
||||
customExpect(element).toHaveAccessibleDescription()
|
||||
|
||||
customExpect(element).toHaveAccessibleErrorMessage()
|
||||
customExpect(element).toHaveAccessibleErrorMessage(
|
||||
'Invalid time: the time must be between 9:00 AM and 5:00 PM',
|
||||
)
|
||||
customExpect(element).toHaveAccessibleErrorMessage(/invalid time/i)
|
||||
customExpect(element).toHaveAccessibleErrorMessage(
|
||||
expect.stringContaining('Invalid time'),
|
||||
)
|
||||
|
||||
customExpect(element).toHaveAccessibleName('a label')
|
||||
customExpect(element).toHaveAccessibleName(/a label/)
|
||||
customExpect(element).toHaveAccessibleName(
|
||||
expect.stringContaining('partial label'),
|
||||
)
|
||||
customExpect(element).toHaveAccessibleName()
|
||||
customExpect(element).toHaveErrorMessage(
|
||||
'Invalid time: the time must be between 9:00 AM and 5:00 PM',
|
||||
)
|
||||
customExpect(element).toHaveErrorMessage(/invalid time/i)
|
||||
customExpect(element).toHaveErrorMessage(
|
||||
expect.stringContaining('Invalid time'),
|
||||
)
|
||||
|
||||
// @ts-expect-error The types accidentally allowed any property by falling back to "any"
|
||||
customExpect(element).nonExistentProperty()
|
||||
|
||||
// @ts-expect-error
|
||||
customExpect(element).toHaveClass(/cls/, {exact: true})
|
||||
119
frontend/node_modules/@testing-library/jest-dom/types/__tests__/jest/jest-types.test.ts
generated
vendored
Normal file
119
frontend/node_modules/@testing-library/jest-dom/types/__tests__/jest/jest-types.test.ts
generated
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
/**
|
||||
* File that tests whether the TypeScript typings for @types/jest work as expected.
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-floating-promises */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
|
||||
import '../../jest'
|
||||
|
||||
const element: HTMLElement = document.body
|
||||
|
||||
expect(element).toBeInTheDOM()
|
||||
expect(element).toBeInTheDOM(document.body)
|
||||
expect(element).toBeInTheDocument()
|
||||
expect(element).toBeVisible()
|
||||
expect(element).toBeEmpty()
|
||||
expect(element).toBeDisabled()
|
||||
expect(element).toBeEnabled()
|
||||
expect(element).toBeInvalid()
|
||||
expect(element).toBeRequired()
|
||||
expect(element).toBeValid()
|
||||
expect(element).toContainElement(document.body)
|
||||
expect(element).toContainElement(null)
|
||||
expect(element).toContainHTML('body')
|
||||
expect(element).toHaveAttribute('attr')
|
||||
expect(element).toHaveAttribute('attr', true)
|
||||
expect(element).toHaveAttribute('attr', 'yes')
|
||||
expect(element).toHaveClass()
|
||||
expect(element).toHaveClass('cls1')
|
||||
expect(element).toHaveClass('cls1', 'cls2', 'cls3', 'cls4')
|
||||
expect(element).toHaveClass('cls1', {exact: true})
|
||||
expect(element).toHaveDisplayValue('str')
|
||||
expect(element).toHaveDisplayValue(['str1', 'str2'])
|
||||
expect(element).toHaveDisplayValue(/str/)
|
||||
expect(element).toHaveDisplayValue([/str1/, 'str2'])
|
||||
expect(element).toHaveFocus()
|
||||
expect(element).toHaveFormValues({foo: 'bar', baz: 1})
|
||||
expect(element).toHaveStyle('display: block')
|
||||
expect(element).toHaveStyle({display: 'block', width: 100})
|
||||
expect(element).toHaveTextContent('Text')
|
||||
expect(element).toHaveTextContent(/Text/)
|
||||
expect(element).toHaveTextContent('Text', {normalizeWhitespace: true})
|
||||
expect(element).toHaveTextContent(/Text/, {normalizeWhitespace: true})
|
||||
expect(element).toHaveValue()
|
||||
expect(element).toHaveValue('str')
|
||||
expect(element).toHaveValue(['str1', 'str2'])
|
||||
expect(element).toHaveValue(1)
|
||||
expect(element).toHaveValue(null)
|
||||
expect(element).toBeChecked()
|
||||
expect(element).toHaveDescription('some description')
|
||||
expect(element).toHaveDescription(/some description/)
|
||||
expect(element).toHaveDescription(expect.stringContaining('partial'))
|
||||
expect(element).toHaveDescription()
|
||||
expect(element).toHaveAccessibleDescription('some description')
|
||||
expect(element).toHaveAccessibleDescription(/some description/)
|
||||
expect(element).toHaveAccessibleDescription(expect.stringContaining('partial'))
|
||||
expect(element).toHaveAccessibleDescription()
|
||||
expect(element).toHaveAccessibleName('a label')
|
||||
expect(element).toHaveAccessibleName(/a label/)
|
||||
expect(element).toHaveAccessibleName(expect.stringContaining('partial label'))
|
||||
expect(element).toHaveAccessibleName()
|
||||
expect(element).toHaveErrorMessage(
|
||||
'Invalid time: the time must be between 9:00 AM and 5:00 PM',
|
||||
)
|
||||
expect(element).toHaveErrorMessage(/invalid time/i)
|
||||
expect(element).toHaveErrorMessage(expect.stringContaining('Invalid time'))
|
||||
expect(element).toHaveRole('button')
|
||||
|
||||
expect(element).not.toBeInTheDOM()
|
||||
expect(element).not.toBeInTheDOM(document.body)
|
||||
expect(element).not.toBeInTheDocument()
|
||||
expect(element).not.toBeVisible()
|
||||
expect(element).not.toBeEmpty()
|
||||
expect(element).not.toBeEmptyDOMElement()
|
||||
expect(element).not.toBeDisabled()
|
||||
expect(element).not.toBeEnabled()
|
||||
expect(element).not.toBeInvalid()
|
||||
expect(element).not.toBeRequired()
|
||||
expect(element).not.toBeValid()
|
||||
expect(element).not.toContainElement(document.body)
|
||||
expect(element).not.toContainElement(null)
|
||||
expect(element).not.toContainHTML('body')
|
||||
expect(element).not.toHaveAttribute('attr')
|
||||
expect(element).not.toHaveAttribute('attr', true)
|
||||
expect(element).not.toHaveAttribute('attr', 'yes')
|
||||
expect(element).not.toHaveClass()
|
||||
expect(element).not.toHaveClass('cls1')
|
||||
expect(element).not.toHaveClass('cls1', 'cls2', 'cls3', 'cls4')
|
||||
expect(element).not.toHaveClass('cls1', {exact: true})
|
||||
expect(element).not.toHaveDisplayValue('str')
|
||||
expect(element).not.toHaveDisplayValue(['str1', 'str2'])
|
||||
expect(element).not.toHaveDisplayValue(/str/)
|
||||
expect(element).not.toHaveDisplayValue([/str1/, 'str2'])
|
||||
expect(element).not.toHaveFocus()
|
||||
expect(element).not.toHaveFormValues({foo: 'bar', baz: 1})
|
||||
expect(element).not.toHaveStyle('display: block')
|
||||
expect(element).not.toHaveTextContent('Text')
|
||||
expect(element).not.toHaveTextContent(/Text/)
|
||||
expect(element).not.toHaveTextContent('Text', {normalizeWhitespace: true})
|
||||
expect(element).not.toHaveTextContent(/Text/, {normalizeWhitespace: true})
|
||||
expect(element).not.toHaveValue()
|
||||
expect(element).not.toHaveValue('str')
|
||||
expect(element).not.toHaveValue(['str1', 'str2'])
|
||||
expect(element).not.toHaveValue(1)
|
||||
expect(element).not.toBeChecked()
|
||||
expect(element).not.toHaveDescription('some description')
|
||||
expect(element).not.toHaveDescription()
|
||||
expect(element).not.toHaveAccessibleDescription('some description')
|
||||
expect(element).not.toHaveAccessibleDescription()
|
||||
expect(element).not.toHaveAccessibleName('a label')
|
||||
expect(element).not.toHaveAccessibleName()
|
||||
expect(element).not.toBePartiallyChecked()
|
||||
expect(element).not.toHaveErrorMessage()
|
||||
expect(element).not.toHaveErrorMessage('Pikachu!')
|
||||
expect(element).not.toHaveRole('button')
|
||||
|
||||
// @ts-expect-error The types accidentally allowed any property by falling back to "any"
|
||||
expect(element).nonExistentProperty()
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user