diff --git a/demo-shell/src/app/components/file-view/file-view.component.html b/demo-shell/src/app/components/file-view/file-view.component.html index 78aeeee989..d4ec8af7ca 100644 --- a/demo-shell/src/app/components/file-view/file-view.component.html +++ b/demo-shell/src/app/components/file-view/file-view.component.html @@ -212,8 +212,8 @@ + (change)="toggleAllowRightSidebar()" + [checked]="allowRightSidebar"> Allow Right Sidebar

@@ -255,22 +255,20 @@ -
My info
- + [sidebarRightTemplate]="sidebarRightTemplate">

My custom toolbar

diff --git a/demo-shell/src/app/components/file-view/file-view.component.ts b/demo-shell/src/app/components/file-view/file-view.component.ts index d544c5811f..06982d7e6e 100644 --- a/demo-shell/src/app/components/file-view/file-view.component.ts +++ b/demo-shell/src/app/components/file-view/file-view.component.ts @@ -43,7 +43,7 @@ export class FileViewComponent implements OnInit { openWith = false; allowDownload = true; allowPrint = true; - allowSidebar = true; + allowRightSidebar = true; allowLeftSidebar = true; moreActions = true; customName = false; @@ -131,8 +131,8 @@ export class FileViewComponent implements OnInit { this.showLeftSidebar = false; } - toggleAllowSidebar() { - this.allowSidebar = !this.allowSidebar; + toggleAllowRightSidebar() { + this.allowRightSidebar = !this.allowRightSidebar; } toggleAllowLeftSidebar() { diff --git a/demo-shell/src/app/components/login/login.component.html b/demo-shell/src/app/components/login/login.component.html index a09f1a51f2..dd3b072cdb 100644 --- a/demo-shell/src/app/components/login/login.component.html +++ b/demo-shell/src/app/components/login/login.component.html @@ -81,7 +81,6 @@ [successRoute]="customSuccessRouteURI" [logoImageUrl]="customLogoImageURL" [fieldsValidation]="customValidation" - [disableCsrf]="disableCsrf" [showLoginActions]="showFooter" [showRememberMe]="showFooter && showRememberMe" (executeSubmit)="checkForm($event)" diff --git a/demo-shell/src/app/components/process-service/process-attachments.component.html b/demo-shell/src/app/components/process-service/process-attachments.component.html index c1c8d94691..217d2aa51f 100644 --- a/demo-shell/src/app/components/process-service/process-attachments.component.html +++ b/demo-shell/src/app/components/process-service/process-attachments.component.html @@ -2,7 +2,7 @@
- {{'ADF_PROCESS_LIST.PROCESS-ATTACHMENT.EMPTY.HEADER' | translate}} + {{'ADF_PROCESS_LIST.PROCESS-ATTACHMENT.EMPTY.HEADER' | translate}}
@@ -22,7 +22,7 @@ {{'ADF_PROCESS_LIST.PROCESS-ATTACHMENT.EMPTY.DRAG-AND-DROP.SUBTITLE' | translate}}
- +
@@ -35,4 +35,4 @@
- \ No newline at end of file + diff --git a/demo-shell/src/app/components/process-service/process-service.component.html b/demo-shell/src/app/components/process-service/process-service.component.html index b4f9dfecba..d8b78c391c 100644 --- a/demo-shell/src/app/components/process-service/process-service.component.html +++ b/demo-shell/src/app/components/process-service/process-service.component.html @@ -42,7 +42,6 @@ [page]="taskPage" [size]="paginationPageSize" [selectionMode]="selectionMode" - [processDefinitionKey]="taskFilter?.filter?.processDefinitionKey" [name]="taskFilter?.filter?.name" [assignment]="taskFilter?.filter?.assignment" [state]="taskFilter?.filter?.state" @@ -157,7 +156,6 @@ #processList *ngIf="processFilter?.filter" [appId]="processFilter?.appId" [selectionMode]="selectionMode" - [processDefinitionKey]="processFilter?.filter?.processDefinitionKey" [presetColumn]="presetColumn" [state]="processFilter?.filter?.state" [page]="processPage" @@ -231,12 +229,12 @@
Report List
- - +
+ [rootFolderId]="taskId"> -

{{'APP_LAYOUT.EXTENDED_SEARCH_QUERY_BODY' | translate}}

- - {{'APP_LAYOUT.SEARCH_SERVICE_APPROACH' | translate}} - -
@@ -13,7 +8,6 @@
+ + + +``` + +#### Infinite pagination component + +```html + + + + +``` ### Data Sources @@ -447,7 +460,7 @@ Now you can access Document List properties or call methods directly: ```ts // print currently displayed folder node object to console -console.log(documentList.folderNode); +console.log(documentList.currentFolderId); ``` **Important note**: @@ -660,7 +673,7 @@ actions you have defined in a context menu: selector: 'my-view', template: ` ... - + ` }) export class MyView { diff --git a/docs/content-services/document-list.service.md b/docs/content-services/document-list.service.md index ff83f2c577..e5a4791cca 100644 --- a/docs/content-services/document-list.service.md +++ b/docs/content-services/document-list.service.md @@ -54,11 +54,6 @@ Implements node operations used by the [Document List component](../content-serv - _nodeId:_ `string` - ID of the target node - _includeFields:_ `string[]` - Extra information to include (available options are "aspectNames", "isLink" and "association") - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`>` - Details of the folder -- **hasPermission**(node: `any`, permission: [`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)`|string`): `boolean`
- (**Deprecated:** 2.3.0 - use the equivalent in the content service) Checks if a node has the specified permission. - - _node:_ `any` - Target node - - _permission:_ [`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)`|string` - Permission level to query - - **Returns** `boolean` - True if the node has the permission, false otherwise - **moveNode**(nodeId: `string`, targetParentId: `string`): `any`
Moves a node to destination node. - _nodeId:_ `string` - The id of the node to be moved diff --git a/docs/content-services/file-draggable.directive.md b/docs/content-services/file-draggable.directive.md index 5d16dab3ad..fc91a680af 100644 --- a/docs/content-services/file-draggable.directive.md +++ b/docs/content-services/file-draggable.directive.md @@ -47,7 +47,6 @@ Some sample CSS to show the drag and drop area: | Name | Type | Description | | ---- | ---- | ----------- | | filesDropped | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when one or more files are dragged and dropped onto the draggable element. | -| filesEntityDropped | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | (**Deprecated:** in 2.4.0: use `filesDropped` instead) Emitted when one or more files are dragged and dropped onto the draggable element. | | folderEntityDropped | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when a directory is dragged and dropped onto the draggable element. | ## Details diff --git a/docs/content-services/search-control.component.md b/docs/content-services/search-control.component.md index 95d5867f38..b21a5b4e3d 100644 --- a/docs/content-services/search-control.component.md +++ b/docs/content-services/search-control.component.md @@ -43,7 +43,6 @@ You can show your own custom template when no results are found for the search: | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | | autocomplete | `boolean` | false | Toggles auto-completion of the search input field. | -| customQueryBody | `QueryBody` | | (**Deprecated:** in 2.1.0) | | expandable | `boolean` | true | Toggles whether to use an expanding search control. If false then a regular input is used. | | highlight | `boolean` | false | Toggles highlighting of the search term in the results. | | inputType | `string` | "text" | Type of the input field to render, e.g. "search" or "text" (default). | diff --git a/docs/content-services/search.component.md b/docs/content-services/search.component.md index d16cab5be1..e4166dc8bc 100644 --- a/docs/content-services/search.component.md +++ b/docs/content-services/search.component.md @@ -38,7 +38,6 @@ Searches items for supplied search terms. | ---- | ---- | ------------- | ----------- | | displayWith | `Function \| null` | null | Function that maps an option's value to its display value in the trigger. | | maxResults | `number` | 20 | Maximum number of results to show in the search. | -| queryBody | `QueryBody` | | (**Deprecated:** in 2.1.0) | | searchTerm | `string` | "" | Search term to use when executing the search. Updating this value will run a new search and update the results. | | skipResults | `number` | 0 | Number of results to skip from the results pagination. | @@ -153,7 +152,7 @@ By doing this, you can get the results as the user types into the input text. You can get finer control over the parameters of a search by defining them in a custom [QueryBody](https://github.com/Alfresco/alfresco-js-api/blob/1.6.0/src/alfresco-search-rest-api/docs/QueryBody.md) object. The recommended way to do this is with a custom implementation of the -[Search Configuration interface](../core/search-configuration.interface.md) (the `queryBody` parameter of the [`Search component`](../content-services/search.component.md) is now deprecated). The ADF source provides a standard implementation of this +. The ADF source provides a standard implementation of this interface, [`SearchConfigurationService`](../core/search-configuration.service.md) that you can use as a base to adapt to your needs. See the [Search Configuration interface](../core/search-configuration.interface.md) page for full details of how to customize your search. diff --git a/docs/content-services/upload-drag-area.component.md b/docs/content-services/upload-drag-area.component.md index 374ab12055..f2f108f3d0 100644 --- a/docs/content-services/upload-drag-area.component.md +++ b/docs/content-services/upload-drag-area.component.md @@ -68,14 +68,13 @@ as the drag/drop target: | nodeType | `string` | "cm:content" | Custom node type for uploaded file | | rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. | | versioning | `boolean` | false | Toggles versioning. | -| parentId | `void` | | (**Deprecated:** 2.4.0 - use rootFolderId ID of parent folder node) ID of parent folder node | + ### Events | Name | Type | Description | | ---- | ---- | ----------- | | beginUpload | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UploadFilesEvent`](../../lib/content-services/upload/components/upload-files.event.ts)`>` | Emitted when the upload begins. | -| createFolder | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | (**Deprecated:** 2.4.0 No longer used by the framework) Emitted when a folder is created. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when an error occurs. | | success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the file is uploaded successfully. | diff --git a/docs/content-services/version-list.component.md b/docs/content-services/version-list.component.md index 52b8223e65..ce789e965c 100644 --- a/docs/content-services/version-list.component.md +++ b/docs/content-services/version-list.component.md @@ -22,7 +22,6 @@ Displays the version history of a node in a [Version Manager component](../conte | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | | allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. | -| id | `string` | | (**Deprecated:** in 2.3.0) | | node | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | The target node. | | showActions | `boolean` | true | Toggles showing/hiding of version actions | | showComments | `boolean` | true | Toggles showing/hiding of comments | diff --git a/docs/core/context-menu.directive.md b/docs/core/context-menu.directive.md index 7824322aad..bc02d3c827 100644 --- a/docs/core/context-menu.directive.md +++ b/docs/core/context-menu.directive.md @@ -13,7 +13,7 @@ Adds a context menu to a component. ```html - + ``` ```ts diff --git a/docs/core/form.component.md b/docs/core/form.component.md index ce9577a5be..378826c076 100644 --- a/docs/core/form.component.md +++ b/docs/core/form.component.md @@ -84,7 +84,7 @@ Any content in the body of `` will be shown when no form definition is | formError | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormFieldModel`](../core/form-field.model.md)`[]>` | Emitted when the supplied form values have a validation error. | | formLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is loaded or reloaded. | | formSaved | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Save` or custom outcomes. | -| onError | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | (**Deprecated:** in 2.4.0, will be renamed as "error" in 3.x.x) Emitted when any error occurs. | +| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when any error occurs. | ## Details diff --git a/docs/core/form.service.md b/docs/core/form.service.md index 4569dfeb1e..cf088d3fc7 100644 --- a/docs/core/form.service.md +++ b/docs/core/form.service.md @@ -67,9 +67,6 @@ class MyComponent { Saves a form. - `formId` - ID of the form to save - `formModel` - Model data for the form -- `addFieldsToAForm(formId: string, formModel: FormDefinitionModel):`[`Observable`](http://reactivex.io/documentation/observable.html)`` - - `formId` - ID of the form - - `formModel` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) definition - `searchFrom(name: string):`[`Observable`](http://reactivex.io/documentation/observable.html)`` Search for a form by name. - `name` - The form name to search for diff --git a/docs/core/host-settings.component.md b/docs/core/host-settings.component.md index 90fbf6b903..de7906e5bd 100644 --- a/docs/core/host-settings.component.md +++ b/docs/core/host-settings.component.md @@ -40,8 +40,6 @@ Validates the URLs for ACS and APS and saves them in the user's local storage | Name | Type | Description | | ---- | ---- | ----------- | -| bpmHostChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | (**Deprecated:** in 2.4.0) Emitted when the bpm host URL is changed. | | cancel | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the user cancels the changes. | -| ecmHostChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | (**Deprecated:** in 2.4.0) Emitted when the ecm host URL is changed. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the URL is invalid. | | success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the changes are successfully applied. | diff --git a/docs/core/infinite-pagination.component.md b/docs/core/infinite-pagination.component.md index 282b1e0e69..aaa8577dd8 100644 --- a/docs/core/infinite-pagination.component.md +++ b/docs/core/infinite-pagination.component.md @@ -40,7 +40,6 @@ Adds "infinite" pagination to the component it is used with. | ---- | ---- | ------------- | ----------- | | isLoading | `boolean` | false | Is a new page loading? | | pageSize | `number` | | Number of items that are added with each "load more" event. | -| pagination | [`PaginationModel`](../../lib/core/models/pagination.model.ts) | | (**Deprecated:** 2.3.0) [Pagination](../../lib/content-services/document-list/models/document-library.model.ts) object. | | target | [`PaginatedComponent`](../../lib/core/pagination/paginated-component.interface.ts) | | Component that provides custom pagination support. | ### Events diff --git a/docs/core/login.component.md b/docs/core/login.component.md index f772023f43..bd0c798f8b 100644 --- a/docs/core/login.component.md +++ b/docs/core/login.component.md @@ -78,11 +78,9 @@ with custom input fields handled by your application or parent component: | ---- | ---- | ------------- | ----------- | | backgroundImageUrl | `string` | | Path to a custom background image. | | copyrightText | `string` | | The copyright text below the login box. | -| disableCsrf | `boolean` | | (**Deprecated:** 3.0.0) Prevents the CSRF Token from being submitted. Only valid for Alfresco Process Services. | | fieldsValidation | `any` | | Custom validation rules for the login form. | | logoImageUrl | `string` | | Path to a custom logo image. | | needHelpLink | `string` | "" | Sets the URL of the NEED HELP link in the footer. | -| providers | `string` | | (**Deprecated:** 3.0.0 - use the providers property in the the app.config.json) Possible valid values are ECM, BPM or ALL. | | registerLink | `string` | "" | Sets the URL of the REGISTER link in the footer. | | showLoginActions | `boolean` | true | Should the extra actions (`Need Help`, `Register`, etc) be shown? | | showRememberMe | `boolean` | true | Should the `Remember me` checkbox be shown? When selected, this option will remember the logged-in user after the browser is closed to avoid logging in repeatedly. | diff --git a/docs/core/node-permission.directive.md b/docs/core/node-permission.directive.md index 147ac984d7..91df62725d 100644 --- a/docs/core/node-permission.directive.md +++ b/docs/core/node-permission.directive.md @@ -87,7 +87,7 @@ for example). You can also use it in much the same way as you would with an HTML ```html diff --git a/docs/core/node-restore.directive.md b/docs/core/node-restore.directive.md index c3e0544895..c6e388ad7d 100644 --- a/docs/core/node-restore.directive.md +++ b/docs/core/node-restore.directive.md @@ -14,7 +14,6 @@ Restores deleted nodes to their original location. ```html diff --git a/lib/core/context-menu/context-menu.directive.ts b/lib/core/context-menu/context-menu.directive.ts index 864aa565cb..288f725ddb 100644 --- a/lib/core/context-menu/context-menu.directive.ts +++ b/lib/core/context-menu/context-menu.directive.ts @@ -20,9 +20,8 @@ import { Directive, HostListener, Input } from '@angular/core'; import { ContextMenuOverlayService } from './context-menu-overlay.service'; -// @deprecated 2.3.0 context-menu tag removed @Directive({ - selector: '[adf-context-menu], [context-menu]' + selector: '[context-menu]' }) export class ContextMenuDirective { /** Items for the menu. */ diff --git a/lib/core/directives/node-restore.directive.ts b/lib/core/directives/node-restore.directive.ts index 6785eb9bbe..fc77d3b933 100644 --- a/lib/core/directives/node-restore.directive.ts +++ b/lib/core/directives/node-restore.directive.ts @@ -40,13 +40,6 @@ export class NodeRestoreDirective { @Input('adf-restore') selection: DeletedNodeEntry[]; - /** - * Path to restored node. - * @deprecated 2.4.0 - */ - @Input() - location: string = ''; - /** Emitted when restoration is complete. */ @Output() restore: EventEmitter = new EventEmitter(); diff --git a/lib/core/form/components/form.component.ts b/lib/core/form/components/form.component.ts index 999c4dd607..42884ed989 100644 --- a/lib/core/form/components/form.component.ts +++ b/lib/core/form/components/form.component.ts @@ -158,10 +158,9 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { /** * Emitted when any error occurs. - * @deprecated in 2.4.0, will be renamed as "error" in 3.x.x */ @Output() - onError: EventEmitter = new EventEmitter(); + error: EventEmitter = new EventEmitter(); debugMode: boolean = false; @@ -458,7 +457,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy { } handleError(err: any): any { - this.onError.emit(err); + this.error.emit(err); } parseForm(json: any): FormModel { diff --git a/lib/core/form/components/widgets/date-time/date-time.widget.ts b/lib/core/form/components/widgets/date-time/date-time.widget.ts index 9fc5d2f6c3..4830fb6801 100644 --- a/lib/core/form/components/widgets/date-time/date-time.widget.ts +++ b/lib/core/form/components/widgets/date-time/date-time.widget.ts @@ -23,7 +23,7 @@ import { DatetimeAdapter, MAT_DATETIME_FORMATS } from '@mat-datetimepicker/core' import { MomentDatetimeAdapter, MAT_MOMENT_DATETIME_FORMATS } from '@mat-datetimepicker/moment'; import moment from 'moment-es6'; import { Moment } from 'moment'; -import { UserPreferencesService } from '../../../../services/user-preferences.service'; +import { UserPreferencesService, UserPreferenceValues } from '../../../../services/user-preferences.service'; import { MomentDateAdapter } from '../../../../utils/momentDateAdapter'; import { MOMENT_DATE_FORMATS } from '../../../../utils/moment-date-formats.model'; import { FormService } from './../../../services/form.service'; @@ -49,14 +49,15 @@ export class DateTimeWidgetComponent extends WidgetComponent implements OnInit { constructor(public formService: FormService, private dateAdapter: DateAdapter, - private preferences: UserPreferencesService) { + private userPreferencesService: UserPreferencesService) { super(formService); } ngOnInit() { - this.preferences.locale$.subscribe((locale) => { + this.userPreferencesService.select(UserPreferenceValues.Locale).subscribe((locale) => { this.dateAdapter.setLocale(locale); }); + let momentDateAdapter = this.dateAdapter; momentDateAdapter.overrideDisplayFormat = this.field.dateDisplayFormat; diff --git a/lib/core/form/components/widgets/date/date.widget.ts b/lib/core/form/components/widgets/date/date.widget.ts index f1cb4a2f3b..b7f38591f0 100644 --- a/lib/core/form/components/widgets/date/date.widget.ts +++ b/lib/core/form/components/widgets/date/date.widget.ts @@ -17,7 +17,7 @@ /* tslint:disable:component-selector */ -import { UserPreferencesService } from '../../../../services/user-preferences.service'; +import { UserPreferencesService, UserPreferenceValues } from '../../../../services/user-preferences.service'; import { MomentDateAdapter } from '../../../../utils/momentDateAdapter'; import { MOMENT_DATE_FORMATS } from '../../../../utils/moment-date-formats.model'; import { Component, OnInit, ViewEncapsulation } from '@angular/core'; @@ -46,14 +46,15 @@ export class DateWidgetComponent extends WidgetComponent implements OnInit { constructor(public formService: FormService, private dateAdapter: DateAdapter, - private preferences: UserPreferencesService) { + private userPreferencesService: UserPreferencesService) { super(formService); } ngOnInit() { - this.preferences.locale$.subscribe((locale) => { + this.userPreferencesService.select(UserPreferenceValues.Locale).subscribe((locale) => { this.dateAdapter.setLocale(locale); }); + let momentDateAdapter = this.dateAdapter; momentDateAdapter.overrideDisplayFormat = this.field.dateDisplayFormat; diff --git a/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.ts b/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.ts index 71614c8570..438161a4ff 100644 --- a/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.ts +++ b/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.ts @@ -17,7 +17,7 @@ /* tslint:disable:component-selector */ -import { UserPreferencesService } from '../../../../../../services/user-preferences.service'; +import { UserPreferencesService, UserPreferenceValues } from '../../../../../../services/user-preferences.service'; import { MomentDateAdapter } from '../../../../../../utils/momentDateAdapter'; import { MOMENT_DATE_FORMATS } from '../../../../../../utils/moment-date-formats.model'; import { Component, Input, OnInit } from '@angular/core'; @@ -55,13 +55,14 @@ export class DateEditorComponent implements OnInit { maxDate: Moment; constructor(private dateAdapter: DateAdapter, - private preferences: UserPreferencesService) { + private userPreferencesService: UserPreferencesService) { } ngOnInit() { - this.preferences.locale$.subscribe((locale) => { + this.userPreferencesService.select(UserPreferenceValues.Locale).subscribe((locale) => { this.dateAdapter.setLocale(locale); }); + let momentDateAdapter = this.dateAdapter; momentDateAdapter.overrideDisplayFormat = this.DATE_FORMAT; diff --git a/lib/core/form/components/widgets/dynamic-table/editors/datetime/datetime.editor.ts b/lib/core/form/components/widgets/dynamic-table/editors/datetime/datetime.editor.ts index a5851fe3a8..e7bc4f00be 100644 --- a/lib/core/form/components/widgets/dynamic-table/editors/datetime/datetime.editor.ts +++ b/lib/core/form/components/widgets/dynamic-table/editors/datetime/datetime.editor.ts @@ -17,7 +17,7 @@ /* tslint:disable:component-selector */ -import { UserPreferencesService } from '../../../../../../services/user-preferences.service'; +import { UserPreferencesService, UserPreferenceValues } from '../../../../../../services/user-preferences.service'; import { MomentDateAdapter } from '../../../../../../utils/momentDateAdapter'; import { MOMENT_DATE_FORMATS } from '../../../../../../utils/moment-date-formats.model'; import { Component, Input, OnInit } from '@angular/core'; @@ -60,13 +60,14 @@ export class DateTimeEditorComponent implements OnInit { maxDate: Moment; constructor(private dateAdapter: DateAdapter, - private preferences: UserPreferencesService) { + private userPreferencesService: UserPreferencesService) { } ngOnInit() { - this.preferences.locale$.subscribe((locale) => { + this.userPreferencesService.select(UserPreferenceValues.Locale).subscribe((locale) => { this.dateAdapter.setLocale(locale); }); + let momentDateAdapter = this.dateAdapter; momentDateAdapter.overrideDisplayFormat = this.DATE_FORMAT; diff --git a/lib/core/form/components/widgets/widget.component.ts b/lib/core/form/components/widgets/widget.component.ts index f8ea0311a1..0df526f25b 100644 --- a/lib/core/form/components/widgets/widget.component.ts +++ b/lib/core/form/components/widgets/widget.component.ts @@ -57,7 +57,6 @@ export class WidgetComponent implements AfterViewInit { /** * Emitted when a field value changes. - * @deprecated Used only to trigger visibility engine; components should do that internally if needed. */ @Output() fieldChanged: EventEmitter = new EventEmitter(); @@ -96,12 +95,10 @@ export class WidgetComponent implements AfterViewInit { this.fieldChanged.emit(this.field); } - /** @deprecated used only to trigger visibility engine, components should do that internally if needed */ checkVisibility(field: FormFieldModel) { this.fieldChanged.emit(field); } - /** @deprecated used only to trigger visibility engine, components should do that internally if needed */ onFieldChanged(field: FormFieldModel) { this.fieldChanged.emit(field); } diff --git a/lib/core/form/services/form.service.spec.ts b/lib/core/form/services/form.service.spec.ts index dfc41e63b4..6c11297acd 100644 --- a/lib/core/form/services/form.service.spec.ts +++ b/lib/core/form/services/form.service.spec.ts @@ -18,7 +18,6 @@ import { TestBed } from '@angular/core/testing'; import { Response, ResponseOptions } from '@angular/http'; import { AlfrescoApiService } from '../../services/alfresco-api.service'; -import { FormDefinitionModel } from '../models/form-definition.model'; import { formModelTabs, AlfrescoApiServiceMock } from '../../mock'; import { FormService } from './form.service'; import { setupTestBed } from '../../testing/setupTestBed'; @@ -359,25 +358,6 @@ describe('Form service', () => { }); }); - it('should add form fields to a form', (done) => { - let formId = 100; - let name = 'testName'; - let data = [{ name: 'name' }, { name: 'email' }]; - let formDefinitionModel = new FormDefinitionModel(formId.toString(), name, 'testUserName', '2016-09-05T14:41:19.049Z', data); - - service.addFieldsToAForm(formId, formDefinitionModel).subscribe((result) => { - expect(jasmine.Ajax.requests.mostRecent().url.endsWith('/form-models/' + formId)).toBeTruthy(); - expect(JSON.parse(jasmine.Ajax.requests.mostRecent().params).formRepresentation.name).toEqual(name); - done(); - }); - - jasmine.Ajax.requests.mostRecent().respondWith({ - 'status': 200, - contentType: 'application/json', - responseText: JSON.stringify(simpleResponseBody) - }); - }); - it('should return list of people', (done) => { spyOn(service, 'getUserProfileImageApi').and.returnValue('/app/rest/users/2002/picture'); let fakeFilter: string = 'whatever'; diff --git a/lib/core/form/services/form.service.ts b/lib/core/form/services/form.service.ts index 8f90e98d62..28a5d3d04f 100644 --- a/lib/core/form/services/form.service.ts +++ b/lib/core/form/services/form.service.ts @@ -129,7 +129,9 @@ export class FormService { this.ecmModelService.searchEcmType(formName, EcmModelService.MODEL_NAME).subscribe( (customType) => { let formDefinitionModel = new FormDefinitionModel(form.id, form.name, form.lastUpdatedByFullName, form.lastUpdated, customType.entry.properties); - this.addFieldsToAForm(form.id, formDefinitionModel).subscribe((formData) => { + from( + this.editorApi.saveForm(form.id, formDefinitionModel) + ).subscribe((formData) => { observer.next(formData); observer.complete(); }, (err) => this.handleError(err)); @@ -170,19 +172,6 @@ export class FormService { ); } - /** - * Add Fields to a form - * @deprecated in 1.7.0, use saveForm API instead - * @param formId ID of the form - * @param formModel Form definition - */ - addFieldsToAForm(formId: number, formModel: FormDefinitionModel): Observable { - this.logService.log('addFieldsToAForm is deprecated in 1.7.0, use saveForm API instead'); - return from( - this.editorApi.saveForm(formId, formModel) - ); - } - /** * Searches for a form by name. * @param name The form name to search for diff --git a/lib/core/login/components/login.component.spec.ts b/lib/core/login/components/login.component.spec.ts index 8e01c7992d..5d6b6b5baa 100644 --- a/lib/core/login/components/login.component.spec.ts +++ b/lib/core/login/components/login.component.spec.ts @@ -90,7 +90,6 @@ describe('LoginComponent', () => { }); function loginWithCredentials(username, password, providers: string = 'ECM') { - component.providers = providers; usernameInput.value = username; passwordInput.value = password; @@ -116,6 +115,8 @@ describe('LoginComponent', () => { }); it('should redirect to previous route state on successful login', () => { + appConfigService.config.providers = 'ECM'; + spyOn(authService, 'login').and.returnValue(of({ type: 'type', ticket: 'ticket' })); const redirect = '/home'; component.successRoute = redirect; @@ -393,7 +394,6 @@ describe('LoginComponent', () => { it('should return success event after the login have succeeded', (done) => { spyOn(authService, 'login').and.returnValue(of({ type: 'type', ticket: 'ticket' })); - component.providers = 'ECM'; expect(component.isError).toBe(false); component.success.subscribe(() => { @@ -409,7 +409,6 @@ describe('LoginComponent', () => { }); it('should return error with a wrong username', (done) => { - component.providers = 'ECM'; component.error.subscribe(() => { fixture.detectChanges(); @@ -424,8 +423,6 @@ describe('LoginComponent', () => { }); it('should return error with a wrong password', (done) => { - component.providers = 'ECM'; - component.error.subscribe(() => { fixture.detectChanges(); fixture.whenStable().then(() => { @@ -440,8 +437,6 @@ describe('LoginComponent', () => { }); it('should return error with a wrong username and password', (done) => { - component.providers = 'ECM'; - component.error.subscribe(() => { fixture.detectChanges(); fixture.whenStable().then(() => { @@ -462,7 +457,6 @@ describe('LoginComponent', () => { message: 'ERROR: the network is offline, Origin is not allowed by Access-Control-Allow-Origin' } })); - component.providers = 'ECM'; component.error.subscribe(() => { fixture.detectChanges(); @@ -480,7 +474,6 @@ describe('LoginComponent', () => { it('should return CSRF error when server CSRF error occurs', async(() => { spyOn(authService, 'login') .and.returnValue(throwError({ message: 'ERROR: Invalid CSRF-token', status: 403 })); - component.providers = 'ECM'; component.error.subscribe(() => { fixture.detectChanges(); @@ -502,7 +495,6 @@ describe('LoginComponent', () => { status: 403 } )); - component.providers = 'ECM'; component.error.subscribe(() => { fixture.detectChanges(); @@ -516,8 +508,6 @@ describe('LoginComponent', () => { })); it('should emit success event after the login has succeeded and discard password', async(() => { - component.providers = 'ECM'; - component.success.subscribe((event) => { fixture.detectChanges(); @@ -532,7 +522,6 @@ describe('LoginComponent', () => { it('should emit error event after the login has failed', async(() => { spyOn(authService, 'login').and.returnValue(throwError('Fake server error')); - component.providers = 'ECM'; component.error.subscribe((error) => { fixture.detectChanges(); diff --git a/lib/core/login/components/login.component.ts b/lib/core/login/components/login.component.ts index 7462447f86..e45608d441 100644 --- a/lib/core/login/components/login.component.ts +++ b/lib/core/login/components/login.component.ts @@ -25,7 +25,6 @@ import { AuthenticationService } from '../../services/authentication.service'; import { LogService } from '../../services/log.service'; import { TranslationService } from '../../services/translation.service'; import { UserPreferencesService } from '../../services/user-preferences.service'; -import { SettingsService } from '../../services/settings.service'; import { LoginErrorEvent } from '../models/login-error.event'; import { LoginSubmitEvent } from '../models/login-submit.event'; @@ -91,24 +90,10 @@ export class LoginComponent implements OnInit { @Input() copyrightText: string = '\u00A9 2016 Alfresco Software, Inc. All Rights Reserved.'; - /** - * Possible valid values are ECM, BPM or ALL. - * @deprecated 3.0.0 - use the providers property in the the app.config.json - */ - @Input() - providers: string; - /** Custom validation rules for the login form. */ @Input() fieldsValidation: any; - /** - * Prevents the CSRF Token from being submitted. Only valid for Alfresco Process Services. - * @deprecated 3.0.0 - */ - @Input() - disableCsrf: boolean; - /** Route to redirect to on successful login. */ @Input() successRoute: string = null; @@ -154,8 +139,7 @@ export class LoginComponent implements OnInit { private logService: LogService, private router: Router, private appConfig: AppConfigService, - private userPreferences: UserPreferencesService, - private settingsService: SettingsService + private userPreferences: UserPreferencesService ) { this.initFormError(); this.initFormFieldsMessages(); @@ -188,9 +172,6 @@ export class LoginComponent implements OnInit { * @param event */ onSubmit(values: any) { - this.settingsService.setProviders(this.providers); - this.settingsService.csrfDisabled = this.disableCsrf; - this.disableError(); const args = new LoginSubmitEvent({ controls: { username: this.form.controls.username } @@ -242,9 +223,7 @@ export class LoginComponent implements OnInit { .login(values.username, values.password, this.rememberMe) .subscribe( (token: any) => { - const redirectUrl = this.authService.getRedirect( - this.providers - ); + const redirectUrl = this.authService.getRedirect(); this.actualLoginStep = LoginSteps.Welcome; this.userPreferences.setStoragePrefix(values.username); diff --git a/lib/core/models/comment-process.model.ts b/lib/core/models/comment-process.model.ts deleted file mode 100644 index fe70e24fc0..0000000000 --- a/lib/core/models/comment-process.model.ts +++ /dev/null @@ -1,41 +0,0 @@ -/*! - * @license - * Copyright 2016 Alfresco Software, Ltd. - * - * 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. - */ - -import { CommentRepresentation, LightUserRepresentation } from '@alfresco/js-api'; - -/** - * @deprecated - * CommentProcessModel - * (this model is deprecated in 2.3.0 in favour of CommentModel and will be removed in future revisions) - */ -export class CommentProcessModel implements CommentRepresentation { - id: number; - message: string; - created: Date; - createdBy: LightUserRepresentation; - isSelected: boolean; - - constructor(obj?: any) { - if (obj) { - this.id = obj.id; - this.message = obj.message; - this.created = obj.created; - this.createdBy = obj.createdBy; - this.isSelected = obj.isSelected ? obj.isSelected : false; - } - } -} diff --git a/lib/core/models/public-api.ts b/lib/core/models/public-api.ts index 662f72c2ee..a2ddf3dee6 100644 --- a/lib/core/models/public-api.ts +++ b/lib/core/models/public-api.ts @@ -22,6 +22,5 @@ export * from './user-process.model'; export * from './comment.model'; export * from './ecm-company.model'; export * from './redirection.model'; -export * from './comment-process.model'; export * from './pagination.model'; export * from './oauth-config.model'; diff --git a/lib/core/pagination/infinite-pagination.component.html b/lib/core/pagination/infinite-pagination.component.html index 26d4069c92..c210aa5fa1 100644 --- a/lib/core/pagination/infinite-pagination.component.html +++ b/lib/core/pagination/infinite-pagination.component.html @@ -1,4 +1,5 @@
+ isLoading : {{isLoading}} @@ -132,12 +132,12 @@
- +
- - + + - +
@@ -150,7 +150,7 @@
-
+
@@ -166,7 +166,7 @@
-
+
diff --git a/lib/core/viewer/components/viewer.component.spec.ts b/lib/core/viewer/components/viewer.component.spec.ts index 0fd8fa5c9e..d9d56338b3 100644 --- a/lib/core/viewer/components/viewer.component.spec.ts +++ b/lib/core/viewer/components/viewer.component.spec.ts @@ -467,8 +467,8 @@ describe('ViewerComponent', () => { describe('SideBar Test', () => { it('should NOT display sidebar if is not allowed', (done) => { - component.showSidebar = true; - component.allowSidebar = false; + component.showRightSidebar = true; + component.allowRightSidebar = false; fixture.detectChanges(); fixture.whenStable().then(() => { @@ -479,8 +479,8 @@ describe('ViewerComponent', () => { }); it('should display sidebar on the right side', (done) => { - component.allowSidebar = true; - component.showSidebar = true; + component.allowRightSidebar = true; + component.showRightSidebar = true; fixture.detectChanges(); fixture.whenStable().then(() => { diff --git a/lib/core/viewer/components/viewer.component.ts b/lib/core/viewer/components/viewer.component.ts index 5b9645e44f..92b9160920 100644 --- a/lib/core/viewer/components/viewer.component.ts +++ b/lib/core/viewer/components/viewer.component.ts @@ -129,40 +129,25 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy { @Input() allowLeftSidebar = false; - /** Allow the right sidebar. - * @deprecated 2.5.0 - will be renamed allowRightSidebar in 3.0.0 - */ + /** Allow the right sidebar. */ @Input() - allowSidebar = false; + allowRightSidebar = false; /** Toggles PDF thumbnails. */ @Input() allowThumbnails = true; - /** - * Toggles sidebar visibility. Requires `allowSidebar` to be set to `true`. - * @deprecated 2.5.0 - will be renamed showRightSidebar in 3.0.0 - */ + /** Toggles right sidebar visibility. Requires `allowRightSidebar` to be set to `true`. */ @Input() - showSidebar = false; + showRightSidebar = false; - /** Toggles left sidebar visibility. Requires `allowSidebar` to be set to `true`. */ + /** Toggles left sidebar visibility. Requires `allowLeftSidebar` to be set to `true`. */ @Input() showLeftSidebar = false; - /** - * The position of the sidebar. Can be `left` or `right`. - * @deprecated 2.5.0 use sidebarTemplateLeft - */ + /** The template for the right sidebar. The template context contains the loaded node data. */ @Input() - sidebarPosition = 'right'; - - /** - * The template for the sidebar. The template context contains the loaded node data. - * @deprecated 2.5.0 renamed as sidebarRight - */ - @Input() - sidebarTemplate: TemplateRef = null; + sidebarRightTemplate: TemplateRef = null; /** The template for the left sidebar. The template context contains the loaded node data. */ @Input() @@ -223,7 +208,7 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy { urlFileContent: string; otherMenu: any; extension: string; - sidebarTemplateContext: { node: Node } = { node: null }; + sidebarRightTemplateContext: { node: Node } = { node: null }; sidebarLeftTemplateContext: { node: Node } = { node: null }; fileTitle: string; @@ -376,7 +361,7 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy { } this.extensionChange.emit(this.extension); - this.sidebarTemplateContext.node = data; + this.sidebarRightTemplateContext.node = data; this.sidebarLeftTemplateContext.node = data; this.scrollTop(); @@ -404,18 +389,18 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy { } toggleSidebar() { - this.showSidebar = !this.showSidebar; - if (this.showSidebar && this.nodeId) { + this.showRightSidebar = !this.showRightSidebar; + if (this.showRightSidebar && this.nodeId) { this.apiService.getInstance().nodes.getNode(this.nodeId, { include: ['allowableOperations'] }) .then((nodeEntry: NodeEntry) => { - this.sidebarTemplateContext.node = nodeEntry.entry; + this.sidebarRightTemplateContext.node = nodeEntry.entry; }); } } toggleLeftSidebar() { this.showLeftSidebar = !this.showLeftSidebar; - if (this.showSidebar && this.nodeId) { + if (this.showRightSidebar && this.nodeId) { this.apiService.getInstance().nodes.getNode(this.nodeId, { include: ['allowableOperations'] }) .then((nodeEntry: NodeEntry) => { this.sidebarLeftTemplateContext.node = nodeEntry.entry; diff --git a/lib/insights/analytics-process/components/analytics-report-list.component.ts b/lib/insights/analytics-process/components/analytics-report-list.component.ts index 0e2ac82a09..37c49a0400 100644 --- a/lib/insights/analytics-process/components/analytics-report-list.component.ts +++ b/lib/insights/analytics-process/components/analytics-report-list.component.ts @@ -21,9 +21,8 @@ import { ReportParametersModel } from '../../diagram/models/report/reportParamet import { AnalyticsService } from '../services/analytics.service'; import { share } from 'rxjs/operators'; -// @deprecated 2.3.0 analytics-report-list tag removed @Component({ - selector: 'adf-analytics-report-list, analytics-report-list', + selector: 'adf-analytics-report-list', templateUrl: './analytics-report-list.component.html', styleUrls: ['./analytics-report-list.component.scss'], encapsulation: ViewEncapsulation.None diff --git a/lib/insights/analytics-process/components/analytics-report-parameters.component.ts b/lib/insights/analytics-process/components/analytics-report-parameters.component.ts index 7cf9fbd212..b05c42d2e3 100644 --- a/lib/insights/analytics-process/components/analytics-report-parameters.component.ts +++ b/lib/insights/analytics-process/components/analytics-report-parameters.component.ts @@ -38,9 +38,8 @@ import { ReportParametersModel } from '../../diagram/models/report/reportParamet import { ReportQuery } from '../../diagram/models/report/reportQuery.model'; import { AnalyticsService } from '../services/analytics.service'; -// @deprecated 2.3.0 analytics-report-parameters tag removed @Component({ - selector: 'adf-analytics-report-parameters, analytics-report-parameters', + selector: 'adf-analytics-report-parameters', templateUrl: './analytics-report-parameters.component.html', styleUrls: ['./analytics-report-parameters.component.scss'], encapsulation: ViewEncapsulation.None diff --git a/lib/insights/analytics-process/components/analytics.component.html b/lib/insights/analytics-process/components/analytics.component.html index 45bccabf65..4ca8b7a9b9 100644 --- a/lib/insights/analytics-process/components/analytics.component.html +++ b/lib/insights/analytics-process/components/analytics.component.html @@ -1,12 +1,12 @@
- - + , - private preferences: UserPreferencesService) { + private userPreferencesService: UserPreferencesService) { } ngOnInit() { - this.preferences.locale$.subscribe( (locale) => { + this.userPreferencesService.select(UserPreferenceValues.Locale).subscribe((locale) => { this.dateAdapter.setLocale(locale); }); + let momentDateAdapter = this.dateAdapter; momentDateAdapter.overrideDisplayFormat = this.SHOW_FORMAT; diff --git a/lib/insights/diagram/components/activities/diagram-alfresco-publish-task.component.ts b/lib/insights/diagram/components/activities/diagram-alfresco-publish-task.component.ts index 784ac1875a..71e5a038cb 100644 --- a/lib/insights/diagram/components/activities/diagram-alfresco-publish-task.component.ts +++ b/lib/insights/diagram/components/activities/diagram-alfresco-publish-task.component.ts @@ -17,9 +17,8 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -// @deprecated 2.3.0 diagram-alfresco-publish-task tag removed @Component({ - selector: 'adf-diagram-publish-task, diagram-alfresco-publish-task', + selector: 'adf-diagram-publish-task', templateUrl: './diagram-alfresco-publish-task.component.html' }) export class DiagramAlfrescoPublishTaskComponent implements OnInit { diff --git a/lib/insights/diagram/components/diagram-sequence-flow.component.ts b/lib/insights/diagram/components/diagram-sequence-flow.component.ts index d7bcf3a4a6..58263d1196 100644 --- a/lib/insights/diagram/components/diagram-sequence-flow.component.ts +++ b/lib/insights/diagram/components/diagram-sequence-flow.component.ts @@ -17,9 +17,8 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output } from '@angular/core'; -// @deprecated 2.3.0 diagram-sequence-flow tag removed @Component({ - selector: 'adf-diagram-sequence-flow, diagram-sequence-flow', + selector: 'adf-diagram-sequence-flow', templateUrl: './diagram-sequence-flow.component.html' }) export class DiagramSequenceFlowComponent implements OnInit { diff --git a/lib/insights/diagram/components/diagram.component.flows.spec.ts b/lib/insights/diagram/components/diagram.component.flows.spec.ts index 1bc4f10ff8..0afc1698ac 100644 --- a/lib/insights/diagram/components/diagram.component.flows.spec.ts +++ b/lib/insights/diagram/components/diagram.component.flows.spec.ts @@ -69,7 +69,7 @@ describe('Diagrams flows', () => { fixture.detectChanges(); fixture.whenStable().then(() => { expect(res).not.toBeNull(); - let shape: any = element.querySelector('diagram-sequence-flow > raphael-flow-arrow'); + let shape: any = element.querySelector('adf-diagram-sequence-flow > raphael-flow-arrow'); expect(shape).not.toBeNull(); let tooltip: any = element.querySelector('diagram-tooltip > div'); @@ -90,7 +90,7 @@ describe('Diagrams flows', () => { fixture.detectChanges(); fixture.whenStable().then(() => { expect(res).not.toBeNull(); - let shape: any = element.querySelector('diagram-sequence-flow > raphael-flow-arrow'); + let shape: any = element.querySelector('adf-diagram-sequence-flow > raphael-flow-arrow'); expect(shape).not.toBeNull(); let tooltip: any = element.querySelector('diagram-tooltip > div'); diff --git a/lib/insights/diagram/components/diagram.component.html b/lib/insights/diagram/components/diagram.component.html index d9c35653a2..99acc8c40a 100644 --- a/lib/insights/diagram/components/diagram.component.html +++ b/lib/insights/diagram/components/diagram.component.html @@ -57,7 +57,7 @@
- +
diff --git a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.ts b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.ts index bdaa3d70e2..88aebd74fd 100644 --- a/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.ts +++ b/lib/process-services-cloud/src/lib/task/start-task/components/start-task-cloud.component.ts @@ -27,7 +27,8 @@ import { LogService, UserPreferencesService, IdentityUserService, - IdentityUserModel + IdentityUserModel, + UserPreferenceValues } from '@alfresco/adf-core'; import { PeopleCloudComponent } from './people-cloud/people-cloud.component'; @@ -95,16 +96,17 @@ export class StartTaskCloudComponent implements OnInit, OnDestroy { constructor(private taskService: StartTaskCloudService, private dateAdapter: DateAdapter, - private preferences: UserPreferencesService, + private userPreferencesService: UserPreferencesService, private formBuilder: FormBuilder, private identityUserService: IdentityUserService, private logService: LogService) { } ngOnInit() { - this.localeSub = this.preferences.locale$.subscribe((locale) => { + this.userPreferencesService.select(UserPreferenceValues.Locale).subscribe((locale) => { this.dateAdapter.setLocale(locale); }); + this.loadCurrentUser(); this.buildForm(); } diff --git a/lib/process-services/index.ts b/lib/process-services/index.ts index 7e05146622..c50650d711 100644 --- a/lib/process-services/index.ts +++ b/lib/process-services/index.ts @@ -15,13 +15,6 @@ * limitations under the License. */ -/** @deprecated in 2.3.0, part of the module moved in the core */ -export { CommentsModule } from '@alfresco/adf-core'; -/** @deprecated in 2.3.0, component moved in the core */ -export { CommentListComponent } from '@alfresco/adf-core'; -/** @deprecated in 2.3.0, component moved in the core */ -export { CommentsComponent } from '@alfresco/adf-core'; - export * from './process-list/index'; export * from './task-list/index'; export * from './app-list/index'; diff --git a/lib/process-services/process-list/components/process-list.component.spec.ts b/lib/process-services/process-list/components/process-list.component.spec.ts index bd8f63fc74..e15c3e86ff 100644 --- a/lib/process-services/process-list/components/process-list.component.spec.ts +++ b/lib/process-services/process-list/components/process-list.component.spec.ts @@ -116,7 +116,6 @@ describe('ProcessInstanceListComponent', () => { let emitSpy = spyOn(component.success, 'emit'); component.appId = 1; component.state = 'open'; - component.processDefinitionKey = null; fixture.detectChanges(); tick(); expect(emitSpy).toHaveBeenCalledWith(fakeProcessInstance); @@ -131,7 +130,6 @@ describe('ProcessInstanceListComponent', () => { ); component.appId = 1; component.state = 'open'; - component.processDefinitionKey = null; component.success.subscribe((res) => { expect(res).toBeDefined(); expect(component.rows).toBeDefined(); @@ -147,7 +145,6 @@ describe('ProcessInstanceListComponent', () => { getProcessInstancesSpy = getProcessInstancesSpy.and.returnValue(of(fakeProcessInstancesWithNoName)); component.appId = 1; component.state = 'open'; - component.processDefinitionKey = 'fakeprocess'; component.success.subscribe( (res) => { expect(component.rows[0]['name']).toEqual('Fake Process Name - Nov 9, 2017, 12:36:14 PM'); expect(component.rows[1]['name']).toEqual('Fake Process Name - Nov 9, 2017, 12:37:25 PM'); @@ -198,7 +195,6 @@ describe('ProcessInstanceListComponent', () => { it('should emit onSuccess event when reload() called', fakeAsync(() => { component.appId = 1; component.state = 'open'; - component.processDefinitionKey = null; fixture.detectChanges(); tick(); let emitSpy = spyOn(component.success, 'emit'); @@ -308,22 +304,6 @@ describe('ProcessInstanceListComponent', () => { component.ngOnChanges({'appId': change}); }); - it('should reload the list when the processDefinitionKey parameter changes', (done) => { - const processDefinitionKey = 'fakeprocess'; - let change = new SimpleChange(null, processDefinitionKey, true); - - component.success.subscribe((res) => { - expect(res).toBeDefined(); - expect(component.rows).toBeDefined(); - expect(component.isListEmpty()).not.toBeTruthy(); - expect(component.rows.length).toEqual(2); - expect(component.rows[0]['name']).toEqual('Process 773443333'); - done(); - }); - - component.ngOnChanges({'processDefinitionKey': change}); - }); - it('should reload the list when the state parameter changes', (done) => { const state = 'open'; let change = new SimpleChange(null, state, true); @@ -356,38 +336,6 @@ describe('ProcessInstanceListComponent', () => { component.ngOnChanges({'sort': change}); }); - it('should reload the process list when the processDefinitionKey parameter changes', (done) => { - const processDefinitionKey = 'SimpleProcess'; - let change = new SimpleChange(null, processDefinitionKey, true); - - component.success.subscribe((res) => { - expect(res).toBeDefined(); - expect(component.rows).toBeDefined(); - expect(component.isListEmpty()).not.toBeTruthy(); - expect(component.rows.length).toEqual(2); - expect(component.rows[0].name).toEqual('Process 773443333'); - done(); - }); - - component.ngOnChanges({'processDefinitionKey': change}); - }); - - it('should reload the process list when the processDefinitionKey parameter changes to null', (done) => { - const processDefinitionKey = null; - let change = new SimpleChange('SimpleProcess', processDefinitionKey, false); - - component.success.subscribe((res) => { - expect(res).toBeDefined(); - expect(component.rows).toBeDefined(); - expect(component.isListEmpty()).not.toBeTruthy(); - expect(component.rows.length).toEqual(2); - expect(component.rows[0].name).toEqual('Process 773443333'); - done(); - }); - - component.ngOnChanges({'processDefinitionKey': change}); - }); - it('should reload the process list when the processDefinitionId parameter changes', (done) => { const processDefinitionId = 'SimpleProcess:1:10'; let change = new SimpleChange(null, processDefinitionId, true); diff --git a/lib/process-services/process-list/components/process-list.component.ts b/lib/process-services/process-list/components/process-list.component.ts index a54f99a595..1142f211d3 100644 --- a/lib/process-services/process-list/components/process-list.component.ts +++ b/lib/process-services/process-list/components/process-list.component.ts @@ -62,12 +62,6 @@ export class ProcessInstanceListComponent extends DataTableSchema implements On @Input() appId: number; - /** The Definition Key of the process. - * @deprecated 2.4.0 - */ - @Input() - processDefinitionKey: string; - /** The Definition Id of the process. */ @Input() processDefinitionId: string; @@ -175,7 +169,6 @@ export class ProcessInstanceListComponent extends DataTableSchema implements On let changed: boolean = false; let appId = changes['appId']; - let processDefinitionKey = changes['processDefinitionKey']; let processDefinitionId = changes['processDefinitionId']; let processInstanceId = changes['processInstanceId']; let state = changes['state']; @@ -185,8 +178,6 @@ export class ProcessInstanceListComponent extends DataTableSchema implements On if (appId && appId.currentValue) { changed = true; - } else if (processDefinitionKey) { - changed = true; } else if (processDefinitionId) { changed = true; } else if (processInstanceId) { @@ -210,7 +201,7 @@ export class ProcessInstanceListComponent extends DataTableSchema implements On private load(requestNode: ProcessFilterParamRepresentationModel) { this.isLoading = true; - this.processService.getProcesses(requestNode, this.processDefinitionKey) + this.processService.getProcesses(requestNode) .subscribe( (response) => { this.rows = this.optimizeProcessDetails(response.data); diff --git a/lib/process-services/process-list/services/process.service.ts b/lib/process-services/process-list/services/process.service.ts index 3a0e876241..d3cb4a5c6c 100644 --- a/lib/process-services/process-list/services/process.service.ts +++ b/lib/process-services/process-list/services/process.service.ts @@ -66,7 +66,7 @@ export class ProcessService { * @returns List of processes */ getProcesses(requestNode: ProcessFilterParamRepresentationModel, processDefinitionKey?: string): Observable { - return this.getProcessInstances(requestNode, processDefinitionKey || null) + return this.getProcessInstances(requestNode, processDefinitionKey) .pipe(catchError(() => { return of(new ProcessListModel({})); })); diff --git a/lib/process-services/task-list/components/start-task.component.ts b/lib/process-services/task-list/components/start-task.component.ts index c4052122f7..432be12b46 100644 --- a/lib/process-services/task-list/components/start-task.component.ts +++ b/lib/process-services/task-list/components/start-task.component.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import { LogService, UserPreferencesService, UserProcessModel, FormFieldModel, FormModel } from '@alfresco/adf-core'; +import { LogService, UserPreferencesService, UserPreferenceValues, UserProcessModel, FormFieldModel, FormModel } from '@alfresco/adf-core'; import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core'; import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core'; import { MOMENT_DATE_FORMATS, MomentDateAdapter } from '@alfresco/adf-core'; @@ -79,7 +79,7 @@ export class StartTaskComponent implements OnInit { */ constructor(private taskService: TaskListService, private dateAdapter: DateAdapter, - private preferences: UserPreferencesService, + private userPreferencesService: UserPreferencesService, private formBuilder: FormBuilder, private logService: LogService) { } @@ -92,7 +92,7 @@ export class StartTaskComponent implements OnInit { this.validateMaxTaskNameLength(); this.field = new FormFieldModel(new FormModel(), { id: this.assigneeId, value: this.assigneeId, placeholder: 'Assignee' }); - this.preferences.locale$.subscribe((locale) => { + this.userPreferencesService.select(UserPreferenceValues.Locale).subscribe((locale) => { this.dateAdapter.setLocale(locale); }); diff --git a/lib/process-services/task-list/components/task-filters.component.ts b/lib/process-services/task-list/components/task-filters.component.ts index 540120c19f..3cd03ea041 100644 --- a/lib/process-services/task-list/components/task-filters.component.ts +++ b/lib/process-services/task-list/components/task-filters.component.ts @@ -23,11 +23,8 @@ import { TaskFilterService } from './../services/task-filter.service'; import { TaskListService } from './../services/tasklist.service'; import { IconModel } from '../../app-list/icon.model'; -/** - * @deprecated: in 2.4.0 'adf-filters' selector was deprecated, use adf-task-filters instead. - */ @Component({ - selector: 'adf-task-filters, adf-filters', + selector: 'adf-task-filters', templateUrl: './task-filters.component.html', styleUrls: ['task-filters.component.scss'] }) diff --git a/lib/process-services/task-list/components/task-list.component.ts b/lib/process-services/task-list/components/task-list.component.ts index babc7beaa9..4949d02985 100644 --- a/lib/process-services/task-list/components/task-list.component.ts +++ b/lib/process-services/task-list/components/task-list.component.ts @@ -56,13 +56,6 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft @Input() processDefinitionId: string; - /** - * The Definition Key of the process. - * @deprecated 2.4.0 - */ - @Input() - processDefinitionKey: string; - /** Current state of the process. Possible values are: `completed`, `active`. */ @Input() state: string; @@ -373,7 +366,6 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft dueBefore: this.dueBefore ? moment(this.dueBefore).toDate() : null, processInstanceId: this.processInstanceId, processDefinitionId: this.processDefinitionId, - processDefinitionKey: this.processDefinitionKey, text: this.name, assignment: this.assignment, state: this.state, diff --git a/package-lock.json b/package-lock.json index 75e61948fe..3a466feeb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,11 +53,10 @@ } }, "@alfresco/js-api": { - "version": "3.0.0-delta18", - "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-3.0.0-delta18.tgz", - "integrity": "sha512-lA/FyKLIQX7JIUcP/eNkrWOeJIuRsqgET8iBnVs3p0RFoZWVUL7pE0qyRw/nkAkFO3sYdea+n5fBlnm7jpjAVQ==", + "version": "3.0.0-delta20", + "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-3.0.0-delta20.tgz", + "integrity": "sha512-6Tig3mpVuInfRbnIhUnFd5TUq3m6IXjT0WVX8doABVWSNx03x5Jxfkw60iG5hgC/crxJxTNlQl8IcRHMVNxKaw==", "requires": { - "btoa": "^1.2.1", "event-emitter": "0.3.4", "superagent": "3.8.2" } @@ -3803,11 +3802,6 @@ "integrity": "sha1-YbU5PxH1JVntEgaTEANDtu2wTdU=", "dev": true }, - "btoa": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", - "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==" - }, "buffer": { "version": "4.9.1", "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", diff --git a/package.json b/package.json index bbe0e4614c..f62227d0fa 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@alfresco/adf-insights": "2.7.0-beta5", "@alfresco/adf-process-services": "2.7.0-beta5", "@alfresco/adf-process-services-cloud": "2.7.0-beta5", - "@alfresco/js-api": "3.0.0-delta18", + "@alfresco/js-api": "3.0.0-delta20", "@angular/animations": "7.0.3", "@angular/cdk": "7.0.3", "@angular/common": "7.0.3",