File

src/smart-developer-tools/file-info/file-info.component.ts

Extends

AbstractFormChild

Implements

OnInit AfterViewInit

Metadata

Index

Properties
Methods
Inputs

Constructor

constructor(serviceAdapter: SmartServiceAdapter, smartHttp: SmartHttpService, injector: Injector)
Parameters :
Name Type Optional
serviceAdapter SmartServiceAdapter No
smartHttp SmartHttpService No
injector Injector No

Inputs

ignoreFlexboxLayout
Type : boolean
smart-help-text
Type : string | undefined

Sets the HelpText value for this form child.

smart-instance-name
Type : string

The instance name of the component

smart-object-name
Type : string

The object name of the component

Methods

click
click(event: unknown)
Parameters :
Name Type Optional
event unknown No
Returns : void
Public handleLayoutChange
handleLayoutChange(newLayout: any)
Parameters :
Name Type Optional
newLayout any No
Returns : void
searchFile
searchFile(fileName: string)
Parameters :
Name Type Optional
fileName string No
Returns : void
Public notifyLoadingFinished
notifyLoadingFinished(objectName: string)

Notifies the parent Smart Form that this form child has finished loading

Parameters :
Name Type Optional
objectName string No
Returns : void

void

Properties

container
Type : ElementRef<HTMLElement>
Decorators :
@ViewChild('container', {read: ElementRef})
fileInfo
Type : unknown
Default value : signal<FileProperty[]>([])
fileName
Type : unknown
Default value : signal<string>('')
searchResult
Type : unknown
Default value : signal<string>('')
Public serviceAdapter
Type : SmartServiceAdapter
Public injector
Type : Injector
<!--
**************************************************************************
* 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        : file-info.component.html
    Purpose     : Template for file info.
    Author(s)   : Oana Sucigan
    Created     : Nov 27, 2020
--------------------------------------------------------------------------
-->
<div class="d-flex flex-column gap-2 h-100" #container>
  <kendo-formfield class="k-form-field form-field-label">
    <kendo-label [text]="'Filename'"></kendo-label>
    <kendo-textbox 
      smart-widget
      [style.width.%]="100" 
      name="inputFileName" 
      id="inputFileName" 
      [ngModel]="fileName()" 
      #fileNameInput 
      (keydown.enter)="searchFile(fileNameInput.value)">
        <ng-template kendoTextBoxSuffixTemplate>
          <button kendoButton fillMode="flat" themeColor="base" (click)="searchFile(fileNameInput.value)" iconClass="fa-solid fa-magnifying-glass" class="smart-input-button">
          </button>
        </ng-template>
    </kendo-textbox>
  </kendo-formfield>

  <div class="d-flex gap-2 flex-wrap">
    <a (click)="click($event)" class="file-link">.restapplicationsettings</a>
    <a (click)="click($event)" class="file-link">.applicationsettings</a>
    <a (click)="click($event)" class="file-link">.classpath</a>
  </div>

  <kendo-formfield class="k-form-field form-field-label margin">
    <kendo-label [text]="'SEARCH()'"></kendo-label>
    <input 
      kendoTextBox 
      smart-widget
      [style.width.%]="100"
      name="inputSearch" 
      id="inputSearch" 
      #searchInput
      [ngModel]="searchResult()" 
      placeholder="Perform File search first" 
      readonly>
  </kendo-formfield>

    <kendo-grid [data]="fileInfo()" scrollable="scrollable">
      <kendo-grid-column field="Property" [headerStyle]="{'font-weight': 'bold'}">
        <ng-template kendoGridHeaderTemplate>
          Property
        </ng-template>
      </kendo-grid-column>
      <kendo-grid-column field="Value" [headerStyle]="{'font-weight': 'bold'}">
        <ng-template kendoGridHeaderTemplate>
          Value
        </ng-template>
      </kendo-grid-column>
    </kendo-grid>
</div>

./file-info.component.css

/**********************************************************************
 * 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        : file-info.component.css
    Purpose     : Styles for file info.
    Author(s)   : Oana Sucigan
    Created     : Nov 27, 2020
  ----------------------------------------------------------------------*/

.fill {
    width: 100%;
}

.margin {
    padding-top: 10px;
}

.file-link {
    cursor: pointer;
    margin-right: 5px;
}

::ng-deep label {
    font-weight: normal !important;
}

#file-search {
    display: flex;
    flex-direction: row;
}
#file-search input {
    flex-grow: 1;
}
#file-search button {
    flex-grow: 0;
    width: 30px;
}

#inputFileName {
    padding-right: 0px;
}

kendo-grid {
    flex: 1 1 0;
    min-height: 0;
    height: 0;
}

.file-info-item {
    margin-inline-end: 5px;
}

.file-info-item:last-child {
    padding-inline-end: 0px;
}

:host ::ng-deep .smart-input-button.k-button,
:host ::ng-deep button.smart-input-button[kendoButton] {
    border: 0 !important;
    border-width: 0 !important;
    box-shadow: none !important;
    padding: 4px !important;
}

:host ::ng-deep kendo-textbox .k-input-suffix .k-button.smart-input-button {
    border: 0 !important;
    border-width: 0 !important;
    box-shadow: none !important;
    padding: 4px !important;
}

:host ::ng-deep .smart-input-button.k-button-md.k-button-flat.k-button-flat-base {
    border: 0 !important;
    border-width: 0 !important;
    box-shadow: none !important;
}

:host ::ng-deep .k-button-md.k-icon-button {
    padding: 4px !important;
}

:host ::ng-deep .k-button-md.k-icon-button .k-button-icon {
    min-height: unset !important;
    height: unset !important;
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""