UNPKG

@awsui/components-react

Version:

AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A

48 lines (47 loc) 2.46 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var styles_selectors_js_1 = require("../../../wizard/styles.selectors.js"); var button_1 = require("../button"); var form_1 = require("../form"); var header_1 = require("../header"); var WizardWrapper = (function (_super) { __extends(WizardWrapper, _super); function WizardWrapper() { return _super !== null && _super.apply(this, arguments) || this; } WizardWrapper.prototype.findInfo = function () { return this.findComponent("." + styles_selectors_js_1.default['form-header'], header_1.default).findInfo(); }; WizardWrapper.prototype.findCancelButton = function () { return this.findComponent("." + styles_selectors_js_1.default['cancel-button'], button_1.default); }; WizardWrapper.prototype.findPreviousButton = function () { return this.findComponent("." + styles_selectors_js_1.default['previous-button'], button_1.default); }; WizardWrapper.prototype.findPrimaryButton = function () { return this.findComponent("." + styles_selectors_js_1.default['primary-button'], button_1.default); }; WizardWrapper.prototype.findMenuNavigationLinks = function () { return this.findAllByClassName(styles_selectors_js_1.default['navigation-link']); }; WizardWrapper.prototype.findMenuNavigationLink = function (stepNumber, state) { var additionalClassName = state ? "." + styles_selectors_js_1.default["navigation-link-" + state] : ''; return this.find("." + styles_selectors_js_1.default['navigation-link-item'] + ":nth-child(" + stepNumber + ") ." + styles_selectors_js_1.default['navigation-link'] + additionalClassName); }; WizardWrapper.rootSelector = styles_selectors_js_1.default.root; return WizardWrapper; }(form_1.default)); exports.default = WizardWrapper;