UNPKG

15.8 kBSource Map (JSON)View Raw
1{
2 "version": 3,
3 "file": "injectables.js",
4 "sourceRoot": "",
5 "sources": [
6 "@uirouter\\angularjs\\injectables.ts"
7 ],
8 "names": [],
9 "mappings": ";;AAoEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,IAAI,YAAyB,CAAC;AAE9B;;;;;;GAMG;AACH,IAAI,gBAAiC,CAAC;AAEtC;;;;;;;;;GASG;AACH,IAAI,SAAmB,CAAC;AAExB;;;;;;;;;GASG;AACH,IAAI,iBAA2B,CAAC;AAEhC;;;;;;GAMG;AACH,IAAI,MAAa,CAAC;AAElB;;;;;;;;;GASG;AACH,IAAI,YAA+B,CAAC;AAEpC;;;;;;;;;GASG;AACH,IAAI,oBAAuC,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,IAAI,YAAwB,CAAC;AAE7B;;;;;;;;;;;;;;;;GAgBG;AACH,IAAI,MAAoB,CAAC;AAEzB;;;;;;;;;;;;;;GAcG;AACH,IAAI,cAA6B,CAAC;AAElC;;;;;;;;;;;;;;GAcG;AACH,IAAI,sBAAqC,CAAC;AAE1C;;;;;;;GAOG;AACH,IAAI,qBAA2C,CAAC;AAEhD;;;;;;;;;;;;GAYG;AACH,IAAI,aAAyC,CAAC;AAE9C;;;;;;;;;;;GAWG;AACH,IAAI,cAA6B,CAAC;AAElC;;;;;;;;;;;;;;;GAeG;AACH,IAAI,mBAA+B,CAAC;AAEpC;;;;;;;;;;;;;;;;;GAiBG;AACH,IAAI,WAAuB,CAAC;AAE5B;;;;;;;;;;GAUG;AACH,IAAI,kBAAqC,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,IAAI,UAAqB,CAAC;AAE1B;;;;;;;;;;;;GAYG;AACH,IAAI,kBAAqC,CAAC;AAE1C;;;;;;;;;;;;GAYG;AACH,IAAI,0BAA6C,CAAC",
10 "sourcesContent": [
11 "/* eslint-disable @typescript-eslint/no-unused-vars */\r\n/**\r\n * # Angular 1 injectable services\r\n *\r\n * This is a list of the objects which can be injected using angular's injector.\r\n *\r\n * There are three different kind of injectable objects:\r\n *\r\n * ## **Provider** objects\r\n * #### injectable into a `.config()` block during configtime\r\n *\r\n * - [[$uiRouterProvider]]: The UI-Router instance\r\n * - [[$stateProvider]]: State registration\r\n * - [[$transitionsProvider]]: Transition hooks\r\n * - [[$urlServiceProvider]]: All URL related public APIs\r\n *\r\n * - [[$uiViewScrollProvider]]: Disable ui-router view scrolling\r\n * - [[$urlRouterProvider]]: (deprecated) Url matching rules\r\n * - [[$urlMatcherFactoryProvider]]: (deprecated) Url parsing config\r\n *\r\n * ## **Service** objects\r\n * #### injectable globally during runtime\r\n *\r\n * - [[$uiRouter]]: The UI-Router instance\r\n * - [[$trace]]: Enable transition trace/debug\r\n * - [[$transitions]]: Transition hooks\r\n * - [[$state]]: Imperative state related APIs\r\n * - [[$stateRegistry]]: State registration\r\n * - [[$urlService]]: All URL related public APIs\r\n * - [[$uiRouterGlobals]]: Global variables\r\n * - [[$uiViewScroll]]: Scroll an element into view\r\n *\r\n * - [[$stateParams]]: (deprecated) Global state param values\r\n * - [[$urlRouter]]: (deprecated) URL synchronization\r\n * - [[$urlMatcherFactory]]: (deprecated) URL parsing config\r\n *\r\n * ## **Per-Transition** objects\r\n *\r\n * - These kind of objects are injectable into:\r\n * - Resolves ([[Ng1StateDeclaration.resolve]]),\r\n * - Transition Hooks ([[TransitionService.onStart]], etc),\r\n * - Routed Controllers ([[Ng1ViewDeclaration.controller]])\r\n *\r\n * #### Different instances are injected based on the [[Transition]]\r\n *\r\n * - [[$transition$]]: The current Transition object\r\n * - [[$stateParams]]: State param values for pending Transition (deprecated)\r\n * - Any resolve data defined using [[Ng1StateDeclaration.resolve]]\r\n *\r\n * @preferred @publicapi @module injectables\r\n */ /** */\r\nimport { StateProvider } from './stateProvider';\r\nimport {\r\n StateService,\r\n TransitionService,\r\n Transition,\r\n UrlRouter,\r\n UrlMatcherFactory,\r\n StateParams,\r\n StateRegistry,\r\n UIRouterGlobals,\r\n UIRouter,\r\n Trace,\r\n UrlService,\r\n} from '@uirouter/core';\r\nimport { UIViewScrollProvider } from './viewScroll';\r\nimport { UrlRouterProvider } from './urlRouterProvider';\r\n\r\n/**\r\n * The current (or pending) State Parameters\r\n *\r\n * An injectable global **Service Object** which holds the state parameters for the latest **SUCCESSFUL** transition.\r\n *\r\n * The values are not updated until *after* a `Transition` successfully completes.\r\n *\r\n * **Also:** an injectable **Per-Transition Object** object which holds the pending state parameters for the pending `Transition` currently running.\r\n *\r\n * ### Deprecation warning:\r\n *\r\n * The value injected for `$stateParams` is different depending on where it is injected.\r\n *\r\n * - When injected into an angular service, the object injected is the global **Service Object** with the parameter values for the latest successful `Transition`.\r\n * - When injected into transition hooks, resolves, or view controllers, the object is the **Per-Transition Object** with the parameter values for the running `Transition`.\r\n *\r\n * Because of these confusing details, this service is deprecated.\r\n *\r\n * ### Instead of using the global `$stateParams` service object,\r\n * inject [[$uiRouterGlobals]] and use [[UIRouterGlobals.params]]\r\n *\r\n * ```js\r\n * MyService.$inject = ['$uiRouterGlobals'];\r\n * function MyService($uiRouterGlobals) {\r\n * return {\r\n * paramValues: function () {\r\n * return $uiRouterGlobals.params;\r\n * }\r\n * }\r\n * }\r\n * ```\r\n *\r\n * ### Instead of using the per-transition `$stateParams` object,\r\n * inject the current `Transition` (as [[$transition$]]) and use [[Transition.params]]\r\n *\r\n * ```js\r\n * MyController.$inject = ['$transition$'];\r\n * function MyController($transition$) {\r\n * var username = $transition$.params().username;\r\n * // .. do something with username\r\n * }\r\n * ```\r\n *\r\n * ---\r\n *\r\n * This object can be injected into other services.\r\n *\r\n * #### Deprecated Example:\r\n * ```js\r\n * SomeService.$inject = ['$http', '$stateParams'];\r\n * function SomeService($http, $stateParams) {\r\n * return {\r\n * getUser: function() {\r\n * return $http.get('/api/users/' + $stateParams.username);\r\n * }\r\n * }\r\n * };\r\n * angular.service('SomeService', SomeService);\r\n * ```\r\n * @deprecated\r\n */\r\nlet $stateParams: StateParams;\r\n\r\n/**\r\n * Global UI-Router variables\r\n *\r\n * The router global state as a **Service Object** (injectable during runtime).\r\n *\r\n * This object contains globals such as the current state and current parameter values.\r\n */\r\nlet $uiRouterGlobals: UIRouterGlobals;\r\n\r\n/**\r\n * The UI-Router instance\r\n *\r\n * The [[UIRouter]] singleton (the router instance) as a **Service Object** (injectable during runtime).\r\n *\r\n * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap.\r\n * It has references to the other UI-Router services\r\n *\r\n * #### Note: This object is also exposed as [[$uiRouterProvider]] for injection during angular config time.\r\n */\r\nlet $uiRouter: UIRouter;\r\n\r\n/**\r\n * The UI-Router instance\r\n *\r\n * The [[UIRouter]] singleton (the router instance) as a **Provider Object** (injectable during config phase).\r\n *\r\n * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap.\r\n * It has references to the other UI-Router services\r\n *\r\n * #### Note: This object is also exposed as [[$uiRouter]] for injection during runtime.\r\n */\r\nlet $uiRouterProvider: UIRouter;\r\n\r\n/**\r\n * Transition debug/tracing\r\n *\r\n * The [[Trace]] singleton as a **Service Object** (injectable during runtime).\r\n *\r\n * Enables or disables Transition tracing which can help to debug issues.\r\n */\r\nlet $trace: Trace;\r\n\r\n/**\r\n * The Transition Service\r\n *\r\n * The [[TransitionService]] singleton as a **Service Object** (injectable during runtime).\r\n *\r\n * This angular service exposes the [[TransitionService]] singleton, which is primarily\r\n * used to register global transition hooks.\r\n *\r\n * #### Note: This object is also exposed as [[$transitionsProvider]] for injection during the config phase.\r\n */\r\nlet $transitions: TransitionService;\r\n\r\n/**\r\n * The Transition Service\r\n *\r\n * The [[TransitionService]] singleton as a **Provider Object** (injectable during config phase)\r\n *\r\n * This angular service exposes the [[TransitionService]] singleton, which is primarily\r\n * used to register global transition hooks.\r\n *\r\n * #### Note: This object is also exposed as [[$transitions]] for injection during runtime.\r\n */\r\nlet $transitionsProvider: TransitionService;\r\n\r\n/**\r\n * The current [[Transition]] object\r\n *\r\n * The current [[Transition]] object as a **Per-Transition Object** (injectable into Resolve, Hooks, Controllers)\r\n *\r\n * This object returns information about the current transition, including:\r\n *\r\n * - To/from states\r\n * - To/from parameters\r\n * - Transition options\r\n * - States being entered, exited, and retained\r\n * - Resolve data\r\n * - A Promise for the transition\r\n * - Any transition failure information\r\n * - An injector for both Service and Per-Transition Objects\r\n */\r\nlet $transition$: Transition;\r\n\r\n/**\r\n * The State Service\r\n *\r\n * The [[StateService]] singleton as a **Service Object** (injectable during runtime).\r\n *\r\n * This service used to manage and query information on registered states.\r\n * It exposes state related APIs including:\r\n *\r\n * - Start a [[Transition]]\r\n * - Imperatively lazy load states\r\n * - Check if a state is currently active\r\n * - Look up states by name\r\n * - Build URLs for a state+parameters\r\n * - Configure the global Transition error handler\r\n *\r\n * This angular service exposes the [[StateService]] singleton.\r\n */\r\nlet $state: StateService;\r\n\r\n/**\r\n * The State Registry\r\n *\r\n * The [[StateRegistry]] singleton as a **Service Object** (injectable during runtime).\r\n *\r\n * This service is used to register/deregister states.\r\n * It has state registration related APIs including:\r\n *\r\n * - Register/deregister states\r\n * - Listen for state registration/deregistration\r\n * - Get states by name\r\n * - Add state decorators (to customize the state creation process)\r\n *\r\n * #### Note: This object is also exposed as [[$stateRegistryProvider]] for injection during the config phase.\r\n */\r\nlet $stateRegistry: StateRegistry;\r\n\r\n/**\r\n * The State Registry\r\n *\r\n * The [[StateRegistry]] singleton as a **Provider Object** (injectable during config time).\r\n *\r\n * This service is used to register/deregister states.\r\n * It has state registration related APIs including:\r\n *\r\n * - Register/deregister states\r\n * - Listen for state registration/deregistration\r\n * - Get states by name\r\n * - Add state decorators (to customize the state creation process)\r\n *\r\n * #### Note: This object is also exposed as [[$stateRegistry]] for injection during runtime.\r\n */\r\nlet $stateRegistryProvider: StateRegistry;\r\n\r\n/**\r\n * The View Scroll provider\r\n *\r\n * The [[UIViewScrollProvider]] as a **Provider Object** (injectable during config time).\r\n *\r\n * This angular service exposes the [[UIViewScrollProvider]] singleton and is\r\n * used to disable UI-Router's scroll behavior.\r\n */\r\nlet $uiViewScrollProvider: UIViewScrollProvider;\r\n\r\n/**\r\n * The View Scroll function\r\n *\r\n * The View Scroll function as a **Service Object** (injectable during runtime).\r\n *\r\n * This is a function that scrolls an element into view.\r\n * The element is scrolled after a `$timeout` so the DOM has time to refresh.\r\n *\r\n * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,\r\n * this can be enabled by calling [[UIViewScrollProvider.useAnchorScroll]].\r\n *\r\n * Note: this function is used by the [[directives.uiView]] when the `autoscroll` expression evaluates to true.\r\n */\r\nlet $uiViewScroll: ($element: JQuery) => void;\r\n\r\n/**\r\n * The StateProvider\r\n *\r\n * An angular1-only [[StateProvider]] as a **Provider Object** (injectable during config time).\r\n *\r\n * This angular service exposes the [[StateProvider]] singleton.\r\n *\r\n * The `StateProvider` is primarily used to register states or add custom state decorators.\r\n *\r\n * ##### Note: This provider is a ng1 vestige.\r\n * It is a passthrough to [[$stateRegistry]] and [[$state]].\r\n */\r\nlet $stateProvider: StateProvider;\r\n\r\n/**\r\n * The URL Service Provider\r\n *\r\n * The [[UrlService]] singleton as a **Provider Object** (injectable during the angular config phase).\r\n *\r\n * A service used to configure and interact with the URL.\r\n * It has URL related APIs including:\r\n *\r\n * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]])\r\n * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]])\r\n * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]])\r\n * - delay initial URL synchronization [[UrlService.deferIntercept]].\r\n * - get or set the current url: [[UrlService.url]]\r\n *\r\n * ##### Note: This service can also be injected during runtime as [[$urlService]].\r\n */\r\nlet $urlServiceProvider: UrlService;\r\n\r\n/**\r\n * The URL Service\r\n *\r\n * The [[UrlService]] singleton as a **Service Object** (injectable during runtime).\r\n *\r\n * Note: This service can also be injected during the config phase as [[$urlServiceProvider]].\r\n *\r\n * Used to configure the URL.\r\n * It has URL related APIs including:\r\n *\r\n * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]])\r\n * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]])\r\n * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]])\r\n * - delay initial URL synchronization [[UrlService.deferIntercept]].\r\n * - get or set the current url: [[UrlService.url]]\r\n *\r\n * ##### Note: This service can also be injected during the config phase as [[$urlServiceProvider]].\r\n */\r\nlet $urlService: UrlService;\r\n\r\n/**\r\n * The URL Router Provider\r\n *\r\n * ### Deprecation warning: This object is now considered internal. Use [[$urlServiceProvider]] instead.\r\n *\r\n * The [[UrlRouter]] singleton as a **Provider Object** (injectable during config time).\r\n *\r\n * #### Note: This object is also exposed as [[$urlRouter]] for injection during runtime.\r\n *\r\n * @deprecated\r\n */\r\nlet $urlRouterProvider: UrlRouterProvider;\r\n\r\n/**\r\n * The Url Router\r\n *\r\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\r\n *\r\n * The [[UrlRouter]] singleton as a **Service Object** (injectable during runtime).\r\n *\r\n * #### Note: This object is also exposed as [[$urlRouterProvider]] for injection during angular config time.\r\n *\r\n * @deprecated\r\n */\r\nlet $urlRouter: UrlRouter;\r\n\r\n/**\r\n * The URL Matcher Factory\r\n *\r\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\r\n *\r\n * The [[UrlMatcherFactory]] singleton as a **Service Object** (injectable during runtime).\r\n *\r\n * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects.\r\n *\r\n * #### Note: This object is also exposed as [[$urlMatcherFactoryProvider]] for injection during angular config time.\r\n *\r\n * @deprecated\r\n */\r\nlet $urlMatcherFactory: UrlMatcherFactory;\r\n\r\n/**\r\n * The URL Matcher Factory\r\n *\r\n * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead.\r\n *\r\n * The [[UrlMatcherFactory]] singleton as a **Provider Object** (injectable during config time).\r\n *\r\n * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects.\r\n *\r\n * #### Note: This object is also exposed as [[$urlMatcherFactory]] for injection during runtime.\r\n *\r\n * @deprecated\r\n */\r\nlet $urlMatcherFactoryProvider: UrlMatcherFactory;\r\n"
12 ]
13}
\No newline at end of file