conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
=======
export const fileListWrapperClass = style({
height: 'auto',
minHeight: '150px',
maxHeight: '400px',
paddingBottom: '40px',
overflow: 'hidden',
overflowY: 'scroll'
});
export const moveFileUpButtonStyle = style({
backgroundImage: 'var(--jp-icon-move-file-up)'
});
export const moveFileDownButtonStyle = style({
backgroundImage: 'var(--jp-icon-move-file-down)'
});
export const moveFileUpButtonSelectedStyle = style({
backgroundImage: 'var(--jp-icon-move-file-up-hover)'
});
export const moveFileDownButtonSelectedStyle = style({
backgroundImage: 'var(--jp-icon-move-file-down-hover)'
});
>>>>>>>
export const fileListWrapperClass = style({
height: 'auto',
minHeight: '150px',
maxHeight: '400px',
paddingBottom: '40px',
overflow: 'hidden',
overflowY: 'scroll'
}); |
<<<<<<<
=======
export const commitDetailFilePathStyle = style({
fontSize: 'var(--jp-ui-font-size1)',
marginRight: '4px',
paddingLeft: '4px',
textOverflow: 'ellipsis',
overflow: 'hidden',
whiteSpace: 'nowrap',
borderRadius: '2px',
flex: '1 1 auto'
});
>>>>>>>
<<<<<<<
export const warningLabel = style({
padding: '5px 1px 5px 0'
});
export const messageInput = style({
boxSizing: 'border-box',
width: '95%',
marginBottom: '7px'
});
export const button = style({
outline: 'none',
border: 'none',
color: 'var(--jp-layout-color0)'
});
export const resetDeleteDisabledButton = style({
backgroundColor: 'var(--jp-error-color2)'
});
export const resetDeleteButton = style({
backgroundColor: 'var(--jp-error-color1)'
});
export const cancelButton = style({
backgroundColor: 'var(--jp-layout-color4)',
marginRight: '4px'
});
=======
export const diffIconStyle = style({
backgroundColor: 'transparent',
backgroundPosition: 'center',
backgroundRepeat: 'no-repeat',
backgroundImage: 'var(--jp-icon-diff)',
border: 'none',
outline: 'none',
width: '2px'
});
export const revertButtonStyle = style({
backgroundImage: 'var(--jp-icon-rewind)',
marginLeft: '6px'
});
>>>>>>>
export const diffIconStyle = style({
backgroundColor: 'transparent',
backgroundPosition: 'center',
backgroundRepeat: 'no-repeat',
backgroundImage: 'var(--jp-icon-diff)',
border: 'none',
outline: 'none',
width: '2px'
});
export const revertButtonStyle = style({
backgroundImage: 'var(--jp-icon-rewind)',
marginLeft: '6px'
}); |
<<<<<<<
import { useCallback, useContext, useEffect, useRef, useState } from 'react';
=======
import {
useCallback,
useContext,
useEffect,
useState,
useRef,
useMemo,
} from 'react';
>>>>>>>
import {
useCallback,
useContext,
useEffect,
useRef,
useState,
useMemo,
} from 'react';
<<<<<<<
const isMounted = useRef(true);
const unsubscribe = useRef(noop);
=======
const unsubscribe = useRef(noop);
>>>>>>>
const isMounted = useRef(true);
const unsubscribe = useRef(noop);
<<<<<<<
unsubscribe.current = teardown;
}, [request.key]);
=======
unsubscribe.current = teardown;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [request.key, handler, client]);
>>>>>>>
unsubscribe.current = teardown;
}, [client, handler, request]);
<<<<<<<
return () => {
unsubscribe.current();
isMounted.current = false;
};
}, [request.key]);
=======
return unsubscribe.current;
}, [executeSubscription]);
>>>>>>>
return () => {
unsubscribe.current();
isMounted.current = false;
};
}, [executeSubscription, request.key]); |
<<<<<<<
import { Observable, Subject, Subscription as RxSubscription } from 'rxjs';
import { filter, take } from 'rxjs/operators';
=======
import { Observable, Subject, Subscription } from 'rxjs';
import { filter, publish, take } from 'rxjs/operators';
>>>>>>>
import { Observable, Subject, Subscription as RxSubscription } from 'rxjs';
import { filter, publish, take } from 'rxjs/operators';
<<<<<<<
const subject$ = subject.pipe(
=======
/** Main subject stream for listening to operation responses */
const subject$ = publish<ExchangeResult>()(
>>>>>>>
/** Main subject stream for listening to operation responses */
const subject$ = publish<ExchangeResult>()(
<<<<<<<
const instanceRxSubscriptions = getRxSubscriptions();
=======
const instanceSubscriptions = new Map(); // getSubscriptions();
>>>>>>>
const instanceRxSubscriptions = getRxSubscriptions();
<<<<<<<
})
);
instanceRxSubscriptions.set(inboundKey, inboundSub);
=======
});
});
instanceSubscriptions.set(inboundKey, inboundSub);
>>>>>>>
});
});
instanceRxSubscriptions.set(inboundKey, inboundSub);
<<<<<<<
const subs = getRxSubscriptions();
=======
const subs = getSubscriptions();
if (subs === undefined) {
return;
}
>>>>>>>
const subs = getRxSubscriptions();
if (subs === undefined) {
return;
} |
<<<<<<<
import { Observable, of, Subject } from 'rxjs';
import { map, mergeMap, tap } from 'rxjs/operators';
import { formatTypeNames, gankTypeNamesFromResponse } from '../lib';
import { Exchange, ExchangeResult, Operation, OperationType } from '../types';
=======
import { merge, Subject } from 'rxjs';
import { map, partition, share, tap } from 'rxjs/operators';
import { formatTypeNames, gankTypeNamesFromResponse } from '../lib/typenames';
import { Exchange, ExchangeResult, Operation } from '../types';
>>>>>>>
import { merge, Subject } from 'rxjs';
import { map, partition, share, tap } from 'rxjs/operators';
import { formatTypeNames, gankTypeNamesFromResponse } from '../lib/typenames';
import { Exchange, ExchangeResult, Operation, OperationType } from '../types';
<<<<<<<
const goForward = (stream: Observable<Operation>) =>
stream.pipe(
map(mapTypeNames),
forward,
tap(response => {
if (response.operation.operationName === OperationType.Mutation) {
handleAfterMutation(response);
} else if (response.operation.operationName === OperationType.Query) {
handleAfterQuery(response);
}
})
=======
const [cacheOps$, forwardOps$] = partition<Operation>(operation => {
return (
operation.operationName === 'query' && resultCache.has(operation.key)
>>>>>>>
const [cacheOps$, forwardOps$] = partition<Operation>(operation => {
return (
operation.operationName === OperationType.Query && resultCache.has(operation.key) |
<<<<<<<
// TODO: Rename this variable to uppercase?
// tslint:disable-next-line: variable-name
const combatTable_DEATH = "D";
=======
const COMBATTABLE_DEATH = "D";
>>>>>>>
const COMBATTABLE_DEATH = "D";
<<<<<<<
5: [ 0 , combatTable_DEATH],
6: [ 0 , combatTable_DEATH ]
=======
5: [ 0 , COMBATTABLE_DEATH],
6: [ 0 , COMBATTABLE_DEATH ],
>>>>>>>
5: [ 0 , COMBATTABLE_DEATH],
6: [ 0 , COMBATTABLE_DEATH ]
<<<<<<<
6: [ 0 , combatTable_DEATH ]
=======
6: [ 0 , COMBATTABLE_DEATH ],
>>>>>>>
6: [ 0 , COMBATTABLE_DEATH ]
<<<<<<<
15: [combatTable_DEATH, 0]
=======
15: [COMBATTABLE_DEATH, 0],
>>>>>>>
15: [COMBATTABLE_DEATH, 0]
<<<<<<<
14: [combatTable_DEATH, 0],
15: [combatTable_DEATH, 0]
=======
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0],
>>>>>>>
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0]
<<<<<<<
13: [combatTable_DEATH, 0],
14: [combatTable_DEATH, 0],
15: [combatTable_DEATH, 0]
=======
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0],
>>>>>>>
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0]
<<<<<<<
11: [combatTable_DEATH, 0],
12: [combatTable_DEATH, 0],
13: [combatTable_DEATH, 0],
14: [combatTable_DEATH, 0],
15: [combatTable_DEATH, 0]
=======
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0],
>>>>>>>
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0]
<<<<<<<
10: [combatTable_DEATH, 0],
11: [combatTable_DEATH, 0],
12: [combatTable_DEATH, 0],
13: [combatTable_DEATH, 0],
14: [combatTable_DEATH, 0],
15: [combatTable_DEATH, 0]
=======
10: [COMBATTABLE_DEATH, 0],
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0],
>>>>>>>
10: [COMBATTABLE_DEATH, 0],
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0]
<<<<<<<
9: [combatTable_DEATH, 0],
10: [combatTable_DEATH, 0],
11: [combatTable_DEATH, 0],
12: [combatTable_DEATH, 0],
13: [combatTable_DEATH, 0],
14: [combatTable_DEATH, 0],
15: [combatTable_DEATH, 0]
=======
9: [COMBATTABLE_DEATH, 0],
10: [COMBATTABLE_DEATH, 0],
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0],
>>>>>>>
9: [COMBATTABLE_DEATH, 0],
10: [COMBATTABLE_DEATH, 0],
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0]
<<<<<<<
8: [combatTable_DEATH, 0],
9: [combatTable_DEATH, 0],
10: [combatTable_DEATH, 0],
11: [combatTable_DEATH, 0],
12: [combatTable_DEATH, 0],
13: [combatTable_DEATH, 0],
14: [combatTable_DEATH, 0],
15: [combatTable_DEATH, 0]
=======
8: [COMBATTABLE_DEATH, 0],
9: [COMBATTABLE_DEATH, 0],
10: [COMBATTABLE_DEATH, 0],
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0],
>>>>>>>
8: [COMBATTABLE_DEATH, 0],
9: [COMBATTABLE_DEATH, 0],
10: [COMBATTABLE_DEATH, 0],
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0]
<<<<<<<
6: [combatTable_DEATH, 0],
7: [combatTable_DEATH, 0],
8: [combatTable_DEATH, 0],
9: [combatTable_DEATH, 0],
10: [combatTable_DEATH, 0],
11: [combatTable_DEATH, 0],
12: [combatTable_DEATH, 0],
13: [combatTable_DEATH, 0],
14: [combatTable_DEATH, 0],
15: [combatTable_DEATH, 0]
=======
6: [COMBATTABLE_DEATH, 0],
7: [COMBATTABLE_DEATH, 0],
8: [COMBATTABLE_DEATH, 0],
9: [COMBATTABLE_DEATH, 0],
10: [COMBATTABLE_DEATH, 0],
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0],
>>>>>>>
6: [COMBATTABLE_DEATH, 0],
7: [COMBATTABLE_DEATH, 0],
8: [COMBATTABLE_DEATH, 0],
9: [COMBATTABLE_DEATH, 0],
10: [COMBATTABLE_DEATH, 0],
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0]
<<<<<<<
5: [combatTable_DEATH, 0],
6: [combatTable_DEATH, 0],
7: [combatTable_DEATH, 0],
8: [combatTable_DEATH, 0],
9: [combatTable_DEATH, 0],
10: [combatTable_DEATH, 0],
11: [combatTable_DEATH, 0],
12: [combatTable_DEATH, 0],
13: [combatTable_DEATH, 0],
14: [combatTable_DEATH, 0],
15: [combatTable_DEATH, 0]
=======
5: [COMBATTABLE_DEATH, 0],
6: [COMBATTABLE_DEATH, 0],
7: [COMBATTABLE_DEATH, 0],
8: [COMBATTABLE_DEATH, 0],
9: [COMBATTABLE_DEATH, 0],
10: [COMBATTABLE_DEATH, 0],
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0],
>>>>>>>
5: [COMBATTABLE_DEATH, 0],
6: [COMBATTABLE_DEATH, 0],
7: [COMBATTABLE_DEATH, 0],
8: [COMBATTABLE_DEATH, 0],
9: [COMBATTABLE_DEATH, 0],
10: [COMBATTABLE_DEATH, 0],
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0]
<<<<<<<
4: [combatTable_DEATH, 0],
5: [combatTable_DEATH, 0],
6: [combatTable_DEATH, 0],
7: [combatTable_DEATH, 0],
8: [combatTable_DEATH, 0],
9: [combatTable_DEATH, 0],
10: [combatTable_DEATH, 0],
11: [combatTable_DEATH, 0],
12: [combatTable_DEATH, 0],
13: [combatTable_DEATH, 0],
14: [combatTable_DEATH, 0],
15: [combatTable_DEATH, 0]
}
=======
4: [COMBATTABLE_DEATH, 0],
5: [COMBATTABLE_DEATH, 0],
6: [COMBATTABLE_DEATH, 0],
7: [COMBATTABLE_DEATH, 0],
8: [COMBATTABLE_DEATH, 0],
9: [COMBATTABLE_DEATH, 0],
10: [COMBATTABLE_DEATH, 0],
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0],
},
>>>>>>>
4: [COMBATTABLE_DEATH, 0],
5: [COMBATTABLE_DEATH, 0],
6: [COMBATTABLE_DEATH, 0],
7: [COMBATTABLE_DEATH, 0],
8: [COMBATTABLE_DEATH, 0],
9: [COMBATTABLE_DEATH, 0],
10: [COMBATTABLE_DEATH, 0],
11: [COMBATTABLE_DEATH, 0],
12: [COMBATTABLE_DEATH, 0],
13: [COMBATTABLE_DEATH, 0],
14: [COMBATTABLE_DEATH, 0],
15: [COMBATTABLE_DEATH, 0]
}, |
<<<<<<<
=======
/**
* Only applies if id = 'quiver' (show the number of arrows on the quiver)
*/
showCount: boolean;
>>>>>>>
<<<<<<<
public getCntSectionObjects(type : string) : number {
return this.getSectionObjects(type).length;
// Code from cracrayol fork (reverted, it will break things, https://github.com/tonib/kaichronicles/commit/c527e2e63ae80c6a5e60ef66cde29f3825ee2725)
/*let count = 0;
=======
public getCntSectionObjects(type: string): number {
let count = 0;
>>>>>>>
public getCntSectionObjects(type: string): number {
return this.getSectionObjects(type).length;
// Code from cracrayol fork (reverted, it will break things, https://github.com/tonib/kaichronicles/commit/c527e2e63ae80c6a5e60ef66cde29f3825ee2725)
/*let count = 0;
<<<<<<<
public addObjectToSection(objectId : string , price : number = 0, unlimited : boolean = false, count : number = 0 ,
useOnSection : boolean = false ) {
=======
public addObjectToSection(objectId: string , price: number = 0, unlimited: boolean = false, count: number = 0 ,
showCount: boolean = false , useOnSection: boolean = false ) {
>>>>>>>
public addObjectToSection(objectId: string , price: number = 0, unlimited: boolean = false, count: number = 0 ,
useOnSection: boolean = false ) {
<<<<<<<
price: price,
unlimited: unlimited,
count: (objectId == Item.QUIVER || objectId == Item.ARROW || objectId == Item.MONEY || price > 0 ? count : 0 ),
useOnSection: useOnSection
=======
price,
unlimited,
count: (objectId === Item.QUIVER || objectId === Item.ARROW || objectId === Item.MONEY || price > 0 ? count : 0 ),
showCount: (objectId === Item.QUIVER ? showCount : false),
useOnSection,
>>>>>>>
price,
unlimited,
count: (objectId === Item.QUIVER || objectId === Item.ARROW || objectId === Item.MONEY || price > 0 ? count : 0 ),
useOnSection |
<<<<<<<
=======
};
public Core = <CoreType>(core?: CoreType): CoreType => {
if (!this.ready && core) this.onInstanceReady(core);
return this.core as CoreType;
};
private onInstanceReady(core?: { [key: string]: any }) {
this.ready = true;
if (core)
// Copy core object structure without destroying this.core object reference
for (let p in core) this.core[p] = core[p];
this.computed.forEach(instance => instance.recompute());
>>>>>>>
<<<<<<<
// INTERNAL FUNCTIONS
private onInstanceReady(core?: { [key: string]: any }) {
this.ready = true;
if (core)
// Copy core object structure without destroying this.core object reference
for (let p in core) this.core[p] = core[p];
this.computed.forEach(instance => instance.recompute());
}
public initFrameworkIntegration(frameworkConstructor) {
use(frameworkConstructor, this);
}
public setStorage(config: StorageConfig): void {
=======
public setStorage(config: StorageConfig): void {
>>>>>>>
// INTERNAL FUNCTIONS
private onInstanceReady(core?: { [key: string]: any }) {
this.ready = true;
if (core)
// Copy core object structure without destroying this.core object reference
for (let p in core) this.core[p] = core[p];
this.computed.forEach(instance => instance.recompute());
}
public initFrameworkIntegration(frameworkConstructor) {
use(frameworkConstructor, this);
}
public setStorage(config: StorageConfig): void {
<<<<<<<
=======
public Storage(config: StorageConfig): void {
return this.setStorage(config);
}
>>>>>>> |
<<<<<<<
`api:${version}:siem`,
`app:${version}:siem`,
`ui:${version}:catalogue/siem`,
`ui:${version}:navLinks/siem`,
`ui:${version}:siem/show`,
=======
`ui:${version}:logs/save`,
>>>>>>>
`api:${version}:siem`,
`app:${version}:siem`,
`ui:${version}:catalogue/siem`,
`ui:${version}:navLinks/siem`,
`ui:${version}:siem/show`,
`ui:${version}:logs/save`,
<<<<<<<
`api:${version}:siem`,
`app:${version}:siem`,
`ui:${version}:catalogue/siem`,
`ui:${version}:navLinks/siem`,
`ui:${version}:siem/show`,
=======
`ui:${version}:logs/save`,
>>>>>>>
`api:${version}:siem`,
`app:${version}:siem`,
`ui:${version}:catalogue/siem`,
`ui:${version}:navLinks/siem`,
`ui:${version}:siem/show`,
`ui:${version}:logs/save`, |
<<<<<<<
import { Subscription, timer } from "rxjs";
=======
import { Subscription } from "rxjs/Subscription";
import { timer } from "rxjs/observable/timer";
import { catchError, take } from "rxjs/operators";
>>>>>>>
import { Subscription, timer } from "rxjs";
import { take } from "rxjs/operators";
<<<<<<<
this.searchTimer = timer(this.ctrListPause).subscribe(() => {
=======
this.searchTimer = timer(this.ctrListPause).pipe(take(1)).subscribe(() => {
>>>>>>>
this.searchTimer = timer(this.ctrListPause).pipe(take(1)).subscribe(() => {
<<<<<<<
this.clearTimer = timer(CLEAR_TIMEOUT).subscribe(() => {
=======
this.clearTimer = timer(CLEAR_TIMEOUT).pipe(take(1)).subscribe(() => {
>>>>>>>
this.clearTimer = timer(CLEAR_TIMEOUT).pipe(take(1)).subscribe(() => {
<<<<<<<
this._dataService
.subscribe(
(results: any) => {
this.ctx.searchInitialized = true;
this.ctx.searching = false;
this.ctx.results = results;
if (this.ctrListAutoMatch && results && results.length === 1 && results[0].title && !isNil(this.term) &&
results[0].title.toLocaleLowerCase() === this.term!.toLocaleLowerCase()) {
// Do automatch
this.completer.onSelected(results[0]);
return;
}
if (this._initialValue) {
this.initialValue = this._initialValue;
this._initialValue = null;
}
this.refreshTemplate();
if (this.ctrListAutoHighlight) {
this.completer.autoHighlightIndex = this.getBestMatchIndex();
}
},
(error: any) => {
console.error(error);
console.error("Unexpected error in dataService: errors should be handled by the dataService Observable");
return [];
=======
this._dataService.pipe(
catchError(err => {
console.error(err);
console.error("Unexpected error in dataService: errors should be handled by the dataService Observable");
return [];
})
)
.subscribe(results => {
this.ctx.searchInitialized = true;
this.ctx.searching = false;
this.ctx.results = results;
if (this.ctrListAutoMatch && results && results.length === 1 && results[0].title && !isNil(this.term) &&
results[0].title.toLocaleLowerCase() === this.term!.toLocaleLowerCase()) {
// Do automatch
this.completer.onSelected(results[0]);
return;
>>>>>>>
this._dataService
.subscribe(results => {
this.ctx.searchInitialized = true;
this.ctx.searching = false;
this.ctx.results = results;
if (this.ctrListAutoMatch && results && results.length === 1 && results[0].title && !isNil(this.term) &&
results[0].title.toLocaleLowerCase() === this.term!.toLocaleLowerCase()) {
// Do automatch
this.completer.onSelected(results[0]);
return;
}
},
(error: any) => {
console.error(error);
console.error("Unexpected error in dataService: errors should be handled by the dataService Observable");
return []; |
<<<<<<<
initializePlugin(compilation: Compilation) {
=======
initializePlugin(compilation: Compilation): void {
const entryPaths =
typeof this.options.paths === "function"
? this.options.paths()
: this.options.paths;
entryPaths.forEach((p) => {
if (!fs.existsSync(p)) throw new Error(`Path ${p} does not exist.`);
});
>>>>>>>
initializePlugin(compilation: Compilation): void { |
<<<<<<<
namespacedImportName: string | null;
externalFragments: LoadedFragment[];
=======
addTypename: boolean;
>>>>>>>
addTypename: boolean;
namespacedImportName: string | null;
externalFragments: LoadedFragment[];
<<<<<<<
/* The following configuration are for preset configuration and should not be set manually (for most use cases...) */
namespacedImportName?: string;
externalFragments?: LoadedFragment[];
=======
/**
* @name skipTypename
* @type boolean
* @default false
* @description Automatically adds `__typename` field to the generated types, even when they are not specified
* in the selection set.
*
* @example
* ```yml
* config:
* skipTypename: true
* ```
*/
skipTypename?: boolean;
>>>>>>>
/**
* @name skipTypename
* @type boolean
* @default false
* @description Automatically adds `__typename` field to the generated types, even when they are not specified
* in the selection set.
*
* @example
* ```yml
* config:
* skipTypename: true
* ```
*/
skipTypename?: boolean;
/* The following configuration are for preset configuration and should not be set manually (for most use cases...) */
namespacedImportName?: string;
externalFragments?: LoadedFragment[];
<<<<<<<
namespacedImportName: rawConfig.namespacedImportName || null,
externalFragments: rawConfig.externalFragments || [],
=======
addTypename: !rawConfig.skipTypename,
>>>>>>>
namespacedImportName: rawConfig.namespacedImportName || null,
externalFragments: rawConfig.externalFragments || [],
addTypename: !rawConfig.skipTypename, |
<<<<<<<
Float: 'Double',
=======
Float: 'Float',
};
export const KOTLIN_SCALARS = {
ID: 'Any',
String: 'String',
Boolean: 'Boolean',
Int: 'Int',
Float: 'Float',
>>>>>>>
Float: 'Double',
};
export const KOTLIN_SCALARS = {
ID: 'Any',
String: 'String',
Boolean: 'Boolean',
Int: 'Int',
Float: 'Float', |
<<<<<<<
declare var NSURL, AVPlayer, AVPlayerViewController, UIView, CMTimeMakeWithSeconds, NSNotificationCenter, CMTimeGetSeconds, CMTimeMake, kCMTimeZero;
=======
declare var NSURL, AVPlayer, AVPlayerViewController, AVPlayerItemDidPlayToEndTimeNotification, UIView, CMTimeMakeWithSeconds, NSNotification, NSNotificationCenter, CMTimeGetSeconds, CMTimeMake;
>>>>>>>
declare var NSURL, AVPlayer, AVPlayerViewController, AVPlayerItemDidPlayToEndTimeNotification, UIView, CMTimeMakeWithSeconds, NSNotification, NSNotificationCenter, CMTimeGetSeconds, CMTimeMake, kCMTimeZero; |
<<<<<<<
menu(translator, false, frame, theme),
tableEditing(),
tablePlugin,
=======
menu(translator, false, theme),
>>>>>>>
menu(translator, false, theme),
tableEditing(),
tablePlugin, |
<<<<<<<
import { Alerts } from '@tinacms/alerts'
=======
import {
MediaManager,
MediaStore,
MediaUploadOptions,
Media,
ListOptions,
MediaList,
} from '@tinacms/media'
import { Alerts, EventsToAlerts } from '@tinacms/alerts'
>>>>>>>
import { Alerts, EventsToAlerts } from '@tinacms/alerts'
<<<<<<<
=======
media?: {
store: MediaStore
}
alerts?: EventsToAlerts
>>>>>>>
alerts?: EventsToAlerts
<<<<<<<
alerts = new Alerts(this.events)
constructor({ sidebar, toolbar, ...config }: TinaCMSConfig = {}) {
=======
media: MediaManager
alerts: Alerts
constructor({
sidebar,
media,
toolbar,
alerts,
...config
}: TinaCMSConfig = {}) {
>>>>>>>
alerts: Alerts
constructor({ sidebar, toolbar, alerts, ...config }: TinaCMSConfig = {}) {
<<<<<<<
=======
const mediaStore = media?.store || new DummyMediaStore()
this.media = new MediaManager(mediaStore)
this.alerts = new Alerts(this.events, alerts)
>>>>>>>
this.alerts = new Alerts(this.events, alerts) |
<<<<<<<
const uploadStats = await upload_lib.uploadFromActions(
=======
const gitHubVersion = await getGitHubVersion(apiDetails);
const uploadStats = await upload_lib.upload(
>>>>>>>
const gitHubVersion = await getGitHubVersion(apiDetails);
const uploadStats = await upload_lib.uploadFromActions( |
<<<<<<<
import AsyncStorage from '@react-native-community/async-storage';
import {Platform} from 'react-native';
=======
>>>>>>>
import {Platform} from 'react-native';
<<<<<<<
const result = service.summariesContainingExposures(15, summaries);
expect(result).toHaveLength(2);
expect(result[0]).toStrictEqual(exposedSummary2);
=======
const result = service.findSummariesContainingExposures(15, summaries);
expect(result[0].attenuationDurations[0]).toStrictEqual(1020);
>>>>>>>
const result = service.findSummariesContainingExposures(15, summaries);
expect(result).toHaveLength(2);
expect(result[0]).toStrictEqual(exposedSummary2); |
<<<<<<<
if(this.callMain){
// source file that is being debugged
this.writeOutput(''
+ 'program: ' + program
+ '\nmain function: ' + this.mainFunction + '()'
);
this.rSession.callFunction('source', program, [], true, 'base');
this.rSession.callFunction('.vsc.lookForMain', this.mainFunction);
// actual call to main()/error if no main() found is made as response to message 'callMain'
}
this.setBreakpointsInPackages = config.get<boolean>('setBreakpointsInPackages', false);
=======
this.setBreakpointsInPackages = config().get<boolean>('setBreakpointsInPackages', false);
>>>>>>>
if(this.callMain){
// source file that is being debugged
this.writeOutput(''
+ 'program: ' + program
+ '\nmain function: ' + this.mainFunction + '()'
);
this.rSession.callFunction('source', program, [], true, 'base');
this.rSession.callFunction('.vsc.lookForMain', this.mainFunction);
// actual call to main()/error if no main() found is made as response to message 'callMain'
}
this.setBreakpointsInPackages = config().get<boolean>('setBreakpointsInPackages', false); |
<<<<<<<
private editActive: boolean = false;
private editingPackage: boolean = false;
private packageName; // This is the deployed BND's package name
private packageVersion; // This is the deployed BND's package version
private packageDescription; // This is the deployed BND's package description
private inputPackageName; // This is the input 'Name' before the BND is updated
private inputPackageVersion; // This is the input 'Version' before the BND is updated
private setPackageName;
private setPackageVersion;
private currentModelFiles;
private currentScriptFiles;
private currentAclFile;
private previousFile;
constructor(
private adminService: AdminService,
private clientService: ClientService,
private initializationService: InitializationService,
private modalService: NgbModal
) {
=======
constructor(private adminService: AdminService,
private clientService: ClientService,
private initializationService: InitializationService,
private modalService: NgbModal,
private route: ActivatedRoute,
private sampleBusinessNetworkService: SampleBusinessNetworkService) {
>>>>>>>
private editActive: boolean = false;
private editingPackage: boolean = false;
private packageName; // This is the deployed BND's package name
private packageVersion; // This is the deployed BND's package version
private packageDescription; // This is the deployed BND's package description
private inputPackageName; // This is the input 'Name' before the BND is updated
private inputPackageVersion; // This is the input 'Version' before the BND is updated
private setPackageName;
private setPackageVersion;
private currentModelFiles;
private currentScriptFiles;
private currentAclFile;
private previousFile;
constructor(private adminService: AdminService,
private clientService: ClientService,
private initializationService: InitializationService,
private modalService: NgbModal,
private route: ActivatedRoute,
private sampleBusinessNetworkService: SampleBusinessNetworkService) { |
<<<<<<<
this.checkChanges();
const attributesMetadata: any = this[AttributeMetadata];
=======
const attributesMetadata: any = this[AttributeMetadataIndex];
>>>>>>>
this.checkChanges();
const attributesMetadata: any = this[AttributeMetadataIndex];
<<<<<<<
this.checkChanges();
const attributesMetadata: any = this[AttributeMetadata];
=======
const attributesMetadata: any = this[AttributeMetadataIndex];
>>>>>>>
this.checkChanges();
const attributesMetadata: any = this[AttributeMetadataIndex];
<<<<<<<
const attributesMetadata: any = this[AttributeMetadata];
=======
const attributesMetadata: any = this[AttributeMetadataIndex];
let metadata: any;
>>>>>>>
const attributesMetadata: any = this[AttributeMetadataIndex];
<<<<<<<
=======
this[AttributeMetadataIndex] = attributesMetadata;
>>>>>>> |
<<<<<<<
import {TestBed} from '@angular/core/testing';
import { format, parse } from 'date-fns';
import {Author} from '../../test/models/author.model';
import {AUTHOR_API_VERSION, AUTHOR_MODEL_ENDPOINT_URL, CustomAuthor} from '../../test/models/custom-author.model';
import {AUTHOR_BIRTH, AUTHOR_ID, AUTHOR_NAME, BOOK_TITLE, getAuthorData} from '../../test/fixtures/author.fixture';
import {BaseRequestOptions, ConnectionBackend, Headers, Http, RequestMethod, Response, ResponseOptions} from '@angular/http';
import {MockBackend, MockConnection} from '@angular/http/testing';
import {API_VERSION, BASE_URL, Datastore} from '../../test/datastore.service';
import {API_VERSION_FROM_CONFIG, BASE_URL_FROM_CONFIG, DatastoreWithConfig} from '../../test/datastore-with-config.service';
import {ErrorResponse} from '../models/error-response.model';
import {getSampleBook} from '../../test/fixtures/book.fixture';
import {Book} from '../../test/models/book.model';
import {ModelConfig} from '../index';
=======
import { TestBed } from '@angular/core/testing';
import { format, parse } from 'date-fns';
import { Author } from '../../test/models/author.model';
import { AUTHOR_API_VERSION, AUTHOR_MODEL_ENDPOINT_URL, CustomAuthor } from '../../test/models/custom-author.model';
import { AUTHOR_BIRTH, AUTHOR_ID, AUTHOR_NAME, BOOK_TITLE, getAuthorData } from '../../test/fixtures/author.fixture';
import { MockBackend, MockConnection } from '@angular/http/testing';
import { API_VERSION, BASE_URL, Datastore } from '../../test/datastore.service';
import { ErrorResponse } from '../models/error-response.model';
import { getSampleBook } from '../../test/fixtures/book.fixture';
import { Book } from '../../test/models/book.model';
import { ModelConfig } from '../index';
import {
BaseRequestOptions,
ConnectionBackend,
Headers,
Http,
RequestMethod,
Response,
ResponseOptions
} from '@angular/http';
import {
API_VERSION_FROM_CONFIG,
BASE_URL_FROM_CONFIG,
DatastoreWithConfig
} from '../../test/datastore-with-config.service';
>>>>>>>
import { TestBed } from '@angular/core/testing';
import { format, parse } from 'date-fns';
import { Author } from '../../test/models/author.model';
import { AUTHOR_API_VERSION, AUTHOR_MODEL_ENDPOINT_URL, CustomAuthor } from '../../test/models/custom-author.model';
import { AUTHOR_BIRTH, AUTHOR_ID, AUTHOR_NAME, BOOK_TITLE, getAuthorData } from '../../test/fixtures/author.fixture';
import { MockBackend, MockConnection } from '@angular/http/testing';
import { API_VERSION, BASE_URL, Datastore } from '../../test/datastore.service';
import { ErrorResponse } from '../models/error-response.model';
import { getSampleBook } from '../../test/fixtures/book.fixture';
import { Book } from '../../test/models/book.model';
import { ModelConfig } from '../index';
import {
BaseRequestOptions,
ConnectionBackend,
Headers,
Http,
RequestMethod,
Response,
ResponseOptions
} from '@angular/http';
import {
API_VERSION_FROM_CONFIG,
BASE_URL_FROM_CONFIG,
DatastoreWithConfig
} from '../../test/datastore-with-config.service';
<<<<<<<
describe('findRecord', () => {
it('should get author', () => {
backend.connections.subscribe((c: MockConnection) => {
c.mockRespond(new Response(
new ResponseOptions({
body: JSON.stringify({
data: getAuthorData()
})
})
));
});
datastore.findRecord(Author, '1').subscribe((author) => {
expect(author).toBeDefined();
expect(author.id).toBe(AUTHOR_ID);
expect(author.date_of_birth).toEqual(parse(AUTHOR_BIRTH));
});
});
it('should generate correct query string for array params with findRecord', () => {
backend.connections.subscribe((c: MockConnection) => {
const decodedQueryString = decodeURI(c.request.url).split('?')[1];
const expectedQueryString = 'arrayParam[]=4&arrayParam[]=5&arrayParam[]=6';
expect(decodedQueryString).toEqual(expectedQueryString);
});
datastore.findRecord(Book, '1', {arrayParam: [4, 5, 6]}).subscribe();
});
=======
it('should build url with nested params', () => {
backend.connections.subscribe((c: MockConnection) => {
expect(c.request.url).not.toEqual(`${BASE_URL}/${API_VERSION}`);
expect(c.request.url).toEqual(`${BASE_URL}/${API_VERSION}/` + 'authors?' +
encodeURIComponent('page[size]') + '=10&' +
encodeURIComponent('page[number]') + '=1&' +
encodeURIComponent('include') + '=comments&' +
encodeURIComponent('filter[title][keyword]') + '=Tolkien');
expect(c.request.method).toEqual(RequestMethod.Get);
});
datastore.query(Author, {
page: {
size: 10, number: 1
},
include: 'comments',
filter: {
title: {
keyword: 'Tolkien'
}
}
}).subscribe();
});
it('should have custom headers', () => {
backend.connections.subscribe((c: MockConnection) => {
expect(c.request.url).toEqual(`${BASE_URL}/${API_VERSION}/authors`);
expect(c.request.method).toEqual(RequestMethod.Get);
expect(c.request.headers.has('Authorization')).toBeTruthy();
expect(c.request.headers.get('Authorization')).toBe('Bearer');
});
datastore.query(Author, null, new Headers({ Authorization: 'Bearer' })).subscribe();
});
it('should override base headers', () => {
backend.connections.subscribe((c: MockConnection) => {
expect(c.request.url).toEqual(`${BASE_URL}/${API_VERSION}/authors`);
expect(c.request.method).toEqual(RequestMethod.Get);
expect(c.request.headers.has('Authorization')).toBeTruthy();
expect(c.request.headers.get('Authorization')).toBe('Basic');
});
datastore.headers = new Headers({ Authorization: 'Bearer' });
datastore.query(Author, null, new Headers({ Authorization: 'Basic' })).subscribe();
});
it('should get authors', () => {
backend.connections.subscribe((c: MockConnection) => {
c.mockRespond(new Response(
new ResponseOptions({
body: JSON.stringify({
data: [getAuthorData()]
})
})
));
});
datastore.query(Author).subscribe((authors) => {
expect(authors).toBeDefined();
expect(authors.length).toEqual(1);
expect(authors[0].id).toEqual(AUTHOR_ID);
expect(authors[0].name).toEqual(AUTHOR_NAME);
expect(authors[1]).toBeUndefined();
});
});
>>>>>>>
it('should build url with nested params', () => {
backend.connections.subscribe((c: MockConnection) => {
expect(c.request.url).not.toEqual(`${BASE_URL}/${API_VERSION}`);
expect(c.request.url).toEqual(`${BASE_URL}/${API_VERSION}/` + 'authors?' +
encodeURIComponent('page[size]') + '=10&' +
encodeURIComponent('page[number]') + '=1&' +
encodeURIComponent('include') + '=comments&' +
encodeURIComponent('filter[title][keyword]') + '=Tolkien');
expect(c.request.method).toEqual(RequestMethod.Get);
});
datastore.query(Author, {
page: {
size: 10, number: 1
},
include: 'comments',
filter: {
title: {
keyword: 'Tolkien'
}
}
}).subscribe();
});
it('should have custom headers', () => {
backend.connections.subscribe((c: MockConnection) => {
expect(c.request.url).toEqual(`${BASE_URL}/${API_VERSION}/authors`);
expect(c.request.method).toEqual(RequestMethod.Get);
expect(c.request.headers.has('Authorization')).toBeTruthy();
expect(c.request.headers.get('Authorization')).toBe('Bearer');
});
datastore.query(Author, null, new Headers({ Authorization: 'Bearer'})).subscribe();
});
it('should override base headers', () => {
backend.connections.subscribe((c: MockConnection) => {
expect(c.request.url).toEqual(`${BASE_URL}/${API_VERSION}/authors`);
expect(c.request.method).toEqual(RequestMethod.Get);
expect(c.request.headers.has('Authorization')).toBeTruthy();
expect(c.request.headers.get('Authorization')).toBe('Basic');
});
datastore.headers = new Headers({ Authorization: 'Bearer' });
datastore.query(Author, null, new Headers({ Authorization: 'Basic' })).subscribe();
});
it('should get authors', () => {
backend.connections.subscribe((c: MockConnection) => {
c.mockRespond(new Response(
new ResponseOptions({
body: JSON.stringify({
data: [getAuthorData()]
})
})
));
});
datastore.query(Author).subscribe((authors) => {
expect(authors).toBeDefined();
expect(authors.length).toEqual(1);
expect(authors[0].id).toEqual(AUTHOR_ID);
expect(authors[0].name).toEqual(AUTHOR_NAME);
expect(authors[1]).toBeUndefined();
});
});
<<<<<<<
describe('saveRecord', () => {
it('should create new author', () => {
backend.connections.subscribe((c: MockConnection) => {
expect(c.request.url).not.toEqual(`${BASE_URL}/${API_VERSION}`);
expect(c.request.url).toEqual(`${BASE_URL}/${API_VERSION}/authors`);
expect(c.request.method).toEqual(RequestMethod.Post);
let obj = c.request.json().data;
expect(obj.attributes.name).toEqual(AUTHOR_NAME);
expect(obj.attributes.dob).toEqual(format(parse(AUTHOR_BIRTH), 'YYYY-MM-DDTHH:mm:ss[Z]'));
expect(obj.id).toBeUndefined();
expect(obj.type).toBe('authors');
expect(obj.relationships).toBeUndefined();
c.mockRespond(new Response(
new ResponseOptions({
status: 201,
body: JSON.stringify({
data: {
'id': '1',
'type': 'authors',
'attributes': {
name: obj.attributes.name
}
}
})
})
));
});
let author = datastore.createRecord(Author, {
name: AUTHOR_NAME,
date_of_birth: AUTHOR_BIRTH
});
author.save().subscribe(val => {
expect(val.id).toBeDefined();
expect(val.id).toEqual('1');
=======
it('should get data with default metadata', () => {
backend.connections.subscribe((c: MockConnection) => {
c.mockRespond(new Response(
new ResponseOptions({
body: JSON.stringify({
data: [getSampleBook(1, '1')],
links: ['http://www.example.org']
>>>>>>>
it('should get data with default metadata', () => {
backend.connections.subscribe((c: MockConnection) => {
c.mockRespond(new Response(
new ResponseOptions({
body: JSON.stringify({
data: [getSampleBook(1, '1')],
links: ['http://www.example.org']
<<<<<<<
describe('updateRecord', () => {
it('should update author', () => {
backend.connections.subscribe((c: MockConnection) => {
expect(c.request.url).not.toEqual(`${BASE_URL}/${API_VERSION}/authors`);
expect(c.request.url).toEqual(`${BASE_URL}/${API_VERSION}/authors/1`);
expect(c.request.method).toEqual(RequestMethod.Patch);
let obj = c.request.json().data;
expect(obj.attributes.name).toEqual('Rowling');
expect(obj.attributes.dob).toEqual(format(parse('1965-07-31'), 'YYYY-MM-DDTHH:mm:ss[Z]'));
expect(obj.id).toBe(AUTHOR_ID);
expect(obj.type).toBe('authors');
expect(obj.relationships).toBeUndefined();
});
let author = new Author(datastore, {
id: AUTHOR_ID,
=======
it('should generate correct query string for array params with findRecord', () => {
backend.connections.subscribe((c: MockConnection) => {
const decodedQueryString = decodeURI(c.request.url).split('?')[1];
const expectedQueryString = 'arrayParam[]=4&arrayParam[]=5&arrayParam[]=6';
expect(decodedQueryString).toEqual(expectedQueryString);
});
datastore.findRecord(Book, '1', { arrayParam: [4, 5, 6] }).subscribe();
});
});
describe('saveRecord', () => {
it('should create new author', () => {
backend.connections.subscribe((c: MockConnection) => {
expect(c.request.url).not.toEqual(`${BASE_URL}/${API_VERSION}`);
expect(c.request.url).toEqual(`${BASE_URL}/${API_VERSION}/authors`);
expect(c.request.method).toEqual(RequestMethod.Post);
const obj = c.request.json().data;
expect(obj.attributes.name).toEqual(AUTHOR_NAME);
expect(obj.attributes.dob).toEqual(format(parse(AUTHOR_BIRTH), 'YYYY-MM-DDTHH:mm:ss[Z]'));
expect(obj.id).toBeUndefined();
expect(obj.type).toBe('authors');
expect(obj.relationships).toBeUndefined();
c.mockRespond(new Response(
new ResponseOptions({
status: 201,
body: JSON.stringify({
data: {
id: '1',
type: 'authors',
>>>>>>>
it('should generate correct query string for array params with findRecord', () => {
backend.connections.subscribe((c: MockConnection) => {
const decodedQueryString = decodeURI(c.request.url).split('?')[1];
const expectedQueryString = 'arrayParam[]=4&arrayParam[]=5&arrayParam[]=6';
expect(decodedQueryString).toEqual(expectedQueryString);
});
datastore.findRecord(Book, '1', { arrayParam: [4, 5, 6] }).subscribe();
});
});
describe('saveRecord', () => {
it('should create new author', () => {
backend.connections.subscribe((c: MockConnection) => {
expect(c.request.url).not.toEqual(`${BASE_URL}/${API_VERSION}`);
expect(c.request.url).toEqual(`${BASE_URL}/${API_VERSION}/authors`);
expect(c.request.method).toEqual(RequestMethod.Post);
let obj = c.request.json().data;
expect(obj.attributes.name).toEqual(AUTHOR_NAME);
expect(obj.attributes.dob).toEqual(format(parse(AUTHOR_BIRTH), 'YYYY-MM-DDTHH:mm:ss[Z]'));
expect(obj.id).toBeUndefined();
expect(obj.type).toBe('authors');
expect(obj.relationships).toBeUndefined();
c.mockRespond(new Response(
new ResponseOptions({
status: 201,
body: JSON.stringify({
data: {
id: '1',
type: 'authors', |
<<<<<<<
import {DsfParser} from "./dsf/DsfParser";
=======
import {DsdiffParser} from "./dsdiff/DsdiffParser";
>>>>>>>
import {DsfParser} from "./dsf/DsfParser";
import {DsdiffParser} from "./dsdiff/DsdiffParser";
<<<<<<<
case '.dsf':
return 'dsf';
=======
case '.dff':
return 'dsdiff';
>>>>>>>
case '.dsf':
return 'dsf';
case '.dff':
return 'dsdiff';
<<<<<<<
case 'dsf': return new DsfParser();
=======
case 'dsdiff': return new DsdiffParser();
>>>>>>>
case 'dsf': return new DsfParser();
case 'dsdiff': return new DsdiffParser(); |
<<<<<<<
import common from "../common/Util";
import {TagType} from "../common/GenericTagTypes";
import {IOptions} from "../";
import {ITokenizer} from "strtok3";
import * as Token from "token-types";
import {FourCcToken} from "../common/FourCC";
import FileType = require("file-type");
import {IPicture} from "../index";
import * as _debug from "debug";
import {INativeMetadataCollector} from "../common/MetadataCollector";
import {BasicParser} from "../common/BasicParser";
const debug = _debug("music-metadata:parser:APEv2");
=======
import * as initDebug from 'debug';
import {ITokenizer} from 'strtok3';
import * as Token from 'token-types';
import * as FileType from 'file-type';
import common from '../common/Util';
import {TagType} from '../common/GenericTagTypes';
import {IPicture, IOptions} from '../index';
import {FourCcToken} from '../common/FourCC';
import {INativeMetadataCollector} from '../common/MetadataCollector';
import {BasicParser} from '../common/BasicParser';
const debug = initDebug("music-metadata:parser:APEv2");
>>>>>>>
import * as initDebug from 'debug';
import FileType = require("file-type");
import {ITokenizer} from "strtok3";
import * as Token from "token-types";
import common from "../common/Util";
import {TagType} from "../common/GenericTagTypes";
import {FourCcToken} from "../common/FourCC";
import {IPicture, IOptions} from '../index';
import {INativeMetadataCollector} from '../common/MetadataCollector';
import {BasicParser} from '../common/BasicParser';
const debug = initDebug("music-metadata:parser:APEv2"); |
<<<<<<<
this.addTag(tagKey, dataAtom.value.toString("utf-8"));
=======
case 18: // Unknown: Found in m4b in combination with a '©gen' tag
this.tags.push({id: tagKey, value: dataAtom.value.toString("utf-8")});
>>>>>>>
case 18: // Unknown: Found in m4b in combination with a '©gen' tag
this.addTag(tagKey, dataAtom.value.toString("utf-8")); |
<<<<<<<
import * as strtok3 from "strtok3";
import * as Token from "token-types";
import * as Chunk from "./Chunk";
import {Readable} from "stream";
import {ID3v2Parser} from "../id3v2/ID3v2Parser";
import {FourCcToken} from "../common/FourCC";
import {BasicParser} from "../common/BasicParser";
=======
import * as strtok3 from 'strtok3';
import * as Token from 'token-types';
import * as initDebug from 'debug';
import {Readable} from 'stream';
import * as Chunk from './Chunk';
import {ID3v2Parser} from '../id3v2/ID3v2Parser';
import {FourCcToken} from '../common/FourCC';
import {Promise} from 'es6-promise';
import {BasicParser} from '../common/BasicParser';
const debug = initDebug('music-metadata:parser:aiff');
>>>>>>>
import * as strtok3 from "strtok3";
import * as Token from "token-types";
import {Readable} from "stream";
import * as initDebug from 'debug';
import {ID3v2Parser} from "../id3v2/ID3v2Parser";
import {FourCcToken} from "../common/FourCC";
import {BasicParser} from "../common/BasicParser";
import * as Chunk from "./Chunk";
const debug = initDebug('music-metadata:parser:aiff'); |
<<<<<<<
import { RawTelemetryReporterToDap, RawTelemetryReporter } from '../../telemetry/telemetryReporter';
=======
import { NodeTarget, INodeTargetLifecycleHooks } from './nodeTarget';
import { absolutePathToFileUrl } from '../../common/urlUtils';
import { resolve } from 'path';
import Cdp from '../../cdp/api';
>>>>>>>
import { INodeTargetLifecycleHooks } from './nodeTarget';
import { absolutePathToFileUrl } from '../../common/urlUtils';
import { resolve } from 'path';
import Cdp from '../../cdp/api'; |
<<<<<<<
import { delay } from '../../common/promiseUtil';
=======
import { absolutePathToFileUrl } from '../../common/urlUtils';
>>>>>>>
import { delay } from '../../common/promiseUtil';
import { absolutePathToFileUrl } from '../../common/urlUtils'; |
<<<<<<<
import { expect } from 'chai';
=======
import { join } from 'path';
>>>>>>>
import { expect } from 'chai';
import { join } from 'path'; |
<<<<<<<
import { CodeSearchSourceMapRepository } from '../common/sourceMaps/codeSearchSourceMapRepository';
import { BreakpointsPredictor, BreakpointPredictionCache } from './breakpointPredictor';
import { CorrelatedCache } from '../common/sourceMaps/mtimeCorrelatedCache';
import { join } from 'path';
=======
import { IDeferred, getDeferred } from '../common/promiseUtil';
>>>>>>>
import { CodeSearchSourceMapRepository } from '../common/sourceMaps/codeSearchSourceMapRepository';
import { BreakpointsPredictor, BreakpointPredictionCache } from './breakpointPredictor';
import { CorrelatedCache } from '../common/sourceMaps/mtimeCorrelatedCache';
import { join } from 'path';
import { IDeferred, getDeferred } from '../common/promiseUtil';
<<<<<<<
this.dap.on('breakpointLocations', params =>
this._withThread(async thread => ({
breakpoints: await this.breakpointManager.getBreakpointLocations(thread, params),
})),
);
const sourceMapRepo = CodeSearchSourceMapRepository.createOrFallback();
const bpCache: BreakpointPredictionCache | undefined = launchConfig.__workspaceCachePath
? new CorrelatedCache(join(launchConfig.__workspaceCachePath, 'bp-predict.json'))
: undefined;
const bpPredictor = rootPath
? new BreakpointsPredictor(rootPath, sourceMapRepo, sourcePathResolver, bpCache)
: undefined;
this.sourceContainer = new SourceContainer(
this.dap,
rootPath,
sourcePathResolver,
sourceMapRepo,
);
this.breakpointManager = new BreakpointManager(
this.dap,
this.sourceContainer,
launchConfig.pauseForSourceMap,
bpPredictor,
);
=======
this.dap.on('breakpointLocations', params => this._withThread(async thread => ({ breakpoints: await this.breakpointManager.getBreakpointLocations(thread, params) })));
this.sourceContainer = new SourceContainer(this.dap, rootPath, sourcePathResolver);
this.breakpointManager = new BreakpointManager(this.dap, this.sourceContainer, launchConfig.pauseForSourceMap);
>>>>>>>
this.dap.on('breakpointLocations', params =>
this._withThread(async thread => ({
breakpoints: await this.breakpointManager.getBreakpointLocations(thread, params),
})),
);
const sourceMapRepo = CodeSearchSourceMapRepository.createOrFallback();
const bpCache: BreakpointPredictionCache | undefined = launchConfig.__workspaceCachePath
? new CorrelatedCache(join(launchConfig.__workspaceCachePath, 'bp-predict.json'))
: undefined;
const bpPredictor = rootPath
? new BreakpointsPredictor(rootPath, sourceMapRepo, sourcePathResolver, bpCache)
: undefined;
this.sourceContainer = new SourceContainer(
this.dap,
rootPath,
sourcePathResolver,
sourceMapRepo,
);
this.breakpointManager = new BreakpointManager(
this.dap,
this.sourceContainer,
launchConfig.pauseForSourceMap,
bpPredictor,
); |
<<<<<<<
=======
configFile: string,
codeQL: CodeQL,
>>>>>>>
codeQL: CodeQL,
<<<<<<<
async function addRemoteQueries(resultMap: { [language: string]: string[] }, queryUses: string, configFile?: string) {
=======
async function addRemoteQueries(
configFile: string,
codeQL: CodeQL,
resultMap: { [language: string]: string[] },
queryUses: string,
tempDir: string) {
>>>>>>>
async function addRemoteQueries(
codeQL: CodeQL,
resultMap: { [language: string]: string[] },
queryUses: string,
tempDir: string,
configFile?: string) {
<<<<<<<
queryUses: string,
configFile?: string) {
=======
queryUses: string,
tempDir: string) {
>>>>>>>
queryUses: string,
tempDir: string,
configFile?: string) {
<<<<<<<
await addLocalQueries(resultMap, queryUses.slice(2), configFile);
=======
await addLocalQueries(configFile, codeQL, resultMap, queryUses.slice(2));
>>>>>>>
await addLocalQueries(codeQL, resultMap, queryUses.slice(2), configFile);
<<<<<<<
await addBuiltinSuiteQueries(languages, resultMap, queryUses, configFile);
=======
await addBuiltinSuiteQueries(configFile, languages, codeQL, resultMap, queryUses);
>>>>>>>
await addBuiltinSuiteQueries(languages, codeQL, resultMap, queryUses, configFile);
<<<<<<<
await addRemoteQueries(resultMap, queryUses, configFile);
=======
await addRemoteQueries(configFile, codeQL, resultMap, queryUses, tempDir);
>>>>>>>
await addRemoteQueries(codeQL, resultMap, queryUses, tempDir, configFile);
<<<<<<<
await addDefaultQueries(languages, queries);
await addQueriesFromWorkflowIfRequired(languages, queries);
=======
await addDefaultQueries(codeQL, languages, queries);
>>>>>>>
await addDefaultQueries(codeQL, languages, queries);
await addQueriesFromWorkflowIfRequired(codeQL, languages, queries, tempDir);
<<<<<<<
await parseQueryUses(languages, queries, query[QUERIES_USES_PROPERTY], configFile);
=======
await parseQueryUses(configFile, languages, codeQL, queries, query[QUERIES_USES_PROPERTY], tempDir);
>>>>>>>
await parseQueryUses(languages, codeQL, queries, query[QUERIES_USES_PROPERTY], tempDir, configFile); |
<<<<<<<
import { SettingsService } from "../../state/settings.service"
=======
import { SettingsService } from "../../state/settings.service"
import { FileStateService } from "../../state/fileState.service"
import { FileStateHelper } from "../../util/fileStateHelper"
>>>>>>>
import { SettingsService } from "../../state/settings.service"
import { FileStateService } from "../../state/fileState.service"
import { FileStateHelper } from "../../util/fileStateHelper"
<<<<<<<
this._viewModel.fileName = FileNameHelper.getNewFileName(fileMeta.fileName)
this._viewModel.amountOfNodes = hierarchy(map).descendants().length
=======
this._viewModel.fileName = FileNameHelper.getNewFileName(file.fileMeta.fileName, isDeltaState)
this._viewModel.amountOfNodes = hierarchy(file.map).descendants().length
>>>>>>>
this._viewModel.fileName = FileNameHelper.getNewFileName(fileMeta.fileName, isDeltaState)
this._viewModel.amountOfNodes = hierarchy(map).descendants().length
<<<<<<<
public hide() {
this.$mdDialog.hide()
}
public download() {
FileDownloader.downloadCurrentMap(
this.codeMapPreRenderService.getRenderMap(),
this.codeMapPreRenderService.getRenderFileMeta(),
this.settingsService.getSettings().fileSettings,
this._viewModel.fileContent.filter(x => x.isSelected == true).map(x => x.name),
this._viewModel.fileName
)
this.$mdDialog.hide()
}
=======
>>>>>>> |
<<<<<<<
import { splitSortingOrderAscendingAction } from "./sortingOrderAscending/sortingOrderAscending.splitter"
=======
import { splitSearchPanelModeAction } from "./searchPanelMode/searchPanelMode.splitter"
>>>>>>>
import { splitSortingOrderAscendingAction } from "./sortingOrderAscending/sortingOrderAscending.splitter"
import { splitSearchPanelModeAction } from "./searchPanelMode/searchPanelMode.splitter"
<<<<<<<
if (payload.sortingOrderAscending !== undefined) {
actions.push(splitSortingOrderAscendingAction(payload.sortingOrderAscending))
}
=======
if (payload.searchPanelMode !== undefined) {
actions.push(splitSearchPanelModeAction(payload.searchPanelMode))
}
>>>>>>>
if (payload.sortingOrderAscending !== undefined) {
actions.push(splitSortingOrderAscendingAction(payload.sortingOrderAscending))
}
if (payload.searchPanelMode !== undefined) {
actions.push(splitSearchPanelModeAction(payload.searchPanelMode))
} |
<<<<<<<
import { SearchPanelModeActions } from "./store/appSettings/searchPanelMode/searchPanelMode.actions"
=======
import { isActionOfType } from "../util/reduxHelper"
>>>>>>>
import { SearchPanelModeActions } from "./store/appSettings/searchPanelMode/searchPanelMode.actions"
import { isActionOfType } from "../util/reduxHelper"
<<<<<<<
if (
!(
_.values(IsLoadingMapActions).includes(action.type) ||
_.values(IsLoadingFileActions).includes(action.type) ||
_.values(SearchPanelModeActions).includes(action.type) ||
isSilent
)
) {
=======
if (!(isActionOfType(action.type, IsLoadingMapActions) || isActionOfType(action.type, IsLoadingFileActions) || isSilent)) {
>>>>>>>
if (
!(
isActionOfType(action.type, IsLoadingMapActions) ||
isActionOfType(action.type, IsLoadingFileActions) ||
isActionOfType(action.type, SearchPanelModeActions) ||
isSilent
)
) { |
<<<<<<<
=======
import { addBlacklistItem, removeBlacklistItem } from "../../state/store/fileSettings/blacklist/blacklist.actions"
import { focusNode } from "../../state/store/dynamicSettings/focusedNodePath/focusedNodePath.actions"
import { MetricService } from "../../state/metric.service"
>>>>>>>
import { MetricService } from "../../state/metric.service" |
<<<<<<<
LoadingGifService.subscribe(this.$rootScope, this)
AttributeSideBarService.subscribe(this.$rootScope, this)
=======
LoadingStatusService.subscribe(this.$rootScope, this)
>>>>>>>
AttributeSideBarService.subscribe(this.$rootScope, this)
LoadingStatusService.subscribe(this.$rootScope, this) |
<<<<<<<
import { ExportBlacklistType, ExportCCFile } from "./codeCharta.api.model"
=======
import { StoreService } from "./state/store.service"
import { resetFiles } from "./state/store/files/files.actions"
>>>>>>>
import { StoreService } from "./state/store.service"
import { resetFiles } from "./state/store/files/files.actions"
import { ExportBlacklistType, ExportCCFile } from "./codeCharta.api.model"
<<<<<<<
let validFileContent: ExportCCFile
let fileStateService: FileStateService
const fileName: string = "someFileName"
=======
let storeService: StoreService
let validFileContent
>>>>>>>
let storeService: StoreService
let validFileContent: ExportCCFile
const fileName: string = "someFileName"
<<<<<<<
codeChartaService.loadFiles([{ fileName: fileName, content: validFileContent }]).then(() => {
expect(fileStateService.addFile).toHaveBeenCalledWith(expected)
expect(fileStateService.setSingle).toHaveBeenCalled()
done()
})
=======
codeChartaService
.loadFiles([
{
fileName: validFileContent.fileName,
content: validFileContent
}
])
.then(() => {
expect(storeService.getState().files.getCCFiles()[0]).toEqual(expected)
expect(storeService.getState().files.isSingleState()).toBeTruthy()
done()
})
>>>>>>>
codeChartaService
.loadFiles([
{
fileName: fileName,
content: validFileContent
}
])
.then(() => {
expect(storeService.getState().files.getCCFiles()[0]).toEqual(expected)
expect(storeService.getState().files.isSingleState()).toBeTruthy()
done()
})
<<<<<<<
codeChartaService.loadFiles([{ fileName: fileName, content: validFileContent }]).then(() => {
expect(fileStateService.addFile).toHaveBeenCalledWith(expected)
expect(fileStateService.setSingle).toHaveBeenCalled()
done()
})
=======
codeChartaService
.loadFiles([
{
fileName: validFileContent.fileName,
content: validFileContent
}
])
.then(() => {
expect(storeService.getState().files.getCCFiles()[0]).toEqual(expected)
expect(storeService.getState().files.isSingleState()).toBeTruthy()
done()
})
>>>>>>>
codeChartaService
.loadFiles([
{
fileName: fileName,
content: validFileContent
}
])
.then(() => {
expect(storeService.getState().files.getCCFiles()[0]).toEqual(expected)
expect(storeService.getState().files.isSingleState()).toBeTruthy()
done()
})
<<<<<<<
codeChartaService.loadFiles([{ fileName: fileName, content: validFileContent }]).then(() => {
const expectedWithBlacklist = _.cloneDeep(expected)
expectedWithBlacklist.settings.fileSettings.blacklist = [{ path: "foo", type: BlacklistType.flatten }]
expect(fileStateService.addFile).toHaveBeenLastCalledWith(expectedWithBlacklist)
done()
})
=======
codeChartaService
.loadFiles([
{
fileName: validFileContent.fileName,
content: validFileContent
}
])
.then(() => {
const blacklist = [{ path: "foo", type: BlacklistType.flatten }]
expect(storeService.getState().files.getCCFiles()[0].settings.fileSettings.blacklist).toEqual(blacklist)
done()
})
>>>>>>>
codeChartaService
.loadFiles([
{
fileName: fileName,
content: validFileContent
}
])
.then(() => {
const blacklist = [{ path: "foo", type: BlacklistType.flatten }]
expect(storeService.getState().files.getCCFiles()[0].settings.fileSettings.blacklist).toEqual(blacklist)
done()
}) |
<<<<<<<
=======
viewModel = {
itemPath: "/root",
itemType: BlacklistType.exclude,
error: ""
};
>>>>>>>
<<<<<<<
=======
it("add single blacklist entry", () => {
blacklistPanelController.addBlacklistEntry();
expect(getFilteredBlacklistBy({path: "/root", type: BlacklistType.exclude})).toHaveLength(1);
});
it("add only unique blacklist Entries", () => {
blacklistPanelController.addBlacklistEntry();
blacklistPanelController.addBlacklistEntry();
expect(getFilteredBlacklistBy({path: "/root", type: BlacklistType.exclude})).toHaveLength(1);
expect(blacklistPanelController.viewModel.error).toBe("Pattern already blacklisted");
});
it("not add invalid node to blacklist", () => {
blacklistPanelController.viewModel.itemPath = "/notanode";
blacklistPanelController.addBlacklistEntry();
expect(settingsServiceMock.settings.blacklist).toHaveLength(0);
expect(blacklistPanelController.viewModel.error).toBe("Pattern not found");
});
it("not add invalid node with empty path", () => {
blacklistPanelController.viewModel.itemPath = "";
blacklistPanelController.addBlacklistEntry();
expect(settingsServiceMock.settings.blacklist).toHaveLength(0);
expect(blacklistPanelController.viewModel.error).toBe("Invalid empty pattern");
});
>>>>>>>
<<<<<<<
settingsServiceMock.settings.blacklist.push(blacklistItem);
expect(getFilteredBlacklistBy({path: "/root", type: ExcludeType.exclude})).toHaveLength(1);
=======
blacklistPanelController.addBlacklistEntry();
expect(getFilteredBlacklistBy({path: "/root", type: BlacklistType.exclude})).toHaveLength(1);
>>>>>>>
settingsServiceMock.settings.blacklist.push(blacklistItem);
expect(getFilteredBlacklistBy({path: "/root", type: BlacklistType.exclude})).toHaveLength(1); |
<<<<<<<
private cameraTargetService: CameraTargetService,
=======
private searchPanelModeService: SearchPanelModeService,
>>>>>>>
private cameraTargetService: CameraTargetService,
private searchPanelModeService: SearchPanelModeService, |
<<<<<<<
import { CodeChartaService } from "../../codeCharta.service";
=======
import {Settings, SettingsService} from "../../core/settings/settings.service";
>>>>>>>
import {CodeChartaService} from "../../codeCharta.service";
import { CodeChartaService } from "../../codeCharta.service";
import {SettingsService} from "../../core/settings/settings.service";
<<<<<<<
private codeChartaService: CodeChartaService,
private codeMapUtilService: CodeMapUtilService) {
=======
private codeMapUtilService: CodeMapUtilService,
private settingsService: SettingsService) {
>>>>>>>
private codeChartaService: CodeChartaService,
private codeMapUtilService: CodeMapUtilService,
private settingsService: SettingsService) { |
<<<<<<<
export const VALID_NODE_WITH_PATHS : CodeMapNode = {
name: "root",
path: "/root",
attributes: {},
type: "Folder",
children: [
{
name: "big leaf",
path: "/root/big leaf",
type: "File",
attributes: { RLOC: 100, Functions: 10, MCC: 1 },
link: "http://www.google.de"
},
{
name: "Parent Leaf",
path: "/root/Parent Leaf",
type: "Folder",
attributes: {},
children: [
{
name: "small leaf",
path: "/root/Parent Leaf/small leaf",
type: "File",
attributes: { RLOC: 30, Functions: 100, MCC: 100 }
},
{
name: "other small leaf",
path: "/root/Parent Leaf/other small leaf",
type: "File",
attributes: { RLOC: 70, Functions: 1000, MCC: 10 }
}
]
}
]
}
=======
export const VALID_NODE_WITH_PATH: CodeMapNode = {
name: "root",
attributes: {},
type: "Folder",
path: "/root",
children: [
{
name: "big leaf",
type: "File",
path: "root/big leaf",
attributes: { RLOC: 100, Functions: 10, MCC: 1 },
link: "http://www.google.de"
},
{
name: "Parent Leaf",
type: "Folder",
attributes: {},
path: "/root/Parent Leaf",
children: [
{
name: "small leaf",
type: "File",
path: "/root/Parent Leaf/small leaf",
attributes: { RLOC: 30, Functions: 100, MCC: 100 }
},
{
name: "other small leaf",
type: "File",
path: "/root/Parent Leaf/other small leaf",
attributes: { RLOC: 70, Functions: 1000, MCC: 10 }
},
{
name: "empty folder",
type: "Folder",
path: "/root/Parent Leaf/empty folder",
attributes: {},
children: []
}
]
}
]
}
>>>>>>>
export const VALID_NODE_WITH_PATH: CodeMapNode = {
name: "root",
attributes: {},
type: "Folder",
path: "/root",
children: [
{
name: "big leaf",
type: "File",
path: "/root/big leaf",
attributes: { RLOC: 100, Functions: 10, MCC: 1 },
link: "http://www.google.de"
},
{
name: "Parent Leaf",
type: "Folder",
attributes: {},
path: "/root/Parent Leaf",
children: [
{
name: "small leaf",
type: "File",
path: "/root/Parent Leaf/small leaf",
attributes: { RLOC: 30, Functions: 100, MCC: 100 }
},
{
name: "other small leaf",
type: "File",
path: "/root/Parent Leaf/other small leaf",
attributes: { RLOC: 70, Functions: 1000, MCC: 10 }
},
{
name: "empty folder",
type: "Folder",
path: "/root/Parent Leaf/empty folder",
attributes: {},
children: []
}
]
}
]
} |
<<<<<<<
import {MapTreeViewHoverEventSubscriber, MapTreeViewLevelController} from "../mapTreeView/mapTreeView.level.component";
import {ThreeCameraService} from "./threeViewer/threeCameraService";
import {IAngularEvent, IRootScopeService} from "angular";
import {CodeMapNode} from "../../core/data/model/CodeMap";
import {CodeMapBuilding} from "./rendering/codeMapBuilding";
import {CodeMapRenderService} from "./codeMap.render.service";
=======
import {
MapTreeViewHoverEventSubscriber,
MapTreeViewLevelController
} from "../mapTreeView/mapTreeView.level.component";
import { ThreeCameraService } from "./threeViewer/threeCameraService";
import { ThreeViewerService } from "./threeViewer/threeViewerService";
import { IAngularEvent, IRootScopeService } from "angular";
import { CodeMapNode } from "../../core/data/model/CodeMap";
import { codeMapBuilding } from "./rendering/codeMapBuilding";
import { CodeMapRenderService } from "./codeMap.render.service";
>>>>>>>
import {MapTreeViewHoverEventSubscriber, MapTreeViewLevelController} from "../mapTreeView/mapTreeView.level.component";
import {ThreeCameraService} from "./threeViewer/threeCameraService";
import {IAngularEvent, IRootScopeService} from "angular";
import {CodeMapNode} from "../../core/data/model/CodeMap";
import {CodeMapBuilding} from "./rendering/codeMapBuilding";
import {CodeMapRenderService} from "./codeMap.render.service";
<<<<<<<
onBuildingRightClicked(building: CodeMapBuilding, x: number, y: number, event: IAngularEvent);
=======
onBuildingRightClicked(
building: codeMapBuilding,
x: number,
y: number,
event: IAngularEvent
);
>>>>>>>
onBuildingRightClicked(building: CodeMapBuilding, x: number, y: number, event: IAngularEvent);
<<<<<<<
constructor(private $rootScope: IRootScopeService,
private $window,
private threeCameraService: ThreeCameraService,
private threeRendererService,
private threeSceneService,
private threeUpdateCycleService,
private codeMapRenderService: CodeMapRenderService) {
this.threeUpdateCycleService.register(this.update.bind(this));
=======
constructor(
private $rootScope: IRootScopeService,
private $window,
private threeCameraService: ThreeCameraService,
private threeRendererService,
private threeSceneService,
private threeUpdateCycleService,
private threeViewerService: ThreeViewerService,
private codeMapRenderService: CodeMapRenderService
) {
threeUpdateCycleService.register(this.update.bind(this));
>>>>>>>
constructor(
private $rootScope: IRootScopeService,
private $window,
private threeCameraService: ThreeCameraService,
private threeRendererService,
private threeSceneService,
private threeUpdateCycleService,
private threeViewerService: ThreeViewerService,
private codeMapRenderService: CodeMapRenderService
) {
threeUpdateCycleService.register(this.update.bind(this));
<<<<<<<
public start() {
this.threeRendererService.renderer.domElement.addEventListener("mousemove", this.onDocumentMouseMove.bind(this), false);
this.threeRendererService.renderer.domElement.addEventListener("mouseup", this.onDocumentMouseUp.bind(this), false);
this.threeRendererService.renderer.domElement.addEventListener("mousedown", this.onDocumentMouseDown.bind(this), false);
this.threeRendererService.renderer.domElement.addEventListener("dblclick", this.onDocumentDoubleClick.bind(this), false);
=======
static subscribe(
$rootScope: IRootScopeService,
subscriber: CodeMapMouseEventServiceSubscriber
) {
$rootScope.$on(
"building-hovered",
(e, data: CodeMapBuildingTransition) => {
subscriber.onBuildingHovered(data, e);
}
);
$rootScope.$on(
"building-selected",
(e, data: CodeMapBuildingTransition) => {
subscriber.onBuildingSelected(data, e);
}
);
$rootScope.$on("building-right-clicked", (e, data) => {
subscriber.onBuildingRightClicked(data.building, data.x, data.y, e);
});
}
start() {
this.threeRendererService.renderer.domElement.addEventListener(
"mousemove",
this.onDocumentMouseMove.bind(this),
false
);
this.threeRendererService.renderer.domElement.addEventListener(
"mouseup",
this.onDocumentMouseUp.bind(this),
false
);
this.threeRendererService.renderer.domElement.addEventListener(
"mousedown",
this.onDocumentMouseDown.bind(this),
false
);
this.threeRendererService.renderer.domElement.addEventListener(
"dblclick",
this.onDocumentDoubleClick.bind(this),
false
);
ViewCubeMouseEventsService.subscribeToEventPropagation(
this.$rootScope,
this
);
}
onViewCubeEventPropagation(eventType: string, event: MouseEvent) {
switch (eventType) {
case "mousemove":
this.onDocumentMouseMove(event);
break;
case "mouseup":
this.onDocumentMouseUp();
break;
case "mousedown":
this.onDocumentMouseDown(event);
break;
case "dblclick":
this.onDocumentDoubleClick(event);
break;
}
>>>>>>>
public start() {
this.threeRendererService.renderer.domElement.addEventListener(
"mousemove",
this.onDocumentMouseMove.bind(this),
false
);
this.threeRendererService.renderer.domElement.addEventListener(
"mouseup",
this.onDocumentMouseUp.bind(this),
false
);
this.threeRendererService.renderer.domElement.addEventListener(
"mousedown",
this.onDocumentMouseDown.bind(this),
false
);
this.threeRendererService.renderer.domElement.addEventListener(
"dblclick",
this.onDocumentDoubleClick.bind(this),
false
);
ViewCubeMouseEventsService.subscribeToEventPropagation(
this.$rootScope,
this
);
}
public onViewCubeEventPropagation(eventType: string, event: MouseEvent) {
switch (eventType) {
case "mousemove":
this.onDocumentMouseMove(event);
break;
case "mouseup":
this.onDocumentMouseUp();
break;
case "mousedown":
this.onDocumentMouseDown(event);
break;
case "dblclick":
this.onDocumentDoubleClick(event);
break;
}
<<<<<<<
public onDocumentMouseMove(event) {
const topOffset = $(this.threeRendererService.renderer.domElement).offset().top - $(window).scrollTop();
this.mouse.x = ( event.clientX / this.threeRendererService.renderer.domElement.width ) * 2 - 1;
this.mouse.y = -( (event.clientY - topOffset) / this.threeRendererService.renderer.domElement.height ) * 2 + 1;
=======
onDocumentMouseMove(event) {
const topOffset =
$(this.threeRendererService.renderer.domElement).offset().top -
$(window).scrollTop();
this.mouse.x =
(event.clientX /
this.threeRendererService.renderer.domElement.width) *
2 -
1;
this.mouse.y =
-(
(event.clientY - topOffset) /
this.threeRendererService.renderer.domElement.height
) *
2 +
1;
>>>>>>>
public onDocumentMouseMove(event) {
const topOffset = $(this.threeRendererService.renderer.domElement).offset().top - $(window).scrollTop();
this.mouse.x = ( event.clientX / this.threeRendererService.renderer.domElement.width ) * 2 - 1;
this.mouse.y = -( (event.clientY - topOffset) / this.threeRendererService.renderer.domElement.height ) * 2 + 1;
<<<<<<<
public onDocumentMouseUp() {
=======
onDocumentMouseUp() {
>>>>>>>
public onDocumentMouseUp() {
<<<<<<<
public onBuildingSelected(from: CodeMapBuilding, to: CodeMapBuilding) {
this.$rootScope.$broadcast("building-selected", {to: to, from: from});
=======
onBuildingSelected(from: codeMapBuilding, to: codeMapBuilding) {
this.$rootScope.$broadcast("building-selected", { to: to, from: from });
>>>>>>>
public onBuildingSelected(from: CodeMapBuilding, to: CodeMapBuilding) {
this.$rootScope.$broadcast("building-selected", {to: to, from: from});
<<<<<<<
public onShouldHoverNode(node: CodeMapNode) {
let buildings: CodeMapBuilding[] = this.codeMapRenderService.mapMesh.getMeshDescription().buildings;
buildings.forEach((building) => {
=======
onShouldHoverNode(node: CodeMapNode) {
let buildings: codeMapBuilding[] = this.codeMapRenderService.mapMesh.getMeshDescription()
.buildings;
buildings.forEach(building => {
>>>>>>>
public onShouldHoverNode(node: CodeMapNode) {
let buildings: CodeMapBuilding[] = this.codeMapRenderService.mapMesh.getMeshDescription().buildings;
buildings.forEach((building) => {
<<<<<<<
public static subscribe($rootScope: IRootScopeService, subscriber: CodeMapMouseEventServiceSubscriber) {
$rootScope.$on("building-hovered", (e, data: CodeMapBuildingTransition) => {
subscriber.onBuildingHovered(data, e);
});
$rootScope.$on("building-selected", (e, data: CodeMapBuildingTransition) => {
subscriber.onBuildingSelected(data, e);
});
$rootScope.$on("building-right-clicked", (e, data) => {
subscriber.onBuildingRightClicked(data.building, data.x, data.y, e);
});
}
=======
>>>>>>>
public static subscribe($rootScope: IRootScopeService, subscriber: CodeMapMouseEventServiceSubscriber) {
$rootScope.$on("building-hovered", (e, data: CodeMapBuildingTransition) => {
subscriber.onBuildingHovered(data, e);
});
$rootScope.$on("building-selected", (e, data: CodeMapBuildingTransition) => {
subscriber.onBuildingSelected(data, e);
});
$rootScope.$on("building-right-clicked", (e, data) => {
subscriber.onBuildingRightClicked(data.building, data.x, data.y, e);
});
} |
<<<<<<<
this.character.viewState$.subscribe((viewState) => {
if (viewState === ViewState.OVERVIEW) {
this.changeToOverview();
}
});
this.takeControlService.controlledPlayer$.subscribe(controlledPlayer => {
if (controlledPlayer) {
this.viewerOptions.setFpvCameraOptions(this.viewer);
this.startFirstPersonMode(controlledPlayer);
} else if (controlledPlayer === null) {
this.character.viewState = ViewState.OVERVIEW;
this.overviewSettings();
}
})
}
=======
this.character.initCharacter({
id: 'me',
location: this.utils.getPosition(game.me.currentLocation.location),
heading: game.me.currentLocation.heading,
pitch: GameMapComponent.DEFAULT_PITCH,
state: game.me.state === 'DEAD' ? MeModelState.DEAD : MeModelState.WALKING,
team: game.me.team,
isCrawling: false,
characterInfo: game.me.character
});
this.gameService.startServerUpdatingLoop();
>>>>>>>
this.character.viewState$.subscribe((viewState) => {
if (viewState === ViewState.OVERVIEW) {
this.changeToOverview();
}
});
this.takeControlService.controlledPlayer$.subscribe(controlledPlayer => {
if (controlledPlayer) {
this.viewerOptions.setFpvCameraOptions(this.viewer);
this.startFirstPersonMode(controlledPlayer);
} else if (controlledPlayer === null) {
this.character.viewState = ViewState.OVERVIEW;
this.overviewSettings();
}
})
}
<<<<<<<
const playerHeadCart = Cesium.Cartographic.fromCartesian(this.character.location);
playerHeadCart.height += 4;
=======
>>>>>>>
<<<<<<<
this.lastPlayerHPR = {heading: this.character.heading, pitch: this.character.pitch, range};
=======
this.lastPlayerHead = playerHeadCart;
this.lastPlayerHPR = {heading: this.character.heading, pitch: this.character.pitch, range};
>>>>>>>
this.lastPlayerHead = playerHeadCart;
this.lastPlayerHPR = {heading: this.character.heading, pitch: this.character.pitch, range}; |
<<<<<<<
=======
import { SettingsPanelPageObject } from "../settingsPanel/settingsPanel.po"
import { Browser, Page } from "puppeteer"
>>>>>>>
import { SettingsPanelPageObject } from "../settingsPanel/settingsPanel.po"
import { Browser, Page } from "puppeteer" |
<<<<<<<
import { CharacterService } from './character.service';
import { GameSettingsService } from './game-settings.service';
=======
import { Throttle } from 'lodash-decorators';
import { ApolloService } from '../../core/configured-apollo/network/apollo.service';
import { notifyKillMutation } from '../../graphql/notify-kill.mutation';
import { GameSettingsService } from './game-settings.service';
>>>>>>>
import { ApolloService } from '../../core/configured-apollo/network/apollo.service';
import { notifyKillMutation } from '../../graphql/notify-kill.mutation';
import { GameSettingsService } from './game-settings.service';
import { CharacterService } from './character.service';
<<<<<<<
private serverPositionUpdateInterval;
=======
private socket: SubscriptionClient;
>>>>>>>
private socket: SubscriptionClient;
private serverPositionUpdateInterval;
<<<<<<<
private character: CharacterService,
@Inject(SUBSCRIPTIONS_SOCKET) private socket: SubscriptionClient) {
=======
subscriptionClientService: ApolloService) {
this.socket = subscriptionClientService.subscriptionClient;
>>>>>>>
subscriptionClientService: ApolloService,
private character: CharacterService,) {
this.socket = subscriptionClientService.subscriptionClient;
<<<<<<<
startServerUpdatingLoop() {
this.serverPositionUpdateInterval =
setInterval(() => this.updateServerOnPosition(), GameSettingsService.serverUpdatingRate);
}
updateServerOnPosition() {
const location = this.character.location;
const heading = this.character.heading;
if (!location || !heading) {
return;
}
this.apollo.mutate<UpdatePosition.Mutation>({
=======
@Throttle(GameSettingsService.serverUpdateThrottle)
updatePosition(cartesianPosition: any, heading: number): Observable<ApolloQueryResult<UpdatePosition.Mutation>> {
return this.apollo.mutate<UpdatePosition.Mutation>({
>>>>>>>
startServerUpdatingLoop() {
this.serverPositionUpdateInterval =
setInterval(() => this.updateServerOnPosition(), GameSettingsService.serverUpdatingRate);
}
updateServerOnPosition() {
const location = this.character.location;
const heading = this.character.heading;
if (!location || !heading) {
return;
}
this.apollo.mutate<UpdatePosition.Mutation>({ |
<<<<<<<
isolateNode() {
this.hide();
this.codeMapActionsService.isolateNode(this.contextMenuBuilding);
}
showAllNodes() {
this.hide();
this.codeMapActionsService.showAllNodes();
=======
focusNode() {
this.hideContextMenu();
this.codeMapActionsService.focusNode(this.contextMenuBuilding);
>>>>>>>
focusNode() {
this.hide();
this.codeMapActionsService.focusNode(this.contextMenuBuilding); |
<<<<<<<
map = NodeDecorator.decorateMap(_.cloneDeep(TEST_FILE_WITH_PATHS.map), fileMeta, metricData)
=======
fileStates = _.cloneDeep(FILE_STATES)
map = _.cloneDeep(TEST_FILE_WITH_PATHS.map)
NodeDecorator.decorateMap(map, fileMeta, metricData)
>>>>>>>
map = _.cloneDeep(TEST_FILE_WITH_PATHS.map)
NodeDecorator.decorateMap(map, fileMeta, metricData) |
<<<<<<<
import { CameraTargetService } from "./store/appSettings/cameraTarget/cameraTarget.service"
=======
import { IdToNodeService } from "./store/lookUp/idToNode/idToNode.service"
import { IdToBuildingService } from "./store/lookUp/idToBuilding/idToBuilding.service"
>>>>>>>
import { CameraTargetService } from "./store/appSettings/cameraTarget/cameraTarget.service"
import { IdToNodeService } from "./store/lookUp/idToNode/idToNode.service"
import { IdToBuildingService } from "./store/lookUp/idToBuilding/idToBuilding.service"
<<<<<<<
private cameraTargetService: CameraTargetService,
=======
private idToNodeService: IdToNodeService,
private idToBuildingService: IdToBuildingService,
>>>>>>>
private cameraTargetService: CameraTargetService,
private idToNodeService: IdToNodeService,
private idToBuildingService: IdToBuildingService, |
<<<<<<<
import { CharacterService, MeModelState, ViewState } from '../../services/character.service';
=======
import { MatDialog, MatSnackBar } from '@angular/material';
import { CharacterService, MeModelState } from '../../services/character.service';
>>>>>>>
import { MatDialog, MatSnackBar } from '@angular/material';
import { CharacterService, MeModelState } from '../../services/character.service';
import { CharacterService, MeModelState, ViewState } from '../../services/character.service';
<<<<<<<
import { TakeControlService } from '../../services/take-control.service';
=======
import { SnackBarContentComponent } from '../../../shared/snack-bar-content/snack-bar-content.component';
>>>>>>>
import { TakeControlService } from '../../services/take-control.service';
import { SnackBarContentComponent } from '../../../shared/snack-bar-content/snack-bar-content.component';
<<<<<<<
public isViewer: boolean;
private gameData$: Observable<GameFields.Fragment>;
=======
public gameData$: Observable<GameFields.Fragment>;
public gameNotifications$: Observable<string>;
>>>>>>>
public isViewer: boolean;
private gameData$: Observable<GameFields.Fragment>;
public gameData$: Observable<GameFields.Fragment>;
public gameNotifications$: Observable<string>;
<<<<<<<
private controlledService: TakeControlService) {
=======
private snackBar: MatSnackBar,
private dialog: MatDialog) {
>>>>>>>
private controlledService: TakeControlService,
private snackBar: MatSnackBar) { |
<<<<<<<
markFolder(node: CodeMapNode, color: string) {
let s = this.settingsService.settings;
let newMarkedPackage: MarkedPackage = this.getNewMarkedPackage(node.path, color);
if (!s.markedPackages || s.markedPackages == []) {
this.addFirstPackageToSettings(newMarkedPackage, s);
return;
}
const matchingPackagesByPath = s.markedPackages.filter(p => p.path == newMarkedPackage.path);
const matchingPackagesByPathAndColor = matchingPackagesByPath.filter(p => p.color == newMarkedPackage.color);
const firstMarkedParentPackage = this.getFirstMarkedParentPackage(newMarkedPackage.path, s);
const markedChildrenPackages = this.getMarkedChildrenPackages(newMarkedPackage.path, s);
if (matchingPackagesByPath.length == 0 && (!firstMarkedParentPackage || firstMarkedParentPackage.color != newMarkedPackage.color)) {
this.addMarkedPackage(newMarkedPackage, s);
} else if (matchingPackagesByPathAndColor.length == 0) {
this.removeMarkedPackage(matchingPackagesByPath[0], s);
if (!firstMarkedParentPackage || firstMarkedParentPackage.color != newMarkedPackage.color) {
this.addMarkedPackage(newMarkedPackage, s);
=======
public markFolder(node: CodeMapNode, color: string) {
let startingColor = node.markingColor;
let recFn = (current: CodeMapNode)=>{
if(!current.markingColor || current.markingColor === startingColor) {
current.markingColor = "0x" + color.substr(1);
if(current.children){
current.children.forEach(recFn);
}
>>>>>>>
public markFolder(node: CodeMapNode, color: string) {
let s = this.settingsService.settings;
let newMarkedPackage: MarkedPackage = this.getNewMarkedPackage(node.path, color);
if (!s.markedPackages || s.markedPackages == []) {
this.addFirstPackageToSettings(newMarkedPackage, s);
return;
}
const matchingPackagesByPath = s.markedPackages.filter(p => p.path == newMarkedPackage.path);
const matchingPackagesByPathAndColor = matchingPackagesByPath.filter(p => p.color == newMarkedPackage.color);
const firstMarkedParentPackage = this.getFirstMarkedParentPackage(newMarkedPackage.path, s);
const markedChildrenPackages = this.getMarkedChildrenPackages(newMarkedPackage.path, s);
if (matchingPackagesByPath.length == 0 && (!firstMarkedParentPackage || firstMarkedParentPackage.color != newMarkedPackage.color)) {
this.addMarkedPackage(newMarkedPackage, s);
} else if (matchingPackagesByPathAndColor.length == 0) {
this.removeMarkedPackage(matchingPackagesByPath[0], s);
if (!firstMarkedParentPackage || firstMarkedParentPackage.color != newMarkedPackage.color) {
this.addMarkedPackage(newMarkedPackage, s);
<<<<<<<
unmarkFolder(node: CodeMapNode) {
let s = this.settingsService.settings;
const firstMarkedParentPackage = this.getFirstMarkedParentPackage(node.path, s);
let matchingPackagesByPath = s.markedPackages.filter(p => p.path == node.path);
if (matchingPackagesByPath.length == 0) {
matchingPackagesByPath = s.markedPackages.filter(p => firstMarkedParentPackage && p.path == firstMarkedParentPackage.path);
}
this.removeMarkedPackage(matchingPackagesByPath[0], s);
this.settingsService.applySettings(s);
=======
public unmarkFolder(node: CodeMapNode) {
let startingColor = node.markingColor;
let recFn = (current: CodeMapNode)=>{
if(current.markingColor === startingColor) {
current.markingColor = null;
if(current.children){
current.children.forEach(recFn);
}
}
};
recFn(node);
this.apply();
>>>>>>>
public unmarkFolder(node: CodeMapNode) {
let s = this.settingsService.settings;
const firstMarkedParentPackage = this.getFirstMarkedParentPackage(node.path, s);
let matchingPackagesByPath = s.markedPackages.filter(p => p.path == node.path);
if (matchingPackagesByPath.length == 0) {
matchingPackagesByPath = s.markedPackages.filter(p => firstMarkedParentPackage && p.path == firstMarkedParentPackage.path);
}
this.removeMarkedPackage(matchingPackagesByPath[0], s);
this.settingsService.applySettings(s); |
<<<<<<<
import { LoadingStatusService } from "./loadingStatus.service"
=======
import { FileStateService, FileStateSubscriber } from "./fileState.service"
import { setFileSettings } from "./store/fileSettings/fileSettings.actions"
import { FileStateHelper } from "../util/fileStateHelper"
import { SettingsMerger } from "../util/settingsMerger"
import { IsLoadingMapActions, setIsLoadingMap } from "./store/appSettings/isLoadingMap/isLoadingMap.actions"
import _ from "lodash"
>>>>>>>
import { IsLoadingMapActions, setIsLoadingMap } from "./store/appSettings/isLoadingMap/isLoadingMap.actions"
import _ from "lodash"
<<<<<<<
=======
private getNewFileSettings(fileStates: FileState[]): FileSettings {
const withUpdatedPath = !!FileStateHelper.isPartialState(fileStates)
const visibleFiles = FileStateHelper.getVisibleFileStates(fileStates).map(x => x.file)
return SettingsMerger.getMergedFileSettings(visibleFiles, withUpdatedPath)
}
>>>>>>> |
<<<<<<<
=======
import { TreeMapSettingsActions } from "./treeMap/treeMap.actions"
import { splitFilesAction } from "./files/files.splitter"
>>>>>>>
import { splitFilesAction } from "./files/files.splitter" |
<<<<<<<
const clone = require("rfdc")()
=======
import { IsLoadingMapActions, setIsLoadingMap } from "../../state/store/appSettings/isLoadingMap/isLoadingMap.actions"
import { setIsLoadingFile } from "../../state/store/appSettings/isLoadingFile/isLoadingFile.actions"
>>>>>>>
import { IsLoadingMapActions, setIsLoadingMap } from "../../state/store/appSettings/isLoadingMap/isLoadingMap.actions"
import { setIsLoadingFile } from "../../state/store/appSettings/isLoadingFile/isLoadingFile.actions"
const clone = require("rfdc")() |
<<<<<<<
this.getMapMesh().setBuildingHighlight(this.listOfBuildingsToHighlight, this.selected, settings)
}
public highlightSingleBuilding(building: CodeMapBuilding) {
this.addBuildingToHighlightingList(building)
this.highlightBuildings()
=======
//TODO: Remove once all settings are in the store
settings.appSettings.isPresentationMode = this.storeService.getState().appSettings.isPresentationMode
this.getMapMesh().highlightBuilding(building, this.selected, settings)
this.highlightedBuildings = []
this.highlighted = building
>>>>>>>
//TODO: Remove once all settings are in the store
settings.appSettings.isPresentationMode = this.storeService.getState().appSettings.isPresentationMode
this.getMapMesh().setBuildingHighlight(this.listOfBuildingsToHighlight, this.selected, settings)
}
public highlightSingleBuilding(building: CodeMapBuilding) {
this.addBuildingToHighlightingList(building)
this.highlightBuildings()
<<<<<<<
this.listOfBuildingsToHighlight.push(building)
=======
const settings = this.settingsService.getSettings()
//TODO: Remove once all settings are in the store
settings.appSettings.isPresentationMode = this.storeService.getState().appSettings.isPresentationMode
this.highlightedBuildings.push(building)
this.getMapMesh().highlightBuildings(this.highlightedBuildings, this.selected, settings)
>>>>>>>
this.listOfBuildingsToHighlight.push(building)
<<<<<<<
if (this.listOfBuildingsToHighlight.length > 0) {
this.highlightBuildings()
=======
if (this.highlighted) {
const settings = this.settingsService.getSettings()
//TODO: Remove once all settings are in the store
settings.appSettings.isPresentationMode = this.storeService.getState().appSettings.isPresentationMode
this.getMapMesh().highlightBuilding(this.highlighted, null, settings)
>>>>>>>
if (this.listOfBuildingsToHighlight.length > 0) {
this.highlightBuildings() |
<<<<<<<
import { CodeMapNode, BlacklistType, BlacklistItem, FileSettings, ExportCCFile, FileMeta } from "../codeCharta.model"
=======
import { CCFile, CodeMapNode, BlacklistType, BlacklistItem, FileSettings, ExportCCFile, AttributeTypes } from "../codeCharta.model"
>>>>>>>
import { CodeMapNode, BlacklistType, BlacklistItem, FileSettings, ExportCCFile, FileMeta, AttributeTypes} from "../codeCharta.model"
<<<<<<<
private static getProjectDataAsCCJsonFormat(
map: CodeMapNode,
fileMeta: FileMeta,
s: FileSettings,
downloadSettingsNames: string[]
): ExportCCFile {
return {
projectName: fileMeta.projectName,
apiVersion: fileMeta.apiVersion,
nodes: [this.removeJsonHashkeysAndVisibleAttribute(map)],
attributeTypes: s.attributeTypes,
=======
private static getProjectDataAsCCJsonFormat(file: CCFile, downloadSettingsNames: string[]) {
const s: FileSettings = file.settings.fileSettings
let downloadObject: ExportCCFile = {
projectName: file.fileMeta.projectName,
apiVersion: file.fileMeta.apiVersion,
nodes: [this.removeJsonHashkeysAndVisibleAttribute(file.map)],
attributeTypes: this.getAttributeTypesForJSON(s.attributeTypes),
>>>>>>>
private static getProjectDataAsCCJsonFormat(
map: CodeMapNode,
fileMeta: FileMeta,
s: FileSettings,
downloadSettingsNames: string[]
): ExportCCFile {
return {
projectName: fileMeta.projectName,
apiVersion: fileMeta.apiVersion,
nodes: [this.removeJsonHashkeysAndVisibleAttribute(map)],
attributeTypes: this.getAttributeTypesForJSON(s.attributeTypes),
<<<<<<<
private static getFilteredBlacklist(blacklist: BlacklistItem[], type: BlacklistType): BlacklistItem[] {
return blacklist.filter(x => x.type == type)
=======
private static getAttributeTypesForJSON(attributeTypes: AttributeTypes): AttributeTypes | {} {
if (attributeTypes.edges.length === 0 && attributeTypes.nodes.length === 0) {
return {}
} else {
return attributeTypes
}
}
private static getFilteredBlacklist(file: CCFile, type: BlacklistType): BlacklistItem[] {
return file.settings.fileSettings.blacklist.filter(x => x.type == type)
>>>>>>>
private static getAttributeTypesForJSON(attributeTypes: AttributeTypes): AttributeTypes | {} {
if (attributeTypes.edges.length === 0 && attributeTypes.nodes.length === 0) {
return {}
} else {
return attributeTypes
}
}
private static getFilteredBlacklist(blacklist: BlacklistItem[], type: BlacklistType): BlacklistItem[] {
return blacklist.filter(x => x.type == type) |
<<<<<<<
import { hierarchy } from "d3"
=======
import { MetricService } from "../state/metric.service"
>>>>>>>
import { hierarchy } from "d3"
import { MetricService } from "../state/metric.service"
<<<<<<<
attributes: { unary: 40 },
isBlacklisted: undefined,
=======
attributes: { [MetricService.UNARY_METRIC]: 40 },
>>>>>>>
attributes: { [MetricService.UNARY_METRIC]: 40 },
isBlacklisted: undefined,
<<<<<<<
attributes: { rloc: 100, functions: 10, mcc: 1, unary: 1 },
link: "http://www.google.de",
isBlacklisted: undefined
=======
attributes: { rloc: 100, functions: 10, mcc: 1, [MetricService.UNARY_METRIC]: 1 },
link: "http://www.google.de"
>>>>>>>
attributes: { rloc: 100, functions: 10, mcc: 1, [MetricService.UNARY_METRIC]: 1 },
link: "http://www.google.de",
isBlacklisted: undefined
<<<<<<<
attributes: { unary: 100, functions: 10, mcc: 1 },
isBlacklisted: undefined
=======
attributes: { [MetricService.UNARY_METRIC]: 100, functions: 10, mcc: 1 }
>>>>>>>
attributes: { [MetricService.UNARY_METRIC]: 100, functions: 10, mcc: 1 },
isBlacklisted: undefined
<<<<<<<
attributes: { unary: 100, functions: 5, mcc: 1 },
isBlacklisted: undefined
=======
attributes: { [MetricService.UNARY_METRIC]: 100, functions: 5, mcc: 1 }
>>>>>>>
attributes: { [MetricService.UNARY_METRIC]: 100, functions: 5, mcc: 1 },
isBlacklisted: undefined
<<<<<<<
attributes: { rloc: 100, functions: 10, mcc: 1, unary: 1 },
link: "http://www.google.de",
isBlacklisted: undefined
=======
attributes: { rloc: 100, functions: 10, mcc: 1, [MetricService.UNARY_METRIC]: 1 },
link: "http://www.google.de"
>>>>>>>
attributes: { rloc: 100, functions: 10, mcc: 1, [MetricService.UNARY_METRIC]: 1 },
link: "http://www.google.de",
isBlacklisted: undefined
<<<<<<<
attributes: { rloc: 30, functions: 100, mcc: 100, unary: 1 },
isBlacklisted: undefined
=======
attributes: { rloc: 30, functions: 100, mcc: 100, [MetricService.UNARY_METRIC]: 1 }
>>>>>>>
attributes: { rloc: 30, functions: 100, mcc: 100, [MetricService.UNARY_METRIC]: 1 },
isBlacklisted: undefined |
<<<<<<<
import { BlacklistItem, BlacklistType } from "../model/codeCharta.model"
=======
import { BlacklistItem, BlacklistType } from "../codeCharta.model"
>>>>>>>
import { BlacklistItem, BlacklistType } from "../model/codeCharta.model"
<<<<<<<
import { SettingsMerger } from "../util/settingsMerger"
=======
>>>>>>>
<<<<<<<
it("should subscribe to FilesService", () => {
FilesService.subscribe = jest.fn()
rebuildService()
expect(FilesService.subscribe).toHaveBeenCalledWith($rootScope, storeService)
})
})
describe("onFilesChanged", () => {
beforeEach(() => {
SettingsMerger.getMergedFileSettings = jest.fn().mockReturnValue(DEFAULT_STATE)
storeService.dispatch(resetFiles())
storeService.dispatch(addFile(TEST_DELTA_MAP_A))
storeService.dispatch(addFile(TEST_DELTA_MAP_B))
storeService.dispatch(setDeltaByNames(TEST_DELTA_MAP_B.fileMeta.fileName, TEST_DELTA_MAP_A.fileMeta.fileName))
})
it("should update store with default dynamicSettings and newFileSettings", () => {
storeService.onFilesChanged(storeService.getState().files)
expect(storeService.getState().dynamicSettings.focusedNodePath).toEqual("")
expect(storeService.getState().dynamicSettings.searchedNodePaths).toEqual([])
expect(storeService.getState().dynamicSettings.searchPattern).toEqual("")
expect(storeService.getState().dynamicSettings.margin).toBeNull()
expect(storeService.getState().dynamicSettings.colorRange).toEqual({ from: null, to: null })
expect(storeService.getState().fileSettings).toEqual(DEFAULT_STATE.fileSettings)
})
=======
>>>>>>> |
<<<<<<<
import { CodeMapPreRenderService } from "../codeMap/codeMap.preRender.service"
=======
import { StoreService } from "../../state/store.service"
>>>>>>>
import { CodeMapPreRenderService } from "../codeMap/codeMap.preRender.service"
import { StoreService } from "../../state/store.service"
<<<<<<<
let codeMapPreRenderService: CodeMapPreRenderService
=======
let storeService: StoreService
>>>>>>>
let codeMapPreRenderService: CodeMapPreRenderService
let storeService: StoreService
<<<<<<<
codeMapPreRenderService = getService<CodeMapPreRenderService>("codeMapPreRenderService")
=======
storeService = getService<StoreService>("storeService")
>>>>>>>
codeMapPreRenderService = getService<CodeMapPreRenderService>("codeMapPreRenderService")
storeService = getService<StoreService>("storeService")
<<<<<<<
mapTreeViewLevelController = new MapTreeViewLevelController(
$rootScope,
codeMapActionsService,
settingsService,
codeMapPreRenderService
)
=======
mapTreeViewLevelController = new MapTreeViewLevelController($rootScope, codeMapActionsService, settingsService, storeService)
>>>>>>>
mapTreeViewLevelController = new MapTreeViewLevelController(
$rootScope,
codeMapActionsService,
settingsService,
codeMapPreRenderService,
storeService
) |
<<<<<<<
import { sortingOrderAscending } from "./sortingOrderAscending/sortingOrderAscending.reducer"
=======
import { searchPanelMode } from "./searchPanelMode/searchPanelMode.reducer"
>>>>>>>
import { sortingOrderAscending } from "./sortingOrderAscending/sortingOrderAscending.reducer"
import { searchPanelMode } from "./searchPanelMode/searchPanelMode.reducer"
<<<<<<<
sortingOrderAscending,
=======
searchPanelMode,
>>>>>>>
sortingOrderAscending,
searchPanelMode, |
<<<<<<<
blacklistPanelController.viewModel = viewModel;
settingsServiceMock.settings.map.nodes = simpleHierarchy;
=======
blacklistItem = {path: "/root", type: BlacklistType.exclude};
settingsServiceMock.settings.map.root = simpleHierarchy;
>>>>>>>
blacklistItem = {path: "/root", type: BlacklistType.exclude};
settingsServiceMock.settings.map.nodes = simpleHierarchy; |
<<<<<<<
if (!this.createPathMode) {
screenSpaceCameraController.enableTilt = false;
screenSpaceCameraController.enableRotate = false;
screenSpaceCameraController.enableZoom = false;
const canvas = viewer.canvas;
document.onclick = () => canvas.requestPointerLock();
}
=======
screenSpaceCameraController.enableTilt = false;
screenSpaceCameraController.enableRotate = false;
screenSpaceCameraController.enableZoom = false;
const canvas = viewer.canvas;
canvas.onclick = () => canvas.requestPointerLock();
>>>>>>>
if (!this.createPathMode) {
screenSpaceCameraController.enableTilt = false;
screenSpaceCameraController.enableRotate = false;
screenSpaceCameraController.enableZoom = false;
const canvas = viewer.canvas;
canvas.onclick = () => canvas.requestPointerLock();
} |
<<<<<<<
import { ExportCCFile } from "./codeCharta.api.model"
=======
import { Files } from "./model/files"
>>>>>>>
import { ExportCCFile } from "./codeCharta.api.model"
import { Files } from "./model/files" |
<<<<<<<
import { Edge, EdgeVisibility, Node, Settings } from "../../codeCharta.model"
import { SETTINGS, CODE_MAP_BUILDING, DEFAULT_SETTINGS, OUTGOING_NODE, INCOMING_NODE } from "../../util/dataMocks"
=======
import { Edge, EdgeVisibility, Node } from "../../codeCharta.model"
import { TEST_NODE_LEAF, TEST_NODE_ROOT, VALID_EDGES } from "../../util/dataMocks"
>>>>>>>
import { Edge, EdgeVisibility, Node, State } from "../../codeCharta.model"
import { CODE_MAP_BUILDING, OUTGOING_NODE, INCOMING_NODE, STATE } from "../../util/dataMocks"
<<<<<<<
import { SettingsService } from "../../state/settingsService/settings.service"
import { ColorConverter } from "../../util/color/colorConverter"
=======
import { StoreService } from "../../state/store.service"
import _ from "lodash"
import { setHeightMetric } from "../../state/store/dynamicSettings/heightMetric/heightMetric.actions"
import { setScaling } from "../../state/store/appSettings/scaling/scaling.actions"
>>>>>>>
import { ColorConverter } from "../../util/color/colorConverter"
import { StoreService } from "../../state/store.service"
import { setScaling } from "../../state/store/appSettings/scaling/scaling.actions"
<<<<<<<
let settingsService: SettingsService
let settings: Settings
=======
let nodes: Node[]
let edges: Edge[]
>>>>>>>
let storeService: StoreService
<<<<<<<
function withMockedSettingsService() {
settingsService = codeMapArrowService["settingsService"] = jest.fn().mockReturnValue({
getSettings: jest.fn().mockReturnValue(settings)
})()
}
function withSettingsService() {
settings = DEFAULT_SETTINGS
}
=======
>>>>>>> |
<<<<<<<
colorRangeService.onFilesSelectionChanged(undefined)
=======
withMockedMetricService()
colorRangeService.onFilesSelectionChanged()
>>>>>>>
colorRangeService.onFilesSelectionChanged() |
<<<<<<<
import "./nodeContextMenu/nodeContextMenu";
=======
import "./layoutSwitcher/layoutSwitcher";
>>>>>>>
import "./nodeContextMenu/nodeContextMenu";
import "./layoutSwitcher/layoutSwitcher";
<<<<<<<
"app.codeCharta.ui.nodeContextMenu",
=======
"app.codeCharta.ui.layoutSwitcher",
>>>>>>>
"app.codeCharta.ui.nodeContextMenu",
"app.codeCharta.ui.layoutSwitcher", |
<<<<<<<
EdgeVisibility,
FileMeta,
=======
EdgeVisibility,
>>>>>>>
EdgeVisibility,
FileMeta,
<<<<<<<
import { APIVersions, ExportCCFile, ExportCCFile_0_1 } from "../codeCharta.api.model"
=======
import { Files } from "../model/files"
>>>>>>>
import { APIVersions, ExportCCFile, ExportCCFile_0_1 } from "../codeCharta.api.model"
import { Files } from "../model/files" |
<<<<<<<
import { defaultSortingOrderAscending } from "./sortingOrderAscending/sortingOrderAscending.actions"
=======
import { defaultSearchPanelMode } from "./searchPanelMode/searchPanelMode.actions"
>>>>>>>
import { defaultSortingOrderAscending } from "./sortingOrderAscending/sortingOrderAscending.actions"
import { defaultSearchPanelMode } from "./searchPanelMode/searchPanelMode.actions"
<<<<<<<
isLoadingFile: defaultIsLoadingFile,
sortingOrderAscending: defaultSortingOrderAscending
=======
isLoadingFile: defaultIsLoadingFile,
searchPanelMode: defaultSearchPanelMode
>>>>>>>
isLoadingFile: defaultIsLoadingFile,
searchPanelMode: defaultSearchPanelMode,
sortingOrderAscending: defaultSortingOrderAscending |
<<<<<<<
import { CharacterService } from '../../services/character.service';
=======
import { EndGameDialogComponent } from '../end-game-dialog/end-game-dialog.component';
import { MdDialog } from '@angular/material';
import { CharacterService } from '../../services/character.service';
>>>>>>>
import { EndGameDialogComponent } from '../end-game-dialog/end-game-dialog.component';
import { MdDialog } from '@angular/material';
import { CharacterService } from '../../services/character.service';
<<<<<<<
constructor(private gameService: GameService,
private activatedRoute: ActivatedRoute,
private character: CharacterService,
private router: Router) {
=======
constructor (private gameService: GameService ,
private activatedRoute: ActivatedRoute ,
private router: Router ,
private ngZone: NgZone ,
private dialog: MdDialog) {
>>>>>>>
constructor (private gameService: GameService ,
private character: CharacterService,
private activatedRoute: ActivatedRoute ,
private router: Router ,
private ngZone: NgZone ,
private dialog: MdDialog) {
<<<<<<<
if (!params.playerToken) {
this.router.navigate(['/']);
paramsSubscription.unsubscribe();
return;
}
AuthorizationMiddleware.setToken(params.playerToken);
this.gameService.refreshConnection();
this.gameData$ = (this.gameService.getCurrentGameData() as Observable<any>).map(({ data: { currentGame } }) => currentGame);
this.gameDataSubscription = this.gameData$.subscribe(currentGame => {
this.game = currentGame;
this.me = currentGame.me;
if(this.me){
this.character.validateState(this.me);
}
this.game.players.map<AcNotification>(player => ({
actionType: ActionType.ADD_UPDATE,
id: player.id,
entity: new AcEntity(player),
})).forEach(notification => {
this.players$.next(notification);
});
=======
this.ngZone.runOutsideAngular(() => {
if (!params.playerToken) {
this.router.navigate(['/']);
paramsSubscription.unsubscribe();
return;
}
AuthorizationMiddleware.setToken(params.playerToken);
this.gameService.refreshConnection();
this.gameData$ = (this.gameService.getCurrentGameData() as Observable<any>).map(({data: {currentGame}}) => currentGame);
this.gameDataSubscription = this.gameData$.subscribe(currentGame => {
this.game = currentGame;
this.me = currentGame.me;
>>>>>>>
this.ngZone.runOutsideAngular(() => {
if (!params.playerToken) {
this.router.navigate(['/']);
paramsSubscription.unsubscribe();
return;
}
AuthorizationMiddleware.setToken(params.playerToken);
this.gameService.refreshConnection();
this.gameData$ = (this.gameService.getCurrentGameData() as Observable<any>).map(({data: {currentGame}}) => currentGame);
this.gameDataSubscription = this.gameData$.subscribe(currentGame => {
this.game = currentGame;
this.me = currentGame.me;
if(this.me){
this.character.validateState(this.me);
} |
<<<<<<<
import { setCameraTarget } from "../../../state/store/appSettings/cameraTarget/cameraTarget.actions"
=======
import { FilesService } from "../../../state/store/files/files.service"
>>>>>>>
import { setCameraTarget } from "../../../state/store/appSettings/cameraTarget/cameraTarget.actions"
import { FilesService } from "../../../state/store/files/files.service" |
<<<<<<<
import "./metricValueHovered/metricValueHovered.module"
=======
import "./downloadButton/downloadButton.module"
import "./globalSettingsButton/globalSettingsButton.module"
>>>>>>>
import "./metricValueHovered/metricValueHovered.module"
import "./downloadButton/downloadButton.module"
import "./globalSettingsButton/globalSettingsButton.module"
<<<<<<<
"app.codeCharta.ui.metricValueHovered",
=======
"app.codeCharta.ui.downloadButton",
"app.codeCharta.ui.globalSettingsButton",
>>>>>>>
"app.codeCharta.ui.metricValueHovered",
"app.codeCharta.ui.downloadButton",
"app.codeCharta.ui.globalSettingsButton", |
<<<<<<<
import _ from "lodash"
import { MapColors } from "../../../../model/codeCharta.model"
=======
import { MapColors } from "../../../../codeCharta.model"
>>>>>>>
import { MapColors } from "../../../../model/codeCharta.model" |
<<<<<<<
import { CameraTargetService } from "./store/appSettings/cameraTarget/cameraTarget.service"
=======
import { IsAttributeSideBarVisibleService } from "./store/appSettings/isAttributeSideBarVisible/isAttributeSideBarVisible.service"
>>>>>>>
import { CameraTargetService } from "./store/appSettings/cameraTarget/cameraTarget.service"
import { IsAttributeSideBarVisibleService } from "./store/appSettings/isAttributeSideBarVisible/isAttributeSideBarVisible.service"
<<<<<<<
private cameraTargetService: CameraTargetService,
=======
private isAttributeSideBarVisibleService: IsAttributeSideBarVisibleService,
>>>>>>>
private cameraTargetService: CameraTargetService,
private isAttributeSideBarVisibleService: IsAttributeSideBarVisibleService, |
<<<<<<<
export type PlayerState = "WAITING" | "READY" | "ALIVE" | "IN_BUILDING" | "DEAD" | "CONTROLLED";
=======
export type PlayerState = "WAITING" | "READY" | "ALIVE" | "DEAD";
>>>>>>>
export type PlayerState = "WAITING" | "READY" | "ALIVE" | "DEAD" | "CONTROLLED"; |
<<<<<<<
private gameService: GameService,
private cd: ChangeDetectorRef) {
character.currentStateValue;
=======
private gameService: GameService) {
>>>>>>>
private gameService: GameService,
private cd: ChangeDetectorRef) { |
<<<<<<<
export class MetricService implements FilesSelectionSubscriber, BlacklistSubscriber, AttributeTypesSubscriber {
=======
export class MetricService implements FilesSelectionSubscriber, BlacklistSubscriber {
public static UNARY_METRIC = "unary"
>>>>>>>
export class MetricService implements FilesSelectionSubscriber, BlacklistSubscriber, AttributeTypesSubscriber {
public static UNARY_METRIC = "unary" |
<<<<<<<
import {CodeMap, CodeMapDependency, CodeMapNode} from "../data/model/CodeMap";
=======
import {CodeMap, CodeMapNode} from "../data/model/CodeMap";
import {hierarchy, HierarchyNode} from "d3-hierarchy";
>>>>>>>
import {CodeMap, CodeMapDependency, CodeMapNode} from "../data/model/CodeMap";
import {hierarchy, HierarchyNode} from "d3-hierarchy";
<<<<<<<
temporalCouplingDependencies: CodeMapDependency[];
useCouplingHeight: boolean;
=======
dynamicMargin: boolean;
>>>>>>>
useCouplingHeight: boolean;
dynamicMargin: boolean;
<<<<<<<
invertHeight: false,
temporalCouplingDependencies: [],
useCouplingHeight: false
=======
invertHeight: false,
dynamicMargin: true
>>>>>>>
invertHeight: false,
useCouplingHeight: false,
dynamicMargin: true,
<<<<<<<
this._settings.temporalCouplingDependencies = settings.temporalCouplingDependencies;
this._settings.useCouplingHeight = settings.useCouplingHeight;
=======
this._settings.dynamicMargin = settings.dynamicMargin;
>>>>>>>
this._settings.useCouplingHeight = settings.useCouplingHeight;
this._settings.dynamicMargin = settings.dynamicMargin; |
<<<<<<<
import { GameDialogsComponent } from './views/game-container/game-dialogs/game-dialogs.component';
=======
import { BuildingsComponent } from './views/buildings/buildings.component';
import { BuildingsService } from './services/buildings.service';
import { CollisionDetectorService } from './services/collision-detector.service';
>>>>>>>
import { GameDialogsComponent } from './views/game-container/game-dialogs/game-dialogs.component';
import { BuildingsComponent } from './views/buildings/buildings.component';
import { BuildingsService } from './services/buildings.service';
import { CollisionDetectorService } from './services/collision-detector.service';
<<<<<<<
GameDialogsComponent,
=======
BuildingsComponent,
>>>>>>>
BuildingsComponent,
GameDialogsComponent, |
<<<<<<<
public setScales(scales: Vector3) {
=======
public get buildings(): CodeMapBuilding[] {
return this._buildings
}
public setScales(scales: THREE.Vector3) {
>>>>>>>
public get buildings(): CodeMapBuilding[] {
return this._buildings
}
public setScales(scales: Vector3) { |
<<<<<<<
FileMeta,
FileSelectionState,
FileState,
=======
EdgeVisibility,
>>>>>>>
EdgeVisibility,
<<<<<<<
import { APIVersions, ExportCCFile } from "../codeCharta.api.model"
import { Files } from "../model/files"
=======
>>>>>>> |
<<<<<<<
public static validate(file: { nodes: CodeMapNode[] }): { error: string[]; warning: string[]; title: string } {
let minorApiWrongMessage = ""
let result = { error: [], warning: [], title: "Error" }
=======
private static FILE_IS_INVALID = "file is empty or invalid"
private static API_VERSION_IS_INVALID = "file API Version is empty or invalid"
private static API_VERSION_IS_OUTDATED = "API Version Outdated: Update CodeCharta API Version to match cc.json"
private static MINOR_API_VERSION_IS_OUTDATED = "Minor API Version Wrong"
private static NODES_NOT_UNIQUE = "node names in combination with node types are not unique"
public static validate(file: { apiVersion: string; nodes: CodeMapNode[] }): CCValidationResult {
let result: CCValidationResult = { error: [], warning: [] }
>>>>>>>
private static FILE_IS_INVALID = "file is empty or invalid"
private static API_VERSION_IS_INVALID = "file API Version is empty or invalid"
private static API_VERSION_IS_OUTDATED = "API Version Outdated: Update CodeCharta API Version to match cc.json"
private static MINOR_API_VERSION_IS_OUTDATED = "Minor API Version Wrong"
private static NODES_NOT_UNIQUE = "node names in combination with node types are not unique"
public static validate(file: { apiVersion: string; nodes: CodeMapNode[] }): CCValidationResult {
let result: CCValidationResult = { error: [], warning: [], title: string }
<<<<<<<
result.error = ['<i class="fa fa-exclamation-circle"></i>' + " File is empty or invalid"]
result.title = "Error Loading File"
=======
result.error.push(this.FILE_IS_INVALID)
>>>>>>>
result.error.push(this.FILE_IS_INVALID)
result.title = "Error Loading File"
<<<<<<<
result.error = ['<i class="fa fa-exclamation-circle"></i>' + " File API Version is empty or invalid"]
result.title = "File API Version Error"
=======
result.error.push(this.API_VERSION_IS_INVALID)
>>>>>>>
result.error.push(this.API_VERSION_IS_INVALID)
result.title = "File API Version Error"
<<<<<<<
result.error = [
'<i class="fa fa-exclamation-circle"></i>' + " API Version Outdated: Update CodeCharta API Version to match cc.json"
]
result.title = "Error CodeCharta Major API Version"
=======
result.error.push(this.API_VERSION_IS_OUTDATED)
>>>>>>>
result.error.push(this.API_VERSION_IS_OUTDATED)
result.title = "Error CodeCharta Major API Version"
<<<<<<<
result.warning = [(minorApiWrongMessage = '<i class="fa fa-exclamation-triangle"></i>' + " Minor API Version Outdated")]
result.title = "Warning CodeCharta Minor API Version"
=======
result.warning.push(this.MINOR_API_VERSION_IS_OUTDATED)
>>>>>>>
result.warning.push(this.MINOR_API_VERSION_IS_OUTDATED)
result.title = "Warning CodeCharta Minor API Version"
<<<<<<<
let message: string[] = new Array(validationResult.errors.length)
for (let i = 0; i < validationResult.errors.length; i++) {
let errorMessageBuilder = ""
errorMessageBuilder =
'<i class="fa fa-exclamation-circle"></i>' +
"Parameter: " +
validationResult.errors[i].property +
" is not of type " +
validationResult.errors[i].argument
message[i] = errorMessageBuilder
}
result.error = message
result.warning = [minorApiWrongMessage]
result.title = "Validation Error"
=======
result.error = validationResult.errors.map((error: ValidationError) => this.getValidationMessage(error))
>>>>>>>
result.error = validationResult.errors.map((error: ValidationError) => this.getValidationMessage(error))
result.warning = [minorApiWrongMessage]
result.title = "Validation Error"
<<<<<<<
result.error = ['<i class="fa fa-exclamation-circle"></i>' + "names or ids are not unique"]
result.title = "Uniqueness Error"
=======
result.error.push(this.NODES_NOT_UNIQUE)
>>>>>>>
result.error.push(this.NODES_NOT_UNIQUE)
result.title = "Uniqueness Error" |
<<<<<<<
import { CCAction, FileSettings, State } from "../model/codeCharta.model"
=======
import { CCAction, State } from "../codeCharta.model"
>>>>>>>
<<<<<<<
import { setFileSettings } from "./store/fileSettings/fileSettings.actions"
import { SettingsMerger } from "../util/settingsMerger"
=======
>>>>>>>
<<<<<<<
export class StoreService implements FilesSubscriber {
=======
export class StoreService {
>>>>>>>
export class StoreService {
<<<<<<<
FilesService.subscribe(this.$rootScope, this)
}
public onFilesChanged(files: Files) {
this.dispatch(setFileSettings(this.getNewFileSettings(files)))
=======
>>>>>>>
<<<<<<<
private getNewFileSettings(files: Files): FileSettings {
const withUpdatedPath = files.isPartialState()
const visibleFiles = files.getVisibleFileStates().map(x => x.file)
return SettingsMerger.getMergedFileSettings(visibleFiles, withUpdatedPath)
}
=======
>>>>>>> |
<<<<<<<
import ignore from "ignore"
import { CodeMapHelper } from "../../util/codeMapHelper"
import { hierarchy } from "d3"
import { TreeMapGenerator } from "../../util/treeMapGenerator"
=======
import { IsAttributeSideBarVisibleActions } from "../../state/store/appSettings/isAttributeSideBarVisible/isAttributeSideBarVisible.actions"
>>>>>>>
import ignore from "ignore"
import { CodeMapHelper } from "../../util/codeMapHelper"
import { hierarchy } from "d3"
import { TreeMapGenerator } from "../../util/treeMapGenerator"
import { IsAttributeSideBarVisibleActions } from "../../state/store/appSettings/isAttributeSideBarVisible/isAttributeSideBarVisible.actions" |
<<<<<<<
export const VALID_NODE_WITH_ROOT_UNARY: CodeMapNode = {
name: "root",
attributes: { unary: 200 },
type: "Folder",
path: "/root",
children: [
{
name: "first leaf",
type: "File",
path: "/root/first leaf",
attributes: { unary: 100, Functions: 10, MCC: 1 }
},
{
name: "second leaf",
type: "File",
path: "/root/second leaf",
attributes: { unary: 100, Functions: 5, MCC: 1 }
}
]
}
export const VALID_NODE_WITH_METRICS: CodeMapNode = {
name: "root",
type: "Folder",
attributes: { rloc: 100, Functions: 10, MCC: 1 }
}
=======
export const VALID_NODE_DECORATED: CodeMapNode = {
name: "root",
attributes: { RLOC: 100, Functions: 10, MCC: 1, unary: 5 },
type: "Folder",
path: "/root",
children: [
{
name: "big leaf",
type: "File",
path: "/root/big leaf",
attributes: { RLOC: 100, Functions: 10, MCC: 1, unary: 1 },
link: "http://www.google.de"
},
{
name: "Parent Leaf",
type: "Folder",
attributes: { RLOC: 100, Functions: 10, MCC: 1, unary: 1 },
path: "/root/Parent Leaf",
children: [
{
name: "small leaf",
type: "File",
path: "/root/Parent Leaf/small leaf",
attributes: { RLOC: 30, Functions: 100, MCC: 100, unary: 1 }
},
{
name: "other small leaf",
type: "File",
path: "/root/Parent Leaf/other small leaf",
attributes: { RLOC: 70, Functions: 1000, MCC: 10, unary: 1 },
edgeAttributes: { Imports: { incoming: 12, outgoing: 13 } },
visible: true
}
]
}
]
}
>>>>>>>
export const VALID_NODE_WITH_ROOT_UNARY: CodeMapNode = {
name: "root",
attributes: { unary: 200 },
type: "Folder",
path: "/root",
children: [
{
name: "first leaf",
type: "File",
path: "/root/first leaf",
attributes: { unary: 100, Functions: 10, MCC: 1 }
},
{
name: "second leaf",
type: "File",
path: "/root/second leaf",
attributes: { unary: 100, Functions: 5, MCC: 1 }
}
]
}
export const VALID_NODE_DECORATED: CodeMapNode = {
name: "root",
attributes: { RLOC: 100, Functions: 10, MCC: 1, unary: 5 },
type: "Folder",
path: "/root",
children: [
{
name: "big leaf",
type: "File",
path: "/root/big leaf",
attributes: { RLOC: 100, Functions: 10, MCC: 1, unary: 1 },
link: "http://www.google.de"
},
{
name: "Parent Leaf",
type: "Folder",
attributes: { RLOC: 100, Functions: 10, MCC: 1, unary: 1 },
path: "/root/Parent Leaf",
children: [
{
name: "small leaf",
type: "File",
path: "/root/Parent Leaf/small leaf",
attributes: { RLOC: 30, Functions: 100, MCC: 100, unary: 1 }
},
{
name: "other small leaf",
type: "File",
path: "/root/Parent Leaf/other small leaf",
attributes: { RLOC: 70, Functions: 1000, MCC: 10, unary: 1 },
edgeAttributes: { Imports: { incoming: 12, outgoing: 13 } },
visible: true
}
]
}
]
}
export const VALID_NODE_WITH_METRICS: CodeMapNode = {
name: "root",
type: "Folder",
attributes: { rloc: 100, Functions: 10, MCC: 1 }
} |
<<<<<<<
import "../ui/loadingGif/loadingGif.module"
=======
import _ from "lodash"
>>>>>>>
import "../ui/loadingGif/loadingGif.module"
import _ from "lodash"
<<<<<<<
"app.codeCharta.state", ["app.codeCharta.ui.loadingGif"]
).service(
"fileStateService", FileStateService
).service(
"settingsService", SettingsService
).service(
"metricService", MetricService
);
=======
"app.codeCharta.state", []
)
// Plop: Append service name here
.service(_.camelCase(FileStateService.name), FileStateService)
.service(_.camelCase(SettingsService.name), SettingsService)
.service(_.camelCase(MetricService.name), MetricService);
>>>>>>>
"app.codeCharta.state", ["app.codeCharta.ui.loadingGif"]
)
// Plop: Append service name here
.service(_.camelCase(FileStateService.name), FileStateService)
.service(_.camelCase(SettingsService.name), SettingsService)
.service(_.camelCase(MetricService.name), MetricService); |
<<<<<<<
isWhiteBackground: null
=======
maximizeDetailPanel: null,
isWhiteBackground: null,
resetCameraIfNewFileIsLoaded: null
>>>>>>>
isWhiteBackground: null,
resetCameraIfNewFileIsLoaded: null |
<<<<<<<
import "./metricType/metricType.module"
import "./loadingGif/loadingGif.module"
=======
>>>>>>>
<<<<<<<
"app.codeCharta.ui.metricType",
"app.codeCharta.ui.loadingGif",
=======
>>>>>>>
"app.codeCharta.ui.metricType", |
<<<<<<<
import { GameConfig } from '../../../services/game-config';
import { CesiumService } from 'angular-cesium';
import { environment } from '../../../../../environments/environment';
=======
import { GameSettingsService } from '../../../services/game-settings.service';
import { CharacterService, ViewState } from '../../../services/character.service';
>>>>>>>
import { GameSettingsService } from '../../../services/game-settings.service';
import { CharacterService, ViewState } from '../../../services/character.service';
import { GameConfig } from '../../../services/game-config';
import { CesiumService } from 'angular-cesium';
import { environment } from '../../../../../environments/environment';
<<<<<<<
constructor(private cesiumService: CesiumService) {
=======
constructor(public character: CharacterService) {
>>>>>>>
constructor(private cesiumService: CesiumService, public character: CharacterService) {
<<<<<<<
if (environment.loadTerrain) {
this.loadTerrain();
}
}
loadTerrain() {
this.cesiumService.getViewer().terrainProvider = new Cesium.CesiumTerrainProvider(environment.terrain);
=======
this.character.viewState$.subscribe(viewState=> {
this.hideTiles = viewState === ViewState.OVERVIEW;
})
>>>>>>>
if (environment.loadTerrain) {
this.loadTerrain();
}
this.character.viewState$.subscribe(viewState => {
this.hideTiles = viewState === ViewState.OVERVIEW;
});
}
loadTerrain() {
this.cesiumService.getViewer().terrainProvider = new Cesium.CesiumTerrainProvider(environment.terrain); |
<<<<<<<
import { ThreeSceneService } from "../codeMap/threeViewer/threeSceneService"
import { CodeMapBuilding } from "../codeMap/rendering/codeMapBuilding"
=======
import { StoreService } from "../../state/store.service"
>>>>>>>
import { StoreService } from "../../state/store.service"
import { ThreeSceneService } from "../codeMap/threeViewer/threeSceneService"
import { CodeMapBuilding } from "../codeMap/rendering/codeMapBuilding"
<<<<<<<
let threeSceneService: ThreeSceneService
=======
let storeService: StoreService
>>>>>>>
let storeService: StoreService
let threeSceneService: ThreeSceneService
<<<<<<<
withMockedThreeSceneService()
=======
withMockedStoreService()
>>>>>>>
withMockedStoreService()
withMockedThreeSceneService()
<<<<<<<
fileExtensionBarController = new FileExtensionBarController($rootScope, settingsService, threeSceneService)
}
function withMockedThreeSceneService() {
threeSceneService = fileExtensionBarController["threeSceneService"] = jest.fn().mockReturnValue({
getMapMesh: jest.fn().mockReturnValue({
getMeshDescription: jest.fn().mockReturnValue({
buildings: [codeMapBuilding]
})
}),
addBuildingToHighlightingList: jest.fn(),
highlightBuildings: jest.fn()
})()
=======
fileExtensionBarController = new FileExtensionBarController($rootScope, settingsService, storeService)
>>>>>>>
fileExtensionBarController = new FileExtensionBarController($rootScope, settingsService, threeSceneService)
}
function withMockedThreeSceneService() {
threeSceneService = fileExtensionBarController["threeSceneService"] = jest.fn().mockReturnValue({
getMapMesh: jest.fn().mockReturnValue({
getMeshDescription: jest.fn().mockReturnValue({
buildings: [codeMapBuilding]
})
}),
addBuildingToHighlightingList: jest.fn(),
highlightBuildings: jest.fn()
})()
fileExtensionBarController = new FileExtensionBarController($rootScope, settingsService, storeService) |
<<<<<<<
getMapMesh: jest.fn().mockReturnValue({
clearHighlight: jest.fn(),
highlightBuilding: jest.fn(),
clearSelection: jest.fn(),
selectBuilding: jest.fn()
}),
clearHighlight: jest.fn(),
highlightBuilding: jest.fn(),
clearSelection: jest.fn(),
selectBuilding: jest.fn()
})()
}
function withMockedCodeMapRenderService() {
codeMapRenderService = codeMapMouseEventService["codeMapRenderService"] = jest.fn().mockReturnValue({
mapMesh: {
=======
getMapMesh: jest.fn().mockReturnValue({
>>>>>>>
getMapMesh: jest.fn().mockReturnValue({
clearHighlight: jest.fn(),
highlightBuilding: jest.fn(),
clearSelection: jest.fn(),
selectBuilding: jest.fn(), |
<<<<<<<
get state() {
return this._character && this._character.getValue() && this._character.getValue().state;
=======
get pitch() {
return this._character.getValue().pitch;
}
get state() : MeModelState {
return this._character.getValue().state;
>>>>>>>
get pitch() {
return this._character && this._character.getValue() && this._character.getValue().pitch;
}
get state() : MeModelState {
return this._character && this._character.getValue() && this._character.getValue().state; |
<<<<<<<
import { CameraTargetService } from "./store/appSettings/cameraTarget/cameraTarget.service"
=======
import { SortingOptionService } from "./store/dynamicSettings/sortingOption/sortingOption.service"
import { SortingOrderAscendingService } from "./store/appSettings/sortingOrderAscending/sortingOrderAscending.service"
>>>>>>>
import { CameraTargetService } from "./store/appSettings/cameraTarget/cameraTarget.service"
import { SortingOptionService } from "./store/dynamicSettings/sortingOption/sortingOption.service"
import { SortingOrderAscendingService } from "./store/appSettings/sortingOrderAscending/sortingOrderAscending.service"
<<<<<<<
private cameraTargetService: CameraTargetService,
=======
private sortingOptionService: SortingOptionService,
private sortingOrderAscendingService: SortingOrderAscendingService,
>>>>>>>
private cameraTargetService: CameraTargetService,
private sortingOptionService: SortingOptionService,
private sortingOrderAscendingService: SortingOrderAscendingService, |
<<<<<<<
angular.module("app.codeCharta.ui.experimentalSettingsPanel", ["app.codeCharta.ui.rangeSlider", "app.codeCharta.ui.aggregateSettingsPanel", "app.codeCharta.ui.statisticSettingsPanel", "app.codeCharta.core"])
=======
angular.module("app.codeCharta.ui.experimentalSettingsPanel", ["app.codeCharta.ui.rangeSlider", "app.codeCharta.ui.statisticSettingsPanel", "app.codeCharta.core", "app.codeCharta.ui.layoutSwitcher"])
>>>>>>>
angular.module("app.codeCharta.ui.experimentalSettingsPanel", ["app.codeCharta.ui.rangeSlider", "app.codeCharta.ui.aggregateSettingsPanel", "app.codeCharta.ui.statisticSettingsPanel", "app.codeCharta.core", "app.codeCharta.ui.layoutSwitcher"]) |
<<<<<<<
export function setSwaggerOkResponse(func: Function, dto: any, isArray?: boolean) {
if (swagger) {
const responses = Reflect.getMetadata(swagger.DECORATORS.API_RESPONSE, func) || {};
const groupedMetadata = {
[200]: {
type: dto,
isArray,
description: '',
},
};
Reflect.defineMetadata(swagger.DECORATORS.API_RESPONSE, { ...responses, ...groupedMetadata }, func);
}
}
export function setSwaggerOperation(func: Function, summary: string = '') {
if (swagger) {
const meta = Reflect.getMetadata(swagger.DECORATORS.API_OPERATION, func) || {};
Reflect.defineMetadata(swagger.DECORATORS.API_OPERATION, Object.assign(meta, { summary }), func);
}
}
=======
export function setSwagger(params: any[], func: Function) {
// const metadata = Reflect.getMetadata(swagger.DECORATORS.API_PARAMETERS, func) || [];
Reflect.defineMetadata(swagger.DECORATORS.API_PARAMETERS, params, func);
}
>>>>>>>
export function setSwaggerOkResponse(func: Function, dto: any, isArray?: boolean) {
if (swagger) {
const responses = Reflect.getMetadata(swagger.DECORATORS.API_RESPONSE, func) || {};
const groupedMetadata = {
[200]: {
type: dto,
isArray,
description: '',
},
};
Reflect.defineMetadata(swagger.DECORATORS.API_RESPONSE, { ...responses, ...groupedMetadata }, func);
}
}
export function setSwaggerOperation(func: Function, summary: string = '') {
if (swagger) {
const meta = Reflect.getMetadata(swagger.DECORATORS.API_OPERATION, func) || {};
Reflect.defineMetadata(swagger.DECORATORS.API_OPERATION, Object.assign(meta, { summary }), func);
}
}
export function setSwagger(params: any[], func: Function) {
// const metadata = Reflect.getMetadata(swagger.DECORATORS.API_PARAMETERS, func) || [];
Reflect.defineMetadata(swagger.DECORATORS.API_PARAMETERS, params, func);
} |
<<<<<<<
getManyBase: `Retrieve many ${modelName}`,
getOneBase: `Retrieve one ${modelName}`,
createManyBase: `Create many ${modelName}`,
createOneBase: `Create one ${modelName}`,
updateOneBase: `Update one ${modelName}`,
replaceOneBase: `Replace one ${modelName}`,
deleteOneBase: `Delete one ${modelName}`,
recoverOneBase: `Recover one ${modelName}`,
=======
getManyBase: `Retrieve multiple ${pluralize(modelName)}`,
getOneBase: `Retrieve a single ${modelName}`,
createManyBase: `Create multiple ${pluralize(modelName)}`,
createOneBase: `Create a single ${modelName}`,
updateOneBase: `Update a single ${modelName}`,
replaceOneBase: `Replace a single ${modelName}`,
deleteOneBase: `Delete a single ${modelName}`,
>>>>>>>
getManyBase: `Retrieve multiple ${pluralize(modelName)}`,
getOneBase: `Retrieve a single ${modelName}`,
createManyBase: `Create multiple ${pluralize(modelName)}`,
createOneBase: `Create a single ${modelName}`,
updateOneBase: `Update a single ${modelName}`,
replaceOneBase: `Replace a single ${modelName}`,
deleteOneBase: `Delete a single ${modelName}`,
recoverOneBase: `Recover one ${modelName}`, |
<<<<<<<
shapes: new Set(["country"] as Array<Shape>),
=======
simplify: 0,
shapes: new Set(["switzerland"] as Array<Shape>),
>>>>>>>
simplify: 0,
shapes: new Set(["country"] as Array<Shape>), |
<<<<<<<
public getConfig(): any {
return this.editor && this.editor.config;
=======
getConfig(): any {
return this.editor.config;
>>>>>>>
getConfig(): any {
return this.editor && this.editor.config; |
<<<<<<<
=======
circuitChecks = await compileAndLoadCircuit('performChecksBeforeUpdate_test.circom')
})
it('UpdateStateTree should produce the correct state root', async () => {
const user1StateTreeIndex = 1
const user1VoteOptionIndex = 0
const user1VoteOptionWeight = 5
const user1Command = new Command(
bigInt(user1StateTreeIndex), // user index in state tree
user1.pubKey,
// Vote option index (voting for candidate 0)
bigInt(user1VoteOptionIndex),
// sqrt of the number of voice credits user wishes to spend (spending 25 credit balance)
bigInt(user1VoteOptionWeight),
// Nonce
bigInt(1),
)
const {
circuitInputs,
userVoteOptionTree,
stateTree,
msgTree,
} = await getUpdateStateTreeParams(
user1Command,
user1,
coordinator,
ephemeralKeypair,
)
const witness = circuit.calculateWitness(circuitInputs)
expect(circuit.checkWitness(witness)).toBeTruthy()
const idx = circuit.getSignalIdx('main.root')
const circuitNewStateRoot = witness[idx].toString()
const user1VoteOptionTree = userVoteOptionTree
const curVoteOptionTreeLeafRaw = user1VoteOptionTree.getLeaf(user1VoteOptionIndex)
// Update user vote option tree
// (It replaces the value)
user1VoteOptionTree.update(
user1VoteOptionIndex,
bigInt(user1VoteOptionWeight),
)
// Update state tree leaf (refer to user1Command)
const newStateTreeLeaf = new StateLeaf(
user1.pubKey,
user1VoteOptionTree.root, // User new vote option tree
bigInt(125) +
bigInt(curVoteOptionTreeLeafRaw * curVoteOptionTreeLeafRaw) -
bigInt(user1VoteOptionWeight * user1VoteOptionWeight), // Vote Balance
bigInt(1) // Nonce
)
>>>>>>>
circuitChecks = await compileAndLoadCircuit('performChecksBeforeUpdate_test.circom') |
<<<<<<<
new (options?: ILazyLoadOptions, elements?: NodeListOf<HTMLElement>);
update: (elements?: NodeListOf<HTMLElement>) => void;
destroy: () => void;
load: (element: HTMLElement, force?: boolean) => void;
loadAll: () => void;
loadingCount: number;
=======
new (options?: ILazyLoadOptions, elements?: NodeListOf<HTMLElement>): ILazyLoad;
update: (elements?: NodeListOf<HTMLElement>) => void;
destroy: () => void;
load: (element: HTMLElement, force?: boolean) => void;
loadAll: () => void;
>>>>>>>
new (options?: ILazyLoadOptions, elements?: NodeListOf<HTMLElement>): ILazyLoad;
update: (elements?: NodeListOf<HTMLElement>) => void;
destroy: () => void;
load: (element: HTMLElement, force?: boolean) => void;
loadAll: () => void;
loadingCount: number; |
<<<<<<<
LC().onRequest(UpdateConnectionExplorerRequest, ({ conn, tables, columns }) => {
connectionExplorer.setTreeData(conn, tables, columns, connectionExplorerView);
=======
languageClient.onRequest(UpdateConnectionExplorerRequest, ({ conn, tables, columns }) => {
connectionExplorer.setTreeData(conn, tables, columns);
>>>>>>>
LC().onRequest(UpdateConnectionExplorerRequest, ({ conn, tables, columns }) => {
connectionExplorer.setTreeData(conn, tables, columns); |
<<<<<<<
import { IExtensionPlugin } from '@sqltools/types';
import Context from '@sqltools/vscode/context';
=======
import { IExtensionPlugin, IExtension } from '@sqltools/types';
import { EXT_NAME } from '@sqltools/core/constants';
import { getEditorQueryDetails } from '@sqltools/vscode/utils/query';
>>>>>>>
import { IExtensionPlugin } from '@sqltools/types';
import Context from '@sqltools/vscode/context';
import { EXT_NAME } from '@sqltools/core/constants';
import { getEditorQueryDetails } from '@sqltools/vscode/utils/query';
<<<<<<<
register() {
Context.subscriptions.push(this);
this.createCodelens();
=======
createDecorations(context: IExtension['context']) {
window.onDidChangeActiveTextEditor(editor => {
updateDecorations(editor);
}, null, context.subscriptions);
workspace.onDidChangeTextDocument(event => {
if (window.activeTextEditor && event.document === window.activeTextEditor.document) {
updateDecorations(window.activeTextEditor);
}
}, null, context.subscriptions);
window.onDidChangeTextEditorSelection(event => {
if (event.textEditor && event.textEditor.document === window.activeTextEditor.document) {
updateDecorations(window.activeTextEditor);
}
}, null, context.subscriptions);
updateDecorations(window.activeTextEditor);
}
register(extension: IExtension) {
extension.context.subscriptions.push(this);
this.createCodelens(extension.context);
this.createDecorations(extension.context);
>>>>>>>
createDecorations() {
window.onDidChangeActiveTextEditor(editor => {
updateDecorations(editor);
}, null, Context.subscriptions);
workspace.onDidChangeTextDocument(event => {
if (window.activeTextEditor && event.document === window.activeTextEditor.document) {
updateDecorations(window.activeTextEditor);
}
}, null, Context.subscriptions);
window.onDidChangeTextEditorSelection(event => {
if (event.textEditor && event.textEditor.document === window.activeTextEditor.document) {
updateDecorations(window.activeTextEditor);
}
}, null, Context.subscriptions);
updateDecorations(window.activeTextEditor);
}
register() {
Context.subscriptions.push(this);
this.createCodelens();
this.createDecorations(); |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.