<commit_before>import { Component } from '@angular/core';
import * as _ from 'lodash';
import { JsonFormsControl } from '@jsonforms/angular';
import { NgRedux } from '@angular-redux/store';
import {
  ControlElement,
  ControlProps,
  Generate,
  JsonFormsState,
  mapDispatchToArrayControlProps,
  RankedTester,
  rankWith,
  resolveSchema,
  toDataPath,
  uiTypeIs
} from '@jsonforms/core';

const keywords = ['#', 'properties', 'items'];

export const removeSchemaKeywords = (path: string) => {
  return path.split('/').filter(s => !_.some(keywords, key => key === s)).join('.');
};

@Component({
  selector: 'jsonforms-list-with-detail-master',
  template: `
    <mat-sidenav-container class="container" [fxHide]="hidden">
        <mat-sidenav mode="side" opened>
          <mat-nav-list>
            <mat-list-item *ngIf="masterItems.length === 0">No items</mat-list-item>
            <mat-list-item
                *ngFor="let item of masterItems; let i = index; trackBy: trackElement"
                [class.selected]="item === selectedItem"
                (click)="onSelect(item, i)"
                (mouseover)="onListItemHover(i)"
                (mouseout)="onListItemHover(undefined)"
            >
                <a matLine>{{item.label}}</a>
                <button mat-icon-button
                        class="button hide"
                        (click)="onDeleteClick(item, i)"
                        [ngClass]="{'show': highlightedIdx == i}"
                >
                  <mat-icon mat-list-icon>delete</mat-icon>
                </button>
            </mat-list-item>
          </mat-nav-list>
           <button mat-fab color="primary" class="add-button" (click)="onAddClick()" >
               <mat-icon aria-label="Add item to list">add</mat-icon>
           </button>
        </mat-sidenav>
        <mat-sidenav-content class="content">
          <jsonforms-detail *ngIf="selectedItem" [item]="selectedItem"></jsonforms-detail>
        </mat-sidenav-content>
    </mat-sidenav-container>`,
  styles: [`
      .container {
        height: 100vh;
      }
      .content {
        padding: 15px;
      }
      .add-button {
        float: right;
        margin-top: 0.5em;
        margin-right: 0.25em;
      }
      .button {
        float: right;
        margin-right: 0.25em;
      }<commit_msg>Force the Background color of Angular Material Tree Content to be white<commit_after>import { Component } from '@angular/core';
import * as _ from 'lodash';
import { JsonFormsControl } from '@jsonforms/angular';
import { NgRedux } from '@angular-redux/store';
import {
  ControlElement,
  ControlProps,
  Generate,
  JsonFormsState,
  mapDispatchToArrayControlProps,
  RankedTester,
  rankWith,
  resolveSchema,
  toDataPath,
  uiTypeIs
} from '@jsonforms/core';

const keywords = ['#', 'properties', 'items'];

export const removeSchemaKeywords = (path: string) => {
  return path.split('/').filter(s => !_.some(keywords, key => key === s)).join('.');
};

@Component({
  selector: 'jsonforms-list-with-detail-master',
  template: `
    <mat-sidenav-container class="container" [fxHide]="hidden">
        <mat-sidenav mode="side" opened>
          <mat-nav-list>
            <mat-list-item *ngIf="masterItems.length === 0">No items</mat-list-item>
            <mat-list-item
                *ngFor="let item of masterItems; let i = index; trackBy: trackElement"
                [class.selected]="item === selectedItem"
                (click)="onSelect(item, i)"
                (mouseover)="onListItemHover(i)"
                (mouseout)="onListItemHover(undefined)"
            >
                <a matLine>{{item.label}}</a>
                <button mat-icon-button
                        class="button hide"
                        (click)="onDeleteClick(item, i)"
                        [ngClass]="{'show': highlightedIdx == i}"
                >
                  <mat-icon mat-list-icon>delete</mat-icon>
                </button>
            </mat-list-item>
          </mat-nav-list>
           <button mat-fab color="primary" class="add-button" (click)="onAddClick()" >
               <mat-icon aria-label="Add item to list">add</mat-icon>
           </button>
        </mat-sidenav>
        <mat-sidenav-content class="content">
          <jsonforms-detail *ngIf="selectedItem" [item]="selectedItem"></jsonforms-detail>
        </mat-sidenav-content>
    </mat-sidenav-container>`,
  styles: [`
      .container {
        height: 100vh;
      }
      .content {
        padding: 15px;
        background-color:#fff;
      }
      .add-button {
        float: right;
        margin-top: 0.5em;
        margin-right: 0.25em;
      }
      .button {
        float: right;
        margin-right: 0.25em;
      }
{'fraction_non_alphanumeric': 0.150410785759427, 'fraction_numerical': 0.005898462186644196, 'mean_word_length': 2.0632258064516127, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5449376', 'n_tokens_mistral': 1478, 'n_tokens_neox': 1416, 'n_words': 270}