2015-08-14 13:03:45 -04:00
|
|
|
library angular2.src.core.metadata;
|
|
|
|
|
2015-09-14 18:59:09 -04:00
|
|
|
import 'package:angular2/src/core/facade/collection.dart' show List;
|
2015-08-26 14:44:59 -04:00
|
|
|
import 'package:angular2/src/core/change_detection/change_detection.dart';
|
2015-09-14 18:59:09 -04:00
|
|
|
import './metadata/di.dart';
|
|
|
|
import './metadata/directives.dart';
|
|
|
|
import './metadata/view.dart';
|
2015-08-14 13:03:45 -04:00
|
|
|
|
2015-09-14 18:59:09 -04:00
|
|
|
export './metadata/di.dart';
|
|
|
|
export './metadata/directives.dart';
|
|
|
|
export './metadata/view.dart';
|
2015-08-14 13:03:45 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* See: [DirectiveMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class Directive extends DirectiveMetadata {
|
2015-09-30 23:59:23 -04:00
|
|
|
const Directive({String selector, List<String> inputs,
|
2015-10-02 19:21:49 -04:00
|
|
|
List<String> outputs,
|
|
|
|
@deprecated List<String> properties,
|
|
|
|
@deprecated List<String> events,
|
|
|
|
Map<String, String> host,
|
2015-09-14 18:59:09 -04:00
|
|
|
List bindings, String exportAs, String moduleId,
|
2015-10-01 13:07:49 -04:00
|
|
|
Map<String, dynamic> queries})
|
2015-08-14 13:03:45 -04:00
|
|
|
: super(
|
|
|
|
selector: selector,
|
2015-09-30 23:59:23 -04:00
|
|
|
inputs: inputs,
|
|
|
|
outputs: outputs,
|
2015-10-02 19:21:49 -04:00
|
|
|
properties: properties,
|
|
|
|
events: events,
|
2015-08-14 13:03:45 -04:00
|
|
|
host: host,
|
|
|
|
bindings: bindings,
|
|
|
|
exportAs: exportAs,
|
2015-09-14 18:59:09 -04:00
|
|
|
moduleId: moduleId,
|
2015-10-01 13:07:49 -04:00
|
|
|
queries: queries);
|
2015-08-14 13:03:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* See: [ComponentMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class Component extends ComponentMetadata {
|
2015-09-30 23:59:23 -04:00
|
|
|
const Component({String selector, List<String> inputs,
|
2015-10-02 19:21:49 -04:00
|
|
|
List<String> outputs,
|
|
|
|
@deprecated List<String> properties,
|
|
|
|
@deprecated List<String> events,
|
|
|
|
Map<String, String> host,
|
2015-09-14 18:59:09 -04:00
|
|
|
List bindings, String exportAs, String moduleId,
|
2015-09-17 21:45:14 -04:00
|
|
|
Map<String, dynamic> queries,
|
2015-10-01 13:07:49 -04:00
|
|
|
List viewBindings, ChangeDetectionStrategy changeDetection})
|
2015-08-14 13:03:45 -04:00
|
|
|
: super(
|
|
|
|
selector: selector,
|
2015-09-30 23:59:23 -04:00
|
|
|
inputs: inputs,
|
|
|
|
outputs: outputs,
|
2015-10-02 19:21:49 -04:00
|
|
|
properties: properties,
|
|
|
|
events: events,
|
2015-08-14 13:03:45 -04:00
|
|
|
host: host,
|
|
|
|
bindings: bindings,
|
|
|
|
exportAs: exportAs,
|
2015-09-14 18:59:09 -04:00
|
|
|
moduleId: moduleId,
|
2015-08-14 13:03:45 -04:00
|
|
|
viewBindings: viewBindings,
|
2015-09-17 21:45:14 -04:00
|
|
|
queries: queries,
|
2015-08-14 13:03:45 -04:00
|
|
|
changeDetection: changeDetection);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* See: [ViewMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class View extends ViewMetadata {
|
|
|
|
const View({String templateUrl, String template, dynamic directives,
|
|
|
|
dynamic pipes, ViewEncapsulation encapsulation, List<String> styles,
|
|
|
|
List<String> styleUrls})
|
|
|
|
: super(
|
|
|
|
templateUrl: templateUrl,
|
|
|
|
template: template,
|
|
|
|
directives: directives,
|
|
|
|
pipes: pipes,
|
|
|
|
encapsulation: encapsulation,
|
|
|
|
styles: styles,
|
|
|
|
styleUrls: styleUrls);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* See: [PipeMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class Pipe extends PipeMetadata {
|
2015-09-08 12:17:58 -04:00
|
|
|
const Pipe({name, pure}) : super(name: name, pure: pure);
|
2015-08-14 13:03:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* See: [AttributeMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class Attribute extends AttributeMetadata {
|
|
|
|
const Attribute(String attributeName) : super(attributeName);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* See: [QueryMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class Query extends QueryMetadata {
|
|
|
|
const Query(dynamic /*Type | string*/ selector, {bool descendants: false})
|
|
|
|
: super(selector, descendants: descendants);
|
|
|
|
}
|
|
|
|
|
2015-09-17 21:45:14 -04:00
|
|
|
/**
|
|
|
|
* See: [ContentChildrenMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class ContentChildren extends ContentChildrenMetadata {
|
|
|
|
const ContentChildren(dynamic /*Type | string*/ selector, {bool descendants: false})
|
|
|
|
: super(selector, descendants: descendants);
|
|
|
|
}
|
|
|
|
|
2015-09-19 21:39:35 -04:00
|
|
|
/**
|
|
|
|
* See: [ContentChildMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class ContentChild extends ContentChildMetadata {
|
|
|
|
const ContentChild(dynamic /*Type | string*/ selector)
|
|
|
|
: super(selector);
|
|
|
|
}
|
|
|
|
|
2015-08-14 13:03:45 -04:00
|
|
|
/**
|
|
|
|
* See: [ViewQueryMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class ViewQuery extends ViewQueryMetadata {
|
2015-08-19 00:51:28 -04:00
|
|
|
const ViewQuery(dynamic /*Type | string*/ selector)
|
|
|
|
: super(selector, descendants: true);
|
2015-08-14 13:03:45 -04:00
|
|
|
}
|
2015-09-03 18:10:48 -04:00
|
|
|
|
2015-09-17 21:45:14 -04:00
|
|
|
/**
|
|
|
|
* See: [ViewChildrenMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class ViewChildren extends ViewChildrenMetadata {
|
|
|
|
const ViewChildren(dynamic /*Type | string*/ selector)
|
|
|
|
: super(selector);
|
|
|
|
}
|
|
|
|
|
2015-09-19 21:39:35 -04:00
|
|
|
/**
|
|
|
|
* See: [ViewChildMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class ViewChild extends ViewChildMetadata {
|
|
|
|
const ViewChild(dynamic /*Type | string*/ selector)
|
|
|
|
: super(selector);
|
|
|
|
}
|
|
|
|
|
2015-09-03 18:10:48 -04:00
|
|
|
/**
|
2015-09-30 23:59:23 -04:00
|
|
|
* See: [InputMetadata] for docs.
|
2015-09-03 18:10:48 -04:00
|
|
|
*/
|
2015-09-30 23:59:23 -04:00
|
|
|
class Input extends InputMetadata {
|
|
|
|
const Input([String bindingPropertyName])
|
2015-09-03 18:10:48 -04:00
|
|
|
: super(bindingPropertyName);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2015-09-30 23:59:23 -04:00
|
|
|
* See: [OutputMetadata] for docs.
|
2015-09-03 18:10:48 -04:00
|
|
|
*/
|
2015-09-30 23:59:23 -04:00
|
|
|
class Output extends OutputMetadata {
|
|
|
|
const Output([String bindingPropertyName])
|
2015-09-03 18:10:48 -04:00
|
|
|
: super(bindingPropertyName);
|
2015-08-19 00:51:28 -04:00
|
|
|
}
|
2015-09-04 17:07:16 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* See: [HostBindingMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class HostBinding extends HostBindingMetadata {
|
|
|
|
const HostBinding([String hostPropertyName])
|
|
|
|
: super(hostPropertyName);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* See: [HostListenerMetadata] for docs.
|
|
|
|
*/
|
|
|
|
class HostListener extends HostListenerMetadata {
|
|
|
|
const HostListener(String eventName, [List<String> args])
|
|
|
|
: super(eventName, args);
|
|
|
|
}
|