mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[ACS-8468] Remove string array from copyToClipboard
This commit is contained in:
+2
-1
@@ -5,11 +5,12 @@
|
|||||||
<mat-form-field
|
<mat-form-field
|
||||||
class="adf-property-value"
|
class="adf-property-value"
|
||||||
(dblclick)="copyToClipboard(property.displayValue)"
|
(dblclick)="copyToClipboard(property.displayValue)"
|
||||||
[attr.data-automation-id]="'card-select-label-' + property.key"
|
[attr.data-automation-id]="'card-select-field-' + property.key"
|
||||||
[title]="'CORE.METADATA.ACTIONS.COPY_TO_CLIPBOARD' | translate"
|
[title]="'CORE.METADATA.ACTIONS.COPY_TO_CLIPBOARD' | translate"
|
||||||
>
|
>
|
||||||
<mat-label
|
<mat-label
|
||||||
class="adf-property-label"
|
class="adf-property-label"
|
||||||
|
[attr.data-automation-id]="'card-select-label-' + property.key"
|
||||||
[ngClass]="{
|
[ngClass]="{
|
||||||
'adf-property-value-editable': isEditable,
|
'adf-property-value-editable': isEditable,
|
||||||
'adf-property-readonly-value': isReadonlyProperty
|
'adf-property-readonly-value': isReadonlyProperty
|
||||||
|
|||||||
+1
-1
@@ -208,7 +208,7 @@ describe('CardViewSelectItemComponent', () => {
|
|||||||
component.ngOnChanges({});
|
component.ngOnChanges({});
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
testingUtils.doubleClickByDataAutomationId(`card-select-label-${component.property.key}`);
|
testingUtils.doubleClickByDataAutomationId(`card-select-field-${component.property.key}`);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
|
|
||||||
expect(clipboardService.copyContentToClipboard).toHaveBeenCalledWith('Two', 'CORE.METADATA.ACCESSIBILITY.COPY_TO_CLIPBOARD_MESSAGE');
|
expect(clipboardService.copyContentToClipboard).toHaveBeenCalledWith('Two', 'CORE.METADATA.ACCESSIBILITY.COPY_TO_CLIPBOARD_MESSAGE');
|
||||||
|
|||||||
+1
-1
@@ -194,7 +194,7 @@ export class CardViewSelectItemComponent extends BaseCardView<CardViewSelectItem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
copyToClipboard(valueToCopy: string | string[] | Observable<string>) {
|
copyToClipboard(valueToCopy: string | Observable<string>) {
|
||||||
if (this.copyToClipboardAction) {
|
if (this.copyToClipboardAction) {
|
||||||
if (isObservable(valueToCopy)) {
|
if (isObservable(valueToCopy)) {
|
||||||
valueToCopy.pipe(take(1)).subscribe((value) => {
|
valueToCopy.pipe(take(1)).subscribe((value) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user