@cloudscape-design/chat-components 1.0.62 → 1.0.64
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/internal/api-docs/test-utils-doc/dom.d.ts +3 -0
- package/internal/api-docs/test-utils-doc/dom.js +1868 -4
- package/internal/api-docs/test-utils-doc/interfaces.d.ts +33 -0
- package/internal/api-docs/test-utils-doc/selectors.d.ts +3 -0
- package/internal/api-docs/test-utils-doc/selectors.js +1138 -4
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/styles/tokens.d.ts +1 -0
- package/internal/generated/styles/tokens.js +1 -0
- package/internal/generated/theming/index.cjs +47 -14
- package/internal/generated/theming/index.cjs.d.ts +9 -0
- package/internal/generated/theming/index.d.ts +9 -0
- package/internal/generated/theming/index.js +47 -14
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/test-utils/dom/index.js +16 -4
- package/test-utils/dom/index.js.map +1 -1
- package/test-utils/selectors/index.js +16 -4
- package/test-utils/selectors/index.js.map +1 -1
|
@@ -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,qCAAqC;AAM5B,wBANF,gBAAa,CAME;AALtB,+CAA8C;AAMrC,4BANF,qBAAiB,CAME;AAL1B,+CAA8C;AAMrC,4BANF,qBAAiB,CAME;AAL1B,iEAA+D;AAMtD,oCANF,8BAAyB,CAME;AAqFlC,oBAAc,CAAC,SAAS,CAAC,UAAU,GAAG,UAAS,QAAQ;IACrD,
|
|
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,OA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IAAA,sBAAc,EAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,8BAAyB,CAAC,CAAC;AAClI,CAAC,CAAC;AAEF,oBAAc,CAAC,SAAS,CAAC,0BAA0B,GAAG,UAAS,QAAQ;IACrE,OAAO,IAAI,CAAC,iBAAiB,CAAC,8BAAyB,EAAE,QAAQ,CAAC,CAAC;AACrE,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 AvatarWrapper from './avatar';\nimport ChatBubbleWrapper from './chat-bubble';\nimport LoadingBarWrapper from './loading-bar';\nimport SupportPromptGroupWrapper from './support-prompt-group';\n\n\nexport { AvatarWrapper };\nexport { ChatBubbleWrapper };\nexport { LoadingBarWrapper };\nexport { SupportPromptGroupWrapper };\n\ndeclare module '@cloudscape-design/test-utils-core/dist/dom' {\n interface ElementWrapper {\n \n/**\n * Returns the wrapper of the first Avatar that matches the specified CSS selector.\n * If no CSS selector is specified, returns the wrapper of the first Avatar.\n * If no matching Avatar is found, returns `null`.\n *\n * @param {string} [selector] CSS Selector\n * @returns {AvatarWrapper | null}\n */\nfindAvatar(selector?: string): AvatarWrapper | null;\n\n/**\n * Returns an array of Avatar wrapper that matches the specified CSS selector.\n * If no CSS selector is specified, returns all of the Avatars inside the current wrapper.\n * If no matching Avatar is found, returns an empty array.\n *\n * @param {string} [selector] CSS Selector\n * @returns {Array<AvatarWrapper>}\n */\nfindAllAvatars(selector?: string): Array<AvatarWrapper>;\n/**\n * Returns the wrapper of the first ChatBubble that matches the specified CSS selector.\n * If no CSS selector is specified, returns the wrapper of the first ChatBubble.\n * If no matching ChatBubble is found, returns `null`.\n *\n * @param {string} [selector] CSS Selector\n * @returns {ChatBubbleWrapper | null}\n */\nfindChatBubble(selector?: string): ChatBubbleWrapper | null;\n\n/**\n * Returns an array of ChatBubble wrapper that matches the specified CSS selector.\n * If no CSS selector is specified, returns all of the ChatBubbles inside the current wrapper.\n * If no matching ChatBubble is found, returns an empty array.\n *\n * @param {string} [selector] CSS Selector\n * @returns {Array<ChatBubbleWrapper>}\n */\nfindAllChatBubbles(selector?: string): Array<ChatBubbleWrapper>;\n/**\n * Returns the wrapper of the first LoadingBar that matches the specified CSS selector.\n * If no CSS selector is specified, returns the wrapper of the first LoadingBar.\n * If no matching LoadingBar is found, returns `null`.\n *\n * @param {string} [selector] CSS Selector\n * @returns {LoadingBarWrapper | null}\n */\nfindLoadingBar(selector?: string): LoadingBarWrapper | null;\n\n/**\n * Returns an array of LoadingBar wrapper that matches the specified CSS selector.\n * If no CSS selector is specified, returns all of the LoadingBars inside the current wrapper.\n * If no matching LoadingBar is found, returns an empty array.\n *\n * @param {string} [selector] CSS Selector\n * @returns {Array<LoadingBarWrapper>}\n */\nfindAllLoadingBars(selector?: string): Array<LoadingBarWrapper>;\n/**\n * Returns the wrapper of the first SupportPromptGroup that matches the specified CSS selector.\n * If no CSS selector is specified, returns the wrapper of the first SupportPromptGroup.\n * If no matching SupportPromptGroup is found, returns `null`.\n *\n * @param {string} [selector] CSS Selector\n * @returns {SupportPromptGroupWrapper | null}\n */\nfindSupportPromptGroup(selector?: string): SupportPromptGroupWrapper | null;\n\n/**\n * Returns an array of SupportPromptGroup wrapper that matches the specified CSS selector.\n * If no CSS selector is specified, returns all of the SupportPromptGroups inside the current wrapper.\n * If no matching SupportPromptGroup is found, returns an empty array.\n *\n * @param {string} [selector] CSS Selector\n * @returns {Array<SupportPromptGroupWrapper>}\n */\nfindAllSupportPromptGroups(selector?: string): Array<SupportPromptGroupWrapper>;\n }\n}\n\n\nElementWrapper.prototype.findAvatar = function(selector) {\n let rootSelector = `.${AvatarWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in AvatarWrapper && AvatarWrapper.legacyRootSelector){\n rootSelector = `:is(.${AvatarWrapper.rootSelector}, .${AvatarWrapper.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, AvatarWrapper);\n};\n\nElementWrapper.prototype.findAllAvatars = function(selector) {\n return this.findAllComponents(AvatarWrapper, selector);\n};\nElementWrapper.prototype.findChatBubble = function(selector) {\n let rootSelector = `.${ChatBubbleWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in ChatBubbleWrapper && ChatBubbleWrapper.legacyRootSelector){\n rootSelector = `:is(.${ChatBubbleWrapper.rootSelector}, .${ChatBubbleWrapper.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, ChatBubbleWrapper);\n};\n\nElementWrapper.prototype.findAllChatBubbles = function(selector) {\n return this.findAllComponents(ChatBubbleWrapper, selector);\n};\nElementWrapper.prototype.findLoadingBar = function(selector) {\n let rootSelector = `.${LoadingBarWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in LoadingBarWrapper && LoadingBarWrapper.legacyRootSelector){\n rootSelector = `:is(.${LoadingBarWrapper.rootSelector}, .${LoadingBarWrapper.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, LoadingBarWrapper);\n};\n\nElementWrapper.prototype.findAllLoadingBars = function(selector) {\n return this.findAllComponents(LoadingBarWrapper, selector);\n};\nElementWrapper.prototype.findSupportPromptGroup = function(selector) {\n let rootSelector = `.${SupportPromptGroupWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in SupportPromptGroupWrapper && SupportPromptGroupWrapper.legacyRootSelector){\n rootSelector = `:is(.${SupportPromptGroupWrapper.rootSelector}, .${SupportPromptGroupWrapper.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, SupportPromptGroupWrapper);\n};\n\nElementWrapper.prototype.findAllSupportPromptGroups = function(selector) {\n return this.findAllComponents(SupportPromptGroupWrapper, 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.LoadingBarWrapper = loading_bar_1.default;
|
|
|
15
15
|
const support_prompt_group_1 = require("./support-prompt-group");
|
|
16
16
|
exports.SupportPromptGroupWrapper = support_prompt_group_1.default;
|
|
17
17
|
selectors_1.ElementWrapper.prototype.findAvatar = function (selector) {
|
|
18
|
-
|
|
18
|
+
let rootSelector = `.${avatar_1.default.rootSelector}`;
|
|
19
|
+
if ("legacyRootSelector" in avatar_1.default && avatar_1.default.legacyRootSelector) {
|
|
20
|
+
rootSelector = `:is(.${avatar_1.default.rootSelector}, .${avatar_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, avatar_1.default);
|
|
@@ -24,7 +27,10 @@ selectors_1.ElementWrapper.prototype.findAllAvatars = function (selector) {
|
|
|
24
27
|
return this.findAllComponents(avatar_1.default, selector);
|
|
25
28
|
};
|
|
26
29
|
selectors_1.ElementWrapper.prototype.findChatBubble = function (selector) {
|
|
27
|
-
|
|
30
|
+
let rootSelector = `.${chat_bubble_1.default.rootSelector}`;
|
|
31
|
+
if ("legacyRootSelector" in chat_bubble_1.default && chat_bubble_1.default.legacyRootSelector) {
|
|
32
|
+
rootSelector = `:is(.${chat_bubble_1.default.rootSelector}, .${chat_bubble_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, chat_bubble_1.default);
|
|
@@ -33,7 +39,10 @@ selectors_1.ElementWrapper.prototype.findAllChatBubbles = function (selector) {
|
|
|
33
39
|
return this.findAllComponents(chat_bubble_1.default, selector);
|
|
34
40
|
};
|
|
35
41
|
selectors_1.ElementWrapper.prototype.findLoadingBar = function (selector) {
|
|
36
|
-
|
|
42
|
+
let rootSelector = `.${loading_bar_1.default.rootSelector}`;
|
|
43
|
+
if ("legacyRootSelector" in loading_bar_1.default && loading_bar_1.default.legacyRootSelector) {
|
|
44
|
+
rootSelector = `:is(.${loading_bar_1.default.rootSelector}, .${loading_bar_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, loading_bar_1.default);
|
|
@@ -42,7 +51,10 @@ selectors_1.ElementWrapper.prototype.findAllLoadingBars = function (selector) {
|
|
|
42
51
|
return this.findAllComponents(loading_bar_1.default, selector);
|
|
43
52
|
};
|
|
44
53
|
selectors_1.ElementWrapper.prototype.findSupportPromptGroup = function (selector) {
|
|
45
|
-
|
|
54
|
+
let rootSelector = `.${support_prompt_group_1.default.rootSelector}`;
|
|
55
|
+
if ("legacyRootSelector" in support_prompt_group_1.default && support_prompt_group_1.default.legacyRootSelector) {
|
|
56
|
+
rootSelector = `:is(.${support_prompt_group_1.default.rootSelector}, .${support_prompt_group_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, support_prompt_group_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,oEAA0E;AAI1E,qCAAqC;AAM5B,wBANF,gBAAa,CAME;AALtB,+CAA8C;AAMrC,4BANF,qBAAiB,CAME;AAL1B,+CAA8C;AAMrC,4BANF,qBAAiB,CAME;AAL1B,iEAA+D;AAMtD,oCANF,8BAAyB,CAME;AA6ElC,0BAAc,CAAC,SAAS,CAAC,UAAU,GAAG,UAAS,QAAQ;IACrD,
|
|
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,qCAAqC;AAM5B,wBANF,gBAAa,CAME;AALtB,+CAA8C;AAMrC,4BANF,qBAAiB,CAME;AAL1B,+CAA8C;AAMrC,4BANF,qBAAiB,CAME;AAL1B,iEAA+D;AAMtD,oCANF,8BAAyB,CAME;AA6ElC,0BAAc,CAAC,SAAS,CAAC,UAAU,GAA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Q,CAAC,CAAC;AACrE,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 AvatarWrapper from './avatar';\nimport ChatBubbleWrapper from './chat-bubble';\nimport LoadingBarWrapper from './loading-bar';\nimport SupportPromptGroupWrapper from './support-prompt-group';\n\n\nexport { AvatarWrapper };\nexport { ChatBubbleWrapper };\nexport { LoadingBarWrapper };\nexport { SupportPromptGroupWrapper };\n\ndeclare module '@cloudscape-design/test-utils-core/dist/selectors' {\n interface ElementWrapper {\n \n/**\n * Returns a wrapper that matches the Avatars with the specified CSS selector.\n * If no CSS selector is specified, returns a wrapper that matches Avatars.\n *\n * @param {string} [selector] CSS Selector\n * @returns {AvatarWrapper}\n */\nfindAvatar(selector?: string): AvatarWrapper;\n\n/**\n * Returns a multi-element wrapper that matches Avatars with the specified CSS selector.\n * If no CSS selector is specified, returns a multi-element wrapper that matches Avatars.\n *\n * @param {string} [selector] CSS Selector\n * @returns {MultiElementWrapper<AvatarWrapper>}\n */\nfindAllAvatars(selector?: string): MultiElementWrapper<AvatarWrapper>;\n/**\n * Returns a wrapper that matches the ChatBubbles with the specified CSS selector.\n * If no CSS selector is specified, returns a wrapper that matches ChatBubbles.\n *\n * @param {string} [selector] CSS Selector\n * @returns {ChatBubbleWrapper}\n */\nfindChatBubble(selector?: string): ChatBubbleWrapper;\n\n/**\n * Returns a multi-element wrapper that matches ChatBubbles with the specified CSS selector.\n * If no CSS selector is specified, returns a multi-element wrapper that matches ChatBubbles.\n *\n * @param {string} [selector] CSS Selector\n * @returns {MultiElementWrapper<ChatBubbleWrapper>}\n */\nfindAllChatBubbles(selector?: string): MultiElementWrapper<ChatBubbleWrapper>;\n/**\n * Returns a wrapper that matches the LoadingBars with the specified CSS selector.\n * If no CSS selector is specified, returns a wrapper that matches LoadingBars.\n *\n * @param {string} [selector] CSS Selector\n * @returns {LoadingBarWrapper}\n */\nfindLoadingBar(selector?: string): LoadingBarWrapper;\n\n/**\n * Returns a multi-element wrapper that matches LoadingBars with the specified CSS selector.\n * If no CSS selector is specified, returns a multi-element wrapper that matches LoadingBars.\n *\n * @param {string} [selector] CSS Selector\n * @returns {MultiElementWrapper<LoadingBarWrapper>}\n */\nfindAllLoadingBars(selector?: string): MultiElementWrapper<LoadingBarWrapper>;\n/**\n * Returns a wrapper that matches the SupportPromptGroups with the specified CSS selector.\n * If no CSS selector is specified, returns a wrapper that matches SupportPromptGroups.\n *\n * @param {string} [selector] CSS Selector\n * @returns {SupportPromptGroupWrapper}\n */\nfindSupportPromptGroup(selector?: string): SupportPromptGroupWrapper;\n\n/**\n * Returns a multi-element wrapper that matches SupportPromptGroups with the specified CSS selector.\n * If no CSS selector is specified, returns a multi-element wrapper that matches SupportPromptGroups.\n *\n * @param {string} [selector] CSS Selector\n * @returns {MultiElementWrapper<SupportPromptGroupWrapper>}\n */\nfindAllSupportPromptGroups(selector?: string): MultiElementWrapper<SupportPromptGroupWrapper>;\n }\n}\n\n\nElementWrapper.prototype.findAvatar = function(selector) {\n let rootSelector = `.${AvatarWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in AvatarWrapper && AvatarWrapper.legacyRootSelector){\n rootSelector = `:is(.${AvatarWrapper.rootSelector}, .${AvatarWrapper.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, AvatarWrapper);\n};\n\nElementWrapper.prototype.findAllAvatars = function(selector) {\n return this.findAllComponents(AvatarWrapper, selector);\n};\nElementWrapper.prototype.findChatBubble = function(selector) {\n let rootSelector = `.${ChatBubbleWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in ChatBubbleWrapper && ChatBubbleWrapper.legacyRootSelector){\n rootSelector = `:is(.${ChatBubbleWrapper.rootSelector}, .${ChatBubbleWrapper.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, ChatBubbleWrapper);\n};\n\nElementWrapper.prototype.findAllChatBubbles = function(selector) {\n return this.findAllComponents(ChatBubbleWrapper, selector);\n};\nElementWrapper.prototype.findLoadingBar = function(selector) {\n let rootSelector = `.${LoadingBarWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in LoadingBarWrapper && LoadingBarWrapper.legacyRootSelector){\n rootSelector = `:is(.${LoadingBarWrapper.rootSelector}, .${LoadingBarWrapper.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, LoadingBarWrapper);\n};\n\nElementWrapper.prototype.findAllLoadingBars = function(selector) {\n return this.findAllComponents(LoadingBarWrapper, selector);\n};\nElementWrapper.prototype.findSupportPromptGroup = function(selector) {\n let rootSelector = `.${SupportPromptGroupWrapper.rootSelector}`;\n if(\"legacyRootSelector\" in SupportPromptGroupWrapper && SupportPromptGroupWrapper.legacyRootSelector){\n rootSelector = `:is(.${SupportPromptGroupWrapper.rootSelector}, .${SupportPromptGroupWrapper.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, SupportPromptGroupWrapper);\n};\n\nElementWrapper.prototype.findAllSupportPromptGroups = function(selector) {\n return this.findAllComponents(SupportPromptGroupWrapper, selector);\n};\n\n\nexport default function wrapper(root: string = 'body') {\n return new ElementWrapper(root);\n}\n"]}
|