UNPKG

react-dayo

Version:

A Queue component for notification etc

53 lines 1.81 kB
import { Step } from './constants/step'; var Cycle = /** @class */ (function () { function Cycle() { var _this = this; this.step = Step.Enter; this.skiped = false; this.proceed = function () { switch (_this.step) { case Step.Enter: { _this.step = Step.Entering; break; } case Step.Entering: { _this.step = Step.Entered; break; } case Step.Entered: { _this.step = Step.Exit; break; } case Step.Exit: { _this.step = Step.Exiting; break; } case Step.Exiting: { _this.step = Step.Exited; break; } case Step.Exited: default: { break; } } }; this.isSkip = function () { return _this.skiped; }; this.isEnter = function () { return _this.step === Step.Enter; }; this.isEntering = function () { return _this.step === Step.Entering; }; this.isEntered = function () { return _this.step === Step.Entered; }; this.isExit = function () { return _this.step === Step.Exit; }; this.isExiting = function () { return _this.step === Step.Exiting; }; this.isExited = function () { return _this.step === Step.Exited; }; } Cycle.prototype.skip = function () { this.skiped = true; }; Cycle.prototype.getCurrentStep = function () { return this.step; }; return Cycle; }()); export { Cycle }; export default Cycle; //# sourceMappingURL=cycle.js.map