File

src/ui/file-picker/file-picker-dialog/explorer-file/explorer-file.component.ts

Implements

OnInit AfterViewInit

Metadata

Index

Properties
Methods
Inputs
Outputs
HostListeners

Inputs

displayIcon
Type : boolean
Default value : true
node
Type : SmartFilePickerFile

Outputs

dblClick
Type : EventEmitter<void>
onSave
Type : EventEmitter<void>

HostListeners

keydown
Arguments : '$event'
keydown(event: KeyboardEvent)

Handle the keydown event

Parameters :
Name Optional Description
event No
  • The keydown event

Methods

formatSize
formatSize(size: number)

Format the size of the file

Parameters :
Name Type Optional Description
size number No
  • The size of the file
Returns : string

The formatted size

onKeyDown
onKeyDown(event: KeyboardEvent)
Decorators :
@HostListener('keydown', ['$event'])

Handle the keydown event

Parameters :
Name Type Optional Description
event KeyboardEvent No
  • The keydown event
Returns : void
save
save()

Save the file

Returns : void

Properties

displayDate
Type : string
displayName
Type : string
displaySize
Type : string
explorerFileNameTextBox
Type : TextBoxComponent
Decorators :
@ViewChild('explorerFileNameTextBox')
icon
Type : string
<!--
**************************************************************************
* Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") -                  *
* www.consultingwerk.com and other contributors as listed                *
* below. All Rights Reserved.                                            *
*                                                                        *
*  Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY        *
*   KIND, either express or implied.                                     *
*                                                                        *
*  Contributors:                                                         *
*                                                                        *
**************************************************************************

--------------------------------------------------------------------------
    File        : explorer-file.component.html
    Purpose     : Template for explorer file.
    Author(s)   : Radu Nicoara
    Created     : Apr 07, 2025
--------------------------------------------------------------------------
-->
<div
	class="explorer-file"
	(dblclick)="dblClick.emit()"
	[style.height]="'100%'"
	[style.width]="'100%'">
	<i [class]="icon + ' text-select-disabled'"></i>
	@if (!node?.isEditingName) {
		<span class="text-select-disabled">{{ displayName }}</span>
	} @else {
		<kendo-textbox
			[style.width]="'100%'"
			class="explorer-file-name-textbox"
			#explorerFileNameTextBox
			[(value)]="displayName">
			<ng-template kendoTextBoxSuffixTemplate>
				<kendo-textbox-separator></kendo-textbox-separator>
				<button kendoButton fillMode="flat" iconClass="fa-solid fa-floppy-disk" (click)="save()"></button>
			</ng-template>
		</kendo-textbox>
	}
</div>

./explorer-file.component.scss

/**********************************************************************
 * Copyright © 2006-2026 by Consultingwerk Ltd. ("CW") -              *
 * www.consultingwerk.com and other contributors as listed            *
 * below. All Rights Reserved.                                        *
 *                                                                    *
 *  Software is distributed on an "AS IS", WITHOUT WARRANTY OF ANY    *
 *   KIND, either express or implied.                                 *
 *                                                                    *
 *  Contributors:                                                     *
 *                                                                    *
 **********************************************************************/
/*------------------------------------------------------------------------
    File        : explorer-file.component.scss
    Purpose     : Styles for explorer file.
    Author(s)   : Radu Nicoara
    Created     : Apr 07, 2025
  ----------------------------------------------------------------------*/

:host {
	display: block;
}

.explorer-file {
	display: flex;
	gap: 5px;
	align-items: center;
	align-content: center;
	cursor: default;
}

.explorer-file-name-textbox {
	padding-right: 0px !important;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""