mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
Minor code and style fixes (#5398)
* type fixes * import fixes * fix typos * fix warning for private props that init in ctor only * typing fixes * typing fixes * style cleanup * fix test template
This commit is contained in:
parent
3459c98bd0
commit
a0926a38d8
@ -328,7 +328,7 @@
|
||||
[allowRightSidebar]="allowRightSidebar"
|
||||
[allowLeftSidebar]="allowLeftSidebar"
|
||||
[urlFile]="urlFile"
|
||||
(showViewerChange)="onViewerVisibilityChanged($event)"
|
||||
(showViewerChange)="onViewerVisibilityChanged()"
|
||||
[sidebarLeftTemplate]="sidebarLeftTemplate"
|
||||
[sidebarRightTemplate]="sidebarRightTemplate">
|
||||
|
||||
|
@ -56,6 +56,5 @@ div.app-search-results-container {
|
||||
|
||||
.example-search-input {
|
||||
width: 100px;
|
||||
border: 1 solid;
|
||||
border-color: black;
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
@ -316,10 +316,10 @@ async function main(args: ConfigArgs) {
|
||||
});
|
||||
|
||||
if (result.isValid) {
|
||||
logger.error('The envirorment is up and running');
|
||||
logger.error('The environment is up and running');
|
||||
await deployMissingApps();
|
||||
} else {
|
||||
logger.error('The envirorment is not up');
|
||||
logger.error('The environment is not up');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
@ -17,8 +17,7 @@
|
||||
}
|
||||
|
||||
.mat-checkbox-inner-container {
|
||||
margin: auto 0;
|
||||
margin-right: 8px;
|
||||
margin: auto 8px auto 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@ import { TagService } from './services/tag.service';
|
||||
import { PaginationModel } from '@alfresco/adf-core';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
import { TagEntry } from '@alfresco/js-api';
|
||||
|
||||
/**
|
||||
* This component provide a list of all the tag inside the ECM
|
||||
@ -39,7 +40,7 @@ export class TagListComponent implements OnInit, OnDestroy {
|
||||
/**
|
||||
* Array of tags that are displayed
|
||||
*/
|
||||
tagsEntries: any = [];
|
||||
tagsEntries: TagEntry[] = [];
|
||||
|
||||
/**
|
||||
* Number of items per iteration
|
||||
@ -86,7 +87,7 @@ export class TagListComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
refreshTag(opts?: any) {
|
||||
this.tagService.getAllTheTags(opts).subscribe((tags: any) => {
|
||||
this.tagService.getAllTheTags(opts).subscribe((tags) => {
|
||||
this.tagsEntries = this.tagsEntries.concat(tags.list.entries);
|
||||
this.pagination = tags.list.pagination;
|
||||
this.result.emit(this.tagsEntries);
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
import { Component, EventEmitter, Input, OnChanges, Output, ViewEncapsulation, OnDestroy, OnInit } from '@angular/core';
|
||||
import { TagService } from './services/tag.service';
|
||||
import { TagPaging } from '@alfresco/js-api';
|
||||
import { TagEntry } from '@alfresco/js-api';
|
||||
import { Subject } from 'rxjs';
|
||||
import { takeUntil } from 'rxjs/operators';
|
||||
|
||||
@ -41,7 +41,7 @@ export class TagNodeListComponent implements OnChanges, OnDestroy, OnInit {
|
||||
@Input()
|
||||
showDelete = true;
|
||||
|
||||
tagsEntries: any;
|
||||
tagsEntries: TagEntry[];
|
||||
|
||||
/** Emitted when a tag is selected. */
|
||||
@Output()
|
||||
@ -73,7 +73,7 @@ export class TagNodeListComponent implements OnChanges, OnDestroy, OnInit {
|
||||
|
||||
refreshTag() {
|
||||
if (this.nodeId) {
|
||||
this.tagService.getTagsByNodeId(this.nodeId).subscribe((tagPaging: TagPaging) => {
|
||||
this.tagService.getTagsByNodeId(this.nodeId).subscribe((tagPaging) => {
|
||||
this.tagsEntries = tagPaging.list.entries;
|
||||
this.results.emit(this.tagsEntries);
|
||||
});
|
||||
|
@ -27,7 +27,7 @@ adf-version-manager {
|
||||
.adf-new-version-uploader-container {
|
||||
padding: 16px 0;
|
||||
width: 100%;
|
||||
height: 0%;
|
||||
height: 0;
|
||||
|
||||
float: left;
|
||||
position: relative;
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-card-view-array-item-theme($theme) {
|
||||
$foreground: map-get($theme, foreground);
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-card-view-textitem-theme($theme) {
|
||||
$foreground: map-get($theme, foreground);
|
||||
$outline: 1px solid mat-color($alfresco-ecm-blue, A200) !default;
|
||||
|
@ -1,3 +1,4 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-card-view-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-clipboard-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$config: mat-typography-config();
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-task-list-comment-list-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$primaryColor: mat-color($primary, 100);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-task-list-comment-theme($theme) {
|
||||
$foreground: map-get($theme, foreground);
|
||||
$header-border: 1px solid mat-color($foreground, divider);
|
||||
@ -16,9 +18,8 @@
|
||||
}
|
||||
|
||||
.adf-comments-input-container {
|
||||
padding: 0 15px;
|
||||
width: calc(100% - 30px);
|
||||
padding-top: 8px;
|
||||
padding: 8px 15px 0;
|
||||
border-bottom: $header-border;
|
||||
|
||||
textarea {
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-datatable-theme($theme) {
|
||||
$foreground: map-get($theme, foreground);
|
||||
$background: map-get($theme, background);
|
||||
|
@ -23,7 +23,8 @@ import { CoreModule } from '../core.module';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-text-subject'
|
||||
selector: 'adf-text-subject',
|
||||
template: ''
|
||||
})
|
||||
class TestComponent implements NodeAllowableOperationSubject {
|
||||
disabled: boolean = false;
|
||||
|
@ -34,7 +34,7 @@ export class RestoreMessageModel {
|
||||
selector: '[adf-restore]'
|
||||
})
|
||||
export class NodeRestoreDirective {
|
||||
private restoreProcessStatus;
|
||||
private readonly restoreProcessStatus;
|
||||
|
||||
/** Array of deleted nodes to restore. */
|
||||
@Input('adf-restore')
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-form-renderer-theme($theme) {
|
||||
|
||||
$config: mat-typography-config();
|
||||
|
@ -1,3 +1,4 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-form-container-widget-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
|
@ -21,7 +21,7 @@ import { FormOutcomeModel } from './form-outcome.model';
|
||||
|
||||
export class FormOutcomeEvent {
|
||||
|
||||
private _outcome: FormOutcomeModel;
|
||||
private readonly _outcome: FormOutcomeModel;
|
||||
private _defaultPrevented: boolean = false;
|
||||
|
||||
get outcome(): FormOutcomeModel {
|
||||
|
@ -30,7 +30,7 @@ export abstract class FormWidgetModel {
|
||||
readonly form: any;
|
||||
readonly json: any;
|
||||
|
||||
constructor(form: FormModel, json: any) {
|
||||
protected constructor(form: FormModel, json: any) {
|
||||
this.form = form;
|
||||
this.json = json;
|
||||
|
||||
|
@ -38,7 +38,7 @@ export class DynamicTableModel extends FormWidgetModel {
|
||||
rows: DynamicTableRow[] = [];
|
||||
|
||||
private _selectedRow: DynamicTableRow;
|
||||
private _validators: CellValidator[] = [];
|
||||
private readonly _validators: CellValidator[] = [];
|
||||
|
||||
get selectedRow(): DynamicTableRow {
|
||||
return this._selectedRow;
|
||||
|
@ -1,3 +1,4 @@
|
||||
@import '~@angular/material/theming';
|
||||
@import '../form';
|
||||
|
||||
@mixin adf-dynamic-table-theme($theme) {
|
||||
@ -62,9 +63,7 @@
|
||||
|
||||
&:focus {
|
||||
outline-offset: -1px;
|
||||
outline-width: 1px;
|
||||
outline-color: rgb(68, 138, 255);
|
||||
outline-style: solid;
|
||||
outline: rgb(68, 138, 255) solid 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,10 +7,7 @@
|
||||
}
|
||||
|
||||
.row-editor__invalid .row-editor__validation-summary {
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
padding: 8px 16px;
|
||||
color: #d50000;
|
||||
visibility: visible;
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-form-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$accent: map-get($theme, accent);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-hyperlink-widget-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
|
||||
|
@ -46,6 +46,7 @@ import { TypeaheadWidgetComponent } from './typeahead/typeahead.widget';
|
||||
import { UploadWidgetComponent } from './upload/upload.widget';
|
||||
import { DateTimeWidgetComponent } from './date-time/date-time.widget';
|
||||
import { JsonWidgetComponent } from './json/json.widget';
|
||||
import { UploadFolderWidgetComponent } from './upload-folder/upload-folder.widget';
|
||||
|
||||
// core
|
||||
export * from './widget.component';
|
||||
@ -76,6 +77,7 @@ export * from './error/error.component';
|
||||
export * from './document/document.widget';
|
||||
export * from './date-time/date-time.widget';
|
||||
export * from './json/json.widget';
|
||||
export * from './upload-folder/upload-folder.widget';
|
||||
|
||||
// editors (dynamic table)
|
||||
export * from './dynamic-table/dynamic-table.widget.model';
|
||||
@ -117,7 +119,8 @@ export const WIDGET_DIRECTIVES: any[] = [
|
||||
DateTimeWidgetComponent,
|
||||
DateTimeEditorComponent,
|
||||
JsonWidgetComponent,
|
||||
AmountEditorComponent
|
||||
AmountEditorComponent,
|
||||
UploadFolderWidgetComponent
|
||||
];
|
||||
|
||||
export const MASK_DIRECTIVE: any[] = [
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-form-people-widget-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$background: map-get($theme, background);
|
||||
|
@ -147,7 +147,7 @@ export class UploadFolderWidgetComponent extends WidgetComponent implements OnIn
|
||||
file.contentBlob = blob;
|
||||
this.formService.formContentClicked.next(file);
|
||||
},
|
||||
(error) => {
|
||||
() => {
|
||||
this.logService.error('Unable to send event for file ' + file.name);
|
||||
}
|
||||
);
|
||||
|
@ -37,10 +37,14 @@ import { WidgetComponent } from './components/widgets/widget.component';
|
||||
import { MatDatetimepickerModule, MatNativeDatetimeModule } from '@mat-datetimepicker/core';
|
||||
import { FormRendererComponent } from './components/form-renderer.component';
|
||||
import { EditJsonDialogModule } from '../dialogs/edit-json/edit-json.dialog.module';
|
||||
import { A11yModule } from '@angular/cdk/a11y';
|
||||
import { FlexLayoutModule } from '@angular/flex-layout';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
A11yModule,
|
||||
FlexLayoutModule,
|
||||
DataTableModule,
|
||||
HttpClientModule,
|
||||
MaterialModule,
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-info-drawer-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$background: map-get($theme, background);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-header-layout-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$accent: map-get($theme, accent);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-layout-container-theme($theme) {
|
||||
$background: map-get($theme, background);
|
||||
$foreground: map-get($theme, foreground);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-sidebar-action-menu-theme($theme) {
|
||||
|
||||
$primary: map-get($theme, primary);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-login-dialog-panel-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$accent: map-get($theme, accent);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-login-dialog-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$accent: map-get($theme, accent);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-login-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$accent: map-get($theme, accent);
|
||||
|
@ -120,7 +120,7 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
isError: boolean = false;
|
||||
errorMsg: string;
|
||||
actualLoginStep: any = LoginSteps.Landing;
|
||||
LoginSteps: any = LoginSteps;
|
||||
LoginSteps = LoginSteps;
|
||||
rememberMe: boolean = true;
|
||||
formError: { [id: string]: string };
|
||||
minLength: number = 2;
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
export class LoginSubmitEvent {
|
||||
|
||||
private _values: any;
|
||||
private readonly _values: any;
|
||||
private _defaultPrevented: boolean = false;
|
||||
|
||||
get values(): any {
|
||||
|
@ -15,11 +15,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Person } from '@alfresco/js-api';
|
||||
|
||||
export class CommentModel {
|
||||
id: number;
|
||||
message: string;
|
||||
created: Date;
|
||||
createdBy: any;
|
||||
createdBy: Person;
|
||||
isSelected: boolean;
|
||||
|
||||
constructor(obj?: any) {
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-pagination-theme($theme) {
|
||||
$foreground: map-get($theme, foreground);
|
||||
|
||||
|
@ -19,6 +19,7 @@ import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
||||
import { UserProcessModel } from '../models/user-process.model';
|
||||
import { EcmUserModel } from '../models/ecm-user.model';
|
||||
import { IdentityUserModel } from '../models/identity-user.model';
|
||||
|
||||
@Pipe({
|
||||
name: 'usernameInitials'
|
||||
@ -28,7 +29,7 @@ export class InitialUsernamePipe implements PipeTransform {
|
||||
constructor(private sanitized: DomSanitizer) {
|
||||
}
|
||||
|
||||
transform(user: UserProcessModel | EcmUserModel, className: string = '', delimiter: string = ''): SafeHtml {
|
||||
transform(user: UserProcessModel | EcmUserModel | IdentityUserModel, className: string = '', delimiter: string = ''): SafeHtml {
|
||||
let safeHtml: SafeHtml = '';
|
||||
if (user) {
|
||||
const initialResult = this.getInitialUserName(user.firstName, user.lastName, delimiter);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-search-text-input-theme($theme) {
|
||||
$background: map-get($theme, background);
|
||||
$foreground: map-get($theme, foreground);
|
||||
|
@ -21,6 +21,7 @@ import { CommentModel } from '../models/comment.model';
|
||||
import { AlfrescoApiService } from '../services/alfresco-api.service';
|
||||
import { LogService } from '../services/log.service';
|
||||
import { map, catchError } from 'rxjs/operators';
|
||||
import { CommentEntry } from '@alfresco/js-api';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@ -40,7 +41,7 @@ export class CommentContentService {
|
||||
addNodeComment(nodeId: string, message: string): Observable<CommentModel> {
|
||||
return from(this.apiService.getInstance().core.commentsApi.addComment(nodeId, {content: message}))
|
||||
.pipe(
|
||||
map((response: any) => {
|
||||
map((response: CommentEntry) => {
|
||||
return new CommentModel({
|
||||
id: response.entry.id,
|
||||
message: response.entry.content,
|
||||
@ -60,7 +61,7 @@ export class CommentContentService {
|
||||
getNodeComments(nodeId: string): Observable<CommentModel[]> {
|
||||
return from(this.apiService.getInstance().core.commentsApi.getComments(nodeId))
|
||||
.pipe(
|
||||
map((response: any) => {
|
||||
map((response) => {
|
||||
const comments: CommentModel[] = [];
|
||||
response.list.entries.forEach((comment: any) => {
|
||||
comments.push(new CommentModel({
|
||||
|
@ -41,7 +41,7 @@ export class CommentProcessService {
|
||||
addTaskComment(taskId: string, message: string): Observable<CommentModel> {
|
||||
return from(this.apiService.getInstance().activiti.taskApi.addTaskComment({ message: message }, taskId))
|
||||
.pipe(
|
||||
map((response: CommentModel) => {
|
||||
map((response) => {
|
||||
return new CommentModel({
|
||||
id: response.id,
|
||||
message: response.message,
|
||||
@ -61,9 +61,9 @@ export class CommentProcessService {
|
||||
getTaskComments(taskId: string): Observable<CommentModel[]> {
|
||||
return from(this.apiService.getInstance().activiti.taskApi.getTaskComments(taskId))
|
||||
.pipe(
|
||||
map((response: any) => {
|
||||
map((response) => {
|
||||
const comments: CommentModel[] = [];
|
||||
response.data.forEach((comment: CommentModel) => {
|
||||
response.data.forEach((comment) => {
|
||||
const user = new UserProcessModel(comment.createdBy);
|
||||
comments.push(new CommentModel({
|
||||
id: comment.id,
|
||||
@ -86,9 +86,9 @@ export class CommentProcessService {
|
||||
getProcessInstanceComments(processInstanceId: string): Observable<CommentModel[]> {
|
||||
return from(this.apiService.getInstance().activiti.commentsApi.getProcessInstanceComments(processInstanceId))
|
||||
.pipe(
|
||||
map((response: any) => {
|
||||
map((response) => {
|
||||
const comments: CommentModel[] = [];
|
||||
response.data.forEach((comment: CommentModel) => {
|
||||
response.data.forEach((comment) => {
|
||||
const user = new UserProcessModel(comment.createdBy);
|
||||
comments.push(new CommentModel({
|
||||
id: comment.id,
|
||||
@ -113,7 +113,7 @@ export class CommentProcessService {
|
||||
return from(
|
||||
this.apiService.getInstance().activiti.commentsApi.addProcessInstanceComment({ message: message }, processInstanceId)
|
||||
).pipe(
|
||||
map((response: CommentModel) => {
|
||||
map((response) => {
|
||||
return new CommentModel({
|
||||
id: response.id,
|
||||
message: response.message,
|
||||
|
@ -21,7 +21,7 @@ import { Injectable } from '@angular/core';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DownloadService {
|
||||
private saveData: Function;
|
||||
private readonly saveData: Function;
|
||||
|
||||
constructor() {
|
||||
this.saveData = (function() {
|
||||
|
@ -23,7 +23,7 @@ import { Injectable } from '@angular/core';
|
||||
export class StorageService {
|
||||
|
||||
private memoryStore: { [key: string]: any } = {};
|
||||
private useLocalStorage: boolean = false;
|
||||
private readonly useLocalStorage: boolean = false;
|
||||
private _prefix: string = '';
|
||||
|
||||
get prefix() {
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-default-class-theme($theme) {
|
||||
|
||||
.adf-hide-small {
|
||||
|
@ -1,3 +1,4 @@
|
||||
@import '~@angular/material/theming';
|
||||
@import 'variables';
|
||||
|
||||
@mixin adf-no-select {
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-colors-theme($theme) {
|
||||
|
||||
$primary: map-get($theme, primary);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-snackbar-theme($theme) {
|
||||
$warn: map-get($theme, warn);
|
||||
$accent: map-get($theme, accent);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-empty-content-theme($theme) {
|
||||
|
||||
$config: mat-typography-config();
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-error-content-theme($theme) {
|
||||
|
||||
$primary: map-get($theme, primary);
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-toolbar-theme($theme) {
|
||||
$foreground: map-get($theme, foreground);
|
||||
$adf-toolbar-height: 48px !default;
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';
|
||||
import { ThemePalette } from '@angular/material/core';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-toolbar',
|
||||
@ -33,6 +34,6 @@ export class ToolbarComponent {
|
||||
|
||||
/** Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. */
|
||||
@Input()
|
||||
color: string;
|
||||
color: ThemePalette;
|
||||
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-userinfo-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$accent: map-get($theme, accent);
|
||||
|
@ -24,7 +24,7 @@ import { BpmUserService } from '../../services/bpm-user.service';
|
||||
import { EcmUserService } from '../../services/ecm-user.service';
|
||||
import { IdentityUserService } from '../../services/identity-user.service';
|
||||
import { of, Observable } from 'rxjs';
|
||||
import { MatMenuTrigger } from '@angular/material';
|
||||
import { MatMenuTrigger, MenuPositionX, MenuPositionY } from '@angular/material';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-userinfo',
|
||||
@ -46,11 +46,11 @@ export class UserInfoComponent implements OnInit {
|
||||
|
||||
/** Custom choice for opening the menu at the bottom. Can be `before` or `after`. */
|
||||
@Input()
|
||||
menuPositionX: string = 'after';
|
||||
menuPositionX: MenuPositionX = 'after';
|
||||
|
||||
/** Custom choice for opening the menu at the bottom. Can be `above` or `below`. */
|
||||
@Input()
|
||||
menuPositionY: string = 'below';
|
||||
menuPositionY: MenuPositionY = 'below';
|
||||
|
||||
/** Shows/hides the username next to the user info button. */
|
||||
@Input()
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-image-viewer-theme($theme) {
|
||||
$background: map-get($theme, background);
|
||||
$viewer-image-outline: 1px solid mat-color($alfresco-ecm-blue, A200) !default;
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
.adf-fill-remaining-space {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-pdf-thumbnails-theme($theme) {
|
||||
$background: map-get($theme, background);
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-pdf-viewer-theme($theme) {
|
||||
$background: map-get($theme, background);
|
||||
$foreground: map-get($theme, foreground);
|
||||
|
@ -399,11 +399,11 @@
|
||||
position: absolute;
|
||||
white-space: pre;
|
||||
cursor: text;
|
||||
-webkit-transform-origin: 0% 0%;
|
||||
-moz-transform-origin: 0% 0%;
|
||||
-o-transform-origin: 0% 0%;
|
||||
-ms-transform-origin: 0% 0%;
|
||||
transform-origin: 0% 0%;
|
||||
-webkit-transform-origin: 0 0;
|
||||
-moz-transform-origin: 0 0;
|
||||
-o-transform-origin: 0 0;
|
||||
-ms-transform-origin: 0 0;
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
|
||||
.adf-highlight {
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-text-viewer-theme($theme) {
|
||||
$background: map-get($theme, background);
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
@import '~@angular/material/theming';
|
||||
|
||||
@mixin adf-viewer-theme($theme) {
|
||||
$background: map-get($theme, background);
|
||||
$foreground: map-get($theme, foreground);
|
||||
|
@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 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.
|
||||
*/
|
||||
|
||||
export interface DiagramElementOptions {
|
||||
stroke?: string;
|
||||
fillColors?: string;
|
||||
fillOpacity?: string;
|
||||
strokeWidth?: number;
|
||||
radius?: number;
|
||||
}
|
@ -34,7 +34,8 @@ import {
|
||||
FormFieldValidator,
|
||||
FormValues,
|
||||
FormModel,
|
||||
AppConfigService
|
||||
AppConfigService,
|
||||
ContentLinkModel
|
||||
} from '@alfresco/adf-core';
|
||||
import { FormCloudService } from '../services/form-cloud.service';
|
||||
import { TaskVariableCloud } from '../models/task-variable-cloud.model';
|
||||
@ -101,7 +102,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
|
||||
/** Emitted when form content is clicked. */
|
||||
@Output()
|
||||
formContentClicked = new EventEmitter<string>();
|
||||
formContentClicked = new EventEmitter<ContentLinkModel>();
|
||||
|
||||
protected subscriptions: Subscription[] = [];
|
||||
nodeId: string;
|
||||
@ -119,7 +120,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
|
||||
this.formService.formContentClicked
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe((content: any) => {
|
||||
.subscribe((content) => {
|
||||
this.formContentClicked.emit(content);
|
||||
});
|
||||
this.formRenderingService.setComponentTypeResolver('upload', () => AttachFileCloudWidgetComponent, true);
|
||||
|
@ -88,7 +88,7 @@ export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent
|
||||
this.onFileChanged(event);
|
||||
}
|
||||
|
||||
onRemoveAttachFile(file: File | RelatedContentRepresentation) {
|
||||
onRemoveAttachFile(file: File | RelatedContentRepresentation | Node) {
|
||||
this.removeFile(file);
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
&-menu-list {
|
||||
padding-top: 0px!important;
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ import { fakeGlobalTask, fakeCustomSchema } from '../mock/fakeTaskResponseMock';
|
||||
import { of } from 'rxjs';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module';
|
||||
import { TaskListCloudModule } from '../task-list-cloud.module';
|
||||
import { Person } from '@alfresco/js-api';
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
@ -34,7 +35,7 @@ import { TaskListCloudModule } from '../task-list-cloud.module';
|
||||
<data-column key="created" title="ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED" class="adf-hidden"></data-column>
|
||||
<data-column key="startedBy" title="ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED" class="adf-desktop-only dw-dt-col-3 adf-ellipsis-cell">
|
||||
<ng-template let-entry="$implicit">
|
||||
<div>{{getFullName(entry.row.obj.startedBy)}}</div>
|
||||
<div>{{getFullName(entry.row?.obj?.startedBy)}}</div>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</data-columns>
|
||||
@ -43,7 +44,11 @@ import { TaskListCloudModule } from '../task-list-cloud.module';
|
||||
class CustomTaskListComponent {
|
||||
@ViewChild(TaskListCloudComponent)
|
||||
taskList: TaskListCloudComponent;
|
||||
}
|
||||
|
||||
getFullName(person: Person): string {
|
||||
return `${person.firstName} ${person.lastName}`;
|
||||
}
|
||||
}
|
||||
@Component({
|
||||
template: `
|
||||
<adf-tasklist>
|
||||
|
@ -1,5 +1,5 @@
|
||||
.adf-create-attachment {
|
||||
display: inline-block;
|
||||
line-height: 0px;
|
||||
line-height: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
@ -11,10 +11,7 @@
|
||||
}
|
||||
|
||||
.adf-fix-element-user-list {
|
||||
padding-top: 0;
|
||||
padding-right: 0;
|
||||
padding-bottom: 0;
|
||||
padding-left: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.adf-search-text-header {
|
||||
|
@ -43,9 +43,8 @@
|
||||
}
|
||||
|
||||
.adf-comments-input-container {
|
||||
padding: 0 15px;
|
||||
width: calc(100% - 30px);
|
||||
padding-top: 8px;
|
||||
padding: 8px 15px 0;
|
||||
border-bottom: $header-border;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
}
|
||||
|
||||
&-menu-list {
|
||||
padding-top: 0px!important;
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
&-menu-list {
|
||||
padding-top: 0px!important;
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ describe('TaskListComponent', () => {
|
||||
<data-column key="created" title="ADF_TASK_LIST.PROPERTIES.CREATED" class="hidden"></data-column>
|
||||
<data-column key="startedBy" title="ADF_TASK_LIST.PROPERTIES.CREATED" class="desktop-only dw-dt-col-3 ellipsis-cell">
|
||||
<ng-template let-entry="$implicit">
|
||||
<div>{{entry.row.obj.startedBy | fullName}}</div>
|
||||
<div>{{entry.row?.obj?.startedBy | fullName}}</div>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</data-columns>
|
||||
|
Loading…
x
Reference in New Issue
Block a user