@cloudscape-design/components 3.0.215 → 3.0.217

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.
Files changed (352) hide show
  1. package/internal/components/option/highlight-match.js +3 -3
  2. package/internal/components/option/highlight-match.js.map +1 -1
  3. package/internal/environment.js +1 -1
  4. package/internal/manifest.json +1 -1
  5. package/package.json +1 -1
  6. package/select/parts/item.js +1 -1
  7. package/select/parts/item.js.map +1 -1
  8. package/test-utils/dom/alert/index.js +20 -40
  9. package/test-utils/dom/alert/index.js.map +1 -1
  10. package/test-utils/dom/annotation/index.js +24 -44
  11. package/test-utils/dom/annotation/index.js.map +1 -1
  12. package/test-utils/dom/app-layout/index.js +27 -47
  13. package/test-utils/dom/app-layout/index.js.map +1 -1
  14. package/test-utils/dom/area-chart/index.js +12 -32
  15. package/test-utils/dom/area-chart/index.js.map +1 -1
  16. package/test-utils/dom/attribute-editor/index.js +32 -57
  17. package/test-utils/dom/attribute-editor/index.js.map +1 -1
  18. package/test-utils/dom/autosuggest/index.js +76 -114
  19. package/test-utils/dom/autosuggest/index.js.map +1 -1
  20. package/test-utils/dom/badge/index.js +5 -25
  21. package/test-utils/dom/badge/index.js.map +1 -1
  22. package/test-utils/dom/bar-chart/index.js +5 -25
  23. package/test-utils/dom/bar-chart/index.js.map +1 -1
  24. package/test-utils/dom/box/index.js +5 -25
  25. package/test-utils/dom/box/index.js.map +1 -1
  26. package/test-utils/dom/breadcrumb-group/index.js +17 -37
  27. package/test-utils/dom/breadcrumb-group/index.js.map +1 -1
  28. package/test-utils/dom/button/index.js +16 -36
  29. package/test-utils/dom/button/index.js.map +1 -1
  30. package/test-utils/dom/button-dropdown/index.js +38 -59
  31. package/test-utils/dom/button-dropdown/index.js.map +1 -1
  32. package/test-utils/dom/calendar/index.js +20 -40
  33. package/test-utils/dom/calendar/index.js.map +1 -1
  34. package/test-utils/dom/cards/index.js +55 -83
  35. package/test-utils/dom/cards/index.js.map +1 -1
  36. package/test-utils/dom/checkbox/index.js +14 -34
  37. package/test-utils/dom/checkbox/index.js.map +1 -1
  38. package/test-utils/dom/code-editor/index.js +33 -53
  39. package/test-utils/dom/code-editor/index.js.map +1 -1
  40. package/test-utils/dom/collection-preferences/index.js +40 -65
  41. package/test-utils/dom/collection-preferences/index.js.map +1 -1
  42. package/test-utils/dom/collection-preferences/page-size-preference.js +12 -32
  43. package/test-utils/dom/collection-preferences/page-size-preference.js.map +1 -1
  44. package/test-utils/dom/collection-preferences/visible-content-preference.js +18 -38
  45. package/test-utils/dom/collection-preferences/visible-content-preference.js.map +1 -1
  46. package/test-utils/dom/column-layout/index.js +5 -25
  47. package/test-utils/dom/column-layout/index.js.map +1 -1
  48. package/test-utils/dom/container/index.js +11 -31
  49. package/test-utils/dom/container/index.js.map +1 -1
  50. package/test-utils/dom/content-layout/index.js +9 -29
  51. package/test-utils/dom/content-layout/index.js.map +1 -1
  52. package/test-utils/dom/date-input/index.js +5 -25
  53. package/test-utils/dom/date-input/index.js.map +1 -1
  54. package/test-utils/dom/date-picker/index.js +26 -47
  55. package/test-utils/dom/date-picker/index.js.map +1 -1
  56. package/test-utils/dom/date-range-picker/index.js +87 -119
  57. package/test-utils/dom/date-range-picker/index.js.map +1 -1
  58. package/test-utils/dom/expandable-section/index.js +15 -35
  59. package/test-utils/dom/expandable-section/index.js.map +1 -1
  60. package/test-utils/dom/flashbar/flash.js +18 -38
  61. package/test-utils/dom/flashbar/flash.js.map +1 -1
  62. package/test-utils/dom/flashbar/index.js +9 -29
  63. package/test-utils/dom/flashbar/index.js.map +1 -1
  64. package/test-utils/dom/form/index.js +15 -35
  65. package/test-utils/dom/form/index.js.map +1 -1
  66. package/test-utils/dom/form-field/index.js +21 -41
  67. package/test-utils/dom/form-field/index.js.map +1 -1
  68. package/test-utils/dom/grid/index.js +8 -28
  69. package/test-utils/dom/grid/index.js.map +1 -1
  70. package/test-utils/dom/header/index.js +15 -35
  71. package/test-utils/dom/header/index.js.map +1 -1
  72. package/test-utils/dom/help-panel/index.js +11 -31
  73. package/test-utils/dom/help-panel/index.js.map +1 -1
  74. package/test-utils/dom/hotspot/index.js +12 -32
  75. package/test-utils/dom/hotspot/index.js.map +1 -1
  76. package/test-utils/dom/icon/index.js +5 -25
  77. package/test-utils/dom/icon/index.js.map +1 -1
  78. package/test-utils/dom/index.js +133 -134
  79. package/test-utils/dom/index.js.map +1 -1
  80. package/test-utils/dom/input/base-input.js +35 -57
  81. package/test-utils/dom/input/base-input.js.map +1 -1
  82. package/test-utils/dom/input/index.js +7 -27
  83. package/test-utils/dom/input/index.js.map +1 -1
  84. package/test-utils/dom/internal/abstract-switch.js +12 -32
  85. package/test-utils/dom/internal/abstract-switch.js.map +1 -1
  86. package/test-utils/dom/internal/autosuggest-input.js +14 -34
  87. package/test-utils/dom/internal/autosuggest-input.js.map +1 -1
  88. package/test-utils/dom/internal/chart-filter.js +11 -31
  89. package/test-utils/dom/internal/chart-filter.js.map +1 -1
  90. package/test-utils/dom/internal/chart-legend.js +13 -33
  91. package/test-utils/dom/internal/chart-legend.js.map +1 -1
  92. package/test-utils/dom/internal/chart-popover.js +14 -34
  93. package/test-utils/dom/internal/chart-popover.js.map +1 -1
  94. package/test-utils/dom/internal/charts.js +20 -40
  95. package/test-utils/dom/internal/charts.js.map +1 -1
  96. package/test-utils/dom/internal/dropdown-host.js +89 -125
  97. package/test-utils/dom/internal/dropdown-host.js.map +1 -1
  98. package/test-utils/dom/internal/dropdown.js +7 -27
  99. package/test-utils/dom/internal/dropdown.js.map +1 -1
  100. package/test-utils/dom/internal/filtering-token.js +13 -33
  101. package/test-utils/dom/internal/filtering-token.js.map +1 -1
  102. package/test-utils/dom/internal/option.js +13 -33
  103. package/test-utils/dom/internal/option.js.map +1 -1
  104. package/test-utils/dom/internal/options-list.js +5 -25
  105. package/test-utils/dom/internal/options-list.js.map +1 -1
  106. package/test-utils/dom/line-chart/index.js +5 -25
  107. package/test-utils/dom/line-chart/index.js.map +1 -1
  108. package/test-utils/dom/link/index.js +5 -25
  109. package/test-utils/dom/link/index.js.map +1 -1
  110. package/test-utils/dom/mixed-line-bar-chart/index.js +29 -54
  111. package/test-utils/dom/mixed-line-bar-chart/index.js.map +1 -1
  112. package/test-utils/dom/modal/index.js +18 -38
  113. package/test-utils/dom/modal/index.js.map +1 -1
  114. package/test-utils/dom/multiselect/index.js +38 -61
  115. package/test-utils/dom/multiselect/index.js.map +1 -1
  116. package/test-utils/dom/pagination/index.js +19 -39
  117. package/test-utils/dom/pagination/index.js.map +1 -1
  118. package/test-utils/dom/pie-chart/index.js +22 -42
  119. package/test-utils/dom/pie-chart/index.js.map +1 -1
  120. package/test-utils/dom/popover/index.js +16 -39
  121. package/test-utils/dom/popover/index.js.map +1 -1
  122. package/test-utils/dom/progress-bar/index.js +13 -33
  123. package/test-utils/dom/progress-bar/index.js.map +1 -1
  124. package/test-utils/dom/property-filter/index.js +15 -35
  125. package/test-utils/dom/property-filter/index.js.map +1 -1
  126. package/test-utils/dom/radio-group/index.js +13 -33
  127. package/test-utils/dom/radio-group/index.js.map +1 -1
  128. package/test-utils/dom/radio-group/radio-button.js +12 -32
  129. package/test-utils/dom/radio-group/radio-button.js.map +1 -1
  130. package/test-utils/dom/s3-resource-selector/index.js +40 -70
  131. package/test-utils/dom/s3-resource-selector/index.js.map +1 -1
  132. package/test-utils/dom/segmented-control/index.js +9 -29
  133. package/test-utils/dom/segmented-control/index.js.map +1 -1
  134. package/test-utils/dom/select/index.js +28 -51
  135. package/test-utils/dom/select/index.js.map +1 -1
  136. package/test-utils/dom/side-navigation/index.js +41 -66
  137. package/test-utils/dom/side-navigation/index.js.map +1 -1
  138. package/test-utils/dom/space-between/index.js +5 -25
  139. package/test-utils/dom/space-between/index.js.map +1 -1
  140. package/test-utils/dom/spinner/index.js +5 -25
  141. package/test-utils/dom/spinner/index.js.map +1 -1
  142. package/test-utils/dom/split-panel/index.js +25 -45
  143. package/test-utils/dom/split-panel/index.js.map +1 -1
  144. package/test-utils/dom/status-indicator/index.js +5 -25
  145. package/test-utils/dom/status-indicator/index.js.map +1 -1
  146. package/test-utils/dom/table/index.js +76 -94
  147. package/test-utils/dom/table/index.js.map +1 -1
  148. package/test-utils/dom/tabs/index.js +19 -39
  149. package/test-utils/dom/tabs/index.js.map +1 -1
  150. package/test-utils/dom/tag-editor/index.js +19 -44
  151. package/test-utils/dom/tag-editor/index.js.map +1 -1
  152. package/test-utils/dom/text-content/index.js +5 -25
  153. package/test-utils/dom/text-content/index.js.map +1 -1
  154. package/test-utils/dom/text-filter/index.js +10 -30
  155. package/test-utils/dom/text-filter/index.js.map +1 -1
  156. package/test-utils/dom/textarea/index.js +16 -36
  157. package/test-utils/dom/textarea/index.js.map +1 -1
  158. package/test-utils/dom/tiles/index.js +17 -37
  159. package/test-utils/dom/tiles/index.js.map +1 -1
  160. package/test-utils/dom/tiles/tile.js +16 -36
  161. package/test-utils/dom/tiles/tile.js.map +1 -1
  162. package/test-utils/dom/time-input/index.js +5 -25
  163. package/test-utils/dom/time-input/index.js.map +1 -1
  164. package/test-utils/dom/toggle/index.js +14 -34
  165. package/test-utils/dom/toggle/index.js.map +1 -1
  166. package/test-utils/dom/token-group/index.js +14 -34
  167. package/test-utils/dom/token-group/index.js.map +1 -1
  168. package/test-utils/dom/token-group/token.js +12 -32
  169. package/test-utils/dom/token-group/token.js.map +1 -1
  170. package/test-utils/dom/top-navigation/1.0-beta/index.js +56 -91
  171. package/test-utils/dom/top-navigation/1.0-beta/index.js.map +1 -1
  172. package/test-utils/dom/top-navigation/index.js +73 -108
  173. package/test-utils/dom/top-navigation/index.js.map +1 -1
  174. package/test-utils/dom/tutorial-panel/index.js +38 -63
  175. package/test-utils/dom/tutorial-panel/index.js.map +1 -1
  176. package/test-utils/dom/tutorial-panel/tutorial.js +29 -49
  177. package/test-utils/dom/tutorial-panel/tutorial.js.map +1 -1
  178. package/test-utils/dom/wizard/index.js +33 -53
  179. package/test-utils/dom/wizard/index.js.map +1 -1
  180. package/test-utils/selectors/alert/index.js +20 -40
  181. package/test-utils/selectors/alert/index.js.map +1 -1
  182. package/test-utils/selectors/annotation/index.js +24 -44
  183. package/test-utils/selectors/annotation/index.js.map +1 -1
  184. package/test-utils/selectors/app-layout/index.js +27 -47
  185. package/test-utils/selectors/app-layout/index.js.map +1 -1
  186. package/test-utils/selectors/area-chart/index.js +12 -32
  187. package/test-utils/selectors/area-chart/index.js.map +1 -1
  188. package/test-utils/selectors/attribute-editor/index.js +32 -57
  189. package/test-utils/selectors/attribute-editor/index.js.map +1 -1
  190. package/test-utils/selectors/autosuggest/index.js +69 -103
  191. package/test-utils/selectors/autosuggest/index.js.map +1 -1
  192. package/test-utils/selectors/badge/index.js +5 -25
  193. package/test-utils/selectors/badge/index.js.map +1 -1
  194. package/test-utils/selectors/bar-chart/index.js +5 -25
  195. package/test-utils/selectors/bar-chart/index.js.map +1 -1
  196. package/test-utils/selectors/box/index.js +5 -25
  197. package/test-utils/selectors/box/index.js.map +1 -1
  198. package/test-utils/selectors/breadcrumb-group/index.js +17 -37
  199. package/test-utils/selectors/breadcrumb-group/index.js.map +1 -1
  200. package/test-utils/selectors/button/index.js +11 -31
  201. package/test-utils/selectors/button/index.js.map +1 -1
  202. package/test-utils/selectors/button-dropdown/index.js +30 -50
  203. package/test-utils/selectors/button-dropdown/index.js.map +1 -1
  204. package/test-utils/selectors/calendar/index.js +20 -40
  205. package/test-utils/selectors/calendar/index.js.map +1 -1
  206. package/test-utils/selectors/cards/index.js +55 -83
  207. package/test-utils/selectors/cards/index.js.map +1 -1
  208. package/test-utils/selectors/checkbox/index.js +14 -34
  209. package/test-utils/selectors/checkbox/index.js.map +1 -1
  210. package/test-utils/selectors/code-editor/index.js +25 -45
  211. package/test-utils/selectors/code-editor/index.js.map +1 -1
  212. package/test-utils/selectors/collection-preferences/index.js +40 -65
  213. package/test-utils/selectors/collection-preferences/index.js.map +1 -1
  214. package/test-utils/selectors/collection-preferences/page-size-preference.js +12 -32
  215. package/test-utils/selectors/collection-preferences/page-size-preference.js.map +1 -1
  216. package/test-utils/selectors/collection-preferences/visible-content-preference.js +18 -38
  217. package/test-utils/selectors/collection-preferences/visible-content-preference.js.map +1 -1
  218. package/test-utils/selectors/column-layout/index.js +5 -25
  219. package/test-utils/selectors/column-layout/index.js.map +1 -1
  220. package/test-utils/selectors/container/index.js +11 -31
  221. package/test-utils/selectors/container/index.js.map +1 -1
  222. package/test-utils/selectors/content-layout/index.js +9 -29
  223. package/test-utils/selectors/content-layout/index.js.map +1 -1
  224. package/test-utils/selectors/date-input/index.js +5 -25
  225. package/test-utils/selectors/date-input/index.js.map +1 -1
  226. package/test-utils/selectors/date-picker/index.js +22 -43
  227. package/test-utils/selectors/date-picker/index.js.map +1 -1
  228. package/test-utils/selectors/date-range-picker/index.js +81 -112
  229. package/test-utils/selectors/date-range-picker/index.js.map +1 -1
  230. package/test-utils/selectors/expandable-section/index.js +15 -35
  231. package/test-utils/selectors/expandable-section/index.js.map +1 -1
  232. package/test-utils/selectors/flashbar/flash.js +18 -38
  233. package/test-utils/selectors/flashbar/flash.js.map +1 -1
  234. package/test-utils/selectors/flashbar/index.js +9 -29
  235. package/test-utils/selectors/flashbar/index.js.map +1 -1
  236. package/test-utils/selectors/form/index.js +15 -35
  237. package/test-utils/selectors/form/index.js.map +1 -1
  238. package/test-utils/selectors/form-field/index.js +21 -41
  239. package/test-utils/selectors/form-field/index.js.map +1 -1
  240. package/test-utils/selectors/grid/index.js +8 -28
  241. package/test-utils/selectors/grid/index.js.map +1 -1
  242. package/test-utils/selectors/header/index.js +15 -35
  243. package/test-utils/selectors/header/index.js.map +1 -1
  244. package/test-utils/selectors/help-panel/index.js +11 -31
  245. package/test-utils/selectors/help-panel/index.js.map +1 -1
  246. package/test-utils/selectors/hotspot/index.js +12 -32
  247. package/test-utils/selectors/hotspot/index.js.map +1 -1
  248. package/test-utils/selectors/icon/index.js +5 -25
  249. package/test-utils/selectors/icon/index.js.map +1 -1
  250. package/test-utils/selectors/index.js +133 -134
  251. package/test-utils/selectors/index.js.map +1 -1
  252. package/test-utils/selectors/input/base-input.js +7 -27
  253. package/test-utils/selectors/input/base-input.js.map +1 -1
  254. package/test-utils/selectors/input/index.js +7 -27
  255. package/test-utils/selectors/input/index.js.map +1 -1
  256. package/test-utils/selectors/internal/abstract-switch.js +12 -32
  257. package/test-utils/selectors/internal/abstract-switch.js.map +1 -1
  258. package/test-utils/selectors/internal/autosuggest-input.js +14 -34
  259. package/test-utils/selectors/internal/autosuggest-input.js.map +1 -1
  260. package/test-utils/selectors/internal/chart-filter.js +11 -31
  261. package/test-utils/selectors/internal/chart-filter.js.map +1 -1
  262. package/test-utils/selectors/internal/chart-legend.js +13 -33
  263. package/test-utils/selectors/internal/chart-legend.js.map +1 -1
  264. package/test-utils/selectors/internal/chart-popover.js +14 -34
  265. package/test-utils/selectors/internal/chart-popover.js.map +1 -1
  266. package/test-utils/selectors/internal/charts.js +20 -40
  267. package/test-utils/selectors/internal/charts.js.map +1 -1
  268. package/test-utils/selectors/internal/dropdown-host.js +59 -91
  269. package/test-utils/selectors/internal/dropdown-host.js.map +1 -1
  270. package/test-utils/selectors/internal/dropdown.js +7 -27
  271. package/test-utils/selectors/internal/dropdown.js.map +1 -1
  272. package/test-utils/selectors/internal/filtering-token.js +13 -33
  273. package/test-utils/selectors/internal/filtering-token.js.map +1 -1
  274. package/test-utils/selectors/internal/option.js +13 -33
  275. package/test-utils/selectors/internal/option.js.map +1 -1
  276. package/test-utils/selectors/internal/options-list.js +5 -25
  277. package/test-utils/selectors/internal/options-list.js.map +1 -1
  278. package/test-utils/selectors/line-chart/index.js +5 -25
  279. package/test-utils/selectors/line-chart/index.js.map +1 -1
  280. package/test-utils/selectors/link/index.js +5 -25
  281. package/test-utils/selectors/link/index.js.map +1 -1
  282. package/test-utils/selectors/mixed-line-bar-chart/index.js +29 -54
  283. package/test-utils/selectors/mixed-line-bar-chart/index.js.map +1 -1
  284. package/test-utils/selectors/modal/index.js +13 -33
  285. package/test-utils/selectors/modal/index.js.map +1 -1
  286. package/test-utils/selectors/multiselect/index.js +38 -61
  287. package/test-utils/selectors/multiselect/index.js.map +1 -1
  288. package/test-utils/selectors/pagination/index.js +19 -39
  289. package/test-utils/selectors/pagination/index.js.map +1 -1
  290. package/test-utils/selectors/pie-chart/index.js +22 -42
  291. package/test-utils/selectors/pie-chart/index.js.map +1 -1
  292. package/test-utils/selectors/popover/index.js +22 -45
  293. package/test-utils/selectors/popover/index.js.map +1 -1
  294. package/test-utils/selectors/progress-bar/index.js +13 -33
  295. package/test-utils/selectors/progress-bar/index.js.map +1 -1
  296. package/test-utils/selectors/property-filter/index.js +15 -35
  297. package/test-utils/selectors/property-filter/index.js.map +1 -1
  298. package/test-utils/selectors/radio-group/index.js +13 -33
  299. package/test-utils/selectors/radio-group/index.js.map +1 -1
  300. package/test-utils/selectors/radio-group/radio-button.js +12 -32
  301. package/test-utils/selectors/radio-group/radio-button.js.map +1 -1
  302. package/test-utils/selectors/s3-resource-selector/index.js +40 -70
  303. package/test-utils/selectors/s3-resource-selector/index.js.map +1 -1
  304. package/test-utils/selectors/segmented-control/index.js +9 -29
  305. package/test-utils/selectors/segmented-control/index.js.map +1 -1
  306. package/test-utils/selectors/select/index.js +28 -51
  307. package/test-utils/selectors/select/index.js.map +1 -1
  308. package/test-utils/selectors/side-navigation/index.js +41 -66
  309. package/test-utils/selectors/side-navigation/index.js.map +1 -1
  310. package/test-utils/selectors/space-between/index.js +5 -25
  311. package/test-utils/selectors/space-between/index.js.map +1 -1
  312. package/test-utils/selectors/spinner/index.js +5 -25
  313. package/test-utils/selectors/spinner/index.js.map +1 -1
  314. package/test-utils/selectors/split-panel/index.js +25 -45
  315. package/test-utils/selectors/split-panel/index.js.map +1 -1
  316. package/test-utils/selectors/status-indicator/index.js +5 -25
  317. package/test-utils/selectors/status-indicator/index.js.map +1 -1
  318. package/test-utils/selectors/table/index.js +76 -94
  319. package/test-utils/selectors/table/index.js.map +1 -1
  320. package/test-utils/selectors/tabs/index.js +19 -39
  321. package/test-utils/selectors/tabs/index.js.map +1 -1
  322. package/test-utils/selectors/tag-editor/index.js +19 -44
  323. package/test-utils/selectors/tag-editor/index.js.map +1 -1
  324. package/test-utils/selectors/text-content/index.js +5 -25
  325. package/test-utils/selectors/text-content/index.js.map +1 -1
  326. package/test-utils/selectors/text-filter/index.js +10 -30
  327. package/test-utils/selectors/text-filter/index.js.map +1 -1
  328. package/test-utils/selectors/textarea/index.js +7 -27
  329. package/test-utils/selectors/textarea/index.js.map +1 -1
  330. package/test-utils/selectors/tiles/index.js +17 -37
  331. package/test-utils/selectors/tiles/index.js.map +1 -1
  332. package/test-utils/selectors/tiles/tile.js +16 -36
  333. package/test-utils/selectors/tiles/tile.js.map +1 -1
  334. package/test-utils/selectors/time-input/index.js +5 -25
  335. package/test-utils/selectors/time-input/index.js.map +1 -1
  336. package/test-utils/selectors/toggle/index.js +14 -34
  337. package/test-utils/selectors/toggle/index.js.map +1 -1
  338. package/test-utils/selectors/token-group/index.js +14 -34
  339. package/test-utils/selectors/token-group/index.js.map +1 -1
  340. package/test-utils/selectors/token-group/token.js +12 -32
  341. package/test-utils/selectors/token-group/token.js.map +1 -1
  342. package/test-utils/selectors/top-navigation/1.0-beta/index.js +56 -91
  343. package/test-utils/selectors/top-navigation/1.0-beta/index.js.map +1 -1
  344. package/test-utils/selectors/top-navigation/index.js +73 -108
  345. package/test-utils/selectors/top-navigation/index.js.map +1 -1
  346. package/test-utils/selectors/tutorial-panel/index.js +38 -63
  347. package/test-utils/selectors/tutorial-panel/index.js.map +1 -1
  348. package/test-utils/selectors/tutorial-panel/tutorial.js +29 -49
  349. package/test-utils/selectors/tutorial-panel/tutorial.js.map +1 -1
  350. package/test-utils/selectors/wizard/index.js +33 -53
  351. package/test-utils/selectors/wizard/index.js.map +1 -1
  352. package/test-utils/tsconfig.tsbuildinfo +1 -1
@@ -1,19 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
3
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
4
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -23,82 +8,76 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
23
8
  Object.defineProperty(exports, "__esModule", { value: true });
24
9
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
25
10
  // SPDX-License-Identifier: Apache-2.0
26
- var test_utils_1 = require("react-dom/test-utils");
27
- var dom_1 = require("@cloudscape-design/test-utils-core/dom");
28
- var styles_selectors_js_1 = require("../../../button-dropdown/styles.selectors.js");
29
- var styles_selectors_js_2 = require("../../../internal/components/dropdown/styles.selectors.js");
30
- var styles_selectors_js_3 = require("../../../button-dropdown/item-element/styles.selectors.js");
31
- var styles_selectors_js_4 = require("../../../button-dropdown/category-elements/styles.selectors.js");
32
- var styles_selectors_js_5 = require("../../../button/styles.selectors.js");
33
- var ButtonDropdownWrapper = /** @class */ (function (_super) {
34
- __extends(ButtonDropdownWrapper, _super);
35
- function ButtonDropdownWrapper() {
36
- return _super !== null && _super.apply(this, arguments) || this;
37
- }
38
- ButtonDropdownWrapper.prototype.findNativeButton = function () {
11
+ const test_utils_1 = require("react-dom/test-utils");
12
+ const dom_1 = require("@cloudscape-design/test-utils-core/dom");
13
+ const styles_selectors_js_1 = require("../../../button-dropdown/styles.selectors.js");
14
+ const styles_selectors_js_2 = require("../../../internal/components/dropdown/styles.selectors.js");
15
+ const styles_selectors_js_3 = require("../../../button-dropdown/item-element/styles.selectors.js");
16
+ const styles_selectors_js_4 = require("../../../button-dropdown/category-elements/styles.selectors.js");
17
+ const styles_selectors_js_5 = require("../../../button/styles.selectors.js");
18
+ class ButtonDropdownWrapper extends dom_1.ComponentWrapper {
19
+ findNativeButton() {
39
20
  // ButtonDropdown always has a button
40
21
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
41
- return this.find("button.".concat(styles_selectors_js_5.default.button));
42
- };
43
- ButtonDropdownWrapper.prototype.findOpenDropdown = function () {
44
- return (0, dom_1.createWrapper)().find(".".concat(styles_selectors_js_2.default.dropdown, "[data-open=true]"));
45
- };
22
+ return this.find(`button.${styles_selectors_js_5.default.button}`);
23
+ }
24
+ findOpenDropdown() {
25
+ return (0, dom_1.createWrapper)().find(`.${styles_selectors_js_2.default.dropdown}[data-open=true]`);
26
+ }
46
27
  /**
47
28
  * Finds an item in the open dropdown by item id. Returns null if there is no open dropdown.
48
29
  *
49
30
  * This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
50
31
  */
51
- ButtonDropdownWrapper.prototype.findItemById = function (id) {
32
+ findItemById(id) {
52
33
  var _a;
53
- var itemSelector = ".".concat(styles_selectors_js_3.default['item-element'], "[data-testid=\"").concat(id, "\"]");
34
+ const itemSelector = `.${styles_selectors_js_3.default['item-element']}[data-testid="${id}"]`;
54
35
  return ((_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.find(itemSelector)) || this.find(itemSelector);
55
- };
36
+ }
56
37
  /**
57
38
  * Finds an expandable category in the open dropdown by category id. Returns null if there is no open dropdown.
58
39
  *
59
40
  * This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
60
41
  */
61
- ButtonDropdownWrapper.prototype.findExpandableCategoryById = function (id) {
42
+ findExpandableCategoryById(id) {
62
43
  var _a;
63
- var expandableCategorySelector = ".".concat(styles_selectors_js_4.default.expandable, "[data-testid=\"").concat(id, "\"]");
44
+ const expandableCategorySelector = `.${styles_selectors_js_4.default.expandable}[data-testid="${id}"]`;
64
45
  return ((_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.find(expandableCategorySelector)) || this.find(expandableCategorySelector);
65
- };
46
+ }
66
47
  /**
67
48
  * Finds the highlighted item in the open dropdown. Returns null if there is no open dropdown.
68
49
  *
69
50
  * This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
70
51
  */
71
- ButtonDropdownWrapper.prototype.findHighlightedItem = function () {
52
+ findHighlightedItem() {
72
53
  var _a;
73
- var highlightedItemSelector = ".".concat(styles_selectors_js_3.default['item-element'], ".").concat(styles_selectors_js_3.default.highlighted);
54
+ const highlightedItemSelector = `.${styles_selectors_js_3.default['item-element']}.${styles_selectors_js_3.default.highlighted}`;
74
55
  return ((_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.find(highlightedItemSelector)) || this.find(highlightedItemSelector);
75
- };
56
+ }
76
57
  /**
77
58
  * Finds all the items in the open dropdown. Returns empty array if there is no open dropdown.
78
59
  *
79
60
  * This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
80
61
  */
81
- ButtonDropdownWrapper.prototype.findItems = function () {
62
+ findItems() {
82
63
  var _a;
83
- return ((_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.findAll(".".concat(styles_selectors_js_3.default['item-element']))) || [];
84
- };
64
+ return ((_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.findAll(`.${styles_selectors_js_3.default['item-element']}`)) || [];
65
+ }
85
66
  /**
86
67
  * Finds the disabled reason tooltip. Returns null if no disabled item with `disabledReason` is highlighted.
87
68
  */
88
- ButtonDropdownWrapper.prototype.findDisabledReason = function () {
89
- return (0, dom_1.createWrapper)().find("[data-testid=\"button-dropdown-disabled-reason\"]");
90
- };
91
- ButtonDropdownWrapper.prototype.openDropdown = function () {
92
- var _this = this;
93
- (0, test_utils_1.act)(function () {
94
- _this.findNativeButton().click();
69
+ findDisabledReason() {
70
+ return (0, dom_1.createWrapper)().find(`[data-testid="button-dropdown-disabled-reason"]`);
71
+ }
72
+ openDropdown() {
73
+ (0, test_utils_1.act)(() => {
74
+ this.findNativeButton().click();
95
75
  });
96
- };
97
- ButtonDropdownWrapper.rootSelector = styles_selectors_js_1.default['button-dropdown'];
98
- __decorate([
99
- dom_1.usesDom
100
- ], ButtonDropdownWrapper.prototype, "openDropdown", null);
101
- return ButtonDropdownWrapper;
102
- }(dom_1.ComponentWrapper));
76
+ }
77
+ }
78
+ ButtonDropdownWrapper.rootSelector = styles_selectors_js_1.default['button-dropdown'];
79
+ __decorate([
80
+ dom_1.usesDom
81
+ ], ButtonDropdownWrapper.prototype, "openDropdown", null);
103
82
  exports.default = ButtonDropdownWrapper;
104
83
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/button-dropdown/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,mDAA2C;AAC3C,8DAAkH;AAClH,oFAAkE;AAClE,iGAAuF;AACvF,iGAAmF;AACnF,sGAA4F;AAC5F,2EAA+D;AAE/D;IAAmD,yCAAgB;IAAnE;;IAiEA,CAAC;IA9DC,gDAAgB,GAAhB;QACE,qCAAqC;QACrC,oEAAoE;QACpE,OAAO,IAAI,CAAC,IAAI,CAAoB,iBAAU,6BAAY,CAAC,MAAM,CAAE,CAAE,CAAC;IACxE,CAAC;IAED,gDAAgB,GAAhB;QACE,OAAO,IAAA,mBAAa,GAAE,CAAC,IAAI,CAAC,WAAI,6BAAc,CAAC,QAAQ,qBAAkB,CAAC,CAAC;IAC7E,CAAC;IAED;;;;OAIG;IACH,4CAAY,GAAZ,UAAa,EAAU;;QACrB,IAAM,YAAY,GAAG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B,CAAC,CAAC;IA2DxD;QADC,aAAO;6DAKP;IACH,4BAAC;CAAA,AAjED,CAAmD,sBAAgB,GAiElE;kBAjEoB,qBAAqB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/button-dropdown/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,qDAA2C;AAC3C,gEAAkH;AAClH,sFAAkE;AAClE,mGAAuF;AACvF,mGAAmF;AACnF,wGAA4F;AAC5F,6EAA+D;AAE/D,MAAqB,qBAAsB,SAAQ,sBAAgB;IAGjE,gBAAgB;QACd,qCAAqC;QACrC,oEAAoE;QACpE,OAAO,IAAI,CAAC,IAAI,CAAoB,UAAU,6BAAY,CAAC,MAAM,EAAE,CAAE,CAAC;IACxE,CAAC;IAED,gBAAgB;QACd,OAAO,IAAA,mBAAa,GAAE,CAAC,IAAI,CAAC,IAAI,6BAAc,CAAC,QAAQ,kBAAkB,CAAC,CAAC;IAC7E,CAAC;IAED;;;;OAIG;IACH,YAAY,CAAC,EAAU;;QACrB,MAAM,YAAY,GAAG,IAAI,6BAAU,CAAC,cAAc,CAAC,iBAAiB,EAAE,IAAI,CAAC;QAC3E,OAAO,CAAA,MAAA,IAAI,CAAC,gBAAgB,EAAE,0CAAE,IAAI,CAAC,YAAY,CAAC,KAAI,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAChF,CAAC;IAED;;;;OAIG;IACH,0BAA0B,CAAC,EAAU;;QACnC,MAAM,0BAA0B,GAAG,IAAI,6BAAc,CAAC,UAAU,iBAAiB,EAAE,IAAI,CAAC;QACxF,OAAO,CAAA,MAAA,IAAI,CAAC,gBAAgB,EAAE,0CAAE,IAAI,CAAC,0BAA0B,CAAC,KAAI,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IAC5G,CAAC;IAED;;;;OAIG;IACH,mBAAmB;;QACjB,MAAM,uBAAuB,GAAG,IAAI,6BAAU,CAAC,cAAc,CAAC,IAAI,6BAAU,CAAC,WAAW,EAAE,CAAC;QAC3F,OAAO,CAAA,MAAA,IAAI,CAAC,gBAAgB,EAAE,0CAAE,IAAI,CAAC,uBAAuB,CAAC,KAAI,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;IACtG,CAAC;IAED;;;;OAIG;IACH,SAAS;;QACP,OAAO,CAAA,MAAA,IAAI,CAAC,gBAAgB,EAAE,0CAAE,OAAO,CAAC,IAAI,6BAAU,CAAC,cAAc,CAAC,EAAE,CAAC,KAAI,EAAE,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,OAAO,IAAA,mBAAa,GAAE,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC;IACjF,CAAC;IAGD,YAAY;QACV,IAAA,gBAAG,EAAC,GAAG,EAAE;YACP,IAAI,CAAC,gBAAgB,EAAE,CAAC,KAAK,EAAE,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC;;AA/DM,kCAAY,GAAW,6BAAM,CAAC,iBAAiB,CAAC,CAAC;AA2DxD;IADC,aAAO;yDAKP;AAhEH,wCAiEC"}
@@ -1,53 +1,33 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  Object.defineProperty(exports, "__esModule", { value: true });
18
3
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
19
4
  // SPDX-License-Identifier: Apache-2.0
20
- var dom_1 = require("@cloudscape-design/test-utils-core/dom");
21
- var styles_selectors_js_1 = require("../../../calendar/styles.selectors.js");
22
- var button_1 = require("../button");
23
- var CalendarWrapper = /** @class */ (function (_super) {
24
- __extends(CalendarWrapper, _super);
25
- function CalendarWrapper() {
26
- return _super !== null && _super.apply(this, arguments) || this;
27
- }
5
+ const dom_1 = require("@cloudscape-design/test-utils-core/dom");
6
+ const styles_selectors_js_1 = require("../../../calendar/styles.selectors.js");
7
+ const button_1 = require("../button");
8
+ class CalendarWrapper extends dom_1.ComponentWrapper {
28
9
  /**
29
10
  * Returns a day container on the calendar.
30
11
  *
31
12
  * @param row 1-based row index of the day.
32
13
  * @param column 1-based column index of the day.
33
14
  */
34
- CalendarWrapper.prototype.findDateAt = function (row, column) {
35
- return this.find(".".concat(styles_selectors_js_1.default['calendar-week'], ":nth-child(").concat(row, ") .").concat(styles_selectors_js_1.default['calendar-day'], ":nth-child(").concat(column, ")"));
36
- };
37
- CalendarWrapper.prototype.findHeader = function () {
15
+ findDateAt(row, column) {
16
+ return this.find(`.${styles_selectors_js_1.default['calendar-week']}:nth-child(${row}) .${styles_selectors_js_1.default['calendar-day']}:nth-child(${column})`);
17
+ }
18
+ findHeader() {
38
19
  return this.findByClassName(styles_selectors_js_1.default['calendar-header']);
39
- };
40
- CalendarWrapper.prototype.findPreviousMonthButton = function () {
41
- return this.findComponent(".".concat(styles_selectors_js_1.default['calendar-prev-month-btn']), button_1.default);
42
- };
43
- CalendarWrapper.prototype.findNextMonthButton = function () {
44
- return this.findComponent(".".concat(styles_selectors_js_1.default['calendar-next-month-btn']), button_1.default);
45
- };
46
- CalendarWrapper.prototype.findSelectedDate = function () {
47
- return this.find(".".concat(styles_selectors_js_1.default['calendar-day-selected']));
48
- };
49
- CalendarWrapper.rootSelector = styles_selectors_js_1.default.root;
50
- return CalendarWrapper;
51
- }(dom_1.ComponentWrapper));
20
+ }
21
+ findPreviousMonthButton() {
22
+ return this.findComponent(`.${styles_selectors_js_1.default['calendar-prev-month-btn']}`, button_1.default);
23
+ }
24
+ findNextMonthButton() {
25
+ return this.findComponent(`.${styles_selectors_js_1.default['calendar-next-month-btn']}`, button_1.default);
26
+ }
27
+ findSelectedDate() {
28
+ return this.find(`.${styles_selectors_js_1.default['calendar-day-selected']}`);
29
+ }
30
+ }
52
31
  exports.default = CalendarWrapper;
32
+ CalendarWrapper.rootSelector = styles_selectors_js_1.default.root;
53
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/calendar/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,8DAA0F;AAC1F,6EAA2D;AAC3D,oCAAsC;AAEtC;IAA6C,mCAAgB;IAA7D;;IA2BA,CAAC;IAzBC;;;;;OAKG;IACH,oCAAU,GAAV,UAAW,GAAW,EAAE,MAAc;QACpC,OAAO,IAAI,CAAC,IAAI,CAAC,WAAI,6BAAM,CAAC,eAAe,CAAC,wBAAc,GAAG,gBAAM,6BAAM,CAAC,cAAc,CAAC,wBAAc,MAAM,MAAG,CAAE,CAAC;IACrH,CAAC;IAED,oCAAU,GAAV;QACE,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,iBAAiB,CAAC,CAAE,CAAC;IAC1D,CAAC;IAED,iDAAuB,GAAvB;QACE,OAAO,IAAI,CAAC,aAAa,CAAC,WAAI,6BAAM,CAAC,yBAAyB,CAAC,CAAE,EAAE,gBAAa,CAAE,CAAC;IACrF,CAAC;IAED,6CAAmB,GAAnB;QACE,OAAO,IAAI,CAAC,aAAa,CAAC,WAAI,6BAAM,CAAC,yBAAyB,CAAC,CAAE,EAAE,gBAAa,CAAE,CAAC;IACrF,CAAC;IAED,0CAAgB,GAAhB;QACE,OAAO,IAAI,CAAC,IAAI,CAAC,WAAI,6BAAM,CAAC,uBAAuB,CAAC,CAAE,CAAE,CAAC;IAC3D,CAAC;IAzBM,4BAAY,GAAW,6BAAM,CAAC,IAAI,CAAC;IA0B5C,sBAAC;CAAA,AA3BD,CAA6C,sBAAgB,GA2B5D;kBA3BoB,eAAe"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/calendar/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAC1F,+EAA2D;AAC3D,sCAAsC;AAEtC,MAAqB,eAAgB,SAAQ,sBAAgB;IAE3D;;;;;OAKG;IACH,UAAU,CAAC,GAAW,EAAE,MAAc;QACpC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,eAAe,CAAC,cAAc,GAAG,MAAM,6BAAM,CAAC,cAAc,CAAC,cAAc,MAAM,GAAG,CAAE,CAAC;IACrH,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,iBAAiB,CAAC,CAAE,CAAC;IAC1D,CAAC;IAED,uBAAuB;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,6BAAM,CAAC,yBAAyB,CAAC,EAAE,EAAE,gBAAa,CAAE,CAAC;IACrF,CAAC;IAED,mBAAmB;QACjB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,6BAAM,CAAC,yBAAyB,CAAC,EAAE,EAAE,gBAAa,CAAE,CAAC;IACrF,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,6BAAM,CAAC,uBAAuB,CAAC,EAAE,CAAE,CAAC;IAC3D,CAAC;;AA1BH,kCA2BC;AA1BQ,4BAAY,GAAW,6BAAM,CAAC,IAAI,CAAC"}
@@ -1,113 +1,85 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  Object.defineProperty(exports, "__esModule", { value: true });
18
3
  exports.CardWrapper = exports.CardSectionWrapper = void 0;
19
4
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
20
5
  // SPDX-License-Identifier: Apache-2.0
21
- var dom_1 = require("@cloudscape-design/test-utils-core/dom");
22
- var styles_selectors_js_1 = require("../../../cards/styles.selectors.js");
23
- var styles_selectors_js_2 = require("../../../table/styles.selectors.js");
24
- var collection_preferences_1 = require("../collection-preferences");
25
- var container_1 = require("../container");
26
- var pagination_1 = require("../pagination");
27
- var text_filter_1 = require("../text-filter");
28
- var CardSectionWrapper = /** @class */ (function (_super) {
29
- __extends(CardSectionWrapper, _super);
30
- function CardSectionWrapper() {
31
- return _super !== null && _super.apply(this, arguments) || this;
32
- }
33
- CardSectionWrapper.prototype.findSectionHeader = function () {
6
+ const dom_1 = require("@cloudscape-design/test-utils-core/dom");
7
+ const styles_selectors_js_1 = require("../../../cards/styles.selectors.js");
8
+ const styles_selectors_js_2 = require("../../../table/styles.selectors.js");
9
+ const collection_preferences_1 = require("../collection-preferences");
10
+ const container_1 = require("../container");
11
+ const pagination_1 = require("../pagination");
12
+ const text_filter_1 = require("../text-filter");
13
+ class CardSectionWrapper extends dom_1.ComponentWrapper {
14
+ findSectionHeader() {
34
15
  return this.findByClassName(styles_selectors_js_1.default['section-header']);
35
- };
36
- CardSectionWrapper.prototype.findContent = function () {
16
+ }
17
+ findContent() {
37
18
  return this.findByClassName(styles_selectors_js_1.default['section-content']);
38
- };
39
- return CardSectionWrapper;
40
- }(dom_1.ComponentWrapper));
41
- exports.CardSectionWrapper = CardSectionWrapper;
42
- var CardWrapper = /** @class */ (function (_super) {
43
- __extends(CardWrapper, _super);
44
- function CardWrapper() {
45
- return _super !== null && _super.apply(this, arguments) || this;
46
19
  }
20
+ }
21
+ exports.CardSectionWrapper = CardSectionWrapper;
22
+ class CardWrapper extends dom_1.ComponentWrapper {
47
23
  /**
48
24
  * Note: for integration/selector-based tests you should add `1` to the expected section index,
49
25
  * for example, `.findSections().get(sectionIndex+1)`. The `get` call in this context
50
26
  * is '2-indexed', that is, the first section in a card has an index of `2`.
51
27
  */
52
- CardWrapper.prototype.findSections = function () {
53
- return this.findAllByClassName(styles_selectors_js_1.default.section).map(function (c) { return new CardSectionWrapper(c.getElement()); });
54
- };
55
- CardWrapper.prototype.findCardHeader = function () {
28
+ findSections() {
29
+ return this.findAllByClassName(styles_selectors_js_1.default.section).map(c => new CardSectionWrapper(c.getElement()));
30
+ }
31
+ findCardHeader() {
56
32
  return this.findByClassName(styles_selectors_js_1.default['card-header-inner']);
57
- };
58
- CardWrapper.prototype.findSelectionArea = function () {
59
- return this.findByClassName("".concat(styles_selectors_js_1.default['selection-control'], " label"));
60
- };
61
- return CardWrapper;
62
- }(dom_1.ComponentWrapper));
33
+ }
34
+ findSelectionArea() {
35
+ return this.findByClassName(`${styles_selectors_js_1.default['selection-control']} label`);
36
+ }
37
+ }
63
38
  exports.CardWrapper = CardWrapper;
64
- var CardsWrapper = /** @class */ (function (_super) {
65
- __extends(CardsWrapper, _super);
66
- function CardsWrapper() {
67
- var _this = _super !== null && _super.apply(this, arguments) || this;
68
- _this.containerWrapper = new container_1.default(_this.getElement());
69
- return _this;
70
- }
71
- CardsWrapper.prototype.findItems = function () {
72
- return this.findAllByClassName(styles_selectors_js_1.default.card).map(function (c) { return new CardWrapper(c.getElement()); });
73
- };
74
- CardsWrapper.prototype.findSelectedItems = function () {
75
- return this.findAllByClassName(styles_selectors_js_1.default['card-selected']).map(function (c) { return new CardWrapper(c.getElement()); });
76
- };
77
- CardsWrapper.prototype.findHeader = function () {
39
+ class CardsWrapper extends dom_1.ComponentWrapper {
40
+ constructor() {
41
+ super(...arguments);
42
+ this.containerWrapper = new container_1.default(this.getElement());
43
+ }
44
+ findItems() {
45
+ return this.findAllByClassName(styles_selectors_js_1.default.card).map(c => new CardWrapper(c.getElement()));
46
+ }
47
+ findSelectedItems() {
48
+ return this.findAllByClassName(styles_selectors_js_1.default['card-selected']).map(c => new CardWrapper(c.getElement()));
49
+ }
50
+ findHeader() {
78
51
  return this.containerWrapper.findHeader();
79
- };
52
+ }
80
53
  /**
81
54
  * Alias for findHeader method for compatibility with previous versions
82
55
  * @deprecated
83
56
  */
84
- CardsWrapper.prototype.findHeaderRegion = function () {
57
+ findHeaderRegion() {
85
58
  return this.findHeader();
86
- };
59
+ }
87
60
  /**
88
61
  * Alias for findEmptySlot method for compatibility with previous versions
89
62
  * @deprecated
90
63
  */
91
- CardsWrapper.prototype.findEmptyRegion = function () {
64
+ findEmptyRegion() {
92
65
  return this.findEmptySlot();
93
- };
94
- CardsWrapper.prototype.findEmptySlot = function () {
66
+ }
67
+ findEmptySlot() {
95
68
  return this.findByClassName(styles_selectors_js_1.default.empty);
96
- };
97
- CardsWrapper.prototype.findLoadingText = function () {
69
+ }
70
+ findLoadingText() {
98
71
  return this.findByClassName(styles_selectors_js_1.default.loading);
99
- };
100
- CardsWrapper.prototype.findTextFilter = function () {
101
- return this.findComponent(".".concat(styles_selectors_js_2.default['tools-filtering']), text_filter_1.default);
102
- };
103
- CardsWrapper.prototype.findPagination = function () {
104
- return this.findComponent(".".concat(styles_selectors_js_2.default['tools-pagination']), pagination_1.default);
105
- };
106
- CardsWrapper.prototype.findCollectionPreferences = function () {
107
- return this.findComponent(".".concat(styles_selectors_js_2.default['tools-preferences']), collection_preferences_1.default);
108
- };
109
- CardsWrapper.rootSelector = styles_selectors_js_1.default.root;
110
- return CardsWrapper;
111
- }(dom_1.ComponentWrapper));
72
+ }
73
+ findTextFilter() {
74
+ return this.findComponent(`.${styles_selectors_js_2.default['tools-filtering']}`, text_filter_1.default);
75
+ }
76
+ findPagination() {
77
+ return this.findComponent(`.${styles_selectors_js_2.default['tools-pagination']}`, pagination_1.default);
78
+ }
79
+ findCollectionPreferences() {
80
+ return this.findComponent(`.${styles_selectors_js_2.default['tools-preferences']}`, collection_preferences_1.default);
81
+ }
82
+ }
112
83
  exports.default = CardsWrapper;
84
+ CardsWrapper.rootSelector = styles_selectors_js_1.default.root;
113
85
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/cards/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,8DAA0F;AAC1F,0EAAwD;AACxD,0EAA6D;AAC7D,oEAAqE;AACrE,0CAA4C;AAC5C,4CAA8C;AAC9C,8CAA+C;AAE/C;IAAwC,sCAAgB;IAAxD;;IAQA,CAAC;IAPC,8CAAiB,GAAjB;QACE,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,wCAAW,GAAX;QACE,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACzD,CAAC;IACH,yBAAC;AAAD,CAAC,AARD,CAAwC,sBAAgB,GAQvD;AARY,gDAAkB;AAU/B;IAAiC,+BAAgB;IAAjD;;IAiBA,CAAC;IAhBC;;;;OAIG;IACH,kCAAY,GAAZ;QACE,OAAO,IAAI,CAAC,kBAAkB,CAAC,6BAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAA,CAAC,IAAI,OAAA,IAAI,kBAAkB,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,EAAtC,CAAsC,CAAC,CAAC;IAClG,CAAC;IAED,oCAAc,GAAd;QACE,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,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,IAAI,6BAAW,CAAC,iBAAiB,CAAC,EAAE,EAAE,qBAAiB,CAAC,CAAC;IACrF,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,6BAAW,CAAC,kBAAkB,CAAC,EAAE,EAAE,oBAAiB,CAAC,CAAC;IACtF,CAAC;IAED,yBAAyB;QACvB,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,6BAAW,CAAC,mBAAmB,CAAC,EAAE,EAAE,gCAA4B,CAAC,CAAC;IAClG,CAAC;;AAnDH,+BAoDC;AAnDQ,yBAAY,GAAW,6BAAM,CAAC,IAAI,CAAC"}
@@ -1,44 +1,24 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  Object.defineProperty(exports, "__esModule", { value: true });
18
3
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
19
4
  // SPDX-License-Identifier: Apache-2.0
20
- var dom_1 = require("@cloudscape-design/test-utils-core/dom");
21
- var styles_selectors_js_1 = require("../../../checkbox/styles.selectors.js");
22
- var abstract_switch_1 = require("../internal/abstract-switch");
23
- var CheckboxWrapper = /** @class */ (function (_super) {
24
- __extends(CheckboxWrapper, _super);
25
- function CheckboxWrapper() {
26
- return _super !== null && _super.apply(this, arguments) || this;
27
- }
28
- CheckboxWrapper.prototype.findAbstractSwitch = function () {
5
+ const dom_1 = require("@cloudscape-design/test-utils-core/dom");
6
+ const styles_selectors_js_1 = require("../../../checkbox/styles.selectors.js");
7
+ const abstract_switch_1 = require("../internal/abstract-switch");
8
+ class CheckboxWrapper extends dom_1.ComponentWrapper {
9
+ findAbstractSwitch() {
29
10
  return new abstract_switch_1.default(this.getElement());
30
- };
31
- CheckboxWrapper.prototype.findLabel = function () {
11
+ }
12
+ findLabel() {
32
13
  return this.findAbstractSwitch().findLabel();
33
- };
34
- CheckboxWrapper.prototype.findNativeInput = function () {
14
+ }
15
+ findNativeInput() {
35
16
  return this.findAbstractSwitch().findNativeInput();
36
- };
37
- CheckboxWrapper.prototype.findDescription = function () {
17
+ }
18
+ findDescription() {
38
19
  return this.findAbstractSwitch().findDescription();
39
- };
40
- CheckboxWrapper.rootSelector = styles_selectors_js_1.default.root;
41
- return CheckboxWrapper;
42
- }(dom_1.ComponentWrapper));
20
+ }
21
+ }
43
22
  exports.default = CheckboxWrapper;
23
+ CheckboxWrapper.rootSelector = styles_selectors_js_1.default.root;
44
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/checkbox/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,8DAA0F;AAC1F,6EAA2D;AAC3D,+DAAgE;AAEhE;IAA6C,mCAAgB;IAA7D;;IAkBA,CAAC;IAfS,4CAAkB,GAA1B;QACE,OAAO,IAAI,yBAAqB,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,mCAAS,GAAT;QACE,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,SAAS,EAAE,CAAC;IAC/C,CAAC;IAED,yCAAe,GAAf;QACE,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,eAAe,EAAE,CAAC;IACrD,CAAC;IAED,yCAAe,GAAf;QACE,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,eAAe,EAAE,CAAC;IACrD,CAAC;IAhBM,4BAAY,GAAG,6BAAM,CAAC,IAAI,CAAC;IAiBpC,sBAAC;CAAA,AAlBD,CAA6C,sBAAgB,GAkB5D;kBAlBoB,eAAe"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/checkbox/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAC1F,+EAA2D;AAC3D,iEAAgE;AAEhE,MAAqB,eAAgB,SAAQ,sBAAgB;IAGnD,kBAAkB;QACxB,OAAO,IAAI,yBAAqB,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,SAAS,EAAE,CAAC;IAC/C,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,eAAe,EAAE,CAAC;IACrD,CAAC;IAED,eAAe;QACb,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,eAAe,EAAE,CAAC;IACrD,CAAC;;AAjBH,kCAkBC;AAjBQ,4BAAY,GAAG,6BAAM,CAAC,IAAI,CAAC"}
@@ -1,19 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
3
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
4
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -23,61 +8,56 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
23
8
  Object.defineProperty(exports, "__esModule", { value: true });
24
9
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
25
10
  // SPDX-License-Identifier: Apache-2.0
26
- var test_utils_1 = require("react-dom/test-utils");
27
- var dom_1 = require("@cloudscape-design/test-utils-core/dom");
28
- var button_1 = require("../button");
29
- var styles_selectors_js_1 = require("../../../code-editor/styles.selectors.js");
30
- var CodeEditorWrapper = /** @class */ (function (_super) {
31
- __extends(CodeEditorWrapper, _super);
32
- function CodeEditorWrapper() {
33
- return _super !== null && _super.apply(this, arguments) || this;
34
- }
35
- CodeEditorWrapper.prototype.findEditor = function () {
11
+ const test_utils_1 = require("react-dom/test-utils");
12
+ const dom_1 = require("@cloudscape-design/test-utils-core/dom");
13
+ const button_1 = require("../button");
14
+ const styles_selectors_js_1 = require("../../../code-editor/styles.selectors.js");
15
+ class CodeEditorWrapper extends dom_1.ComponentWrapper {
16
+ findEditor() {
36
17
  return this.findByClassName(styles_selectors_js_1.default.editor);
37
- };
38
- CodeEditorWrapper.prototype.findNativeTextArea = function () {
18
+ }
19
+ findNativeTextArea() {
39
20
  return this.find('textarea.ace_text-input');
40
- };
41
- CodeEditorWrapper.prototype.findErrorsTab = function () {
21
+ }
22
+ findErrorsTab() {
42
23
  return this.findByClassName(styles_selectors_js_1.default['tab-button--errors']);
43
- };
44
- CodeEditorWrapper.prototype.findWarningsTab = function () {
24
+ }
25
+ findWarningsTab() {
45
26
  return this.findByClassName(styles_selectors_js_1.default['tab-button--warnings']);
46
- };
47
- CodeEditorWrapper.prototype.findSettingsButton = function () {
48
- return this.findComponent(".".concat(styles_selectors_js_1.default['status-bar__cog-button'], " button"), button_1.default);
49
- };
50
- CodeEditorWrapper.prototype.findStatusBar = function () {
27
+ }
28
+ findSettingsButton() {
29
+ return this.findComponent(`.${styles_selectors_js_1.default['status-bar__cog-button']} button`, button_1.default);
30
+ }
31
+ findStatusBar() {
51
32
  return this.findByClassName(styles_selectors_js_1.default['status-bar']);
52
- };
53
- CodeEditorWrapper.prototype.findPane = function () {
33
+ }
34
+ findPane() {
54
35
  return this.findByClassName(styles_selectors_js_1.default.pane);
55
- };
56
- CodeEditorWrapper.prototype.findLoadingScreen = function () {
36
+ }
37
+ findLoadingScreen() {
57
38
  return this.findByClassName(styles_selectors_js_1.default['loading-screen']);
58
- };
59
- CodeEditorWrapper.prototype.findErrorScreen = function () {
39
+ }
40
+ findErrorScreen() {
60
41
  return this.findByClassName(styles_selectors_js_1.default['error-screen']);
61
- };
42
+ }
62
43
  /**
63
44
  * Sets the value of the component and calls the `onChange` handler
64
45
  *
65
46
  * @param value The value the input is set to.
66
47
  */
67
- CodeEditorWrapper.prototype.setValue = function (value) {
48
+ setValue(value) {
68
49
  var _a;
69
- var editor = (_a = this.findEditor()) === null || _a === void 0 ? void 0 : _a.getElement();
50
+ const editor = (_a = this.findEditor()) === null || _a === void 0 ? void 0 : _a.getElement();
70
51
  if (editor && 'env' in editor) {
71
- (0, test_utils_1.act)(function () {
52
+ (0, test_utils_1.act)(() => {
72
53
  editor.env.editor.setValue(value, -1);
73
54
  });
74
55
  }
75
- };
76
- CodeEditorWrapper.rootSelector = styles_selectors_js_1.default['code-editor'];
77
- __decorate([
78
- dom_1.usesDom
79
- ], CodeEditorWrapper.prototype, "setValue", null);
80
- return CodeEditorWrapper;
81
- }(dom_1.ComponentWrapper));
56
+ }
57
+ }
58
+ CodeEditorWrapper.rootSelector = styles_selectors_js_1.default['code-editor'];
59
+ __decorate([
60
+ dom_1.usesDom
61
+ ], CodeEditorWrapper.prototype, "setValue", null);
82
62
  exports.default = CodeEditorWrapper;
83
63
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"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