@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
43 lines (42 loc) • 2.13 kB
JavaScript
;
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 selectors_1 = require("@awsui/test-utils-core/selectors");
var button_dropdown_1 = require("../button-dropdown");
var styles_selectors_js_1 = require("../../../breadcrumb-group/styles.selectors.js");
var styles_selectors_js_2 = require("../../../breadcrumb-group/item/styles.selectors.js");
var styles_selectors_js_3 = require("../../../button-dropdown/styles.selectors.js");
var BreadcrumbGroupWrapper = (function (_super) {
__extends(BreadcrumbGroupWrapper, _super);
function BreadcrumbGroupWrapper() {
return _super !== null && _super.apply(this, arguments) || this;
}
BreadcrumbGroupWrapper.prototype.findBreadcrumbLinks = function () {
return this.findAll("." + styles_selectors_js_2.default.breadcrumb + " a");
};
BreadcrumbGroupWrapper.prototype.findBreadcrumbLink = function (index) {
if (index > 1) {
index++;
}
return this.find("." + styles_selectors_js_1.default.item + ":nth-child(" + index + ") a");
};
BreadcrumbGroupWrapper.prototype.findDropdown = function () {
var buttonDropdown = this.find("." + styles_selectors_js_3.default['button-dropdown']);
return buttonDropdown && new button_dropdown_1.default(buttonDropdown.getElement());
};
BreadcrumbGroupWrapper.rootSelector = styles_selectors_js_1.default['breadcrumb-group'];
return BreadcrumbGroupWrapper;
}(selectors_1.ComponentWrapper));
exports.default = BreadcrumbGroupWrapper;