C:/GoDev/src/TCSTK-Angular/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-app-configuration-widget/live-apps-app-configuration-widget.component.ts
Manages liveapps settings for Config page
<tcla-live-apps-app-configuration-widget></tcla-live-apps-app-configuration-widget>
selector | tcla-live-apps-app-configuration-widget |
styleUrls | ./live-apps-app-configuration-widget.component.css |
templateUrl | ./live-apps-app-configuration-widget.component.html |
Properties |
Methods |
Inputs |
Outputs |
constructor()
|
appIds | |
Type : string[]
|
|
The list of LA Application IDs you want to handle |
folderId | |
Type : string
|
|
The organisation folder to store/retrieve documents |
sandboxId | |
Type : number
|
|
sandboxId - this comes from claims resolver |
uiAppId | |
Type : string
|
|
The Application ID of the UI (should ideally be unique as it is shared state key) |
appSelected | |
Type : EventEmitter<CaseType>
|
|
~event appSelected : Case Type selected ~payload CaseType : CaseType object of app selected |
ngOnInit |
ngOnInit()
|
Returns :
void
|
handleConfigAppSelection |
Default value : () => {...}
|
handleConfigChanged |
Default value : () => {...}
|
Public selectedAppConfig |
Type : CaseType
|
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {CaseType} from '../../models/liveappsdata';
import {CaseCardConfig} from '../../models/tc-case-card-config';
/**
* Manages liveapps settings for Config page
*
*@example <tcla-live-apps-app-configuration-widget></tcla-live-apps-app-configuration-widget>
*/
@Component({
selector: 'tcla-live-apps-app-configuration-widget',
templateUrl: './live-apps-app-configuration-widget.component.html',
styleUrls: ['./live-apps-app-configuration-widget.component.css']
})
export class LiveAppsAppConfigurationWidgetComponent implements OnInit {
/**
* The list of LA Application IDs you want to handle
*/
@Input() appIds: string[];
/**
* sandboxId - this comes from claims resolver
*/
@Input() sandboxId: number;
/**
* The Application ID of the UI (should ideally be unique as it is shared state key)
*/
@Input() uiAppId: string;
/**
* The organisation folder to store/retrieve documents
*/
@Input() folderId: string;
/**
* ~event configChanged : Configuration values changed
* ~payload CaseCardConfig : CaseCardConfig object when configuration is changed (so called can do a save with data)
*/
@Output() configChanged: EventEmitter<CaseCardConfig> = new EventEmitter<CaseCardConfig>();
/**
* ~event appSelected : Case Type selected
* ~payload CaseType : CaseType object of app selected
*/
@Output() appSelected: EventEmitter<CaseType> = new EventEmitter<CaseType>();
public selectedAppConfig: CaseType;
constructor() { }
handleConfigAppSelection = (application: CaseType) => {
// handle selection of app to config
this.selectedAppConfig = application;
this.appSelected.emit(application);
}
handleConfigChanged = (caseCardConfig: CaseCardConfig) => {
this.configChanged.emit(caseCardConfig);
}
ngOnInit() {
}
}
<div fxFill style="margin: 0px 20px 20px 20px" fxLayout="column">
<div fxLayout="row" fxLayoutAlign="start center">
<span>Configure Live App Summary Cards for:</span>
<tcla-live-apps-applications style="margin-left: 5px; margin-top: -1px" [sandboxId]="sandboxId" [appIds]="appIds" [selectFirstApp]="true" (selection)="handleConfigAppSelection($event)"></tcla-live-apps-applications>
</div>
<div fxLayout="column" fxFlex style="overflow: auto">
<tcla-live-apps-application-configuration *ngIf="selectedAppConfig" [sandboxId]="sandboxId" [uiAppId]="uiAppId" [appId]="selectedAppConfig.applicationId" [folderId]="folderId" [appTypeLabel]="selectedAppConfig.label" (configChanged)="handleConfigChanged($event)"></tcla-live-apps-application-configuration>
</div>
</div>
./live-apps-app-configuration-widget.component.css