Commit e85c47aebf5373dbe5630b9c2fa24d81f90f832d

Authored by Igor Kulikov
1 parent 74114de4

RuleChain UI

@@ -15,12 +15,70 @@ @@ -15,12 +15,70 @@
15 limitations under the License. 15 limitations under the License.
16 16
17 --> 17 -->
18 -<fc-canvas #fcCanvas  
19 - id="fc-target-canvas"  
20 - [model]="ruleChainModel"  
21 - (modelChanged)="onModelChanged()"  
22 - [selectedObjects]="selectedObjects"  
23 - [edgeStyle]="flowchartConstants.curvedStyle"  
24 - [automaticResize]="true"  
25 - [dragAnimation]="flowchartConstants.dragAnimationRepaint">  
26 -</fc-canvas> 18 +<div class="mat-content" fxFlex tb-fullscreen [fullscreen]="isFullscreen"
  19 + fxLayout="column" class="tb-rulechain">
  20 + <section class="tb-rulechain-container" fxFlex fxLayout="column">
  21 + <div class="tb-rulechain-layout" fxFlex fxLayout="row">
  22 + <section fxLayout="row"
  23 + class="tb-header-buttons tb-library-open" [fxShow]="!isLibraryOpen">
  24 + <button mat-button mat-icon-button color="primary"
  25 + class="tb-btn-header tb-btn-open-library mat-fab"
  26 + (click)="isLibraryOpen = true"
  27 + matTooltip="{{ 'rulenode.open-node-library' | translate }}"
  28 + matTooltipPosition="above">
  29 + <mat-icon>menu</mat-icon>
  30 + </button>
  31 + </section>
  32 + <mat-drawer-container style="width: 100%;">
  33 + <mat-drawer class="tb-rulechain-library"
  34 + disableClose="true"
  35 + mode="side"
  36 + [opened]="isLibraryOpen"
  37 + position="start"
  38 + fxLayout="column">
  39 + <mat-toolbar color="primary" class="tb-dark">
  40 + <div class="mat-toolbar-tools">
  41 + <button mat-button mat-icon-button class="tb-small"
  42 + matTooltip="{{'rulenode.search' | translate}}"
  43 + matTooltipPosition="above">
  44 + <mat-icon>search</mat-icon>
  45 + </button>
  46 + <mat-form-field fxFlex floatLabel="always">
  47 + <mat-label></mat-label>
  48 + <input matInput
  49 + [(ngModel)]="ruleNodeSearch"
  50 + placeholder="{{'rulenode.search' | translate}}"/>
  51 + </mat-form-field>
  52 + <button mat-button mat-icon-button class="tb-small"
  53 + [fxShow]="ruleNodeSearch !== ''"
  54 + (click)="ruleNodeSearch = ''"
  55 + matTooltip="{{'action.clear-search' | translate}}"
  56 + matTooltipPosition="above">
  57 + <mat-icon>close</mat-icon>
  58 + </button>
  59 + <button mat-button mat-icon-button class="tb-small"
  60 + (click)="isLibraryOpen = false"
  61 + matTooltip="{{'action.close' | translate}}"
  62 + matTooltipPosition="above">
  63 + <mat-icon>chevron_left</mat-icon>
  64 + </button>
  65 + </div>
  66 + </mat-toolbar>
  67 + </mat-drawer>
  68 + <mat-drawer-content>
  69 + <div class="tb-absolute-fill tb-rulechain-graph">
  70 + <fc-canvas #fcCanvas
  71 + id="tb-rulchain-canvas"
  72 + [model]="ruleChainModel"
  73 + (modelChanged)="onModelChanged()"
  74 + [selectedObjects]="selectedObjects"
  75 + [edgeStyle]="flowchartConstants.curvedStyle"
  76 + [automaticResize]="true"
  77 + [dragAnimation]="flowchartConstants.dragAnimationRepaint">
  78 + </fc-canvas>
  79 + </div>
  80 + </mat-drawer-content>
  81 + </mat-drawer-container>
  82 + </div>
  83 + </section>
  84 +</div>
@@ -13,7 +13,94 @@ @@ -13,7 +13,94 @@
13 * See the License for the specific language governing permissions and 13 * See the License for the specific language governing permissions and
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
  16 +
  17 +:host {
  18 + width: 100%;
  19 + height: 100%;
  20 + .tb-rulechain {
  21 + width: 100%;
  22 + height: 100%;
  23 + section.tb-header-buttons.tb-library-open {
  24 + position: absolute;
  25 + top: 0;
  26 + left: 0;
  27 + z-index: 2;
  28 + pointer-events: none;
  29 +
  30 + .mat-button.tb-btn-open-library {
  31 + top: 0;
  32 + left: 0;
  33 + width: 36px;
  34 + height: 36px;
  35 + margin: 4px 0 0 4px;
  36 + line-height: 36px;
  37 + opacity: .5;
  38 + }
  39 + }
  40 + .tb-rulechain-library {
  41 + z-index: 1;
  42 + width: 250px;
  43 + min-width: 250px;
  44 +
  45 + .mat-toolbar {
  46 + height: 48px;
  47 + min-height: 48px;
  48 + padding: 0;
  49 +
  50 + .mat-toolbar-tools {
  51 + height: 48px;
  52 + padding: 0 6px;
  53 + font-size: 14px;
  54 +
  55 + .mat-button.mat-icon-button {
  56 + margin: 0;
  57 +
  58 + &.tb-small {
  59 + width: 32px;
  60 + height: 32px;
  61 + min-height: 32px;
  62 + padding: 6px;
  63 + line-height: 20px;
  64 + mat-icon {
  65 + width: 20px;
  66 + min-width: 20px;
  67 + height: 20px;
  68 + min-height: 20px;
  69 + font-size: 20px;
  70 + line-height: 20px;
  71 + }
  72 + }
  73 + }
  74 + }
  75 + }
  76 + }
  77 + .tb-rulechain-graph {
  78 + z-index: 0;
  79 + }
  80 + }
  81 +}
  82 +
16 :host ::ng-deep { 83 :host ::ng-deep {
  84 + .tb-rulechain {
  85 + section.tb-header-buttons.tb-library-open {
  86 + .mat-fab {
  87 + .mat-button-wrapper {
  88 + padding: 0;
  89 + }
  90 + }
  91 + }
  92 + .tb-rulechain-library {
  93 + .mat-toolbar {
  94 + .mat-toolbar-tools {
  95 + .mat-form-field {
  96 + .mat-form-field-infix {
  97 + width: auto;
  98 + }
  99 + }
  100 + }
  101 + }
  102 + }
  103 + }
17 .fc-canvas { 104 .fc-canvas {
18 .fc-node { 105 .fc-node {
19 border-radius: 8px; 106 border-radius: 8px;