mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
Rebased to the latest
This commit is contained in:
parent
224b74dc79
commit
0ff29993f2
@ -122,6 +122,8 @@ describe('ContentNodeSelectorComponent', () => {
|
|||||||
fixture.destroy();
|
fixture.destroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const getTabInfoButton = () => fixture.debugElement.query(By.css('[data-automation-id="adf-content-node-selector-disabled-tab-info-icon"]'));
|
||||||
|
|
||||||
const enableLocalUpload = () => {
|
const enableLocalUpload = () => {
|
||||||
component.data.showLocalUploadButton = true;
|
component.data.showLocalUploadButton = true;
|
||||||
component.hasAllowableOperations = true;
|
component.hasAllowableOperations = true;
|
||||||
|
@ -21,11 +21,11 @@ import { of, Subject } from 'rxjs';
|
|||||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
import { ContentTestingModule } from '../testing/content.testing.module';
|
||||||
import { ContentTypeDialogComponent } from './content-type-dialog.component';
|
import { ContentTypeDialogComponent } from './content-type-dialog.component';
|
||||||
import { ContentTypeDialogComponentData } from './content-type-metadata.interface';
|
import { ContentTypeDialogComponentData } from './content-type-metadata.interface';
|
||||||
import { TypeEntry } from '@alfresco/js-api';
|
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatExpansionPanelHarness } from '@angular/material/expansion/testing';
|
import { MatExpansionPanelHarness } from '@angular/material/expansion/testing';
|
||||||
import { MatTableHarness } from '@angular/material/table/testing';
|
import { MatTableHarness } from '@angular/material/table/testing';
|
||||||
|
import { ContentTypeService } from './content-type.service';
|
||||||
|
|
||||||
const elementCustom: TypeEntry = {
|
const elementCustom: TypeEntry = {
|
||||||
entry: {
|
entry: {
|
||||||
|
@ -24,7 +24,7 @@ import { SearchChipAutocompleteInputComponent } from './search-chip-autocomplete
|
|||||||
import { DebugElement } from '@angular/core';
|
import { DebugElement } from '@angular/core';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatChipHarness, MatChipListHarness } from '@angular/material/chips/testing';
|
import { MatChipHarness, MatChipGridHarness } from '@angular/material/chips/testing';
|
||||||
import { MatAutocompleteHarness } from '@angular/material/autocomplete/testing';
|
import { MatAutocompleteHarness } from '@angular/material/autocomplete/testing';
|
||||||
import { MatOptionHarness } from '@angular/material/core/testing';
|
import { MatOptionHarness } from '@angular/material/core/testing';
|
||||||
|
|
||||||
@ -89,8 +89,8 @@ describe('SearchChipAutocompleteInputComponent', () => {
|
|||||||
* @returns list of chips
|
* @returns list of chips
|
||||||
*/
|
*/
|
||||||
async function getChipList(): Promise<MatChipHarness[]> {
|
async function getChipList(): Promise<MatChipHarness[]> {
|
||||||
const harness = await loader.getHarness(MatChipListHarness);
|
const harness = await loader.getHarness(MatChipGridHarness);
|
||||||
return harness.getChips();
|
return harness.getRows();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
import { TreeComponent } from './tree.component';
|
import { TreeComponent } from './tree.component';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { AlfrescoApiService, AlfrescoApiServiceMock, ContextMenuDirective, ContextMenuModule, IconModule, TranslationMock, TranslationService, UserPreferencesService } from '@alfresco/adf-core';
|
import { ContextMenuDirective, CoreTestingModule, UserPreferencesService } from '@alfresco/adf-core';
|
||||||
import { MatTreeModule } from '@angular/material/tree';
|
import { MatTreeModule } from '@angular/material/tree';
|
||||||
import { TreeNode, TreeNodeType } from '../models/tree-node.interface';
|
import { TreeNode, TreeNodeType } from '../models/tree-node.interface';
|
||||||
import {
|
import {
|
||||||
@ -67,24 +67,14 @@ describe('TreeComponent', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
TranslateModule.forRoot(),
|
CoreTestingModule,
|
||||||
HttpClientModule,
|
MatTreeModule
|
||||||
NoopAnimationsModule,
|
|
||||||
MatTreeModule,
|
|
||||||
MatIconModule,
|
|
||||||
MatMenuModule,
|
|
||||||
MatProgressSpinnerModule,
|
|
||||||
MatCheckboxModule,
|
|
||||||
IconModule,
|
|
||||||
ContextMenuModule
|
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
TreeComponent
|
TreeComponent
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
{ provide: TreeService, useClass: TreeServiceMock }
|
||||||
{ provide: TreeService, useClass: TreeServiceMock },
|
|
||||||
{ provide: TranslationService, useClass: TranslationMock }
|
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -2,19 +2,19 @@
|
|||||||
<div class="adf-property-value adf-card-view-array-item-container">
|
<div class="adf-property-value adf-card-view-array-item-container">
|
||||||
<ng-container *ngIf="(property.displayValue | async) as items; else elseEmptyValueBlock">
|
<ng-container *ngIf="(property.displayValue | async) as items; else elseEmptyValueBlock">
|
||||||
<mat-chip-listbox *ngIf="items.length > 0; else elseEmptyValueBlock" data-automation-id="card-arrayitem-chip-list-container">
|
<mat-chip-listbox *ngIf="items.length > 0; else elseEmptyValueBlock" data-automation-id="card-arrayitem-chip-list-container">
|
||||||
<ng-container *ngIf="displayCount() > 0; else withOutDisplayCount" >
|
<ng-container *ngIf="displayCount > 0; else withOutDisplayCount" >
|
||||||
<mat-chip-option
|
<mat-chip-option
|
||||||
*ngFor="let item of items.slice(0, displayCount())"
|
*ngFor="let item of items.slice(0, displayCount)"
|
||||||
(click)="clicked()"
|
(click)="clicked()"
|
||||||
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
|
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
|
||||||
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
|
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
|
||||||
<span>{{item?.value}}</span>
|
<span>{{item?.value}}</span>
|
||||||
</mat-chip-option>
|
</mat-chip-option>
|
||||||
<mat-chip-option
|
<mat-chip-option
|
||||||
*ngIf="items.length > displayCount()"
|
*ngIf="items.length > displayCount"
|
||||||
data-automation-id="card-arrayitem-more-chip"
|
data-automation-id="card-arrayitem-more-chip"
|
||||||
[matMenuTriggerFor]="menu">
|
[matMenuTriggerFor]="menu">
|
||||||
<span>{{items.length - displayCount()}} {{'CORE.CARDVIEW.MORE' | translate}}</span>
|
<span>{{items.length - displayCount}} {{'CORE.CARDVIEW.MORE' | translate}}</span>
|
||||||
</mat-chip-option>
|
</mat-chip-option>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #withOutDisplayCount>
|
<ng-template #withOutDisplayCount>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<mat-chip-listbox>
|
<mat-chip-listbox>
|
||||||
<mat-chip-option (click)="clicked()"
|
<mat-chip-option (click)="clicked()"
|
||||||
*ngFor="let item of items.slice(displayCount(), items.length)"
|
*ngFor="let item of items.slice(displayCount, items.length)"
|
||||||
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
|
[attr.data-automation-id]="'card-arrayitem-chip-' + item.value">
|
||||||
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
|
<mat-icon *ngIf="item?.icon" class="adf-array-item-icon">{{item.icon}}</mat-icon>
|
||||||
<span>{{item?.value}}</span>
|
<span>{{item?.value}}</span>
|
||||||
|
@ -1,16 +1,19 @@
|
|||||||
<div #nodeListContainer
|
<div
|
||||||
class="adf-dynamic-chip-list-container"
|
class="adf-dynamic-chip-list-container"
|
||||||
[class.adf-dynamic-chip-list-flex-column]="limitChipsDisplayed && (!calculationsDone || columnFlexDirection)"
|
[class.adf-dynamic-chip-list-flex-column]="limitChipsDisplayed && (!calculationsDone || columnFlexDirection)"
|
||||||
[class.adf-dynamic-chip-list-button-in-next-line]="moveLoadMoreButtonToNextRow"
|
[class.adf-dynamic-chip-list-button-in-next-line]="moveLoadMoreButtonToNextRow"
|
||||||
[class.adf-dynamic-chip-list-paginated]="paginationData">
|
[class.adf-dynamic-chip-list-paginated]="paginationData"
|
||||||
<mat-chip-list [class.adf-dynamic-chip-list-full-width]="limitChipsDisplayed && !calculationsDone"
|
#nodeListContainer>
|
||||||
role="listbox"
|
<mat-chip-listbox
|
||||||
[attr.aria-label]="'METADATA.BASIC.TAGS' | translate">
|
[class.adf-dynamic-chip-list-full-width]="limitChipsDisplayed && !calculationsDone"
|
||||||
<mat-chip *ngFor="let chip of chipsToDisplay; let idx = index"
|
role="listbox"
|
||||||
class="adf-dynamic-chip-list-chip"
|
[attr.aria-label]="'METADATA.BASIC.TAGS' | translate">
|
||||||
[style.border-radius]="roundUpChips ? '20px' : '10px'"
|
<mat-chip
|
||||||
[style.font-weight]="'bold'"
|
class="adf-dynamic-chip-list-chip"
|
||||||
(removed)="removedChip.emit(chip.id)">
|
*ngFor="let chip of chipsToDisplay; let idx = index"
|
||||||
|
[style.border-radius]="roundUpChips ? '20px' : '10px'"
|
||||||
|
[style.font-weight]="'bold'"
|
||||||
|
(removed)="removedChip.emit(chip.id)">
|
||||||
<span id="adf-dynamic-chip-list-chip-name-{{ idx }}">{{ chip.name }}</span>
|
<span id="adf-dynamic-chip-list-chip-name-{{ idx }}">{{ chip.name }}</span>
|
||||||
<mat-icon *ngIf="showDelete"
|
<mat-icon *ngIf="showDelete"
|
||||||
id="adf-dynamic-chip-list-delete-{{ chip.name }}"
|
id="adf-dynamic-chip-list-delete-{{ chip.name }}"
|
||||||
@ -19,15 +22,16 @@
|
|||||||
close
|
close
|
||||||
</mat-icon>
|
</mat-icon>
|
||||||
</mat-chip>
|
</mat-chip>
|
||||||
</mat-chip-list>
|
</mat-chip-listbox>
|
||||||
<button data-automation-id="adf-dynamic-chip-list-view-more-button"
|
<button
|
||||||
class="adf-dynamic-chip-list-view-more-button"
|
data-automation-id="adf-dynamic-chip-list-view-more-button"
|
||||||
mat-button
|
mat-button
|
||||||
[hidden]="!limitChipsDisplayed"
|
[hidden]="!limitChipsDisplayed"
|
||||||
[style.left.px]="viewMoreButtonLeftOffset"
|
[style.left.px]="viewMoreButtonLeftOffset"
|
||||||
[style.top.px]="viewMoreButtonTop"
|
[style.top.px]="viewMoreButtonTop"
|
||||||
[class.adf-dynamic-chip-list-hidden-btn]="!calculationsDone"
|
class="adf-dynamic-chip-list-view-more-button"
|
||||||
(click)="displayNextChips($event)">
|
[class.adf-dynamic-chip-list-hidden-btn]="!calculationsDone"
|
||||||
|
(click)="displayNextChips($event)">
|
||||||
{{
|
{{
|
||||||
paginationData ? ('DYNAMIC_CHIP_LIST.LOAD_MORE' | translate) :
|
paginationData ? ('DYNAMIC_CHIP_LIST.LOAD_MORE' | translate) :
|
||||||
('TAG_NODE_LIST.VIEW_MORE' | translate: { count: undisplayedChipsCount })
|
('TAG_NODE_LIST.VIEW_MORE' | translate: { count: undisplayedChipsCount })
|
||||||
|
@ -289,7 +289,7 @@ describe('DynamicChipListComponent', () => {
|
|||||||
});
|
});
|
||||||
tick();
|
tick();
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
element.style.maxWidth = '309px';
|
element.style.maxWidth = '100px';
|
||||||
|
|
||||||
resizeCallback([], null);
|
resizeCallback([], null);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
"@alfresco/adf-content-services": ">=6.9.0",
|
"@alfresco/adf-content-services": ">=6.9.0",
|
||||||
"@apollo/client": "^3.7.2",
|
"@apollo/client": "^3.7.2",
|
||||||
"@ngx-translate/core": ">=14.0.0",
|
"@ngx-translate/core": ">=14.0.0",
|
||||||
"apollo-angular": ">=4.0.1",
|
"apollo-angular": "^4.0.1",
|
||||||
"subscriptions-transport-ws": ">=0.11.0"
|
"subscriptions-transport-ws": "^0.11.0"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"process-services-cloud",
|
"process-services-cloud",
|
||||||
|
19
package.json
19
package.json
@ -71,9 +71,6 @@
|
|||||||
"@angular/router": "15.2.10",
|
"@angular/router": "15.2.10",
|
||||||
"@apollo/client": "^3.10.2",
|
"@apollo/client": "^3.10.2",
|
||||||
"@cspell/eslint-plugin": "^7.3.6",
|
"@cspell/eslint-plugin": "^7.3.6",
|
||||||
"@editorjs/editorjs": "^2.26.5",
|
|
||||||
"@editorjs/header": "2.7.0",
|
|
||||||
"@editorjs/list": "1.8.0",
|
|
||||||
"@mat-datetimepicker/core": "11.0.3",
|
"@mat-datetimepicker/core": "11.0.3",
|
||||||
"@ngx-translate/core": "^14.0.0",
|
"@ngx-translate/core": "^14.0.0",
|
||||||
"@storybook/core-server": "^7.6.5",
|
"@storybook/core-server": "^7.6.5",
|
||||||
@ -108,10 +105,17 @@
|
|||||||
"@angular-eslint/template-parser": "16.2.0",
|
"@angular-eslint/template-parser": "16.2.0",
|
||||||
"@angular/cli": "15.2.10",
|
"@angular/cli": "15.2.10",
|
||||||
"@angular/compiler-cli": "15.2.10",
|
"@angular/compiler-cli": "15.2.10",
|
||||||
"@editorjs/code": "2.8.0",
|
"@editorjs/editorjs": "^2.29.0",
|
||||||
"@editorjs/inline-code": "1.4.0",
|
"@editorjs/code": "2.9.0",
|
||||||
"@editorjs/marker": "1.2.2",
|
"@editorjs/header": "2.8.1",
|
||||||
"@editorjs/underline": "^1.1.0",
|
"@editorjs/inline-code": "1.5.0",
|
||||||
|
"@editorjs/list": "1.9.0",
|
||||||
|
"@editorjs/marker": "1.4.0",
|
||||||
|
"@editorjs/underline": "1.1.0",
|
||||||
|
"editorjs-text-color-plugin": "2.0.4",
|
||||||
|
"editorjs-html": "3.4.3",
|
||||||
|
"editorjs-paragraph-with-alignment": "3.0.0",
|
||||||
|
"@quanzo/change-font-size": "1.0.0",
|
||||||
"@nrwl/angular": "15.9.3",
|
"@nrwl/angular": "15.9.3",
|
||||||
"@nrwl/cli": "15.9.3",
|
"@nrwl/cli": "15.9.3",
|
||||||
"@nrwl/eslint-plugin-nx": "15.9.3",
|
"@nrwl/eslint-plugin-nx": "15.9.3",
|
||||||
@ -120,7 +124,6 @@
|
|||||||
"@nrwl/workspace": "15.9.3",
|
"@nrwl/workspace": "15.9.3",
|
||||||
"@paperist/types-remark": "0.1.3",
|
"@paperist/types-remark": "0.1.3",
|
||||||
"@playwright/test": "^1.35.1",
|
"@playwright/test": "^1.35.1",
|
||||||
"@quanzo/change-font-size": "1.0.0",
|
|
||||||
"@schematics/angular": "15.2.10",
|
"@schematics/angular": "15.2.10",
|
||||||
"@storybook/addon-essentials": "6.5.16",
|
"@storybook/addon-essentials": "6.5.16",
|
||||||
"@storybook/angular": "6.5.16",
|
"@storybook/angular": "6.5.16",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user