Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ final List<RouteDefinition> galleryRoutes = [
path: '{{ name }}',
loader: () async {
await {{ name }}.loadLibrary();
{{ name }}.initReflector();
return {{ name }}.{{ component }}NgFactory;
}
),
Expand Down
11 changes: 3 additions & 8 deletions angular_gallery/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../ngcomponents
ngforms: ^4.1.0
ngrouter: ^3.1.0
ngforms: ^5.0.0-dev.1
ngrouter: ^4.0.0-dev.1
build: ^2.1.1
build_config: ^1.0.0
#mustache: ^1.0.0
mustache_template: ^2.0.0
ngsecurity:
git:
url: https://github.com/angulardart-community/ngsecurity
ref: main

7 changes: 3 additions & 4 deletions angular_gallery_section/lib/builder/gallery_info_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class GalleryInfoBuilder extends Builder {
if (docs == null) {
// The super class must be defined in the library as a part file.
for (var part in classElement.library.parts) {
if (part.getClass(classElement.name) != null) {
if (part.children.contains((c) => c.name == classElement.name)) {
libraryId = AssetId.resolve(part.source.uri);
docs = await extractDocumentation(
classElement.name, libraryId, assetReader);
Expand Down Expand Up @@ -237,10 +237,9 @@ class GalleryInfoBuilder extends Builder {

/// Returns a class hierarchy that ends at [leafClass] omitting [Object].
Iterable<InterfaceElement> _classHierarchy(ClassElement leafClass) {
final interfaces = leafClass.allSupertypes;

// Object contains no interesting documentation and complicates searching.
interfaces.removeWhere((interface) => interface.isDartCoreObject);
final interfaces = leafClass.allSupertypes
.where((interface) => !interface.isDartCoreObject);

final classes = <InterfaceElement>[];
for (var i in interfaces) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import 'package:ngcomponents/material_progress/material_progress.dart';
styleUrls: ['delayed_content.scss.css'],
directives: [MaterialProgressComponent, NgIf],
// TODO(google): Change preserveWhitespace to false to improve codesize.
changeDetection: ChangeDetectionStrategy.OnPush,
changeDetection: ChangeDetectionStrategy.onPush,
preserveWhitespace: true,
)
class DelayedContentComponent implements OnInit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.

import 'package:ngdart/angular.dart';
import 'package:ngsecurity/security.dart';
import 'package:ngdart/security.dart';
import 'package:angular_gallery_section/components/gallery_component/gallery_info.dart';
import 'package:sanitize_html/sanitize_html.dart' show sanitizeHtml;

Expand Down
12 changes: 7 additions & 5 deletions angular_gallery_section/lib/gallery_docs_extraction.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ class GalleryDocumentationExtraction extends SimpleAstVisitor<DartDocInfo> {
DartDocInfo? visitMixinDeclaration(MixinDeclaration node) =>
_visitClassOrMixinDeclaration(node);

DartDocInfo? _visitClassOrMixinDeclaration(ClassOrMixinDeclaration node) {
DartDocInfo? _visitClassOrMixinDeclaration(NamedCompilationUnitMember node) {
if (_extractDocumentation(node) == null) return null;

var allProperties = <DartPropertyInfo?>[];
var propertyVisitor = _AllMemberDocsExtraction(_filePath);
for (Declaration member in node.members) {
// We know that [node] is definitely either a ClassDeclaration or
// MixinDeclaration.
for (Declaration member in (node as dynamic).members) {
// Must collect the annotations early because class fields don't have
// annotations attached to their actual node. The comments are attached to
// the field nodes so we have to continue visiting.
Expand Down Expand Up @@ -119,11 +121,11 @@ class GalleryDocumentationExtraction extends SimpleAstVisitor<DartDocInfo> {

/// Collect information needed for documentation from [node].
DartDocInfo? _extractDocumentation(NamedCompilationUnitMember node) {
if (node.name.name != _name) return null;
if (node.name.toString() != _name) return null;

final deprecatedAnnotationNode = _deprecatedAnnotation(node);
_info = DartDocInfo()
..name = node.name.name
..name = node.name.toString()
..deprecated = deprecatedAnnotationNode != null
..deprecatedMessage = deprecatedAnnotationNode?.arguments?.arguments
// Visit the first arg or null if no args.
Expand Down Expand Up @@ -210,7 +212,7 @@ class _MemberDocExtraction extends SimpleAstVisitor<DartPropertyInfo> {
return DartPropertyInfo()
..name = (node as dynamic /* MethodDeclaration | VariableDeclaration */)
.name
.name
.toString()
..comment = g3docMarkdownToHtml(parseComment(node.documentationComment))
..classPath = _filePath;
}
Expand Down
14 changes: 4 additions & 10 deletions angular_gallery_section/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,17 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
analyzer: ^4.0.0
ngdart: ^7.1.0
analyzer: ^5.10.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../ngcomponents
angular_gallery:
path: ../angular_gallery
build: ^2.1.1
build_config: ^1.0.0
glob: ^2.0.2
markdown: ^5.0.0
markdown: ^7.0.2
mustache_template: ^2.0.0
path: ^1.6.1
sass: '>=1.15.3 <2.0.0'
sanitize_html: ^2.0.0

ngsecurity:
git:
url: https://github.com/angulardart-community/ngsecurity
ref: main

sanitize_html: ^2.0.0
2 changes: 1 addition & 1 deletion examples/angular_components_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
2 changes: 1 addition & 1 deletion examples/app_layout_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_button_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_card_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
4 changes: 2 additions & 2 deletions examples/material_checkbox_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
ngforms: ^4.1.0
ngforms: ^5.0.0-dev.1
angular_gallery:
path: ../../angular_gallery
angular_gallery_section:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_chips_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_datepicker_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_dialog_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
4 changes: 2 additions & 2 deletions examples/material_expansionpanel_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
ngforms: ^4.1.0
ngforms: ^5.0.0-dev.1
angular_gallery:
path: ../../angular_gallery
angular_gallery_section:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_icon_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
6 changes: 3 additions & 3 deletions examples/material_input_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
ngforms: ^4.1.0
ngforms: ^5.0.0-dev.1
angular_gallery:
path: ../../angular_gallery
angular_gallery_section:
path: ../../angular_gallery_section
build_config: ^1.0.0
intl: ^0.17.0
intl: ^0.18.0
2 changes: 1 addition & 1 deletion examples/material_list_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_menu_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class MaterialPopupDemoComponent {}
],
templateUrl: 'material_popup_example.html',
styleUrls: ['material_popup_example.scss.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
changeDetection: ChangeDetectionStrategy.onPush,
)
class MaterialPopupExample {
static final _initialPosition = RelativePosition.OffsetBottomRight;
Expand Down
2 changes: 1 addition & 1 deletion examples/material_popup_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_progress_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
4 changes: 2 additions & 2 deletions examples/material_radio_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
ngforms: ^4.1.0
ngforms: ^5.0.0-dev.1
angular_gallery:
path: ../../angular_gallery
angular_gallery_section:
Expand Down
4 changes: 2 additions & 2 deletions examples/material_select_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
ngforms: ^4.1.0
ngforms: ^5.0.0-dev.1
angular_gallery:
path: ../../angular_gallery
angular_gallery_section:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_slider_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_spinner_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_stepper_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_tab_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
2 changes: 1 addition & 1 deletion examples/material_toggle_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class MaterialTooltipExamples {}
],
templateUrl: 'material_tooltip_example.html',
styleUrls: ['material_tooltip_example.scss.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
changeDetection: ChangeDetectionStrategy.onPush,
preserveWhitespace: true,
)
class MaterialTooltipExampleComponent {
Expand Down
2 changes: 1 addition & 1 deletion examples/material_tooltip_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ environment:
sdk: '>=2.17.0 <3.0.0'

dependencies:
ngdart: ^7.1.0
ngdart: ^8.0.0-dev.1
ngcomponents:
path: ../../ngcomponents
angular_gallery:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import 'package:ngcomponents/model/ui/has_renderer.dart';
<material-icon icon="android" size="small"></material-icon> {{value}}
''',
styles: [':host {display: inline-block;}'],
changeDetection: ChangeDetectionStrategy.OnPush,
changeDetection: ChangeDetectionStrategy.onPush,
)
class ComponentRendererExample implements RendersValue<String> {
@override
Expand Down
Loading