New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@robotlegsjs/core

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@robotlegsjs/core - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

lib/robotlegs/bender/framework/impl/ClassMatcher.d.ts

90

CHANGELOG.md

@@ -19,3 +19,3 @@ # RobotlegsJS Core Changelog:

- [ ] Find a way to keep a new line between **@inject** anotation and property declarations.
- [x] Find a way to keep a new line between **@inject** anotation and property declarations.

@@ -26,2 +26,90 @@ - [ ] Improve Code Coverage to reach 100%.

## Robotlegs-Core 0.2.0
### [v0.2.0](https://github.com/RobotlegsJS/RobotlegsJS/releases/tag/0.2.0) - 2018-08-02
Major Breaking Changes:
---
- **IEvent** interface changed to remove usage of **IEventInit** interface (see #57).
- Interface **IEvent** was:
```typescript
export interface IEvent {
type: string;
defaultPrevented?: boolean;
bubbles?: boolean;
target?: any;
currentTarget?: any;
detail?: any;
}
```
- Interface **IEvent** is now:
```typescript
export interface IEvent {
type: string;
bubbles?: boolean;
cancelable?: boolean;
isDefaultPrevented?: boolean;
isPropagationStopped?: boolean;
isPropagationImmediateStopped?: boolean;
currentTarget?: any;
target?: any;
data?: any;
preventDefault(): void;
stopPropagation(): void;
stopImmediatePropagation(): void;
}
```
- Constructor of **Event** class changed to remove usage of **IEventInit** interface (see #57).
- Constructor of **Event** class was:
```typescript
export class Event implements IEvent {
constructor(type: string, eventInit: IEventInit = { bubbles: false }) {
this.type = type;
this.defaultPrevented = false;
this.bubbles = eventInit.bubbles;
this.detail = eventInit.detail;
}
}
```
- Constructor of **Event** is now:
```typescript
export class Event implements IEvent {
constructor(type: string, bubbles?: boolean, cancelable?: boolean, data?: any) {
this._type = type;
this._bubbles = !!bubbles;
this._cancelable = !!cancelable;
this._data = data;
}
}
```
Features Or Improvements:
---
- Update Inversify to version 4.13.0 (see #61).
- Enforce TSLint rules (see #57).
- Update TypeScript Compiler Options to be more strict and to generate inline source maps (see #56, #71).
- Use [tslib](https://github.com/Microsoft/tslib) library to avoid duplicated declarations (see #71).
- Adopts year-agnostic copyright message (see #70).
- Improve public API, exposing more classes on index (see #72).
- Disable **removeComments** flag in **tsconfig.json** file, allowing comments to appear in output (see #73)
- Update README to improve installation instructions and update references for plugins (see #75).
- Update reference to Robotlegs Framework (see #76).
- Update dev dependencies to latest version.
## Robotlegs-Core 0.1.0

@@ -28,0 +116,0 @@

@@ -1,2 +0,2 @@

export { injectable, inject } from "inversify";
export { ContainerModule, decorate, inject, injectable, interfaces, multiInject, named, optional, postConstruct, tagged, targetName, unmanaged } from "inversify";
/**

@@ -32,2 +32,3 @@ * Framework API

export { MessageDispatcher } from "./robotlegs/bender/framework/impl/MessageDispatcher";
export { MessageRunner } from "./robotlegs/bender/framework/impl/MessageRunner";
export { ObjectProcessor } from "./robotlegs/bender/framework/impl/ObjectProcessor";

@@ -72,17 +73,33 @@ export { Pin } from "./robotlegs/bender/framework/impl/Pin";

export { IDirectCommandMap } from "./robotlegs/bender/extensions/directCommandMap/api/IDirectCommandMap";
export { IDirectCommandMapper } from "./robotlegs/bender/extensions/directCommandMap/api/IDirectCommandMapper";
export { IDirectCommandConfigurator } from "./robotlegs/bender/extensions/directCommandMap/dsl/IDirectCommandConfigurator";
export { DirectCommandMap } from "./robotlegs/bender/extensions/directCommandMap/impl/DirectCommandMap";
export { DirectCommandMapper } from "./robotlegs/bender/extensions/directCommandMap/impl/DirectCommandMapper";
export { DirectCommandMapExtension } from "./robotlegs/bender/extensions/directCommandMap/DirectCommandMapExtension";
export { ConsoleLogTarget } from "./robotlegs/bender/extensions/enhancedLogging/impl/ConsoleLogTarget";
export { LogMessageParser } from "./robotlegs/bender/extensions/enhancedLogging/impl/LogMessageParser";
export { ConsoleLoggingExtension } from "./robotlegs/bender/extensions/enhancedLogging/ConsoleLoggingExtension";
export { InjectableLoggerExtension } from "./robotlegs/bender/extensions/enhancedLogging/InjectableLoggerExtension";
export { IEventCommandMap } from "./robotlegs/bender/extensions/eventCommandMap/api/IEventCommandMap";
export { EventCommandMap } from "./robotlegs/bender/extensions/eventCommandMap/impl/EventCommandMap";
export { EventCommandTrigger } from "./robotlegs/bender/extensions/eventCommandMap/impl/EventCommandTrigger";
export { EventCommandMapExtension } from "./robotlegs/bender/extensions/eventCommandMap/EventCommandMapExtension";
export { EventRelay } from "./robotlegs/bender/extensions/eventDispatcher/impl/EventRelay";
export { LifecycleEventRelay } from "./robotlegs/bender/extensions/eventDispatcher/impl/LifecycleEventRelay";
export { EventDispatcherExtension } from "./robotlegs/bender/extensions/eventDispatcher/EventDispatcherExtension";
export { IEventMap } from "./robotlegs/bender/extensions/localEventMap/api/IEventMap";
export { DomEventMapConfig } from "./robotlegs/bender/extensions/localEventMap/impl/DomEventMapConfig";
export { EventMap } from "./robotlegs/bender/extensions/localEventMap/impl/EventMap";
export { EventMapConfig } from "./robotlegs/bender/extensions/localEventMap/impl/EventMapConfig";
export { LocalEventMapExtension } from "./robotlegs/bender/extensions/localEventMap/LocalEventMapExtension";
export { IClass } from "./robotlegs/bender/extensions/matching/IClass";
export { IType } from "./robotlegs/bender/extensions/matching/IType";
export { instanceOfType } from "./robotlegs/bender/extensions/matching/instanceOfType";
export { isInstanceOfType } from "./robotlegs/bender/extensions/matching/isInstanceOfType";
export { ITypeFilter } from "./robotlegs/bender/extensions/matching/ITypeFilter";
export { ITypeMatcher } from "./robotlegs/bender/extensions/matching/ITypeMatcher";
export { ITypeMatcherFactory } from "./robotlegs/bender/extensions/matching/ITypeMatcherFactory";
export { TypeFilter } from "./robotlegs/bender/extensions/matching/TypeFilter";
export { TypeMatcher } from "./robotlegs/bender/extensions/matching/TypeMatcher";
export { TypeMatcherError } from "./robotlegs/bender/extensions/matching/TypeMatcherError";
export { instanceOfType } from "./robotlegs/bender/extensions/matching/instanceOfType";
export { isInstanceOfType } from "./robotlegs/bender/extensions/matching/isInstanceOfType";
/**

@@ -89,0 +106,0 @@ * Bundles

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//
// NOTICE: You are permitted to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
// ------------------------------------------------------------------------------
Object.defineProperty(exports, "__esModule", { value: true });

@@ -7,4 +13,13 @@ /*

var inversify_1 = require("inversify");
exports.ContainerModule = inversify_1.ContainerModule;
exports.decorate = inversify_1.decorate;
exports.inject = inversify_1.inject;
exports.injectable = inversify_1.injectable;
exports.inject = inversify_1.inject;
exports.multiInject = inversify_1.multiInject;
exports.named = inversify_1.named;
exports.optional = inversify_1.optional;
exports.postConstruct = inversify_1.postConstruct;
exports.tagged = inversify_1.tagged;
exports.targetName = inversify_1.targetName;
exports.unmanaged = inversify_1.unmanaged;
var IContext_1 = require("./robotlegs/bender/framework/api/IContext");

@@ -45,2 +60,4 @@ exports.IContext = IContext_1.IContext;

exports.MessageDispatcher = MessageDispatcher_1.MessageDispatcher;
var MessageRunner_1 = require("./robotlegs/bender/framework/impl/MessageRunner");
exports.MessageRunner = MessageRunner_1.MessageRunner;
var ObjectProcessor_1 = require("./robotlegs/bender/framework/impl/ObjectProcessor");

@@ -98,5 +115,13 @@ exports.ObjectProcessor = ObjectProcessor_1.ObjectProcessor;

exports.IDirectCommandMap = IDirectCommandMap_1.IDirectCommandMap;
var DirectCommandMap_1 = require("./robotlegs/bender/extensions/directCommandMap/impl/DirectCommandMap");
exports.DirectCommandMap = DirectCommandMap_1.DirectCommandMap;
var DirectCommandMapper_1 = require("./robotlegs/bender/extensions/directCommandMap/impl/DirectCommandMapper");
exports.DirectCommandMapper = DirectCommandMapper_1.DirectCommandMapper;
var DirectCommandMapExtension_1 = require("./robotlegs/bender/extensions/directCommandMap/DirectCommandMapExtension");
exports.DirectCommandMapExtension = DirectCommandMapExtension_1.DirectCommandMapExtension;
// EnhancedLogging
var ConsoleLogTarget_1 = require("./robotlegs/bender/extensions/enhancedLogging/impl/ConsoleLogTarget");
exports.ConsoleLogTarget = ConsoleLogTarget_1.ConsoleLogTarget;
var LogMessageParser_1 = require("./robotlegs/bender/extensions/enhancedLogging/impl/LogMessageParser");
exports.LogMessageParser = LogMessageParser_1.LogMessageParser;
var ConsoleLoggingExtension_1 = require("./robotlegs/bender/extensions/enhancedLogging/ConsoleLoggingExtension");

@@ -109,5 +134,13 @@ exports.ConsoleLoggingExtension = ConsoleLoggingExtension_1.ConsoleLoggingExtension;

exports.IEventCommandMap = IEventCommandMap_1.IEventCommandMap;
var EventCommandMap_1 = require("./robotlegs/bender/extensions/eventCommandMap/impl/EventCommandMap");
exports.EventCommandMap = EventCommandMap_1.EventCommandMap;
var EventCommandTrigger_1 = require("./robotlegs/bender/extensions/eventCommandMap/impl/EventCommandTrigger");
exports.EventCommandTrigger = EventCommandTrigger_1.EventCommandTrigger;
var EventCommandMapExtension_1 = require("./robotlegs/bender/extensions/eventCommandMap/EventCommandMapExtension");
exports.EventCommandMapExtension = EventCommandMapExtension_1.EventCommandMapExtension;
// EventDispatcher
var EventRelay_1 = require("./robotlegs/bender/extensions/eventDispatcher/impl/EventRelay");
exports.EventRelay = EventRelay_1.EventRelay;
var LifecycleEventRelay_1 = require("./robotlegs/bender/extensions/eventDispatcher/impl/LifecycleEventRelay");
exports.LifecycleEventRelay = LifecycleEventRelay_1.LifecycleEventRelay;
var EventDispatcherExtension_1 = require("./robotlegs/bender/extensions/eventDispatcher/EventDispatcherExtension");

@@ -118,4 +151,17 @@ exports.EventDispatcherExtension = EventDispatcherExtension_1.EventDispatcherExtension;

exports.IEventMap = IEventMap_1.IEventMap;
var DomEventMapConfig_1 = require("./robotlegs/bender/extensions/localEventMap/impl/DomEventMapConfig");
exports.DomEventMapConfig = DomEventMapConfig_1.DomEventMapConfig;
var EventMap_1 = require("./robotlegs/bender/extensions/localEventMap/impl/EventMap");
exports.EventMap = EventMap_1.EventMap;
var EventMapConfig_1 = require("./robotlegs/bender/extensions/localEventMap/impl/EventMapConfig");
exports.EventMapConfig = EventMapConfig_1.EventMapConfig;
var LocalEventMapExtension_1 = require("./robotlegs/bender/extensions/localEventMap/LocalEventMapExtension");
exports.LocalEventMapExtension = LocalEventMapExtension_1.LocalEventMapExtension;
var TypeFilter_1 = require("./robotlegs/bender/extensions/matching/TypeFilter");
exports.TypeFilter = TypeFilter_1.TypeFilter;
var TypeMatcher_1 = require("./robotlegs/bender/extensions/matching/TypeMatcher");
exports.TypeMatcher = TypeMatcher_1.TypeMatcher;
var TypeMatcherError_1 = require("./robotlegs/bender/extensions/matching/TypeMatcherError");
exports.TypeMatcherError = TypeMatcherError_1.TypeMatcherError;
// Matching helpers
var instanceOfType_1 = require("./robotlegs/bender/extensions/matching/instanceOfType");

@@ -125,4 +171,2 @@ exports.instanceOfType = instanceOfType_1.instanceOfType;

exports.isInstanceOfType = isInstanceOfType_1.isInstanceOfType;
var TypeMatcher_1 = require("./robotlegs/bender/extensions/matching/TypeMatcher");
exports.TypeMatcher = TypeMatcher_1.TypeMatcher;
/**

@@ -129,0 +173,0 @@ * Bundles

2

lib/robotlegs/bender/bundles/mvcs/MVCSBundle.js
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

export interface IEvent {
type: string;
defaultPrevented?: boolean;
bubbles?: boolean;
cancelable?: boolean;
isDefaultPrevented?: boolean;
isPropagationStopped?: boolean;
isPropagationImmediateStopped?: boolean;
currentTarget?: any;
target?: any;
currentTarget?: any;
detail?: any;
data?: any;
preventDefault(): void;
stopPropagation(): void;
stopImmediatePropagation(): void;
}
export interface IEventInit {
bubbles?: boolean;
detail?: any;
}
"use strict";
//////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014-present, Egret Technology.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of the Egret nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA,
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////////////
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=IEvent.js.map
import { IEvent } from "./IEvent";
export declare let IEventDispatcher: symbol;
/**
* @language en_US
* The IEventDispatcher interface defines methods for adding or removing event listeners, checks whether specific types

@@ -20,6 +19,6 @@ * of event listeners are registered, and dispatches events. Event targets are an important part of the Egret event model.

* @includeExample egret/events/IEventDispatcher.ts
* @language en_US
*/
export interface IEventDispatcher {
/**
* @language en_US
* Registers an event listener object with an EventDispatcher object so that the listener receives notification of an

@@ -58,6 +57,6 @@ * event. You can register event listeners on all nodes in the display list for a specific type of event, phase,

* @platform Web,Native
* @language en_US
*/
addEventListener(type: string, listener: Function, thisObject?: any, useCapture?: boolean, priority?: number): void;
/**
* @language en_US
* Registers an event listener object with an EventDispatcher object so that the listener receives notification of an

@@ -83,6 +82,6 @@ * event. Different from the on() method,the listener receives notification only once,and then it will be removed

* @platform Web,Native
* @language en_US
*/
once(type: string, listener: Function, thisObject?: any, useCapture?: boolean, priority?: number): void;
/**
* @language en_US
* Removes a listener from the EventDispatcher object. If there is no matching listener registered with the

@@ -98,6 +97,6 @@ * EventDispatcher object, a call to this method has no effect.

* @platform Web,Native
* @language en_US
*/
removeEventListener(type: string, listener: Function, thisObject?: any, useCapture?: boolean): void;
/**
* @language en_US
* Checks whether the EventDispatcher object has any listeners registered for a specific type of event. This allows

@@ -113,6 +112,6 @@ * you to determine where an EventDispatcher object has altered handling of an event type in the event flow hierarchy.

* @platform Web,Native
* @language en_US
*/
hasEventListener(type: string): boolean;
/**
* @language en_US
* Dispatches an event into the event flow. The event target is the EventDispatcher object upon which dispatchEvent() is called.

@@ -123,6 +122,6 @@ * @param event The event object dispatched into the event flow.

* @platform Web,Native
* @language en_US
*/
dispatchEvent(event: IEvent): boolean;
/**
* @language en_US
* Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the

@@ -136,4 +135,5 @@ * specified event type. This method returns true if an event listener is triggered during any phase of the event

* @platform Web,Native
* @language en_US
*/
willTrigger(type: string): boolean;
}

@@ -1,12 +0,169 @@

import { IEvent, IEventInit } from "../api/IEvent";
import { IEvent } from "../api/IEvent";
/**
* The Event class is used as the base class for the creation of Event objects, which are passed as parameters to event
* listeners when an event occurs.The properties of the Event class carry basic information about an event, such as
* the event's type or whether the event's default behavior can be canceled. For many events, such as the events represented
* by the Event class constants, this basic information is sufficient. Other events, however, may require more detailed
* information. Events associated with a touch tap, for example, need to include additional information about the
* location of the touch event. You can pass such additional information to event listeners by extending the Event class,
* which is what the TouchEvent class does. Egret API defines several Event subclasses for common events that require
* additional information. Events associated with each of the Event subclasses are described in the documentation for
* each class.The methods of the Event class can be used in event listener functions to affect the behavior of the event
* object. Some events have an associated default behavior. Your event listener can cancel this behavior by calling the
* preventDefault() method. You can also make the current event listener the last one to process an event by calling
* the stopPropagation() or stopImmediatePropagation() method.
* @see egret.EventDispatcher
* @version Egret 2.4
* @platform Web,Native
* @includeExample egret/events/Event.ts
* @see http://edn.egret.com/cn/docs/page/798 取消触摸事件
* @language en_US
*/
export declare class Event implements IEvent {
type: string;
defaultPrevented: boolean;
bubbles: boolean;
detail: any;
target: any;
currentTarget: any;
constructor(type: string, eventInit?: IEventInit);
/**
* @private
*/
private _type;
/**
* @private
*/
private _bubbles;
/**
* @private
*/
private _cancelable;
/**
* @private
*/
private _currentTarget;
/**
* @private
*/
private _target;
/**
* @private
*/
private _isDefaultPrevented;
/**
* @private
*/
private _isPropagationStopped;
/**
* @private
*/
private _isPropagationImmediateStopped;
/**
* @private
*/
private _data;
/**
* Creates an Event object to pass as a parameter to event listeners.
* @param type The type of the event, accessible as Event.type.
* @param bubbles Determines whether the Event object participates in the bubbling stage of the event flow. The default value is false.
* @param cancelable Determines whether the Event object can be canceled. The default values is false.
* @param data the optional data associated with this event
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
constructor(type: string, bubbles?: boolean, cancelable?: boolean, data?: any);
/**
* Cancels an event's default behavior if that behavior can be canceled.Many events have associated behaviors that
* are carried out by default. For example, if a user types a character into a text input, the default behavior
* is that the character is displayed in the text input. Because the TextEvent.TEXT_INPUT event's default behavior
* can be canceled, you can use the preventDefault() method to prevent the character from appearing.
* You can use the Event.cancelable property to check whether you can prevent the default behavior associated with
* a particular event. If the value of Event.cancelable is true, then preventDefault() can be used to cancel the event;
* otherwise, preventDefault() has no effect.
* @see #cancelable
* @see #isDefaultPrevented
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
preventDefault(): void;
/**
* Prevents processing of any event listeners in nodes subsequent to the current node in the event flow. This method
* does not affect any event listeners in the current node (currentTarget). In contrast, the stopImmediatePropagation()
* method prevents processing of event listeners in both the current node and subsequent nodes. Additional calls to this
* method have no effect. This method can be called in any phase of the event flow.<br/>
* Note: This method does not cancel the behavior associated with this event; see preventDefault() for that functionality.
* @see #stopImmediatePropagation()
* @see #preventDefault()
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
stopPropagation(): void;
/**
* Prevents processing of any event listeners in the current node and any subsequent nodes in the event flow.
* This method takes effect immediately, and it affects event listeners in the current node. In contrast, the
* stopPropagation() method doesn't take effect until all the event listeners in the current node finish processing.<br/>
* Note: This method does not cancel the behavior associated with this event; see preventDefault() for that functionality.
* @see #stopPropagation()
* @see #preventDefault()
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
stopImmediatePropagation(): void;
/**
* The type of event. The type is case-sensitive.
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
readonly type: string;
/**
* Indicates whether an event is a bubbling event.
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
readonly bubbles: boolean;
/**
* Indicates whether the behavior associated with the event can be prevented. If the behavior can be
* canceled, this value is true; otherwise it is false.
* @see #preventDefault()
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
readonly cancelable: boolean;
/**
* Checks whether the preventDefault() method has been called on the event. If the preventDefault() method has been
* called, returns true; otherwise, returns false.
* @returns If preventDefault() has been called, returns true; otherwise, returns false.
* @see #preventDefault()
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
readonly isDefaultPrevented: boolean;
readonly isPropagationStopped: boolean;
readonly isPropagationImmediateStopped: boolean;
/**
* The object that is actively processing the Event object with an event listener. For example, if a
* user clicks an OK button, the current target could be the node containing that button or one of its ancestors
* that has registered an event listener for that event.
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
currentTarget: any;
/**
* The event target. This property contains the target node. For example, if a user clicks an OK button,
* the target node is the display list node containing that button.
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
target: any;
/**
* the optional data associated with this event
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
data: any;
}
"use strict";
//////////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2014-present, Egret Technology.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of the Egret nor the
// names of its contributors may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
// OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA,
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
//////////////////////////////////////////////////////////////////////////////////////
Object.defineProperty(exports, "__esModule", { value: true });
/**
* The Event class is used as the base class for the creation of Event objects, which are passed as parameters to event
* listeners when an event occurs.The properties of the Event class carry basic information about an event, such as
* the event's type or whether the event's default behavior can be canceled. For many events, such as the events represented
* by the Event class constants, this basic information is sufficient. Other events, however, may require more detailed
* information. Events associated with a touch tap, for example, need to include additional information about the
* location of the touch event. You can pass such additional information to event listeners by extending the Event class,
* which is what the TouchEvent class does. Egret API defines several Event subclasses for common events that require
* additional information. Events associated with each of the Event subclasses are described in the documentation for
* each class.The methods of the Event class can be used in event listener functions to affect the behavior of the event
* object. Some events have an associated default behavior. Your event listener can cancel this behavior by calling the
* preventDefault() method. You can also make the current event listener the last one to process an event by calling
* the stopPropagation() or stopImmediatePropagation() method.
* @see egret.EventDispatcher
* @version Egret 2.4
* @platform Web,Native
* @includeExample egret/events/Event.ts
* @see http://edn.egret.com/cn/docs/page/798 取消触摸事件
* @language en_US
*/
var Event = /** @class */ (function () {
function Event(type, eventInit) {
if (eventInit === void 0) { eventInit = { bubbles: false }; }
this.type = type;
this.defaultPrevented = false;
this.bubbles = eventInit.bubbles;
this.detail = eventInit.detail;
/**
* Creates an Event object to pass as a parameter to event listeners.
* @param type The type of the event, accessible as Event.type.
* @param bubbles Determines whether the Event object participates in the bubbling stage of the event flow. The default value is false.
* @param cancelable Determines whether the Event object can be canceled. The default values is false.
* @param data the optional data associated with this event
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
function Event(type, bubbles, cancelable, data) {
/**
* @private
*/
this._isDefaultPrevented = false;
/**
* @private
*/
this._isPropagationStopped = false;
/**
* @private
*/
this._isPropagationImmediateStopped = false;
this._type = type;
this._bubbles = !!bubbles;
this._cancelable = !!cancelable;
this._data = data;
}
/**
* Cancels an event's default behavior if that behavior can be canceled.Many events have associated behaviors that
* are carried out by default. For example, if a user types a character into a text input, the default behavior
* is that the character is displayed in the text input. Because the TextEvent.TEXT_INPUT event's default behavior
* can be canceled, you can use the preventDefault() method to prevent the character from appearing.
* You can use the Event.cancelable property to check whether you can prevent the default behavior associated with
* a particular event. If the value of Event.cancelable is true, then preventDefault() can be used to cancel the event;
* otherwise, preventDefault() has no effect.
* @see #cancelable
* @see #isDefaultPrevented
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
Event.prototype.preventDefault = function () {
this.defaultPrevented = true;
if (this._cancelable) {
this._isDefaultPrevented = true;
}
};
/**
* Prevents processing of any event listeners in nodes subsequent to the current node in the event flow. This method
* does not affect any event listeners in the current node (currentTarget). In contrast, the stopImmediatePropagation()
* method prevents processing of event listeners in both the current node and subsequent nodes. Additional calls to this
* method have no effect. This method can be called in any phase of the event flow.<br/>
* Note: This method does not cancel the behavior associated with this event; see preventDefault() for that functionality.
* @see #stopImmediatePropagation()
* @see #preventDefault()
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
Event.prototype.stopPropagation = function () {
this.bubbles = false;
if (this._bubbles) {
this._isPropagationStopped = true;
}
};
/**
* Prevents processing of any event listeners in the current node and any subsequent nodes in the event flow.
* This method takes effect immediately, and it affects event listeners in the current node. In contrast, the
* stopPropagation() method doesn't take effect until all the event listeners in the current node finish processing.<br/>
* Note: This method does not cancel the behavior associated with this event; see preventDefault() for that functionality.
* @see #stopPropagation()
* @see #preventDefault()
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
Event.prototype.stopImmediatePropagation = function () {
if (this._bubbles) {
this._isPropagationImmediateStopped = true;
}
};
Object.defineProperty(Event.prototype, "type", {
/**
* The type of event. The type is case-sensitive.
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
get: function () {
return this._type;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Event.prototype, "bubbles", {
/**
* Indicates whether an event is a bubbling event.
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
get: function () {
return this._bubbles;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Event.prototype, "cancelable", {
/**
* Indicates whether the behavior associated with the event can be prevented. If the behavior can be
* canceled, this value is true; otherwise it is false.
* @see #preventDefault()
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
get: function () {
return this._cancelable;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Event.prototype, "isDefaultPrevented", {
/**
* Checks whether the preventDefault() method has been called on the event. If the preventDefault() method has been
* called, returns true; otherwise, returns false.
* @returns If preventDefault() has been called, returns true; otherwise, returns false.
* @see #preventDefault()
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
get: function () {
return this._isDefaultPrevented;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Event.prototype, "isPropagationStopped", {
get: function () {
return this._isPropagationStopped;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Event.prototype, "isPropagationImmediateStopped", {
get: function () {
return this._isPropagationImmediateStopped;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Event.prototype, "currentTarget", {
/**
* The object that is actively processing the Event object with an event listener. For example, if a
* user clicks an OK button, the current target could be the node containing that button or one of its ancestors
* that has registered an event listener for that event.
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
get: function () {
return this._currentTarget;
},
set: function (value) {
this._currentTarget = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Event.prototype, "target", {
/**
* The event target. This property contains the target node. For example, if a user clicks an OK button,
* the target node is the display list node containing that button.
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
get: function () {
return this._target;
},
set: function (value) {
this._target = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Event.prototype, "data", {
/**
* the optional data associated with this event
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
get: function () {
return this._data;
},
set: function (value) {
this._data = value;
},
enumerable: true,
configurable: true
});
return Event;

@@ -18,0 +255,0 @@ }());

@@ -6,3 +6,3 @@ import { IEvent } from "../api/IEvent";

*/
export interface EventBin {
export interface IEventBin {
type: string;

@@ -16,5 +16,29 @@ listener: Function;

}
/**
* The EventDispatcher class is the base class for all classes that dispatchEvent events. The EventDispatcher class implements
* the IEventDispatcher interface and is the base class for the DisplayObject class. The EventDispatcher class allows
* any object on the display list to be an event target and as such, to use the methods of the IEventDispatcher interface.
* Event targets are an important part of the Egret event model. The event target serves as the focal point for how events
* flow through the display list hierarchy. When an event such as a touch tap, Egret dispatches an event object into the
* event flow from the root of the display list. The event object then makes its way through the display list until it
* reaches the event target, at which point it begins its return trip through the display list. This round-trip journey
* to the event target is conceptually divided into three phases: <br/>
* the capture phase comprises the journey from the root to the last node before the event target's node, the target
* phase comprises only the event target node, and the bubbling phase comprises any subsequent nodes encountered on
* the return trip to the root of the display list. In general, the easiest way for a user-defined class to gain event
* dispatching capabilities is to extend EventDispatcher. If this is impossible (that is, if the class is already extending
* another class), you can instead implement the IEventDispatcher interface, create an EventDispatcher member, and write simple
* hooks to route calls into the aggregated EventDispatcher.
* @see egret.IEventDispatcher
* @version Egret 2.4
* @platform Web,Native
* @includeExample egret/events/EventDispatcher.ts
* @language en_US
*/
export declare class EventDispatcher implements IEventDispatcher {
/**
* @language en_US
* @private
*/
private _eventDispatcher;
/**
* create an instance of the EventDispatcher class.

@@ -26,15 +50,6 @@ * @param target The target object for events dispatched to the EventDispatcher object. This parameter is used when

* @platform Web,Native
* @language en_US
*/
constructor(target?: IEventDispatcher);
/**
* @private
*/
$EventDispatcher: Object;
/**
* @private
*
* @param useCapture
*/
$getEventMap(useCapture?: boolean): any;
/**
* @inheritDoc

@@ -52,7 +67,2 @@ * @version Egret 2.4

/**
* @private
*/
$addListener(type: string, listener: Function, thisObject?: any, useCapture?: boolean, priority?: number, dispatchOnce?: boolean): void;
$insertEventBin(list: Array<any>, type: string, listener: Function, thisObject?: any, useCapture?: boolean, priority?: number, dispatchOnce?: boolean): boolean;
/**
* @inheritDoc

@@ -63,3 +73,2 @@ * @version Egret 2.4

removeEventListener(type: string, listener: Function, thisObject?: any, useCapture?: boolean): void;
$removeEventBin(list: Array<any>, listener: Function, thisObject?: any): boolean;
/**

@@ -84,7 +93,2 @@ * @inheritDoc

/**
* @private
*/
$notifyListener(event: IEvent, capturePhase: boolean): boolean;
/**
* @language en_US
* Distribute a specified event parameters.

@@ -95,6 +99,30 @@ * @param type The type of the event. Event listeners can access this information through the inherited type property.

* @param data {any} data
* @param cancelable Determines whether the Event object can be canceled. The default values is false.
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
dispatchEventWith(type: string, bubbles?: boolean, data?: any): boolean;
dispatchEventWith(type: string, bubbles?: boolean, data?: any, cancelable?: boolean): boolean;
/**
* @private
*
* @param useCapture
*/
private _getEventMap;
/**
* @private
*/
private _addListener;
/**
* @private
*/
private _insertEventBin;
/**
* @private
*/
private _removeEventBin;
/**
* @private
*/
private _notifyListener;
}

@@ -30,12 +30,4 @@ "use strict";

//////////////////////////////////////////////////////////////////////////////////////
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var inversify_1 = require("inversify");

@@ -45,5 +37,25 @@ var IEventDispatcher_1 = require("../api/IEventDispatcher");

var ONCE_EVENT_LIST = [];
/**
* The EventDispatcher class is the base class for all classes that dispatchEvent events. The EventDispatcher class implements
* the IEventDispatcher interface and is the base class for the DisplayObject class. The EventDispatcher class allows
* any object on the display list to be an event target and as such, to use the methods of the IEventDispatcher interface.
* Event targets are an important part of the Egret event model. The event target serves as the focal point for how events
* flow through the display list hierarchy. When an event such as a touch tap, Egret dispatches an event object into the
* event flow from the root of the display list. The event object then makes its way through the display list until it
* reaches the event target, at which point it begins its return trip through the display list. This round-trip journey
* to the event target is conceptually divided into three phases: <br/>
* the capture phase comprises the journey from the root to the last node before the event target's node, the target
* phase comprises only the event target node, and the bubbling phase comprises any subsequent nodes encountered on
* the return trip to the root of the display list. In general, the easiest way for a user-defined class to gain event
* dispatching capabilities is to extend EventDispatcher. If this is impossible (that is, if the class is already extending
* another class), you can instead implement the IEventDispatcher interface, create an EventDispatcher member, and write simple
* hooks to route calls into the aggregated EventDispatcher.
* @see egret.IEventDispatcher
* @version Egret 2.4
* @platform Web,Native
* @includeExample egret/events/EventDispatcher.ts
* @language en_US
*/
var EventDispatcher = /** @class */ (function () {
/**
* @language en_US
* create an instance of the EventDispatcher class.

@@ -55,6 +67,7 @@ * @param target The target object for events dispatched to the EventDispatcher object. This parameter is used when

* @platform Web,Native
* @language en_US
*/
function EventDispatcher(target) {
if (target === void 0) { target = null; }
this.$EventDispatcher = {
this._eventDispatcher = {
0: target ? target : this,

@@ -67,10 +80,8 @@ 1: {},

/**
* @private
*
* @param useCapture
* @inheritDoc
* @version Egret 2.4
* @platform Web,Native
*/
EventDispatcher.prototype.$getEventMap = function (useCapture) {
var values = this.$EventDispatcher;
var eventMap = useCapture ? values[2 /* captureEventsMap */] : values[1 /* eventsMap */];
return eventMap;
EventDispatcher.prototype.addEventListener = function (type, listener, thisObject, useCapture, priority) {
this._addListener(type, listener, thisObject, useCapture, priority);
};

@@ -82,4 +93,4 @@ /**

*/
EventDispatcher.prototype.addEventListener = function (type, listener, thisObject, useCapture, priority) {
this.$addListener(type, listener, thisObject, useCapture, priority);
EventDispatcher.prototype.once = function (type, listener, thisObject, useCapture, priority) {
this._addListener(type, listener, thisObject, useCapture, priority, true);
};

@@ -91,11 +102,79 @@ /**

*/
EventDispatcher.prototype.once = function (type, listener, thisObject, useCapture, priority) {
this.$addListener(type, listener, thisObject, useCapture, priority, true);
EventDispatcher.prototype.removeEventListener = function (type, listener, thisObject, useCapture) {
var values = this._eventDispatcher;
var eventMap = this._getEventMap(useCapture);
var list = eventMap[type];
if (!list) {
return;
}
if (values[3 /* notifyLevel */] !== 0) {
eventMap[type] = list = list.concat();
}
this._removeEventBin(list, listener, thisObject);
if (list.length === 0) {
eventMap[type] = null;
}
};
/**
* @inheritDoc
* @version Egret 2.4
* @platform Web,Native
*/
EventDispatcher.prototype.hasEventListener = function (type) {
var values = this._eventDispatcher;
return !!(values[1 /* eventsMap */][type] || values[2 /* captureEventsMap */][type]);
};
/**
* @inheritDoc
* @version Egret 2.4
* @platform Web,Native
*/
EventDispatcher.prototype.willTrigger = function (type) {
return this.hasEventListener(type);
};
/**
* @inheritDoc
* @version Egret 2.4
* @platform Web,Native
*/
EventDispatcher.prototype.dispatchEvent = function (event) {
event.currentTarget = this._eventDispatcher[0 /* eventTarget */];
event.target = event.currentTarget;
return this._notifyListener(event, false);
};
/**
* Distribute a specified event parameters.
* @param type The type of the event. Event listeners can access this information through the inherited type property.
* @param bubbles Determines whether the Event object bubbles. Event listeners can access this information through
* the inherited bubbles property.
* @param data {any} data
* @param cancelable Determines whether the Event object can be canceled. The default values is false.
* @version Egret 2.4
* @platform Web,Native
* @language en_US
*/
EventDispatcher.prototype.dispatchEventWith = function (type, bubbles, data, cancelable) {
if (bubbles || this.hasEventListener(type)) {
var event_1 = new Event_1.Event(type, bubbles, cancelable, data);
var result = this.dispatchEvent(event_1);
return result;
}
return true;
};
/**
* @private
*
* @param useCapture
*/
EventDispatcher.prototype.$addListener = function (type, listener, thisObject, useCapture, priority, dispatchOnce) {
var values = this.$EventDispatcher;
EventDispatcher.prototype._getEventMap = function (useCapture) {
var values = this._eventDispatcher;
var eventMap = useCapture ? values[2 /* captureEventsMap */] : values[1 /* eventsMap */];
return eventMap;
};
/**
* @private
*/
EventDispatcher.prototype._addListener = function (type, listener, thisObject, useCapture, priority, dispatchOnce) {
var values = this._eventDispatcher;
var eventMap = this._getEventMap(useCapture);
var list = eventMap[type];

@@ -108,6 +187,9 @@ if (!list) {

}
this.$insertEventBin(list, type, listener, thisObject, useCapture, priority, dispatchOnce);
this._insertEventBin(list, type, listener, thisObject, useCapture, priority, dispatchOnce);
};
EventDispatcher.prototype.$insertEventBin = function (list, type, listener, thisObject, useCapture, priority, dispatchOnce) {
priority = +priority | 0;
/**
* @private
*/
EventDispatcher.prototype._insertEventBin = function (list, type, listener, thisObject, useCapture, priority, dispatchOnce) {
priority = priority || 0;
var insertIndex = -1;

@@ -117,6 +199,6 @@ var length = list.length;

var bin = list[i];
if (bin.listener == listener && bin.thisObject == thisObject && bin.target == this) {
if (bin.listener === listener && bin.thisObject === thisObject && bin.target === this) {
return false;
}
if (insertIndex == -1 && bin.priority < priority) {
if (insertIndex === -1 && bin.priority < priority) {
insertIndex = i;

@@ -143,26 +225,9 @@ }

/**
* @inheritDoc
* @version Egret 2.4
* @platform Web,Native
* @private
*/
EventDispatcher.prototype.removeEventListener = function (type, listener, thisObject, useCapture) {
var values = this.$EventDispatcher;
var eventMap = useCapture ? values[2 /* captureEventsMap */] : values[1 /* eventsMap */];
var list = eventMap[type];
if (!list) {
return;
}
if (values[3 /* notifyLevel */] !== 0) {
eventMap[type] = list = list.concat();
}
this.$removeEventBin(list, listener, thisObject);
if (list.length == 0) {
eventMap[type] = null;
}
};
EventDispatcher.prototype.$removeEventBin = function (list, listener, thisObject) {
EventDispatcher.prototype._removeEventBin = function (list, listener, thisObject) {
var length = list.length;
for (var i = 0; i < length; i++) {
var bin = list[i];
if (bin.listener == listener && bin.thisObject == thisObject && bin.target == this) {
if (bin.listener === listener && bin.thisObject === thisObject && bin.target === this) {
list.splice(i, 1);

@@ -175,34 +240,7 @@ return true;

/**
* @inheritDoc
* @version Egret 2.4
* @platform Web,Native
*/
EventDispatcher.prototype.hasEventListener = function (type) {
var values = this.$EventDispatcher;
return !!(values[1 /* eventsMap */][type] || values[2 /* captureEventsMap */][type]);
};
/**
* @inheritDoc
* @version Egret 2.4
* @platform Web,Native
*/
EventDispatcher.prototype.willTrigger = function (type) {
return this.hasEventListener(type);
};
/**
* @inheritDoc
* @version Egret 2.4
* @platform Web,Native
*/
EventDispatcher.prototype.dispatchEvent = function (event) {
event.currentTarget = this.$EventDispatcher[0 /* eventTarget */];
event.target = event.currentTarget;
return this.$notifyListener(event, false);
};
/**
* @private
*/
EventDispatcher.prototype.$notifyListener = function (event, capturePhase) {
var values = this.$EventDispatcher;
var eventMap = capturePhase ? values[2 /* captureEventsMap */] : values[1 /* eventsMap */];
EventDispatcher.prototype._notifyListener = function (event, capturePhase) {
var values = this._eventDispatcher;
var eventMap = this._getEventMap(capturePhase);
var list = eventMap[event.type];

@@ -213,3 +251,3 @@ if (!list) {

var length = list.length;
if (length == 0) {
if (length === 0) {
return true;

@@ -225,3 +263,3 @@ }

}
if (event.defaultPrevented) {
if (event.isPropagationImmediateStopped) {
break;

@@ -232,31 +270,10 @@ }

while (onceList.length) {
eventBin = onceList.pop();
var eventBin = onceList.pop();
eventBin.target.removeEventListener(eventBin.type, eventBin.listener, eventBin.thisObject, eventBin.useCapture);
}
return !event.defaultPrevented;
return !event.isDefaultPrevented;
};
/**
* @language en_US
* Distribute a specified event parameters.
* @param type The type of the event. Event listeners can access this information through the inherited type property.
* @param bubbles Determines whether the Event object bubbles. Event listeners can access this information through
* the inherited bubbles property.
* @param data {any} data
* @version Egret 2.4
* @platform Web,Native
*/
EventDispatcher.prototype.dispatchEventWith = function (type, bubbles, data) {
if (bubbles || this.hasEventListener(type)) {
var event = new Event_1.Event(type, {
bubbles: bubbles,
detail: data
});
var result = this.dispatchEvent(event);
return result;
}
return true;
};
EventDispatcher = __decorate([
EventDispatcher = tslib_1.__decorate([
inversify_1.injectable(),
__metadata("design:paramtypes", [Object])
tslib_1.__metadata("design:paramtypes", [Object])
], EventDispatcher);

@@ -263,0 +280,0 @@ return EventDispatcher;

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

@@ -27,4 +27,4 @@ import { ICommandExecutor } from "../api/ICommandExecutor";

executeCommand(mapping: ICommandMapping, payload?: CommandPayload): void;
private mapPayload(payload);
private unmapPayload(payload);
private mapPayload;
private unmapPayload;
}
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -63,5 +63,5 @@ // NOTICE: You are permitted to use, modify, and distribute this file

}
var _a;
(_a = this._mapping).addGuards.apply(_a, guards);
return this;
var _a;
};

@@ -76,5 +76,5 @@ /**

}
var _a;
(_a = this._mapping).addHooks.apply(_a, hooks);
return this;
var _a;
};

@@ -81,0 +81,0 @@ /**

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

@@ -50,7 +50,7 @@ import { IClass } from "../../matching/IClass";

removeAllMappings(): void;
private storeMapping(mapping);
private deleteMapping(mapping);
private overwriteMapping(oldMapping, newMapping);
private sortMappings();
private applyProcessors(mapping);
private storeMapping;
private deleteMapping;
private overwriteMapping;
private sortMappings;
private applyProcessors;
}
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

@@ -23,5 +23,5 @@ import { ICommandTrigger } from "../api/ICommandTrigger";

removeTrigger(...params: any[]): ICommandTrigger;
private getKey(mapperArgs);
private createTrigger(mapperArgs);
private destroyTrigger(key);
private getKey;
private createTrigger;
private destroyTrigger;
}
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -8,15 +8,4 @@ // NOTICE: You are permitted to use, modify, and distribute this file

// ------------------------------------------------------------------------------
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var inversify_1 = require("inversify");

@@ -89,6 +78,6 @@ var IContext_1 = require("../../../framework/api/IContext");

};
DirectCommandMap = __decorate([
DirectCommandMap = tslib_1.__decorate([
inversify_1.injectable(),
__param(0, inversify_1.inject(IContext_1.IContext)),
__metadata("design:paramtypes", [Object])
tslib_1.__param(0, inversify_1.inject(IContext_1.IContext)),
tslib_1.__metadata("design:paramtypes", [Object])
], DirectCommandMap);

@@ -95,0 +84,0 @@ return DirectCommandMap;

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -38,5 +38,5 @@ // NOTICE: You are permitted to use, modify, and distribute this file

}
var _a;
(_a = this._mapping).addGuards.apply(_a, guards);
return this;
var _a;
};

@@ -51,5 +51,5 @@ /**

}
var _a;
(_a = this._mapping).addHooks.apply(_a, hooks);
return this;
var _a;
};

@@ -56,0 +56,0 @@ /**

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

@@ -33,5 +33,5 @@ import { IContext } from "../../../framework/api/IContext";

addMappingProcessor(handler: Function): IEventCommandMap;
private getKey(type, eventClass);
private getTrigger(type, eventClass);
private createTrigger(type, eventClass);
private getKey;
private getTrigger;
private createTrigger;
}
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -8,15 +8,4 @@ // NOTICE: You are permitted to use, modify, and distribute this file

// ------------------------------------------------------------------------------
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var inversify_1 = require("inversify");

@@ -83,6 +72,6 @@ var IContext_1 = require("../../../framework/api/IContext");

};
EventCommandMap = __decorate([
EventCommandMap = tslib_1.__decorate([
inversify_1.injectable(),
__param(0, inversify_1.inject(IContext_1.IContext)), __param(1, inversify_1.inject(IEventDispatcher_1.IEventDispatcher)),
__metadata("design:paramtypes", [Object, Object])
tslib_1.__param(0, inversify_1.inject(IContext_1.IContext)), tslib_1.__param(1, inversify_1.inject(IEventDispatcher_1.IEventDispatcher)),
tslib_1.__metadata("design:paramtypes", [Object, Object])
], EventCommandMap);

@@ -89,0 +78,0 @@ return EventCommandMap;

@@ -34,3 +34,3 @@ import { IInjector } from "../../../framework/api/IInjector";

toString(): string;
private eventHandler(event);
private eventHandler;
}
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

@@ -20,4 +20,4 @@ import { IContext } from "../../framework/api/IContext";

extend(context: IContext): void;
private configureLifecycleEventRelay();
private destroyLifecycleEventRelay();
private configureLifecycleEventRelay;
private destroyLifecycleEventRelay;
}
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

@@ -37,6 +37,6 @@ import { IEventDispatcher } from "../../../events/api/IEventDispatcher";

removeType(eventType: string): void;
private addListener(type);
private removeListener(type);
private addListeners();
private removeListeners();
private addListener;
private removeListener;
private addListeners;
private removeListeners;
}
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

@@ -18,3 +18,4 @@ import { IEvent } from "../../../events/api/IEvent";

*/
mapListener(dispatcher: IEventDispatcher, eventString: string, listener: Function, thisObject?: any, eventClass?: IClass<IEvent>, useCapture?: boolean, priority?: number): void;
mapListener(dispatcher: IEventDispatcher, eventString: string, listener: Function, thisObject?: any, eventClass?: IClass<IEvent>, useCapture?: boolean, // Not used in browser environment
priority?: number): void;
/**

@@ -21,0 +22,0 @@ * @inheritDoc

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -8,9 +8,4 @@ // NOTICE: You are permitted to use, modify, and distribute this file

// ------------------------------------------------------------------------------
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var inversify_1 = require("inversify");

@@ -226,3 +221,3 @@ var Event_1 = require("../../../events/impl/Event");

};
EventMap = __decorate([
EventMap = tslib_1.__decorate([
inversify_1.injectable()

@@ -229,0 +224,0 @@ ], EventMap);

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -14,11 +14,2 @@ // NOTICE: You are permitted to use, modify, and distribute this file

/**
* Creates a matcher that matches objects of the given type
* @param type The type to match
* @return A matcher
*/
function instanceOfType(type) {
return new InstanceOfTypeMatcher(type);
}
exports.instanceOfType = instanceOfType;
/**
* @private

@@ -51,2 +42,11 @@ */

}());
/**
* Creates a matcher that matches objects of the given type
* @param type The type to match
* @return A matcher
*/
function instanceOfType(type) {
return new InstanceOfTypeMatcher(type);
}
exports.instanceOfType = instanceOfType;
//# sourceMappingURL=instanceOfType.js.map
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -8,13 +8,4 @@ // NOTICE: You are permitted to use, modify, and distribute this file

// ------------------------------------------------------------------------------
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
/**

@@ -24,3 +15,3 @@ * Type Matcher Error

var TypeMatcherError = /** @class */ (function (_super) {
__extends(TypeMatcherError, _super);
tslib_1.__extends(TypeMatcherError, _super);
/*============================================================================*/

@@ -39,4 +30,3 @@ /* Constructor */

/*============================================================================*/
TypeMatcherError.EMPTY_MATCHER = "An empty matcher will create a filter which matches nothing. " +
"You should specify at least one condition for the filter.";
TypeMatcherError.EMPTY_MATCHER = "An empty matcher will create a filter which matches nothing. " + "You should specify at least one condition for the filter.";
TypeMatcherError.SEALED_MATCHER = "This matcher has been sealed and can no longer be configured.";

@@ -43,0 +33,0 @@ return TypeMatcherError;

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

@@ -0,1 +1,4 @@

import { IBundle } from "./IBundle";
import { IConfig } from "./IConfig";
import { IExtension } from "./IExtension";
import { IInjector } from "./IInjector";

@@ -6,2 +9,3 @@ import { ILogger } from "./ILogger";

import { IEventDispatcher } from "../../events/api/IEventDispatcher";
import { IClass } from "../../extensions/matching/IClass";
/**

@@ -49,3 +53,3 @@ * The Robotlegs context contract

*/
install(...extensions: any[]): IContext;
install(...extensions: Array<IBundle | IClass<IBundle> | IExtension | IClass<IExtension>>): IContext;
/**

@@ -56,3 +60,3 @@ * Configures the context with custom configurations

*/
configure(...configs: any[]): IContext;
configure(...configs: Array<IConfig | IClass<IConfig>>): IContext;
/**

@@ -59,0 +63,0 @@ * Adds an uninitialized context as a child

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -8,13 +8,4 @@ // NOTICE: You are permitted to use, modify, and distribute this file

// ------------------------------------------------------------------------------
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
/**

@@ -24,3 +15,3 @@ * Lifecycle Error

var LifecycleError = /** @class */ (function (_super) {
__extends(LifecycleError, _super);
tslib_1.__extends(LifecycleError, _super);
/*============================================================================*/

@@ -27,0 +18,0 @@ /* Constructor */

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -8,13 +8,4 @@ // NOTICE: You are permitted to use, modify, and distribute this file

// ------------------------------------------------------------------------------
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var Event_1 = require("../../events/impl/Event");

@@ -25,3 +16,3 @@ /**

var PinEvent = /** @class */ (function (_super) {
__extends(PinEvent, _super);
tslib_1.__extends(PinEvent, _super);
/*============================================================================*/

@@ -28,0 +19,0 @@ /* Constructor */

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -26,4 +26,4 @@ // NOTICE: You are permitted to use, modify, and distribute this file

function applyHooks(hooks, injector) {
for (var i = 0; i < hooks.length; i++) {
var hook = hooks[i];
for (var _i = 0, hooks_1 = hooks; _i < hooks_1.length; _i++) {
var hook = hooks_1[_i];
if (typeof hook === "function" && hook.prototype.hook === undefined) {

@@ -30,0 +30,0 @@ hook();

@@ -39,8 +39,8 @@ import { IContext } from "../api/IContext";

destroy(): void;
private initialize(event);
private handleClass(type);
private handleObject(object);
private processQueue();
private processClass(type);
private processObject(object);
private initialize;
private handleClass;
private handleObject;
private processQueue;
private processClass;
private processObject;
}
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -10,2 +10,4 @@ // NOTICE: You are permitted to use, modify, and distribute this file

var LifecycleEvent_1 = require("../api/LifecycleEvent");
var ClassMatcher_1 = require("./ClassMatcher");
var ObjectMatcher_1 = require("./ObjectMatcher");
var ObjectProcessor_1 = require("./ObjectProcessor");

@@ -39,4 +41,4 @@ var instantiateUnmapped_1 = require("./instantiateUnmapped");

this._logger = context.getLogger(this);
this.addConfigHandler(new ClassMatcher(), this.handleClass.bind(this));
this.addConfigHandler(new ObjectMatcher(), this.handleObject.bind(this));
this.addConfigHandler(new ClassMatcher_1.ClassMatcher(), this.handleClass.bind(this));
this.addConfigHandler(new ObjectMatcher_1.ObjectMatcher(), this.handleObject.bind(this));
// The ConfigManager should process the config queue

@@ -139,36 +141,2 @@ // at the end of the INITIALIZE phase,

exports.ConfigManager = ConfigManager;
/**
* @private
*/
var ClassMatcher = /** @class */ (function () {
function ClassMatcher() {
}
/*============================================================================*/
/* Public Functions */
/*============================================================================*/
/**
* @private
*/
ClassMatcher.prototype.matches = function (item) {
return typeof item === "function";
};
return ClassMatcher;
}());
/**
* @private
*/
var ObjectMatcher = /** @class */ (function () {
function ObjectMatcher() {
}
/*============================================================================*/
/* Public Functions */
/*============================================================================*/
/**
* @private
*/
ObjectMatcher.prototype.matches = function (item) {
return typeof item === "object";
};
return ObjectMatcher;
}());
//# sourceMappingURL=ConfigManager.js.map

@@ -0,2 +1,5 @@

import { IBundle } from "../api/IBundle";
import { IConfig } from "../api/IConfig";
import { IContext } from "../api/IContext";
import { IExtension } from "../api/IExtension";
import { IInjector } from "../api/IInjector";

@@ -7,2 +10,3 @@ import { ILogger } from "../api/ILogger";

import { EventDispatcher } from "../../events/impl/EventDispatcher";
import { IClass } from "../../extensions/matching/IClass";
/**

@@ -20,4 +24,4 @@ * The core Robotlegs Context implementation

/**
* @inheritDoc
*/
* @inheritDoc
*/
logLevel: number;

@@ -128,7 +132,7 @@ /**

*/
install(...extensions: any[]): IContext;
install(...extensions: Array<IBundle | IClass<IBundle> | IExtension | IClass<IExtension>>): IContext;
/**
* @inheritDoc
*/
configure(...configs: any[]): IContext;
configure(...configs: Array<IConfig | IClass<IConfig>>): IContext;
/**

@@ -169,9 +173,9 @@ * @inheritDoc

*/
private setup();
private beforeInitializingCallback();
private afterInitializingCallback();
private beforeDestroyingCallback();
private afterDestroyingCallback();
private onChildDestroy(event);
private removeChildren();
private setup;
private beforeInitializingCallback;
private afterInitializingCallback;
private beforeDestroyingCallback;
private afterDestroyingCallback;
private onChildDestroy;
private removeChildren;
}
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -8,22 +8,4 @@ // NOTICE: You are permitted to use, modify, and distribute this file

// ------------------------------------------------------------------------------
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var inversify_1 = require("inversify");

@@ -60,3 +42,3 @@ var IContext_1 = require("../api/IContext");

var Context = /** @class */ (function (_super) {
__extends(Context, _super);
tslib_1.__extends(Context, _super);
/*============================================================================*/

@@ -283,2 +265,3 @@ /* Constructor */

Context.prototype.install = function () {
var _this = this;
var extensions = [];

@@ -288,6 +271,5 @@ for (var _i = 0; _i < arguments.length; _i++) {

}
for (var i = 0; i < extensions.length; i++) {
var extension = extensions[i];
this._extensionInstaller.install(extension);
}
extensions.forEach(function (extension) {
_this._extensionInstaller.install(extension);
});
return this;

@@ -299,2 +281,3 @@ };

Context.prototype.configure = function () {
var _this = this;
var configs = [];

@@ -304,6 +287,5 @@ for (var _i = 0; _i < arguments.length; _i++) {

}
for (var i = 0; i < configs.length; i++) {
var config = configs[i];
this._configManager.addConfig(config);
}
configs.forEach(function (config) {
_this._configManager.addConfig(config);
});
return this;

@@ -369,2 +351,3 @@ };

Context.prototype.detain = function () {
var _this = this;
var instances = [];

@@ -374,6 +357,5 @@ for (var _i = 0; _i < arguments.length; _i++) {

}
for (var i = 0; i < instances.length; i++) {
var instance = instances[i];
this._pin.detain(instance);
}
instances.forEach(function (instance) {
_this._pin.detain(instance);
});
return this;

@@ -385,2 +367,3 @@ };

Context.prototype.release = function () {
var _this = this;
var instances = [];

@@ -390,6 +373,5 @@ for (var _i = 0; _i < arguments.length; _i++) {

}
for (var i = 0; i < instances.length; i++) {
var instance = instances[i];
this._pin.release(instance);
}
instances.forEach(function (instance) {
_this._pin.release(instance);
});
return this;

@@ -450,10 +432,10 @@ };

};
Context = Context_1 = __decorate([
var Context_1;
Context = Context_1 = tslib_1.__decorate([
inversify_1.injectable(),
__metadata("design:paramtypes", [])
tslib_1.__metadata("design:paramtypes", [])
], Context);
return Context;
var Context_1;
}(EventDispatcher_1.EventDispatcher));
exports.Context = Context;
//# sourceMappingURL=Context.js.map
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -31,4 +31,4 @@ // NOTICE: You are permitted to use, modify, and distribute this file

function guardsApprove(guards, injector) {
for (var i = 0; i < guards.length; i++) {
var guard = guards[i];
for (var _i = 0, guards_1 = guards; _i < guards_1.length; _i++) {
var guard = guards_1[_i];
if (typeof guard === "function" && guard.prototype.approve === undefined) {

@@ -35,0 +35,0 @@ if (guard()) {

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

@@ -137,6 +137,6 @@ import { IEventDispatcher } from "../../events/api/IEventDispatcher";

addReversedEventTypes(...types: any[]): void;
private configureTransitions();
private flipPriority(type, priority);
private createSyncLifecycleListener(handler, once?);
private reportError(message);
private configureTransitions;
private flipPriority;
private createSyncLifecycleListener;
private reportError;
}
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -290,2 +290,3 @@ // NOTICE: You are permitted to use, modify, and distribute this file

Lifecycle.prototype.addReversedEventTypes = function () {
var _this = this;
var types = [];

@@ -295,6 +296,5 @@ for (var _i = 0; _i < arguments.length; _i++) {

}
for (var i = 0; i < types.length; i++) {
var type = types[i];
this._reversedEventTypes.set(type, true);
}
types.forEach(function (type) {
_this._reversedEventTypes.set(type, true);
});
};

@@ -301,0 +301,0 @@ /*============================================================================*/

@@ -62,6 +62,6 @@ import { Lifecycle } from "./Lifecycle";

enter(callback?: Function): void;
private invalidTransition();
private setState(state);
private dispatch(type);
private reportError(message, callbacks?);
private invalidTransition;
private setState;
private dispatch;
private reportError;
}
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -46,2 +46,3 @@ // NOTICE: You are permitted to use, modify, and distribute this file

LifecycleTransition.prototype.fromStates = function () {
var _this = this;
var states = [];

@@ -51,6 +52,5 @@ for (var _i = 0; _i < arguments.length; _i++) {

}
for (var i = 0; i < states.length; i++) {
var state = states[i];
this._fromStates.push(state);
}
states.forEach(function (state) {
_this._fromStates.push(state);
});
return this;

@@ -108,2 +108,3 @@ };

LifecycleTransition.prototype.enter = function (callback) {
var _this = this;
// immediately call back if we have already transitioned, and exit

@@ -140,21 +141,20 @@ if (this._lifecycle.state === this._finalState) {

if (error) {
this.setState(initialState);
this.reportError(error, this._callbacks);
_this.setState(initialState);
_this.reportError(error, _this._callbacks);
return;
}
// dispatch pre transition and transition events
this.dispatch(this._preTransitionEvent);
this.dispatch(this._transitionEvent);
_this.dispatch(_this._preTransitionEvent);
_this.dispatch(_this._transitionEvent);
// put lifecycle into final state
this.setState(this._finalState);
_this.setState(_this._finalState);
// process callback queue (dup and trash for safety)
var callbacks = this._callbacks.concat();
this._callbacks.length = 0;
for (var i = 0; i < callbacks.length; i++) {
var callbackChild = callbacks[i];
safelyCallBack_1.safelyCallBack(callbackChild, null, this._name);
}
var callbacks = _this._callbacks.concat();
_this._callbacks.length = 0;
callbacks.forEach(function (callbackChild) {
safelyCallBack_1.safelyCallBack(callbackChild, null, _this._name);
});
// dispatch post transition event
this.dispatch(this._postTransitionEvent);
}.bind(this), this._reverse);
_this.dispatch(_this._postTransitionEvent);
}, this._reverse);
};

@@ -178,2 +178,3 @@ /*============================================================================*/

LifecycleTransition.prototype.reportError = function (message, callbacks) {
var _this = this;
// turn message into Error

@@ -187,8 +188,7 @@ var error = message instanceof Error ? message : new Error(message);

if (callbacks) {
for (var i = 0; i < callbacks.length; i++) {
var callback = callbacks[i];
callbacks.forEach(function (callback) {
if (callback) {
safelyCallBack_1.safelyCallBack(callback, error, this._name);
safelyCallBack_1.safelyCallBack(callback, error, _this._name);
}
}
});
callbacks.length = 0;

@@ -195,0 +195,0 @@ }

@@ -41,3 +41,3 @@ import { ILogger } from "../api/ILogger";

fatal(message: any, params?: any[]): void;
private getTimer();
private getTimer;
}
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

@@ -14,4 +14,4 @@ import { ILogger } from "../api/ILogger";

/**
* Sets the current log level
*/
* Sets the current log level
*/
logLevel: number;

@@ -18,0 +18,0 @@ private _targets;

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -9,2 +9,3 @@ // NOTICE: You are permitted to use, modify, and distribute this file

Object.defineProperty(exports, "__esModule", { value: true });
var MessageRunner_1 = require("./MessageRunner");
var safelyCallBack_1 = require("./safelyCallBack");

@@ -78,3 +79,3 @@ /**

}
new MessageRunner(message, handlers, callback).run();
new MessageRunner_1.MessageRunner(message, handlers, callback).run();
}

@@ -90,82 +91,2 @@ else {

exports.MessageDispatcher = MessageDispatcher;
var MessageRunner = /** @class */ (function () {
/*============================================================================*/
/* Constructor */
/*============================================================================*/
/**
* @private
*/
function MessageRunner(message, handlers, callback) {
this._message = message;
this._handlers = handlers;
this._callback = callback;
}
/*============================================================================*/
/* Public Functions */
/*============================================================================*/
/**
* @private
*/
MessageRunner.prototype.run = function () {
this.next();
};
/*============================================================================*/
/* Private Functions */
/*============================================================================*/
MessageRunner.prototype.next = function () {
// Try to keep things synchronous with a simple loop,
// forcefully breaking out for async handlers and recursing.
// We do this to avoid increasing the stack depth unnecessarily.
var handler;
var _loop_1 = function () {
if (handler.length === 0) {
// sync handler: ()
handler();
}
else if (handler.length === 1) {
// sync handler: (message)
handler(this_1._message);
}
else if (handler.length === 2) {
// sync or async handler: (message, callback)
var handled_1 = false;
handler(this_1._message, function (error, msg) {
if (error === void 0) { error = null; }
if (msg === void 0) { msg = null; }
// handler must not invoke the callback more than once
if (handled_1) {
return;
}
handled_1 = true;
if (error || this._handlers.length === 0) {
if (this._callback) {
safelyCallBack_1.safelyCallBack(this._callback, error, this._message);
}
}
else {
this.next();
}
}.bind(this_1));
return { value: void 0 };
}
else {
// ERROR: this should NEVER happen
throw new Error("Bad handler signature");
}
};
var this_1 = this;
while ((handler = this._handlers.pop())) {
var state_1 = _loop_1();
if (typeof state_1 === "object")
return state_1.value;
}
// If we got here then this loop finished synchronously.
// Nobody broke out, so we are done.
// This relies on the various return statements above. Be careful.
if (this._callback) {
safelyCallBack_1.safelyCallBack(this._callback, null, this._message);
}
};
return MessageRunner;
}());
//# sourceMappingURL=MessageDispatcher.js.map
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -9,2 +9,3 @@ // NOTICE: You are permitted to use, modify, and distribute this file

Object.defineProperty(exports, "__esModule", { value: true });
var ObjectHandler_1 = require("./ObjectHandler");
/**

@@ -31,3 +32,3 @@ * Robotlegs object processor

ObjectProcessor.prototype.addObjectHandler = function (matcher, handler) {
this._handlers.push(new ObjectHandler(matcher, handler));
this._handlers.push(new ObjectHandler_1.ObjectHandler(matcher, handler));
};

@@ -39,6 +40,5 @@ /**

ObjectProcessor.prototype.processObject = function (object) {
for (var i = 0; i < this._handlers.length; i++) {
var handler = this._handlers[i];
this._handlers.forEach(function (handler) {
handler.handle(object);
}
});
};

@@ -49,3 +49,3 @@ /**

ObjectProcessor.prototype.removeAllHandlers = function () {
this._handlers.length = 0;
this._handlers = [];
};

@@ -55,26 +55,2 @@ return ObjectProcessor;

exports.ObjectProcessor = ObjectProcessor;
var ObjectHandler = /** @class */ (function () {
/*============================================================================*/
/* Constructor */
/*============================================================================*/
/**
* @private
*/
function ObjectHandler(matcher, handler) {
this._matcher = matcher;
this._handler = handler;
}
/*============================================================================*/
/* Public Functions */
/*============================================================================*/
/**
* @private
*/
ObjectHandler.prototype.handle = function (object) {
if (this._matcher.matches(object)) {
this._handler(object);
}
};
return ObjectHandler;
}());
//# sourceMappingURL=ObjectProcessor.js.map
"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -8,22 +8,4 @@ // NOTICE: You are permitted to use, modify, and distribute this file

// ------------------------------------------------------------------------------
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var inversify_1 = require("inversify");

@@ -34,3 +16,3 @@ /**

var RobotlegsInjector = /** @class */ (function (_super) {
__extends(RobotlegsInjector, _super);
tslib_1.__extends(RobotlegsInjector, _super);
/*============================================================================*/

@@ -45,5 +27,5 @@ /* Constructor */

}
RobotlegsInjector = __decorate([
RobotlegsInjector = tslib_1.__decorate([
inversify_1.injectable(),
__metadata("design:paramtypes", [])
tslib_1.__metadata("design:paramtypes", [])
], RobotlegsInjector);

@@ -50,0 +32,0 @@ return RobotlegsInjector;

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

"use strict";
// ------------------------------------------------------------------------------
// Copyright (c) 2017 RobotlegsJS. All Rights Reserved.
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//

@@ -5,0 +5,0 @@ // NOTICE: You are permitted to use, modify, and distribute this file

{
"name": "@robotlegsjs/core",
"version": "0.1.3",
"version": "0.2.0",
"description": "An architecture-based IoC framework for JavaScript/TypeScript",

@@ -10,11 +10,16 @@ "main": "lib/index.js",

"karma": "karma start --single-run",
"autoformat": "prettier --config .prettierrc --write {src,test}/**/*.ts",
"tslint-check": "tslint-config-prettier-check ./tslint.json",
"clean-up": "rimraf .nyc_output && rimraf coverage && rimraf lib",
"compile": "tsc -d",
"autoformat": "prettier --config .prettierrc --write {src,test}{/,/**/}{*,*.test}.ts",
"tslint-check:src": "tslint-config-prettier-check ./tslint.json",
"tslint-check:test": "tslint-config-prettier-check ./tslint.test.json",
"tslint:src": "tslint --project tsconfig.json",
"tslint:test": "tslint --config tslint.test.json --project tsconfig.test.json",
"tslint": "npm run tslint-check:src && npm run tslint-check:test && npm run tslint:src && npm run tslint:test",
"clean-up": "rimraf .nyc_output && rimraf coverage && rimraf lib && rimraf lib-test && rimraf dist-test",
"compile:src": "tsc -d --importHelpers",
"compile:test": "tsc -p tsconfig.test.json -d --importHelpers",
"dev": "webpack",
"build": "webpack --env.production",
"prepare": "npm run clean-up && npm run compile",
"prepare": "npm run clean-up && npm run compile:src",
"prepublishOnly": "publish-please guard",
"publish-please": "npm run autoformat && npm run clean-up && npm run test && publish-please"
"publish-please": "npm run tslint && npm run autoformat && npm run clean-up && npm run test && publish-please"
},

@@ -64,9 +69,10 @@ "nyc": {

"dependencies": {
"inversify": "^4.11.1"
"inversify": "^4.13.0",
"tslib": "^1.9.3"
},
"devDependencies": {
"@types/bluebird": "^3.5.20",
"@types/chai": "^4.1.2",
"@types/mocha": "^2.2.48",
"@types/sinon": "^4.3.0",
"@types/bluebird": "^3.5.23",
"@types/chai": "^4.1.4",
"@types/mocha": "^5.2.5",
"@types/sinon": "^5.0.1",
"bluebird": "^3.5.1",

@@ -77,13 +83,12 @@ "browserify-versionify": "^1.0.6",

"es6-symbol": "^3.1.1",
"glslify": "^6.1.1",
"glslify": "^6.2.1",
"imports-loader": "^0.8.0",
"istanbul": "^0.4.5",
"istanbul-instrumenter-loader": "^3.0.0",
"jsdom": "^11.6.2",
"istanbul-instrumenter-loader": "^3.0.1",
"jsdom": "^11.12.0",
"jsdom-global": "^3.0.2",
"karma": "^2.0.0",
"karma": "^2.0.5",
"karma-chai": "^0.1.0",
"karma-chai-sinon": "^0.1.5",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage-istanbul-reporter": "^1.4.1",
"karma-coverage-istanbul-reporter": "^2.0.1",
"karma-es6-shim": "^1.0.0",

@@ -95,26 +100,27 @@ "karma-mocha": "^1.3.0",

"karma-sinon": "^1.0.5",
"karma-sinon-chai": "^2.0.2",
"karma-sourcemap-loader": "^0.3.7",
"karma-sourcemap-writer": "^0.1.2",
"karma-webpack": "^2.0.13",
"mocha": "^5.0.1",
"nyc": "^11.4.1",
"prettier": "^1.11.1",
"publish-please": "^2.3.1",
"karma-webpack": "^3.0.0",
"mocha": "^5.2.0",
"nyc": "^12.0.2",
"prettier": "^1.14.0",
"publish-please": "^3.2.0",
"reflect-metadata": "^0.1.12",
"remap-istanbul": "^0.10.1",
"remap-istanbul": "^0.11.1",
"rimraf": "^2.6.2",
"sinon": "^4.4.2",
"sinon-chai": "^2.14.0",
"source-map-support": "^0.5.3",
"ts-loader": "^4.0.1",
"ts-node": "^5.0.1",
"tslint": "^5.9.1",
"tslint-config-prettier": "^1.9.0",
"typescript": "^2.7.2",
"uglifyjs-webpack-plugin": "^1.2.2",
"webpack": "^4.1.0",
"webpack-cli": "^2.0.10",
"webpack-dev-server": "^3.1.0"
"sinon": "^6.1.4",
"sinon-chai": "^3.2.0",
"source-map-support": "^0.5.6",
"ts-loader": "^4.4.2",
"ts-node": "^7.0.0",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.14.0",
"typescript": "^3.0.1",
"uglifyjs-webpack-plugin": "^1.2.7",
"webpack": "^4.16.3",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.5"
},
"peerDependencies": {}
}
RobotlegsJS <img src="media/robotlegs.png?raw=true" width="30" height="30" />
===
[![GitHub license](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobotlegsJS/RobotlegsJS/blob/master/LICENSE)
[![Gitter chat](https://badges.gitter.im/RobotlegsJS/RobotlegsJS.svg)](https://gitter.im/RobotlegsJS/RobotlegsJS)

@@ -17,4 +18,4 @@ [![Build Status](https://secure.travis-ci.org/RobotlegsJS/RobotlegsJS.svg?branch=master)](https://travis-ci.org/RobotlegsJS/RobotlegsJS)

Right now, this framework have extensions for [pixi.js v4](http://www.pixijs.com) and
[phaser-ce v2.8](http://phaser.io).
Right now, this framework has extensions for [pixi.js v4](https://github.com/pixijs/pixi.js),
[phaser-ce](https://github.com/photonstorm/phaser-ce) and [phaser](https://github.com/photonstorm/phaser).

@@ -31,7 +32,8 @@ **Features**

- [RobotlegsJS-SignalCommandMap](https://github.com/RobotlegsJS/RobotlegsJS-SignalCommandMap): maps [SignalsJS](https://github.com/RobotlegsJS/SignalsJS) to commands.
- [RobotlegsJS-Pixi](https://github.com/RobotlegsJS/RobotlegsJS-Pixi): integrate RobotlegsJS with [PixiJS](http://www.pixijs.com).
- [RobotlegsJS-Pixi](https://github.com/RobotlegsJS/RobotlegsJS-Pixi): integrate RobotlegsJS with [PixiJS](https://github.com/pixijs/pixi.js).
- [RobotlegsJS-Pixi-Palidor](https://github.com/RobotlegsJS/RobotlegsJS-Pixi-Palidor): a view manager extension for [RobotlegsJS-Pixi](https://github.com/RobotlegsJS/RobotlegsJS-Pixi).
- [RobotlegsJS-Pixi-SignalMediator](https://github.com/RobotlegsJS/RobotlegsJS-Pixi-SignalMediator): a port of [Robotlegs SignalMediator Extension](https://github.com/MrDodson/robotlegs-extensions-SignalMediator) to TypeScript.
- [RobotlegsJS-Phaser](https://github.com/RobotlegsJS/RobotlegsJS-Phaser): integrate RobotlegsJS with [Phaser](http://phaser.io).
- [RobotlegsJS-Phaser-SignalCommandMap](https://github.com/RobotlegsJS/RobotlegsJS-Phaser-SignalCommandMap): maps [Phaser.Signal](https://photonstorm.github.io/phaser-ce/Phaser.Signal.html) to commands.
- [RobotlegsJS-Phaser-CE](https://github.com/RobotlegsJS/RobotlegsJS-Phaser-CE): integrate RobotlegsJS with [Phaser-CE](https://github.com/photonstorm/phaser-ce).
- [RobotlegsJS-Phaser-CE-SignalCommandMap](https://github.com/RobotlegsJS/RobotlegsJS-Phaser-CE-SignalCommandMap): maps [Phaser.Signal](https://photonstorm.github.io/phaser-ce/Phaser.Signal.html) to commands.
- [RobotlegsJS-Phaser](https://github.com/RobotlegsJS/RobotlegsJS-Phaser): integrate RobotlegsJS with [Phaser](https://github.com/photonstorm/phaser).

@@ -41,13 +43,18 @@ Installation

You can get the latest release and the type definitions using npm:
You can get the latest release and the type definitions using [NPM](https://www.npmjs.com/):
```
```bash
npm install @robotlegsjs/core reflect-metadata --save
```
RobotlegsJS requires TypeScript 2.0 and the `experimentalDecorators`,
`emitDecoratorMetadata`, `types` and `lib` compilation options in your
`tsconfig.json` file:
Or using [Yarn](https://yarnpkg.com/en/):
```json
```bash
yarn add @robotlegsjs/core reflect-metadata
````
> :warning: **Important!** RobotlegsJS requires TypeScript >= 2.0 and the `experimentalDecorators`, `emitDecoratorMetadata`, `types` and `lib`
compilation options in your `tsconfig.json` file.
```js
{

@@ -66,2 +73,11 @@ "compilerOptions": {

RobotlegsJS requires a modern JavaScript engine with support for:
- [Reflect metadata](https://rbuckton.github.io/reflect-metadata/)
- [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)
If your environment doesn't support one of these you will need to import a shim or polyfill.
> :warning: **The `reflect-metadata` polyfill should be imported only once in your entire application** because the Reflect object is mean to be a global singleton. More details about this can be found [here](https://github.com/inversify/InversifyJS/issues/262#issuecomment-227593844).
Quickstart

@@ -227,3 +243,3 @@ ===

[Robotlegs](http://www.robotlegs.org) has proven itself of being a mature solution from the ActionScript
[Robotlegs](https://github.com/robotlegs/robotlegs-framework) has proven itself of being a mature solution from the ActionScript
community for interactive experiences.

@@ -230,0 +246,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc