|
|
|
@ -167,6 +167,8 @@ export class RuleChainPageComponent extends PageComponent |
|
|
|
ruleNodeSearch = ''; |
|
|
|
ruleNodeTypeSearch = this.fb.control('', {nonNullable: true}); |
|
|
|
|
|
|
|
ruleNodeTypeSearchFocus = false; |
|
|
|
|
|
|
|
ruleChain: RuleChain; |
|
|
|
ruleChainMetaData: RuleChainMetaData; |
|
|
|
|
|
|
|
@ -294,6 +296,10 @@ export class RuleChainPageComponent extends PageComponent |
|
|
|
).subscribe(() => this.updateRuleChainLibrary()); |
|
|
|
} |
|
|
|
|
|
|
|
focus(focus: boolean) { |
|
|
|
this.ruleNodeTypeSearchFocus = focus; |
|
|
|
} |
|
|
|
|
|
|
|
ngAfterViewChecked(){ |
|
|
|
this.changeDetector.detectChanges(); |
|
|
|
} |
|
|
|
@ -367,7 +373,7 @@ export class RuleChainPageComponent extends PageComponent |
|
|
|
if (!this.hotKeys.length) { |
|
|
|
this.hotKeys.push( |
|
|
|
new Hotkey('ctrl+a', (event: KeyboardEvent) => { |
|
|
|
if (this.enableHotKeys) { |
|
|
|
if (this.enableHotKeys && !this.ruleNodeTypeSearchFocus) { |
|
|
|
event.preventDefault(); |
|
|
|
this.ruleChainCanvas.modelService.selectAll(); |
|
|
|
return false; |
|
|
|
@ -378,7 +384,7 @@ export class RuleChainPageComponent extends PageComponent |
|
|
|
); |
|
|
|
this.hotKeys.push( |
|
|
|
new Hotkey('ctrl+c', (event: KeyboardEvent) => { |
|
|
|
if (this.enableHotKeys) { |
|
|
|
if (this.enableHotKeys && !this.ruleNodeTypeSearchFocus) { |
|
|
|
event.preventDefault(); |
|
|
|
this.copyRuleNodes(); |
|
|
|
return false; |
|
|
|
@ -389,7 +395,7 @@ export class RuleChainPageComponent extends PageComponent |
|
|
|
); |
|
|
|
this.hotKeys.push( |
|
|
|
new Hotkey('ctrl+v', (event: KeyboardEvent) => { |
|
|
|
if (this.enableHotKeys) { |
|
|
|
if (this.enableHotKeys && !this.ruleNodeTypeSearchFocus) { |
|
|
|
event.preventDefault(); |
|
|
|
if (this.itembuffer.hasRuleNodes()) { |
|
|
|
this.pasteRuleNodes(); |
|
|
|
@ -436,7 +442,7 @@ export class RuleChainPageComponent extends PageComponent |
|
|
|
); |
|
|
|
this.hotKeys.push( |
|
|
|
new Hotkey('del', (event: KeyboardEvent) => { |
|
|
|
if (this.enableHotKeys) { |
|
|
|
if (this.enableHotKeys && !this.ruleNodeTypeSearchFocus) { |
|
|
|
event.preventDefault(); |
|
|
|
this.ruleChainCanvas.modelService.deleteSelected(); |
|
|
|
return false; |
|
|
|
|