src/app/dialogs/create-label-dialog/create-edit-label-dialog.component.ts
This dialog creates or edits a label.
See CreateEditLabelDialogData for parameters.
selector | app-create-edit-label-dialog-component |
styleUrls | ./create-edit-label-dialog.component.scss |
templateUrl | ./create-edit-label-dialog.component.html |
Properties |
Methods |
constructor(dialog: MatDialogRef<CreateEditLabelDialogComponent | Label>, dataService: DataService, data: CreateEditLabelDialogData, notify: UserNotifyService)
|
|||||||||||||||
Parameters :
|
onConfirmClick |
onConfirmClick(name: string, description?: string)
|
When the user confirms their changes, attempt to mutate and return with the label data.
Returns :
void
|
onLabelCancelClick |
onLabelCancelClick()
|
When the user cancels label creation or editing, close and return with null.
Returns :
void
|
randomizeColor |
randomizeColor()
|
Randomizes the label color.
Returns :
void
|
allComponentsList |
Type : ListId
|
Source list of all components. |
color |
Type : string
|
Default value : '#000000'
|
Color state. |
componentList |
Type : NodeId[] | ListId
|
Default value : []
|
Component list to be edited. For new labels, this is a list of node IDs. For existing labels, this is a ListId. |
Public data |
Type : CreateEditLabelDialogData
|
Decorators :
@Inject(MAT_DIALOG_DATA)
|
loading |
Default value : false
|
If true, the label that is to be edited is still loading. |
validationLabelDescription |
Default value : new FormControl('', CCIMSValidators.contentValidator)
|
Validator for the label description. |
validationLabelName |
Default value : new FormControl('', [Validators.required, Validators.maxLength(30)])
|
Validator for the label name. |
./create-edit-label-dialog.component.scss