@noma.to/qwik-testing-library 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_virtual/AsymmetricMatcher.qwik.cjs +4 -0
- package/lib/_virtual/AsymmetricMatcher.qwik.mjs +4 -0
- package/lib/_virtual/ConvertAnsi.qwik.cjs +4 -0
- package/lib/_virtual/ConvertAnsi.qwik.mjs +4 -0
- package/lib/_virtual/DOMCollection.qwik.cjs +4 -0
- package/lib/_virtual/DOMCollection.qwik.mjs +4 -0
- package/lib/_virtual/DOMElement.qwik.cjs +4 -0
- package/lib/_virtual/DOMElement.qwik.mjs +4 -0
- package/lib/_virtual/Immutable.qwik.cjs +4 -0
- package/lib/_virtual/Immutable.qwik.mjs +4 -0
- package/lib/_virtual/ReactElement.qwik.cjs +4 -0
- package/lib/_virtual/ReactElement.qwik.mjs +4 -0
- package/lib/_virtual/ReactTestComponent.qwik.cjs +4 -0
- package/lib/_virtual/ReactTestComponent.qwik.mjs +4 -0
- package/lib/_virtual/_commonjsHelpers.qwik.cjs +6 -0
- package/lib/_virtual/_commonjsHelpers.qwik.mjs +6 -0
- package/lib/_virtual/alertRole.qwik.cjs +4 -0
- package/lib/_virtual/alertRole.qwik.mjs +4 -0
- package/lib/_virtual/alertdialogRole.qwik.cjs +4 -0
- package/lib/_virtual/alertdialogRole.qwik.mjs +4 -0
- package/lib/_virtual/applicationRole.qwik.cjs +4 -0
- package/lib/_virtual/applicationRole.qwik.mjs +4 -0
- package/lib/_virtual/ariaAbstractRoles.qwik.cjs +4 -0
- package/lib/_virtual/ariaAbstractRoles.qwik.mjs +4 -0
- package/lib/_virtual/ariaDpubRoles.qwik.cjs +4 -0
- package/lib/_virtual/ariaDpubRoles.qwik.mjs +4 -0
- package/lib/_virtual/ariaGraphicsRoles.qwik.cjs +4 -0
- package/lib/_virtual/ariaGraphicsRoles.qwik.mjs +4 -0
- package/lib/_virtual/ariaLiteralRoles.qwik.cjs +4 -0
- package/lib/_virtual/ariaLiteralRoles.qwik.mjs +4 -0
- package/lib/_virtual/ariaPropsMap.qwik.cjs +4 -0
- package/lib/_virtual/ariaPropsMap.qwik.mjs +4 -0
- package/lib/_virtual/articleRole.qwik.cjs +4 -0
- package/lib/_virtual/articleRole.qwik.mjs +4 -0
- package/lib/_virtual/bannerRole.qwik.cjs +4 -0
- package/lib/_virtual/bannerRole.qwik.mjs +4 -0
- package/lib/_virtual/blockquoteRole.qwik.cjs +4 -0
- package/lib/_virtual/blockquoteRole.qwik.mjs +4 -0
- package/lib/_virtual/buttonRole.qwik.cjs +4 -0
- package/lib/_virtual/buttonRole.qwik.mjs +4 -0
- package/lib/_virtual/captionRole.qwik.cjs +4 -0
- package/lib/_virtual/captionRole.qwik.mjs +4 -0
- package/lib/_virtual/cellRole.qwik.cjs +4 -0
- package/lib/_virtual/cellRole.qwik.mjs +4 -0
- package/lib/_virtual/checkboxRole.qwik.cjs +4 -0
- package/lib/_virtual/checkboxRole.qwik.mjs +4 -0
- package/lib/_virtual/codeRole.qwik.cjs +4 -0
- package/lib/_virtual/codeRole.qwik.mjs +4 -0
- package/lib/_virtual/collections.qwik.cjs +4 -0
- package/lib/_virtual/collections.qwik.mjs +4 -0
- package/lib/_virtual/columnheaderRole.qwik.cjs +4 -0
- package/lib/_virtual/columnheaderRole.qwik.mjs +4 -0
- package/lib/_virtual/comboboxRole.qwik.cjs +4 -0
- package/lib/_virtual/comboboxRole.qwik.mjs +4 -0
- package/lib/_virtual/commandRole.qwik.cjs +4 -0
- package/lib/_virtual/commandRole.qwik.mjs +4 -0
- package/lib/_virtual/complementaryRole.qwik.cjs +4 -0
- package/lib/_virtual/complementaryRole.qwik.mjs +4 -0
- package/lib/_virtual/compositeRole.qwik.cjs +4 -0
- package/lib/_virtual/compositeRole.qwik.mjs +4 -0
- package/lib/_virtual/contentinfoRole.qwik.cjs +4 -0
- package/lib/_virtual/contentinfoRole.qwik.mjs +4 -0
- package/lib/_virtual/definitionRole.qwik.cjs +4 -0
- package/lib/_virtual/definitionRole.qwik.mjs +4 -0
- package/lib/_virtual/deletionRole.qwik.cjs +4 -0
- package/lib/_virtual/deletionRole.qwik.mjs +4 -0
- package/lib/_virtual/dialogRole.qwik.cjs +4 -0
- package/lib/_virtual/dialogRole.qwik.mjs +4 -0
- package/lib/_virtual/directoryRole.qwik.cjs +4 -0
- package/lib/_virtual/directoryRole.qwik.mjs +4 -0
- package/lib/_virtual/docAbstractRole.qwik.cjs +4 -0
- package/lib/_virtual/docAbstractRole.qwik.mjs +4 -0
- package/lib/_virtual/docAcknowledgmentsRole.qwik.cjs +4 -0
- package/lib/_virtual/docAcknowledgmentsRole.qwik.mjs +4 -0
- package/lib/_virtual/docAfterwordRole.qwik.cjs +4 -0
- package/lib/_virtual/docAfterwordRole.qwik.mjs +4 -0
- package/lib/_virtual/docAppendixRole.qwik.cjs +4 -0
- package/lib/_virtual/docAppendixRole.qwik.mjs +4 -0
- package/lib/_virtual/docBacklinkRole.qwik.cjs +4 -0
- package/lib/_virtual/docBacklinkRole.qwik.mjs +4 -0
- package/lib/_virtual/docBiblioentryRole.qwik.cjs +4 -0
- package/lib/_virtual/docBiblioentryRole.qwik.mjs +4 -0
- package/lib/_virtual/docBibliographyRole.qwik.cjs +4 -0
- package/lib/_virtual/docBibliographyRole.qwik.mjs +4 -0
- package/lib/_virtual/docBibliorefRole.qwik.cjs +4 -0
- package/lib/_virtual/docBibliorefRole.qwik.mjs +4 -0
- package/lib/_virtual/docChapterRole.qwik.cjs +4 -0
- package/lib/_virtual/docChapterRole.qwik.mjs +4 -0
- package/lib/_virtual/docColophonRole.qwik.cjs +4 -0
- package/lib/_virtual/docColophonRole.qwik.mjs +4 -0
- package/lib/_virtual/docConclusionRole.qwik.cjs +4 -0
- package/lib/_virtual/docConclusionRole.qwik.mjs +4 -0
- package/lib/_virtual/docCoverRole.qwik.cjs +4 -0
- package/lib/_virtual/docCoverRole.qwik.mjs +4 -0
- package/lib/_virtual/docCreditRole.qwik.cjs +4 -0
- package/lib/_virtual/docCreditRole.qwik.mjs +4 -0
- package/lib/_virtual/docCreditsRole.qwik.cjs +4 -0
- package/lib/_virtual/docCreditsRole.qwik.mjs +4 -0
- package/lib/_virtual/docDedicationRole.qwik.cjs +4 -0
- package/lib/_virtual/docDedicationRole.qwik.mjs +4 -0
- package/lib/_virtual/docEndnoteRole.qwik.cjs +4 -0
- package/lib/_virtual/docEndnoteRole.qwik.mjs +4 -0
- package/lib/_virtual/docEndnotesRole.qwik.cjs +4 -0
- package/lib/_virtual/docEndnotesRole.qwik.mjs +4 -0
- package/lib/_virtual/docEpigraphRole.qwik.cjs +4 -0
- package/lib/_virtual/docEpigraphRole.qwik.mjs +4 -0
- package/lib/_virtual/docEpilogueRole.qwik.cjs +4 -0
- package/lib/_virtual/docEpilogueRole.qwik.mjs +4 -0
- package/lib/_virtual/docErrataRole.qwik.cjs +4 -0
- package/lib/_virtual/docErrataRole.qwik.mjs +4 -0
- package/lib/_virtual/docExampleRole.qwik.cjs +4 -0
- package/lib/_virtual/docExampleRole.qwik.mjs +4 -0
- package/lib/_virtual/docFootnoteRole.qwik.cjs +4 -0
- package/lib/_virtual/docFootnoteRole.qwik.mjs +4 -0
- package/lib/_virtual/docForewordRole.qwik.cjs +4 -0
- package/lib/_virtual/docForewordRole.qwik.mjs +4 -0
- package/lib/_virtual/docGlossaryRole.qwik.cjs +4 -0
- package/lib/_virtual/docGlossaryRole.qwik.mjs +4 -0
- package/lib/_virtual/docGlossrefRole.qwik.cjs +4 -0
- package/lib/_virtual/docGlossrefRole.qwik.mjs +4 -0
- package/lib/_virtual/docIndexRole.qwik.cjs +4 -0
- package/lib/_virtual/docIndexRole.qwik.mjs +4 -0
- package/lib/_virtual/docIntroductionRole.qwik.cjs +4 -0
- package/lib/_virtual/docIntroductionRole.qwik.mjs +4 -0
- package/lib/_virtual/docNoterefRole.qwik.cjs +4 -0
- package/lib/_virtual/docNoterefRole.qwik.mjs +4 -0
- package/lib/_virtual/docNoticeRole.qwik.cjs +4 -0
- package/lib/_virtual/docNoticeRole.qwik.mjs +4 -0
- package/lib/_virtual/docPagebreakRole.qwik.cjs +4 -0
- package/lib/_virtual/docPagebreakRole.qwik.mjs +4 -0
- package/lib/_virtual/docPagelistRole.qwik.cjs +4 -0
- package/lib/_virtual/docPagelistRole.qwik.mjs +4 -0
- package/lib/_virtual/docPartRole.qwik.cjs +4 -0
- package/lib/_virtual/docPartRole.qwik.mjs +4 -0
- package/lib/_virtual/docPrefaceRole.qwik.cjs +4 -0
- package/lib/_virtual/docPrefaceRole.qwik.mjs +4 -0
- package/lib/_virtual/docPrologueRole.qwik.cjs +4 -0
- package/lib/_virtual/docPrologueRole.qwik.mjs +4 -0
- package/lib/_virtual/docPullquoteRole.qwik.cjs +4 -0
- package/lib/_virtual/docPullquoteRole.qwik.mjs +4 -0
- package/lib/_virtual/docQnaRole.qwik.cjs +4 -0
- package/lib/_virtual/docQnaRole.qwik.mjs +4 -0
- package/lib/_virtual/docSubtitleRole.qwik.cjs +4 -0
- package/lib/_virtual/docSubtitleRole.qwik.mjs +4 -0
- package/lib/_virtual/docTipRole.qwik.cjs +4 -0
- package/lib/_virtual/docTipRole.qwik.mjs +4 -0
- package/lib/_virtual/docTocRole.qwik.cjs +4 -0
- package/lib/_virtual/docTocRole.qwik.mjs +4 -0
- package/lib/_virtual/documentRole.qwik.cjs +4 -0
- package/lib/_virtual/documentRole.qwik.mjs +4 -0
- package/lib/_virtual/domMap.qwik.cjs +4 -0
- package/lib/_virtual/domMap.qwik.mjs +4 -0
- package/lib/_virtual/elementRoleMap.qwik.cjs +4 -0
- package/lib/_virtual/elementRoleMap.qwik.mjs +4 -0
- package/lib/_virtual/emphasisRole.qwik.cjs +4 -0
- package/lib/_virtual/emphasisRole.qwik.mjs +4 -0
- package/lib/_virtual/escapeHTML.qwik.cjs +4 -0
- package/lib/_virtual/escapeHTML.qwik.mjs +4 -0
- package/lib/_virtual/feedRole.qwik.cjs +4 -0
- package/lib/_virtual/feedRole.qwik.mjs +4 -0
- package/lib/_virtual/figureRole.qwik.cjs +4 -0
- package/lib/_virtual/figureRole.qwik.mjs +4 -0
- package/lib/_virtual/formRole.qwik.cjs +4 -0
- package/lib/_virtual/formRole.qwik.mjs +4 -0
- package/lib/_virtual/genericRole.qwik.cjs +4 -0
- package/lib/_virtual/genericRole.qwik.mjs +4 -0
- package/lib/_virtual/graphicsDocumentRole.qwik.cjs +4 -0
- package/lib/_virtual/graphicsDocumentRole.qwik.mjs +4 -0
- package/lib/_virtual/graphicsObjectRole.qwik.cjs +4 -0
- package/lib/_virtual/graphicsObjectRole.qwik.mjs +4 -0
- package/lib/_virtual/graphicsSymbolRole.qwik.cjs +4 -0
- package/lib/_virtual/graphicsSymbolRole.qwik.mjs +4 -0
- package/lib/_virtual/gridRole.qwik.cjs +4 -0
- package/lib/_virtual/gridRole.qwik.mjs +4 -0
- package/lib/_virtual/gridcellRole.qwik.cjs +4 -0
- package/lib/_virtual/gridcellRole.qwik.mjs +4 -0
- package/lib/_virtual/groupRole.qwik.cjs +4 -0
- package/lib/_virtual/groupRole.qwik.mjs +4 -0
- package/lib/_virtual/headingRole.qwik.cjs +4 -0
- package/lib/_virtual/headingRole.qwik.mjs +4 -0
- package/lib/_virtual/imgRole.qwik.cjs +4 -0
- package/lib/_virtual/imgRole.qwik.mjs +4 -0
- package/lib/_virtual/index.qwik.cjs +4 -0
- package/lib/_virtual/index.qwik.mjs +4 -0
- package/lib/_virtual/index.qwik2.cjs +4 -0
- package/lib/_virtual/index.qwik2.mjs +4 -0
- package/lib/_virtual/index.qwik3.cjs +4 -0
- package/lib/_virtual/index.qwik3.mjs +4 -0
- package/lib/_virtual/index.qwik4.cjs +4 -0
- package/lib/_virtual/index.qwik4.mjs +4 -0
- package/lib/_virtual/index.qwik5.cjs +4 -0
- package/lib/_virtual/index.qwik5.mjs +4 -0
- package/lib/_virtual/inputRole.qwik.cjs +4 -0
- package/lib/_virtual/inputRole.qwik.mjs +4 -0
- package/lib/_virtual/insertionRole.qwik.cjs +4 -0
- package/lib/_virtual/insertionRole.qwik.mjs +4 -0
- package/lib/_virtual/iterationDecorator.qwik.cjs +4 -0
- package/lib/_virtual/iterationDecorator.qwik.mjs +4 -0
- package/lib/_virtual/iteratorProxy.qwik.cjs +4 -0
- package/lib/_virtual/iteratorProxy.qwik.mjs +4 -0
- package/lib/_virtual/landmarkRole.qwik.cjs +4 -0
- package/lib/_virtual/landmarkRole.qwik.mjs +4 -0
- package/lib/_virtual/linkRole.qwik.cjs +4 -0
- package/lib/_virtual/linkRole.qwik.mjs +4 -0
- package/lib/_virtual/listRole.qwik.cjs +4 -0
- package/lib/_virtual/listRole.qwik.mjs +4 -0
- package/lib/_virtual/listboxRole.qwik.cjs +4 -0
- package/lib/_virtual/listboxRole.qwik.mjs +4 -0
- package/lib/_virtual/listitemRole.qwik.cjs +4 -0
- package/lib/_virtual/listitemRole.qwik.mjs +4 -0
- package/lib/_virtual/logRole.qwik.cjs +4 -0
- package/lib/_virtual/logRole.qwik.mjs +4 -0
- package/lib/_virtual/lz-string.qwik.cjs +4 -0
- package/lib/_virtual/lz-string.qwik.mjs +4 -0
- package/lib/_virtual/mainRole.qwik.cjs +4 -0
- package/lib/_virtual/mainRole.qwik.mjs +4 -0
- package/lib/_virtual/markRole.qwik.cjs +4 -0
- package/lib/_virtual/markRole.qwik.mjs +4 -0
- package/lib/_virtual/markup.qwik.cjs +4 -0
- package/lib/_virtual/markup.qwik.mjs +4 -0
- package/lib/_virtual/marqueeRole.qwik.cjs +4 -0
- package/lib/_virtual/marqueeRole.qwik.mjs +4 -0
- package/lib/_virtual/mathRole.qwik.cjs +4 -0
- package/lib/_virtual/mathRole.qwik.mjs +4 -0
- package/lib/_virtual/menuRole.qwik.cjs +4 -0
- package/lib/_virtual/menuRole.qwik.mjs +4 -0
- package/lib/_virtual/menubarRole.qwik.cjs +4 -0
- package/lib/_virtual/menubarRole.qwik.mjs +4 -0
- package/lib/_virtual/menuitemRole.qwik.cjs +4 -0
- package/lib/_virtual/menuitemRole.qwik.mjs +4 -0
- package/lib/_virtual/menuitemcheckboxRole.qwik.cjs +4 -0
- package/lib/_virtual/menuitemcheckboxRole.qwik.mjs +4 -0
- package/lib/_virtual/menuitemradioRole.qwik.cjs +4 -0
- package/lib/_virtual/menuitemradioRole.qwik.mjs +4 -0
- package/lib/_virtual/meterRole.qwik.cjs +4 -0
- package/lib/_virtual/meterRole.qwik.mjs +4 -0
- package/lib/_virtual/navigationRole.qwik.cjs +4 -0
- package/lib/_virtual/navigationRole.qwik.mjs +4 -0
- package/lib/_virtual/noneRole.qwik.cjs +4 -0
- package/lib/_virtual/noneRole.qwik.mjs +4 -0
- package/lib/_virtual/noteRole.qwik.cjs +4 -0
- package/lib/_virtual/noteRole.qwik.mjs +4 -0
- package/lib/_virtual/optionRole.qwik.cjs +4 -0
- package/lib/_virtual/optionRole.qwik.mjs +4 -0
- package/lib/_virtual/paragraphRole.qwik.cjs +4 -0
- package/lib/_virtual/paragraphRole.qwik.mjs +4 -0
- package/lib/_virtual/presentationRole.qwik.cjs +4 -0
- package/lib/_virtual/presentationRole.qwik.mjs +4 -0
- package/lib/_virtual/progressbarRole.qwik.cjs +4 -0
- package/lib/_virtual/progressbarRole.qwik.mjs +4 -0
- package/lib/_virtual/radioRole.qwik.cjs +4 -0
- package/lib/_virtual/radioRole.qwik.mjs +4 -0
- package/lib/_virtual/radiogroupRole.qwik.cjs +4 -0
- package/lib/_virtual/radiogroupRole.qwik.mjs +4 -0
- package/lib/_virtual/rangeRole.qwik.cjs +4 -0
- package/lib/_virtual/rangeRole.qwik.mjs +4 -0
- package/lib/_virtual/react-is.development.qwik.cjs +4 -0
- package/lib/_virtual/react-is.development.qwik.mjs +4 -0
- package/lib/_virtual/react-is.production.min.qwik.cjs +4 -0
- package/lib/_virtual/react-is.production.min.qwik.mjs +4 -0
- package/lib/_virtual/regionRole.qwik.cjs +4 -0
- package/lib/_virtual/regionRole.qwik.mjs +4 -0
- package/lib/_virtual/roleElementMap.qwik.cjs +4 -0
- package/lib/_virtual/roleElementMap.qwik.mjs +4 -0
- package/lib/_virtual/rolesMap.qwik.cjs +4 -0
- package/lib/_virtual/rolesMap.qwik.mjs +4 -0
- package/lib/_virtual/roletypeRole.qwik.cjs +4 -0
- package/lib/_virtual/roletypeRole.qwik.mjs +4 -0
- package/lib/_virtual/rowRole.qwik.cjs +4 -0
- package/lib/_virtual/rowRole.qwik.mjs +4 -0
- package/lib/_virtual/rowgroupRole.qwik.cjs +4 -0
- package/lib/_virtual/rowgroupRole.qwik.mjs +4 -0
- package/lib/_virtual/rowheaderRole.qwik.cjs +4 -0
- package/lib/_virtual/rowheaderRole.qwik.mjs +4 -0
- package/lib/_virtual/scrollbarRole.qwik.cjs +4 -0
- package/lib/_virtual/scrollbarRole.qwik.mjs +4 -0
- package/lib/_virtual/searchRole.qwik.cjs +4 -0
- package/lib/_virtual/searchRole.qwik.mjs +4 -0
- package/lib/_virtual/searchboxRole.qwik.cjs +4 -0
- package/lib/_virtual/searchboxRole.qwik.mjs +4 -0
- package/lib/_virtual/sectionRole.qwik.cjs +4 -0
- package/lib/_virtual/sectionRole.qwik.mjs +4 -0
- package/lib/_virtual/sectionheadRole.qwik.cjs +4 -0
- package/lib/_virtual/sectionheadRole.qwik.mjs +4 -0
- package/lib/_virtual/selectRole.qwik.cjs +4 -0
- package/lib/_virtual/selectRole.qwik.mjs +4 -0
- package/lib/_virtual/separatorRole.qwik.cjs +4 -0
- package/lib/_virtual/separatorRole.qwik.mjs +4 -0
- package/lib/_virtual/sliderRole.qwik.cjs +4 -0
- package/lib/_virtual/sliderRole.qwik.mjs +4 -0
- package/lib/_virtual/spinbuttonRole.qwik.cjs +4 -0
- package/lib/_virtual/spinbuttonRole.qwik.mjs +4 -0
- package/lib/_virtual/statusRole.qwik.cjs +4 -0
- package/lib/_virtual/statusRole.qwik.mjs +4 -0
- package/lib/_virtual/strongRole.qwik.cjs +4 -0
- package/lib/_virtual/strongRole.qwik.mjs +4 -0
- package/lib/_virtual/structureRole.qwik.cjs +4 -0
- package/lib/_virtual/structureRole.qwik.mjs +4 -0
- package/lib/_virtual/subscriptRole.qwik.cjs +4 -0
- package/lib/_virtual/subscriptRole.qwik.mjs +4 -0
- package/lib/_virtual/superscriptRole.qwik.cjs +4 -0
- package/lib/_virtual/superscriptRole.qwik.mjs +4 -0
- package/lib/_virtual/switchRole.qwik.cjs +4 -0
- package/lib/_virtual/switchRole.qwik.mjs +4 -0
- package/lib/_virtual/tabRole.qwik.cjs +4 -0
- package/lib/_virtual/tabRole.qwik.mjs +4 -0
- package/lib/_virtual/tableRole.qwik.cjs +4 -0
- package/lib/_virtual/tableRole.qwik.mjs +4 -0
- package/lib/_virtual/tablistRole.qwik.cjs +4 -0
- package/lib/_virtual/tablistRole.qwik.mjs +4 -0
- package/lib/_virtual/tabpanelRole.qwik.cjs +4 -0
- package/lib/_virtual/tabpanelRole.qwik.mjs +4 -0
- package/lib/_virtual/termRole.qwik.cjs +4 -0
- package/lib/_virtual/termRole.qwik.mjs +4 -0
- package/lib/_virtual/textboxRole.qwik.cjs +4 -0
- package/lib/_virtual/textboxRole.qwik.mjs +4 -0
- package/lib/_virtual/timeRole.qwik.cjs +4 -0
- package/lib/_virtual/timeRole.qwik.mjs +4 -0
- package/lib/_virtual/timerRole.qwik.cjs +4 -0
- package/lib/_virtual/timerRole.qwik.mjs +4 -0
- package/lib/_virtual/toolbarRole.qwik.cjs +4 -0
- package/lib/_virtual/toolbarRole.qwik.mjs +4 -0
- package/lib/_virtual/tooltipRole.qwik.cjs +4 -0
- package/lib/_virtual/tooltipRole.qwik.mjs +4 -0
- package/lib/_virtual/treeRole.qwik.cjs +4 -0
- package/lib/_virtual/treeRole.qwik.mjs +4 -0
- package/lib/_virtual/treegridRole.qwik.cjs +4 -0
- package/lib/_virtual/treegridRole.qwik.mjs +4 -0
- package/lib/_virtual/treeitemRole.qwik.cjs +4 -0
- package/lib/_virtual/treeitemRole.qwik.mjs +4 -0
- package/lib/_virtual/widgetRole.qwik.cjs +4 -0
- package/lib/_virtual/widgetRole.qwik.mjs +4 -0
- package/lib/_virtual/windowRole.qwik.cjs +4 -0
- package/lib/_virtual/windowRole.qwik.mjs +4 -0
- package/lib/index.qwik.cjs +85 -0
- package/lib/index.qwik.mjs +85 -0
- package/lib/lib/qwik-testing-library.qwik.cjs +159 -0
- package/lib/lib/qwik-testing-library.qwik.mjs +138 -0
- package/lib/lib/qwikloader.qwik.cjs +252 -0
- package/lib/lib/qwikloader.qwik.mjs +252 -0
- package/lib/node_modules/.pnpm/@testing-library_dom@10.4.0/node_modules/@testing-library/dom/dist/@testing-library/dom.esm.qwik.cjs +2600 -0
- package/lib/node_modules/.pnpm/@testing-library_dom@10.4.0/node_modules/@testing-library/dom/dist/@testing-library/dom.esm.qwik.mjs +2601 -0
- package/lib/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.qwik.cjs +10 -0
- package/lib/node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.qwik.mjs +10 -0
- package/lib/node_modules/.pnpm/ansi-styles@5.2.0/node_modules/ansi-styles/index.qwik.cjs +139 -0
- package/lib/node_modules/.pnpm/ansi-styles@5.2.0/node_modules/ansi-styles/index.qwik.mjs +139 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/ariaPropsMap.qwik.cjs +253 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/ariaPropsMap.qwik.mjs +252 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/domMap.qwik.cjs +396 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/domMap.qwik.mjs +395 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/elementRoleMap.qwik.cjs +182 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/elementRoleMap.qwik.mjs +181 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/commandRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/commandRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/compositeRole.qwik.cjs +26 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/compositeRole.qwik.mjs +25 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/inputRole.qwik.cjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/inputRole.qwik.mjs +29 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/landmarkRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/landmarkRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/rangeRole.qwik.cjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/rangeRole.qwik.mjs +26 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/roletypeRole.qwik.cjs +51 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/roletypeRole.qwik.mjs +50 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/sectionRole.qwik.cjs +38 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/sectionRole.qwik.mjs +37 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/sectionheadRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/sectionheadRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/selectRole.qwik.cjs +25 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/selectRole.qwik.mjs +24 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/structureRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/structureRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/widgetRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/widgetRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/windowRole.qwik.cjs +25 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/abstract/windowRole.qwik.mjs +24 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/ariaAbstractRoles.qwik.cjs +48 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/ariaAbstractRoles.qwik.mjs +47 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/ariaDpubRoles.qwik.cjs +129 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/ariaDpubRoles.qwik.mjs +128 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/ariaGraphicsRoles.qwik.cjs +21 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/ariaGraphicsRoles.qwik.mjs +20 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/ariaLiteralRoles.qwik.cjs +261 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/ariaLiteralRoles.qwik.mjs +260 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docAbstractRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docAbstractRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docAcknowledgmentsRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docAcknowledgmentsRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docAfterwordRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docAfterwordRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docAppendixRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docAppendixRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docBacklinkRole.qwik.cjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docBacklinkRole.qwik.mjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docBiblioentryRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docBiblioentryRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docBibliographyRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docBibliographyRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docBibliorefRole.qwik.cjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docBibliorefRole.qwik.mjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docChapterRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docChapterRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docColophonRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docColophonRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docConclusionRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docConclusionRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docCoverRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docCoverRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docCreditRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docCreditRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docCreditsRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docCreditsRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docDedicationRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docDedicationRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docEndnoteRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docEndnoteRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docEndnotesRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docEndnotesRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docEpigraphRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docEpigraphRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docEpilogueRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docEpilogueRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docErrataRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docErrataRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docExampleRole.qwik.cjs +29 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docExampleRole.qwik.mjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docFootnoteRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docFootnoteRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docForewordRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docForewordRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docGlossaryRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docGlossaryRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docGlossrefRole.qwik.cjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docGlossrefRole.qwik.mjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docIndexRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docIndexRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docIntroductionRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docIntroductionRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docNoterefRole.qwik.cjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docNoterefRole.qwik.mjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docNoticeRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docNoticeRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docPagebreakRole.qwik.cjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docPagebreakRole.qwik.mjs +32 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docPagelistRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docPagelistRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docPartRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docPartRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docPrefaceRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docPrefaceRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docPrologueRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docPrologueRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docPullquoteRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docPullquoteRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docQnaRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docQnaRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docSubtitleRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docSubtitleRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docTipRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docTipRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docTocRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/dpub/docTocRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/graphics/graphicsDocumentRole.qwik.cjs +44 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/graphics/graphicsDocumentRole.qwik.mjs +43 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/graphics/graphicsObjectRole.qwik.cjs +48 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/graphics/graphicsObjectRole.qwik.mjs +47 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/graphics/graphicsSymbolRole.qwik.cjs +29 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/graphics/graphicsSymbolRole.qwik.mjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/alertRole.qwik.cjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/alertRole.qwik.mjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/alertdialogRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/alertdialogRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/applicationRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/applicationRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/articleRole.qwik.cjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/articleRole.qwik.mjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/bannerRole.qwik.cjs +29 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/bannerRole.qwik.mjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/blockquoteRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/blockquoteRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/buttonRole.qwik.cjs +74 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/buttonRole.qwik.mjs +73 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/captionRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/captionRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/cellRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/cellRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/checkboxRole.qwik.cjs +46 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/checkboxRole.qwik.mjs +45 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/codeRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/codeRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/columnheaderRole.qwik.cjs +48 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/columnheaderRole.qwik.mjs +47 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/comboboxRole.qwik.cjs +125 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/comboboxRole.qwik.mjs +124 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/complementaryRole.qwik.cjs +48 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/complementaryRole.qwik.mjs +47 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/contentinfoRole.qwik.cjs +29 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/contentinfoRole.qwik.mjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/definitionRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/definitionRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/deletionRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/deletionRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/dialogRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/dialogRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/directoryRole.qwik.cjs +25 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/directoryRole.qwik.mjs +24 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/documentRole.qwik.cjs +32 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/documentRole.qwik.mjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/emphasisRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/emphasisRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/feedRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/feedRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/figureRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/figureRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/formRole.qwik.cjs +50 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/formRole.qwik.mjs +49 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/genericRole.qwik.cjs +120 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/genericRole.qwik.mjs +119 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/gridRole.qwik.cjs +26 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/gridRole.qwik.mjs +25 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/gridcellRole.qwik.cjs +38 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/gridcellRole.qwik.mjs +37 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/groupRole.qwik.cjs +46 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/groupRole.qwik.mjs +45 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/headingRole.qwik.cjs +57 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/headingRole.qwik.mjs +56 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/imgRole.qwik.cjs +46 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/imgRole.qwik.mjs +45 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/insertionRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/insertionRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/linkRole.qwik.cjs +45 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/linkRole.qwik.mjs +44 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/listRole.qwik.cjs +38 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/listRole.qwik.mjs +37 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/listboxRole.qwik.cjs +64 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/listboxRole.qwik.mjs +63 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/listitemRole.qwik.cjs +38 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/listitemRole.qwik.mjs +37 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/logRole.qwik.cjs +25 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/logRole.qwik.mjs +24 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/mainRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/mainRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/markRole.qwik.cjs +32 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/markRole.qwik.mjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/marqueeRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/marqueeRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/mathRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/mathRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/menuRole.qwik.cjs +45 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/menuRole.qwik.mjs +44 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/menubarRole.qwik.cjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/menubarRole.qwik.mjs +29 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/menuitemRole.qwik.cjs +44 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/menuitemRole.qwik.mjs +43 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/menuitemcheckboxRole.qwik.cjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/menuitemcheckboxRole.qwik.mjs +29 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/menuitemradioRole.qwik.cjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/menuitemradioRole.qwik.mjs +29 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/meterRole.qwik.cjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/meterRole.qwik.mjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/navigationRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/navigationRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/noneRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/noneRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/noteRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/noteRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/optionRole.qwik.cjs +45 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/optionRole.qwik.mjs +44 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/paragraphRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/paragraphRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/presentationRole.qwik.cjs +32 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/presentationRole.qwik.mjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/progressbarRole.qwik.cjs +35 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/progressbarRole.qwik.mjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/radioRole.qwik.cjs +38 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/radioRole.qwik.mjs +37 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/radiogroupRole.qwik.cjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/radiogroupRole.qwik.mjs +32 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/regionRole.qwik.cjs +45 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/regionRole.qwik.mjs +44 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/rowRole.qwik.cjs +36 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/rowRole.qwik.mjs +35 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/rowgroupRole.qwik.cjs +38 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/rowgroupRole.qwik.mjs +37 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/rowheaderRole.qwik.cjs +43 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/rowheaderRole.qwik.mjs +42 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/scrollbarRole.qwik.cjs +32 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/scrollbarRole.qwik.mjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/searchRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/searchRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/searchboxRole.qwik.cjs +36 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/searchboxRole.qwik.mjs +35 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/separatorRole.qwik.cjs +35 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/separatorRole.qwik.mjs +34 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/sliderRole.qwik.cjs +43 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/sliderRole.qwik.mjs +42 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/spinbuttonRole.qwik.cjs +39 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/spinbuttonRole.qwik.mjs +38 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/statusRole.qwik.cjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/statusRole.qwik.mjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/strongRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/strongRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/subscriptRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/subscriptRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/superscriptRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/superscriptRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/switchRole.qwik.cjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/switchRole.qwik.mjs +29 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/tabRole.qwik.cjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/tabRole.qwik.mjs +29 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/tableRole.qwik.cjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/tableRole.qwik.mjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/tablistRole.qwik.cjs +32 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/tablistRole.qwik.mjs +31 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/tabpanelRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/tabpanelRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/termRole.qwik.cjs +33 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/termRole.qwik.mjs +32 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/textboxRole.qwik.cjs +108 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/textboxRole.qwik.mjs +107 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/timeRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/timeRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/timerRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/timerRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/toolbarRole.qwik.cjs +30 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/toolbarRole.qwik.mjs +29 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/tooltipRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/tooltipRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/treeRole.qwik.cjs +29 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/treeRole.qwik.mjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/treegridRole.qwik.cjs +23 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/treegridRole.qwik.mjs +22 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/treeitemRole.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/etc/roles/literal/treeitemRole.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/index.qwik.cjs +36 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/index.qwik.mjs +39 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/roleElementMap.qwik.cjs +162 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/roleElementMap.qwik.mjs +161 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/rolesMap.qwik.cjs +200 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/rolesMap.qwik.mjs +199 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/util/iterationDecorator.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/util/iterationDecorator.qwik.mjs +27 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/util/iteratorProxy.qwik.cjs +32 -0
- package/lib/node_modules/.pnpm/aria-query@5.3.0/node_modules/aria-query/lib/util/iteratorProxy.qwik.mjs +31 -0
- package/lib/node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/lite/index.qwik.cjs +28 -0
- package/lib/node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/lite/index.qwik.mjs +29 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/accessible-description.qwik.cjs +70 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/accessible-description.qwik.mjs +70 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/accessible-name-and-description.qwik.cjs +374 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/accessible-name-and-description.qwik.mjs +374 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/accessible-name.qwik.cjs +15 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/accessible-name.qwik.mjs +15 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/getRole.qwik.cjs +185 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/getRole.qwik.mjs +185 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/polyfills/SetLike.qwik.cjs +103 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/polyfills/SetLike.qwik.mjs +104 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/polyfills/array.from.qwik.cjs +41 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/polyfills/array.from.qwik.mjs +42 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/util.qwik.cjs +87 -0
- package/lib/node_modules/.pnpm/dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/util.qwik.mjs +87 -0
- package/lib/node_modules/.pnpm/lz-string@1.5.0/node_modules/lz-string/libs/lz-string.qwik.cjs +453 -0
- package/lib/node_modules/.pnpm/lz-string@1.5.0/node_modules/lz-string/libs/lz-string.qwik.mjs +454 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/collections.qwik.cjs +114 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/collections.qwik.mjs +115 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/index.qwik.cjs +388 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/index.qwik.mjs +391 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/AsymmetricMatcher.qwik.cjs +70 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/AsymmetricMatcher.qwik.mjs +69 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/ConvertAnsi.qwik.cjs +68 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/ConvertAnsi.qwik.mjs +67 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/DOMCollection.qwik.cjs +47 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/DOMCollection.qwik.mjs +46 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/DOMElement.qwik.cjs +85 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/DOMElement.qwik.mjs +84 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/Immutable.qwik.cjs +154 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/Immutable.qwik.mjs +153 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/ReactElement.qwik.cjs +128 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/ReactElement.qwik.mjs +127 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/ReactTestComponent.qwik.cjs +59 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/ReactTestComponent.qwik.mjs +58 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/lib/escapeHTML.qwik.cjs +9 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/lib/escapeHTML.qwik.mjs +8 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/lib/markup.qwik.cjs +53 -0
- package/lib/node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/plugins/lib/markup.qwik.mjs +54 -0
- package/lib/node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/cjs/react-is.development.qwik.cjs +199 -0
- package/lib/node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/cjs/react-is.development.qwik.mjs +199 -0
- package/lib/node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/cjs/react-is.production.min.qwik.cjs +123 -0
- package/lib/node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/cjs/react-is.production.min.qwik.mjs +123 -0
- package/lib/node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/index.qwik.cjs +12 -0
- package/lib/node_modules/.pnpm/react-is@17.0.2/node_modules/react-is/index.qwik.mjs +12 -0
- package/lib-types/index.d.ts +1 -0
- package/lib-types/lib/qwik-testing-library.d.ts +6 -0
- package/lib-types/lib/qwikloader.d.ts +1 -0
- package/lib-types/lib/types.d.ts +21 -0
- package/package.json +48 -0
|
@@ -0,0 +1,2601 @@
|
|
|
1
|
+
import { format as format_1, plugins as plugins_1 } from "../../../../../../pretty-format@27.5.1/node_modules/pretty-format/build/index.qwik.mjs";
|
|
2
|
+
import * as index from "../../../../../../pretty-format@27.5.1/node_modules/pretty-format/build/index.qwik.mjs";
|
|
3
|
+
import { computeAccessibleDescription } from "../../../../../../dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/accessible-description.qwik.mjs";
|
|
4
|
+
import { computeAccessibleName } from "../../../../../../dom-accessibility-api@0.5.16/node_modules/dom-accessibility-api/dist/accessible-name.qwik.mjs";
|
|
5
|
+
import { elementRoles as elementRoles_1, roles as roles_1, roleElements as roleElements_1 } from "../../../../../../aria-query@5.3.0/node_modules/aria-query/lib/index.qwik.mjs";
|
|
6
|
+
import lzString from "../../../../../../lz-string@1.5.0/node_modules/lz-string/libs/lz-string.qwik.mjs";
|
|
7
|
+
function escapeHTML(str) {
|
|
8
|
+
return str.replace(/</g, "<").replace(/>/g, ">");
|
|
9
|
+
}
|
|
10
|
+
const printProps = (keys, props, config2, indentation, depth, refs, printer) => {
|
|
11
|
+
const indentationNext = indentation + config2.indent;
|
|
12
|
+
const colors = config2.colors;
|
|
13
|
+
return keys.map((key) => {
|
|
14
|
+
const value = props[key];
|
|
15
|
+
let printed = printer(value, config2, indentationNext, depth, refs);
|
|
16
|
+
if (typeof value !== "string") {
|
|
17
|
+
if (printed.indexOf("\n") !== -1) {
|
|
18
|
+
printed = config2.spacingOuter + indentationNext + printed + config2.spacingOuter + indentation;
|
|
19
|
+
}
|
|
20
|
+
printed = "{" + printed + "}";
|
|
21
|
+
}
|
|
22
|
+
return config2.spacingInner + indentation + colors.prop.open + key + colors.prop.close + "=" + colors.value.open + printed + colors.value.close;
|
|
23
|
+
}).join("");
|
|
24
|
+
};
|
|
25
|
+
const NodeTypeTextNode = 3;
|
|
26
|
+
const printChildren = (children, config2, indentation, depth, refs, printer) => children.map((child) => {
|
|
27
|
+
const printedChild = typeof child === "string" ? printText(child, config2) : printer(child, config2, indentation, depth, refs);
|
|
28
|
+
if (printedChild === "" && typeof child === "object" && child !== null && child.nodeType !== NodeTypeTextNode) {
|
|
29
|
+
return "";
|
|
30
|
+
}
|
|
31
|
+
return config2.spacingOuter + indentation + printedChild;
|
|
32
|
+
}).join("");
|
|
33
|
+
const printText = (text, config2) => {
|
|
34
|
+
const contentColor = config2.colors.content;
|
|
35
|
+
return contentColor.open + escapeHTML(text) + contentColor.close;
|
|
36
|
+
};
|
|
37
|
+
const printComment = (comment, config2) => {
|
|
38
|
+
const commentColor = config2.colors.comment;
|
|
39
|
+
return commentColor.open + "<!--" + escapeHTML(comment) + "-->" + commentColor.close;
|
|
40
|
+
};
|
|
41
|
+
const printElement = (type, printedProps, printedChildren, config2, indentation) => {
|
|
42
|
+
const tagColor = config2.colors.tag;
|
|
43
|
+
return tagColor.open + "<" + type + (printedProps && tagColor.close + printedProps + config2.spacingOuter + indentation + tagColor.open) + (printedChildren ? ">" + tagColor.close + printedChildren + config2.spacingOuter + indentation + tagColor.open + "</" + type : (printedProps && !config2.min ? "" : " ") + "/") + ">" + tagColor.close;
|
|
44
|
+
};
|
|
45
|
+
const printElementAsLeaf = (type, config2) => {
|
|
46
|
+
const tagColor = config2.colors.tag;
|
|
47
|
+
return tagColor.open + "<" + type + tagColor.close + " …" + tagColor.open + " />" + tagColor.close;
|
|
48
|
+
};
|
|
49
|
+
const ELEMENT_NODE$1 = 1;
|
|
50
|
+
const TEXT_NODE$1 = 3;
|
|
51
|
+
const COMMENT_NODE$1 = 8;
|
|
52
|
+
const FRAGMENT_NODE = 11;
|
|
53
|
+
const ELEMENT_REGEXP = /^((HTML|SVG)\w*)?Element$/;
|
|
54
|
+
const isCustomElement = (val) => {
|
|
55
|
+
const {
|
|
56
|
+
tagName
|
|
57
|
+
} = val;
|
|
58
|
+
return Boolean(typeof tagName === "string" && tagName.includes("-") || typeof val.hasAttribute === "function" && val.hasAttribute("is"));
|
|
59
|
+
};
|
|
60
|
+
const testNode = (val) => {
|
|
61
|
+
const constructorName = val.constructor.name;
|
|
62
|
+
const {
|
|
63
|
+
nodeType
|
|
64
|
+
} = val;
|
|
65
|
+
return nodeType === ELEMENT_NODE$1 && (ELEMENT_REGEXP.test(constructorName) || isCustomElement(val)) || nodeType === TEXT_NODE$1 && constructorName === "Text" || nodeType === COMMENT_NODE$1 && constructorName === "Comment" || nodeType === FRAGMENT_NODE && constructorName === "DocumentFragment";
|
|
66
|
+
};
|
|
67
|
+
function nodeIsText(node) {
|
|
68
|
+
return node.nodeType === TEXT_NODE$1;
|
|
69
|
+
}
|
|
70
|
+
function nodeIsComment(node) {
|
|
71
|
+
return node.nodeType === COMMENT_NODE$1;
|
|
72
|
+
}
|
|
73
|
+
function nodeIsFragment(node) {
|
|
74
|
+
return node.nodeType === FRAGMENT_NODE;
|
|
75
|
+
}
|
|
76
|
+
function createDOMElementFilter(filterNode) {
|
|
77
|
+
return {
|
|
78
|
+
test: (val) => {
|
|
79
|
+
var _val$constructor2;
|
|
80
|
+
return ((val == null || (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) || isCustomElement(val)) && testNode(val);
|
|
81
|
+
},
|
|
82
|
+
serialize: (node, config2, indentation, depth, refs, printer) => {
|
|
83
|
+
if (nodeIsText(node)) {
|
|
84
|
+
return printText(node.data, config2);
|
|
85
|
+
}
|
|
86
|
+
if (nodeIsComment(node)) {
|
|
87
|
+
return printComment(node.data, config2);
|
|
88
|
+
}
|
|
89
|
+
const type = nodeIsFragment(node) ? "DocumentFragment" : node.tagName.toLowerCase();
|
|
90
|
+
if (++depth > config2.maxDepth) {
|
|
91
|
+
return printElementAsLeaf(type, config2);
|
|
92
|
+
}
|
|
93
|
+
return printElement(type, printProps(nodeIsFragment(node) ? [] : Array.from(node.attributes).map((attr) => attr.name).sort(), nodeIsFragment(node) ? {} : Array.from(node.attributes).reduce((props, attribute) => {
|
|
94
|
+
props[attribute.name] = attribute.value;
|
|
95
|
+
return props;
|
|
96
|
+
}, {}), config2, indentation + config2.indent, depth, refs, printer), printChildren(Array.prototype.slice.call(node.childNodes || node.children).filter(filterNode), config2, indentation + config2.indent, depth, refs, printer), config2, indentation);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
let chalk = null;
|
|
101
|
+
let readFileSync = null;
|
|
102
|
+
let codeFrameColumns = null;
|
|
103
|
+
try {
|
|
104
|
+
const nodeRequire = module && module.require;
|
|
105
|
+
readFileSync = nodeRequire.call(module, "fs").readFileSync;
|
|
106
|
+
codeFrameColumns = nodeRequire.call(module, "@babel/code-frame").codeFrameColumns;
|
|
107
|
+
chalk = nodeRequire.call(module, "chalk");
|
|
108
|
+
} catch {
|
|
109
|
+
}
|
|
110
|
+
function getCodeFrame(frame) {
|
|
111
|
+
const locationStart = frame.indexOf("(") + 1;
|
|
112
|
+
const locationEnd = frame.indexOf(")");
|
|
113
|
+
const frameLocation = frame.slice(locationStart, locationEnd);
|
|
114
|
+
const frameLocationElements = frameLocation.split(":");
|
|
115
|
+
const [filename, line, column] = [frameLocationElements[0], parseInt(frameLocationElements[1], 10), parseInt(frameLocationElements[2], 10)];
|
|
116
|
+
let rawFileContents = "";
|
|
117
|
+
try {
|
|
118
|
+
rawFileContents = readFileSync(filename, "utf-8");
|
|
119
|
+
} catch {
|
|
120
|
+
return "";
|
|
121
|
+
}
|
|
122
|
+
const codeFrame = codeFrameColumns(rawFileContents, {
|
|
123
|
+
start: {
|
|
124
|
+
line,
|
|
125
|
+
column
|
|
126
|
+
}
|
|
127
|
+
}, {
|
|
128
|
+
highlightCode: true,
|
|
129
|
+
linesBelow: 0
|
|
130
|
+
});
|
|
131
|
+
return chalk.dim(frameLocation) + "\n" + codeFrame + "\n";
|
|
132
|
+
}
|
|
133
|
+
function getUserCodeFrame() {
|
|
134
|
+
if (!readFileSync || !codeFrameColumns) {
|
|
135
|
+
return "";
|
|
136
|
+
}
|
|
137
|
+
const err = new Error();
|
|
138
|
+
const firstClientCodeFrame = err.stack.split("\n").slice(1).find((frame) => !frame.includes("node_modules/"));
|
|
139
|
+
return getCodeFrame(firstClientCodeFrame);
|
|
140
|
+
}
|
|
141
|
+
const TEXT_NODE = 3;
|
|
142
|
+
function jestFakeTimersAreEnabled() {
|
|
143
|
+
if (typeof jest !== "undefined" && jest !== null) {
|
|
144
|
+
return (
|
|
145
|
+
// legacy timers
|
|
146
|
+
setTimeout._isMockFunction === true || // modern timers
|
|
147
|
+
// eslint-disable-next-line prefer-object-has-own -- not supported by our support matrix
|
|
148
|
+
Object.prototype.hasOwnProperty.call(setTimeout, "clock")
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
function getDocument() {
|
|
154
|
+
if (typeof window === "undefined") {
|
|
155
|
+
throw new Error("Could not find default container");
|
|
156
|
+
}
|
|
157
|
+
return window.document;
|
|
158
|
+
}
|
|
159
|
+
function getWindowFromNode(node) {
|
|
160
|
+
if (node.defaultView) {
|
|
161
|
+
return node.defaultView;
|
|
162
|
+
} else if (node.ownerDocument && node.ownerDocument.defaultView) {
|
|
163
|
+
return node.ownerDocument.defaultView;
|
|
164
|
+
} else if (node.window) {
|
|
165
|
+
return node.window;
|
|
166
|
+
} else if (node.ownerDocument && node.ownerDocument.defaultView === null) {
|
|
167
|
+
throw new Error("It looks like the window object is not available for the provided node.");
|
|
168
|
+
} else if (node.then instanceof Function) {
|
|
169
|
+
throw new Error("It looks like you passed a Promise object instead of a DOM node. Did you do something like `fireEvent.click(screen.findBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`, or await the findBy query `fireEvent.click(await screen.findBy...`?");
|
|
170
|
+
} else if (Array.isArray(node)) {
|
|
171
|
+
throw new Error("It looks like you passed an Array instead of a DOM node. Did you do something like `fireEvent.click(screen.getAllBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`?");
|
|
172
|
+
} else if (typeof node.debug === "function" && typeof node.logTestingPlaygroundURL === "function") {
|
|
173
|
+
throw new Error("It looks like you passed a `screen` object. Did you do something like `fireEvent.click(screen, ...` when you meant to use a query, e.g. `fireEvent.click(screen.getBy..., `?");
|
|
174
|
+
} else {
|
|
175
|
+
throw new Error("The given node is not an Element, the node type is: " + typeof node + ".");
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
function checkContainerType(container) {
|
|
179
|
+
if (!container || !(typeof container.querySelector === "function") || !(typeof container.querySelectorAll === "function")) {
|
|
180
|
+
throw new TypeError("Expected container to be an Element, a Document or a DocumentFragment but got " + getTypeName(container) + ".");
|
|
181
|
+
}
|
|
182
|
+
function getTypeName(object) {
|
|
183
|
+
if (typeof object === "object") {
|
|
184
|
+
return object === null ? "null" : object.constructor.name;
|
|
185
|
+
}
|
|
186
|
+
return typeof object;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const shouldHighlight = () => {
|
|
190
|
+
if (typeof process === "undefined") {
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
let colors;
|
|
194
|
+
try {
|
|
195
|
+
var _process$env;
|
|
196
|
+
const colorsJSON = (_process$env = process.env) == null ? void 0 : _process$env.COLORS;
|
|
197
|
+
if (colorsJSON) {
|
|
198
|
+
colors = JSON.parse(colorsJSON);
|
|
199
|
+
}
|
|
200
|
+
} catch {
|
|
201
|
+
}
|
|
202
|
+
if (typeof colors === "boolean") {
|
|
203
|
+
return colors;
|
|
204
|
+
} else {
|
|
205
|
+
return process.versions !== void 0 && process.versions.node !== void 0;
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
const {
|
|
209
|
+
DOMCollection
|
|
210
|
+
} = plugins_1;
|
|
211
|
+
const ELEMENT_NODE = 1;
|
|
212
|
+
const COMMENT_NODE = 8;
|
|
213
|
+
function filterCommentsAndDefaultIgnoreTagsTags(value) {
|
|
214
|
+
return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches(getConfig().defaultIgnore));
|
|
215
|
+
}
|
|
216
|
+
function prettyDOM(dom, maxLength, options) {
|
|
217
|
+
if (options === void 0) {
|
|
218
|
+
options = {};
|
|
219
|
+
}
|
|
220
|
+
if (!dom) {
|
|
221
|
+
dom = getDocument().body;
|
|
222
|
+
}
|
|
223
|
+
if (typeof maxLength !== "number") {
|
|
224
|
+
maxLength = typeof process !== "undefined" && typeof process.env !== "undefined" && process.env.DEBUG_PRINT_LIMIT || 7e3;
|
|
225
|
+
}
|
|
226
|
+
if (maxLength === 0) {
|
|
227
|
+
return "";
|
|
228
|
+
}
|
|
229
|
+
if (dom.documentElement) {
|
|
230
|
+
dom = dom.documentElement;
|
|
231
|
+
}
|
|
232
|
+
let domTypeName = typeof dom;
|
|
233
|
+
if (domTypeName === "object") {
|
|
234
|
+
domTypeName = dom.constructor.name;
|
|
235
|
+
} else {
|
|
236
|
+
dom = {};
|
|
237
|
+
}
|
|
238
|
+
if (!("outerHTML" in dom)) {
|
|
239
|
+
throw new TypeError("Expected an element or document but got " + domTypeName);
|
|
240
|
+
}
|
|
241
|
+
const {
|
|
242
|
+
filterNode = filterCommentsAndDefaultIgnoreTagsTags,
|
|
243
|
+
...prettyFormatOptions
|
|
244
|
+
} = options;
|
|
245
|
+
const debugContent = format_1(dom, {
|
|
246
|
+
plugins: [createDOMElementFilter(filterNode), DOMCollection],
|
|
247
|
+
printFunctionName: false,
|
|
248
|
+
highlight: shouldHighlight(),
|
|
249
|
+
...prettyFormatOptions
|
|
250
|
+
});
|
|
251
|
+
return maxLength !== void 0 && dom.outerHTML.length > maxLength ? debugContent.slice(0, maxLength) + "..." : debugContent;
|
|
252
|
+
}
|
|
253
|
+
const logDOM = function() {
|
|
254
|
+
const userCodeFrame = getUserCodeFrame();
|
|
255
|
+
if (userCodeFrame) {
|
|
256
|
+
console.log(prettyDOM(...arguments) + "\n\n" + userCodeFrame);
|
|
257
|
+
} else {
|
|
258
|
+
console.log(prettyDOM(...arguments));
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
let config = {
|
|
262
|
+
testIdAttribute: "data-testid",
|
|
263
|
+
asyncUtilTimeout: 1e3,
|
|
264
|
+
// asyncWrapper and advanceTimersWrapper is to support React's async `act` function.
|
|
265
|
+
// forcing react-testing-library to wrap all async functions would've been
|
|
266
|
+
// a total nightmare (consider wrapping every findBy* query and then also
|
|
267
|
+
// updating `within` so those would be wrapped too. Total nightmare).
|
|
268
|
+
// so we have this config option that's really only intended for
|
|
269
|
+
// react-testing-library to use. For that reason, this feature will remain
|
|
270
|
+
// undocumented.
|
|
271
|
+
asyncWrapper: (cb) => cb(),
|
|
272
|
+
unstable_advanceTimersWrapper: (cb) => cb(),
|
|
273
|
+
eventWrapper: (cb) => cb(),
|
|
274
|
+
// default value for the `hidden` option in `ByRole` queries
|
|
275
|
+
defaultHidden: false,
|
|
276
|
+
// default value for the `ignore` option in `ByText` queries
|
|
277
|
+
defaultIgnore: "script, style",
|
|
278
|
+
// showOriginalStackTrace flag to show the full error stack traces for async errors
|
|
279
|
+
showOriginalStackTrace: false,
|
|
280
|
+
// throw errors w/ suggestions for better queries. Opt in so off by default.
|
|
281
|
+
throwSuggestions: false,
|
|
282
|
+
// called when getBy* queries fail. (message, container) => Error
|
|
283
|
+
getElementError(message, container) {
|
|
284
|
+
const prettifiedDOM = prettyDOM(container);
|
|
285
|
+
const error = new Error([message, "Ignored nodes: comments, " + config.defaultIgnore + "\n" + prettifiedDOM].filter(Boolean).join("\n\n"));
|
|
286
|
+
error.name = "TestingLibraryElementError";
|
|
287
|
+
return error;
|
|
288
|
+
},
|
|
289
|
+
_disableExpensiveErrorDiagnostics: false,
|
|
290
|
+
computedStyleSupportsPseudoElements: false
|
|
291
|
+
};
|
|
292
|
+
function runWithExpensiveErrorDiagnosticsDisabled(callback) {
|
|
293
|
+
try {
|
|
294
|
+
config._disableExpensiveErrorDiagnostics = true;
|
|
295
|
+
return callback();
|
|
296
|
+
} finally {
|
|
297
|
+
config._disableExpensiveErrorDiagnostics = false;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
function configure(newConfig) {
|
|
301
|
+
if (typeof newConfig === "function") {
|
|
302
|
+
newConfig = newConfig(config);
|
|
303
|
+
}
|
|
304
|
+
config = {
|
|
305
|
+
...config,
|
|
306
|
+
...newConfig
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
function getConfig() {
|
|
310
|
+
return config;
|
|
311
|
+
}
|
|
312
|
+
const labelledNodeNames = ["button", "meter", "output", "progress", "select", "textarea", "input"];
|
|
313
|
+
function getTextContent(node) {
|
|
314
|
+
if (labelledNodeNames.includes(node.nodeName.toLowerCase())) {
|
|
315
|
+
return "";
|
|
316
|
+
}
|
|
317
|
+
if (node.nodeType === TEXT_NODE) return node.textContent;
|
|
318
|
+
return Array.from(node.childNodes).map((childNode) => getTextContent(childNode)).join("");
|
|
319
|
+
}
|
|
320
|
+
function getLabelContent(element) {
|
|
321
|
+
let textContent;
|
|
322
|
+
if (element.tagName.toLowerCase() === "label") {
|
|
323
|
+
textContent = getTextContent(element);
|
|
324
|
+
} else {
|
|
325
|
+
textContent = element.value || element.textContent;
|
|
326
|
+
}
|
|
327
|
+
return textContent;
|
|
328
|
+
}
|
|
329
|
+
function getRealLabels(element) {
|
|
330
|
+
if (element.labels !== void 0) {
|
|
331
|
+
var _labels;
|
|
332
|
+
return (_labels = element.labels) != null ? _labels : [];
|
|
333
|
+
}
|
|
334
|
+
if (!isLabelable(element)) return [];
|
|
335
|
+
const labels = element.ownerDocument.querySelectorAll("label");
|
|
336
|
+
return Array.from(labels).filter((label) => label.control === element);
|
|
337
|
+
}
|
|
338
|
+
function isLabelable(element) {
|
|
339
|
+
return /BUTTON|METER|OUTPUT|PROGRESS|SELECT|TEXTAREA/.test(element.tagName) || element.tagName === "INPUT" && element.getAttribute("type") !== "hidden";
|
|
340
|
+
}
|
|
341
|
+
function getLabels(container, element, _temp) {
|
|
342
|
+
let {
|
|
343
|
+
selector = "*"
|
|
344
|
+
} = _temp === void 0 ? {} : _temp;
|
|
345
|
+
const ariaLabelledBy = element.getAttribute("aria-labelledby");
|
|
346
|
+
const labelsId = ariaLabelledBy ? ariaLabelledBy.split(" ") : [];
|
|
347
|
+
return labelsId.length ? labelsId.map((labelId) => {
|
|
348
|
+
const labellingElement = container.querySelector('[id="' + labelId + '"]');
|
|
349
|
+
return labellingElement ? {
|
|
350
|
+
content: getLabelContent(labellingElement),
|
|
351
|
+
formControl: null
|
|
352
|
+
} : {
|
|
353
|
+
content: "",
|
|
354
|
+
formControl: null
|
|
355
|
+
};
|
|
356
|
+
}) : Array.from(getRealLabels(element)).map((label) => {
|
|
357
|
+
const textToMatch = getLabelContent(label);
|
|
358
|
+
const formControlSelector = "button, input, meter, output, progress, select, textarea";
|
|
359
|
+
const labelledFormControl = Array.from(label.querySelectorAll(formControlSelector)).filter((formControlElement) => formControlElement.matches(selector))[0];
|
|
360
|
+
return {
|
|
361
|
+
content: textToMatch,
|
|
362
|
+
formControl: labelledFormControl
|
|
363
|
+
};
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
function assertNotNullOrUndefined(matcher) {
|
|
367
|
+
if (matcher === null || matcher === void 0) {
|
|
368
|
+
throw new Error(
|
|
369
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- implicitly converting `T` to `string`
|
|
370
|
+
"It looks like " + matcher + " was passed instead of a matcher. Did you do something like getByText(" + matcher + ")?"
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
function fuzzyMatches(textToMatch, node, matcher, normalizer) {
|
|
375
|
+
if (typeof textToMatch !== "string") {
|
|
376
|
+
return false;
|
|
377
|
+
}
|
|
378
|
+
assertNotNullOrUndefined(matcher);
|
|
379
|
+
const normalizedText = normalizer(textToMatch);
|
|
380
|
+
if (typeof matcher === "string" || typeof matcher === "number") {
|
|
381
|
+
return normalizedText.toLowerCase().includes(matcher.toString().toLowerCase());
|
|
382
|
+
} else if (typeof matcher === "function") {
|
|
383
|
+
return matcher(normalizedText, node);
|
|
384
|
+
} else {
|
|
385
|
+
return matchRegExp(matcher, normalizedText);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
function matches(textToMatch, node, matcher, normalizer) {
|
|
389
|
+
if (typeof textToMatch !== "string") {
|
|
390
|
+
return false;
|
|
391
|
+
}
|
|
392
|
+
assertNotNullOrUndefined(matcher);
|
|
393
|
+
const normalizedText = normalizer(textToMatch);
|
|
394
|
+
if (matcher instanceof Function) {
|
|
395
|
+
return matcher(normalizedText, node);
|
|
396
|
+
} else if (matcher instanceof RegExp) {
|
|
397
|
+
return matchRegExp(matcher, normalizedText);
|
|
398
|
+
} else {
|
|
399
|
+
return normalizedText === String(matcher);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
function getDefaultNormalizer(_temp) {
|
|
403
|
+
let {
|
|
404
|
+
trim = true,
|
|
405
|
+
collapseWhitespace = true
|
|
406
|
+
} = _temp === void 0 ? {} : _temp;
|
|
407
|
+
return (text) => {
|
|
408
|
+
let normalizedText = text;
|
|
409
|
+
normalizedText = trim ? normalizedText.trim() : normalizedText;
|
|
410
|
+
normalizedText = collapseWhitespace ? normalizedText.replace(/\s+/g, " ") : normalizedText;
|
|
411
|
+
return normalizedText;
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
function makeNormalizer(_ref) {
|
|
415
|
+
let {
|
|
416
|
+
trim,
|
|
417
|
+
collapseWhitespace,
|
|
418
|
+
normalizer
|
|
419
|
+
} = _ref;
|
|
420
|
+
if (!normalizer) {
|
|
421
|
+
return getDefaultNormalizer({
|
|
422
|
+
trim,
|
|
423
|
+
collapseWhitespace
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
if (typeof trim !== "undefined" || typeof collapseWhitespace !== "undefined") {
|
|
427
|
+
throw new Error('trim and collapseWhitespace are not supported with a normalizer. If you want to use the default trim and collapseWhitespace logic in your normalizer, use "getDefaultNormalizer({trim, collapseWhitespace})" and compose that into your normalizer');
|
|
428
|
+
}
|
|
429
|
+
return normalizer;
|
|
430
|
+
}
|
|
431
|
+
function matchRegExp(matcher, text) {
|
|
432
|
+
const match = matcher.test(text);
|
|
433
|
+
if (matcher.global && matcher.lastIndex !== 0) {
|
|
434
|
+
console.warn("To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp.");
|
|
435
|
+
matcher.lastIndex = 0;
|
|
436
|
+
}
|
|
437
|
+
return match;
|
|
438
|
+
}
|
|
439
|
+
function getNodeText(node) {
|
|
440
|
+
if (node.matches("input[type=submit], input[type=button], input[type=reset]")) {
|
|
441
|
+
return node.value;
|
|
442
|
+
}
|
|
443
|
+
return Array.from(node.childNodes).filter((child) => child.nodeType === TEXT_NODE && Boolean(child.textContent)).map((c) => c.textContent).join("");
|
|
444
|
+
}
|
|
445
|
+
const elementRoleList = buildElementRoleList(elementRoles_1);
|
|
446
|
+
function isSubtreeInaccessible(element) {
|
|
447
|
+
if (element.hidden === true) {
|
|
448
|
+
return true;
|
|
449
|
+
}
|
|
450
|
+
if (element.getAttribute("aria-hidden") === "true") {
|
|
451
|
+
return true;
|
|
452
|
+
}
|
|
453
|
+
const window2 = element.ownerDocument.defaultView;
|
|
454
|
+
if (window2.getComputedStyle(element).display === "none") {
|
|
455
|
+
return true;
|
|
456
|
+
}
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
function isInaccessible(element, options) {
|
|
460
|
+
if (options === void 0) {
|
|
461
|
+
options = {};
|
|
462
|
+
}
|
|
463
|
+
const {
|
|
464
|
+
isSubtreeInaccessible: isSubtreeInaccessibleImpl = isSubtreeInaccessible
|
|
465
|
+
} = options;
|
|
466
|
+
const window2 = element.ownerDocument.defaultView;
|
|
467
|
+
if (window2.getComputedStyle(element).visibility === "hidden") {
|
|
468
|
+
return true;
|
|
469
|
+
}
|
|
470
|
+
let currentElement = element;
|
|
471
|
+
while (currentElement) {
|
|
472
|
+
if (isSubtreeInaccessibleImpl(currentElement)) {
|
|
473
|
+
return true;
|
|
474
|
+
}
|
|
475
|
+
currentElement = currentElement.parentElement;
|
|
476
|
+
}
|
|
477
|
+
return false;
|
|
478
|
+
}
|
|
479
|
+
function getImplicitAriaRoles(currentNode) {
|
|
480
|
+
for (const {
|
|
481
|
+
match,
|
|
482
|
+
roles
|
|
483
|
+
} of elementRoleList) {
|
|
484
|
+
if (match(currentNode)) {
|
|
485
|
+
return [...roles];
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
return [];
|
|
489
|
+
}
|
|
490
|
+
function buildElementRoleList(elementRolesMap) {
|
|
491
|
+
function makeElementSelector(_ref) {
|
|
492
|
+
let {
|
|
493
|
+
name,
|
|
494
|
+
attributes
|
|
495
|
+
} = _ref;
|
|
496
|
+
return "" + name + attributes.map((_ref2) => {
|
|
497
|
+
let {
|
|
498
|
+
name: attributeName,
|
|
499
|
+
value,
|
|
500
|
+
constraints = []
|
|
501
|
+
} = _ref2;
|
|
502
|
+
const shouldNotExist = constraints.indexOf("undefined") !== -1;
|
|
503
|
+
const shouldBeNonEmpty = constraints.indexOf("set") !== -1;
|
|
504
|
+
const hasExplicitValue = typeof value !== "undefined";
|
|
505
|
+
if (hasExplicitValue) {
|
|
506
|
+
return "[" + attributeName + '="' + value + '"]';
|
|
507
|
+
} else if (shouldNotExist) {
|
|
508
|
+
return ":not([" + attributeName + "])";
|
|
509
|
+
} else if (shouldBeNonEmpty) {
|
|
510
|
+
return "[" + attributeName + "]:not([" + attributeName + '=""])';
|
|
511
|
+
}
|
|
512
|
+
return "[" + attributeName + "]";
|
|
513
|
+
}).join("");
|
|
514
|
+
}
|
|
515
|
+
function getSelectorSpecificity(_ref3) {
|
|
516
|
+
let {
|
|
517
|
+
attributes = []
|
|
518
|
+
} = _ref3;
|
|
519
|
+
return attributes.length;
|
|
520
|
+
}
|
|
521
|
+
function bySelectorSpecificity(_ref4, _ref5) {
|
|
522
|
+
let {
|
|
523
|
+
specificity: leftSpecificity
|
|
524
|
+
} = _ref4;
|
|
525
|
+
let {
|
|
526
|
+
specificity: rightSpecificity
|
|
527
|
+
} = _ref5;
|
|
528
|
+
return rightSpecificity - leftSpecificity;
|
|
529
|
+
}
|
|
530
|
+
function match(element) {
|
|
531
|
+
let {
|
|
532
|
+
attributes = []
|
|
533
|
+
} = element;
|
|
534
|
+
const typeTextIndex = attributes.findIndex((attribute) => attribute.value && attribute.name === "type" && attribute.value === "text");
|
|
535
|
+
if (typeTextIndex >= 0) {
|
|
536
|
+
attributes = [...attributes.slice(0, typeTextIndex), ...attributes.slice(typeTextIndex + 1)];
|
|
537
|
+
}
|
|
538
|
+
const selector = makeElementSelector({
|
|
539
|
+
...element,
|
|
540
|
+
attributes
|
|
541
|
+
});
|
|
542
|
+
return (node) => {
|
|
543
|
+
if (typeTextIndex >= 0 && node.type !== "text") {
|
|
544
|
+
return false;
|
|
545
|
+
}
|
|
546
|
+
return node.matches(selector);
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
let result = [];
|
|
550
|
+
for (const [element, roles] of elementRolesMap.entries()) {
|
|
551
|
+
result = [...result, {
|
|
552
|
+
match: match(element),
|
|
553
|
+
roles: Array.from(roles),
|
|
554
|
+
specificity: getSelectorSpecificity(element)
|
|
555
|
+
}];
|
|
556
|
+
}
|
|
557
|
+
return result.sort(bySelectorSpecificity);
|
|
558
|
+
}
|
|
559
|
+
function getRoles(container, _temp) {
|
|
560
|
+
let {
|
|
561
|
+
hidden = false
|
|
562
|
+
} = _temp === void 0 ? {} : _temp;
|
|
563
|
+
function flattenDOM(node) {
|
|
564
|
+
return [node, ...Array.from(node.children).reduce((acc, child) => [...acc, ...flattenDOM(child)], [])];
|
|
565
|
+
}
|
|
566
|
+
return flattenDOM(container).filter((element) => {
|
|
567
|
+
return hidden === false ? isInaccessible(element) === false : true;
|
|
568
|
+
}).reduce((acc, node) => {
|
|
569
|
+
let roles = [];
|
|
570
|
+
if (node.hasAttribute("role")) {
|
|
571
|
+
roles = node.getAttribute("role").split(" ").slice(0, 1);
|
|
572
|
+
} else {
|
|
573
|
+
roles = getImplicitAriaRoles(node);
|
|
574
|
+
}
|
|
575
|
+
return roles.reduce((rolesAcc, role) => Array.isArray(rolesAcc[role]) ? {
|
|
576
|
+
...rolesAcc,
|
|
577
|
+
[role]: [...rolesAcc[role], node]
|
|
578
|
+
} : {
|
|
579
|
+
...rolesAcc,
|
|
580
|
+
[role]: [node]
|
|
581
|
+
}, acc);
|
|
582
|
+
}, {});
|
|
583
|
+
}
|
|
584
|
+
function prettyRoles(dom, _ref6) {
|
|
585
|
+
let {
|
|
586
|
+
hidden,
|
|
587
|
+
includeDescription
|
|
588
|
+
} = _ref6;
|
|
589
|
+
const roles = getRoles(dom, {
|
|
590
|
+
hidden
|
|
591
|
+
});
|
|
592
|
+
return Object.entries(roles).filter((_ref7) => {
|
|
593
|
+
let [role] = _ref7;
|
|
594
|
+
return role !== "generic";
|
|
595
|
+
}).map((_ref8) => {
|
|
596
|
+
let [role, elements] = _ref8;
|
|
597
|
+
const delimiterBar = "-".repeat(50);
|
|
598
|
+
const elementsString = elements.map((el) => {
|
|
599
|
+
const nameString = 'Name "' + computeAccessibleName(el, {
|
|
600
|
+
computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
|
|
601
|
+
}) + '":\n';
|
|
602
|
+
const domString = prettyDOM(el.cloneNode(false));
|
|
603
|
+
if (includeDescription) {
|
|
604
|
+
const descriptionString = 'Description "' + computeAccessibleDescription(el, {
|
|
605
|
+
computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
|
|
606
|
+
}) + '":\n';
|
|
607
|
+
return "" + nameString + descriptionString + domString;
|
|
608
|
+
}
|
|
609
|
+
return "" + nameString + domString;
|
|
610
|
+
}).join("\n\n");
|
|
611
|
+
return role + ":\n\n" + elementsString + "\n\n" + delimiterBar;
|
|
612
|
+
}).join("\n");
|
|
613
|
+
}
|
|
614
|
+
const logRoles = function(dom, _temp2) {
|
|
615
|
+
let {
|
|
616
|
+
hidden = false
|
|
617
|
+
} = _temp2 === void 0 ? {} : _temp2;
|
|
618
|
+
return console.log(prettyRoles(dom, {
|
|
619
|
+
hidden
|
|
620
|
+
}));
|
|
621
|
+
};
|
|
622
|
+
function computeAriaSelected(element) {
|
|
623
|
+
if (element.tagName === "OPTION") {
|
|
624
|
+
return element.selected;
|
|
625
|
+
}
|
|
626
|
+
return checkBooleanAttribute(element, "aria-selected");
|
|
627
|
+
}
|
|
628
|
+
function computeAriaBusy(element) {
|
|
629
|
+
return element.getAttribute("aria-busy") === "true";
|
|
630
|
+
}
|
|
631
|
+
function computeAriaChecked(element) {
|
|
632
|
+
if ("indeterminate" in element && element.indeterminate) {
|
|
633
|
+
return void 0;
|
|
634
|
+
}
|
|
635
|
+
if ("checked" in element) {
|
|
636
|
+
return element.checked;
|
|
637
|
+
}
|
|
638
|
+
return checkBooleanAttribute(element, "aria-checked");
|
|
639
|
+
}
|
|
640
|
+
function computeAriaPressed(element) {
|
|
641
|
+
return checkBooleanAttribute(element, "aria-pressed");
|
|
642
|
+
}
|
|
643
|
+
function computeAriaCurrent(element) {
|
|
644
|
+
var _ref9, _checkBooleanAttribut;
|
|
645
|
+
return (_ref9 = (_checkBooleanAttribut = checkBooleanAttribute(element, "aria-current")) != null ? _checkBooleanAttribut : element.getAttribute("aria-current")) != null ? _ref9 : false;
|
|
646
|
+
}
|
|
647
|
+
function computeAriaExpanded(element) {
|
|
648
|
+
return checkBooleanAttribute(element, "aria-expanded");
|
|
649
|
+
}
|
|
650
|
+
function checkBooleanAttribute(element, attribute) {
|
|
651
|
+
const attributeValue = element.getAttribute(attribute);
|
|
652
|
+
if (attributeValue === "true") {
|
|
653
|
+
return true;
|
|
654
|
+
}
|
|
655
|
+
if (attributeValue === "false") {
|
|
656
|
+
return false;
|
|
657
|
+
}
|
|
658
|
+
return void 0;
|
|
659
|
+
}
|
|
660
|
+
function computeHeadingLevel(element) {
|
|
661
|
+
const implicitHeadingLevels = {
|
|
662
|
+
H1: 1,
|
|
663
|
+
H2: 2,
|
|
664
|
+
H3: 3,
|
|
665
|
+
H4: 4,
|
|
666
|
+
H5: 5,
|
|
667
|
+
H6: 6
|
|
668
|
+
};
|
|
669
|
+
const ariaLevelAttribute = element.getAttribute("aria-level") && Number(element.getAttribute("aria-level"));
|
|
670
|
+
return ariaLevelAttribute || implicitHeadingLevels[element.tagName];
|
|
671
|
+
}
|
|
672
|
+
function computeAriaValueNow(element) {
|
|
673
|
+
const valueNow = element.getAttribute("aria-valuenow");
|
|
674
|
+
return valueNow === null ? void 0 : +valueNow;
|
|
675
|
+
}
|
|
676
|
+
function computeAriaValueMax(element) {
|
|
677
|
+
const valueMax = element.getAttribute("aria-valuemax");
|
|
678
|
+
return valueMax === null ? void 0 : +valueMax;
|
|
679
|
+
}
|
|
680
|
+
function computeAriaValueMin(element) {
|
|
681
|
+
const valueMin = element.getAttribute("aria-valuemin");
|
|
682
|
+
return valueMin === null ? void 0 : +valueMin;
|
|
683
|
+
}
|
|
684
|
+
function computeAriaValueText(element) {
|
|
685
|
+
const valueText = element.getAttribute("aria-valuetext");
|
|
686
|
+
return valueText === null ? void 0 : valueText;
|
|
687
|
+
}
|
|
688
|
+
const normalize = getDefaultNormalizer();
|
|
689
|
+
function escapeRegExp(string) {
|
|
690
|
+
return string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&");
|
|
691
|
+
}
|
|
692
|
+
function getRegExpMatcher(string) {
|
|
693
|
+
return new RegExp(escapeRegExp(string.toLowerCase()), "i");
|
|
694
|
+
}
|
|
695
|
+
function makeSuggestion(queryName, element, content, _ref) {
|
|
696
|
+
let {
|
|
697
|
+
variant,
|
|
698
|
+
name
|
|
699
|
+
} = _ref;
|
|
700
|
+
let warning = "";
|
|
701
|
+
const queryOptions = {};
|
|
702
|
+
const queryArgs = [["Role", "TestId"].includes(queryName) ? content : getRegExpMatcher(content)];
|
|
703
|
+
if (name) {
|
|
704
|
+
queryOptions.name = getRegExpMatcher(name);
|
|
705
|
+
}
|
|
706
|
+
if (queryName === "Role" && isInaccessible(element)) {
|
|
707
|
+
queryOptions.hidden = true;
|
|
708
|
+
warning = "Element is inaccessible. This means that the element and all its children are invisible to screen readers.\n If you are using the aria-hidden prop, make sure this is the right choice for your case.\n ";
|
|
709
|
+
}
|
|
710
|
+
if (Object.keys(queryOptions).length > 0) {
|
|
711
|
+
queryArgs.push(queryOptions);
|
|
712
|
+
}
|
|
713
|
+
const queryMethod = variant + "By" + queryName;
|
|
714
|
+
return {
|
|
715
|
+
queryName,
|
|
716
|
+
queryMethod,
|
|
717
|
+
queryArgs,
|
|
718
|
+
variant,
|
|
719
|
+
warning,
|
|
720
|
+
toString() {
|
|
721
|
+
if (warning) {
|
|
722
|
+
console.warn(warning);
|
|
723
|
+
}
|
|
724
|
+
let [text, options] = queryArgs;
|
|
725
|
+
text = typeof text === "string" ? "'" + text + "'" : text;
|
|
726
|
+
options = options ? ", { " + Object.entries(options).map((_ref2) => {
|
|
727
|
+
let [k, v] = _ref2;
|
|
728
|
+
return k + ": " + v;
|
|
729
|
+
}).join(", ") + " }" : "";
|
|
730
|
+
return queryMethod + "(" + text + options + ")";
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
function canSuggest(currentMethod, requestedMethod, data) {
|
|
735
|
+
return data && (!requestedMethod || requestedMethod.toLowerCase() === currentMethod.toLowerCase());
|
|
736
|
+
}
|
|
737
|
+
function getSuggestedQuery(element, variant, method) {
|
|
738
|
+
var _element$getAttribute, _getImplicitAriaRoles;
|
|
739
|
+
if (variant === void 0) {
|
|
740
|
+
variant = "get";
|
|
741
|
+
}
|
|
742
|
+
if (element.matches(getConfig().defaultIgnore)) {
|
|
743
|
+
return void 0;
|
|
744
|
+
}
|
|
745
|
+
const role = (_element$getAttribute = element.getAttribute("role")) != null ? _element$getAttribute : (_getImplicitAriaRoles = getImplicitAriaRoles(element)) == null ? void 0 : _getImplicitAriaRoles[0];
|
|
746
|
+
if (role !== "generic" && canSuggest("Role", method, role)) {
|
|
747
|
+
return makeSuggestion("Role", element, role, {
|
|
748
|
+
variant,
|
|
749
|
+
name: computeAccessibleName(element, {
|
|
750
|
+
computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
|
|
751
|
+
})
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
const labelText = getLabels(document, element).map((label) => label.content).join(" ");
|
|
755
|
+
if (canSuggest("LabelText", method, labelText)) {
|
|
756
|
+
return makeSuggestion("LabelText", element, labelText, {
|
|
757
|
+
variant
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
const placeholderText = element.getAttribute("placeholder");
|
|
761
|
+
if (canSuggest("PlaceholderText", method, placeholderText)) {
|
|
762
|
+
return makeSuggestion("PlaceholderText", element, placeholderText, {
|
|
763
|
+
variant
|
|
764
|
+
});
|
|
765
|
+
}
|
|
766
|
+
const textContent = normalize(getNodeText(element));
|
|
767
|
+
if (canSuggest("Text", method, textContent)) {
|
|
768
|
+
return makeSuggestion("Text", element, textContent, {
|
|
769
|
+
variant
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
if (canSuggest("DisplayValue", method, element.value)) {
|
|
773
|
+
return makeSuggestion("DisplayValue", element, normalize(element.value), {
|
|
774
|
+
variant
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
const alt = element.getAttribute("alt");
|
|
778
|
+
if (canSuggest("AltText", method, alt)) {
|
|
779
|
+
return makeSuggestion("AltText", element, alt, {
|
|
780
|
+
variant
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
const title = element.getAttribute("title");
|
|
784
|
+
if (canSuggest("Title", method, title)) {
|
|
785
|
+
return makeSuggestion("Title", element, title, {
|
|
786
|
+
variant
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
const testId = element.getAttribute(getConfig().testIdAttribute);
|
|
790
|
+
if (canSuggest("TestId", method, testId)) {
|
|
791
|
+
return makeSuggestion("TestId", element, testId, {
|
|
792
|
+
variant
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
return void 0;
|
|
796
|
+
}
|
|
797
|
+
function copyStackTrace(target, source) {
|
|
798
|
+
target.stack = source.stack.replace(source.message, target.message);
|
|
799
|
+
}
|
|
800
|
+
function waitFor(callback, _ref) {
|
|
801
|
+
let {
|
|
802
|
+
container = getDocument(),
|
|
803
|
+
timeout = getConfig().asyncUtilTimeout,
|
|
804
|
+
showOriginalStackTrace = getConfig().showOriginalStackTrace,
|
|
805
|
+
stackTraceError,
|
|
806
|
+
interval = 50,
|
|
807
|
+
onTimeout = (error) => {
|
|
808
|
+
Object.defineProperty(error, "message", {
|
|
809
|
+
value: getConfig().getElementError(error.message, container).message
|
|
810
|
+
});
|
|
811
|
+
return error;
|
|
812
|
+
},
|
|
813
|
+
mutationObserverOptions = {
|
|
814
|
+
subtree: true,
|
|
815
|
+
childList: true,
|
|
816
|
+
attributes: true,
|
|
817
|
+
characterData: true
|
|
818
|
+
}
|
|
819
|
+
} = _ref;
|
|
820
|
+
if (typeof callback !== "function") {
|
|
821
|
+
throw new TypeError("Received `callback` arg must be a function");
|
|
822
|
+
}
|
|
823
|
+
return new Promise(async (resolve, reject) => {
|
|
824
|
+
let lastError, intervalId, observer;
|
|
825
|
+
let finished = false;
|
|
826
|
+
let promiseStatus = "idle";
|
|
827
|
+
const overallTimeoutTimer = setTimeout(handleTimeout, timeout);
|
|
828
|
+
const usingJestFakeTimers = jestFakeTimersAreEnabled();
|
|
829
|
+
if (usingJestFakeTimers) {
|
|
830
|
+
const {
|
|
831
|
+
unstable_advanceTimersWrapper: advanceTimersWrapper
|
|
832
|
+
} = getConfig();
|
|
833
|
+
checkCallback();
|
|
834
|
+
while (!finished) {
|
|
835
|
+
if (!jestFakeTimersAreEnabled()) {
|
|
836
|
+
const error = new Error("Changed from using fake timers to real timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to real timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");
|
|
837
|
+
if (!showOriginalStackTrace) copyStackTrace(error, stackTraceError);
|
|
838
|
+
reject(error);
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
await advanceTimersWrapper(async () => {
|
|
842
|
+
jest.advanceTimersByTime(interval);
|
|
843
|
+
});
|
|
844
|
+
if (finished) {
|
|
845
|
+
break;
|
|
846
|
+
}
|
|
847
|
+
checkCallback();
|
|
848
|
+
}
|
|
849
|
+
} else {
|
|
850
|
+
try {
|
|
851
|
+
checkContainerType(container);
|
|
852
|
+
} catch (e) {
|
|
853
|
+
reject(e);
|
|
854
|
+
return;
|
|
855
|
+
}
|
|
856
|
+
intervalId = setInterval(checkRealTimersCallback, interval);
|
|
857
|
+
const {
|
|
858
|
+
MutationObserver
|
|
859
|
+
} = getWindowFromNode(container);
|
|
860
|
+
observer = new MutationObserver(checkRealTimersCallback);
|
|
861
|
+
observer.observe(container, mutationObserverOptions);
|
|
862
|
+
checkCallback();
|
|
863
|
+
}
|
|
864
|
+
function onDone(error, result) {
|
|
865
|
+
finished = true;
|
|
866
|
+
clearTimeout(overallTimeoutTimer);
|
|
867
|
+
if (!usingJestFakeTimers) {
|
|
868
|
+
clearInterval(intervalId);
|
|
869
|
+
observer.disconnect();
|
|
870
|
+
}
|
|
871
|
+
if (error) {
|
|
872
|
+
reject(error);
|
|
873
|
+
} else {
|
|
874
|
+
resolve(result);
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
function checkRealTimersCallback() {
|
|
878
|
+
if (jestFakeTimersAreEnabled()) {
|
|
879
|
+
const error = new Error("Changed from using real timers to fake timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to fake timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830");
|
|
880
|
+
if (!showOriginalStackTrace) copyStackTrace(error, stackTraceError);
|
|
881
|
+
return reject(error);
|
|
882
|
+
} else {
|
|
883
|
+
return checkCallback();
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
function checkCallback() {
|
|
887
|
+
if (promiseStatus === "pending") return;
|
|
888
|
+
try {
|
|
889
|
+
const result = runWithExpensiveErrorDiagnosticsDisabled(callback);
|
|
890
|
+
if (typeof (result == null ? void 0 : result.then) === "function") {
|
|
891
|
+
promiseStatus = "pending";
|
|
892
|
+
result.then((resolvedValue) => {
|
|
893
|
+
promiseStatus = "resolved";
|
|
894
|
+
onDone(null, resolvedValue);
|
|
895
|
+
}, (rejectedValue) => {
|
|
896
|
+
promiseStatus = "rejected";
|
|
897
|
+
lastError = rejectedValue;
|
|
898
|
+
});
|
|
899
|
+
} else {
|
|
900
|
+
onDone(null, result);
|
|
901
|
+
}
|
|
902
|
+
} catch (error) {
|
|
903
|
+
lastError = error;
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
function handleTimeout() {
|
|
907
|
+
let error;
|
|
908
|
+
if (lastError) {
|
|
909
|
+
error = lastError;
|
|
910
|
+
if (!showOriginalStackTrace && error.name === "TestingLibraryElementError") {
|
|
911
|
+
copyStackTrace(error, stackTraceError);
|
|
912
|
+
}
|
|
913
|
+
} else {
|
|
914
|
+
error = new Error("Timed out in waitFor.");
|
|
915
|
+
if (!showOriginalStackTrace) {
|
|
916
|
+
copyStackTrace(error, stackTraceError);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
onDone(onTimeout(error), null);
|
|
920
|
+
}
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
function waitForWrapper(callback, options) {
|
|
924
|
+
const stackTraceError = new Error("STACK_TRACE_MESSAGE");
|
|
925
|
+
return getConfig().asyncWrapper(() => waitFor(callback, {
|
|
926
|
+
stackTraceError,
|
|
927
|
+
...options
|
|
928
|
+
}));
|
|
929
|
+
}
|
|
930
|
+
function getElementError(message, container) {
|
|
931
|
+
return getConfig().getElementError(message, container);
|
|
932
|
+
}
|
|
933
|
+
function getMultipleElementsFoundError(message, container) {
|
|
934
|
+
return getElementError(message + "\n\n(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).", container);
|
|
935
|
+
}
|
|
936
|
+
function queryAllByAttribute(attribute, container, text, _temp) {
|
|
937
|
+
let {
|
|
938
|
+
exact = true,
|
|
939
|
+
collapseWhitespace,
|
|
940
|
+
trim,
|
|
941
|
+
normalizer
|
|
942
|
+
} = _temp === void 0 ? {} : _temp;
|
|
943
|
+
const matcher = exact ? matches : fuzzyMatches;
|
|
944
|
+
const matchNormalizer = makeNormalizer({
|
|
945
|
+
collapseWhitespace,
|
|
946
|
+
trim,
|
|
947
|
+
normalizer
|
|
948
|
+
});
|
|
949
|
+
return Array.from(container.querySelectorAll("[" + attribute + "]")).filter((node) => matcher(node.getAttribute(attribute), node, text, matchNormalizer));
|
|
950
|
+
}
|
|
951
|
+
function queryByAttribute(attribute, container, text, options) {
|
|
952
|
+
const els = queryAllByAttribute(attribute, container, text, options);
|
|
953
|
+
if (els.length > 1) {
|
|
954
|
+
throw getMultipleElementsFoundError("Found multiple elements by [" + attribute + "=" + text + "]", container);
|
|
955
|
+
}
|
|
956
|
+
return els[0] || null;
|
|
957
|
+
}
|
|
958
|
+
function makeSingleQuery(allQuery, getMultipleError2) {
|
|
959
|
+
return function(container) {
|
|
960
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
961
|
+
args[_key - 1] = arguments[_key];
|
|
962
|
+
}
|
|
963
|
+
const els = allQuery(container, ...args);
|
|
964
|
+
if (els.length > 1) {
|
|
965
|
+
const elementStrings = els.map((element) => getElementError(null, element).message).join("\n\n");
|
|
966
|
+
throw getMultipleElementsFoundError(getMultipleError2(container, ...args) + "\n\nHere are the matching elements:\n\n" + elementStrings, container);
|
|
967
|
+
}
|
|
968
|
+
return els[0] || null;
|
|
969
|
+
};
|
|
970
|
+
}
|
|
971
|
+
function getSuggestionError(suggestion, container) {
|
|
972
|
+
return getConfig().getElementError("A better query is available, try this:\n" + suggestion.toString() + "\n", container);
|
|
973
|
+
}
|
|
974
|
+
function makeGetAllQuery(allQuery, getMissingError2) {
|
|
975
|
+
return function(container) {
|
|
976
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
977
|
+
args[_key2 - 1] = arguments[_key2];
|
|
978
|
+
}
|
|
979
|
+
const els = allQuery(container, ...args);
|
|
980
|
+
if (!els.length) {
|
|
981
|
+
throw getConfig().getElementError(getMissingError2(container, ...args), container);
|
|
982
|
+
}
|
|
983
|
+
return els;
|
|
984
|
+
};
|
|
985
|
+
}
|
|
986
|
+
function makeFindQuery(getter) {
|
|
987
|
+
return (container, text, options, waitForOptions) => {
|
|
988
|
+
return waitForWrapper(() => {
|
|
989
|
+
return getter(container, text, options);
|
|
990
|
+
}, {
|
|
991
|
+
container,
|
|
992
|
+
...waitForOptions
|
|
993
|
+
});
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
const wrapSingleQueryWithSuggestion = (query, queryAllByName, variant) => function(container) {
|
|
997
|
+
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
998
|
+
args[_key3 - 1] = arguments[_key3];
|
|
999
|
+
}
|
|
1000
|
+
const element = query(container, ...args);
|
|
1001
|
+
const [{
|
|
1002
|
+
suggest = getConfig().throwSuggestions
|
|
1003
|
+
} = {}] = args.slice(-1);
|
|
1004
|
+
if (element && suggest) {
|
|
1005
|
+
const suggestion = getSuggestedQuery(element, variant);
|
|
1006
|
+
if (suggestion && !queryAllByName.endsWith(suggestion.queryName)) {
|
|
1007
|
+
throw getSuggestionError(suggestion.toString(), container);
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
return element;
|
|
1011
|
+
};
|
|
1012
|
+
const wrapAllByQueryWithSuggestion = (query, queryAllByName, variant) => function(container) {
|
|
1013
|
+
for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
|
1014
|
+
args[_key4 - 1] = arguments[_key4];
|
|
1015
|
+
}
|
|
1016
|
+
const els = query(container, ...args);
|
|
1017
|
+
const [{
|
|
1018
|
+
suggest = getConfig().throwSuggestions
|
|
1019
|
+
} = {}] = args.slice(-1);
|
|
1020
|
+
if (els.length && suggest) {
|
|
1021
|
+
const uniqueSuggestionMessages = [...new Set(els.map((element) => {
|
|
1022
|
+
var _getSuggestedQuery;
|
|
1023
|
+
return (_getSuggestedQuery = getSuggestedQuery(element, variant)) == null ? void 0 : _getSuggestedQuery.toString();
|
|
1024
|
+
}))];
|
|
1025
|
+
if (
|
|
1026
|
+
// only want to suggest if all the els have the same suggestion.
|
|
1027
|
+
uniqueSuggestionMessages.length === 1 && !queryAllByName.endsWith(
|
|
1028
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO: Can this be null at runtime?
|
|
1029
|
+
getSuggestedQuery(els[0], variant).queryName
|
|
1030
|
+
)
|
|
1031
|
+
) {
|
|
1032
|
+
throw getSuggestionError(uniqueSuggestionMessages[0], container);
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
return els;
|
|
1036
|
+
};
|
|
1037
|
+
function buildQueries(queryAllBy, getMultipleError2, getMissingError2) {
|
|
1038
|
+
const queryBy = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllBy, getMultipleError2), queryAllBy.name, "query");
|
|
1039
|
+
const getAllBy = makeGetAllQuery(queryAllBy, getMissingError2);
|
|
1040
|
+
const getBy = makeSingleQuery(getAllBy, getMultipleError2);
|
|
1041
|
+
const getByWithSuggestions = wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, "get");
|
|
1042
|
+
const getAllWithSuggestions = wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name.replace("query", "get"), "getAll");
|
|
1043
|
+
const findAllBy = makeFindQuery(wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name, "findAll"));
|
|
1044
|
+
const findBy = makeFindQuery(wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, "find"));
|
|
1045
|
+
return [queryBy, getAllWithSuggestions, getByWithSuggestions, findAllBy, findBy];
|
|
1046
|
+
}
|
|
1047
|
+
var queryHelpers = /* @__PURE__ */ Object.freeze({
|
|
1048
|
+
__proto__: null,
|
|
1049
|
+
getElementError,
|
|
1050
|
+
wrapAllByQueryWithSuggestion,
|
|
1051
|
+
wrapSingleQueryWithSuggestion,
|
|
1052
|
+
getMultipleElementsFoundError,
|
|
1053
|
+
queryAllByAttribute,
|
|
1054
|
+
queryByAttribute,
|
|
1055
|
+
makeSingleQuery,
|
|
1056
|
+
makeGetAllQuery,
|
|
1057
|
+
makeFindQuery,
|
|
1058
|
+
buildQueries
|
|
1059
|
+
});
|
|
1060
|
+
function queryAllLabels(container) {
|
|
1061
|
+
return Array.from(container.querySelectorAll("label,input")).map((node) => {
|
|
1062
|
+
return {
|
|
1063
|
+
node,
|
|
1064
|
+
textToMatch: getLabelContent(node)
|
|
1065
|
+
};
|
|
1066
|
+
}).filter((_ref) => {
|
|
1067
|
+
let {
|
|
1068
|
+
textToMatch
|
|
1069
|
+
} = _ref;
|
|
1070
|
+
return textToMatch !== null;
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
const queryAllLabelsByText = function(container, text, _temp) {
|
|
1074
|
+
let {
|
|
1075
|
+
exact = true,
|
|
1076
|
+
trim,
|
|
1077
|
+
collapseWhitespace,
|
|
1078
|
+
normalizer
|
|
1079
|
+
} = _temp === void 0 ? {} : _temp;
|
|
1080
|
+
const matcher = exact ? matches : fuzzyMatches;
|
|
1081
|
+
const matchNormalizer = makeNormalizer({
|
|
1082
|
+
collapseWhitespace,
|
|
1083
|
+
trim,
|
|
1084
|
+
normalizer
|
|
1085
|
+
});
|
|
1086
|
+
const textToMatchByLabels = queryAllLabels(container);
|
|
1087
|
+
return textToMatchByLabels.filter((_ref2) => {
|
|
1088
|
+
let {
|
|
1089
|
+
node,
|
|
1090
|
+
textToMatch
|
|
1091
|
+
} = _ref2;
|
|
1092
|
+
return matcher(textToMatch, node, text, matchNormalizer);
|
|
1093
|
+
}).map((_ref3) => {
|
|
1094
|
+
let {
|
|
1095
|
+
node
|
|
1096
|
+
} = _ref3;
|
|
1097
|
+
return node;
|
|
1098
|
+
});
|
|
1099
|
+
};
|
|
1100
|
+
const queryAllByLabelText = function(container, text, _temp2) {
|
|
1101
|
+
let {
|
|
1102
|
+
selector = "*",
|
|
1103
|
+
exact = true,
|
|
1104
|
+
collapseWhitespace,
|
|
1105
|
+
trim,
|
|
1106
|
+
normalizer
|
|
1107
|
+
} = _temp2 === void 0 ? {} : _temp2;
|
|
1108
|
+
checkContainerType(container);
|
|
1109
|
+
const matcher = exact ? matches : fuzzyMatches;
|
|
1110
|
+
const matchNormalizer = makeNormalizer({
|
|
1111
|
+
collapseWhitespace,
|
|
1112
|
+
trim,
|
|
1113
|
+
normalizer
|
|
1114
|
+
});
|
|
1115
|
+
const matchingLabelledElements = Array.from(container.querySelectorAll("*")).filter((element) => {
|
|
1116
|
+
return getRealLabels(element).length || element.hasAttribute("aria-labelledby");
|
|
1117
|
+
}).reduce((labelledElements, labelledElement) => {
|
|
1118
|
+
const labelList = getLabels(container, labelledElement, {
|
|
1119
|
+
selector
|
|
1120
|
+
});
|
|
1121
|
+
labelList.filter((label) => Boolean(label.formControl)).forEach((label) => {
|
|
1122
|
+
if (matcher(label.content, label.formControl, text, matchNormalizer) && label.formControl) {
|
|
1123
|
+
labelledElements.push(label.formControl);
|
|
1124
|
+
}
|
|
1125
|
+
});
|
|
1126
|
+
const labelsValue = labelList.filter((label) => Boolean(label.content)).map((label) => label.content);
|
|
1127
|
+
if (matcher(labelsValue.join(" "), labelledElement, text, matchNormalizer)) {
|
|
1128
|
+
labelledElements.push(labelledElement);
|
|
1129
|
+
}
|
|
1130
|
+
if (labelsValue.length > 1) {
|
|
1131
|
+
labelsValue.forEach((labelValue, index2) => {
|
|
1132
|
+
if (matcher(labelValue, labelledElement, text, matchNormalizer)) {
|
|
1133
|
+
labelledElements.push(labelledElement);
|
|
1134
|
+
}
|
|
1135
|
+
const labelsFiltered = [...labelsValue];
|
|
1136
|
+
labelsFiltered.splice(index2, 1);
|
|
1137
|
+
if (labelsFiltered.length > 1) {
|
|
1138
|
+
if (matcher(labelsFiltered.join(" "), labelledElement, text, matchNormalizer)) {
|
|
1139
|
+
labelledElements.push(labelledElement);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
return labelledElements;
|
|
1145
|
+
}, []).concat(queryAllByAttribute("aria-label", container, text, {
|
|
1146
|
+
exact,
|
|
1147
|
+
normalizer: matchNormalizer
|
|
1148
|
+
}));
|
|
1149
|
+
return Array.from(new Set(matchingLabelledElements)).filter((element) => element.matches(selector));
|
|
1150
|
+
};
|
|
1151
|
+
const getAllByLabelText = function(container, text) {
|
|
1152
|
+
for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
1153
|
+
rest[_key - 2] = arguments[_key];
|
|
1154
|
+
}
|
|
1155
|
+
const els = queryAllByLabelText(container, text, ...rest);
|
|
1156
|
+
if (!els.length) {
|
|
1157
|
+
const labels = queryAllLabelsByText(container, text, ...rest);
|
|
1158
|
+
if (labels.length) {
|
|
1159
|
+
const tagNames = labels.map((label) => getTagNameOfElementAssociatedWithLabelViaFor(container, label)).filter((tagName) => !!tagName);
|
|
1160
|
+
if (tagNames.length) {
|
|
1161
|
+
throw getConfig().getElementError(tagNames.map((tagName) => "Found a label with the text of: " + text + ", however the element associated with this label (<" + tagName + " />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <" + tagName + " />, you can use aria-label or aria-labelledby instead.").join("\n\n"), container);
|
|
1162
|
+
} else {
|
|
1163
|
+
throw getConfig().getElementError("Found a label with the text of: " + text + `, however no form control was found associated to that label. Make sure you're using the "for" attribute or "aria-labelledby" attribute correctly.`, container);
|
|
1164
|
+
}
|
|
1165
|
+
} else {
|
|
1166
|
+
throw getConfig().getElementError("Unable to find a label with the text of: " + text, container);
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
return els;
|
|
1170
|
+
};
|
|
1171
|
+
function getTagNameOfElementAssociatedWithLabelViaFor(container, label) {
|
|
1172
|
+
const htmlFor = label.getAttribute("for");
|
|
1173
|
+
if (!htmlFor) {
|
|
1174
|
+
return null;
|
|
1175
|
+
}
|
|
1176
|
+
const element = container.querySelector('[id="' + htmlFor + '"]');
|
|
1177
|
+
return element ? element.tagName.toLowerCase() : null;
|
|
1178
|
+
}
|
|
1179
|
+
const getMultipleError$7 = (c, text) => "Found multiple elements with the text of: " + text;
|
|
1180
|
+
const queryByLabelText = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllByLabelText, getMultipleError$7), queryAllByLabelText.name, "query");
|
|
1181
|
+
const getByLabelText = makeSingleQuery(getAllByLabelText, getMultipleError$7);
|
|
1182
|
+
const findAllByLabelText = makeFindQuery(wrapAllByQueryWithSuggestion(getAllByLabelText, getAllByLabelText.name, "findAll"));
|
|
1183
|
+
const findByLabelText = makeFindQuery(wrapSingleQueryWithSuggestion(getByLabelText, getAllByLabelText.name, "find"));
|
|
1184
|
+
const getAllByLabelTextWithSuggestions = wrapAllByQueryWithSuggestion(getAllByLabelText, getAllByLabelText.name, "getAll");
|
|
1185
|
+
const getByLabelTextWithSuggestions = wrapSingleQueryWithSuggestion(getByLabelText, getAllByLabelText.name, "get");
|
|
1186
|
+
const queryAllByLabelTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByLabelText, queryAllByLabelText.name, "queryAll");
|
|
1187
|
+
const queryAllByPlaceholderText = function() {
|
|
1188
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1189
|
+
args[_key] = arguments[_key];
|
|
1190
|
+
}
|
|
1191
|
+
checkContainerType(args[0]);
|
|
1192
|
+
return queryAllByAttribute("placeholder", ...args);
|
|
1193
|
+
};
|
|
1194
|
+
const getMultipleError$6 = (c, text) => "Found multiple elements with the placeholder text of: " + text;
|
|
1195
|
+
const getMissingError$6 = (c, text) => "Unable to find an element with the placeholder text of: " + text;
|
|
1196
|
+
const queryAllByPlaceholderTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByPlaceholderText, queryAllByPlaceholderText.name, "queryAll");
|
|
1197
|
+
const [queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText] = buildQueries(queryAllByPlaceholderText, getMultipleError$6, getMissingError$6);
|
|
1198
|
+
const queryAllByText = function(container, text, _temp) {
|
|
1199
|
+
let {
|
|
1200
|
+
selector = "*",
|
|
1201
|
+
exact = true,
|
|
1202
|
+
collapseWhitespace,
|
|
1203
|
+
trim,
|
|
1204
|
+
ignore = getConfig().defaultIgnore,
|
|
1205
|
+
normalizer
|
|
1206
|
+
} = _temp === void 0 ? {} : _temp;
|
|
1207
|
+
checkContainerType(container);
|
|
1208
|
+
const matcher = exact ? matches : fuzzyMatches;
|
|
1209
|
+
const matchNormalizer = makeNormalizer({
|
|
1210
|
+
collapseWhitespace,
|
|
1211
|
+
trim,
|
|
1212
|
+
normalizer
|
|
1213
|
+
});
|
|
1214
|
+
let baseArray = [];
|
|
1215
|
+
if (typeof container.matches === "function" && container.matches(selector)) {
|
|
1216
|
+
baseArray = [container];
|
|
1217
|
+
}
|
|
1218
|
+
return [...baseArray, ...Array.from(container.querySelectorAll(selector))].filter((node) => !ignore || !node.matches(ignore)).filter((node) => matcher(getNodeText(node), node, text, matchNormalizer));
|
|
1219
|
+
};
|
|
1220
|
+
const getMultipleError$5 = (c, text) => "Found multiple elements with the text: " + text;
|
|
1221
|
+
const getMissingError$5 = function(c, text, options) {
|
|
1222
|
+
if (options === void 0) {
|
|
1223
|
+
options = {};
|
|
1224
|
+
}
|
|
1225
|
+
const {
|
|
1226
|
+
collapseWhitespace,
|
|
1227
|
+
trim,
|
|
1228
|
+
normalizer,
|
|
1229
|
+
selector
|
|
1230
|
+
} = options;
|
|
1231
|
+
const matchNormalizer = makeNormalizer({
|
|
1232
|
+
collapseWhitespace,
|
|
1233
|
+
trim,
|
|
1234
|
+
normalizer
|
|
1235
|
+
});
|
|
1236
|
+
const normalizedText = matchNormalizer(text.toString());
|
|
1237
|
+
const isNormalizedDifferent = normalizedText !== text.toString();
|
|
1238
|
+
const isCustomSelector = (selector != null ? selector : "*") !== "*";
|
|
1239
|
+
return "Unable to find an element with the text: " + (isNormalizedDifferent ? normalizedText + " (normalized from '" + text + "')" : text) + (isCustomSelector ? ", which matches selector '" + selector + "'" : "") + ". This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.";
|
|
1240
|
+
};
|
|
1241
|
+
const queryAllByTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByText, queryAllByText.name, "queryAll");
|
|
1242
|
+
const [queryByText, getAllByText, getByText, findAllByText, findByText] = buildQueries(queryAllByText, getMultipleError$5, getMissingError$5);
|
|
1243
|
+
const queryAllByDisplayValue = function(container, value, _temp) {
|
|
1244
|
+
let {
|
|
1245
|
+
exact = true,
|
|
1246
|
+
collapseWhitespace,
|
|
1247
|
+
trim,
|
|
1248
|
+
normalizer
|
|
1249
|
+
} = _temp === void 0 ? {} : _temp;
|
|
1250
|
+
checkContainerType(container);
|
|
1251
|
+
const matcher = exact ? matches : fuzzyMatches;
|
|
1252
|
+
const matchNormalizer = makeNormalizer({
|
|
1253
|
+
collapseWhitespace,
|
|
1254
|
+
trim,
|
|
1255
|
+
normalizer
|
|
1256
|
+
});
|
|
1257
|
+
return Array.from(container.querySelectorAll("input,textarea,select")).filter((node) => {
|
|
1258
|
+
if (node.tagName === "SELECT") {
|
|
1259
|
+
const selectedOptions = Array.from(node.options).filter((option) => option.selected);
|
|
1260
|
+
return selectedOptions.some((optionNode) => matcher(getNodeText(optionNode), optionNode, value, matchNormalizer));
|
|
1261
|
+
} else {
|
|
1262
|
+
return matcher(node.value, node, value, matchNormalizer);
|
|
1263
|
+
}
|
|
1264
|
+
});
|
|
1265
|
+
};
|
|
1266
|
+
const getMultipleError$4 = (c, value) => "Found multiple elements with the display value: " + value + ".";
|
|
1267
|
+
const getMissingError$4 = (c, value) => "Unable to find an element with the display value: " + value + ".";
|
|
1268
|
+
const queryAllByDisplayValueWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByDisplayValue, queryAllByDisplayValue.name, "queryAll");
|
|
1269
|
+
const [queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue] = buildQueries(queryAllByDisplayValue, getMultipleError$4, getMissingError$4);
|
|
1270
|
+
const VALID_TAG_REGEXP = /^(img|input|area|.+-.+)$/i;
|
|
1271
|
+
const queryAllByAltText = function(container, alt, options) {
|
|
1272
|
+
if (options === void 0) {
|
|
1273
|
+
options = {};
|
|
1274
|
+
}
|
|
1275
|
+
checkContainerType(container);
|
|
1276
|
+
return queryAllByAttribute("alt", container, alt, options).filter((node) => VALID_TAG_REGEXP.test(node.tagName));
|
|
1277
|
+
};
|
|
1278
|
+
const getMultipleError$3 = (c, alt) => "Found multiple elements with the alt text: " + alt;
|
|
1279
|
+
const getMissingError$3 = (c, alt) => "Unable to find an element with the alt text: " + alt;
|
|
1280
|
+
const queryAllByAltTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByAltText, queryAllByAltText.name, "queryAll");
|
|
1281
|
+
const [queryByAltText, getAllByAltText, getByAltText, findAllByAltText, findByAltText] = buildQueries(queryAllByAltText, getMultipleError$3, getMissingError$3);
|
|
1282
|
+
const isSvgTitle = (node) => {
|
|
1283
|
+
var _node$parentElement;
|
|
1284
|
+
return node.tagName.toLowerCase() === "title" && ((_node$parentElement = node.parentElement) == null ? void 0 : _node$parentElement.tagName.toLowerCase()) === "svg";
|
|
1285
|
+
};
|
|
1286
|
+
const queryAllByTitle = function(container, text, _temp) {
|
|
1287
|
+
let {
|
|
1288
|
+
exact = true,
|
|
1289
|
+
collapseWhitespace,
|
|
1290
|
+
trim,
|
|
1291
|
+
normalizer
|
|
1292
|
+
} = _temp === void 0 ? {} : _temp;
|
|
1293
|
+
checkContainerType(container);
|
|
1294
|
+
const matcher = exact ? matches : fuzzyMatches;
|
|
1295
|
+
const matchNormalizer = makeNormalizer({
|
|
1296
|
+
collapseWhitespace,
|
|
1297
|
+
trim,
|
|
1298
|
+
normalizer
|
|
1299
|
+
});
|
|
1300
|
+
return Array.from(container.querySelectorAll("[title], svg > title")).filter((node) => matcher(node.getAttribute("title"), node, text, matchNormalizer) || isSvgTitle(node) && matcher(getNodeText(node), node, text, matchNormalizer));
|
|
1301
|
+
};
|
|
1302
|
+
const getMultipleError$2 = (c, title) => "Found multiple elements with the title: " + title + ".";
|
|
1303
|
+
const getMissingError$2 = (c, title) => "Unable to find an element with the title: " + title + ".";
|
|
1304
|
+
const queryAllByTitleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByTitle, queryAllByTitle.name, "queryAll");
|
|
1305
|
+
const [queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle] = buildQueries(queryAllByTitle, getMultipleError$2, getMissingError$2);
|
|
1306
|
+
const queryAllByRole = function(container, role, _temp) {
|
|
1307
|
+
let {
|
|
1308
|
+
hidden = getConfig().defaultHidden,
|
|
1309
|
+
name,
|
|
1310
|
+
description,
|
|
1311
|
+
queryFallbacks = false,
|
|
1312
|
+
selected,
|
|
1313
|
+
busy,
|
|
1314
|
+
checked,
|
|
1315
|
+
pressed,
|
|
1316
|
+
current,
|
|
1317
|
+
level,
|
|
1318
|
+
expanded,
|
|
1319
|
+
value: {
|
|
1320
|
+
now: valueNow,
|
|
1321
|
+
min: valueMin,
|
|
1322
|
+
max: valueMax,
|
|
1323
|
+
text: valueText
|
|
1324
|
+
} = {}
|
|
1325
|
+
} = _temp === void 0 ? {} : _temp;
|
|
1326
|
+
checkContainerType(container);
|
|
1327
|
+
if (selected !== void 0) {
|
|
1328
|
+
var _allRoles$get;
|
|
1329
|
+
if (((_allRoles$get = roles_1.get(role)) == null ? void 0 : _allRoles$get.props["aria-selected"]) === void 0) {
|
|
1330
|
+
throw new Error('"aria-selected" is not supported on role "' + role + '".');
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
if (busy !== void 0) {
|
|
1334
|
+
var _allRoles$get2;
|
|
1335
|
+
if (((_allRoles$get2 = roles_1.get(role)) == null ? void 0 : _allRoles$get2.props["aria-busy"]) === void 0) {
|
|
1336
|
+
throw new Error('"aria-busy" is not supported on role "' + role + '".');
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
if (checked !== void 0) {
|
|
1340
|
+
var _allRoles$get3;
|
|
1341
|
+
if (((_allRoles$get3 = roles_1.get(role)) == null ? void 0 : _allRoles$get3.props["aria-checked"]) === void 0) {
|
|
1342
|
+
throw new Error('"aria-checked" is not supported on role "' + role + '".');
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
if (pressed !== void 0) {
|
|
1346
|
+
var _allRoles$get4;
|
|
1347
|
+
if (((_allRoles$get4 = roles_1.get(role)) == null ? void 0 : _allRoles$get4.props["aria-pressed"]) === void 0) {
|
|
1348
|
+
throw new Error('"aria-pressed" is not supported on role "' + role + '".');
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
if (current !== void 0) {
|
|
1352
|
+
var _allRoles$get5;
|
|
1353
|
+
if (((_allRoles$get5 = roles_1.get(role)) == null ? void 0 : _allRoles$get5.props["aria-current"]) === void 0) {
|
|
1354
|
+
throw new Error('"aria-current" is not supported on role "' + role + '".');
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
if (level !== void 0) {
|
|
1358
|
+
if (role !== "heading") {
|
|
1359
|
+
throw new Error('Role "' + role + '" cannot have "level" property.');
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
if (valueNow !== void 0) {
|
|
1363
|
+
var _allRoles$get6;
|
|
1364
|
+
if (((_allRoles$get6 = roles_1.get(role)) == null ? void 0 : _allRoles$get6.props["aria-valuenow"]) === void 0) {
|
|
1365
|
+
throw new Error('"aria-valuenow" is not supported on role "' + role + '".');
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
if (valueMax !== void 0) {
|
|
1369
|
+
var _allRoles$get7;
|
|
1370
|
+
if (((_allRoles$get7 = roles_1.get(role)) == null ? void 0 : _allRoles$get7.props["aria-valuemax"]) === void 0) {
|
|
1371
|
+
throw new Error('"aria-valuemax" is not supported on role "' + role + '".');
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
if (valueMin !== void 0) {
|
|
1375
|
+
var _allRoles$get8;
|
|
1376
|
+
if (((_allRoles$get8 = roles_1.get(role)) == null ? void 0 : _allRoles$get8.props["aria-valuemin"]) === void 0) {
|
|
1377
|
+
throw new Error('"aria-valuemin" is not supported on role "' + role + '".');
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
if (valueText !== void 0) {
|
|
1381
|
+
var _allRoles$get9;
|
|
1382
|
+
if (((_allRoles$get9 = roles_1.get(role)) == null ? void 0 : _allRoles$get9.props["aria-valuetext"]) === void 0) {
|
|
1383
|
+
throw new Error('"aria-valuetext" is not supported on role "' + role + '".');
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
if (expanded !== void 0) {
|
|
1387
|
+
var _allRoles$get10;
|
|
1388
|
+
if (((_allRoles$get10 = roles_1.get(role)) == null ? void 0 : _allRoles$get10.props["aria-expanded"]) === void 0) {
|
|
1389
|
+
throw new Error('"aria-expanded" is not supported on role "' + role + '".');
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
const subtreeIsInaccessibleCache = /* @__PURE__ */ new WeakMap();
|
|
1393
|
+
function cachedIsSubtreeInaccessible(element) {
|
|
1394
|
+
if (!subtreeIsInaccessibleCache.has(element)) {
|
|
1395
|
+
subtreeIsInaccessibleCache.set(element, isSubtreeInaccessible(element));
|
|
1396
|
+
}
|
|
1397
|
+
return subtreeIsInaccessibleCache.get(element);
|
|
1398
|
+
}
|
|
1399
|
+
return Array.from(container.querySelectorAll(
|
|
1400
|
+
// Only query elements that can be matched by the following filters
|
|
1401
|
+
makeRoleSelector(role)
|
|
1402
|
+
)).filter((node) => {
|
|
1403
|
+
const isRoleSpecifiedExplicitly = node.hasAttribute("role");
|
|
1404
|
+
if (isRoleSpecifiedExplicitly) {
|
|
1405
|
+
const roleValue = node.getAttribute("role");
|
|
1406
|
+
if (queryFallbacks) {
|
|
1407
|
+
return roleValue.split(" ").filter(Boolean).some((roleAttributeToken) => roleAttributeToken === role);
|
|
1408
|
+
}
|
|
1409
|
+
const [firstRoleAttributeToken] = roleValue.split(" ");
|
|
1410
|
+
return firstRoleAttributeToken === role;
|
|
1411
|
+
}
|
|
1412
|
+
const implicitRoles = getImplicitAriaRoles(node);
|
|
1413
|
+
return implicitRoles.some((implicitRole) => {
|
|
1414
|
+
return implicitRole === role;
|
|
1415
|
+
});
|
|
1416
|
+
}).filter((element) => {
|
|
1417
|
+
if (selected !== void 0) {
|
|
1418
|
+
return selected === computeAriaSelected(element);
|
|
1419
|
+
}
|
|
1420
|
+
if (busy !== void 0) {
|
|
1421
|
+
return busy === computeAriaBusy(element);
|
|
1422
|
+
}
|
|
1423
|
+
if (checked !== void 0) {
|
|
1424
|
+
return checked === computeAriaChecked(element);
|
|
1425
|
+
}
|
|
1426
|
+
if (pressed !== void 0) {
|
|
1427
|
+
return pressed === computeAriaPressed(element);
|
|
1428
|
+
}
|
|
1429
|
+
if (current !== void 0) {
|
|
1430
|
+
return current === computeAriaCurrent(element);
|
|
1431
|
+
}
|
|
1432
|
+
if (expanded !== void 0) {
|
|
1433
|
+
return expanded === computeAriaExpanded(element);
|
|
1434
|
+
}
|
|
1435
|
+
if (level !== void 0) {
|
|
1436
|
+
return level === computeHeadingLevel(element);
|
|
1437
|
+
}
|
|
1438
|
+
if (valueNow !== void 0 || valueMax !== void 0 || valueMin !== void 0 || valueText !== void 0) {
|
|
1439
|
+
let valueMatches = true;
|
|
1440
|
+
if (valueNow !== void 0) {
|
|
1441
|
+
valueMatches && (valueMatches = valueNow === computeAriaValueNow(element));
|
|
1442
|
+
}
|
|
1443
|
+
if (valueMax !== void 0) {
|
|
1444
|
+
valueMatches && (valueMatches = valueMax === computeAriaValueMax(element));
|
|
1445
|
+
}
|
|
1446
|
+
if (valueMin !== void 0) {
|
|
1447
|
+
valueMatches && (valueMatches = valueMin === computeAriaValueMin(element));
|
|
1448
|
+
}
|
|
1449
|
+
if (valueText !== void 0) {
|
|
1450
|
+
var _computeAriaValueText;
|
|
1451
|
+
valueMatches && (valueMatches = matches((_computeAriaValueText = computeAriaValueText(element)) != null ? _computeAriaValueText : null, element, valueText, (text) => text));
|
|
1452
|
+
}
|
|
1453
|
+
return valueMatches;
|
|
1454
|
+
}
|
|
1455
|
+
return true;
|
|
1456
|
+
}).filter((element) => {
|
|
1457
|
+
if (name === void 0) {
|
|
1458
|
+
return true;
|
|
1459
|
+
}
|
|
1460
|
+
return matches(computeAccessibleName(element, {
|
|
1461
|
+
computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
|
|
1462
|
+
}), element, name, (text) => text);
|
|
1463
|
+
}).filter((element) => {
|
|
1464
|
+
if (description === void 0) {
|
|
1465
|
+
return true;
|
|
1466
|
+
}
|
|
1467
|
+
return matches(computeAccessibleDescription(element, {
|
|
1468
|
+
computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
|
|
1469
|
+
}), element, description, (text) => text);
|
|
1470
|
+
}).filter((element) => {
|
|
1471
|
+
return hidden === false ? isInaccessible(element, {
|
|
1472
|
+
isSubtreeInaccessible: cachedIsSubtreeInaccessible
|
|
1473
|
+
}) === false : true;
|
|
1474
|
+
});
|
|
1475
|
+
};
|
|
1476
|
+
function makeRoleSelector(role) {
|
|
1477
|
+
var _roleElements$get;
|
|
1478
|
+
const explicitRoleSelector = '*[role~="' + role + '"]';
|
|
1479
|
+
const roleRelations = (_roleElements$get = roleElements_1.get(role)) != null ? _roleElements$get : /* @__PURE__ */ new Set();
|
|
1480
|
+
const implicitRoleSelectors = new Set(Array.from(roleRelations).map((_ref) => {
|
|
1481
|
+
let {
|
|
1482
|
+
name
|
|
1483
|
+
} = _ref;
|
|
1484
|
+
return name;
|
|
1485
|
+
}));
|
|
1486
|
+
return [explicitRoleSelector].concat(Array.from(implicitRoleSelectors)).join(",");
|
|
1487
|
+
}
|
|
1488
|
+
const getNameHint = (name) => {
|
|
1489
|
+
let nameHint = "";
|
|
1490
|
+
if (name === void 0) {
|
|
1491
|
+
nameHint = "";
|
|
1492
|
+
} else if (typeof name === "string") {
|
|
1493
|
+
nameHint = ' and name "' + name + '"';
|
|
1494
|
+
} else {
|
|
1495
|
+
nameHint = " and name `" + name + "`";
|
|
1496
|
+
}
|
|
1497
|
+
return nameHint;
|
|
1498
|
+
};
|
|
1499
|
+
const getMultipleError$1 = function(c, role, _temp2) {
|
|
1500
|
+
let {
|
|
1501
|
+
name
|
|
1502
|
+
} = _temp2 === void 0 ? {} : _temp2;
|
|
1503
|
+
return 'Found multiple elements with the role "' + role + '"' + getNameHint(name);
|
|
1504
|
+
};
|
|
1505
|
+
const getMissingError$1 = function(container, role, _temp3) {
|
|
1506
|
+
let {
|
|
1507
|
+
hidden = getConfig().defaultHidden,
|
|
1508
|
+
name,
|
|
1509
|
+
description
|
|
1510
|
+
} = _temp3 === void 0 ? {} : _temp3;
|
|
1511
|
+
if (getConfig()._disableExpensiveErrorDiagnostics) {
|
|
1512
|
+
return 'Unable to find role="' + role + '"' + getNameHint(name);
|
|
1513
|
+
}
|
|
1514
|
+
let roles = "";
|
|
1515
|
+
Array.from(container.children).forEach((childElement) => {
|
|
1516
|
+
roles += prettyRoles(childElement, {
|
|
1517
|
+
hidden,
|
|
1518
|
+
includeDescription: description !== void 0
|
|
1519
|
+
});
|
|
1520
|
+
});
|
|
1521
|
+
let roleMessage;
|
|
1522
|
+
if (roles.length === 0) {
|
|
1523
|
+
if (hidden === false) {
|
|
1524
|
+
roleMessage = "There are no accessible roles. But there might be some inaccessible roles. If you wish to access them, then set the `hidden` option to `true`. Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole";
|
|
1525
|
+
} else {
|
|
1526
|
+
roleMessage = "There are no available roles.";
|
|
1527
|
+
}
|
|
1528
|
+
} else {
|
|
1529
|
+
roleMessage = ("\nHere are the " + (hidden === false ? "accessible" : "available") + " roles:\n\n " + roles.replace(/\n/g, "\n ").replace(/\n\s\s\n/g, "\n\n") + "\n").trim();
|
|
1530
|
+
}
|
|
1531
|
+
let nameHint = "";
|
|
1532
|
+
if (name === void 0) {
|
|
1533
|
+
nameHint = "";
|
|
1534
|
+
} else if (typeof name === "string") {
|
|
1535
|
+
nameHint = ' and name "' + name + '"';
|
|
1536
|
+
} else {
|
|
1537
|
+
nameHint = " and name `" + name + "`";
|
|
1538
|
+
}
|
|
1539
|
+
let descriptionHint = "";
|
|
1540
|
+
if (description === void 0) {
|
|
1541
|
+
descriptionHint = "";
|
|
1542
|
+
} else if (typeof description === "string") {
|
|
1543
|
+
descriptionHint = ' and description "' + description + '"';
|
|
1544
|
+
} else {
|
|
1545
|
+
descriptionHint = " and description `" + description + "`";
|
|
1546
|
+
}
|
|
1547
|
+
return ("\nUnable to find an " + (hidden === false ? "accessible " : "") + 'element with the role "' + role + '"' + nameHint + descriptionHint + "\n\n" + roleMessage).trim();
|
|
1548
|
+
};
|
|
1549
|
+
const queryAllByRoleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByRole, queryAllByRole.name, "queryAll");
|
|
1550
|
+
const [queryByRole, getAllByRole, getByRole, findAllByRole, findByRole] = buildQueries(queryAllByRole, getMultipleError$1, getMissingError$1);
|
|
1551
|
+
const getTestIdAttribute = () => getConfig().testIdAttribute;
|
|
1552
|
+
const queryAllByTestId = function() {
|
|
1553
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1554
|
+
args[_key] = arguments[_key];
|
|
1555
|
+
}
|
|
1556
|
+
checkContainerType(args[0]);
|
|
1557
|
+
return queryAllByAttribute(getTestIdAttribute(), ...args);
|
|
1558
|
+
};
|
|
1559
|
+
const getMultipleError = (c, id) => "Found multiple elements by: [" + getTestIdAttribute() + '="' + id + '"]';
|
|
1560
|
+
const getMissingError = (c, id) => "Unable to find an element by: [" + getTestIdAttribute() + '="' + id + '"]';
|
|
1561
|
+
const queryAllByTestIdWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByTestId, queryAllByTestId.name, "queryAll");
|
|
1562
|
+
const [queryByTestId, getAllByTestId, getByTestId, findAllByTestId, findByTestId] = buildQueries(queryAllByTestId, getMultipleError, getMissingError);
|
|
1563
|
+
var queries = /* @__PURE__ */ Object.freeze({
|
|
1564
|
+
__proto__: null,
|
|
1565
|
+
queryAllByLabelText: queryAllByLabelTextWithSuggestions,
|
|
1566
|
+
queryByLabelText,
|
|
1567
|
+
getAllByLabelText: getAllByLabelTextWithSuggestions,
|
|
1568
|
+
getByLabelText: getByLabelTextWithSuggestions,
|
|
1569
|
+
findAllByLabelText,
|
|
1570
|
+
findByLabelText,
|
|
1571
|
+
queryByPlaceholderText,
|
|
1572
|
+
queryAllByPlaceholderText: queryAllByPlaceholderTextWithSuggestions,
|
|
1573
|
+
getByPlaceholderText,
|
|
1574
|
+
getAllByPlaceholderText,
|
|
1575
|
+
findAllByPlaceholderText,
|
|
1576
|
+
findByPlaceholderText,
|
|
1577
|
+
queryByText,
|
|
1578
|
+
queryAllByText: queryAllByTextWithSuggestions,
|
|
1579
|
+
getByText,
|
|
1580
|
+
getAllByText,
|
|
1581
|
+
findAllByText,
|
|
1582
|
+
findByText,
|
|
1583
|
+
queryByDisplayValue,
|
|
1584
|
+
queryAllByDisplayValue: queryAllByDisplayValueWithSuggestions,
|
|
1585
|
+
getByDisplayValue,
|
|
1586
|
+
getAllByDisplayValue,
|
|
1587
|
+
findAllByDisplayValue,
|
|
1588
|
+
findByDisplayValue,
|
|
1589
|
+
queryByAltText,
|
|
1590
|
+
queryAllByAltText: queryAllByAltTextWithSuggestions,
|
|
1591
|
+
getByAltText,
|
|
1592
|
+
getAllByAltText,
|
|
1593
|
+
findAllByAltText,
|
|
1594
|
+
findByAltText,
|
|
1595
|
+
queryByTitle,
|
|
1596
|
+
queryAllByTitle: queryAllByTitleWithSuggestions,
|
|
1597
|
+
getByTitle,
|
|
1598
|
+
getAllByTitle,
|
|
1599
|
+
findAllByTitle,
|
|
1600
|
+
findByTitle,
|
|
1601
|
+
queryByRole,
|
|
1602
|
+
queryAllByRole: queryAllByRoleWithSuggestions,
|
|
1603
|
+
getAllByRole,
|
|
1604
|
+
getByRole,
|
|
1605
|
+
findAllByRole,
|
|
1606
|
+
findByRole,
|
|
1607
|
+
queryByTestId,
|
|
1608
|
+
queryAllByTestId: queryAllByTestIdWithSuggestions,
|
|
1609
|
+
getByTestId,
|
|
1610
|
+
getAllByTestId,
|
|
1611
|
+
findAllByTestId,
|
|
1612
|
+
findByTestId
|
|
1613
|
+
});
|
|
1614
|
+
function getQueriesForElement(element, queries$1, initialValue2) {
|
|
1615
|
+
if (queries$1 === void 0) {
|
|
1616
|
+
queries$1 = queries;
|
|
1617
|
+
}
|
|
1618
|
+
if (initialValue2 === void 0) {
|
|
1619
|
+
initialValue2 = {};
|
|
1620
|
+
}
|
|
1621
|
+
return Object.keys(queries$1).reduce((helpers, key) => {
|
|
1622
|
+
const fn = queries$1[key];
|
|
1623
|
+
helpers[key] = fn.bind(null, element);
|
|
1624
|
+
return helpers;
|
|
1625
|
+
}, initialValue2);
|
|
1626
|
+
}
|
|
1627
|
+
const isRemoved = (result) => !result || Array.isArray(result) && !result.length;
|
|
1628
|
+
function initialCheck(elements) {
|
|
1629
|
+
if (isRemoved(elements)) {
|
|
1630
|
+
throw new Error("The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.");
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
async function waitForElementToBeRemoved(callback, options) {
|
|
1634
|
+
const timeoutError = new Error("Timed out in waitForElementToBeRemoved.");
|
|
1635
|
+
if (typeof callback !== "function") {
|
|
1636
|
+
initialCheck(callback);
|
|
1637
|
+
const elements = Array.isArray(callback) ? callback : [callback];
|
|
1638
|
+
const getRemainingElements = elements.map((element) => {
|
|
1639
|
+
let parent = element.parentElement;
|
|
1640
|
+
if (parent === null) return () => null;
|
|
1641
|
+
while (parent.parentElement) parent = parent.parentElement;
|
|
1642
|
+
return () => parent.contains(element) ? element : null;
|
|
1643
|
+
});
|
|
1644
|
+
callback = () => getRemainingElements.map((c) => c()).filter(Boolean);
|
|
1645
|
+
}
|
|
1646
|
+
initialCheck(callback());
|
|
1647
|
+
return waitForWrapper(() => {
|
|
1648
|
+
let result;
|
|
1649
|
+
try {
|
|
1650
|
+
result = callback();
|
|
1651
|
+
} catch (error) {
|
|
1652
|
+
if (error.name === "TestingLibraryElementError") {
|
|
1653
|
+
return void 0;
|
|
1654
|
+
}
|
|
1655
|
+
throw error;
|
|
1656
|
+
}
|
|
1657
|
+
if (!isRemoved(result)) {
|
|
1658
|
+
throw timeoutError;
|
|
1659
|
+
}
|
|
1660
|
+
return void 0;
|
|
1661
|
+
}, options);
|
|
1662
|
+
}
|
|
1663
|
+
const eventMap = {
|
|
1664
|
+
// Clipboard Events
|
|
1665
|
+
copy: {
|
|
1666
|
+
EventType: "ClipboardEvent",
|
|
1667
|
+
defaultInit: {
|
|
1668
|
+
bubbles: true,
|
|
1669
|
+
cancelable: true,
|
|
1670
|
+
composed: true
|
|
1671
|
+
}
|
|
1672
|
+
},
|
|
1673
|
+
cut: {
|
|
1674
|
+
EventType: "ClipboardEvent",
|
|
1675
|
+
defaultInit: {
|
|
1676
|
+
bubbles: true,
|
|
1677
|
+
cancelable: true,
|
|
1678
|
+
composed: true
|
|
1679
|
+
}
|
|
1680
|
+
},
|
|
1681
|
+
paste: {
|
|
1682
|
+
EventType: "ClipboardEvent",
|
|
1683
|
+
defaultInit: {
|
|
1684
|
+
bubbles: true,
|
|
1685
|
+
cancelable: true,
|
|
1686
|
+
composed: true
|
|
1687
|
+
}
|
|
1688
|
+
},
|
|
1689
|
+
// Composition Events
|
|
1690
|
+
compositionEnd: {
|
|
1691
|
+
EventType: "CompositionEvent",
|
|
1692
|
+
defaultInit: {
|
|
1693
|
+
bubbles: true,
|
|
1694
|
+
cancelable: true,
|
|
1695
|
+
composed: true
|
|
1696
|
+
}
|
|
1697
|
+
},
|
|
1698
|
+
compositionStart: {
|
|
1699
|
+
EventType: "CompositionEvent",
|
|
1700
|
+
defaultInit: {
|
|
1701
|
+
bubbles: true,
|
|
1702
|
+
cancelable: true,
|
|
1703
|
+
composed: true
|
|
1704
|
+
}
|
|
1705
|
+
},
|
|
1706
|
+
compositionUpdate: {
|
|
1707
|
+
EventType: "CompositionEvent",
|
|
1708
|
+
defaultInit: {
|
|
1709
|
+
bubbles: true,
|
|
1710
|
+
cancelable: true,
|
|
1711
|
+
composed: true
|
|
1712
|
+
}
|
|
1713
|
+
},
|
|
1714
|
+
// Keyboard Events
|
|
1715
|
+
keyDown: {
|
|
1716
|
+
EventType: "KeyboardEvent",
|
|
1717
|
+
defaultInit: {
|
|
1718
|
+
bubbles: true,
|
|
1719
|
+
cancelable: true,
|
|
1720
|
+
charCode: 0,
|
|
1721
|
+
composed: true
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
keyPress: {
|
|
1725
|
+
EventType: "KeyboardEvent",
|
|
1726
|
+
defaultInit: {
|
|
1727
|
+
bubbles: true,
|
|
1728
|
+
cancelable: true,
|
|
1729
|
+
charCode: 0,
|
|
1730
|
+
composed: true
|
|
1731
|
+
}
|
|
1732
|
+
},
|
|
1733
|
+
keyUp: {
|
|
1734
|
+
EventType: "KeyboardEvent",
|
|
1735
|
+
defaultInit: {
|
|
1736
|
+
bubbles: true,
|
|
1737
|
+
cancelable: true,
|
|
1738
|
+
charCode: 0,
|
|
1739
|
+
composed: true
|
|
1740
|
+
}
|
|
1741
|
+
},
|
|
1742
|
+
// Focus Events
|
|
1743
|
+
focus: {
|
|
1744
|
+
EventType: "FocusEvent",
|
|
1745
|
+
defaultInit: {
|
|
1746
|
+
bubbles: false,
|
|
1747
|
+
cancelable: false,
|
|
1748
|
+
composed: true
|
|
1749
|
+
}
|
|
1750
|
+
},
|
|
1751
|
+
blur: {
|
|
1752
|
+
EventType: "FocusEvent",
|
|
1753
|
+
defaultInit: {
|
|
1754
|
+
bubbles: false,
|
|
1755
|
+
cancelable: false,
|
|
1756
|
+
composed: true
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
focusIn: {
|
|
1760
|
+
EventType: "FocusEvent",
|
|
1761
|
+
defaultInit: {
|
|
1762
|
+
bubbles: true,
|
|
1763
|
+
cancelable: false,
|
|
1764
|
+
composed: true
|
|
1765
|
+
}
|
|
1766
|
+
},
|
|
1767
|
+
focusOut: {
|
|
1768
|
+
EventType: "FocusEvent",
|
|
1769
|
+
defaultInit: {
|
|
1770
|
+
bubbles: true,
|
|
1771
|
+
cancelable: false,
|
|
1772
|
+
composed: true
|
|
1773
|
+
}
|
|
1774
|
+
},
|
|
1775
|
+
// Form Events
|
|
1776
|
+
change: {
|
|
1777
|
+
EventType: "Event",
|
|
1778
|
+
defaultInit: {
|
|
1779
|
+
bubbles: true,
|
|
1780
|
+
cancelable: false
|
|
1781
|
+
}
|
|
1782
|
+
},
|
|
1783
|
+
input: {
|
|
1784
|
+
EventType: "InputEvent",
|
|
1785
|
+
defaultInit: {
|
|
1786
|
+
bubbles: true,
|
|
1787
|
+
cancelable: false,
|
|
1788
|
+
composed: true
|
|
1789
|
+
}
|
|
1790
|
+
},
|
|
1791
|
+
invalid: {
|
|
1792
|
+
EventType: "Event",
|
|
1793
|
+
defaultInit: {
|
|
1794
|
+
bubbles: false,
|
|
1795
|
+
cancelable: true
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
submit: {
|
|
1799
|
+
EventType: "Event",
|
|
1800
|
+
defaultInit: {
|
|
1801
|
+
bubbles: true,
|
|
1802
|
+
cancelable: true
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1805
|
+
reset: {
|
|
1806
|
+
EventType: "Event",
|
|
1807
|
+
defaultInit: {
|
|
1808
|
+
bubbles: true,
|
|
1809
|
+
cancelable: true
|
|
1810
|
+
}
|
|
1811
|
+
},
|
|
1812
|
+
// Mouse Events
|
|
1813
|
+
click: {
|
|
1814
|
+
EventType: "MouseEvent",
|
|
1815
|
+
defaultInit: {
|
|
1816
|
+
bubbles: true,
|
|
1817
|
+
cancelable: true,
|
|
1818
|
+
button: 0,
|
|
1819
|
+
composed: true
|
|
1820
|
+
}
|
|
1821
|
+
},
|
|
1822
|
+
contextMenu: {
|
|
1823
|
+
EventType: "MouseEvent",
|
|
1824
|
+
defaultInit: {
|
|
1825
|
+
bubbles: true,
|
|
1826
|
+
cancelable: true,
|
|
1827
|
+
composed: true
|
|
1828
|
+
}
|
|
1829
|
+
},
|
|
1830
|
+
dblClick: {
|
|
1831
|
+
EventType: "MouseEvent",
|
|
1832
|
+
defaultInit: {
|
|
1833
|
+
bubbles: true,
|
|
1834
|
+
cancelable: true,
|
|
1835
|
+
composed: true
|
|
1836
|
+
}
|
|
1837
|
+
},
|
|
1838
|
+
drag: {
|
|
1839
|
+
EventType: "DragEvent",
|
|
1840
|
+
defaultInit: {
|
|
1841
|
+
bubbles: true,
|
|
1842
|
+
cancelable: true,
|
|
1843
|
+
composed: true
|
|
1844
|
+
}
|
|
1845
|
+
},
|
|
1846
|
+
dragEnd: {
|
|
1847
|
+
EventType: "DragEvent",
|
|
1848
|
+
defaultInit: {
|
|
1849
|
+
bubbles: true,
|
|
1850
|
+
cancelable: false,
|
|
1851
|
+
composed: true
|
|
1852
|
+
}
|
|
1853
|
+
},
|
|
1854
|
+
dragEnter: {
|
|
1855
|
+
EventType: "DragEvent",
|
|
1856
|
+
defaultInit: {
|
|
1857
|
+
bubbles: true,
|
|
1858
|
+
cancelable: true,
|
|
1859
|
+
composed: true
|
|
1860
|
+
}
|
|
1861
|
+
},
|
|
1862
|
+
dragExit: {
|
|
1863
|
+
EventType: "DragEvent",
|
|
1864
|
+
defaultInit: {
|
|
1865
|
+
bubbles: true,
|
|
1866
|
+
cancelable: false,
|
|
1867
|
+
composed: true
|
|
1868
|
+
}
|
|
1869
|
+
},
|
|
1870
|
+
dragLeave: {
|
|
1871
|
+
EventType: "DragEvent",
|
|
1872
|
+
defaultInit: {
|
|
1873
|
+
bubbles: true,
|
|
1874
|
+
cancelable: false,
|
|
1875
|
+
composed: true
|
|
1876
|
+
}
|
|
1877
|
+
},
|
|
1878
|
+
dragOver: {
|
|
1879
|
+
EventType: "DragEvent",
|
|
1880
|
+
defaultInit: {
|
|
1881
|
+
bubbles: true,
|
|
1882
|
+
cancelable: true,
|
|
1883
|
+
composed: true
|
|
1884
|
+
}
|
|
1885
|
+
},
|
|
1886
|
+
dragStart: {
|
|
1887
|
+
EventType: "DragEvent",
|
|
1888
|
+
defaultInit: {
|
|
1889
|
+
bubbles: true,
|
|
1890
|
+
cancelable: true,
|
|
1891
|
+
composed: true
|
|
1892
|
+
}
|
|
1893
|
+
},
|
|
1894
|
+
drop: {
|
|
1895
|
+
EventType: "DragEvent",
|
|
1896
|
+
defaultInit: {
|
|
1897
|
+
bubbles: true,
|
|
1898
|
+
cancelable: true,
|
|
1899
|
+
composed: true
|
|
1900
|
+
}
|
|
1901
|
+
},
|
|
1902
|
+
mouseDown: {
|
|
1903
|
+
EventType: "MouseEvent",
|
|
1904
|
+
defaultInit: {
|
|
1905
|
+
bubbles: true,
|
|
1906
|
+
cancelable: true,
|
|
1907
|
+
composed: true
|
|
1908
|
+
}
|
|
1909
|
+
},
|
|
1910
|
+
mouseEnter: {
|
|
1911
|
+
EventType: "MouseEvent",
|
|
1912
|
+
defaultInit: {
|
|
1913
|
+
bubbles: false,
|
|
1914
|
+
cancelable: false,
|
|
1915
|
+
composed: true
|
|
1916
|
+
}
|
|
1917
|
+
},
|
|
1918
|
+
mouseLeave: {
|
|
1919
|
+
EventType: "MouseEvent",
|
|
1920
|
+
defaultInit: {
|
|
1921
|
+
bubbles: false,
|
|
1922
|
+
cancelable: false,
|
|
1923
|
+
composed: true
|
|
1924
|
+
}
|
|
1925
|
+
},
|
|
1926
|
+
mouseMove: {
|
|
1927
|
+
EventType: "MouseEvent",
|
|
1928
|
+
defaultInit: {
|
|
1929
|
+
bubbles: true,
|
|
1930
|
+
cancelable: true,
|
|
1931
|
+
composed: true
|
|
1932
|
+
}
|
|
1933
|
+
},
|
|
1934
|
+
mouseOut: {
|
|
1935
|
+
EventType: "MouseEvent",
|
|
1936
|
+
defaultInit: {
|
|
1937
|
+
bubbles: true,
|
|
1938
|
+
cancelable: true,
|
|
1939
|
+
composed: true
|
|
1940
|
+
}
|
|
1941
|
+
},
|
|
1942
|
+
mouseOver: {
|
|
1943
|
+
EventType: "MouseEvent",
|
|
1944
|
+
defaultInit: {
|
|
1945
|
+
bubbles: true,
|
|
1946
|
+
cancelable: true,
|
|
1947
|
+
composed: true
|
|
1948
|
+
}
|
|
1949
|
+
},
|
|
1950
|
+
mouseUp: {
|
|
1951
|
+
EventType: "MouseEvent",
|
|
1952
|
+
defaultInit: {
|
|
1953
|
+
bubbles: true,
|
|
1954
|
+
cancelable: true,
|
|
1955
|
+
composed: true
|
|
1956
|
+
}
|
|
1957
|
+
},
|
|
1958
|
+
// Selection Events
|
|
1959
|
+
select: {
|
|
1960
|
+
EventType: "Event",
|
|
1961
|
+
defaultInit: {
|
|
1962
|
+
bubbles: true,
|
|
1963
|
+
cancelable: false
|
|
1964
|
+
}
|
|
1965
|
+
},
|
|
1966
|
+
// Touch Events
|
|
1967
|
+
touchCancel: {
|
|
1968
|
+
EventType: "TouchEvent",
|
|
1969
|
+
defaultInit: {
|
|
1970
|
+
bubbles: true,
|
|
1971
|
+
cancelable: false,
|
|
1972
|
+
composed: true
|
|
1973
|
+
}
|
|
1974
|
+
},
|
|
1975
|
+
touchEnd: {
|
|
1976
|
+
EventType: "TouchEvent",
|
|
1977
|
+
defaultInit: {
|
|
1978
|
+
bubbles: true,
|
|
1979
|
+
cancelable: true,
|
|
1980
|
+
composed: true
|
|
1981
|
+
}
|
|
1982
|
+
},
|
|
1983
|
+
touchMove: {
|
|
1984
|
+
EventType: "TouchEvent",
|
|
1985
|
+
defaultInit: {
|
|
1986
|
+
bubbles: true,
|
|
1987
|
+
cancelable: true,
|
|
1988
|
+
composed: true
|
|
1989
|
+
}
|
|
1990
|
+
},
|
|
1991
|
+
touchStart: {
|
|
1992
|
+
EventType: "TouchEvent",
|
|
1993
|
+
defaultInit: {
|
|
1994
|
+
bubbles: true,
|
|
1995
|
+
cancelable: true,
|
|
1996
|
+
composed: true
|
|
1997
|
+
}
|
|
1998
|
+
},
|
|
1999
|
+
// UI Events
|
|
2000
|
+
resize: {
|
|
2001
|
+
EventType: "UIEvent",
|
|
2002
|
+
defaultInit: {
|
|
2003
|
+
bubbles: false,
|
|
2004
|
+
cancelable: false
|
|
2005
|
+
}
|
|
2006
|
+
},
|
|
2007
|
+
scroll: {
|
|
2008
|
+
EventType: "UIEvent",
|
|
2009
|
+
defaultInit: {
|
|
2010
|
+
bubbles: false,
|
|
2011
|
+
cancelable: false
|
|
2012
|
+
}
|
|
2013
|
+
},
|
|
2014
|
+
// Wheel Events
|
|
2015
|
+
wheel: {
|
|
2016
|
+
EventType: "WheelEvent",
|
|
2017
|
+
defaultInit: {
|
|
2018
|
+
bubbles: true,
|
|
2019
|
+
cancelable: true,
|
|
2020
|
+
composed: true
|
|
2021
|
+
}
|
|
2022
|
+
},
|
|
2023
|
+
// Media Events
|
|
2024
|
+
abort: {
|
|
2025
|
+
EventType: "Event",
|
|
2026
|
+
defaultInit: {
|
|
2027
|
+
bubbles: false,
|
|
2028
|
+
cancelable: false
|
|
2029
|
+
}
|
|
2030
|
+
},
|
|
2031
|
+
canPlay: {
|
|
2032
|
+
EventType: "Event",
|
|
2033
|
+
defaultInit: {
|
|
2034
|
+
bubbles: false,
|
|
2035
|
+
cancelable: false
|
|
2036
|
+
}
|
|
2037
|
+
},
|
|
2038
|
+
canPlayThrough: {
|
|
2039
|
+
EventType: "Event",
|
|
2040
|
+
defaultInit: {
|
|
2041
|
+
bubbles: false,
|
|
2042
|
+
cancelable: false
|
|
2043
|
+
}
|
|
2044
|
+
},
|
|
2045
|
+
durationChange: {
|
|
2046
|
+
EventType: "Event",
|
|
2047
|
+
defaultInit: {
|
|
2048
|
+
bubbles: false,
|
|
2049
|
+
cancelable: false
|
|
2050
|
+
}
|
|
2051
|
+
},
|
|
2052
|
+
emptied: {
|
|
2053
|
+
EventType: "Event",
|
|
2054
|
+
defaultInit: {
|
|
2055
|
+
bubbles: false,
|
|
2056
|
+
cancelable: false
|
|
2057
|
+
}
|
|
2058
|
+
},
|
|
2059
|
+
encrypted: {
|
|
2060
|
+
EventType: "Event",
|
|
2061
|
+
defaultInit: {
|
|
2062
|
+
bubbles: false,
|
|
2063
|
+
cancelable: false
|
|
2064
|
+
}
|
|
2065
|
+
},
|
|
2066
|
+
ended: {
|
|
2067
|
+
EventType: "Event",
|
|
2068
|
+
defaultInit: {
|
|
2069
|
+
bubbles: false,
|
|
2070
|
+
cancelable: false
|
|
2071
|
+
}
|
|
2072
|
+
},
|
|
2073
|
+
loadedData: {
|
|
2074
|
+
EventType: "Event",
|
|
2075
|
+
defaultInit: {
|
|
2076
|
+
bubbles: false,
|
|
2077
|
+
cancelable: false
|
|
2078
|
+
}
|
|
2079
|
+
},
|
|
2080
|
+
loadedMetadata: {
|
|
2081
|
+
EventType: "Event",
|
|
2082
|
+
defaultInit: {
|
|
2083
|
+
bubbles: false,
|
|
2084
|
+
cancelable: false
|
|
2085
|
+
}
|
|
2086
|
+
},
|
|
2087
|
+
loadStart: {
|
|
2088
|
+
EventType: "ProgressEvent",
|
|
2089
|
+
defaultInit: {
|
|
2090
|
+
bubbles: false,
|
|
2091
|
+
cancelable: false
|
|
2092
|
+
}
|
|
2093
|
+
},
|
|
2094
|
+
pause: {
|
|
2095
|
+
EventType: "Event",
|
|
2096
|
+
defaultInit: {
|
|
2097
|
+
bubbles: false,
|
|
2098
|
+
cancelable: false
|
|
2099
|
+
}
|
|
2100
|
+
},
|
|
2101
|
+
play: {
|
|
2102
|
+
EventType: "Event",
|
|
2103
|
+
defaultInit: {
|
|
2104
|
+
bubbles: false,
|
|
2105
|
+
cancelable: false
|
|
2106
|
+
}
|
|
2107
|
+
},
|
|
2108
|
+
playing: {
|
|
2109
|
+
EventType: "Event",
|
|
2110
|
+
defaultInit: {
|
|
2111
|
+
bubbles: false,
|
|
2112
|
+
cancelable: false
|
|
2113
|
+
}
|
|
2114
|
+
},
|
|
2115
|
+
progress: {
|
|
2116
|
+
EventType: "ProgressEvent",
|
|
2117
|
+
defaultInit: {
|
|
2118
|
+
bubbles: false,
|
|
2119
|
+
cancelable: false
|
|
2120
|
+
}
|
|
2121
|
+
},
|
|
2122
|
+
rateChange: {
|
|
2123
|
+
EventType: "Event",
|
|
2124
|
+
defaultInit: {
|
|
2125
|
+
bubbles: false,
|
|
2126
|
+
cancelable: false
|
|
2127
|
+
}
|
|
2128
|
+
},
|
|
2129
|
+
seeked: {
|
|
2130
|
+
EventType: "Event",
|
|
2131
|
+
defaultInit: {
|
|
2132
|
+
bubbles: false,
|
|
2133
|
+
cancelable: false
|
|
2134
|
+
}
|
|
2135
|
+
},
|
|
2136
|
+
seeking: {
|
|
2137
|
+
EventType: "Event",
|
|
2138
|
+
defaultInit: {
|
|
2139
|
+
bubbles: false,
|
|
2140
|
+
cancelable: false
|
|
2141
|
+
}
|
|
2142
|
+
},
|
|
2143
|
+
stalled: {
|
|
2144
|
+
EventType: "Event",
|
|
2145
|
+
defaultInit: {
|
|
2146
|
+
bubbles: false,
|
|
2147
|
+
cancelable: false
|
|
2148
|
+
}
|
|
2149
|
+
},
|
|
2150
|
+
suspend: {
|
|
2151
|
+
EventType: "Event",
|
|
2152
|
+
defaultInit: {
|
|
2153
|
+
bubbles: false,
|
|
2154
|
+
cancelable: false
|
|
2155
|
+
}
|
|
2156
|
+
},
|
|
2157
|
+
timeUpdate: {
|
|
2158
|
+
EventType: "Event",
|
|
2159
|
+
defaultInit: {
|
|
2160
|
+
bubbles: false,
|
|
2161
|
+
cancelable: false
|
|
2162
|
+
}
|
|
2163
|
+
},
|
|
2164
|
+
volumeChange: {
|
|
2165
|
+
EventType: "Event",
|
|
2166
|
+
defaultInit: {
|
|
2167
|
+
bubbles: false,
|
|
2168
|
+
cancelable: false
|
|
2169
|
+
}
|
|
2170
|
+
},
|
|
2171
|
+
waiting: {
|
|
2172
|
+
EventType: "Event",
|
|
2173
|
+
defaultInit: {
|
|
2174
|
+
bubbles: false,
|
|
2175
|
+
cancelable: false
|
|
2176
|
+
}
|
|
2177
|
+
},
|
|
2178
|
+
// Events
|
|
2179
|
+
load: {
|
|
2180
|
+
// TODO: load events can be UIEvent or Event depending on what generated them
|
|
2181
|
+
// This is where this abstraction breaks down.
|
|
2182
|
+
// But the common targets are <img />, <script /> and window.
|
|
2183
|
+
// Neither of these targets receive a UIEvent
|
|
2184
|
+
EventType: "Event",
|
|
2185
|
+
defaultInit: {
|
|
2186
|
+
bubbles: false,
|
|
2187
|
+
cancelable: false
|
|
2188
|
+
}
|
|
2189
|
+
},
|
|
2190
|
+
error: {
|
|
2191
|
+
EventType: "Event",
|
|
2192
|
+
defaultInit: {
|
|
2193
|
+
bubbles: false,
|
|
2194
|
+
cancelable: false
|
|
2195
|
+
}
|
|
2196
|
+
},
|
|
2197
|
+
// Animation Events
|
|
2198
|
+
animationStart: {
|
|
2199
|
+
EventType: "AnimationEvent",
|
|
2200
|
+
defaultInit: {
|
|
2201
|
+
bubbles: true,
|
|
2202
|
+
cancelable: false
|
|
2203
|
+
}
|
|
2204
|
+
},
|
|
2205
|
+
animationEnd: {
|
|
2206
|
+
EventType: "AnimationEvent",
|
|
2207
|
+
defaultInit: {
|
|
2208
|
+
bubbles: true,
|
|
2209
|
+
cancelable: false
|
|
2210
|
+
}
|
|
2211
|
+
},
|
|
2212
|
+
animationIteration: {
|
|
2213
|
+
EventType: "AnimationEvent",
|
|
2214
|
+
defaultInit: {
|
|
2215
|
+
bubbles: true,
|
|
2216
|
+
cancelable: false
|
|
2217
|
+
}
|
|
2218
|
+
},
|
|
2219
|
+
// Transition Events
|
|
2220
|
+
transitionCancel: {
|
|
2221
|
+
EventType: "TransitionEvent",
|
|
2222
|
+
defaultInit: {
|
|
2223
|
+
bubbles: true,
|
|
2224
|
+
cancelable: false
|
|
2225
|
+
}
|
|
2226
|
+
},
|
|
2227
|
+
transitionEnd: {
|
|
2228
|
+
EventType: "TransitionEvent",
|
|
2229
|
+
defaultInit: {
|
|
2230
|
+
bubbles: true,
|
|
2231
|
+
cancelable: true
|
|
2232
|
+
}
|
|
2233
|
+
},
|
|
2234
|
+
transitionRun: {
|
|
2235
|
+
EventType: "TransitionEvent",
|
|
2236
|
+
defaultInit: {
|
|
2237
|
+
bubbles: true,
|
|
2238
|
+
cancelable: false
|
|
2239
|
+
}
|
|
2240
|
+
},
|
|
2241
|
+
transitionStart: {
|
|
2242
|
+
EventType: "TransitionEvent",
|
|
2243
|
+
defaultInit: {
|
|
2244
|
+
bubbles: true,
|
|
2245
|
+
cancelable: false
|
|
2246
|
+
}
|
|
2247
|
+
},
|
|
2248
|
+
// pointer events
|
|
2249
|
+
pointerOver: {
|
|
2250
|
+
EventType: "PointerEvent",
|
|
2251
|
+
defaultInit: {
|
|
2252
|
+
bubbles: true,
|
|
2253
|
+
cancelable: true,
|
|
2254
|
+
composed: true
|
|
2255
|
+
}
|
|
2256
|
+
},
|
|
2257
|
+
pointerEnter: {
|
|
2258
|
+
EventType: "PointerEvent",
|
|
2259
|
+
defaultInit: {
|
|
2260
|
+
bubbles: false,
|
|
2261
|
+
cancelable: false
|
|
2262
|
+
}
|
|
2263
|
+
},
|
|
2264
|
+
pointerDown: {
|
|
2265
|
+
EventType: "PointerEvent",
|
|
2266
|
+
defaultInit: {
|
|
2267
|
+
bubbles: true,
|
|
2268
|
+
cancelable: true,
|
|
2269
|
+
composed: true
|
|
2270
|
+
}
|
|
2271
|
+
},
|
|
2272
|
+
pointerMove: {
|
|
2273
|
+
EventType: "PointerEvent",
|
|
2274
|
+
defaultInit: {
|
|
2275
|
+
bubbles: true,
|
|
2276
|
+
cancelable: true,
|
|
2277
|
+
composed: true
|
|
2278
|
+
}
|
|
2279
|
+
},
|
|
2280
|
+
pointerUp: {
|
|
2281
|
+
EventType: "PointerEvent",
|
|
2282
|
+
defaultInit: {
|
|
2283
|
+
bubbles: true,
|
|
2284
|
+
cancelable: true,
|
|
2285
|
+
composed: true
|
|
2286
|
+
}
|
|
2287
|
+
},
|
|
2288
|
+
pointerCancel: {
|
|
2289
|
+
EventType: "PointerEvent",
|
|
2290
|
+
defaultInit: {
|
|
2291
|
+
bubbles: true,
|
|
2292
|
+
cancelable: false,
|
|
2293
|
+
composed: true
|
|
2294
|
+
}
|
|
2295
|
+
},
|
|
2296
|
+
pointerOut: {
|
|
2297
|
+
EventType: "PointerEvent",
|
|
2298
|
+
defaultInit: {
|
|
2299
|
+
bubbles: true,
|
|
2300
|
+
cancelable: true,
|
|
2301
|
+
composed: true
|
|
2302
|
+
}
|
|
2303
|
+
},
|
|
2304
|
+
pointerLeave: {
|
|
2305
|
+
EventType: "PointerEvent",
|
|
2306
|
+
defaultInit: {
|
|
2307
|
+
bubbles: false,
|
|
2308
|
+
cancelable: false
|
|
2309
|
+
}
|
|
2310
|
+
},
|
|
2311
|
+
gotPointerCapture: {
|
|
2312
|
+
EventType: "PointerEvent",
|
|
2313
|
+
defaultInit: {
|
|
2314
|
+
bubbles: true,
|
|
2315
|
+
cancelable: false,
|
|
2316
|
+
composed: true
|
|
2317
|
+
}
|
|
2318
|
+
},
|
|
2319
|
+
lostPointerCapture: {
|
|
2320
|
+
EventType: "PointerEvent",
|
|
2321
|
+
defaultInit: {
|
|
2322
|
+
bubbles: true,
|
|
2323
|
+
cancelable: false,
|
|
2324
|
+
composed: true
|
|
2325
|
+
}
|
|
2326
|
+
},
|
|
2327
|
+
// history events
|
|
2328
|
+
popState: {
|
|
2329
|
+
EventType: "PopStateEvent",
|
|
2330
|
+
defaultInit: {
|
|
2331
|
+
bubbles: true,
|
|
2332
|
+
cancelable: false
|
|
2333
|
+
}
|
|
2334
|
+
},
|
|
2335
|
+
// window events
|
|
2336
|
+
offline: {
|
|
2337
|
+
EventType: "Event",
|
|
2338
|
+
defaultInit: {
|
|
2339
|
+
bubbles: false,
|
|
2340
|
+
cancelable: false
|
|
2341
|
+
}
|
|
2342
|
+
},
|
|
2343
|
+
online: {
|
|
2344
|
+
EventType: "Event",
|
|
2345
|
+
defaultInit: {
|
|
2346
|
+
bubbles: false,
|
|
2347
|
+
cancelable: false
|
|
2348
|
+
}
|
|
2349
|
+
},
|
|
2350
|
+
pageHide: {
|
|
2351
|
+
EventType: "PageTransitionEvent",
|
|
2352
|
+
defaultInit: {
|
|
2353
|
+
bubbles: true,
|
|
2354
|
+
cancelable: true
|
|
2355
|
+
}
|
|
2356
|
+
},
|
|
2357
|
+
pageShow: {
|
|
2358
|
+
EventType: "PageTransitionEvent",
|
|
2359
|
+
defaultInit: {
|
|
2360
|
+
bubbles: true,
|
|
2361
|
+
cancelable: true
|
|
2362
|
+
}
|
|
2363
|
+
}
|
|
2364
|
+
};
|
|
2365
|
+
const eventAliasMap = {
|
|
2366
|
+
doubleClick: "dblClick"
|
|
2367
|
+
};
|
|
2368
|
+
function fireEvent(element, event) {
|
|
2369
|
+
return getConfig().eventWrapper(() => {
|
|
2370
|
+
if (!event) {
|
|
2371
|
+
throw new Error("Unable to fire an event - please provide an event object.");
|
|
2372
|
+
}
|
|
2373
|
+
if (!element) {
|
|
2374
|
+
throw new Error('Unable to fire a "' + event.type + '" event - please provide a DOM element.');
|
|
2375
|
+
}
|
|
2376
|
+
return element.dispatchEvent(event);
|
|
2377
|
+
});
|
|
2378
|
+
}
|
|
2379
|
+
function createEvent(eventName, node, init, _temp) {
|
|
2380
|
+
let {
|
|
2381
|
+
EventType = "Event",
|
|
2382
|
+
defaultInit = {}
|
|
2383
|
+
} = _temp === void 0 ? {} : _temp;
|
|
2384
|
+
if (!node) {
|
|
2385
|
+
throw new Error('Unable to fire a "' + eventName + '" event - please provide a DOM element.');
|
|
2386
|
+
}
|
|
2387
|
+
const eventInit = {
|
|
2388
|
+
...defaultInit,
|
|
2389
|
+
...init
|
|
2390
|
+
};
|
|
2391
|
+
const {
|
|
2392
|
+
target: {
|
|
2393
|
+
value,
|
|
2394
|
+
files,
|
|
2395
|
+
...targetProperties
|
|
2396
|
+
} = {}
|
|
2397
|
+
} = eventInit;
|
|
2398
|
+
if (value !== void 0) {
|
|
2399
|
+
setNativeValue(node, value);
|
|
2400
|
+
}
|
|
2401
|
+
if (files !== void 0) {
|
|
2402
|
+
Object.defineProperty(node, "files", {
|
|
2403
|
+
configurable: true,
|
|
2404
|
+
enumerable: true,
|
|
2405
|
+
writable: true,
|
|
2406
|
+
value: files
|
|
2407
|
+
});
|
|
2408
|
+
}
|
|
2409
|
+
Object.assign(node, targetProperties);
|
|
2410
|
+
const window2 = getWindowFromNode(node);
|
|
2411
|
+
const EventConstructor = window2[EventType] || window2.Event;
|
|
2412
|
+
let event;
|
|
2413
|
+
if (typeof EventConstructor === "function") {
|
|
2414
|
+
event = new EventConstructor(eventName, eventInit);
|
|
2415
|
+
} else {
|
|
2416
|
+
event = window2.document.createEvent(EventType);
|
|
2417
|
+
const {
|
|
2418
|
+
bubbles,
|
|
2419
|
+
cancelable,
|
|
2420
|
+
detail,
|
|
2421
|
+
...otherInit
|
|
2422
|
+
} = eventInit;
|
|
2423
|
+
event.initEvent(eventName, bubbles, cancelable, detail);
|
|
2424
|
+
Object.keys(otherInit).forEach((eventKey) => {
|
|
2425
|
+
event[eventKey] = otherInit[eventKey];
|
|
2426
|
+
});
|
|
2427
|
+
}
|
|
2428
|
+
const dataTransferProperties = ["dataTransfer", "clipboardData"];
|
|
2429
|
+
dataTransferProperties.forEach((dataTransferKey) => {
|
|
2430
|
+
const dataTransferValue = eventInit[dataTransferKey];
|
|
2431
|
+
if (typeof dataTransferValue === "object") {
|
|
2432
|
+
if (typeof window2.DataTransfer === "function") {
|
|
2433
|
+
Object.defineProperty(event, dataTransferKey, {
|
|
2434
|
+
value: Object.getOwnPropertyNames(dataTransferValue).reduce((acc, propName) => {
|
|
2435
|
+
Object.defineProperty(acc, propName, {
|
|
2436
|
+
value: dataTransferValue[propName]
|
|
2437
|
+
});
|
|
2438
|
+
return acc;
|
|
2439
|
+
}, new window2.DataTransfer())
|
|
2440
|
+
});
|
|
2441
|
+
} else {
|
|
2442
|
+
Object.defineProperty(event, dataTransferKey, {
|
|
2443
|
+
value: dataTransferValue
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2446
|
+
}
|
|
2447
|
+
});
|
|
2448
|
+
return event;
|
|
2449
|
+
}
|
|
2450
|
+
Object.keys(eventMap).forEach((key) => {
|
|
2451
|
+
const {
|
|
2452
|
+
EventType,
|
|
2453
|
+
defaultInit
|
|
2454
|
+
} = eventMap[key];
|
|
2455
|
+
const eventName = key.toLowerCase();
|
|
2456
|
+
createEvent[key] = (node, init) => createEvent(eventName, node, init, {
|
|
2457
|
+
EventType,
|
|
2458
|
+
defaultInit
|
|
2459
|
+
});
|
|
2460
|
+
fireEvent[key] = (node, init) => fireEvent(node, createEvent[key](node, init));
|
|
2461
|
+
});
|
|
2462
|
+
function setNativeValue(element, value) {
|
|
2463
|
+
const {
|
|
2464
|
+
set: valueSetter
|
|
2465
|
+
} = Object.getOwnPropertyDescriptor(element, "value") || {};
|
|
2466
|
+
const prototype = Object.getPrototypeOf(element);
|
|
2467
|
+
const {
|
|
2468
|
+
set: prototypeValueSetter
|
|
2469
|
+
} = Object.getOwnPropertyDescriptor(prototype, "value") || {};
|
|
2470
|
+
if (prototypeValueSetter && valueSetter !== prototypeValueSetter) {
|
|
2471
|
+
prototypeValueSetter.call(element, value);
|
|
2472
|
+
} else {
|
|
2473
|
+
if (valueSetter) {
|
|
2474
|
+
valueSetter.call(element, value);
|
|
2475
|
+
} else {
|
|
2476
|
+
throw new Error("The given element does not have a value setter");
|
|
2477
|
+
}
|
|
2478
|
+
}
|
|
2479
|
+
}
|
|
2480
|
+
Object.keys(eventAliasMap).forEach((aliasKey) => {
|
|
2481
|
+
const key = eventAliasMap[aliasKey];
|
|
2482
|
+
fireEvent[aliasKey] = function() {
|
|
2483
|
+
return fireEvent[key](...arguments);
|
|
2484
|
+
};
|
|
2485
|
+
});
|
|
2486
|
+
function unindent(string) {
|
|
2487
|
+
return string.replace(/[ \t]*[\n][ \t]*/g, "\n");
|
|
2488
|
+
}
|
|
2489
|
+
function encode(value) {
|
|
2490
|
+
return lzString.compressToEncodedURIComponent(unindent(value));
|
|
2491
|
+
}
|
|
2492
|
+
function getPlaygroundUrl(markup) {
|
|
2493
|
+
return "https://testing-playground.com/#markup=" + encode(markup);
|
|
2494
|
+
}
|
|
2495
|
+
const debug = (element, maxLength, options) => Array.isArray(element) ? element.forEach((el) => logDOM(el, maxLength, options)) : logDOM(element, maxLength, options);
|
|
2496
|
+
const logTestingPlaygroundURL = function(element) {
|
|
2497
|
+
if (element === void 0) {
|
|
2498
|
+
element = getDocument().body;
|
|
2499
|
+
}
|
|
2500
|
+
if (!element || !("innerHTML" in element)) {
|
|
2501
|
+
console.log("The element you're providing isn't a valid DOM element.");
|
|
2502
|
+
return;
|
|
2503
|
+
}
|
|
2504
|
+
if (!element.innerHTML) {
|
|
2505
|
+
console.log("The provided element doesn't have any children.");
|
|
2506
|
+
return;
|
|
2507
|
+
}
|
|
2508
|
+
const playgroundUrl = getPlaygroundUrl(element.innerHTML);
|
|
2509
|
+
console.log("Open this URL in your browser\n\n" + playgroundUrl);
|
|
2510
|
+
return playgroundUrl;
|
|
2511
|
+
};
|
|
2512
|
+
const initialValue = {
|
|
2513
|
+
debug,
|
|
2514
|
+
logTestingPlaygroundURL
|
|
2515
|
+
};
|
|
2516
|
+
const screen = typeof document !== "undefined" && document.body ? getQueriesForElement(document.body, queries, initialValue) : Object.keys(queries).reduce((helpers, key) => {
|
|
2517
|
+
helpers[key] = () => {
|
|
2518
|
+
throw new TypeError("For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error");
|
|
2519
|
+
};
|
|
2520
|
+
return helpers;
|
|
2521
|
+
}, initialValue);
|
|
2522
|
+
export {
|
|
2523
|
+
buildQueries,
|
|
2524
|
+
configure,
|
|
2525
|
+
createEvent,
|
|
2526
|
+
findAllByAltText,
|
|
2527
|
+
findAllByDisplayValue,
|
|
2528
|
+
findAllByLabelText,
|
|
2529
|
+
findAllByPlaceholderText,
|
|
2530
|
+
findAllByRole,
|
|
2531
|
+
findAllByTestId,
|
|
2532
|
+
findAllByText,
|
|
2533
|
+
findAllByTitle,
|
|
2534
|
+
findByAltText,
|
|
2535
|
+
findByDisplayValue,
|
|
2536
|
+
findByLabelText,
|
|
2537
|
+
findByPlaceholderText,
|
|
2538
|
+
findByRole,
|
|
2539
|
+
findByTestId,
|
|
2540
|
+
findByText,
|
|
2541
|
+
findByTitle,
|
|
2542
|
+
fireEvent,
|
|
2543
|
+
getAllByAltText,
|
|
2544
|
+
getAllByDisplayValue,
|
|
2545
|
+
getAllByLabelTextWithSuggestions as getAllByLabelText,
|
|
2546
|
+
getAllByPlaceholderText,
|
|
2547
|
+
getAllByRole,
|
|
2548
|
+
getAllByTestId,
|
|
2549
|
+
getAllByText,
|
|
2550
|
+
getAllByTitle,
|
|
2551
|
+
getByAltText,
|
|
2552
|
+
getByDisplayValue,
|
|
2553
|
+
getByLabelTextWithSuggestions as getByLabelText,
|
|
2554
|
+
getByPlaceholderText,
|
|
2555
|
+
getByRole,
|
|
2556
|
+
getByTestId,
|
|
2557
|
+
getByText,
|
|
2558
|
+
getByTitle,
|
|
2559
|
+
getConfig,
|
|
2560
|
+
getDefaultNormalizer,
|
|
2561
|
+
getElementError,
|
|
2562
|
+
getMultipleElementsFoundError,
|
|
2563
|
+
getNodeText,
|
|
2564
|
+
getQueriesForElement,
|
|
2565
|
+
getRoles,
|
|
2566
|
+
getSuggestedQuery,
|
|
2567
|
+
isInaccessible,
|
|
2568
|
+
logDOM,
|
|
2569
|
+
logRoles,
|
|
2570
|
+
makeFindQuery,
|
|
2571
|
+
makeGetAllQuery,
|
|
2572
|
+
makeSingleQuery,
|
|
2573
|
+
prettyDOM,
|
|
2574
|
+
index as prettyFormat,
|
|
2575
|
+
queries,
|
|
2576
|
+
queryAllByAltTextWithSuggestions as queryAllByAltText,
|
|
2577
|
+
queryAllByAttribute,
|
|
2578
|
+
queryAllByDisplayValueWithSuggestions as queryAllByDisplayValue,
|
|
2579
|
+
queryAllByLabelTextWithSuggestions as queryAllByLabelText,
|
|
2580
|
+
queryAllByPlaceholderTextWithSuggestions as queryAllByPlaceholderText,
|
|
2581
|
+
queryAllByRoleWithSuggestions as queryAllByRole,
|
|
2582
|
+
queryAllByTestIdWithSuggestions as queryAllByTestId,
|
|
2583
|
+
queryAllByTextWithSuggestions as queryAllByText,
|
|
2584
|
+
queryAllByTitleWithSuggestions as queryAllByTitle,
|
|
2585
|
+
queryByAltText,
|
|
2586
|
+
queryByAttribute,
|
|
2587
|
+
queryByDisplayValue,
|
|
2588
|
+
queryByLabelText,
|
|
2589
|
+
queryByPlaceholderText,
|
|
2590
|
+
queryByRole,
|
|
2591
|
+
queryByTestId,
|
|
2592
|
+
queryByText,
|
|
2593
|
+
queryByTitle,
|
|
2594
|
+
queryHelpers,
|
|
2595
|
+
screen,
|
|
2596
|
+
waitForWrapper as waitFor,
|
|
2597
|
+
waitForElementToBeRemoved,
|
|
2598
|
+
getQueriesForElement as within,
|
|
2599
|
+
wrapAllByQueryWithSuggestion,
|
|
2600
|
+
wrapSingleQueryWithSuggestion
|
|
2601
|
+
};
|