From efc3b4829ef7197003f50412c21b6cf96aed2d1c Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Thu, 19 Oct 2023 13:11:09 +0200 Subject: [PATCH 1/4] Fix AAE-16968 BC --- lib/extensions/src/lib/config/document-list.extensions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/extensions/src/lib/config/document-list.extensions.ts b/lib/extensions/src/lib/config/document-list.extensions.ts index 863caa06b4d..cf1d2dc22c5 100644 --- a/lib/extensions/src/lib/config/document-list.extensions.ts +++ b/lib/extensions/src/lib/config/document-list.extensions.ts @@ -15,11 +15,12 @@ * limitations under the License. */ +import { DataColumnType } from '@alfresco/adf-core'; import { ExtensionElement } from './extension-element'; export interface DocumentListPresetRef extends ExtensionElement { key: string; - type: string; // text|image|date + type: DataColumnType; title?: string; format?: string; class?: string; From 006f80b38f72c2472bf885afa7aa8b87b22bbf3b Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Thu, 19 Oct 2023 13:12:18 +0200 Subject: [PATCH 2/4] Fix incorrect import --- lib/core/src/lib/datatable/data-column/data-column.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/src/lib/datatable/data-column/data-column.component.ts b/lib/core/src/lib/datatable/data-column/data-column.component.ts index bb6d08a2b09..c7fe7e619aa 100644 --- a/lib/core/src/lib/datatable/data-column/data-column.component.ts +++ b/lib/core/src/lib/datatable/data-column/data-column.component.ts @@ -18,7 +18,7 @@ /* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */ import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core'; -import { DataColumnType } from '../public-api'; +import { DataColumnType } from '../data/data-column.model'; @Component({ selector: 'data-column', From cf6149b6ca18f64ce6b91199202b04ea086ade42 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Thu, 19 Oct 2023 13:47:37 +0200 Subject: [PATCH 3/4] Move DataColumnType to extensions lib --- .../data-column/data-column.component.ts | 2 +- .../src/lib/datatable/data/data-column.model.ts | 16 +--------------- .../datatable/data/object-datacolumn.model.ts | 3 ++- .../src/lib/config/document-list.extensions.ts | 16 +++++++++++++++- .../src/lib/services/variable-mapper.sevice.ts | 3 ++- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/lib/core/src/lib/datatable/data-column/data-column.component.ts b/lib/core/src/lib/datatable/data-column/data-column.component.ts index c7fe7e619aa..01edebdc6cd 100644 --- a/lib/core/src/lib/datatable/data-column/data-column.component.ts +++ b/lib/core/src/lib/datatable/data-column/data-column.component.ts @@ -18,7 +18,7 @@ /* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */ import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core'; -import { DataColumnType } from '../data/data-column.model'; +import { DataColumnType } from '@alfresco/adf-extensions' @Component({ selector: 'data-column', diff --git a/lib/core/src/lib/datatable/data/data-column.model.ts b/lib/core/src/lib/datatable/data/data-column.model.ts index 5ca85701a42..c24e947def7 100644 --- a/lib/core/src/lib/datatable/data/data-column.model.ts +++ b/lib/core/src/lib/datatable/data/data-column.model.ts @@ -16,21 +16,7 @@ */ import { TemplateRef } from '@angular/core'; - -export interface DataColumnTypes { - text: string; - image: string; - date: string; - json: string; - icon: string; - fileSize: string; - location: string; - // eslint-disable-next-line id-blacklist - boolean: string; - amount: string; -} - -export type DataColumnType = keyof DataColumnTypes; +import { DataColumnType } from '@alfresco/adf-extensions' export interface DataColumn { id?: string; diff --git a/lib/core/src/lib/datatable/data/object-datacolumn.model.ts b/lib/core/src/lib/datatable/data/object-datacolumn.model.ts index 7a77a516feb..62ecbee1bf2 100644 --- a/lib/core/src/lib/datatable/data/object-datacolumn.model.ts +++ b/lib/core/src/lib/datatable/data/object-datacolumn.model.ts @@ -16,7 +16,8 @@ */ import { TemplateRef } from '@angular/core'; -import { CurrencyConfig, DataColumn, DataColumnType } from './data-column.model'; +import { DataColumnType } from '@alfresco/adf-extensions' +import { CurrencyConfig, DataColumn } from './data-column.model'; // Simple implementation of the DataColumn interface. export class ObjectDataColumn implements DataColumn { diff --git a/lib/extensions/src/lib/config/document-list.extensions.ts b/lib/extensions/src/lib/config/document-list.extensions.ts index cf1d2dc22c5..87ec1635874 100644 --- a/lib/extensions/src/lib/config/document-list.extensions.ts +++ b/lib/extensions/src/lib/config/document-list.extensions.ts @@ -15,9 +15,23 @@ * limitations under the License. */ -import { DataColumnType } from '@alfresco/adf-core'; import { ExtensionElement } from './extension-element'; +export interface DataColumnTypes { + text: string; + image: string; + date: string; + json: string; + icon: string; + fileSize: string; + location: string; + // eslint-disable-next-line id-blacklist + boolean: string; + amount: string; +} + +export type DataColumnType = keyof DataColumnTypes; + export interface DocumentListPresetRef extends ExtensionElement { key: string; type: DataColumnType; diff --git a/lib/process-services-cloud/src/lib/services/variable-mapper.sevice.ts b/lib/process-services-cloud/src/lib/services/variable-mapper.sevice.ts index d3e1ad43920..99f31bb6513 100644 --- a/lib/process-services-cloud/src/lib/services/variable-mapper.sevice.ts +++ b/lib/process-services-cloud/src/lib/services/variable-mapper.sevice.ts @@ -16,9 +16,10 @@ */ import { Injectable } from '@angular/core'; -import { DataColumn, DataColumnType } from '@alfresco/adf-core'; +import { DataColumn } from '@alfresco/adf-core'; import { ProcessListDataColumnCustomData } from '../models/data-column-custom-data'; import { ProcessInstanceVariable, WithVariablesMap } from '../models/process-instance-variable.model'; +import { DataColumnType } from '@alfresco/adf-extensions'; @Injectable({ providedIn: 'root' }) export class VariableMapperService { From cb5524193253449f4b98d32819350aca88e22739 Mon Sep 17 00:00:00 2001 From: MichalKinas Date: Thu, 19 Oct 2023 14:04:49 +0200 Subject: [PATCH 4/4] Lint fixes --- lib/core/src/lib/datatable/data-column/data-column.component.ts | 2 +- lib/core/src/lib/datatable/data/data-column.model.ts | 2 +- lib/core/src/lib/datatable/data/object-datacolumn.model.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/src/lib/datatable/data-column/data-column.component.ts b/lib/core/src/lib/datatable/data-column/data-column.component.ts index 01edebdc6cd..94a9a1cad99 100644 --- a/lib/core/src/lib/datatable/data-column/data-column.component.ts +++ b/lib/core/src/lib/datatable/data-column/data-column.component.ts @@ -18,7 +18,7 @@ /* eslint-disable @angular-eslint/component-selector, @angular-eslint/no-input-rename */ import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core'; -import { DataColumnType } from '@alfresco/adf-extensions' +import { DataColumnType } from '@alfresco/adf-extensions'; @Component({ selector: 'data-column', diff --git a/lib/core/src/lib/datatable/data/data-column.model.ts b/lib/core/src/lib/datatable/data/data-column.model.ts index c24e947def7..0d2ac7cfb83 100644 --- a/lib/core/src/lib/datatable/data/data-column.model.ts +++ b/lib/core/src/lib/datatable/data/data-column.model.ts @@ -16,7 +16,7 @@ */ import { TemplateRef } from '@angular/core'; -import { DataColumnType } from '@alfresco/adf-extensions' +import { DataColumnType } from '@alfresco/adf-extensions'; export interface DataColumn { id?: string; diff --git a/lib/core/src/lib/datatable/data/object-datacolumn.model.ts b/lib/core/src/lib/datatable/data/object-datacolumn.model.ts index 62ecbee1bf2..3974675998a 100644 --- a/lib/core/src/lib/datatable/data/object-datacolumn.model.ts +++ b/lib/core/src/lib/datatable/data/object-datacolumn.model.ts @@ -16,7 +16,7 @@ */ import { TemplateRef } from '@angular/core'; -import { DataColumnType } from '@alfresco/adf-extensions' +import { DataColumnType } from '@alfresco/adf-extensions'; import { CurrencyConfig, DataColumn } from './data-column.model'; // Simple implementation of the DataColumn interface.