mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
AAE-26215 migrate rich-text-editor to standalone (#10524)
* migrate rich-text-editor to standalone * migrate rich-text-editor to standalone [ci:force]
This commit is contained in:
@@ -19,8 +19,11 @@ import { NgModule } from '@angular/core';
|
|||||||
import { AppDetailsCloudComponent } from './components/app-details-cloud/app-details-cloud.component';
|
import { AppDetailsCloudComponent } from './components/app-details-cloud/app-details-cloud.component';
|
||||||
import { AppListCloudComponent } from './components/app-list-cloud/app-list-cloud.component';
|
import { AppListCloudComponent } from './components/app-list-cloud/app-list-cloud.component';
|
||||||
|
|
||||||
|
export const APP_LIST_CLOUD_DIRECTIVES = [AppListCloudComponent, AppDetailsCloudComponent] as const;
|
||||||
|
|
||||||
|
/** @deprecated use `...APP_LIST_CLOUD_DIRECTIVES` instead */
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [AppListCloudComponent, AppDetailsCloudComponent],
|
imports: [...APP_LIST_CLOUD_DIRECTIVES],
|
||||||
exports: [AppListCloudComponent, AppDetailsCloudComponent]
|
exports: [...APP_LIST_CLOUD_DIRECTIVES]
|
||||||
})
|
})
|
||||||
export class AppListCloudModule {}
|
export class AppListCloudModule {}
|
||||||
|
@@ -32,7 +32,6 @@ import {
|
|||||||
import { GroupCloudWidgetComponent } from './components/widgets/group/group-cloud.widget';
|
import { GroupCloudWidgetComponent } from './components/widgets/group/group-cloud.widget';
|
||||||
import { PeopleCloudWidgetComponent } from './components/widgets/people/people-cloud.widget';
|
import { PeopleCloudWidgetComponent } from './components/widgets/people/people-cloud.widget';
|
||||||
import { AttachFileCloudWidgetComponent } from './components/widgets/attach-file/attach-file-cloud-widget.component';
|
import { AttachFileCloudWidgetComponent } from './components/widgets/attach-file/attach-file-cloud-widget.component';
|
||||||
|
|
||||||
import { UploadCloudWidgetComponent } from './components/widgets/attach-file/upload-cloud.widget';
|
import { UploadCloudWidgetComponent } from './components/widgets/attach-file/upload-cloud.widget';
|
||||||
import { PeopleCloudModule } from '../people/people-cloud.module';
|
import { PeopleCloudModule } from '../people/people-cloud.module';
|
||||||
import { GroupCloudModule } from '../group/group-cloud.module';
|
import { GroupCloudModule } from '../group/group-cloud.module';
|
||||||
@@ -42,7 +41,7 @@ import { RadioButtonsCloudWidgetComponent } from './components/widgets/radio-but
|
|||||||
import { FilePropertiesTableCloudComponent } from './components/widgets/attach-file/file-properties-table-cloud.component';
|
import { FilePropertiesTableCloudComponent } from './components/widgets/attach-file/file-properties-table-cloud.component';
|
||||||
import { FileViewerWidgetComponent } from './components/widgets/file-viewer/file-viewer.widget';
|
import { FileViewerWidgetComponent } from './components/widgets/file-viewer/file-viewer.widget';
|
||||||
import { DisplayRichTextWidgetComponent } from './components/widgets/display-rich-text/display-rich-text.widget';
|
import { DisplayRichTextWidgetComponent } from './components/widgets/display-rich-text/display-rich-text.widget';
|
||||||
import { RichTextEditorModule } from '../rich-text-editor';
|
import { RichTextEditorComponent } from '../rich-text-editor';
|
||||||
import { A11yModule } from '@angular/cdk/a11y';
|
import { A11yModule } from '@angular/cdk/a11y';
|
||||||
import { OverlayModule } from '@angular/cdk/overlay';
|
import { OverlayModule } from '@angular/cdk/overlay';
|
||||||
import { FormSpinnerComponent } from './components/spinner/form-spinner.component';
|
import { FormSpinnerComponent } from './components/spinner/form-spinner.component';
|
||||||
@@ -59,7 +58,7 @@ import { FormCloudSpinnerService } from './services/spinner/form-cloud-spinner.s
|
|||||||
ContentNodeSelectorModule,
|
ContentNodeSelectorModule,
|
||||||
PeopleCloudModule,
|
PeopleCloudModule,
|
||||||
GroupCloudModule,
|
GroupCloudModule,
|
||||||
RichTextEditorModule,
|
RichTextEditorComponent,
|
||||||
...TOOLBAR_DIRECTIVES,
|
...TOOLBAR_DIRECTIVES,
|
||||||
A11yModule,
|
A11yModule,
|
||||||
FormatSpacePipe,
|
FormatSpacePipe,
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { NgModule, ModuleWithProviders } from '@angular/core';
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||||||
import { CoreModule, FormRenderingService, provideTranslations } from '@alfresco/adf-core';
|
import { CoreModule, FormRenderingService, provideTranslations } from '@alfresco/adf-core';
|
||||||
import { AppListCloudModule } from './app/app-list-cloud.module';
|
import { APP_LIST_CLOUD_DIRECTIVES } from './app/app-list-cloud.module';
|
||||||
import { TaskCloudModule } from './task/task-cloud.module';
|
import { TaskCloudModule } from './task/task-cloud.module';
|
||||||
import { ProcessCloudModule } from './process/process-cloud.module';
|
import { ProcessCloudModule } from './process/process-cloud.module';
|
||||||
import { GroupCloudModule } from './group/group-cloud.module';
|
import { GroupCloudModule } from './group/group-cloud.module';
|
||||||
@@ -35,12 +35,12 @@ import { PeopleCloudModule } from './people/people-cloud.module';
|
|||||||
import { CloudFormRenderingService } from './form/components/cloud-form-rendering.service';
|
import { CloudFormRenderingService } from './form/components/cloud-form-rendering.service';
|
||||||
import { ProcessServicesCloudPipeModule } from './pipes/process-services-cloud-pipe.module';
|
import { ProcessServicesCloudPipeModule } from './pipes/process-services-cloud-pipe.module';
|
||||||
import { ApolloModule } from 'apollo-angular';
|
import { ApolloModule } from 'apollo-angular';
|
||||||
import { RichTextEditorModule } from './rich-text-editor/rich-text-editor.module';
|
import { RichTextEditorComponent } from './rich-text-editor';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CoreModule,
|
CoreModule,
|
||||||
AppListCloudModule,
|
...APP_LIST_CLOUD_DIRECTIVES,
|
||||||
ProcessCloudModule,
|
ProcessCloudModule,
|
||||||
TaskCloudModule,
|
TaskCloudModule,
|
||||||
GroupCloudModule,
|
GroupCloudModule,
|
||||||
@@ -49,13 +49,11 @@ import { RichTextEditorModule } from './rich-text-editor/rich-text-editor.module
|
|||||||
TaskFormModule,
|
TaskFormModule,
|
||||||
ProcessServicesCloudPipeModule,
|
ProcessServicesCloudPipeModule,
|
||||||
ApolloModule,
|
ApolloModule,
|
||||||
RichTextEditorModule
|
RichTextEditorComponent
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
provideTranslations('adf-process-services-cloud', 'assets/adf-process-services-cloud')
|
|
||||||
],
|
],
|
||||||
|
providers: [provideTranslations('adf-process-services-cloud', 'assets/adf-process-services-cloud')],
|
||||||
exports: [
|
exports: [
|
||||||
AppListCloudModule,
|
...APP_LIST_CLOUD_DIRECTIVES,
|
||||||
ProcessCloudModule,
|
ProcessCloudModule,
|
||||||
TaskCloudModule,
|
TaskCloudModule,
|
||||||
GroupCloudModule,
|
GroupCloudModule,
|
||||||
@@ -63,7 +61,7 @@ import { RichTextEditorModule } from './rich-text-editor/rich-text-editor.module
|
|||||||
TaskFormModule,
|
TaskFormModule,
|
||||||
PeopleCloudModule,
|
PeopleCloudModule,
|
||||||
ProcessServicesCloudPipeModule,
|
ProcessServicesCloudPipeModule,
|
||||||
RichTextEditorModule
|
RichTextEditorComponent
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class ProcessServicesCloudModule {
|
export class ProcessServicesCloudModule {
|
||||||
|
@@ -24,7 +24,7 @@ import { CoreModule } from '@alfresco/adf-core';
|
|||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
import { EditProcessFilterCloudComponent } from './components/edit-process-filter-cloud.component';
|
import { EditProcessFilterCloudComponent } from './components/edit-process-filter-cloud.component';
|
||||||
import { ProcessFilterDialogCloudComponent } from './components/process-filter-dialog-cloud.component';
|
import { ProcessFilterDialogCloudComponent } from './components/process-filter-dialog-cloud.component';
|
||||||
import { AppListCloudModule } from './../../app/app-list-cloud.module';
|
import { APP_LIST_CLOUD_DIRECTIVES } from './../../app/app-list-cloud.module';
|
||||||
import { ProcessCommonModule } from '../../common/process-common.module';
|
import { ProcessCommonModule } from '../../common/process-common.module';
|
||||||
import { PeopleCloudModule } from '../../people/people-cloud.module';
|
import { PeopleCloudModule } from '../../people/people-cloud.module';
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ import { PeopleCloudModule } from '../../people/people-cloud.module';
|
|||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
MaterialModule,
|
MaterialModule,
|
||||||
AppListCloudModule,
|
...APP_LIST_CLOUD_DIRECTIVES,
|
||||||
CoreModule,
|
CoreModule,
|
||||||
ProcessCommonModule,
|
ProcessCommonModule,
|
||||||
PeopleCloudModule
|
PeopleCloudModule
|
||||||
@@ -43,4 +43,4 @@ import { PeopleCloudModule } from '../../people/people-cloud.module';
|
|||||||
declarations: [ProcessFiltersCloudComponent, EditProcessFilterCloudComponent, ProcessFilterDialogCloudComponent],
|
declarations: [ProcessFiltersCloudComponent, EditProcessFilterCloudComponent, ProcessFilterDialogCloudComponent],
|
||||||
exports: [ProcessFiltersCloudComponent, EditProcessFilterCloudComponent, ProcessFilterDialogCloudComponent]
|
exports: [ProcessFiltersCloudComponent, EditProcessFilterCloudComponent, ProcessFilterDialogCloudComponent]
|
||||||
})
|
})
|
||||||
export class ProcessFiltersCloudModule { }
|
export class ProcessFiltersCloudModule {}
|
||||||
|
@@ -1,54 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
||||||
*
|
|
||||||
* 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 const exampleData = {
|
|
||||||
time: 1663761278752,
|
|
||||||
blocks: [
|
|
||||||
{
|
|
||||||
id: 'yOV_DfEQhC',
|
|
||||||
type: 'paragraph',
|
|
||||||
data: {
|
|
||||||
text: 'text value'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'IZwymOWyds',
|
|
||||||
type: 'header',
|
|
||||||
data: {
|
|
||||||
text: 'Heading value',
|
|
||||||
level: 2
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: '3JJj6A8XFO',
|
|
||||||
type: 'list',
|
|
||||||
data: {
|
|
||||||
style: 'unordered',
|
|
||||||
items: ['unordered list item A', 'unordered list item B']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'q98W4eK4Nj',
|
|
||||||
type: 'list',
|
|
||||||
data: {
|
|
||||||
style: 'ordered',
|
|
||||||
items: ['ordered list item 1', 'ordered list item 2']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
version: '2.25.0'
|
|
||||||
};
|
|
@@ -51,10 +51,10 @@ describe('RichTextEditorComponent', () => {
|
|||||||
await fixture.whenStable();
|
await fixture.whenStable();
|
||||||
};
|
};
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(() => {
|
||||||
await TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [RichTextEditorComponent]
|
imports: [RichTextEditorComponent]
|
||||||
}).compileComponents();
|
});
|
||||||
|
|
||||||
fixture = TestBed.createComponent(RichTextEditorComponent);
|
fixture = TestBed.createComponent(RichTextEditorComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
@@ -15,7 +15,6 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { RichTextEditorModule } from './rich-text-editor.module';
|
|
||||||
import { applicationConfig, Meta, moduleMetadata, StoryFn } from '@storybook/angular';
|
import { applicationConfig, Meta, moduleMetadata, StoryFn } from '@storybook/angular';
|
||||||
import { ProcessServicesCloudStoryModule } from '../testing/process-services-cloud-story.module';
|
import { ProcessServicesCloudStoryModule } from '../testing/process-services-cloud-story.module';
|
||||||
import { RichTextEditorComponent } from './rich-text-editor.component';
|
import { RichTextEditorComponent } from './rich-text-editor.component';
|
||||||
@@ -26,7 +25,7 @@ export default {
|
|||||||
title: 'Process Services Cloud/Rich Text Editor',
|
title: 'Process Services Cloud/Rich Text Editor',
|
||||||
decorators: [
|
decorators: [
|
||||||
moduleMetadata({
|
moduleMetadata({
|
||||||
imports: [RichTextEditorModule]
|
imports: [RichTextEditorComponent]
|
||||||
}),
|
}),
|
||||||
applicationConfig({
|
applicationConfig({
|
||||||
providers: [importProvidersFrom(ProcessServicesCloudStoryModule)]
|
providers: [importProvidersFrom(ProcessServicesCloudStoryModule)]
|
||||||
|
@@ -23,6 +23,7 @@ import { editorJsConfig } from './editorjs-config';
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-cloud-rich-text-editor',
|
selector: 'adf-cloud-rich-text-editor',
|
||||||
|
standalone: true,
|
||||||
templateUrl: './rich-text-editor.component.html',
|
templateUrl: './rich-text-editor.component.html',
|
||||||
styleUrls: ['./rich-text-editor.component.scss'],
|
styleUrls: ['./rich-text-editor.component.scss'],
|
||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
|
@@ -16,15 +16,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { RichTextEditorComponent } from './rich-text-editor.component';
|
import { RichTextEditorComponent } from './rich-text-editor.component';
|
||||||
|
|
||||||
|
/** @deprecated use `RichTextEditorComponent` instead */
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [RichTextEditorComponent],
|
imports: [RichTextEditorComponent],
|
||||||
imports: [
|
|
||||||
CommonModule
|
|
||||||
],
|
|
||||||
exports: [RichTextEditorComponent]
|
exports: [RichTextEditorComponent]
|
||||||
})
|
})
|
||||||
export class RichTextEditorModule { }
|
export class RichTextEditorModule {}
|
||||||
|
@@ -22,7 +22,6 @@ import { TaskFiltersCloudComponent } from './components/task-filters-cloud.compo
|
|||||||
import { MaterialModule } from '../../material.module';
|
import { MaterialModule } from '../../material.module';
|
||||||
import { CoreModule } from '@alfresco/adf-core';
|
import { CoreModule } from '@alfresco/adf-core';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
import { AppListCloudModule } from './../../app/app-list-cloud.module';
|
|
||||||
import { ProcessCommonModule } from '../../common/process-common.module';
|
import { ProcessCommonModule } from '../../common/process-common.module';
|
||||||
import { PeopleCloudModule } from '../../people/people-cloud.module';
|
import { PeopleCloudModule } from '../../people/people-cloud.module';
|
||||||
import { EditServiceTaskFilterCloudComponent } from './components/edit-task-filters/edit-service-task-filter-cloud.component';
|
import { EditServiceTaskFilterCloudComponent } from './components/edit-task-filters/edit-service-task-filter-cloud.component';
|
||||||
@@ -32,6 +31,7 @@ import { ServiceTaskFiltersCloudComponent } from './components/service-task-filt
|
|||||||
import { TaskAssignmentFilterCloudComponent } from './components/task-assignment-filter/task-assignment-filter.component';
|
import { TaskAssignmentFilterCloudComponent } from './components/task-assignment-filter/task-assignment-filter.component';
|
||||||
import { GroupCloudModule } from '../../group/group-cloud.module';
|
import { GroupCloudModule } from '../../group/group-cloud.module';
|
||||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||||
|
import { APP_LIST_CLOUD_DIRECTIVES } from '../../app/app-list-cloud.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -40,7 +40,7 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
MaterialModule,
|
MaterialModule,
|
||||||
AppListCloudModule,
|
...APP_LIST_CLOUD_DIRECTIVES,
|
||||||
CoreModule,
|
CoreModule,
|
||||||
GroupCloudModule,
|
GroupCloudModule,
|
||||||
ProcessCommonModule,
|
ProcessCommonModule,
|
||||||
|
Reference in New Issue
Block a user