@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,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a string shortened to a maximum length
|
|
3
|
+
*
|
|
4
|
+
* If the string is already less than the `max` length, return the string.
|
|
5
|
+
* Else return the string, shortened to `max - 3` and append three dots ("...").
|
|
6
|
+
*
|
|
7
|
+
* @param max the maximum length of the string to return
|
|
8
|
+
* @param str the input string
|
|
9
|
+
*/
|
|
10
|
+
export function maxLength(max: any, str: any): any;
|
|
11
|
+
/**
|
|
12
|
+
* Returns a string, with spaces added to the end, up to a desired str length
|
|
13
|
+
*
|
|
14
|
+
* If the string is already longer than the desired length, return the string.
|
|
15
|
+
* Else returns the string, with extra spaces on the end, such that it reaches `length` characters.
|
|
16
|
+
*
|
|
17
|
+
* @param length the desired length of the string to return
|
|
18
|
+
* @param str the input string
|
|
19
|
+
*/
|
|
20
|
+
export function padString(length: any, str: any): any;
|
|
21
|
+
export function kebobString(camelCase: any): any;
|
|
22
|
+
export function functionToString(fn: any): any;
|
|
23
|
+
export function fnToString(fn: any): any;
|
|
24
|
+
export function stringify(o: any): any;
|
|
25
|
+
/**
|
|
26
|
+
* Splits on a delimiter, but returns the delimiters in the array
|
|
27
|
+
*
|
|
28
|
+
* #### Example:
|
|
29
|
+
* ```js
|
|
30
|
+
* var splitOnSlashes = splitOnDelim('/');
|
|
31
|
+
* splitOnSlashes("/foo"); // ["/", "foo"]
|
|
32
|
+
* splitOnSlashes("/foo/"); // ["/", "foo", "/"]
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export function splitOnDelim(delim: any): (str: any) => any;
|
|
36
|
+
/**
|
|
37
|
+
* Reduce fn that joins neighboring strings
|
|
38
|
+
*
|
|
39
|
+
* Given an array of strings, returns a new array
|
|
40
|
+
* where all neighboring strings have been joined.
|
|
41
|
+
*
|
|
42
|
+
* #### Example:
|
|
43
|
+
* ```js
|
|
44
|
+
* let arr = ["foo", "bar", 1, "baz", "", "qux" ];
|
|
45
|
+
* arr.reduce(joinNeighborsR, []) // ["foobar", 1, "bazqux" ]
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export function joinNeighborsR(acc: any, x: any): any;
|
|
49
|
+
export function beforeAfterSubstr(char: any): (str: any) => any[];
|
|
50
|
+
export const hostRegex: RegExp;
|
|
51
|
+
export function stripLastPathElement(str: any): any;
|
|
52
|
+
export function splitHash(str: any): any[];
|
|
53
|
+
export function splitQuery(str: any): any[];
|
|
54
|
+
export function splitEqual(str: any): any[];
|
|
55
|
+
export function trimHashVal(str: any): any;
|
|
@@ -0,0 +1,630 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A consistent way of creating unique IDs in angular.
|
|
3
|
+
*
|
|
4
|
+
* Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before
|
|
5
|
+
* we hit number precision issues in JavaScript.
|
|
6
|
+
*
|
|
7
|
+
* Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M
|
|
8
|
+
*
|
|
9
|
+
* @returns {number} an unique alpha-numeric string
|
|
10
|
+
*/
|
|
11
|
+
export function nextUid(): number;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @description Converts the specified string to lowercase.
|
|
15
|
+
* @param {string} string String to be converted to lowercase.
|
|
16
|
+
* @returns {string} Lowercased string.
|
|
17
|
+
*/
|
|
18
|
+
export function lowercase(string: string): string;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @description Converts the specified string to uppercase.
|
|
22
|
+
* @param {string} string String to be converted to uppercase.
|
|
23
|
+
* @returns {string} Uppercased string.
|
|
24
|
+
*/
|
|
25
|
+
export function uppercase(string: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* @param {*} obj
|
|
28
|
+
* @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,
|
|
29
|
+
* String ...)
|
|
30
|
+
*/
|
|
31
|
+
export function isArrayLike(obj: any): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* @module angular
|
|
34
|
+
* @function isUndefined
|
|
35
|
+
*
|
|
36
|
+
* @description
|
|
37
|
+
* Determines if a reference is undefined.
|
|
38
|
+
*
|
|
39
|
+
* @param {*} value Reference to check.
|
|
40
|
+
* @returns {boolean} True if `value` is undefined.
|
|
41
|
+
*/
|
|
42
|
+
export function isUndefined(value: any): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* @module angular
|
|
45
|
+
* @function isDefined
|
|
46
|
+
*
|
|
47
|
+
* @description
|
|
48
|
+
* Determines if a reference is defined.
|
|
49
|
+
*
|
|
50
|
+
* @param {*} value Reference to check.
|
|
51
|
+
* @returns {boolean} True if `value` is defined.
|
|
52
|
+
*/
|
|
53
|
+
export function isDefined(value: any): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* @module angular
|
|
56
|
+
* @function isObject
|
|
57
|
+
*
|
|
58
|
+
* @description
|
|
59
|
+
* Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
|
|
60
|
+
* considered to be objects. Note that JavaScript arrays are objects.
|
|
61
|
+
*
|
|
62
|
+
* @param {*} value Reference to check.
|
|
63
|
+
* @returns {boolean} True if `value` is an `Object` but not `null`.
|
|
64
|
+
*/
|
|
65
|
+
export function isObject(value: any): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Determine if a value is an object with a null prototype
|
|
68
|
+
*
|
|
69
|
+
* @returns {boolean} True if `value` is an `Object` with a null prototype
|
|
70
|
+
*/
|
|
71
|
+
export function isBlankObject(value: any): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* @module angular
|
|
74
|
+
* @function isString
|
|
75
|
+
*
|
|
76
|
+
* @description
|
|
77
|
+
* Determines if a reference is a `String`.
|
|
78
|
+
*
|
|
79
|
+
* @param {*} value Reference to check.
|
|
80
|
+
* @returns {boolean} True if `value` is a `String`.
|
|
81
|
+
*/
|
|
82
|
+
export function isString(value: any): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* @module angular
|
|
85
|
+
* @function isNumber
|
|
86
|
+
*
|
|
87
|
+
* @description
|
|
88
|
+
* Determines if a reference is a `Number`.
|
|
89
|
+
*
|
|
90
|
+
* This includes the "special" numbers `NaN`, `+Infinity` and `-Infinity`.
|
|
91
|
+
*
|
|
92
|
+
* If you wish to exclude these then you can use the native
|
|
93
|
+
* [`isFinite'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite)
|
|
94
|
+
* method.
|
|
95
|
+
*
|
|
96
|
+
* @param {*} value Reference to check.
|
|
97
|
+
* @returns {boolean} True if `value` is a `Number`.
|
|
98
|
+
*/
|
|
99
|
+
export function isNumber(value: any): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* @module angular
|
|
102
|
+
* @function isDate
|
|
103
|
+
*
|
|
104
|
+
* @description
|
|
105
|
+
* Determines if a value is a date.
|
|
106
|
+
*
|
|
107
|
+
* @param {*} value Reference to check.
|
|
108
|
+
* @returns {boolean} True if `value` is a `Date`.
|
|
109
|
+
*/
|
|
110
|
+
export function isDate(value: any): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* @description
|
|
113
|
+
* Determines if a reference is an `Error`.
|
|
114
|
+
* Loosely based on https://www.npmjs.com/package/iserror
|
|
115
|
+
*
|
|
116
|
+
* @param {*} value Reference to check.
|
|
117
|
+
* @returns {boolean} True if `value` is an `Error`.
|
|
118
|
+
*/
|
|
119
|
+
export function isError(value: any): boolean;
|
|
120
|
+
/**
|
|
121
|
+
* @module angular
|
|
122
|
+
* @function isFunction
|
|
123
|
+
|
|
124
|
+
* @function
|
|
125
|
+
*
|
|
126
|
+
* @description
|
|
127
|
+
* Determines if a reference is a `Function`.
|
|
128
|
+
*
|
|
129
|
+
* @param {*} value Reference to check.
|
|
130
|
+
* @returns {boolean} True if `value` is a `Function`.
|
|
131
|
+
*/
|
|
132
|
+
export function isFunction(value: any): boolean;
|
|
133
|
+
/**
|
|
134
|
+
* Determines if a value is a regular expression object.
|
|
135
|
+
*
|
|
136
|
+
* @private
|
|
137
|
+
* @param {*} value Reference to check.
|
|
138
|
+
* @returns {boolean} True if `value` is a `RegExp`.
|
|
139
|
+
*/
|
|
140
|
+
export function isRegExp(value: any): boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Checks if `obj` is a window object.
|
|
143
|
+
*
|
|
144
|
+
* @private
|
|
145
|
+
* @param {*} obj Object to check
|
|
146
|
+
* @returns {boolean} True if `obj` is a window obj.
|
|
147
|
+
*/
|
|
148
|
+
export function isWindow(obj: any): boolean;
|
|
149
|
+
/**
|
|
150
|
+
* @param {*} obj
|
|
151
|
+
* @returns {boolean}
|
|
152
|
+
*/
|
|
153
|
+
export function isScope(obj: any): boolean;
|
|
154
|
+
/**
|
|
155
|
+
* @param {*} obj
|
|
156
|
+
* @returns {boolean}
|
|
157
|
+
*/
|
|
158
|
+
export function isFile(obj: any): boolean;
|
|
159
|
+
/**
|
|
160
|
+
* @param {*} obj
|
|
161
|
+
* @returns {boolean}
|
|
162
|
+
*/
|
|
163
|
+
export function isFormData(obj: any): boolean;
|
|
164
|
+
/**
|
|
165
|
+
* @param {*} obj
|
|
166
|
+
* @returns {boolean}
|
|
167
|
+
*/
|
|
168
|
+
export function isBlob(obj: any): boolean;
|
|
169
|
+
/**
|
|
170
|
+
* @param {*} value
|
|
171
|
+
* @returns {boolean}
|
|
172
|
+
*/
|
|
173
|
+
export function isBoolean(value: any): boolean;
|
|
174
|
+
/**
|
|
175
|
+
* @param {*} obj
|
|
176
|
+
* @returns {boolean}
|
|
177
|
+
*/
|
|
178
|
+
export function isPromiseLike(obj: any): boolean;
|
|
179
|
+
/**
|
|
180
|
+
* @param {*} value
|
|
181
|
+
* @returns {boolean}
|
|
182
|
+
*/
|
|
183
|
+
export function isTypedArray(value: any): boolean;
|
|
184
|
+
/**
|
|
185
|
+
* @param {*} obj
|
|
186
|
+
* @returns {boolean}
|
|
187
|
+
*/
|
|
188
|
+
export function isArrayBuffer(obj: any): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* @param {*} value
|
|
191
|
+
* @returns {string | *}
|
|
192
|
+
*/
|
|
193
|
+
export function trim(value: any): string | any;
|
|
194
|
+
export function snakeCase(name: any, separator: any): any;
|
|
195
|
+
/**
|
|
196
|
+
* @module angular
|
|
197
|
+
* @function forEach
|
|
198
|
+
*
|
|
199
|
+
* @description
|
|
200
|
+
* Invokes the `iterator` function once for each item in `obj` collection, which can be either an
|
|
201
|
+
* object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`
|
|
202
|
+
* is the value of an object property or an array element, `key` is the object property key or
|
|
203
|
+
* array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.
|
|
204
|
+
*
|
|
205
|
+
* It is worth noting that `.forEach` does not iterate over inherited properties because it filters
|
|
206
|
+
* using the `hasOwnProperty` method.
|
|
207
|
+
*
|
|
208
|
+
* Unlike ES262's
|
|
209
|
+
* [Array.prototype.forEach](http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.18),
|
|
210
|
+
* providing 'undefined' or 'null' values for `obj` will not throw a TypeError, but rather just
|
|
211
|
+
* return the value provided.
|
|
212
|
+
*
|
|
213
|
+
```js
|
|
214
|
+
let values = {name: 'misko', gender: 'male'};
|
|
215
|
+
let log = [];
|
|
216
|
+
angular.forEach(values, function(value, key) {
|
|
217
|
+
this.push(key + ': ' + value);
|
|
218
|
+
}, log);
|
|
219
|
+
expect(log).toEqual(['name: misko', 'gender: male']);
|
|
220
|
+
```
|
|
221
|
+
*
|
|
222
|
+
* @param {Object|Array} obj Object to iterate over.
|
|
223
|
+
* @param {Function} iterator Iterator function.
|
|
224
|
+
* @param {Object=} context Object to become context (`this`) for the iterator function.
|
|
225
|
+
* @returns {Object|Array} Reference to `obj`.
|
|
226
|
+
*/
|
|
227
|
+
export function forEach(
|
|
228
|
+
obj: any | any[],
|
|
229
|
+
iterator: Function,
|
|
230
|
+
context?: any | undefined,
|
|
231
|
+
): any | any[];
|
|
232
|
+
export function forEachSorted(obj: any, iterator: any, context: any): string[];
|
|
233
|
+
/**
|
|
234
|
+
* when using forEach the params are value, key, but it is often useful to have key, value.
|
|
235
|
+
* @param {function(string, *)} iteratorFn
|
|
236
|
+
* @returns {function(*, string)}
|
|
237
|
+
*/
|
|
238
|
+
export function reverseParams(
|
|
239
|
+
iteratorFn: (arg0: string, arg1: any) => any,
|
|
240
|
+
): (arg0: any, arg1: string) => any;
|
|
241
|
+
/**
|
|
242
|
+
* Set or clear the hashkey for an object.
|
|
243
|
+
* @param obj object
|
|
244
|
+
* @param h the hashkey (!truthy to delete the hashkey)
|
|
245
|
+
*/
|
|
246
|
+
export function setHashKey(obj: any, h: any): void;
|
|
247
|
+
export function baseExtend(dst: any, objs: any, deep: any): any;
|
|
248
|
+
/**
|
|
249
|
+
* @module angular
|
|
250
|
+
* @function extend
|
|
251
|
+
|
|
252
|
+
* @function
|
|
253
|
+
*
|
|
254
|
+
* @description
|
|
255
|
+
* Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
|
|
256
|
+
* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so
|
|
257
|
+
* by passing an empty object as the target: `let object = angular.extend({}, object1, object2)`.
|
|
258
|
+
*
|
|
259
|
+
* **Note:** Keep in mind that `angular.extend` does not support recursive merge (deep copy). Use
|
|
260
|
+
* {@link angular.merge} for this.
|
|
261
|
+
*
|
|
262
|
+
* @param {Object} dst Destination object.
|
|
263
|
+
* @param {...Object} src Source object(s).
|
|
264
|
+
* @returns {Object} Reference to `dst`.
|
|
265
|
+
*/
|
|
266
|
+
export function extend(dst: any, ...args: any[]): any;
|
|
267
|
+
/**
|
|
268
|
+
* @module angular
|
|
269
|
+
* @function merge
|
|
270
|
+
|
|
271
|
+
* @function
|
|
272
|
+
*
|
|
273
|
+
* @description
|
|
274
|
+
* Deeply extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
|
|
275
|
+
* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so
|
|
276
|
+
* by passing an empty object as the target: `let object = angular.merge({}, object1, object2)`.
|
|
277
|
+
*
|
|
278
|
+
* Unlike {@link angular.extend extend()}, `merge()` recursively descends into object properties of source
|
|
279
|
+
* objects, performing a deep copy.
|
|
280
|
+
*
|
|
281
|
+
* @deprecated
|
|
282
|
+
* sinceVersion="1.6.5"
|
|
283
|
+
* This function is deprecated, but will not be removed in the 1.x lifecycle.
|
|
284
|
+
* There are edge cases (see {@link angular.merge#known-issues known issues}) that are not
|
|
285
|
+
* supported by this function. We suggest using another, similar library for all-purpose merging,
|
|
286
|
+
* such as [lodash's merge()](https://lodash.com/docs/4.17.4#merge).
|
|
287
|
+
*
|
|
288
|
+
* @knownIssue
|
|
289
|
+
* This is a list of (known) object types that are not handled correctly by this function:
|
|
290
|
+
* - [`Blob`](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
291
|
+
* - [`MediaStream`](https://developer.mozilla.org/docs/Web/API/MediaStream)
|
|
292
|
+
* - [`CanvasGradient`](https://developer.mozilla.org/docs/Web/API/CanvasGradient)
|
|
293
|
+
* - AngularJS {@link $rootScope.Scope scopes};
|
|
294
|
+
*
|
|
295
|
+
* `angular.merge` also does not support merging objects with circular references.
|
|
296
|
+
*
|
|
297
|
+
* @param {Object} dst Destination object.
|
|
298
|
+
* @param {...Object} src Source object(s).
|
|
299
|
+
* @returns {Object} Reference to `dst`.
|
|
300
|
+
*/
|
|
301
|
+
export function merge(dst: any, ...args: any[]): any;
|
|
302
|
+
export function toInt(str: any): number;
|
|
303
|
+
export function isNumberNaN(num: any): boolean;
|
|
304
|
+
export function inherit(parent: any, extra: any): any;
|
|
305
|
+
/**
|
|
306
|
+
* @module angular
|
|
307
|
+
* @function identity
|
|
308
|
+
|
|
309
|
+
* @function
|
|
310
|
+
*
|
|
311
|
+
* @description
|
|
312
|
+
* A function that returns its first argument. This function is useful when writing code in the
|
|
313
|
+
* functional style.
|
|
314
|
+
*
|
|
315
|
+
```js
|
|
316
|
+
function transformer(transformationFn, value) {
|
|
317
|
+
return (transformationFn || angular.identity)(value);
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
// E.g.
|
|
321
|
+
function getResult(fn, input) {
|
|
322
|
+
return (fn || angular.identity)(input);
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
getResult(function(n) { return n * 2; }, 21); // returns 42
|
|
326
|
+
getResult(null, 21); // returns 21
|
|
327
|
+
getResult(undefined, 21); // returns 21
|
|
328
|
+
```
|
|
329
|
+
*
|
|
330
|
+
* @param {*} value to be returned.
|
|
331
|
+
* @returns {*} the value passed in.
|
|
332
|
+
*/
|
|
333
|
+
export function identity(value: any): any;
|
|
334
|
+
/**
|
|
335
|
+
* @param {*} value
|
|
336
|
+
* @returns {() => *}
|
|
337
|
+
*/
|
|
338
|
+
export function valueFn(value: any): () => any;
|
|
339
|
+
export function hasCustomToString(obj: any): boolean;
|
|
340
|
+
/**
|
|
341
|
+
* @module angular
|
|
342
|
+
* @function isElement
|
|
343
|
+
|
|
344
|
+
* @function
|
|
345
|
+
*
|
|
346
|
+
* @description
|
|
347
|
+
* Determines if a reference is a DOM element (or wrapped jQuery element).
|
|
348
|
+
*
|
|
349
|
+
* @param {*} node Reference to check.
|
|
350
|
+
* @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
|
|
351
|
+
*/
|
|
352
|
+
export function isElement(node: any): boolean;
|
|
353
|
+
export function nodeName_(element: any): string;
|
|
354
|
+
export function includes(array: any, obj: any): boolean;
|
|
355
|
+
/**
|
|
356
|
+
* Removes the first occurrence of a specified value from an array.
|
|
357
|
+
*
|
|
358
|
+
* @template T
|
|
359
|
+
* @param {Array<T>} array - The array from which to remove the value.
|
|
360
|
+
* @param {T} value - The value to remove.
|
|
361
|
+
* @returns {number} - The index of the removed value, or -1 if the value was not found.
|
|
362
|
+
*/
|
|
363
|
+
export function arrayRemove<T>(array: T[], value: T): number;
|
|
364
|
+
export function simpleCompare(a: any, b: any): boolean;
|
|
365
|
+
/**
|
|
366
|
+
* @module angular
|
|
367
|
+
* @function equals
|
|
368
|
+
|
|
369
|
+
* @function
|
|
370
|
+
*
|
|
371
|
+
* @description
|
|
372
|
+
* Determines if two objects or two values are equivalent. Supports value types, regular
|
|
373
|
+
* expressions, arrays and objects.
|
|
374
|
+
*
|
|
375
|
+
* Two objects or values are considered equivalent if at least one of the following is true:
|
|
376
|
+
*
|
|
377
|
+
* * Both objects or values pass `===` comparison.
|
|
378
|
+
* * Both objects or values are of the same type and all of their properties are equal by
|
|
379
|
+
* comparing them with `angular.equals`.
|
|
380
|
+
* * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)
|
|
381
|
+
* * Both values represent the same regular expression (In JavaScript,
|
|
382
|
+
* /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual
|
|
383
|
+
* representation matches).
|
|
384
|
+
*
|
|
385
|
+
* During a property comparison, properties of `function` type and properties with names
|
|
386
|
+
* that begin with `$` are ignored.
|
|
387
|
+
*
|
|
388
|
+
* Scope and DOMWindow objects are being compared only by identify (`===`).
|
|
389
|
+
*
|
|
390
|
+
* @param {*} o1 Object or value to compare.
|
|
391
|
+
* @param {*} o2 Object or value to compare.
|
|
392
|
+
* @returns {boolean} True if arguments are equal.
|
|
393
|
+
*
|
|
394
|
+
* @example
|
|
395
|
+
<example module="equalsExample" name="equalsExample">
|
|
396
|
+
<file name="index.html">
|
|
397
|
+
<div ng-controller="ExampleController">
|
|
398
|
+
<form novalidate>
|
|
399
|
+
<h3>User 1</h3>
|
|
400
|
+
Name: <input type="text" ng-model="user1.name">
|
|
401
|
+
Age: <input type="number" ng-model="user1.age">
|
|
402
|
+
|
|
403
|
+
<h3>User 2</h3>
|
|
404
|
+
Name: <input type="text" ng-model="user2.name">
|
|
405
|
+
Age: <input type="number" ng-model="user2.age">
|
|
406
|
+
|
|
407
|
+
<div>
|
|
408
|
+
<br/>
|
|
409
|
+
<input type="button" value="Compare" ng-click="compare()">
|
|
410
|
+
</div>
|
|
411
|
+
User 1: <pre>{{user1 | json}}</pre>
|
|
412
|
+
User 2: <pre>{{user2 | json}}</pre>
|
|
413
|
+
Equal: <pre>{{result}}</pre>
|
|
414
|
+
</form>
|
|
415
|
+
</div>
|
|
416
|
+
</file>
|
|
417
|
+
<file name="script.js">
|
|
418
|
+
angular.module('equalsExample', []).controller('ExampleController', ['$scope', function($scope) {
|
|
419
|
+
$scope.user1 = {};
|
|
420
|
+
$scope.user2 = {};
|
|
421
|
+
$scope.compare = function() {
|
|
422
|
+
$scope.result = angular.equals($scope.user1, $scope.user2);
|
|
423
|
+
};
|
|
424
|
+
}]);
|
|
425
|
+
</file>
|
|
426
|
+
</example>
|
|
427
|
+
*/
|
|
428
|
+
export function equals(o1: any, o2: any): boolean;
|
|
429
|
+
export function csp(): any;
|
|
430
|
+
/**
|
|
431
|
+
* throw error if the name given is hasOwnProperty
|
|
432
|
+
* @param {String} name the name to test
|
|
433
|
+
* @param {String} context the context in which the name is used, such as module or directive
|
|
434
|
+
*/
|
|
435
|
+
export function assertNotHasOwnProperty(name: string, context: string): void;
|
|
436
|
+
/**
|
|
437
|
+
* Return the value accessible from the object by path. Any undefined traversals are ignored
|
|
438
|
+
* @param {Object} obj starting object
|
|
439
|
+
* @param {String} path path to traverse
|
|
440
|
+
* @param {boolean} [bindFnToScope=true]
|
|
441
|
+
* @returns {Object} value as accessible by path
|
|
442
|
+
*/
|
|
443
|
+
export function getter(obj: any, path: string, bindFnToScope?: boolean): any;
|
|
444
|
+
export function stringify(value: any): any;
|
|
445
|
+
/**
|
|
446
|
+
* @param {Number} maxDepth
|
|
447
|
+
* @return {boolean}
|
|
448
|
+
*/
|
|
449
|
+
export function isValidObjectMaxDepth(maxDepth: number): boolean;
|
|
450
|
+
export function concat(array1: any, array2: any, index: any): any;
|
|
451
|
+
export function sliceArgs(args: any, startIndex: any): any;
|
|
452
|
+
/**
|
|
453
|
+
* @module angular
|
|
454
|
+
* @function bind
|
|
455
|
+
|
|
456
|
+
* @function
|
|
457
|
+
*
|
|
458
|
+
* @description
|
|
459
|
+
* Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
|
|
460
|
+
* `fn`). You can supply optional `args` that are prebound to the function. This feature is also
|
|
461
|
+
* known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as
|
|
462
|
+
* distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).
|
|
463
|
+
*
|
|
464
|
+
* @param {Object} context Context which `fn` should be evaluated in.
|
|
465
|
+
* @param {*} fn Function to be bound.
|
|
466
|
+
* @returns {Function} Function that wraps the `fn` with all the specified bindings.
|
|
467
|
+
*/
|
|
468
|
+
export function bind(context: any, fn: any, ...args: any[]): Function;
|
|
469
|
+
/**
|
|
470
|
+
* @module angular
|
|
471
|
+
* @function toJson
|
|
472
|
+
*
|
|
473
|
+
* @description
|
|
474
|
+
* Serializes input into a JSON-formatted string. Properties with leading $$ characters will be
|
|
475
|
+
* stripped since AngularJS uses this notation internally.
|
|
476
|
+
*
|
|
477
|
+
* @param {Object|Array|Date|string|number|boolean} obj Input to be serialized into JSON.
|
|
478
|
+
* @param {boolean|number} [pretty=2] If set to true, the JSON output will contain newlines and whitespace.
|
|
479
|
+
* If set to an integer, the JSON output will contain that many spaces per indentation.
|
|
480
|
+
* @returns {string|undefined} JSON-ified string representing `obj`.
|
|
481
|
+
* @knownIssue
|
|
482
|
+
*
|
|
483
|
+
* The Safari browser throws a `RangeError` instead of returning `null` when it tries to stringify a `Date`
|
|
484
|
+
* object with an invalid date value. The only reliable way to prevent this is to monkeypatch the
|
|
485
|
+
* `Date.prototype.toJSON` method as follows:
|
|
486
|
+
*
|
|
487
|
+
* ```
|
|
488
|
+
* let _DatetoJSON = Date.prototype.toJSON;
|
|
489
|
+
* Date.prototype.toJSON = function() {
|
|
490
|
+
* try {
|
|
491
|
+
* return _DatetoJSON.call(this);
|
|
492
|
+
* } catch(e) {
|
|
493
|
+
* if (e instanceof RangeError) {
|
|
494
|
+
* return null;
|
|
495
|
+
* }
|
|
496
|
+
* throw e;
|
|
497
|
+
* }
|
|
498
|
+
* };
|
|
499
|
+
* ```
|
|
500
|
+
*
|
|
501
|
+
* See https://github.com/angular/angular.js/pull/14221 for more information.
|
|
502
|
+
*/
|
|
503
|
+
export function toJson(
|
|
504
|
+
obj: any | any[] | Date | string | number | boolean,
|
|
505
|
+
pretty?: boolean | number,
|
|
506
|
+
): string | undefined;
|
|
507
|
+
/**
|
|
508
|
+
* @module angular
|
|
509
|
+
* @function fromJson
|
|
510
|
+
*
|
|
511
|
+
* @description
|
|
512
|
+
* Deserializes a JSON string.
|
|
513
|
+
*
|
|
514
|
+
* @param {string} json JSON string to deserialize.
|
|
515
|
+
* @returns {Object|Array|string|number} Deserialized JSON string.
|
|
516
|
+
*/
|
|
517
|
+
export function fromJson(json: string): any | any[] | string | number;
|
|
518
|
+
export function timezoneToOffset(timezone: any, fallback: any): any;
|
|
519
|
+
export function addDateMinutes(date: any, minutes: any): Date;
|
|
520
|
+
export function convertTimezoneToLocal(
|
|
521
|
+
date: any,
|
|
522
|
+
timezone: any,
|
|
523
|
+
reverse: any,
|
|
524
|
+
): Date;
|
|
525
|
+
/**
|
|
526
|
+
* Parses an escaped url query string into key-value pairs.
|
|
527
|
+
* @param {string} keyValue
|
|
528
|
+
* @returns {Object.<string,boolean|Array>}
|
|
529
|
+
*/
|
|
530
|
+
export function parseKeyValue(keyValue: string): {
|
|
531
|
+
[x: string]: boolean | any[];
|
|
532
|
+
};
|
|
533
|
+
export function toKeyValue(obj: any): string;
|
|
534
|
+
/**
|
|
535
|
+
* Tries to decode the URI component without throwing an exception.
|
|
536
|
+
*
|
|
537
|
+
* @param {string} value potential URI component to check.
|
|
538
|
+
* @returns {string}
|
|
539
|
+
*/
|
|
540
|
+
export function tryDecodeURIComponent(value: string): string;
|
|
541
|
+
/**
|
|
542
|
+
* We need our custom method because encodeURIComponent is too aggressive and doesn't follow
|
|
543
|
+
* http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
|
|
544
|
+
* segments:
|
|
545
|
+
* segment = *pchar
|
|
546
|
+
* pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
|
|
547
|
+
* pct-encoded = "%" HEXDIG HEXDIG
|
|
548
|
+
* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
|
549
|
+
* sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
|
|
550
|
+
* / "*" / "+" / "," / ";" / "="
|
|
551
|
+
*/
|
|
552
|
+
export function encodeUriSegment(val: any): string;
|
|
553
|
+
/**
|
|
554
|
+
* This method is intended for encoding *key* or *value* parts of query component. We need a custom
|
|
555
|
+
* method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
|
|
556
|
+
* encoded per http://tools.ietf.org/html/rfc3986:
|
|
557
|
+
* query = *( pchar / "/" / "?" )
|
|
558
|
+
* pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
|
|
559
|
+
* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
|
560
|
+
* pct-encoded = "%" HEXDIG HEXDIG
|
|
561
|
+
* sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
|
|
562
|
+
* / "*" / "+" / "," / ";" / "="
|
|
563
|
+
*/
|
|
564
|
+
export function encodeUriQuery(val: any, pctEncodeSpaces: any): string;
|
|
565
|
+
export function getNgAttribute(element: any, ngAttr: any): any;
|
|
566
|
+
/**
|
|
567
|
+
* Creates a shallow copy of an object, an array or a primitive.
|
|
568
|
+
*
|
|
569
|
+
* Assumes that there are no proto properties for objects.
|
|
570
|
+
*/
|
|
571
|
+
export function shallowCopy(src: any, dst: any): any;
|
|
572
|
+
/**
|
|
573
|
+
* throw error if the argument is falsy.
|
|
574
|
+
*/
|
|
575
|
+
export function assertArg(arg: any, name: any, reason: any): any;
|
|
576
|
+
export function assertArgFn(
|
|
577
|
+
arg: any,
|
|
578
|
+
name: any,
|
|
579
|
+
acceptArrayAnnotation: any,
|
|
580
|
+
): any;
|
|
581
|
+
export function minErr(module: any): (...args: any[]) => Error;
|
|
582
|
+
export function toDebugString(obj: any): any;
|
|
583
|
+
/**
|
|
584
|
+
* Computes a hash of an 'obj'.
|
|
585
|
+
* Hash of a:
|
|
586
|
+
* string is string
|
|
587
|
+
* number is number as string
|
|
588
|
+
* object is either result of calling $$hashKey function on the object or uniquely generated id,
|
|
589
|
+
* that is also assigned to the $$hashKey property of the object.
|
|
590
|
+
*
|
|
591
|
+
* @param {*} obj
|
|
592
|
+
* @returns {string} hash string such that the same input will have the same hash string.
|
|
593
|
+
* The resulting string key is in 'type:hashKey' format.
|
|
594
|
+
*/
|
|
595
|
+
export function hashKey(obj: any): string;
|
|
596
|
+
export function mergeClasses(a: any, b: any): any;
|
|
597
|
+
/**
|
|
598
|
+
* Converts all accepted directives format into proper directive name.
|
|
599
|
+
* @param name Name to normalize
|
|
600
|
+
*/
|
|
601
|
+
export function directiveNormalize(name: any): any;
|
|
602
|
+
export const ngAttrPrefixes: string[];
|
|
603
|
+
/**
|
|
604
|
+
* @description
|
|
605
|
+
*
|
|
606
|
+
* This object provides a utility for producing rich Error messages within
|
|
607
|
+
* AngularJS. It can be called as follows:
|
|
608
|
+
*
|
|
609
|
+
* let exampleMinErr = minErr('example');
|
|
610
|
+
* throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
|
|
611
|
+
*
|
|
612
|
+
* The above creates an instance of minErr in the example namespace. The
|
|
613
|
+
* resulting error will have a namespaced error code of example.one. The
|
|
614
|
+
* resulting error will replace {0} with the value of foo, and {1} with the
|
|
615
|
+
* value of bar. The object is not restricted in the number of arguments it can
|
|
616
|
+
* take.
|
|
617
|
+
*
|
|
618
|
+
* If fewer arguments are specified than necessary for interpolation, the extra
|
|
619
|
+
* interpolation markers will be preserved in the final string.
|
|
620
|
+
*
|
|
621
|
+
* Since data will be parsed statically during a build step, some restrictions
|
|
622
|
+
* are applied with respect to how minErr instances are created and called.
|
|
623
|
+
* Instances should have names of the form namespaceMinErr for a minErr created
|
|
624
|
+
* using minErr('namespace'). Error codes, namespaces and template strings
|
|
625
|
+
* should all be static strings, not variables or general expressions.
|
|
626
|
+
*
|
|
627
|
+
* @param {string} module The namespace to use for the new minErr instance.
|
|
628
|
+
* @returns {function(string, string, ...*): Error} minErr instance
|
|
629
|
+
*/
|
|
630
|
+
export const minErrConfig: {};
|