@angular-wave/angular.ts 0.7.3 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.prettierignore +2 -1
- package/@types/core/exception-handler.d.ts +2 -2
- package/@types/core/task-tracker-factory.d.ts +2 -2
- package/@types/directive/channel/channel.d.ts +2 -18
- package/@types/directive/http/http.d.ts +3 -0
- package/@types/directive/script/script.d.ts +2 -2
- package/@types/directive/setter/setter.d.ts +2 -2
- package/@types/injection-tokens.d.ts +3 -0
- package/@types/interface.d.ts +11 -0
- package/@types/loader.d.ts +3 -4
- package/@types/router/params/param-factory.d.ts +10 -2
- package/@types/router/params/param.d.ts +22 -3
- package/@types/router/template-factory.d.ts +2 -2
- package/@types/router/url/url-service.d.ts +2 -2
- package/@types/services/http/http.d.ts +2 -2
- package/@types/services/http/interface.d.ts +219 -0
- package/@types/services/http-backend/http-backend.d.ts +26 -19
- package/@types/services/log/interface.d.ts +33 -0
- package/@types/services/log/log.d.ts +25 -0
- package/@types/{core → services}/pubsub/pubsub.d.ts +6 -6
- package/@types/services/template-cache/interface.d.ts +4 -0
- package/@types/services/template-cache/template-cache.d.ts +11 -0
- package/@types/services/template-request.d.ts +1 -1
- package/@types/shared/cache.d.ts +9 -0
- package/@types/shared/dom.d.ts +2 -2
- package/Makefile +2 -2
- package/dist/angular-ts.esm.js +168 -165
- package/dist/angular-ts.umd.js +168 -165
- package/dist/angular-ts.umd.min.js +1 -1
- package/docs/assets/scss/_variables_project.scss +1 -1
- package/docs/assets/scss/_variables_project_after_bs.scss +5 -5
- package/docs/assets/scss/index.scss +2 -3
- package/docs/content/_index.md +1 -1
- package/docs/content/docs/_index.md +59 -25
- package/docs/content/docs/directive/_index.md +4 -0
- package/docs/content/docs/directive/app.md +11 -0
- package/docs/content/docs/directive/aria.md +0 -0
- package/docs/content/docs/directive/blur.md +38 -0
- package/docs/content/docs/directive/channel.md +37 -0
- package/docs/content/docs/directive/class-even.md +47 -0
- package/docs/content/docs/directive/class-odd.md +48 -0
- package/docs/content/docs/directive/class.md +64 -0
- package/docs/content/docs/directive/click.md +38 -0
- package/docs/content/docs/directive/cloak.md +74 -0
- package/docs/content/docs/directive/copy.md +38 -0
- package/docs/content/docs/directive/cut.md +40 -0
- package/docs/content/docs/directive/dblclick.md +38 -0
- package/docs/content/docs/directive/focus.md +38 -0
- package/docs/content/docs/directive/include.md +7 -0
- package/docs/content/docs/directive/keydown.md +0 -0
- package/docs/content/docs/directive/keyup.md +0 -0
- package/docs/content/docs/directive/load.md +0 -0
- package/docs/content/docs/directive/mousedown.md +38 -0
- package/docs/content/docs/directive/mouseenter.md +38 -0
- package/docs/content/docs/directive/mouseleave.md +38 -0
- package/docs/content/docs/directive/mousemove.md +38 -0
- package/docs/content/docs/directive/mouseout.md +38 -0
- package/docs/content/docs/directive/mouseover.md +38 -0
- package/docs/content/docs/directive/mouseup.md +38 -0
- package/docs/content/docs/filter/_index.md +4 -0
- package/docs/content/docs/provider/_index.md +4 -0
- package/docs/content/docs/provider/eventBusProvider.md +35 -0
- package/docs/content/docs/provider/logProvider.md +59 -0
- package/docs/content/docs/provider/templateCacheProvider.md +35 -0
- package/docs/content/docs/service/_index.md +4 -0
- package/docs/content/docs/service/eventBus.md +56 -0
- package/docs/content/docs/service/log.md +113 -0
- package/docs/content/docs/service/templateCache.md +64 -0
- package/docs/hugo.yaml +3 -3
- package/docs/layouts/404.html +1 -1
- package/docs/layouts/partials/hooks/head-end.html +3 -0
- package/docs/layouts/shortcodes/showhtml.html +2 -0
- package/docs/layouts/shortcodes/showjs.html +2 -0
- package/docs/layouts/shortcodes/showraw.html +1 -0
- package/docs/static/examples/counter/counter-test.html +17 -0
- package/docs/static/examples/counter/counter.html +5 -0
- package/docs/static/examples/counter/counter.test.js +28 -0
- package/docs/static/examples/eventbus/eventbus-test.html +19 -0
- package/docs/static/examples/eventbus/eventbus.html +13 -0
- package/docs/static/examples/eventbus/eventbus.js +15 -0
- package/docs/static/examples/eventbus/eventbus.test.js +19 -0
- package/docs/static/examples/ng-blur/ng-blur.html +9 -0
- package/docs/static/examples/ng-channel/ng-channel-test.html +17 -0
- package/docs/static/examples/ng-channel/ng-channel.html +24 -0
- package/docs/static/examples/ng-channel/ng-channel.test.js +31 -0
- package/docs/static/examples/ng-class/ng-class.html +71 -0
- package/docs/static/examples/ng-class-even/ng-class-even.html +8 -0
- package/docs/static/examples/ng-class-odd/ng-class-odd.html +8 -0
- package/docs/static/examples/ng-click/ng-click.html +6 -0
- package/docs/static/examples/ng-copy/ng-copy.html +6 -0
- package/docs/static/examples/ng-cut/ng-cut.html +6 -0
- package/docs/static/examples/ng-dblclick/ng-dblclick.html +10 -0
- package/docs/static/examples/ng-focus/ng-focus.html +9 -0
- package/docs/static/examples/ng-mousedown/ng-mousedown.html +6 -0
- package/docs/static/examples/ng-mouseenter/ng-mouseenter.html +4 -0
- package/docs/static/examples/ng-mouseleave/ng-mouseleave.html +4 -0
- package/docs/static/examples/ng-mousemove/ng-mousemove.html +4 -0
- package/docs/static/examples/ng-mouseout/ng-mouseout.html +4 -0
- package/docs/static/examples/ng-mouseover/ng-mouseover.html +4 -0
- package/docs/static/examples/ng-mouseup/ng-mouseup.html +4 -0
- package/docs/static/typedoc/assets/hierarchy.js +1 -1
- package/docs/static/typedoc/assets/navigation.js +1 -1
- package/docs/static/typedoc/assets/search.js +1 -1
- package/docs/static/typedoc/classes/LogProvider.html +6 -0
- package/docs/static/typedoc/classes/PubSub.html +71 -0
- package/docs/static/typedoc/classes/PubSubProvider.html +3 -0
- package/docs/static/typedoc/classes/TemplateCacheProvider.html +5 -0
- package/docs/static/typedoc/hierarchy.html +1 -1
- package/docs/static/typedoc/index.html +1 -1
- package/docs/static/typedoc/interfaces/ChangesObject.html +1 -1
- package/docs/static/typedoc/interfaces/ComponentOptions.html +1 -1
- package/docs/static/typedoc/interfaces/Controller.html +1 -1
- package/docs/static/typedoc/interfaces/Directive.html +1 -1
- package/docs/static/typedoc/interfaces/DirectivePrePost.html +1 -1
- package/docs/static/typedoc/interfaces/HttpHeadersGetter.html +1 -0
- package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +31 -0
- package/docs/static/typedoc/interfaces/HttpRequestConfigHeaders.html +6 -0
- package/docs/static/typedoc/interfaces/HttpRequestTransformer.html +1 -0
- package/docs/static/typedoc/interfaces/HttpResponse.html +8 -0
- package/docs/static/typedoc/interfaces/HttpResponseTransformer.html +1 -0
- package/docs/static/typedoc/interfaces/HttpService.html +38 -0
- package/docs/static/typedoc/interfaces/LogService.html +12 -0
- package/docs/static/typedoc/interfaces/NgModelController.html +1 -1
- package/docs/static/typedoc/interfaces/NgModelOptions.html +1 -1
- package/docs/static/typedoc/interfaces/Provider.html +1 -1
- package/docs/static/typedoc/interfaces/RequestConfig.html +48 -0
- package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +38 -0
- package/docs/static/typedoc/interfaces/ServiceProvider.html +1 -1
- package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +1 -1
- package/docs/static/typedoc/types/AnnotatedFactory.html +1 -1
- package/docs/static/typedoc/types/CloneAttachFunction.html +1 -1
- package/docs/static/typedoc/types/ControllerConstructor.html +1 -1
- package/docs/static/typedoc/types/DirectiveCompileFn.html +1 -1
- package/docs/static/typedoc/types/DirectiveController.html +1 -1
- package/docs/static/typedoc/types/DirectiveFactory.html +1 -1
- package/docs/static/typedoc/types/DirectiveLinkFn.html +1 -1
- package/docs/static/typedoc/types/ExpandoStore.html +2 -0
- package/docs/static/typedoc/types/Expression.html +1 -1
- package/docs/static/typedoc/types/FilterFactory.html +1 -1
- package/docs/static/typedoc/types/FilterFn.html +1 -1
- package/docs/static/typedoc/types/HttpPromise.html +1 -0
- package/docs/static/typedoc/types/Injectable.html +1 -1
- package/docs/static/typedoc/types/InjectableFactory.html +1 -1
- package/docs/static/typedoc/types/LogCall.html +2 -0
- package/docs/static/typedoc/types/LogServiceFactory.html +2 -0
- package/docs/static/typedoc/types/OnChangesObject.html +1 -1
- package/docs/static/typedoc/types/SwapInsertPosition.html +1 -1
- package/docs/static/typedoc/types/TController.html +1 -1
- package/docs/static/typedoc/types/TemplateCache.html +2 -0
- package/docs/static/typedoc/variables/EventBus.html +1 -0
- package/index.html +4 -2
- package/package.json +3 -3
- package/src/animations/animate-css.js +5 -1
- package/src/binding.spec.js +3 -1
- package/src/core/compile/compile.spec.js +12 -5
- package/src/core/core.html +0 -1
- package/src/core/exception-handler.js +1 -1
- package/src/core/prop.spec.js +1 -0
- package/src/core/task-tracker-factory.js +2 -2
- package/src/directive/bind/bind.spec.js +1 -4
- package/src/directive/channel/channel.js +8 -24
- package/src/directive/channel/channel.spec.js +4 -2
- package/src/directive/class/class.js +16 -0
- package/src/directive/class/class.spec.js +2 -0
- package/src/directive/events/event.spec.js +1 -0
- package/src/directive/events/events.js +21 -24
- package/src/directive/form/form.spec.js +2 -0
- package/src/directive/http/http.js +4 -4
- package/src/directive/if/if.spec.js +2 -0
- package/src/directive/include/include.spec.js +1 -0
- package/src/directive/input/input.spec.js +1 -0
- package/src/directive/model/model.spec.js +3 -0
- package/src/directive/model-options/model-options.spec.js +2 -0
- package/src/directive/observe/{test.html → observe-demo.html} +0 -1
- package/src/directive/observe/observe.spec.js +2 -1
- package/src/{core/pubsub/pubsub.html → directive/on/on.html} +1 -1
- package/src/{core → directive/on}/on.spec.js +5 -3
- package/src/directive/on/on.test.js +11 -0
- package/src/directive/options/options.spec.js +1 -0
- package/src/directive/script/script.js +1 -1
- package/src/directive/select/select.spec.js +1 -0
- package/src/directive/setter/setter.js +1 -1
- package/src/directive/setter/setter.spec.js +2 -0
- package/src/directive/switch/switch.spec.js +1 -0
- package/src/injection-tokens.js +3 -0
- package/src/interface.ts +10 -0
- package/src/loader.js +3 -6
- package/src/public.js +3 -3
- package/src/router/directives/state-directives.spec.js +3 -1
- package/src/router/params/param-factory.js +6 -0
- package/src/router/params/param.js +22 -7
- package/src/router/router.html +0 -1
- package/src/router/router.test.js +2 -1
- package/src/router/services.spec.js +2 -0
- package/src/router/state/state-builder.js +3 -0
- package/src/router/state/state-builder.spec.js +2 -0
- package/src/router/state/state-service.js +1 -1
- package/src/router/state-filter.spec.js +2 -0
- package/src/router/template-factory.html +19 -0
- package/src/router/template-factory.js +3 -3
- package/src/router/template-factory.spec.js +1 -0
- package/src/router/template-factory.test.js +12 -0
- package/src/router/transition/transition-hook.js +1 -1
- package/src/router/url/url-service.js +1 -1
- package/src/router/view-scroll.spec.js +3 -1
- package/src/services/http/http.js +4 -4
- package/src/services/http/http.test.js +1 -1
- package/src/services/http/interface.ts +243 -0
- package/src/services/http-backend/http-backend.js +21 -11
- package/src/services/log/interface.ts +39 -0
- package/src/services/log/log.html +19 -0
- package/src/services/log/log.js +74 -0
- package/src/services/log/log.spec.js +64 -0
- package/src/services/log/log.test.js +11 -0
- package/src/services/pubsub/pubsub.html +19 -0
- package/src/{core → services}/pubsub/pubsub.js +6 -5
- package/src/{core → services}/pubsub/pubsub.spec.js +3 -3
- package/src/{core → services}/pubsub/pubsub.test.js +1 -1
- package/src/services/template-cache/interface.ts +4 -0
- package/src/services/template-cache/template-cache.html +22 -0
- package/src/services/template-cache/template-cache.js +13 -0
- package/src/services/template-cache/template-cache.spec.js +62 -0
- package/src/services/template-cache/template-cache.test.js +11 -0
- package/src/services/template-request.js +2 -2
- package/src/shared/cache.js +9 -0
- package/src/shared/dom.js +13 -7
- package/utils/express.js +7 -9
- package/@types/core/cache/cache-factory.d.ts +0 -22
- package/@types/core/cache/cache.d.ts +0 -28
- package/@types/services/log.d.ts +0 -53
- package/src/core/cache/cache-factory.js +0 -19
- package/src/core/cache/cache.js +0 -27
- package/src/directive/class/class.md +0 -90
- package/src/directive/cloak/cloak.md +0 -24
- package/src/examples/counter.html +0 -20
- package/src/services/log.js +0 -95
- package/src/services/log.md +0 -39
package/.prettierignore
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
*
|
|
42
42
|
* @see {@link angular.ErrorHandler AngularTS ErrorHandler}
|
|
43
43
|
*/
|
|
44
|
-
/** @typedef {import('../services/log.
|
|
44
|
+
/** @typedef {import('../services/log/interface.ts').LogService} LogService */
|
|
45
45
|
/** @typedef {import("./error-handler.ts").ErrorHandler} ErrorHandler */
|
|
46
46
|
/**
|
|
47
47
|
* Provider for `$exceptionHandler` service. Delegates uncaught exceptions to `$log.error()` by default.
|
|
@@ -54,5 +54,5 @@ export class ExceptionHandlerProvider {
|
|
|
54
54
|
errorHandler: ErrorHandler;
|
|
55
55
|
$get: (string | (($log: LogService) => ErrorHandler))[];
|
|
56
56
|
}
|
|
57
|
-
export type LogService = import("../services/log.
|
|
57
|
+
export type LogService = import("../services/log/interface.ts").LogService;
|
|
58
58
|
export type ErrorHandler = import("./error-handler.ts").ErrorHandler;
|
|
@@ -15,9 +15,9 @@ export class TaskTrackerFactoryProvider implements ServiceProvider {
|
|
|
15
15
|
*/
|
|
16
16
|
export class TaskTracker {
|
|
17
17
|
/**
|
|
18
|
-
* @param {import('../services/log.
|
|
18
|
+
* @param {import('../services/log/interface.ts').LogService} log - The logging service.
|
|
19
19
|
*/
|
|
20
|
-
constructor(log: import("../services/log.
|
|
20
|
+
constructor(log: import("../services/log/interface.ts").LogService);
|
|
21
21
|
/** @private */
|
|
22
22
|
private log;
|
|
23
23
|
/** @private */
|
|
@@ -1,25 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* If data is sent via `$eventBus` on the specified `ngChannel`, the directive attempts to update the element's content accordingly,
|
|
4
|
-
* either by directly setting the inner HTML or merging the scope's data if the element contains a template.
|
|
5
|
-
*
|
|
6
|
-
* If the element has a template and incoming data is an object, the directive will merge all key/value pairs onto the scope,
|
|
7
|
-
* allowing Angular expressions (`{{ yourModel }}`) to be evaluated and rendered.
|
|
8
|
-
*
|
|
9
|
-
* When the scope is destroyed, the directive automatically unsubscribes from the channel.
|
|
10
|
-
* Example:
|
|
11
|
-
*
|
|
12
|
-
* HTML:
|
|
13
|
-
* <div ng-channel="userChannel">Hello {{ user.firstName }} {{ user.lastName }}</div>
|
|
14
|
-
*
|
|
15
|
-
* JavaScript:
|
|
16
|
-
* angular.$eventBus.publish('userChannel', { user: { firstName: 'John', lastName: 'Smith' } });
|
|
17
|
-
*
|
|
18
|
-
* @param {import("../../core/pubsub/pubsub.js").PubSub} $eventBus
|
|
2
|
+
* @param {import("../../services/pubsub/pubsub.js").PubSub} $eventBus
|
|
19
3
|
* @returns {import("../../interface.ts").Directive}
|
|
20
4
|
*/
|
|
21
5
|
export function ngChannelDirective(
|
|
22
|
-
$eventBus: import("../../
|
|
6
|
+
$eventBus: import("../../services/pubsub/pubsub.js").PubSub,
|
|
23
7
|
): import("../../interface.ts").Directive;
|
|
24
8
|
export namespace ngChannelDirective {
|
|
25
9
|
let $inject: string[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param {import('../../
|
|
2
|
+
* @param {import('../../services/template-cache/interface.ts').TemplateCache} $templateCache
|
|
3
3
|
* @returns {import('../../interface.ts').Directive}
|
|
4
4
|
*/
|
|
5
5
|
export function scriptDirective(
|
|
6
|
-
$templateCache:
|
|
6
|
+
$templateCache: import("../../services/template-cache/interface.ts").TemplateCache,
|
|
7
7
|
): import("../../interface.ts").Directive;
|
|
8
8
|
export namespace scriptDirective {
|
|
9
9
|
let $inject: string[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {import('../../core/parse/interface.ts').ParseService} $parse
|
|
3
|
-
* @param {import('../../services/log.
|
|
3
|
+
* @param {import('../../services/log/interface.ts').LogService} $log
|
|
4
4
|
* @returns {import('../../interface.ts').Directive}
|
|
5
5
|
*/
|
|
6
6
|
export function ngSetterDirective(
|
|
7
7
|
$parse: import("../../core/parse/interface.ts").ParseService,
|
|
8
|
-
$log: import("../../services/log.
|
|
8
|
+
$log: import("../../services/log/interface.ts").LogService,
|
|
9
9
|
): import("../../interface.ts").Directive;
|
|
10
10
|
export namespace ngSetterDirective {
|
|
11
11
|
let $inject: string[];
|
|
@@ -14,6 +14,9 @@ export function provider(services: string[]): string[];
|
|
|
14
14
|
* angular.$injectTokens.$animate,
|
|
15
15
|
* angular.$injectTokens.$templateRequest,
|
|
16
16
|
* ];
|
|
17
|
+
*
|
|
18
|
+
* function myDirective($animate, $templateRequest) { ... }
|
|
19
|
+
*
|
|
17
20
|
* ```
|
|
18
21
|
* @type Readonly<Record<string, string>>
|
|
19
22
|
*/
|
package/@types/interface.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { Attributes } from "./core/compile/attributes.js";
|
|
2
2
|
import { Scope } from "./core/scope/scope.js";
|
|
3
|
+
export * from "./services/http/interface.ts";
|
|
4
|
+
export * from "./services/log/interface.ts";
|
|
5
|
+
export * from "./services/log/log.js";
|
|
6
|
+
export * from "./services/pubsub/pubsub.js";
|
|
7
|
+
export * from "./services/template-cache/interface.ts";
|
|
8
|
+
export * from "./services/template-cache/template-cache.js";
|
|
3
9
|
/**
|
|
4
10
|
* A JavaScript expression represented as a string, typically used in interpolation bindings.
|
|
5
11
|
*
|
|
@@ -10,6 +16,11 @@ import { Scope } from "./core/scope/scope.js";
|
|
|
10
16
|
*
|
|
11
17
|
*/
|
|
12
18
|
export type Expression = string;
|
|
19
|
+
export type ExpandoStore = {
|
|
20
|
+
data: {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
13
24
|
/**
|
|
14
25
|
* A dependency-annotated factory array used by AngularTS DI system.
|
|
15
26
|
*
|
package/@types/loader.d.ts
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* @property {boolean} [strictDi] - Disable automatic function annotation for the application. This is meant to assist in finding bugs which break minified code. Defaults to `false`.
|
|
6
6
|
*/
|
|
7
7
|
export class Angular {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
$eventBus: import("./core/pubsub/pubsub.js").PubSub;
|
|
8
|
+
$cache: Map<number, import("./interface.ts").ExpandoStore>;
|
|
9
|
+
/** @type {import('./services/pubsub/pubsub.js').PubSub} */
|
|
10
|
+
$eventBus: import("./services/pubsub/pubsub.js").PubSub;
|
|
12
11
|
/**
|
|
13
12
|
* @type {string} `version` from `package.json`
|
|
14
13
|
*/
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
export class ParamFactory {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* @param {import("../url/url-config.js").UrlConfigProvider} urlServiceConfig
|
|
4
|
+
*/
|
|
5
|
+
constructor(
|
|
6
|
+
urlServiceConfig: import("../url/url-config.js").UrlConfigProvider,
|
|
7
|
+
);
|
|
8
|
+
/**
|
|
9
|
+
* @type {import("../url/url-config.js").UrlConfigProvider}
|
|
10
|
+
*/
|
|
11
|
+
urlServiceConfig: import("../url/url-config.js").UrlConfigProvider;
|
|
4
12
|
fromConfig(id: any, type: any, state: any): Param;
|
|
5
13
|
fromPath(id: any, type: any, state: any): Param;
|
|
6
14
|
fromSearch(id: any, type: any, state: any): Param;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
export type DefType = number;
|
|
2
|
+
export namespace DefType {
|
|
3
|
+
let PATH: number;
|
|
4
|
+
let SEARCH: number;
|
|
5
|
+
let CONFIG: number;
|
|
6
|
+
}
|
|
1
7
|
export class Param {
|
|
2
8
|
static values(params: any, values?: {}): {};
|
|
3
9
|
/**
|
|
@@ -24,10 +30,24 @@ export class Param {
|
|
|
24
30
|
static equals(params: any, values1?: {}, values2?: {}): boolean;
|
|
25
31
|
/** Returns true if a the parameter values are valid, according to the Param definitions */
|
|
26
32
|
static validates(params: any, values?: {}): any;
|
|
27
|
-
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param {*} id
|
|
36
|
+
* @param {*} type
|
|
37
|
+
* @param {DefType} location
|
|
38
|
+
* @param {import("../url/url-config.js").UrlConfigProvider} urlConfig
|
|
39
|
+
* @param {*} state
|
|
40
|
+
*/
|
|
41
|
+
constructor(
|
|
42
|
+
id: any,
|
|
43
|
+
type: any,
|
|
44
|
+
location: DefType,
|
|
45
|
+
urlConfig: import("../url/url-config.js").UrlConfigProvider,
|
|
46
|
+
state: any,
|
|
47
|
+
);
|
|
28
48
|
isOptional: boolean;
|
|
29
49
|
type: any;
|
|
30
|
-
location:
|
|
50
|
+
location: number;
|
|
31
51
|
id: any;
|
|
32
52
|
dynamic: boolean;
|
|
33
53
|
raw: boolean;
|
|
@@ -49,4 +69,3 @@ export class Param {
|
|
|
49
69
|
validates(value: any): boolean;
|
|
50
70
|
toString(): string;
|
|
51
71
|
}
|
|
52
|
-
export let DefType: any;
|
|
@@ -13,14 +13,14 @@ export class TemplateFactoryProvider {
|
|
|
13
13
|
| string
|
|
14
14
|
| ((
|
|
15
15
|
$http: any,
|
|
16
|
-
$templateCache: import("../
|
|
16
|
+
$templateCache: import("../services/template-cache/interface.ts").TemplateCache,
|
|
17
17
|
$templateRequest: any,
|
|
18
18
|
$injector: import("../core/di/internal-injector.js").InjectorService,
|
|
19
19
|
) => this)
|
|
20
20
|
)[];
|
|
21
21
|
$templateRequest: any;
|
|
22
22
|
$http: any;
|
|
23
|
-
$templateCache: import("../
|
|
23
|
+
$templateCache: import("../interface.ts").TemplateCache;
|
|
24
24
|
$injector: import("../core/di/internal-injector.js").InjectorService;
|
|
25
25
|
/**
|
|
26
26
|
* Forces the provider to use $http service directly
|
|
@@ -32,9 +32,9 @@ export class UrlService {
|
|
|
32
32
|
* The nested [[UrlConfig]] API to configure the URL and retrieve URL information
|
|
33
33
|
*
|
|
34
34
|
* See: [[UrlConfig]] for details
|
|
35
|
-
* @type {import("./url-config").UrlConfigProvider}
|
|
35
|
+
* @type {import("./url-config.js").UrlConfigProvider}
|
|
36
36
|
*/
|
|
37
|
-
config:
|
|
37
|
+
config: import("./url-config.js").UrlConfigProvider;
|
|
38
38
|
/** Creates a new [[Param]] for a given location (DefType) */
|
|
39
39
|
paramFactory: ParamFactory;
|
|
40
40
|
/**
|
|
@@ -57,8 +57,8 @@ export class HttpProvider {
|
|
|
57
57
|
| ((
|
|
58
58
|
$browser: any,
|
|
59
59
|
$httpBackend: any,
|
|
60
|
-
$rootScope:
|
|
61
|
-
$injector:
|
|
60
|
+
$rootScope: import("../../core/scope/scope.js").Scope,
|
|
61
|
+
$injector: import("../../core/di/internal-injector.js").InjectorService,
|
|
62
62
|
$sce: any,
|
|
63
63
|
) => {
|
|
64
64
|
(requestConfig: any): Promise<any>;
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
export interface HttpHeadersGetter {
|
|
2
|
+
(): {
|
|
3
|
+
[name: string]: string;
|
|
4
|
+
};
|
|
5
|
+
(headerName: string): string;
|
|
6
|
+
}
|
|
7
|
+
export interface HttpRequestConfigHeaders {
|
|
8
|
+
[requestType: string]: any;
|
|
9
|
+
common?: any;
|
|
10
|
+
get?: any;
|
|
11
|
+
post?: any;
|
|
12
|
+
put?: any;
|
|
13
|
+
patch?: any;
|
|
14
|
+
}
|
|
15
|
+
export interface HttpRequestTransformer {
|
|
16
|
+
(data: any, headersGetter: HttpHeadersGetter): any;
|
|
17
|
+
}
|
|
18
|
+
export interface HttpResponseTransformer {
|
|
19
|
+
(data: any, headersGetter: HttpHeadersGetter, status: number): any;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Object that controls the defaults for $http provider. Not all fields of RequestShortcutConfig can be configured
|
|
23
|
+
* via defaults and the docs do not say which. The following is based on the inspection of the source code.
|
|
24
|
+
* https://docs.angularjs.org/api/ng/service/$http#defaults
|
|
25
|
+
* https://docs.angularjs.org/api/ng/service/$http#usage
|
|
26
|
+
* https://docs.angularjs.org/api/ng/provider/$httpProvider The properties section
|
|
27
|
+
*/
|
|
28
|
+
export interface HttpProviderDefaults {
|
|
29
|
+
/**
|
|
30
|
+
* {boolean|Cache}
|
|
31
|
+
* If true, a default $http cache will be used to cache the GET request, otherwise if a cache instance built with $cacheFactory, this cache will be used for caching.
|
|
32
|
+
*/
|
|
33
|
+
cache?: any;
|
|
34
|
+
/**
|
|
35
|
+
* Transform function or an array of such functions. The transform function takes the http request body and
|
|
36
|
+
* headers and returns its transformed (typically serialized) version.
|
|
37
|
+
* @see {@link https://docs.angularjs.org/api/ng/service/$http#transforming-requests-and-responses}
|
|
38
|
+
*/
|
|
39
|
+
transformRequest?:
|
|
40
|
+
| HttpRequestTransformer
|
|
41
|
+
| HttpRequestTransformer[]
|
|
42
|
+
| undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Transform function or an array of such functions. The transform function takes the http response body and
|
|
45
|
+
* headers and returns its transformed (typically deserialized) version.
|
|
46
|
+
*/
|
|
47
|
+
transformResponse?:
|
|
48
|
+
| HttpResponseTransformer
|
|
49
|
+
| HttpResponseTransformer[]
|
|
50
|
+
| undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Map of strings or functions which return strings representing HTTP headers to send to the server. If the
|
|
53
|
+
* return value of a function is null, the header will not be sent.
|
|
54
|
+
* The key of the map is the request verb in lower case. The "common" key applies to all requests.
|
|
55
|
+
* @see {@link https://docs.angularjs.org/api/ng/service/$http#setting-http-headers}
|
|
56
|
+
*/
|
|
57
|
+
headers?: HttpRequestConfigHeaders | undefined;
|
|
58
|
+
/** Name of HTTP header to populate with the XSRF token. */
|
|
59
|
+
xsrfHeaderName?: string | undefined;
|
|
60
|
+
/** Name of cookie containing the XSRF token. */
|
|
61
|
+
xsrfCookieName?: string | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* whether to to set the withCredentials flag on the XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5 for more information.
|
|
64
|
+
*/
|
|
65
|
+
withCredentials?: boolean | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* A function used to the prepare string representation of request parameters (specified as an object). If
|
|
68
|
+
* specified as string, it is interpreted as a function registered with the $injector. Defaults to
|
|
69
|
+
* $httpParamSerializer.
|
|
70
|
+
*/
|
|
71
|
+
paramSerializer?: string | ((obj: any) => string) | undefined;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Object describing the request to be made and how it should be processed.
|
|
75
|
+
* see http://docs.angularjs.org/api/ng/service/$http#usage
|
|
76
|
+
*/
|
|
77
|
+
export interface RequestShortcutConfig extends HttpProviderDefaults {
|
|
78
|
+
/**
|
|
79
|
+
* {Object.<string|Object>}
|
|
80
|
+
* Map of strings or objects which will be turned to ?key1=value1&key2=value2 after the url. If the value is not a string, it will be JSONified.
|
|
81
|
+
*/
|
|
82
|
+
params?: any;
|
|
83
|
+
/**
|
|
84
|
+
* {string|Object}
|
|
85
|
+
* Data to be sent as the request message data.
|
|
86
|
+
*/
|
|
87
|
+
data?: any;
|
|
88
|
+
/**
|
|
89
|
+
* Timeout in milliseconds, or promise that should abort the request when resolved.
|
|
90
|
+
*/
|
|
91
|
+
timeout?: number | Promise<any> | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* See [XMLHttpRequest.responseType]https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype
|
|
94
|
+
*/
|
|
95
|
+
responseType?: string | undefined;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Object describing the request to be made and how it should be processed.
|
|
99
|
+
* see http://docs.angularjs.org/api/ng/service/$http#usage
|
|
100
|
+
*/
|
|
101
|
+
export interface RequestConfig extends RequestShortcutConfig {
|
|
102
|
+
/**
|
|
103
|
+
* HTTP method (e.g. 'GET', 'POST', etc)
|
|
104
|
+
*/
|
|
105
|
+
method: string;
|
|
106
|
+
/**
|
|
107
|
+
* Absolute or relative URL of the resource that is being requested.
|
|
108
|
+
*/
|
|
109
|
+
url: string;
|
|
110
|
+
/**
|
|
111
|
+
* Event listeners to be bound to the XMLHttpRequest object.
|
|
112
|
+
* To bind events to the XMLHttpRequest upload object, use uploadEventHandlers. The handler will be called in the context of a $apply block.
|
|
113
|
+
*/
|
|
114
|
+
eventHandlers?:
|
|
115
|
+
| {
|
|
116
|
+
[type: string]: EventListenerOrEventListenerObject;
|
|
117
|
+
}
|
|
118
|
+
| undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Event listeners to be bound to the XMLHttpRequest upload object.
|
|
121
|
+
* To bind events to the XMLHttpRequest object, use eventHandlers. The handler will be called in the context of a $apply block.
|
|
122
|
+
*/
|
|
123
|
+
uploadEventHandlers?:
|
|
124
|
+
| {
|
|
125
|
+
[type: string]: EventListenerOrEventListenerObject;
|
|
126
|
+
}
|
|
127
|
+
| undefined;
|
|
128
|
+
}
|
|
129
|
+
export interface HttpResponse<T> {
|
|
130
|
+
data: T;
|
|
131
|
+
status: number;
|
|
132
|
+
headers: HttpHeadersGetter;
|
|
133
|
+
config: RequestConfig;
|
|
134
|
+
statusText: string;
|
|
135
|
+
/** Added in AngularJS 1.6.6 */
|
|
136
|
+
xhrStatus: "complete" | "error" | "timeout" | "abort";
|
|
137
|
+
}
|
|
138
|
+
export type HttpPromise<T> = Promise<HttpResponse<T>>;
|
|
139
|
+
/**
|
|
140
|
+
* HttpService
|
|
141
|
+
*/
|
|
142
|
+
export interface HttpService {
|
|
143
|
+
/**
|
|
144
|
+
* Object describing the request to be made and how it should be processed.
|
|
145
|
+
*/
|
|
146
|
+
<T>(config: RequestConfig): HttpPromise<T>;
|
|
147
|
+
/**
|
|
148
|
+
* Shortcut method to perform GET request.
|
|
149
|
+
*
|
|
150
|
+
* @param url Relative or absolute URL specifying the destination of the request
|
|
151
|
+
* @param config Optional configuration object
|
|
152
|
+
*/
|
|
153
|
+
get<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>;
|
|
154
|
+
/**
|
|
155
|
+
* Shortcut method to perform DELETE request.
|
|
156
|
+
*
|
|
157
|
+
* @param url Relative or absolute URL specifying the destination of the request
|
|
158
|
+
* @param config Optional configuration object
|
|
159
|
+
*/
|
|
160
|
+
delete<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>;
|
|
161
|
+
/**
|
|
162
|
+
* Shortcut method to perform HEAD request.
|
|
163
|
+
*
|
|
164
|
+
* @param url Relative or absolute URL specifying the destination of the request
|
|
165
|
+
* @param config Optional configuration object
|
|
166
|
+
*/
|
|
167
|
+
head<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>;
|
|
168
|
+
/**
|
|
169
|
+
* Shortcut method to perform JSONP request.
|
|
170
|
+
*
|
|
171
|
+
* @param url Relative or absolute URL specifying the destination of the request
|
|
172
|
+
* @param config Optional configuration object
|
|
173
|
+
*/
|
|
174
|
+
jsonp<T>(url: string, config?: RequestShortcutConfig): HttpPromise<T>;
|
|
175
|
+
/**
|
|
176
|
+
* Shortcut method to perform POST request.
|
|
177
|
+
*
|
|
178
|
+
* @param url Relative or absolute URL specifying the destination of the request
|
|
179
|
+
* @param data Request content
|
|
180
|
+
* @param config Optional configuration object
|
|
181
|
+
*/
|
|
182
|
+
post<T>(
|
|
183
|
+
url: string,
|
|
184
|
+
data: any,
|
|
185
|
+
config?: RequestShortcutConfig,
|
|
186
|
+
): HttpPromise<T>;
|
|
187
|
+
/**
|
|
188
|
+
* Shortcut method to perform PUT request.
|
|
189
|
+
*
|
|
190
|
+
* @param url Relative or absolute URL specifying the destination of the request
|
|
191
|
+
* @param data Request content
|
|
192
|
+
* @param config Optional configuration object
|
|
193
|
+
*/
|
|
194
|
+
put<T>(
|
|
195
|
+
url: string,
|
|
196
|
+
data: any,
|
|
197
|
+
config?: RequestShortcutConfig,
|
|
198
|
+
): HttpPromise<T>;
|
|
199
|
+
/**
|
|
200
|
+
* Shortcut method to perform PATCH request.
|
|
201
|
+
*
|
|
202
|
+
* @param url Relative or absolute URL specifying the destination of the request
|
|
203
|
+
* @param data Request content
|
|
204
|
+
* @param config Optional configuration object
|
|
205
|
+
*/
|
|
206
|
+
patch<T>(
|
|
207
|
+
url: string,
|
|
208
|
+
data: any,
|
|
209
|
+
config?: RequestShortcutConfig,
|
|
210
|
+
): HttpPromise<T>;
|
|
211
|
+
/**
|
|
212
|
+
* Runtime equivalent of the $httpProvider.defaults property. Allows configuration of default headers, withCredentials as well as request and response transformations.
|
|
213
|
+
*/
|
|
214
|
+
defaults: HttpProviderDefaults;
|
|
215
|
+
/**
|
|
216
|
+
* Array of config objects for currently pending requests. This is primarily meant to be used for debugging purposes.
|
|
217
|
+
*/
|
|
218
|
+
pendingRequests: RequestConfig[];
|
|
219
|
+
}
|
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {import('../browser.js').Browser} $browser
|
|
3
|
+
* @returns
|
|
4
|
+
*/
|
|
5
|
+
export function createHttpBackend(
|
|
6
|
+
$browser: import("../browser.js").Browser,
|
|
7
|
+
): (
|
|
8
|
+
method: any,
|
|
9
|
+
url: any,
|
|
10
|
+
post: any,
|
|
11
|
+
callback: any,
|
|
12
|
+
headers: any,
|
|
13
|
+
timeout: any,
|
|
14
|
+
withCredentials: any,
|
|
15
|
+
responseType: any,
|
|
16
|
+
eventHandlers: any,
|
|
17
|
+
uploadEventHandlers: any,
|
|
18
|
+
) => void;
|
|
19
|
+
/**
|
|
20
|
+
* HTTP backend used by the {@link ng.$http service} that delegates to
|
|
21
|
+
* XMLHttpRequest object and deals with browser incompatibilities.
|
|
22
|
+
*
|
|
23
|
+
* You should never need to use this service directly, instead use the higher-level abstractions:
|
|
24
|
+
* {@link ng.$http $http}.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
1
27
|
/**
|
|
2
28
|
* HTTP backend used by the {@link ng.$http service} that delegates to
|
|
3
29
|
* XMLHttpRequest object and deals with browser incompatibilities.
|
|
@@ -6,7 +32,6 @@
|
|
|
6
32
|
* {@link ng.$http $http}.
|
|
7
33
|
*
|
|
8
34
|
*/
|
|
9
|
-
export function HttpBackendProvider(): void;
|
|
10
35
|
export class HttpBackendProvider {
|
|
11
36
|
$get: (
|
|
12
37
|
| string
|
|
@@ -26,21 +51,3 @@ export class HttpBackendProvider {
|
|
|
26
51
|
) => void)
|
|
27
52
|
)[];
|
|
28
53
|
}
|
|
29
|
-
/**
|
|
30
|
-
* @param {import('../browser.js').Browser} $browser
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
export function createHttpBackend(
|
|
34
|
-
$browser: import("../browser.js").Browser,
|
|
35
|
-
): (
|
|
36
|
-
method: any,
|
|
37
|
-
url: any,
|
|
38
|
-
post: any,
|
|
39
|
-
callback: any,
|
|
40
|
-
headers: any,
|
|
41
|
-
timeout: any,
|
|
42
|
-
withCredentials: any,
|
|
43
|
-
responseType: any,
|
|
44
|
-
eventHandlers: any,
|
|
45
|
-
uploadEventHandlers: any,
|
|
46
|
-
) => void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A function that logs messages. Accepts any number of arguments.
|
|
3
|
+
*/
|
|
4
|
+
export type LogCall = (...args: any[]) => void;
|
|
5
|
+
/**
|
|
6
|
+
* A function that returns a LogService implementation.
|
|
7
|
+
*/
|
|
8
|
+
export type LogServiceFactory = (...args: any[]) => LogService;
|
|
9
|
+
/**
|
|
10
|
+
* Service for logging messages at various levels.
|
|
11
|
+
*/
|
|
12
|
+
export interface LogService {
|
|
13
|
+
/**
|
|
14
|
+
* Log a debug message.
|
|
15
|
+
*/
|
|
16
|
+
debug: LogCall;
|
|
17
|
+
/**
|
|
18
|
+
* Log an error message.
|
|
19
|
+
*/
|
|
20
|
+
error: LogCall;
|
|
21
|
+
/**
|
|
22
|
+
* Log an info message.
|
|
23
|
+
*/
|
|
24
|
+
info: LogCall;
|
|
25
|
+
/**
|
|
26
|
+
* Log a general message.
|
|
27
|
+
*/
|
|
28
|
+
log: LogCall;
|
|
29
|
+
/**
|
|
30
|
+
* Log a warning message.
|
|
31
|
+
*/
|
|
32
|
+
warn: LogCall;
|
|
33
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration provider for `$log` service
|
|
3
|
+
*/
|
|
4
|
+
export class LogProvider {
|
|
5
|
+
/** @type {boolean} */
|
|
6
|
+
debug: boolean;
|
|
7
|
+
/** @private @type {import("./interface.ts").LogServiceFactory | null} */
|
|
8
|
+
private _override;
|
|
9
|
+
/**
|
|
10
|
+
* Override the default {@link LogService} implemenation
|
|
11
|
+
* @param {import("./interface.ts").LogServiceFactory} fn
|
|
12
|
+
*/
|
|
13
|
+
setLogger(fn: import("./interface.ts").LogServiceFactory): void;
|
|
14
|
+
/** @private */
|
|
15
|
+
private formatError;
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
* @param {string} type
|
|
19
|
+
*/
|
|
20
|
+
private consoleLog;
|
|
21
|
+
/**
|
|
22
|
+
* @returns {import("./interface.ts").LogService}
|
|
23
|
+
*/
|
|
24
|
+
$get(): import("./interface.ts").LogService;
|
|
25
|
+
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Configurable provider for an injectable event bus
|
|
5
|
-
* @
|
|
5
|
+
* @extends {ServiceProvider}
|
|
6
6
|
*/
|
|
7
|
-
export class PubSubProvider
|
|
7
|
+
export class PubSubProvider {
|
|
8
8
|
/**
|
|
9
9
|
* @type {PubSub}
|
|
10
10
|
*/
|
|
@@ -69,7 +69,7 @@ export class PubSub {
|
|
|
69
69
|
* representation minimizes the number of object allocations and has been
|
|
70
70
|
* shown to be faster than an array of objects with three key-value pairs or
|
|
71
71
|
* three parallel arrays, especially on IE.) Once a subscription is removed
|
|
72
|
-
* via {@link
|
|
72
|
+
* via {@link unsubscribe} or {@link unsubscribeByKey}, the three
|
|
73
73
|
* corresponding array elements are deleted, and never reused. This means the
|
|
74
74
|
* total number of subscriptions during the lifetime of the pubsub channel is
|
|
75
75
|
* limited by the maximum length of a JavaScript array to (2^32 - 1) / 3 =
|
|
@@ -95,7 +95,7 @@ export class PubSub {
|
|
|
95
95
|
* is specified. Subscribing the same function to the same topic multiple
|
|
96
96
|
* times will result in multiple function invocations while publishing.
|
|
97
97
|
* Returns a subscription key that can be used to unsubscribe the function from
|
|
98
|
-
* the topic via {@link
|
|
98
|
+
* the topic via {@link unsubscribeByKey}.
|
|
99
99
|
*
|
|
100
100
|
* @param {string} topic Topic to subscribe to.
|
|
101
101
|
* @param {Function} fn Function to be invoked when a message is published to
|
|
@@ -110,7 +110,7 @@ export class PubSub {
|
|
|
110
110
|
* method on the given `opt_context` object, or in the global scope if
|
|
111
111
|
* no context is specified, and is then unsubscribed. Returns a subscription
|
|
112
112
|
* key that can be used to unsubscribe the function from the topic via
|
|
113
|
-
* {@link
|
|
113
|
+
* {@link unsubscribeByKey}.
|
|
114
114
|
*
|
|
115
115
|
* @param {string} topic Topic to subscribe to.
|
|
116
116
|
* @param {Function} fn Function to be invoked once and then unsubscribed when
|
|
@@ -140,7 +140,7 @@ export class PubSub {
|
|
|
140
140
|
opt_context?: any | undefined,
|
|
141
141
|
): boolean;
|
|
142
142
|
/**
|
|
143
|
-
* Removes a subscription based on the key returned by {@link
|
|
143
|
+
* Removes a subscription based on the key returned by {@link subscribe}.
|
|
144
144
|
* No-op if no matching subscription is found. Returns a Boolean indicating
|
|
145
145
|
* whether a subscription was removed.
|
|
146
146
|
*
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provides an instance of a cache that can be used to store and retrieve template content.
|
|
3
|
+
*/
|
|
4
|
+
export class TemplateCacheProvider {
|
|
5
|
+
/** @type {import('./interface.ts').TemplateCache} */
|
|
6
|
+
cache: import("./interface.ts").TemplateCache;
|
|
7
|
+
/**
|
|
8
|
+
* @returns {import('./interface.ts').TemplateCache}
|
|
9
|
+
*/
|
|
10
|
+
$get: () => import("./interface.ts").TemplateCache;
|
|
11
|
+
}
|
|
@@ -44,7 +44,7 @@ export class TemplateRequestProvider {
|
|
|
44
44
|
| string
|
|
45
45
|
| ((
|
|
46
46
|
$exceptionHandler: import("../core/exception-handler.js").ErrorHandler,
|
|
47
|
-
$templateCache: import("../
|
|
47
|
+
$templateCache: import("../services/template-cache/interface.ts").TemplateCache,
|
|
48
48
|
$http: any,
|
|
49
49
|
$sce: any,
|
|
50
50
|
) => {
|