mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-3380] lazy loading fixes (#3609)
* lazy loading file viewer * fix issue with CoreModule referencing * fix issue with app config and lazy loading * test fixes * fix import * lazy loading workaround for content module * fix providers for lazy loading * fix tests * lazy loading for Process Services lib * lazy loading for Insights, module cleanup * fix issue with Translate module, optimise imports * lazy-load blob viewer (demo shell) * remove duplicate pdf init * update to more stable pdfjs * fix license header * fix lint issues * fix test import * fix pdf version
This commit is contained in:
committed by
Eugenio Romano
parent
f3a513ca72
commit
f606149344
@@ -27,7 +27,7 @@ import { DataColumnModule } from '../data-column/data-column.module';
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
TranslateModule,
|
||||
TranslateModule.forChild(),
|
||||
DataTableModule,
|
||||
DataColumnModule
|
||||
],
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { AppConfigService } from './app-config.service';
|
||||
import { AppConfigPipe } from './app-config.pipe';
|
||||
|
||||
@NgModule({
|
||||
@@ -27,9 +26,6 @@ import { AppConfigPipe } from './app-config.pipe';
|
||||
declarations: [
|
||||
AppConfigPipe
|
||||
],
|
||||
providers: [
|
||||
AppConfigService
|
||||
],
|
||||
exports: [
|
||||
AppConfigPipe
|
||||
]
|
||||
|
@@ -26,7 +26,7 @@ import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
TranslateModule,
|
||||
TranslateModule.forChild(),
|
||||
FlexLayoutModule
|
||||
],
|
||||
declarations: [
|
||||
|
@@ -47,7 +47,7 @@ import { CardViewSelectItemComponent } from './components/card-view-selectitem/c
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
FlexLayoutModule,
|
||||
TranslateModule,
|
||||
TranslateModule.forChild(),
|
||||
MatDatepickerModule,
|
||||
MatNativeDateModule,
|
||||
MatCheckboxModule,
|
||||
|
@@ -36,9 +36,6 @@ import { AccordionComponent } from './accordion.component';
|
||||
exports: [
|
||||
AccordionComponent,
|
||||
AccordionGroupComponent
|
||||
],
|
||||
providers: [
|
||||
AccordionComponent
|
||||
]
|
||||
})
|
||||
export class CollapsableModule {}
|
||||
|
@@ -36,7 +36,7 @@ import { CommentsComponent } from './comments.component';
|
||||
ReactiveFormsModule,
|
||||
MaterialModule,
|
||||
CommonModule,
|
||||
TranslateModule
|
||||
TranslateModule.forChild()
|
||||
],
|
||||
declarations: [
|
||||
CommentListComponent,
|
||||
|
@@ -21,6 +21,7 @@ import { fakeAsync, ComponentFixture, TestBed, tick } from '@angular/core/testin
|
||||
import { ContextMenuHolderComponent } from './context-menu-holder.component';
|
||||
import { ContextMenuModule } from './context-menu.module';
|
||||
import { ContextMenuService } from './context-menu.service';
|
||||
import { CoreModule } from '../core.module';
|
||||
|
||||
describe('ContextMenuHolderComponent', () => {
|
||||
let fixture: ComponentFixture<ContextMenuHolderComponent>;
|
||||
@@ -53,6 +54,7 @@ describe('ContextMenuHolderComponent', () => {
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
CoreModule.forRoot(),
|
||||
ContextMenuModule
|
||||
],
|
||||
providers: [
|
||||
|
@@ -22,13 +22,12 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { ContextMenuHolderComponent } from './context-menu-holder.component';
|
||||
import { ContextMenuDirective } from './context-menu.directive';
|
||||
import { ContextMenuService } from './context-menu.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
TranslateModule
|
||||
TranslateModule.forChild()
|
||||
],
|
||||
declarations: [
|
||||
ContextMenuHolderComponent,
|
||||
@@ -37,9 +36,6 @@ import { ContextMenuService } from './context-menu.service';
|
||||
exports: [
|
||||
ContextMenuHolderComponent,
|
||||
ContextMenuDirective
|
||||
],
|
||||
providers: [
|
||||
ContextMenuService
|
||||
]
|
||||
})
|
||||
export class ContextMenuModule {}
|
||||
|
@@ -83,6 +83,17 @@ import { UserPreferencesService } from './services/user-preferences.service';
|
||||
import { SearchConfigurationService } from './services/search-configuration.service';
|
||||
import { startupServiceFactory } from './services/startup-service-factory';
|
||||
import { SortingPickerModule } from './sorting-picker/sorting-picker.module';
|
||||
import { AppConfigService } from './app-config/app-config.service';
|
||||
import { ContextMenuService } from './context-menu/context-menu.service';
|
||||
import { ActivitiContentService } from './form/services/activiti-alfresco.service';
|
||||
import { EcmModelService } from './form/services/ecm-model.service';
|
||||
import { FormRenderingService } from './form/services/form-rendering.service';
|
||||
import { FormService } from './form/services/form.service';
|
||||
import { NodeService } from './form/services/node.service';
|
||||
import { ProcessContentService } from './form/services/process-content.service';
|
||||
import { WidgetVisibilityService } from './form/services/widget-visibility.service';
|
||||
import { EcmUserService } from './userinfo/services/ecm-user.service';
|
||||
import { BpmUserService } from './userinfo/services/bpm-user.service';
|
||||
|
||||
export function createTranslateLoader(http: HttpClient, logService: LogService) {
|
||||
return new TranslateLoaderService(http, logService);
|
||||
@@ -124,7 +135,18 @@ export function providers() {
|
||||
CommentProcessService,
|
||||
CommentContentService,
|
||||
SearchConfigurationService,
|
||||
DatePipe
|
||||
DatePipe,
|
||||
AppConfigService,
|
||||
ContextMenuService,
|
||||
ActivitiContentService,
|
||||
EcmModelService,
|
||||
FormRenderingService,
|
||||
FormService,
|
||||
NodeService,
|
||||
ProcessContentService,
|
||||
WidgetVisibilityService,
|
||||
EcmUserService,
|
||||
BpmUserService
|
||||
];
|
||||
}
|
||||
|
||||
|
@@ -44,7 +44,7 @@ import { EmptyCustomContentDirective } from './directives/empty-custom-content.d
|
||||
RouterModule,
|
||||
MaterialModule,
|
||||
CommonModule,
|
||||
TranslateModule,
|
||||
TranslateModule.forChild(),
|
||||
ContextMenuModule,
|
||||
PipeModule,
|
||||
DirectiveModule
|
||||
|
@@ -36,14 +36,6 @@ import { FormComponent } from './components/form.component';
|
||||
import { StartFormComponent } from './components/start-form.component';
|
||||
import { ContentWidgetComponent } from './components/widgets/content/content.widget';
|
||||
import { WidgetComponent } from './components/widgets/widget.component';
|
||||
|
||||
import { ActivitiContentService } from './services/activiti-alfresco.service';
|
||||
import { EcmModelService } from './services/ecm-model.service';
|
||||
import { FormRenderingService } from './services/form-rendering.service';
|
||||
import { FormService } from './services/form.service';
|
||||
import { NodeService } from './services/node.service';
|
||||
import { ProcessContentService } from './services/process-content.service';
|
||||
import { WidgetVisibilityService } from './services/widget-visibility.service';
|
||||
import { MatDatetimepickerModule, MatNativeDatetimeModule } from '@mat-datetimepicker/core';
|
||||
|
||||
@NgModule({
|
||||
@@ -52,7 +44,7 @@ import { MatDatetimepickerModule, MatNativeDatetimeModule } from '@mat-datetimep
|
||||
DataTableModule,
|
||||
HttpClientModule,
|
||||
MaterialModule,
|
||||
TranslateModule,
|
||||
TranslateModule.forChild(),
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
DataColumnModule,
|
||||
@@ -74,15 +66,6 @@ import { MatDatetimepickerModule, MatNativeDatetimeModule } from '@mat-datetimep
|
||||
entryComponents: [
|
||||
...WIDGET_DIRECTIVES
|
||||
],
|
||||
providers: [
|
||||
ActivitiContentService,
|
||||
EcmModelService,
|
||||
FormRenderingService,
|
||||
FormService,
|
||||
NodeService,
|
||||
ProcessContentService,
|
||||
WidgetVisibilityService
|
||||
],
|
||||
exports: [
|
||||
ContentWidgetComponent,
|
||||
FormFieldComponent,
|
||||
|
@@ -33,7 +33,7 @@ import { LoginHeaderDirective } from './directives/login-header.directive';
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
CommonModule,
|
||||
TranslateModule
|
||||
TranslateModule.forChild()
|
||||
],
|
||||
declarations: [
|
||||
LoginComponent,
|
||||
@@ -41,11 +41,9 @@ import { LoginHeaderDirective } from './directives/login-header.directive';
|
||||
LoginHeaderDirective
|
||||
],
|
||||
exports: [
|
||||
[
|
||||
LoginComponent,
|
||||
LoginFooterDirective,
|
||||
LoginHeaderDirective
|
||||
]
|
||||
LoginComponent,
|
||||
LoginFooterDirective,
|
||||
LoginHeaderDirective
|
||||
]
|
||||
})
|
||||
export class LoginModule {
|
||||
|
@@ -32,7 +32,7 @@
|
||||
"hammerjs": "2.0.8",
|
||||
"minimatch-browser": "1.0.0",
|
||||
"moment": "^2.22.2",
|
||||
"pdfjs-dist": "1.5.404",
|
||||
"pdfjs-dist": "2.0.303",
|
||||
"reflect-metadata": "^0.1.12",
|
||||
"zone.js": "^0.8.26"
|
||||
},
|
||||
|
@@ -26,7 +26,7 @@ import { PaginationComponent } from './pagination.component';
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
TranslateModule
|
||||
TranslateModule.forChild()
|
||||
],
|
||||
declarations: [
|
||||
InfinitePaginationComponent,
|
||||
|
@@ -27,7 +27,7 @@ import { HostSettingsComponent } from './host-settings.component';
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
TranslateModule,
|
||||
TranslateModule.forChild(),
|
||||
FormsModule,
|
||||
ReactiveFormsModule
|
||||
],
|
||||
|
@@ -25,7 +25,7 @@ import { SortingPickerComponent } from './sorting-picker.component';
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
TranslateModule
|
||||
TranslateModule.forChild()
|
||||
],
|
||||
declarations: [
|
||||
SortingPickerComponent
|
||||
|
@@ -26,7 +26,7 @@ import { EmptyContentComponent } from './empty-content/empty-content.component';
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
TranslateModule
|
||||
TranslateModule.forChild()
|
||||
],
|
||||
declarations: [
|
||||
ErrorContentComponent,
|
||||
|
@@ -22,23 +22,17 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { PipeModule } from '../pipes/pipe.module';
|
||||
import { UserInfoComponent } from './components/user-info.component';
|
||||
import { BpmUserService } from './services/bpm-user.service';
|
||||
import { EcmUserService } from './services/ecm-user.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
TranslateModule,
|
||||
TranslateModule.forChild(),
|
||||
PipeModule
|
||||
],
|
||||
declarations: [
|
||||
UserInfoComponent
|
||||
],
|
||||
providers: [
|
||||
EcmUserService,
|
||||
BpmUserService
|
||||
],
|
||||
exports: [
|
||||
UserInfoComponent
|
||||
]
|
||||
|
@@ -44,7 +44,7 @@ import { ViewerToolbarActionsComponent } from './components/viewer-toolbar-actio
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
TranslateModule,
|
||||
TranslateModule.forChild(),
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
ToolbarModule,
|
||||
|
Reference in New Issue
Block a user