C:/GoDev/src/TCSTK-Angular/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-application-create-button/live-apps-application-create-button.component.ts
Special rendering of LiveAppsApplicationsComponent
<tcla-live-apps-application-create-button></tcla-live-apps-application-create-button>
selector | tcla-live-apps-application-create-button |
styleUrls | ./live-apps-application-create-button.component.css |
templateUrl | ./live-apps-application-create-button.component.html |
Properties |
|
Methods |
Inputs |
Outputs |
HostListeners |
Accessors |
createLabel | |
Type : string
|
|
appIds | |
Type : string[]
|
|
Inherited from
LiveAppsApplicationsComponent
|
|
Defined in
LiveAppsApplicationsComponent:34
|
|
The list of LA Application IDs you want to handle |
formFieldRendering | |
Type : boolean
|
|
Inherited from
LiveAppsApplicationsComponent
|
|
Defined in
LiveAppsApplicationsComponent:55
|
label | |
Type : string
|
|
Inherited from
LiveAppsApplicationsComponent
|
|
Defined in
LiveAppsApplicationsComponent:71
|
sandboxId | |
Type : number
|
|
Inherited from
LiveAppsApplicationsComponent
|
|
Defined in
LiveAppsApplicationsComponent:29
|
|
sandboxId - this comes from claims resolver |
selectedApp | |
Inherited from
LiveAppsApplicationsComponent
|
|
Defined in
LiveAppsApplicationsComponent:45
|
selectedAppId | |
Type : string
|
|
Inherited from
LiveAppsApplicationsComponent
|
|
Defined in
LiveAppsApplicationsComponent:65
|
|
Pre-select specified appId |
selectFirstApp | |
Type : boolean
|
|
Inherited from
LiveAppsApplicationsComponent
|
|
Defined in
LiveAppsApplicationsComponent:39
|
|
Whether to auto select the first app in dropdown selector (eg search) |
selection | |
Type : EventEmitter<CaseType>
|
|
Inherited from
LiveAppsApplicationsComponent
|
|
Defined in
LiveAppsApplicationsComponent:81
|
|
~event selection : Value selected in child component ~payload CaseType : type varies. but is when something is selected in a drop down it is passed back to the caller |
window:resize |
Arguments : '$event'
|
window:resize(event)
|
Inherited from
LiveAppsComponent
|
Defined in
LiveAppsComponent:45
|
ngOnInit |
ngOnInit()
|
Inherited from
LiveAppsApplicationsComponent
|
Defined in
LiveAppsApplicationsComponent:128
|
Returns :
void
|
ngAfterViewInit |
ngAfterViewInit()
|
Inherited from
LiveAppsComponent
|
Defined in
LiveAppsComponent:91
|
Returns :
void
|
ngOnDestroy |
ngOnDestroy()
|
Inherited from
LiveAppsComponent
|
Defined in
LiveAppsComponent:99
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Inherited from
LiveAppsComponent
|
Defined in
LiveAppsComponent:104
|
Returns :
void
|
setupWidthObserver |
setupWidthObserver()
|
Inherited from
LiveAppsComponent
|
Defined in
LiveAppsComponent:70
|
Returns :
void
|
Public createLabel |
Type : string
|
Default value : 'Create Case'
|
Public handleCreateCaseClick |
Default value : () => {...}
|
Public handleCreatorAppSelection |
Default value : () => {...}
|
applications |
Type : CaseTypesList
|
Default value : new CaseTypesList()
|
Inherited from
LiveAppsApplicationsComponent
|
Defined in
LiveAppsApplicationsComponent:83
|
changeAppSelection |
Default value : () => {...}
|
Inherited from
LiveAppsApplicationsComponent
|
Defined in
LiveAppsApplicationsComponent:91
|
Public compareProcessId |
Default value : () => {...}
|
Inherited from
LiveAppsApplicationsComponent
|
Defined in
LiveAppsApplicationsComponent:124
|
errorMessage |
Type : string
|
Inherited from
LiveAppsApplicationsComponent
|
Defined in
LiveAppsApplicationsComponent:85
|
Public formFieldRendering |
Type : boolean
|
Default value : false
|
Inherited from
LiveAppsApplicationsComponent
|
Defined in
LiveAppsApplicationsComponent:54
|
Use Form field rendering around the selection box |
Public label |
Type : string
|
Default value : 'Applications'
|
Inherited from
LiveAppsApplicationsComponent
|
Defined in
LiveAppsApplicationsComponent:70
|
Label for the application selector |
Public refresh |
Default value : () => {...}
|
Inherited from
LiveAppsApplicationsComponent
|
Defined in
LiveAppsApplicationsComponent:102
|
selectApplication |
Default value : () => {...}
|
Inherited from
LiveAppsApplicationsComponent
|
Defined in
LiveAppsApplicationsComponent:97
|
Public selectedApp |
Type : CaseType
|
Default value : new CaseType()
|
Inherited from
LiveAppsApplicationsComponent
|
Defined in
LiveAppsApplicationsComponent:44
|
Application selected from dropdown (output) |
Protected _destroyed$ |
Default value : new Subject()
|
Inherited from
LiveAppsComponent
|
Defined in
LiveAppsComponent:39
|
componentChildDivs |
Type : LiveAppsComponent[]
|
Decorators :
@ViewChildren('componentChildDiv')
|
Inherited from
LiveAppsComponent
|
Defined in
LiveAppsComponent:36
|
componentDiv |
Type : ElementRef
|
Decorators :
@ViewChild('componentDiv', {static: false})
|
Inherited from
LiveAppsComponent
|
Defined in
LiveAppsComponent:35
|
Protected containerChanges$ |
Type : Observable<TcComponent>
|
Inherited from
LiveAppsComponent
|
Defined in
LiveAppsComponent:40
|
Private observer |
Inherited from
LiveAppsComponent
|
Defined in
LiveAppsComponent:42
|
Public resize |
Default value : () => {...}
|
Inherited from
LiveAppsComponent
|
Defined in
LiveAppsComponent:56
|
Public widget |
Type : TcComponent
|
Inherited from
LiveAppsComponent
|
Defined in
LiveAppsComponent:41
|
CreateLabel | ||||||
setCreateLabel(createLabel: string)
|
||||||
Parameters :
Returns :
void
|
import {Component, Input, OnInit} from '@angular/core';
import {LiveAppsApplicationsComponent} from '../live-apps-applications/live-apps-applications.component';
import {CaseType} from '../../models/liveappsdata';
/**
* Special rendering of LiveAppsApplicationsComponent
*
* ![alt-text](../live-apps-application-create-button.png "Image")
*
*@example <tcla-live-apps-application-create-button></tcla-live-apps-application-create-button>
*/
@Component({
selector: 'tcla-live-apps-application-create-button',
templateUrl: './live-apps-application-create-button.component.html',
styleUrls: ['./live-apps-application-create-button.component.css']
})
export class LiveAppsApplicationCreateButtonComponent extends LiveAppsApplicationsComponent {
public createLabel: string = 'Create Case';
@Input('createLabel') set CreateLabel(createLabel: string) {
if (createLabel){
this.createLabel = createLabel;
}
}
public handleCreatorAppSelection = (application: CaseType) => {
this.selection.emit(application);
}
public handleCreateCaseClick = () => {
// console.log('Select Case: ' + this.applications.casetypes.length);
if (this.applications.casetypes.length === 1) {
// Open Case Directly
// console.log('Opening Case Directly...');
this.handleCreatorAppSelection(this.applications.casetypes[0]);
}
}
}
<button mat-button [matMenuTriggerFor]="creatorApplicationMenu" (click)="handleCreateCaseClick()">
<mat-icon [svgIcon]="'tcs-case-start-icon'"></mat-icon>
<span class="tcs-case-create-button-text">{{createLabel}}</span>
</button>
<mat-menu #creatorApplicationMenu="matMenu">
<button mat-menu-item *ngFor="let application of applications.casetypes" (click)="handleCreatorAppSelection(application)">{{application.applicationName}}</button>
</mat-menu>
./live-apps-application-create-button.component.css
.tcs-case-create-button-text {
font-family: Source Sans Pro;
font-size: 18px;
font-weight: 600;
font-style: normal;
font-stretch: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
color: #0081cb;
}