@cloudscape-design/board-components 3.0.117 → 3.0.119

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/test-utils/dom/index.ts"],"names":[],"mappings":";;;AACA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAwE;AAG/D,+FAHA,oBAAc,OAGA;AAFvB,oEAA0E;AAI1E,mCAAmC;AAM1B,uBANF,eAAY,CAME;AALrB,6CAA4C;AAMnC,2BANF,oBAAgB,CAME;AALzB,mDAAkD;AAMzC,8BANF,uBAAmB,CAME;AAL5B,iDAAgD;AAMvC,6BANF,sBAAkB,CAME;AAqF3B,oBAAc,CAAC,SAAS,CAAC,SAAS,GAAG,UAAS,QAAQ;IACpD,MAAM,YAAY,GAAG,IAAI,eAAY,CAAC,YAAY,EAAE,CAAC;IACrD,+DAA+D;IAC/D,uDAAuD;IACvD,OAAQ,IAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAc,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,eAAY,CAAC,CAAC;AACrH,CAAC,CAAC;AAEF,oBAAc,CAAC,SAAS,CAAC,aAAa,GAAG,UAAS,QAAQ;IACxD,OAAO,IAAI,CAAC,iBAAiB,CAAC,eAAY,EAAE,QAAQ,CAAC,CAAC;AACxD,CAAC,CAAC;AACF,oBAAc,CAAC,SAAS,CAAC,aAAa,GAAG,UAAS,QAAQ;IACxD,MAAM,YAAY,GAAG,IAAI,oBAAgB,CAAC,YAAY,EAAE,CAAC;IACzD,+DAA+D;IAC/D,uDAAuD;IACvD,OAAQ,IAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAc,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,oBAAgB,CAAC,CAAC;AACzH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C,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAC9D,OAAO,CAAC,IAAI,CAAC,2GAA2G,CAAC,CAAA;KAC1H;IAAA,CAAC;IACF,OAAO,IAAI,oBAAc,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AALD,0BAKC","sourcesContent":["\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ElementWrapper } from '@cloudscape-design/test-utils-core/dom';\nimport { appendSelector } from '@cloudscape-design/test-utils-core/utils';\n\nexport { ElementWrapper };\n\nimport BoardWrapper from './board';\nimport BoardItemWrapper from './board-item';\nimport ItemsPaletteWrapper from './items-palette';\nimport PaletteItemWrapper from './palette-item';\n\n\nexport { BoardWrapper };\nexport { BoardItemWrapper };\nexport { ItemsPaletteWrapper };\nexport { PaletteItemWrapper };\n\ndeclare module '@cloudscape-design/test-utils-core/dist/dom' {\n interface ElementWrapper {\n \n/**\n * Returns the wrapper of the first Board that matches the specified CSS selector.\n * If no CSS selector is specified, returns the wrapper of the first Board.\n * If no matching Board is found, returns `null`.\n *\n * @param {string} [selector] CSS Selector\n * @returns {BoardWrapper | null}\n */\nfindBoard(selector?: string): BoardWrapper | null;\n\n/**\n * Returns an array of Board wrapper that matches the specified CSS selector.\n * If no CSS selector is specified, returns all of the Boards inside the current wrapper.\n * If no matching Board is found, returns an empty array.\n *\n * @param {string} [selector] CSS Selector\n * @returns {Array<BoardWrapper>}\n */\nfindAllBoards(selector?: string): Array<BoardWrapper>;\n/**\n * Returns the wrapper of the first BoardItem that matches the specified CSS selector.\n * If no CSS selector is specified, returns the wrapper of the first BoardItem.\n * If no matching BoardItem is found, returns `null`.\n *\n * @param {string} [selector] CSS Selector\n * @returns {BoardItemWrapper | null}\n */\nfindBoardItem(selector?: string): BoardItemWrapper | null;\n\n/**\n * Returns an array of BoardItem wrapper that matches the specified CSS selector.\n * If no CSS selector is specified, returns all of the BoardItems inside the current wrapper.\n * If no matching BoardItem is found, returns an empty array.\n *\n * @param {string} [selector] CSS Selector\n * @returns {Array<BoardItemWrapper>}\n */\nfindAllBoardItems(selector?: string): Array<BoardItemWrapper>;\n/**\n * Returns the wrapper of the first ItemsPalette that matches the specified CSS selector.\n * If no CSS selector is specified, returns the wrapper of the first ItemsPalette.\n * If no matching ItemsPalette is found, returns `null`.\n *\n * @param {string} [selector] CSS Selector\n * @returns {ItemsPaletteWrapper | null}\n */\nfindItemsPalette(selector?: string): ItemsPaletteWrapper | null;\n\n/**\n * Returns an array of ItemsPalette wrapper that matches the specified CSS selector.\n * If no CSS selector is specified, returns all of the ItemsPalettes inside the current wrapper.\n * If no matching ItemsPalette is found, returns an empty array.\n *\n * @param {string} [selector] CSS Selector\n * @returns {Array<ItemsPaletteWrapper>}\n */\nfindAllItemsPalettes(selector?: string): Array<ItemsPaletteWrapper>;\n/**\n * Returns the wrapper of the first PaletteItem that matches the specified CSS selector.\n * If no CSS selector is specified, returns the wrapper of the first PaletteItem.\n * If no matching PaletteItem is found, returns `null`.\n *\n * @param {string} [selector] CSS Selector\n * @returns {PaletteItemWrapper | null}\n */\nfindPaletteItem(selector?: string): PaletteItemWrapper | null;\n\n/**\n * Returns an array of PaletteItem wrapper that matches the specified CSS selector.\n * If no CSS selector is specified, returns all of the PaletteItems inside the current wrapper.\n * If no matching PaletteItem is found, returns an empty array.\n *\n * @param {string} [selector] CSS Selector\n * @returns {Array<PaletteItemWrapper>}\n */\nfindAllPaletteItems(selector?: string): Array<PaletteItemWrapper>;\n }\n}\n\n\nElementWrapper.prototype.findBoard = function(selector) {\n const rootSelector = `.${BoardWrapper.rootSelector}`;\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, BoardWrapper);\n};\n\nElementWrapper.prototype.findAllBoards = function(selector) {\n return this.findAllComponents(BoardWrapper, selector);\n};\nElementWrapper.prototype.findBoardItem = function(selector) {\n const rootSelector = `.${BoardItemWrapper.rootSelector}`;\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, BoardItemWrapper);\n};\n\nElementWrapper.prototype.findAllBoardItems = function(selector) {\n return this.findAllComponents(BoardItemWrapper, selector);\n};\nElementWrapper.prototype.findItemsPalette = function(selector) {\n const rootSelector = `.${ItemsPaletteWrapper.rootSelector}`;\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, ItemsPaletteWrapper);\n};\n\nElementWrapper.prototype.findAllItemsPalettes = function(selector) {\n return this.findAllComponents(ItemsPaletteWrapper, selector);\n};\nElementWrapper.prototype.findPaletteItem = function(selector) {\n const rootSelector = `.${PaletteItemWrapper.rootSelector}`;\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, PaletteItemWrapper);\n};\n\nElementWrapper.prototype.findAllPaletteItems = function(selector) {\n return this.findAllComponents(PaletteItemWrapper, selector);\n};\n\n\nexport default function wrapper(root: Element = document.body) {\n if (document && document.body && !document.body.contains(root)) {\n console.warn('[AwsUi] [test-utils] provided element is not part of the document body, interactions may work incorrectly')\n };\n return new ElementWrapper(root);\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/test-utils/dom/index.ts"],"names":[],"mappings":";;;AACA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAwE;AAG/D,+FAHA,oBAAc,OAGA;AAFvB,oEAA0E;AAI1E,mCAAmC;AAM1B,uBANF,eAAY,CAME;AALrB,6CAA4C;AAMnC,2BANF,oBAAgB,CAME;AALzB,mDAAkD;AAMzC,8BANF,uBAAmB,CAME;AAL5B,iDAAgD;AAMvC,6BANF,sBAAkB,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AAI,CAAC,iBAAiB,CAAC,sBAAkB,EAAE,QAAQ,CAAC,CAAC;AAC9D,CAAC,CAAC;AAGF,SAAwB,OAAO,CAAC,OAAgB,QAAQ,CAAC,IAAI;IAC3D,IAAI,QAAQ,IAAI,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAC9D,OAAO,CAAC,IAAI,CAAC,2GAA2G,CAAC,CAAA;KAC1H;IAAA,CAAC;IACF,OAAO,IAAI,oBAAc,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AALD,0BAKC","sourcesContent":["\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ElementWrapper } from '@cloudscape-design/test-utils-core/dom';\nimport { appendSelector } from '@cloudscape-design/test-utils-core/utils';\n\nexport { ElementWrapper };\n\nimport BoardWrapper from './board';\nimport BoardItemWrapper from './board-item';\nimport ItemsPaletteWrapper from './items-palette';\nimport PaletteItemWrapper from './palette-item';\n\n\nexport { BoardWrapper };\nexport { BoardItemWrapper };\nexport { ItemsPaletteWrapper };\nexport { PaletteItemWrapper };\n\ndeclare module '@cloudscape-design/test-utils-core/dist/dom' {\n interface ElementWrapper {\n \n/**\n * Returns the wrapper of the first Board that matches the specified CSS selector.\n * If no CSS selector is specified, returns the wrapper of the first Board.\n * If no matching Board is found, returns `null`.\n *\n * @param {string} [selector] CSS Selector\n * @returns {BoardWrapper | null}\n */\nfindBoard(selector?: string): BoardWrapper | null;\n\n/**\n * Returns an array of Board wrapper that matches the specified CSS selector.\n * If no CSS selector is specified, returns all of the Boards inside the current wrapper.\n * If no matching Board is found, returns an empty array.\n *\n * @param {string} [selector] CSS Selector\n * @returns {Array<BoardWrapper>}\n */\nfindAllBoards(selector?: string): Array<BoardWrapper>;\n/**\n * Returns the wrapper of the first BoardItem that matches the specified CSS selector.\n * If no CSS selector is specified, returns the wrapper of the first BoardItem.\n * If no matching BoardItem is found, returns `null`.\n *\n * @param {string} [selector] CSS Selector\n * @returns {BoardItemWrapper | null}\n */\nfindBoardItem(selector?: string): BoardItemWrapper | null;\n\n/**\n * Returns an array of BoardItem wrapper that matches the specified CSS selector.\n * If no CSS selector is specified, returns all of the BoardItems inside the current wrapper.\n * If no matching BoardItem is found, returns an empty array.\n *\n * @param {string} [selector] CSS Selector\n * @returns {Array<BoardItemWrapper>}\n */\nfindAllBoardItems(selector?: string): Array<BoardItemWrapper>;\n/**\n * Returns the wrapper of the first ItemsPalette that matches the specified CSS selector.\n * If no CSS selector is specified, returns the wrapper of the first ItemsPalette.\n * If no matching ItemsPalette is found, returns `null`.\n *\n * @param {string} [selector] CSS Selector\n * @returns {ItemsPaletteWrapper | null}\n */\nfindItemsPalette(selector?: string): ItemsPaletteWrapper | null;\n\n/**\n * Returns an array of ItemsPalette wrapper that matches the specified CSS selector.\n * If no CSS selector is specified, returns all of the ItemsPalettes inside the current wrapper.\n * If no matching ItemsPalette is found, returns an empty array.\n *\n * @param {string} [selector] CSS Selector\n * @returns {Array<ItemsPaletteWrapper>}\n */\nfindAllItemsPalettes(selector?: string): Array<ItemsPaletteWrapper>;\n/**\n * Returns the wrapper of the first PaletteItem that matches the specified CSS selector.\n * If no CSS selector is specified, returns the wrapper of the first PaletteItem.\n * If no matching PaletteItem is found, returns `null`.\n *\n * @param {string} [selector] CSS Selector\n * @returns {PaletteItemWrapper | null}\n */\nfindPaletteItem(selector?: string): PaletteItemWrapper | null;\n\n/**\n * Returns an array of PaletteItem wrapper that matches the specified CSS selector.\n * If no CSS selector is specified, returns all of the PaletteItems inside the current wrapper.\n * If no matching PaletteItem is found, returns an empty array.\n *\n * @param {string} [selector] CSS Selector\n * @returns {Array<PaletteItemWrapper>}\n */\nfindAllPaletteItems(selector?: string): Array<PaletteItemWrapper>;\n }\n}\n\n\nElementWrapper.prototype.findBoard = function(selector) {\n let rootSelector = `.${BoardWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in BoardWrapper && BoardWrapper.legacyRootSelector){\n rootSelector = `:is(.${BoardWrapper.rootSelector}, .${BoardWrapper.legacyRootSelector})`;\n }\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, BoardWrapper);\n};\n\nElementWrapper.prototype.findAllBoards = function(selector) {\n return this.findAllComponents(BoardWrapper, selector);\n};\nElementWrapper.prototype.findBoardItem = function(selector) {\n let rootSelector = `.${BoardItemWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in BoardItemWrapper && BoardItemWrapper.legacyRootSelector){\n rootSelector = `:is(.${BoardItemWrapper.rootSelector}, .${BoardItemWrapper.legacyRootSelector})`;\n }\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, BoardItemWrapper);\n};\n\nElementWrapper.prototype.findAllBoardItems = function(selector) {\n return this.findAllComponents(BoardItemWrapper, selector);\n};\nElementWrapper.prototype.findItemsPalette = function(selector) {\n let rootSelector = `.${ItemsPaletteWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in ItemsPaletteWrapper && ItemsPaletteWrapper.legacyRootSelector){\n rootSelector = `:is(.${ItemsPaletteWrapper.rootSelector}, .${ItemsPaletteWrapper.legacyRootSelector})`;\n }\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, ItemsPaletteWrapper);\n};\n\nElementWrapper.prototype.findAllItemsPalettes = function(selector) {\n return this.findAllComponents(ItemsPaletteWrapper, selector);\n};\nElementWrapper.prototype.findPaletteItem = function(selector) {\n let rootSelector = `.${PaletteItemWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in PaletteItemWrapper && PaletteItemWrapper.legacyRootSelector){\n rootSelector = `:is(.${PaletteItemWrapper.rootSelector}, .${PaletteItemWrapper.legacyRootSelector})`;\n }\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, PaletteItemWrapper);\n};\n\nElementWrapper.prototype.findAllPaletteItems = function(selector) {\n return this.findAllComponents(PaletteItemWrapper, selector);\n};\n\n\nexport default function wrapper(root: Element = document.body) {\n if (document && document.body && !document.body.contains(root)) {\n console.warn('[AwsUi] [test-utils] provided element is not part of the document body, interactions may work incorrectly')\n };\n return new ElementWrapper(root);\n}\n"]}
@@ -15,7 +15,10 @@ exports.ItemsPaletteWrapper = items_palette_1.default;
15
15
  const palette_item_1 = require("./palette-item");
16
16
  exports.PaletteItemWrapper = palette_item_1.default;
17
17
  selectors_1.ElementWrapper.prototype.findBoard = function (selector) {
18
- const rootSelector = `.${board_1.default.rootSelector}`;
18
+ let rootSelector = `.${board_1.default.rootSelector}`;
19
+ if ("legacyRootSelector" in board_1.default && board_1.default.legacyRootSelector) {
20
+ rootSelector = `:is(.${board_1.default.rootSelector}, .${board_1.default.legacyRootSelector})`;
21
+ }
19
22
  // casting to 'any' is needed to avoid this issue with generics
20
23
  // https://github.com/microsoft/TypeScript/issues/29132
21
24
  return this.findComponent(selector ? (0, utils_1.appendSelector)(selector, rootSelector) : rootSelector, board_1.default);
@@ -24,7 +27,10 @@ selectors_1.ElementWrapper.prototype.findAllBoards = function (selector) {
24
27
  return this.findAllComponents(board_1.default, selector);
25
28
  };
26
29
  selectors_1.ElementWrapper.prototype.findBoardItem = function (selector) {
27
- const rootSelector = `.${board_item_1.default.rootSelector}`;
30
+ let rootSelector = `.${board_item_1.default.rootSelector}`;
31
+ if ("legacyRootSelector" in board_item_1.default && board_item_1.default.legacyRootSelector) {
32
+ rootSelector = `:is(.${board_item_1.default.rootSelector}, .${board_item_1.default.legacyRootSelector})`;
33
+ }
28
34
  // casting to 'any' is needed to avoid this issue with generics
29
35
  // https://github.com/microsoft/TypeScript/issues/29132
30
36
  return this.findComponent(selector ? (0, utils_1.appendSelector)(selector, rootSelector) : rootSelector, board_item_1.default);
@@ -33,7 +39,10 @@ selectors_1.ElementWrapper.prototype.findAllBoardItems = function (selector) {
33
39
  return this.findAllComponents(board_item_1.default, selector);
34
40
  };
35
41
  selectors_1.ElementWrapper.prototype.findItemsPalette = function (selector) {
36
- const rootSelector = `.${items_palette_1.default.rootSelector}`;
42
+ let rootSelector = `.${items_palette_1.default.rootSelector}`;
43
+ if ("legacyRootSelector" in items_palette_1.default && items_palette_1.default.legacyRootSelector) {
44
+ rootSelector = `:is(.${items_palette_1.default.rootSelector}, .${items_palette_1.default.legacyRootSelector})`;
45
+ }
37
46
  // casting to 'any' is needed to avoid this issue with generics
38
47
  // https://github.com/microsoft/TypeScript/issues/29132
39
48
  return this.findComponent(selector ? (0, utils_1.appendSelector)(selector, rootSelector) : rootSelector, items_palette_1.default);
@@ -42,7 +51,10 @@ selectors_1.ElementWrapper.prototype.findAllItemsPalettes = function (selector)
42
51
  return this.findAllComponents(items_palette_1.default, selector);
43
52
  };
44
53
  selectors_1.ElementWrapper.prototype.findPaletteItem = function (selector) {
45
- const rootSelector = `.${palette_item_1.default.rootSelector}`;
54
+ let rootSelector = `.${palette_item_1.default.rootSelector}`;
55
+ if ("legacyRootSelector" in palette_item_1.default && palette_item_1.default.legacyRootSelector) {
56
+ rootSelector = `:is(.${palette_item_1.default.rootSelector}, .${palette_item_1.default.legacyRootSelector})`;
57
+ }
46
58
  // casting to 'any' is needed to avoid this issue with generics
47
59
  // https://github.com/microsoft/TypeScript/issues/29132
48
60
  return this.findComponent(selector ? (0, utils_1.appendSelector)(selector, rootSelector) : rootSelector, palette_item_1.default);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/test-utils/selectors/index.ts"],"names":[],"mappings":";;;AACA,qEAAqE;AACrE,sCAAsC;AACtC,4EAA8E;AAGrE,+FAHA,0BAAc,OAGA;AAFvB,o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C;IAC5D,+DAA+D;IAC/D,uDAAuD;IACvD,OAAQ,IAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAc,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,uBAAmB,CAAC,CAAC;AAC5H,CAAC,CAAC;AAEF,0BAAc,CAAC,SAAS,CAAC,oBAAoB,GAAG,UAAS,QAAQ;IAC/D,OAAO,IAAI,CAAC,iBAAiB,CAAC,uBAAmB,EAAE,QAAQ,CAAC,CAAC;AAC/D,CAAC,CAAC;AACF,0BAAc,CAAC,SAAS,CAAC,eAAe,GAAG,UAAS,QAAQ;IAC1D,MAAM,YAAY,GAAG,IAAI,sBAAkB,CAAC,YAAY,EAAE,CAAC;IAC3D,+DAA+D;IAC/D,uDAAuD;IACvD,OAAQ,IAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAc,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,sBAAkB,CAAC,CAAC;AAC3H,CAAC,CAAC;AAEF,0BAAc,CAAC,SAAS,CAAC,mBAAmB,GAAG,UAAS,QAAQ;IAC9D,OAAO,IAAI,CAAC,iBAAiB,CAAC,sBAAkB,EAAE,QAAQ,CAAC,CAAC;AAC9D,CAAC,CAAC;AAGF,SAAwB,OAAO,CAAC,OAAe,MAAM;IACnD,OAAO,IAAI,0BAAc,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,0BAEC","sourcesContent":["\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ElementWrapper } from '@cloudscape-design/test-utils-core/selectors';\nimport { appendSelector } from '@cloudscape-design/test-utils-core/utils';\n\nexport { ElementWrapper };\n\nimport BoardWrapper from './board';\nimport BoardItemWrapper from './board-item';\nimport ItemsPaletteWrapper from './items-palette';\nimport PaletteItemWrapper from './palette-item';\n\n\nexport { BoardWrapper };\nexport { BoardItemWrapper };\nexport { ItemsPaletteWrapper };\nexport { PaletteItemWrapper };\n\ndeclare module '@cloudscape-design/test-utils-core/dist/selectors' {\n interface ElementWrapper {\n \n/**\n * Returns a wrapper that matches the Boards with the specified CSS selector.\n * If no CSS selector is specified, returns a wrapper that matches Boards.\n *\n * @param {string} [selector] CSS Selector\n * @returns {BoardWrapper}\n */\nfindBoard(selector?: string): BoardWrapper;\n\n/**\n * Returns a multi-element wrapper that matches Boards with the specified CSS selector.\n * If no CSS selector is specified, returns a multi-element wrapper that matches Boards.\n *\n * @param {string} [selector] CSS Selector\n * @returns {MultiElementWrapper<BoardWrapper>}\n */\nfindAllBoards(selector?: string): MultiElementWrapper<BoardWrapper>;\n/**\n * Returns a wrapper that matches the BoardItems with the specified CSS selector.\n * If no CSS selector is specified, returns a wrapper that matches BoardItems.\n *\n * @param {string} [selector] CSS Selector\n * @returns {BoardItemWrapper}\n */\nfindBoardItem(selector?: string): BoardItemWrapper;\n\n/**\n * Returns a multi-element wrapper that matches BoardItems with the specified CSS selector.\n * If no CSS selector is specified, returns a multi-element wrapper that matches BoardItems.\n *\n * @param {string} [selector] CSS Selector\n * @returns {MultiElementWrapper<BoardItemWrapper>}\n */\nfindAllBoardItems(selector?: string): MultiElementWrapper<BoardItemWrapper>;\n/**\n * Returns a wrapper that matches the ItemsPalettes with the specified CSS selector.\n * If no CSS selector is specified, returns a wrapper that matches ItemsPalettes.\n *\n * @param {string} [selector] CSS Selector\n * @returns {ItemsPaletteWrapper}\n */\nfindItemsPalette(selector?: string): ItemsPaletteWrapper;\n\n/**\n * Returns a multi-element wrapper that matches ItemsPalettes with the specified CSS selector.\n * If no CSS selector is specified, returns a multi-element wrapper that matches ItemsPalettes.\n *\n * @param {string} [selector] CSS Selector\n * @returns {MultiElementWrapper<ItemsPaletteWrapper>}\n */\nfindAllItemsPalettes(selector?: string): MultiElementWrapper<ItemsPaletteWrapper>;\n/**\n * Returns a wrapper that matches the PaletteItems with the specified CSS selector.\n * If no CSS selector is specified, returns a wrapper that matches PaletteItems.\n *\n * @param {string} [selector] CSS Selector\n * @returns {PaletteItemWrapper}\n */\nfindPaletteItem(selector?: string): PaletteItemWrapper;\n\n/**\n * Returns a multi-element wrapper that matches PaletteItems with the specified CSS selector.\n * If no CSS selector is specified, returns a multi-element wrapper that matches PaletteItems.\n *\n * @param {string} [selector] CSS Selector\n * @returns {MultiElementWrapper<PaletteItemWrapper>}\n */\nfindAllPaletteItems(selector?: string): MultiElementWrapper<PaletteItemWrapper>;\n }\n}\n\n\nElementWrapper.prototype.findBoard = function(selector) {\n const rootSelector = `.${BoardWrapper.rootSelector}`;\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, BoardWrapper);\n};\n\nElementWrapper.prototype.findAllBoards = function(selector) {\n return this.findAllComponents(BoardWrapper, selector);\n};\nElementWrapper.prototype.findBoardItem = function(selector) {\n const rootSelector = `.${BoardItemWrapper.rootSelector}`;\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, BoardItemWrapper);\n};\n\nElementWrapper.prototype.findAllBoardItems = function(selector) {\n return this.findAllComponents(BoardItemWrapper, selector);\n};\nElementWrapper.prototype.findItemsPalette = function(selector) {\n const rootSelector = `.${ItemsPaletteWrapper.rootSelector}`;\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, ItemsPaletteWrapper);\n};\n\nElementWrapper.prototype.findAllItemsPalettes = function(selector) {\n return this.findAllComponents(ItemsPaletteWrapper, selector);\n};\nElementWrapper.prototype.findPaletteItem = function(selector) {\n const rootSelector = `.${PaletteItemWrapper.rootSelector}`;\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, PaletteItemWrapper);\n};\n\nElementWrapper.prototype.findAllPaletteItems = function(selector) {\n return this.findAllComponents(PaletteItemWrapper, selector);\n};\n\n\nexport default function wrapper(root: string = 'body') {\n return new ElementWrapper(root);\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/test-utils/selectors/index.ts"],"names":[],"mappings":";;;AACA,qEAAqE;AACrE,sCAAsC;AACtC,4EAA8E;AAGrE,+FAHA,0BAAc,OAGA;AAFvB,oEAA0E;AAI1E,mCAAmC;AAM1B,uBANF,eAAY,CAME;AALrB,6CAA4C;AAMnC,2BANF,oBAAgB,CAME;AALzB,mDAAkD;AAMzC,8BANF,uBAAmB,CAME;AAL5B,iDAAgD;AAMvC,6BANF,sBAAkB,CAME;AA6E3B,0BAAc,CAAC,SAAS,CAAC,SAAS,GAAG,UAAS,QAAQ;IACpD,IAAI,YAAY,GAAG,IAAI,eAAY,CAAC,YAAY,EAAE,CAAC;IACnD,IAAG,oBAAoB,IAAI,eAAY,IAAI,eAAY,CAAC,kBAAkB,EAAC;QACzE,YAAY,GAAG,QAAQ,eAAY,CAAC,YAAY,MAAM,eAAY,CAAC,kBAAkB,GAAG,CAAC;KAC1F;IACD,+DAA+D;IAC/D,uDAAuD;IACvD,OAAQ,IAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAc,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,eAAY,CAAC,CAAC;AACrH,CAAC,CAAC;AAEF,0BAAc,CAAC,SAAS,CAAC,aAAa,GAAG,UAAS,QAAQ;IACxD,OAAO,IAAI,CAAC,iBAAiB,CAAC,eAAY,EAAE,QAAQ,CAAC,CAAC;AACxD,CAAC,CAAC;AACF,0BAAc,CAAC,SAAS,CAAC,aAAa,GAAG,UAAS,QAAQ;IACxD,IAAI,YAAY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AAC,eAAe,GAAG,UAAS,QAAQ;IAC1D,IAAI,YAAY,GAAG,IAAI,sBAAkB,CAAC,YAAY,EAAE,CAAC;IACzD,IAAG,oBAAoB,IAAI,sBAAkB,IAAI,sBAAkB,CAAC,kBAAkB,EAAC;QACrF,YAAY,GAAG,QAAQ,sBAAkB,CAAC,YAAY,MAAM,sBAAkB,CAAC,kBAAkB,GAAG,CAAC;KACtG;IACD,+DAA+D;IAC/D,uDAAuD;IACvD,OAAQ,IAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,sBAAc,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,sBAAkB,CAAC,CAAC;AAC3H,CAAC,CAAC;AAEF,0BAAc,CAAC,SAAS,CAAC,mBAAmB,GAAG,UAAS,QAAQ;IAC9D,OAAO,IAAI,CAAC,iBAAiB,CAAC,sBAAkB,EAAE,QAAQ,CAAC,CAAC;AAC9D,CAAC,CAAC;AAGF,SAAwB,OAAO,CAAC,OAAe,MAAM;IACnD,OAAO,IAAI,0BAAc,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAFD,0BAEC","sourcesContent":["\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ElementWrapper } from '@cloudscape-design/test-utils-core/selectors';\nimport { appendSelector } from '@cloudscape-design/test-utils-core/utils';\n\nexport { ElementWrapper };\n\nimport BoardWrapper from './board';\nimport BoardItemWrapper from './board-item';\nimport ItemsPaletteWrapper from './items-palette';\nimport PaletteItemWrapper from './palette-item';\n\n\nexport { BoardWrapper };\nexport { BoardItemWrapper };\nexport { ItemsPaletteWrapper };\nexport { PaletteItemWrapper };\n\ndeclare module '@cloudscape-design/test-utils-core/dist/selectors' {\n interface ElementWrapper {\n \n/**\n * Returns a wrapper that matches the Boards with the specified CSS selector.\n * If no CSS selector is specified, returns a wrapper that matches Boards.\n *\n * @param {string} [selector] CSS Selector\n * @returns {BoardWrapper}\n */\nfindBoard(selector?: string): BoardWrapper;\n\n/**\n * Returns a multi-element wrapper that matches Boards with the specified CSS selector.\n * If no CSS selector is specified, returns a multi-element wrapper that matches Boards.\n *\n * @param {string} [selector] CSS Selector\n * @returns {MultiElementWrapper<BoardWrapper>}\n */\nfindAllBoards(selector?: string): MultiElementWrapper<BoardWrapper>;\n/**\n * Returns a wrapper that matches the BoardItems with the specified CSS selector.\n * If no CSS selector is specified, returns a wrapper that matches BoardItems.\n *\n * @param {string} [selector] CSS Selector\n * @returns {BoardItemWrapper}\n */\nfindBoardItem(selector?: string): BoardItemWrapper;\n\n/**\n * Returns a multi-element wrapper that matches BoardItems with the specified CSS selector.\n * If no CSS selector is specified, returns a multi-element wrapper that matches BoardItems.\n *\n * @param {string} [selector] CSS Selector\n * @returns {MultiElementWrapper<BoardItemWrapper>}\n */\nfindAllBoardItems(selector?: string): MultiElementWrapper<BoardItemWrapper>;\n/**\n * Returns a wrapper that matches the ItemsPalettes with the specified CSS selector.\n * If no CSS selector is specified, returns a wrapper that matches ItemsPalettes.\n *\n * @param {string} [selector] CSS Selector\n * @returns {ItemsPaletteWrapper}\n */\nfindItemsPalette(selector?: string): ItemsPaletteWrapper;\n\n/**\n * Returns a multi-element wrapper that matches ItemsPalettes with the specified CSS selector.\n * If no CSS selector is specified, returns a multi-element wrapper that matches ItemsPalettes.\n *\n * @param {string} [selector] CSS Selector\n * @returns {MultiElementWrapper<ItemsPaletteWrapper>}\n */\nfindAllItemsPalettes(selector?: string): MultiElementWrapper<ItemsPaletteWrapper>;\n/**\n * Returns a wrapper that matches the PaletteItems with the specified CSS selector.\n * If no CSS selector is specified, returns a wrapper that matches PaletteItems.\n *\n * @param {string} [selector] CSS Selector\n * @returns {PaletteItemWrapper}\n */\nfindPaletteItem(selector?: string): PaletteItemWrapper;\n\n/**\n * Returns a multi-element wrapper that matches PaletteItems with the specified CSS selector.\n * If no CSS selector is specified, returns a multi-element wrapper that matches PaletteItems.\n *\n * @param {string} [selector] CSS Selector\n * @returns {MultiElementWrapper<PaletteItemWrapper>}\n */\nfindAllPaletteItems(selector?: string): MultiElementWrapper<PaletteItemWrapper>;\n }\n}\n\n\nElementWrapper.prototype.findBoard = function(selector) {\n let rootSelector = `.${BoardWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in BoardWrapper && BoardWrapper.legacyRootSelector){\n rootSelector = `:is(.${BoardWrapper.rootSelector}, .${BoardWrapper.legacyRootSelector})`;\n }\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, BoardWrapper);\n};\n\nElementWrapper.prototype.findAllBoards = function(selector) {\n return this.findAllComponents(BoardWrapper, selector);\n};\nElementWrapper.prototype.findBoardItem = function(selector) {\n let rootSelector = `.${BoardItemWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in BoardItemWrapper && BoardItemWrapper.legacyRootSelector){\n rootSelector = `:is(.${BoardItemWrapper.rootSelector}, .${BoardItemWrapper.legacyRootSelector})`;\n }\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, BoardItemWrapper);\n};\n\nElementWrapper.prototype.findAllBoardItems = function(selector) {\n return this.findAllComponents(BoardItemWrapper, selector);\n};\nElementWrapper.prototype.findItemsPalette = function(selector) {\n let rootSelector = `.${ItemsPaletteWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in ItemsPaletteWrapper && ItemsPaletteWrapper.legacyRootSelector){\n rootSelector = `:is(.${ItemsPaletteWrapper.rootSelector}, .${ItemsPaletteWrapper.legacyRootSelector})`;\n }\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, ItemsPaletteWrapper);\n};\n\nElementWrapper.prototype.findAllItemsPalettes = function(selector) {\n return this.findAllComponents(ItemsPaletteWrapper, selector);\n};\nElementWrapper.prototype.findPaletteItem = function(selector) {\n let rootSelector = `.${PaletteItemWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in PaletteItemWrapper && PaletteItemWrapper.legacyRootSelector){\n rootSelector = `:is(.${PaletteItemWrapper.rootSelector}, .${PaletteItemWrapper.legacyRootSelector})`;\n }\n // casting to 'any' is needed to avoid this issue with generics\n // https://github.com/microsoft/TypeScript/issues/29132\n return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, PaletteItemWrapper);\n};\n\nElementWrapper.prototype.findAllPaletteItems = function(selector) {\n return this.findAllComponents(PaletteItemWrapper, selector);\n};\n\n\nexport default function wrapper(root: string = 'body') {\n return new ElementWrapper(root);\n}\n"]}