* [ACS-12451] Add missing ADF upgrade guides * [ACS-12451] CR fix * [ACS-12451] CR fixes
26 KiB
Title
| Title |
|---|
| Upgrading from ADF v6.9 to v7.0 |
Upgrading from ADF v6.9 to v7.0
This guide provides instructions on how to upgrade your v6.9.0 ADF projects to v7.0.0.
v7.0.0 is a major release. It moves ADF across three Angular major versions (14 → 17) — including the
Angular Material MDC migration — upgrades rxjs 6 → 7, requires @alfresco/js-api v8, switches the
test runner to Jest, and completes a large standalone-component migration. Expect real work: audit your
Material CSS overrides, update import paths for moved/removed symbols, and align your own Angular/tooling versions.
Because 7.0.0 was released through a chain of alpha builds, this guide is organised into a
shared overview followed by a per-release section for each
intermediate tag (7.0.0-alpha.2, -alpha.3, -alpha.4, -alpha.6, -alpha.7, and the final 7.0.0).
Apply them in order.
Note on alpha.5: there is no
7.0.0-alpha.5tag. Its changes were released as part of7.0.0-alpha.6and are documented under that heading.
Before you begin
Always perform upgrades on a "clean" project state, back up your changes or make a project backup. Since this is a major version with many breaking changes, budget time to build, run, and re-test your application after upgrading.
Contents
Library updates
Update the package.json file with the latest library versions:
{
"dependencies": {
"@alfresco/adf-core": "7.0.0",
"@alfresco/adf-content-services": "7.0.0",
"@alfresco/adf-process-services": "7.0.0",
"@alfresco/adf-process-services-cloud": "7.0.0",
"@alfresco/adf-insights": "7.0.0",
"@alfresco/adf-extensions": "7.0.0",
"@alfresco/js-api": ">=8.0.0"
}
}
Clean your old distribution and dependencies by deleting node_modules and package-lock.json, then reinstall:
npm install
Major platform changes
These changes accumulate across the alpha chain but affect every consumer of 7.0.0:
| Area | 6.9.0 | 7.0.0 |
|---|---|---|
| Angular | 14.1.3 | 17.1.3 |
| Angular Material / CDK | 14.1.2 | 17.1.2 (MDC) |
| rxjs | 6.6.6 | 7.8.1 |
| zone.js | 0.11.4 | 0.14.8 |
| TypeScript | 4.7.4 | 5.3.3 |
| Nx | @nrwl/* 14 |
@nx/* 20 |
angular-oauth2-oidc |
13 | 17 |
@alfresco/js-api |
7.5 | >= 8.0.0 |
| Test runner | Karma/Jasmine | Jest |
Node.js (engines.node) |
>= 6.0.0 | >= 18.0.0 |
Key consumer implications:
- Angular Material MDC migration — Angular Material's components were rewritten onto MDC, changing their
internal DOM and CSS class names (
.mat-*→.mat-mdc-*). If your application styles Material internals (directly or by overriding ADF component styles), you must re-audit those styles. This is the single biggest source of visual breakage. - Accessibility / DOM & roles — beyond the MDC class changes, ADF's accessibility pass altered DOM and ARIA in
several components: Material tooltips became the native
[title]attribute, search facet chips moved frommat-chip-optiontomat-chip,roleattributes changed on the DataTable and Columns Selector, and the Aspect List HTML structure changed. Re-check any tests or CSS keyed off these roles/structure. - Node 18 — the repository's
engines.nodewas raised from>= 6.0.0to>= 18.0.0; move your build/CI to Node 18+. - rxjs 7 — adopt rxjs 7 (
firstValueFrom/lastValueFrominstead oftoPromise, stricter operator typings). - js-api v8 — ADF requires
@alfresco/js-api>= 8.0.0. - Jest — ADF's own tests moved from Karma/Jasmine to Jest. If your test setup extends ADF testing utilities, migrate to Jest.
- Standalone components — most ADF components, directives and pipes are now
standalone. Many NgModules were removed or deprecated; import the standalone symbols (or the exported*_DIRECTIVESconst arrays) directly. - Date handling — date pipes/adapters are date-fns based; the legacy moment-based pipes are removed (see 7.0.0 final).
ng update— where migrations are provided, runng update @alfresco/adf-core@7.0.0to apply automated fixes.
Changes by release
7.0.0-alpha.2
The Angular 14 → 15 step and the Material MDC migration.
Platform / dependencies
- Angular and Material
14 → 15.2; the MDC migration rewrites hundreds of component stylesheets. - rxjs
6.6 → 7.8; TypeScript4.7 → 4.9; Nx (still@nrwl)14 → 15;@alfresco/js-api→8.0.0-alpha. - Date handling moves to a date-fns adapter: new
AdfDateFnsAdapter,AdfDateTimeFnsAdapter, andADF_DATE_FORMATS(wired toDateAdapter/MAT_DATE_FORMATS).
Breaking removals / renames / moves
ButtonsMenuComponentmoved from@alfresco/adf-coreto@alfresco/adf-insights.AuthModuleis no longer exported from the@alfresco/adf-coreroot — import it from the auth entry point.- Removed pipes:
BooleanPipe,IsIncludedPipe,TabLabelsPipe(core). RemovedAuditService. - Removed About items:
AboutGithubLinkComponent,AboutPlatformVersionComponent, andAaeInfoService;AboutModuleis deprecated in favour of an exportedABOUT_DIRECTIVESarray. - Removed public directives
PeopleSearchActionLabelDirectiveandPeopleSearchTitleDirective(process-services); removed the insights analyticsWidgetComponentexport; removedSortingPickerModule; the extensionsAppExtensionServiceMockis no longer exported. - Removed the standalone date/datetime form-field validators from
FORM_FIELD_VALIDATORSand the public exports (DateFieldValidator,DateTimeFieldValidator, and theBoundary/Min/Maxdate & datetime variants) — date/datetime validation moved into Angular reactive-form validators. - The
content-user-infoandprocess-user-infocomponents, andCoreAutomationService, were moved to the demo shell (no longer part of the libraries). - The shared
MaterialModuleis deprecated/removed from several libraries; stop depending on it and import the specific Angular Material modules you need. process-servicespublic API restructured —people-process.service,apps-process.service,task-comments.servicenow live underlib/services. Note:BpmUserModel,UserProcessModel,ProcessInstance,ProcessInstanceVariable,FilterRepresentationModel,FilterParamsModelandAppDefinitionRepresentationModelwere not removed — they are retained as@deprecatedtype aliases to the equivalent@alfresco/js-apitypes (vialib/compat/types). Migrate to the js-api types. However,TaskDetailsModelandStartTaskModelwere removed outright (their model file was deleted and no@deprecatedalias is provided) — switch to the equivalent@alfresco/js-apitask types (e.g.TaskRepresentation). Likewise removed outright with no alias:ProcessListModel,TaskListModel,FilterProcessRepresentationModel,ProcessFilterParamRepresentationModel,ProcessFilterRequestRepresentationandTaskQueryRequestRepresentationModel— move to the equivalent@alfresco/js-apitypes.- Removed process-services directives:
TaskAuditDirectiveandNoTaskDetailsTemplateDirective(@alfresco/adf-process-services, previously exported fromtask-list) were removed — drop the usages. - Card-view validator filenames were corrected (
*.valiator.ts→*.validator.ts) — this breaks deep-path imports of those files (the barrel export is unaffected).
Standalone / module changes
- Wide standalone migration across core, content-services, extensions, insights and process-services; many
NgModules (card-view, content-type, node-comments, site-dropdown, form, apps-list, attachment, task-list,
dynamic-table, sorting-picker, dynamic-chip-list, and more) were deleted. Several modules were replaced by
exported directive arrays:
ANALYTICS_PROCESS_DIRECTIVES(insights),ABOUT_DIRECTIVES,FORM_DIRECTIVES,APPS_LIST_DIRECTIVES,ATTACHMENT_DIRECTIVES(process-services),EXTENSION_DIRECTIVES(extensions).ExtensionsModuleis deprecated (itsforChild()remains as a deprecated shim). - Some standalone components also moved to nested folders, breaking deep-path imports (e.g.
StartFormComponent→.../form/start-form/start-form.component; the attachment components). - "Break dependency on Material Module" work means Layout/DataTable/Form components self-import only the Material pieces they use.
New features
- New standalone core UI components:
AvatarComponent,ButtonComponent,ProgressComponent, and a newheaderentry point (HeaderComponent,NavbarComponent,NavbarItemComponent). NewAlfrescoIconComponent(adf-alfresco-icon) in content-services. - New generic
DialogComponent(coredialogs) that can return data on confirmation; newConfirmDialogModule; newDIALOG_COMPONENT_DATAinjection token +DialogData.componentDataso embedded dialog components can receive injected data. - New card-view
longtype (CardViewLongItemModel,CardViewItemLongValidator,CardViewItemPositiveLongValidator). - New exported form helpers:
FieldOptionType,FieldSelectionType,FieldAlignmentType,FormFieldTypes.REACTIVE_TYPES+isReactiveType(),FormFieldModel.markAsValid(),DEFAULT_DATE_FORMAT,FormOutcomeModel.skipValidation, andFormRendererComponent@Input() readOnly. - New
@Input()s:ViewerComponent/ViewerRenderComponent/PreviewExtensionComponentnodeId(custom viewer extensions receive the node id);PeopleCloudComponenthideInputOnSingleSelection,formFieldAppearance,formFieldSubscriptSizing,showErrors;SearchWidgetContainerComponentuseHeaderQueryBuilder(constructor also dropsSearchQueryBuilderServiceand addsInjector). - DataTable
@Input() displayCheckboxesOnHover(defaultfalse);DocumentListService.reload()/reload$. - New content-services feature areas: Legal Hold, Predictions API, and a feature-flags library. New Form Header widget and viewer file-rotation support.
- Insights packaging:
chart.js,ng2-charts,raphael,@alfresco/adf-coreand@ngx-translate/coremoved frompeerDependenciestodependencies.
Behavioural
matTooltipwas replaced by the native[title]attribute across ~96 templates (accessibility) — tooltip timing/position inputs no longer apply where replaced.- DATE and DATETIME widgets migrated to Angular reactive forms. Dropdown/radio REST options are now fetched
only when
optionType === 'rest'(previously anyrestUrltriggered a fetch), and read-only dropdown/radio widgets no longer call REST APIs or show validation errors. - Date/time widgets became timezone-aware; a
token_receivedevent is emitted on login;PdfViewerComponentdisables pdf.jsisEvalSupported(security); the tree-view component was marked for deprecation.
7.0.0-alpha.3
Auth and js-api relocation.
Platform / dependencies
angular-oauth2-oidc13 → 15;axiospinned as a direct dependency; peer ranges opened to js-api8.0.0-alpha.
Breaking removals / renames / moves
AlfrescoApiService(andAlfrescoApiServiceMock) moved from@alfresco/adf-coreto@alfresco/adf-content-services. Update your imports. Anng updatemigration (updateAlfrescoApiImports, run viang update @alfresco/adf-core@7.0.0) rewrites these automatically. The relatedAlfrescoApiLoaderService,AlfrescoApiNoAuthServiceand thecreateAlfrescoApiInstancefactory are now exported from content-services, and the API-initialisingAPP_INITIALIZERmoved fromCoreModuletoContentModule— make sure your app importsContentModule.ExtensionService.setAuthGuards()/getAuthGuards()signatures changed toRecord<string, unknown>/Array<unknown>(aligns with the functional guards).- Auth route guards are now functional
CanActivateFnvalues, not injectable classes:AuthGuard,AuthGuardBpm,AuthGuardEcm,AuthGuardSsoRoleService,OidcAuthGuard. The base classAuthGuardBasewas deleted, and a newSHELL_AUTH_TOKENinjection token was added. Route configs and any subclasses must migrate. - Removed:
DirectionalityConfigService(folded intoUserPreferencesService); pipesMimeTypeIconPipe,LocalizedRolePipe,FilterOutEveryObjectByPropPipe; thesetupTestBedtest helper.
Standalone / testing ergonomics
- New
NoopAuthModuleandNoopTranslateModule(core testing) to simplify consumer test beds.
New features
- Knowledge Retrieval / Search-AI: new
AgentServiceandSearchAiService(content-services). - New
@Output() updatedFilter(EventEmitter<string>) on process/task filter cloud components (a distinct emitter on each); new@Output() rowsSelectedonProcessListComponent; form/widget styling support (newpredefined-themeexport,PredefinedThemeModel); new OAuth config keysclockSkewInSecandsessionChecksEnabled. StartProcessCloudService.getStartEventConstants(appName, processDefinitionId)— start/cancel buttons can now be customised from process-definition constants;StartProcessCloudComponent@Output() errortype changed toEventEmitter<any>.RichTextEditorComponentgained@Input() placeholderand@Input() autoFocus.DROPDOWNwas added toFormFieldTypes.REACTIVE_TYPES(dropdowns now bind/validate via reactive forms;DropdownCloudWidgetComponentis now standalone).ProcessCommentsComponentwas simplified (its@Output() errorwas removed).
7.0.0-alpha.4
The Angular 15 → 16 step.
Platform / dependencies
- Angular and Material
15 → 16.2;zone.js → 0.13; Nx package scope renamed@nrwl/* → @nx/*(16);angular-oauth2-oidc 15 → 16; chart.js 4; ng-packagr 16.
Breaking removals / renames
- Removed
FilterStringPipe(core). Columns-selector now filters in the component. DisplayModeServicemethods widened from theFormCloudDisplayModeenum tostring(to allow astandalonedisplay mode and custom modes) — relax enum-typed callers tostring.- Process/task filter counters changed shape — the public
counters$: { [key]: Observable<number> }onProcessFiltersCloudComponent/BaseTaskFiltersCloudComponentwas removed and replaced by a synchronouscounters: { [key]: number }(plus a newinitFilterCounters()method). Templates usingcounters$ | asyncmust migrate. - The abstract
AuthServicegained abstract membersonLogout$: Observable<void>andisDiscoveryDocumentLoaded$: Observable<boolean>— customAuthServiceimplementations must implement them.OidcAuthenticationServicegained publicshouldPerformSsoLogin$.
New tokens / API
- New
TASK_SEARCH_API_METHOD_TOKEN('GET' | 'POST') enabling the new POST task-search endpoint (Activiti ≥ 8.7). In'POST'modeTaskListCloudComponenthonours newstring[]inputsnames,processDefinitionNames,statuses,assignees,priorities,completedByUsers; new exportsTaskListRequestModel,TaskFilterCloudAdapter,ProcessTaskListCloudService, andTaskListRequestTaskVariableFilter. - New
JWT_STORAGE_SERVICEtoken so consumers can supply custom OAuth storage toJwtHelperService.
New features
- Saved Search (ADW): new
SavedSearchesServiceandSavedSearchinterface (content-servicescommon). VersionListComponent/VersionManagerComponentgained@Input() allowVersionDelete,allowViewVersionsandshowActions(all defaulttrue);NewVersionUploaderDialogDatagained the matching optional fields; the version list now uses a virtual-scroll viewport.- New
refreshFilter(filterKey)on process/task filter components; newFormService.onFormVariableChanged;StartProcessCloudComponentgained@Input() displayModeConfigurations.
Behavioural
- Auth infinite-loop / clock-skew rework: new internal
RetryLoginService,TimeSyncService, and aTokenInterceptor(HTTP interceptor) — the user is now logged out after 3 failed login attempts. Re-test SSO flows.
7.0.0-alpha.6
(There was no alpha.5 tag; those changes are included here.) No framework version bumps in this window —
the changes are API/feature-level.
Breaking removals / renames
- Removed
ProcessTaskListCloudServicefrom the process-list public API entry point. - Renamed exported const
RUNNING_STATUS → DEPLOYED_STATUS;AppListCloudComponentnow queriesDEPLOYEDapps. The related methodgetRunningApplications()was renamed togetDeployedApplications()onEditProcessFilterCloudComponentandBaseEditTaskFilterCloudComponent. TaskListRequestModel.variableKeys(andProcessListRequestModel.variableKeys) renamed toprocessVariableKeys;TaskListRequestModelgained an optionalprocessInstanceId.ContainerModelmethods became getters:isGroup()→ getterisTypeFieldGroup;isCollapsible()/isCollapsedByDefault()→ getters (drop the()); new getterhideHeader.- Constructor changes (affect manual instantiation/subclassing):
PermissionListComponentnow requiresContentService(and exposes a newupdatePermissionsAllowedgetter);SidenavLayoutComponentnow requiresChangeDetectorRef;TaskHeaderComponentgainedCardViewUpdateService. - The Saved Searches storage file changed from
saved-searches.jsontoconfig.json(existing saved searches won't be found until re-saved).
New features
- New process search API:
ProcessListRequestModel,ProcessFilterCloudAdapter,ProcessListCloudService.fetchProcessList(), and aPROCESS_SEARCH_API_METHOD_TOKEN('GET' | 'POST');getProcessByRequest()is now@deprecated. NewProcessListCloudComponentinputsnames,initiators,appVersions,statuses(POST mode). - DataTable:
DataRow.isSelectable?, and drag-to-reorder rows via@Input() enableDragRows/@Output() dragDropped. - CardView autocomplete support (
CardViewSelectItemModel.autocompleteBased). TaskHeaderComponentgained@Input() readOnlyand@Input() resetChanges(aSubject<void>); the Assignee field became an inline-editable autocomplete (re-assignable when assigned to the current user).
Behavioural
DataTableSchema.isColumnSchemaCreated$now backed by aBehaviorSubject(emits an initialfalse, both branches emittrue) — relevant if you subclassDataTableSchema.- Large internal migration to Angular's
takeUntilDestroyed(128 files) — relevant if you subclass these components. - Kerberos no longer adds a basic-auth header; CSRF header now respects the
disableCsrfflag.
7.0.0-alpha.7
Standalone migration of process-services-cloud, plus new libraries.
Platform / dependencies
angular-oauth2-oidc 16 → 17; newgraphql-wsdependency. Angular remains 16.2 in this window.@alfresco/adf-corepeer dependencies were pinned to exact Angular 16.2.9 — align your peers accordingly.
Breaking removals / renames / moves
- The
@alfresco/adf-testinglibrary (lib/testing) was removed entirely. Remove any imports from it. TaskFormCloudComponentmoved to a nested path (./components/task-form-cloud/task-form-cloud.component) — deep imports break; the package entry-point export is preserved.- Tag creator components were consolidated (a transforming pipe and styles removed).
- Removed pipes/directives (
process-services-cloud):ProcessNameCloudPipe(together with itsProcessServicesCloudPipeModule),InitialGroupNamePipe, andCancelProcessDirective(fromProcessDirectiveModule) were removed — verified gone at 7.0.0. Drop the usages or switch to the standalone equivalents. - Start-Task-Cloud removed:
StartTaskCloudComponent,StartTaskCloudServiceandStartTaskCloudModule(@alfresco/adf-process-services-cloud) were removed entirely (present atalpha.6, gone atalpha.7). - Identity DI-override tokens removed:
IDENTITY_USER_SERVICE_TOKENandIDENTITY_GROUP_SERVICE_TOKENwere removed; theIdentityUserServiceInterface/IdentityGroupServiceInterfacetypes moved to@alfresco/adf-core(auth/interfaces). Re-point any custom identity-service provider. - Deprecated:
TaskListCloudService.getTaskByRequest()(and theTaskListCloudServiceInterfacemember) is now@deprecated— usefetchTaskList()(mirrors thegetProcessByRequest()deprecation in alpha.6).
Standalone / module changes
- Broad standalone migration of
process-services-cloud: many NgModules were removed or reduced (ProcessDirectiveModule,TaskDirectiveModule,StartTaskCloudModule,StartProcessCloudModule,ProcessCommonModule, the cloudmaterial.module, and others). Import the standalone components/directives directly.
New features
- Screens: new
ScreenRenderingServiceandUserTaskCloudComponent(process-services-cloud). - New
WebSocketService(Apollo/graphql-ws);NotificationCloudServicerefactored onto it. truncatepipe now exported from core; newTruncatedisplay option for textDataColumn; new optionalDataColumn.subtitle; new@Input() showProvidedActions(defaultfalse) onDataTableComponent,ProcessListCloudComponentandBaseTaskListCloudComponent.- People widget multi-select (
field.params.multiple);adfLocalizedDatepipe gains atimezoneargument;ObjectDataTableAdapterserver/clientSortingMode. - New exported
ReactiveFormWidgetinterface ({ updateReactiveFormControl(); formService });FormRulesManager.onDestroy$opened toprotected. NodesApiServicegainedinitiateFolderSizeCalculation(nodeId)andgetFolderSizeInfo(nodeId, jobId)(backing the folder size-details dialog).- New model fields:
ApplicationInstanceModel.canAccessAudit;ServiceTaskQueryCloudRequestModelgained completed/started date-range fields; newScreenCloudComponent+UserTaskCustomUiinterface. AppsProcessCloudService.getDeployedApplicationsByStatussignature changed (role?: string→roles?: string | string[]).
Behavioural
- Required inputs are now enforced across ~55 components (~66 inputs) in core, content-services,
process-services and process-services-cloud —
@Input()became@Input({ required: true }). Affected components includeNameColumnComponent,TreeViewComponent,VersionComparisonComponent,VersionUploadComponent,CommentListComponent,NodeCommentsComponent,TaskHeaderComponent,BreadcrumbComponent,CategoriesManagementComponent,ContentMetadataComponent/ContentMetadataCardComponent,ContentNodeSelectorPanelComponent, the library/permission/tag/search-facet/card-view/datatable components, and many more. Any template that omits one of these inputs now fails to compile — audit your templates. onLogoutis emitted when redirected to the login page;ProcessFilterOperatorsadds'ne'.
7.0.0 (final)
The Angular 16 → 17 step and the Jest migration.
Platform / dependencies
- Angular and Material
16 → 17.1; TypeScript5.3; zone.js0.14; Nx20;apollo-angular 6. - Test runner migrated from Karma/Jasmine to Jest.
- Rich-text editor dependencies bumped (several
@editorjs/*majors); font-size dependency swapped to@valano/change-font-size.
Breaking removals / renames
MomentDatePipeandMomentDateTimePipewere removed — migrate to the date-fns based date pipe/adapter.FullNamePipe.transformgained an optionalemailDisplayed?: booleanargument (backward compatible; appends<email>when true).FormModelconstructor gained a 7th optionalinjectedFieldValidators?argument, and itsfieldValidatorsdefault is now populated via injected validators.
New features
- New injection tokens for pluggable form validators:
FORM_SERVICE_FIELD_VALIDATORS_TOKENandFORM_CLOUD_SERVICE_FIELD_VALIDATORS_TOKEN— provideFormFieldValidator[]app-wide. - New
SAVED_SEARCHES_SERVICE_PREFERENCEStoken +SavedSearchesPreferencesApiService; Saved Searches now persist via the Preferences API. - Screens: new
lib/screenpublic API (UserTaskCustomUimodel) with full-screen support. - Form sections rendered at runtime (
FormSectionComponent); new publicUnitTestingUtilstest helper. - New public export
DEFAULT_LANGUAGE_LIST(core/common);DocumentListComponent@Input() displayDragAndDropHint(defaulttrue);FormBaseComponentgetterhasVisibleOutcomes. CardViewBaseItemModelgainedisValidValue?(and now skips unsupported constraint types with aconsole.warninstead of throwing);ContentMetadataComponentgainedinvalidPropertiesand disables the save button while any property is invalid.RequiredFieldValidatornow also supports theALFRESCO_FILE_VIEWERandPROPERTIES_VIEWERwidget types.
Behavioural
- Service-tasks API data shape changed —
ServiceTaskListCloudComponentnow unwrapsentries.map(t => t.entry); consumers reading raw service-task rows must unwrap.entry. - Submit/start button state is now computed from validators across cloud form/task/start-process components.
CommentsComponentmoved to a reactivecommentControland disables the add button for whitespace-only comments.- The required-field asterisk is now toggled via CSS
visibility(not*ngIf) across ~27 widget templates — a DOM change if you key off the asterisk element's presence. - Re-verify custom Material MDC themes and rich-text-editor integrations against Angular 17.