@alfresco/adf-core
Version:
64 lines (63 loc) • 3.33 kB
TypeScript
/*!
* @license
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* 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 { ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core';
import { CardViewTextItemModel } from '../../models/card-view-textitem.model';
import { BaseCardView } from '../base-card-view';
import { MatChipInputEvent } from '@angular/material/chips';
import { ClipboardService } from '../../../clipboard/clipboard.service';
import { TranslationService } from '../../../translation/translation.service';
import { CardViewItemValidator } from '../../interfaces/card-view-item-validator.interface';
import { UntypedFormControl } from '@angular/forms';
import * as i0 from "@angular/core";
export declare const DEFAULT_SEPARATOR = ", ";
export declare class CardViewTextItemComponent extends BaseCardView<CardViewTextItemModel> implements OnChanges {
private clipboardService;
private translateService;
private cd;
displayEmpty: boolean;
copyToClipboardAction: boolean;
useChipsForMultiValueProperty: boolean;
multiValueSeparator: string;
displayLabelForChips: boolean;
editedValue: string | string[];
errors: CardViewItemValidator[];
templateType: string;
textInput: UntypedFormControl;
private readonly destroyRef;
constructor(clipboardService: ClipboardService, translateService: TranslationService, cd: ChangeDetectorRef);
ngOnChanges(changes: SimpleChanges): void;
private setTemplateType;
resetValue(): void;
private resetErrorMessages;
update(): void;
prepareValueForUpload(property: CardViewTextItemModel, value: string | string[]): string | string[];
removeValueFromList(itemIndex: number): void;
addValueToList(newListItem: MatChipInputEvent): void;
clicked(): void;
clearValue(): void;
copyToClipboard(valueToCopy: string): void;
undoText(event: KeyboardEvent): void;
get showProperty(): boolean;
get showClickableIcon(): boolean;
get isClickable(): boolean;
get hasErrors(): boolean;
get isChipViewEnabled(): boolean;
get showLabelForChips(): boolean;
private prepareIntLongValue;
static ɵfac: i0.ɵɵFactoryDeclaration<CardViewTextItemComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<CardViewTextItemComponent, "adf-card-view-textitem", never, { "displayEmpty": { "alias": "displayEmpty"; "required": false; }; "copyToClipboardAction": { "alias": "copyToClipboardAction"; "required": false; }; "useChipsForMultiValueProperty": { "alias": "useChipsForMultiValueProperty"; "required": false; }; "multiValueSeparator": { "alias": "multiValueSeparator"; "required": false; }; "displayLabelForChips": { "alias": "displayLabelForChips"; "required": false; }; }, {}, never, never, true, never>;
}