angular-ui-router
Advanced tools
Sorry, the diff of this file is too big to display
@@ -0,1 +1,3 @@ | ||
| /** @publicapi @module ng1 */ /** */ | ||
| import { Obj } from '@uirouter/core'; | ||
| /** @hidden */ | ||
@@ -41,3 +43,3 @@ export declare const resolveFactory: () => { | ||
| [key: string]: Function; | ||
| }, locals?: {}, parent?: Promise<any>) => Promise<{}>; | ||
| }, locals?: {}, parent?: Promise<any>) => Promise<Obj>; | ||
| }; |
@@ -13,8 +13,7 @@ import { IRootScopeService } from 'angular'; | ||
| } | ||
| declare function watchDigests($rootScope: IRootScopeService): void; | ||
| declare namespace watchDigests { | ||
| export declare function watchDigests($rootScope: IRootScopeService): void; | ||
| export declare namespace watchDigests { | ||
| var $inject: string[]; | ||
| } | ||
| export default watchDigests; | ||
| /** @hidden TODO: find a place to move this */ | ||
| export declare const getLocals: (ctx: ResolveContext) => TypedMap<any>; |
@@ -0,1 +1,3 @@ | ||
| /** @publicapi @module ng1 */ /** */ | ||
| import { Obj } from '@uirouter/core'; | ||
| /** @hidden */ | ||
@@ -41,3 +43,3 @@ export declare const resolveFactory: () => { | ||
| [key: string]: Function; | ||
| }, locals?: {}, parent?: Promise<any>) => Promise<{}>; | ||
| }, locals?: {}, parent?: Promise<any>) => Promise<Obj>; | ||
| }; |
@@ -13,8 +13,7 @@ import { IRootScopeService } from 'angular'; | ||
| } | ||
| declare function watchDigests($rootScope: IRootScopeService): void; | ||
| declare namespace watchDigests { | ||
| export declare function watchDigests($rootScope: IRootScopeService): void; | ||
| export declare namespace watchDigests { | ||
| var $inject: string[]; | ||
| } | ||
| export default watchDigests; | ||
| /** @hidden TODO: find a place to move this */ | ||
| export declare const getLocals: (ctx: ResolveContext) => TypedMap<any>; |
+21
-21
| { | ||
| "name": "angular-ui-router", | ||
| "description": "State-based routing for AngularJS 1.x", | ||
| "version": "1.0.23", | ||
| "version": "1.0.24", | ||
| "scripts": { | ||
@@ -24,3 +24,3 @@ "clean": "shx rm -rf lib lib-esm _doc build release *.log", | ||
| "test:ng16": "karma start --ngversion 1.6", | ||
| "test:downstream": "npm run build && test_downstream_projects --workspace", | ||
| "test:downstream": "test_downstream_projects", | ||
| "watch": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1", | ||
@@ -76,3 +76,3 @@ "debug": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1 --browsers=Chrome", | ||
| "dependencies": { | ||
| "@uirouter/core": "6.0.1" | ||
| "@uirouter/core": "6.0.3" | ||
| }, | ||
@@ -83,13 +83,13 @@ "peerDependencies": { | ||
| "devDependencies": { | ||
| "@types/angular": "1.6.54", | ||
| "@types/angular": "1.6.57", | ||
| "@types/angular-animate": "^1.5.10", | ||
| "@types/angular-mocks": "^1.7.0", | ||
| "@types/jasmine": "^3.3.13", | ||
| "@uirouter/publish-scripts": "^2.3.27", | ||
| "@types/jasmine": "^3.5.0", | ||
| "@uirouter/publish-scripts": "^2.3.44", | ||
| "dts-downlevel": "^0.3.0", | ||
| "fork-ts-checker-webpack-plugin": "^1.3.6", | ||
| "husky": "^2.4.1", | ||
| "jasmine-core": "^3.4.0", | ||
| "karma": "^4.1.0", | ||
| "karma-chrome-launcher": "^2.2.0", | ||
| "fork-ts-checker-webpack-plugin": "^3.1.1", | ||
| "husky": "^3.1.0", | ||
| "jasmine-core": "^3.5.0", | ||
| "karma": "^4.4.1", | ||
| "karma-chrome-launcher": "^3.1.0", | ||
| "karma-jasmine": "^2.0.1", | ||
@@ -100,14 +100,14 @@ "karma-mocha-reporter": "^2.2.5", | ||
| "karma-webpack": "^4.0.2", | ||
| "lodash": "^4.17.11", | ||
| "prettier": "^1.18.2", | ||
| "pretty-quick": "^1.11.0", | ||
| "rollup": "^1.15.3", | ||
| "rollup-plugin-node-resolve": "^5.0.2", | ||
| "lodash": "^4.17.15", | ||
| "prettier": "^1.19.1", | ||
| "pretty-quick": "^2.0.1", | ||
| "rollup": "^1.27.14", | ||
| "rollup-plugin-node-resolve": "^5.2.0", | ||
| "rollup-plugin-sourcemaps": "^0.4.2", | ||
| "rollup-plugin-uglify": "^6.0.2", | ||
| "ts-loader": "^6.0.2", | ||
| "tslint": "^5.17.0", | ||
| "rollup-plugin-uglify": "^6.0.4", | ||
| "ts-loader": "^6.2.1", | ||
| "tslint": "^5.20.1", | ||
| "tslint-eslint-rules": "^5.4.0", | ||
| "typescript": "^3.5.2", | ||
| "webpack": "^4.34.0" | ||
| "typescript": "^3.6.4", | ||
| "webpack": "^4.41.5" | ||
| }, | ||
@@ -114,0 +114,0 @@ "husky": { |
+4
-6
@@ -1,8 +0,6 @@ | ||
| # AngularUI Router [](https://travis-ci.org/angular-ui/ui-router) | ||
| # AngularUI Router [](https://github.com/angular-ui/ui-router/actions?query=workflow%3A%22CI%3A+UIRouter+for+AngularJS%22) | ||
| [](https://greenkeeper.io/) | ||
| **Note: this is the Angular 1.x source for UI-Router version 1.x. If you are looking for the source for UI-Router | ||
| version 0.x, it can be found [here](https://github.com/angular-ui/ui-router/tree/legacy)** | ||
| **Note: this is the Angular 1.x source for UI-Router version 1.0. If you are looking for the source for UI-Router | ||
| version 0.2.x, it can be found [here](https://github.com/angular-ui/ui-router/tree/legacy)** | ||
| --- | ||
@@ -16,3 +14,3 @@ | ||
| **[Download stable](http://unpkg.com/@uirouter/angularjs@latest/release/angular-ui-router.js)** (or **[Minified](http://unpkg.com/@uirouter/angularjs@latest/release/angular-ui-router.min.js)**) **|** | ||
| **[Guide](https://github.com/angular-ui/ui-router/wiki) |** | ||
| **[Guide](https://ui-router.github.io/guide/) |** | ||
| **[Sample App](http://ui-router.github.io/resources/sampleapp/) |** | ||
@@ -19,0 +17,0 @@ **[FAQ](https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions) |** |
| /** | ||
| * State-based routing for AngularJS 1.x | ||
| * @version v1.0.23 | ||
| * @version v1.0.24 | ||
| * @link https://ui-router.github.io | ||
@@ -11,3 +11,3 @@ * @license MIT License, http://www.opensource.org/licenses/MIT | ||
| (global = global || self, factory(global['@uirouter/angularjs-resolve-service'] = {}, global['@uirouter/core'], global.angular)); | ||
| }(this, function (exports, core, angular) { 'use strict'; | ||
| }(this, (function (exports, core, angular) { 'use strict'; | ||
@@ -83,3 +83,3 @@ /** @publicapi @module ng1 */ /** */ | ||
| })); | ||
| }))); | ||
| //# sourceMappingURL=resolveService.js.map |
| /** | ||
| * State-based routing for AngularJS 1.x | ||
| * @version v1.0.23 | ||
| * @version v1.0.24 | ||
| * @link https://ui-router.github.io | ||
@@ -5,0 +5,0 @@ * @license MIT License, http://www.opensource.org/licenses/MIT |
| /** | ||
| * State-based routing for AngularJS 1.x | ||
| * @version v1.0.23 | ||
| * @version v1.0.24 | ||
| * @link https://ui-router.github.io | ||
@@ -11,3 +11,3 @@ * @license MIT License, http://www.opensource.org/licenses/MIT | ||
| (global = global || self, factory(global['@uirouter/angularjs-state-events'] = {}, global.angular)); | ||
| }(this, function (exports, ng_from_import) { 'use strict'; | ||
| }(this, (function (exports, ng_from_import) { 'use strict'; | ||
@@ -300,3 +300,3 @@ /** @publicapi @module ng1 */ /** */ | ||
| })); | ||
| }))); | ||
| //# sourceMappingURL=stateEvents.js.map |
| /** | ||
| * State-based routing for AngularJS 1.x | ||
| * @version v1.0.23 | ||
| * @version v1.0.24 | ||
| * @link https://ui-router.github.io | ||
@@ -5,0 +5,0 @@ * @license MIT License, http://www.opensource.org/licenses/MIT |
| /** | ||
| * State-based routing for AngularJS 1.x | ||
| * This bundle requires the ui-router-core.js bundle from the @uirouter/core package. | ||
| * @version v1.0.23 | ||
| * @version v1.0.24 | ||
| * @link https://ui-router.github.io | ||
| * @license MIT License, http://www.opensource.org/licenses/MIT | ||
| */ | ||
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular"),require("@uirouter/core")):"function"==typeof define&&define.amd?define(["exports","angular","@uirouter/core"],t):t((e=e||self)["@uirouter/angularjs"]={},e.angular,e["@uirouter/core"])}(this,function(t,e,x){"use strict";var r=angular,C=e&&e.module?e:r;function n(){var r=null;return function(e,t){return r=r||x.services.$injector.get("$templateFactory"),[new R(e,t,r)]}}var u=function(e,r){return e.reduce(function(e,t){return e||x.isDefined(r[t])},!1)};function i(n){if(!n.parent)return{};var i=["component","bindings","componentProvider"],o=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),e=i.concat(o);if(x.isDefined(n.views)&&u(e,n))throw new Error("State '"+n.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level. Move the following properties into a view (in the 'views' object): "+e.filter(function(e){return x.isDefined(n[e])}).join(", "));var a={},t=n.views||{$default:x.pick(n,e)};return x.forEach(t,function(e,t){if(t=t||"$default",x.isString(e)&&(e={component:e}),e=x.extend({},e),u(i,e)&&u(o,e))throw new Error("Cannot combine: "+i.join("|")+" with: "+o.join("|")+" in stateview: '"+t+"@"+n.name+"'");e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=n,e.$name=t;var r=x.ViewService.normalizeUIViewTarget(e.$context,e.$name);e.$uiViewName=r.uiViewName,e.$uiViewContextAnchor=r.uiViewContextAnchor,a[t]=e}),a}var o=0,R=(a.prototype.load=function(){var t=this,e=x.services.$q,r=new x.ResolveContext(this.path),n=this.path.reduce(function(e,t){return x.extend(e,t.paramValues)},{}),i={template:e.when(this.factory.fromConfig(this.viewDecl,n,r)),controller:e.when(this.getController(r))};return e.all(i).then(function(e){return x.trace.traceViewServiceEvent("Loaded",t),t.controller=e.controller,x.extend(t,e.template),t})},a.prototype.getController=function(e){var t=this.viewDecl.controllerProvider;if(!x.isInjectable(t))return this.viewDecl.controller;var r=x.services.$injector.annotate(t),n=x.isArray(t)?x.tail(t):t;return new x.Resolvable("",n,r).get(e)},a);function a(e,t,r){var n=this;this.path=e,this.viewDecl=t,this.factory=r,this.$id=o++,this.loaded=!1,this.getTemplate=function(e,t){return n.component?n.factory.makeComponentTemplate(e,t,n.component,n.viewDecl.bindings):n.template}}var c=(s.prototype.useHttpService=function(e){this._useHttp=e},s.prototype.fromConfig=function(e,t,r){function n(e){return x.services.$q.when(e).then(function(e){return{template:e}})}function i(e){return x.services.$q.when(e).then(function(e){return{component:e}})}return x.isDefined(e.template)?n(this.fromString(e.template,t)):x.isDefined(e.templateUrl)?n(this.fromUrl(e.templateUrl,t)):x.isDefined(e.templateProvider)?n(this.fromProvider(e.templateProvider,t,r)):x.isDefined(e.component)?i(e.component):x.isDefined(e.componentProvider)?i(this.fromComponentProvider(e.componentProvider,t,r)):n("<ui-view></ui-view>")},s.prototype.fromString=function(e,t){return x.isFunction(e)?e(t):e},s.prototype.fromUrl=function(e,t){return x.isFunction(e)&&(e=e(t)),null==e?null:this._useHttp?this.$http.get(e,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(e){return e.data}):this.$templateRequest(e)},s.prototype.fromProvider=function(e,t,r){var n=x.services.$injector.annotate(e),i=x.isArray(e)?x.tail(e):e;return new x.Resolvable("",i,n).get(r)},s.prototype.fromComponentProvider=function(e,t,r){var n=x.services.$injector.annotate(e),i=x.isArray(e)?x.tail(e):e;return new x.Resolvable("",i,n).get(r)},s.prototype.makeComponentTemplate=function(c,s,e,l){function f(e){var t=x.kebobString(e);return/^(x|data)-/.exec(t)?"x-"+t:t}l=l||{};var v=3<=C.version.minor?"::":"",t=function(e){var t=x.services.$injector.get(e+"Directive");if(!t||!t.length)throw new Error("Unable to find component named '"+e+"'");return t.map(p).reduce(x.unnestR,[])}(e).map(function(e){var t=e.name,r=e.type,n=f(t);if(c.attr(n)&&!l[t])return n+"='"+c.attr(n)+"'";var i=l[t]||t;if("@"===r)return n+"='{{"+v+"$resolve."+i+"}}'";if("&"!==r)return n+"='"+v+"$resolve."+i+"'";var o=s.getResolvable(i),a=o&&o.data,u=a&&x.services.$injector.annotate(a)||[];return n+"='$resolve."+i+(x.isArray(a)?"["+(a.length-1)+"]":"")+"("+u.join(",")+")'"}).join(" "),r=f(e);return"<"+r+" "+t+"></"+r+">"},s);function s(){var n=this;this._useHttp=C.version.minor<3,this.$get=["$http","$templateCache","$injector",function(e,t,r){return n.$templateRequest=r.has&&r.has("$templateRequest")&&r.get("$templateRequest"),n.$http=e,n.$templateCache=t,n}]}var p=function(e){return x.isObject(e.bindToController)?l(e.bindToController):l(e.scope)},l=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(e){return x.isDefined(e)&&x.isArray(e[1])}).map(function(e){return{name:e[1][2]||e[0],type:e[1][1]}})},f=(v.prototype.decorator=function(e,t){return this.stateRegistry.decorator(e,t)||this},v.prototype.state=function(e,t){return x.isObject(e)?t=e:t.name=e,this.stateRegistry.register(t),this},v.prototype.onInvalid=function(e){return this.stateService.onInvalid(e)},v);function v(e,t){this.stateRegistry=e,this.stateService=t,x.createProxyFunctions(x.val(v.prototype),this,x.val(this))}function $(r){return function(e,t){var i=e[r],o="onExit"===r?"from":"to";return i?function(e,t){var r=new x.ResolveContext(e.treeChanges(o)).subContext(t.$$state()),n=x.extend(U(r),{$state$:t,$transition$:e});return x.services.$injector.invoke(i,this,n)}:void 0}}var d=(h.monkeyPatchPathParameterType=function(e){var t=e.urlMatcherFactory.type("path");t.encode=function(e){return null!=e?e.toString().replace(/(~|\/)/g,function(e){return{"~":"~~","/":"~2F"}[e]}):e},t.decode=function(e){return null!=e?e.toString().replace(/(~~|~2F)/g,function(e){return{"~~":"~","~2F":"/"}[e]}):e}},h.prototype.dispose=function(){},h.prototype.onChange=function(e){var t=this;return this._urlListeners.push(e),function(){return x.removeFrom(t._urlListeners)(e)}},h.prototype.html5Mode=function(){var e=this.$locationProvider.html5Mode();return(e=x.isObject(e)?e.enabled:e)&&this.$sniffer.history},h.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},h.prototype.url=function(e,t,r){return void 0===t&&(t=!1),x.isDefined(e)&&this.$location.url(e),t&&this.$location.replace(),r&&this.$location.state(r),this.$location.url()},h.prototype._runtimeServices=function(e,t,r,n,i){var o=this;this.$location=t,this.$sniffer=r,this.$browser=n,this.$window=i,e.$on("$locationChangeSuccess",function(t){return o._urlListeners.forEach(function(e){return e(t)})});var a=x.val(t);x.createProxyFunctions(a,this,a,["replace","path","search","hash"]),x.createProxyFunctions(a,this,a,["port","protocol","host"])},h);function h(e){this._urlListeners=[],this.$locationProvider=e;var t=x.val(e);x.createProxyFunctions(t,this,t,["hashPrefix"])}var m=(g.injectableHandler=function(t,r){return function(e){return x.services.$injector.invoke(r,null,{$match:e,$stateParams:t.globals.params})}},g.prototype.$get=function(){var e=this.router.urlService;return this.router.urlRouter.update(!0),e.interceptDeferred||e.listen(),this.router.urlRouter},g.prototype.rule=function(e){var t=this;if(!x.isFunction(e))throw new Error("'rule' must be a function");var r=new x.BaseUrlRule(function(){return e(x.services.$injector,t.router.locationService)},x.identity);return this.router.urlService.rules.rule(r),this},g.prototype.otherwise=function(e){var t=this,r=this.router.urlService.rules;if(x.isString(e))r.otherwise(e);else{if(!x.isFunction(e))throw new Error("'rule' must be a string or function");r.otherwise(function(){return e(x.services.$injector,t.router.locationService)})}return this},g.prototype.when=function(e,t){return(x.isArray(t)||x.isFunction(t))&&(t=g.injectableHandler(this.router,t)),this.router.urlService.rules.when(e,t),this},g.prototype.deferIntercept=function(e){this.router.urlService.deferIntercept(e)},g);function g(e){this.router=e}C.module("ui.router.angular1",[]);var w=C.module("ui.router.init",["ng"]),y=C.module("ui.router.util",["ui.router.init"]),S=C.module("ui.router.router",["ui.router.util"]),b=C.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),P=C.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),j=(C.module("ui.router.compat",["ui.router"]),null);function A(e){(j=this.router=new x.UIRouter).stateProvider=new f(j.stateRegistry,j.stateService),j.stateRegistry.decorator("views",i),j.stateRegistry.decorator("onExit",$("onExit")),j.stateRegistry.decorator("onRetain",$("onRetain")),j.stateRegistry.decorator("onEnter",$("onEnter")),j.viewService._pluginapi._viewConfigFactory("ng1",n());var u=j.locationService=j.locationConfig=new d(e);function t(e,t,r,n,i,o,a){return u._runtimeServices(i,e,n,t,r),delete j.router,delete j.$get,j}return d.monkeyPatchPathParameterType(j),((j.router=j).$get=t).$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],j}A.$inject=["$locationProvider"];function E(r){return["$uiRouterProvider",function(e){var t=e.router[r];return t.$get=function(){return t},t}]}function V(t,e,r){if(x.services.$injector=t,x.services.$q=e,!t.hasOwnProperty("strictDi"))try{t.invoke(function(e){})}catch(e){t.strictDi=!!/strict mode/.exec(e&&e.toString())}r.stateRegistry.get().map(function(e){return e.$$state().resolvables}).reduce(x.unnestR,[]).filter(function(e){return"deferred"===e.deps}).forEach(function(e){return e.deps=t.annotate(e.resolveFn,t.strictDi)})}V.$inject=["$injector","$q","$uiRouter"];function D(e){e.$watch(function(){x.trace.approximateDigests++})}D.$inject=["$rootScope"],w.provider("$uiRouter",A),S.provider("$urlRouter",["$uiRouterProvider",function(e){return e.urlRouterProvider=new m(e)}]),y.provider("$urlService",E("urlService")),y.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return j.urlMatcherFactory}]),y.provider("$templateFactory",function(){return new c}),b.provider("$stateRegistry",E("stateRegistry")),b.provider("$uiRouterGlobals",E("globals")),b.provider("$transitions",E("transitionService")),b.provider("$state",["$uiRouterProvider",function(){return x.extend(j.stateProvider,{$get:function(){return j.stateService}})}]),b.factory("$stateParams",["$uiRouter",function(e){return e.globals.params}]),P.factory("$view",function(){return j.viewService}),P.service("$trace",function(){return x.trace}),P.run(D),y.run(["$urlMatcherFactory",function(e){}]),b.run(["$state",function(e){}]),S.run(["$urlRouter",function(e){}]),w.run(V);var F,O,q,I,U=function(r){return r.getTokens().filter(x.isString).map(function(e){var t=r.getResolvable(e);return[e,"NOWAIT"===r.getPolicy(t).async?t.promise:t.data]}).reduce(x.applyPairs,{})};function k(e){var t,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e="("+r[1]+")"),!(t=e.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==t.length)throw new Error("Invalid state ref '"+e+"'");return{state:t[1]||null,paramExpr:t[3]||null}}function _(e){var t=e.parent().inheritedData("$uiView"),r=x.parse("$cfg.path")(t);return r?x.tail(r).state.name:void 0}function L(e,t,r){var n=r.uiState||e.current.name,i=x.extend(function(e,t){return{relative:_(e)||t.$current,inherit:!0,source:"sref"}}(t,e),r.uiStateOpts||{}),o=e.href(n,r.uiStateParams,i);return{uiState:n,uiStateParams:r.uiStateParams,uiStateOpts:i,href:o}}function T(e){var t="[object SVGAnimatedString]"===Object.prototype.toString.call(e.prop("href")),r="FORM"===e[0].nodeName;return{attr:r?"action":t?"xlink:href":"href",isAnchor:"A"===e.prop("tagName").toUpperCase(),clickable:!r}}function H(o,a,u,c,s){return function(e){var t=e.which||e.button,r=s();if(!(1<t||e.ctrlKey||e.metaKey||e.shiftKey||o.attr("target"))){var n=u(function(){o.attr("disabled")||a.go(r.uiState,r.uiStateParams,r.uiStateOpts)});e.preventDefault();var i=c.isAnchor&&!r.href?1:0;e.preventDefault=function(){i--<=0&&u.cancel(n)}}}}function M(i,e,o,t){var a;t&&(a=t.events),x.isArray(a)||(a=["click"]);for(var r=i.on?"on":"bind",n=0,u=a;n<u.length;n++){var c=u[n];i[r](c,o)}e.$on("$destroy",function(){for(var e=i.off?"off":"unbind",t=0,r=a;t<r.length;t++){var n=r[t];i[e](n,o)}})}function N(n){function e(e,t,r){return n.is(e,t,r)}return e.$stateful=!0,e}function B(n){function e(e,t,r){return n.includes(e,t,r)}return e.$stateful=!0,e}function K(d,h,m,e,g,t){var w=x.parse("viewDecl.controllerAs"),y=x.parse("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(e){var $=e.html();return e.empty(),function(t,r){var e=r.data("$uiView");if(!e)return r.html($),void d(r.contents())(t);var n=e.$cfg||{viewDecl:{},getTemplate:x.noop},i=n.path&&new x.ResolveContext(n.path);r.html(n.getTemplate(r,i)||$),x.trace.traceUIViewFill(e.$uiView,r.html());var o=d(r.contents()),a=n.controller,u=w(n),c=y(n),s=i&&U(i);if(t[c]=s,a){var l=h(a,x.extend({},s,{$scope:t,$element:r}));u&&(t[u]=l,t[u][c]=s),r.data("$ngControllerController",l),r.children().data("$ngControllerController",l),W(g,m,l,t,n)}if(x.isString(n.component))var f=x.kebobString(n.component),v=new RegExp("^(x-|data-)?"+f+"$","i"),p=t.$watch(function(){var e=[].slice.call(r[0].children).filter(function(e){return e&&e.tagName&&v.exec(e.tagName)});return e&&C.element(e).data("$"+n.component+"Controller")},function(e){e&&(W(g,m,e,t,n),p())});o(t)}}}}F=["$uiRouter","$timeout",function(v,p){var $=v.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(e,t,r,n){function i(){return L($,t,s)}var o,a=T(t),u=n[1]||n[0],c=null,s={},l=k(r.uiSref);function f(){var e=i();c&&c(),u&&(c=u.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&r.$set(a.attr,e.href)}s.uiState=l.state,s.uiStateOpts=r.uiSrefOpts?e.$eval(r.uiSrefOpts):{},l.paramExpr&&(e.$watch(l.paramExpr,function(e){s.uiStateParams=x.extend({},e),f()},!0),s.uiStateParams=x.extend({},e.$eval(l.paramExpr))),f(),e.$on("$destroy",v.stateRegistry.onStatesChanged(f)),e.$on("$destroy",v.transitionService.onSuccess({},f)),a.clickable&&(o=H(t,$,p,a,i),M(t,e,o,s.uiStateOpts))}}}],O=["$uiRouter","$timeout",function(p,$){var d=p.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,e,n,t){function i(){return L(d,e,s)}var o,a=T(e),u=t[1]||t[0],c=null,s={},l=["uiState","uiStateParams","uiStateOpts"],f=l.reduce(function(e,t){return e[t]=x.noop,e},{});function v(){var e=i();c&&c(),u&&(c=u.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&n.$set(a.attr,e.href)}l.forEach(function(t){s[t]=n[t]?r.$eval(n[t]):null,n.$observe(t,function(e){f[t](),f[t]=r.$watch(e,function(e){s[t]=e,v()},!0)})}),v(),r.$on("$destroy",p.stateRegistry.onStatesChanged(v)),r.$on("$destroy",p.transitionService.onSuccess({},v)),a.clickable&&(o=H(e,d,$,a,i),M(e,r,o,s.uiStateOpts))}}}],q=["$state","$stateParams","$interpolate","$uiRouter",function($,e,d,h){return{restrict:"A",controller:["$scope","$element","$attrs",function(u,c,e){var s,n,t,r,i,l=[];s=d(e.uiSrefActiveEq||"",!1)(u);try{n=u.$eval(e.uiSrefActive)}catch(e){}function o(e){e.promise.then(p,x.noop)}function a(){f(n)}function f(e){x.isObject(e)&&(l=[],x.forEach(e,function(e,t){function r(e,t){var r=k(e);v(r.state,u.$eval(r.paramExpr),t)}x.isString(e)?r(e,t):x.isArray(e)&&x.forEach(e,function(e){r(e,t)})}))}function v(e,t,r){var n={state:$.get(e,_(c))||{name:e},params:t,activeClass:r};return l.push(n),function(){x.removeFrom(l)(n)}}function p(){function t(e){return e.split(/\s/).filter(x.identity)}function e(e){return e.map(function(e){return e.activeClass}).map(t).reduce(x.unnestR,[])}var r=e(l).concat(t(s)).reduce(x.uniqR,[]),n=e(l.filter(function(e){return $.includes(e.state.name,e.params)})),i=!!l.filter(function(e){return $.is(e.state.name,e.params)}).length?t(s):[],o=n.concat(i).reduce(x.uniqR,[]),a=r.filter(function(e){return!x.inArray(o,e)});u.$evalAsync(function(){o.forEach(function(e){return c.addClass(e)}),a.forEach(function(e){return c.removeClass(e)})})}f(n=n||d(e.uiSrefActive||"",!1)(u)),this.$$addStateInfo=function(e,t){if(!(x.isObject(n)&&0<l.length)){var r=v(e,t,n);return p(),r}},u.$on("$destroy",(t=h.stateRegistry.onStatesChanged(a),r=h.transitionService.onStart({},o),i=u.$on("$stateChangeSuccess",p),function(){t(),r(),i()})),h.globals.transition&&o(h.globals.transition),p()}]}}],C.module("ui.router.state").directive("uiSref",F).directive("uiSrefActive",q).directive("uiSrefActiveEq",q).directive("uiState",O),N.$inject=["$state"],B.$inject=["$state"],C.module("ui.router.state").filter("isState",N).filter("includedByState",B),I=["$view","$animate","$uiViewScroll","$interpolate","$q",function(i,o,g,w,y){var S={$cfg:{viewDecl:{$context:i._pluginapi._rootViewContext()}},$uiView:{}},b={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,t,m){return function(a,u,e){var c,s,l,f,t,v=e.onload||"",p=e.autoscroll,$={enter:function(e,t,r){2<C.version.minor?o.enter(e,null,t).then(r):o.enter(e,null,t,r)},leave:function(e,t){2<C.version.minor?o.leave(e).then(t):o.leave(e,t)}},r=u.inheritedData("$uiView")||S,d=w(e.uiView||e.name||"")(a)||"$default",h={$type:"ng1",id:b.count++,name:d,fqn:r.$uiView.fqn?r.$uiView.fqn+"."+d:d,config:null,configUpdated:function(e){if(e&&!(e instanceof R))return;if(function(e,t){return e===t}(f,e))return;x.trace.traceUIViewConfigUpdated(h,e&&e.viewDecl&&e.viewDecl.$context),n(f=e)},get creationContext(){var e=x.parse("$cfg.viewDecl.$context")(r),t=x.parse("$uiView.creationContext")(r);return e||t}};function n(e){var t=a.$new(),r=y.defer(),n=y.defer(),i={$cfg:e,$uiView:h},o={$animEnter:r.promise,$animLeave:n.promise,$$animLeave:n};t.$emit("$viewContentLoading",d),s=m(t,function(e){e.data("$uiViewAnim",o),e.data("$uiView",i),$.enter(e,u,function(){r.resolve(),l&&l.$emit("$viewContentAnimationEnded"),(x.isDefined(p)&&!p||a.$eval(p))&&g(e)}),function(){if(c&&(x.trace.traceUIViewEvent("Removing (previous) el",c.data("$uiView")),c.remove(),c=null),l&&(x.trace.traceUIViewEvent("Destroying scope",h),l.$destroy(),l=null),s){var e=s.data("$uiViewAnim");x.trace.traceUIViewEvent("Animate out",e),$.leave(s,function(){e.$$animLeave.resolve(),c=null}),c=s,s=null}}()}),(l=t).$emit("$viewContentLoaded",e||f),l.$eval(v)}x.trace.traceUIViewEvent("Linking",h),u.data("$uiView",{$uiView:h}),n(),t=i.registerUIView(h),a.$on("$destroy",function(){x.trace.traceUIViewEvent("Destroying/Unregistering",h),t()})}}};return b}],K.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var G="function"==typeof C.module("ui.router").component,z=0;function W(n,e,s,t,r){!x.isFunction(s.$onInit)||(r.viewDecl.component||r.viewDecl.componentProvider)&&G||s.$onInit();var l=x.tail(r.path).state.self,i={bind:s};if(x.isFunction(s.uiOnParamsChanged)){var f=new x.ResolveContext(r.path).getResolvable("$transition$").data;t.$on("$destroy",e.onSuccess({},function(e){if(e!==f&&-1===e.exiting().indexOf(l)){var r=e.params("to"),n=e.params("from"),t=function(e){return e.paramSchema},i=e.treeChanges("to").map(t).reduce(x.unnestR,[]),o=e.treeChanges("from").map(t).reduce(x.unnestR,[]),a=i.filter(function(e){var t=o.indexOf(e);return-1===t||!o[t].type.equals(r[e.id],n[e.id])});if(a.length){var u=a.map(function(e){return e.id}),c=x.filter(r,function(e,t){return-1!==u.indexOf(t)});s.uiOnParamsChanged(c,e)}}},i))}if(x.isFunction(s.uiCanExit)){var o=z++,a="_uiCanExitIds",u=function(e){return!!e&&(e[a]&&!0===e[a][o]||u(e.redirectedFrom()))},c={exiting:l.name};t.$on("$destroy",e.onBefore(c,function(e){var t,r=e[a]=e[a]||{};return u(e)||(t=n.when(s.uiCanExit(e))).then(function(e){return r[o]=!1!==e}),t},i))}}C.module("ui.router.state").directive("uiView",I),C.module("ui.router.state").directive("uiView",K),C.module("ui.router.state").provider("$uiViewScroll",function(){var r=!1;this.useAnchorScroll=function(){r=!0},this.$get=["$anchorScroll","$timeout",function(e,t){return r?e:function(e){return t(function(){e[0].scrollIntoView()},0,!1)}}]});Object.keys(x).forEach(function(e){Object.defineProperty(t,e,{enumerable:!0,get:function(){return x[e]}})}),t.core=x,t.Ng1ViewConfig=R,t.StateProvider=f,t.UrlRouterProvider=m,t.default="ui.router",t.getLocals=U,t.getNg1ViewConfigFactory=n,t.ng1ViewsBuilder=i,t.watchDigests=D,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
| !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular"),require("@uirouter/core")):"function"==typeof define&&define.amd?define(["exports","angular","@uirouter/core"],t):t((e=e||self)["@uirouter/angularjs"]={},e.angular,e["@uirouter/core"])}(this,function(t,e,x){"use strict";var r=angular,C=e&&e.module?e:r;function n(){var r=null;return function(e,t){return r=r||x.services.$injector.get("$templateFactory"),[new R(e,t,r)]}}var u=function(e,r){return e.reduce(function(e,t){return e||x.isDefined(r[t])},!1)};function i(n){if(!n.parent)return{};var i=["component","bindings","componentProvider"],o=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),e=i.concat(o);if(x.isDefined(n.views)&&u(e,n))throw new Error("State '"+n.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level. Move the following properties into a view (in the 'views' object): "+e.filter(function(e){return x.isDefined(n[e])}).join(", "));var a={},t=n.views||{$default:x.pick(n,e)};return x.forEach(t,function(e,t){if(t=t||"$default",x.isString(e)&&(e={component:e}),e=x.extend({},e),u(i,e)&&u(o,e))throw new Error("Cannot combine: "+i.join("|")+" with: "+o.join("|")+" in stateview: '"+t+"@"+n.name+"'");e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=n,e.$name=t;var r=x.ViewService.normalizeUIViewTarget(e.$context,e.$name);e.$uiViewName=r.uiViewName,e.$uiViewContextAnchor=r.uiViewContextAnchor,a[t]=e}),a}var o=0,R=(a.prototype.load=function(){var t=this,e=x.services.$q,r=new x.ResolveContext(this.path),n=this.path.reduce(function(e,t){return x.extend(e,t.paramValues)},{}),i={template:e.when(this.factory.fromConfig(this.viewDecl,n,r)),controller:e.when(this.getController(r))};return e.all(i).then(function(e){return x.trace.traceViewServiceEvent("Loaded",t),t.controller=e.controller,x.extend(t,e.template),t})},a.prototype.getController=function(e){var t=this.viewDecl.controllerProvider;if(!x.isInjectable(t))return this.viewDecl.controller;var r=x.services.$injector.annotate(t),n=x.isArray(t)?x.tail(t):t;return new x.Resolvable("",n,r).get(e)},a);function a(e,t,r){var n=this;this.path=e,this.viewDecl=t,this.factory=r,this.$id=o++,this.loaded=!1,this.getTemplate=function(e,t){return n.component?n.factory.makeComponentTemplate(e,t,n.component,n.viewDecl.bindings):n.template}}var c=(s.prototype.useHttpService=function(e){this._useHttp=e},s.prototype.fromConfig=function(e,t,r){function n(e){return x.services.$q.when(e).then(function(e){return{template:e}})}function i(e){return x.services.$q.when(e).then(function(e){return{component:e}})}return x.isDefined(e.template)?n(this.fromString(e.template,t)):x.isDefined(e.templateUrl)?n(this.fromUrl(e.templateUrl,t)):x.isDefined(e.templateProvider)?n(this.fromProvider(e.templateProvider,t,r)):x.isDefined(e.component)?i(e.component):x.isDefined(e.componentProvider)?i(this.fromComponentProvider(e.componentProvider,t,r)):n("<ui-view></ui-view>")},s.prototype.fromString=function(e,t){return x.isFunction(e)?e(t):e},s.prototype.fromUrl=function(e,t){return x.isFunction(e)&&(e=e(t)),null==e?null:this._useHttp?this.$http.get(e,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(e){return e.data}):this.$templateRequest(e)},s.prototype.fromProvider=function(e,t,r){var n=x.services.$injector.annotate(e),i=x.isArray(e)?x.tail(e):e;return new x.Resolvable("",i,n).get(r)},s.prototype.fromComponentProvider=function(e,t,r){var n=x.services.$injector.annotate(e),i=x.isArray(e)?x.tail(e):e;return new x.Resolvable("",i,n).get(r)},s.prototype.makeComponentTemplate=function(c,s,e,l){function f(e){var t=x.kebobString(e);return/^(x|data)-/.exec(t)?"x-"+t:t}l=l||{};var v=3<=C.version.minor?"::":"",t=function(e){var t=x.services.$injector.get(e+"Directive");if(!t||!t.length)throw new Error("Unable to find component named '"+e+"'");return t.map(p).reduce(x.unnestR,[])}(e).map(function(e){var t=e.name,r=e.type,n=f(t);if(c.attr(n)&&!l[t])return n+"='"+c.attr(n)+"'";var i=l[t]||t;if("@"===r)return n+"='{{"+v+"$resolve."+i+"}}'";if("&"!==r)return n+"='"+v+"$resolve."+i+"'";var o=s.getResolvable(i),a=o&&o.data,u=a&&x.services.$injector.annotate(a)||[];return n+"='$resolve."+i+(x.isArray(a)?"["+(a.length-1)+"]":"")+"("+u.join(",")+")'"}).join(" "),r=f(e);return"<"+r+" "+t+"></"+r+">"},s);function s(){var n=this;this._useHttp=C.version.minor<3,this.$get=["$http","$templateCache","$injector",function(e,t,r){return n.$templateRequest=r.has&&r.has("$templateRequest")&&r.get("$templateRequest"),n.$http=e,n.$templateCache=t,n}]}var p=function(e){return x.isObject(e.bindToController)?l(e.bindToController):l(e.scope)},l=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(e){return x.isDefined(e)&&x.isArray(e[1])}).map(function(e){return{name:e[1][2]||e[0],type:e[1][1]}})},f=(v.prototype.decorator=function(e,t){return this.stateRegistry.decorator(e,t)||this},v.prototype.state=function(e,t){return x.isObject(e)?t=e:t.name=e,this.stateRegistry.register(t),this},v.prototype.onInvalid=function(e){return this.stateService.onInvalid(e)},v);function v(e,t){this.stateRegistry=e,this.stateService=t,x.createProxyFunctions(x.val(v.prototype),this,x.val(this))}function $(r){return function(e,t){var i=e[r],o="onExit"===r?"from":"to";return i?function(e,t){var r=new x.ResolveContext(e.treeChanges(o)).subContext(t.$$state()),n=x.extend(U(r),{$state$:t,$transition$:e});return x.services.$injector.invoke(i,this,n)}:void 0}}var d=(h.monkeyPatchPathParameterType=function(e){var t=e.urlMatcherFactory.type("path");t.encode=function(e){return null!=e?e.toString().replace(/(~|\/)/g,function(e){return{"~":"~~","/":"~2F"}[e]}):e},t.decode=function(e){return null!=e?e.toString().replace(/(~~|~2F)/g,function(e){return{"~~":"~","~2F":"/"}[e]}):e}},h.prototype.dispose=function(){},h.prototype.onChange=function(e){var t=this;return this._urlListeners.push(e),function(){return x.removeFrom(t._urlListeners)(e)}},h.prototype.html5Mode=function(){var e=this.$locationProvider.html5Mode();return(e=x.isObject(e)?e.enabled:e)&&this.$sniffer.history},h.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},h.prototype.url=function(e,t,r){return void 0===t&&(t=!1),x.isDefined(e)&&this.$location.url(e),t&&this.$location.replace(),r&&this.$location.state(r),this.$location.url()},h.prototype._runtimeServices=function(e,t,r,n,i){var o=this;this.$location=t,this.$sniffer=r,this.$browser=n,this.$window=i,e.$on("$locationChangeSuccess",function(t){return o._urlListeners.forEach(function(e){return e(t)})});var a=x.val(t);x.createProxyFunctions(a,this,a,["replace","path","search","hash"]),x.createProxyFunctions(a,this,a,["port","protocol","host"])},h);function h(e){this._urlListeners=[],this.$locationProvider=e;var t=x.val(e);x.createProxyFunctions(t,this,t,["hashPrefix"])}var m=(g.injectableHandler=function(t,r){return function(e){return x.services.$injector.invoke(r,null,{$match:e,$stateParams:t.globals.params})}},g.prototype.$get=function(){var e=this.router.urlService;return this.router.urlRouter.update(!0),e.interceptDeferred||e.listen(),this.router.urlRouter},g.prototype.rule=function(e){var t=this;if(!x.isFunction(e))throw new Error("'rule' must be a function");var r=new x.BaseUrlRule(function(){return e(x.services.$injector,t.router.locationService)},x.identity);return this.router.urlService.rules.rule(r),this},g.prototype.otherwise=function(e){var t=this,r=this.router.urlService.rules;if(x.isString(e))r.otherwise(e);else{if(!x.isFunction(e))throw new Error("'rule' must be a string or function");r.otherwise(function(){return e(x.services.$injector,t.router.locationService)})}return this},g.prototype.when=function(e,t){return(x.isArray(t)||x.isFunction(t))&&(t=g.injectableHandler(this.router,t)),this.router.urlService.rules.when(e,t),this},g.prototype.deferIntercept=function(e){this.router.urlService.deferIntercept(e)},g);function g(e){this.router=e}C.module("ui.router.angular1",[]);var w=C.module("ui.router.init",["ng"]),y=C.module("ui.router.util",["ui.router.init"]),S=C.module("ui.router.router",["ui.router.util"]),b=C.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),P=C.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),j=(C.module("ui.router.compat",["ui.router"]),null);function A(e){(j=this.router=new x.UIRouter).stateProvider=new f(j.stateRegistry,j.stateService),j.stateRegistry.decorator("views",i),j.stateRegistry.decorator("onExit",$("onExit")),j.stateRegistry.decorator("onRetain",$("onRetain")),j.stateRegistry.decorator("onEnter",$("onEnter")),j.viewService._pluginapi._viewConfigFactory("ng1",n());var u=j.locationService=j.locationConfig=new d(e);function t(e,t,r,n,i,o,a){return u._runtimeServices(i,e,n,t,r),delete j.router,delete j.$get,j}return d.monkeyPatchPathParameterType(j),((j.router=j).$get=t).$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],j}A.$inject=["$locationProvider"];function E(r){return["$uiRouterProvider",function(e){var t=e.router[r];return t.$get=function(){return t},t}]}function V(t,e,r){if(x.services.$injector=t,x.services.$q=e,!t.hasOwnProperty("strictDi"))try{t.invoke(function(e){})}catch(e){t.strictDi=!!/strict mode/.exec(e&&e.toString())}r.stateRegistry.get().map(function(e){return e.$$state().resolvables}).reduce(x.unnestR,[]).filter(function(e){return"deferred"===e.deps}).forEach(function(e){return e.deps=t.annotate(e.resolveFn,t.strictDi)})}V.$inject=["$injector","$q","$uiRouter"];function D(e){e.$watch(function(){x.trace.approximateDigests++})}D.$inject=["$rootScope"],w.provider("$uiRouter",A),S.provider("$urlRouter",["$uiRouterProvider",function(e){return e.urlRouterProvider=new m(e)}]),y.provider("$urlService",E("urlService")),y.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return j.urlMatcherFactory}]),y.provider("$templateFactory",function(){return new c}),b.provider("$stateRegistry",E("stateRegistry")),b.provider("$uiRouterGlobals",E("globals")),b.provider("$transitions",E("transitionService")),b.provider("$state",["$uiRouterProvider",function(){return x.extend(j.stateProvider,{$get:function(){return j.stateService}})}]),b.factory("$stateParams",["$uiRouter",function(e){return e.globals.params}]),P.factory("$view",function(){return j.viewService}),P.service("$trace",function(){return x.trace}),P.run(D),y.run(["$urlMatcherFactory",function(e){}]),b.run(["$state",function(e){}]),S.run(["$urlRouter",function(e){}]),w.run(V);var F,O,q,I,U=function(r){return r.getTokens().filter(x.isString).map(function(e){var t=r.getResolvable(e);return[e,"NOWAIT"===r.getPolicy(t).async?t.promise:t.data]}).reduce(x.applyPairs,{})};function k(e){var t,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e="("+r[1]+")"),!(t=e.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==t.length)throw new Error("Invalid state ref '"+e+"'");return{state:t[1]||null,paramExpr:t[3]||null}}function _(e){var t=e.parent().inheritedData("$uiView"),r=x.parse("$cfg.path")(t);return r?x.tail(r).state.name:void 0}function L(e,t,r){var n=r.uiState||e.current.name,i=x.extend(function(e,t){return{relative:_(e)||t.$current,inherit:!0,source:"sref"}}(t,e),r.uiStateOpts||{}),o=e.href(n,r.uiStateParams,i);return{uiState:n,uiStateParams:r.uiStateParams,uiStateOpts:i,href:o}}function T(e){var t="[object SVGAnimatedString]"===Object.prototype.toString.call(e.prop("href")),r="FORM"===e[0].nodeName;return{attr:r?"action":t?"xlink:href":"href",isAnchor:"A"===e.prop("tagName").toUpperCase(),clickable:!r}}function H(o,a,u,c,s){return function(e){var t=e.which||e.button,r=s();if(!(1<t||e.ctrlKey||e.metaKey||e.shiftKey||o.attr("target"))){var n=u(function(){o.attr("disabled")||a.go(r.uiState,r.uiStateParams,r.uiStateOpts)});e.preventDefault();var i=c.isAnchor&&!r.href?1:0;e.preventDefault=function(){i--<=0&&u.cancel(n)}}}}function M(i,e,o,t){var a;t&&(a=t.events),x.isArray(a)||(a=["click"]);for(var r=i.on?"on":"bind",n=0,u=a;n<u.length;n++){var c=u[n];i[r](c,o)}e.$on("$destroy",function(){for(var e=i.off?"off":"unbind",t=0,r=a;t<r.length;t++){var n=r[t];i[e](n,o)}})}function N(n){function e(e,t,r){return n.is(e,t,r)}return e.$stateful=!0,e}function B(n){function e(e,t,r){return n.includes(e,t,r)}return e.$stateful=!0,e}function K(d,h,m,e,g,t){var w=x.parse("viewDecl.controllerAs"),y=x.parse("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(e){var $=e.html();return e.empty(),function(t,r){var e=r.data("$uiView");if(!e)return r.html($),void d(r.contents())(t);var n=e.$cfg||{viewDecl:{},getTemplate:x.noop},i=n.path&&new x.ResolveContext(n.path);r.html(n.getTemplate(r,i)||$),x.trace.traceUIViewFill(e.$uiView,r.html());var o=d(r.contents()),a=n.controller,u=w(n),c=y(n),s=i&&U(i);if(t[c]=s,a){var l=h(a,x.extend({},s,{$scope:t,$element:r}));u&&(t[u]=l,t[u][c]=s),r.data("$ngControllerController",l),r.children().data("$ngControllerController",l),W(g,m,l,t,n)}if(x.isString(n.component))var f=x.kebobString(n.component),v=new RegExp("^(x-|data-)?"+f+"$","i"),p=t.$watch(function(){var e=[].slice.call(r[0].children).filter(function(e){return e&&e.tagName&&v.exec(e.tagName)});return e&&C.element(e).data("$"+n.component+"Controller")},function(e){e&&(W(g,m,e,t,n),p())});o(t)}}}}F=["$uiRouter","$timeout",function(v,p){var $=v.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(e,t,r,n){function i(){return L($,t,s)}var o,a=T(t),u=n[1]||n[0],c=null,s={},l=k(r.uiSref);function f(){var e=i();c&&c(),u&&(c=u.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&r.$set(a.attr,e.href)}s.uiState=l.state,s.uiStateOpts=r.uiSrefOpts?e.$eval(r.uiSrefOpts):{},l.paramExpr&&(e.$watch(l.paramExpr,function(e){s.uiStateParams=x.extend({},e),f()},!0),s.uiStateParams=x.extend({},e.$eval(l.paramExpr))),f(),e.$on("$destroy",v.stateRegistry.onStatesChanged(f)),e.$on("$destroy",v.transitionService.onSuccess({},f)),a.clickable&&(o=H(t,$,p,a,i),M(t,e,o,s.uiStateOpts))}}}],O=["$uiRouter","$timeout",function(p,$){var d=p.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,e,n,t){function i(){return L(d,e,s)}var o,a=T(e),u=t[1]||t[0],c=null,s={},l=["uiState","uiStateParams","uiStateOpts"],f=l.reduce(function(e,t){return e[t]=x.noop,e},{});function v(){var e=i();c&&c(),u&&(c=u.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&n.$set(a.attr,e.href)}l.forEach(function(t){s[t]=n[t]?r.$eval(n[t]):null,n.$observe(t,function(e){f[t](),f[t]=r.$watch(e,function(e){s[t]=e,v()},!0)})}),v(),r.$on("$destroy",p.stateRegistry.onStatesChanged(v)),r.$on("$destroy",p.transitionService.onSuccess({},v)),a.clickable&&(o=H(e,d,$,a,i),M(e,r,o,s.uiStateOpts))}}}],q=["$state","$stateParams","$interpolate","$uiRouter",function($,e,d,h){return{restrict:"A",controller:["$scope","$element","$attrs",function(u,c,e){var s,n,t,r,i,l=[];s=d(e.uiSrefActiveEq||"",!1)(u);try{n=u.$eval(e.uiSrefActive)}catch(e){}function o(e){e.promise.then(p,x.noop)}function a(){f(n)}function f(e){x.isObject(e)&&(l=[],x.forEach(e,function(e,t){function r(e,t){var r=k(e);v(r.state,u.$eval(r.paramExpr),t)}x.isString(e)?r(e,t):x.isArray(e)&&x.forEach(e,function(e){r(e,t)})}))}function v(e,t,r){var n={state:$.get(e,_(c))||{name:e},params:t,activeClass:r};return l.push(n),function(){x.removeFrom(l)(n)}}function p(){function t(e){return e.split(/\s/).filter(x.identity)}function e(e){return e.map(function(e){return e.activeClass}).map(t).reduce(x.unnestR,[])}var r=e(l).concat(t(s)).reduce(x.uniqR,[]),n=e(l.filter(function(e){return $.includes(e.state.name,e.params)})),i=!!l.filter(function(e){return $.is(e.state.name,e.params)}).length?t(s):[],o=n.concat(i).reduce(x.uniqR,[]),a=r.filter(function(e){return!x.inArray(o,e)});u.$evalAsync(function(){o.forEach(function(e){return c.addClass(e)}),a.forEach(function(e){return c.removeClass(e)})})}f(n=n||d(e.uiSrefActive||"",!1)(u)),this.$$addStateInfo=function(e,t){if(!(x.isObject(n)&&0<l.length)){var r=v(e,t,n);return p(),r}},u.$on("$destroy",(t=h.stateRegistry.onStatesChanged(a),r=h.transitionService.onStart({},o),i=u.$on("$stateChangeSuccess",p),function(){t(),r(),i()})),h.globals.transition&&o(h.globals.transition),p()}]}}],C.module("ui.router.state").directive("uiSref",F).directive("uiSrefActive",q).directive("uiSrefActiveEq",q).directive("uiState",O),N.$inject=["$state"],B.$inject=["$state"],C.module("ui.router.state").filter("isState",N).filter("includedByState",B),I=["$view","$animate","$uiViewScroll","$interpolate","$q",function(i,o,g,w,y){var S={$cfg:{viewDecl:{$context:i._pluginapi._rootViewContext()}},$uiView:{}},b={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,t,m){return function(a,u,e){var c,s,l,f,t,v=e.onload||"",p=e.autoscroll,$={enter:function(e,t,r){2<C.version.minor?o.enter(e,null,t).then(r):o.enter(e,null,t,r)},leave:function(e,t){2<C.version.minor?o.leave(e).then(t):o.leave(e,t)}},r=u.inheritedData("$uiView")||S,d=w(e.uiView||e.name||"")(a)||"$default",h={$type:"ng1",id:b.count++,name:d,fqn:r.$uiView.fqn?r.$uiView.fqn+"."+d:d,config:null,configUpdated:function(e){if(e&&!(e instanceof R))return;if(function(e,t){return e===t}(f,e))return;x.trace.traceUIViewConfigUpdated(h,e&&e.viewDecl&&e.viewDecl.$context),n(f=e)},get creationContext(){var e=x.parse("$cfg.viewDecl.$context")(r),t=x.parse("$uiView.creationContext")(r);return e||t}};function n(e){var t=a.$new(),r=y.defer(),n=y.defer(),i={$cfg:e,$uiView:h},o={$animEnter:r.promise,$animLeave:n.promise,$$animLeave:n};t.$emit("$viewContentLoading",d),s=m(t,function(e){e.data("$uiViewAnim",o),e.data("$uiView",i),$.enter(e,u,function(){r.resolve(),l&&l.$emit("$viewContentAnimationEnded"),(x.isDefined(p)&&!p||a.$eval(p))&&g(e)}),function(){if(c&&(x.trace.traceUIViewEvent("Removing (previous) el",c.data("$uiView")),c.remove(),c=null),l&&(x.trace.traceUIViewEvent("Destroying scope",h),l.$destroy(),l=null),s){var e=s.data("$uiViewAnim");x.trace.traceUIViewEvent("Animate out",e),$.leave(s,function(){e.$$animLeave.resolve(),c=null}),c=s,s=null}}()}),(l=t).$emit("$viewContentLoaded",e||f),l.$eval(v)}x.trace.traceUIViewEvent("Linking",h),u.data("$uiView",{$uiView:h}),n(),t=i.registerUIView(h),a.$on("$destroy",function(){x.trace.traceUIViewEvent("Destroying/Unregistering",h),t()})}}};return b}],K.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var G="function"==typeof C.module("ui.router").component,z=0;function W(n,e,s,t,r){!x.isFunction(s.$onInit)||(r.viewDecl.component||r.viewDecl.componentProvider)&&G||s.$onInit();var l=x.tail(r.path).state.self,i={bind:s};if(x.isFunction(s.uiOnParamsChanged)){var f=new x.ResolveContext(r.path).getResolvable("$transition$").data;t.$on("$destroy",e.onSuccess({},function(e){if(e!==f&&-1===e.exiting().indexOf(l)){var r=e.params("to"),n=e.params("from"),t=function(e){return e.paramSchema},i=e.treeChanges("to").map(t).reduce(x.unnestR,[]),o=e.treeChanges("from").map(t).reduce(x.unnestR,[]),a=i.filter(function(e){var t=o.indexOf(e);return-1===t||!o[t].type.equals(r[e.id],n[e.id])});if(a.length){var u=a.map(function(e){return e.id}),c=x.filter(r,function(e,t){return-1!==u.indexOf(t)});s.uiOnParamsChanged(c,e)}}},i))}if(x.isFunction(s.uiCanExit)){var o=z++,a="_uiCanExitIds",u=function(e){return!!e&&(e[a]&&!0===e[a][o]||u(e.redirectedFrom()))},c={exiting:l.name};t.$on("$destroy",e.onBefore(c,function(e){var t,r=e[a]=e[a]||{};return u(e)||(t=n.when(s.uiCanExit(e))).then(function(e){return r[o]=!1!==e}),t},i))}}C.module("ui.router.state").directive("uiView",I),C.module("ui.router.state").directive("uiView",K),C.module("ui.router.state").provider("$uiViewScroll",function(){var r=!1;this.useAnchorScroll=function(){r=!0},this.$get=["$anchorScroll","$timeout",function(e,t){return r?e:function(e){return t(function(){e[0].scrollIntoView()},0,!1)}}]});Object.keys(x).forEach(function(e){"default"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return x[e]}})}),t.core=x,t.Ng1ViewConfig=R,t.StateProvider=f,t.UrlRouterProvider=m,t.default="ui.router",t.getLocals=U,t.getNg1ViewConfigFactory=n,t.ng1ViewsBuilder=i,t.watchDigests=D,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
| //# sourceMappingURL=ui-router-angularjs.min.js.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
3665531
6.25%130
0.78%22156
-0.46%57
-3.39%+ Added
- Removed
Updated