@angular-wave/angular.ts 0.0.34 → 0.0.36
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/.eslintrc.cjs +1 -1
- package/Makefile +4 -0
- package/README.md +5 -0
- package/dist/angular-ts.esm.js +1 -1
- package/dist/angular-ts.umd.js +1 -1
- package/index.html +3 -102
- package/package.json +2 -2
- package/playwright.config.ts +3 -2
- package/public/public/my_other_directive.html +1 -0
- package/{test → src}/angular.spec.js +5 -5
- package/{test → src}/binding.spec.js +3 -3
- package/src/core/{animate-runner.js → animate/animate-runner.js} +1 -1
- package/src/core/animate/animate.html +18 -0
- package/src/core/{animate.js → animate/animate.js} +4 -5
- package/{test/core → src/core/animate}/animate.spec.js +1 -1
- package/src/core/cache/cache-factor.html +18 -0
- package/{test/core → src/core/cache}/cache-factor.spec.js +2 -2
- package/src/core/cache/cache-factor.test.js +11 -0
- package/src/core/compile/compile.html +18 -0
- package/src/core/{compile.js → compile/compile.js} +25 -21
- package/{test/core → src/core/compile}/compile.spec.js +65 -68
- package/src/core/compile/compile.test.js +12 -0
- package/src/core/controller/controller.html +21 -0
- package/src/core/{controller.js → controller/controller.js} +1 -1
- package/{test/core/controller-provider.spec.js → src/core/controller/controller.spec.js} +2 -2
- package/src/core/controller/controller.test.js +11 -0
- package/{test → src}/core/cookie-reader.spec.js +2 -2
- package/{test → src}/core/document.spec.js +3 -3
- package/src/core/filter/filter.html +18 -0
- package/src/core/{filter.js → filter/filter.js} +5 -5
- package/{test/core → src/core/filter}/filter.spec.js +2 -2
- package/src/core/filter/filter.test.js +11 -0
- package/src/core/interpolate/interpolate.html +21 -0
- package/src/core/{interpolate.js → interpolate/interpolate.js} +1 -1
- package/{test/core → src/core/interpolate}/interpolate.spec.js +2 -2
- package/src/core/interpolate/interpolate.test.js +11 -0
- package/src/core/{interval-factory.js → interval/interval-factory.js} +2 -1
- package/src/core/interval/interval.html +18 -0
- package/src/core/{interval.js → interval/interval.js} +3 -2
- package/{test/core → src/core/interval}/interval.spec.js +6 -10
- package/src/core/interval/interval.test.js +12 -0
- package/src/core/{location.js → location/location.js} +4 -3
- package/{test/core → src/core/location}/location.spec.js +3 -3
- package/{test → src}/core/on.spec.js +3 -3
- package/src/core/parser/parse.js +2 -3
- package/{test/core → src/core/parser}/parse.spec.js +17 -4
- package/{test → src}/core/prop.spec.js +4 -4
- package/{test/core → src/core/pubsub}/pubsub.spec.js +1 -1
- package/src/core/{q.js → q/q.js} +1 -1
- package/{test/core → src/core/q}/q.spec.js +3 -3
- package/{test → src}/core/root-element.spec.js +3 -3
- package/src/core/{sanitize-uri.js → sanitize/sanitize-uri.js} +2 -2
- package/{test/core → src/core/sanitize}/sanitize-uri.spec.js +1 -1
- package/src/core/{sce.js → sce/sce.js} +3 -3
- package/{test/core → src/core/sce}/sce.spec.js +3 -3
- package/src/core/{root-scope.js → scope/scope.js} +105 -62
- package/{test/core → src/core/scope}/scope.spec.js +13 -13
- package/src/core/{timeout.js → timeout/timeout.js} +3 -3
- package/{test/core → src/core/timeout}/timeout.spec.js +3 -3
- package/src/core/{urlUtils.js → url-utils/url-utils.js} +1 -1
- package/{test/core → src/core/url-utils}/url-utils.spec.js +1 -1
- package/src/directive/attrs/attrs.html +18 -0
- package/src/directive/{attrs.js → attrs/attrs.js} +3 -3
- package/{test/directive/scrset.spec.js → src/directive/attrs/attrs.spec.js} +3 -3
- package/{test/directive → src/directive/attrs}/boolean.spec.js +3 -3
- package/{test/directive → src/directive/attrs}/element-style.spec.js +3 -3
- package/{test/directive → src/directive/attrs}/src.spec.js +3 -3
- package/src/directive/attrs/srcset.test.js +11 -0
- package/src/directive/bind/bind.html +18 -0
- package/src/directive/{bind.js → bind/bind.js} +1 -1
- package/{test/directive → src/directive/bind}/bind.spec.js +3 -3
- package/src/directive/bind/bind.test.js +11 -0
- package/{test/sanitize → src/directive/bind}/bing-html.spec.js +3 -3
- package/src/directive/change/change.html +18 -0
- package/{test/directive → src/directive/change}/change.spec.js +3 -3
- package/src/directive/change/change.test.js +11 -0
- package/src/directive/class/class.html +18 -0
- package/src/directive/{class.js → class/class.js} +3 -3
- package/{test/directive → src/directive/class}/class.spec.js +6 -5
- package/src/directive/class/class.test.js +11 -0
- package/src/directive/cloak/cloak.html +18 -0
- package/{test/directive → src/directive/cloak}/cloak.spec.js +3 -3
- package/src/directive/cloak/cloak.test.js +11 -0
- package/src/directive/controller/controller.html +21 -0
- package/{test/directive → src/directive/controller}/controller.spec.js +5 -5
- package/src/directive/controller/controller.test.js +11 -0
- package/{test/directive → src/directive/events}/click.spec.js +3 -3
- package/{test/directive → src/directive/events}/event.spec.js +4 -4
- package/src/directive/events/events.html +18 -0
- package/src/directive/{events.js → events/events.js} +2 -2
- package/src/directive/events/events.test.js +11 -0
- package/src/directive/form/form.html +18 -0
- package/src/directive/{form.js → form/form.js} +2 -2
- package/{test/directive → src/directive/form}/form.spec.js +5 -5
- package/src/directive/form/form.test.js +11 -0
- package/src/directive/if/if.html +18 -0
- package/src/directive/{if.js → if/if.js} +1 -2
- package/src/directive/if/if.md +77 -0
- package/{test/directive → src/directive/if}/if.spec.js +16 -16
- package/src/directive/if/if.test.js +12 -0
- package/src/directive/include/include.html +18 -0
- package/src/directive/{include.js → include/include.js} +2 -2
- package/{test/directive → src/directive/include}/include.spec.js +52 -71
- package/src/directive/include/include.test.js +12 -0
- package/src/directive/init/init.html +18 -0
- package/{test/directive → src/directive/init}/init.spec.js +4 -4
- package/src/directive/init/init.test.js +11 -0
- package/src/directive/input/input.html +18 -0
- package/src/directive/{input.js → input/input.js} +3 -3
- package/{test/directive → src/directive/input}/input.spec.js +5 -9
- package/src/directive/input/input.test.js +11 -0
- package/src/directive/list/list.html +18 -0
- package/src/directive/{list.js → list/list.js} +1 -1
- package/{test/directive → src/directive/list}/list.spec.js +3 -3
- package/src/directive/list/list.test.js +11 -0
- package/src/directive/model/model.html +18 -0
- package/src/directive/{model.js → model/model.js} +10 -6
- package/{test/directive → src/directive/model}/model.spec.js +8 -8
- package/src/directive/model/model.test.js +11 -0
- package/src/directive/model-options/model-option.test.js +11 -0
- package/src/directive/model-options/model-options.html +21 -0
- package/src/directive/{model-options.js → model-options/model-options.js} +1 -1
- package/{test/directive → src/directive/model-options}/model-options.spec.js +7 -7
- package/src/directive/non-bindable/non-bindable.html +21 -0
- package/{test/directive → src/directive/non-bindable}/non-bindable.spec.js +3 -3
- package/src/directive/non-bindable/non-bindable.test.js +11 -0
- package/src/directive/options/options.html +21 -0
- package/src/directive/{options.js → options/options.js} +8 -6
- package/{test/directive → src/directive/options}/options.spec.js +5 -5
- package/src/directive/options/options.test.js +11 -0
- package/src/directive/ref/href.html +18 -0
- package/{test/directive → src/directive/ref}/href.spec.js +4 -4
- package/src/directive/ref/href.test.js +17 -0
- package/src/directive/ref/ref.html +18 -0
- package/src/directive/{ref.js → ref/ref.js} +1 -1
- package/{test/directive → src/directive/ref}/ref.spec.js +2 -2
- package/src/directive/repeat/repeat.html +18 -0
- package/src/directive/{repeat.js → repeat/repeat.js} +13 -13
- package/{test/directive → src/directive/repeat}/repeat.spec.js +8 -9
- package/src/directive/repeat/repeat.test.js +11 -0
- package/src/directive/script/script.html +18 -0
- package/{test/directive → src/directive/script}/script.spec.js +3 -3
- package/src/directive/script/script.test.js +11 -0
- package/src/directive/select/select.html +18 -0
- package/src/directive/{select.js → select/select.js} +2 -2
- package/{test/directive → src/directive/select}/select.spec.js +5 -5
- package/src/directive/select/select.test.js +11 -0
- package/src/directive/show-hide/show-hide.html +21 -0
- package/{test/directive → src/directive/show-hide}/show-hide.spec.js +3 -3
- package/src/directive/show-hide/show-hide.test.js +11 -0
- package/src/directive/style/style.html +18 -0
- package/{test/directive → src/directive/style}/style.spec.js +3 -3
- package/src/directive/style/style.test.js +11 -0
- package/src/directive/switch/switch.html +18 -0
- package/src/directive/{switch.js → switch/switch.js} +3 -3
- package/{test/directive → src/directive/switch}/switch.spec.js +3 -3
- package/src/directive/switch/switch.test.js +11 -0
- package/src/directive/{transclude.js → transclude/transclude.js} +2 -2
- package/src/directive/validators/validators.html +21 -0
- package/src/directive/{validators.js → validators/validators.js} +3 -3
- package/{test/directive → src/directive/validators}/validators.spec.js +3 -3
- package/src/directive/validators/validators.test.js +11 -0
- package/{test/aria → src/exts}/aria.spec.js +3 -3
- package/{test/messages → src/exts}/messages.spec.js +5 -5
- package/{test/filter → src/filters}/filter.spec.js +10 -5
- package/{test/filter → src/filters}/filters.spec.js +3 -3
- package/{test/filter → src/filters}/limit-to.spec.js +3 -3
- package/{test/filter → src/filters}/order-by.spec.js +2 -2
- package/src/injector.js +1 -2
- package/{test → src}/injector.spec.js +4 -4
- package/src/jqLite.js +1 -1
- package/{test → src}/jqlite.spec.js +6 -6
- package/src/loader.js +1 -1
- package/{test → src}/loader.spec.js +2 -2
- package/{test → src}/min-err.spec.js +2 -2
- package/src/public.js +46 -43
- package/{test → src}/public.spec.js +2 -2
- package/{test/router → src/router/common}/glob.spec.js +1 -1
- package/src/router/common/glob.test.js +11 -0
- package/src/router/services.js +0 -1
- package/{test → src}/router/services.spec.js +2 -2
- package/src/router/state/state-service.js +1 -1
- package/{test/router/ng-state-builder.spec.js → src/router/state-builder.spec.js} +1 -1
- package/{test → src}/router/state-directives.spec.js +3 -3
- package/{test → src}/router/state-filter.spec.js +2 -2
- package/{test → src}/router/state.spec.js +5 -5
- package/{test → src}/router/template-factory.spec.js +3 -3
- package/src/router/transition/transition-hook.js +1 -1
- package/{test → src}/router/url-service.spec.js +4 -4
- package/{test → src}/router/view-directive.spec.js +3 -3
- package/{test → src}/router/view-hook.spec.js +3 -3
- package/{test → src}/router/view-scroll.spec.js +3 -3
- package/{test → src}/router/view.spec.js +12 -12
- package/src/services/browser.js +4 -4
- package/src/services/cache-factory.js +5 -11
- package/src/services/{http.js → http/http.js} +5 -6
- package/{test/core → src/services/http}/http.spec.js +3 -3
- package/{test/core → src/services/http}/template-request.spec.js +2 -2
- package/src/services/{http-backend.js → http-backend/http-backend.js} +2 -2
- package/{test/core → src/services/http-backend}/http-backend.spec.js +3 -3
- package/src/services/template-request.js +1 -1
- package/{test → src}/shared/common.spec.js +4 -4
- package/{test → src}/shared/hof.spec.js +1 -1
- package/{test → src}/shared/strings.spec.js +1 -1
- package/{test → src/shared}/test-utils.js +1 -1
- package/src/shared/utils.js +3 -18
- package/{test → src}/shared/utils.spec.js +1 -1
- package/tsconfig.json +1 -1
- package/types/animations/animate-cache.d.ts +12 -0
- package/types/animations/animate-children-directive.d.ts +84 -0
- package/types/animations/animate-swap.d.ts +103 -0
- package/types/animations/animation.d.ts +14 -0
- package/types/animations/module.d.ts +750 -0
- package/types/animations/raf-scheduler.d.ts +5 -0
- package/types/animations/shared.d.ts +65 -0
- package/types/constants.d.ts +18 -0
- package/types/core/animate-css.d.ts +25 -0
- package/types/core/cache.d.ts +25 -0
- package/types/core/compile.d.ts +206 -0
- package/types/core/controller.d.ts +42 -0
- package/types/core/exception-handler.d.ts +46 -0
- package/types/core/filter.d.ts +9 -0
- package/types/core/interpolate.d.ts +83 -0
- package/types/core/interval-factory.d.ts +21 -0
- package/types/core/interval.d.ts +4 -0
- package/types/core/location.d.ts +234 -0
- package/types/core/pubsub.d.ts +164 -0
- package/types/core/q.d.ts +33 -0
- package/types/core/root-scope.d.ts +754 -0
- package/types/core/sanitize-uri.d.ts +57 -0
- package/types/core/sce.d.ts +432 -0
- package/types/core/task-tracker-factory.d.ts +50 -0
- package/types/core/timeout.d.ts +31 -0
- package/types/core/urlUtils.d.ts +98 -0
- package/types/directive/attrs.d.ts +176 -0
- package/types/directive/bind.d.ts +21 -0
- package/types/directive/change.d.ts +4 -0
- package/types/directive/class.d.ts +125 -0
- package/types/directive/cloak.d.ts +4 -0
- package/types/directive/controller.d.ts +6 -0
- package/types/directive/events.d.ts +12 -0
- package/types/directive/form.d.ts +230 -0
- package/types/directive/if.d.ts +17 -0
- package/types/directive/include.d.ts +33 -0
- package/types/directive/init.d.ts +4 -0
- package/types/directive/input.d.ts +192 -0
- package/types/directive/list.d.ts +4 -0
- package/types/directive/model.d.ts +672 -0
- package/types/directive/non-bindable.d.ts +5 -0
- package/types/directive/options.d.ts +16 -0
- package/types/directive/ref.d.ts +11 -0
- package/types/directive/repeat.d.ts +23 -0
- package/types/directive/script.d.ts +23 -0
- package/types/directive/show-hide.d.ts +234 -0
- package/types/directive/style.d.ts +4 -0
- package/types/directive/switch.d.ts +23 -0
- package/types/directive/transclude.d.ts +15 -0
- package/types/directive/validators.d.ts +173 -0
- package/types/exts/aria.d.ts +1 -0
- package/types/exts/messages.d.ts +1 -0
- package/types/filters/filter.d.ts +4 -0
- package/types/filters/filters.d.ts +38 -0
- package/types/filters/limit-to.d.ts +4 -0
- package/types/filters/order-by.d.ts +11 -0
- package/types/jqLite.d.ts +57 -0
- package/types/router/common/coreservices.d.ts +4 -0
- package/types/router/common/glob.d.ts +60 -0
- package/types/router/common/queue.d.ts +15 -0
- package/types/router/common/trace.d.ts +72 -0
- package/types/router/directives/view-directive.d.ts +160 -0
- package/types/router/globals.d.ts +30 -0
- package/types/router/hooks/core-resolvables.d.ts +2 -0
- package/types/router/hooks/ignored-transition.d.ts +1 -0
- package/types/router/hooks/invalid-transition.d.ts +1 -0
- package/types/router/hooks/lazy-load.d.ts +42 -0
- package/types/router/hooks/on-enter-exit-retain.d.ts +3 -0
- package/types/router/hooks/redirect-to.d.ts +4 -0
- package/types/router/hooks/resolve.d.ts +4 -0
- package/types/router/hooks/update-globals.d.ts +1 -0
- package/types/router/hooks/url.d.ts +5 -0
- package/types/router/hooks/views.d.ts +5 -0
- package/types/router/index.d.ts +1 -18
- package/types/router/injectables.d.ts +1 -0
- package/types/router/params/param-factory.d.ts +8 -0
- package/types/router/params/param-type.d.ts +65 -0
- package/types/router/params/param-types.d.ts +36 -0
- package/types/router/params/param.d.ts +41 -0
- package/types/router/params/state-params.d.ts +12 -0
- package/types/router/path/path-node.d.ts +45 -0
- package/types/router/path/path-utils.d.ts +83 -0
- package/types/router/resolve/resolvable.d.ts +50 -0
- package/types/router/resolve/resolve-context.d.ts +102 -0
- package/types/router/services.d.ts +12 -13
- package/types/router/state/state-builder.d.ts +89 -0
- package/types/router/state/state-matcher.d.ts +7 -0
- package/types/router/state/state-object.d.ts +72 -0
- package/types/router/state/state-queue-manager.d.ts +19 -0
- package/types/router/state/state-registry.d.ts +118 -0
- package/types/router/state/state-service.d.ts +419 -0
- package/types/router/state/target-state.d.ts +102 -0
- package/types/router/state/views.d.ts +50 -0
- package/types/router/state-filters.d.ts +15 -0
- package/types/router/state-provider.d.ts +123 -0
- package/types/router/template-factory.d.ts +124 -0
- package/types/router/transition/hook-builder.d.ts +40 -0
- package/types/router/transition/hook-registry.d.ts +102 -0
- package/types/router/transition/interface.d.ts +11 -0
- package/types/router/transition/reject-factory.d.ts +42 -0
- package/types/router/transition/transition-event-type.d.ts +24 -0
- package/types/router/transition/transition-hook.d.ts +86 -0
- package/types/router/transition/transition-service.d.ts +115 -0
- package/types/router/transition/transition.d.ts +390 -0
- package/types/router/url/url-config.d.ts +100 -0
- package/types/router/url/url-matcher.d.ts +175 -0
- package/types/router/url/url-rule.d.ts +146 -0
- package/types/router/url/url-rules.d.ts +229 -0
- package/types/router/url/url-service.d.ts +278 -0
- package/types/router/view/view.d.ts +137 -0
- package/types/router/view-scroll.d.ts +5 -0
- package/types/services/anchor-scroll.d.ts +11 -0
- package/types/services/browser.d.ts +150 -0
- package/types/services/cache-factory.d.ts +143 -0
- package/types/services/cookie-reader.d.ts +17 -0
- package/types/services/document.d.ts +38 -0
- package/types/services/http-backend.d.ts +78 -0
- package/types/services/http.d.ts +157 -0
- package/types/services/log.d.ts +63 -0
- package/types/services/template-request.d.ts +69 -0
- package/types/shared/common.d.ts +216 -0
- package/types/shared/hof.d.ts +131 -0
- package/types/shared/predicates.d.ts +15 -0
- package/types/shared/strings.d.ts +55 -0
- package/types/shared/utils.d.ts +630 -0
- package/types-back/README.md +2 -0
- package/{types → types-back}/index.d.ts +62 -45
- package/types-back/router/index.d.ts +17 -0
- package/{types → types-back}/router/interface.d.ts +0 -1
- package/{types → types-back}/router/legacy/resolveService.d.ts +0 -1
- package/{types → types-back}/router/legacy/stateEvents.d.ts +2 -1
- package/types-back/router/services.d.ts +15 -0
- package/{types → types-back}/router/stateFilters.d.ts +0 -1
- package/{types → types-back}/router/stateProvider.d.ts +0 -1
- package/{types → types-back}/router/statebuilders/onEnterExitRetain.d.ts +0 -1
- package/e2e/unit.spec.ts +0 -16
- package/public/my_other_directive.html +0 -1
- package/src/directive/if.md +0 -80
- package/test/build-test.html +0 -14
- package/test/mock-test.html +0 -13
- package/test/module-test.html +0 -58
- package/types/router/locationServices.d.ts +0 -50
- /package/{test → public}/jasmine/jasmine-5.1.2/boot0.js +0 -0
- /package/{test → public}/jasmine/jasmine-5.1.2/boot1.js +0 -0
- /package/{test → public}/jasmine/jasmine-5.1.2/jasmine-html.js +0 -0
- /package/{test → public}/jasmine/jasmine-5.1.2/jasmine.css +0 -0
- /package/{test → public}/jasmine/jasmine-5.1.2/jasmine.js +0 -0
- /package/{test → public}/jasmine/jasmine-5.1.2/jasmine_favicon.png +0 -0
- /package/{test → public}/jasmine/jasmine-browser.json +0 -0
- /package/{test → public}/jasmine/jasmine.json +0 -0
- /package/public/{README.md → public/README.md} +0 -0
- /package/public/{circle.html → public/circle.html} +0 -0
- /package/public/{my_child_directive.html → public/my_child_directive.html} +0 -0
- /package/public/{my_directive.html → public/my_directive.html} +0 -0
- /package/public/{test.html → public/test.html} +0 -0
- /package/src/core/{animate-css.js → animate/animate-css.js} +0 -0
- /package/src/core/{cache.js → cache/cache.js} +0 -0
- /package/src/core/{compile.md → compile/compile.md} +0 -0
- /package/src/core/{filter.md → filter/filter.md} +0 -0
- /package/src/core/{interval.md → interval/interval.md} +0 -0
- /package/src/core/{pubsub.js → pubsub/pubsub.js} +0 -0
- /package/src/directive/{bind.md → bind/bind.md} +0 -0
- /package/src/directive/{change.js → change/change.js} +0 -0
- /package/src/directive/{change.md → change/change.md} +0 -0
- /package/src/directive/{cloak.js → cloak/cloak.js} +0 -0
- /package/src/directive/{cloak.md → cloak/cloak.md} +0 -0
- /package/src/directive/{controller.js → controller/controller.js} +0 -0
- /package/src/directive/{controller.md → controller/controller.md} +0 -0
- /package/src/directive/{events.md → events/events.md} +0 -0
- /package/src/directive/{include.md → include/include.md} +0 -0
- /package/src/directive/{init.js → init/init.js} +0 -0
- /package/src/directive/{init.md → init/init.md} +0 -0
- /package/src/directive/{list.md → list/list.md} +0 -0
- /package/src/directive/{non-bindable.js → non-bindable/non-bindable.js} +0 -0
- /package/src/directive/{non-bindable.md → non-bindable/non-bindable.md} +0 -0
- /package/src/directive/{repeat.md → repeat/repeat.md} +0 -0
- /package/src/directive/{script.js → script/script.js} +0 -0
- /package/src/directive/{show-hide.js → show-hide/show-hide.js} +0 -0
- /package/src/directive/{style.js → style/style.js} +0 -0
- /package/src/directive/{style.md → style/style.md} +0 -0
- /package/src/directive/{switch.md → switch/switch.md} +0 -0
- /package/{test/module-test.js → src/services/http/http.html} +0 -0
- /package/src/{constants.js → shared/constants.js} +0 -0
- /package/{types → types-back}/angular.d.ts +0 -0
- /package/{types → types-back}/global.d.ts +0 -0
- /package/{types → types-back}/jqlite.d.ts +0 -0
- /package/{types → types-back}/router/core/common/common.d.ts +0 -0
- /package/{types → types-back}/router/core/common/coreservices.d.ts +0 -0
- /package/{types → types-back}/router/core/common/glob.d.ts +0 -0
- /package/{types → types-back}/router/core/common/hof.d.ts +0 -0
- /package/{types → types-back}/router/core/common/index.d.ts +0 -0
- /package/{types → types-back}/router/core/common/predicates.d.ts +0 -0
- /package/{types → types-back}/router/core/common/queue.d.ts +0 -0
- /package/{types → types-back}/router/core/common/safeConsole.d.ts +0 -0
- /package/{types → types-back}/router/core/common/strings.d.ts +0 -0
- /package/{types → types-back}/router/core/common/trace.d.ts +0 -0
- /package/{types → types-back}/router/core/globals.d.ts +0 -0
- /package/{types → types-back}/router/core/hooks/coreResolvables.d.ts +0 -0
- /package/{types → types-back}/router/core/hooks/ignoredTransition.d.ts +0 -0
- /package/{types → types-back}/router/core/hooks/invalidTransition.d.ts +0 -0
- /package/{types → types-back}/router/core/hooks/lazyLoad.d.ts +0 -0
- /package/{types → types-back}/router/core/hooks/onEnterExitRetain.d.ts +0 -0
- /package/{types → types-back}/router/core/hooks/redirectTo.d.ts +0 -0
- /package/{types → types-back}/router/core/hooks/resolve.d.ts +0 -0
- /package/{types → types-back}/router/core/hooks/updateGlobals.d.ts +0 -0
- /package/{types → types-back}/router/core/hooks/url.d.ts +0 -0
- /package/{types → types-back}/router/core/hooks/views.d.ts +0 -0
- /package/{types → types-back}/router/core/index.d.ts +0 -0
- /package/{types → types-back}/router/core/interface.d.ts +0 -0
- /package/{types → types-back}/router/core/params/index.d.ts +0 -0
- /package/{types → types-back}/router/core/params/interface.d.ts +0 -0
- /package/{types → types-back}/router/core/params/param.d.ts +0 -0
- /package/{types → types-back}/router/core/params/paramType.d.ts +0 -0
- /package/{types → types-back}/router/core/params/paramTypes.d.ts +0 -0
- /package/{types → types-back}/router/core/params/stateParams.d.ts +0 -0
- /package/{types → types-back}/router/core/path/index.d.ts +0 -0
- /package/{types → types-back}/router/core/path/pathNode.d.ts +0 -0
- /package/{types → types-back}/router/core/path/pathUtils.d.ts +0 -0
- /package/{types → types-back}/router/core/resolve/index.d.ts +0 -0
- /package/{types → types-back}/router/core/resolve/interface.d.ts +0 -0
- /package/{types → types-back}/router/core/resolve/resolvable.d.ts +0 -0
- /package/{types → types-back}/router/core/resolve/resolveContext.d.ts +0 -0
- /package/{types → types-back}/router/core/router.d.ts +0 -0
- /package/{types → types-back}/router/core/state/index.d.ts +0 -0
- /package/{types → types-back}/router/core/state/interface.d.ts +0 -0
- /package/{types → types-back}/router/core/state/stateBuilder.d.ts +0 -0
- /package/{types → types-back}/router/core/state/stateMatcher.d.ts +0 -0
- /package/{types → types-back}/router/core/state/stateObject.d.ts +0 -0
- /package/{types → types-back}/router/core/state/stateQueueManager.d.ts +0 -0
- /package/{types → types-back}/router/core/state/stateRegistry.d.ts +0 -0
- /package/{types → types-back}/router/core/state/stateService.d.ts +0 -0
- /package/{types → types-back}/router/core/state/targetState.d.ts +0 -0
- /package/{types → types-back}/router/core/transition/hookBuilder.d.ts +0 -0
- /package/{types → types-back}/router/core/transition/hookRegistry.d.ts +0 -0
- /package/{types → types-back}/router/core/transition/index.d.ts +0 -0
- /package/{types → types-back}/router/core/transition/interface.d.ts +0 -0
- /package/{types → types-back}/router/core/transition/rejectFactory.d.ts +0 -0
- /package/{types → types-back}/router/core/transition/transition.d.ts +0 -0
- /package/{types → types-back}/router/core/transition/transitionEventType.d.ts +0 -0
- /package/{types → types-back}/router/core/transition/transitionHook.d.ts +0 -0
- /package/{types → types-back}/router/core/transition/transitionService.d.ts +0 -0
- /package/{types → types-back}/router/core/url/index.d.ts +0 -0
- /package/{types → types-back}/router/core/url/interface.d.ts +0 -0
- /package/{types → types-back}/router/core/url/urlConfig.d.ts +0 -0
- /package/{types → types-back}/router/core/url/urlMatcher.d.ts +0 -0
- /package/{types → types-back}/router/core/url/urlMatcherFactory.d.ts +0 -0
- /package/{types → types-back}/router/core/url/urlRouter.d.ts +0 -0
- /package/{types → types-back}/router/core/url/urlRule.d.ts +0 -0
- /package/{types → types-back}/router/core/url/urlRules.d.ts +0 -0
- /package/{types → types-back}/router/core/url/urlService.d.ts +0 -0
- /package/{types → types-back}/router/core/view/index.d.ts +0 -0
- /package/{types → types-back}/router/core/view/interface.d.ts +0 -0
- /package/{types → types-back}/router/core/view/view.d.ts +0 -0
- /package/{types → types-back}/router/directives/viewDirective.d.ts +0 -0
- /package/{types → types-back}/router/statebuilders/views.d.ts +0 -0
- /package/{types → types-back}/router/templateFactory.d.ts +0 -0
- /package/{types → types-back}/router/viewScroll.d.ts +0 -0
- /package/{test/server → utils}/express.js +0 -0
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
isNumberNaN,
|
|
11
11
|
arrayRemove,
|
|
12
12
|
equals,
|
|
13
|
-
} from "
|
|
13
|
+
} from "../../shared/utils";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @enum {number}
|
|
@@ -21,6 +21,13 @@ export const ScopePhase = {
|
|
|
21
21
|
DIGEST: 2,
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* @typedef {Object} AsyncQueueTask
|
|
26
|
+
* @property {Scope} scope
|
|
27
|
+
* @property {Function} fn
|
|
28
|
+
* @property {Object} locals
|
|
29
|
+
*/
|
|
30
|
+
|
|
24
31
|
/**
|
|
25
32
|
*
|
|
26
33
|
* The default number of `$digest` iterations the scope should attempt to execute before giving up and
|
|
@@ -34,9 +41,11 @@ export const ScopePhase = {
|
|
|
34
41
|
export const TTL = 10;
|
|
35
42
|
|
|
36
43
|
const $rootScopeMinErr = minErr("$rootScope");
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const $$
|
|
44
|
+
|
|
45
|
+
/** @type {AsyncQueueTask[]} */
|
|
46
|
+
export const $$asyncQueue = [];
|
|
47
|
+
export const $$postDigestQueue = [];
|
|
48
|
+
export const $$applyAsyncQueue = [];
|
|
40
49
|
let postDigestQueuePosition = 0;
|
|
41
50
|
let lastDirtyWatch = null;
|
|
42
51
|
let applyAsyncId = null;
|
|
@@ -114,16 +123,8 @@ export class $RootScopeProvider {
|
|
|
114
123
|
* to construct.
|
|
115
124
|
*/
|
|
116
125
|
|
|
117
|
-
export function getQueues() {
|
|
118
|
-
return {
|
|
119
|
-
asyncQueue: $$asyncQueue,
|
|
120
|
-
postDigestQueue: $$postDigestQueue,
|
|
121
|
-
applyAsyncQueue: $$applyAsyncQueue,
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
|
|
125
126
|
/**
|
|
126
|
-
* @type {angular.
|
|
127
|
+
* @type {angular.Scope}
|
|
127
128
|
*/
|
|
128
129
|
class Scope {
|
|
129
130
|
constructor() {
|
|
@@ -136,35 +137,70 @@ class Scope {
|
|
|
136
137
|
this.$$phase = ScopePhase.NONE;
|
|
137
138
|
|
|
138
139
|
/**
|
|
139
|
-
* @type {?
|
|
140
|
+
* @type {?Scope} Reference to the parent scope.
|
|
140
141
|
*/
|
|
141
142
|
this.$parent = null;
|
|
142
143
|
|
|
143
144
|
/**
|
|
144
|
-
* @type {?angular.
|
|
145
|
+
* @type {?angular.Scope}
|
|
145
146
|
*/
|
|
146
147
|
this.$root = this;
|
|
147
148
|
|
|
148
|
-
|
|
149
|
+
/**
|
|
150
|
+
* @type {[]}
|
|
151
|
+
*/
|
|
152
|
+
this.$$watchers = [];
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* @type {number}
|
|
156
|
+
*/
|
|
157
|
+
this.$$digestWatchIndex = -1;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* @type {?Scope}
|
|
161
|
+
*/
|
|
149
162
|
this.$$nextSibling = null;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* @type {?Scope}
|
|
166
|
+
*/
|
|
150
167
|
this.$$prevSibling = null;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* @type {?Scope}
|
|
171
|
+
*/
|
|
151
172
|
this.$$childHead = null;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* @type {?Scope}
|
|
176
|
+
*/
|
|
152
177
|
this.$$childTail = null;
|
|
178
|
+
|
|
179
|
+
/** @type {boolean} */
|
|
153
180
|
this.$$destroyed = false;
|
|
181
|
+
|
|
182
|
+
// TODO use maps
|
|
183
|
+
/** @type {boolean} */
|
|
154
184
|
this.$$suspended = false;
|
|
185
|
+
|
|
186
|
+
// TODO use maps
|
|
187
|
+
/** @type {object} */
|
|
155
188
|
this.$$listeners = {};
|
|
189
|
+
|
|
190
|
+
/** @type {object} */
|
|
156
191
|
this.$$listenerCount = {};
|
|
192
|
+
|
|
193
|
+
/** @type {number} */
|
|
157
194
|
this.$$watchersCount = 0;
|
|
158
195
|
this.$$isolateBindings = null;
|
|
159
196
|
|
|
160
197
|
/**
|
|
161
|
-
* @type {Scope}
|
|
198
|
+
* @type {?Scope}
|
|
162
199
|
*/
|
|
163
200
|
this.$$ChildScope = null;
|
|
164
201
|
}
|
|
165
202
|
|
|
166
203
|
/**
|
|
167
|
-
* @description
|
|
168
204
|
* Creates a new child {@link Scope}.
|
|
169
205
|
*
|
|
170
206
|
* The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.
|
|
@@ -179,24 +215,25 @@ class Scope {
|
|
|
179
215
|
* When creating widgets, it is useful for the widget to not accidentally read parent
|
|
180
216
|
* state.
|
|
181
217
|
*
|
|
182
|
-
* @param {?
|
|
218
|
+
* @param {?Scope} [parent=this] The {@link ng.$rootScope.Scope `Scope`} that will be the `$parent`
|
|
183
219
|
* of the newly created scope. Defaults to `this` scope if not provided.
|
|
184
220
|
* This is used when creating a transclude scope to correctly place it
|
|
185
221
|
* in the scope hierarchy while maintaining the correct prototypical
|
|
186
222
|
* inheritance.
|
|
187
223
|
*
|
|
188
|
-
* @returns {
|
|
224
|
+
* @returns {Scope} The newly created child scope.
|
|
189
225
|
*
|
|
190
226
|
*/
|
|
191
227
|
$new(isolate, parent) {
|
|
228
|
+
/** @type {Scope} */
|
|
192
229
|
let child;
|
|
193
230
|
if (isolate) {
|
|
194
231
|
child = new Scope();
|
|
195
|
-
child.$root =
|
|
232
|
+
child.$root = rootScope;
|
|
196
233
|
} else {
|
|
197
234
|
child = Object.create(this);
|
|
198
235
|
child.$id = nextUid();
|
|
199
|
-
child.$$watchers =
|
|
236
|
+
child.$$watchers = [];
|
|
200
237
|
child.$$nextSibling = null;
|
|
201
238
|
child.$$childHead = null;
|
|
202
239
|
child.$$childTail = null;
|
|
@@ -206,6 +243,7 @@ class Scope {
|
|
|
206
243
|
child.$$ChildScope = null;
|
|
207
244
|
child.$$suspended = false;
|
|
208
245
|
}
|
|
246
|
+
|
|
209
247
|
child.$parent = parent || this;
|
|
210
248
|
child.$$prevSibling = child.$parent.$$childTail;
|
|
211
249
|
if (child.$parent.$$childHead) {
|
|
@@ -222,9 +260,13 @@ class Scope {
|
|
|
222
260
|
// when the parent scope is destroyed.
|
|
223
261
|
// The listener needs to be added after the parent is set
|
|
224
262
|
if (isolate || parent !== this) {
|
|
225
|
-
child.$on(
|
|
226
|
-
$
|
|
227
|
-
|
|
263
|
+
child.$on(
|
|
264
|
+
"$destroy",
|
|
265
|
+
/** @param {angular.IAngularEvent} $event */
|
|
266
|
+
($event) => {
|
|
267
|
+
$event.currentScope.$$destroyed = true;
|
|
268
|
+
},
|
|
269
|
+
);
|
|
228
270
|
}
|
|
229
271
|
return child;
|
|
230
272
|
}
|
|
@@ -329,13 +371,13 @@ class Scope {
|
|
|
329
371
|
*
|
|
330
372
|
*
|
|
331
373
|
*
|
|
332
|
-
* @param {(
|
|
374
|
+
* @param {string | ((scope: Scope) => any)} watchExp Expression that is evaluated on each
|
|
333
375
|
* {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers
|
|
334
376
|
* a call to the `listener`.
|
|
335
377
|
*
|
|
336
378
|
* - `string`: Evaluated as {@link guide/expression expression}
|
|
337
379
|
* - `function(scope)`: called with current `scope` as a parameter.
|
|
338
|
-
* @param {
|
|
380
|
+
* @param {(newVal: any, oldVal: any, scope: angular.Scope) => any} listener Callback called whenever the value
|
|
339
381
|
* of `watchExpression` changes.
|
|
340
382
|
*
|
|
341
383
|
* - `newVal` contains the current value of the `watchExpression`
|
|
@@ -352,8 +394,7 @@ class Scope {
|
|
|
352
394
|
if (get.$$watchDelegate) {
|
|
353
395
|
return get.$$watchDelegate(this, fn, objectEquality, get, watchExp);
|
|
354
396
|
}
|
|
355
|
-
|
|
356
|
-
let array = scope.$$watchers;
|
|
397
|
+
|
|
357
398
|
const watcher = {
|
|
358
399
|
fn,
|
|
359
400
|
last: initWatchVal,
|
|
@@ -364,23 +405,21 @@ class Scope {
|
|
|
364
405
|
|
|
365
406
|
lastDirtyWatch = null;
|
|
366
407
|
|
|
367
|
-
if (
|
|
368
|
-
|
|
369
|
-
array.$$digestWatchIndex = -1;
|
|
408
|
+
if (this.$$watchers.length == 0) {
|
|
409
|
+
this.$$digestWatchIndex = -1;
|
|
370
410
|
}
|
|
371
411
|
// we use unshift since we use a while loop in $digest for speed.
|
|
372
412
|
// the while loop reads in reverse order.
|
|
373
|
-
|
|
374
|
-
|
|
413
|
+
this.$$watchers.unshift(watcher);
|
|
414
|
+
this.$$digestWatchIndex++;
|
|
375
415
|
this.incrementWatchersCount(1);
|
|
376
|
-
const self = this;
|
|
377
416
|
|
|
378
|
-
return
|
|
379
|
-
const index = arrayRemove(
|
|
417
|
+
return () => {
|
|
418
|
+
const index = arrayRemove(this.$$watchers, watcher);
|
|
380
419
|
if (index >= 0) {
|
|
381
|
-
|
|
382
|
-
if (index <
|
|
383
|
-
|
|
420
|
+
this.incrementWatchersCount(-1);
|
|
421
|
+
if (index < this.$$digestWatchIndex) {
|
|
422
|
+
this.$$digestWatchIndex--;
|
|
384
423
|
}
|
|
385
424
|
}
|
|
386
425
|
lastDirtyWatch = null;
|
|
@@ -715,7 +754,7 @@ class Scope {
|
|
|
715
754
|
let ttl = TTL;
|
|
716
755
|
let next;
|
|
717
756
|
/**
|
|
718
|
-
* @type {
|
|
757
|
+
* @type {Scope}
|
|
719
758
|
*/
|
|
720
759
|
let current;
|
|
721
760
|
const target = $$asyncQueue.length ? this.$root : this;
|
|
@@ -731,7 +770,7 @@ class Scope {
|
|
|
731
770
|
if (this === this.$root && applyAsyncId !== null) {
|
|
732
771
|
// If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then
|
|
733
772
|
// cancel the scheduled $apply and flush the queue of expressions to be evaluated.
|
|
734
|
-
$browser.
|
|
773
|
+
$browser.cancel(applyAsyncId);
|
|
735
774
|
flushApplyAsync();
|
|
736
775
|
applyAsyncId = null;
|
|
737
776
|
}
|
|
@@ -765,10 +804,10 @@ class Scope {
|
|
|
765
804
|
// "traverse the scopes" loop
|
|
766
805
|
if ((watchers = !current.$$suspended && current.$$watchers)) {
|
|
767
806
|
// process our watches
|
|
768
|
-
|
|
769
|
-
while (
|
|
807
|
+
current.$$digestWatchIndex = watchers.length;
|
|
808
|
+
while (current.$$digestWatchIndex--) {
|
|
770
809
|
try {
|
|
771
|
-
watch = watchers[
|
|
810
|
+
watch = watchers[current.$$digestWatchIndex];
|
|
772
811
|
// Most common watches are on primitives, in which case we can short
|
|
773
812
|
// circuit it with === operator, only when === fails do we use .equals
|
|
774
813
|
if (watch) {
|
|
@@ -858,7 +897,7 @@ class Scope {
|
|
|
858
897
|
}
|
|
859
898
|
|
|
860
899
|
/**
|
|
861
|
-
*
|
|
900
|
+
* @private
|
|
862
901
|
* @param {ScopePhase} phase
|
|
863
902
|
*/
|
|
864
903
|
beginPhase(phase) {
|
|
@@ -971,7 +1010,7 @@ class Scope {
|
|
|
971
1010
|
* @description
|
|
972
1011
|
* Broadcasted when a scope and its children are being destroyed.
|
|
973
1012
|
*
|
|
974
|
-
* Note that, in
|
|
1013
|
+
* Note that, in AngularTS, there is also a `$destroy` jQuery event, which can be used to
|
|
975
1014
|
* clean up DOM bindings before an element is removed from the DOM.
|
|
976
1015
|
*/
|
|
977
1016
|
|
|
@@ -994,13 +1033,12 @@ class Scope {
|
|
|
994
1033
|
* Application code can register a `$destroy` event handler that will give it a chance to
|
|
995
1034
|
* perform any necessary cleanup.
|
|
996
1035
|
*
|
|
997
|
-
* Note that, in
|
|
1036
|
+
* Note that, in AngularTS, there is also a `$destroy` event, which can be used to
|
|
998
1037
|
* clean up DOM bindings before an element is removed from the DOM.
|
|
999
1038
|
*/
|
|
1000
1039
|
$destroy() {
|
|
1001
1040
|
// We can't destroy a scope that has been already destroyed.
|
|
1002
1041
|
if (this.$$destroyed) return;
|
|
1003
|
-
const parent = this.$parent;
|
|
1004
1042
|
|
|
1005
1043
|
this.$broadcast("$destroy");
|
|
1006
1044
|
this.$$destroyed = true;
|
|
@@ -1017,10 +1055,12 @@ class Scope {
|
|
|
1017
1055
|
|
|
1018
1056
|
// sever all the references to parent scopes (after this cleanup, the current scope should
|
|
1019
1057
|
// not be retained by any of our references and should be eligible for garbage collection)
|
|
1020
|
-
if (parent
|
|
1021
|
-
parent.$$childHead
|
|
1022
|
-
|
|
1023
|
-
parent.$$childTail
|
|
1058
|
+
if (this.$parent) {
|
|
1059
|
+
if (this.$parent.$$childHead === this)
|
|
1060
|
+
this.$parent.$$childHead = this.$$nextSibling;
|
|
1061
|
+
if (this.$parent.$$childTail === this)
|
|
1062
|
+
this.$parent.$$childTail = this.$$prevSibling;
|
|
1063
|
+
}
|
|
1024
1064
|
if (this.$$prevSibling)
|
|
1025
1065
|
this.$$prevSibling.$$nextSibling = this.$$nextSibling;
|
|
1026
1066
|
if (this.$$nextSibling)
|
|
@@ -1059,12 +1099,12 @@ class Scope {
|
|
|
1059
1099
|
*
|
|
1060
1100
|
* @description
|
|
1061
1101
|
* Executes the `expression` on the current scope and returns the result. Any exceptions in
|
|
1062
|
-
* the expression are propagated (uncaught). This is useful when evaluating
|
|
1102
|
+
* the expression are propagated (uncaught). This is useful when evaluating AngularTS
|
|
1063
1103
|
* expressions.
|
|
1064
1104
|
*
|
|
1065
1105
|
* @example
|
|
1066
1106
|
* ```js
|
|
1067
|
-
let scope =
|
|
1107
|
+
let scope = new Scope();
|
|
1068
1108
|
scope.a = 1;
|
|
1069
1109
|
scope.b = 2;
|
|
1070
1110
|
|
|
@@ -1072,7 +1112,7 @@ class Scope {
|
|
|
1072
1112
|
expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);
|
|
1073
1113
|
* ```
|
|
1074
1114
|
*
|
|
1075
|
-
* @param {
|
|
1115
|
+
* @param {string|function(Scope): any} [expr] An AngularTS expression to be executed.
|
|
1076
1116
|
*
|
|
1077
1117
|
* - `string`: execute using the rules as defined in {@link guide/expression expression}.
|
|
1078
1118
|
* - `function(scope)`: execute the function with the current `scope` parameter.
|
|
@@ -1107,7 +1147,7 @@ class Scope {
|
|
|
1107
1147
|
* will be scheduled. However, it is encouraged to always call code that changes the model
|
|
1108
1148
|
* from within an `$apply` call. That includes code evaluated via `$evalAsync`.
|
|
1109
1149
|
*
|
|
1110
|
-
* @param {(string|function())=} expr An
|
|
1150
|
+
* @param {(string|function())=} expr An AngularTS expression to be executed.
|
|
1111
1151
|
*
|
|
1112
1152
|
* - `string`: execute using the rules as defined in {@link guide/expression expression}.
|
|
1113
1153
|
* - `function(scope)`: execute the function with the current `scope` parameter.
|
|
@@ -1139,6 +1179,9 @@ class Scope {
|
|
|
1139
1179
|
return id;
|
|
1140
1180
|
}
|
|
1141
1181
|
|
|
1182
|
+
/**
|
|
1183
|
+
* @private
|
|
1184
|
+
*/
|
|
1142
1185
|
$$postDigest(fn) {
|
|
1143
1186
|
$$postDigestQueue.push(fn);
|
|
1144
1187
|
}
|
|
@@ -1149,9 +1192,9 @@ class Scope {
|
|
|
1149
1192
|
* @kind function
|
|
1150
1193
|
*
|
|
1151
1194
|
* @description
|
|
1152
|
-
* `$apply()` is used to execute an expression in
|
|
1195
|
+
* `$apply()` is used to execute an expression in AngularTS from outside of the AngularTS
|
|
1153
1196
|
* framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).
|
|
1154
|
-
* Because we are calling into the
|
|
1197
|
+
* Because we are calling into the AngularTS framework we need to perform proper scope life
|
|
1155
1198
|
* cycle of {@link ng.$exceptionHandler exception handling},
|
|
1156
1199
|
* {@link ng.$rootScope.Scope#$digest executing watches}.
|
|
1157
1200
|
*
|
|
@@ -1180,7 +1223,7 @@ class Scope {
|
|
|
1180
1223
|
* expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.
|
|
1181
1224
|
*
|
|
1182
1225
|
*
|
|
1183
|
-
* @param {
|
|
1226
|
+
* @param {string|function(Scope): any} [expr] An AngularTS expression to be executed.
|
|
1184
1227
|
*
|
|
1185
1228
|
* - `string`: execute using the rules as defined in {@link guide/expression expression}.
|
|
1186
1229
|
* - `function(scope)`: execute the function with current `scope` parameter.
|
|
@@ -1224,7 +1267,7 @@ class Scope {
|
|
|
1224
1267
|
* This can be used to queue up multiple expressions which need to be evaluated in the same
|
|
1225
1268
|
* digest.
|
|
1226
1269
|
*
|
|
1227
|
-
* @param {(string|function())=} expr An
|
|
1270
|
+
* @param {(string|function())=} expr An AngularTS expression to be executed.
|
|
1228
1271
|
*
|
|
1229
1272
|
* - `string`: execute using the rules as defined in {@link guide/expression expression}.
|
|
1230
1273
|
* - `function(scope)`: execute the function with current `scope` parameter.
|
|
@@ -1261,7 +1304,7 @@ class Scope {
|
|
|
1261
1304
|
* - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.
|
|
1262
1305
|
*
|
|
1263
1306
|
* @param {string} name Event name to listen on.
|
|
1264
|
-
* @param {function(
|
|
1307
|
+
* @param {function(angular.IAngularEvent): any} listener Function to call when the event is emitted.
|
|
1265
1308
|
* @returns {function()} Returns a deregistration function for this listener.
|
|
1266
1309
|
*/
|
|
1267
1310
|
$on(name, listener) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { extend, sliceArgs } from "../../
|
|
3
|
-
import { publishExternalAPI } from "../../
|
|
4
|
-
import { createInjector } from "../../
|
|
1
|
+
import { $$asyncQueue } from "../../core/root-scope";
|
|
2
|
+
import { extend, sliceArgs } from "../../shared/utils";
|
|
3
|
+
import { publishExternalAPI } from "../../public";
|
|
4
|
+
import { createInjector } from "../../injector";
|
|
5
5
|
|
|
6
6
|
describe("Scope", function () {
|
|
7
7
|
let $rootScope;
|
|
@@ -2380,7 +2380,7 @@ describe("Scope", function () {
|
|
|
2380
2380
|
$rootScope.$evalAsync("rootExpression");
|
|
2381
2381
|
childScope.$evalAsync("childExpression");
|
|
2382
2382
|
isolateScope.$evalAsync("isolateExpression");
|
|
2383
|
-
expect(
|
|
2383
|
+
expect($$asyncQueue).toEqual([
|
|
2384
2384
|
{
|
|
2385
2385
|
scope: $rootScope,
|
|
2386
2386
|
fn: $parse("rootExpression"),
|
|
@@ -2630,7 +2630,7 @@ describe("Scope", function () {
|
|
|
2630
2630
|
const scope = $rootScope.$new();
|
|
2631
2631
|
let id = scope.$applyAsync('x = "CODE ORANGE"');
|
|
2632
2632
|
|
|
2633
|
-
$browser.
|
|
2633
|
+
$browser.cancel(id);
|
|
2634
2634
|
setTimeout(() => {
|
|
2635
2635
|
expect(scope.x).toBe("CODE ORANGE");
|
|
2636
2636
|
expect($rootScope.x).toBeUndefined();
|
|
@@ -2644,8 +2644,8 @@ describe("Scope", function () {
|
|
|
2644
2644
|
let id1 = $rootScope.$applyAsync('x.push("expr1")');
|
|
2645
2645
|
let id2 = $rootScope.$applyAsync('x.push("expr2")');
|
|
2646
2646
|
|
|
2647
|
-
$browser.
|
|
2648
|
-
$browser.
|
|
2647
|
+
$browser.cancel(id1);
|
|
2648
|
+
$browser.cancel(id2);
|
|
2649
2649
|
setTimeout(() => {
|
|
2650
2650
|
expect($rootScope.x).toEqual(["expr1", "expr2"]);
|
|
2651
2651
|
});
|
|
@@ -2660,7 +2660,7 @@ describe("Scope", function () {
|
|
|
2660
2660
|
expect($browser.deferredFns.length).toBe(0);
|
|
2661
2661
|
});
|
|
2662
2662
|
|
|
2663
|
-
$browser.
|
|
2663
|
+
$browser.cancel(id);
|
|
2664
2664
|
setTimeout(() => {
|
|
2665
2665
|
expect($rootScope.x).toEqual(["expr1", "expr2"]);
|
|
2666
2666
|
});
|
|
@@ -2672,7 +2672,7 @@ describe("Scope", function () {
|
|
|
2672
2672
|
throw "OOPS";
|
|
2673
2673
|
});
|
|
2674
2674
|
|
|
2675
|
-
$browser.
|
|
2675
|
+
$browser.cancel(id);
|
|
2676
2676
|
expect(logs).toEqual([]);
|
|
2677
2677
|
setTimeout(() => expect(logs[0]).toEqual("OOPS"));
|
|
2678
2678
|
});
|
|
@@ -2683,14 +2683,14 @@ describe("Scope", function () {
|
|
|
2683
2683
|
});
|
|
2684
2684
|
let id2 = $rootScope.$applyAsync('x = "All good!"');
|
|
2685
2685
|
|
|
2686
|
-
$browser.
|
|
2687
|
-
$browser.
|
|
2686
|
+
$browser.cancel(id);
|
|
2687
|
+
$browser.cancel(id2);
|
|
2688
2688
|
setTimeout(() => expect($rootScope.x).toBe("All good!"));
|
|
2689
2689
|
expect($rootScope.x).toBeUndefined();
|
|
2690
2690
|
});
|
|
2691
2691
|
|
|
2692
2692
|
it("should be cancelled if a $rootScope digest occurs before the next tick", () => {
|
|
2693
|
-
const cancel = spyOn($browser
|
|
2693
|
+
const cancel = spyOn($browser, "cancel").and.callThrough();
|
|
2694
2694
|
const expression = jasmine.createSpy("expr");
|
|
2695
2695
|
|
|
2696
2696
|
$rootScope.$applyAsync(expression);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { markQExceptionHandled } from "
|
|
2
|
-
import { isDefined, isFunction, minErr, sliceArgs } from "
|
|
1
|
+
import { markQExceptionHandled } from "../q/q";
|
|
2
|
+
import { isDefined, isFunction, minErr, sliceArgs } from "../../shared/utils";
|
|
3
3
|
|
|
4
4
|
const $timeoutMinErr = minErr("$timeout");
|
|
5
5
|
|
|
@@ -103,7 +103,7 @@ export function $timeout($rootScope, $browser, $q, $$q, $exceptionHandler) {
|
|
|
103
103
|
deferred.reject("canceled");
|
|
104
104
|
delete deferreds[id];
|
|
105
105
|
|
|
106
|
-
return $browser.
|
|
106
|
+
return $browser.cancel(id);
|
|
107
107
|
};
|
|
108
108
|
|
|
109
109
|
return timeout;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { publishExternalAPI } from "../../
|
|
2
|
-
import { createInjector } from "../../
|
|
1
|
+
import { publishExternalAPI } from "../../public";
|
|
2
|
+
import { createInjector } from "../../injector";
|
|
3
3
|
import { wait } from "../test-utils";
|
|
4
4
|
|
|
5
5
|
describe("$timeout", () => {
|
|
@@ -325,7 +325,7 @@ describe("$timeout", () => {
|
|
|
325
325
|
});
|
|
326
326
|
|
|
327
327
|
it("should forget references to relevant deferred", () => {
|
|
328
|
-
// $browser.
|
|
328
|
+
// $browser.cancel is only called on cancel if the deferred object is still referenced
|
|
329
329
|
const cancelSpy = spyOn($browser.defer, "cancel").and.callThrough();
|
|
330
330
|
|
|
331
331
|
const promise = $timeout(() => {}, 0, false);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>AngularTS Test Runner</title>
|
|
6
|
+
|
|
7
|
+
<link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
|
|
8
|
+
<link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
|
|
9
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
|
|
10
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
|
|
11
|
+
<script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
|
|
12
|
+
<script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
|
|
13
|
+
<script type="module" src="/src/directive/attrs/attrs.spec.js"></script>
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<div id="dummy"></div>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BOOLEAN_ATTR } from "
|
|
2
|
-
import { forEach, directiveNormalize } from "
|
|
3
|
-
import { ALIASED_ATTR } from "
|
|
1
|
+
import { BOOLEAN_ATTR } from "../../jqLite";
|
|
2
|
+
import { forEach, directiveNormalize } from "../../shared/utils";
|
|
3
|
+
import { ALIASED_ATTR } from "../../shared/constants";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @ngdoc directive
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { publishExternalAPI } from "../../
|
|
2
|
-
import { createInjector } from "../../
|
|
3
|
-
import { dealoc, jqLite } from "../../
|
|
1
|
+
import { publishExternalAPI } from "../../public";
|
|
2
|
+
import { createInjector } from "../../injector";
|
|
3
|
+
import { dealoc, jqLite } from "../../jqLite";
|
|
4
4
|
|
|
5
5
|
describe("ngSrcset", () => {
|
|
6
6
|
let $scope;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { publishExternalAPI } from "../../
|
|
2
|
-
import { createInjector } from "../../
|
|
3
|
-
import { dealoc, jqLite } from "../../
|
|
1
|
+
import { publishExternalAPI } from "../../public";
|
|
2
|
+
import { createInjector } from "../../injector";
|
|
3
|
+
import { dealoc, jqLite } from "../../jqLite";
|
|
4
4
|
|
|
5
5
|
describe("boolean attr directives", () => {
|
|
6
6
|
let element, $rootScope, $compile, $rootElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { publishExternalAPI } from "../../
|
|
2
|
-
import { createInjector } from "../../
|
|
3
|
-
import { dealoc, jqLite } from "../../
|
|
1
|
+
import { publishExternalAPI } from "../../public";
|
|
2
|
+
import { createInjector } from "../../injector";
|
|
3
|
+
import { dealoc, jqLite } from "../../jqLite";
|
|
4
4
|
|
|
5
5
|
describe("style", () => {
|
|
6
6
|
let $rootScope;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { publishExternalAPI } from "../../
|
|
2
|
-
import { createInjector } from "../../
|
|
3
|
-
import { dealoc, jqLite } from "../../
|
|
1
|
+
import { publishExternalAPI } from "../../public";
|
|
2
|
+
import { createInjector } from "../../injector";
|
|
3
|
+
import { dealoc, jqLite } from "../../jqLite";
|
|
4
4
|
|
|
5
5
|
describe("ngSrc", () => {
|
|
6
6
|
let $scope;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
const TEST_URL = "src/directive/srcset/srcset.html";
|
|
4
|
+
|
|
5
|
+
test("unit tests contain no errors", async ({ page }) => {
|
|
6
|
+
await page.goto(TEST_URL);
|
|
7
|
+
await page.content();
|
|
8
|
+
await expect(page.locator(".jasmine-overall-result")).toHaveText(
|
|
9
|
+
/0 failures/,
|
|
10
|
+
);
|
|
11
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>AngularTS Test Runner</title>
|
|
6
|
+
|
|
7
|
+
<link rel="shortcut icon" type="image/png" href="/images/favicon.ico" />
|
|
8
|
+
<link rel="stylesheet" href="/jasmine/jasmine-5.1.2/jasmine.css" />
|
|
9
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine.js"></script>
|
|
10
|
+
<script src="/jasmine/jasmine-5.1.2/jasmine-html.js"></script>
|
|
11
|
+
<script src="/jasmine/jasmine-5.1.2/boot0.js"></script>
|
|
12
|
+
<script src="/jasmine/jasmine-5.1.2/boot1.js"></script>
|
|
13
|
+
<script type="module" src="/src/directive/bind/bind.spec.js"></script>
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<div id="dummy"></div>
|
|
17
|
+
</body>
|
|
18
|
+
</html>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { publishExternalAPI } from "../../
|
|
2
|
-
import { createInjector } from "../../
|
|
3
|
-
import { dealoc, jqLite } from "../../
|
|
1
|
+
import { publishExternalAPI } from "../../public";
|
|
2
|
+
import { createInjector } from "../../injector";
|
|
3
|
+
import { dealoc, jqLite } from "../../jqLite";
|
|
4
4
|
|
|
5
5
|
describe("ng-bind", () => {
|
|
6
6
|
let $rootScope;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { test, expect } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
const TEST_URL = "src/directive/bind/bind.html";
|
|
4
|
+
|
|
5
|
+
test("unit tests contain no errors", async ({ page }) => {
|
|
6
|
+
await page.goto(TEST_URL);
|
|
7
|
+
await page.content();
|
|
8
|
+
await expect(page.locator(".jasmine-overall-result")).toHaveText(
|
|
9
|
+
/0 failures/,
|
|
10
|
+
);
|
|
11
|
+
});
|