UNPKG

wix-style-react

Version:
189 lines (161 loc) 5.53 kB
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator"; import _regeneratorRuntime from "@babel/runtime/regenerator"; export var toggleButtonPrivateDriverFactory = function toggleButtonPrivateDriverFactory(base) { return { exists: function () { var _exists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() { return _regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: _context.next = 2; return base.exists(); case 2: return _context.abrupt("return", _context.sent); case 3: case "end": return _context.stop(); } } }, _callee); })); function exists() { return _exists.apply(this, arguments); } return exists; }(), getToggleText: function () { var _getToggleText = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() { return _regeneratorRuntime.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: _context2.next = 2; return base.text(); case 2: return _context2.abrupt("return", _context2.sent); case 3: case "end": return _context2.stop(); } } }, _callee2); })); function getToggleText() { return _getToggleText.apply(this, arguments); } return getToggleText; }(), prefixExists: function () { var _prefixExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() { return _regeneratorRuntime.wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: _context3.next = 2; return base.$('[data-hook="prefix"]').exists(); case 2: return _context3.abrupt("return", _context3.sent); case 3: case "end": return _context3.stop(); } } }, _callee3); })); function prefixExists() { return _prefixExists.apply(this, arguments); } return prefixExists; }(), childExists: function () { var _childExists = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(selector) { return _regeneratorRuntime.wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: _context4.next = 2; return base.$(selector).exists(); case 2: return _context4.abrupt("return", _context4.sent); case 3: case "end": return _context4.stop(); } } }, _callee4); })); function childExists(_x) { return _childExists.apply(this, arguments); } return childExists; }(), isSelected: function () { var _isSelected = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() { return _regeneratorRuntime.wrap(function _callee5$(_context5) { while (1) { switch (_context5.prev = _context5.next) { case 0: _context5.next = 2; return base.attr('data-selected'); case 2: _context5.t0 = _context5.sent; return _context5.abrupt("return", _context5.t0 === 'true'); case 4: case "end": return _context5.stop(); } } }, _callee5); })); function isSelected() { return _isSelected.apply(this, arguments); } return isSelected; }(), click: function () { var _click = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() { return _regeneratorRuntime.wrap(function _callee6$(_context6) { while (1) { switch (_context6.prev = _context6.next) { case 0: _context6.next = 2; return base.click(); case 2: return _context6.abrupt("return", _context6.sent); case 3: case "end": return _context6.stop(); } } }, _callee6); })); function click() { return _click.apply(this, arguments); } return click; }(), getNative: function () { var _getNative = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() { return _regeneratorRuntime.wrap(function _callee7$(_context7) { while (1) { switch (_context7.prev = _context7.next) { case 0: _context7.next = 2; return base.getNative(); case 2: return _context7.abrupt("return", _context7.sent); case 3: case "end": return _context7.stop(); } } }, _callee7); })); function getNative() { return _getNative.apply(this, arguments); } return getNative; }() }; };