@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
51 lines (50 loc) • 2.75 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 styles_selectors_js_1 = require("../../../tutorial-panel/styles.selectors.js");
var styles_selectors_js_2 = require("../../../popover/styles.selectors.js");
var styles_selectors_js_3 = require("../../../button/styles.selectors.js");
var button_1 = require("../button");
var index_js_1 = require("../index.js");
var AnnotationWrapper = (function (_super) {
__extends(AnnotationWrapper, _super);
function AnnotationWrapper() {
return _super !== null && _super.apply(this, arguments) || this;
}
AnnotationWrapper.prototype.findNextButton = function () {
var _a, _b;
return (_b = (_a = this.findByClassName(styles_selectors_js_1.default['action-buttons'])) === null || _a === void 0 ? void 0 : _a.findByClassName(styles_selectors_js_3.default['variant-normal'])) !== null && _b !== void 0 ? _b : null;
};
AnnotationWrapper.prototype.findPreviousButton = function () {
var _a, _b;
return (_b = (_a = this.findByClassName(styles_selectors_js_1.default['action-buttons'])) === null || _a === void 0 ? void 0 : _a.findByClassName(styles_selectors_js_3.default['variant-link'])) !== null && _b !== void 0 ? _b : null;
};
AnnotationWrapper.prototype.findStepCounter = function () {
return this.find("." + styles_selectors_js_1.default.stepCounter + " > " + index_js_1.BoxWrapper.rootSelector);
};
AnnotationWrapper.prototype.findHeader = function () {
return this.findByClassName(styles_selectors_js_2.default.header);
};
AnnotationWrapper.prototype.findContent = function () {
return this.findByClassName(styles_selectors_js_2.default.content);
};
AnnotationWrapper.prototype.findDismissButton = function () {
return this.findComponent("." + styles_selectors_js_2.default['dismiss-control'], button_1.default);
};
AnnotationWrapper.rootSelector = styles_selectors_js_1.default.annotation;
return AnnotationWrapper;
}(selectors_1.ComponentWrapper));
exports.default = AnnotationWrapper;