@cloudscape-design/components 3.0.1270 → 3.0.1272
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/app-layout/visual-refresh-toolbar/toolbar/index.js +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.d.ts +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js +1 -2
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.css.js +6 -7
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.scoped.css +20 -26
- package/app-layout/visual-refresh-toolbar/toolbar/trigger-button/styles.selectors.js +6 -7
- package/button/styles.css.js +22 -22
- package/button/styles.scoped.css +78 -78
- package/button/styles.selectors.js +22 -22
- package/help-panel/styles.css.js +6 -6
- package/help-panel/styles.scoped.css +70 -70
- package/help-panel/styles.selectors.js +6 -6
- package/i18n/messages/all.all.js +1 -1
- package/i18n/messages/all.all.json +1 -1
- package/i18n/messages/all.ar.js +1 -1
- package/i18n/messages/all.ar.json +1 -1
- package/i18n/messages/all.de.js +1 -1
- package/i18n/messages/all.de.json +1 -1
- package/i18n/messages/all.en-GB.js +1 -1
- package/i18n/messages/all.en-GB.json +1 -1
- package/i18n/messages/all.en.js +1 -1
- package/i18n/messages/all.en.json +1 -1
- package/i18n/messages/all.es.js +1 -1
- package/i18n/messages/all.es.json +1 -1
- package/i18n/messages/all.fr.js +1 -1
- package/i18n/messages/all.fr.json +1 -1
- package/i18n/messages/all.id.js +1 -1
- package/i18n/messages/all.id.json +1 -1
- package/i18n/messages/all.it.js +1 -1
- package/i18n/messages/all.it.json +1 -1
- package/i18n/messages/all.ja.js +1 -1
- package/i18n/messages/all.ja.json +1 -1
- package/i18n/messages/all.ko.js +1 -1
- package/i18n/messages/all.ko.json +1 -1
- package/i18n/messages/all.pt-BR.js +1 -1
- package/i18n/messages/all.pt-BR.json +1 -1
- package/i18n/messages/all.tr.js +1 -1
- package/i18n/messages/all.tr.json +1 -1
- package/i18n/messages/all.zh-CN.js +1 -1
- package/i18n/messages/all.zh-CN.json +1 -1
- package/i18n/messages/all.zh-TW.js +1 -1
- package/i18n/messages/all.zh-TW.json +1 -1
- package/i18n/messages-types.d.ts +18 -0
- package/i18n/messages-types.d.ts.map +1 -1
- package/i18n/messages-types.js.map +1 -1
- package/internal/base-component/styles.scoped.css +63 -4
- package/internal/components/token-list/styles.css.js +10 -10
- package/internal/components/token-list/styles.scoped.css +25 -25
- package/internal/components/token-list/styles.selectors.js +10 -10
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/styles/tokens.d.ts +17 -3
- package/internal/generated/styles/tokens.js +17 -3
- package/internal/generated/theming/index.cjs +417 -9
- package/internal/generated/theming/index.cjs.d.ts +189 -0
- package/internal/generated/theming/index.d.ts +189 -0
- package/internal/generated/theming/index.js +417 -9
- package/internal/keycode.d.ts +3 -1
- package/internal/keycode.d.ts.map +1 -1
- package/internal/keycode.js +5 -0
- package/internal/keycode.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/handle-key.d.ts +22 -1
- package/internal/utils/handle-key.d.ts.map +1 -1
- package/internal/utils/handle-key.js +62 -4
- package/internal/utils/handle-key.js.map +1 -1
- package/item-card/styles.css.js +14 -14
- package/item-card/styles.scoped.css +52 -52
- package/item-card/styles.selectors.js +14 -14
- package/link/styles.css.js +21 -21
- package/link/styles.scoped.css +81 -81
- package/link/styles.selectors.js +21 -21
- package/package.json +1 -1
- package/prompt-input/components/menu-dropdown.d.ts +33 -0
- package/prompt-input/components/menu-dropdown.d.ts.map +1 -0
- package/prompt-input/components/menu-dropdown.js +48 -0
- package/prompt-input/components/menu-dropdown.js.map +1 -0
- package/prompt-input/components/textarea-mode.d.ts +15 -0
- package/prompt-input/components/textarea-mode.d.ts.map +1 -0
- package/prompt-input/components/textarea-mode.js +8 -0
- package/prompt-input/components/textarea-mode.js.map +1 -0
- package/prompt-input/components/token-mode.d.ts +61 -0
- package/prompt-input/components/token-mode.d.ts.map +1 -0
- package/prompt-input/components/token-mode.js +37 -0
- package/prompt-input/components/token-mode.js.map +1 -0
- package/prompt-input/core/caret-controller.d.ts +73 -0
- package/prompt-input/core/caret-controller.d.ts.map +1 -0
- package/prompt-input/core/caret-controller.js +396 -0
- package/prompt-input/core/caret-controller.js.map +1 -0
- package/prompt-input/core/caret-spot-utils.d.ts +6 -0
- package/prompt-input/core/caret-spot-utils.d.ts.map +1 -0
- package/prompt-input/core/caret-spot-utils.js +52 -0
- package/prompt-input/core/caret-spot-utils.js.map +1 -0
- package/prompt-input/core/caret-utils.d.ts +25 -0
- package/prompt-input/core/caret-utils.d.ts.map +1 -0
- package/prompt-input/core/caret-utils.js +183 -0
- package/prompt-input/core/caret-utils.js.map +1 -0
- package/prompt-input/core/constants.d.ts +14 -0
- package/prompt-input/core/constants.d.ts.map +1 -0
- package/prompt-input/core/constants.js +18 -0
- package/prompt-input/core/constants.js.map +1 -0
- package/prompt-input/core/dom-utils.d.ts +60 -0
- package/prompt-input/core/dom-utils.d.ts.map +1 -0
- package/prompt-input/core/dom-utils.js +252 -0
- package/prompt-input/core/dom-utils.js.map +1 -0
- package/prompt-input/core/event-handlers.d.ts +68 -0
- package/prompt-input/core/event-handlers.d.ts.map +1 -0
- package/prompt-input/core/event-handlers.js +678 -0
- package/prompt-input/core/event-handlers.js.map +1 -0
- package/prompt-input/core/menu-state.d.ts +62 -0
- package/prompt-input/core/menu-state.d.ts.map +1 -0
- package/prompt-input/core/menu-state.js +168 -0
- package/prompt-input/core/menu-state.js.map +1 -0
- package/prompt-input/core/token-operations.d.ts +21 -0
- package/prompt-input/core/token-operations.d.ts.map +1 -0
- package/prompt-input/core/token-operations.js +273 -0
- package/prompt-input/core/token-operations.js.map +1 -0
- package/prompt-input/core/token-renderer.d.ts +26 -0
- package/prompt-input/core/token-renderer.d.ts.map +1 -0
- package/prompt-input/core/token-renderer.js +230 -0
- package/prompt-input/core/token-renderer.js.map +1 -0
- package/prompt-input/core/token-utils.d.ts +22 -0
- package/prompt-input/core/token-utils.d.ts.map +1 -0
- package/prompt-input/core/token-utils.js +262 -0
- package/prompt-input/core/token-utils.js.map +1 -0
- package/prompt-input/core/trigger-utils.d.ts +18 -0
- package/prompt-input/core/trigger-utils.d.ts.map +1 -0
- package/prompt-input/core/trigger-utils.js +174 -0
- package/prompt-input/core/trigger-utils.js.map +1 -0
- package/prompt-input/core/type-guards.d.ts +13 -0
- package/prompt-input/core/type-guards.d.ts.map +1 -0
- package/prompt-input/core/type-guards.js +36 -0
- package/prompt-input/core/type-guards.js.map +1 -0
- package/prompt-input/index.d.ts +1 -1
- package/prompt-input/index.d.ts.map +1 -1
- package/prompt-input/index.js.map +1 -1
- package/prompt-input/interfaces.d.ts +356 -7
- package/prompt-input/interfaces.d.ts.map +1 -1
- package/prompt-input/interfaces.js.map +1 -1
- package/prompt-input/internal.d.ts +1 -1
- package/prompt-input/internal.d.ts.map +1 -1
- package/prompt-input/internal.js +195 -61
- package/prompt-input/internal.js.map +1 -1
- package/prompt-input/styles.css.js +26 -17
- package/prompt-input/styles.scoped.css +152 -39
- package/prompt-input/styles.selectors.js +26 -17
- package/prompt-input/test-classes/styles.css.js +7 -6
- package/prompt-input/test-classes/styles.scoped.css +10 -6
- package/prompt-input/test-classes/styles.selectors.js +7 -6
- package/prompt-input/tokens/use-shortcuts.d.ts +37 -0
- package/prompt-input/tokens/use-shortcuts.d.ts.map +1 -0
- package/prompt-input/tokens/use-shortcuts.js +89 -0
- package/prompt-input/tokens/use-shortcuts.js.map +1 -0
- package/prompt-input/tokens/use-token-mode.d.ts +78 -0
- package/prompt-input/tokens/use-token-mode.d.ts.map +1 -0
- package/prompt-input/tokens/use-token-mode.js +817 -0
- package/prompt-input/tokens/use-token-mode.js.map +1 -0
- package/prompt-input/utils/insert-text-content-editable.d.ts +10 -0
- package/prompt-input/utils/insert-text-content-editable.d.ts.map +1 -0
- package/prompt-input/utils/insert-text-content-editable.js +133 -0
- package/prompt-input/utils/insert-text-content-editable.js.map +1 -0
- package/tabs/styles.css.js +30 -30
- package/tabs/styles.scoped.css +55 -55
- package/tabs/styles.selectors.js +30 -30
- package/test-utils/dom/hotspot/index.js +1 -2
- package/test-utils/dom/hotspot/index.js.map +1 -1
- package/test-utils/dom/prompt-input/index.d.ts +53 -1
- package/test-utils/dom/prompt-input/index.js +121 -13
- package/test-utils/dom/prompt-input/index.js.map +1 -1
- package/test-utils/dom/s3-resource-selector/index.js +2 -3
- package/test-utils/dom/s3-resource-selector/index.js.map +1 -1
- package/test-utils/selectors/hotspot/index.js +1 -2
- package/test-utils/selectors/hotspot/index.js.map +1 -1
- package/test-utils/selectors/prompt-input/index.d.ts +30 -0
- package/test-utils/selectors/prompt-input/index.js +53 -7
- package/test-utils/selectors/prompt-input/index.js.map +1 -1
- package/test-utils/selectors/s3-resource-selector/index.js +2 -3
- package/test-utils/selectors/s3-resource-selector/index.js.map +1 -1
|
@@ -8,54 +8,153 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
9
9
|
};
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.PromptInputMenuWrapper = void 0;
|
|
11
12
|
const dom_1 = require("@cloudscape-design/test-utils-core/dom");
|
|
13
|
+
const utils_1 = require("@cloudscape-design/test-utils-core/utils");
|
|
12
14
|
const utils_dom_1 = require("@cloudscape-design/test-utils-core/utils-dom");
|
|
13
|
-
const
|
|
15
|
+
const option_1 = require("../internal/option");
|
|
16
|
+
const styles_selectors_js_1 = require("../../../dropdown/styles.selectors.js");
|
|
17
|
+
const styles_selectors_js_2 = require("../../../internal/components/selectable-item/styles.selectors.js");
|
|
18
|
+
const styles_selectors_js_3 = require("../../../prompt-input/test-classes/styles.selectors.js");
|
|
19
|
+
class PromptInputMenuWrapper extends dom_1.ComponentWrapper {
|
|
20
|
+
findOptions() {
|
|
21
|
+
return this.findAll(`.${styles_selectors_js_2.default['selectable-item']}[data-test-index]`).map((elementWrapper) => new option_1.default(elementWrapper.getElement()));
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns an option from the menu.
|
|
25
|
+
*
|
|
26
|
+
* @param optionIndex 1-based index of the option to select.
|
|
27
|
+
*/
|
|
28
|
+
findOption(optionIndex) {
|
|
29
|
+
return this.findComponent(`.${styles_selectors_js_2.default['selectable-item']}[data-test-index="${optionIndex}"]`, option_1.default);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Returns an option from the menu by its value
|
|
33
|
+
*
|
|
34
|
+
* @param value The 'value' of the option.
|
|
35
|
+
*/
|
|
36
|
+
findOptionByValue(value) {
|
|
37
|
+
const toReplace = (0, utils_1.escapeSelector)(value);
|
|
38
|
+
return this.findComponent(`.${option_1.default.rootSelector}[data-value="${toReplace}"]`, option_1.default);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.PromptInputMenuWrapper = PromptInputMenuWrapper;
|
|
14
42
|
class PromptInputWrapper extends dom_1.ComponentWrapper {
|
|
43
|
+
/**
|
|
44
|
+
* Finds the native textarea element.
|
|
45
|
+
*
|
|
46
|
+
* Note: When `menus` or `tokens` is defined, the component uses a contentEditable element instead of a textarea.
|
|
47
|
+
* In this case, use findContentEditableElement() instead.
|
|
48
|
+
*/
|
|
15
49
|
findNativeTextarea() {
|
|
16
|
-
return this.findByClassName(
|
|
50
|
+
return this.findByClassName(styles_selectors_js_3.default.textarea);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Finds the contentEditable element used when `menus` or `tokens` is defined.
|
|
54
|
+
*/
|
|
55
|
+
findContentEditableElement() {
|
|
56
|
+
return this.find('[contenteditable="true"]');
|
|
17
57
|
}
|
|
18
58
|
/**
|
|
19
59
|
* Finds the action button. Note that, despite its typings, this may return null.
|
|
20
60
|
*/
|
|
21
61
|
findActionButton() {
|
|
22
|
-
return this.findByClassName(
|
|
62
|
+
return this.findByClassName(styles_selectors_js_3.default['action-button']);
|
|
23
63
|
}
|
|
24
64
|
/**
|
|
25
65
|
* Finds the secondary actions slot. Note that, despite its typings, this may return null.
|
|
26
66
|
*/
|
|
27
67
|
findSecondaryActions() {
|
|
28
|
-
return this.findByClassName(
|
|
68
|
+
return this.findByClassName(styles_selectors_js_3.default['secondary-actions']);
|
|
29
69
|
}
|
|
30
70
|
findSecondaryContent() {
|
|
31
|
-
return this.findByClassName(
|
|
71
|
+
return this.findByClassName(styles_selectors_js_3.default['secondary-content']);
|
|
32
72
|
}
|
|
33
73
|
findCustomPrimaryAction() {
|
|
34
|
-
return this.findByClassName(
|
|
74
|
+
return this.findByClassName(styles_selectors_js_3.default['primary-action']);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Finds the menu dropdown when `menus` or `tokens` is defined.
|
|
78
|
+
*/
|
|
79
|
+
findOpenMenu() {
|
|
80
|
+
return (0, dom_1.createWrapper)().findComponent(`.${styles_selectors_js_1.default.dropdown}[data-open=true]`, PromptInputMenuWrapper);
|
|
35
81
|
}
|
|
36
82
|
/**
|
|
37
83
|
* Gets the value of the component.
|
|
38
84
|
*
|
|
39
85
|
* Returns the current value of the textarea.
|
|
86
|
+
*
|
|
87
|
+
* When `menus` or `tokens` is defined, the component uses a contentEditable element.
|
|
88
|
+
* Use findContentEditableElement().getElement().textContent instead.
|
|
40
89
|
*/
|
|
41
90
|
getTextareaValue() {
|
|
42
|
-
|
|
91
|
+
const textarea = this.findNativeTextarea();
|
|
92
|
+
return textarea ? textarea.getElement().value : '';
|
|
43
93
|
}
|
|
44
94
|
/**
|
|
45
|
-
* Sets the value of the
|
|
95
|
+
* Sets the value of the textarea and calls the onChange handler.
|
|
96
|
+
*
|
|
97
|
+
* When `menus` or `tokens` is defined, the component uses a contentEditable element
|
|
98
|
+
* and this method will have no effect.
|
|
46
99
|
*
|
|
47
100
|
* @param value value to set the textarea to.
|
|
48
101
|
*/
|
|
49
102
|
setTextareaValue(value) {
|
|
50
|
-
const
|
|
103
|
+
const textarea = this.findNativeTextarea();
|
|
104
|
+
if (textarea) {
|
|
105
|
+
const element = textarea.getElement();
|
|
106
|
+
(0, utils_dom_1.act)(() => {
|
|
107
|
+
const event = new Event('change', { bubbles: true, cancelable: false });
|
|
108
|
+
(0, utils_dom_1.setNativeValue)(element, value);
|
|
109
|
+
element.dispatchEvent(event);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Checks if the menu is currently open.
|
|
115
|
+
*/
|
|
116
|
+
isMenuOpen() {
|
|
117
|
+
const menu = this.findOpenMenu();
|
|
118
|
+
return menu !== null;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Selects an option from the menu by simulating mouse events.
|
|
122
|
+
*
|
|
123
|
+
* @param value value of option to select
|
|
124
|
+
*/
|
|
125
|
+
selectMenuOptionByValue(value) {
|
|
126
|
+
(0, utils_dom_1.act)(() => {
|
|
127
|
+
const menu = this.findOpenMenu();
|
|
128
|
+
if (!menu) {
|
|
129
|
+
throw new Error('Menu not found');
|
|
130
|
+
}
|
|
131
|
+
const option = menu.findOptionByValue(value);
|
|
132
|
+
if (!option) {
|
|
133
|
+
throw new Error(`Option with value "${value}" not found in menu`);
|
|
134
|
+
}
|
|
135
|
+
option.fireEvent(new MouseEvent('mouseup', { bubbles: true }));
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Selects an option from the menu by simulating mouse events.
|
|
140
|
+
*
|
|
141
|
+
* @param optionIndex 1-based index of the option to select
|
|
142
|
+
*/
|
|
143
|
+
selectMenuOption(optionIndex) {
|
|
51
144
|
(0, utils_dom_1.act)(() => {
|
|
52
|
-
const
|
|
53
|
-
(
|
|
54
|
-
|
|
145
|
+
const menu = this.findOpenMenu();
|
|
146
|
+
if (!menu) {
|
|
147
|
+
throw new Error('Menu not found');
|
|
148
|
+
}
|
|
149
|
+
const option = menu.findOption(optionIndex);
|
|
150
|
+
if (!option) {
|
|
151
|
+
throw new Error(`Option at index ${optionIndex} not found in menu`);
|
|
152
|
+
}
|
|
153
|
+
option.fireEvent(new MouseEvent('mouseup', { bubbles: true }));
|
|
55
154
|
});
|
|
56
155
|
}
|
|
57
156
|
}
|
|
58
|
-
PromptInputWrapper.rootSelector =
|
|
157
|
+
PromptInputWrapper.rootSelector = styles_selectors_js_3.default.root;
|
|
59
158
|
exports.default = PromptInputWrapper;
|
|
60
159
|
__decorate([
|
|
61
160
|
dom_1.usesDom
|
|
@@ -63,4 +162,13 @@ __decorate([
|
|
|
63
162
|
__decorate([
|
|
64
163
|
dom_1.usesDom
|
|
65
164
|
], PromptInputWrapper.prototype, "setTextareaValue", null);
|
|
165
|
+
__decorate([
|
|
166
|
+
dom_1.usesDom
|
|
167
|
+
], PromptInputWrapper.prototype, "isMenuOpen", null);
|
|
168
|
+
__decorate([
|
|
169
|
+
dom_1.usesDom
|
|
170
|
+
], PromptInputWrapper.prototype, "selectMenuOptionByValue", null);
|
|
171
|
+
__decorate([
|
|
172
|
+
dom_1.usesDom
|
|
173
|
+
], PromptInputWrapper.prototype, "selectMenuOption", null);
|
|
66
174
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/prompt-input/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/prompt-input/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;;;;;;;AAEtC,gEAAkH;AAClH,oEAA0E;AAC1E,4EAAmF;AAEnF,+CAA+C;AA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, "__esModule", { value: true });
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
const dom_1 = require("@cloudscape-design/test-utils-core/dom");
|
|
6
6
|
const utils_1 = require("@cloudscape-design/test-utils-core/utils");
|
|
7
|
-
const __1 = require("../");
|
|
8
7
|
const button_1 = require("../button");
|
|
9
8
|
const input_1 = require("../input");
|
|
10
9
|
const modal_1 = require("../modal");
|
|
@@ -42,11 +41,11 @@ class S3ResourceSelectorWrapper extends dom_1.ComponentWrapper {
|
|
|
42
41
|
return this.findComponent(`.${styles_selectors_js_1.default.root}`, S3InContextWrapper);
|
|
43
42
|
}
|
|
44
43
|
findModal() {
|
|
45
|
-
const modal = (0,
|
|
44
|
+
const modal = (0, dom_1.createWrapper)().findComponent((0, utils_1.appendSelector)(`.${styles_selectors_js_4.default['modal-root']}`, `.${modal_1.default.rootSelector}`), modal_1.default);
|
|
46
45
|
return modal && new S3ModalWrapper(modal.getElement());
|
|
47
46
|
}
|
|
48
47
|
findTable() {
|
|
49
|
-
const modal = (0,
|
|
48
|
+
const modal = (0, dom_1.createWrapper)().findComponent(`.${modal_1.default.rootSelector}`, modal_1.default);
|
|
50
49
|
return modal && modal.findComponent(`.${table_1.default.rootSelector}`, table_1.default);
|
|
51
50
|
}
|
|
52
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/s3-resource-selector/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/s3-resource-selector/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAyG;AACzG,oEAA0E;AAE1E,sCAAsC;AACtC,oCAAoC;AACpC,oCAAoC;AACpC,sCAAsC;AACtC,oCAAoC;AAEpC,yGAA8F;AAC9F,oGAAqF;AACrF,2FAAuE;AACv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;QACF,OAAO,KAAK,IAAI,IAAI,cAAc,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;IACzD,CAAC;IAED,SAAS;QACP,MAAM,KAAK,GAAG,IAAA,mBAAa,GAAE,CAAC,aAAa,CAAC,IAAI,eAAY,CAAC,YAAY,EAAE,EAAE,eAAY,CAAC,CAAC;QAC3F,OAAO,KAAK,IAAI,KAAK,CAAC,aAAa,CAAC,IAAI,eAAY,CAAC,YAAY,EAAE,EAAE,eAAY,CAAC,CAAC;IACrF,CAAC;;AArBM,sCAAY,GAAG,6BAAM,CAAC,IAAI,CAAC;kBADf,yBAAyB"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
const selectors_1 = require("@cloudscape-design/test-utils-core/selectors");
|
|
6
6
|
const annotation_1 = require("../annotation");
|
|
7
|
-
const index_1 = require("../index");
|
|
8
7
|
const styles_selectors_js_1 = require("../../../annotation-context/annotation/styles.selectors.js");
|
|
9
8
|
const styles_selectors_js_2 = require("../../../hotspot/styles.selectors.js");
|
|
10
9
|
class HotspotWrapper extends selectors_1.ComponentWrapper {
|
|
@@ -12,7 +11,7 @@ class HotspotWrapper extends selectors_1.ComponentWrapper {
|
|
|
12
11
|
return this.findByClassName(styles_selectors_js_1.default.hotspot);
|
|
13
12
|
}
|
|
14
13
|
findAnnotation() {
|
|
15
|
-
return (0,
|
|
14
|
+
return (0, selectors_1.createWrapper)().findComponent(`.${styles_selectors_js_1.default.annotation}`, annotation_1.default);
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
17
|
HotspotWrapper.rootSelector = styles_selectors_js_2.default.root;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/hotspot/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/hotspot/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAA+G;AAC/G,8CAA8C;AAC9C,oGAA0F;AAC1F,8EAAiE;AACjE,MAAqB,cAAe,SAAQ,4BAAgB;IAE1D,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAgB,CAAC,OAAO,CAAE,CAAC;IACzD,CAAC;IACD,cAAc;QACZ,OAAO,IAAA,yBAAa,GAAE,CAAC,aAAa,CAAC,IAAI,6BAAgB,CAAC,UAAU,EAAE,EAAE,oBAAiB,CAAE,CAAC;IAC9F,CAAC;;AANM,2BAAY,GAAW,6BAAa,CAAC,IAAI,CAAC;kBAD9B,cAAc"}
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
import { ComponentWrapper, ElementWrapper } from "@cloudscape-design/test-utils-core/selectors";
|
|
2
|
+
import OptionWrapper from '../internal/option';
|
|
3
|
+
export declare class PromptInputMenuWrapper extends ComponentWrapper {
|
|
4
|
+
findOptions(): import("@cloudscape-design/test-utils-core/selectors").MultiElementWrapper<OptionWrapper>;
|
|
5
|
+
/**
|
|
6
|
+
* Returns an option from the menu.
|
|
7
|
+
*
|
|
8
|
+
* @param optionIndex 1-based index of the option to select.
|
|
9
|
+
*/
|
|
10
|
+
findOption(optionIndex: number): OptionWrapper;
|
|
11
|
+
/**
|
|
12
|
+
* Returns an option from the menu by its value
|
|
13
|
+
*
|
|
14
|
+
* @param value The 'value' of the option.
|
|
15
|
+
*/
|
|
16
|
+
findOptionByValue(value: string): OptionWrapper;
|
|
17
|
+
}
|
|
2
18
|
export default class PromptInputWrapper extends ComponentWrapper {
|
|
3
19
|
static rootSelector: string;
|
|
20
|
+
/**
|
|
21
|
+
* Finds the native textarea element.
|
|
22
|
+
*
|
|
23
|
+
* Note: When `menus` or `tokens` is defined, the component uses a contentEditable element instead of a textarea.
|
|
24
|
+
* In this case, use findContentEditableElement() instead.
|
|
25
|
+
*/
|
|
4
26
|
findNativeTextarea(): ElementWrapper;
|
|
27
|
+
/**
|
|
28
|
+
* Finds the contentEditable element used when `menus` or `tokens` is defined.
|
|
29
|
+
*/
|
|
30
|
+
findContentEditableElement(): ElementWrapper;
|
|
5
31
|
/**
|
|
6
32
|
* Finds the action button. Note that, despite its typings, this may return null.
|
|
7
33
|
*/
|
|
@@ -12,4 +38,8 @@ export default class PromptInputWrapper extends ComponentWrapper {
|
|
|
12
38
|
findSecondaryActions(): ElementWrapper;
|
|
13
39
|
findSecondaryContent(): ElementWrapper;
|
|
14
40
|
findCustomPrimaryAction(): ElementWrapper;
|
|
41
|
+
/**
|
|
42
|
+
* Finds the menu dropdown when `menus` or `tokens` is defined.
|
|
43
|
+
*/
|
|
44
|
+
findOpenMenu(): PromptInputMenuWrapper;
|
|
15
45
|
}
|
|
@@ -2,31 +2,77 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.PromptInputMenuWrapper = void 0;
|
|
5
6
|
const selectors_1 = require("@cloudscape-design/test-utils-core/selectors");
|
|
6
|
-
const
|
|
7
|
+
const utils_1 = require("@cloudscape-design/test-utils-core/utils");
|
|
8
|
+
const option_1 = require("../internal/option");
|
|
9
|
+
const styles_selectors_js_1 = require("../../../dropdown/styles.selectors.js");
|
|
10
|
+
const styles_selectors_js_2 = require("../../../internal/components/selectable-item/styles.selectors.js");
|
|
11
|
+
const styles_selectors_js_3 = require("../../../prompt-input/test-classes/styles.selectors.js");
|
|
12
|
+
class PromptInputMenuWrapper extends selectors_1.ComponentWrapper {
|
|
13
|
+
findOptions() {
|
|
14
|
+
return this.findAll(`.${styles_selectors_js_2.default['selectable-item']}[data-test-index]`).map((elementWrapper) => new option_1.default(elementWrapper.getElement()));
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns an option from the menu.
|
|
18
|
+
*
|
|
19
|
+
* @param optionIndex 1-based index of the option to select.
|
|
20
|
+
*/
|
|
21
|
+
findOption(optionIndex) {
|
|
22
|
+
return this.findComponent(`.${styles_selectors_js_2.default['selectable-item']}[data-test-index="${optionIndex}"]`, option_1.default);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Returns an option from the menu by its value
|
|
26
|
+
*
|
|
27
|
+
* @param value The 'value' of the option.
|
|
28
|
+
*/
|
|
29
|
+
findOptionByValue(value) {
|
|
30
|
+
const toReplace = (0, utils_1.escapeSelector)(value);
|
|
31
|
+
return this.findComponent(`.${option_1.default.rootSelector}[data-value="${toReplace}"]`, option_1.default);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.PromptInputMenuWrapper = PromptInputMenuWrapper;
|
|
7
35
|
class PromptInputWrapper extends selectors_1.ComponentWrapper {
|
|
36
|
+
/**
|
|
37
|
+
* Finds the native textarea element.
|
|
38
|
+
*
|
|
39
|
+
* Note: When `menus` or `tokens` is defined, the component uses a contentEditable element instead of a textarea.
|
|
40
|
+
* In this case, use findContentEditableElement() instead.
|
|
41
|
+
*/
|
|
8
42
|
findNativeTextarea() {
|
|
9
|
-
return this.findByClassName(
|
|
43
|
+
return this.findByClassName(styles_selectors_js_3.default.textarea);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Finds the contentEditable element used when `menus` or `tokens` is defined.
|
|
47
|
+
*/
|
|
48
|
+
findContentEditableElement() {
|
|
49
|
+
return this.find('[contenteditable="true"]');
|
|
10
50
|
}
|
|
11
51
|
/**
|
|
12
52
|
* Finds the action button. Note that, despite its typings, this may return null.
|
|
13
53
|
*/
|
|
14
54
|
findActionButton() {
|
|
15
|
-
return this.findByClassName(
|
|
55
|
+
return this.findByClassName(styles_selectors_js_3.default['action-button']);
|
|
16
56
|
}
|
|
17
57
|
/**
|
|
18
58
|
* Finds the secondary actions slot. Note that, despite its typings, this may return null.
|
|
19
59
|
*/
|
|
20
60
|
findSecondaryActions() {
|
|
21
|
-
return this.findByClassName(
|
|
61
|
+
return this.findByClassName(styles_selectors_js_3.default['secondary-actions']);
|
|
22
62
|
}
|
|
23
63
|
findSecondaryContent() {
|
|
24
|
-
return this.findByClassName(
|
|
64
|
+
return this.findByClassName(styles_selectors_js_3.default['secondary-content']);
|
|
25
65
|
}
|
|
26
66
|
findCustomPrimaryAction() {
|
|
27
|
-
return this.findByClassName(
|
|
67
|
+
return this.findByClassName(styles_selectors_js_3.default['primary-action']);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Finds the menu dropdown when `menus` or `tokens` is defined.
|
|
71
|
+
*/
|
|
72
|
+
findOpenMenu() {
|
|
73
|
+
return (0, selectors_1.createWrapper)().findComponent(`.${styles_selectors_js_1.default.dropdown}[data-open=true]`, PromptInputMenuWrapper);
|
|
28
74
|
}
|
|
29
75
|
}
|
|
30
|
-
PromptInputWrapper.rootSelector =
|
|
76
|
+
PromptInputWrapper.rootSelector = styles_selectors_js_3.default.root;
|
|
31
77
|
exports.default = PromptInputWrapper;
|
|
32
78
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/prompt-input/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/prompt-input/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAEtC,4EAA+G;AAC/G,oEAA0E;AAC1E,+CAA+C;AAC/C,+EAAmE;AACnE,0GAAgG;AAChG,gGAAoF;AACpF,MAAa,sBAAuB,SAAQ,4BAAgB;IAC1D,WAAW;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,6BAAgB,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC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GAAE,CAAC,aAAa,CAAC,IAAI,6BAAc,CAAC,QAAQ,kBAAkB,EAAE,sBAAsB,CAAC,CAAC;IAC9G,CAAC;;AA5CM,+BAAY,GAAG,6BAAc,CAAC,IAAI,CAAC;kBADvB,kBAAkB"}
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
const selectors_1 = require("@cloudscape-design/test-utils-core/selectors");
|
|
6
6
|
const utils_1 = require("@cloudscape-design/test-utils-core/utils");
|
|
7
|
-
const __1 = require("../");
|
|
8
7
|
const button_1 = require("../button");
|
|
9
8
|
const input_1 = require("../input");
|
|
10
9
|
const modal_1 = require("../modal");
|
|
@@ -42,11 +41,11 @@ class S3ResourceSelectorWrapper extends selectors_1.ComponentWrapper {
|
|
|
42
41
|
return this.findComponent(`.${styles_selectors_js_1.default.root}`, S3InContextWrapper);
|
|
43
42
|
}
|
|
44
43
|
findModal() {
|
|
45
|
-
const modal = (0,
|
|
44
|
+
const modal = (0, selectors_1.createWrapper)().findComponent((0, utils_1.appendSelector)(`.${styles_selectors_js_4.default['modal-root']}`, `.${modal_1.default.rootSelector}`), modal_1.default);
|
|
46
45
|
return modal && new S3ModalWrapper(modal.getElement());
|
|
47
46
|
}
|
|
48
47
|
findTable() {
|
|
49
|
-
const modal = (0,
|
|
48
|
+
const modal = (0, selectors_1.createWrapper)().findComponent(`.${modal_1.default.rootSelector}`, modal_1.default);
|
|
50
49
|
return modal && modal.findComponent(`.${table_1.default.rootSelector}`, table_1.default);
|
|
51
50
|
}
|
|
52
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/s3-resource-selector/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/s3-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