@angular-wave/angular.ts 0.7.0-beta.0 → 0.7.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/pre-commit +2 -0
- package/@types/animations/animate-children-directive.d.ts +4 -2
- package/@types/animations/animate-swap.d.ts +2 -2
- package/@types/animations/animate.d.ts +1 -1
- package/@types/animations/interface.d.ts +17 -0
- package/@types/animations/raf-scheduler.d.ts +29 -16
- package/@types/core/compile/attributes.d.ts +1 -1
- package/@types/core/compile/compile.d.ts +22 -15
- package/@types/core/controller/controller.d.ts +1 -1
- package/@types/core/di/internal-injector.d.ts +10 -6
- package/@types/core/di/ng-module.d.ts +3 -3
- package/@types/core/error-handler.d.ts +7 -0
- package/@types/core/exception-handler.d.ts +5 -10
- package/@types/core/filter/filter.d.ts +20 -4
- package/@types/core/interpolate/interpolate.d.ts +3 -3
- package/@types/core/location/location.d.ts +1 -1
- package/@types/core/parse/interface.d.ts +79 -0
- package/@types/core/parse/interpreter.d.ts +19 -8
- package/@types/core/parse/parse.d.ts +2 -94
- package/@types/core/parse/parser/parser.d.ts +2 -2
- package/@types/core/sanitize/interface.d.ts +10 -0
- package/@types/core/sanitize/sanitize-uri.d.ts +31 -44
- package/@types/core/sce/sce.d.ts +109 -32
- package/@types/core/scope/scope.d.ts +3 -3
- package/@types/directive/bind/bind.d.ts +6 -6
- package/@types/directive/channel/channel.d.ts +2 -2
- package/@types/directive/class/class.d.ts +3 -3
- package/@types/directive/cloak/cloak.d.ts +2 -2
- package/@types/directive/controller/controller.d.ts +2 -2
- package/@types/directive/events/events.d.ts +4 -4
- package/@types/directive/form/form.d.ts +1 -1
- package/@types/directive/if/if.d.ts +2 -2
- package/@types/directive/include/include.d.ts +2 -2
- package/@types/directive/init/init.d.ts +2 -2
- package/@types/directive/input/input.d.ts +4 -4
- package/@types/directive/model/model.d.ts +10 -10
- package/@types/directive/model-options/model-options.d.ts +1 -1
- package/@types/directive/non-bindable/non-bindable.d.ts +2 -2
- package/@types/directive/observe/observe.d.ts +2 -2
- package/@types/directive/options/options.d.ts +1 -1
- package/@types/directive/repeat/repeat.d.ts +2 -2
- package/@types/directive/script/script.d.ts +2 -2
- package/@types/directive/select/select.d.ts +2 -2
- package/@types/directive/setter/setter.d.ts +6 -3
- package/@types/directive/show-hide/show-hide.d.ts +4 -4
- package/@types/directive/style/style.d.ts +2 -2
- package/@types/directive/switch/switch.d.ts +6 -6
- package/@types/directive/transclude/transclude.d.ts +3 -1
- package/@types/directive/validators/validators.d.ts +14 -14
- package/@types/filters/filter.d.ts +2 -7
- package/@types/filters/filters.d.ts +2 -2
- package/@types/filters/limit-to.d.ts +2 -6
- package/@types/filters/order-by.d.ts +4 -3
- package/@types/interface.d.ts +302 -0
- package/@types/loader.d.ts +15 -18
- package/@types/public.d.ts +6 -7
- package/@types/router/common/glob.d.ts +25 -8
- package/@types/router/common/queue.d.ts +62 -13
- package/@types/router/common/trace.d.ts +8 -14
- package/@types/router/directives/state-directives.d.ts +11 -10
- package/@types/router/directives/view-directive.d.ts +3 -3
- package/@types/router/globals.d.ts +25 -7
- package/@types/router/params/interface.d.ts +606 -0
- package/@types/router/resolve/interface.d.ts +200 -0
- package/@types/router/state/interface.d.ts +983 -0
- package/@types/router/state/state-object.d.ts +13 -3
- package/@types/router/state/state-registry.d.ts +18 -4
- package/@types/router/state/state-service.d.ts +18 -10
- package/@types/router/state/views.d.ts +14 -8
- package/@types/router/state-filters.d.ts +8 -4
- package/@types/router/template-factory.d.ts +4 -4
- package/@types/router/transition/interface.d.ts +876 -11
- package/@types/router/transition/transition-service.d.ts +3 -3
- package/@types/router/transition/transition.d.ts +25 -15
- package/@types/router/view/interface.d.ts +44 -0
- package/@types/router/view/view.d.ts +17 -5
- package/@types/shared/interface.d.ts +6 -0
- package/@types/shared/utils.d.ts +18 -33
- package/CHANGELOG.md +38 -38
- package/CODE_OF_CONDUCT.md +1 -1
- package/CONTRIBUTING.md +9 -9
- package/DEVELOPERS.md +30 -30
- package/Makefile +1 -1
- package/README.md +20 -20
- package/RELEASE.md +3 -3
- package/SECURITY.md +1 -1
- package/TRIAGING.md +3 -3
- package/dist/angular-ts.esm.js +3853 -3514
- package/dist/angular-ts.umd.js +3854 -3514
- package/dist/angular-ts.umd.min.js +1 -1
- package/index.html +2 -11
- package/package.json +3 -3
- package/src/angular.spec.js +1 -99
- package/src/animations/animate-children-directive.js +2 -2
- package/src/animations/animate-css.md +1 -1
- package/src/animations/animate-queue.js +1 -1
- package/src/animations/animate-swap.js +20 -17
- package/src/animations/animate.js +1 -1
- package/src/animations/animate.md +8 -8
- package/src/animations/animation.js +1 -0
- package/src/animations/interface.ts +19 -0
- package/src/animations/raf-scheduler.js +70 -54
- package/src/animations/raf-scheduler.spec.js +6 -0
- package/src/core/compile/attributes.js +13 -15
- package/src/core/compile/compile.js +2737 -2631
- package/src/core/compile/compile.md +13 -13
- package/src/core/compile/compile.spec.js +8 -108
- package/src/core/controller/controller.js +1 -1
- package/src/core/di/injector.js +34 -6
- package/src/core/di/injector.md +6 -6
- package/src/core/di/internal-injector.js +19 -21
- package/src/core/di/ng-module.js +4 -3
- package/src/core/error-handler.ts +7 -0
- package/src/core/exception-handler.js +4 -9
- package/src/core/filter/filter.js +12 -3
- package/src/core/filter/filter.md +5 -5
- package/src/core/interpolate/interpolate.js +6 -6
- package/src/core/interpolate/interpolate.spec.js +1 -1
- package/src/core/location/location.js +3 -3
- package/src/core/parse/ast/ast.js +2 -2
- package/src/core/parse/interface.ts +84 -0
- package/src/core/parse/interpreter.js +33 -28
- package/src/core/parse/parse.js +8 -55
- package/src/core/parse/parse.md +6 -6
- package/src/core/parse/parser/parser.js +1 -1
- package/src/core/sanitize/interface.ts +10 -0
- package/src/core/sanitize/sanitize-uri.js +46 -56
- package/src/core/sanitize/sanitize-uri.spec.js +1 -1
- package/src/core/sce/sce.js +378 -301
- package/src/core/sce/sce.md +13 -13
- package/src/core/scope/scope.js +8 -6
- package/src/directive/aria/aria.js +9 -11
- package/src/directive/attrs/attrs.md +7 -7
- package/src/directive/bind/bind.js +5 -5
- package/src/directive/bind/bind.md +3 -3
- package/src/directive/channel/channel.js +1 -1
- package/src/directive/class/class.js +1 -1
- package/src/directive/cloak/cloak.js +1 -1
- package/src/directive/cloak/cloak.md +1 -1
- package/src/directive/controller/controller.js +1 -1
- package/src/directive/controller/controller.md +2 -2
- package/src/directive/events/events.js +3 -3
- package/src/directive/events/events.md +2 -2
- package/src/directive/form/form.js +5 -5
- package/src/directive/if/if.js +1 -1
- package/src/directive/include/include.js +1 -1
- package/src/directive/include/include.md +2 -2
- package/src/directive/init/init.js +1 -1
- package/src/directive/input/input.js +7 -7
- package/src/directive/input/input.md +54 -54
- package/src/directive/messages/messages.js +2 -2
- package/src/directive/messages/messages.md +2 -2
- package/src/directive/model/model.js +3 -3
- package/src/directive/model-options/model-options.js +3 -3
- package/src/directive/model-options/model-options.md +1 -1
- package/src/directive/non-bindable/non-bindable.js +1 -1
- package/src/directive/non-bindable/non-bindable.md +1 -1
- package/src/directive/observe/observe.js +1 -1
- package/src/directive/options/options.js +3 -5
- package/src/directive/options/options.md +1 -1
- package/src/directive/ref/ref.js +9 -4
- package/src/directive/repeat/repeat.js +7 -8
- package/src/directive/repeat/repeat.md +3 -3
- package/src/directive/script/script.js +3 -3
- package/src/directive/select/select.js +2 -2
- package/src/directive/select/select.md +3 -3
- package/src/directive/setter/setter.js +8 -6
- package/src/directive/show-hide/show-hide.js +2 -2
- package/src/directive/show-hide/show-hide.md +4 -4
- package/src/directive/style/style.js +2 -2
- package/src/directive/switch/switch.js +6 -6
- package/src/directive/transclude/transclude.js +2 -2
- package/src/directive/validators/validators.js +37 -36
- package/src/filters/filter.js +1 -1
- package/src/filters/filters.js +1 -1
- package/src/filters/limit-to.js +1 -1
- package/src/filters/order-by.js +3 -0
- package/src/filters/order-by.md +1 -1
- package/src/interface.ts +329 -0
- package/src/loader.js +20 -19
- package/src/loader.md +7 -7
- package/src/public.js +5 -7
- package/src/router/common/{glob.html → common.html} +1 -0
- package/src/router/common/{glob.test.js → common.test.js} +1 -1
- package/src/router/common/glob.js +29 -7
- package/src/router/common/glob.spec.js +31 -1
- package/src/router/common/queue.js +69 -14
- package/src/router/common/queue.spec.js +80 -0
- package/src/router/common/trace.js +21 -15
- package/src/router/directives/component-example.html +37 -0
- package/src/router/directives/state-directives.js +13 -12
- package/src/router/directives/state-directives.spec.js +51 -46
- package/src/router/directives/view-directive.js +6 -6
- package/src/router/directives/view-directive.spec.js +1 -1
- package/src/router/globals.js +24 -5
- package/src/router/hooks/update-globals.js +2 -0
- package/src/router/params/interface.ts +626 -0
- package/src/router/params/param-types.js +2 -2
- package/src/router/resolve/interface.ts +208 -0
- package/src/router/resolve/resolvable.js +2 -2
- package/src/router/state/interface.ts +1007 -0
- package/src/router/state/state-builder.js +2 -2
- package/src/router/state/state-object.js +19 -5
- package/src/router/state/state-queue-manager.js +3 -5
- package/src/router/state/state-registry.js +14 -3
- package/src/router/state/state-service.js +14 -8
- package/src/router/state/views.js +9 -4
- package/src/router/state-filters.js +6 -0
- package/src/router/template-factory.js +2 -2
- package/src/router/transition/interface.ts +922 -0
- package/src/router/transition/transition-service.js +1 -1
- package/src/router/transition/transition.js +17 -7
- package/src/router/url/url-matcher.js +2 -2
- package/src/router/view/interface.ts +51 -0
- package/src/router/view/view.js +17 -10
- package/src/router/view/view.spec.js +2 -2
- package/src/services/http/http.md +8 -8
- package/src/services/log.md +1 -1
- package/src/services/template-request.js +1 -1
- package/src/shared/dom.js +2 -2
- package/src/shared/interface.ts +6 -0
- package/src/shared/utils.js +22 -37
- package/tsconfig.json +2 -1
- package/tsconfig.types.json +1 -0
- package/typedoc/assets/hierarchy.js +1 -1
- package/typedoc/assets/navigation.js +1 -1
- package/typedoc/assets/search.js +1 -1
- package/typedoc/classes/animations_animate-cache.AnimateCacheProvider.html +6 -6
- package/typedoc/classes/animations_animate-css-driver.AnimateCssDriverProvider.html +10 -10
- package/typedoc/classes/animations_animate-css.AnimateCssProvider.html +10 -10
- package/typedoc/classes/animations_animate-js-driver.AnimateJsDriverProvider.html +10 -10
- package/typedoc/classes/animations_animate-js.AnimateJsProvider.html +10 -10
- package/typedoc/classes/animations_animate-queue.AnimateQueueProvider.html +12 -12
- package/typedoc/classes/animations_animate-runner.AnimateAsyncRunFactoryProvider.html +6 -6
- package/typedoc/classes/animations_animate-runner.AnimateRunner.html +48 -48
- package/typedoc/classes/animations_animate-runner.AnimateRunnerFactoryProvider.html +6 -6
- package/typedoc/classes/animations_animate.AnimateProvider.html +18 -18
- package/typedoc/classes/animations_animation.AnimationProvider.html +12 -12
- package/typedoc/classes/animations_raf-scheduler.RafSchedulerProvider.html +323 -52
- package/typedoc/classes/core_cache_cache-factory.TemplateCacheProvider.html +4 -4
- package/typedoc/classes/core_compile_attributes.Attributes.html +43 -43
- package/typedoc/classes/core_compile_compile.CompileProvider.html +51 -43
- package/typedoc/classes/core_controller_controller.ControllerProvider.html +13 -13
- package/typedoc/classes/core_di_internal-injector.InjectorService.html +34 -32
- package/typedoc/classes/core_di_internal-injector.ProviderInjector.html +25 -25
- package/typedoc/classes/core_di_ng-module.NgModule.html +50 -50
- package/typedoc/classes/core_exception-handler.ExceptionHandlerProvider.html +17 -17
- package/typedoc/classes/core_filter_filter.FilterProvider.html +156 -21
- package/typedoc/classes/core_interpolate_interpolate.InterpolateProvider.html +22 -22
- package/typedoc/classes/core_location_location.Location.html +76 -76
- package/typedoc/classes/core_location_location.LocationHashbangUrl.html +78 -78
- package/typedoc/classes/core_location_location.LocationHtml5Url.html +78 -78
- package/typedoc/classes/core_location_location.LocationProvider.html +20 -20
- package/typedoc/classes/core_parse_ast_ast.AST.html +64 -64
- package/typedoc/classes/core_parse_interpreter.ASTInterpreter.html +112 -78
- package/typedoc/classes/core_parse_lexer_lexer.Lexer.html +42 -42
- package/typedoc/classes/core_parse_parse.ParseProvider.html +13 -14
- package/typedoc/classes/core_parse_parser_parser.Parser.html +14 -14
- package/typedoc/classes/core_pubsub_pubsub.PubSub.html +26 -26
- package/typedoc/classes/core_sanitize_sanitize-uri.SanitizeUriProvider.html +205 -319
- package/typedoc/classes/core_sce_sce.SceDelegateProvider.html +18 -85
- package/typedoc/classes/core_sce_sce.SceProvider.html +8 -8
- package/typedoc/classes/core_scope_scope.RootScopeProvider.html +10 -10
- package/typedoc/classes/core_scope_scope.Scope.html +110 -193
- package/typedoc/classes/core_task-tracker-factory.TaskTracker.html +14 -14
- package/typedoc/classes/core_task-tracker-factory.TaskTrackerFactoryProvider.html +4 -4
- package/typedoc/classes/directive_aria_aria.AriaProvider.html +8 -8
- package/typedoc/classes/directive_form_form.FormController.html +85 -85
- package/typedoc/classes/directive_model_model.NgModelController.html +213 -213
- package/typedoc/classes/loader.Angular.html +58 -62
- package/typedoc/classes/router_common_glob.Glob.html +208 -101
- package/typedoc/classes/router_common_queue.Queue.html +279 -68
- package/typedoc/classes/router_common_trace.Trace.html +44 -44
- package/typedoc/classes/router_globals.RouterGlobals.html +937 -0
- package/typedoc/classes/router_params_param-factory.ParamFactory.html +12 -12
- package/typedoc/classes/router_params_param-type.ParamType.html +26 -26
- package/typedoc/classes/router_params_param-types.ParamTypes.html +16 -16
- package/typedoc/classes/router_params_param.Param.html +46 -46
- package/typedoc/classes/router_params_state-params.StateParams.html +6 -6
- package/typedoc/classes/router_path_path-node.PathNode.html +34 -34
- package/typedoc/classes/router_path_path-utils.PathUtils.html +22 -22
- package/typedoc/classes/router_resolve_resolvable.Resolvable.html +54 -54
- package/typedoc/classes/router_resolve_resolve-context.ResolveContext.html +26 -26
- package/typedoc/classes/router_state-provider.StateProvider.html +14 -14
- package/typedoc/classes/router_state_state-builder.StateBuilder.html +18 -18
- package/typedoc/classes/router_state_state-matcher.StateMatcher.html +12 -12
- package/typedoc/classes/router_state_state-object.StateObject.html +202 -45
- package/typedoc/classes/router_state_state-queue-manager.StateQueueManager.html +22 -22
- package/typedoc/classes/router_state_state-registry.StateRegistryProvider.html +76 -133
- package/typedoc/classes/router_state_state-service.StateProvider.html +120 -72
- package/typedoc/classes/router_state_target-state.TargetState.html +46 -46
- package/typedoc/classes/{router_state_views.Ng1ViewConfig.html → router_state_views.ViewConfig.html} +83 -51
- package/typedoc/classes/router_template-factory.TemplateFactoryProvider.html +36 -62
- package/typedoc/classes/router_transition_hook-builder.HookBuilder.html +21 -14
- package/typedoc/classes/router_transition_hook-registry.RegisteredHook.html +36 -36
- package/typedoc/classes/router_transition_reject-factory.Rejection.html +32 -32
- package/typedoc/classes/router_transition_transition-event-type.TransitionEventType.html +20 -20
- package/typedoc/classes/router_transition_transition-hook.TransitionHook.html +54 -54
- package/typedoc/classes/router_transition_transition-service.TransitionProvider.html +48 -48
- package/typedoc/classes/router_transition_transition.Transition.html +597 -145
- package/typedoc/classes/router_url_url-config.UrlConfigProvider.html +28 -28
- package/typedoc/classes/router_url_url-matcher.UrlMatcher.html +50 -50
- package/typedoc/classes/router_url_url-rule.BaseUrlRule.html +16 -16
- package/typedoc/classes/router_url_url-rule.UrlRuleFactory.html +22 -22
- package/typedoc/classes/router_url_url-rules.UrlRules.html +42 -42
- package/typedoc/classes/router_url_url-service.UrlService.html +68 -68
- package/typedoc/classes/router_view-scroll.ViewScrollProvider.html +12 -12
- package/typedoc/classes/router_view_view.ViewService.html +228 -212
- package/typedoc/classes/services_anchor-scroll.AnchorScrollProvider.html +12 -12
- package/typedoc/classes/services_browser.Browser.html +54 -54
- package/typedoc/classes/services_browser.BrowserProvider.html +4 -4
- package/typedoc/classes/services_http-backend_http-backend.HttpBackendProvider.html +6 -6
- package/typedoc/classes/services_http_http.HttpParamSerializerProvider.html +6 -6
- package/typedoc/classes/services_http_http.HttpProvider.html +14 -14
- package/typedoc/classes/services_log.LogProvider.html +16 -16
- package/typedoc/classes/services_template-request.TemplateRequestProvider.html +12 -12
- package/typedoc/classes/shared_noderef.NodeRef.html +60 -60
- package/typedoc/enums/core_parse_ast-type.ASTType.html +38 -38
- package/typedoc/enums/router_common_trace.Category.html +568 -0
- package/typedoc/enums/router_transition_interface.TransitionHookPhase.html +18 -33
- package/typedoc/{interfaces/types.ServiceProviderClass.html → enums/router_transition_interface.TransitionHookScope.html} +75 -44
- package/typedoc/enums/router_transition_reject-factory.RejectType.html +14 -14
- package/typedoc/functions/animations_animate-cache.animateCache.html +14 -14
- package/typedoc/functions/animations_animate-children-directive.__AnimateChildrenDirective.html +6 -6
- package/typedoc/functions/animations_animate-swap.ngAnimateSwapDirective.html +6 -6
- package/typedoc/functions/animations_shared.applyAnimationClassesFactory.html +2 -2
- package/typedoc/functions/animations_shared.applyAnimationFromStyles.html +2 -2
- package/typedoc/functions/animations_shared.applyAnimationStyles.html +2 -2
- package/typedoc/functions/animations_shared.applyAnimationToStyles.html +2 -2
- package/typedoc/functions/animations_shared.applyGeneratedPreparationClasses.html +2 -2
- package/typedoc/functions/animations_shared.applyInlineStyle.html +2 -2
- package/typedoc/functions/animations_shared.assertArg.html +2 -2
- package/typedoc/functions/animations_shared.blockKeyframeAnimations.html +2 -2
- package/typedoc/functions/animations_shared.clearGeneratedClasses.html +2 -2
- package/typedoc/functions/animations_shared.concatWithSpace.html +2 -2
- package/typedoc/functions/animations_shared.extractElementNode.html +2 -2
- package/typedoc/functions/animations_shared.mergeAnimationDetails.html +2 -2
- package/typedoc/functions/animations_shared.mergeClasses.html +2 -2
- package/typedoc/functions/animations_shared.packageStyles.html +2 -2
- package/typedoc/functions/animations_shared.pendClasses.html +2 -2
- package/typedoc/functions/animations_shared.prepareAnimationOptions.html +2 -2
- package/typedoc/functions/animations_shared.removeFromArray.html +2 -2
- package/typedoc/functions/animations_shared.resolveElementClasses.html +2 -2
- package/typedoc/functions/animations_shared.stripCommentsFromElement.html +2 -2
- package/typedoc/functions/core_controller_controller.identifierForController.html +2 -2
- package/typedoc/functions/core_di_injector.annotate.html +2 -2
- package/typedoc/functions/core_di_injector.createInjector.html +2 -2
- package/typedoc/functions/core_location_location.serverBase.html +2 -2
- package/typedoc/functions/core_location_location.stripBaseUrl.html +2 -2
- package/typedoc/functions/core_location_location.stripFile.html +2 -2
- package/typedoc/functions/core_location_location.stripHash.html +2 -2
- package/typedoc/functions/core_parse_interpreter.isAssignable.html +2 -2
- package/typedoc/functions/core_parse_parse.constantWatchDelegate.html +2 -2
- package/typedoc/functions/core_sce_sce.adjustMatcher.html +2 -2
- package/typedoc/functions/core_sce_sce.escapeForRegexp.html +2 -2
- package/typedoc/functions/core_scope_scope.createScope.html +2 -2
- package/typedoc/functions/core_scope_scope.nextId.html +2 -2
- package/typedoc/functions/core_url-utils_url-utils.getBaseUrl.html +2 -2
- package/typedoc/functions/core_url-utils_url-utils.urlIsAllowedOriginFactory.html +2 -2
- package/typedoc/functions/core_url-utils_url-utils.urlIsSameOrigin.html +2 -2
- package/typedoc/functions/core_url-utils_url-utils.urlIsSameOriginAsBaseUrl.html +2 -2
- package/typedoc/functions/core_url-utils_url-utils.urlResolve.html +2 -2
- package/typedoc/functions/core_url-utils_url-utils.urlsAreSameOrigin.html +2 -2
- package/typedoc/functions/directive_aria_aria.ngCheckedAriaDirective.html +4 -4
- package/typedoc/functions/directive_aria_aria.ngClickAriaDirective.html +4 -4
- package/typedoc/functions/directive_aria_aria.ngDblclickAriaDirective.html +4 -4
- package/typedoc/functions/directive_aria_aria.ngDisabledAriaDirective.html +4 -4
- package/typedoc/functions/directive_aria_aria.ngHideAriaDirective.html +4 -4
- package/typedoc/functions/directive_aria_aria.ngMessagesAriaDirective.html +2 -2
- package/typedoc/functions/directive_aria_aria.ngModelAriaDirective.html +4 -4
- package/typedoc/functions/directive_aria_aria.ngReadonlyAriaDirective.html +4 -4
- package/typedoc/functions/directive_aria_aria.ngRequiredAriaDirective.html +4 -4
- package/typedoc/functions/directive_aria_aria.ngShowAriaDirective.html +4 -4
- package/typedoc/functions/directive_aria_aria.ngValueAriaDirective.html +4 -4
- package/typedoc/functions/directive_bind_bind.ngBindDirective.html +4 -4
- package/typedoc/functions/directive_bind_bind.ngBindHtmlDirective.html +6 -6
- package/typedoc/functions/directive_bind_bind.ngBindTemplateDirective.html +4 -4
- package/typedoc/functions/directive_channel_channel.ngChannelDirective.html +4 -4
- package/typedoc/functions/directive_cloak_cloak.ngCloakDirective.html +4 -4
- package/typedoc/functions/directive_controller_controller.ngControllerDirective.html +4 -4
- package/typedoc/functions/directive_events_events.createEventDirective.html +8 -8
- package/typedoc/functions/directive_form_form.setupValidity.html +2 -2
- package/typedoc/functions/directive_if_if.ngIfDirective.html +6 -6
- package/typedoc/functions/directive_include_include.ngIncludeDirective.html +4 -4
- package/typedoc/functions/directive_include_include.ngIncludeFillContentDirective.html +6 -6
- package/typedoc/functions/directive_init_init.ngInitDirective.html +4 -4
- package/typedoc/functions/directive_input_input.badInputChecker.html +2 -2
- package/typedoc/functions/directive_input_input.countDecimals.html +2 -2
- package/typedoc/functions/directive_input_input.createDateInputType.html +2 -2
- package/typedoc/functions/directive_input_input.createDateParser.html +2 -2
- package/typedoc/functions/directive_input_input.hiddenInputBrowserCacheDirective.html +4 -4
- package/typedoc/functions/directive_input_input.inputDirective.html +4 -4
- package/typedoc/functions/directive_input_input.isNumberInteger.html +2 -2
- package/typedoc/functions/directive_input_input.isValidForStep.html +2 -2
- package/typedoc/functions/directive_input_input.ngValueDirective.html +4 -4
- package/typedoc/functions/directive_input_input.numberFormatterParser.html +2 -2
- package/typedoc/functions/directive_input_input.numberInputType.html +2 -2
- package/typedoc/functions/directive_input_input.rangeInputType.html +2 -2
- package/typedoc/functions/directive_input_input.weekParser.html +2 -2
- package/typedoc/functions/directive_messages_messages.ngMessagesDirective.html +4 -4
- package/typedoc/functions/directive_messages_messages.ngMessagesIncludeDirective.html +4 -4
- package/typedoc/functions/directive_model-options_model-options.ngModelOptionsDirective.html +4 -4
- package/typedoc/functions/directive_model_model.ngModelDirective.html +2 -2
- package/typedoc/functions/directive_non-bindable_non-bindable.ngNonBindableDirective.html +4 -4
- package/typedoc/functions/directive_observe_observe.ngObserveDirective.html +4 -4
- package/typedoc/functions/directive_ref_ref.ngRefDirective.html +4 -4
- package/typedoc/functions/directive_repeat_repeat.ngRepeatDirective.html +6 -6
- package/typedoc/functions/directive_script_script.scriptDirective.html +6 -6
- package/typedoc/functions/directive_select_select.optionDirective.html +4 -4
- package/typedoc/functions/directive_select_select.selectDirective.html +4 -4
- package/typedoc/functions/directive_setter_setter.ngSetterDirective.html +34 -8
- package/typedoc/functions/directive_show-hide_show-hide.ngHideDirective.html +6 -6
- package/typedoc/functions/directive_show-hide_show-hide.ngShowDirective.html +6 -6
- package/typedoc/functions/directive_style_style.ngStyleDirective.html +4 -4
- package/typedoc/functions/directive_switch_switch.ngSwitchDefaultDirective.html +4 -4
- package/typedoc/functions/directive_switch_switch.ngSwitchDirective.html +6 -6
- package/typedoc/functions/directive_switch_switch.ngSwitchWhenDirective.html +4 -4
- package/typedoc/functions/filters_filter.filterFilter.html +11 -76
- package/typedoc/functions/filters_filters.formatNumber.html +2 -2
- package/typedoc/functions/filters_filters.jsonFilter.html +12 -24
- package/typedoc/functions/filters_limit-to.limitToFilter.html +11 -90
- package/typedoc/functions/filters_order-by.orderByFilter.html +18 -55
- package/typedoc/functions/public.publishExternalAPI.html +8 -8
- package/typedoc/functions/router_common_glob.hasGlobs.html +306 -0
- package/typedoc/functions/router_directives_state-directives._StateRefActiveDirective.html +15 -8
- package/typedoc/functions/router_directives_state-directives._StateRefDirective.html +4 -4
- package/typedoc/functions/router_directives_state-directives._StateRefDynamicDirective.html +17 -77
- package/typedoc/functions/router_directives_view-directive._ViewDirectiveFill.html +4 -4
- package/typedoc/functions/router_hooks_core-resolvables.registerAddCoreResolvables.html +2 -2
- package/typedoc/functions/router_hooks_core-resolvables.treeChangesCleanup.html +2 -2
- package/typedoc/functions/router_hooks_ignored-transition.registerIgnoredTransitionHook.html +2 -2
- package/typedoc/functions/router_hooks_invalid-transition.registerInvalidTransitionHook.html +2 -2
- package/typedoc/functions/router_hooks_lazy-load.lazyLoadState.html +2 -2
- package/typedoc/functions/router_hooks_lazy-load.registerLazyLoadHook.html +2 -2
- package/typedoc/functions/router_hooks_on-enter-exit-retain.registerOnEnterHook.html +2 -2
- package/typedoc/functions/router_hooks_on-enter-exit-retain.registerOnExitHook.html +2 -2
- package/typedoc/functions/router_hooks_on-enter-exit-retain.registerOnRetainHook.html +2 -2
- package/typedoc/functions/router_hooks_redirect-to.registerRedirectToHook.html +2 -2
- package/typedoc/functions/router_hooks_resolve.registerEagerResolvePath.html +2 -2
- package/typedoc/functions/router_hooks_resolve.registerLazyResolveState.html +2 -2
- package/typedoc/functions/router_hooks_resolve.registerResolveRemaining.html +2 -2
- package/typedoc/functions/router_hooks_update-globals.registerUpdateGlobalState.html +2 -2
- package/typedoc/functions/router_hooks_url.registerUpdateUrl.html +2 -2
- package/typedoc/functions/router_hooks_views.registerActivateViews.html +2 -2
- package/typedoc/functions/router_hooks_views.registerLoadEnteringViews.html +2 -2
- package/typedoc/functions/router_path_path-utils.makeTargetState.html +2 -2
- package/typedoc/functions/router_state-filters._IncludedByStateFilter.html +18 -40
- package/typedoc/functions/router_state-filters._IsStateFilter.html +15 -34
- package/typedoc/functions/router_state_state-builder.resolvablesBuilder.html +2 -2
- package/typedoc/functions/router_state_state-registry.getLocals.html +2 -2
- package/typedoc/functions/{router_state_views.getNg1ViewConfigFactory.html → router_state_views.getViewConfigFactory.html} +13 -15
- package/typedoc/functions/router_state_views.ng1ViewsBuilder.html +2 -2
- package/typedoc/functions/router_transition_hook-registry.makeEvent.html +2 -2
- package/typedoc/functions/router_transition_hook-registry.matchState.html +2 -2
- package/typedoc/functions/services_browser.trimEmptyHash.html +2 -2
- package/typedoc/functions/services_cookie-reader.getCookies.html +2 -2
- package/typedoc/functions/services_http-backend_http-backend.createHttpBackend.html +2 -2
- package/typedoc/functions/services_http_http.defaultHttpResponseTransform.html +2 -2
- package/typedoc/functions/shared_common._removeFrom.html +2 -2
- package/typedoc/functions/shared_common.allTrueR.html +2 -2
- package/typedoc/functions/shared_common.ancestors.html +2 -2
- package/typedoc/functions/shared_common.anyTrueR.html +2 -2
- package/typedoc/functions/shared_common.applyPairs.html +2 -2
- package/typedoc/functions/shared_common.arrayTuples.html +2 -2
- package/typedoc/functions/shared_common.assertFn.html +2 -2
- package/typedoc/functions/shared_common.copy.html +2 -2
- package/typedoc/functions/shared_common.createProxyFunctions.html +2 -2
- package/typedoc/functions/shared_common.defaults.html +2 -2
- package/typedoc/functions/shared_common.deregAll.html +2 -2
- package/typedoc/functions/shared_common.equals.html +2 -2
- package/typedoc/functions/shared_common.filter.html +2 -2
- package/typedoc/functions/shared_common.find.html +2 -2
- package/typedoc/functions/shared_common.flatten.html +2 -2
- package/typedoc/functions/shared_common.flattenR.html +2 -2
- package/typedoc/functions/shared_common.inherit.html +2 -2
- package/typedoc/functions/shared_common.map.html +2 -2
- package/typedoc/functions/shared_common.omit.html +2 -2
- package/typedoc/functions/shared_common.pairs.html +2 -2
- package/typedoc/functions/shared_common.pick.html +2 -2
- package/typedoc/functions/shared_common.pushR.html +2 -2
- package/typedoc/functions/shared_common.silenceUncaughtInPromise.html +2 -2
- package/typedoc/functions/shared_common.silentRejection.html +2 -2
- package/typedoc/functions/shared_common.tail.html +2 -2
- package/typedoc/functions/shared_common.uniqR.html +2 -2
- package/typedoc/functions/shared_common.unnest.html +2 -2
- package/typedoc/functions/shared_common.unnestR.html +2 -2
- package/typedoc/functions/shared_dom.appendNodesToElement.html +2 -2
- package/typedoc/functions/shared_dom.buildFragment.html +2 -2
- package/typedoc/functions/shared_dom.cleanElementData.html +2 -2
- package/typedoc/functions/shared_dom.createElementFromHTML.html +2 -2
- package/typedoc/functions/shared_dom.createNodelistFromHTML.html +2 -2
- package/typedoc/functions/shared_dom.dealoc.html +2 -2
- package/typedoc/functions/shared_dom.deleteCacheData.html +2 -2
- package/typedoc/functions/shared_dom.domInsert.html +2 -2
- package/typedoc/functions/shared_dom.emptyElement.html +2 -2
- package/typedoc/functions/shared_dom.getBlockNodes.html +2 -2
- package/typedoc/functions/shared_dom.getBooleanAttrName.html +2 -2
- package/typedoc/functions/shared_dom.getCacheData.html +2 -2
- package/typedoc/functions/shared_dom.getController.html +2 -2
- package/typedoc/functions/shared_dom.getExpando.html +2 -2
- package/typedoc/functions/shared_dom.getInheritedData.html +2 -2
- package/typedoc/functions/shared_dom.getInjector.html +2 -2
- package/typedoc/functions/shared_dom.getIsolateScope.html +2 -2
- package/typedoc/functions/shared_dom.getOrSetCacheData.html +2 -2
- package/typedoc/functions/shared_dom.getScope.html +2 -2
- package/typedoc/functions/shared_dom.isRoot.html +2 -2
- package/typedoc/functions/shared_dom.isTextNode.html +2 -2
- package/typedoc/functions/shared_dom.kebabToCamel.html +2 -2
- package/typedoc/functions/shared_dom.parseHtml.html +2 -2
- package/typedoc/functions/shared_dom.removeElement.html +2 -2
- package/typedoc/functions/shared_dom.removeElementData.html +2 -2
- package/typedoc/functions/shared_dom.setCacheData.html +2 -2
- package/typedoc/functions/shared_dom.setInheritedData.html +2 -2
- package/typedoc/functions/shared_dom.setIsolateScope.html +2 -2
- package/typedoc/functions/shared_dom.setScope.html +2 -2
- package/typedoc/functions/shared_dom.snakeToCamel.html +2 -2
- package/typedoc/functions/shared_dom.startingTag.html +2 -2
- package/typedoc/functions/shared_hof.all.html +2 -2
- package/typedoc/functions/shared_hof.compose.html +2 -2
- package/typedoc/functions/shared_hof.curry.html +2 -2
- package/typedoc/functions/shared_hof.is.html +2 -2
- package/typedoc/functions/shared_hof.or.html +2 -2
- package/typedoc/functions/shared_hof.parse.html +2 -2
- package/typedoc/functions/shared_hof.pattern.html +2 -2
- package/typedoc/functions/shared_hof.pipe.html +2 -2
- package/typedoc/functions/shared_hof.val.html +2 -2
- package/typedoc/functions/shared_predicates.isInjectable.html +2 -2
- package/typedoc/functions/shared_predicates.isPromise.html +2 -2
- package/typedoc/functions/shared_strings.beforeAfterSubstr.html +2 -2
- package/typedoc/functions/shared_strings.fnToString.html +2 -2
- package/typedoc/functions/shared_strings.functionToString.html +2 -2
- package/typedoc/functions/shared_strings.joinNeighborsR.html +2 -2
- package/typedoc/functions/shared_strings.kebobString.html +2 -2
- package/typedoc/functions/shared_strings.maxLength.html +2 -2
- package/typedoc/functions/shared_strings.padString.html +2 -2
- package/typedoc/functions/shared_strings.splitOnDelim.html +2 -2
- package/typedoc/functions/shared_strings.stringify.html +2 -2
- package/typedoc/functions/shared_strings.stripLastPathElement.html +2 -2
- package/typedoc/functions/shared_strings.trimHashVal.html +2 -2
- package/typedoc/functions/shared_test-utils.bootstrap.html +2 -2
- package/typedoc/functions/shared_test-utils.browserTrigger.html +2 -2
- package/typedoc/functions/shared_test-utils.wait.html +2 -2
- package/typedoc/functions/shared_utils.addDateMinutes.html +2 -2
- package/typedoc/functions/shared_utils.arrayRemove.html +2 -2
- package/typedoc/functions/shared_utils.assert.html +2 -2
- package/typedoc/functions/shared_utils.assertArg.html +2 -2
- package/typedoc/functions/shared_utils.assertArgFn.html +2 -2
- package/typedoc/functions/shared_utils.assertNotHasOwnProperty.html +2 -2
- package/typedoc/functions/shared_utils.baseExtend.html +2 -2
- package/typedoc/functions/shared_utils.bind.html +2 -2
- package/typedoc/functions/shared_utils.concat.html +2 -2
- package/typedoc/functions/shared_utils.convertTimezoneToLocal.html +2 -2
- package/typedoc/functions/shared_utils.csp.html +2 -2
- package/typedoc/functions/shared_utils.directiveNormalize.html +2 -2
- package/typedoc/functions/shared_utils.encodeUriQuery.html +2 -2
- package/typedoc/functions/shared_utils.encodeUriSegment.html +2 -2
- package/typedoc/functions/shared_utils.equals.html +2 -2
- package/typedoc/functions/shared_utils.errorHandlingConfig.html +2 -2
- package/typedoc/functions/shared_utils.extend.html +3 -3
- package/typedoc/functions/shared_utils.fromJson.html +2 -2
- package/typedoc/functions/shared_utils.getNgAttribute.html +2 -2
- package/typedoc/functions/shared_utils.getNodeName.html +2 -2
- package/typedoc/functions/shared_utils.hasAnimate.html +2 -2
- package/typedoc/functions/shared_utils.hasCustomToString.html +2 -2
- package/typedoc/functions/{shared_utils.merge.html → shared_utils.hasOwn.html} +44 -91
- package/typedoc/functions/shared_utils.hashKey.html +2 -2
- package/typedoc/functions/shared_utils.includes.html +2 -2
- package/typedoc/functions/shared_utils.inherit.html +2 -2
- package/typedoc/functions/shared_utils.isArrayBuffer.html +2 -2
- package/typedoc/functions/shared_utils.isArrayLike.html +2 -2
- package/typedoc/functions/shared_utils.isBlankObject.html +2 -2
- package/typedoc/functions/shared_utils.isBlob.html +2 -2
- package/typedoc/functions/shared_utils.isBoolean.html +2 -2
- package/typedoc/functions/shared_utils.isDate.html +2 -2
- package/typedoc/functions/shared_utils.isDefined.html +2 -2
- package/typedoc/functions/shared_utils.isElement.html +2 -2
- package/typedoc/functions/shared_utils.isError.html +2 -2
- package/typedoc/functions/shared_utils.isFile.html +2 -2
- package/typedoc/functions/shared_utils.isFormData.html +2 -2
- package/typedoc/functions/shared_utils.isFunction.html +2 -2
- package/typedoc/functions/shared_utils.isNull.html +2 -2
- package/typedoc/functions/shared_utils.isNullOrUndefined.html +2 -2
- package/typedoc/functions/shared_utils.isNumber.html +2 -2
- package/typedoc/functions/shared_utils.isNumberNaN.html +2 -2
- package/typedoc/functions/shared_utils.isObject.html +2 -2
- package/typedoc/functions/shared_utils.isObjectEmpty.html +2 -2
- package/typedoc/functions/shared_utils.isPromiseLike.html +2 -2
- package/typedoc/functions/shared_utils.isProxy.html +2 -2
- package/typedoc/functions/shared_utils.isRegExp.html +2 -2
- package/typedoc/functions/shared_utils.isScope.html +2 -2
- package/typedoc/functions/shared_utils.isString.html +2 -2
- package/typedoc/functions/shared_utils.isTypedArray.html +2 -2
- package/typedoc/functions/shared_utils.isUndefined.html +2 -2
- package/typedoc/functions/shared_utils.isValidObjectMaxDepth.html +2 -2
- package/typedoc/functions/shared_utils.isWindow.html +2 -2
- package/typedoc/functions/shared_utils.lowercase.html +2 -2
- package/typedoc/functions/shared_utils.mergeClasses.html +2 -2
- package/typedoc/functions/shared_utils.minErr.html +3 -3
- package/typedoc/functions/shared_utils.nextUid.html +2 -2
- package/typedoc/functions/shared_utils.parseKeyValue.html +2 -2
- package/typedoc/functions/shared_utils.replaceInline.html +2 -2
- package/typedoc/functions/shared_utils.setHashKey.html +2 -2
- package/typedoc/functions/shared_utils.shallowCopy.html +2 -2
- package/typedoc/functions/shared_utils.simpleCompare.html +2 -2
- package/typedoc/functions/shared_utils.sliceArgs.html +2 -2
- package/typedoc/functions/shared_utils.snakeCase.html +2 -2
- package/typedoc/functions/shared_utils.stringify.html +2 -2
- package/typedoc/functions/shared_utils.timezoneToOffset.html +2 -2
- package/typedoc/functions/shared_utils.toDebugString.html +2 -2
- package/typedoc/functions/shared_utils.toInt.html +2 -2
- package/typedoc/functions/shared_utils.toJson.html +3 -3
- package/typedoc/functions/shared_utils.toKeyValue.html +2 -2
- package/typedoc/functions/shared_utils.trim.html +2 -2
- package/typedoc/functions/shared_utils.tryDecodeURIComponent.html +2 -2
- package/typedoc/functions/shared_utils.uppercase.html +2 -2
- package/typedoc/hierarchy.html +3 -3
- package/typedoc/index.html +24 -24
- package/typedoc/interfaces/animations_animate.AnimationOptions.html +10 -10
- package/typedoc/interfaces/{types.OnChangesObject.html → animations_raf-scheduler.ServiceProvider.html} +38 -35
- package/typedoc/interfaces/core_cache_cache.ExpandoStore.html +8 -8
- package/typedoc/interfaces/core_compile_compile.LinkFnMapping.html +24 -24
- package/typedoc/interfaces/core_compile_compile.NodeLinkFnCtx.html +676 -0
- package/typedoc/interfaces/core_compile_compile.SimpleChange.html +6 -6
- package/typedoc/interfaces/core_location_location.DefaultPorts.html +8 -8
- package/typedoc/interfaces/core_location_location.Html5Mode.html +8 -8
- package/typedoc/interfaces/core_parse_ast_ast.Token.html +14 -14
- package/typedoc/interfaces/{core_parse_parse.CompiledExpressionHandlerMap.html → core_parse_interface.CompiledExpressionHandlerMap.html} +30 -14
- package/typedoc/interfaces/{core_parse_parse.CompiledExpressionProps.html → core_parse_interface.CompiledExpressionProps.html} +204 -50
- package/typedoc/interfaces/core_parse_lexer_lexer.LexerOptions.html +6 -6
- package/typedoc/interfaces/core_parse_parser_parser.ParsedAST.html +4 -4
- package/typedoc/interfaces/core_sanitize_interface.SanitizerFn.html +319 -0
- package/typedoc/interfaces/core_scope_scope.AsyncQueueTask.html +8 -8
- package/typedoc/interfaces/core_scope_scope.Listener.html +20 -20
- package/typedoc/interfaces/directive_model-options_model-options.ModelOptionsConfig.html +12 -12
- package/typedoc/interfaces/{types.ChangesObject.html → interface.ChangesObject.html} +35 -71
- package/typedoc/interfaces/interface.ComponentOptions.html +803 -0
- package/typedoc/interfaces/{types.Controller.html → interface.Controller.html} +27 -58
- package/typedoc/interfaces/{types.Directive.html → interface.Directive.html} +200 -163
- package/typedoc/interfaces/{types.DirectivePrePost.html → interface.DirectivePrePost.html} +20 -19
- package/typedoc/interfaces/interface.NgModelController.html +1530 -0
- package/typedoc/interfaces/{types.NgModelOptions.html → interface.NgModelOptions.html} +44 -26
- package/typedoc/interfaces/interface.Provider.html +1136 -0
- package/typedoc/interfaces/interface.TranscludeFunctionObject.html +770 -0
- package/typedoc/interfaces/loader.AngularBootstrapConfig.html +4 -4
- package/typedoc/interfaces/router_params_interface.ParamDeclaration.html +1324 -0
- package/typedoc/interfaces/router_params_interface.ParamTypeDefinition.html +1375 -0
- package/typedoc/{types/animations_raf-scheduler.RafSchedulerFunction.html → interfaces/router_params_interface.RawParams.html} +56 -13
- package/typedoc/interfaces/router_params_interface.Replace.html +465 -0
- package/typedoc/interfaces/router_resolve_interface.CustomAsyncPolicy.html +305 -0
- package/typedoc/interfaces/router_resolve_interface.ProviderLike.html +660 -0
- package/typedoc/interfaces/router_resolve_interface.ResolvableLiteral.html +670 -0
- package/typedoc/interfaces/router_resolve_interface.ResolvePolicy.html +674 -0
- package/typedoc/interfaces/router_state_interface.HrefOptions.html +588 -0
- package/typedoc/interfaces/{types.Annotated.html → router_state_interface.LazyLoadResult.html} +45 -24
- package/typedoc/interfaces/router_state_interface.StateDeclaration.html +2662 -0
- package/typedoc/interfaces/router_state_interface.TargetStateDef.html +515 -0
- package/typedoc/interfaces/router_state_interface.TransitionPromise.html +1241 -0
- package/typedoc/interfaces/router_state_interface.ViewDeclaration.html +1678 -0
- package/typedoc/interfaces/router_template-factory.BindingTuple.html +6 -6
- package/typedoc/interfaces/router_transition_interface.HookMatchCriteria.html +788 -0
- package/typedoc/interfaces/router_transition_interface.HookRegOptions.html +529 -0
- package/typedoc/interfaces/router_transition_interface.IHookRegistry.html +3093 -0
- package/typedoc/interfaces/router_transition_interface.IMatchingNodes.html +663 -0
- package/typedoc/interfaces/{animations_raf-scheduler.RafSchedulerObject.html → router_transition_interface.PathType.html} +76 -28
- package/typedoc/interfaces/{types.TranscludeFunctionObject.html → router_transition_interface.PathTypes.html} +199 -164
- package/typedoc/{types/core_parse_parse.CompiledExpressionFunction.html → interfaces/router_transition_interface.RegisteredHooks.html} +28 -14
- package/typedoc/interfaces/router_transition_interface.TransitionCreateHookFn.html +330 -0
- package/typedoc/interfaces/router_transition_interface.TransitionHookFn.html +366 -0
- package/typedoc/interfaces/router_transition_interface.TransitionHookOptions.html +718 -0
- package/typedoc/interfaces/router_transition_interface.TransitionOptions.html +1231 -0
- package/typedoc/interfaces/router_transition_interface.TransitionStateHookFn.html +388 -0
- package/typedoc/interfaces/router_transition_interface.TreeChanges.html +849 -0
- package/typedoc/interfaces/router_view_interface.ActiveUIView.html +700 -0
- package/typedoc/{classes/router_globals.UIRouterGlobals.html → interfaces/router_view_interface.ViewConfig.html} +235 -226
- package/typedoc/interfaces/router_view_interface.ViewContext.html +455 -0
- package/typedoc/interfaces/services_anchor-scroll.AnchorScrollObject.html +4 -4
- package/typedoc/interfaces/services_log.LogService.html +14 -14
- package/typedoc/{types/types.Injectable.html → interfaces/shared_interface.TypedMap.html} +24 -22
- package/typedoc/interfaces/shared_utils.ErrorHandlingConfig.html +6 -6
- package/typedoc/media/CONTRIBUTING.md +9 -9
- package/typedoc/media/DEVELOPERS.md +30 -30
- package/typedoc/modules/animations_interface.html +325 -0
- package/typedoc/modules/animations_raf-scheduler.html +15 -45
- package/typedoc/modules/core_compile_compile.html +27 -0
- package/typedoc/modules/core_error-handler.html +325 -0
- package/typedoc/modules/core_exception-handler.html +48 -12
- package/typedoc/modules/core_parse_ast_ast.html +0 -62
- package/typedoc/modules/core_parse_interface.html +473 -0
- package/typedoc/modules/core_parse_parse.html +0 -213
- package/typedoc/modules/core_sanitize_interface.html +323 -0
- package/typedoc/modules/core_sanitize_sanitize-uri.html +64 -0
- package/typedoc/modules/core_sce_sce.html +1 -1
- package/typedoc/modules/{types.html → interface.html} +106 -414
- package/typedoc/modules/router_common_glob.html +62 -181
- package/typedoc/modules/router_common_trace.html +65 -27
- package/typedoc/modules/router_globals.html +70 -6
- package/typedoc/modules/router_params_interface.html +405 -0
- package/typedoc/modules/router_resolve_interface.html +524 -0
- package/typedoc/modules/router_state_interface.html +609 -0
- package/typedoc/modules/router_state_state-object.html +64 -0
- package/typedoc/modules/router_state_state-registry.html +64 -0
- package/typedoc/modules/router_state_views.html +12 -14
- package/typedoc/modules/router_transition_interface.html +553 -14
- package/typedoc/modules/router_transition_transition.html +64 -0
- package/typedoc/modules/router_view_interface.html +376 -0
- package/typedoc/modules/shared_interface.html +439 -0
- package/typedoc/modules/shared_utils.html +26 -26
- package/typedoc/modules.html +267 -23
- package/typedoc/types/animations_animate.AnimationMethod.html +2 -2
- package/typedoc/types/animations_interface.RafScheduler.html +638 -0
- package/typedoc/types/core_cache_cache-factory.TemplateCache.html +2 -2
- package/typedoc/types/core_compile_compile.ApplyDirectivesToNodeFn.html +2 -2
- package/typedoc/types/core_compile_compile.BoundTranscludeFn.html +2 -2
- package/typedoc/types/core_compile_compile.CompileFn.html +2 -2
- package/typedoc/types/core_compile_compile.CompileNodesFn.html +2 -2
- package/typedoc/types/core_compile_compile.CompositeLinkFn.html +2 -2
- package/typedoc/types/core_compile_compile.NodeLinkFn.html +4 -34
- package/typedoc/types/core_compile_compile.PublicLinkFn.html +11 -2
- package/typedoc/types/core_compile_compile.TranscludeFn.html +2 -2
- package/typedoc/types/{core_exception-handler.ErrorHandler.html → core_error-handler.ErrorHandler.html} +8 -5
- package/typedoc/types/core_exception-handler.LogService.html +2 -2
- package/typedoc/types/core_parse_ast_ast-node.ASTNode.html +52 -52
- package/typedoc/types/{core_parse_parse.CompiledExpression.html → core_parse_interface.CompiledExpression.html} +13 -5
- package/typedoc/types/core_parse_interface.CompiledExpressionFunction.html +360 -0
- package/typedoc/types/core_parse_interface.ParseService.html +487 -0
- package/typedoc/types/core_parse_interpreter.DecoratedASTNode.html +2 -2
- package/typedoc/types/core_scope_scope.ListenerFunction.html +2 -2
- package/typedoc/types/core_url-utils_url-utils.HttpProtocol.html +2 -2
- package/typedoc/types/interface.AnnotatedFactory.html +288 -0
- package/typedoc/types/{types.CloneAttachFunction.html → interface.CloneAttachFunction.html} +6 -11
- package/typedoc/types/interface.ControllerConstructor.html +329 -0
- package/typedoc/types/interface.DirectiveCompileFn.html +420 -0
- package/typedoc/types/{types.DirectiveController.html → interface.DirectiveController.html} +9 -6
- package/typedoc/types/{types.DirectiveFactory.html → interface.DirectiveFactory.html} +12 -9
- package/typedoc/types/{types.DirectiveLinkFn.html → interface.DirectiveLinkFn.html} +60 -52
- package/typedoc/types/{types.Expression.html → interface.Expression.html} +14 -3
- package/typedoc/types/interface.FilterFactory.html +324 -0
- package/typedoc/types/interface.FilterFn.html +328 -0
- package/typedoc/types/{types.TAttributes.html → interface.Injectable.html} +15 -10
- package/typedoc/types/interface.InjectableFactory.html +323 -0
- package/typedoc/types/{types.Attributes.html → interface.OnChangesObject.html} +15 -9
- package/typedoc/types/{types.TController.html → interface.TController.html} +8 -5
- package/typedoc/types/{types.AnnotatedFunction.html → router_resolve_interface.PolicyAsync.html} +17 -15
- package/typedoc/types/{types.ServiceProvider.html → router_resolve_interface.PolicyWhen.html} +13 -10
- package/typedoc/{variables/router_transition_interface.TransitionHookScope.html → types/router_state_interface.RedirectToResult.html} +40 -38
- package/typedoc/types/router_state_interface.ResolveTypes.html +281 -0
- package/typedoc/types/{animations_raf-scheduler.RafScheduler.html → router_state_interface.StateOrName.html} +16 -15
- package/typedoc/types/router_state_interface._StateDeclaration.html +288 -0
- package/typedoc/types/router_transition_interface.HookFn.html +281 -0
- package/typedoc/{variables/router_common_trace.Category.html → types/router_transition_interface.HookMatchCriterion.html} +23 -19
- package/typedoc/types/router_transition_interface.HookResult.html +324 -0
- package/typedoc/types/{types.DirectiveCompileFn.html → router_transition_interface.IHookRegistration.html} +53 -53
- package/typedoc/{variables/core_parse_ast_ast.literals.html → types/router_transition_interface.IStateMatch.html} +27 -13
- package/typedoc/types/services_anchor-scroll.AnchorScrollFunction.html +2 -2
- package/typedoc/types/services_anchor-scroll.AnchorScrollService.html +2 -2
- package/typedoc/types/services_browser.UrlChangeListener.html +2 -2
- package/typedoc/types/services_log.LogCall.html +2 -2
- package/typedoc/types/shared_interface.Mapper.html +351 -0
- package/typedoc/types/shared_interface.Predicate.html +319 -0
- package/typedoc/types/shared_interface.PredicateBinary.html +344 -0
- package/typedoc/variables/animations_shared.ACTIVE_CLASS_SUFFIX.html +2 -2
- package/typedoc/variables/animations_shared.ADD_CLASS_SUFFIX.html +2 -2
- package/typedoc/variables/animations_shared.ANIMATIONEND_EVENT.html +2 -2
- package/typedoc/variables/animations_shared.ANIMATION_DELAY_PROP.html +2 -2
- package/typedoc/variables/animations_shared.ANIMATION_DURATION_PROP.html +2 -2
- package/typedoc/variables/animations_shared.ANIMATION_ITERATION_COUNT_KEY.html +2 -2
- package/typedoc/variables/animations_shared.ANIMATION_PLAYSTATE_KEY.html +2 -2
- package/typedoc/variables/animations_shared.ANIMATION_PROP.html +2 -2
- package/typedoc/variables/animations_shared.CSS_PREFIX.html +2 -2
- package/typedoc/variables/animations_shared.DELAY_KEY.html +2 -2
- package/typedoc/variables/animations_shared.DURATION_KEY.html +2 -2
- package/typedoc/variables/animations_shared.EVENT_CLASS_PREFIX.html +2 -2
- package/typedoc/variables/animations_shared.NG_ANIMATE_CHILDREN_DATA.html +2 -2
- package/typedoc/variables/animations_shared.NG_ANIMATE_CLASSNAME.html +2 -2
- package/typedoc/variables/animations_shared.PREPARE_CLASS_SUFFIX.html +2 -2
- package/typedoc/variables/animations_shared.PROPERTY_KEY.html +2 -2
- package/typedoc/variables/animations_shared.REMOVE_CLASS_SUFFIX.html +2 -2
- package/typedoc/variables/animations_shared.SAFE_FAST_FORWARD_DURATION_VALUE.html +2 -2
- package/typedoc/variables/animations_shared.TIMING_KEY.html +2 -2
- package/typedoc/variables/animations_shared.TRANSITIONEND_EVENT.html +2 -2
- package/typedoc/variables/animations_shared.TRANSITION_DELAY_PROP.html +2 -2
- package/typedoc/variables/animations_shared.TRANSITION_DURATION_PROP.html +2 -2
- package/typedoc/variables/animations_shared.TRANSITION_PROP.html +2 -2
- package/typedoc/variables/animations_shared.ngMinErr.html +2 -2
- package/typedoc/variables/core_cache_cache.Cache.html +2 -2
- package/typedoc/variables/core_cache_cache.EXPANDO.html +2 -2
- package/typedoc/variables/core_cache_cache.ISOLATE_SCOPE_KEY.html +2 -2
- package/typedoc/variables/core_cache_cache.SCOPE_KEY.html +2 -2
- package/typedoc/variables/core_compile_compile.DirectiveSuffix.html +2 -2
- package/typedoc/variables/core_di_injector.path.html +2 -2
- package/typedoc/variables/core_di_ng-module.ANIMATION_LITERAL.html +2 -2
- package/typedoc/variables/core_di_ng-module.COMPILE_LITERAL.html +2 -2
- package/typedoc/variables/core_di_ng-module.CONTROLLER_LITERAL.html +2 -2
- package/typedoc/variables/core_di_ng-module.FILTER_LITERAL.html +2 -2
- package/typedoc/variables/core_di_ng-module.INJECTOR_LITERAL.html +2 -2
- package/typedoc/variables/core_di_ng-module.PROVIDE_LITERAL.html +2 -2
- package/typedoc/variables/core_parse_interpreter.PURITY_ABSOLUTE.html +2 -2
- package/typedoc/variables/core_parse_interpreter.PURITY_RELATIVE.html +2 -2
- package/typedoc/variables/core_pubsub_pubsub.EventBus.html +2 -2
- package/typedoc/variables/core_sce_sce.SCE_CONTEXTS.html +2 -2
- package/typedoc/variables/core_scope_scope.NONSCOPE.html +2 -2
- package/typedoc/variables/core_scope_scope.__applyAsyncQueue.html +2 -2
- package/typedoc/variables/core_scope_scope._postUpdateQueue.html +2 -2
- package/typedoc/variables/directive_attrs_attrs.REGEX_STRING_REGEXP.html +2 -2
- package/typedoc/variables/directive_attrs_attrs.ngAttributeAliasDirectives.html +2 -2
- package/typedoc/variables/directive_class_class.ngClassDirective.html +5 -5
- package/typedoc/variables/directive_class_class.ngClassEvenDirective.html +5 -5
- package/typedoc/variables/directive_class_class.ngClassOddDirective.html +5 -5
- package/typedoc/variables/directive_events_events.ngEventDirectives.html +2 -2
- package/typedoc/variables/directive_form_form.PENDING_CLASS.html +2 -2
- package/typedoc/variables/directive_form_form.formDirective.html +2 -2
- package/typedoc/variables/directive_form_form.ngFormDirective.html +2 -2
- package/typedoc/variables/directive_form_form.nullFormCtrl.html +2 -2
- package/typedoc/variables/directive_input_input.EMAIL_REGEXP.html +2 -2
- package/typedoc/variables/directive_input_input.ISO_DATE_REGEXP.html +2 -2
- package/typedoc/variables/directive_input_input.URL_REGEXP.html +2 -2
- package/typedoc/variables/directive_input_input.VALIDITY_STATE_PROPERTY.html +2 -2
- package/typedoc/variables/directive_messages_messages.ngMessageDefaultDirective.html +2 -2
- package/typedoc/variables/directive_messages_messages.ngMessageDirective.html +2 -2
- package/typedoc/variables/directive_messages_messages.ngMessageExpDirective.html +2 -2
- package/typedoc/variables/directive_model-options_model-options.defaultModelOptions.html +2 -2
- package/typedoc/variables/directive_model_model.ngModelMinErr.html +2 -2
- package/typedoc/variables/directive_options_options.ngOptionsDirective.html +6 -6
- package/typedoc/variables/directive_transclude_transclude.ngTranscludeDirective.html +6 -6
- package/typedoc/variables/directive_validators_validators.maxlengthDirective.html +12 -12
- package/typedoc/variables/directive_validators_validators.minlengthDirective.html +4 -4
- package/typedoc/variables/directive_validators_validators.patternDirective.html +12 -12
- package/typedoc/variables/directive_validators_validators.requiredDirective.html +12 -12
- package/typedoc/variables/index.angular.html +2 -2
- package/typedoc/variables/public.VERSION.html +3 -7
- package/typedoc/variables/router_common_trace.trace.html +2 -2
- package/typedoc/variables/router_directives_view-directive.ngView.html +7 -7
- package/typedoc/variables/router_hooks_resolve.RESOLVE_HOOK_PRIORITY.html +2 -2
- package/typedoc/variables/router_params_param.DefType.html +2 -2
- package/typedoc/variables/router_resolve_resolvable.defaultResolvePolicy.html +2 -2
- package/typedoc/variables/router_resolve_resolve-context.resolvePolicies.html +2 -2
- package/typedoc/variables/router_transition_transition-service.defaultTransOpts.html +2 -2
- package/typedoc/variables/services_log.LogService.html +4 -4
- package/typedoc/variables/shared_common.assertMap.html +2 -2
- package/typedoc/variables/shared_common.assertPredicate.html +2 -2
- package/typedoc/variables/shared_common.pushTo.html +2 -2
- package/typedoc/variables/shared_common.removeFrom.html +2 -2
- package/typedoc/variables/shared_constants.ALIASED_ATTR.html +2 -2
- package/typedoc/variables/shared_constants.DIRTY_CLASS.html +2 -2
- package/typedoc/variables/shared_constants.EMPTY_CLASS.html +2 -2
- package/typedoc/variables/shared_constants.INVALID_CLASS.html +2 -2
- package/typedoc/variables/shared_constants.NOT_EMPTY_CLASS.html +2 -2
- package/typedoc/variables/shared_constants.PREFIX_REGEXP.html +2 -2
- package/typedoc/variables/shared_constants.PRISTINE_CLASS.html +2 -2
- package/typedoc/variables/shared_constants.SPECIAL_CHARS_REGEXP.html +2 -2
- package/typedoc/variables/shared_constants.TOUCHED_CLASS.html +2 -2
- package/typedoc/variables/shared_constants.UNTOUCHED_CLASS.html +2 -2
- package/typedoc/variables/shared_constants.VALID_CLASS.html +2 -2
- package/typedoc/variables/shared_dom.BOOLEAN_ATTR.html +2 -2
- package/typedoc/variables/shared_hof.propEq.html +2 -2
- package/typedoc/variables/shared_strings.hostRegex.html +2 -2
- package/typedoc/variables/shared_strings.splitEqual.html +2 -2
- package/typedoc/variables/shared_strings.splitHash.html +2 -2
- package/typedoc/variables/shared_strings.splitQuery.html +2 -2
- package/typedoc/variables/shared_utils.isProxySymbol.html +2 -2
- package/typedoc/variables/shared_utils.ngAttrPrefixes.html +2 -2
- package/@types/directive/change/change.d.ts +0 -4
- package/@types/types.d.ts +0 -595
- package/src/types.js +0 -427
- package/typedoc/interfaces/types.FormController.html +0 -1541
- package/typedoc/interfaces/types.Module.html +0 -1566
- package/typedoc/interfaces/types.NgModelController.html +0 -2088
- package/typedoc/types/core_parse_parse.ParseService.html +0 -266
- package/typedoc/types/types.AsyncModelValidators.html +0 -266
- package/typedoc/types/types.BootstrapConfig.html +0 -262
- package/typedoc/types/types.ComponentOptions.html +0 -262
- package/typedoc/types/types.ControllerConstructor.html +0 -262
- package/typedoc/types/types.FilterFactory.html +0 -262
- package/typedoc/types/types.FilterFunction.html +0 -262
- package/typedoc/types/types.ModelValidators.html +0 -266
- package/typedoc/types/types.ServiceProviderFactory.html +0 -262
- package/typedoc/types/types.TElement.html +0 -262
- package/typedoc/types/types.TScope.html +0 -266
- package/typedoc/types/types.TranscludeFunction.html +0 -262
- package/typedoc/types/types.transcludeWithScope.html +0 -262
- package/typedoc/types/types.transcludeWithoutScope.html +0 -262
package/src/core/sce/sce.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
urlResolve,
|
|
5
5
|
} from "./../url-utils/url-utils.js";
|
|
6
6
|
import {
|
|
7
|
+
hasOwn,
|
|
7
8
|
isFunction,
|
|
8
9
|
isRegExp,
|
|
9
10
|
isString,
|
|
@@ -15,7 +16,7 @@ import {
|
|
|
15
16
|
|
|
16
17
|
import { snakeToCamel } from "../../shared/dom.js";
|
|
17
18
|
|
|
18
|
-
/** @typedef {import("../
|
|
19
|
+
/** @typedef {import("../error-handler.ts").ErrorHandler } ErrorHandler */
|
|
19
20
|
|
|
20
21
|
const $sceMinErr = minErr("$sce");
|
|
21
22
|
|
|
@@ -23,7 +24,7 @@ export const SCE_CONTEXTS = {
|
|
|
23
24
|
// HTML is used when there's HTML rendered (e.g. ng-bind-html, iframe srcdoc binding).
|
|
24
25
|
HTML: "html",
|
|
25
26
|
|
|
26
|
-
// Style statements or stylesheets. Currently unused in
|
|
27
|
+
// Style statements or stylesheets. Currently unused in AngularTS.
|
|
27
28
|
CSS: "css",
|
|
28
29
|
|
|
29
30
|
// An URL used in a context where it refers to the source of media, which are not expected to be run
|
|
@@ -39,7 +40,7 @@ export const SCE_CONTEXTS = {
|
|
|
39
40
|
// A value that can be trusted as a RESOURCE_URL, can also trusted as a URL and a MEDIA_URL.
|
|
40
41
|
RESOURCE_URL: "resourceUrl",
|
|
41
42
|
|
|
42
|
-
// Script. Currently unused in
|
|
43
|
+
// Script. Currently unused in AngularTS.
|
|
43
44
|
JS: "js",
|
|
44
45
|
};
|
|
45
46
|
|
|
@@ -85,20 +86,20 @@ export function adjustMatcher(matcher) {
|
|
|
85
86
|
|
|
86
87
|
/**
|
|
87
88
|
* `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict
|
|
88
|
-
* Contextual Escaping (SCE)} services to
|
|
89
|
+
* Contextual Escaping (SCE)} services to AngularTS.
|
|
89
90
|
*
|
|
90
|
-
* For an overview of this service and the functionnality it provides in
|
|
91
|
+
* For an overview of this service and the functionnality it provides in AngularTS, see the main
|
|
91
92
|
* page for {@link ng.$sce SCE}. The current page is targeted for developers who need to alter how
|
|
92
93
|
* SCE works in their application, which shouldn't be needed in most cases.
|
|
93
94
|
*
|
|
94
95
|
* <div class="alert alert-danger">
|
|
95
|
-
*
|
|
96
|
+
* AngularTS strongly relies on contextual escaping for the security of bindings: disabling or
|
|
96
97
|
* modifying this might cause cross site scripting (XSS) vulnerabilities. For libraries owners,
|
|
97
98
|
* changes to this service will also influence users, so be extra careful and document your changes.
|
|
98
99
|
* </div>
|
|
99
100
|
*
|
|
100
101
|
* Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of
|
|
101
|
-
* the `$sce` service to customize the way Strict Contextual Escaping works in
|
|
102
|
+
* the `$sce` service to customize the way Strict Contextual Escaping works in AngularTS. This is
|
|
102
103
|
* because, while the `$sce` provides numerous shorthand methods, etc., you really only need to
|
|
103
104
|
* override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things
|
|
104
105
|
* work because `$sce` delegates to `$sceDelegate` for these operations.
|
|
@@ -108,7 +109,7 @@ export function adjustMatcher(matcher) {
|
|
|
108
109
|
* The default instance of `$sceDelegate` should work out of the box with little pain. While you
|
|
109
110
|
* can override it completely to change the behavior of `$sce`, the common case would
|
|
110
111
|
* involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting
|
|
111
|
-
* your own trusted and banned resource lists for trusting URLs used for loading
|
|
112
|
+
* your own trusted and banned resource lists for trusting URLs used for loading AngularTS resources
|
|
112
113
|
* such as templates. Refer {@link ng.$sceDelegateProvider#trustedResourceUrlList
|
|
113
114
|
* $sceDelegateProvider.trustedResourceUrlList} and {@link
|
|
114
115
|
* ng.$sceDelegateProvider#bannedResourceUrlList $sceDelegateProvider.bannedResourceUrlList}
|
|
@@ -120,13 +121,13 @@ export function adjustMatcher(matcher) {
|
|
|
120
121
|
* $sceDelegate service}, used as a delegate for {@link ng.$sce Strict Contextual Escaping (SCE)}.
|
|
121
122
|
*
|
|
122
123
|
* The `$sceDelegateProvider` allows one to get/set the `trustedResourceUrlList` and
|
|
123
|
-
* `bannedResourceUrlList` used to ensure that the URLs used for sourcing
|
|
124
|
+
* `bannedResourceUrlList` used to ensure that the URLs used for sourcing AngularTS templates and
|
|
124
125
|
* other script-running URLs are safe (all places that use the `$sce.RESOURCE_URL` context). See
|
|
125
126
|
* {@link ng.$sceDelegateProvider#trustedResourceUrlList
|
|
126
127
|
* $sceDelegateProvider.trustedResourceUrlList} and
|
|
127
128
|
* {@link ng.$sceDelegateProvider#bannedResourceUrlList $sceDelegateProvider.bannedResourceUrlList},
|
|
128
129
|
*
|
|
129
|
-
* For the general details about this service in
|
|
130
|
+
* For the general details about this service in AngularTS, read the main page for {@link ng.$sce
|
|
130
131
|
* Strict Contextual Escaping (SCE)}.
|
|
131
132
|
*
|
|
132
133
|
* **Example**: Consider the following case. <a name="example"></a>
|
|
@@ -163,332 +164,408 @@ export function adjustMatcher(matcher) {
|
|
|
163
164
|
* of issues, like for instance attacker-controlled `ng-includes`.
|
|
164
165
|
*/
|
|
165
166
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
167
|
+
/**
|
|
168
|
+
* `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict
|
|
169
|
+
* Contextual Escaping (SCE)} services to AngularTS.
|
|
170
|
+
*
|
|
171
|
+
* For an overview of this service and the functionnality it provides in AngularTS, see the main
|
|
172
|
+
* page for {@link ng.$sce SCE}. The current page is targeted for developers who need to alter how
|
|
173
|
+
* SCE works in their application, which shouldn't be needed in most cases.
|
|
174
|
+
*
|
|
175
|
+
* <div class="alert alert-danger">
|
|
176
|
+
* AngularTS strongly relies on contextual escaping for the security of bindings: disabling or
|
|
177
|
+
* modifying this might cause cross site scripting (XSS) vulnerabilities. For libraries owners,
|
|
178
|
+
* changes to this service will also influence users, so be extra careful and document your changes.
|
|
179
|
+
* </div>
|
|
180
|
+
*
|
|
181
|
+
* Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of
|
|
182
|
+
* the `$sce` service to customize the way Strict Contextual Escaping works in AngularTS. This is
|
|
183
|
+
* because, while the `$sce` provides numerous shorthand methods, etc., you really only need to
|
|
184
|
+
* override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things
|
|
185
|
+
* work because `$sce` delegates to `$sceDelegate` for these operations.
|
|
186
|
+
*
|
|
187
|
+
* Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.
|
|
188
|
+
*
|
|
189
|
+
* The default instance of `$sceDelegate` should work out of the box with little pain. While you
|
|
190
|
+
* can override it completely to change the behavior of `$sce`, the common case would
|
|
191
|
+
* involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting
|
|
192
|
+
* your own trusted and banned resource lists for trusting URLs used for loading AngularTS resources
|
|
193
|
+
* such as templates. Refer {@link ng.$sceDelegateProvider#trustedResourceUrlList
|
|
194
|
+
* $sceDelegateProvider.trustedResourceUrlList} and {@link
|
|
195
|
+
* ng.$sceDelegateProvider#bannedResourceUrlList $sceDelegateProvider.bannedResourceUrlList}
|
|
196
|
+
*/
|
|
197
|
+
/**
|
|
198
|
+
*
|
|
199
|
+
* The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate
|
|
200
|
+
* $sceDelegate service}, used as a delegate for {@link ng.$sce Strict Contextual Escaping (SCE)}.
|
|
201
|
+
*
|
|
202
|
+
* The `$sceDelegateProvider` allows one to get/set the `trustedResourceUrlList` and
|
|
203
|
+
* `bannedResourceUrlList` used to ensure that the URLs used for sourcing AngularTS templates and
|
|
204
|
+
* other script-running URLs are safe (all places that use the `$sce.RESOURCE_URL` context). See
|
|
205
|
+
* {@link ng.$sceDelegateProvider#trustedResourceUrlList
|
|
206
|
+
* $sceDelegateProvider.trustedResourceUrlList} and
|
|
207
|
+
* {@link ng.$sceDelegateProvider#bannedResourceUrlList $sceDelegateProvider.bannedResourceUrlList},
|
|
208
|
+
*
|
|
209
|
+
* For the general details about this service in AngularTS, read the main page for {@link ng.$sce
|
|
210
|
+
* Strict Contextual Escaping (SCE)}.
|
|
211
|
+
*
|
|
212
|
+
* **Example**: Consider the following case. <a name="example"></a>
|
|
213
|
+
*
|
|
214
|
+
* - your app is hosted at url `http://myapp.example.com/`
|
|
215
|
+
* - but some of your templates are hosted on other domains you control such as
|
|
216
|
+
* `http://srv01.assets.example.com/`, `http://srv02.assets.example.com/`, etc.
|
|
217
|
+
* - and you have an open redirect at `http://myapp.example.com/clickThru?...`.
|
|
218
|
+
*
|
|
219
|
+
* Here is what a secure configuration for this scenario might look like:
|
|
220
|
+
*
|
|
221
|
+
* ```
|
|
222
|
+
* angular.module('myApp', []).config(function($sceDelegateProvider) {
|
|
223
|
+
* $sceDelegateProvider.trustedResourceUrlList([
|
|
224
|
+
* // Allow same origin resource loads.
|
|
225
|
+
* 'self',
|
|
226
|
+
* // Allow loading from our assets domain. Notice the difference between * and **.
|
|
227
|
+
* 'http://srv*.assets.example.com/**'
|
|
228
|
+
* ]);
|
|
229
|
+
*
|
|
230
|
+
* // The banned resource URL list overrides the trusted resource URL list so the open redirect
|
|
231
|
+
* // here is blocked.
|
|
232
|
+
* $sceDelegateProvider.bannedResourceUrlList([
|
|
233
|
+
* 'http://myapp.example.com/clickThru**'
|
|
234
|
+
* ]);
|
|
235
|
+
* });
|
|
236
|
+
* ```
|
|
237
|
+
* Note that an empty trusted resource URL list will block every resource URL from being loaded, and will require
|
|
238
|
+
* you to manually mark each one as trusted with `$sce.trustAsResourceUrl`. However, templates
|
|
239
|
+
* requested by {@link ng.$templateRequest $templateRequest} that are present in
|
|
240
|
+
* {@link ng.$templateCache $templateCache} will not go through this check. If you have a mechanism
|
|
241
|
+
* to populate your templates in that cache at config time, then it is a good idea to remove 'self'
|
|
242
|
+
* from the trusted resource URL lsit. This helps to mitigate the security impact of certain types
|
|
243
|
+
* of issues, like for instance attacker-controlled `ng-includes`.
|
|
244
|
+
*/
|
|
245
|
+
export class SceDelegateProvider {
|
|
246
|
+
constructor() {
|
|
247
|
+
this.SCE_CONTEXTS = SCE_CONTEXTS;
|
|
200
248
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
* the value provided. This must be an array or null. A snapshot of this array is used so
|
|
205
|
-
* further changes to the array are ignored.</p><p>
|
|
206
|
-
* Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
|
|
207
|
-
* allowed in this array.</p><p>
|
|
208
|
-
* The typical usage for the `bannedResourceUrlList` is to **block
|
|
209
|
-
* [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as
|
|
210
|
-
* these would otherwise be trusted but actually return content from the redirected domain.
|
|
211
|
-
* </p><p>
|
|
212
|
-
* Finally, **the banned resource URL list overrides the trusted resource URL list** and has
|
|
213
|
-
* the final say.
|
|
214
|
-
*
|
|
215
|
-
* @return {Array} The currently set `bannedResourceUrlList` array.
|
|
216
|
-
*
|
|
217
|
-
* @description
|
|
218
|
-
* Sets/Gets the `bannedResourceUrlList` of trusted resource URLs.
|
|
219
|
-
*
|
|
220
|
-
* The **default value** when no trusted resource URL list has been explicitly set is the empty
|
|
221
|
-
* array (i.e. there is no `bannedResourceUrlList`.)
|
|
222
|
-
*/
|
|
223
|
-
this.bannedResourceUrlList = function (value) {
|
|
224
|
-
if (arguments.length) {
|
|
225
|
-
bannedResourceUrlList = value.map((v) => adjustMatcher(v));
|
|
226
|
-
}
|
|
227
|
-
return bannedResourceUrlList;
|
|
228
|
-
};
|
|
249
|
+
// Resource URLs can also be trusted by policy.
|
|
250
|
+
let trustedResourceUrlList = ["self"];
|
|
251
|
+
let bannedResourceUrlList = [];
|
|
229
252
|
|
|
230
|
-
this.$get = [
|
|
231
|
-
"$injector",
|
|
232
|
-
"$$sanitizeUri",
|
|
233
|
-
"$exceptionHandler",
|
|
234
253
|
/**
|
|
235
254
|
*
|
|
236
|
-
* @param {
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
* @
|
|
255
|
+
* @param {Array=} trustedResourceUrlList When provided, replaces the trustedResourceUrlList with
|
|
256
|
+
* the value provided. This must be an array or null. A snapshot of this array is used so
|
|
257
|
+
* further changes to the array are ignored.
|
|
258
|
+
* Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
|
|
259
|
+
* allowed in this array.
|
|
260
|
+
*
|
|
261
|
+
* @return {Array} The currently set trusted resource URL array.
|
|
262
|
+
*
|
|
263
|
+
* @description
|
|
264
|
+
* Sets/Gets the list trusted of resource URLs.
|
|
265
|
+
*
|
|
266
|
+
* The **default value** when no `trustedResourceUrlList` has been explicitly set is `['self']`
|
|
267
|
+
* allowing only same origin resource requests.
|
|
268
|
+
*
|
|
269
|
+
* <div class="alert alert-warning">
|
|
270
|
+
* **Note:** the default `trustedResourceUrlList` of 'self' is not recommended if your app shares
|
|
271
|
+
* its origin with other apps! It is a good idea to limit it to only your application's directory.
|
|
272
|
+
* </div>
|
|
240
273
|
*/
|
|
241
|
-
function (
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
),
|
|
248
|
-
);
|
|
249
|
-
return;
|
|
250
|
-
};
|
|
274
|
+
this.trustedResourceUrlList = function (value) {
|
|
275
|
+
if (arguments.length) {
|
|
276
|
+
trustedResourceUrlList = value.map((v) => adjustMatcher(v));
|
|
277
|
+
}
|
|
278
|
+
return trustedResourceUrlList;
|
|
279
|
+
};
|
|
251
280
|
|
|
252
|
-
|
|
253
|
-
|
|
281
|
+
/**
|
|
282
|
+
*
|
|
283
|
+
* @param {Array=} bannedResourceUrlList When provided, replaces the `bannedResourceUrlList` with
|
|
284
|
+
* the value provided. This must be an array or null. A snapshot of this array is used so
|
|
285
|
+
* further changes to the array are ignored.</p><p>
|
|
286
|
+
* Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
|
|
287
|
+
* allowed in this array.</p><p>
|
|
288
|
+
* The typical usage for the `bannedResourceUrlList` is to **block
|
|
289
|
+
* [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as
|
|
290
|
+
* these would otherwise be trusted but actually return content from the redirected domain.
|
|
291
|
+
* </p><p>
|
|
292
|
+
* Finally, **the banned resource URL list overrides the trusted resource URL list** and has
|
|
293
|
+
* the final say.
|
|
294
|
+
*
|
|
295
|
+
* @return {Array} The currently set `bannedResourceUrlList` array.
|
|
296
|
+
*
|
|
297
|
+
* @description
|
|
298
|
+
* Sets/Gets the `bannedResourceUrlList` of trusted resource URLs.
|
|
299
|
+
*
|
|
300
|
+
* The **default value** when no trusted resource URL list has been explicitly set is the empty
|
|
301
|
+
* array (i.e. there is no `bannedResourceUrlList`.)
|
|
302
|
+
*/
|
|
303
|
+
this.bannedResourceUrlList = function (value) {
|
|
304
|
+
if (arguments.length) {
|
|
305
|
+
bannedResourceUrlList = value.map((v) => adjustMatcher(v));
|
|
254
306
|
}
|
|
307
|
+
return bannedResourceUrlList;
|
|
308
|
+
};
|
|
255
309
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
310
|
+
this.$get = [
|
|
311
|
+
"$injector",
|
|
312
|
+
"$$sanitizeUri",
|
|
313
|
+
"$exceptionHandler",
|
|
314
|
+
/**
|
|
315
|
+
*
|
|
316
|
+
* @param {import("../../core/di/internal-injector").InjectorService} $injector
|
|
317
|
+
* @param {*} $$sanitizeUri
|
|
318
|
+
* @param {ErrorHandler} $exceptionHandler
|
|
319
|
+
* @returns
|
|
320
|
+
*/
|
|
321
|
+
function ($injector, $$sanitizeUri, $exceptionHandler) {
|
|
322
|
+
let htmlSanitizer = function () {
|
|
323
|
+
$exceptionHandler(
|
|
324
|
+
$sceMinErr(
|
|
325
|
+
"unsafe",
|
|
326
|
+
"Attempting to use an unsafe value in a safe context.",
|
|
327
|
+
),
|
|
260
328
|
);
|
|
329
|
+
return;
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
if ($injector.has("$sanitize")) {
|
|
333
|
+
htmlSanitizer = $injector.get("$sanitize");
|
|
261
334
|
}
|
|
262
|
-
// definitely a regex. See adjustMatchers()
|
|
263
|
-
return !!matcher.exec(parsedUrl.href);
|
|
264
|
-
}
|
|
265
335
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
// Ensure that at least one item from the trusted resource URL list allows this url.
|
|
272
|
-
for (i = 0, n = trustedResourceUrlList.length; i < n; i++) {
|
|
273
|
-
if (matchUrl(trustedResourceUrlList[i], parsedUrl)) {
|
|
274
|
-
allowed = true;
|
|
275
|
-
break;
|
|
336
|
+
function matchUrl(matcher, parsedUrl) {
|
|
337
|
+
if (matcher === "self") {
|
|
338
|
+
return (
|
|
339
|
+
urlIsSameOrigin(parsedUrl) || urlIsSameOriginAsBaseUrl(parsedUrl)
|
|
340
|
+
);
|
|
276
341
|
}
|
|
342
|
+
// definitely a regex. See adjustMatchers()
|
|
343
|
+
return !!matcher.exec(parsedUrl.href);
|
|
277
344
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
345
|
+
|
|
346
|
+
function isResourceUrlAllowedByPolicy(url) {
|
|
347
|
+
const parsedUrl = urlResolve(url.toString());
|
|
348
|
+
let i;
|
|
349
|
+
let n;
|
|
350
|
+
let allowed = false;
|
|
351
|
+
// Ensure that at least one item from the trusted resource URL list allows this url.
|
|
352
|
+
for (i = 0, n = trustedResourceUrlList.length; i < n; i++) {
|
|
353
|
+
if (matchUrl(trustedResourceUrlList[i], parsedUrl)) {
|
|
354
|
+
allowed = true;
|
|
283
355
|
break;
|
|
284
356
|
}
|
|
285
357
|
}
|
|
358
|
+
if (allowed) {
|
|
359
|
+
// Ensure that no item from the banned resource URL list has blocked this url.
|
|
360
|
+
for (i = 0, n = bannedResourceUrlList.length; i < n; i++) {
|
|
361
|
+
if (matchUrl(bannedResourceUrlList[i], parsedUrl)) {
|
|
362
|
+
allowed = false;
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
return allowed;
|
|
286
368
|
}
|
|
287
|
-
return allowed;
|
|
288
|
-
}
|
|
289
369
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
370
|
+
function generateHolderType(Base) {
|
|
371
|
+
const holderType = function TrustedValueHolderType(trustedValue) {
|
|
372
|
+
this.$$unwrapTrustedValue = function () {
|
|
373
|
+
return trustedValue;
|
|
374
|
+
};
|
|
294
375
|
};
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
376
|
+
if (Base) {
|
|
377
|
+
holderType.prototype = new Base();
|
|
378
|
+
}
|
|
379
|
+
holderType.prototype.valueOf = function sceValueOf() {
|
|
380
|
+
return this.$$unwrapTrustedValue();
|
|
381
|
+
};
|
|
382
|
+
holderType.prototype.toString = function sceToString() {
|
|
383
|
+
return this.$$unwrapTrustedValue().toString();
|
|
384
|
+
};
|
|
385
|
+
return holderType;
|
|
298
386
|
}
|
|
299
|
-
holderType.prototype.valueOf = function sceValueOf() {
|
|
300
|
-
return this.$$unwrapTrustedValue();
|
|
301
|
-
};
|
|
302
|
-
holderType.prototype.toString = function sceToString() {
|
|
303
|
-
return this.$$unwrapTrustedValue().toString();
|
|
304
|
-
};
|
|
305
|
-
return holderType;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
const trustedValueHolderBase = generateHolderType();
|
|
309
|
-
const byType = {};
|
|
310
387
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
byType[SCE_CONTEXTS.MEDIA_URL] = generateHolderType(
|
|
314
|
-
trustedValueHolderBase,
|
|
315
|
-
);
|
|
316
|
-
byType[SCE_CONTEXTS.URL] = generateHolderType(
|
|
317
|
-
byType[SCE_CONTEXTS.MEDIA_URL],
|
|
318
|
-
);
|
|
319
|
-
byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);
|
|
320
|
-
byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(
|
|
321
|
-
byType[SCE_CONTEXTS.URL],
|
|
322
|
-
);
|
|
388
|
+
const trustedValueHolderBase = generateHolderType();
|
|
389
|
+
const byType = {};
|
|
323
390
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
* escaping.
|
|
337
|
-
*
|
|
338
|
-
* @param {string} type The context in which this value is safe for use, e.g. `$sce.URL`,
|
|
339
|
-
* `$sce.RESOURCE_URL`, `$sce.HTML`, `$sce.JS` or `$sce.CSS`.
|
|
340
|
-
*
|
|
341
|
-
* @param {*} trustedValue The value that should be considered trusted.
|
|
342
|
-
* @return {*} A trusted representation of value, that can be used in the given context.
|
|
343
|
-
*/
|
|
344
|
-
function trustAs(type, trustedValue) {
|
|
345
|
-
const Constructor = Object.prototype.hasOwnProperty.call(byType, type)
|
|
346
|
-
? byType[type]
|
|
347
|
-
: null;
|
|
348
|
-
if (!Constructor) {
|
|
349
|
-
$exceptionHandler(
|
|
350
|
-
$sceMinErr(
|
|
351
|
-
"icontext",
|
|
352
|
-
"Attempted to trust a value in invalid context. Context: {0}; Value: {1}",
|
|
353
|
-
type,
|
|
354
|
-
trustedValue,
|
|
355
|
-
),
|
|
356
|
-
);
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
if (
|
|
360
|
-
trustedValue === null ||
|
|
361
|
-
isUndefined(trustedValue) ||
|
|
362
|
-
trustedValue === ""
|
|
363
|
-
) {
|
|
364
|
-
return trustedValue;
|
|
365
|
-
}
|
|
366
|
-
// All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting
|
|
367
|
-
// mutable objects, we ensure here that the value passed in is actually a string.
|
|
368
|
-
if (typeof trustedValue !== "string") {
|
|
369
|
-
$exceptionHandler(
|
|
370
|
-
$sceMinErr(
|
|
371
|
-
"itype",
|
|
372
|
-
"Attempted to trust a non-string value in a content requiring a string: Context: {0}",
|
|
373
|
-
type,
|
|
374
|
-
),
|
|
375
|
-
);
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
return new Constructor(trustedValue);
|
|
379
|
-
}
|
|
391
|
+
byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);
|
|
392
|
+
byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);
|
|
393
|
+
byType[SCE_CONTEXTS.MEDIA_URL] = generateHolderType(
|
|
394
|
+
trustedValueHolderBase,
|
|
395
|
+
);
|
|
396
|
+
byType[SCE_CONTEXTS.URL] = generateHolderType(
|
|
397
|
+
byType[SCE_CONTEXTS.MEDIA_URL],
|
|
398
|
+
);
|
|
399
|
+
byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);
|
|
400
|
+
byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(
|
|
401
|
+
byType[SCE_CONTEXTS.URL],
|
|
402
|
+
);
|
|
380
403
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
404
|
+
/**
|
|
405
|
+
* Returns a trusted representation of the parameter for the specified context. This trusted
|
|
406
|
+
* object will later on be used as-is, without any security check, by bindings or directives
|
|
407
|
+
* that require this security context.
|
|
408
|
+
* For instance, marking a string as trusted for the `$sce.HTML` context will entirely bypass
|
|
409
|
+
* the potential `$sanitize` call in corresponding `$sce.HTML` bindings or directives, such as
|
|
410
|
+
* `ng-bind-html`. Note that in most cases you won't need to call this function: if you have the
|
|
411
|
+
* sanitizer loaded, passing the value itself will render all the HTML that does not pose a
|
|
412
|
+
* security risk.
|
|
413
|
+
*
|
|
414
|
+
* See {@link ng.$sceDelegate#getTrusted getTrusted} for the function that will consume those
|
|
415
|
+
* trusted values, and {@link ng.$sce $sce} for general documentation about strict contextual
|
|
416
|
+
* escaping.
|
|
417
|
+
*
|
|
418
|
+
* @param {string} type The context in which this value is safe for use, e.g. `$sce.URL`,
|
|
419
|
+
* `$sce.RESOURCE_URL`, `$sce.HTML`, `$sce.JS` or `$sce.CSS`.
|
|
420
|
+
*
|
|
421
|
+
* @param {*} trustedValue The value that should be considered trusted.
|
|
422
|
+
* @return {*} A trusted representation of value, that can be used in the given context.
|
|
423
|
+
*/
|
|
424
|
+
function trustAs(type, trustedValue) {
|
|
425
|
+
const Constructor = hasOwn(byType, type) ? byType[type] : null;
|
|
426
|
+
if (!Constructor) {
|
|
427
|
+
$exceptionHandler(
|
|
428
|
+
$sceMinErr(
|
|
429
|
+
"icontext",
|
|
430
|
+
"Attempted to trust a value in invalid context. Context: {0}; Value: {1}",
|
|
431
|
+
type,
|
|
432
|
+
trustedValue,
|
|
433
|
+
),
|
|
434
|
+
);
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
if (
|
|
438
|
+
trustedValue === null ||
|
|
439
|
+
isUndefined(trustedValue) ||
|
|
440
|
+
trustedValue === ""
|
|
441
|
+
) {
|
|
442
|
+
return trustedValue;
|
|
443
|
+
}
|
|
444
|
+
// All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting
|
|
445
|
+
// mutable objects, we ensure here that the value passed in is actually a string.
|
|
446
|
+
if (typeof trustedValue !== "string") {
|
|
447
|
+
$exceptionHandler(
|
|
448
|
+
$sceMinErr(
|
|
449
|
+
"itype",
|
|
450
|
+
"Attempted to trust a non-string value in a content requiring a string: Context: {0}",
|
|
451
|
+
type,
|
|
452
|
+
),
|
|
453
|
+
);
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
return new Constructor(trustedValue);
|
|
398
457
|
}
|
|
399
|
-
return maybeTrusted;
|
|
400
|
-
}
|
|
401
458
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
*
|
|
421
|
-
* <div class="alert alert-danger">
|
|
422
|
-
* Disabling auto-escaping is extremely dangerous, it usually creates a Cross Site Scripting
|
|
423
|
-
* (XSS) vulnerability in your application.
|
|
424
|
-
* </div>
|
|
425
|
-
*
|
|
426
|
-
* @param {string} type The context in which this value is to be used (such as `$sce.HTML`).
|
|
427
|
-
* @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs
|
|
428
|
-
* `$sceDelegate.trustAs`} call, or anything else (which will not be considered trusted.)
|
|
429
|
-
* @return {*} A version of the value that's safe to use in the given context, or throws an
|
|
430
|
-
* exception if this is impossible.
|
|
431
|
-
*/
|
|
432
|
-
function getTrusted(type, maybeTrusted) {
|
|
433
|
-
if (
|
|
434
|
-
maybeTrusted === null ||
|
|
435
|
-
isUndefined(maybeTrusted) ||
|
|
436
|
-
maybeTrusted === ""
|
|
437
|
-
) {
|
|
459
|
+
/**
|
|
460
|
+
* If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs
|
|
461
|
+
* `$sceDelegate.trustAs`}, returns the value that had been passed to {@link
|
|
462
|
+
* ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.
|
|
463
|
+
*
|
|
464
|
+
* If the passed parameter is not a value that had been returned by {@link
|
|
465
|
+
* ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, it must be returned as-is.
|
|
466
|
+
*
|
|
467
|
+
* @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}
|
|
468
|
+
* call or anything else.
|
|
469
|
+
* @return {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs
|
|
470
|
+
* `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns
|
|
471
|
+
* `value` unchanged.
|
|
472
|
+
*/
|
|
473
|
+
function valueOf(maybeTrusted) {
|
|
474
|
+
if (maybeTrusted instanceof trustedValueHolderBase) {
|
|
475
|
+
return maybeTrusted.$$unwrapTrustedValue();
|
|
476
|
+
}
|
|
438
477
|
return maybeTrusted;
|
|
439
478
|
}
|
|
440
|
-
const constructor = Object.prototype.hasOwnProperty.call(byType, type)
|
|
441
|
-
? byType[type]
|
|
442
|
-
: null;
|
|
443
|
-
// If maybeTrusted is a trusted class instance or subclass instance, then unwrap and return
|
|
444
|
-
// as-is.
|
|
445
|
-
if (constructor && maybeTrusted instanceof constructor) {
|
|
446
|
-
return maybeTrusted.$$unwrapTrustedValue();
|
|
447
|
-
}
|
|
448
479
|
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
480
|
+
/**
|
|
481
|
+
* @description
|
|
482
|
+
* Given an object and a security context in which to assign it, returns a value that's safe to
|
|
483
|
+
* use in this context, which was represented by the parameter. To do so, this function either
|
|
484
|
+
* unwraps the safe type it has been given (for instance, a {@link ng.$sceDelegate#trustAs
|
|
485
|
+
* `$sceDelegate.trustAs`} result), or it might try to sanitize the value given, depending on
|
|
486
|
+
* the context and sanitizer availablility.
|
|
487
|
+
*
|
|
488
|
+
* The contexts that can be sanitized are $sce.MEDIA_URL, $sce.URL and $sce.HTML. The first two are available
|
|
489
|
+
* by default, and the third one relies on the `$sanitize` service (which may be loaded through
|
|
490
|
+
* the `ngSanitize` module). Furthermore, for $sce.RESOURCE_URL context, a plain string may be
|
|
491
|
+
* accepted if the resource url policy defined by {@link ng.$sceDelegateProvider#trustedResourceUrlList
|
|
492
|
+
* `$sceDelegateProvider.trustedResourceUrlList`} and {@link ng.$sceDelegateProvider#bannedResourceUrlList
|
|
493
|
+
* `$sceDelegateProvider.bannedResourceUrlList`} accepts that resource.
|
|
494
|
+
*
|
|
495
|
+
* This function will throw if the safe type isn't appropriate for this context, or if the
|
|
496
|
+
* value given cannot be accepted in the context (which might be caused by sanitization not
|
|
497
|
+
* being available, or the value not being recognized as safe).
|
|
498
|
+
*
|
|
499
|
+
* <div class="alert alert-danger">
|
|
500
|
+
* Disabling auto-escaping is extremely dangerous, it usually creates a Cross Site Scripting
|
|
501
|
+
* (XSS) vulnerability in your application.
|
|
502
|
+
* </div>
|
|
503
|
+
*
|
|
504
|
+
* @param {string} type The context in which this value is to be used (such as `$sce.HTML`).
|
|
505
|
+
* @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs
|
|
506
|
+
* `$sceDelegate.trustAs`} call, or anything else (which will not be considered trusted.)
|
|
507
|
+
* @return {*} A version of the value that's safe to use in the given context, or throws an
|
|
508
|
+
* exception if this is impossible.
|
|
509
|
+
*/
|
|
510
|
+
function getTrusted(type, maybeTrusted) {
|
|
511
|
+
if (
|
|
512
|
+
maybeTrusted === null ||
|
|
513
|
+
isUndefined(maybeTrusted) ||
|
|
514
|
+
maybeTrusted === ""
|
|
515
|
+
) {
|
|
465
516
|
return maybeTrusted;
|
|
466
517
|
}
|
|
518
|
+
const constructor = hasOwn(byType, type) ? byType[type] : null;
|
|
519
|
+
// If maybeTrusted is a trusted class instance or subclass instance, then unwrap and return
|
|
520
|
+
// as-is.
|
|
521
|
+
if (constructor && maybeTrusted instanceof constructor) {
|
|
522
|
+
return maybeTrusted.$$unwrapTrustedValue();
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
// If maybeTrusted is a trusted class instance but not of the correct trusted type
|
|
526
|
+
// then unwrap it and allow it to pass through to the rest of the checks
|
|
527
|
+
if (isFunction(maybeTrusted.$$unwrapTrustedValue)) {
|
|
528
|
+
maybeTrusted = maybeTrusted.$$unwrapTrustedValue();
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
// If we get here, then we will either sanitize the value or throw an exception.
|
|
532
|
+
if (type === SCE_CONTEXTS.MEDIA_URL || type === SCE_CONTEXTS.URL) {
|
|
533
|
+
// we attempt to sanitize non-resource URLs
|
|
534
|
+
return $$sanitizeUri(
|
|
535
|
+
maybeTrusted.toString(),
|
|
536
|
+
type === SCE_CONTEXTS.MEDIA_URL,
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
if (type === SCE_CONTEXTS.RESOURCE_URL) {
|
|
540
|
+
if (isResourceUrlAllowedByPolicy(maybeTrusted)) {
|
|
541
|
+
return maybeTrusted;
|
|
542
|
+
}
|
|
543
|
+
$exceptionHandler(
|
|
544
|
+
$sceMinErr(
|
|
545
|
+
"insecurl",
|
|
546
|
+
"Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",
|
|
547
|
+
maybeTrusted.toString(),
|
|
548
|
+
),
|
|
549
|
+
);
|
|
550
|
+
return;
|
|
551
|
+
} else if (type === SCE_CONTEXTS.HTML) {
|
|
552
|
+
// htmlSanitizer throws its own error when no sanitizer is available.
|
|
553
|
+
return htmlSanitizer();
|
|
554
|
+
}
|
|
555
|
+
// Default error when the $sce service has no way to make the input safe.
|
|
467
556
|
$exceptionHandler(
|
|
468
557
|
$sceMinErr(
|
|
469
|
-
"
|
|
470
|
-
"
|
|
471
|
-
maybeTrusted.toString(),
|
|
558
|
+
"unsafe",
|
|
559
|
+
"Attempting to use an unsafe value in a safe context.",
|
|
472
560
|
),
|
|
473
561
|
);
|
|
474
562
|
return;
|
|
475
|
-
} else if (type === SCE_CONTEXTS.HTML) {
|
|
476
|
-
// htmlSanitizer throws its own error when no sanitizer is available.
|
|
477
|
-
return htmlSanitizer();
|
|
478
563
|
}
|
|
479
|
-
// Default error when the $sce service has no way to make the input safe.
|
|
480
|
-
$exceptionHandler(
|
|
481
|
-
$sceMinErr(
|
|
482
|
-
"unsafe",
|
|
483
|
-
"Attempting to use an unsafe value in a safe context.",
|
|
484
|
-
),
|
|
485
|
-
);
|
|
486
|
-
return;
|
|
487
|
-
}
|
|
488
564
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
565
|
+
return { trustAs, getTrusted, valueOf };
|
|
566
|
+
},
|
|
567
|
+
];
|
|
568
|
+
}
|
|
492
569
|
}
|
|
493
570
|
|
|
494
571
|
export function SceProvider() {
|
|
@@ -539,7 +616,7 @@ export function SceProvider() {
|
|
|
539
616
|
}
|
|
540
617
|
|
|
541
618
|
/**
|
|
542
|
-
* Converts
|
|
619
|
+
* Converts AngularTS {@link guide/expression expression} into a function. This is like {@link
|
|
543
620
|
* ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it
|
|
544
621
|
* wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,
|
|
545
622
|
* *result*)}
|
|
@@ -564,7 +641,7 @@ export function SceProvider() {
|
|
|
564
641
|
/**
|
|
565
642
|
* Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such, returns a
|
|
566
643
|
* wrapped object that represents your value, and the trust you have in its safety for the given
|
|
567
|
-
* context.
|
|
644
|
+
* context. AngularTS can then use that value as-is in bindings of the specified secure context.
|
|
568
645
|
* This is used in bindings for `ng-bind-html`, `ng-include`, and most `src` attribute
|
|
569
646
|
* interpolations. See {@link ng.$sce $sce} for strict contextual escaping.
|
|
570
647
|
*
|