mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
AOT compatibility enhancements (#2015)
* aot compatibility updates - remove index files where needed - move material dependencies to a separete module - use aot compatible lambda functions for module export * remove unused imports * re-export Material module * core module enhancements - fix AOT issue with providers (use lambda instead of variable) - move context menu to a separate module * core module enhancements * feature modules
This commit is contained in:
committed by
Eugenio Romano
parent
b0cdd4557d
commit
98598f03b2
@@ -15,10 +15,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {AccordionComponent} from './accordion.component';
|
||||
import {AccordionGroupComponent} from './accordion-group.component';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
export const COLLAPSABLE_DIRECTIVES: [any] = [
|
||||
AccordionComponent,
|
||||
AccordionGroupComponent
|
||||
];
|
||||
import { AccordionComponent } from './accordion.component';
|
||||
import { AccordionGroupComponent } from './accordion-group.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule
|
||||
],
|
||||
declarations: [
|
||||
AccordionComponent,
|
||||
AccordionGroupComponent
|
||||
],
|
||||
exports: [
|
||||
AccordionComponent,
|
||||
AccordionGroupComponent
|
||||
]
|
||||
})
|
||||
export class CollapsableModule {}
|
@@ -15,19 +15,27 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ContextMenuService } from './context-menu.service';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { ContextMenuHolderComponent } from './context-menu-holder.component';
|
||||
import { ContextMenuDirective } from './context-menu.directive';
|
||||
import { ContextMenuService } from './context-menu.service';
|
||||
|
||||
export * from './context-menu.service';
|
||||
export * from './context-menu-holder.component';
|
||||
export * from './context-menu.directive';
|
||||
|
||||
export const CONTEXT_MENU_PROVIDERS: [any] = [
|
||||
ContextMenuService
|
||||
];
|
||||
|
||||
export const CONTEXT_MENU_DIRECTIVES: [any] = [
|
||||
ContextMenuHolderComponent,
|
||||
ContextMenuDirective
|
||||
];
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule
|
||||
],
|
||||
declarations: [
|
||||
ContextMenuHolderComponent,
|
||||
ContextMenuDirective
|
||||
],
|
||||
exports: [
|
||||
ContextMenuHolderComponent,
|
||||
ContextMenuDirective
|
||||
],
|
||||
providers: [
|
||||
ContextMenuService
|
||||
]
|
||||
})
|
||||
export class ContextMenuModule {}
|
@@ -1,21 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './context-menu/index';
|
||||
export * from './material/index';
|
||||
export * from './collapsable/index';
|
||||
export * from './view/index';
|
@@ -1,33 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { MDL } from './mdl-upgrade-element.directive';
|
||||
import { AlfrescoMdlButtonDirective } from './mdl-button.directive';
|
||||
import { AlfrescoMdlMenuDirective } from './mdl-menu.directive';
|
||||
import { AlfrescoMdlTextFieldDirective } from './mdl-textfield.directive';
|
||||
|
||||
export * from './mdl-upgrade-element.directive';
|
||||
export * from './mdl-button.directive';
|
||||
export * from './mdl-menu.directive';
|
||||
export * from './mdl-textfield.directive';
|
||||
|
||||
export const MATERIAL_DESIGN_DIRECTIVES: [any] = [
|
||||
MDL,
|
||||
AlfrescoMdlButtonDirective,
|
||||
AlfrescoMdlMenuDirective,
|
||||
AlfrescoMdlTextFieldDirective
|
||||
];
|
@@ -15,11 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
Component,
|
||||
Input,
|
||||
OnInit
|
||||
} from '@angular/core';
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { CardViewModel } from '../../models/card-view.model';
|
||||
import * as moment from 'moment';
|
||||
|
||||
@@ -28,19 +24,11 @@ import * as moment from 'moment';
|
||||
templateUrl: './adf-card-view.component.html',
|
||||
styleUrls: ['./adf-card-view.component.css']
|
||||
})
|
||||
export class CardView implements OnInit {
|
||||
export class CardView {
|
||||
|
||||
@Input()
|
||||
properties: CardViewModel [];
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
|
||||
getPropertyValue(property: CardViewModel): string {
|
||||
if (!property.value) {
|
||||
return property.default;
|
||||
|
@@ -15,8 +15,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CardView } from './adf-card-view.component';
|
||||
|
||||
export const VIEW_DIRECTIVES: [any] = [
|
||||
CardView
|
||||
];
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule
|
||||
],
|
||||
declarations: [
|
||||
CardView
|
||||
],
|
||||
exports: [
|
||||
CardView
|
||||
]
|
||||
})
|
||||
export class CardViewModule {}
|
Reference in New Issue
Block a user