1 | {
|
2 | "version": 3,
|
3 | "file": "ui-router-angularjs.min.js",
|
4 | "sources": [
|
5 | "@uirouter/angularjs/src/angular.ts",
|
6 | "@uirouter/angularjs/src/statebuilders/views.ts",
|
7 | "@uirouter/angularjs/src/templateFactory.ts",
|
8 | "@uirouter/angularjs/src/stateProvider.ts",
|
9 | "@uirouter/angularjs/src/statebuilders/onEnterExitRetain.ts",
|
10 | "@uirouter/angularjs/src/locationServices.ts",
|
11 | "@uirouter/angularjs/src/urlRouterProvider.ts",
|
12 | "@uirouter/angularjs/src/services.ts",
|
13 | "@uirouter/angularjs/src/directives/stateDirectives.ts",
|
14 | "@uirouter/angularjs/src/directives/viewDirective.ts",
|
15 | "@uirouter/angularjs/src/stateFilters.ts",
|
16 | "@uirouter/angularjs/src/viewScroll.ts",
|
17 | "@uirouter/angularjs/src/index.ts"
|
18 | ],
|
19 | "sourcesContent": [
|
20 | "/** @publicapi @module ng1 */ /** */\nimport * as ng_from_import from 'angular';\n/** @hidden */ declare let angular;\n/** @hidden */ const ng_from_global = angular;\n/** @hidden */ export const ng = ng_from_import && ng_from_import.module ? ng_from_import : ng_from_global;\n",
|
21 | "/** @publicapi @module ng1 */ /** */\nimport {\n StateObject,\n pick,\n forEach,\n tail,\n extend,\n isArray,\n isInjectable,\n isDefined,\n isString,\n services,\n trace,\n ViewConfig,\n ViewService,\n ViewConfigFactory,\n PathNode,\n ResolveContext,\n Resolvable,\n IInjectable,\n} from '@uirouter/core';\nimport { Ng1ViewDeclaration } from '../interface';\nimport { TemplateFactory } from '../templateFactory';\n\n/** @internalapi */\nexport function getNg1ViewConfigFactory(): ViewConfigFactory {\n let templateFactory: TemplateFactory = null;\n return (path, view) => {\n templateFactory = templateFactory || services.$injector.get('$templateFactory');\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n}\n\n/** @internalapi */\nconst hasAnyKey = (keys, obj) => keys.reduce((acc, key) => acc || isDefined(obj[key]), false);\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n *\n * @internalapi\n */\nexport function ng1ViewsBuilder(state: StateObject) {\n // Do not process root state\n if (!state.parent) return {};\n\n const tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'],\n ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'],\n compKeys = ['component', 'bindings', 'componentProvider'],\n nonCompKeys = tplKeys.concat(ctrlKeys),\n allViewKeys = compKeys.concat(nonCompKeys);\n\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(\n `State '${state.name}' has a 'views' object. ` +\n `It cannot also have \"view properties\" at the state level. ` +\n `Move the following properties into a view (in the 'views' object): ` +\n ` ${allViewKeys.filter((key) => isDefined(state[key])).join(', ')}`\n );\n }\n\n const views: { [key: string]: Ng1ViewDeclaration } = {},\n viewsObject = state.views || { $default: pick(state, allViewKeys) };\n\n forEach(viewsObject, function (config: Ng1ViewDeclaration, name: string) {\n // Account for views: { \"\": { template... } }\n name = name || '$default';\n // Account for views: { header: \"headerComponent\" }\n if (isString(config)) config = { component: <string>config };\n\n // Make a shallow copy of the config object\n config = extend({}, config);\n\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(\n `Cannot combine: ${compKeys.join('|')} with: ${nonCompKeys.join('|')} in stateview: '${name}@${state.name}'`\n );\n }\n\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = 'ng1';\n config.$context = state;\n config.$name = name;\n\n const normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n\n views[name] = config;\n });\n return views;\n}\n\n/** @hidden */\nlet id = 0;\n\n/** @internalapi */\nexport class Ng1ViewConfig implements ViewConfig {\n $id = id++;\n loaded = false;\n controller: Function; // actually IInjectable|string\n template: string;\n component: string;\n locals: any; // TODO: delete me\n\n constructor(public path: PathNode[], public viewDecl: Ng1ViewDeclaration, public factory: TemplateFactory) {}\n\n load() {\n const $q = services.$q;\n const context = new ResolveContext(this.path);\n const params = this.path.reduce((acc, node) => extend(acc, node.paramValues), {});\n\n const promises: any = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context)),\n };\n\n return $q.all(promises).then((results) => {\n trace.traceViewServiceEvent('Loaded', this);\n this.controller = results.controller;\n extend(this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return this;\n });\n }\n\n getTemplate = (uiView, context: ResolveContext) =>\n this.component\n ? this.factory.makeComponentTemplate(uiView, context, this.component, this.viewDecl.bindings)\n : this.template;\n\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.<Function>} Returns a controller, or a promise that resolves to a controller.\n */\n getController(context: ResolveContext): IInjectable | string | Promise<IInjectable | string> {\n const provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider)) return this.viewDecl.controller;\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any>provider) : provider;\n const resolvable = new Resolvable('', <any>providerFn, deps);\n return resolvable.get(context);\n }\n}\n",
|
22 | "/** @publicapi @module view */ /** */\nimport { ng as angular } from './angular';\nimport { IAugmentedJQuery } from 'angular';\nimport {\n isArray,\n isDefined,\n isFunction,\n isObject,\n services,\n Obj,\n IInjectable,\n tail,\n kebobString,\n unnestR,\n ResolveContext,\n Resolvable,\n RawParams,\n} from '@uirouter/core';\nimport { Ng1ViewDeclaration, TemplateFactoryProvider } from './interface';\n\n/**\n * Service which manages loading of templates from a ViewConfig.\n */\nexport class TemplateFactory implements TemplateFactoryProvider {\n /** @hidden */ private _useHttp = angular.version.minor < 3;\n /** @hidden */ private $templateRequest;\n /** @hidden */ private $templateCache;\n /** @hidden */ private $http;\n\n /** @hidden */ $get = [\n '$http',\n '$templateCache',\n '$injector',\n ($http, $templateCache, $injector) => {\n this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n this.$http = $http;\n this.$templateCache = $templateCache;\n return this;\n },\n ];\n\n /** @hidden */\n useHttpService(value: boolean) {\n this._useHttp = value;\n }\n\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n fromConfig(\n config: Ng1ViewDeclaration,\n params: any,\n context: ResolveContext\n ): Promise<{ template?: string; component?: string }> {\n const defaultTemplate = '<ui-view></ui-view>';\n\n const asTemplate = (result) => services.$q.when(result).then((str) => ({ template: str }));\n const asComponent = (result) => services.$q.when(result).then((str) => ({ component: str }));\n\n return isDefined(config.template)\n ? asTemplate(this.fromString(config.template, params))\n : isDefined(config.templateUrl)\n ? asTemplate(this.fromUrl(config.templateUrl, params))\n : isDefined(config.templateProvider)\n ? asTemplate(this.fromProvider(config.templateProvider, params, context))\n : isDefined(config.component)\n ? asComponent(config.component)\n : isDefined(config.componentProvider)\n ? asComponent(this.fromComponentProvider(config.componentProvider, params, context))\n : asTemplate(defaultTemplate);\n }\n\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n fromString(template: string | Function, params?: RawParams) {\n return isFunction(template) ? (<any>template)(params) : template;\n }\n\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.<string>} The template html as a string, or a promise\n * for that string.\n */\n fromUrl(url: string | Function, params: any) {\n if (isFunction(url)) url = (<any>url)(params);\n if (url == null) return null;\n\n if (this._useHttp) {\n return this.$http\n .get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function (response) {\n return response.data;\n });\n }\n\n return this.$templateRequest(url);\n }\n\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.<string>} The template html as a string, or a promise\n * for that string.\n */\n fromProvider(provider: IInjectable, params: any, context: ResolveContext) {\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any[]>provider) : provider;\n const resolvable = new Resolvable('', <Function>providerFn, deps);\n return resolvable.get(context);\n }\n\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"<component-name input1='::$resolve.foo'></component-name>\".\n */\n fromComponentProvider(provider: IInjectable, params: any, context: ResolveContext) {\n const deps = services.$injector.annotate(provider);\n const providerFn = isArray(provider) ? tail(<any[]>provider) : provider;\n const resolvable = new Resolvable('', <Function>providerFn, deps);\n return resolvable.get(context);\n }\n\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"<component-name input1='::$resolve.foo'></component-name>\".\n */\n makeComponentTemplate(uiView: IAugmentedJQuery, context: ResolveContext, component: string, bindings?: any) {\n bindings = bindings || {};\n\n // Bind once prefix\n const prefix = angular.version.minor >= 3 ? '::' : '';\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n const kebob = (camelCase: string) => {\n const kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? `x-${kebobed}` : kebobed;\n };\n\n const attributeTpl = (input: BindingTuple) => {\n const { name, type } = input;\n const attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name]) return `${attrName}='${uiView.attr(attrName)}'`;\n\n const resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@') return `${attrName}='{{${prefix}$resolve.${resolveName}}}'`;\n\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n const res = context.getResolvable(resolveName);\n const fn = res && res.data;\n const args = (fn && services.$injector.annotate(fn)) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n const arrayIdxStr = isArray(fn) ? `[${fn.length - 1}]` : '';\n return `${attrName}='$resolve.${resolveName}${arrayIdxStr}(${args.join(',')})'`;\n }\n\n // some-attr=\"::$resolve.someResolveName\"\n return `${attrName}='${prefix}$resolve.${resolveName}'`;\n };\n\n const attrs = getComponentBindings(component).map(attributeTpl).join(' ');\n const kebobName = kebob(component);\n return `<${kebobName} ${attrs}></${kebobName}>`;\n }\n}\n\n// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\nfunction getComponentBindings(name: string) {\n const cmpDefs = <any[]>services.$injector.get(name + 'Directive'); // could be multiple\n if (!cmpDefs || !cmpDefs.length) throw new Error(`Unable to find component named '${name}'`);\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n}\n\n// Given a directive definition, find its object input attributes\n// Use different properties, depending on the type of directive (component, bindToController, normal)\nconst getBindings = (def: any) => {\n if (isObject(def.bindToController)) return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n};\n\ninterface BindingTuple {\n name: string;\n type: string;\n}\n\n// for ng 1.2 style, process the scope: { input: \"=foo\" }\n// for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\nconst scopeBindings = (bindingsObj: Obj) =>\n Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map((key) => [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])])\n // skip malformed values\n .filter((tuple) => isDefined(tuple) && isArray(tuple[1]))\n // { name: ('foo' || 'input'), type: '=' }\n .map((tuple) => ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] } as BindingTuple));\n",
|
23 | "/** @publicapi @module ng1 */ /** */\nimport {\n val,\n isObject,\n createProxyFunctions,\n BuilderFunction,\n StateRegistry,\n StateService,\n OnInvalidCallback,\n} from '@uirouter/core';\nimport { Ng1StateDeclaration } from './interface';\n\n/**\n * The Angular 1 `StateProvider`\n *\n * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\nexport class StateProvider {\n constructor(private stateRegistry: StateRegistry, private stateService: StateService) {\n createProxyFunctions(val(StateProvider.prototype), this, val(this));\n }\n\n /**\n * Decorates states when they are registered\n *\n * Allows you to extend (carefully) or override (at your own peril) the\n * `stateBuilder` object used internally by [[StateRegistry]].\n * This can be used to add custom functionality to ui-router,\n * for example inferring templateUrl based on the state name.\n *\n * When passing only a name, it returns the current (original or decorated) builder\n * function that matches `name`.\n *\n * The builder functions that can be decorated are listed below. Though not all\n * necessarily have a good use case for decoration, that is up to you to decide.\n *\n * In addition, users can attach custom decorators, which will generate new\n * properties within the state's internal definition. There is currently no clear\n * use-case for this beyond accessing internal states (i.e. $state.$current),\n * however, expect this to become increasingly relevant as we introduce additional\n * meta-programming features.\n *\n * **Warning**: Decorators should not be interdependent because the order of\n * execution of the builder functions in non-deterministic. Builder functions\n * should only be dependent on the state definition object and super function.\n *\n *\n * Existing builder functions and current return values:\n *\n * - **parent** `{object}` - returns the parent state object.\n * - **data** `{object}` - returns state data, including any inherited data that is not\n * overridden by own values (if any).\n * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n * or `null`.\n * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is\n * navigable).\n * - **params** `{object}` - returns an array of state params that are ensured to\n * be a super-set of parent's params.\n * - **views** `{object}` - returns a views object where each key is an absolute view\n * name (i.e. \"viewName@stateName\") and each value is the config object\n * (template, controller) for the view. Even when you don't use the views object\n * explicitly on a state config, one is still created for you internally.\n * So by decorating this builder function you have access to decorating template\n * and controller properties.\n * - **ownParams** `{object}` - returns an array of params that belong to the state,\n * not including any params defined by ancestor states.\n * - **path** `{string}` - returns the full path from the root down to this state.\n * Needed for state activation.\n * - **includes** `{object}` - returns an object that includes every state that\n * would pass a `$state.includes()` test.\n *\n * #### Example:\n * Override the internal 'views' builder with a function that takes the state\n * definition, and a reference to the internal function being overridden:\n * ```js\n * $stateProvider.decorator('views', function (state, parent) {\n * let result = {},\n * views = parent(state);\n *\n * angular.forEach(views, function (config, name) {\n * let autoName = (state.name + '.' + name).replace('.', '/');\n * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n * result[name] = config;\n * });\n * return result;\n * });\n *\n * $stateProvider.state('home', {\n * views: {\n * 'contact.list': { controller: 'ListController' },\n * 'contact.item': { controller: 'ItemController' }\n * }\n * });\n * ```\n *\n *\n * ```js\n * // Auto-populates list and item views with /partials/home/contact/list.html,\n * // and /partials/home/contact/item.html, respectively.\n * $state.go('home');\n * ```\n *\n * @param {string} name The name of the builder function to decorate.\n * @param {object} func A function that is responsible for decorating the original\n * builder function. The function receives two parameters:\n *\n * - `{object}` - state - The state config object.\n * - `{object}` - super - The original builder function.\n *\n * @return {object} $stateProvider - $stateProvider instance\n */\n decorator(name: string, func: BuilderFunction) {\n return this.stateRegistry.decorator(name, func) || this;\n }\n\n /**\n * Registers a state\n *\n * ### This is a passthrough to [[StateRegistry.register]].\n *\n * Registers a state configuration under a given state name.\n * The stateConfig object has the following acceptable properties.\n *\n * <a id='template'></a>\n *\n * - **`template`** - {string|function=} - html template as a string or a function that returns\n * an html template as a string which should be used by the uiView directives. This property\n * takes precedence over templateUrl.\n *\n * If `template` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * <a id='templateUrl'></a>\n *\n * - **`templateUrl`** - {string|function=} - path or function that returns a path to an html\n * template that should be used by uiView.\n *\n * If `templateUrl` is a function, it will be called with the following parameters:\n *\n * - {array.<object>} - state parameters extracted from the current $location.path() by\n * applying the current state\n *\n * <a id='templateProvider'></a>\n *\n * - **`templateProvider`** - {function=} - Provider function that returns HTML content\n * string.\n *\n * <a id='controller'></a>\n *\n * - **`controller`** - {string|function=} - Controller fn that should be associated with newly\n * related scope or the name of a registered controller if passed as a string.\n *\n * <a id='controllerProvider'></a>\n *\n * - **`controllerProvider`** - {function=} - Injectable provider function that returns\n * the actual controller or string.\n *\n * <a id='controllerAs'></a>\n *\n * - **`controllerAs`** – {string=} – A controller alias name. If present the controller will be\n * published to scope under the controllerAs name.\n *\n * <a id='resolve'></a>\n *\n * - **`resolve`** - {object.<string, function>=} - An optional map of dependencies which\n * should be injected into the controller. If any of these dependencies are promises,\n * the router will wait for them all to be resolved or one to be rejected before the\n * controller is instantiated. If all the promises are resolved successfully, the values\n * of the resolved promises are injected and $stateChangeSuccess event is fired. If any\n * of the promises are rejected the $stateChangeError event is fired. The map object is:\n *\n * - key - {string}: name of dependency to be injected into controller\n * - factory - {string|function}: If string then it is alias for service. Otherwise if function,\n * it is injected and return value it treated as dependency. If result is a promise, it is\n * resolved before its value is injected into controller.\n *\n * <a id='url'></a>\n *\n * - **`url`** - {string=} - A url with optional parameters. When a state is navigated or\n * transitioned to, the `$stateParams` service will be populated with any\n * parameters that were passed.\n *\n * <a id='params'></a>\n *\n * - **`params`** - {object=} - An array of parameter names or regular expressions. Only\n * use this within a state if you are not using url. Otherwise you can specify your\n * parameters within the url. When a state is navigated or transitioned to, the\n * $stateParams service will be populated with any parameters that were passed.\n *\n * <a id='views'></a>\n *\n * - **`views`** - {object=} - Use the views property to set up multiple views or to target views\n * manually/explicitly.\n *\n * <a id='abstract'></a>\n *\n * - **`abstract`** - {boolean=} - An abstract state will never be directly activated,\n * but can provide inherited properties to its common children states.\n *\n * <a id='onEnter'></a>\n *\n * - **`onEnter`** - {object=} - Callback function for when a state is entered. Good way\n * to trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * <a id='onExit'></a>\n *\n * - **`onExit`** - {object=} - Callback function for when a state is exited. Good way to\n * trigger an action or dispatch an event, such as opening a dialog.\n * If minifying your scripts, make sure to use the `['injection1', 'injection2', function(injection1, injection2){}]` syntax.\n *\n * <a id='reloadOnSearch'></a>\n *\n * - **`reloadOnSearch = true`** - {boolean=} - If `false`, will not retrigger the same state\n * just because a search/query parameter has changed (via $location.search() or $location.hash()).\n * Useful for when you'd like to modify $location.search() without triggering a reload.\n *\n * <a id='data'></a>\n *\n * - **`data`** - {object=} - Arbitrary data object, useful for custom configuration.\n *\n * #### Example:\n * Some state name examples\n * ```js\n * // stateName can be a single top-level name (must be unique).\n * $stateProvider.state(\"home\", {});\n *\n * // Or it can be a nested state name. This state is a child of the\n * // above \"home\" state.\n * $stateProvider.state(\"home.newest\", {});\n *\n * // Nest states as deeply as needed.\n * $stateProvider.state(\"home.newest.abc.xyz.inception\", {});\n *\n * // state() returns $stateProvider, so you can chain state declarations.\n * $stateProvider\n * .state(\"home\", {})\n * .state(\"about\", {})\n * .state(\"contacts\", {});\n * ```\n *\n * @param {string} name A unique state name, e.g. \"home\", \"about\", \"contacts\".\n * To create a parent/child state use a dot, e.g. \"about.sales\", \"home.newest\".\n * @param {object} definition State configuration object.\n */\n state(name: string, definition: Ng1StateDeclaration): StateProvider;\n state(definition: Ng1StateDeclaration): StateProvider;\n state(name: any, definition?: any) {\n if (isObject(name)) {\n definition = name;\n } else {\n definition.name = name;\n }\n this.stateRegistry.register(definition);\n return this;\n }\n\n /**\n * Registers an invalid state handler\n *\n * This is a passthrough to [[StateService.onInvalid]] for ng1.\n */\n\n onInvalid(callback: OnInvalidCallback): Function {\n return this.stateService.onInvalid(callback);\n }\n}\n",
|
24 | "/** @publicapi @module ng1 */ /** */\nimport {\n StateObject,\n TransitionStateHookFn,\n HookResult,\n Transition,\n services,\n ResolveContext,\n extend,\n} from '@uirouter/core';\nimport { getLocals } from '../services';\nimport { Ng1StateDeclaration } from '../interface';\n\n/**\n * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,\n * `onRetain` callback hooks on a [[Ng1StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * ensures that those hooks are injectable for @uirouter/angularjs (ng1).\n *\n * @internalapi\n */\nexport const getStateHookBuilder = (hookName: 'onEnter' | 'onExit' | 'onRetain') =>\n function stateHookBuilder(stateObject: StateObject): TransitionStateHookFn {\n const hook = stateObject[hookName];\n const pathname = hookName === 'onExit' ? 'from' : 'to';\n\n function decoratedNg1Hook(trans: Transition, state: Ng1StateDeclaration): HookResult {\n const resolveContext = new ResolveContext(trans.treeChanges(pathname));\n const subContext = resolveContext.subContext(state.$$state());\n const locals = extend(getLocals(subContext), { $state$: state, $transition$: trans });\n return services.$injector.invoke(hook, this, locals);\n }\n\n return hook ? decoratedNg1Hook : undefined;\n };\n",
|
25 | "/** @publicapi @module ng1 */ /** */\nimport { LocationConfig, LocationServices, UIRouter, ParamType, isDefined } from '@uirouter/core';\nimport { val, createProxyFunctions, removeFrom, isObject } from '@uirouter/core';\nimport { ILocationService, ILocationProvider, IWindowService } from 'angular';\n\n/**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n * @internalapi\n */\nexport class Ng1LocationServices implements LocationConfig, LocationServices {\n private $locationProvider: ILocationProvider;\n private $location: ILocationService;\n private $sniffer: any;\n private $browser: any;\n private $window: IWindowService;\n\n path;\n search;\n hash;\n hashPrefix;\n port;\n protocol;\n host;\n\n private _baseHref: string;\n\n // .onChange() registry\n private _urlListeners: Function[] = [];\n\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n static monkeyPatchPathParameterType(router: UIRouter) {\n const pathType: ParamType = router.urlMatcherFactory.type('path');\n\n pathType.encode = (x: any) =>\n x != null ? x.toString().replace(/(~|\\/)/g, (m) => ({ '~': '~~', '/': '~2F' }[m])) : x;\n\n pathType.decode = (x: string) =>\n x != null ? x.toString().replace(/(~~|~2F)/g, (m) => ({ '~~': '~', '~2F': '/' }[m])) : x;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n dispose() {}\n\n constructor($locationProvider: ILocationProvider) {\n this.$locationProvider = $locationProvider;\n const _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n\n onChange(callback: Function) {\n this._urlListeners.push(callback);\n return () => removeFrom(this._urlListeners)(callback);\n }\n\n html5Mode() {\n let html5Mode: any = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n }\n\n baseHref() {\n return this._baseHref || (this._baseHref = this.$browser.baseHref() || this.$window.location.pathname);\n }\n\n url(newUrl?: string, replace = false, state?) {\n if (isDefined(newUrl)) this.$location.url(newUrl);\n if (replace) this.$location.replace();\n if (state) this.$location.state(state);\n return this.$location.url();\n }\n\n _runtimeServices($rootScope, $location: ILocationService, $sniffer, $browser, $window: IWindowService) {\n this.$location = $location;\n this.$sniffer = $sniffer;\n this.$browser = $browser;\n this.$window = $window;\n\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on('$locationChangeSuccess', (evt) => this._urlListeners.forEach((fn) => fn(evt)));\n const _loc = val($location);\n\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, ['replace', 'path', 'search', 'hash']);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n }\n}\n",
|
26 | "/** @publicapi @module url */ /** */\nimport {\n UIRouter,\n LocationServices,\n $InjectorLike,\n BaseUrlRule,\n UrlRuleHandlerFn,\n UrlMatcher,\n IInjectable,\n UrlRouter,\n} from '@uirouter/core';\nimport { services, isString, isFunction, isArray, identity } from '@uirouter/core';\n\nexport interface RawNg1RuleFunction {\n ($injector: $InjectorLike, $location: LocationServices): string | void;\n}\n\n/**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @internalapi\n * @deprecated\n */\nexport class UrlRouterProvider {\n static injectableHandler(router: UIRouter, handler: IInjectable): UrlRuleHandlerFn {\n return (match) => services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params });\n }\n\n /** @hidden */\n constructor(/** @hidden */ private router: UIRouter) {}\n\n /** @hidden */\n $get(): UrlRouter {\n const urlService = this.router.urlService;\n this.router.urlRouter.update(true);\n if (!urlService.interceptDeferred) urlService.listen();\n return this.router.urlRouter;\n }\n\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n rule(ruleFn: RawNg1RuleFunction): UrlRouterProvider {\n if (!isFunction(ruleFn)) throw new Error(\"'rule' must be a function\");\n\n const match = () => ruleFn(services.$injector, this.router.locationService);\n\n const rule = new BaseUrlRule(match, identity);\n this.router.urlService.rules.rule(rule);\n return this;\n }\n\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n otherwise(rule: string | RawNg1RuleFunction): UrlRouterProvider {\n const urlRules = this.router.urlService.rules;\n if (isString(rule)) {\n urlRules.otherwise(rule);\n } else if (isFunction(rule)) {\n urlRules.otherwise(() => rule(services.$injector, this.router.locationService));\n } else {\n throw new Error(\"'rule' must be a string or function\");\n }\n\n return this;\n }\n\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n when(what: RegExp | UrlMatcher | string, handler: string | IInjectable): this {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this.router, handler);\n }\n\n this.router.urlService.rules.when(what, handler as any);\n return this;\n }\n\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n deferIntercept(defer?: boolean): void {\n this.router.urlService.deferIntercept(defer);\n }\n}\n",
|
27 | "/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/**\n * # Angular 1 types\n *\n * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc.\n * The customizations to the core types for Angular UI-Router are documented here.\n *\n * The optional [[$resolve]] service is also documented here.\n *\n * @preferred @publicapi @module ng1\n */ /** */\nimport { ng as angular } from './angular';\nimport {\n IRootScopeService,\n IQService,\n ILocationService,\n ILocationProvider,\n IHttpService,\n ITemplateCacheService,\n} from 'angular';\nimport {\n services,\n applyPairs,\n isString,\n trace,\n extend,\n UIRouter,\n StateService,\n UrlRouter,\n UrlMatcherFactory,\n ResolveContext,\n unnestR,\n TypedMap,\n} from '@uirouter/core';\nimport { ng1ViewsBuilder, getNg1ViewConfigFactory } from './statebuilders/views';\nimport { TemplateFactory } from './templateFactory';\nimport { StateProvider } from './stateProvider';\nimport { getStateHookBuilder } from './statebuilders/onEnterExitRetain';\nimport { Ng1LocationServices } from './locationServices';\nimport { UrlRouterProvider } from './urlRouterProvider';\nimport IInjectorService = angular.auto.IInjectorService;\n\nangular.module('ui.router.angular1', []);\nconst mod_init = angular.module('ui.router.init', ['ng']);\nconst mod_util = angular.module('ui.router.util', ['ui.router.init']);\nconst mod_rtr = angular.module('ui.router.router', ['ui.router.util']);\nconst mod_state = angular.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\nconst mod_main = angular.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\nconst mod_cmpt = angular.module('ui.router.compat', ['ui.router']);\n\ndeclare module '@uirouter/core/lib/router' {\n interface UIRouter {\n /** @hidden */\n stateProvider: StateProvider;\n /** @hidden */\n urlRouterProvider: UrlRouterProvider;\n }\n}\n\nlet router: UIRouter = null;\n\n$uiRouterProvider.$inject = ['$locationProvider'];\n/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\nfunction $uiRouterProvider($locationProvider: ILocationProvider) {\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator('views', ng1ViewsBuilder);\n router.stateRegistry.decorator('onExit', getStateHookBuilder('onExit'));\n router.stateRegistry.decorator('onRetain', getStateHookBuilder('onRetain'));\n router.stateRegistry.decorator('onEnter', getStateHookBuilder('onEnter'));\n\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n\n // Disable decoding of params by UrlMatcherFactory because $location already handles this\n router.urlService.config._decodeParams = false;\n\n const ng1LocationService = (router.locationService = router.locationConfig = new Ng1LocationServices(\n $locationProvider\n ));\n\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$window', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get(\n $location: ILocationService,\n $browser: any,\n $window: any,\n $sniffer: any,\n $rootScope: ng.IScope,\n $http: IHttpService,\n $templateCache: ITemplateCacheService\n ) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser, $window);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n}\n\nconst getProviderFor = (serviceName) => [\n '$uiRouterProvider',\n ($urp) => {\n const service = $urp.router[serviceName];\n service['$get'] = () => service;\n return service;\n },\n];\n\n// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\nrunBlock.$inject = ['$injector', '$q', '$uiRouter'];\nfunction runBlock($injector: IInjectorService, $q: IQService, $uiRouter: UIRouter) {\n services.$injector = $injector;\n services.$q = <any>$q;\n\n // https://github.com/angular-ui/ui-router/issues/3678\n if (!Object.prototype.hasOwnProperty.call($injector, 'strictDi')) {\n try {\n $injector.invoke(function (checkStrictDi) {});\n } catch (error) {\n $injector.strictDi = !!/strict mode/.exec(error && error.toString());\n }\n }\n\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry\n .get()\n .map((x) => x.$$state().resolvables)\n .reduce(unnestR, [])\n .filter((x) => x.deps === 'deferred')\n .forEach((resolvable) => (resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi)));\n}\n\n// $urlRouter service and $urlRouterProvider\nconst getUrlRouterProvider = (uiRouter: UIRouter) => (uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter));\n\n// $state service and $stateProvider\n// $urlRouter service and $urlRouterProvider\nconst getStateProvider = () => extend(router.stateProvider, { $get: () => router.stateService });\n\nwatchDigests.$inject = ['$rootScope'];\nexport function watchDigests($rootScope: IRootScopeService) {\n $rootScope.$watch(function () {\n trace.approximateDigests++;\n });\n}\n\nmod_init.provider('$uiRouter', <any>$uiRouterProvider);\nmod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\nmod_util.provider('$urlService', getProviderFor('urlService'));\nmod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', () => router.urlMatcherFactory]);\nmod_util.provider('$templateFactory', () => new TemplateFactory());\nmod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\nmod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\nmod_state.provider('$transitions', getProviderFor('transitionService'));\nmod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n\nmod_state.factory('$stateParams', ['$uiRouter', ($uiRouter: UIRouter) => $uiRouter.globals.params]);\nmod_main.factory('$view', () => router.viewService);\nmod_main.service('$trace', () => trace);\n\nmod_main.run(watchDigests);\nmod_util.run(['$urlMatcherFactory', function ($urlMatcherFactory: UrlMatcherFactory) {}]);\nmod_state.run(['$state', function ($state: StateService) {}]);\nmod_rtr.run(['$urlRouter', function ($urlRouter: UrlRouter) {}]);\nmod_init.run(runBlock);\n\n/** @hidden TODO: find a place to move this */\nexport const getLocals = (ctx: ResolveContext): TypedMap<any> => {\n const tokens = ctx.getTokens().filter(isString);\n\n const tuples = tokens.map((key) => {\n const resolvable = ctx.getResolvable(key);\n const waitPolicy = ctx.getPolicy(resolvable).async;\n return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data];\n });\n\n return tuples.reduce(applyPairs, {});\n};\n",
|
28 | "/* eslint-disable @typescript-eslint/no-empty-interface */\n/* eslint-disable prefer-const */\n/**\n * # Angular 1 Directives\n *\n * These are the directives included in UI-Router for Angular 1.\n * These directives are used in templates to create viewports and link/navigate to states.\n *\n * @preferred @publicapi @module directives\n */ /** */\nimport { ng as angular } from '../angular';\nimport { IAugmentedJQuery, ITimeoutService, IScope, IInterpolateService } from 'angular';\n\nimport {\n Obj,\n extend,\n forEach,\n tail,\n isString,\n isObject,\n isArray,\n parse,\n noop,\n unnestR,\n identity,\n uniqR,\n inArray,\n removeFrom,\n RawParams,\n PathNode,\n StateOrName,\n StateService,\n StateDeclaration,\n UIRouter,\n} from '@uirouter/core';\nimport { UIViewData } from './viewDirective';\n\n/** @hidden Used for typedoc */\nexport interface ng1_directive {}\n\n/** @hidden */\nfunction parseStateRef(ref: string) {\n const paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/);\n if (paramsOnly) ref = '(' + paramsOnly[1] + ')';\n\n const parsed = ref.replace(/\\n/g, ' ').match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n}\n\n/** @hidden */\nfunction stateContext(el: IAugmentedJQuery) {\n const $uiView: UIViewData = (el.parent() as IAugmentedJQuery).inheritedData('$uiView');\n const path: PathNode[] = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n}\n\n/** @hidden */\nfunction processedDef($state: StateService, $element: IAugmentedJQuery, def: Def): Def {\n const uiState = def.uiState || $state.current.name;\n const uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n const href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState, uiStateParams: def.uiStateParams, uiStateOpts, href };\n}\n\n/** @hidden */\ninterface TypeInfo {\n attr: string;\n isAnchor: boolean;\n clickable: boolean;\n}\n\n/** @hidden */\nfunction getTypeInfo(el: IAugmentedJQuery): TypeInfo {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n const isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n const isForm = el[0].nodeName === 'FORM';\n\n return {\n attr: isForm ? 'action' : isSvg ? 'xlink:href' : 'href',\n isAnchor: el.prop('tagName').toUpperCase() === 'A',\n clickable: !isForm,\n };\n}\n\n/** @hidden */\nfunction clickHook(\n el: IAugmentedJQuery,\n $state: StateService,\n $timeout: ITimeoutService,\n type: TypeInfo,\n getDef: () => Def\n) {\n return function (e: JQueryMouseEventObject) {\n const button = e.which || e.button,\n target = getDef();\n\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n const transition = $timeout(function () {\n if (!el.attr('disabled')) {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n }\n });\n e.preventDefault();\n\n // if the state has no URL, ignore one preventDefault from the <a> directive.\n let ignorePreventDefaultCount = type.isAnchor && !target.href ? 1 : 0;\n\n e.preventDefault = function () {\n if (ignorePreventDefaultCount-- <= 0) $timeout.cancel(transition);\n };\n }\n };\n}\n\n/** @hidden */\nfunction defaultOpts(el: IAugmentedJQuery, $state: StateService) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: 'sref',\n };\n}\n\n/** @hidden */\nfunction bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: EventListener, uiStateOpts: any): void {\n let events;\n\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n\n if (!isArray(events)) {\n events = ['click'];\n }\n\n const on = element.on ? 'on' : 'bind';\n for (const event of events) {\n element[on](event, hookFn);\n }\n\n scope.$on('$destroy', function () {\n const off = element.off ? 'off' : 'unbind';\n for (const event of events) {\n element[off](event, hookFn as any);\n }\n });\n}\n\n/**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * <a ui-sref=\".child1\">child 1 state</a>\n * <a ui-sref=\".child2\">child 2 state</a>\n * ```\n *\n * This link activates the parent state.\n * ```html\n * <a ui-sref=\"^\">Return</a>\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * <a ui-sref=\"users\" href=\"/users/\">Users</a>\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n * <li ng-repeat=\"user in users\">\n * <a ui-sref=\"users.detail({ userId: user.id })\">{{ user.displayName }}</a>\n * </li>\n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * <a ui-sref=\"home\" ui-sref-opts=\"{ reload: true }\">Home</a>\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * <input type=\"text\" ui-sref=\"contacts\" ui-sref-opts=\"{ events: ['change', 'blur'] }\">\n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * <a ui-sref=\"home\">Home</a>\n * <a ui-sref=\"about\">About</a>\n * <a ui-sref=\"{page: 2}\">Next page</a>\n *\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <a ui-sref=\"contacts.detail({ id: contact.id })\">{{ contact.name }}</a>\n * </li>\n * </ul>\n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * <a href=\"#/home\" ui-sref=\"home\">Home</a>\n * <a href=\"#/about\" ui-sref=\"about\">About</a>\n * <a href=\"#/contacts?page=2\" ui-sref=\"{page: 2}\">Next page</a>\n *\n * <ul>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/1\" ui-sref=\"contacts.detail({ id: contact.id })\">Joe</a>\n * </li>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/2\" ui-sref=\"contacts.detail({ id: contact.id })\">Alice</a>\n * </li>\n * <li ng-repeat=\"contact in contacts\">\n * <a href=\"#/contacts/3\" ui-sref=\"contacts.detail({ id: contact.id })\">Bob</a>\n * </li>\n * </ul>\n *\n * <a href=\"#/home\" ui-sref=\"home\" ui-sref-opts=\"{reload: true}\">Home</a>\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * <a ui-sref=\"{ lang: 'en' }\">English</a>\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\nlet uiSrefDirective: ng1_directive;\nuiSrefDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n const $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n const type = getTypeInfo(element);\n const active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n\n const rawDef = {} as Def;\n const getDef = () => processedDef($state, element, rawDef);\n\n const ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n\n function update() {\n const def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n if (ref.paramExpr) {\n scope.$watch(\n ref.paramExpr,\n function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n },\n true\n );\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n\n update();\n\n scope.$on('$destroy', <any>$uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', <any>$uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n const hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n];\n\n/**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n * <li ng-repeat=\"link in navlinks\">\n * <a ui-state=\"link.state\">{{ link.displayName }}</a>\n * </li>\n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n * <li ng-repeat=\"link in navlinks\">\n * <a ui-state=\"link.state\" ui-state-params=\"link.params\">{{ link.displayName }}</a>\n * </li>\n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * <a ui-state=\"returnto.state\" ui-state-opts=\"{ reload: true }\">Home</a>\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * <input type=\"text\" ui-state=\"contacts\" ui-state-opts=\"{ events: ['change', 'blur'] }\">\n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * <a ui-state=\"\" ui-state-params=\"{ lang: 'en' }\">English</a>\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\nlet uiStateDirective: ng1_directive;\nuiStateDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDynamicDirective($uiRouter: UIRouter, $timeout: ITimeoutService) {\n const $state = $uiRouter.stateService;\n\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope: IScope, element: IAugmentedJQuery, attrs: any, uiSrefActive: any) {\n const type = getTypeInfo(element);\n const active = uiSrefActive[1] || uiSrefActive[0];\n let unlinkInfoFn: Function = null;\n let hookFn;\n\n const rawDef = {} as Def;\n const getDef = () => processedDef($state, element, rawDef);\n\n const inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n const watchDeregFns = inputAttrs.reduce((acc, attr) => ((acc[attr] = noop), acc), {});\n\n function update() {\n const def = getDef();\n if (unlinkInfoFn) unlinkInfoFn();\n if (active) unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null) attrs.$set(type.attr, def.href);\n }\n\n inputAttrs.forEach((field) => {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n\n attrs.$observe(field, (expr) => {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(\n expr,\n (newval) => {\n rawDef[field] = newval;\n update();\n },\n true\n );\n });\n });\n\n update();\n\n scope.$on('$destroy', <any>$uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', <any>$uiRouter.transitionService.onSuccess({}, update));\n\n if (!type.clickable) return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n];\n\n/**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n * <li ng-repeat=\"user in users\" ui-sref-active=\"active\">\n * <a ui-sref=\"user.details({ userId: user.id })\">{{ user.lastName }}</a>\n * </li>\n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * <ul>\n * <li ui-sref-active=\"active\" class=\"item\">\n * <a href ui-sref=\"app.user({user: 'bilbobaggins'})\">@bilbobaggins</a>\n * </li>\n * </ul>\n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * <ul>\n * <li ui-sref-active=\"active\" class=\"item active\">\n * <a ui-sref=\"app.user({user: 'bilbobaggins'})\" href=\"/users/bilbobaggins\">@bilbobaggins</a>\n * </li>\n * </ul>\n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n * <div ui-sref-active=\"{'active': 'admin.**'}\">\n * <a ui-sref-active=\"active\" ui-sref=\"admin.roles\">Roles</a>\n * </div>\n * ```\n *\n * Arrays are also supported as values in the `ngClass`-like interface.\n * This allows multiple states to add `active` class.\n *\n * #### Example:\n * Given the following template, with \"admin.roles\" being the current state, the class will be added too:\n * ```html\n * <div ui-sref-active=\"{'active': ['owner.**', 'admin.**']}\">\n * <a ui-sref-active=\"active\" ui-sref=\"admin.roles\">Roles</a>\n * </div>\n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the `<div>` and `<a>` elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\nlet uiSrefActiveDirective: ng1_directive;\nuiSrefActiveDirective = [\n '$state',\n '$stateParams',\n '$interpolate',\n '$uiRouter',\n function $StateRefActiveDirective(\n $state: StateService,\n $stateParams: Obj,\n $interpolate: IInterpolateService,\n $uiRouter: UIRouter\n ) {\n return {\n restrict: 'A',\n controller: [\n '$scope',\n '$element',\n '$attrs',\n function ($scope: IScope, $element: IAugmentedJQuery, $attrs: any) {\n let states: StateData[] = [];\n let activeEqClass: string;\n let uiSrefActive: any;\n\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n } catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n setStatesFromDefinitionObject(uiSrefActive);\n\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState: string, newParams: Obj) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n const deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n $scope.$on('$destroy', setupEventListeners());\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n\n function setupEventListeners() {\n const deregisterStatesChangedListener = $uiRouter.stateRegistry.onStatesChanged(handleStatesChanged);\n const deregisterOnStartListener = $uiRouter.transitionService.onStart({}, updateAfterTransition);\n const deregisterStateChangeSuccessListener = $scope.$on('$stateChangeSuccess', update);\n return function cleanUp() {\n deregisterStatesChangedListener();\n deregisterOnStartListener();\n deregisterStateChangeSuccessListener();\n };\n }\n\n function handleStatesChanged() {\n setStatesFromDefinitionObject(uiSrefActive);\n }\n\n function setStatesFromDefinitionObject(statesDefinition: Obj) {\n if (isObject(statesDefinition)) {\n states = [];\n forEach(statesDefinition, function (stateOrName: StateOrName | Array<StateOrName>, activeClass: string) {\n // Helper function to abstract adding state.\n const addStateForClass = function (stateOrName: string, activeClass: string) {\n const ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n };\n\n if (isString(stateOrName)) {\n // If state is string, just add it.\n addStateForClass(stateOrName as string, activeClass);\n } else if (isArray(stateOrName)) {\n // If state is an array, iterate over it and add each array item individually.\n forEach(stateOrName, function (stateOrName: string) {\n addStateForClass(stateOrName, activeClass);\n });\n }\n });\n }\n }\n\n function addState(stateName: string, stateParams: Obj, activeClass: string) {\n const state = $state.get(stateName, stateContext($element));\n\n const stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass,\n };\n\n states.push(stateInfo);\n\n return function removeState() {\n removeFrom(states)(stateInfo);\n };\n }\n\n // Update route state\n function update() {\n const splitClasses = (str) => str.split(/\\s/).filter(identity);\n const getClasses = (stateList: StateData[]) =>\n stateList\n .map((x) => x.activeClass)\n .map(splitClasses)\n .reduce(unnestR, []);\n\n const allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n const fuzzyClasses = getClasses(states.filter((x) => $state.includes(x.state.name, x.params)));\n const exactlyMatchesAny = !!states.filter((x) => $state.is(x.state.name, x.params)).length;\n const exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n\n const addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n const removeClasses = allClasses.filter((cls) => !inArray(addClasses, cls));\n\n $scope.$evalAsync(() => {\n addClasses.forEach((className) => $element.addClass(className));\n removeClasses.forEach((className) => $element.removeClass(className));\n });\n }\n\n update();\n },\n ],\n };\n },\n];\n\n/** @hidden */\ninterface Def {\n uiState: string;\n href: string;\n uiStateParams: Obj;\n uiStateOpts: any;\n}\n/** @hidden */\ninterface StateData {\n state: StateDeclaration;\n params: RawParams;\n activeClass: string;\n}\n\nangular\n .module('ui.router.state')\n .directive('uiSref', uiSrefDirective)\n .directive('uiSrefActive', uiSrefActiveDirective)\n .directive('uiSrefActiveEq', uiSrefActiveDirective)\n .directive('uiState', uiStateDirective);\n",
|
29 | "/** @publicapi @module directives */ /** */\nimport {\n $QLike,\n ActiveUIView,\n extend,\n filter,\n HookRegOptions,\n isDefined,\n isFunction,\n isString,\n kebobString,\n noop,\n Obj,\n Param,\n parse,\n PathNode,\n ResolveContext,\n StateDeclaration,\n tail,\n trace,\n Transition,\n TransitionService,\n TypedMap,\n unnestR,\n ViewService,\n} from '@uirouter/core';\nimport { IAugmentedJQuery, IInterpolateService, IScope, ITranscludeFunction } from 'angular';\nimport { ng as angular } from '../angular';\nimport { Ng1Controller, Ng1StateDeclaration } from '../interface';\nimport { getLocals } from '../services';\nimport { Ng1ViewConfig } from '../statebuilders/views';\nimport { ng1_directive } from './stateDirectives';\n\n/** @hidden */\nexport type UIViewData = {\n $cfg: Ng1ViewConfig;\n $uiView: ActiveUIView;\n};\n\n/** @hidden */\nexport type UIViewAnimData = {\n $animEnter: Promise<any>;\n $animLeave: Promise<any>;\n $$animLeave: { resolve: () => any }; // \"deferred\"\n};\n\n/**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * <!-- Unnamed -->\n * <div ui-view></div>\n *\n * <!-- Named -->\n * <div ui-view=\"viewName\"></div>\n *\n * <!-- Named (different style) -->\n * <ui-view name=\"viewName\"></ui-view>\n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n * <div ui-view></div>\n * $stateProvider.state(\"home\", {\n * template: \"<h1>HELLO!</h1>\"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n * <div ui-view=\"main\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"<h1>HELLO!</h1>\"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n * <div ui-view></div>\n * <div ui-view=\"chart\"></div>\n * <div ui-view=\"data\"></div>\n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"<h1>HELLO!</h1>\"\n * },\n * \"chart\": {\n * template: \"<chart_thing/>\"\n * },\n * \"data\": {\n * template: \"<data_thing/>\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * <!-- If autoscroll present with no expression,\n * then scroll ui-view into view -->\n * <ui-view autoscroll/>\n *\n * <!-- If autoscroll present with valid expression,\n * then scroll ui-view into view if expression evaluates to true -->\n * <ui-view autoscroll='true'/>\n * <ui-view autoscroll='false'/>\n * <ui-view autoscroll='scopeVariable'/>\n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '<my-component user=\"$resolve.user\"></my-component>',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\nexport let uiView: ng1_directive;\n// eslint-disable-next-line prefer-const\nuiView = [\n '$view',\n '$animate',\n '$uiViewScroll',\n '$interpolate',\n '$q',\n function $ViewDirective(\n $view: ViewService,\n $animate: any,\n $uiViewScroll: any,\n $interpolate: IInterpolateService,\n $q: $QLike\n ) {\n function getRenderer() {\n return {\n enter: function (element: JQuery, target: any, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n } else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function (element: JQuery, cb: Function) {\n if (angular.version.minor > 2) {\n $animate.leave(element).then(cb);\n } else {\n $animate.leave(element, cb);\n }\n },\n };\n }\n\n function configsEqual(config1: Ng1ViewConfig, config2: Ng1ViewConfig) {\n return config1 === config2;\n }\n\n const rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: {},\n };\n\n const directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement: JQuery, tAttrs: Obj, $transclude: ITranscludeFunction) {\n return function (scope: IScope, $element: IAugmentedJQuery, attrs: Obj) {\n const onloadExp = attrs['onload'] || '',\n autoScrollExp = attrs['autoscroll'],\n renderer = getRenderer(),\n inherited = $element.inheritedData('$uiView') || rootData,\n name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n\n let previousEl: JQuery, currentEl: JQuery, currentScope: IScope, viewConfig: Ng1ViewConfig;\n\n const activeUIView: ActiveUIView = {\n $type: 'ng1',\n id: directive.count++, // Global sequential ID for ui-view tags added to DOM\n name: name, // ui-view name (<div ui-view=\"name\"></div>\n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + '.' + name : name, // fully qualified name, describes location in DOM\n config: null, // The ViewConfig loaded (from a state.views definition)\n configUpdated: configUpdatedCallback, // Called when the matching ViewConfig changes\n get creationContext() {\n // The context in which this ui-view \"tag\" was created\n const fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow <ui-view name=\"foo\"><ui-view name=\"bar\"></ui-view></ui-view>\n // See https://github.com/angular-ui/ui-router/issues/3355\n const fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n },\n };\n\n trace.traceUIViewEvent('Linking', activeUIView);\n\n function configUpdatedCallback(config?: Ng1ViewConfig) {\n if (config && !(config instanceof Ng1ViewConfig)) return;\n if (configsEqual(viewConfig, config)) return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n\n viewConfig = config;\n updateView(config);\n }\n\n $element.data('$uiView', { $uiView: activeUIView });\n\n updateView();\n\n const unregister = $view.registerUIView(activeUIView);\n scope.$on('$destroy', function () {\n trace.traceUIViewEvent('Destroying/Unregistering', activeUIView);\n unregister();\n });\n\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent('Removing (previous) el', previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n\n if (currentScope) {\n trace.traceUIViewEvent('Destroying scope', activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n\n if (currentEl) {\n const _viewData = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent('Animate out', _viewData);\n renderer.leave(currentEl, function () {\n _viewData.$$animLeave.resolve();\n previousEl = null;\n });\n\n previousEl = currentEl;\n currentEl = null;\n }\n }\n\n function updateView(config?: Ng1ViewConfig) {\n const newScope = scope.$new();\n const animEnter = $q.defer(),\n animLeave = $q.defer();\n\n const $uiViewData: UIViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n\n const $uiViewAnim: UIViewAnimData = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave,\n };\n\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n\n const cloned = $transclude(newScope, function (clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope) currentScope.$emit('$viewContentAnimationEnded');\n\n if ((isDefined(autoScrollExp) && !autoScrollExp) || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n\n cleanupLastView();\n });\n\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n },\n };\n\n return directive;\n },\n];\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q'];\n\n/** @hidden */\nfunction $ViewDirectiveFill(\n $compile: angular.ICompileService,\n $controller: angular.IControllerService,\n $transitions: TransitionService,\n $view: ViewService,\n $q: angular.IQService\n) {\n const getControllerAs = parse('viewDecl.controllerAs');\n const getResolveAs = parse('viewDecl.resolveAs');\n\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement: JQuery) {\n const initial = tElement.html();\n tElement.empty();\n\n return function (scope: IScope, $element: JQuery) {\n const data: UIViewData = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents() as any)(scope);\n return;\n }\n\n const cfg: Ng1ViewConfig = data.$cfg || <any>{ viewDecl: {}, getTemplate: noop };\n const resolveCtx: ResolveContext = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n\n const link = $compile($element.contents() as any);\n const controller = cfg.controller as angular.IControllerService;\n const controllerAs: string = getControllerAs(cfg);\n const resolveAs: string = getResolveAs(cfg);\n const locals = resolveCtx && getLocals(resolveCtx);\n\n scope[resolveAs] = locals;\n\n if (controller) {\n const controllerInstance = <Ng1Controller>(\n $controller(controller, extend({}, locals, { $scope: scope, $element: $element }))\n );\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n\n // Wait for the component to appear in the DOM\n if (isString(cfg.component)) {\n const kebobName = kebobString(cfg.component);\n const tagRegexp = new RegExp(`^(x-|data-)?${kebobName}$`, 'i');\n\n const getComponentController = () => {\n const directiveEl = [].slice\n .call($element[0].children)\n .filter((el: Element) => el && el.tagName && tagRegexp.exec(el.tagName));\n\n return directiveEl && angular.element(directiveEl).data(`$${cfg.component}Controller`);\n };\n\n const deregisterWatch = scope.$watch(getComponentController, function (ctrlInstance) {\n if (!ctrlInstance) return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch();\n });\n }\n\n link(scope);\n };\n },\n };\n}\n\n/** @hidden */\nconst hasComponentImpl = typeof (angular as any).module('ui.router')['component'] === 'function';\n/** @hidden incrementing id */\nlet _uiCanExitId = 0;\n\n/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\nfunction registerControllerCallbacks(\n $q: angular.IQService,\n $transitions: TransitionService,\n controllerInstance: Ng1Controller,\n $scope: IScope,\n cfg: Ng1ViewConfig\n) {\n // Call $onInit() ASAP\n if (\n isFunction(controllerInstance.$onInit) &&\n !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)\n ) {\n controllerInstance.$onInit();\n }\n\n const viewState: Ng1StateDeclaration = tail(cfg.path).state.self;\n\n const hookOptions: HookRegOptions = { bind: controllerInstance };\n // Add component-level hook for onUiParamsChanged\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n const resolveContext: ResolveContext = new ResolveContext(cfg.path);\n const viewCreationTrans = resolveContext.getResolvable('$transition$').data;\n\n // Fire callback on any successful transition\n const paramsUpdated = ($transition$: Transition) => {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans || $transition$.exiting().indexOf(viewState as StateDeclaration) !== -1)\n return;\n\n const toParams = $transition$.params('to') as TypedMap<any>;\n const fromParams = $transition$.params<TypedMap<any>>('from') as TypedMap<any>;\n const getNodeSchema = (node: PathNode) => node.paramSchema;\n const toSchema: Param[] = $transition$.treeChanges('to').map(getNodeSchema).reduce(unnestR, []);\n const fromSchema: Param[] = $transition$.treeChanges('from').map(getNodeSchema).reduce(unnestR, []);\n\n // Find the to params that have different values than the from params\n const changedToParams = toSchema.filter((param: Param) => {\n const idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n const changedKeys: string[] = changedToParams.map((x) => x.id);\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n const newValues = filter(toParams, (val, key) => changedKeys.indexOf(key) !== -1);\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', <any>$transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n const id = _uiCanExitId++;\n const cacheProp = '_uiCanExitIds';\n\n // Returns true if a redirect transition already answered truthy\n const prevTruthyAnswer = (trans: Transition) =>\n !!trans && ((trans[cacheProp] && trans[cacheProp][id] === true) || prevTruthyAnswer(trans.redirectedFrom()));\n\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n const wrappedHook = (trans: Transition) => {\n let promise;\n const ids = (trans[cacheProp] = trans[cacheProp] || {});\n\n if (!prevTruthyAnswer(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then((val) => (ids[id] = val !== false));\n }\n return promise;\n };\n\n const criteria = { exiting: viewState.name };\n $scope.$on('$destroy', <any>$transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n}\n\nangular.module('ui.router.state').directive('uiView', <any>uiView);\nangular.module('ui.router.state').directive('uiView', <any>$ViewDirectiveFill);\n",
|
30 | "/** @publicapi @module ng1 */ /** */\n\nimport { ng as angular } from './angular';\nimport { Obj, StateService, StateOrName } from '@uirouter/core';\n\n/**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'stateName' | isState\">show if state is 'stateName'</div>\n * ```\n */\n$IsStateFilter.$inject = ['$state'];\nfunction $IsStateFilter($state: StateService) {\n const isFilter: any = function (state: StateOrName, params: Obj, options?: { relative?: StateOrName }) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n}\n\n/**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n * <div ng-if=\"'fullOrPartialStateName' | includedByState\">show if state includes 'fullOrPartialStateName'</div>\n * ```\n */\n$IncludedByStateFilter.$inject = ['$state'];\nfunction $IncludedByStateFilter($state: StateService) {\n const includesFilter: any = function (state: StateOrName, params: Obj, options: { relative?: StateOrName }) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n}\n\nangular.module('ui.router.state').filter('isState', $IsStateFilter).filter('includedByState', $IncludedByStateFilter);\n\nexport { $IsStateFilter, $IncludedByStateFilter };\n",
|
31 | "/** @publicapi @module ng1 */ /** */\nimport { ng as angular } from './angular';\nimport { IServiceProviderFactory } from 'angular';\nimport IAnchorScrollService = angular.IAnchorScrollService;\nimport ITimeoutService = angular.ITimeoutService;\n\nexport interface UIViewScrollProvider {\n /**\n * Uses standard anchorScroll behavior\n *\n * Reverts [[$uiViewScroll]] back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * service for scrolling based on the url anchor.\n */\n useAnchorScroll(): void;\n}\n\n/** @hidden */\nfunction $ViewScrollProvider() {\n let useAnchorScroll = false;\n\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n\n this.$get = [\n '$anchorScroll',\n '$timeout',\n function ($anchorScroll: IAnchorScrollService, $timeout: ITimeoutService): Function {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n\n return function ($element: JQuery) {\n return $timeout(\n function () {\n $element[0].scrollIntoView();\n },\n 0,\n false\n );\n };\n },\n ];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', <IServiceProviderFactory>$ViewScrollProvider);\n",
|
32 | "/**\n * Main entry point for angular 1.x build\n * @publicapi @module ng1\n */ /** */\nexport * from './interface';\nexport * from './services';\nexport * from './statebuilders/views';\nexport * from './stateProvider';\nexport * from './urlRouterProvider';\n\nimport './injectables';\nimport './directives/stateDirectives';\nimport './stateFilters';\nimport './directives/viewDirective';\nimport './viewScroll';\n\nexport default 'ui.router';\n\nimport * as core from '@uirouter/core';\nexport { core };\nexport * from '@uirouter/core';\n"
|
33 | ],
|
34 | "names": [
|
35 | "ng_from_global",
|
36 | "angular",
|
37 | "ng",
|
38 | "ng_from_import",
|
39 | "ng_from_import.module",
|
40 | "getNg1ViewConfigFactory",
|
41 | "templateFactory",
|
42 | "path",
|
43 | "view",
|
44 | "services",
|
45 | "$injector",
|
46 | "get",
|
47 | "Ng1ViewConfig",
|
48 | "hasAnyKey",
|
49 | "keys",
|
50 | "obj",
|
51 | "reduce",
|
52 | "acc",
|
53 | "key",
|
54 | "isDefined",
|
55 | "ng1ViewsBuilder",
|
56 | "state",
|
57 | "parent",
|
58 | "compKeys",
|
59 | "nonCompKeys",
|
60 | "concat",
|
61 | "allViewKeys",
|
62 | "views",
|
63 | "Error",
|
64 | "name",
|
65 | "filter",
|
66 | "join",
|
67 | "viewsObject",
|
68 | "$default",
|
69 | "pick",
|
70 | "forEach",
|
71 | "config",
|
72 | "isString",
|
73 | "component",
|
74 | "extend",
|
75 | "resolveAs",
|
76 | "$type",
|
77 | "$context",
|
78 | "$name",
|
79 | "normalized",
|
80 | "ViewService",
|
81 | "normalizeUIViewTarget",
|
82 | "$uiViewName",
|
83 | "uiViewName",
|
84 | "$uiViewContextAnchor",
|
85 | "uiViewContextAnchor",
|
86 | "id",
|
87 | "viewDecl",
|
88 | "factory",
|
89 | "this",
|
90 | "uiView",
|
91 | "context",
|
92 | "_this",
|
93 | "makeComponentTemplate",
|
94 | "bindings",
|
95 | "template",
|
96 | "$q",
|
97 | "ResolveContext",
|
98 | "params",
|
99 | "node",
|
100 | "paramValues",
|
101 | "promises",
|
102 | "when",
|
103 | "fromConfig",
|
104 | "controller",
|
105 | "getController",
|
106 | "all",
|
107 | "then",
|
108 | "results",
|
109 | "trace",
|
110 | "traceViewServiceEvent",
|
111 | "provider",
|
112 | "controllerProvider",
|
113 | "isInjectable",
|
114 | "deps",
|
115 | "annotate",
|
116 | "providerFn",
|
117 | "isArray",
|
118 | "tail",
|
119 | "Resolvable",
|
120 | "version",
|
121 | "minor",
|
122 | "$http",
|
123 | "$templateCache",
|
124 | "$templateRequest",
|
125 | "has",
|
126 | "TemplateFactory",
|
127 | "value",
|
128 | "_useHttp",
|
129 | "asTemplate",
|
130 | "result",
|
131 | "str",
|
132 | "asComponent",
|
133 | "fromString",
|
134 | "templateUrl",
|
135 | "fromUrl",
|
136 | "templateProvider",
|
137 | "fromProvider",
|
138 | "componentProvider",
|
139 | "fromComponentProvider",
|
140 | "isFunction",
|
141 | "url",
|
142 | "cache",
|
143 | "headers",
|
144 | "Accept",
|
145 | "response",
|
146 | "data",
|
147 | "prefix",
|
148 | "kebob",
|
149 | "camelCase",
|
150 | "kebobed",
|
151 | "kebobString",
|
152 | "exec",
|
153 | "attrs",
|
154 | "cmpDefs",
|
155 | "length",
|
156 | "map",
|
157 | "getBindings",
|
158 | "unnestR",
|
159 | "getComponentBindings",
|
160 | "input",
|
161 | "type",
|
162 | "attrName",
|
163 | "attr",
|
164 | "resolveName",
|
165 | "res",
|
166 | "getResolvable",
|
167 | "fn",
|
168 | "args",
|
169 | "kebobName",
|
170 | "def",
|
171 | "isObject",
|
172 | "bindToController",
|
173 | "scopeBindings",
|
174 | "scope",
|
175 | "bindingsObj",
|
176 | "Object",
|
177 | "tuple",
|
178 | "stateRegistry",
|
179 | "stateService",
|
180 | "createProxyFunctions",
|
181 | "val",
|
182 | "StateProvider",
|
183 | "prototype",
|
184 | "func",
|
185 | "decorator",
|
186 | "definition",
|
187 | "register",
|
188 | "callback",
|
189 | "onInvalid",
|
190 | "getStateHookBuilder",
|
191 | "hookName",
|
192 | "stateObject",
|
193 | "hook",
|
194 | "pathname",
|
195 | "trans",
|
196 | "subContext",
|
197 | "treeChanges",
|
198 | "$$state",
|
199 | "locals",
|
200 | "getLocals",
|
201 | "$state$",
|
202 | "$transition$",
|
203 | "invoke",
|
204 | "undefined",
|
205 | "$locationProvider",
|
206 | "_lp",
|
207 | "Ng1LocationServices",
|
208 | "router",
|
209 | "pathType",
|
210 | "urlMatcherFactory",
|
211 | "encode",
|
212 | "x",
|
213 | "toString",
|
214 | "replace",
|
215 | "m",
|
216 | "~",
|
217 | "/",
|
218 | "decode",
|
219 | "~~",
|
220 | "~2F",
|
221 | "_urlListeners",
|
222 | "push",
|
223 | "removeFrom",
|
224 | "html5Mode",
|
225 | "enabled",
|
226 | "$sniffer",
|
227 | "history",
|
228 | "_baseHref",
|
229 | "$browser",
|
230 | "baseHref",
|
231 | "$window",
|
232 | "location",
|
233 | "newUrl",
|
234 | "$location",
|
235 | "$rootScope",
|
236 | "$on",
|
237 | "evt",
|
238 | "_loc",
|
239 | "UrlRouterProvider",
|
240 | "handler",
|
241 | "match",
|
242 | "$match",
|
243 | "$stateParams",
|
244 | "globals",
|
245 | "urlService",
|
246 | "urlRouter",
|
247 | "update",
|
248 | "interceptDeferred",
|
249 | "listen",
|
250 | "ruleFn",
|
251 | "rule",
|
252 | "BaseUrlRule",
|
253 | "locationService",
|
254 | "identity",
|
255 | "rules",
|
256 | "urlRules",
|
257 | "otherwise",
|
258 | "what",
|
259 | "injectableHandler",
|
260 | "defer",
|
261 | "deferIntercept",
|
262 | "module",
|
263 | "mod_init",
|
264 | "mod_util",
|
265 | "mod_rtr",
|
266 | "mod_state",
|
267 | "mod_main",
|
268 | "$uiRouterProvider",
|
269 | "UIRouter",
|
270 | "stateProvider",
|
271 | "viewService",
|
272 | "_pluginapi",
|
273 | "_viewConfigFactory",
|
274 | "_decodeParams",
|
275 | "ng1LocationService",
|
276 | "locationConfig",
|
277 | "$get",
|
278 | "_runtimeServices",
|
279 | "monkeyPatchPathParameterType",
|
280 | "$inject",
|
281 | "getProviderFor",
|
282 | "serviceName",
|
283 | "$urp",
|
284 | "service",
|
285 | "runBlock",
|
286 | "$uiRouter",
|
287 | "hasOwnProperty",
|
288 | "call",
|
289 | "checkStrictDi",
|
290 | "error",
|
291 | "strictDi",
|
292 | "resolvables",
|
293 | "resolvable",
|
294 | "resolveFn",
|
295 | "watchDigests",
|
296 | "$watch",
|
297 | "approximateDigests",
|
298 | "uiRouter",
|
299 | "urlRouterProvider",
|
300 | "run",
|
301 | "$urlMatcherFactory",
|
302 | "$state",
|
303 | "$urlRouter",
|
304 | "uiSrefDirective",
|
305 | "uiStateDirective",
|
306 | "uiSrefActiveDirective",
|
307 | "ctx",
|
308 | "getTokens",
|
309 | "getPolicy",
|
310 | "async",
|
311 | "promise",
|
312 | "applyPairs",
|
313 | "parseStateRef",
|
314 | "ref",
|
315 | "paramsOnly",
|
316 | "parsed",
|
317 | "paramExpr",
|
318 | "stateContext",
|
319 | "el",
|
320 | "$uiView",
|
321 | "inheritedData",
|
322 | "parse",
|
323 | "processedDef",
|
324 | "$element",
|
325 | "uiState",
|
326 | "current",
|
327 | "uiStateOpts",
|
328 | "relative",
|
329 | "$current",
|
330 | "inherit",
|
331 | "source",
|
332 | "defaultOpts",
|
333 | "href",
|
334 | "uiStateParams",
|
335 | "getTypeInfo",
|
336 | "isSvg",
|
337 | "prop",
|
338 | "isForm",
|
339 | "nodeName",
|
340 | "isAnchor",
|
341 | "toUpperCase",
|
342 | "clickable",
|
343 | "clickHook",
|
344 | "$timeout",
|
345 | "getDef",
|
346 | "e",
|
347 | "button",
|
348 | "which",
|
349 | "target",
|
350 | "ctrlKey",
|
351 | "metaKey",
|
352 | "shiftKey",
|
353 | "altKey",
|
354 | "transition_1",
|
355 | "go",
|
356 | "preventDefault",
|
357 | "ignorePreventDefaultCount_1",
|
358 | "cancel",
|
359 | "bindEvents",
|
360 | "element",
|
361 | "hookFn",
|
362 | "events",
|
363 | "on",
|
364 | "events_1",
|
365 | "_i",
|
366 | "event_1",
|
367 | "off",
|
368 | "events_2",
|
369 | "event_2",
|
370 | "$IsStateFilter",
|
371 | "isFilter",
|
372 | "options",
|
373 | "is",
|
374 | "$stateful",
|
375 | "$IncludedByStateFilter",
|
376 | "includesFilter",
|
377 | "includes",
|
378 | "$ViewDirectiveFill",
|
379 | "$compile",
|
380 | "$controller",
|
381 | "$transitions",
|
382 | "$view",
|
383 | "getControllerAs",
|
384 | "getResolveAs",
|
385 | "restrict",
|
386 | "priority",
|
387 | "compile",
|
388 | "tElement",
|
389 | "initial",
|
390 | "html",
|
391 | "empty",
|
392 | "contents",
|
393 | "cfg",
|
394 | "$cfg",
|
395 | "getTemplate",
|
396 | "noop",
|
397 | "resolveCtx",
|
398 | "traceUIViewFill",
|
399 | "link",
|
400 | "controllerAs",
|
401 | "controllerInstance",
|
402 | "$scope",
|
403 | "children",
|
404 | "registerControllerCallbacks",
|
405 | "tagRegexp_1",
|
406 | "RegExp",
|
407 | "deregisterWatch_1",
|
408 | "directiveEl",
|
409 | "slice",
|
410 | "tagName",
|
411 | "ctrlInstance",
|
412 | "require",
|
413 | "uiSrefActive",
|
414 | "active",
|
415 | "unlinkInfoFn",
|
416 | "rawDef",
|
417 | "uiSref",
|
418 | "$$addStateInfo",
|
419 | "$set",
|
420 | "uiSrefOpts",
|
421 | "$eval",
|
422 | "onStatesChanged",
|
423 | "transitionService",
|
424 | "onSuccess",
|
425 | "inputAttrs",
|
426 | "watchDeregFns",
|
427 | "field",
|
428 | "$observe",
|
429 | "expr",
|
430 | "newval",
|
431 | "$interpolate",
|
432 | "$attrs",
|
433 | "activeEqClass",
|
434 | "deregisterStatesChangedListener",
|
435 | "deregisterOnStartListener",
|
436 | "deregisterStateChangeSuccessListener",
|
437 | "states",
|
438 | "uiSrefActiveEq",
|
439 | "updateAfterTransition",
|
440 | "handleStatesChanged",
|
441 | "setStatesFromDefinitionObject",
|
442 | "statesDefinition",
|
443 | "stateOrName",
|
444 | "activeClass",
|
445 | "addStateForClass",
|
446 | "addState",
|
447 | "stateName",
|
448 | "stateParams",
|
449 | "stateInfo",
|
450 | "splitClasses",
|
451 | "split",
|
452 | "getClasses",
|
453 | "stateList",
|
454 | "allClasses",
|
455 | "uniqR",
|
456 | "fuzzyClasses",
|
457 | "exactClasses",
|
458 | "addClasses",
|
459 | "removeClasses",
|
460 | "cls",
|
461 | "inArray",
|
462 | "$evalAsync",
|
463 | "className",
|
464 | "addClass",
|
465 | "removeClass",
|
466 | "newState",
|
467 | "newParams",
|
468 | "deregister",
|
469 | "onStart",
|
470 | "transition",
|
471 | "directive",
|
472 | "$animate",
|
473 | "$uiViewScroll",
|
474 | "rootData",
|
475 | "_rootViewContext",
|
476 | "count",
|
477 | "terminal",
|
478 | "transclude",
|
479 | "tAttrs",
|
480 | "$transclude",
|
481 | "previousEl",
|
482 | "currentEl",
|
483 | "currentScope",
|
484 | "viewConfig",
|
485 | "onloadExp",
|
486 | "autoScrollExp",
|
487 | "renderer",
|
488 | "enter",
|
489 | "cb",
|
490 | "leave",
|
491 | "inherited",
|
492 | "activeUIView",
|
493 | "fqn",
|
494 | "configUpdated",
|
495 | "config1",
|
496 | "config2",
|
497 | "traceUIViewConfigUpdated",
|
498 | "updateView",
|
499 | "creationContext",
|
500 | "fromParentTagConfig",
|
501 | "fromParentTag",
|
502 | "traceUIViewEvent",
|
503 | "unregister",
|
504 | "registerUIView",
|
505 | "newScope",
|
506 | "$new",
|
507 | "animEnter",
|
508 | "animLeave",
|
509 | "$uiViewData",
|
510 | "$uiViewAnim",
|
511 | "$animEnter",
|
512 | "$animLeave",
|
513 | "$$animLeave",
|
514 | "$emit",
|
515 | "cloned",
|
516 | "clone",
|
517 | "resolve",
|
518 | "remove",
|
519 | "$destroy",
|
520 | "_viewData_1",
|
521 | "cleanupLastView",
|
522 | "hasComponentImpl",
|
523 | "_uiCanExitId",
|
524 | "$onInit",
|
525 | "viewState",
|
526 | "self",
|
527 | "hookOptions",
|
528 | "bind",
|
529 | "uiOnParamsChanged",
|
530 | "viewCreationTrans_1",
|
531 | "exiting",
|
532 | "indexOf",
|
533 | "toParams",
|
534 | "fromParams",
|
535 | "getNodeSchema",
|
536 | "paramSchema",
|
537 | "toSchema",
|
538 | "fromSchema",
|
539 | "changedToParams",
|
540 | "param",
|
541 | "idx",
|
542 | "equals",
|
543 | "changedKeys_1",
|
544 | "newValues",
|
545 | "uiCanExit",
|
546 | "id_1",
|
547 | "prevTruthyAnswer_1",
|
548 | "redirectedFrom",
|
549 | "criteria",
|
550 | "onBefore",
|
551 | "ids",
|
552 | "useAnchorScroll",
|
553 | "$anchorScroll",
|
554 | "scrollIntoView"
|
555 | ],
|
556 | "mappings": ";;;;;;;8TAGe,IAAMA,EAAiBC,QACVC,EAAKC,GAAkBC,SAAwBD,EAAiBH,WCqB5EK,IACd,IAAIC,EAAmC,KACvC,OAAO,SAACC,EAAMC,GAEZ,OADAF,EAAkBA,GAAmBG,WAASC,UAAUC,IAAI,oBACrD,CAAC,IAAIC,EAAcL,EAAMC,EAAMF,KAK1C,IAAMO,EAAY,SAACC,EAAMC,GAAQ,OAAAD,EAAKE,QAAO,SAACC,EAAKC,GAAQ,OAAAD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