@cloudscape-design/board-components 3.0.154 → 3.0.155

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,5 +1,5 @@
1
1
  export var PACKAGE_SOURCE = "board-components";
2
- export var PACKAGE_VERSION = "3.0.0 (14ffbdfe)";
2
+ export var PACKAGE_VERSION = "3.0.0 (20d94345)";
3
3
  export var THEME = "open-source-visual-refresh";
4
4
  export var ALWAYS_VISUAL_REFRESH = true;
5
5
  export var SYSTEM = "core";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "PACKAGE_SOURCE": "board-components",
3
- "PACKAGE_VERSION": "3.0.0 (14ffbdfe)",
3
+ "PACKAGE_VERSION": "3.0.0 (20d94345)",
4
4
  "THEME": "open-source-visual-refresh",
5
5
  "ALWAYS_VISUAL_REFRESH": true,
6
6
  "SYSTEM": "core"
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "14ffbdfec8aa653290c153bbb7493291e964297d"
2
+ "commit": "20d943458058daf108ed685b64bd28dbfec8834f"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudscape-design/board-components",
3
- "version": "3.0.154",
3
+ "version": "3.0.155",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/cloudscape-design/board-components.git"
@@ -28,6 +28,14 @@ declare module '@cloudscape-design/test-utils-core/dist/dom' {
28
28
  * @returns {Array<BoardWrapper>}
29
29
  */
30
30
  findAllBoards(selector?: string): Array<BoardWrapper>;
31
+ /**
32
+ * Returns the wrapper of the closest parent Board for the current element,
33
+ * or the element itself if it is an instance of Board.
34
+ * If no Board is found, returns `null`.
35
+ *
36
+ * @returns {BoardWrapper | null}
37
+ */
38
+ findClosestBoard(): BoardWrapper | null;
31
39
  /**
32
40
  * Returns the wrapper of the first BoardItem that matches the specified CSS selector.
33
41
  * If no CSS selector is specified, returns the wrapper of the first BoardItem.
@@ -46,6 +54,14 @@ declare module '@cloudscape-design/test-utils-core/dist/dom' {
46
54
  * @returns {Array<BoardItemWrapper>}
47
55
  */
48
56
  findAllBoardItems(selector?: string): Array<BoardItemWrapper>;
57
+ /**
58
+ * Returns the wrapper of the closest parent BoardItem for the current element,
59
+ * or the element itself if it is an instance of BoardItem.
60
+ * If no BoardItem is found, returns `null`.
61
+ *
62
+ * @returns {BoardItemWrapper | null}
63
+ */
64
+ findClosestBoardItem(): BoardItemWrapper | null;
49
65
  /**
50
66
  * Returns the wrapper of the first ItemsPalette that matches the specified CSS selector.
51
67
  * If no CSS selector is specified, returns the wrapper of the first ItemsPalette.
@@ -64,6 +80,14 @@ declare module '@cloudscape-design/test-utils-core/dist/dom' {
64
80
  * @returns {Array<ItemsPaletteWrapper>}
65
81
  */
66
82
  findAllItemsPalettes(selector?: string): Array<ItemsPaletteWrapper>;
83
+ /**
84
+ * Returns the wrapper of the closest parent ItemsPalette for the current element,
85
+ * or the element itself if it is an instance of ItemsPalette.
86
+ * If no ItemsPalette is found, returns `null`.
87
+ *
88
+ * @returns {ItemsPaletteWrapper | null}
89
+ */
90
+ findClosestItemsPalette(): ItemsPaletteWrapper | null;
67
91
  /**
68
92
  * Returns the wrapper of the first PaletteItem that matches the specified CSS selector.
69
93
  * If no CSS selector is specified, returns the wrapper of the first PaletteItem.
@@ -82,6 +106,14 @@ declare module '@cloudscape-design/test-utils-core/dist/dom' {
82
106
  * @returns {Array<PaletteItemWrapper>}
83
107
  */
84
108
  findAllPaletteItems(selector?: string): Array<PaletteItemWrapper>;
109
+ /**
110
+ * Returns the wrapper of the closest parent PaletteItem for the current element,
111
+ * or the element itself if it is an instance of PaletteItem.
112
+ * If no PaletteItem is found, returns `null`.
113
+ *
114
+ * @returns {PaletteItemWrapper | null}
115
+ */
116
+ findClosestPaletteItem(): PaletteItemWrapper | null;
85
117
  }
86
118
  }
87
119
  export default function wrapper(root?: Element): ElementWrapper<Element>;
@@ -62,6 +62,26 @@ dom_1.ElementWrapper.prototype.findPaletteItem = function (selector) {
62
62
  dom_1.ElementWrapper.prototype.findAllPaletteItems = function (selector) {
63
63
  return this.findAllComponents(palette_item_1.default, selector);
64
64
  };
65
+ dom_1.ElementWrapper.prototype.findClosestBoard = function () {
66
+ // casting to 'any' is needed to avoid this issue with generics
67
+ // https://github.com/microsoft/TypeScript/issues/29132
68
+ return this.findClosestComponent(board_1.default);
69
+ };
70
+ dom_1.ElementWrapper.prototype.findClosestBoardItem = function () {
71
+ // casting to 'any' is needed to avoid this issue with generics
72
+ // https://github.com/microsoft/TypeScript/issues/29132
73
+ return this.findClosestComponent(board_item_1.default);
74
+ };
75
+ dom_1.ElementWrapper.prototype.findClosestItemsPalette = function () {
76
+ // casting to 'any' is needed to avoid this issue with generics
77
+ // https://github.com/microsoft/TypeScript/issues/29132
78
+ return this.findClosestComponent(items_palette_1.default);
79
+ };
80
+ dom_1.ElementWrapper.prototype.findClosestPaletteItem = function () {
81
+ // casting to 'any' is needed to avoid this issue with generics
82
+ // https://github.com/microsoft/TypeScript/issues/29132
83
+ return this.findClosestComponent(palette_item_1.default);
84
+ };
65
85
  function wrapper(root = document.body) {
66
86
  if (document && document.body && !document.body.contains(root)) {
67
87
  console.warn('[AwsUi] [test-utils] provided element is not part of the document body, interactions may work incorrectly');
@@ -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,IAAI,YAAY,GAAG,IAAI,eAAY,CAAC,YAAY,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AAQ,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"]}
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;AAyH3B,oBAAc,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,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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,sBAAkB,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF,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/**\n * Returns the wrapper of the closest parent Board for the current element,\n * or the element itself if it is an instance of Board.\n * If no Board is found, returns `null`.\n *\n * @returns {BoardWrapper | null}\n */\nfindClosestBoard(): BoardWrapper | null;\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/**\n * Returns the wrapper of the closest parent BoardItem for the current element,\n * or the element itself if it is an instance of BoardItem.\n * If no BoardItem is found, returns `null`.\n *\n * @returns {BoardItemWrapper | null}\n */\nfindClosestBoardItem(): BoardItemWrapper | null;\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/**\n * Returns the wrapper of the closest parent ItemsPalette for the current element,\n * or the element itself if it is an instance of ItemsPalette.\n * If no ItemsPalette is found, returns `null`.\n *\n * @returns {ItemsPaletteWrapper | null}\n */\nfindClosestItemsPalette(): ItemsPaletteWrapper | null;\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 * Returns the wrapper of the closest parent PaletteItem for the current element,\n * or the element itself if it is an instance of PaletteItem.\n * If no PaletteItem is found, returns `null`.\n *\n * @returns {PaletteItemWrapper | null}\n */\nfindClosestPaletteItem(): PaletteItemWrapper | null;\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\nElementWrapper.prototype.findClosestBoard = function() {\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).findClosestComponent(BoardWrapper);\n};\nElementWrapper.prototype.findClosestBoardItem = function() {\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).findClosestComponent(BoardItemWrapper);\n};\nElementWrapper.prototype.findClosestItemsPalette = function() {\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).findClosestComponent(ItemsPaletteWrapper);\n};\nElementWrapper.prototype.findClosestPaletteItem = function() {\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).findClosestComponent(PaletteItemWrapper);\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"]}