mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +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:
parent
2bd7b3e57f
commit
14e7290466
@ -19,8 +19,11 @@ import { NgModule } from '@angular/core';
|
||||
import { AppDetailsCloudComponent } from './components/app-details-cloud/app-details-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({
|
||||
imports: [AppListCloudComponent, AppDetailsCloudComponent],
|
||||
exports: [AppListCloudComponent, AppDetailsCloudComponent]
|
||||
imports: [...APP_LIST_CLOUD_DIRECTIVES],
|
||||
exports: [...APP_LIST_CLOUD_DIRECTIVES]
|
||||
})
|
||||
export class AppListCloudModule {}
|
||||
|
@ -32,7 +32,6 @@ import {
|
||||
import { GroupCloudWidgetComponent } from './components/widgets/group/group-cloud.widget';
|
||||
import { PeopleCloudWidgetComponent } from './components/widgets/people/people-cloud.widget';
|
||||
import { AttachFileCloudWidgetComponent } from './components/widgets/attach-file/attach-file-cloud-widget.component';
|
||||
|
||||
import { UploadCloudWidgetComponent } from './components/widgets/attach-file/upload-cloud.widget';
|
||||
import { PeopleCloudModule } from '../people/people-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 { FileViewerWidgetComponent } from './components/widgets/file-viewer/file-viewer.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 { OverlayModule } from '@angular/cdk/overlay';
|
||||
import { FormSpinnerComponent } from './components/spinner/form-spinner.component';
|
||||
@ -59,7 +58,7 @@ import { FormCloudSpinnerService } from './services/spinner/form-cloud-spinner.s
|
||||
ContentNodeSelectorModule,
|
||||
PeopleCloudModule,
|
||||
GroupCloudModule,
|
||||
RichTextEditorModule,
|
||||
RichTextEditorComponent,
|
||||
...TOOLBAR_DIRECTIVES,
|
||||
A11yModule,
|
||||
FormatSpacePipe,
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
import { NgModule, ModuleWithProviders } from '@angular/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 { ProcessCloudModule } from './process/process-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 { ProcessServicesCloudPipeModule } from './pipes/process-services-cloud-pipe.module';
|
||||
import { ApolloModule } from 'apollo-angular';
|
||||
import { RichTextEditorModule } from './rich-text-editor/rich-text-editor.module';
|
||||
import { RichTextEditorComponent } from './rich-text-editor';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CoreModule,
|
||||
AppListCloudModule,
|
||||
...APP_LIST_CLOUD_DIRECTIVES,
|
||||
ProcessCloudModule,
|
||||
TaskCloudModule,
|
||||
GroupCloudModule,
|
||||
@ -49,13 +49,11 @@ import { RichTextEditorModule } from './rich-text-editor/rich-text-editor.module
|
||||
TaskFormModule,
|
||||
ProcessServicesCloudPipeModule,
|
||||
ApolloModule,
|
||||
RichTextEditorModule
|
||||
],
|
||||
providers: [
|
||||
provideTranslations('adf-process-services-cloud', 'assets/adf-process-services-cloud')
|
||||
RichTextEditorComponent
|
||||
],
|
||||
providers: [provideTranslations('adf-process-services-cloud', 'assets/adf-process-services-cloud')],
|
||||
exports: [
|
||||
AppListCloudModule,
|
||||
...APP_LIST_CLOUD_DIRECTIVES,
|
||||
ProcessCloudModule,
|
||||
TaskCloudModule,
|
||||
GroupCloudModule,
|
||||
@ -63,7 +61,7 @@ import { RichTextEditorModule } from './rich-text-editor/rich-text-editor.module
|
||||
TaskFormModule,
|
||||
PeopleCloudModule,
|
||||
ProcessServicesCloudPipeModule,
|
||||
RichTextEditorModule
|
||||
RichTextEditorComponent
|
||||
]
|
||||
})
|
||||
export class ProcessServicesCloudModule {
|
||||
|
@ -24,7 +24,7 @@ import { CoreModule } from '@alfresco/adf-core';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { EditProcessFilterCloudComponent } from './components/edit-process-filter-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 { PeopleCloudModule } from '../../people/people-cloud.module';
|
||||
|
||||
@ -35,7 +35,7 @@ import { PeopleCloudModule } from '../../people/people-cloud.module';
|
||||
HttpClientModule,
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
AppListCloudModule,
|
||||
...APP_LIST_CLOUD_DIRECTIVES,
|
||||
CoreModule,
|
||||
ProcessCommonModule,
|
||||
PeopleCloudModule
|
||||
@ -43,4 +43,4 @@ import { PeopleCloudModule } from '../../people/people-cloud.module';
|
||||
declarations: [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();
|
||||
};
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [RichTextEditorComponent]
|
||||
}).compileComponents();
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [RichTextEditorComponent]
|
||||
});
|
||||
|
||||
fixture = TestBed.createComponent(RichTextEditorComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { RichTextEditorModule } from './rich-text-editor.module';
|
||||
import { applicationConfig, Meta, moduleMetadata, StoryFn } from '@storybook/angular';
|
||||
import { ProcessServicesCloudStoryModule } from '../testing/process-services-cloud-story.module';
|
||||
import { RichTextEditorComponent } from './rich-text-editor.component';
|
||||
@ -26,7 +25,7 @@ export default {
|
||||
title: 'Process Services Cloud/Rich Text Editor',
|
||||
decorators: [
|
||||
moduleMetadata({
|
||||
imports: [RichTextEditorModule]
|
||||
imports: [RichTextEditorComponent]
|
||||
}),
|
||||
applicationConfig({
|
||||
providers: [importProvidersFrom(ProcessServicesCloudStoryModule)]
|
||||
|
@ -23,6 +23,7 @@ import { editorJsConfig } from './editorjs-config';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-cloud-rich-text-editor',
|
||||
standalone: true,
|
||||
templateUrl: './rich-text-editor.component.html',
|
||||
styleUrls: ['./rich-text-editor.component.scss'],
|
||||
encapsulation: ViewEncapsulation.None
|
||||
|
@ -16,15 +16,11 @@
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RichTextEditorComponent } from './rich-text-editor.component';
|
||||
|
||||
|
||||
/** @deprecated use `RichTextEditorComponent` instead */
|
||||
@NgModule({
|
||||
declarations: [RichTextEditorComponent],
|
||||
imports: [
|
||||
CommonModule
|
||||
],
|
||||
imports: [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 { CoreModule } from '@alfresco/adf-core';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { AppListCloudModule } from './../../app/app-list-cloud.module';
|
||||
import { ProcessCommonModule } from '../../common/process-common.module';
|
||||
import { PeopleCloudModule } from '../../people/people-cloud.module';
|
||||
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 { GroupCloudModule } from '../../group/group-cloud.module';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { APP_LIST_CLOUD_DIRECTIVES } from '../../app/app-list-cloud.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@ -40,7 +40,7 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
HttpClientModule,
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
AppListCloudModule,
|
||||
...APP_LIST_CLOUD_DIRECTIVES,
|
||||
CoreModule,
|
||||
GroupCloudModule,
|
||||
ProcessCommonModule,
|
||||
|
Loading…
x
Reference in New Issue
Block a user