[ADF-3591] spellcheck support for code (#3827)

* setup spellcheck
This commit is contained in:
Denys Vuika
2018-10-23 15:05:38 +01:00
committed by Eugenio Romano
parent 53d96679ea
commit e39a2b149b
262 changed files with 1561 additions and 1005 deletions

View File

@@ -87,7 +87,7 @@ describe('Breadcrumb', () => {
expect(component.parseRoute(null)).toEqual([]);
});
it('should not parase the route when node has no path', () => {
it('should not parse the route when node has no path', () => {
const node: any = {};
expect(component.parseRoute(node)).toEqual([]);
});

View File

@@ -82,7 +82,7 @@ describe('DropdownBreadcrumb', () => {
});
});
it('should display only the path in the selectbox', (done) => {
it('should display only the path in the selectBox', (done) => {
let fakeNodeWithCreatePermissionInstance = JSON.parse(JSON.stringify(fakeNodeWithCreatePermission));
fakeNodeWithCreatePermissionInstance.path.elements = [
{ id: '1', name: 'Stark Industries' },
@@ -169,7 +169,7 @@ describe('DropdownBreadcrumb', () => {
});
});
it('should open the selectbox when clicking on the folder icon', (done) => {
it('should open the selectBox when clicking on the folder icon', (done) => {
triggerComponentChange(JSON.parse(JSON.stringify(fakeNodeWithCreatePermission)));
spyOn(component.dropdown, 'open');

View File

@@ -19,6 +19,6 @@ import { PropertyGroupContainer } from './property-group.interface';
import { OrganisedPropertyGroup } from './organised-property-group.interface';
export interface ContentMetadataConfig {
isGroupAllowed(groupname: string): boolean;
isGroupAllowed(groupName: string): boolean;
reorganiseByConfig(propertyGroups: PropertyGroupContainer): OrganisedPropertyGroup[];
}

View File

@@ -152,7 +152,7 @@ describe('PropertyGroupTranslatorService', () => {
expect(logService.error).toHaveBeenCalledWith('Unknown type for mapping: daemonic:scorcher');
});
it('should fall back to singleline property type if unrecognised type is found', () => {
it('should fall back to single-line property type if unrecognised type is found', () => {
property.name = 'FAS:PLAGUE';
property.title = 'The Faro Plague';
property.dataType = 'daemonic:scorcher';
@@ -170,7 +170,7 @@ describe('PropertyGroupTranslatorService', () => {
});
});
describe('Different types\'s attributes', () => {
describe('Different types attributes', () => {
beforeEach(() => {
propertyGroups.push(propertyGroup);

View File

@@ -162,7 +162,7 @@ export class ContentNodeDialogService {
* Opens a dialog to choose folders to upload.
* @param action Name of the action to show in the title
* @param contentEntry Item to upload
* @returns Information about the chosed folder(s)
* @returns Information about the chosen folder(s)
*/
openUploadFolderDialog(action: string, contentEntry: MinimalNodeEntryEntity): Observable<MinimalNodeEntryEntity[]> {
const select = new Subject<MinimalNodeEntryEntity[]>();

View File

@@ -328,7 +328,7 @@ describe('ContentNodeSelectorComponent', () => {
expect(component.chosenNode).toBeNull();
}));
it('should call the search api on changing the site selectbox\'s value', fakeAsync(() => {
it('should call the search api on changing the site selectBox value', fakeAsync(() => {
typeToSearchBox('vegeta');
tick(debounceSearch);
@@ -355,7 +355,7 @@ describe('ContentNodeSelectorComponent', () => {
expect(cnSearchSpy).toHaveBeenCalledWith('vegeta', '-sites-', 0, 25, ['123456testId', '09876543testId']);
}));
it('should call the content node selector\'s search with the right parameters on changing the site selectbox\'s value from a custom dropdown menu', fakeAsync(() => {
it('should call the content node selector\'s search with the right parameters on changing the site selectBox value from a custom dropdown menu', fakeAsync(() => {
component.dropdownSiteList = <SitePaging> { list: { entries: [<SiteEntry> { entry: { guid: '-sites-' } }, <SiteEntry> { entry: { guid: 'namek' } }] } };
fixture.detectChanges();
@@ -608,7 +608,7 @@ describe('ContentNodeSelectorComponent', () => {
}, 300);
});
it('should reload the original documentlist when clearing the search input', fakeAsync(() => {
it('should reload the original documentList when clearing the search input', fakeAsync(() => {
typeToSearchBox('shenron');
tick(debounceSearch);

View File

@@ -216,7 +216,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, PaginatedCompo
}
/**
* Update the result list depending on the criterias
* Update the result list depending on the criteria
*/
private updateResults(): void {
if (this.searchTerm.length === 0) {
@@ -281,7 +281,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, PaginatedCompo
this.showingSearchResults = true;
this.loadingSearchResults = false;
// Documentlist hack, since data displaying for preloaded nodes is a little bit messy there
// DocumentList hack, since data displaying for preloaded nodes is a little bit messy there
if (!this.nodes) {
this.nodes = nodePaging;
} else {
@@ -293,7 +293,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, PaginatedCompo
}
/**
* Hightlight the actual searchterm in the next frame
* Highlight the actual search term in the next frame
*/
highlight(): void {
setTimeout(() => {

View File

@@ -82,13 +82,13 @@ describe('ContentNodeSelectorDialogComponent', () => {
expect(actionButton.nativeElement.innerText).toBe('NODE_SELECTOR.MOVE');
});
it('should pass through the injected currentFolderId to the documentlist', () => {
it('should pass through the injected currentFolderId to the documentList', () => {
let documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
expect(documentList).not.toBeNull('Document list should be shown');
expect(documentList.componentInstance.currentFolderId).toBe('cat-girl-nuku-nuku');
});
xit('should pass through the injected rowFilter to the documentlist', (done) => {
xit('should pass through the injected rowFilter to the documentList', (done) => {
fixture.whenStable().then(() => {
let documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
expect(documentList).not.toBeNull('Document list should be shown');
@@ -98,7 +98,7 @@ describe('ContentNodeSelectorDialogComponent', () => {
});
it('should pass through the injected imageResolver to the documentlist', () => {
it('should pass through the injected imageResolver to the documentList', () => {
let documentList = fixture.debugElement.query(By.directive(DocumentListComponent));
expect(documentList).not.toBeNull('Document list should be shown');
expect(documentList.componentInstance.imageResolver).toBe(data.imageResolver);

View File

@@ -117,7 +117,7 @@ describe('FolderDialogComponent', () => {
expect(dialogRef.close).toHaveBeenCalledWith(folder);
});
it('should emit success output event with folder when submit is succesfull', async(() => {
it('should emit success output event with folder when submit is successful', async(() => {
const folder = { data: 'folder-data' };
let expectedNode = null;

View File

@@ -42,7 +42,7 @@ export class FolderDialogComponent implements OnInit {
@Output()
error: EventEmitter<any> = new EventEmitter<any>();
/** Emitted when the edit/create folder is successfully created/mmodified
/** Emitted when the edit/create folder is successfully created/modified
*/
@Output()
success: EventEmitter<any> = new EventEmitter<MinimalNodeEntryEntity>();

View File

@@ -117,7 +117,7 @@ describe('NodeLockDialogComponent', () => {
expect(alfrescoApi.nodesApi.unlockNode).toHaveBeenCalledWith('node-id');
});
it('should call dialog to close with form data when submit is succesfluly', fakeAsync(() => {
it('should call dialog to close with form data when submit is successfully', fakeAsync(() => {
const node = { entry: {} };
spyOn(alfrescoApi.nodesApi, 'lockNode').and.returnValue(Promise.resolve(node));

View File

@@ -151,7 +151,7 @@ describe('ShareDataTableAdapter', () => {
});
it('should generate fallback icon for a file thumbnail with missing mime type', () => {
spyOn(documentListService, 'getDefaultMimeTypeIcon').and.returnValue(`assets/images/ft_ic_miscellaneouse.svg`);
spyOn(documentListService, 'getDefaultMimeTypeIcon').and.returnValue(`assets/images/ft_ic_miscellaneous.svg`);
let adapter = new ShareDataTableAdapter(documentListService, null, null);
@@ -167,7 +167,7 @@ describe('ShareDataTableAdapter', () => {
});
it('should generate fallback icon for a file with no content entry', () => {
spyOn(documentListService, 'getDefaultMimeTypeIcon').and.returnValue(`assets/images/ft_ic_miscellaneouse.svg`);
spyOn(documentListService, 'getDefaultMimeTypeIcon').and.returnValue(`assets/images/ft_ic_miscellaneous.svg`);
let adapter = new ShareDataTableAdapter(documentListService, null, null);

View File

@@ -248,9 +248,9 @@ export class ShareDataTableAdapter implements DataTableAdapter {
}
if (merge) {
let listPrunedDuplicate = rows.filter((elemntToFilter) => {
let isPresent = this.rows.find((currenRow: any) => {
return currenRow.obj.entry.id === elemntToFilter.obj.entry.id;
let listPrunedDuplicate = rows.filter((elementToFilter) => {
let isPresent = this.rows.find((currentRow: any) => {
return currentRow.obj.entry.id === elementToFilter.obj.entry.id;
});
return !isPresent;

View File

@@ -178,7 +178,7 @@ export class CustomResourcesService {
}
/**
* Gets all sites in the respository.
* Gets all sites in the repository.
* @param pagination Specifies how to paginate the results
* @returns List of sites
*/
@@ -266,7 +266,7 @@ export class CustomResourcesService {
/**
* Is the folder ID a "-my", "-root-", or "-shared-" alias?
* @param folderId Folder ID name to check
* @returns True if the ID is one of the suppored sources, false otherwise
* @returns True if the ID is one of the supported sources, false otherwise
*/
isSupportedSource(folderId: string): boolean {
let isSupportedSources = false;

View File

@@ -183,10 +183,10 @@ describe('DocumentActionsService', () => {
let file = new FileNode();
let fileWithPermission: any = file;
fileWithPermission.entry.allowableOperations = [permission];
const deleteObservale = service.getHandler('delete')(fileWithPermission, null, permission);
const deleteObservable = service.getHandler('delete')(fileWithPermission, null, permission);
expect(documentListService.deleteNode).toHaveBeenCalledWith(file.entry.id);
expect(deleteObservale.subscribe).toBeDefined();
expect(deleteObservable.subscribe).toBeDefined();
});
it('should support deletion only file node', () => {

View File

@@ -51,8 +51,8 @@ export class DocumentActionsService {
*/
getHandler(key: string): ContentActionHandler {
if (key) {
let lkey = key.toLowerCase();
return this.handlers[lkey] || null;
let lKey = key.toLowerCase();
return this.handlers[lKey] || null;
}
return null;
}
@@ -65,8 +65,8 @@ export class DocumentActionsService {
*/
setHandler(key: string, handler: ContentActionHandler): boolean {
if (key) {
let lkey = key.toLowerCase();
this.handlers[lkey] = handler;
let lKey = key.toLowerCase();
this.handlers[lKey] = handler;
return true;
}
return false;

View File

@@ -117,10 +117,10 @@ describe('FolderActionsService', () => {
let folder = new FolderNode();
let folderWithPermission: any = folder;
folderWithPermission.entry.allowableOperations = [permission];
const deleteObservale = service.getHandler('delete')(folderWithPermission, null, permission);
const deleteObservable = service.getHandler('delete')(folderWithPermission, null, permission);
expect(documentListService.deleteNode).toHaveBeenCalledWith(folder.entry.id);
expect(deleteObservale.subscribe).toBeDefined();
expect(deleteObservable.subscribe).toBeDefined();
});
it('should not delete the folder node if there is no delete permission', (done) => {

View File

@@ -49,8 +49,8 @@ export class FolderActionsService {
*/
getHandler(key: string): ContentActionHandler {
if (key) {
let lkey = key.toLowerCase();
return this.handlers[lkey] || null;
let lKey = key.toLowerCase();
return this.handlers[lKey] || null;
}
return null;
}
@@ -63,8 +63,8 @@ export class FolderActionsService {
*/
setHandler(key: string, handler: ContentActionHandler): boolean {
if (key) {
let lkey = key.toLowerCase();
this.handlers[lkey] = handler;
let lKey = key.toLowerCase();
this.handlers[lKey] = handler;
return true;
}
return false;

View File

@@ -32,7 +32,7 @@ import { MinimalNodeEntryEntity } from 'alfresco-js-api';
[adf-create-folder]="parentNode"
(success)="success($event)"
title="create-title"
[nodeType]="'cm:my-litte-pony'">
[nodeType]="'cm:my-little-pony'">
</div>`
})
class TestTypeComponent {
@@ -154,7 +154,7 @@ describe('FolderCreateDirective', () => {
data: {
parentNodeId: jasmine.any(String),
createTitle: 'create-title',
nodeType: 'cm:my-litte-pony'
nodeType: 'cm:my-little-pony'
},
width: jasmine.any(String)
});

View File

@@ -235,7 +235,7 @@
}
}
},
"PERMISSON": {
"PERMISSION": {
"LACKOF": "Sie verfügen nicht über die nötige Berechtigung ('{{permission}}'), um {{type}} zu {{action}}"
},
"METADATA": {
@@ -288,4 +288,4 @@
"NOT-ALLOWED": "Sie sind nicht zum Ändern von Berechtigungen berechtigt."
}
}
}
}

View File

@@ -235,7 +235,7 @@
}
}
},
"PERMISSON": {
"PERMISSION": {
"LACKOF": "You don't have the {{permission}} permission to {{action}} the {{type}}"
},
"METADATA": {

View File

@@ -235,7 +235,7 @@
}
}
},
"PERMISSON": {
"PERMISSION": {
"LACKOF": "No tiene permiso {{permission}} para {{action}} el {{type}}"
},
"METADATA": {
@@ -288,4 +288,4 @@
"NOT-ALLOWED": "No puede cambiar los permisos"
}
}
}
}

View File

@@ -235,7 +235,7 @@
}
}
},
"PERMISSON": {
"PERMISSION": {
"LACKOF": "Vous n'avez pas les droits d'accès {{permission}} pour {{action}} le {{type}}"
},
"METADATA": {
@@ -288,4 +288,4 @@
"NOT-ALLOWED": "Vous n'avez pas le droit de modifier les droits d'accès"
}
}
}
}

View File

@@ -235,7 +235,7 @@
}
}
},
"PERMISSON": {
"PERMISSION": {
"LACKOF": "Non hai l'autorizzazione {{permission}} per {{action}} {{type}}"
},
"METADATA": {
@@ -288,4 +288,4 @@
"NOT-ALLOWED": "Non è consentito modificare le autorizzazioni"
}
}
}
}

View File

@@ -235,7 +235,7 @@
}
}
},
"PERMISSON": {
"PERMISSION": {
"LACKOF": "{{type}} を {{action}} するための {{permission}} 権限がありません"
},
"METADATA": {
@@ -288,4 +288,4 @@
"NOT-ALLOWED": "権限を変更することはできません"
}
}
}
}

View File

@@ -235,7 +235,7 @@
}
}
},
"PERMISSON": {
"PERMISSION": {
"LACKOF": "Du har ikke {{permission}} tillatelsen til å {{action}} {{type}}"
},
"METADATA": {
@@ -288,4 +288,4 @@
"NOT-ALLOWED": "Du har ikke lov til å endre tillatelser"
}
}
}
}

View File

@@ -235,7 +235,7 @@
}
}
},
"PERMISSON": {
"PERMISSION": {
"LACKOF": "U hebt geen {{permission}} rechten voor het {{action}} van {{type}}"
},
"METADATA": {
@@ -288,4 +288,4 @@
"NOT-ALLOWED": "Het is u niet toegestaan om machtigingen te wijzigen"
}
}
}
}

View File

@@ -235,7 +235,7 @@
}
}
},
"PERMISSON": {
"PERMISSION": {
"LACKOF": "Você não tem a permissão {{permission}} para {{action}} o {{type}}"
},
"METADATA": {
@@ -288,4 +288,4 @@
"NOT-ALLOWED": "Você não pode alterar permissões"
}
}
}
}

View File

@@ -235,7 +235,7 @@
}
}
},
"PERMISSON": {
"PERMISSION": {
"LACKOF": "У вас нет разрешения {{permission}}, чтобы {{action}} {{type}}"
},
"METADATA": {
@@ -288,4 +288,4 @@
"NOT-ALLOWED": "У вас нет прав на изменение разрешений"
}
}
}
}

View File

@@ -235,7 +235,7 @@
}
}
},
"PERMISSON": {
"PERMISSION": {
"LACKOF": "您没有 {{action}} {{type}} 的 {{permission}} 权限"
},
"METADATA": {
@@ -288,4 +288,4 @@
"NOT-ALLOWED": "不允许更改权限"
}
}
}
}

View File

@@ -15,6 +15,8 @@
* limitations under the License.
*/
/* spellchecker: disable */
export const fakeAuthorityResults: any[] = [{
'entry': {
'aspectNames': [

View File

@@ -110,10 +110,10 @@ describe('AddPermissionComponent', () => {
it('should emit an error event when the node update fail', (done) => {
fixture.componentInstance.selectedItems = fakeAuthorityResults;
spyOn(nodePermissionService, 'updateNodePermissions').and.returnValue(throwError({ error: 'errored'}));
spyOn(nodePermissionService, 'updateNodePermissions').and.returnValue(throwError({ error: 'err'}));
fixture.componentInstance.error.subscribe((error) => {
expect(error.error).toBe('errored');
expect(error.error).toBe('err');
done();
});

View File

@@ -97,7 +97,7 @@ describe('PermissionDisplayComponent', () => {
it('should show locally set label for locally set permissions', () => {
component.nodeId = 'fake-node-id';
spyOn(nodeService, 'getNode').and.returnValue(of(fakeNodeWithOnlyLocally));
spyOn(nodePermissionService, 'getGroupMemeberByGroupName').and.returnValue(of(fakeSiteRoles));
spyOn(nodePermissionService, 'getGroupMemberByGroupName').and.returnValue(of(fakeSiteRoles));
spyOn(searchApiService, 'searchByQueryBody').and.returnValue(of(fakeSiteNodeResponse));
fixture.detectChanges();
expect(element.querySelector('#adf-permission-display-container')).not.toBeNull();
@@ -108,7 +108,7 @@ describe('PermissionDisplayComponent', () => {
it('should show a dropdown with the possible roles', async(() => {
component.nodeId = 'fake-node-id';
spyOn(nodeService, 'getNode').and.returnValue(of(fakeNodeWithOnlyLocally));
spyOn(nodePermissionService, 'getGroupMemeberByGroupName').and.returnValue(of(fakeSiteRoles));
spyOn(nodePermissionService, 'getGroupMemberByGroupName').and.returnValue(of(fakeSiteRoles));
spyOn(searchApiService, 'searchByQueryBody').and.returnValue(of(fakeSiteNodeResponse));
fixture.detectChanges();
fixture.whenStable().then(() => {

View File

@@ -60,7 +60,7 @@ describe('NodePermissionService', () => {
it('should return a list of roles taken from the site groups', async(() => {
spyOn(searchApiService, 'searchByQueryBody').and.returnValue(of(fakeSiteNodeResponse));
spyOn(service, 'getGroupMemeberByGroupName').and.returnValue(of(fakeSiteRoles));
spyOn(service, 'getGroupMemberByGroupName').and.returnValue(of(fakeSiteRoles));
service.getNodeRoles(fakeNodeWithOnlyLocally).subscribe((roleArray: string[]) => {
expect(roleArray).not.toBeNull();
@@ -122,7 +122,7 @@ describe('NodePermissionService', () => {
spyOn(nodeService, 'getNode').and.returnValue(of(fakeNodeCopy));
spyOn(nodeService, 'updateNode').and.callFake((nodeId, permissionBody) => returnUpdatedNode(nodeId, permissionBody));
spyOn(searchApiService, 'searchByQueryBody').and.returnValue(of(fakeSiteNodeResponse));
spyOn(service, 'getGroupMemeberByGroupName').and.returnValue(of(fakeSiteRoles));
spyOn(service, 'getGroupMemberByGroupName').and.returnValue(of(fakeSiteRoles));
service.updateNodePermissions('fake-node-id', fakeAuthorityResults).subscribe((node: MinimalNodeEntryEntity) => {
expect(node).not.toBeNull();

View File

@@ -157,7 +157,7 @@ export class NodePermissionService {
private getGroupMembersBySiteName(siteName: string): Observable<string[]> {
const groupName = 'GROUP_site_' + siteName;
return this.getGroupMemeberByGroupName(groupName)
return this.getGroupMemberByGroupName(groupName)
.pipe(
map((res: GroupsPaging) => {
let displayResult: string[] = [];
@@ -172,10 +172,10 @@ export class NodePermissionService {
/**
* Gets all members related to a group name.
* @param groupName Name of group to look for members
* @param opts Extra options supported by JSAPI
* @param opts Extra options supported by JS-API
* @returns List of members
*/
getGroupMemeberByGroupName(groupName: string, opts?: any): Observable<GroupMemberPaging> {
getGroupMemberByGroupName(groupName: string, opts?: any): Observable<GroupMemberPaging> {
return from<GroupMemberPaging>(this.apiService.groupsApi.getGroupMembers(groupName, opts));
}

View File

@@ -36,7 +36,7 @@ describe('SearchDateRangeComponent', () => {
const buildAdapter = (): MomentDateAdapter => {
const dateAdapter = new MomentDateAdapter();
dateAdapter.overrideDisplyaFormat = null;
dateAdapter.overrideDisplayFormat = null;
return dateAdapter;
};
@@ -66,7 +66,7 @@ describe('SearchDateRangeComponent', () => {
it('should setup the format of the date from configuration', () => {
component.settings = { field: 'cm:created', dateFormat: dateFormatFixture };
component.ngOnInit();
expect(theDateAdapter.overrideDisplyaFormat).toBe(dateFormatFixture);
expect(theDateAdapter.overrideDisplayFormat).toBe(dateFormatFixture);
});
it('should setup form control with formatted valid date on change', () => {

View File

@@ -80,7 +80,7 @@ export class SearchDateRangeComponent implements SearchWidget, OnInit {
this.datePickerDateFormat = this.settings.dateFormat || DEFAULT_FORMAT_DATE;
}
const theCustomDateAdapter = <MomentDateAdapter> <any> this.dateAdapter;
theCustomDateAdapter.overrideDisplyaFormat = this.datePickerDateFormat;
theCustomDateAdapter.overrideDisplayFormat = this.datePickerDateFormat;
this.userPreferencesService.select(UserPreferenceValues.Locale).subscribe((locale) => {
this.setLocale(locale);

View File

@@ -92,7 +92,7 @@ describe('DropdownSitesComponent', () => {
component = fixture.componentInstance;
}));
function openSelectbox() {
function openSelectBox() {
const selectBox = debug.query(By.css(('[data-automation-id="site-my-files-select"] .mat-select-trigger')));
selectBox.triggerEventHandler('click', null);
}
@@ -137,7 +137,7 @@ describe('DropdownSitesComponent', () => {
it('should show the default placeholder label by default', async(() => {
fixture.detectChanges();
openSelectbox();
openSelectBox();
fixture.whenStable().then(() => {
fixture.detectChanges();
@@ -151,7 +151,7 @@ describe('DropdownSitesComponent', () => {
component.placeholder = 'NODE_SELECTOR.SELECT_LOCATION';
fixture.detectChanges();
openSelectbox();
openSelectBox();
fixture.whenStable().then(() => {
fixture.detectChanges();
@@ -181,7 +181,7 @@ describe('DropdownSitesComponent', () => {
fixture.detectChanges();
openSelectbox();
openSelectBox();
let options: any = [];
fixture.whenStable().then(() => {
@@ -228,7 +228,7 @@ describe('DropdownSitesComponent', () => {
});
});
it('should be possiblle to select the default value', (done) => {
it('should be possible to select the default value', (done) => {
component.value = 'swsdp';
fixture.detectChanges();

View File

@@ -37,7 +37,7 @@ export class TagService {
/**
* Gets a list of tags added to a node.
* @param nodeId ID of the target node
* @returns TagPaging object (defined in JSAPI) containing the tags
* @returns TagPaging object (defined in JS-API) containing the tags
*/
getTagsByNodeId(nodeId: string): any {
return from(this.apiService.getInstance().core.tagsApi.getNodeTags(nodeId)).pipe(
@@ -47,8 +47,8 @@ export class TagService {
/**
* Gets a list of all the tags already defined in the repository.
* @param opts Options supported by JSAPI
* @returns TagPaging object (defined in JSAPI) containing the tags
* @param opts Options supported by JS-API
* @returns TagPaging object (defined in JS-API) containing the tags
*/
getAllTheTags(opts?: any): Observable<TagPaging> {
return from(this.apiService.getInstance().core.tagsApi.getTags(opts))
@@ -59,7 +59,7 @@ export class TagService {
* Adds a tag to a node.
* @param nodeId ID of the target node
* @param tagName Name of the tag to add
* @returns TagEntry object (defined in JSAPI) with details of the new tag
* @returns TagEntry object (defined in JS-API) with details of the new tag
*/
addTag(nodeId: string, tagName: string): any {
const alfrescoApi: any = this.apiService.getInstance();

View File

@@ -149,7 +149,7 @@ describe('UploadBase', () => {
});
describe('filesize', () => {
describe('fileSize', () => {
const files: File[] = [
<File> { name: 'bigFile.png', size: 1000 },
@@ -353,7 +353,7 @@ describe('UploadBase', () => {
let addToQueueSpy;
const files: File[] = [
<File> { name: 'process.pbmn' }
<File> { name: 'process.bpmn' }
];
beforeEach(() => {

View File

@@ -27,7 +27,7 @@ describe('FileUploadingDialogComponent', () => {
let uploadService: UploadService;
let component: FileUploadingDialogComponent;
let emitter: EventEmitter<any>;
let filelist: FileModel[];
let fileList: FileModel[];
setupTestBed({
imports: [
@@ -48,7 +48,7 @@ describe('FileUploadingDialogComponent', () => {
uploadService.clearQueue();
emitter = new EventEmitter();
filelist = [
fileList = [
new FileModel(<File> { name: 'fake-name', size: 10 }),
new FileModel(<File> { name: 'fake-name2', size: 10 })
];
@@ -65,14 +65,14 @@ describe('FileUploadingDialogComponent', () => {
});
it('should open dialog when uploading list is not empty', () => {
uploadService.addToQueue(...filelist);
uploadService.addToQueue(...fileList);
uploadService.uploadFilesInTheQueue(emitter);
expect(component.isDialogActive).toBe(true);
});
it('should update uploading file list', () => {
uploadService.addToQueue(...filelist);
uploadService.addToQueue(...fileList);
uploadService.uploadFilesInTheQueue(emitter);
expect(component.filesUploadingList.length).toBe(2);
@@ -204,7 +204,7 @@ describe('FileUploadingDialogComponent', () => {
});
it('should reset upload queue', () => {
uploadService.addToQueue(...filelist);
uploadService.addToQueue(...fileList);
uploadService.uploadFilesInTheQueue(emitter);
component.close();

View File

@@ -54,7 +54,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
private errorSubscription: Subscription;
constructor(private uploadService: UploadService,
private changeDetecor: ChangeDetectorRef) {
private changeDetector: ChangeDetectorRef) {
}
ngOnInit() {
@@ -73,18 +73,18 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
)
.subscribe((event: (FileUploadDeleteEvent | FileUploadCompleteEvent)) => {
this.totalCompleted = event.totalComplete;
this.changeDetecor.detectChanges();
this.changeDetector.detectChanges();
});
this.errorSubscription = this.uploadService.fileUploadError
.subscribe((event: FileUploadErrorEvent) => {
this.totalErrors = event.totalError;
this.changeDetecor.detectChanges();
this.changeDetector.detectChanges();
});
this.fileUploadSubscription = this.uploadService
.fileUpload.subscribe(() => {
this.changeDetecor.detectChanges();
this.changeDetector.detectChanges();
});
this.uploadService.fileDeleted.subscribe((objId) => {
@@ -94,7 +94,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
});
if (file) {
file.status = FileUploadStatus.Cancelled;
this.changeDetecor.detectChanges();
this.changeDetector.detectChanges();
}
}
});
@@ -112,7 +112,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
}
/**
* Cancel uploads and hide confiramtion
* Cancel uploads and hide confirmation
*/
cancelAllUploads() {
this.toggleConfirmation();
@@ -125,7 +125,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
*/
toggleMinimized(): void {
this.isDialogMinimized = !this.isDialogMinimized;
this.changeDetecor.detectChanges();
this.changeDetector.detectChanges();
}
/**
@@ -139,7 +139,7 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
this.isDialogActive = false;
this.isDialogMinimized = false;
this.uploadService.clearQueue();
this.changeDetecor.detectChanges();
this.changeDetector.detectChanges();
}
ngOnDestroy() {

View File

@@ -249,7 +249,7 @@ describe('FileUploadingListComponent', () => {
expect(component.isUploadCancelled()).toBe(false);
});
it('should return false when there is at leat one file in progress', () => {
it('should return false when there is at least one file in progress', () => {
component.files = <any> [
{ status: FileUploadStatus.Progress },
{ status: FileUploadStatus.Error },
@@ -259,7 +259,7 @@ describe('FileUploadingListComponent', () => {
expect(component.isUploadCancelled()).toBe(false);
});
it('should return false when there is at leat one file in pendding', () => {
it('should return false when there is at least one file in pending', () => {
component.files = <any> [
{ status: FileUploadStatus.Pending },
{ status: FileUploadStatus.Error },

View File

@@ -215,7 +215,7 @@ describe('UploadButtonComponent', () => {
expect(compiled.querySelector('#uploadFolder-label-static').textContent).toEqual('test-text');
});
describe('filesize', () => {
describe('fileSize', () => {
const files: File[] = [
<File> { name: 'bigFile.png', size: 1000 },

View File

@@ -84,7 +84,7 @@ export class UploadDragAreaComponent extends UploadBase implements NodePermissio
*/
onFolderEntityDropped(folder: any): void {
if (!this.disabled && folder.isDirectory) {
FileUtils.flattern(folder).then(filesInfo => {
FileUtils.flatten(folder).then(filesInfo => {
this.uploadFilesInfo(filesInfo);
});
}

View File

@@ -31,7 +31,7 @@ describe('FileDraggableDirective', () => {
expect(component.enabled).toBeTruthy();
});
it('should not allow drad and drop when disabled', () => {
it('should not allow drag and drop when disabled', () => {
component.enabled = false;
let event = new CustomEvent('custom-event');
spyOn(event, 'preventDefault').and.stub();

View File

@@ -36,7 +36,7 @@ import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core
* @InputParam {string} servicePath path where Web Script service is mapped default value 'service'
* @InputParam {string} contentType JSON | HTML | DATATABLE | TEXT
*
* @Output - success - The event is emitted when the data are recived
* @Output - success - The event is emitted when the data are received
*
*/
@Component({
@@ -91,13 +91,13 @@ export class WebscriptComponent implements OnChanges {
}
return new Promise((resolve, reject) => {
this.apiService.getInstance().webScript.executeWebScript('GET', this.scriptPath, this.scriptArgs, this.contextRoot, this.servicePath).then((webScriptdata) => {
this.apiService.getInstance().webScript.executeWebScript('GET', this.scriptPath, this.scriptArgs, this.contextRoot, this.servicePath).then((webScriptData) => {
this.data = webScriptdata;
this.data = webScriptData;
if (this.showData) {
if (this.contentType === 'DATATABLE') {
this.data = this.showDataAsDataTable(webScriptdata);
this.data = this.showDataAsDataTable(webScriptData);
}
}
@@ -116,7 +116,7 @@ export class WebscriptComponent implements OnChanges {
*
* @param data
*
* @retutns the data as datatable
* @returns the data as datatable
*/
showDataAsDataTable(data: any) {
let datatableData: any = null;