@angular-wave/angular.ts 0.0.35 → 0.0.37
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/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 +4 -3
- package/public/public/my_other_directive.html +1 -0
- package/{test → src}/angular.spec.js +6 -6
- package/src/animations/animate-css-driver.js +1 -1
- package/src/animations/animate-queue.js +1 -1
- package/src/animations/animation.js +1 -1
- package/src/animations/shared.js +1 -1
- 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 +4 -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} +33 -35
- package/{test/core → src/core/scope}/scope.spec.js +5 -5
- package/src/core/{timeout.js → timeout/timeout.js} +2 -2
- package/{test/core → src/core/timeout}/timeout.spec.js +2 -2
- 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/src/directive/attrs/src.html +18 -0
- package/{test/directive → src/directive/attrs}/src.spec.js +3 -3
- package/src/directive/attrs/src.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 +5 -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} +2 -1
- 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} +2 -2
- 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/src/exts/aria/aria.html +21 -0
- package/src/exts/{aria.js → aria/aria.js} +1 -1
- package/{test → src/exts}/aria/aria.spec.js +3 -3
- package/src/exts/aria/aria.test.js +11 -0
- package/src/exts/messages/messages.html +21 -0
- package/src/exts/{messages.js → messages/messages.js} +1 -1
- package/{test → src/exts}/messages/messages.spec.js +5 -5
- package/src/exts/messages/messages.test.js +11 -0
- 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/loader.js +2 -2
- package/{test → src}/loader.spec.js +2 -2
- package/src/public.js +48 -45
- package/{test → src}/public.spec.js +2 -2
- package/src/router/common/glob.html +18 -0
- package/{test/router → src/router/common}/glob.spec.js +1 -1
- package/src/router/common/glob.test.js +11 -0
- package/src/router/directives/view-directive.js +1 -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 +2 -2
- package/src/services/cache-factory.js +5 -11
- package/src/services/document.js +1 -1
- 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/src/shared/jqlite/jqlite.html +18 -0
- package/src/{jqLite.js → shared/jqlite/jqlite.js} +2 -2
- package/{test → src/shared/jqlite}/jqlite.spec.js +7 -7
- package/src/shared/jqlite/jqlite.test.js +11 -0
- package/{test → src/shared}/min-err.spec.js +2 -2
- 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 -17
- 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 +17 -12
- package/types-back/router/index.d.ts +17 -0
- package/types-back/router/services.d.ts +15 -0
- 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/{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/src/exts/{messages.md → messages/messages.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/interface.d.ts +0 -0
- /package/{types → types-back}/router/legacy/resolveService.d.ts +0 -0
- /package/{types → types-back}/router/legacy/stateEvents.d.ts +0 -0
- /package/{types → types-back}/router/stateFilters.d.ts +0 -0
- /package/{types → types-back}/router/stateProvider.d.ts +0 -0
- /package/{types → types-back}/router/statebuilders/onEnterExitRetain.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
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This class contains functions which convert TargetStates, Nodes and paths from one type to another.
|
|
3
|
+
*/
|
|
4
|
+
export class PathUtils {
|
|
5
|
+
/** Given a PathNode[], create an TargetState */
|
|
6
|
+
static makeTargetState(registry: any, path: any): TargetState;
|
|
7
|
+
static buildPath(targetState: any): any;
|
|
8
|
+
/** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */
|
|
9
|
+
static buildToPath(fromPath: any, targetState: any): any;
|
|
10
|
+
/**
|
|
11
|
+
* Creates ViewConfig objects and adds to nodes.
|
|
12
|
+
*
|
|
13
|
+
* On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state
|
|
14
|
+
*/
|
|
15
|
+
static applyViewConfigs($view: any, path: any, states: any): void;
|
|
16
|
+
/**
|
|
17
|
+
* Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath
|
|
18
|
+
*
|
|
19
|
+
* For a parameter in a node to be inherited from the from path:
|
|
20
|
+
* - The toPath's node must have a matching node in the fromPath (by state).
|
|
21
|
+
* - The parameter name must not be found in the toKeys parameter array.
|
|
22
|
+
*
|
|
23
|
+
* Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some
|
|
24
|
+
* caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams,
|
|
25
|
+
* it is not inherited from the fromPath.
|
|
26
|
+
*/
|
|
27
|
+
static inheritParams(fromPath: any, toPath: any, toKeys?: any[]): any;
|
|
28
|
+
/**
|
|
29
|
+
* Computes the tree changes (entering, exiting) between a fromPath and toPath.
|
|
30
|
+
*/
|
|
31
|
+
static treeChanges(
|
|
32
|
+
fromPath: any,
|
|
33
|
+
toPath: any,
|
|
34
|
+
reloadState: any,
|
|
35
|
+
): {
|
|
36
|
+
from: any;
|
|
37
|
+
to: any;
|
|
38
|
+
retained: any;
|
|
39
|
+
retainedWithToParams: any;
|
|
40
|
+
exiting: any;
|
|
41
|
+
entering: any;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Returns a new path which is: the subpath of the first path which matches the second path.
|
|
45
|
+
*
|
|
46
|
+
* The new path starts from root and contains any nodes that match the nodes in the second path.
|
|
47
|
+
* It stops before the first non-matching node.
|
|
48
|
+
*
|
|
49
|
+
* Nodes are compared using their state property and their parameter values.
|
|
50
|
+
* If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes.
|
|
51
|
+
*
|
|
52
|
+
* @param pathA the first path
|
|
53
|
+
* @param pathB the second path
|
|
54
|
+
* @param paramsFn a function which returns the parameters to consider when comparing
|
|
55
|
+
*
|
|
56
|
+
* @returns an array of PathNodes from the first path which match the nodes in the second path
|
|
57
|
+
*/
|
|
58
|
+
static matching(pathA: any, pathB: any, paramsFn: any): any[];
|
|
59
|
+
/**
|
|
60
|
+
* Returns true if two paths are identical.
|
|
61
|
+
*
|
|
62
|
+
* @param pathA
|
|
63
|
+
* @param pathB
|
|
64
|
+
* @param paramsFn a function which returns the parameters to consider when comparing
|
|
65
|
+
* @returns true if the the states and parameter values for both paths are identical
|
|
66
|
+
*/
|
|
67
|
+
static equals(pathA: any, pathB: any, paramsFn: any): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Return a subpath of a path, which stops at the first matching node
|
|
70
|
+
*
|
|
71
|
+
* Given an array of nodes, returns a subset of the array starting from the first node,
|
|
72
|
+
* stopping when the first node matches the predicate.
|
|
73
|
+
*
|
|
74
|
+
* @param path a path of [[PathNode]]s
|
|
75
|
+
* @param predicate a [[Predicate]] fn that matches [[PathNode]]s
|
|
76
|
+
* @returns a subpath up to the matching node, or undefined if no match is found
|
|
77
|
+
*/
|
|
78
|
+
static subPath(path: any, predicate: any): any;
|
|
79
|
+
static nonDynamicParams(node: any): any;
|
|
80
|
+
/** Gets the raw parameter values from a path */
|
|
81
|
+
static paramValues(path: any): any;
|
|
82
|
+
}
|
|
83
|
+
import { TargetState } from "../state/target-state";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export namespace defaultResolvePolicy {
|
|
2
|
+
let when: string;
|
|
3
|
+
let async: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* The basic building block for the resolve system.
|
|
7
|
+
*
|
|
8
|
+
* Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise),
|
|
9
|
+
* and the unwrapped-when-complete (.data) result of the resolveFn.
|
|
10
|
+
*
|
|
11
|
+
* Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the
|
|
12
|
+
* resolveFn) and returns the resulting promise.
|
|
13
|
+
*
|
|
14
|
+
* Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first
|
|
15
|
+
* parameter to those fns.
|
|
16
|
+
*/
|
|
17
|
+
export class Resolvable {
|
|
18
|
+
constructor(arg1: any, resolveFn: any, deps: any, policy: any, data: any);
|
|
19
|
+
resolved: boolean;
|
|
20
|
+
promise: any;
|
|
21
|
+
token: any;
|
|
22
|
+
policy: any;
|
|
23
|
+
resolveFn: any;
|
|
24
|
+
deps: any;
|
|
25
|
+
data: any;
|
|
26
|
+
getPolicy(state: any): {
|
|
27
|
+
when: any;
|
|
28
|
+
async: any;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Asynchronously resolve this Resolvable's data
|
|
32
|
+
*
|
|
33
|
+
* Given a ResolveContext that this Resolvable is found in:
|
|
34
|
+
* Wait for this Resolvable's dependencies, then invoke this Resolvable's function
|
|
35
|
+
* and update the Resolvable's state
|
|
36
|
+
*/
|
|
37
|
+
resolve(resolveContext: any, trans: any): any;
|
|
38
|
+
/**
|
|
39
|
+
* Gets a promise for this Resolvable's data.
|
|
40
|
+
*
|
|
41
|
+
* Fetches the data and returns a promise.
|
|
42
|
+
* Returns the existing promise if it has already been fetched once.
|
|
43
|
+
*/
|
|
44
|
+
get(resolveContext: any, trans: any): any;
|
|
45
|
+
toString(): string;
|
|
46
|
+
clone(): Resolvable;
|
|
47
|
+
}
|
|
48
|
+
export namespace Resolvable {
|
|
49
|
+
function fromData(token: any, data: any): Resolvable;
|
|
50
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export namespace resolvePolicies {
|
|
2
|
+
namespace when {
|
|
3
|
+
let LAZY: string;
|
|
4
|
+
let EAGER: string;
|
|
5
|
+
}
|
|
6
|
+
namespace async {
|
|
7
|
+
let WAIT: string;
|
|
8
|
+
let NOWAIT: string;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export const NATIVE_INJECTOR_TOKEN: "Native Injector";
|
|
12
|
+
/**
|
|
13
|
+
* Encapsulates Dependency Injection for a path of nodes
|
|
14
|
+
*
|
|
15
|
+
* ng-router states are organized as a tree.
|
|
16
|
+
* A nested state has a path of ancestors to the root of the tree.
|
|
17
|
+
* When a state is being activated, each element in the path is wrapped as a [[PathNode]].
|
|
18
|
+
* A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated.
|
|
19
|
+
*
|
|
20
|
+
* The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path.
|
|
21
|
+
*/
|
|
22
|
+
export class ResolveContext {
|
|
23
|
+
constructor(_path: any);
|
|
24
|
+
_path: any;
|
|
25
|
+
/** Gets all the tokens found in the resolve context, de-duplicated */
|
|
26
|
+
getTokens(): any;
|
|
27
|
+
/**
|
|
28
|
+
* Gets the Resolvable that matches the token
|
|
29
|
+
*
|
|
30
|
+
* Gets the last Resolvable that matches the token in this context, or undefined.
|
|
31
|
+
* Throws an error if it doesn't exist in the ResolveContext
|
|
32
|
+
*/
|
|
33
|
+
getResolvable(token: any): any;
|
|
34
|
+
/** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */
|
|
35
|
+
getPolicy(resolvable: any): any;
|
|
36
|
+
/**
|
|
37
|
+
* Returns a ResolveContext that includes a portion of this one
|
|
38
|
+
*
|
|
39
|
+
* Given a state, this method creates a new ResolveContext from this one.
|
|
40
|
+
* The new context starts at the first node (root) and stops at the node for the `state` parameter.
|
|
41
|
+
*
|
|
42
|
+
* #### Why
|
|
43
|
+
*
|
|
44
|
+
* When a transition is created, the nodes in the "To Path" are injected from a ResolveContext.
|
|
45
|
+
* A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables.
|
|
46
|
+
* The "To State" can inject values from its own resolvables, as well as those from all its ancestor state's (node's).
|
|
47
|
+
* This method is used to create a narrower context when injecting ancestor nodes.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* `let ABCD = new ResolveContext([A, B, C, D]);`
|
|
51
|
+
*
|
|
52
|
+
* Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`:
|
|
53
|
+
* When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`.
|
|
54
|
+
* However, `B` should only be able to access resolvables from `A`, `B`.
|
|
55
|
+
*
|
|
56
|
+
* When resolving for the `B` node, first take the full "To Path" Context `[A,B,C,D]` and limit to the subpath `[A,B]`.
|
|
57
|
+
* `let AB = ABCD.subcontext(a)`
|
|
58
|
+
*/
|
|
59
|
+
subContext(state: any): ResolveContext;
|
|
60
|
+
/**
|
|
61
|
+
* Adds Resolvables to the node that matches the state
|
|
62
|
+
*
|
|
63
|
+
* This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block).
|
|
64
|
+
* The resolvable is added to the node matching the `state` parameter.
|
|
65
|
+
*
|
|
66
|
+
* These new resolvables are not automatically fetched.
|
|
67
|
+
* The calling code should either fetch them, fetch something that depends on them,
|
|
68
|
+
* or rely on [[resolvePath]] being called when some state is being entered.
|
|
69
|
+
*
|
|
70
|
+
* Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default.
|
|
71
|
+
*
|
|
72
|
+
* @param newResolvables the new Resolvables
|
|
73
|
+
* @param state Used to find the node to put the resolvable on
|
|
74
|
+
*/
|
|
75
|
+
addResolvables(newResolvables: any, state: any): void;
|
|
76
|
+
/**
|
|
77
|
+
* Returns a promise for an array of resolved path Element promises
|
|
78
|
+
*
|
|
79
|
+
* @param when
|
|
80
|
+
* @param trans
|
|
81
|
+
* @returns {Promise<any>|any}
|
|
82
|
+
*/
|
|
83
|
+
resolvePath(when: string, trans: any): Promise<any> | any;
|
|
84
|
+
injector(): UIInjectorImpl;
|
|
85
|
+
_injector: UIInjectorImpl;
|
|
86
|
+
findNode(resolvable: any): undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Gets the async dependencies of a Resolvable
|
|
89
|
+
*
|
|
90
|
+
* Given a Resolvable, returns its dependencies as a Resolvable[]
|
|
91
|
+
*/
|
|
92
|
+
getDependencies(resolvable: any): any;
|
|
93
|
+
}
|
|
94
|
+
declare class UIInjectorImpl {
|
|
95
|
+
constructor(context: any);
|
|
96
|
+
context: any;
|
|
97
|
+
native: any;
|
|
98
|
+
get(token: any): any;
|
|
99
|
+
getAsync(token: any): any;
|
|
100
|
+
getNative(token: any): any;
|
|
101
|
+
}
|
|
102
|
+
export {};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
export function runBlock(
|
|
2
|
+
$injector: any,
|
|
3
|
+
$q: any,
|
|
4
|
+
$stateRegistry: any,
|
|
5
|
+
$urlService: any,
|
|
6
|
+
): void;
|
|
7
|
+
export namespace runBlock {
|
|
8
|
+
let $inject: string[];
|
|
9
9
|
}
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
|
|
10
|
+
export function watchDigests($rootScope: any): void;
|
|
11
|
+
export namespace watchDigests {
|
|
12
|
+
let $inject_1: string[];
|
|
13
|
+
export { $inject_1 as $inject };
|
|
13
14
|
}
|
|
14
|
-
/** @hidden TODO: find a place to move this */
|
|
15
|
-
export declare const getLocals: (ctx: ResolveContext) => TypedMap<any>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]].
|
|
3
|
+
*
|
|
4
|
+
* When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder
|
|
5
|
+
* validates the `resolve` property and converts it to a [[Resolvable]] array.
|
|
6
|
+
*
|
|
7
|
+
* resolve: input value can be:
|
|
8
|
+
*
|
|
9
|
+
* {
|
|
10
|
+
* // analyzed but not injected
|
|
11
|
+
* myFooResolve: function() { return "myFooData"; },
|
|
12
|
+
*
|
|
13
|
+
* // function.toString() parsed, "DependencyName" dep as string (not min-safe)
|
|
14
|
+
* myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() },
|
|
15
|
+
*
|
|
16
|
+
* // Array split; "DependencyName" dep as string
|
|
17
|
+
* myBazResolve: [ "DependencyName", function(dep) { return dep.fetchSomethingAsPromise() },
|
|
18
|
+
*
|
|
19
|
+
* // Array split; DependencyType dep as token (compared using ===)
|
|
20
|
+
* myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() },
|
|
21
|
+
*
|
|
22
|
+
* // val.$inject used as deps
|
|
23
|
+
* // where:
|
|
24
|
+
* // corgeResolve.$inject = ["DependencyName"];
|
|
25
|
+
* // function corgeResolve(dep) { dep.fetchSometingAsPromise() }
|
|
26
|
+
* // then "DependencyName" dep as string
|
|
27
|
+
* myCorgeResolve: corgeResolve,
|
|
28
|
+
*
|
|
29
|
+
* // inject service by name
|
|
30
|
+
* // When a string is found, desugar creating a resolve that injects the named service
|
|
31
|
+
* myGraultResolve: "SomeService"
|
|
32
|
+
* }
|
|
33
|
+
*
|
|
34
|
+
* or:
|
|
35
|
+
*
|
|
36
|
+
* [
|
|
37
|
+
* new Resolvable("myFooResolve", function() { return "myFooData" }),
|
|
38
|
+
* new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]),
|
|
39
|
+
* { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] }
|
|
40
|
+
* ]
|
|
41
|
+
*/
|
|
42
|
+
export function resolvablesBuilder(state: any): any[];
|
|
43
|
+
/**
|
|
44
|
+
* A internal global service
|
|
45
|
+
*
|
|
46
|
+
* StateBuilder is a factory for the internal [[StateObject]] objects.
|
|
47
|
+
*
|
|
48
|
+
* When you register a state with the [[StateRegistry]], you register a plain old javascript object which
|
|
49
|
+
* conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding
|
|
50
|
+
* [[StateObject]] object, which has an API and is used internally.
|
|
51
|
+
*
|
|
52
|
+
* Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function
|
|
53
|
+
* using the [[builder]] method.
|
|
54
|
+
*/
|
|
55
|
+
export class StateBuilder {
|
|
56
|
+
constructor(matcher: any, urlService: any);
|
|
57
|
+
matcher: any;
|
|
58
|
+
$injector: any;
|
|
59
|
+
builders: {
|
|
60
|
+
name: (typeof nameBuilder)[];
|
|
61
|
+
self: (typeof selfBuilder)[];
|
|
62
|
+
parent: ((state: any) => any)[];
|
|
63
|
+
data: (typeof dataBuilder)[];
|
|
64
|
+
url: ((stateObject: any) => any)[];
|
|
65
|
+
navigable: ((state: any) => any)[];
|
|
66
|
+
params: ((state: any) => any)[];
|
|
67
|
+
views: any[];
|
|
68
|
+
path: (typeof pathBuilder)[];
|
|
69
|
+
includes: (typeof includesBuilder)[];
|
|
70
|
+
resolvables: (typeof resolvablesBuilder)[];
|
|
71
|
+
};
|
|
72
|
+
builder(name: any, fn: any): any;
|
|
73
|
+
/**
|
|
74
|
+
* Builds all of the properties on an essentially blank State object, returning a State object which has all its
|
|
75
|
+
* properties and API built.
|
|
76
|
+
*
|
|
77
|
+
* @param state an uninitialized State object
|
|
78
|
+
* @returns the built State object
|
|
79
|
+
*/
|
|
80
|
+
build(state: any): any;
|
|
81
|
+
parentName(state: any): any;
|
|
82
|
+
name(state: any): any;
|
|
83
|
+
}
|
|
84
|
+
declare function nameBuilder(state: any): any;
|
|
85
|
+
declare function selfBuilder(state: any): any;
|
|
86
|
+
declare function dataBuilder(state: any): any;
|
|
87
|
+
declare function pathBuilder(state: any): any;
|
|
88
|
+
declare function includesBuilder(state: any): any;
|
|
89
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal representation of a ng-router state.
|
|
3
|
+
*
|
|
4
|
+
* Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]].
|
|
5
|
+
*
|
|
6
|
+
* A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object.
|
|
7
|
+
*
|
|
8
|
+
* This class prototypally inherits from the corresponding [[StateDeclaration]].
|
|
9
|
+
* Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]].
|
|
10
|
+
*/
|
|
11
|
+
export class StateObject {
|
|
12
|
+
/**
|
|
13
|
+
* Create a state object to put the private/internal implementation details onto.
|
|
14
|
+
* The object's prototype chain looks like:
|
|
15
|
+
* (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...)
|
|
16
|
+
*
|
|
17
|
+
* @param stateDecl the user-supplied State Declaration
|
|
18
|
+
* @returns {StateObject} an internal State object
|
|
19
|
+
*/
|
|
20
|
+
static create(stateDecl: any): StateObject;
|
|
21
|
+
constructor(config: any);
|
|
22
|
+
/**
|
|
23
|
+
* Returns true if the provided parameter is the same state.
|
|
24
|
+
*
|
|
25
|
+
* Compares the identity of the state against the passed value, which is either an object
|
|
26
|
+
* reference to the actual `State` instance, the original definition object passed to
|
|
27
|
+
* `$stateProvider.state()`, or the fully-qualified name.
|
|
28
|
+
*
|
|
29
|
+
* @param ref Can be one of (a) a `State` instance, (b) an object that was passed
|
|
30
|
+
* into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string.
|
|
31
|
+
* @returns Returns `true` if `ref` matches the current `State` instance.
|
|
32
|
+
*/
|
|
33
|
+
is(ref: any): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated this does not properly handle dot notation
|
|
36
|
+
* @returns Returns a dot-separated name of the state.
|
|
37
|
+
*/
|
|
38
|
+
fqn(): any;
|
|
39
|
+
/**
|
|
40
|
+
* Returns the root node of this state's tree.
|
|
41
|
+
*
|
|
42
|
+
* @returns The root of this state's tree.
|
|
43
|
+
*/
|
|
44
|
+
root(): any;
|
|
45
|
+
/**
|
|
46
|
+
* Gets the state's `Param` objects
|
|
47
|
+
*
|
|
48
|
+
* Gets the list of [[Param]] objects owned by the state.
|
|
49
|
+
* If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects.
|
|
50
|
+
* If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object
|
|
51
|
+
*
|
|
52
|
+
* @param opts options
|
|
53
|
+
*/
|
|
54
|
+
parameters(opts: any): any;
|
|
55
|
+
/**
|
|
56
|
+
* Returns a single [[Param]] that is owned by the state
|
|
57
|
+
*
|
|
58
|
+
* If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s.
|
|
59
|
+
* @param id the name of the [[Param]] to return
|
|
60
|
+
* @param opts options
|
|
61
|
+
*/
|
|
62
|
+
parameter(id: any, opts?: {}): any;
|
|
63
|
+
toString(): any;
|
|
64
|
+
}
|
|
65
|
+
export namespace StateObject {
|
|
66
|
+
/** Predicate which returns true if the object is an class with @State() decorator */
|
|
67
|
+
function isStateClass(stateDecl: any): boolean;
|
|
68
|
+
/** Predicate which returns true if the object is a [[StateDeclaration]] object */
|
|
69
|
+
function isStateDeclaration(obj: any): boolean;
|
|
70
|
+
/** Predicate which returns true if the object is an internal [[StateObject]] object */
|
|
71
|
+
function isState(obj: any): boolean;
|
|
72
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class StateQueueManager {
|
|
2
|
+
constructor(
|
|
3
|
+
stateRegistry: any,
|
|
4
|
+
urlServiceRules: any,
|
|
5
|
+
states: any,
|
|
6
|
+
builder: any,
|
|
7
|
+
listeners: any,
|
|
8
|
+
);
|
|
9
|
+
stateRegistry: any;
|
|
10
|
+
urlServiceRules: any;
|
|
11
|
+
states: any;
|
|
12
|
+
builder: any;
|
|
13
|
+
listeners: any;
|
|
14
|
+
queue: any[];
|
|
15
|
+
register(stateDecl: any): StateObject;
|
|
16
|
+
flush(): any;
|
|
17
|
+
attachRoute(state: any): void;
|
|
18
|
+
}
|
|
19
|
+
import { StateObject } from "./state-object";
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A registry for all of the application's [[StateDeclaration]]s
|
|
3
|
+
*
|
|
4
|
+
* This API is found at `$stateRegistry` ([[UIRouter.stateRegistry]])
|
|
5
|
+
*/
|
|
6
|
+
export class StateRegistry {
|
|
7
|
+
static $inject: string[];
|
|
8
|
+
constructor(
|
|
9
|
+
urlService: any,
|
|
10
|
+
stateService: any,
|
|
11
|
+
globals: any,
|
|
12
|
+
viewService: any,
|
|
13
|
+
);
|
|
14
|
+
states: {};
|
|
15
|
+
urlService: any;
|
|
16
|
+
urlServiceRules: any;
|
|
17
|
+
$injector: any;
|
|
18
|
+
listeners: any[];
|
|
19
|
+
matcher: StateMatcher;
|
|
20
|
+
builder: StateBuilder;
|
|
21
|
+
stateQueue: StateQueueManager;
|
|
22
|
+
$get: (string | (($injector: any) => this))[];
|
|
23
|
+
/**
|
|
24
|
+
* This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,
|
|
25
|
+
* `onRetain` callback hooks on a [[Ng1StateDeclaration]].
|
|
26
|
+
*
|
|
27
|
+
* When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder
|
|
28
|
+
* ensures that those hooks are injectable for @uirouter/angularjs (ng1).
|
|
29
|
+
*
|
|
30
|
+
* @internalapi
|
|
31
|
+
*/
|
|
32
|
+
getStateHookBuilder(
|
|
33
|
+
hookName: any,
|
|
34
|
+
): (stateObject: any) => (trans: any, state: any) => any;
|
|
35
|
+
_registerRoot(): void;
|
|
36
|
+
_root: import("./state-object").StateObject;
|
|
37
|
+
/**
|
|
38
|
+
* Listen for a State Registry events
|
|
39
|
+
*
|
|
40
|
+
* Adds a callback that is invoked when states are registered or deregistered with the StateRegistry.
|
|
41
|
+
*
|
|
42
|
+
* #### Example:
|
|
43
|
+
* ```js
|
|
44
|
+
* let allStates = registry.get();
|
|
45
|
+
*
|
|
46
|
+
* // Later, invoke deregisterFn() to remove the listener
|
|
47
|
+
* let deregisterFn = registry.onStatesChanged((event, states) => {
|
|
48
|
+
* switch(event) {
|
|
49
|
+
* case: 'registered':
|
|
50
|
+
* states.forEach(state => allStates.push(state));
|
|
51
|
+
* break;
|
|
52
|
+
* case: 'deregistered':
|
|
53
|
+
* states.forEach(state => {
|
|
54
|
+
* let idx = allStates.indexOf(state);
|
|
55
|
+
* if (idx !== -1) allStates.splice(idx, 1);
|
|
56
|
+
* });
|
|
57
|
+
* break;
|
|
58
|
+
* }
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @param listener a callback function invoked when the registered states changes.
|
|
63
|
+
* The function receives two parameters, `event` and `state`.
|
|
64
|
+
* See [[StateRegistryListener]]
|
|
65
|
+
* @return a function that deregisters the listener
|
|
66
|
+
*/
|
|
67
|
+
onStatesChanged(listener: any): any;
|
|
68
|
+
/**
|
|
69
|
+
* Gets the implicit root state
|
|
70
|
+
*
|
|
71
|
+
* Gets the root of the state tree.
|
|
72
|
+
* The root state is implicitly created by ng-router.
|
|
73
|
+
* Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]]
|
|
74
|
+
*
|
|
75
|
+
* @return the root [[StateObject]]
|
|
76
|
+
*/
|
|
77
|
+
root(): import("./state-object").StateObject;
|
|
78
|
+
/**
|
|
79
|
+
* Adds a state to the registry
|
|
80
|
+
*
|
|
81
|
+
* Registers a [[StateDeclaration]] or queues it for registration.
|
|
82
|
+
*
|
|
83
|
+
* Note: a state will be queued if the state's parent isn't yet registered.
|
|
84
|
+
*
|
|
85
|
+
* @param stateDefinition the definition of the state to register.
|
|
86
|
+
* @returns the internal [[StateObject]] object.
|
|
87
|
+
* If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]).
|
|
88
|
+
* If the state was only queued, then the object is not fully built.
|
|
89
|
+
*/
|
|
90
|
+
register(stateDefinition: any): import("./state-object").StateObject;
|
|
91
|
+
_deregisterTree(state: any): any[];
|
|
92
|
+
/**
|
|
93
|
+
* Removes a state from the registry
|
|
94
|
+
*
|
|
95
|
+
* This removes a state from the registry.
|
|
96
|
+
* If the state has children, they are are also removed from the registry.
|
|
97
|
+
*
|
|
98
|
+
* @param stateOrName the state's name or object representation
|
|
99
|
+
* @returns {StateObject[]} a list of removed states
|
|
100
|
+
*/
|
|
101
|
+
deregister(stateOrName: any): StateObject[];
|
|
102
|
+
get(stateOrName: any, base: any, ...args: any[]): any;
|
|
103
|
+
/**
|
|
104
|
+
* Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`).
|
|
105
|
+
* More than one BuilderFunction can be registered for a given property.
|
|
106
|
+
*
|
|
107
|
+
* The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects.
|
|
108
|
+
*
|
|
109
|
+
* @param property The name of the State property being registered for.
|
|
110
|
+
* @param builderFunction The BuilderFunction which will be used to build the State property
|
|
111
|
+
* @returns a function which deregisters the BuilderFunction
|
|
112
|
+
*/
|
|
113
|
+
decorator(property: any, builderFunction: any): any;
|
|
114
|
+
}
|
|
115
|
+
export function getLocals(ctx: any): any;
|
|
116
|
+
import { StateMatcher } from "./state-matcher";
|
|
117
|
+
import { StateBuilder } from "./state-builder";
|
|
118
|
+
import { StateQueueManager } from "./state-queue-manager";
|