<commit_before>import {
  ChangeDetectorRef,
  Component,
  ViewChild,
  OnInit,
  OnDestroy,
} from '@angular/core';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { Subscription } from 'rxjs/Subscription';

import { DocumentDefinition } from 'syndesis.data.mapper';
import { MappingDefinition } from 'syndesis.data.mapper';
import { ConfigModel } from 'syndesis.data.mapper';
import { MappingModel } from 'syndesis.data.mapper';

import { InitializationService } from 'syndesis.data.mapper';
import { ErrorHandlerService } from 'syndesis.data.mapper';
import { DocumentManagementService } from 'syndesis.data.mapper';
import { MappingManagementService } from 'syndesis.data.mapper';
import { MappingSerializer } from 'syndesis.data.mapper';

import { DataMapperAppComponent } from 'syndesis.data.mapper';

import { ConfigService } from '../../../../config.service';
import { IntegrationSupportService } from '../../../../store/integration-support.service';

import { CurrentFlow, FlowEvent } from '../../current-flow.service';
import { FlowPage } from '../../flow-page';

import { Step, DataShape, TypeFactory } from '../../../../model';

import { log, getCategory } from '../../../../logging';

/*
 * Example host component:
 *
 * https://github.com/atlasmap/atlasmap-ui/blob/master/src/app/lib/syndesis-data-mapper/components/data.mapper.example.host.component.ts
 */

const category = getCategory('data-mapper');

const MAPPING_KEY = 'atlasmapping';

@Component({
  selector: 'syndesis-data-mapper-host',
  template: `
    <div *ngIf="initialized" class="data-mapper-host">
      <data-mapper #dataMapperComponent></data-mapper>
    </div>
  `,
  styles: [
    `.data-mapper-host {
        /* TODO probably a better way to set this height to the viewport */
        height: calc(100vh - 140px);
      }
    `,
  ],
  providers: [
    InitializationService,
    ConfigService,
    MappingManagementService,
    ErrorHandlerService,
    DocumentManagementService,
  ],
})
export class DataMapperHostComponent extends FlowPage
  implements OnInit, OnDestroy {
  routeSubscription: Subscription;
  position: number;
  initialized = false;
  sourceDocTypes = [];
  targetDocTypes = [];

  @ViewChild('dataMapperComponent')
  public dataMapperComponent: DataMapperAppComponent;
<commit_msg>fix(datamapper): src/config.json is ignored for datamapper URL<commit_after>import {
  ChangeDetectorRef,
  Component,
  ViewChild,
  OnInit,
  OnDestroy,
} from '@angular/core';
import { ActivatedRoute, Params, Router } from '@angular/router';
import { Subscription } from 'rxjs/Subscription';

import { DocumentDefinition } from 'syndesis.data.mapper';
import { MappingDefinition } from 'syndesis.data.mapper';
import { ConfigModel } from 'syndesis.data.mapper';
import { MappingModel } from 'syndesis.data.mapper';

import { InitializationService } from 'syndesis.data.mapper';
import { ErrorHandlerService } from 'syndesis.data.mapper';
import { DocumentManagementService } from 'syndesis.data.mapper';
import { MappingManagementService } from 'syndesis.data.mapper';
import { MappingSerializer } from 'syndesis.data.mapper';

import { DataMapperAppComponent } from 'syndesis.data.mapper';

import { ConfigService } from '../../../../config.service';
import { IntegrationSupportService } from '../../../../store/integration-support.service';

import { CurrentFlow, FlowEvent } from '../../current-flow.service';
import { FlowPage } from '../../flow-page';

import { Step, DataShape, TypeFactory } from '../../../../model';

import { log, getCategory } from '../../../../logging';

/*
 * Example host component:
 *
 * https://github.com/atlasmap/atlasmap-ui/blob/master/src/app/lib/syndesis-data-mapper/components/data.mapper.example.host.component.ts
 */

const category = getCategory('data-mapper');

const MAPPING_KEY = 'atlasmapping';

@Component({
  selector: 'syndesis-data-mapper-host',
  template: `
    <div *ngIf="initialized" class="data-mapper-host">
      <data-mapper #dataMapperComponent></data-mapper>
    </div>
  `,
  styles: [
    `.data-mapper-host {
        /* TODO probably a better way to set this height to the viewport */
        height: calc(100vh - 140px);
      }
    `,
  ],
  providers: [
    InitializationService,
    MappingManagementService,
    ErrorHandlerService,
    DocumentManagementService,
  ],
})
export class DataMapperHostComponent extends FlowPage
  implements OnInit, OnDestroy {
  routeSubscription: Subscription;
  position: number;
  initialized = false;
  sourceDocTypes = [];
  targetDocTypes = [];

  @ViewChild('dataMapperComponent')
  public dataMapperComponent: DataMapperAppComponent;

{'fraction_non_alphanumeric': 0.14377682403433475, 'fraction_numerical': 0.002575107296137339, 'mean_word_length': 4.022629310344827, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '6545407', 'n_tokens_mistral': 1405, 'n_tokens_neox': 1396, 'n_words': 303}