src/lib/presets/presets.component.ts
| selector | talenra-presets |
| imports |
ButtonComponent
ScrollContainerComponent
CdkDropList
CdkDrag
TooltipDirective
FormsModule
ReactiveFormsModule
AccordionComponent
AsyncPipe
CdkDragHandle
TalenraInboxTranslatePipe
|
| styleUrls | ./presets.component.scss |
| templateUrl | ./presets.component.html |
Properties |
Methods |
Inputs |
Outputs |
| presetGroups |
Type : IPreset[]
|
| Required : true |
|
The incoming presetGroups to find with the activePresetName the necessary preset. |
| presetInteractions |
Type : string
|
|
EventEmitter for the interactions with the preset. |
| accessDeletePreset | ||||||||||||||||||||
accessDeletePreset(bool: boolean, groupName: string, presetName: string, event: MouseEvent)
|
||||||||||||||||||||
|
A button to confirm to delete of a preset is shown.
Parameters :
Returns :
void
|
| changeEditState | ||||||||||||
changeEditState(event: MouseEvent, nextState: boolean)
|
||||||||||||
|
Handling the change in the edit state if clicked on all elements except the text area.
Parameters :
Returns :
void
|
| changePresetVisibility | ||||||||||||||||||||
changePresetVisibility(bool: boolean, groupName: string, presetName: string, presetIdentifier: string)
|
||||||||||||||||||||
|
Check and save the visibility of the preset.
Parameters :
Returns :
void
|
| checkAndRenamePreset | ||||||||||||||||||||||||
checkAndRenamePreset(event: Event, group: string, optionName: string, inputText: string, presetIdentifier: string)
|
||||||||||||||||||||||||
|
Handling the enter press during the renaming of a preset.
Parameters :
Returns :
void
|
| clickTextAreaName | ||||||||||||||||
clickTextAreaName(event: MouseEvent, presetIndex: number, groupIndex: number)
|
||||||||||||||||
|
Handling of a click on the text area of a preset name. Stops propagation if the preset is currently edited.
Parameters :
Returns :
void
|
| deletePreset | ||||||||||||||||||||
deletePreset(groupName: string, presetName: string, presetIdentifier: string, event: MouseEvent)
|
||||||||||||||||||||
|
Delete presets and emit it to the presets.
Parameters :
Returns :
void
|
| getDisabledHiddenActions | ||||||||
getDisabledHiddenActions(groupIndex: number)
|
||||||||
|
Returns the disabled and hidden actions for the group.
Parameters :
Returns :
TInboxAccordionActions[]
|
| onAccordionAction | ||||||||||||
onAccordionAction(action: TInboxAccordionActions, group: IPreset)
|
||||||||||||
|
Handles the accordion action.
Parameters :
Returns :
void
|
| renamingPreset | ||||||||||||||||||||
renamingPreset(groupName: string, oldPresetName: string, newPresetName: string, presetIdentifier: string)
|
||||||||||||||||||||
|
To change the name of a preset and make only one preset editable.
Parameters :
Returns :
void
|
| setTextAreaAsEditable | ||||||||||||||||
setTextAreaAsEditable(groupIndex: number, presetIndex: number, event: Event)
|
||||||||||||||||
|
Presets are readonly by default. Only if the preset is edited, the preset is editable.
Parameters :
Returns :
void
|
| updatePresetGroupPosition | ||||||||||||||||
updatePresetGroupPosition(groupName: string, groupIdentifier: string, direction: "up" | "down")
|
||||||||||||||||
|
To change the array place of presets.
Parameters :
Returns :
void
|
| updatePresetPosition | ||||||||||||||||
updatePresetPosition(groupName: string, preset: IPreset, direction: "up" | "down")
|
||||||||||||||||
|
To change the array place of presets.
Parameters :
Returns :
void
|
| activePresetName |
Type : []
|
Default value : ['', '']
|
|
Name of the active preset. |
| dragAndDropDisabled |
Type : unknown
|
Default value : false
|
|
Value if the drag and drop is disabled, if the preset is edited through name change and deletion process. |
| editState |
Type : unknown
|
Default value : new BehaviorSubject(false)
|
|
BehaviorSubject for edit state if a preset is currently edited and the other should not be interactable. |
| indexOfPresetGroupInEditing |
Type : number
|
Default value : 0
|
|
The index of the group that is currently edited corresponding with the order in the presetGroups. |
| indexOfPresetInEditing |
Type : number
|
Default value : 0
|
|
The index of the preset that is currently edited corresponding with the order in the presetGroups. |
| originalPresetGroupNames |
Type : literal type[]
|
Default value : []
|
|
This array will store the extracted values from the presetGroups. |