@angular-wave/angular.ts 0.9.3 → 0.9.5
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/@types/angular.d.ts +4 -19
- package/@types/animations/animate.d.ts +2 -2
- package/@types/animations/animation.d.ts +1 -1
- package/@types/core/compile/attributes.d.ts +1 -1
- package/@types/core/compile/compile.d.ts +2 -2
- package/@types/core/controller/controller.d.ts +1 -1
- package/@types/core/controller/interface.d.ts +6 -0
- package/@types/core/di/ng-module.d.ts +27 -26
- package/@types/core/filter/filter.d.ts +5 -5
- package/@types/core/interpolate/interface.d.ts +13 -0
- package/@types/core/interpolate/interpolate.d.ts +1 -13
- package/@types/core/scope/scope.d.ts +4 -1
- package/@types/directive/http/http.d.ts +16 -16
- package/@types/directive/http/interface.d.ts +27 -0
- package/@types/directive/include/include.d.ts +4 -4
- package/@types/directive/inject/inject.d.ts +12 -0
- package/@types/directive/model/model.d.ts +1 -1
- package/@types/directive/script/script.d.ts +2 -2
- package/@types/directive/setter/setter.d.ts +4 -4
- package/@types/filters/filter.d.ts +2 -2
- package/@types/filters/filters.d.ts +2 -2
- package/@types/filters/interface.d.ts +8 -0
- package/@types/filters/limit-to.d.ts +2 -2
- package/@types/filters/order-by.d.ts +2 -2
- package/@types/interface.d.ts +105 -82
- package/@types/namespace.d.ts +76 -0
- package/@types/router/state/interface.d.ts +8 -8
- package/@types/router/state-filters.d.ts +4 -4
- package/@types/router/template-factory.d.ts +8 -8
- package/@types/router/transition/hook-builder.d.ts +5 -2
- package/@types/router/transition/hook-registry.d.ts +11 -2
- package/@types/router/transition/transition-service.d.ts +6 -2
- package/@types/router/transition/transition.d.ts +2 -2
- package/@types/router/view/view.d.ts +1 -8
- package/@types/router/view-scroll.d.ts +4 -2
- package/@types/services/{anchor-scroll.d.ts → anchor-scroll/anchor-scroll.d.ts} +2 -2
- package/@types/services/exception/exception-handler.d.ts +2 -2
- package/@types/services/exception/interface.d.ts +1 -1
- package/@types/services/http/http.d.ts +40 -2
- package/@types/services/http/interface.d.ts +11 -0
- package/@types/services/location/location.d.ts +1 -4
- package/@types/services/sce/sce.d.ts +3 -4
- package/@types/services/template-cache/template-cache.d.ts +4 -4
- package/@types/services/template-request/interface.d.ts +22 -0
- package/@types/services/{template-request.d.ts → template-request/template-request.d.ts} +4 -7
- package/@types/shared/common.d.ts +8 -69
- package/@types/shared/hof.d.ts +7 -7
- package/dist/angular-ts.esm.js +510 -570
- package/dist/angular-ts.umd.js +510 -570
- package/dist/angular-ts.umd.min.js +1 -1
- package/package.json +8 -1
- package/.github/workflows/ci.yml +0 -104
- package/.github/workflows/gh-pages.yml +0 -75
- package/.husky/pre-commit +0 -5
- package/.prettierignore +0 -9
- package/@types/services/cookie-reader.d.ts +0 -4
- package/@types/services/http-backend/http-backend.d.ts +0 -58
- package/@types/services/template-cache/interface.d.ts +0 -10
- package/CHANGELOG.md +0 -17667
- package/CODE_OF_CONDUCT.md +0 -3
- package/CONTRIBUTING.md +0 -247
- package/DEVELOPERS.md +0 -499
- package/Makefile +0 -60
- package/RELEASE.md +0 -86
- package/TRIAGING.md +0 -127
- package/docs/.cspell.yml +0 -8
- package/docs/.github/dependabot.yml +0 -14
- package/docs/.nvmrc +0 -1
- package/docs/CONTRIBUTING.md +0 -28
- package/docs/Dockerfile +0 -4
- package/docs/LICENSE +0 -201
- package/docs/README.md +0 -217
- package/docs/assets/icons/logo.svg +0 -1
- package/docs/assets/scss/_variables_project.scss +0 -12
- package/docs/assets/scss/_variables_project_after_bs.scss +0 -8
- package/docs/assets/scss/index.scss +0 -48
- package/docs/config.yaml +0 -15
- package/docs/content/_index.md +0 -28
- package/docs/content/docs/_index.md +0 -61
- package/docs/content/docs/directive/_index.md +0 -4
- package/docs/content/docs/directive/app.md +0 -11
- package/docs/content/docs/directive/aria.md +0 -0
- package/docs/content/docs/directive/bind.md +0 -72
- package/docs/content/docs/directive/blur.md +0 -38
- package/docs/content/docs/directive/channel.md +0 -37
- package/docs/content/docs/directive/class-even.md +0 -47
- package/docs/content/docs/directive/class-odd.md +0 -48
- package/docs/content/docs/directive/class.md +0 -64
- package/docs/content/docs/directive/click.md +0 -41
- package/docs/content/docs/directive/cloak.md +0 -74
- package/docs/content/docs/directive/copy.md +0 -38
- package/docs/content/docs/directive/cut.md +0 -40
- package/docs/content/docs/directive/dblclick.md +0 -41
- package/docs/content/docs/directive/focus.md +0 -38
- package/docs/content/docs/directive/get.md +0 -203
- package/docs/content/docs/directive/include.md +0 -7
- package/docs/content/docs/directive/keydown.md +0 -38
- package/docs/content/docs/directive/keyup.md +0 -38
- package/docs/content/docs/directive/load.md +0 -43
- package/docs/content/docs/directive/mousedown.md +0 -38
- package/docs/content/docs/directive/mouseenter.md +0 -38
- package/docs/content/docs/directive/mouseleave.md +0 -38
- package/docs/content/docs/directive/mousemove.md +0 -38
- package/docs/content/docs/directive/mouseout.md +0 -38
- package/docs/content/docs/directive/mouseover.md +0 -38
- package/docs/content/docs/directive/mouseup.md +0 -38
- package/docs/content/docs/directive/non-bindable.md +0 -28
- package/docs/content/docs/filter/_index.md +0 -4
- package/docs/content/docs/provider/_index.md +0 -4
- package/docs/content/docs/provider/eventBusProvider.md +0 -35
- package/docs/content/docs/provider/locationProvider.md +0 -26
- package/docs/content/docs/provider/logProvider.md +0 -59
- package/docs/content/docs/provider/templateCacheProvider.md +0 -100
- package/docs/content/docs/service/_index.md +0 -4
- package/docs/content/docs/service/eventBus.md +0 -56
- package/docs/content/docs/service/location.md +0 -57
- package/docs/content/docs/service/log.md +0 -113
- package/docs/content/docs/service/templateCache.md +0 -64
- package/docs/content/docs/service/url.md +0 -5
- package/docs/docker-compose.yaml +0 -12
- package/docs/docsy.work +0 -5
- package/docs/docsy.work.sum +0 -0
- package/docs/go.mod +0 -5
- package/docs/go.sum +0 -6
- package/docs/hugo-disabled.toml +0 -220
- package/docs/hugo.yaml +0 -200
- package/docs/layouts/404.html +0 -13
- package/docs/layouts/_markup/render-heading.html +0 -1
- package/docs/layouts/partials/hooks/head-end.html +0 -3
- package/docs/layouts/shortcodes/showcss.html +0 -2
- package/docs/layouts/shortcodes/showhtml.html +0 -2
- package/docs/layouts/shortcodes/showjs.html +0 -2
- package/docs/layouts/shortcodes/showraw.html +0 -1
- package/docs/layouts/shortcodes/version.html +0 -1
- package/docs/package-lock.json +0 -2293
- package/docs/package.json +0 -53
- package/docs/static/examples/counter/counter-test.html +0 -13
- package/docs/static/examples/counter/counter.html +0 -5
- package/docs/static/examples/counter/counter.test.js +0 -28
- package/docs/static/examples/eventbus/eventbus-test.html +0 -15
- package/docs/static/examples/eventbus/eventbus.html +0 -13
- package/docs/static/examples/eventbus/eventbus.js +0 -15
- package/docs/static/examples/eventbus/eventbus.test.js +0 -19
- package/docs/static/examples/ng-bind/ng-bind.html +0 -9
- package/docs/static/examples/ng-blur/ng-blur.html +0 -9
- package/docs/static/examples/ng-channel/ng-channel-test.html +0 -17
- package/docs/static/examples/ng-channel/ng-channel.html +0 -24
- package/docs/static/examples/ng-channel/ng-channel.test.js +0 -31
- package/docs/static/examples/ng-class/ng-class.html +0 -71
- package/docs/static/examples/ng-class-even/ng-class-even.html +0 -8
- package/docs/static/examples/ng-class-odd/ng-class-odd.html +0 -8
- package/docs/static/examples/ng-click/ng-click.html +0 -6
- package/docs/static/examples/ng-copy/ng-copy.html +0 -6
- package/docs/static/examples/ng-cut/ng-cut.html +0 -6
- package/docs/static/examples/ng-dblclick/ng-dblclick.html +0 -10
- package/docs/static/examples/ng-focus/ng-focus.html +0 -9
- package/docs/static/examples/ng-keydown/ng-keydown.html +0 -9
- package/docs/static/examples/ng-keyup/ng-keyup.html +0 -9
- package/docs/static/examples/ng-load/ng-load.html +0 -8
- package/docs/static/examples/ng-mousedown/ng-mousedown.html +0 -6
- package/docs/static/examples/ng-mouseenter/ng-mouseenter.html +0 -4
- package/docs/static/examples/ng-mouseleave/ng-mouseleave.html +0 -4
- package/docs/static/examples/ng-mousemove/ng-mousemove.html +0 -4
- package/docs/static/examples/ng-mouseout/ng-mouseout.html +0 -4
- package/docs/static/examples/ng-mouseover/ng-mouseover.html +0 -4
- package/docs/static/examples/ng-mouseup/ng-mouseup.html +0 -4
- package/docs/static/examples/ng-non-bindable/ng-non-bindable-test.html +0 -13
- package/docs/static/examples/ng-non-bindable/ng-non-bindable.html +0 -3
- package/docs/static/examples/ng-non-bindable/ng-non-bindable.test.js +0 -11
- package/docs/static/typedoc/.nojekyll +0 -1
- package/docs/static/typedoc/assets/hierarchy.js +0 -1
- package/docs/static/typedoc/assets/highlight.css +0 -78
- package/docs/static/typedoc/assets/icons.js +0 -18
- package/docs/static/typedoc/assets/icons.svg +0 -1
- package/docs/static/typedoc/assets/main.js +0 -60
- package/docs/static/typedoc/assets/navigation.js +0 -1
- package/docs/static/typedoc/assets/search.js +0 -1
- package/docs/static/typedoc/assets/style.css +0 -1633
- package/docs/static/typedoc/classes/Location.html +0 -55
- package/docs/static/typedoc/classes/LocationProvider.html +0 -20
- package/docs/static/typedoc/classes/LogProvider.html +0 -6
- package/docs/static/typedoc/classes/PubSub.html +0 -71
- package/docs/static/typedoc/classes/PubSubProvider.html +0 -3
- package/docs/static/typedoc/classes/TemplateCacheProvider.html +0 -5
- package/docs/static/typedoc/hierarchy.html +0 -1
- package/docs/static/typedoc/index.html +0 -1
- package/docs/static/typedoc/interfaces/ChangesObject.html +0 -6
- package/docs/static/typedoc/interfaces/ComponentOptions.html +0 -16
- package/docs/static/typedoc/interfaces/Controller.html +0 -12
- package/docs/static/typedoc/interfaces/DefaultPorts.html +0 -5
- package/docs/static/typedoc/interfaces/Directive.html +0 -37
- package/docs/static/typedoc/interfaces/DirectivePrePost.html +0 -4
- package/docs/static/typedoc/interfaces/Html5Mode.html +0 -23
- package/docs/static/typedoc/interfaces/HttpHeadersGetter.html +0 -1
- package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +0 -31
- package/docs/static/typedoc/interfaces/HttpRequestConfigHeaders.html +0 -6
- package/docs/static/typedoc/interfaces/HttpRequestTransformer.html +0 -1
- package/docs/static/typedoc/interfaces/HttpResponse.html +0 -7
- package/docs/static/typedoc/interfaces/HttpResponseTransformer.html +0 -1
- package/docs/static/typedoc/interfaces/HttpService.html +0 -38
- package/docs/static/typedoc/interfaces/LogService.html +0 -12
- package/docs/static/typedoc/interfaces/NgModelController.html +0 -30
- package/docs/static/typedoc/interfaces/NgModelOptions.html +0 -16
- package/docs/static/typedoc/interfaces/Provider.html +0 -34
- package/docs/static/typedoc/interfaces/RequestConfig.html +0 -48
- package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +0 -38
- package/docs/static/typedoc/interfaces/ServiceProvider.html +0 -5
- package/docs/static/typedoc/interfaces/TemplateCache.html +0 -7
- package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +0 -8
- package/docs/static/typedoc/interfaces/UrlParts.html +0 -9
- package/docs/static/typedoc/types/AnnotatedDirectiveFactory.html +0 -1
- package/docs/static/typedoc/types/AnnotatedFactory.html +0 -8
- package/docs/static/typedoc/types/CloneAttachFunction.html +0 -2
- package/docs/static/typedoc/types/ControllerConstructor.html +0 -2
- package/docs/static/typedoc/types/DirectiveCompileFn.html +0 -2
- package/docs/static/typedoc/types/DirectiveController.html +0 -2
- package/docs/static/typedoc/types/DirectiveFactory.html +0 -1
- package/docs/static/typedoc/types/DirectiveFactoryFn.html +0 -1
- package/docs/static/typedoc/types/DirectiveLinkFn.html +0 -2
- package/docs/static/typedoc/types/ExpandoStore.html +0 -2
- package/docs/static/typedoc/types/Expression.html +0 -6
- package/docs/static/typedoc/types/FilterFactory.html +0 -2
- package/docs/static/typedoc/types/FilterFn.html +0 -2
- package/docs/static/typedoc/types/HttpPromise.html +0 -1
- package/docs/static/typedoc/types/HttpResponseStatus.html +0 -1
- package/docs/static/typedoc/types/Injectable.html +0 -4
- package/docs/static/typedoc/types/InjectableClass.html +0 -1
- package/docs/static/typedoc/types/InjectableFactory.html +0 -1
- package/docs/static/typedoc/types/LogCall.html +0 -2
- package/docs/static/typedoc/types/LogServiceFactory.html +0 -2
- package/docs/static/typedoc/types/OnChangesObject.html +0 -2
- package/docs/static/typedoc/types/SwapModeType.html +0 -2
- package/docs/static/typedoc/types/TController.html +0 -2
- package/docs/static/typedoc/types/UrlChangeListener.html +0 -5
- package/docs/static/typedoc/variables/EventBus.html +0 -1
- package/docs/static/typedoc/variables/SwapMode.html +0 -11
- package/docs/static/version.js +0 -13
- package/docs/test-results/.last-run.json +0 -4
- package/docs/test-results/static-examples-counter-counter-counter-example/error-context.md +0 -50
- package/eslint.config.js +0 -26
- package/images/android-chrome-192x192.png +0 -0
- package/images/android-chrome-512x512.png +0 -0
- package/images/apple-touch-icon.png +0 -0
- package/images/favicon-16x16.png +0 -0
- package/images/favicon-32x32.png +0 -0
- package/images/favicon.ico +0 -0
- package/images/site.webmanifest +0 -19
- package/index.html +0 -86
- package/legacy.d.ts +0 -2599
- package/playwright.config.ts +0 -81
- package/public/jasmine/boot0.js +0 -66
- package/public/jasmine/boot1.js +0 -134
- package/public/jasmine/jasmine-html.js +0 -970
- package/public/jasmine/jasmine.css +0 -323
- package/public/jasmine/jasmine.js +0 -11406
- package/public/public/README.md +0 -1
- package/public/public/circle.html +0 -1
- package/public/public/jasmine-helper.css +0 -9
- package/public/public/my_child_directive.html +0 -1
- package/public/public/my_directive.html +0 -1
- package/public/public/my_other_directive.html +0 -1
- package/public/public/test.html +0 -1
- package/rollup.config.js +0 -51
- package/src/angular.js +0 -293
- package/src/angular.spec.js +0 -1191
- package/src/animations/animate-cache.js +0 -80
- package/src/animations/animate-children-directive.js +0 -32
- package/src/animations/animate-children-directive.md +0 -80
- package/src/animations/animate-css-driver.js +0 -284
- package/src/animations/animate-css.html +0 -58
- package/src/animations/animate-css.js +0 -915
- package/src/animations/animate-css.md +0 -263
- package/src/animations/animate-js-driver.js +0 -60
- package/src/animations/animate-js.html +0 -47
- package/src/animations/animate-js.js +0 -371
- package/src/animations/animate-queue.js +0 -859
- package/src/animations/animate-runner.js +0 -193
- package/src/animations/animate-swap.js +0 -33
- package/src/animations/animate-swap.md +0 -88
- package/src/animations/animate.html +0 -19
- package/src/animations/animate.js +0 -546
- package/src/animations/animate.md +0 -933
- package/src/animations/animate.spec.js +0 -490
- package/src/animations/animation.js +0 -519
- package/src/animations/animations.test.js +0 -10
- package/src/animations/interface.ts +0 -19
- package/src/animations/raf-scheduler.html +0 -19
- package/src/animations/raf-scheduler.js +0 -92
- package/src/animations/raf-scheduler.spec.js +0 -98
- package/src/animations/shared.js +0 -341
- package/src/binding.html +0 -19
- package/src/binding.spec.js +0 -474
- package/src/binding.test.js +0 -10
- package/src/core/compile/attributes.js +0 -337
- package/src/core/compile/compile.html +0 -19
- package/src/core/compile/compile.js +0 -3270
- package/src/core/compile/compile.md +0 -1128
- package/src/core/compile/compile.spec.js +0 -15574
- package/src/core/compile/compile.test.js +0 -12
- package/src/core/controller/controller.html +0 -22
- package/src/core/controller/controller.js +0 -189
- package/src/core/controller/controller.spec.js +0 -334
- package/src/core/controller/controller.test.js +0 -12
- package/src/core/core.html +0 -20
- package/src/core/core.test.js +0 -12
- package/src/core/di/injector.html +0 -19
- package/src/core/di/injector.js +0 -307
- package/src/core/di/injector.md +0 -740
- package/src/core/di/injector.spec.js +0 -2310
- package/src/core/di/injector.test.js +0 -12
- package/src/core/di/internal-injector.js +0 -284
- package/src/core/di/ng-module.html +0 -19
- package/src/core/di/ng-module.js +0 -226
- package/src/core/di/ng-module.spec.js +0 -263
- package/src/core/di/ng-module.test.js +0 -12
- package/src/core/filter/filter.html +0 -19
- package/src/core/filter/filter.js +0 -55
- package/src/core/filter/filter.md +0 -132
- package/src/core/filter/filter.spec.js +0 -149
- package/src/core/filter/filter.test.js +0 -12
- package/src/core/interpolate/interpolate.html +0 -22
- package/src/core/interpolate/interpolate.js +0 -408
- package/src/core/interpolate/interpolate.spec.js +0 -601
- package/src/core/interpolate/interpolate.test.js +0 -12
- package/src/core/parse/ast/ast-node.ts +0 -81
- package/src/core/parse/ast/ast.html +0 -19
- package/src/core/parse/ast/ast.js +0 -574
- package/src/core/parse/ast/ast.spec.js +0 -1453
- package/src/core/parse/ast/ast.test.js +0 -10
- package/src/core/parse/ast-type.js +0 -23
- package/src/core/parse/interface.ts +0 -84
- package/src/core/parse/interpreter.js +0 -915
- package/src/core/parse/lexer/lexer.html +0 -19
- package/src/core/parse/lexer/lexer.js +0 -338
- package/src/core/parse/lexer/lexer.spec.js +0 -303
- package/src/core/parse/lexer/lexer.test.js +0 -10
- package/src/core/parse/lexer/token.ts +0 -22
- package/src/core/parse/parse.html +0 -19
- package/src/core/parse/parse.js +0 -337
- package/src/core/parse/parse.md +0 -57
- package/src/core/parse/parse.spec.js +0 -2107
- package/src/core/parse/parse.test.js +0 -10
- package/src/core/parse/parser/parser.html +0 -19
- package/src/core/parse/parser/parser.js +0 -64
- package/src/core/parse/parser/parser.spec.js +0 -8
- package/src/core/parse/parser/parser.test.js +0 -10
- package/src/core/prop.spec.js +0 -775
- package/src/core/root-element.spec.js +0 -14
- package/src/core/sanitize/interface.ts +0 -10
- package/src/core/sanitize/sanitize-uri.js +0 -75
- package/src/core/sanitize/sanitize-uri.spec.js +0 -249
- package/src/core/sanitize/sanitize-uri.test.js +0 -12
- package/src/core/sanitize/sanitize.html +0 -22
- package/src/core/scope/scope.html +0 -19
- package/src/core/scope/scope.js +0 -1249
- package/src/core/scope/scope.spec.js +0 -3000
- package/src/core/scope/scope.test.js +0 -12
- package/src/directive/aria/aria.html +0 -19
- package/src/directive/aria/aria.js +0 -382
- package/src/directive/aria/aria.md +0 -145
- package/src/directive/aria/aria.spec.js +0 -1241
- package/src/directive/aria/aria.test.js +0 -12
- package/src/directive/attrs/attrs.html +0 -19
- package/src/directive/attrs/attrs.js +0 -106
- package/src/directive/attrs/attrs.md +0 -224
- package/src/directive/attrs/attrs.spec.js +0 -71
- package/src/directive/attrs/attrs.test.js +0 -12
- package/src/directive/attrs/boolean.html +0 -19
- package/src/directive/attrs/boolean.spec.js +0 -137
- package/src/directive/attrs/boolean.test.js +0 -12
- package/src/directive/attrs/element-style.html +0 -22
- package/src/directive/attrs/element-style.spec.js +0 -85
- package/src/directive/attrs/element-style.test.js +0 -12
- package/src/directive/attrs/src.html +0 -19
- package/src/directive/attrs/src.spec.js +0 -163
- package/src/directive/attrs/src.test.js +0 -12
- package/src/directive/bind/bind-html.spec.js +0 -36
- package/src/directive/bind/bind.html +0 -20
- package/src/directive/bind/bind.js +0 -78
- package/src/directive/bind/bind.md +0 -142
- package/src/directive/bind/bind.spec.js +0 -314
- package/src/directive/bind/bind.test.js +0 -12
- package/src/directive/channel/channel.html +0 -19
- package/src/directive/channel/channel.js +0 -30
- package/src/directive/channel/channel.spec.js +0 -67
- package/src/directive/channel/channel.test.js +0 -10
- package/src/directive/class/class-test.html +0 -23
- package/src/directive/class/class.html +0 -19
- package/src/directive/class/class.js +0 -184
- package/src/directive/class/class.spec.js +0 -704
- package/src/directive/class/class.test.js +0 -12
- package/src/directive/cloak/cloak.html +0 -19
- package/src/directive/cloak/cloak.js +0 -11
- package/src/directive/cloak/cloak.spec.js +0 -44
- package/src/directive/cloak/cloak.test.js +0 -12
- package/src/directive/controller/controller.html +0 -22
- package/src/directive/controller/controller.js +0 -11
- package/src/directive/controller/controller.md +0 -46
- package/src/directive/controller/controller.spec.js +0 -175
- package/src/directive/controller/controller.test.js +0 -12
- package/src/directive/events/click.spec.js +0 -35
- package/src/directive/events/event.spec.js +0 -267
- package/src/directive/events/events-test.html +0 -36
- package/src/directive/events/events.html +0 -20
- package/src/directive/events/events.js +0 -65
- package/src/directive/events/events.md +0 -125
- package/src/directive/events/events.test.js +0 -12
- package/src/directive/form/form.html +0 -19
- package/src/directive/form/form.js +0 -669
- package/src/directive/form/form.spec.js +0 -1515
- package/src/directive/form/form.test.js +0 -12
- package/src/directive/http/delete.spec.js +0 -26
- package/src/directive/http/form-router-test.html +0 -44
- package/src/directive/http/form-test.html +0 -18
- package/src/directive/http/get.spec.js +0 -488
- package/src/directive/http/http.html +0 -22
- package/src/directive/http/http.js +0 -342
- package/src/directive/http/http.test.js +0 -12
- package/src/directive/http/post-example.html +0 -30
- package/src/directive/http/post.spec.js +0 -521
- package/src/directive/http/put.spec.js +0 -26
- package/src/directive/if/if-animate-css.html +0 -57
- package/src/directive/if/if-animate-svg.html +0 -25
- package/src/directive/if/if.html +0 -19
- package/src/directive/if/if.js +0 -72
- package/src/directive/if/if.md +0 -76
- package/src/directive/if/if.spec.js +0 -293
- package/src/directive/if/if.test.js +0 -114
- package/src/directive/include/include.html +0 -19
- package/src/directive/include/include.js +0 -151
- package/src/directive/include/include.md +0 -87
- package/src/directive/include/include.spec.js +0 -734
- package/src/directive/include/include.test.js +0 -12
- package/src/directive/init/init.html +0 -19
- package/src/directive/init/init.js +0 -22
- package/src/directive/init/init.md +0 -41
- package/src/directive/init/init.spec.js +0 -68
- package/src/directive/init/init.test.js +0 -12
- package/src/directive/input/input-example.html +0 -15
- package/src/directive/input/input.html +0 -19
- package/src/directive/input/input.js +0 -1078
- package/src/directive/input/input.md +0 -706
- package/src/directive/input/input.spec.js +0 -3700
- package/src/directive/input/input.test.js +0 -12
- package/src/directive/messages/messages.html +0 -22
- package/src/directive/messages/messages.js +0 -349
- package/src/directive/messages/messages.md +0 -543
- package/src/directive/messages/messages.spec.js +0 -1083
- package/src/directive/messages/messages.test.js +0 -12
- package/src/directive/model/change.md +0 -25
- package/src/directive/model/model.html +0 -19
- package/src/directive/model/model.js +0 -1170
- package/src/directive/model/model.spec.js +0 -1976
- package/src/directive/model/model.test.js +0 -12
- package/src/directive/model-options/model-option.test.js +0 -12
- package/src/directive/model-options/model-options.html +0 -22
- package/src/directive/model-options/model-options.js +0 -142
- package/src/directive/model-options/model-options.md +0 -407
- package/src/directive/model-options/model-options.spec.js +0 -1022
- package/src/directive/non-bindable/non-bindable.html +0 -22
- package/src/directive/non-bindable/non-bindable.js +0 -9
- package/src/directive/non-bindable/non-bindable.spec.js +0 -59
- package/src/directive/non-bindable/non-bindable.test.js +0 -12
- package/src/directive/observe/observe-demo.html +0 -184
- package/src/directive/observe/observe.html +0 -19
- package/src/directive/observe/observe.js +0 -41
- package/src/directive/observe/observe.spec.js +0 -106
- package/src/directive/observe/observe.test.js +0 -10
- package/src/directive/on/on.html +0 -19
- package/src/directive/on/on.spec.js +0 -215
- package/src/directive/on/on.test.js +0 -12
- package/src/directive/options/options-example.html +0 -17
- package/src/directive/options/options.html +0 -22
- package/src/directive/options/options.js +0 -542
- package/src/directive/options/options.md +0 -179
- package/src/directive/options/options.spec.js +0 -3554
- package/src/directive/options/options.test.js +0 -12
- package/src/directive/ref/href.html +0 -19
- package/src/directive/ref/href.spec.js +0 -141
- package/src/directive/ref/href.test.js +0 -19
- package/src/directive/ref/ref.html +0 -19
- package/src/directive/ref/ref.js +0 -89
- package/src/directive/ref/ref.spec.js +0 -546
- package/src/directive/repeat/repeat.html +0 -19
- package/src/directive/repeat/repeat.js +0 -333
- package/src/directive/repeat/repeat.md +0 -330
- package/src/directive/repeat/repeat.spec.js +0 -1209
- package/src/directive/repeat/repeat.test.js +0 -12
- package/src/directive/script/script.html +0 -19
- package/src/directive/script/script.js +0 -17
- package/src/directive/script/script.md +0 -11
- package/src/directive/script/script.spec.js +0 -47
- package/src/directive/script/script.test.js +0 -12
- package/src/directive/select/select.html +0 -19
- package/src/directive/select/select.js +0 -594
- package/src/directive/select/select.md +0 -74
- package/src/directive/select/select.spec.js +0 -2566
- package/src/directive/select/select.test.js +0 -12
- package/src/directive/setter/setter.html +0 -19
- package/src/directive/setter/setter.js +0 -59
- package/src/directive/setter/setter.spec.js +0 -100
- package/src/directive/setter/setter.test.js +0 -12
- package/src/directive/show-hide/show-hide.html +0 -22
- package/src/directive/show-hide/show-hide.js +0 -65
- package/src/directive/show-hide/show-hide.md +0 -255
- package/src/directive/show-hide/show-hide.spec.js +0 -268
- package/src/directive/show-hide/show-hide.test.js +0 -12
- package/src/directive/style/style.html +0 -19
- package/src/directive/style/style.js +0 -27
- package/src/directive/style/style.md +0 -23
- package/src/directive/style/style.spec.js +0 -183
- package/src/directive/style/style.test.js +0 -12
- package/src/directive/switch/switch.html +0 -19
- package/src/directive/switch/switch.js +0 -133
- package/src/directive/switch/switch.md +0 -66
- package/src/directive/switch/switch.spec.js +0 -509
- package/src/directive/switch/switch.test.js +0 -12
- package/src/directive/transclude/transclude.js +0 -122
- package/src/directive/validators/validators.html +0 -22
- package/src/directive/validators/validators.js +0 -346
- package/src/directive/validators/validators.spec.js +0 -740
- package/src/directive/validators/validators.test.js +0 -12
- package/src/filters/filter.js +0 -213
- package/src/filters/filter.md +0 -69
- package/src/filters/filter.spec.js +0 -719
- package/src/filters/filters.html +0 -22
- package/src/filters/filters.js +0 -239
- package/src/filters/filters.spec.js +0 -36
- package/src/filters/filters.test.js +0 -12
- package/src/filters/json.md +0 -16
- package/src/filters/limit-to.js +0 -55
- package/src/filters/limit-to.md +0 -19
- package/src/filters/limit-to.spec.js +0 -252
- package/src/filters/order-by.js +0 -181
- package/src/filters/order-by.md +0 -83
- package/src/filters/order-by.spec.js +0 -883
- package/src/index.js +0 -6
- package/src/index.spec.js +0 -11
- package/src/injection-tokens.js +0 -78
- package/src/interface.ts +0 -421
- package/src/ng.js +0 -289
- package/src/ng.spec.js +0 -33
- package/src/router/common/trace.js +0 -240
- package/src/router/directives/component-example.html +0 -37
- package/src/router/directives/state-directives.html +0 -22
- package/src/router/directives/state-directives.js +0 -393
- package/src/router/directives/state-directives.md +0 -435
- package/src/router/directives/state-directives.spec.js +0 -1091
- package/src/router/directives/state-directives.test.js +0 -10
- package/src/router/directives/view-directive.js +0 -489
- package/src/router/directives/view-directive.spec.js +0 -1937
- package/src/router/directives/view-directive.test.js +0 -10
- package/src/router/directives/view-directives.html +0 -22
- package/src/router/glob/glob.html +0 -19
- package/src/router/glob/glob.js +0 -102
- package/src/router/glob/glob.spec.js +0 -108
- package/src/router/glob/glob.test.js +0 -12
- package/src/router/hooks/core-resolvables.js +0 -38
- package/src/router/hooks/ignored-transition.js +0 -25
- package/src/router/hooks/invalid-transition.js +0 -14
- package/src/router/hooks/lazy-load.js +0 -104
- package/src/router/hooks/on-enter-exit-retain.js +0 -55
- package/src/router/hooks/redirect-to.js +0 -38
- package/src/router/hooks/resolve.js +0 -57
- package/src/router/hooks/update-globals.js +0 -34
- package/src/router/hooks/url.js +0 -34
- package/src/router/hooks/views.js +0 -41
- package/src/router/params/interface.ts +0 -626
- package/src/router/params/param-factory.js +0 -23
- package/src/router/params/param-type.js +0 -133
- package/src/router/params/param-types.js +0 -153
- package/src/router/params/param.js +0 -243
- package/src/router/params/state-params.js +0 -36
- package/src/router/path/path-node.js +0 -78
- package/src/router/path/path-utils.js +0 -207
- package/src/router/resolve/interface.ts +0 -208
- package/src/router/resolve/resolvable.js +0 -123
- package/src/router/resolve/resolve-context.js +0 -190
- package/src/router/router-test-hashbang.html +0 -45
- package/src/router/router-test.html +0 -41
- package/src/router/router.html +0 -22
- package/src/router/router.js +0 -54
- package/src/router/router.test.js +0 -12
- package/src/router/services.spec.js +0 -52
- package/src/router/state/README.md +0 -21
- package/src/router/state/interface.ts +0 -1007
- package/src/router/state/state-builder.js +0 -376
- package/src/router/state/state-builder.spec.js +0 -86
- package/src/router/state/state-matcher.js +0 -64
- package/src/router/state/state-object.js +0 -118
- package/src/router/state/state-queue-manager.js +0 -95
- package/src/router/state/state-registry.js +0 -257
- package/src/router/state/state-service.js +0 -699
- package/src/router/state/state.html +0 -23
- package/src/router/state/state.spec.js +0 -1002
- package/src/router/state/state.test.js +0 -12
- package/src/router/state/target-state.js +0 -162
- package/src/router/state/views.js +0 -195
- package/src/router/state-filter.spec.js +0 -139
- package/src/router/state-filters.js +0 -46
- package/src/router/template-factory.html +0 -19
- package/src/router/template-factory.js +0 -249
- package/src/router/template-factory.spec.js +0 -155
- package/src/router/template-factory.test.js +0 -12
- package/src/router/transition/hook-builder.js +0 -133
- package/src/router/transition/hook-registry.js +0 -172
- package/src/router/transition/interface.js +0 -18
- package/src/router/transition/interface.ts +0 -922
- package/src/router/transition/reject-factory.js +0 -122
- package/src/router/transition/transition-event-type.js +0 -26
- package/src/router/transition/transition-hook.js +0 -199
- package/src/router/transition/transition-service.js +0 -302
- package/src/router/transition/transition.js +0 -652
- package/src/router/url/url-config.js +0 -155
- package/src/router/url/url-matcher.js +0 -532
- package/src/router/url/url-rule.js +0 -231
- package/src/router/url/url-rules.js +0 -350
- package/src/router/url/url-service.js +0 -446
- package/src/router/url/url-service.spec.js +0 -1288
- package/src/router/url/url.html +0 -19
- package/src/router/url/url.test.js +0 -12
- package/src/router/view/interface.ts +0 -51
- package/src/router/view/view.html +0 -19
- package/src/router/view/view.js +0 -274
- package/src/router/view/view.spec.js +0 -100
- package/src/router/view/view.test.js +0 -12
- package/src/router/view-hook.spec.js +0 -215
- package/src/router/view-scroll.js +0 -33
- package/src/router/view-scroll.spec.js +0 -72
- package/src/services/anchor-scroll.html +0 -76
- package/src/services/anchor-scroll.js +0 -147
- package/src/services/cookie-reader.js +0 -48
- package/src/services/exception/exception-handler.js +0 -75
- package/src/services/exception/interface.ts +0 -7
- package/src/services/http/http.html +0 -23
- package/src/services/http/http.js +0 -922
- package/src/services/http/http.md +0 -413
- package/src/services/http/http.spec.js +0 -3941
- package/src/services/http/http.test.js +0 -11
- package/src/services/http/interface.ts +0 -243
- package/src/services/http/template-request.spec.js +0 -220
- package/src/services/http-backend/http-backend.html +0 -22
- package/src/services/http-backend/http-backend.js +0 -158
- package/src/services/http-backend/http-backend.spec.js +0 -389
- package/src/services/http-backend/http-backend.test.js +0 -12
- package/src/services/location/interface.ts +0 -70
- package/src/services/location/location.html +0 -22
- package/src/services/location/location.js +0 -1006
- package/src/services/location/location.spec.js +0 -3792
- package/src/services/location/location.test.js +0 -12
- package/src/services/log/interface.ts +0 -39
- package/src/services/log/log.html +0 -19
- package/src/services/log/log.js +0 -74
- package/src/services/log/log.spec.js +0 -64
- package/src/services/log/log.test.js +0 -12
- package/src/services/pubsub/pubsub.html +0 -19
- package/src/services/pubsub/pubsub.js +0 -349
- package/src/services/pubsub/pubsub.spec.js +0 -400
- package/src/services/pubsub/pubsub.test.js +0 -12
- package/src/services/sce/sce.html +0 -19
- package/src/services/sce/sce.js +0 -847
- package/src/services/sce/sce.md +0 -300
- package/src/services/sce/sce.spec.js +0 -617
- package/src/services/sce/sce.test.js +0 -12
- package/src/services/template-cache/interface.ts +0 -10
- package/src/services/template-cache/template-cache.html +0 -22
- package/src/services/template-cache/template-cache.js +0 -15
- package/src/services/template-cache/template-cache.spec.js +0 -134
- package/src/services/template-cache/template-cache.test.js +0 -12
- package/src/services/template-request.js +0 -142
- package/src/shared/cache.js +0 -7
- package/src/shared/common.js +0 -438
- package/src/shared/common.spec.js +0 -294
- package/src/shared/constants.js +0 -21
- package/src/shared/dom.js +0 -716
- package/src/shared/hof.js +0 -151
- package/src/shared/hof.spec.js +0 -60
- package/src/shared/interface.ts +0 -21
- package/src/shared/min-err.spec.js +0 -178
- package/src/shared/noderef.js +0 -225
- package/src/shared/predicates.js +0 -34
- package/src/shared/queue.js +0 -105
- package/src/shared/queue.spec.js +0 -80
- package/src/shared/shared.html +0 -24
- package/src/shared/shared.test.js +0 -12
- package/src/shared/strings.js +0 -142
- package/src/shared/strings.spec.js +0 -40
- package/src/shared/test-utils.js +0 -47
- package/src/shared/url-utils/interface.ts +0 -54
- package/src/shared/url-utils/url-utils.html +0 -22
- package/src/shared/url-utils/url-utils.js +0 -122
- package/src/shared/url-utils/url-utils.spec.js +0 -148
- package/src/shared/url-utils/url-utils.test.js +0 -12
- package/src/shared/utils.js +0 -1255
- package/src/shared/utils.spec.js +0 -178
- package/src/src.html +0 -21
- package/src/src.test.js +0 -10
- package/tsconfig.json +0 -19
- package/tsconfig.types.json +0 -14
- package/typedoc.json +0 -8
- package/utils/express.js +0 -203
- package/utils/version.cjs +0 -23
- package/vite.config.js +0 -14
package/dist/angular-ts.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Version: 0.9.
|
|
1
|
+
/* Version: 0.9.5 - October 23, 2025 19:32:46 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -1798,11 +1798,11 @@
|
|
|
1798
1798
|
$aria: "$aria",
|
|
1799
1799
|
$compile: "$compile",
|
|
1800
1800
|
$controller: "$controller",
|
|
1801
|
+
$document: "$document",
|
|
1801
1802
|
$eventBus: "$eventBus",
|
|
1802
1803
|
$exceptionHandler: "$exceptionHandler",
|
|
1803
1804
|
$filter: "$filter",
|
|
1804
1805
|
$http: "$http",
|
|
1805
|
-
$httpBackend: "$httpBackend",
|
|
1806
1806
|
$httpParamSerializer: "$httpParamSerializer",
|
|
1807
1807
|
$interpolate: "$interpolate",
|
|
1808
1808
|
$location: "$location",
|
|
@@ -1816,6 +1816,8 @@
|
|
|
1816
1816
|
$sceDelegate: "$sceDelegate",
|
|
1817
1817
|
$state: "$state",
|
|
1818
1818
|
$stateRegistry: "$stateRegistry",
|
|
1819
|
+
$$sanitizeUri: "$$sanitizeUri",
|
|
1820
|
+
$$sanitizeUriProvider: "$$sanitizeUriProvider",
|
|
1819
1821
|
$templateCache: "$templateCache",
|
|
1820
1822
|
$templateFactory: "$templateFactory",
|
|
1821
1823
|
$templateRequest: "$templateRequest",
|
|
@@ -1823,6 +1825,7 @@
|
|
|
1823
1825
|
$urlConfig: "$urlConfig",
|
|
1824
1826
|
$url: "$url",
|
|
1825
1827
|
$view: "$view",
|
|
1828
|
+
$window: "$window",
|
|
1826
1829
|
// provide literals
|
|
1827
1830
|
$provide: "$provide",
|
|
1828
1831
|
$injector: "$injector",
|
|
@@ -1865,7 +1868,7 @@
|
|
|
1865
1868
|
/**
|
|
1866
1869
|
* @param {string} name - Name of the module
|
|
1867
1870
|
* @param {Array<string>} requires - List of modules which the injector will load before the current module
|
|
1868
|
-
* @param {import("../../interface.js").Injectable} [configFn]
|
|
1871
|
+
* @param {import("../../interface.js").Injectable<any>} [configFn]
|
|
1869
1872
|
*/
|
|
1870
1873
|
constructor(name, requires, configFn) {
|
|
1871
1874
|
assert(isString(name), "name required");
|
|
@@ -1891,12 +1894,14 @@
|
|
|
1891
1894
|
/** @type {!Array<Array<*>>} */
|
|
1892
1895
|
this.configBlocks = [];
|
|
1893
1896
|
|
|
1894
|
-
/** @type {!Array.<import("../../interface.js").Injectable
|
|
1897
|
+
/** @type {!Array.<import("../../interface.js").Injectable<any>>} */
|
|
1895
1898
|
this.runBlocks = [];
|
|
1896
1899
|
|
|
1897
1900
|
if (configFn) {
|
|
1898
1901
|
this.config(configFn);
|
|
1899
1902
|
}
|
|
1903
|
+
|
|
1904
|
+
this.services = [];
|
|
1900
1905
|
}
|
|
1901
1906
|
|
|
1902
1907
|
/**
|
|
@@ -1921,7 +1926,7 @@
|
|
|
1921
1926
|
|
|
1922
1927
|
/**
|
|
1923
1928
|
*
|
|
1924
|
-
* @param {import("../../interface.
|
|
1929
|
+
* @param {import("../../interface.ts").Injectable<any>} configFn
|
|
1925
1930
|
* @returns {NgModule}
|
|
1926
1931
|
*/
|
|
1927
1932
|
config(configFn) {
|
|
@@ -1930,7 +1935,7 @@
|
|
|
1930
1935
|
}
|
|
1931
1936
|
|
|
1932
1937
|
/**
|
|
1933
|
-
* @param {import("../../interface.
|
|
1938
|
+
* @param {import("../../interface.ts").Injectable<any>} block
|
|
1934
1939
|
* @returns {NgModule}
|
|
1935
1940
|
*/
|
|
1936
1941
|
run(block) {
|
|
@@ -1940,7 +1945,7 @@
|
|
|
1940
1945
|
|
|
1941
1946
|
/**
|
|
1942
1947
|
* @param {string} name
|
|
1943
|
-
* @param {import("../../interface.
|
|
1948
|
+
* @param {import("../../interface.ts").Component} options
|
|
1944
1949
|
* @returns {NgModule}
|
|
1945
1950
|
*/
|
|
1946
1951
|
component(name, options) {
|
|
@@ -1953,7 +1958,7 @@
|
|
|
1953
1958
|
|
|
1954
1959
|
/**
|
|
1955
1960
|
* @param {string} name
|
|
1956
|
-
* @param {import("../../interface.
|
|
1961
|
+
* @param {import("../../interface.ts").Injectable<any>} providerFunction
|
|
1957
1962
|
* @returns {NgModule}
|
|
1958
1963
|
*/
|
|
1959
1964
|
factory(name, providerFunction) {
|
|
@@ -1966,20 +1971,21 @@
|
|
|
1966
1971
|
|
|
1967
1972
|
/**
|
|
1968
1973
|
* @param {string} name
|
|
1969
|
-
* @param {import("../../interface.
|
|
1974
|
+
* @param {import("../../interface.ts").Injectable<any>} serviceFunction
|
|
1970
1975
|
* @returns {NgModule}
|
|
1971
1976
|
*/
|
|
1972
1977
|
service(name, serviceFunction) {
|
|
1973
1978
|
if (serviceFunction && isFunction(serviceFunction)) {
|
|
1974
1979
|
serviceFunction["$$moduleName"] = name;
|
|
1975
1980
|
}
|
|
1981
|
+
this.services.push(name);
|
|
1976
1982
|
this.invokeQueue.push([$injectTokens.$provide, "service", [name, serviceFunction]]);
|
|
1977
1983
|
return this;
|
|
1978
1984
|
}
|
|
1979
1985
|
|
|
1980
1986
|
/**
|
|
1981
1987
|
* @param {string} name
|
|
1982
|
-
* @param {import("../../interface.
|
|
1988
|
+
* @param {import("../../interface.ts").Injectable<any>} providerType
|
|
1983
1989
|
* @returns {NgModule}
|
|
1984
1990
|
*/
|
|
1985
1991
|
provider(name, providerType) {
|
|
@@ -1992,7 +1998,7 @@
|
|
|
1992
1998
|
|
|
1993
1999
|
/**
|
|
1994
2000
|
* @param {string} name
|
|
1995
|
-
* @param {import("../../interface.js").Injectable} decorFn
|
|
2001
|
+
* @param {import("../../interface.js").Injectable<any>} decorFn
|
|
1996
2002
|
* @returns {NgModule}
|
|
1997
2003
|
*/
|
|
1998
2004
|
decorator(name, decorFn) {
|
|
@@ -2005,7 +2011,7 @@
|
|
|
2005
2011
|
|
|
2006
2012
|
/**
|
|
2007
2013
|
* @param {string} name
|
|
2008
|
-
* @param {import("../../interface.js").Injectable} directiveFactory
|
|
2014
|
+
* @param {import("../../interface.js").Injectable<any>} directiveFactory
|
|
2009
2015
|
* @returns {NgModule}
|
|
2010
2016
|
*/
|
|
2011
2017
|
directive(name, directiveFactory) {
|
|
@@ -2022,7 +2028,7 @@
|
|
|
2022
2028
|
|
|
2023
2029
|
/**
|
|
2024
2030
|
* @param {string} name
|
|
2025
|
-
* @param {import("../../interface.js").Injectable} animationFactory
|
|
2031
|
+
* @param {import("../../interface.js").Injectable<any>} animationFactory
|
|
2026
2032
|
* @returns {NgModule}
|
|
2027
2033
|
*/
|
|
2028
2034
|
animation(name, animationFactory) {
|
|
@@ -2039,7 +2045,7 @@
|
|
|
2039
2045
|
|
|
2040
2046
|
/**
|
|
2041
2047
|
* @param {string} name
|
|
2042
|
-
* @param {import("../../interface.js").Injectable} filterFn
|
|
2048
|
+
* @param {import("../../interface.js").Injectable<any>} filterFn
|
|
2043
2049
|
* @return {NgModule}
|
|
2044
2050
|
*/
|
|
2045
2051
|
filter(name, filterFn) {
|
|
@@ -2052,7 +2058,7 @@
|
|
|
2052
2058
|
|
|
2053
2059
|
/**
|
|
2054
2060
|
* @param {string} name
|
|
2055
|
-
* @param {import("../../interface.js").Injectable} ctlFn
|
|
2061
|
+
* @param {import("../../interface.js").Injectable<any>} ctlFn
|
|
2056
2062
|
* @returns {NgModule}
|
|
2057
2063
|
*/
|
|
2058
2064
|
controller(name, ctlFn) {
|
|
@@ -2236,6 +2242,8 @@
|
|
|
2236
2242
|
this.path.join(" <- "),
|
|
2237
2243
|
);
|
|
2238
2244
|
}
|
|
2245
|
+
|
|
2246
|
+
loadNewModules() {}
|
|
2239
2247
|
}
|
|
2240
2248
|
|
|
2241
2249
|
/**
|
|
@@ -2407,7 +2415,7 @@
|
|
|
2407
2415
|
/**
|
|
2408
2416
|
* Registers a provider.
|
|
2409
2417
|
* @param {string} name
|
|
2410
|
-
* @param {import('../../interface.ts').ServiceProvider | import('../../interface.ts').
|
|
2418
|
+
* @param {import('../../interface.ts').ServiceProvider | import('../../interface.ts').Injectable<any>} provider
|
|
2411
2419
|
* @returns {import('../../interface.ts').ServiceProvider}
|
|
2412
2420
|
*/
|
|
2413
2421
|
function provider(name, provider) {
|
|
@@ -2926,7 +2934,7 @@
|
|
|
2926
2934
|
|
|
2927
2935
|
/**
|
|
2928
2936
|
* @param {import("../../core/di/internal-injector.js").InjectorService} $injector
|
|
2929
|
-
* @returns {
|
|
2937
|
+
* @returns {import("./interface.js").ControllerService} A service function that creates controllers.
|
|
2930
2938
|
*/
|
|
2931
2939
|
($injector) => {
|
|
2932
2940
|
return (expression, locals, later, ident) => {
|
|
@@ -2937,7 +2945,7 @@
|
|
|
2937
2945
|
later = later === true;
|
|
2938
2946
|
|
|
2939
2947
|
if (isString(expression)) {
|
|
2940
|
-
match = expression.match(CNTRL_REG);
|
|
2948
|
+
match = /** @type {string} */ (expression).match(CNTRL_REG);
|
|
2941
2949
|
if (!match) {
|
|
2942
2950
|
throw $controllerMinErr(
|
|
2943
2951
|
"ctrlfmt",
|
|
@@ -2974,7 +2982,7 @@
|
|
|
2974
2982
|
locals,
|
|
2975
2983
|
identifier,
|
|
2976
2984
|
instance,
|
|
2977
|
-
constructor || expression.name,
|
|
2985
|
+
constructor || /** @type {any} */ (expression).name,
|
|
2978
2986
|
);
|
|
2979
2987
|
}
|
|
2980
2988
|
|
|
@@ -2997,7 +3005,7 @@
|
|
|
2997
3005
|
locals,
|
|
2998
3006
|
identifier,
|
|
2999
3007
|
instance,
|
|
3000
|
-
constructor || expression.name,
|
|
3008
|
+
constructor || /** @type {any} */ (expression).name,
|
|
3001
3009
|
);
|
|
3002
3010
|
}
|
|
3003
3011
|
}
|
|
@@ -3006,14 +3014,18 @@
|
|
|
3006
3014
|
}.bind(this, { instance, identifier });
|
|
3007
3015
|
}
|
|
3008
3016
|
|
|
3009
|
-
instance = $injector.instantiate(
|
|
3017
|
+
instance = $injector.instantiate(
|
|
3018
|
+
/** @type {any} */ (expression),
|
|
3019
|
+
locals,
|
|
3020
|
+
constructor,
|
|
3021
|
+
);
|
|
3010
3022
|
|
|
3011
3023
|
if (identifier) {
|
|
3012
3024
|
this.addIdentifier(
|
|
3013
3025
|
locals,
|
|
3014
3026
|
identifier,
|
|
3015
3027
|
instance,
|
|
3016
|
-
constructor || expression.name,
|
|
3028
|
+
constructor || /** @type {any} */ (expression).name,
|
|
3017
3029
|
);
|
|
3018
3030
|
}
|
|
3019
3031
|
|
|
@@ -3164,8 +3176,6 @@
|
|
|
3164
3176
|
return url.replace(/#$/, "");
|
|
3165
3177
|
}
|
|
3166
3178
|
|
|
3167
|
-
/** @typedef {import("../exception/interface.ts").Interface } ErrorHandler */
|
|
3168
|
-
|
|
3169
3179
|
const $sceMinErr = minErr("$sce");
|
|
3170
3180
|
|
|
3171
3181
|
const SCE_CONTEXTS = {
|
|
@@ -3455,14 +3465,14 @@
|
|
|
3455
3465
|
};
|
|
3456
3466
|
|
|
3457
3467
|
this.$get = [
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3468
|
+
$injectTokens.$injector,
|
|
3469
|
+
$injectTokens.$$sanitizeUri,
|
|
3470
|
+
$injectTokens.$exceptionHandler,
|
|
3461
3471
|
/**
|
|
3462
3472
|
*
|
|
3463
|
-
* @param {
|
|
3473
|
+
* @param {ng.InjectorService} $injector
|
|
3464
3474
|
* @param {*} $$sanitizeUri
|
|
3465
|
-
* @param {
|
|
3475
|
+
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
3466
3476
|
* @returns
|
|
3467
3477
|
*/
|
|
3468
3478
|
function ($injector, $$sanitizeUri, $exceptionHandler) {
|
|
@@ -3481,7 +3491,7 @@
|
|
|
3481
3491
|
|
|
3482
3492
|
/**
|
|
3483
3493
|
* @param {string|RegExp} matcher
|
|
3484
|
-
* @param {import("../../shared/url-utils/interface").ParsedUrl} parsedUrl
|
|
3494
|
+
* @param {import("../../shared/url-utils/interface.ts").ParsedUrl} parsedUrl
|
|
3485
3495
|
* @return {boolean}
|
|
3486
3496
|
*/
|
|
3487
3497
|
function matchUrl(matcher, parsedUrl) {
|
|
@@ -3736,9 +3746,15 @@
|
|
|
3736
3746
|
};
|
|
3737
3747
|
|
|
3738
3748
|
this.$get = [
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3749
|
+
$injectTokens.$parse,
|
|
3750
|
+
$injectTokens.$sceDelegate,
|
|
3751
|
+
/**
|
|
3752
|
+
*
|
|
3753
|
+
* @param {ng.ParseService} $parse
|
|
3754
|
+
* @param $sceDelegate
|
|
3755
|
+
* @return {*}
|
|
3756
|
+
*/
|
|
3757
|
+
($parse, $sceDelegate) => {
|
|
3742
3758
|
const sce = shallowCopy(SCE_CONTEXTS);
|
|
3743
3759
|
|
|
3744
3760
|
/**
|
|
@@ -3772,14 +3788,14 @@
|
|
|
3772
3788
|
*
|
|
3773
3789
|
* @param {string} type The SCE context in which this result will be used.
|
|
3774
3790
|
* @param {string} expr String expression to compile.
|
|
3775
|
-
* @return {
|
|
3791
|
+
* @return {import("../../core/parse/interface.js").CompiledExpression} A function which represents the compiled expression:
|
|
3776
3792
|
*
|
|
3777
3793
|
* * `context` – `{object}` – an object against which any expressions embedded in the
|
|
3778
3794
|
* strings are evaluated against (typically a scope object).
|
|
3779
3795
|
* * `locals` – `{object=}` – local variables context object, useful for overriding values
|
|
3780
3796
|
* in `context`.
|
|
3781
3797
|
*/
|
|
3782
|
-
sce.parseAs =
|
|
3798
|
+
sce.parseAs = (type, expr) => {
|
|
3783
3799
|
const parsed = $parse(expr);
|
|
3784
3800
|
if (parsed.literal && parsed.constant) {
|
|
3785
3801
|
return parsed;
|
|
@@ -4517,7 +4533,7 @@
|
|
|
4517
4533
|
const DirectiveSuffix = "Directive";
|
|
4518
4534
|
|
|
4519
4535
|
class CompileProvider {
|
|
4520
|
-
/* @ignore */ static $inject = [
|
|
4536
|
+
/* @ignore */ static $inject = [$injectTokens.$provide, $injectTokens.$$sanitizeUriProvider];
|
|
4521
4537
|
|
|
4522
4538
|
/**
|
|
4523
4539
|
* @param {import('../../interface.js').Provider} $provide
|
|
@@ -4711,7 +4727,7 @@
|
|
|
4711
4727
|
/**
|
|
4712
4728
|
* @param {string|Object} name Name of the component in camelCase (i.e. `myComp` which will match `<my-comp>`),
|
|
4713
4729
|
* or an object map of components where the keys are the names and the values are the component definition objects.
|
|
4714
|
-
* @param {import("../../interface.js").
|
|
4730
|
+
* @param {import("../../interface.js").Component} options Component definition object (a simplified
|
|
4715
4731
|
* {directive definition object}),
|
|
4716
4732
|
* with the following properties (all optional):
|
|
4717
4733
|
*
|
|
@@ -10625,7 +10641,7 @@
|
|
|
10625
10641
|
scriptDirective.$inject = ["$templateCache"];
|
|
10626
10642
|
|
|
10627
10643
|
/**
|
|
10628
|
-
* @param {
|
|
10644
|
+
* @param {ng.TemplateCacheService} $templateCache
|
|
10629
10645
|
* @returns {import('../../interface.ts').Directive}
|
|
10630
10646
|
*/
|
|
10631
10647
|
function scriptDirective($templateCache) {
|
|
@@ -11642,9 +11658,9 @@
|
|
|
11642
11658
|
/**
|
|
11643
11659
|
*
|
|
11644
11660
|
* @param {*} $templateRequest
|
|
11645
|
-
* @param {import("../../services/anchor-scroll.js").AnchorScrollFunction} $anchorScroll
|
|
11661
|
+
* @param {import("../../services/anchor-scroll/anchor-scroll.js").AnchorScrollFunction} $anchorScroll
|
|
11646
11662
|
* @param {*} $animate
|
|
11647
|
-
* @param {import('../../services/exception/interface.ts').
|
|
11663
|
+
* @param {import('../../services/exception/interface.ts').ErrorHandler} $exceptionHandler
|
|
11648
11664
|
* @returns {import('../../interface.js').Directive}
|
|
11649
11665
|
*/
|
|
11650
11666
|
function ngIncludeDirective(
|
|
@@ -13484,8 +13500,8 @@
|
|
|
13484
13500
|
$injectTokens.$rootScope,
|
|
13485
13501
|
/**
|
|
13486
13502
|
*
|
|
13487
|
-
* @param {import('
|
|
13488
|
-
* @param {import('
|
|
13503
|
+
* @param {import('../../services/location/location.js').Location} $location
|
|
13504
|
+
* @param {import('../../core/scope/scope.js').Scope} $rootScope
|
|
13489
13505
|
* @returns
|
|
13490
13506
|
*/
|
|
13491
13507
|
function ($location, $rootScope) {
|
|
@@ -14032,7 +14048,7 @@
|
|
|
14032
14048
|
* ```
|
|
14033
14049
|
*
|
|
14034
14050
|
* @param {string} name The name of the animation (this is what the class-based CSS value will be compared to).
|
|
14035
|
-
* @param {import("../interface.ts").Injectable} factory The factory function that will be executed to return the animation
|
|
14051
|
+
* @param {import("../interface.ts").Injectable<any>} factory The factory function that will be executed to return the animation
|
|
14036
14052
|
* object.
|
|
14037
14053
|
*/
|
|
14038
14054
|
this.register = function (name, factory) {
|
|
@@ -14700,11 +14716,11 @@
|
|
|
14700
14716
|
*/
|
|
14701
14717
|
class TemplateCacheProvider {
|
|
14702
14718
|
constructor() {
|
|
14703
|
-
/** @type {
|
|
14719
|
+
/** @type {ng.TemplateCacheService} */
|
|
14704
14720
|
this.cache = new Map();
|
|
14705
14721
|
}
|
|
14706
14722
|
/**
|
|
14707
|
-
* @returns {
|
|
14723
|
+
* @returns {ng.TemplateCacheService}
|
|
14708
14724
|
*/
|
|
14709
14725
|
$get() {
|
|
14710
14726
|
return this.cache;
|
|
@@ -14757,7 +14773,7 @@
|
|
|
14757
14773
|
|
|
14758
14774
|
/** @typedef {import('../log/interface.ts').LogService} LogService */
|
|
14759
14775
|
|
|
14760
|
-
/** @typedef {import("./interface.ts").
|
|
14776
|
+
/** @typedef {import("./interface.ts").ErrorHandler} ErrorHandler */
|
|
14761
14777
|
|
|
14762
14778
|
/**
|
|
14763
14779
|
* Provider for `$exceptionHandler` service. Delegates uncaught exceptions to `$log.error()` by default.
|
|
@@ -14788,7 +14804,7 @@
|
|
|
14788
14804
|
}
|
|
14789
14805
|
|
|
14790
14806
|
/**
|
|
14791
|
-
* @returns {
|
|
14807
|
+
* @returns {ng.FilterFn}
|
|
14792
14808
|
*/
|
|
14793
14809
|
function filterFilter() {
|
|
14794
14810
|
/**
|
|
@@ -14992,7 +15008,7 @@
|
|
|
14992
15008
|
}
|
|
14993
15009
|
|
|
14994
15010
|
/**
|
|
14995
|
-
* @returns {
|
|
15011
|
+
* @returns {ng.FilterFn}
|
|
14996
15012
|
*/
|
|
14997
15013
|
function jsonFilter() {
|
|
14998
15014
|
return function (object, spacing) {
|
|
@@ -15004,7 +15020,7 @@
|
|
|
15004
15020
|
}
|
|
15005
15021
|
|
|
15006
15022
|
/**
|
|
15007
|
-
* @returns {
|
|
15023
|
+
* @returns {ng.FilterFn}
|
|
15008
15024
|
*/
|
|
15009
15025
|
function limitToFilter() {
|
|
15010
15026
|
/**
|
|
@@ -15054,7 +15070,7 @@
|
|
|
15054
15070
|
orderByFilter.$inject = [$injectTokens.$parse];
|
|
15055
15071
|
|
|
15056
15072
|
/**
|
|
15057
|
-
* @returns {
|
|
15073
|
+
* @returns {ng.FilterFn}
|
|
15058
15074
|
*/
|
|
15059
15075
|
function orderByFilter($parse) {
|
|
15060
15076
|
return function (array, sortPredicate, reverseOrder, compareFn) {
|
|
@@ -15236,7 +15252,7 @@
|
|
|
15236
15252
|
* ```
|
|
15237
15253
|
*
|
|
15238
15254
|
* @param {import('./state/state-service.js').StateProvider} $state
|
|
15239
|
-
* @returns {
|
|
15255
|
+
* @returns {ng.FilterFn}
|
|
15240
15256
|
*/
|
|
15241
15257
|
function $IsStateFilter($state) {
|
|
15242
15258
|
const isFilter = (state, params, options) =>
|
|
@@ -15258,7 +15274,7 @@
|
|
|
15258
15274
|
* ```
|
|
15259
15275
|
*
|
|
15260
15276
|
* @param {import('./state/state-service.js').StateProvider} $state
|
|
15261
|
-
* @returns {
|
|
15277
|
+
* @returns {ng.FilterFn}
|
|
15262
15278
|
*/
|
|
15263
15279
|
function $IncludedByStateFilter($state) {
|
|
15264
15280
|
const includesFilter = function (state, params, options) {
|
|
@@ -15289,8 +15305,8 @@
|
|
|
15289
15305
|
}
|
|
15290
15306
|
|
|
15291
15307
|
/**
|
|
15292
|
-
* @param {string|Record<string,
|
|
15293
|
-
* @param {
|
|
15308
|
+
* @param {string|Record<string, ng.FilterFn>} name
|
|
15309
|
+
* @param {ng.FilterService} [factory]
|
|
15294
15310
|
* @return {import('../../interface.ts').Provider}
|
|
15295
15311
|
*/
|
|
15296
15312
|
register(name, factory) {
|
|
@@ -15306,7 +15322,7 @@
|
|
|
15306
15322
|
$injectTokens.$injector,
|
|
15307
15323
|
/**
|
|
15308
15324
|
* @param {import("../../core/di/internal-injector.js").InjectorService} $injector
|
|
15309
|
-
* @returns {
|
|
15325
|
+
* @returns {ng.FilterService}
|
|
15310
15326
|
*/
|
|
15311
15327
|
($injector) => (/** @type {string} */ name) => $injector.get(name + SUFFIX),
|
|
15312
15328
|
];
|
|
@@ -17568,13 +17584,13 @@
|
|
|
17568
17584
|
}
|
|
17569
17585
|
|
|
17570
17586
|
$get = [
|
|
17571
|
-
|
|
17572
|
-
|
|
17587
|
+
$injectTokens.$parse,
|
|
17588
|
+
$injectTokens.$sce,
|
|
17573
17589
|
/**
|
|
17574
17590
|
*
|
|
17575
|
-
* @param {
|
|
17591
|
+
* @param {ng.ParseService} $parse
|
|
17576
17592
|
* @param {*} $sce
|
|
17577
|
-
* @returns
|
|
17593
|
+
* @returns {ng.InterpolateService}
|
|
17578
17594
|
*/
|
|
17579
17595
|
function ($parse, $sce) {
|
|
17580
17596
|
/** @type {InterpolateProvider} */
|
|
@@ -17823,7 +17839,7 @@
|
|
|
17823
17839
|
return concat.join("");
|
|
17824
17840
|
};
|
|
17825
17841
|
|
|
17826
|
-
return extend(
|
|
17842
|
+
return /**@type {import("./interface.js").InterpolationFunction} */ extend(
|
|
17827
17843
|
(context, cb) => {
|
|
17828
17844
|
let i = 0;
|
|
17829
17845
|
const ii = expressions.length;
|
|
@@ -17917,6 +17933,7 @@
|
|
|
17917
17933
|
return provider.endSymbol;
|
|
17918
17934
|
};
|
|
17919
17935
|
|
|
17936
|
+
// @ts-ignore
|
|
17920
17937
|
return $interpolate;
|
|
17921
17938
|
},
|
|
17922
17939
|
];
|
|
@@ -17924,51 +17941,6 @@
|
|
|
17924
17941
|
|
|
17925
17942
|
let lastCookies = {};
|
|
17926
17943
|
let lastCookieString = "";
|
|
17927
|
-
|
|
17928
|
-
/**
|
|
17929
|
-
* @returns {Object<String, String>} List of all cookies
|
|
17930
|
-
*/
|
|
17931
|
-
function getCookies() {
|
|
17932
|
-
let cookieArray;
|
|
17933
|
-
let cookie;
|
|
17934
|
-
let i;
|
|
17935
|
-
let index;
|
|
17936
|
-
let name;
|
|
17937
|
-
const currentCookieString = document.cookie;
|
|
17938
|
-
|
|
17939
|
-
if (currentCookieString !== lastCookieString) {
|
|
17940
|
-
lastCookieString = currentCookieString;
|
|
17941
|
-
cookieArray = lastCookieString.split("; ");
|
|
17942
|
-
lastCookies = {};
|
|
17943
|
-
|
|
17944
|
-
for (i = 0; i < cookieArray.length; i++) {
|
|
17945
|
-
cookie = cookieArray[i];
|
|
17946
|
-
index = cookie.indexOf("=");
|
|
17947
|
-
if (index > 0) {
|
|
17948
|
-
// ignore nameless cookies
|
|
17949
|
-
name = safeDecodeURIComponent(cookie.substring(0, index));
|
|
17950
|
-
// the first value that is seen for a cookie is the most
|
|
17951
|
-
// specific one. values for the same cookie name that
|
|
17952
|
-
// follow are for less specific paths.
|
|
17953
|
-
if (isUndefined(lastCookies[name])) {
|
|
17954
|
-
lastCookies[name] = safeDecodeURIComponent(
|
|
17955
|
-
cookie.substring(index + 1),
|
|
17956
|
-
);
|
|
17957
|
-
}
|
|
17958
|
-
}
|
|
17959
|
-
}
|
|
17960
|
-
}
|
|
17961
|
-
return lastCookies;
|
|
17962
|
-
}
|
|
17963
|
-
|
|
17964
|
-
function safeDecodeURIComponent(str) {
|
|
17965
|
-
try {
|
|
17966
|
-
return decodeURIComponent(str);
|
|
17967
|
-
} catch {
|
|
17968
|
-
return str;
|
|
17969
|
-
}
|
|
17970
|
-
}
|
|
17971
|
-
|
|
17972
17944
|
const APPLICATION_JSON = "application/json";
|
|
17973
17945
|
const CONTENT_TYPE_APPLICATION_JSON = {
|
|
17974
17946
|
"Content-Type": `${APPLICATION_JSON};charset=utf-8`,
|
|
@@ -18000,8 +17972,12 @@
|
|
|
18000
17972
|
* Note that serializer will sort the request parameters alphabetically.
|
|
18001
17973
|
*/
|
|
18002
17974
|
function HttpParamSerializerProvider() {
|
|
18003
|
-
|
|
18004
|
-
|
|
17975
|
+
/**
|
|
17976
|
+
* @returns {import('./interface.ts').HttpParamSerializer}
|
|
17977
|
+
* A function that serializes parameters into a query string.
|
|
17978
|
+
*/
|
|
17979
|
+
this.$get = () => {
|
|
17980
|
+
return (params) => {
|
|
18005
17981
|
if (!params) return "";
|
|
18006
17982
|
const parts = [];
|
|
18007
17983
|
Object.keys(params)
|
|
@@ -18327,17 +18303,15 @@
|
|
|
18327
18303
|
});
|
|
18328
18304
|
|
|
18329
18305
|
this.$get = [
|
|
18330
|
-
|
|
18331
|
-
|
|
18332
|
-
"$sce",
|
|
18306
|
+
$injectTokens.$injector,
|
|
18307
|
+
$injectTokens.$sce,
|
|
18333
18308
|
/**
|
|
18334
18309
|
*
|
|
18335
|
-
* @param {*} $httpBackend
|
|
18336
18310
|
* @param {import("../../core/di/internal-injector.js").InjectorService} $injector
|
|
18337
18311
|
* @param {*} $sce
|
|
18338
18312
|
* @returns
|
|
18339
18313
|
*/
|
|
18340
|
-
function ($
|
|
18314
|
+
function ($injector, $sce) {
|
|
18341
18315
|
/**
|
|
18342
18316
|
* @type {Map<string, string>}
|
|
18343
18317
|
*/
|
|
@@ -18673,7 +18647,7 @@
|
|
|
18673
18647
|
* Makes the request.
|
|
18674
18648
|
*
|
|
18675
18649
|
* !!! ACCESSES CLOSURE VARS:
|
|
18676
|
-
*
|
|
18650
|
+
* defaults, $log, $rootScope, defaultCache, $http.pendingRequests
|
|
18677
18651
|
*/
|
|
18678
18652
|
function sendReq(config, reqData) {
|
|
18679
18653
|
const { promise, resolve, reject } = Promise.withResolvers();
|
|
@@ -18744,7 +18718,7 @@
|
|
|
18744
18718
|
xsrfValue;
|
|
18745
18719
|
}
|
|
18746
18720
|
|
|
18747
|
-
|
|
18721
|
+
http(
|
|
18748
18722
|
config.method,
|
|
18749
18723
|
url,
|
|
18750
18724
|
reqData,
|
|
@@ -18760,6 +18734,10 @@
|
|
|
18760
18734
|
|
|
18761
18735
|
return promise;
|
|
18762
18736
|
|
|
18737
|
+
/**
|
|
18738
|
+
* @param eventHandlers
|
|
18739
|
+
* @return {Record<string, EventListener>}
|
|
18740
|
+
*/
|
|
18763
18741
|
function createApplyHandlers(eventHandlers) {
|
|
18764
18742
|
if (eventHandlers) {
|
|
18765
18743
|
const applyHandlers = {};
|
|
@@ -18776,12 +18754,14 @@
|
|
|
18776
18754
|
}
|
|
18777
18755
|
};
|
|
18778
18756
|
});
|
|
18779
|
-
return applyHandlers;
|
|
18757
|
+
return /** @type {Record<string, EventListener>} */ (applyHandlers);
|
|
18758
|
+
} else {
|
|
18759
|
+
return {};
|
|
18780
18760
|
}
|
|
18781
18761
|
}
|
|
18782
18762
|
|
|
18783
18763
|
/**
|
|
18784
|
-
* Callback registered to
|
|
18764
|
+
* Callback registered to http():
|
|
18785
18765
|
* - caches the response if desired
|
|
18786
18766
|
* - resolves the raw $http promise
|
|
18787
18767
|
* - calls $apply
|
|
@@ -18869,159 +18849,177 @@
|
|
|
18869
18849
|
}
|
|
18870
18850
|
|
|
18871
18851
|
/**
|
|
18872
|
-
*
|
|
18873
|
-
*
|
|
18874
|
-
*
|
|
18875
|
-
|
|
18876
|
-
|
|
18877
|
-
|
|
18878
|
-
|
|
18879
|
-
|
|
18880
|
-
|
|
18881
|
-
|
|
18882
|
-
|
|
18883
|
-
* @
|
|
18852
|
+
* Makes an HTTP request using XMLHttpRequest with flexible options.
|
|
18853
|
+
*
|
|
18854
|
+
* @param {string} method - The HTTP method (e.g., "GET", "POST").
|
|
18855
|
+
* @param {string} [url] - The URL to send the request to. Defaults to the current page URL.
|
|
18856
|
+
* @param {*} [post] - The body to send with the request, if any.
|
|
18857
|
+
* @param {function(number, any, string|null, string, string): void} [callback] - Callback invoked when the request completes.
|
|
18858
|
+
* @param {Object<string, string|undefined>} [headers] - Headers to set on the request.
|
|
18859
|
+
* @param {number|Promise<any>} [timeout] - Timeout in ms or a cancellable promise.
|
|
18860
|
+
* @param {boolean} [withCredentials] - Whether to send credentials with the request.
|
|
18861
|
+
* @param {XMLHttpRequestResponseType} [responseType] - The type of data expected in the response.
|
|
18862
|
+
* @param {Record<string, EventListener>} [eventHandlers] - Event listeners for the XMLHttpRequest object.
|
|
18863
|
+
* @param {Record<string, EventListener>} [uploadEventHandlers] - Event listeners for the XMLHttpRequest.upload object.
|
|
18864
|
+
* @returns {void}
|
|
18884
18865
|
*/
|
|
18885
|
-
function
|
|
18886
|
-
|
|
18887
|
-
|
|
18888
|
-
|
|
18889
|
-
|
|
18890
|
-
|
|
18891
|
-
|
|
18892
|
-
|
|
18893
|
-
|
|
18894
|
-
|
|
18895
|
-
|
|
18896
|
-
|
|
18897
|
-
|
|
18898
|
-
* @param {Object<string, EventListener>} [uploadEventHandlers] - Event listeners for the XMLHttpRequest.upload object.
|
|
18899
|
-
* @returns {void}
|
|
18900
|
-
*/
|
|
18901
|
-
return function (
|
|
18902
|
-
method,
|
|
18903
|
-
url,
|
|
18904
|
-
post,
|
|
18905
|
-
callback,
|
|
18906
|
-
headers,
|
|
18907
|
-
timeout,
|
|
18908
|
-
withCredentials,
|
|
18909
|
-
responseType,
|
|
18910
|
-
eventHandlers,
|
|
18911
|
-
uploadEventHandlers,
|
|
18912
|
-
) {
|
|
18913
|
-
url = url || trimEmptyHash(window.location.href);
|
|
18866
|
+
function http(
|
|
18867
|
+
method,
|
|
18868
|
+
url,
|
|
18869
|
+
post,
|
|
18870
|
+
callback,
|
|
18871
|
+
headers,
|
|
18872
|
+
timeout,
|
|
18873
|
+
withCredentials,
|
|
18874
|
+
responseType,
|
|
18875
|
+
eventHandlers,
|
|
18876
|
+
uploadEventHandlers,
|
|
18877
|
+
) {
|
|
18878
|
+
url = url || trimEmptyHash(window.location.href);
|
|
18914
18879
|
|
|
18915
|
-
|
|
18916
|
-
|
|
18917
|
-
|
|
18880
|
+
const xhr = new XMLHttpRequest();
|
|
18881
|
+
let abortedByTimeout = false;
|
|
18882
|
+
let timeoutId;
|
|
18918
18883
|
|
|
18919
|
-
|
|
18884
|
+
xhr.open(method, url, true);
|
|
18920
18885
|
|
|
18921
|
-
|
|
18922
|
-
|
|
18923
|
-
|
|
18924
|
-
|
|
18925
|
-
}
|
|
18886
|
+
if (headers) {
|
|
18887
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
18888
|
+
if (isDefined(value)) {
|
|
18889
|
+
xhr.setRequestHeader(key, value);
|
|
18926
18890
|
}
|
|
18927
18891
|
}
|
|
18892
|
+
}
|
|
18928
18893
|
|
|
18929
|
-
|
|
18930
|
-
|
|
18931
|
-
|
|
18894
|
+
xhr.onload = () => {
|
|
18895
|
+
let status = xhr.status || 0;
|
|
18896
|
+
const statusText = xhr.statusText || "";
|
|
18932
18897
|
|
|
18933
|
-
|
|
18934
|
-
|
|
18935
|
-
|
|
18936
|
-
: new URL(url).protocol === "file:"
|
|
18937
|
-
? 404
|
|
18938
|
-
: 0;
|
|
18939
|
-
}
|
|
18898
|
+
if (status === 0) {
|
|
18899
|
+
status = xhr.response ? 200 : new URL(url).protocol === "file:" ? 404 : 0;
|
|
18900
|
+
}
|
|
18940
18901
|
|
|
18941
|
-
|
|
18942
|
-
|
|
18943
|
-
|
|
18944
|
-
|
|
18945
|
-
|
|
18946
|
-
|
|
18947
|
-
|
|
18948
|
-
|
|
18902
|
+
completeRequest(
|
|
18903
|
+
status,
|
|
18904
|
+
xhr.response,
|
|
18905
|
+
xhr.getAllResponseHeaders(),
|
|
18906
|
+
statusText,
|
|
18907
|
+
"complete",
|
|
18908
|
+
);
|
|
18909
|
+
};
|
|
18949
18910
|
|
|
18950
|
-
|
|
18951
|
-
|
|
18911
|
+
xhr.onerror = () => completeRequest(-1, null, null, "", "error");
|
|
18912
|
+
xhr.ontimeout = () => completeRequest(-1, null, null, "", "timeout");
|
|
18952
18913
|
|
|
18953
|
-
|
|
18954
|
-
|
|
18955
|
-
|
|
18956
|
-
null,
|
|
18957
|
-
null,
|
|
18958
|
-
"",
|
|
18959
|
-
abortedByTimeout ? "timeout" : "abort",
|
|
18960
|
-
);
|
|
18961
|
-
};
|
|
18914
|
+
xhr.onabort = () => {
|
|
18915
|
+
completeRequest(-1, null, null, "", abortedByTimeout ? "timeout" : "abort");
|
|
18916
|
+
};
|
|
18962
18917
|
|
|
18963
|
-
|
|
18964
|
-
|
|
18965
|
-
|
|
18966
|
-
}
|
|
18918
|
+
if (eventHandlers) {
|
|
18919
|
+
for (const [key, handler] of Object.entries(eventHandlers)) {
|
|
18920
|
+
xhr.addEventListener(key, handler);
|
|
18967
18921
|
}
|
|
18922
|
+
}
|
|
18968
18923
|
|
|
18969
|
-
|
|
18970
|
-
|
|
18971
|
-
|
|
18972
|
-
}
|
|
18924
|
+
if (uploadEventHandlers) {
|
|
18925
|
+
for (const [key, handler] of Object.entries(uploadEventHandlers)) {
|
|
18926
|
+
xhr.upload.addEventListener(key, handler);
|
|
18973
18927
|
}
|
|
18928
|
+
}
|
|
18974
18929
|
|
|
18975
|
-
|
|
18976
|
-
|
|
18977
|
-
|
|
18930
|
+
if (withCredentials) {
|
|
18931
|
+
xhr.withCredentials = true;
|
|
18932
|
+
}
|
|
18978
18933
|
|
|
18979
|
-
|
|
18980
|
-
|
|
18981
|
-
|
|
18982
|
-
|
|
18983
|
-
|
|
18984
|
-
}
|
|
18934
|
+
if (responseType) {
|
|
18935
|
+
try {
|
|
18936
|
+
xhr.responseType = responseType;
|
|
18937
|
+
} catch (e) {
|
|
18938
|
+
if (responseType !== "json") throw e;
|
|
18985
18939
|
}
|
|
18940
|
+
}
|
|
18986
18941
|
|
|
18987
|
-
|
|
18942
|
+
xhr.send(isUndefined(post) ? null : post);
|
|
18988
18943
|
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
|
|
18992
|
-
|
|
18993
|
-
|
|
18994
|
-
|
|
18995
|
-
|
|
18944
|
+
if (typeof timeout === "number" && timeout > 0) {
|
|
18945
|
+
timeoutId = setTimeout(() => timeoutRequest("timeout"), timeout);
|
|
18946
|
+
} else if (isPromiseLike(timeout)) {
|
|
18947
|
+
/** @type {Promise} */ (timeout).then(() => {
|
|
18948
|
+
timeoutRequest(isDefined(timeout["$$timeoutId"]) ? "timeout" : "abort");
|
|
18949
|
+
});
|
|
18950
|
+
}
|
|
18996
18951
|
|
|
18997
|
-
|
|
18998
|
-
|
|
18999
|
-
|
|
19000
|
-
|
|
19001
|
-
|
|
19002
|
-
|
|
18952
|
+
/**
|
|
18953
|
+
* @param {"timeout"|"abort"} reason
|
|
18954
|
+
*/
|
|
18955
|
+
function timeoutRequest(reason) {
|
|
18956
|
+
abortedByTimeout = reason === "timeout";
|
|
18957
|
+
if (xhr) xhr.abort();
|
|
18958
|
+
}
|
|
18959
|
+
|
|
18960
|
+
/**
|
|
18961
|
+
* @param {number} status - HTTP status code or -1 for network errors.
|
|
18962
|
+
* @param {*} response - The parsed or raw response from the server.
|
|
18963
|
+
* @param {string|null} headersString - The raw response headers as a string.
|
|
18964
|
+
* @param {string} statusText - The status text returned by the server.
|
|
18965
|
+
* @param {"complete"|"error"|"timeout"|"abort"} xhrStatus - Final status of the request.
|
|
18966
|
+
*/
|
|
18967
|
+
function completeRequest(
|
|
18968
|
+
status,
|
|
18969
|
+
response,
|
|
18970
|
+
headersString,
|
|
18971
|
+
statusText,
|
|
18972
|
+
xhrStatus,
|
|
18973
|
+
) {
|
|
18974
|
+
if (isDefined(timeoutId)) {
|
|
18975
|
+
clearTimeout(timeoutId);
|
|
19003
18976
|
}
|
|
18977
|
+
callback(status, response, headersString, statusText, xhrStatus);
|
|
18978
|
+
}
|
|
18979
|
+
}
|
|
19004
18980
|
|
|
19005
|
-
|
|
19006
|
-
|
|
19007
|
-
|
|
19008
|
-
|
|
19009
|
-
|
|
19010
|
-
|
|
19011
|
-
|
|
19012
|
-
|
|
19013
|
-
|
|
19014
|
-
|
|
19015
|
-
|
|
19016
|
-
|
|
19017
|
-
|
|
19018
|
-
)
|
|
19019
|
-
|
|
19020
|
-
|
|
18981
|
+
/**
|
|
18982
|
+
* @returns {Object<String, String>} List of all cookies
|
|
18983
|
+
*/
|
|
18984
|
+
function getCookies() {
|
|
18985
|
+
let cookieArray;
|
|
18986
|
+
let cookie;
|
|
18987
|
+
let i;
|
|
18988
|
+
let index;
|
|
18989
|
+
let name;
|
|
18990
|
+
const currentCookieString = document.cookie;
|
|
18991
|
+
|
|
18992
|
+
if (currentCookieString !== lastCookieString) {
|
|
18993
|
+
lastCookieString = currentCookieString;
|
|
18994
|
+
cookieArray = lastCookieString.split("; ");
|
|
18995
|
+
lastCookies = {};
|
|
18996
|
+
|
|
18997
|
+
for (i = 0; i < cookieArray.length; i++) {
|
|
18998
|
+
cookie = cookieArray[i];
|
|
18999
|
+
index = cookie.indexOf("=");
|
|
19000
|
+
if (index > 0) {
|
|
19001
|
+
// ignore nameless cookies
|
|
19002
|
+
name = safeDecodeURIComponent(cookie.substring(0, index));
|
|
19003
|
+
// the first value that is seen for a cookie is the most
|
|
19004
|
+
// specific one. values for the same cookie name that
|
|
19005
|
+
// follow are for less specific paths.
|
|
19006
|
+
if (isUndefined(lastCookies[name])) {
|
|
19007
|
+
lastCookies[name] = safeDecodeURIComponent(
|
|
19008
|
+
cookie.substring(index + 1),
|
|
19009
|
+
);
|
|
19010
|
+
}
|
|
19021
19011
|
}
|
|
19022
|
-
callback(status, response, headersString, statusText, xhrStatus);
|
|
19023
19012
|
}
|
|
19024
|
-
}
|
|
19013
|
+
}
|
|
19014
|
+
return lastCookies;
|
|
19015
|
+
}
|
|
19016
|
+
|
|
19017
|
+
function safeDecodeURIComponent(str) {
|
|
19018
|
+
try {
|
|
19019
|
+
return decodeURIComponent(str);
|
|
19020
|
+
} catch {
|
|
19021
|
+
return str;
|
|
19022
|
+
}
|
|
19025
19023
|
}
|
|
19026
19024
|
|
|
19027
19025
|
const PATH_MATCH = /^([^?#]*)(\?([^#]*))?(#(.*))?$/;
|
|
@@ -19532,7 +19530,7 @@
|
|
|
19532
19530
|
$injectTokens.$rootElement,
|
|
19533
19531
|
/**
|
|
19534
19532
|
*
|
|
19535
|
-
* @param {
|
|
19533
|
+
* @param {ng.Scope} $rootScope
|
|
19536
19534
|
* @param {Element} $rootElement
|
|
19537
19535
|
* @returns {Location}
|
|
19538
19536
|
*/
|
|
@@ -20098,7 +20096,7 @@
|
|
|
20098
20096
|
}
|
|
20099
20097
|
|
|
20100
20098
|
/**
|
|
20101
|
-
* @type {
|
|
20099
|
+
* @type {ng.ParseService}
|
|
20102
20100
|
*/
|
|
20103
20101
|
let $parse;
|
|
20104
20102
|
|
|
@@ -21197,6 +21195,9 @@
|
|
|
21197
21195
|
return this.$root == /** @type {Scope} */ (this);
|
|
21198
21196
|
}
|
|
21199
21197
|
|
|
21198
|
+
/**
|
|
21199
|
+
* @param {Function} fn
|
|
21200
|
+
*/
|
|
21200
21201
|
$postUpdate(fn) {
|
|
21201
21202
|
$postUpdateQueue.push(fn);
|
|
21202
21203
|
}
|
|
@@ -21379,11 +21380,11 @@
|
|
|
21379
21380
|
"$sce",
|
|
21380
21381
|
/**
|
|
21381
21382
|
*
|
|
21382
|
-
* @param {
|
|
21383
|
-
* @param {
|
|
21384
|
-
* @param {
|
|
21383
|
+
* @param {ng.ExceptionHandlerService} $exceptionHandler
|
|
21384
|
+
* @param {ng.TemplateCacheService} $templateCache
|
|
21385
|
+
* @param {ng.HttpService} $http
|
|
21385
21386
|
* @param {*} $sce
|
|
21386
|
-
* @returns
|
|
21387
|
+
* @returns {ng.TemplateRequestService}
|
|
21387
21388
|
*/
|
|
21388
21389
|
function ($exceptionHandler, $templateCache, $http, $sce) {
|
|
21389
21390
|
function handleRequestFn(tpl, ignoreRequestError) {
|
|
@@ -24361,14 +24362,14 @@
|
|
|
24361
24362
|
}
|
|
24362
24363
|
|
|
24363
24364
|
this.$get = [
|
|
24364
|
-
|
|
24365
|
-
|
|
24366
|
-
|
|
24367
|
-
|
|
24368
|
-
|
|
24365
|
+
$injectTokens.$rootScope,
|
|
24366
|
+
$injectTokens.$injector,
|
|
24367
|
+
$injectTokens.$$AnimateRunner,
|
|
24368
|
+
$injectTokens.$$rAFScheduler,
|
|
24369
|
+
$injectTokens.$$animateCache,
|
|
24369
24370
|
/**
|
|
24370
24371
|
*
|
|
24371
|
-
* @param {
|
|
24372
|
+
* @param {ng.RootScopeService} $rootScope
|
|
24372
24373
|
* @param {import("../core/di/internal-injector").InjectorService} $injector
|
|
24373
24374
|
* @param {*} $$AnimateRunner
|
|
24374
24375
|
* @param {import("./raf-scheduler").RafScheduler} $$rAFScheduler
|
|
@@ -24534,7 +24535,6 @@
|
|
|
24534
24535
|
// block. This way we can group animations for all the animations that
|
|
24535
24536
|
// were apart of the same postDigest flush call.
|
|
24536
24537
|
if (animationQueue.length > 1) return runner;
|
|
24537
|
-
|
|
24538
24538
|
$rootScope.$postUpdate(() => {
|
|
24539
24539
|
const animations = [];
|
|
24540
24540
|
animationQueue.forEach((entry) => {
|
|
@@ -25424,158 +25424,6 @@
|
|
|
25424
25424
|
};
|
|
25425
25425
|
}
|
|
25426
25426
|
|
|
25427
|
-
/**
|
|
25428
|
-
* Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.
|
|
25429
|
-
*
|
|
25430
|
-
* Given a function with N parameters, returns a new function that supports partial application.
|
|
25431
|
-
* The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,
|
|
25432
|
-
* where M is less than N, it returns a new function that accepts the remaining parameters. It continues to
|
|
25433
|
-
* accept more parameters until all N parameters have been supplied.
|
|
25434
|
-
*
|
|
25435
|
-
*
|
|
25436
|
-
* This contrived example uses a partially applied function as an predicate, which returns true
|
|
25437
|
-
* if an object is found in both arrays.
|
|
25438
|
-
* @example
|
|
25439
|
-
* ```
|
|
25440
|
-
* // returns true if an object is in both of the two arrays
|
|
25441
|
-
* function inBoth(array1, array2, object) {
|
|
25442
|
-
* return array1.indexOf(object) !== -1 &&
|
|
25443
|
-
* array2.indexOf(object) !== 1;
|
|
25444
|
-
* }
|
|
25445
|
-
* let obj1, obj2, obj3, obj4, obj5, obj6, obj7
|
|
25446
|
-
* let foos = [obj1, obj3]
|
|
25447
|
-
* let bars = [obj3, obj4, obj5]
|
|
25448
|
-
*
|
|
25449
|
-
* // A curried "copy" of inBoth
|
|
25450
|
-
* let curriedInBoth = curry(inBoth);
|
|
25451
|
-
* // Partially apply both the array1 and array2
|
|
25452
|
-
* let inFoosAndBars = curriedInBoth(foos, bars);
|
|
25453
|
-
*
|
|
25454
|
-
* // Supply the final argument; since all arguments are
|
|
25455
|
-
* // supplied, the original inBoth function is then called.
|
|
25456
|
-
* let obj1InBoth = inFoosAndBars(obj1); // false
|
|
25457
|
-
*
|
|
25458
|
-
* // Use the inFoosAndBars as a predicate.
|
|
25459
|
-
* // Filter, on each iteration, supplies the final argument
|
|
25460
|
-
* let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];
|
|
25461
|
-
* let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]
|
|
25462
|
-
*
|
|
25463
|
-
* ```
|
|
25464
|
-
*
|
|
25465
|
-
* @param fn
|
|
25466
|
-
* @returns {*|function(): (*|any)}
|
|
25467
|
-
*/
|
|
25468
|
-
function curry(fn) {
|
|
25469
|
-
return function curried() {
|
|
25470
|
-
if (arguments.length >= fn.length) {
|
|
25471
|
-
return fn.apply(this, arguments);
|
|
25472
|
-
}
|
|
25473
|
-
const args = Array.prototype.slice.call(arguments);
|
|
25474
|
-
return curried.bind(this, ...args);
|
|
25475
|
-
};
|
|
25476
|
-
}
|
|
25477
|
-
/**
|
|
25478
|
-
* Given a varargs list of functions, returns a function that composes the argument functions, right-to-left
|
|
25479
|
-
* given: f(x), g(x), h(x)
|
|
25480
|
-
* let composed = compose(f,g,h)
|
|
25481
|
-
* then, composed is: f(g(h(x)))
|
|
25482
|
-
*/
|
|
25483
|
-
function compose() {
|
|
25484
|
-
const args = arguments;
|
|
25485
|
-
const start = args.length - 1;
|
|
25486
|
-
return function () {
|
|
25487
|
-
let i = start,
|
|
25488
|
-
result = args[start].apply(this, arguments);
|
|
25489
|
-
while (i--) result = args[i].call(this, result);
|
|
25490
|
-
return result;
|
|
25491
|
-
};
|
|
25492
|
-
}
|
|
25493
|
-
/**
|
|
25494
|
-
* Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right
|
|
25495
|
-
* given: f(x), g(x), h(x)
|
|
25496
|
-
* let piped = pipe(f,g,h);
|
|
25497
|
-
* then, piped is: h(g(f(x)))
|
|
25498
|
-
*/
|
|
25499
|
-
function pipe() {
|
|
25500
|
-
return compose.apply(null, [].slice.call(arguments).reverse());
|
|
25501
|
-
}
|
|
25502
|
-
|
|
25503
|
-
/**
|
|
25504
|
-
* Given a property name and a value, returns a function that returns a boolean based on whether
|
|
25505
|
-
* the passed object has a property that matches the value
|
|
25506
|
-
* let obj = { foo: 1, name: "blarg" };
|
|
25507
|
-
* let getName = propEq("name", "blarg");
|
|
25508
|
-
* getName(obj) === true
|
|
25509
|
-
*/
|
|
25510
|
-
const propEq = curry((name, _val, obj) => obj && obj[name] === _val);
|
|
25511
|
-
/**
|
|
25512
|
-
* Given a dotted property name, returns a function that returns a nested property from an object, or undefined
|
|
25513
|
-
* let obj = { id: 1, nestedObj: { foo: 1, name: "blarg" }, };
|
|
25514
|
-
* let getName = prop("nestedObj.name");
|
|
25515
|
-
* getName(obj) === "blarg"
|
|
25516
|
-
* let propNotFound = prop("this.property.doesnt.exist");
|
|
25517
|
-
* propNotFound(obj) === undefined
|
|
25518
|
-
*/
|
|
25519
|
-
const parse = (name) =>
|
|
25520
|
-
pipe.apply(
|
|
25521
|
-
null,
|
|
25522
|
-
name.split(".").map((name) => (obj) => obj && obj[name]),
|
|
25523
|
-
);
|
|
25524
|
-
|
|
25525
|
-
/** Given a class, returns a Predicate function that returns true if the object is of that class */
|
|
25526
|
-
const is = (ctor) => (obj) =>
|
|
25527
|
-
(obj != null && obj.constructor === ctor) || obj instanceof ctor;
|
|
25528
|
-
|
|
25529
|
-
/** Given a value, returns a function which returns the value */
|
|
25530
|
-
const val = (v) => () => v;
|
|
25531
|
-
/**
|
|
25532
|
-
* Sorta like Pattern Matching (a functional programming conditional construct)
|
|
25533
|
-
*
|
|
25534
|
-
* See http://c2.com/cgi/wiki?PatternMatching
|
|
25535
|
-
*
|
|
25536
|
-
* This is a conditional construct which allows a series of predicates and output functions
|
|
25537
|
-
* to be checked and then applied. Each predicate receives the input. If the predicate
|
|
25538
|
-
* returns truthy, then its matching output function (mapping function) is provided with
|
|
25539
|
-
* the input and, then the result is returned.
|
|
25540
|
-
*
|
|
25541
|
-
* Each combination (2-tuple) of predicate + output function should be placed in an array
|
|
25542
|
-
* of size 2: [ predicate, mapFn ]
|
|
25543
|
-
*
|
|
25544
|
-
* These 2-tuples should be put in an outer array.
|
|
25545
|
-
*
|
|
25546
|
-
* @example
|
|
25547
|
-
* ```
|
|
25548
|
-
*
|
|
25549
|
-
* // Here's a 2-tuple where the first element is the isString predicate
|
|
25550
|
-
* // and the second element is a function that returns a description of the input
|
|
25551
|
-
* let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];
|
|
25552
|
-
*
|
|
25553
|
-
* // Second tuple: predicate "isNumber", mapfn returns a description
|
|
25554
|
-
* let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];
|
|
25555
|
-
*
|
|
25556
|
-
* let third = [ (input) => input === null, (input) => `Oh, null...` ];
|
|
25557
|
-
*
|
|
25558
|
-
* let fourth = [ (input) => input === undefined, (input) => `notdefined` ];
|
|
25559
|
-
*
|
|
25560
|
-
* let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);
|
|
25561
|
-
*
|
|
25562
|
-
* console.log(descriptionOf(undefined)); // 'notdefined'
|
|
25563
|
-
* console.log(descriptionOf(55)); // '(55) That's a number!'
|
|
25564
|
-
* console.log(descriptionOf("foo")); // 'Here's your string foo'
|
|
25565
|
-
* ```
|
|
25566
|
-
*
|
|
25567
|
-
* @param struct A 2D array. Each element of the array should be an array, a 2-tuple,
|
|
25568
|
-
* with a Predicate and a mapping/output function
|
|
25569
|
-
* @returns {function(any): *}
|
|
25570
|
-
*/
|
|
25571
|
-
function pattern(struct) {
|
|
25572
|
-
return function (x) {
|
|
25573
|
-
for (let i = 0; i < struct.length; i++) {
|
|
25574
|
-
if (struct[i][0](x)) return struct[i][1](x);
|
|
25575
|
-
}
|
|
25576
|
-
};
|
|
25577
|
-
}
|
|
25578
|
-
|
|
25579
25427
|
function equals(o1, o2) {
|
|
25580
25428
|
if (o1 === o2) return true;
|
|
25581
25429
|
if (o1 === null || o2 === null) return false;
|
|
@@ -25602,81 +25450,7 @@
|
|
|
25602
25450
|
}
|
|
25603
25451
|
return true;
|
|
25604
25452
|
}
|
|
25605
|
-
|
|
25606
|
-
* Builds proxy functions on the `to` object which pass through to the `from` object.
|
|
25607
|
-
*
|
|
25608
|
-
* For each key in `fnNames`, creates a proxy function on the `to` object.
|
|
25609
|
-
* The proxy function calls the real function on the `from` object.
|
|
25610
|
-
*
|
|
25611
|
-
*
|
|
25612
|
-
* #### Example:
|
|
25613
|
-
* This example creates an new class instance whose functions are prebound to the new'd object.
|
|
25614
|
-
* ```js
|
|
25615
|
-
* class Foo {
|
|
25616
|
-
* constructor(data) {
|
|
25617
|
-
* // Binds all functions from Foo.prototype to 'this',
|
|
25618
|
-
* // then copies them to 'this'
|
|
25619
|
-
* bindFunctions(Foo.prototype, this, this);
|
|
25620
|
-
* this.data = data;
|
|
25621
|
-
* }
|
|
25622
|
-
*
|
|
25623
|
-
* log() {
|
|
25624
|
-
* console.log(this.data);
|
|
25625
|
-
* }
|
|
25626
|
-
* }
|
|
25627
|
-
*
|
|
25628
|
-
* let myFoo = new Foo([1,2,3]);
|
|
25629
|
-
* var logit = myFoo.log;
|
|
25630
|
-
* logit(); // logs [1, 2, 3] from the myFoo 'this' instance
|
|
25631
|
-
* ```
|
|
25632
|
-
*
|
|
25633
|
-
* #### Example:
|
|
25634
|
-
* This example creates a bound version of a service function, and copies it to another object
|
|
25635
|
-
* ```
|
|
25636
|
-
*
|
|
25637
|
-
* var SomeService = {
|
|
25638
|
-
* this.data = [3, 4, 5];
|
|
25639
|
-
* this.log = function() {
|
|
25640
|
-
* console.log(this.data);
|
|
25641
|
-
* }
|
|
25642
|
-
* }
|
|
25643
|
-
*
|
|
25644
|
-
* // Constructor fn
|
|
25645
|
-
* function OtherThing() {
|
|
25646
|
-
* // Binds all functions from SomeService to SomeService,
|
|
25647
|
-
* // then copies them to 'this'
|
|
25648
|
-
* bindFunctions(SomeService, this, SomeService);
|
|
25649
|
-
* }
|
|
25650
|
-
*
|
|
25651
|
-
* let myOtherThing = new OtherThing();
|
|
25652
|
-
* myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this'
|
|
25653
|
-
* ```
|
|
25654
|
-
*
|
|
25655
|
-
* @param source A function that returns the source object which contains the original functions to be bound
|
|
25656
|
-
* @param target A function that returns the target object which will receive the bound functions
|
|
25657
|
-
* @param bind A function that returns the object which the functions will be bound to
|
|
25658
|
-
* @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object)
|
|
25659
|
-
* @param latebind If true, the binding of the function is delayed until the first time it's invoked
|
|
25660
|
-
*/
|
|
25661
|
-
function createProxyFunctions(
|
|
25662
|
-
source,
|
|
25663
|
-
target,
|
|
25664
|
-
bind,
|
|
25665
|
-
fnNames,
|
|
25666
|
-
latebind = false,
|
|
25667
|
-
) {
|
|
25668
|
-
const bindFunction = (fnName) => source()[fnName].bind(bind());
|
|
25669
|
-
const makeLateRebindFn = (fnName) =>
|
|
25670
|
-
function lateRebindFunction() {
|
|
25671
|
-
target[fnName] = bindFunction(fnName);
|
|
25672
|
-
return target[fnName].apply(null, arguments);
|
|
25673
|
-
};
|
|
25674
|
-
fnNames = fnNames || Object.keys(source());
|
|
25675
|
-
return fnNames.reduce((acc, name) => {
|
|
25676
|
-
acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name);
|
|
25677
|
-
return acc;
|
|
25678
|
-
}, target);
|
|
25679
|
-
}
|
|
25453
|
+
|
|
25680
25454
|
/**
|
|
25681
25455
|
* prototypal inheritance helper.
|
|
25682
25456
|
* Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it
|
|
@@ -25701,11 +25475,13 @@
|
|
|
25701
25475
|
/**
|
|
25702
25476
|
* Given an array, and an item, if the item is found in the array, it removes it (in-place).
|
|
25703
25477
|
* The same array is returned
|
|
25478
|
+
* @param {Array} array
|
|
25479
|
+
* @param {any} obj
|
|
25480
|
+
* @returns {Array}
|
|
25704
25481
|
*/
|
|
25705
|
-
|
|
25706
|
-
|
|
25707
|
-
|
|
25708
|
-
if (idx >= 0) array.splice(idx, 1);
|
|
25482
|
+
function removeFrom(array, obj) {
|
|
25483
|
+
const i = array.indexOf(obj);
|
|
25484
|
+
if (i !== -1) array.splice(i, 1);
|
|
25709
25485
|
return array;
|
|
25710
25486
|
}
|
|
25711
25487
|
|
|
@@ -25988,6 +25764,148 @@
|
|
|
25988
25764
|
const silentRejection = (error) =>
|
|
25989
25765
|
silenceUncaughtInPromise(Promise.reject(error));
|
|
25990
25766
|
|
|
25767
|
+
/**
|
|
25768
|
+
* Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function.
|
|
25769
|
+
*
|
|
25770
|
+
* Given a function with N parameters, returns a new function that supports partial application.
|
|
25771
|
+
* The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters,
|
|
25772
|
+
* where M is less than N, it returns a new function that accepts the remaining parameters. It continues to
|
|
25773
|
+
* accept more parameters until all N parameters have been supplied.
|
|
25774
|
+
*
|
|
25775
|
+
*
|
|
25776
|
+
* This contrived example uses a partially applied function as an predicate, which returns true
|
|
25777
|
+
* if an object is found in both arrays.
|
|
25778
|
+
* @example
|
|
25779
|
+
* ```
|
|
25780
|
+
* // returns true if an object is in both of the two arrays
|
|
25781
|
+
* function inBoth(array1, array2, object) {
|
|
25782
|
+
* return array1.indexOf(object) !== -1 &&
|
|
25783
|
+
* array2.indexOf(object) !== 1;
|
|
25784
|
+
* }
|
|
25785
|
+
* let obj1, obj2, obj3, obj4, obj5, obj6, obj7
|
|
25786
|
+
* let foos = [obj1, obj3]
|
|
25787
|
+
* let bars = [obj3, obj4, obj5]
|
|
25788
|
+
*
|
|
25789
|
+
* // A curried "copy" of inBoth
|
|
25790
|
+
* let curriedInBoth = curry(inBoth);
|
|
25791
|
+
* // Partially apply both the array1 and array2
|
|
25792
|
+
* let inFoosAndBars = curriedInBoth(foos, bars);
|
|
25793
|
+
*
|
|
25794
|
+
* // Supply the final argument; since all arguments are
|
|
25795
|
+
* // supplied, the original inBoth function is then called.
|
|
25796
|
+
* let obj1InBoth = inFoosAndBars(obj1); // false
|
|
25797
|
+
*
|
|
25798
|
+
* // Use the inFoosAndBars as a predicate.
|
|
25799
|
+
* // Filter, on each iteration, supplies the final argument
|
|
25800
|
+
* let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ];
|
|
25801
|
+
* let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ]
|
|
25802
|
+
*
|
|
25803
|
+
* ```
|
|
25804
|
+
*
|
|
25805
|
+
* @param fn
|
|
25806
|
+
* @returns {*|function(): (*|any)}
|
|
25807
|
+
*/
|
|
25808
|
+
function curry(fn) {
|
|
25809
|
+
return function curried() {
|
|
25810
|
+
if (arguments.length >= fn.length) {
|
|
25811
|
+
return fn.apply(this, arguments);
|
|
25812
|
+
}
|
|
25813
|
+
const args = Array.prototype.slice.call(arguments);
|
|
25814
|
+
return curried.bind(this, ...args);
|
|
25815
|
+
};
|
|
25816
|
+
}
|
|
25817
|
+
|
|
25818
|
+
/**
|
|
25819
|
+
* Given a property name and a value, returns a function that returns a boolean based on whether
|
|
25820
|
+
* the passed object has a property that matches the value
|
|
25821
|
+
* let obj = { foo: 1, name: "blarg" };
|
|
25822
|
+
* let getName = propEq("name", "blarg");
|
|
25823
|
+
* getName(obj) === true
|
|
25824
|
+
*/
|
|
25825
|
+
const propEq = curry((name, _val, obj) => obj && obj[name] === _val);
|
|
25826
|
+
/**
|
|
25827
|
+
* Given a dotted property name, returns a function that returns a nested property from an object, or undefined
|
|
25828
|
+
* let obj = { id: 1, nestedObj: { foo: 1, name: "blarg" }, };
|
|
25829
|
+
* let getName = prop("nestedObj.name");
|
|
25830
|
+
* getName(obj) === "blarg"
|
|
25831
|
+
* let propNotFound = prop("this.property.doesnt.exist");
|
|
25832
|
+
* propNotFound(obj) === undefined
|
|
25833
|
+
*/
|
|
25834
|
+
const parse = (path) => {
|
|
25835
|
+
const parts = path.split(".");
|
|
25836
|
+
return (obj) => parts.reduce((acc, key) => acc && acc[key], obj);
|
|
25837
|
+
};
|
|
25838
|
+
|
|
25839
|
+
/**
|
|
25840
|
+
* Given a class constructor, returns a predicate function that checks
|
|
25841
|
+
* whether a given object is an instance of that class.
|
|
25842
|
+
*
|
|
25843
|
+
* @param {new (...args: any[]) => any} ctor - The class constructor to check against.
|
|
25844
|
+
* @returns {(obj: any) => boolean} A predicate function that returns true if the object is of the given class.
|
|
25845
|
+
*/
|
|
25846
|
+
function is(ctor) {
|
|
25847
|
+
/**
|
|
25848
|
+
* Checks if the provided object is an instance of the given constructor.
|
|
25849
|
+
*
|
|
25850
|
+
* @param {any} obj - The object to test.
|
|
25851
|
+
* @returns {boolean} True if the object is an instance of the given class.
|
|
25852
|
+
*/
|
|
25853
|
+
return function (obj) {
|
|
25854
|
+
return (obj != null && obj.constructor === ctor) || obj instanceof ctor;
|
|
25855
|
+
};
|
|
25856
|
+
}
|
|
25857
|
+
|
|
25858
|
+
/** Given a value, returns a function which returns the value */
|
|
25859
|
+
const val = (v) => () => v;
|
|
25860
|
+
|
|
25861
|
+
/**
|
|
25862
|
+
* Sorta like Pattern Matching (a functional programming conditional construct)
|
|
25863
|
+
*
|
|
25864
|
+
* See http://c2.com/cgi/wiki?PatternMatching
|
|
25865
|
+
*
|
|
25866
|
+
* This is a conditional construct which allows a series of predicates and output functions
|
|
25867
|
+
* to be checked and then applied. Each predicate receives the input. If the predicate
|
|
25868
|
+
* returns truthy, then its matching output function (mapping function) is provided with
|
|
25869
|
+
* the input and, then the result is returned.
|
|
25870
|
+
*
|
|
25871
|
+
* Each combination (2-tuple) of predicate + output function should be placed in an array
|
|
25872
|
+
* of size 2: [ predicate, mapFn ]
|
|
25873
|
+
*
|
|
25874
|
+
* These 2-tuples should be put in an outer array.
|
|
25875
|
+
*
|
|
25876
|
+
* @example
|
|
25877
|
+
* ```
|
|
25878
|
+
*
|
|
25879
|
+
* // Here's a 2-tuple where the first element is the isString predicate
|
|
25880
|
+
* // and the second element is a function that returns a description of the input
|
|
25881
|
+
* let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ];
|
|
25882
|
+
*
|
|
25883
|
+
* // Second tuple: predicate "isNumber", mapfn returns a description
|
|
25884
|
+
* let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ];
|
|
25885
|
+
*
|
|
25886
|
+
* let third = [ (input) => input === null, (input) => `Oh, null...` ];
|
|
25887
|
+
*
|
|
25888
|
+
* let fourth = [ (input) => input === undefined, (input) => `notdefined` ];
|
|
25889
|
+
*
|
|
25890
|
+
* let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]);
|
|
25891
|
+
*
|
|
25892
|
+
* console.log(descriptionOf(undefined)); // 'notdefined'
|
|
25893
|
+
* console.log(descriptionOf(55)); // '(55) That's a number!'
|
|
25894
|
+
* console.log(descriptionOf("foo")); // 'Here's your string foo'
|
|
25895
|
+
* ```
|
|
25896
|
+
*
|
|
25897
|
+
* @param struct A 2D array. Each element of the array should be an array, a 2-tuple,
|
|
25898
|
+
* with a Predicate and a mapping/output function
|
|
25899
|
+
* @returns {function(any): *}
|
|
25900
|
+
*/
|
|
25901
|
+
function pattern(struct) {
|
|
25902
|
+
return function (x) {
|
|
25903
|
+
for (let i = 0; i < struct.length; i++) {
|
|
25904
|
+
if (struct[i][0](x)) return struct[i][1](x);
|
|
25905
|
+
}
|
|
25906
|
+
};
|
|
25907
|
+
}
|
|
25908
|
+
|
|
25991
25909
|
/**
|
|
25992
25910
|
* An internal class which implements [[ParamTypeDefinition]].
|
|
25993
25911
|
*
|
|
@@ -28182,23 +28100,11 @@
|
|
|
28182
28100
|
constructor() {
|
|
28183
28101
|
this._ngViews = [];
|
|
28184
28102
|
this._viewConfigs = [];
|
|
28185
|
-
this._viewConfigFactories = {};
|
|
28186
28103
|
this._listeners = [];
|
|
28187
|
-
this._pluginapi = {
|
|
28188
|
-
_registeredUIView: (id) => {
|
|
28189
|
-
return find(this._ngViews, (view) => view.id === id);
|
|
28190
|
-
},
|
|
28191
|
-
_registeredUIViews: () => this._ngViews,
|
|
28192
|
-
_activeViewConfigs: () => this._viewConfigs,
|
|
28193
|
-
_onSync: (listener) => {
|
|
28194
|
-
this._listeners.push(listener);
|
|
28195
|
-
return () => removeFrom(this._listeners, listener);
|
|
28196
|
-
},
|
|
28197
|
-
};
|
|
28198
28104
|
this.viewConfigFactory(getViewConfigFactory());
|
|
28199
28105
|
}
|
|
28200
28106
|
|
|
28201
|
-
$get =
|
|
28107
|
+
$get = () => this;
|
|
28202
28108
|
|
|
28203
28109
|
/**
|
|
28204
28110
|
* @param {?import('../state/state-object.js').StateObject} context
|
|
@@ -28336,7 +28242,7 @@
|
|
|
28336
28242
|
return;
|
|
28337
28243
|
}
|
|
28338
28244
|
trace.traceViewServiceUIViewEvent("<- Deregistering", ngView);
|
|
28339
|
-
removeFrom(ngViews
|
|
28245
|
+
removeFrom(ngViews, ngView);
|
|
28340
28246
|
};
|
|
28341
28247
|
}
|
|
28342
28248
|
/**
|
|
@@ -29248,6 +29154,14 @@
|
|
|
29248
29154
|
* The registration data for a registered transition hook
|
|
29249
29155
|
*/
|
|
29250
29156
|
class RegisteredHook {
|
|
29157
|
+
/**
|
|
29158
|
+
* @param {import("./transition-service.js").TransitionProvider} tranSvc
|
|
29159
|
+
* @param eventType
|
|
29160
|
+
* @param callback
|
|
29161
|
+
* @param matchCriteria
|
|
29162
|
+
* @param removeHookFromRegistry
|
|
29163
|
+
* @param options
|
|
29164
|
+
*/
|
|
29251
29165
|
constructor(
|
|
29252
29166
|
tranSvc,
|
|
29253
29167
|
eventType,
|
|
@@ -29256,6 +29170,7 @@
|
|
|
29256
29170
|
removeHookFromRegistry,
|
|
29257
29171
|
options = {},
|
|
29258
29172
|
) {
|
|
29173
|
+
/** @type {import("./transition-service.js").TransitionProvider} */
|
|
29259
29174
|
this.tranSvc = tranSvc;
|
|
29260
29175
|
this.eventType = eventType;
|
|
29261
29176
|
this.callback = callback;
|
|
@@ -29304,7 +29219,7 @@
|
|
|
29304
29219
|
* }
|
|
29305
29220
|
*/
|
|
29306
29221
|
_getDefaultMatchCriteria() {
|
|
29307
|
-
return map(this.tranSvc.
|
|
29222
|
+
return map(this.tranSvc._getPathTypes(), () => true);
|
|
29308
29223
|
}
|
|
29309
29224
|
/**
|
|
29310
29225
|
* Gets matching nodes as [[IMatchingNodes]]
|
|
@@ -29326,7 +29241,7 @@
|
|
|
29326
29241
|
this._getDefaultMatchCriteria(),
|
|
29327
29242
|
this.matchCriteria,
|
|
29328
29243
|
);
|
|
29329
|
-
const paths = Object.values(this.tranSvc.
|
|
29244
|
+
const paths = Object.values(this.tranSvc._getPathTypes());
|
|
29330
29245
|
return paths.reduce((mn, pathtype) => {
|
|
29331
29246
|
// STATE scope criteria matches against every node in the path.
|
|
29332
29247
|
// TRANSITION scope criteria matches against only the last node in the path
|
|
@@ -29364,7 +29279,7 @@
|
|
|
29364
29279
|
const _registeredHooks = (registry._registeredHooks =
|
|
29365
29280
|
registry._registeredHooks || {});
|
|
29366
29281
|
const hooks = (_registeredHooks[eventType.name] = []);
|
|
29367
|
-
const removeHookFn = removeFrom(hooks);
|
|
29282
|
+
const removeHookFn = (x) => removeFrom(hooks, x);
|
|
29368
29283
|
// Create hook registration function on the IHookRegistry for the event
|
|
29369
29284
|
registry[eventType.name] = hookRegistrationFn;
|
|
29370
29285
|
function hookRegistrationFn(matchObject, callback, options = {}) {
|
|
@@ -29396,6 +29311,9 @@
|
|
|
29396
29311
|
* in the Transition class, so we must also provide the Transition's _treeChanges)
|
|
29397
29312
|
*/
|
|
29398
29313
|
class HookBuilder {
|
|
29314
|
+
/**
|
|
29315
|
+
* @param {import("./transition.js").Transition} transition
|
|
29316
|
+
*/
|
|
29399
29317
|
constructor(transition) {
|
|
29400
29318
|
this.transition = transition;
|
|
29401
29319
|
}
|
|
@@ -29405,7 +29323,7 @@
|
|
|
29405
29323
|
* @returns
|
|
29406
29324
|
*/
|
|
29407
29325
|
buildHooksForPhase(phase) {
|
|
29408
|
-
return this.transition.transitionService
|
|
29326
|
+
return this.transition.transitionService
|
|
29409
29327
|
._getEvents(phase)
|
|
29410
29328
|
.map((type) => this.buildHooks(type))
|
|
29411
29329
|
.reduce(unnestR, [])
|
|
@@ -29593,7 +29511,7 @@
|
|
|
29593
29511
|
* (which can then be used to register hooks)
|
|
29594
29512
|
*/
|
|
29595
29513
|
createTransitionHookRegFns() {
|
|
29596
|
-
this.transitionService
|
|
29514
|
+
this.transitionService
|
|
29597
29515
|
._getEvents()
|
|
29598
29516
|
.filter((type) => type.hookPhase !== TransitionHookPhase.CREATE)
|
|
29599
29517
|
.forEach((type) => makeEvent(this, this.transitionService, type));
|
|
@@ -30008,6 +29926,7 @@
|
|
|
30008
29926
|
)
|
|
30009
29927
|
return "SameAsCurrent";
|
|
30010
29928
|
}
|
|
29929
|
+
|
|
30011
29930
|
/**
|
|
30012
29931
|
* Runs the transition
|
|
30013
29932
|
*
|
|
@@ -30015,7 +29934,7 @@
|
|
|
30015
29934
|
*
|
|
30016
29935
|
* @internal
|
|
30017
29936
|
*
|
|
30018
|
-
* @returns a promise for a successful transition.
|
|
29937
|
+
* @returns {Promise} a promise for a successful transition.
|
|
30019
29938
|
*/
|
|
30020
29939
|
run() {
|
|
30021
29940
|
// Gets transition hooks array for the given phase
|
|
@@ -30652,13 +30571,6 @@
|
|
|
30652
30571
|
this.globals = globals;
|
|
30653
30572
|
this.$view = viewService;
|
|
30654
30573
|
this._deregisterHookFns = {};
|
|
30655
|
-
this._pluginapi = createProxyFunctions(val(this), {}, val(this), [
|
|
30656
|
-
"_definePathType",
|
|
30657
|
-
"_defineEvent",
|
|
30658
|
-
"_getPathTypes",
|
|
30659
|
-
"_getEvents",
|
|
30660
|
-
"getHooks",
|
|
30661
|
-
]);
|
|
30662
30574
|
this._defineCorePaths();
|
|
30663
30575
|
this._defineCoreEvents();
|
|
30664
30576
|
this._registerCoreTransitionHooks();
|
|
@@ -30816,6 +30728,10 @@
|
|
|
30816
30728
|
makeEvent(this, this, eventType);
|
|
30817
30729
|
}
|
|
30818
30730
|
|
|
30731
|
+
/**
|
|
30732
|
+
* @param {TransitionHookPhase} [phase]
|
|
30733
|
+
* @return {any[]}
|
|
30734
|
+
*/
|
|
30819
30735
|
_getEvents(phase) {
|
|
30820
30736
|
const transitionHookTypes = isDefined(phase)
|
|
30821
30737
|
? this._eventTypes.filter((type) => type.hookPhase === phase)
|
|
@@ -30907,7 +30823,7 @@
|
|
|
30907
30823
|
return this.globals.$current;
|
|
30908
30824
|
}
|
|
30909
30825
|
|
|
30910
|
-
static $inject = ["$routerProvider", "$transitionsProvider"];
|
|
30826
|
+
/* @ignore */ static $inject = ["$routerProvider", "$transitionsProvider"];
|
|
30911
30827
|
|
|
30912
30828
|
/**
|
|
30913
30829
|
*
|
|
@@ -30932,16 +30848,6 @@
|
|
|
30932
30848
|
throw new Error($error$);
|
|
30933
30849
|
}
|
|
30934
30850
|
};
|
|
30935
|
-
const getters = ["current", "$current", "params", "transition"];
|
|
30936
|
-
const boundFns = Object.keys(StateProvider.prototype).filter(
|
|
30937
|
-
(x) => !getters.includes(x),
|
|
30938
|
-
);
|
|
30939
|
-
createProxyFunctions(
|
|
30940
|
-
val(StateProvider.prototype),
|
|
30941
|
-
this,
|
|
30942
|
-
val(this),
|
|
30943
|
-
boundFns,
|
|
30944
|
-
);
|
|
30945
30851
|
|
|
30946
30852
|
EventBus.subscribe("$stateService:defaultErrorHandler", (err) =>
|
|
30947
30853
|
this.defaultErrorHandler()(err),
|
|
@@ -31141,7 +31047,7 @@
|
|
|
31141
31047
|
onInvalid(callback) {
|
|
31142
31048
|
this.invalidCallbacks.push(callback);
|
|
31143
31049
|
return function deregisterListener() {
|
|
31144
|
-
removeFrom(this.invalidCallbacks
|
|
31050
|
+
removeFrom(this.invalidCallbacks, callback);
|
|
31145
31051
|
}.bind(this);
|
|
31146
31052
|
}
|
|
31147
31053
|
/**
|
|
@@ -31566,8 +31472,8 @@
|
|
|
31566
31472
|
$get = [
|
|
31567
31473
|
$injectTokens.$anchorScroll,
|
|
31568
31474
|
/**
|
|
31569
|
-
* @param {import('../services/anchor-scroll.js').AnchorScrollObject} $anchorScroll
|
|
31570
|
-
* @returns {import('../services/anchor-scroll.js').AnchorScrollObject|Function}
|
|
31475
|
+
* @param {import('../services/anchor-scroll/anchor-scroll.js').AnchorScrollObject} $anchorScroll
|
|
31476
|
+
* @returns {import('../services/anchor-scroll/anchor-scroll.js').AnchorScrollObject|Function}
|
|
31571
31477
|
*/
|
|
31572
31478
|
($anchorScroll) => {
|
|
31573
31479
|
if (this.enabled) {
|
|
@@ -31607,8 +31513,8 @@
|
|
|
31607
31513
|
$injectTokens.$templateRequest,
|
|
31608
31514
|
$injectTokens.$injector,
|
|
31609
31515
|
/**
|
|
31610
|
-
* @param {
|
|
31611
|
-
* @param {
|
|
31516
|
+
* @param {ng.HttpService} $http
|
|
31517
|
+
* @param {ng.TemplateCacheService} $templateCache
|
|
31612
31518
|
* @param {any} $templateRequest
|
|
31613
31519
|
* @param {import("../core/di/internal-injector.js").InjectorService} $injector
|
|
31614
31520
|
* @returns
|
|
@@ -31720,7 +31626,7 @@
|
|
|
31720
31626
|
/**
|
|
31721
31627
|
* Creates a template by invoking an injectable provider function.
|
|
31722
31628
|
*
|
|
31723
|
-
* @param {import('../interface.ts').Injectable} provider Function to invoke via `locals`
|
|
31629
|
+
* @param {import('../interface.ts').Injectable<any>} provider Function to invoke via `locals`
|
|
31724
31630
|
* @param {Function} params a function used to invoke the template provider
|
|
31725
31631
|
* @param {import("./resolve/resolve-context.js").ResolveContext} context
|
|
31726
31632
|
* @return {string|Promise.<string>} The template html as a string, or a promise
|
|
@@ -31735,7 +31641,7 @@
|
|
|
31735
31641
|
/**
|
|
31736
31642
|
* Creates a component's template by invoking an injectable provider function.
|
|
31737
31643
|
*
|
|
31738
|
-
* @param {import('../interface.ts').Injectable} provider Function to invoke via `locals`
|
|
31644
|
+
* @param {import('../interface.ts').Injectable<any>} provider Function to invoke via `locals`
|
|
31739
31645
|
* @return {Promise<any>} The template html as a string: "<component-name input1='::$resolve.foo'></component-name>".
|
|
31740
31646
|
*/
|
|
31741
31647
|
fromComponentProvider(provider, context) {
|
|
@@ -33051,7 +32957,7 @@
|
|
|
33051
32957
|
* API for URL management
|
|
33052
32958
|
*/
|
|
33053
32959
|
class UrlService {
|
|
33054
|
-
static $inject = provider([
|
|
32960
|
+
/* @ignore */ static $inject = provider([
|
|
33055
32961
|
$injectTokens.$location,
|
|
33056
32962
|
$injectTokens.$state,
|
|
33057
32963
|
$injectTokens.$router,
|
|
@@ -33232,7 +33138,7 @@
|
|
|
33232
33138
|
*/
|
|
33233
33139
|
onChange(callback) {
|
|
33234
33140
|
this._urlListeners.push(callback);
|
|
33235
|
-
return () => removeFrom(this._urlListeners
|
|
33141
|
+
return () => removeFrom(this._urlListeners, callback);
|
|
33236
33142
|
}
|
|
33237
33143
|
|
|
33238
33144
|
/**
|
|
@@ -33738,12 +33644,12 @@
|
|
|
33738
33644
|
]);
|
|
33739
33645
|
const tuple2Resolvable = pattern([
|
|
33740
33646
|
[
|
|
33741
|
-
|
|
33647
|
+
(x) => isString(x.val),
|
|
33742
33648
|
(tuple) =>
|
|
33743
33649
|
new Resolvable(tuple.token, (x) => x, [tuple.val], tuple.policy),
|
|
33744
33650
|
],
|
|
33745
33651
|
[
|
|
33746
|
-
|
|
33652
|
+
(x) => Array.isArray(x.val),
|
|
33747
33653
|
(tuple) =>
|
|
33748
33654
|
new Resolvable(
|
|
33749
33655
|
tuple.token,
|
|
@@ -33753,7 +33659,7 @@
|
|
|
33753
33659
|
),
|
|
33754
33660
|
],
|
|
33755
33661
|
[
|
|
33756
|
-
|
|
33662
|
+
(x) => isFunction(x.val),
|
|
33757
33663
|
(tuple) =>
|
|
33758
33664
|
new Resolvable(
|
|
33759
33665
|
tuple.token,
|
|
@@ -34005,7 +33911,12 @@
|
|
|
34005
33911
|
*
|
|
34006
33912
|
*/
|
|
34007
33913
|
class StateRegistryProvider {
|
|
34008
|
-
static $inject = provider([
|
|
33914
|
+
/* @ignore */ static $inject = provider([
|
|
33915
|
+
$injectTokens.$url,
|
|
33916
|
+
$injectTokens.$state,
|
|
33917
|
+
$injectTokens.$router,
|
|
33918
|
+
$injectTokens.$view,
|
|
33919
|
+
]);
|
|
34009
33920
|
|
|
34010
33921
|
/**
|
|
34011
33922
|
* @param urlService
|
|
@@ -34134,7 +34045,7 @@
|
|
|
34134
34045
|
onStatesChanged(listener) {
|
|
34135
34046
|
this.listeners.push(listener);
|
|
34136
34047
|
return function deregisterListener() {
|
|
34137
|
-
removeFrom(this.listeners
|
|
34048
|
+
removeFrom(this.listeners, listener);
|
|
34138
34049
|
}.bind(this);
|
|
34139
34050
|
}
|
|
34140
34051
|
/**
|
|
@@ -34597,7 +34508,7 @@
|
|
|
34597
34508
|
};
|
|
34598
34509
|
states.push(stateInfo);
|
|
34599
34510
|
return function removeState() {
|
|
34600
|
-
removeFrom(states
|
|
34511
|
+
removeFrom(states, stateInfo);
|
|
34601
34512
|
};
|
|
34602
34513
|
}
|
|
34603
34514
|
// Update route state
|
|
@@ -35141,8 +35052,8 @@
|
|
|
35141
35052
|
ngSetterDirective.$inject = [$injectTokens.$parse, $injectTokens.$log];
|
|
35142
35053
|
|
|
35143
35054
|
/**
|
|
35144
|
-
* @param {
|
|
35145
|
-
* @param {
|
|
35055
|
+
* @param {ng.ParseService} $parse
|
|
35056
|
+
* @param {ng.LogService} $log
|
|
35146
35057
|
* @returns {import('interface.ts').Directive}
|
|
35147
35058
|
*/
|
|
35148
35059
|
function ngSetterDirective($parse, $log) {
|
|
@@ -35198,7 +35109,7 @@
|
|
|
35198
35109
|
|
|
35199
35110
|
/**
|
|
35200
35111
|
* @param {"get" | "delete" | "post" | "put"} method
|
|
35201
|
-
* @returns {
|
|
35112
|
+
* @returns {ng.DirectiveFactory}
|
|
35202
35113
|
*/
|
|
35203
35114
|
function defineDirective(method) {
|
|
35204
35115
|
const attrName = "ng" + method.charAt(0).toUpperCase() + method.slice(1);
|
|
@@ -35207,16 +35118,16 @@
|
|
|
35207
35118
|
return directive;
|
|
35208
35119
|
}
|
|
35209
35120
|
|
|
35210
|
-
/** @type {
|
|
35121
|
+
/** @type {ng.DirectiveFactory} */
|
|
35211
35122
|
const ngGetDirective = defineDirective("get");
|
|
35212
35123
|
|
|
35213
|
-
/** @type {
|
|
35124
|
+
/** @type {ng.DirectiveFactory} */
|
|
35214
35125
|
const ngDeleteDirective = defineDirective("delete");
|
|
35215
35126
|
|
|
35216
|
-
/** @type {
|
|
35127
|
+
/** @type {ng.DirectiveFactory} */
|
|
35217
35128
|
const ngPostDirective = defineDirective("post");
|
|
35218
35129
|
|
|
35219
|
-
/** @type {
|
|
35130
|
+
/** @type {ng.DirectiveFactory} */
|
|
35220
35131
|
const ngPutDirective = defineDirective("put");
|
|
35221
35132
|
|
|
35222
35133
|
/**
|
|
@@ -35243,10 +35154,10 @@
|
|
|
35243
35154
|
* Handles DOM manipulation based on a swap strategy and server-rendered HTML.
|
|
35244
35155
|
*
|
|
35245
35156
|
* @param {string} html - The HTML string returned from the server.
|
|
35246
|
-
* @param {import("
|
|
35157
|
+
* @param {import("./interface.ts").SwapModeType} swap
|
|
35247
35158
|
* @param {Element} target - The target DOM element to apply the swap to.
|
|
35248
|
-
* @param {
|
|
35249
|
-
* @param {
|
|
35159
|
+
* @param {ng.Scope} scope
|
|
35160
|
+
* @param {ng.CompileService} $compile
|
|
35250
35161
|
*/
|
|
35251
35162
|
function handleSwapResponse(html, swap, target, scope, $compile) {
|
|
35252
35163
|
let nodes = [];
|
|
@@ -35327,16 +35238,16 @@
|
|
|
35327
35238
|
*
|
|
35328
35239
|
* @param {"get" | "delete" | "post" | "put"} method - HTTP method to use.
|
|
35329
35240
|
* @param {string} attrName - Attribute name containing the URL.
|
|
35330
|
-
* @returns {
|
|
35241
|
+
* @returns {ng.DirectiveFactory}
|
|
35331
35242
|
*/
|
|
35332
35243
|
function createHttpDirective(method, attrName) {
|
|
35333
35244
|
/**
|
|
35334
|
-
* @param {
|
|
35335
|
-
* @param {
|
|
35336
|
-
* @param {
|
|
35337
|
-
* @param {
|
|
35338
|
-
* @param {
|
|
35339
|
-
* @returns {
|
|
35245
|
+
* @param {ng.HttpService} $http
|
|
35246
|
+
* @param {ng.CompileService} $compile
|
|
35247
|
+
* @param {ng.LogService} $log
|
|
35248
|
+
* @param {ng.ParseService} $parse
|
|
35249
|
+
* @param {ng.StateService} $state
|
|
35250
|
+
* @returns {ng.Directive}
|
|
35340
35251
|
*/
|
|
35341
35252
|
return function ($http, $compile, $log, $parse, $state) {
|
|
35342
35253
|
/**
|
|
@@ -35475,7 +35386,7 @@
|
|
|
35475
35386
|
|
|
35476
35387
|
handleSwapResponse(
|
|
35477
35388
|
html,
|
|
35478
|
-
/** @type {import("
|
|
35389
|
+
/** @type {import("./interface.ts").SwapModeType} */ (swap),
|
|
35479
35390
|
target,
|
|
35480
35391
|
scope,
|
|
35481
35392
|
$compile,
|
|
@@ -35530,6 +35441,40 @@
|
|
|
35530
35441
|
};
|
|
35531
35442
|
}
|
|
35532
35443
|
|
|
35444
|
+
ngInjectDirective.$inject = [$injectTokens.$log, $injectTokens.$injector];
|
|
35445
|
+
|
|
35446
|
+
/**
|
|
35447
|
+
* @param {ng.LogService} $log
|
|
35448
|
+
* @param {ng.InjectorService} $injector
|
|
35449
|
+
* @returns {import('interface.ts').Directive}
|
|
35450
|
+
*/
|
|
35451
|
+
function ngInjectDirective($log, $injector) {
|
|
35452
|
+
return {
|
|
35453
|
+
restrict: "A",
|
|
35454
|
+
link(scope, _element, attrs) {
|
|
35455
|
+
const expr = attrs["ngInject"];
|
|
35456
|
+
|
|
35457
|
+
if (!expr) return;
|
|
35458
|
+
// Match any identifier that starts with $, or ends with Service/Factory
|
|
35459
|
+
// Example matches: $http, userService, authFactory
|
|
35460
|
+
const replacedExpr = expr.replace(
|
|
35461
|
+
/(\$[\w]+|[\w]+(?:Service|Factory))/g,
|
|
35462
|
+
(match, name) => {
|
|
35463
|
+
try {
|
|
35464
|
+
const service = $injector.get(name);
|
|
35465
|
+
scope.$target[name] = service;
|
|
35466
|
+
return name;
|
|
35467
|
+
} catch {
|
|
35468
|
+
$log.warn(`Injectable ${name} not found in $injector`);
|
|
35469
|
+
return match;
|
|
35470
|
+
}
|
|
35471
|
+
},
|
|
35472
|
+
);
|
|
35473
|
+
scope.$apply(replacedExpr);
|
|
35474
|
+
},
|
|
35475
|
+
};
|
|
35476
|
+
}
|
|
35477
|
+
|
|
35533
35478
|
/**
|
|
35534
35479
|
* Initializes core `ng` module.
|
|
35535
35480
|
* @param {import('./angular.js').Angular} angular
|
|
@@ -35548,6 +35493,8 @@
|
|
|
35548
35493
|
$provide.provider({
|
|
35549
35494
|
$$sanitizeUri: SanitizeUriProvider,
|
|
35550
35495
|
});
|
|
35496
|
+
$provide.value("$window", window);
|
|
35497
|
+
$provide.value("$document", document);
|
|
35551
35498
|
$provide
|
|
35552
35499
|
.provider($injectTokens.$compile, CompileProvider)
|
|
35553
35500
|
.directive({
|
|
@@ -35572,6 +35519,7 @@
|
|
|
35572
35519
|
ngHide: ngHideDirective,
|
|
35573
35520
|
ngIf: ngIfDirective,
|
|
35574
35521
|
ngInclude: ngIncludeDirective,
|
|
35522
|
+
ngInject: ngInjectDirective,
|
|
35575
35523
|
ngInit: ngInitDirective,
|
|
35576
35524
|
ngMessages: ngMessagesDirective,
|
|
35577
35525
|
ngMessage: ngMessageDirective,
|
|
@@ -35649,7 +35597,6 @@
|
|
|
35649
35597
|
$interpolate: InterpolateProvider,
|
|
35650
35598
|
$http: HttpProvider,
|
|
35651
35599
|
$httpParamSerializer: HttpParamSerializerProvider,
|
|
35652
|
-
$httpBackend: HttpBackendProvider,
|
|
35653
35600
|
$location: LocationProvider,
|
|
35654
35601
|
$log: LogProvider,
|
|
35655
35602
|
$parse: ParseProvider,
|
|
@@ -35690,13 +35637,6 @@
|
|
|
35690
35637
|
/** @type {Object.<string, NgModule>} */
|
|
35691
35638
|
const modules = {};
|
|
35692
35639
|
|
|
35693
|
-
/**
|
|
35694
|
-
* Configuration option for AngularTS bootstrap process.
|
|
35695
|
-
*
|
|
35696
|
-
* @typedef {Object} AngularBootstrapConfig
|
|
35697
|
-
* @property {boolean} [strictDi] - Disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code. Defaults to `false`.
|
|
35698
|
-
*/
|
|
35699
|
-
|
|
35700
35640
|
class Angular {
|
|
35701
35641
|
constructor() {
|
|
35702
35642
|
this.$cache = Cache;
|
|
@@ -35707,7 +35647,7 @@
|
|
|
35707
35647
|
/**
|
|
35708
35648
|
* @type {string} `version` from `package.json`
|
|
35709
35649
|
*/
|
|
35710
|
-
this.version = "0.9.
|
|
35650
|
+
this.version = "0.9.5"; //inserted via rollup plugin
|
|
35711
35651
|
|
|
35712
35652
|
/** @type {!Array<string|any>} */
|
|
35713
35653
|
this.bootsrappedModules = [];
|
|
@@ -35762,7 +35702,7 @@
|
|
|
35762
35702
|
* Each item in the array should be the name of a predefined module or a (DI annotated)
|
|
35763
35703
|
* function that will be invoked by the injector as a `config` block.
|
|
35764
35704
|
* See: {@link angular.module modules}
|
|
35765
|
-
* @param {AngularBootstrapConfig} [config]
|
|
35705
|
+
* @param {import("./interface.ts").AngularBootstrapConfig} [config]
|
|
35766
35706
|
* @returns {import('./core/di/internal-injector.js').InjectorService} The created injector instance for this application.
|
|
35767
35707
|
*/
|
|
35768
35708
|
bootstrap(element, modules, config) {
|
|
@@ -35930,7 +35870,7 @@
|
|
|
35930
35870
|
* @param {string} name The name of the module to create or retrieve.
|
|
35931
35871
|
* @param {Array.<string>} [requires] If specified then new module is being created. If
|
|
35932
35872
|
* unspecified then the module is being retrieved for further configuration.
|
|
35933
|
-
* @param {import("./interface.js").Injectable} [configFn] Optional configuration function for the module that gets
|
|
35873
|
+
* @param {import("./interface.js").Injectable<any>} [configFn] Optional configuration function for the module that gets
|
|
35934
35874
|
* passed to {@link NgModule.config NgModule.config()}.
|
|
35935
35875
|
* @returns {NgModule} A newly registered module.
|
|
35936
35876
|
*/
|