UNPKG

@uirouter/core

Version:

UI-Router Core: Framework agnostic, State-based routing for JavaScript Single Page Apps

13 lines 2.2 kB
{ "version": 3, "file": "globals.js", "sourceRoot": "", "sources": [ "@uirouter/core/globals.ts" ], "names": [], "mappings": "AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAInD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC;;;;;GAKG;AACH;IAAA;QACE;;;;WAIG;QACH,WAAM,GAAgB,IAAI,WAAW,EAAE,CAAC;QAuBxC,gBAAgB;QAChB,4BAAuB,GAAG,CAAC,CAAC,CAAC;QAE7B,gBAAgB;QAChB,sBAAiB,GAAG,IAAI,KAAK,CAAa,EAAE,EAAE,CAAC,CAAC,CAAC;QAEjD,gBAAgB;QAChB,0BAAqB,GAAG,IAAI,KAAK,CAAa,EAAE,EAAE,CAAC,CAAC,CAAC;IAOvD,CAAC;IALC,iCAAO,GAAP;QACE,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;QAC/B,IAAI,CAAC,qBAAqB,CAAC,KAAK,EAAE,CAAC;QACnC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;IACH,sBAAC;AAAD,CAAC,AA3CD,IA2CC", "sourcesContent": [ "import { StateParams } from './params/stateParams';\nimport { StateDeclaration } from './state/interface';\nimport { StateObject } from './state/stateObject';\nimport { Transition } from './transition/transition';\nimport { Queue } from './common/queue';\nimport { Disposable } from './interface';\n\n/**\n * Global router state\n *\n * This is where we hold the global mutable state such as current state, current\n * params, current transition, etc.\n */\nexport class UIRouterGlobals implements Disposable {\n /**\n * Current parameter values\n *\n * The parameter values from the latest successful transition\n */\n params: StateParams = new StateParams();\n\n /**\n * Current state\n *\n * The to-state from the latest successful transition\n */\n current: StateDeclaration;\n\n /**\n * Current state (internal object)\n *\n * The to-state from the latest successful transition\n * @internal\n */\n $current: StateObject;\n\n /**\n * The current started/running transition.\n * This transition has reached at least the onStart phase, but is not yet complete\n */\n transition: Transition;\n\n /** @internal */\n lastStartedTransitionId = -1;\n\n /** @internal */\n transitionHistory = new Queue<Transition>([], 1);\n\n /** @internal */\n successfulTransitions = new Queue<Transition>([], 1);\n\n dispose() {\n this.transitionHistory.clear();\n this.successfulTransitions.clear();\n this.transition = null;\n }\n}\n" ] }