src/ui/file-picker/file-picker-dialog/explorer-file/explorer-file.component.ts
| changeDetection | ChangeDetectionStrategy.OnPush |
| selector | explorer-file |
| styleUrls | ./explorer-file.component.scss |
| templateUrl | ./explorer-file.component.html |
Properties |
Methods |
Inputs |
Outputs |
HostListeners |
| displayIcon |
Type : boolean
|
Default value : true
|
| node |
Type : SmartFilePickerFile
|
| dblClick |
Type : EventEmitter<void>
|
| onSave |
Type : EventEmitter<void>
|
| keydown | ||||||
Arguments : '$event'
|
||||||
keydown(event: KeyboardEvent)
|
||||||
|
Handle the keydown event
Parameters :
|
| formatSize | ||||||||
formatSize(size: number)
|
||||||||
|
Format the size of the file
Parameters :
Returns :
string
The formatted size |
| onKeyDown | ||||||||
onKeyDown(event: KeyboardEvent)
|
||||||||
Decorators :
@HostListener('keydown', ['$event'])
|
||||||||
|
Handle the keydown event
Parameters :
Returns :
void
|
| save |
save()
|
|
Save the file
Returns :
void
|
| 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;
}